diff options
-rw-r--r-- | sw/qa/core/layout/data/textbox-modification.docx | bin | 0 -> 12284 bytes | |||
-rw-r--r-- | sw/qa/core/layout/layout.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/core/layout/data/textbox-modification.docx b/sw/qa/core/layout/data/textbox-modification.docx Binary files differnew file mode 100644 index 000000000000..6adf1a950e72 --- /dev/null +++ b/sw/qa/core/layout/data/textbox-modification.docx diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx index 2151b870da13..44e09a6ffe54 100644 --- a/sw/qa/core/layout/layout.cxx +++ b/sw/qa/core/layout/layout.cxx @@ -216,6 +216,18 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextBoxAutoGrowVertical) CPPUNIT_ASSERT(aShapeRect.IsInside(aFlyRect)); } +CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextboxModification) +{ + // Load a document with a textbox in it: the layout will have to position the shape part. + load(DATA_DIRECTORY, "textbox-modification.docx"); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); + SwDocShell* pDocShell = pTextDoc->GetDocShell(); + + // Without the accompanying fix in place, this test would have failed, as the document was + // marked as modified right after the import. + CPPUNIT_ASSERT(!pDocShell->IsModified()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |