summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-11-13 13:41:17 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-11-13 15:42:37 +0100
commit903bbf3865809ddd03e181eee1c6297c91021743 (patch)
tree6b0d58c9f41195feb2188eab2f3b29c3c1c0ba16 /writerfilter/source
parent400d5d8a90f1f2737f87b7011294cddb8071768f (diff)
writerfilter: fix anchoring of anchored wps (drawingML) shapes
Previous code assumed that either we're dealing with VML shapes (where the shape knows its position, anchoring, etc.) or with Wrtier pictures. drawingML shapes are a third category: they don't know their anchoring (and similar properties), still they are not Writer pictures. For now just fix the anchoring, other properties should be handled in a later follow-up commit. Change-Id: I2fede3b11cfbd423cd50cfc0c032d424c81c6c4a
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index ba8aab269f38..ff3409c80145 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -986,6 +986,16 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
m_pImpl->bIsGraphic = true;
}
+
+ if (bUseShape && m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR)
+ {
+ // If we are here, this is a drawingML shape. For those, only dmapper (and not oox) knows the anchoring infos (just like for Writer pictures).
+ // But they aren't Writer pictures, either (which are already handled above).
+ uno::Reference< beans::XPropertySet > xShapeProps(m_xShape, uno::UNO_QUERY_THROW);
+ xShapeProps->setPropertyValue("AnchorType", uno::makeAny(text::TextContentAnchorType_AT_CHARACTER));
+
+ // TODO handle more properties here like HoriOrientPosition, etc.
+ }
}
}
break;