Created attachment 106626 [details] Demonstration of issue If I insert a variable, it doesn't show even though Invisible is not checked 1. Create new text document 2. Ensure View > Field Names is un-checked 3. Type "Test" (without the quotes) 4. Insert variable varA with value "is" (without the quotes) -- a. Insert > Fields > Other > Variables > Set Variable -- b. Name: varA -- c. Value: is -- d. Leave Invisible un-checked -- e. Click Insert Actual result: field appears with empty value Expected result: "is" appears as field value 5. Press enter 6. Insert variable show for varA -- a. Insert > Fields > Other > Variables > Show Variable -- b. Name: varA -- c. Click Insert Actual result: field appears with empty value Expected result: "is" appears as field value Attachment is at this point. 6. View > Field names Result: See Set variable varA = is Show variable varA LibreOffice 4.2.6.3 (not available in drop-down) Intel Core 2 Duo editing
Hello Chas, Thank you for submitting the bug. I can confirm that the writer isnt saving the set variable value in master on Linux. Version: 4.4.0.0.alpha0+ Build ID: df73f4115cfe4d07e4159adf087571687eb173ec TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2014-09-25_23:36:54
** 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.0.5 or 5.1.2 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: 2016-04-16
Still present on LO Writer 5.2.6.2 under Windows 10/x64
>Set_Variable VarA is (without the quotes) seems to set VarA to the value of the variable "is" in Writer 5.3.3.1. Additionally, it wants a number, in spite of the availability of "Text" formatting. This might or might not be correct behavior; the documentation isn't at all clear. IMO, this doesn't seem to be the *BEST* behavior, in that Perl (for example) states that a variable is a named string of characters that might or might not be interpretable as a number. Yes, C++ proceeds to overload the + operator to mean concatenation, but plenty of BASIC languages since time immemorial have achieved this with operators (MID$) and casts, such as NUM$ and STR$.
** 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 with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. 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) from 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: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
still the same problem in Version: 6.1.0.0.alpha1+ Build ID: 8a2745e1beee722c8c9691c397e493cc1160bedf CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk2; TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-04-30_23:34:23 Locale: nl-NL (nl_NL.UTF-8); Calc: group
I believe this is NAB (or maybe a documentation problem). "Standard" no longer appears as a format, but I assume it is the same as "General" (where the same results can be obtained using LO 6.3.4.2) General (and probably Standard) is a number format. The procedure here is assigning a text string to a numerical variable. So it is understandable that Show Variable does not show anything. If you right-click and edit field on the inserted variable and change "is" to a number -- then that number will be shown. If you want to show an alphabetic string, then use the Text format. It works as expected in LO 6.3.4.2 Given how long this bug has been here, I wonder what I have misunderstood.
sdc.blanco@youmail.dk In Microsoft Excel, the General format has the description "no specific format." If you type a number into a cell with that format, it treats it like a number. If you type text into a cell with that format, it treats it like text. So it is reasonable to expect that a field with the format "General" in LibreOffice would similarly adapt to whatever I type into it. It also offers other formats such as dates. LibreOffice fields offer varying formats also including formats explicitly named as being numbers and formats explicitly named as being dates. There is nothing in the field format list that initially displays to indicate that LibreOffice considers General to mean numeric. There is General, Text, and several numeric options. It is only when I further click Additional formats... that we see LibreOffice considers General to be a numeric format. I recognize that LibreOffice is not Microsoft Office. That said, expecting users to realize that something called "General" is a numeric format or that the default for fields is to be a numeric format and that if you want text then you have to explicitly choose Text and not choose General, unlike Excel, then this is a usability issue for people who have to move between Microsoft and LibreOffice. At the very least, you could make it obvious by changing the label from General to General Numeric or, if you want it to be brief, Numeric.
(In reply to Chas Belov from comment #8) > In Microsoft Excel, the General format has the description "no specific > format." Ok. The summary for the bug mentioned "Standard". No other information was given about which format was used for the variable. Maybe the problem here is "documentation" and not a bug in Writer field variables? > There is nothing in the field format list that initially displays to > indicate that LibreOffice considers General to mean numeric. I agree that it is hard to interpret the meaning of the formats (and I could not find any documentation for "General" in "Help"). I will add needsUXeval. Maybe a "tooltip" over some items in the Format list could help (a little). (plus possible documentation improvements).
Adding Eike for the General vs. Text format question. But I'm concerned that LibreOffice silently keeps the previous, correct value. If you set varA to 123 it's shown in the document. And this value remains there after changing the variable to "a456" - intentionally with the typo.
(In reply to Chas Belov from comment #8) > In Microsoft Excel, the General format has the description "no specific > format." If you type a number into a cell with that format, it treats it > like a number. If you type text into a cell with that format, it treats it > like text. So it is reasonable to expect that a field with the format > "General" in LibreOffice would similarly adapt to whatever I type into it. > It also offers other formats such as dates. Sounds reasonable. Variables with the format general should be visible whether data is numeric of text.
(In reply to Heiko Tietze from comment #10) > Adding Eike for the General vs. Text format question. Just coming across this again because it was added as See Also to bug 154613. Same statement as in https://bugs.documentfoundation.org/show_bug.cgi?id=154613#c1 The "Text" and "Formula" entries are UI resource strings, the "General" is a locale data dependent number format code keyword you also see in a table's or Calc's number format dialog, hence may change with the document locale.
I _believe_ the current implementation of not showing text if the General format was assigned is a bug, unless there was a reason for compatibility with Word.
Having taken a look at this and been trying: it makes no sense to display text content with the General or any other number format. Instead, when the input is not convertible to a number or date+time the Text format should be forced. Reason is, saving the field to file a text:user-field-decl can be _either_ a office:value-type="string" text field with a string-value, _or_ an office:value-type="float" numeric field with value. While text:user-field-get theoretically could have a number style:data-style-name to a string text field applied and ignore it (then why even bother having the style), most implementations presumably would not handle that. Forcing an office:value-type="string" text field would be clean. Writer's field handling isn't quite straight forward not to say convoluted.. someone familiar can debug that into existence.. Hints are SwUserFieldType, SwSetExpField and SwFieldVarPage::SubTypeHdl() and all nsSwGetSetExpType::GSE_STRING handling. Good luck..