Apache OpenOffice (AOO) Bugzilla – Issue 125044
conditional text field does not update view after changing variable
Last modified: 2017-05-20 10:35:15 UTC
Created attachment 83496 [details] inputfield variable refresh demo conditional text field does not update view after field variable (input field) is changed: - open attached "inputfield_variable_refresh.odt" - click on inputfield variable: Select: "1" - enter 0 <OK> - OO32: text "shown if <> 0" will be hidden - AOO4.0.1/AOO4.1.0: text is still visible, F9 (Refresh) does not help workaround 1: - press (ctrl)+F9 twice: text is hidden now workaround 2: - enter 1 <OK> - enter 0 <OK> -> text is hidden
Reproducible with "AOO 4.2.0-Dev – German UI / German locale [AOO420m1(Build:9800) - Rev. 1599676 2014-06-04]" on German WIN7 Home Premium (64bit)", “historic” 4. User Profile used for all predecessor versions: First time I change Variable to 0 Conditional texts will not follow and become invisible. But after having changed to 1 and then again to 0 condtional texts will disappear as expected. Additional Info: (a) Allready a problem with 3.4.0 (b) Was still ok until 3.3.0 (c) Affected only direction Varialble 1 -> 0 (d) If I save document under new name after it had started to work with variable = 1 problem will reappear after reopen (e) If I save document under new name after variable -> 0 problem will NOT appear after reopen (f) LibO 4.2.4.2 is not affected
maybe https://issues.apache.org/ooo/show_bug.cgi?id=125064 "inputfield for variable changes its assignment in hidden paragraphs" has same root cause for me it looks like writer documents are not completely initialized on open
Oliver will take a look in it. If it's an easy fix we will take it.
I can confirm the described defect on Windows 7 system - defect occurs on my system since OOo 3.4.0 Beta. I am taking over for deeper investigations.
Defect caused by the introduction of the field's content cache needed for clipboard documents. On creation of the <SwTxtFld> instance for the conditional text field the field's content cache is used to determine later on, if a change on the field's content took place and needs further invalidation and updates. Unfortunately, the field's content cache has not been filled. Thus, <SwTxtFld> instance did not got the correct state. --> <SwTxtFld> instance shall use the field's content cache only for clipboard documents. Further on the code which is use to trigger corresponding invalidation and updates should use <SwTxtFld::ExpandAlways()> instead of <SwTxtFld::ExpandTxtFld()> to assure invalidation and updates. I am working on a fix
"orw" committed SVN revision 1602434 into trunk: 125044: - use field's content cache on <SwTxtFld> construction only for clipb...
fixed on trunk. From my point of view the fix can be included into planned 4.1.1 release.
grant showstopper flag after review from Oliver
"orw" committed SVN revision 1603723 into branches/AOO410: 125044: - use field's content cache on <SwTxtFld> construction only for clipb...
fixed on branch AOO410 for planned 4.1.1 release
Because of comment 5: "Defect caused by the introduction of the field's content cache needed for clipboard documents." Maybe as a side effect issue 113171 could also be solved?
Verified in AOO 4.1.1 M1 build on Windows 7 that the described issue was fixed.