summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-03-06 12:01:49 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-03-06 16:31:12 +0100
commitcf2a1277acd4a29492f056a626b13e903d391027 (patch)
treea3e8668d6b39737e4317d1964b7f575465671656
parent9c7dbd9e1d2a131402a80e377630fe1ab5381a47 (diff)
fdo#60722 RTF import: fix line width default
Change-Id: I6e6ca4bcd66fca60d305bb21d71018c88d854289
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 346fc671512e..5744d97bbc87 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -102,6 +102,8 @@ void RTFSdrImport::resolve(RTFShape& rShape)
std::vector<beans::PropertyValue> aPathPropVec;
// Default line color is black in Word, blue in Writer.
uno::Any aLineColor = uno::makeAny(COL_BLACK);
+ // Default line width is 0.75 pt (26 mm100) in Word, 0 in Writer.
+ uno::Any aLineWidth = uno::makeAny(sal_Int32(26));
for (std::vector< std::pair<rtl::OUString, rtl::OUString> >::iterator i = rShape.aProperties.begin();
i != rShape.aProperties.end(); ++i)
@@ -165,12 +167,8 @@ void RTFSdrImport::resolve(RTFShape& rShape)
aAny <<= i->second.toInt32()*100/65536;
xPropertySet->setPropertyValue("RotateAngle", aAny);
}
- else if (i->first == "lineWidth" && xPropertySet.is())
- {
-
- aAny <<= i->second.toInt32()/360;
- xPropertySet->setPropertyValue("LineWidth", aAny);
- }
+ else if (i->first == "lineWidth")
+ aLineWidth <<= i->second.toInt32()/360;
else if ( i->first == "pVerticies" )
{
uno::Sequence<drawing::EnhancedCustomShapeParameterPair> aCoordinates;
@@ -297,7 +295,10 @@ void RTFSdrImport::resolve(RTFShape& rShape)
}
if (xPropertySet.is())
+ {
xPropertySet->setPropertyValue("LineColor", aLineColor);
+ xPropertySet->setPropertyValue("LineWidth", aLineWidth);
+ }
if (nType == ESCHER_ShpInst_PictureFrame) // picture frame
{