https://bugs.documentfoundation.org/show_bug.cgi?id=165695

            Bug ID: 165695
           Summary: Formulas that return blanks return "0"s instead
           Product: LibreOffice
           Version: 24.8.4.2 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Description:
I have a spreadsheet that contains a lot of formulas. Since I don't like seeing
"0"s where there is no data, and, I don't like changing the application/global
option^^ just for one sheet, I make the formulas return "" when there is no
data; a blank string.  

I've been experimenting with turning off screen updates in my macro code to
make my macros run faster, and got into a state where, despite the formulas
returning "", "0"s were being displayed instead.  

Hitting F2 + enter on an affected cell did not affect the issue.  

Resetting my user profile did not affect the issue.  

Examining a backup copy showed that the problem was constrained within the
affected sheet somehow.  

Critically, changing the global option _did not affect the issue_. Zeros were
always displayed. 

I took apart the ODS zip and did some digging. This line was present in
settings.xml and setting its value to "true" fixed the issue.

          <config:config-item config:name="AutoCalculate"
config:type="boolean">false</config:config-item>






^^Changing the global option would alter other sheets that may depend on this
option being set a particular way, and, would make my sheet display differently
in others' Calc instances that don't have the global option set the expected
way. So not changing the global option, and making my sheet work with the
default settings is the proper way to handle this.

Steps to Reproduce:
Run a macro that does

        ThisComponent.enableAutomaticCalculation(False)

without the corresponding "True" call, and then save the sheet.  

I think. I'm not sure how else the sheet could get into that state, and, I had
just tried enableAutomaticCalculation while testing turning off screen
updating.

Actual Results:
Sheet forever displays "0"s instead of the expected ""s.

Expected Results:
Formulas are respected, and ""s are displayed.  

Also expect that changing the global option would correct the option in the
sheet, or if that's not feasible, then there is UI to correct this.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Posting this bug mainly to help others who end up having a sheet showing "0"s
instead of ""s and can't figure out how to correct the situation.

Version: 24.8.4.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: en-US (C.UTF-8); UI: en-US
Ubuntu package version: 4:24.8.4~rc2-0ubuntu0.24.04.1~lo1
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to