summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-06-16 11:57:57 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-06-16 12:11:03 +0200
commitaa0f3ca1cd285e8ffbc10de5510d447a72de980a (patch)
treeb021c1b8e221518e1b0e37d1bb720d2b50d790d8 /writerfilter
parentf1967d9bd4a0cb1558b495b564202a9bde2ab323 (diff)
RTF import of fFitShapeToText shape property
Change-Id: I1d0cd0d34284e6ecabd0b4dc9bf25bc31b7ff4c1
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index d0178ff7b785..08516d1cde7d 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -120,6 +120,7 @@ void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> xShape, OUStrin
uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
sal_Int16 nHoriOrient = 0;
sal_Int16 nVertOrient = 0;
+ boost::optional<bool> obFitShapeToText;
if (aKey == "posh")
{
switch (aValue.toInt32())
@@ -160,10 +161,17 @@ void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> xShape, OUStrin
break;
}
}
+ else if (aKey == "fFitShapeToText")
+ obFitShapeToText.reset(aValue.toInt32() == 1);
if (nHoriOrient != 0)
xPropertySet->setPropertyValue("HoriOrient", uno::makeAny(nHoriOrient));
if (nVertOrient != 0)
xPropertySet->setPropertyValue("VertOrient", uno::makeAny(nVertOrient));
+ if (obFitShapeToText)
+ {
+ xPropertySet->setPropertyValue("SizeType", uno::makeAny(*obFitShapeToText ? text::SizeType::MIN : text::SizeType::FIX));
+ xPropertySet->setPropertyValue("FrameIsAutomaticHeight", uno::makeAny(*obFitShapeToText));
+ }
}
void RTFSdrImport::resolve(RTFShape& rShape, bool bClose)
@@ -444,7 +452,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose)
else if (i->first == "shadowOffsetX")
// EMUs to points
aShadowModel.moOffset.set(OUString::number(i->second.toDouble() / 12700) + "pt");
- else if (i->first == "posh" || i->first == "posv")
+ else if (i->first == "posh" || i->first == "posv" || i->first == "fFitShapeToText")
applyProperty(xShape, i->first, i->second);
else if (i->first == "posrelh")
{