Created attachment 88141 [details] spreadsheet with mentioned macro and formulas Formula in A1 "=0/0" -> result #DIV/0! Formula in B1 "=nonexistingsheet!A0" -> result #NAME? Formula in C1 "=sums(A2:A3)" -> result #NAME? Basic macro: Sub Main sheet = thiscomponent.sheets.getbyindex(0) msgbox sheet.getcellbyposition(0,0).formularesulttype msgbox sheet.getcellbyposition(1,0).formularesulttype msgbox sheet.getcellbyposition(2,0).formularesulttype End Sub All mesageboxes return 1 (VALUE) instead of 4 (ERROR)
Thank you for reporting this issue! I have been able to confirm the issue on: Version 3.5.0.beta0 Platform: Ubuntu 13.04 x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + As I've been able to confirm this problem on an earlier release I am changing the version number as version is the earliest version that we can confirm the bug, we use comments to say that the bug exists in newer versions as well. NOTE: Noel - I have no clue what should be returned by formularesulttype and the documentation isn't terribly helpful - I tested with a number, a =1 and then with the document provided and it basically always shows 1. Documentation says it should return a long so, not sure if this is a bug or behaving as expected but I can confirm the behavior so marking as NEW Marking as: New (confirmed) Normal Medium Keywords - Whiteboard Status - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link: https://wiki.documentfoundation.org/QA/BugTriage There are also other ways to get involved including with marketing, UX, documentation, and of course developing - http://www.libreoffice.org/get-help/mailing-lists/. Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: *Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.1 or later) https://www.libreoffice.org/download/ *If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior *If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT *Update the version field *Reply via email (please reply directly on the bug tracker) *Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for your help! -- The LibreOffice QA Team This NEW Message was generated on: 2015-04-18
(In reply to mindaugas.rucys from comment #0) > Created attachment 88141 [details] > spreadsheet with mentioned macro and formulas > > Formula in A1 "=0/0" -> result #DIV/0! > Formula in B1 "=nonexistingsheet!A0" -> result #NAME? > Formula in C1 "=sums(A2:A3)" -> result #NAME? Still same results. Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+ Build ID: 437210d58f32177ef1829d704f7f4d2f1bbfbfdd TinderBox: Win-x86@39, Branch:master, Time: 2015-06-18_07:21:56 Locale: fi-FI (fi_FI)
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (5.1.5 or 5.2.1 https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug-20160920
Still confirmed Arch Linux 64-bit Version: 6.4.0.0.alpha0+ Build ID: 37fc9f51a8de11d40632e8cda17ccf1fa4b1f503 CPU threads: 8; OS: Linux 5.2; UI render: default; VCL: gtk3; Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US Calc: threaded Built on 6 August 2019
In my case it returns 1, 0, 0: https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1table.html#affea688ab9e00781fa35d8a790d10f0e enum CellContentType - is used to determine the type of contents in a cell. CellContentType_EMPTY = 0, CellContentType_VALUE = 1, CellContentType_TEXT = 2, CellContentType_FORMULA = 3, CellContentType_MAKE_FIXED_SIZE = SAL_MAX_ENUM Maybe FormulaResult should used instead of CellContentType? This property returns not com::sun::star::sheet::FormulaResult but instead com::sun::star::table::CellContentType. Use FormulaResult2 if the correct property is needed. https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1sheet_1_1FormulaResult.html
This is not a bug. As described in description of FormulaResultType attribute of SheetCell Service Reference [1], its return value is CellContentType (see comment 6), which lacks any ERROR value (and it's impossible to change the enumeration, because it's breaking the API and ABI); to obtain a com::sun::star::sheet::FormulaResult constant (having ERROR value), you need to use FormulaResultType2 attribute of the same service (which likely was introduced for that very reason). Or you can use getError() of XCell Interface [2], like described in [3]. [1] https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1sheet_1_1SheetCell.html#affda686bb18571c67c625c9adc1c85f9 [2] https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1table_1_1XCell.html#a79278ec2dc4228f41254eef7e33729f0 [3] https://ask.libreoffice.org/en/question/83622/macro-how-to-get-a-cell-value-set-by-a-formula/