From 9203d3a3824a348fedb395732da107afb6428584 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 6 Jul 2011 11:10:43 +0200 Subject: [PATCH] implement fillcolor default --- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 8320b30d2bdb..061d5998e382 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2439,6 +2439,11 @@ void RTFDocumentImpl::resolveShapeProperties(std::vector< std::paircreateInstance(aService), uno::UNO_QUERY); uno::Reference xPropertySet(xShape, uno::UNO_QUERY); + // Defaults + uno::Any aColor; + aColor <<= (sal_uInt32)0xffffff; // White + xPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("FillColor")), aColor); + for (std::vector< std::pair >::iterator i = rShapeProperties.begin(); i != rShapeProperties.end(); ++i) { if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("shapeType"))) @@ -2463,7 +2468,6 @@ void RTFDocumentImpl::resolveShapeProperties(std::vector< std::pairfirst.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("fillColor"))) { - uno::Any aColor; aColor <<= lcl_BGRToRGB(i->second.toInt32()); xPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("FillColor")), aColor); }