Bug 51793

Summary: EDITING: Bug in NumberRange field in Writer
Product: LibreOffice Reporter: Olivier Hallot <olivier.hallot>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: cno
Version: 3.6.0.0.beta3   
Hardware: Other   
OS: All   
Whiteboard: target:3.7.0 target:3.5.6 target:3.6.0.1
i915 platform: i915 features:
Attachments: File showing error in NumberRange fields (16 bits, should be 32 bits)
File shows exactly where issue occurs

Description Olivier Hallot 2012-07-06 11:29:21 UTC
Created attachment 63902 [details]
File showing error in NumberRange fields (16 bits, should be 32 bits)

The following BUG affects text documents with Number Range field

The attached document shows the bug.

1) Select the first number (field) in the first label.

2) Go to Insert - Fields - Others, select the Variables tab

3) select Number range, select "NumProtocolo" entry.

4) Put 65000 as Value. The numbering in the fields in the document increase one by one. This is expected.

5) Put 66000 as Value. The numbering starts a 464, which is WRONG and unwanted.


Hint: The "NumProtocolo" variable must be 16 bits and should be 32 bits to allow larger numbers.
Comment 1 Cor Nouws 2012-07-07 04:48:09 UTC
and thanks for the hint Olivier ;-)
Comment 2 Olivier Hallot 2012-07-07 06:06:19 UTC
Issue is located in 

/sw/source/ui/fldui/fldmgr.cxx in the following struct

struct SwFldPack
{
    sal_uInt16  nTypeId;

    sal_uInt16  nSubTypeStart;
    sal_uInt16  nSubTypeEnd;

    sal_uLong   nFmtBegin;
    sal_uLong   nFmtEnd;
};

where nSubTypeStart and nSubTypeEnd should be sal_uInt32.
Comment 3 Olivier Hallot 2012-07-10 09:14:29 UTC
Created attachment 64058 [details]
File shows exactly where issue occurs
Comment 4 Not Assigned 2012-07-10 12:23:33 UTC
Cedric Bosdonnat committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=32c7ba61a9ce620c1c9544ac469ccfd143e60bb9

fdo#51793: FormatNumber can handle sal_uInt32 values after all...
Comment 5 Not Assigned 2012-07-11 17:17:22 UTC
Cedric Bosdonnat committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7b139452515f90f536ecb2725c8c86343031bf76&g=libreoffice-3-5

fdo#51793: FormatNumber can handle sal_uInt32 values after all...


It will be available in LibreOffice 3.5.6.
Comment 6 Not Assigned 2012-07-11 17:47:32 UTC
Cedric Bosdonnat committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=13aac1fe6c7b1c04adfe14b678b50b59e231489b&g=libreoffice-3-6

fdo#51793: FormatNumber can handle sal_uInt32 values after all...


It will be available in LibreOffice 3.6.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.