summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authornd101 <Fong@nd.com.cn>2019-08-08 14:53:29 +0800
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-08-21 11:18:23 +0200
commit2bed8af91fc2654b9ed2432f969d32d5741a529b (patch)
tree9285bf0878dc2511572242e9c186980c9db7aabb /sd/qa
parent10280dabe2c1c47c3cddbc28fcd701deb618772f (diff)
tdf#126761 add missing underline of hyperlink when showing ppt document
For ppt document opened in Impress, the familiar underline property is missing. This is to fix that. Underline property is added when ppt document is being opened and saved to exported odp document. Change-Id: I8ba02da8ffa1c8e7833645f850cddef84f0fa476 Reviewed-on: https://gerrit.libreoffice.org/77141 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/data/ppt/tdf126761.pptbin0 -> 100352 bytes
-rw-r--r--sd/qa/unit/export-tests.cxx23
2 files changed, 23 insertions, 0 deletions
diff --git a/sd/qa/unit/data/ppt/tdf126761.ppt b/sd/qa/unit/data/ppt/tdf126761.ppt
new file mode 100644
index 000000000000..186799ec5b81
--- /dev/null
+++ b/sd/qa/unit/data/ppt/tdf126761.ppt
Binary files differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index ac99607322f5..b3ad838a21ca 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -105,6 +105,7 @@ public:
void testTdf119629();
void testTdf123557();
void testTdf113822();
+ void testTdf126761();
CPPUNIT_TEST_SUITE(SdExportTest);
@@ -135,6 +136,7 @@ public:
CPPUNIT_TEST(testTdf119629);
CPPUNIT_TEST(testTdf123557);
CPPUNIT_TEST(testTdf113822);
+ CPPUNIT_TEST(testTdf126761);
CPPUNIT_TEST_SUITE_END();
@@ -1184,6 +1186,27 @@ void SdExportTest::testTdf123557()
xDocShRef->DoClose();
}
+void SdExportTest::testTdf126761()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf126761.ppt"), PPT);
+ xDocShRef = saveAndReload( xDocShRef.get(), ODP );
+ uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
+
+ // Get first paragraph of the text
+ uno::Reference<text::XTextRange> const xParagraph( getParagraphFromShape( 0, xShape ) );
+
+ // Get first run of the paragraph
+ uno::Reference<text::XTextRange> xRun( getRunFromParagraph (0, xParagraph ) );
+ uno::Reference< beans::XPropertySet > xPropSet( xRun, uno::UNO_QUERY_THROW );
+
+ // Check character underline, to make sure it has been set correctly
+ sal_uInt32 nCharUnderline;
+ xPropSet->getPropertyValue( "CharUnderline" ) >>= nCharUnderline;
+ CPPUNIT_ASSERT_EQUAL( sal_uInt32(1), nCharUnderline );
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();