summaryrefslogtreecommitdiff
path: root/sw/qa/extras/layout/layout.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/layout/layout.cxx')
-rw-r--r--sw/qa/extras/layout/layout.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 936909538bfc..8c9740b7e2ae 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -7,6 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <comphelper/propertysequence.hxx>
#include <swmodeltestbase.hxx>
#include <test/mtfxmldump.hxx>
@@ -21,6 +22,7 @@ public:
void testTdf117028();
void testTdf117923();
void testTdf118058();
+ void testTdf117188();
CPPUNIT_TEST_SUITE(SwLayoutWriter);
CPPUNIT_TEST(testTdf116830);
@@ -28,6 +30,7 @@ public:
CPPUNIT_TEST(testTdf117028);
CPPUNIT_TEST(testTdf117923);
CPPUNIT_TEST(testTdf118058);
+ CPPUNIT_TEST(testTdf117188);
CPPUNIT_TEST_SUITE_END();
private:
@@ -132,6 +135,27 @@ void SwLayoutWriter::testTdf118058()
pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()->CalcLayout();
}
+void SwLayoutWriter::testTdf117188()
+{
+ createDoc("tdf117188.docx");
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ utl::TempFile aTempFile;
+ aTempFile.EnableKillingFile();
+ uno::Sequence<beans::PropertyValue> aDescriptor(comphelper::InitPropertySequence({
+ { "FilterName", uno::Any(OUString("writer8")) },
+ }));
+ xStorable->storeToURL(aTempFile.GetURL(), aDescriptor);
+ loadURL(aTempFile.GetURL(), "tdf117188.odt");
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ OUString sWidth = getXPath(pXmlDoc, "/root/page/body/txt/anchored/fly/infos/bounds", "width");
+ OUString sHeight = getXPath(pXmlDoc, "/root/page/body/txt/anchored/fly/infos/bounds", "height");
+ // The text box must have zero border distances
+ assertXPath(pXmlDoc, "/root/page/body/txt/anchored/fly/infos/prtBounds", "left", "0");
+ assertXPath(pXmlDoc, "/root/page/body/txt/anchored/fly/infos/prtBounds", "top", "0");
+ assertXPath(pXmlDoc, "/root/page/body/txt/anchored/fly/infos/prtBounds", "width", sWidth);
+ assertXPath(pXmlDoc, "/root/page/body/txt/anchored/fly/infos/prtBounds", "height", sHeight);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwLayoutWriter);
CPPUNIT_PLUGIN_IMPLEMENT();