[Libreoffice-commits] core.git: sw/qa writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Feb 19 13:20:56 CET 2014
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 2 ++
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 13 ++++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
New commits:
commit 4fc2bec5251e7aed613e73f234a02c0cd80fee35
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Feb 19 13:08:07 2014 +0100
DOCX OLE import: inherit more properties
Change-Id: Ifa7eb3eee774266f440b313437f0decce27eedc5
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 3c7c473..7436e58 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1787,6 +1787,8 @@ DECLARE_OOXMLIMPORT_TEST(testOleAnchor, "ole-anchor.docx")
{
// This was AS_CHARACTER, even if the VML style explicitly contains "position:absolute".
CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, getProperty<text::TextContentAnchorType>(getShape(1), "AnchorType"));
+ // This was DYNAMIC, even if the default is THROUGHT and there is no w10:wrap element in the bugdoc.
+ CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_THROUGHT, getProperty<text::WrapTextMode>(getShape(1), "Surround"));
}
DECLARE_OOXMLIMPORT_TEST(testDMLGroupShapeCapitalization, "dml-groupshape-capitalization.docx")
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 9e290e6..d8237f3 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1233,7 +1233,18 @@ void DomainMapper_Impl::appendOLE( const OUString& rStreamName, OLEHandlerPtr pO
uno::makeAny(xGraphic));
uno::Reference<beans::XPropertySet> xReplacementProperties(pOLEHandler->getShape(), uno::UNO_QUERY);
if (xReplacementProperties.is())
- xOLEProperties->setPropertyValue("AnchorType", xReplacementProperties->getPropertyValue("AnchorType"));
+ {
+ OUString pProperties[] = {
+ OUString("AnchorType"),
+ OUString("Surround"),
+ OUString("HoriOrient"),
+ OUString("HoriOrientPosition"),
+ OUString("VertOrient"),
+ OUString("VertOrientPosition")
+ };
+ for (size_t i = 0; i < SAL_N_ELEMENTS(pProperties); ++i)
+ xOLEProperties->setPropertyValue(pProperties[i], xReplacementProperties->getPropertyValue(pProperties[i]));
+ }
else
// mimic the treatment of graphics here.. it seems anchoring as character
// gives a better ( visually ) result
More information about the Libreoffice-commits
mailing list