diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-03-06 11:45:15 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-03-06 16:31:12 +0100 |
commit | 9c7dbd9e1d2a131402a80e377630fe1ab5381a47 (patch) | |
tree | 0424df3fded08249b8f42abe5007e63c5368668b /writerfilter | |
parent | e4f492ac0134895ac60e92c54a80b8c7f49615a1 (diff) |
fdo#60722 RTF import: fix line color default
Change-Id: Ic100837dd69498e97d940e5dfb4053c02fc7daa0
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfsdrimport.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx index 641fa973e39b..346fc671512e 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.cxx +++ b/writerfilter/source/rtftok/rtfsdrimport.cxx @@ -100,6 +100,8 @@ void RTFSdrImport::resolve(RTFShape& rShape) beans::PropertyValue aPropertyValue; awt::Rectangle aViewBox; std::vector<beans::PropertyValue> aPathPropVec; + // Default line color is black in Word, blue in Writer. + uno::Any aLineColor = uno::makeAny(COL_BLACK); for (std::vector< std::pair<rtl::OUString, rtl::OUString> >::iterator i = rShape.aProperties.begin(); i != rShape.aProperties.end(); ++i) @@ -138,11 +140,8 @@ void RTFSdrImport::resolve(RTFShape& rShape) } else if ( i->first == "fillBackColor" ) ; // Ignore: complementer of fillColor - else if (i->first == "lineColor" && xPropertySet.is()) - { - aAny <<= msfilter::util::BGRToRGB(i->second.toInt32()); - xPropertySet->setPropertyValue("LineColor", aAny); - } + else if (i->first == "lineColor") + aLineColor <<= msfilter::util::BGRToRGB(i->second.toInt32()); else if ( i->first == "lineBackColor" ) ; // Ignore: complementer of lineColor else if (i->first == "txflTextFlow" && xPropertySet.is()) @@ -297,6 +296,9 @@ void RTFSdrImport::resolve(RTFShape& rShape) OUStringToOString( i->second, RTL_TEXTENCODING_UTF8 ).getStr() << "'"); } + if (xPropertySet.is()) + xPropertySet->setPropertyValue("LineColor", aLineColor); + if (nType == ESCHER_ShpInst_PictureFrame) // picture frame { if (bPib) |