summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2023-03-11 11:36:59 -0500
committerMiklos Vajna <vmiklos@collabora.com>2023-03-13 07:43:12 +0000
commit1519ae101abf32187db983c8a08f7bf1899d5d22 (patch)
tree4d67cea5c76b42cb429705cda53c19588d4c14b8 /sw/qa/extras
parent47afcad0d599009c38b4597c27558ec2af58b7f8 (diff)
tdf#154129 writerfilter framePr: check whole style inheritance: HAnchor
A style can inherit its properties from another style, but the code was naively just checking the first paragraph style, and not any of the parents. I'm going to onboard these one at a time. make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf154129_framePr1 Change-Id: I32eabc6c1090dbc2c467da74fe32c6377e9a3875 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148686 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf154129_framePr1.docxbin0 -> 21425 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport18.cxx14
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf154129_framePr1.docx b/sw/qa/extras/ooxmlexport/data/tdf154129_framePr1.docx
new file mode 100644
index 000000000000..27ba6055c287
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf154129_framePr1.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
index 9e637fb937e7..3c8950162648 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
@@ -16,6 +16,7 @@
#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/text/GraphicCrop.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
#include <com/sun/star/text/XFootnotesSupplier.hpp>
#include <com/sun/star/text/XTextDocument.hpp>
@@ -134,6 +135,19 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104394_lostTextbox, "tdf104394_lostTextbox.docx"
CPPUNIT_ASSERT_EQUAL(2, getPages());
}
+DECLARE_OOXMLEXPORT_TEST(testTdf154129_framePr1, "tdf154129_framePr1.docx")
+{
+ for (size_t i = 1; i < 4; ++i)
+ {
+ uno::Reference<drawing::XShape> xTextFrame = getShape(i);
+ // The anchor is defined in the style, and only the first style was checked, not the parents
+ auto nAnchor = getProperty<sal_Int16>(xTextFrame, "HoriOrientRelation");
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, nAnchor);
+ //nAnchor = getProperty<sal_Int16>(xTextFrame, "VertOrientRelation");
+ //CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, nAnchor);
+ }
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf153613_anchoredAfterPgBreak, "tdf153613_anchoredAfterPgBreak.docx")
{
const auto& pLayout = parseLayoutDump();