Bug 106322 - Applying a number format changes textual content to 0 (happens also when applying a table style)
Summary: Applying a number format changes textual content to 0 (happens also when appl...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: high normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.1.0 target:6.0.0.1
Keywords:
: 113905 (view as bug list)
Depends on: 131025
Blocks: Writer-Tables-Style Number-Format
  Show dependency treegraph
 
Reported: 2017-03-04 21:10 UTC by Heiko Tietze
Modified: 2021-03-04 17:03 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2017-03-04 21:10:37 UTC
Create a table with alphanumeric content and apply one of the predefined table styles. The style is applied but the content with different format is overridden with zeros.

For example,

A|B|C            A|B|C
D|E|F -> Gray -> D|0|0                
G|H|I            G|0|0    

The style must not affect the content, and I suggest to assign it to a higher priority.
Comment 1 Buovjaga 2017-03-11 18:31:01 UTC
Repro.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha0+
Build ID: 43af3605d7e3b372dcc61f9cbc2cabff09396ed5
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on March 10th 2016
Comment 2 Eike Rathke 2017-11-30 15:12:56 UTC
It also happens when applying a non-Text format to a single table cell, not just for table styles. Only if the content is a string that could be parsed as some numeric or date content in the format's locale the value is converted accordingly, otherwise changed to 0.
Comment 3 Eike Rathke 2017-12-01 14:04:53 UTC
Investigating.
Comment 4 Commit Notification 2017-12-01 19:06: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=acf7e4c0a3dc0cca986bf4d4b7a65bafe7e70abc

Resolves: tdf#106322 keep original cell content when assigning number format

It will be available in 6.1.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 Eike Rathke 2017-12-01 19:38:05 UTC
Pending for 6-0 https://gerrit.libreoffice.org/45695
Comment 6 Commit Notification 2017-12-02 18:26:37 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fd2cdd325cd59eb1f967136170503145b1d75936&h=libreoffice-6-0

Resolves: tdf#106322 keep original cell content when assigning number format

It will be available in 6.0.0.1.

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 Yousuf Philips (jay) (retired) 2017-12-02 19:20:38 UTC
*** Bug 113905 has been marked as a duplicate of this bug. ***