Bug 112526

Summary: insert field (text variable) remains empty
Product: LibreOffice Reporter: Juang Dse <juangdse>
Component: WriterAssignee: JoNi <j.nitschke+tdfbz>
Status: RESOLVED FIXED    
Severity: normal CC: j.nitschke+tdfbz, vsfoote, xiscofauli
Priority: medium Keywords: bibisected, bisected, regression
Version: 6.0.0.0.alpha0+   
Hardware: All   
OS: All   
Whiteboard: target:6.0.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 107739    

Description Juang Dse 2017-09-20 13:33:47 UTC
1. Ctrl-F2
2. Set variable
3. Name = var, Value = some text, Format = Text

Result: empty space

Expected: some text
Comment 1 V Stuart Foote 2017-09-20 16:27:19 UTC
Seems to work correctly on Windows builds.
Windows 10 Ent 64-bit en-US with

Version: 5.4.2.1 (x64)
Build ID: dfa67a98bede79c671438308dc9036d50465d2cb
CPU threads: 8; OS: Windows 6.19; UI render: GL; 
Locale: en-US (en_US); Calc: group

and on

Version: 6.0.0.0.alpha0+
Build ID: e0aed1459513be5e08fab9de06848df5dc9d0b5f
CPU threads: 8; OS: Windows 6.19; UI render: GL; 
TinderBox: Win-x86@39, Branch:master, Time: 2017-09-20_06:45:25
Locale: en-US (en_US); Calc: CL
Comment 2 Xisco FaulĂ­ 2017-09-20 19:24:08 UTC
Regression introduced by:

author	Jochen Nitschke <j.nitschke+logerrit@ok.de>	2017-07-23 20:05:40 (GMT)
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2017-07-27 06:12:27 (GMT)
commit 7f381be4d3261149a5b54048f9605fab0340c221 (patch)
tree 445c49bb915f4c6bd28dac90e17c8d8e73e88ccc
parent ece1072049fba0c7f77391da7775c7cf3f4725ea (diff)
replace sal_uLong variables with sal_uInt32 for SvNumberFormatter IDs
Replace the stopgap type sal_uLong as SvNumberFormatter
format index uses sal_uInt32.

SwInsertDBColAutoPilot uses format indices from SvNumberFormatter and
from the property "FormatKey" which is stored as sal_Int32 but ctor
guards against negative values.

Change type of loop variable in SwCaptionDialog to avoid narrowing
in GetFormatStr/GetFormatKey.

Bisected with: bibisect-linux64-6.0

Adding Cc: to Jochen Nitschke
Comment 3 JoNi 2017-09-27 10:17:44 UTC
submitted a fix on gerrit which solves the problem for me.

https://gerrit.libreoffice.org/#/c/42816/
Comment 4 Commit Notification 2017-09-30 11:52:53 UTC
Jochen Nitschke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=26cfe32516da80a34c560fd214a8799f93cefdc4

tdf#112526 fix insert of text variable in writer

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Xisco FaulĂ­ 2017-10-31 06:46:02 UTC
A polite ping to Jochen Nitschke: is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Thanks
Comment 6 JoNi 2017-11-04 08:39:07 UTC
should be fixed with above commit