[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/qa writerfilter/source
Bakos Attila (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 15 08:23:27 UTC 2020
sw/qa/extras/ooxmlexport/data/tdf132483.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport15.cxx | 14 ++++++++++++++
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 +++-
3 files changed, 17 insertions(+), 1 deletion(-)
New commits:
commit e48eb426bbef20b9f5646d3fe3978a6f476be5cb
Author: Bakos Attila <bakos.attilakaroly at nisz.hu>
AuthorDate: Fri Jul 10 12:42:11 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Sep 15 10:22:56 2020 +0200
tdf#132483: DOCX import: fix OLE anchoring position
The relative orientation of OLE objects was
not copied from the replacement object to
OLE, resulting bad position.
Co-authored-by: Attila Bánhegyi (NISZ)
Change-Id: If62124e5a40218a224e047efbe86a09606b44af5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98493
Tested-by: László Németh <nemeth at numbertext.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
(cherry picked from commit 54031e6a2912ebe723b4423b5d737c13c9bb03c5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102565
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132483.docx b/sw/qa/extras/ooxmlexport/data/tdf132483.docx
new file mode 100644
index 000000000000..e4ebf4b78511
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf132483.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index f17d9ad3f668..792e919394b7 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -11,6 +11,7 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
char const DATA_DIRECTORY[] = "/sw/qa/extras/ooxmlexport/data/";
@@ -178,6 +179,19 @@ DECLARE_OOXMLEXPORT_TEST(testRelativeAnchorHeightFromBottomMarginHasFooter,
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1147), nAnchoredHeight);
}
+DECLARE_OOXMLIMPORT_TEST(TestTdf132483, "tdf132483.docx")
+{
+ uno::Reference<beans::XPropertySet> xOLEProps(getShape(1), uno::UNO_QUERY_THROW);
+ sal_Int16 nVRelPos = -1;
+ sal_Int16 nHRelPos = -1;
+ xOLEProps->getPropertyValue("VertOrientRelation") >>= nVRelPos;
+ xOLEProps->getPropertyValue("HoriOrientRelation") >>= nHRelPos;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The OLE is shifted vertically",
+ text::RelOrientation::PAGE_FRAME , nVRelPos);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The OLE is shifted horizontally",
+ text::RelOrientation::PAGE_FRAME , nHRelPos);
+}
+
DECLARE_OOXMLEXPORT_TEST(testRelativeAnchorHeightFromBottomMarginNoFooter,
"tdf133070_testRelativeAnchorHeightFromBottomMarginNoFooter.docx")
{
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 0f468e43937e..3c6d165facb6 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2228,7 +2228,9 @@ void DomainMapper_Impl::appendOLE( const OUString& rStreamName, const std::share
OUString("HoriOrient"),
OUString("HoriOrientPosition"),
OUString("VertOrient"),
- OUString("VertOrientPosition")
+ OUString("VertOrientPosition"),
+ OUString("VertOrientRelation"),
+ OUString("HoriOrientRelation")
};
for (const OUString & s : pProperties)
xOLEProperties->setPropertyValue(s, xReplacementProperties->getPropertyValue(s));
More information about the Libreoffice-commits
mailing list