summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2019-10-10 21:29:50 +0200
committerXisco Faulí <xiscofauli@libreoffice.org>2019-10-13 21:15:17 +0200
commit3ff748399ded70c71c9340ee6f1fdd7e7af28180 (patch)
treed45405bf91a373625b84cb4144c479ce86cda460 /sd
parentedcb363f5eeefcc2ce28a2ab7a57d61b744466cd (diff)
tdf#127129: pptx: map highlight to CharBackColor
Change-Id: I033c15db6848e96ba6b6bd7a2852c9e4d1524a8e Reviewed-on: https://gerrit.libreoffice.org/80630 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 57cfbc6830c3d8dc64107aed4a5555613415f069) Reviewed-on: https://gerrit.libreoffice.org/80738 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf127129.pptxbin0 -> 30143 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx22
2 files changed, 22 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf127129.pptx b/sd/qa/unit/data/pptx/tdf127129.pptx
new file mode 100644
index 000000000000..680fcf631be4
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf127129.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 04ac4b474ab8..6252ca27161f 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -154,6 +154,7 @@ public:
void testBnc910045();
void testRowHeight();
void testTdf93830();
+ void testTdf127129();
void testTdf93097();
void testTdf62255();
void testTdf93124();
@@ -247,6 +248,7 @@ public:
CPPUNIT_TEST(testBnc910045);
CPPUNIT_TEST(testRowHeight);
CPPUNIT_TEST(testTdf93830);
+ CPPUNIT_TEST(testTdf127129);
CPPUNIT_TEST(testTdf93097);
CPPUNIT_TEST(testTdf62255);
CPPUNIT_TEST(testTdf93124);
@@ -1281,6 +1283,7 @@ void SdImportTest::testRowHeight()
xDocShRef->DoClose();
}
+
void SdImportTest::testTdf93830()
{
// Text shape offset was ignored
@@ -1299,6 +1302,25 @@ void SdImportTest::testTdf93830()
xDocShRef->DoClose();
}
+void SdImportTest::testTdf127129()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf127129.pptx"), PPTX);
+ uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
+ uno::Reference< text::XTextRange > xParagraph( getParagraphFromShape( 0, xShape ) );
+ uno::Reference< text::XTextRange > xRun( getRunFromParagraph( 0, xParagraph ) );
+ uno::Reference< beans::XPropertySet > xPropSet( xRun, uno::UNO_QUERY_THROW );
+
+ sal_Int32 nCharColor;
+ xPropSet->getPropertyValue( "CharColor" ) >>= nCharColor;
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(0x000000), nCharColor );
+
+ // Without the accompanying fix in place, the highlight would be -1
+ sal_Int32 nCharBackColor;
+ xPropSet->getPropertyValue( "CharBackColor" ) >>= nCharBackColor;
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(0xFF00), nCharBackColor );
+
+ xDocShRef->DoClose();
+}
void SdImportTest::testTdf93097()
{
// Throwing metadata import aborted the filter, check that metadata is now imported.