Bug 76777 - Format "[<>0][Red]General;General"
Summary: Format "[<>0][Red]General;General"
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: odf_validation target:4.3.0 target:4....
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-29 15:02 UTC by M Welinder
Modified: 2014-04-04 16:45 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample file following the standard (5.48 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-03-29 15:02 UTC, M Welinder
Details
Sample file using <> instead of != (5.46 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-03-29 15:03 UTC, M Welinder
Details

Note You need to log in before you can comment on or make changes to this bug.
Description M Welinder 2014-03-29 15:02:01 UTC
LO does not follow the OpenDocument v1.2 standard for conditional number
formats.  The Excel-style format "[<>0][Red]General;General" should be
represented by the following ods sniplet:

<number:number-style style:name="ND-0-0">
  <style:text-properties fo:color="#FF0000"/>
  <number:number number:min-integer-digits="1"/>
  <number:text/>
</number:number-style>
<number:number-style style:name="ND-0">
  <number:number number:min-integer-digits="1"/>
  <number:text/>
  <style:map style:condition="value()!=0" style:apply-style-name="ND-0-0"/>
</number:number-style>

See http://valhalla.fciencias.unam.mx/odfdomdoc/doc-files/OpenDocument-v1.2-part1-cd04.xhtml section 19.470.

LO cannot load this format.  Specifically the problem is that LO does not
understand "value()!=0" and wants this to be "value()<>0".  The standard
does not allow that condition.
Comment 1 M Welinder 2014-03-29 15:02:38 UTC
Created attachment 96588 [details]
Sample file following the standard
Comment 2 M Welinder 2014-03-29 15:03:38 UTC
Created attachment 96589 [details]
Sample file using <> instead of !=
Comment 3 Julien Nabet 2014-03-29 18:29:25 UTC
On pc Debian x86-64 with master sources updated yesterday, I could reproduce the pb from a brand new file.
    <number:number-style style:name="N106P0" style:volatile="true">
      <style:text-properties fo:color="#ff0000" />
      <number:number number:min-integer-digits="1" />
      <number:text />
    </number:number-style>
    <number:number-style style:name="N106">
      <number:number number:min-integer-digits="1" />
      <number:text />
      <style:map style:condition="value()&lt;&gt;0" style:apply-style-name="N106P0" />
    </number:number-style>

Kohei/Markus/Eike: one for you?
Comment 4 Markus Mohrhard 2014-03-29 23:14:17 UTC
If at all it is one for Eike.

Kohei does not use the slickedit address any more.
Comment 5 Eike Rathke 2014-04-03 23:07:10 UTC
*sigh*
Comment 6 Commit Notification 2014-04-04 10:07:43 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

accept proper number style condition != as not equal operator, fdo#76777



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 7 Eike Rathke 2014-04-04 10:15:02 UTC
Pending review
for 4-2 at https://gerrit.libreoffice.org/8834
for 4-1 at https://gerrit.libreoffice.org/8836
Comment 8 Commit Notification 2014-04-04 10:26:56 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3bc729b4b97ff3df67bb7af541b088f88248a1ec

resolved fdo#76777 now write correct number style condition operator !=



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 9 Cor Nouws 2014-04-04 12:24:53 UTC
thanks for submitting the issue and the *fast* fix  :)
Comment 10 Commit Notification 2014-04-04 16:29:46 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=42ab5947518d92db9f0e1ccf063b211a3fd308ff&h=libreoffice-4-2

accept proper number style condition != as not equal operator, fdo#76777


It will be available in LibreOffice 4.2.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 11 Commit Notification 2014-04-04 16:45:56 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bfab5b3bccf34f65d4238d0b43743c7c0365f859&h=libreoffice-4-1

accept proper number style condition != as not equal operator, fdo#76777


It will be available in LibreOffice 4.1.6.

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.