[Libreoffice-bugs] [Bug 107523] New: Inconsistent, history-dependent results of referencing missing variables in conditional text

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Apr 30 05:25:16 UTC 2017


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

            Bug ID: 107523
           Summary: Inconsistent, history-dependent results of referencing
                    missing variables in conditional text
           Product: LibreOffice
           Version: 5.2.6.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: echristenson at hubbell-icd.com

Description:
conditional text, conditional sections, Writer 5.2.6.2, the result of
evaluating a conditional text or a condition to hide a section seems to depend
on whether the variable was previously set in the document, even if the field
that set it has since been erased with the "delete" key.

If I write my conditional text field first, and never set the variable
referenced therein, it seems to evaluate TRUE.  If I then set the variable
referenced therein, with a field in front of the conditional text, things work
as expected.  If I then delete that field, the condition (just the variable)
evaluates as FALSE.  The only user-apparent difference between the two states
is the history of editing the document.


Steps to Reproduce:
1.new writer document.
2.Insert conditional Text using SecondVar (Conditional Text SecondVar --
SecondVar is Set: SecondVar is Clear).
2. Note: SecondVar evaluates to Set
3.Insert Conditional Text using BoolVar (Condtional Text BoolVar -- BoolVar is
Set: BoolVar is Clear).
4. Insert fields/more fields, variables, BoolVar, format Boolean, value TRUE
5. Note: BoolVar evaluates to Set.
6. Erase BoolVar field.
7. BoolVar now evaluates to Clear. 

Actual Results:  
7. BoolVar now evaluates to clear, unlike SecondVar, which evaluates to set.

Expected Results:
BoolVar should have evaluated to Set, or SecondVar should have evaluated to
Clear. (or, alternatively, there should be a way within an expression to tell
if a variable has been set or not)


Reproducible: Always

User Profile Reset: No

Additional Info:
More generally, LO Writer *should* be consistent in its handling of
uninitialized fields when they are tested.  I'd like to see a defined()
operator, like in the C pre-processor, to test whether a user variable has been
set or not.

I have a much longer document where a more complicated conditional (A OR B OR
C) evaluates differently on the first and second consecutive evaluation, two
lines apart.


User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101
Firefox/53.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170430/36d09e92/attachment.html>


More information about the Libreoffice-bugs mailing list