Issue 125044 - conditional text field does not update view after changing variable
Summary: conditional text field does not update view after changing variable
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: 3.4.0 Beta (OOo)
Hardware: PC Windows 7
: P3 Major (vote)
Target Milestone: 4.1.1
Assignee: Oliver-Rainer Wittmann
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-04 17:04 UTC by Oliver Brinzing
Modified: 2017-05-20 10:35 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.2.0-dev
Developer Difficulty: ---
jsc: 4.1.1_release_blocker+


Attachments
inputfield variable refresh demo (8.29 KB, application/vnd.oasis.opendocument.text)
2014-06-04 17:04 UTC, Oliver Brinzing
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Oliver Brinzing 2014-06-04 17:04:23 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
Comment 1 Rainer Bielefeld 2014-06-04 17:40:39 UTC
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
Comment 2 Oliver Brinzing 2014-06-12 15:02:06 UTC
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
Comment 3 jsc 2014-06-12 15:22:09 UTC
Oliver will take a look in it. If it's an easy fix we will take it.
Comment 4 Oliver-Rainer Wittmann 2014-06-13 10:20:39 UTC
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.
Comment 5 Oliver-Rainer Wittmann 2014-06-13 11:40:00 UTC
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
Comment 6 SVN Robot 2014-06-13 14:08:23 UTC
"orw" committed SVN revision 1602434 into trunk:
125044: - use field's content cache on <SwTxtFld> construction only for clipb...
Comment 7 Oliver-Rainer Wittmann 2014-06-13 15:06:11 UTC
fixed on trunk.

From my point of view the fix can be included into planned 4.1.1 release.
Comment 8 jsc 2014-06-16 12:51:18 UTC
grant showstopper flag after review from Oliver
Comment 9 SVN Robot 2014-06-19 06:53:06 UTC
"orw" committed SVN revision 1603723 into branches/AOO410:
125044: - use field's content cache on <SwTxtFld> construction only for clipb...
Comment 10 Oliver-Rainer Wittmann 2014-06-19 06:54:28 UTC
fixed on branch AOO410 for planned 4.1.1 release
Comment 11 mroe 2014-06-22 12:16:18 UTC
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?
Comment 12 Shenfeng Liu 2014-07-11 03:17:05 UTC
Verified in AOO 4.1.1 M1 build on Windows 7 that the described issue was fixed.