summaryrefslogtreecommitdiff
path: root/sw/qa/core/objectpositioning/objectpositioning.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/core/objectpositioning/objectpositioning.cxx')
-rw-r--r--sw/qa/core/objectpositioning/objectpositioning.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/sw/qa/core/objectpositioning/objectpositioning.cxx b/sw/qa/core/objectpositioning/objectpositioning.cxx
index e3aace4ffc87..94cb96e449ca 100644
--- a/sw/qa/core/objectpositioning/objectpositioning.cxx
+++ b/sw/qa/core/objectpositioning/objectpositioning.cxx
@@ -16,17 +16,20 @@
#include <unotxdoc.hxx>
#include <docsh.hxx>
-constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/core/objectpositioning/data/";
-
/// Covers sw/source/core/objectpositioning/ fixes.
class SwCoreObjectpositioningTest : public SwModelTestBase
{
+public:
+ SwCoreObjectpositioningTest()
+ : SwModelTestBase("/sw/qa/core/objectpositioning/data/")
+ {
+ }
};
CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testOverlapCrash)
{
// Load a document with 2 images.
- load(DATA_DIRECTORY, "overlap-crash.odt");
+ load("overlap-crash.odt");
// Change their anchor type to to-char.
uno::Reference<beans::XPropertySet> xShape1(getShape(1), uno::UNO_QUERY);
@@ -145,7 +148,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMargin)
CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMarginWithFooter)
{
// Load an empty document with footer.
- load(DATA_DIRECTORY, "bottom-margin-with-footer.docx");
+ load("bottom-margin-with-footer.docx");
uno::Reference<css::lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
// Insert three shapes and align it the bottom,center,top of page print area bottom.
@@ -218,7 +221,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testInsideOutsideVertAlignBott
{
// Load a document, with two shapes.
// The shapes align the outside and inside of page print area bottom.
- load(DATA_DIRECTORY, "inside-outside-vert-align.docx");
+ load("inside-outside-vert-align.docx");
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
sal_Int32 nBodyBottom = getXPath(pXmlDoc, "//body/infos/bounds", "bottom").toInt32(); //15704
@@ -241,7 +244,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVMLVertAlignBottomMargin)
// The shapes align the top,center,bottom,outside and inside of page print area bottom.
// The height of page print area bottom is 4320 ~ 7.62cm.
// The size of shapes are 442 ~ 0.78cm
- load(DATA_DIRECTORY, "vml-vertical-alignment.docx");
+ load("vml-vertical-alignment.docx");
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
sal_Int32 nBodyBottom = getXPath(pXmlDoc, "//body/infos/bounds", "bottom").toInt32(); //11803