summaryrefslogtreecommitdiff
path: root/sw/qa/extras/odfimport
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/odfimport')
-rw-r--r--sw/qa/extras/odfimport/data/empty_line_in_text_box.fodt31
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx53
2 files changed, 0 insertions, 84 deletions
diff --git a/sw/qa/extras/odfimport/data/empty_line_in_text_box.fodt b/sw/qa/extras/odfimport/data/empty_line_in_text_box.fodt
deleted file mode 100644
index 4ae36a9c5fac..000000000000
--- a/sw/qa/extras/odfimport/data/empty_line_in_text_box.fodt
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
- <office:font-face-decls>
- <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
- </office:font-face-decls>
- <office:styles>
- <style:default-style style:family="graphic">
- <style:text-properties style:font-name="Liberation Sans" fo:font-size="18pt"/>
- </style:default-style>
- </office:styles>
- <office:automatic-styles>
- <style:style style:name="T1" style:family="text">
- <style:text-properties fo:font-size="10pt"/>
- </style:style>
- <style:style style:name="gr1" style:family="graphic">
- <style:graphic-properties style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/>
- </style:style>
- </office:automatic-styles>
- <office:body>
- <office:text>
- <text:p text:style-name="Standard"><draw:frame text:anchor-type="paragraph" draw:name="TextFrame1" draw:style-name="gr1" svg:width="4cm" svg:x="4cm" svg:y="4cm">
- <draw:text-box>
- <text:p><text:span text:style-name="T1">a</text:span></text:p>
- <text:p><text:span text:style-name="T1"/></text:p>
- <text:p><text:span text:style-name="T1">c</text:span></text:p>
- </draw:text-box>
- </draw:frame></text:p>
- </office:text>
- </office:body>
-</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 0074b53f851e..70c6452e3d9f 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -1561,58 +1561,5 @@ CPPUNIT_TEST_FIXTURE(Test, testBrokenPackage_Tdf159474)
CPPUNIT_ASSERT_EQUAL(u"Empty document"_ustr, getParagraph(1)->getString());
}
-CPPUNIT_TEST_FIXTURE(Test, testTdf161054)
-{
- // Similar to testTdf161023 in sd/qa/unit/import-tests2.cxx
- // Given a shape with three paragraphs (18pt), all directly assigned a smaller font (10pt)
- createSwDoc("empty_line_in_text_box.fodt");
- auto shapeText = getShape(1).queryThrow<text::XTextRange>()->getText();
-
- // 1st paragraph, not empty
- {
- auto paragraph(getParagraphOfText(1, shapeText));
- CPPUNIT_ASSERT_EQUAL(u"a"_ustr, paragraph->getString());
- auto run(getRun(paragraph, 1));
- CPPUNIT_ASSERT_EQUAL(u"a"_ustr, run->getString());
- uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW);
- double fCharHeight = 0;
- xPropSet->getPropertyValue("CharHeight") >>= fCharHeight;
- CPPUNIT_ASSERT_EQUAL(10.0, fCharHeight);
- // No more runs
- CPPUNIT_ASSERT_THROW(getRun(paragraph, 2), container::NoSuchElementException);
- }
-
- // Empty 2nd paragraph, consisting of a single span: this span was treated as "paragraph mark"
- {
- auto paragraph(getParagraphOfText(2, shapeText));
- CPPUNIT_ASSERT_EQUAL(u""_ustr, paragraph->getString());
- auto run(getRun(paragraph, 1));
- CPPUNIT_ASSERT_EQUAL(u""_ustr, run->getString());
- uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW);
- double fCharHeight = 0;
- xPropSet->getPropertyValue("CharHeight") >>= fCharHeight;
- // Without the fix, this would fail with
- // - Expected: 10
- // - Actual : 18
- CPPUNIT_ASSERT_EQUAL(10.0, fCharHeight);
- // No more runs
- CPPUNIT_ASSERT_THROW(getRun(paragraph, 2), container::NoSuchElementException);
- }
-
- // 3rd paragraph, not empty
- {
- auto paragraph(getParagraphOfText(3, shapeText));
- CPPUNIT_ASSERT_EQUAL(u"c"_ustr, paragraph->getString());
- auto run(getRun(paragraph, 1));
- CPPUNIT_ASSERT_EQUAL(u"c"_ustr, run->getString());
- uno::Reference<beans::XPropertySet> xPropSet(run, uno::UNO_QUERY_THROW);
- double fCharHeight = 0;
- xPropSet->getPropertyValue("CharHeight") >>= fCharHeight;
- CPPUNIT_ASSERT_EQUAL(10.0, fCharHeight);
- // No more runs
- CPPUNIT_ASSERT_THROW(getRun(paragraph, 2), container::NoSuchElementException);
- }
-}
-
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */