summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-11-26 16:24:13 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-11-26 16:33:16 +0100
commit0205f0a2712f0bbc3629b1cc8590105d5dcf11db (patch)
tree39b36bba2abbb77676b1705d83230ccb39039ac4 /writerfilter
parent1f1fa03f4f902254f73cc15a3f44c23d489933bb (diff)
DOCX drawingML shape import: initial wps:txbx positioning
Change-Id: Id779ed88d657257b614d910a2191ed4974612c8f
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index c0fa4b853f6e..fe5ef95dd6b5 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1004,6 +1004,18 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
// This needs to be AT_PARAGRAPH and not AT_CHARACTER, otherwise shape will move when the user inserts a new paragraph.
xShapeProps->setPropertyValue("AnchorType", uno::makeAny(text::TextContentAnchorType_AT_PARAGRAPH));
+ uno::Reference<lang::XServiceInfo> xServiceInfo(m_xShape, uno::UNO_QUERY_THROW);
+ if (xServiceInfo->supportsService("com.sun.star.text.TextFrame"))
+ {
+ // For non-textframes, this is handled already in oox::drawingml::Shape::createAndInsert().
+ xShapeProps->setPropertyValue("HoriOrient", uno::makeAny(text::HoriOrientation::NONE));
+ xShapeProps->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::NONE));
+ xShapeProps->setPropertyValue("HoriOrientPosition", uno::makeAny(m_pImpl->nLeftPosition));
+ xShapeProps->setPropertyValue("VertOrientPosition", uno::makeAny(m_pImpl->nTopPosition));
+ xShapeProps->setPropertyValue("HoriOrientRelation", uno::makeAny(text::RelOrientation::FRAME));
+ xShapeProps->setPropertyValue("VertOrientRelation", uno::makeAny(text::RelOrientation::FRAME));
+ }
+
m_pImpl->applyMargins(xShapeProps);
bool bOpaque = m_pImpl->bOpaque && !m_pImpl->rDomainMapper.IsInHeaderFooter();
if (!bOpaque)