tdf#143104 Fix xlsx import/export of color filter colors
commit6f908b48373b71d45c8119b296b0504fb586f6f8
authorVasily Melenchuk <vasily.melenchuk@cib.de>
Fri, 24 Sep 2021 13:18:13 +0000 (24 15:18 +0200)
committerThorsten Behrens <thorsten.behrens@allotropia.de>
Fri, 1 Oct 2021 12:00:46 +0000 (1 14:00 +0200)
tree9159e329efa4cb08c23066f6e88ff8f53f4bebf0
parent7a8f7f802a342c2bc301f5d313001829a07a7c92
tdf#143104 Fix xlsx import/export of color filter colors

1. In XLSX filter colors are always stored in dxf as foreground
colors, so Calc should keep them, if possible. So practically
use only one color during import.

3. On export we need to distinguish type of filter, this is done
with cellColor=0 or cellColor=1 attribute of <colorFilter>.

4. Since p.1 there is no need to keep on export separate dxf
structures for fg and bg colors: we always use only foreground
color for color filters.

Co-authored-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Change-Id: Iacd352ae46bf84859dc15ee695b6dc63240afe7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122593
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
sc/qa/unit/data/xlsx/autofilter-colors-fg.xlsx [new file with mode: 0644]
sc/qa/unit/subsequent_export_test2.cxx
sc/source/filter/excel/excrecds.cxx
sc/source/filter/excel/xestyle.cxx
sc/source/filter/inc/xestyle.hxx
sc/source/filter/oox/autofilterbuffer.cxx
sc/source/filter/oox/stylesbuffer.cxx