summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-03-14 14:15:34 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-14 16:08:16 +0100
commitd8bb2a9705be7a362d4efb6e7e52cd9cb0eaf46d (patch)
tree805bd492f3a395ea4a62eec2c7033bf788da5e36 /sw/qa
parent9107771ab60c67b83b382e80a95e22118a55596f (diff)
tdf#90003 Revert "SwTxtFormatter::NewPortion: fix lost SwFlyPortion"
This reverts commit 25c50ff9fb0f277da9bc164d8244a774ef1ebba4. The original commit fixed a corner-case, but also broke a much more frequent use case. Revert till we have a better solution for the corner-case. Conflicts: sw/qa/extras/inc/swmodeltestbase.hxx sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: I0f90459e9bc372eeba18bf81c5d1dfcccbe21753
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/uiwriter/data/fdo87005.odtbin9578 -> 0 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf90003.odtbin0 -> 8515 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx23
3 files changed, 12 insertions, 11 deletions
diff --git a/sw/qa/extras/uiwriter/data/fdo87005.odt b/sw/qa/extras/uiwriter/data/fdo87005.odt
deleted file mode 100644
index 54d7119abac7..000000000000
--- a/sw/qa/extras/uiwriter/data/fdo87005.odt
+++ /dev/null
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf90003.odt b/sw/qa/extras/uiwriter/data/tdf90003.odt
new file mode 100644
index 000000000000..280c254a8798
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf90003.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index d76a27ae3ae3..31b9bdffcdbd 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -72,7 +72,6 @@ public:
void testChineseConversionSimplifiedToTraditional();
void testFdo85554();
void testAutoCorr();
- void testFdo87005();
void testMergeDoc();
void testCreatePortions();
void testBookmarkUndo();
@@ -80,6 +79,7 @@ public:
void testFdo87448();
void testTdf68183();
void testCp1000115();
+ void testTdf90003();
CPPUNIT_TEST_SUITE(SwUiWriterTest);
CPPUNIT_TEST(testReplaceForward);
@@ -104,7 +104,6 @@ public:
CPPUNIT_TEST(testChineseConversionSimplifiedToTraditional);
CPPUNIT_TEST(testFdo85554);
CPPUNIT_TEST(testAutoCorr);
- CPPUNIT_TEST(testFdo87005);
CPPUNIT_TEST(testMergeDoc);
CPPUNIT_TEST(testCreatePortions);
CPPUNIT_TEST(testBookmarkUndo);
@@ -112,6 +111,7 @@ public:
CPPUNIT_TEST(testFdo87448);
CPPUNIT_TEST(testTdf68183);
CPPUNIT_TEST(testCp1000115);
+ CPPUNIT_TEST(testTdf90003);
CPPUNIT_TEST_SUITE_END();
@@ -648,15 +648,6 @@ void SwUiWriterTest::testAutoCorr()
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getColumns()->getCount());
}
-void SwUiWriterTest::testFdo87005()
-{
- createDoc("fdo87005.odt");
- xmlDocPtr pXmlDoc = parseLayoutDump();
- CPPUNIT_ASSERT(pXmlDoc);
- // This was 1, no SwFlyPortion was created for the second fly.
- assertXPath(pXmlDoc, "//Special[@nType='POR_FLY']", 2);
-}
-
void SwUiWriterTest::testMergeDoc()
{
SwDoc* const pDoc1(createDoc("merge-change1.odt"));
@@ -846,6 +837,16 @@ void SwUiWriterTest::testCp1000115()
xmlXPathFreeObject(pXmlObj);
}
+void SwUiWriterTest::testTdf90003()
+{
+ createDoc("tdf90003.odt");
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ CPPUNIT_ASSERT(pXmlDoc);
+ // This was 1: an unexpected fly portion was created, resulting in too
+ // large x position for the empty paragraph marker.
+ assertXPath(pXmlDoc, "//Special[@nType='POR_FLY']", 0);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
CPPUNIT_PLUGIN_IMPLEMENT();