diff options
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/CellColorHandler.cxx | 9 | ||||
-rw-r--r-- | writerfilter/source/dmapper/CellColorHandler.hxx | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/CellColorHandler.cxx b/writerfilter/source/dmapper/CellColorHandler.cxx index 6845c8a4d62b..47d329d245fa 100644 --- a/writerfilter/source/dmapper/CellColorHandler.cxx +++ b/writerfilter/source/dmapper/CellColorHandler.cxx @@ -37,6 +37,7 @@ LoggedProperties("CellColorHandler"), m_nShadingPattern( drawing::ShadingPattern::CLEAR ), m_nColor( 0xffffffff ), m_nFillColor( 0xffffffff ), +m_bAutoFillColor( true ), m_OutputFormat( Form ) { } @@ -110,6 +111,9 @@ void CellColorHandler::lcl_attribute(Id rName, Value & rVal) createGrabBag("fill", uno::makeAny(OUString::fromUtf8(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true)))); if( nIntValue == OOXML_COLOR_AUTO ) nIntValue = 0xffffff; //fill color auto means white + else + m_bAutoFillColor = false; + m_nFillColor = nIntValue; break; case NS_ooxml::LN_CT_Shd_color: @@ -271,7 +275,10 @@ TablePropertyMapPtr CellColorHandler::getProperties() if (m_OutputFormat == Paragraph) { - pPropertyMap->Insert(PROP_FILL_STYLE, uno::makeAny(drawing::FillStyle_SOLID)); + // If brush style = clear and FillColor = COLOR_AUTO, then don't enable the fill style - just pre-select the default color + if (nWW8BrushStyle || !m_bAutoFillColor) + pPropertyMap->Insert(PROP_FILL_STYLE, uno::makeAny(drawing::FillStyle_SOLID)); + pPropertyMap->Insert(PROP_FILL_COLOR, uno::makeAny(nApplyColor)); } else diff --git a/writerfilter/source/dmapper/CellColorHandler.hxx b/writerfilter/source/dmapper/CellColorHandler.hxx index 98fe7916b181..98c8aaf18ddf 100644 --- a/writerfilter/source/dmapper/CellColorHandler.hxx +++ b/writerfilter/source/dmapper/CellColorHandler.hxx @@ -37,6 +37,7 @@ private: sal_Int32 m_nShadingPattern; sal_Int32 m_nColor; sal_Int32 m_nFillColor; + bool m_bAutoFillColor; OutputFormat m_OutputFormat; OUString m_aInteropGrabBagName; |