diff options
author | Luke Deller <luke@deller.id.au> | 2018-03-08 01:11:40 +1100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-03-13 14:06:13 +0100 |
commit | fe6da2feb57c3d5e355a36f6b8ac09b48412ff39 (patch) | |
tree | e8ed7fa33846280e54667d6e8a5435111391ff0b /sw/qa/extras/ooxmlexport/ooxmlexport.cxx | |
parent | fc6a8994055db18b9ba2dce1e26d2b1ea9ea41f3 (diff) |
tdf#116179 Support reading "auto" colour from docx
In docx a colour value is represented as a 6-digit hex RGB value, or
alternatively the word "auto" to represent automatic colour.
- Add support for reading the value "auto" as COL_AUTO. Previously
this would be read as if it were a hex value, stopping at the
letter 'u' which is not a valid hex digit, resulting in the colour
0x00000A - a very dark blue, which looks close enough to black that
it went unnoticed for a long time :-)
- Remove code which tried to handle this wrong 0x00000A value,
including the constant OOXML_COLOR_AUTO, as it is no longer needed
and will cause surprises for anyone who really wanted this exact
shade of dark blue
- Fix unit tests that were checking for 0x00000A
Change-Id: I6000070341931147ff9341ad6281cd3b53c02b46
Reviewed-on: https://gerrit.libreoffice.org/50995
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport.cxx')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index b7acdffbdc16..bc831c024ec1 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -715,7 +715,7 @@ DECLARE_OOXMLEXPORT_TEST(testNumOverrideLvltext, "num-override-lvltext.docx") CPPUNIT_ASSERT_EQUAL(sal_Int16(2), comphelper::SequenceAsHashMap(xRules->getByIndex(1))["ParentNumbering"].get<sal_Int16>()); // The paragraph marker's red font color was inherited by the number portion, this was ff0000. - CPPUNIT_ASSERT_EQUAL(OUString("00000a"), parseDump("//Special[@nType='POR_NUMBER']/SwFont", "color")); + CPPUNIT_ASSERT_EQUAL(OUString("ffffffff"), parseDump("//Special[@nType='POR_NUMBER']/SwFont", "color")); } DECLARE_OOXMLEXPORT_TEST(testNumOverrideStart, "num-override-start.docx") |