summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTibor Nagy <nagy.tibor2@nisz.hu>2022-08-22 10:54:53 +0200
committerNagy Tibor <nagy.tibor2@nisz.hu>2022-09-09 14:05:26 +0200
commitfabfa4bd23e89a2d5b6e232cd2eab61996534659 (patch)
tree0584d084074580998c3298a57e3b6f4b850fb38c /sd
parent3a195e99b3e98b1784cad62531660e062e3c2df1 (diff)
tdf#150719 PPTX import: fix hyperlink format (lost underline)
Hypertext lost its formatting partially: e.g. underline character setting lost, except on the last word. Follow-up to commit commit a761a51d9db3a2771ca9fd6ab233c513aa5d8ecf "tdf#149311 PPTX export: fix internal hyperlink on texts". Clean-up of commit 855a56fea4561135a63cb729d7a625a950b210e7 "tdf#148965 PPTX import: fix internal hyperlinks on shapes" and commit cec1f712c87e557e1b7313e0dbef4a635f69d953 "tdf#144918 PPTX import: fix internal hyperlink on shapes" and commit 7eb0e52527e729a21973e70d5be8e0a6779ec748 "tdf#142648 PPTX: import long slide names to avoid broken link export". Change-Id: I1de8b06361c7b9529a70a039e194db88460cc27b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138669 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf150719.pptxbin0 -> 17666 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx18
2 files changed, 18 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf150719.pptx b/sd/qa/unit/data/pptx/tdf150719.pptx
new file mode 100644
index 000000000000..d8aedf6b75a8
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf150719.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 6c2d3084fb23..aa6811a33c91 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -83,6 +83,7 @@ public:
virtual void setUp() override;
void testDocumentLayout();
+ void testTdf150719();
void testTdf149314();
void testTdf149124();
void testTdf148965();
@@ -154,6 +155,7 @@ public:
CPPUNIT_TEST_SUITE(SdImportTest);
CPPUNIT_TEST(testDocumentLayout);
+ CPPUNIT_TEST(testTdf150719);
CPPUNIT_TEST(testTdf149314);
CPPUNIT_TEST(testTdf149124);
CPPUNIT_TEST(testTdf148965);
@@ -303,6 +305,22 @@ void SdImportTest::testDocumentLayout()
}
}
+void SdImportTest::testTdf150719()
+{
+ ::sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf150719.pptx"), PPTX);
+
+ uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef));
+ uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
+ uno::Reference<text::XTextRange> xRun(getRunFromParagraph(1, xParagraph));
+ uno::Reference<beans::XPropertySet> xPropSet1(xRun, uno::UNO_QUERY_THROW);
+ sal_Int16 nUnderline;
+ xPropSet1->getPropertyValue("CharUnderline") >>= nUnderline;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The underline is missing!", sal_Int16(1), nUnderline);
+
+ xDocShRef->DoClose();
+}
+
void SdImportTest::testTdf149314()
{
sd::DrawDocShellRef xDocShRef