From fe6da2feb57c3d5e355a36f6b8ac09b48412ff39 Mon Sep 17 00:00:00 2001 From: Luke Deller Date: Thu, 8 Mar 2018 01:11:40 +1100 Subject: 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 Reviewed-by: Miklos Vajna --- include/filter/msfilter/util.hxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'include') diff --git a/include/filter/msfilter/util.hxx b/include/filter/msfilter/util.hxx index 50252fc6191a..6718dffc9299 100644 --- a/include/filter/msfilter/util.hxx +++ b/include/filter/msfilter/util.hxx @@ -56,15 +56,12 @@ MSFILTER_DLLPUBLIC sal_Unicode bestFitOpenSymbolToMSFont(sal_Unicode cBullet, rtl_TextEncoding& r_ioChrSet, OUString& r_ioFontName); -#define OOXML_COLOR_AUTO 0x0a - /** * Converts tools Color to HTML color (without leading hashmark). * * @param rColor color to convert - * @param bAutoColor if OOXML_COLOR_AUTO should be recognized as an auto color */ -MSFILTER_DLLPUBLIC OString ConvertColor( const Color &rColor, bool bAutoColor = false ); +MSFILTER_DLLPUBLIC OString ConvertColor( const Color &rColor ); /** Paper size in 1/100 millimeters. */ -- cgit