summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/uiwriter/data/tdf92648.docxbin0 -> 70406 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx17
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/data/tdf92648.docx b/sw/qa/extras/uiwriter/data/tdf92648.docx
new file mode 100644
index 000000000000..4857723d35c0
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf92648.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 8924f28056ab..f0b495d37c5b 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -167,6 +167,7 @@ public:
void testTdf88986();
void testTdf87922();
void testTdf77014();
+ void testTdf92648();
CPPUNIT_TEST_SUITE(SwUiWriterTest);
CPPUNIT_TEST(testReplaceForward);
@@ -243,6 +244,7 @@ public:
CPPUNIT_TEST(testTdf88986);
CPPUNIT_TEST(testTdf87922);
CPPUNIT_TEST(testTdf77014);
+ CPPUNIT_TEST(testTdf92648);
CPPUNIT_TEST_SUITE_END();
private:
@@ -2743,6 +2745,21 @@ void SwUiWriterTest::testTdf77014()
CPPUNIT_ASSERT_EQUAL(OUString("1"), parseDump("/root/page/body/txt[5]/Text[5]", "nLength"));
}
+void SwUiWriterTest::testTdf92648()
+{
+ SwDoc* pDoc = createDoc("tdf92648.docx");
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ std::set<const SwFrameFormat*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc);
+ // Make sure we have ten draw shapes.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(10), SwTextBoxHelper::getCount(pPage, aTextBoxes));
+ // and the text boxes haven't got zero height
+ for (std::set<const SwFrameFormat*>::iterator it=aTextBoxes.begin(); it!=aTextBoxes.end(); ++it)
+ {
+ SwFormatFrmSize aSize((*it)->GetFrmSize());
+ CPPUNIT_ASSERT(aSize.GetHeight() != 0);
+ }
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
CPPUNIT_PLUGIN_IMPLEMENT();