Bug 73255 - EDITING: Variable disappears when in first line of document
Summary: EDITING: Variable disappears when in first line of document
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.3.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks: Fields
  Show dependency treegraph
 
Reported: 2014-01-03 11:58 UTC by Miguel
Modified: 2019-02-15 12:22 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test case showing the problem (59.24 KB, application/vnd.oasis.opendocument.text)
2014-01-03 11:58 UTC, Miguel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miguel 2014-01-03 11:58:23 UTC
Created attachment 91457 [details]
Test case showing the problem

Problem description: 

Steps to reproduce:
1. Create a variable in the header
2. Create new line, show variable in 2nd line
3. Move varibale to 1st line

Current behavior:
Variable disappears

Expected behavior:
Variable shown.

Please see attached document with the behaviour. When the 1st (empty) line is deleted, the variable disappears.

Tried in  3.5.5.2  and 4.1.3.2

              
Operating System: Ubuntu
Version: 4.1.3.2 release
Comment 1 ben 2014-01-03 12:23:18 UTC
I can confirm that the described behaviour is the same on Windows 7 with LibreOffice 4.1.4.2 with the provided document.

If I perform the steps in a new document with a variable of the 'standard' type, I get the expected behaviour, i.e. the variable does not disappear.
Comment 2 Dominique Boutry 2014-01-07 14:50:05 UTC
Hi. After investigations under LibO 4.2.0.1 rc1 on Win 7, I found the following :

After deleting first (empty) line, the variable doesn't disappear, instead its value is changed to blank. The questions turns to be "when is this variable's value set ?" : it is in the "field/other/set variable", in the header.

So I suppose that the header is processed at the first paragraph mark of the page (= evidence of a non-empty page), and not at the very beginning of the page body. I consider that the documentation should be more explicit on the sequence of setting/showing of such a variable (a text is not a program ; the use of variable, for instance to command the hiding of pieces of texts, is not intuitive).
Comment 3 Dominique Boutry 2014-01-30 13:09:47 UTC
I recently thought to another reason for which the header is processed at the first paragraph mark of the page : it could be to avoid that the header's composents be in the middle of a component of the body text, in case it begun in the previous page.
Comment 4 sophie 2014-03-28 15:16:35 UTC
Confirmed, the variable content is reset when the first line is deleted, ctrl+F9 displays the field correctly, F9 doesn't update it. 
Tested under Version: 4.2.3.2
Build ID: 7c5c769e412afd32da4d946d2cb0c8b0674e95e0 Ubuntu 13.10
Set as New - Sophie
Comment 5 QA Administrators 2015-10-14 19:56:49 UTC Comment hidden (obsolete)
Comment 6 Buovjaga 2015-12-03 14:32:41 UTC
Still confirmed.

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: a7c3a2a9be83686657c06f37d521f9f6d2004ddd
Threads 4; Ver: Windows 6.1; Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2015-11-28_04:39:18
Locale: fi-FI (fi_FI)
Comment 7 QA Administrators 2017-01-03 19:40:56 UTC Comment hidden (obsolete)
Comment 8 Roman Kuznetsov 2019-02-15 12:22:48 UTC
don't repro in

Версия: 6.2.1.1
ID сборки: 757c58e8cb70b2982843211a54750fb3cd79acd5
Потоков ЦП: 4; ОС:Windows 6.1; Отрисовка ИП: по умолчанию; VCL: win; 
Локаль: ru-RU (ru_RU); Язык UI: ru-RU
Calc: threaded

Status->WFM