Created attachment 137121 [details] File that will not open in Calc We are receiving these documents, and they will not display correctly in LibreOffice Calc. It's missing much of the information. File opens with Microsoft Office 2016 File did not open LO-5.4/Linux, LO-6.0/Linux, LO-5.4/Windows.
Actually the content is there, but the font colour is incorrect. If you copy the sheet to a new one and you change the background or the font colour, you will see the content. Reproduced in Version: 6.0.0.0.alpha0+ Build ID: cfbb8b5090537e79ba70e250ddee86d53facbe15 CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: group and back to LibreOffice 3.3.0 OOO330m19 (Build:6) tag libreoffice-3.3.0.4
The wrong colour information is inside the file: xl/styles.xml file. The wrong code which is causing this issue is: <fonts count="3" x14ac:knownFonts="1"> <font> <sz val="11"/> <color theme="1" rgb="FFFFFF"/> <name val="Calibri"/> <family val="2"/> <scheme val="minor"/> </font> Generally rgb="FFFFFF" colour could be for background, but I need to confirm. The colours with themes are inside file: xl/theme/theme1.xml
Some useful information about colour scheme: http://officeopenxml.com/SSstyles.php http://officeopenxml.com/prSlide-color.php Information about <fonts>: https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.fonts(v=office.14).aspx Information about font: https://msdn.microsoft.com/en-us/library/ff531892(v=office.12).aspx https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.font(v=office.14).aspx According to documentation the "<color theme="1" rgb="FFFFFF"/>" is "Data Bar Color". More information about color class: https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.color(v=office.14).aspx https://msdn.microsoft.com/en-us/library/ff532831(v=office.12).aspx
Import of font attributes is inside the file sc/source/filter/oox/stylesbuffer.cxx inside method "void Font::importAttribs(". We need to make sure that "color" is used properly according to design (which is Data Bar Color): http://www.contextures.com/excel-conditional-formatting-data-bars.html
Generally both rgb="FFFFFF" and rgb="000000", MS Excel is interpreting as Black colour. I think this is the main difference between LO and MS Excel.
http://c-rex.net/projects/samples/ooxml/e1/Part4/OOXML_P4_DOCX_bgColor_topic_ID0ERK35.html
I understand what is the root cause of problem. If both rgb and theme is specified, like: <color theme="1" rgb="FFFFFF"/> Then the "theme" should be taken into account instead of rgb
With indexed colour, rgb and them, <color theme="1" rgb="FFFFFF" indexed="62" /> The priority is as follows: 1. theme 2. rgb 3. indexed
Review: https://gerrit.libreoffice.org/#/c/45279/
Bartosz Kosiorek committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=51a1fb0beb813624b5bc3255a889f9d630ccb0d4 tdf#113271 Fix order of color's attributes import. 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.
Bartosz Kosiorek committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3278c8f9bb040cddd15d9e7eb4991d0447cbc964&h=libreoffice-5-4 tdf#113271 Fix order of color's attributes import. It will be available in 5.4.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.
Bartosz Kosiorek committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5930033f050e933a134a1ff11974b8601d8a7f9a&h=libreoffice-6-0 tdf#113271 Fix order of color's attributes import. 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.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/034fa64b2becaf1b1eefa0a24d52808f30ce7c12 tdf#113271: sc_subsequent_export: Add unittest It will be available in 7.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.