summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTamas Bunth <tamas.bunth@collabora.co.uk>2019-11-19 12:38:56 +0100
committerTamás Bunth <btomi96@gmail.com>2019-11-28 01:47:13 +0100
commit89f0af144c18efafe2573801641689a1432c0cae (patch)
treea321a7120c7faf14bcbecbe3f7158d66e6c64e6b /sd
parentc2d689790c332ffd2f0d73de6aae53f26f0fbe53 (diff)
tdf#113198 set default shape paragraph alignment..
to center when importing oox document. Using MS Office, the default aligment of a (text) paragraph inside a shape is centered. Change-Id: Id9bcaaab109df65f4124f733b2cfee438e82b79b Reviewed-on: https://gerrit.libreoffice.org/83193 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Diffstat (limited to 'sd')
-rwxr-xr-xsd/qa/unit/data/pptx/tdf113198.pptxbin0 -> 13847 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx14
2 files changed, 13 insertions, 1 deletions
diff --git a/sd/qa/unit/data/pptx/tdf113198.pptx b/sd/qa/unit/data/pptx/tdf113198.pptx
new file mode 100755
index 000000000000..a541a2b2647d
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf113198.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 779a6503577a..600f16ad4957 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -214,6 +214,7 @@ public:
void testCropToShape();
void testTdf127964();
void testTdf106638();
+ void testTdf113198();
CPPUNIT_TEST_SUITE(SdImportTest);
@@ -315,6 +316,7 @@ public:
CPPUNIT_TEST(testTdf127964);
CPPUNIT_TEST(testTdf106638);
CPPUNIT_TEST(testTdf128684);
+ CPPUNIT_TEST(testTdf113198);
CPPUNIT_TEST_SUITE_END();
};
@@ -3030,7 +3032,6 @@ void SdImportTest::testTdf106638()
CPPUNIT_ASSERT(aCharFontName != "Wingdings");
}
-
void SdImportTest::testTdf128684()
{
sd::DrawDocShellRef xDocShRef
@@ -3057,6 +3058,17 @@ void SdImportTest::testTdf128684()
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-90), nRotateAngle);
}
+void SdImportTest::testTdf113198()
+{
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf113198.pptx"), PPTX);
+
+ uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef));
+ sal_Int16 nParaAdjust = -1;
+ xShape->getPropertyValue("ParaAdjust") >>= nParaAdjust;
+ CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER, static_cast<style::ParagraphAdjust>(nParaAdjust));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();