diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-05 12:58:53 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-05 15:47:59 +0100 |
commit | 2c26e47cdcc9ece7927e130c7537369820be6f6a (patch) | |
tree | dd0e694db639ed6f5e95f6172ef3a88484df7a44 /sw | |
parent | 1b76aebcb29aef751127472ba8df4377a9f49b49 (diff) |
Avoid msfilter::util::ConvertColor in DocxTableStyleExport
It's more consistent to do all the any to string conversion on the
import side. Also, when we have the ConvertColor calls in a single
place, audit grab-bag-related calls: those should always enable auto
color conversion.
Change-Id: I39ef74986617ee0ed629607e2a069047879b0422
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxtablestyleexport.cxx | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 5cfc8d62de64..f8b79041645d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -1364,6 +1364,9 @@ DECLARE_OOXML_TEST(testQuicktables, "quicktables.docx") // MediumList2-Accent1. CPPUNIT_ASSERT(getXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='MediumList2-Accent1']/w:tblStylePr[@w:type='band1Vert']/w:tcPr/w:shd", "themeFillTint").equalsIgnoreAsciiCase("3F")); + + // MediumShading2-Accent5. + assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='MediumShading2-Accent5']/w:tblStylePr[@w:type='firstRow']/w:tcPr/w:tcBorders/w:top", "color", "auto"); } DECLARE_OOXML_TEST(testSmartart, "smartart.docx") diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx index fbfad0f5d6fc..752a1554d696 100644 --- a/sw/source/filter/ww8/docxtablestyleexport.cxx +++ b/sw/source/filter/ww8/docxtablestyleexport.cxx @@ -15,7 +15,6 @@ #include <oox/token/tokens.hxx> #include <comphelper/sequenceashashmap.hxx> #include <comphelper/string.hxx> -#include <filter/msfilter/util.hxx> #include <rtl/strbuf.hxx> #include <com/sun/star/beans/PropertyValue.hpp> @@ -155,9 +154,9 @@ void lcl_TableStyleShd(sax_fastparser::FSHelperPtr pSerializer, uno::Sequence<be if (rShd[i].Name == "val") pAttributeList->add(FSNS(XML_w, XML_val), OUStringToOString(rShd[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8).getStr()); else if (rShd[i].Name == "color") - pAttributeList->add(FSNS(XML_w, XML_color), msfilter::util::ConvertColor(rShd[i].Value.get<sal_Int32>(), /*bAutoColor =*/ true)); + pAttributeList->add(FSNS(XML_w, XML_color), OUStringToOString(rShd[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8).getStr()); else if (rShd[i].Name == "fill") - pAttributeList->add(FSNS(XML_w, XML_fill), msfilter::util::ConvertColor(rShd[i].Value.get<sal_Int32>(), /*bAutoColor =*/ true)); + pAttributeList->add(FSNS(XML_w, XML_fill), OUStringToOString(rShd[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8).getStr()); else if (rShd[i].Name == "themeFill") pAttributeList->add(FSNS(XML_w, XML_themeFill), OUStringToOString(rShd[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8).getStr()); else if (rShd[i].Name == "themeFillShade") |