Bug 51793 - EDITING: Bug in NumberRange field in Writer
Summary: EDITING: Bug in NumberRange field in Writer
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.0.0.beta3
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:3.7.0 target:3.5.6 target:3.6.0.1
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-06 11:29 UTC by Olivier Hallot
Modified: 2012-07-11 17:47 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
File showing error in NumberRange fields (16 bits, should be 32 bits) (17.60 KB, application/vnd.oasis.opendocument.text)
2012-07-06 11:29 UTC, Olivier Hallot
Details
File shows exactly where issue occurs (19.49 KB, application/vnd.oasis.opendocument.text)
2012-07-10 09:14 UTC, Olivier Hallot
Details

Note You need to log in before you can comment on or make changes to this bug.
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.