summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2016-11-17 20:58:39 +0000
committerTamás Zolnai <tamas.zolnai@collabora.com>2016-11-17 20:58:39 +0000
commitd922d72dedfa7d9824943973948136da6ee070a0 (patch)
tree9946a11e98771db96bf26857ef868d1cbfa6df04 /sd
parent333c293185d0c8f0d0fc02ef69523252b4f00628 (diff)
tdf#103876: PPTX import: Title shape's character properties are wrong
Text properties are applied on a shape during text insertion, but if a placeholder shape has no text, then it has a placehodler text which should have the right text properties. Reviewed-on: https://gerrit.libreoffice.org/30881 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 5c7f3e4a7190bf9821bed102f96a926c9a894e59) Conflicts: oox/source/ppt/pptshape.cxx Change-Id: I54175d52dd25915ee4d7153298e01ec07c6be1f6
Diffstat (limited to 'sd')
-rwxr-xr-xsd/qa/unit/data/pptx/tdf103876.pptxbin0 -> 29585 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx21
2 files changed, 21 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf103876.pptx b/sd/qa/unit/data/pptx/tdf103876.pptx
new file mode 100755
index 000000000000..5eb7e869e2c8
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf103876.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 7ff5a6ca3c4f..208c627bbc1d 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -114,6 +114,7 @@ public:
void testTdf93124();
void testTdf93868();
void testTdf103792();
+ void testTdf103876();
CPPUNIT_TEST_SUITE(SdImportTest);
@@ -159,6 +160,7 @@ public:
CPPUNIT_TEST(testTdf93124);
CPPUNIT_TEST(testTdf93868);
CPPUNIT_TEST(testTdf103792);
+ CPPUNIT_TEST(testTdf103876);
CPPUNIT_TEST_SUITE_END();
};
@@ -1253,6 +1255,25 @@ void SdImportTest::testTdf103792()
xDocShRef->DoClose();
}
+void SdImportTest::testTdf103876()
+{
+ // Title text shape's placeholder text did not inherit the corresponding text properties
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf103876.pptx"), PPTX);
+ uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
+
+ // Check paragraph alignment
+ sal_Int16 nParaAdjust = 0;
+ xShape->getPropertyValue( "ParaAdjust" ) >>= nParaAdjust;
+ CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER, static_cast<style::ParagraphAdjust>(nParaAdjust));
+
+ // Check character color
+ sal_Int32 nCharColor;
+ xShape->getPropertyValue( "CharColor" ) >>= nCharColor;
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(0xFF0000), nCharColor );
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();