Bug 61996 - FORMATTING: user-defined cell formatting fails with semicolon between quotation marks
Summary: FORMATTING: user-defined cell formatting fails with semicolon between quotati...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low normal
Assignee: Laurent Balland
URL:
Whiteboard: target:5.2.0 target:5.1.4 target:5.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-08 01:49 UTC by AxelF
Modified: 2016-10-25 18:55 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
correct and incorrect cell formatting examples (110.33 KB, image/png)
2013-03-08 01:49 UTC, AxelF
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AxelF 2013-03-08 01:49:43 UTC
Created attachment 76139 [details]
correct and incorrect cell formatting examples

Problem description:
--------------------
The cell-formatting parser does not recognize the semicolon inside quotation marks (as string limiter) correctly as string, as the semicolon is also used as separator between positive and negative format information.

Steps to reproduce:
-------------------
a1. Select some cells
a2. Open 'Format cells...' dialogue
a3. Select 'user-defined'
a4. Enter first format code "L#"0"s@";"L#"-0"s@" (with quotation marks)
a5. Click OK
a6. Enter a number (e.g. '123') into one of the formatted cells
a7. Displayed result is 'L#123s@' (= correct)
a8. Enter a negative number (e.g. '-123') into one of the formatted cells
a9. Displayed result is 'L#-123s@' (= correct)

b1. Select some cells
b2. Open 'Format cells...' dialogue
b3. Select 'user-defined'
b4. Enter second format code "L#"0"s;";"L#"-0"s;" ('@' is replaced by ';')
b5. Click OK
b6. Enter a number (e.g. '123') into one of the formatted cells
b7. Displayed result is 'L#123"s' (= incorrect)
b8. Enter a negative number (e.g. '-123') into one of the formatted cells
b9. Displayed result is '"' (= incorrect)

Expected behaviour:
-------------------
User-defined cell formatting of number (e.g. '123') shall lead to output like 'L#123s;' (with 'L#" before the number and 's;' after the number).
Comment 1 Peter Schmitt 2013-03-08 08:04:25 UTC
Comment on attachment 76139 [details]
correct and incorrect cell formatting examples

changed Mime-Type to image/png
Comment 2 Peter Schmitt 2013-03-08 08:09:36 UTC
I can confirm this behaviour also in
Version 3.6.4.3 , German version
on
Windows7x64 Professional SP1
Intel Core i5 CPU, M480@2.67GHz 2.66 GHz
RAM 8 GB (7.8 GB eff.)
Comment 3 QA Administrators 2015-02-19 15:51:12 UTC Comment hidden (obsolete)
Comment 4 AxelF 2015-02-27 04:07:16 UTC
I can confirm this behaviour also in Version 4.3.6.2, German Mac version.
Comment 5 AxelF 2015-02-27 04:20:27 UTC
I can confirm this behaviour also in version 4.4.1.2, English Mac version, on Macbook with OSX 10.9.5 (Mavericks).
Comment 6 tommy27 2016-04-16 07:24:10 UTC Comment hidden (obsolete)
Comment 7 AxelF 2016-04-17 06:02:43 UTC
The bug is still present.

LibreOffice Version 5.0.5.2
Operating system: OS X El Capitan 10.11.4
Comment 8 Laurent Balland 2016-05-01 10:30:37 UTC
Workaround: do not insert semicolon inside quotes, but with an escape character. For instance:
"L#"0"s"\;;"L#"-0"s"\;
Comment 9 AxelF 2016-05-02 05:35:03 UTC Comment hidden (no-value)
Comment 10 Commit Notification 2016-05-03 12:10:49 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=88a79589843efc24f8af99bd511a1fff0f7bebef

tdf#61996 Skip quoted text in number format

It will be available in 5.2.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 11 Commit Notification 2016-05-04 18:12:08 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7a8331eb7f4e782cd9febc9923b99d4c02cd2945

fix export crash test due to assert hit, tdf#61996 follow-up

It will be available in 5.2.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 12 Commit Notification 2016-05-25 15:44:30 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9a2b656dbd4acadcfc144ba8db7c9657c7a72f1f&h=libreoffice-5-1

tdf#61996 Skip quoted text in number format

It will be available in 5.1.4.

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 13 Commit Notification 2016-05-30 22:53:00 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=93874236610dd50a46b6db229e022ae364af582a

tdf#97835 tdf#61996 tdf#95339 Add qa unit test

It will be available in 5.3.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.