summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-09-08 13:38:17 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-09-08 17:57:57 +0200
commit09bd2fb3c3b35b61cbf99b5d95a9542b344c7251 (patch)
tree156d9d355dcd8e08a8d54e521ef07058f7bc989b /sw
parent45518f03c6c994cd7a7d13bb7b4e1b6cf3ec95e5 (diff)
sw_ooxmlexport15: DECLARE_OOXMLIMPORT_TEST -> DECLARE_OOXMLEXPORT_TEST
and move one test to sw_uiwriter. It fits more there Change-Id: I335b83936f9570d18fe14be860cbc4818eaf0007 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102246 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport15.cxx21
-rw-r--r--sw/qa/extras/uiwriter/data3/tdf112342.docx (renamed from sw/qa/extras/ooxmlexport/data/tdf112342.docx)bin19601 -> 19601 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter3.cxx17
3 files changed, 20 insertions, 18 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 2b49b47dbfd2..999ef57a38af 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -47,7 +47,7 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123621, "tdf123621.docx")
"/wp:positionV/wp:posOffset", "1080135");
}
-DECLARE_OOXMLIMPORT_TEST(testTdf131801, "tdf131801.docx")
+DECLARE_OOXMLEXPORT_TEST(testTdf131801, "tdf131801.docx")
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
@@ -503,7 +503,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf134063, "tdf134063.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(720), getXPath(pDump, "//page[1]/body/txt[1]/Text[3]", "nWidth").toInt32());
}
-DECLARE_OOXMLIMPORT_TEST(TestTdf135653, "tdf135653.docx")
+DECLARE_OOXMLEXPORT_TEST(TestTdf135653, "tdf135653.docx")
{
uno::Reference<beans::XPropertySet> xOLEProps(getShape(1), uno::UNO_QUERY_THROW);
drawing::FillStyle nFillStyle = static_cast<drawing::FillStyle>(-1);
@@ -579,22 +579,7 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testRelativeAnchorHeightFromBottomMarginHasF
assertXPath(pXmlDoc, "//SwAnchoredDrawObject/bounds", "height", "1147");
}
-DECLARE_OOXMLIMPORT_TEST(TestTdf112342, "tdf112342.docx")
-{
- //Get the last para
- uno::Reference<text::XTextRange> xPara = getParagraph(3);
- auto xCur = xPara->getText()->createTextCursor();
- //Go to the end of it
- xCur->gotoEnd(false);
- //And let's remove the last 2 chars (the last para with its char).
- xCur->goLeft(2, true);
- xCur->setString("");
-
- //If the second paragraph on the second page, this will be passed.
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Page break does not match", 2, getPages());
-}
-
-DECLARE_OOXMLIMPORT_TEST(TestTdf132483, "tdf132483.docx")
+DECLARE_OOXMLEXPORT_TEST(TestTdf132483, "tdf132483.docx")
{
uno::Reference<beans::XPropertySet> xOLEProps(getShape(1), uno::UNO_QUERY_THROW);
sal_Int16 nVRelPos = -1;
diff --git a/sw/qa/extras/ooxmlexport/data/tdf112342.docx b/sw/qa/extras/uiwriter/data3/tdf112342.docx
index ab4c7ee07d4d..ab4c7ee07d4d 100644
--- a/sw/qa/extras/ooxmlexport/data/tdf112342.docx
+++ b/sw/qa/extras/uiwriter/data3/tdf112342.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx
index 928711466229..46e5a4eee028 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -191,6 +191,23 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134404)
CPPUNIT_ASSERT_EQUAL(2, getPages());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf112342)
+{
+ load(DATA_DIRECTORY, "tdf112342.docx");
+
+ //Get the last para
+ uno::Reference<text::XTextRange> xPara = getParagraph(3);
+ auto xCur = xPara->getText()->createTextCursor();
+ //Go to the end of it
+ xCur->gotoEnd(false);
+ //And let's remove the last 2 chars (the last para with its char).
+ xCur->goLeft(2, true);
+ xCur->setString("");
+
+ //If the second paragraph on the second page, this will be passed.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Page break does not match", 2, getPages());
+}
+
CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132321)
{
load(DATA_DIRECTORY, "tdf132321.odt");