summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--sw/source/core/text/itrform2.cxx7
4 files changed, 12 insertions, 18 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();
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 6cdbf9cf48b7..425a79d95610 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1303,13 +1303,6 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
{
rInf.SetFull(true);
CalcFlyWidth( rInf );
-
- // In case we have no portion to return, but CalcFlyWidth()
- // created a fly portion, then return that. Otherwise such a
- // fly portion would not be ever inserted to the layout.
- if (!pPor)
- pPor = rInf.GetFly();
-
return pPor;
}
cChar = rInf.GetChar( rInf.GetIdx() );