diff options
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf128207.docx | bin | 0 -> 50324 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.hxx | 2 |
5 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf128207.docx b/sw/qa/extras/ooxmlexport/data/tdf128207.docx Binary files differnew file mode 100644 index 000000000000..c234ec8bc10f --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf128207.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index 27cb3a804b0b..a90130c7118c 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -355,6 +355,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf129353, "tdf129353.docx") aIndexString); } +DECLARE_OOXMLIMPORT_TEST(testTdf128207, "tdf128207.docx") +{ + //There was the charts on each other, because their horizontal and vertical position was 0! + CPPUNIT_ASSERT_EQUAL(sal_Int32(12), getProperty<sal_Int32>(getShape(1), "HoriOrientPosition")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 0efe88acffbd..8356ecb8e8ee 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -5635,6 +5635,10 @@ void DomainMapper_Impl::ImportGraphic(const writerfilter::Reference< Properties // Update the shape properties if it is embedded object. if(m_xEmbedded.is()){ + if (m_pGraphicImport->GetXShapeObject()) + m_pGraphicImport->GetXShapeObject()->setPosition( + m_pGraphicImport->GetGraphicObjectPosition()); + uno::Reference<drawing::XShape> xShape = m_pGraphicImport->GetXShapeObject(); UpdateEmbeddedShapeProps(xShape); if (eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR) diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 8afaad814777..d2e36a5aa638 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -424,6 +424,11 @@ GraphicImport::~GraphicImport() { } +com::sun::star::awt::Point GraphicImport::GetGraphicObjectPosition() +{ + return (com::sun::star::awt::Point(m_pImpl->nLeftPosition, m_pImpl->nTopPosition)); +} + void GraphicImport::handleWrapTextValue(sal_uInt32 nVal) { switch (nVal) diff --git a/writerfilter/source/dmapper/GraphicImport.hxx b/writerfilter/source/dmapper/GraphicImport.hxx index 70b02d353e8f..028096fd350a 100644 --- a/writerfilter/source/dmapper/GraphicImport.hxx +++ b/writerfilter/source/dmapper/GraphicImport.hxx @@ -99,6 +99,8 @@ public: bool IsGraphic() const; sal_Int32 GetLeftMarginOrig() const; + com::sun::star::awt::Point GetGraphicObjectPosition(); + private: // Properties virtual void lcl_attribute(Id Name, Value & val) override; |