summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2023-03-09 16:01:03 +0100
committerLászló Németh <nemeth@numbertext.org>2023-03-27 14:22:05 +0000
commit7f4f88b883f81fbce975f72aea0f66a54e269ead (patch)
tree01079d9a49d4fe4133c4a5eba25926d49e081c23 /sw/qa/extras/ooxmlimport
parent5f138e23f61b58857b0e90dc09642ee832af29d4 (diff)
tdf#145147 DOCX import: fix hyperlink in group shape
Hyperlink inserted to shape lost, if the shape was inside a group shape. Test: ungroup the grouped shape and move the mouse over the shapes, or use Edit Hyperlink... in their context menu. Change-Id: I45d816f18a1e1bc1c442943b31c9e0ae7de199e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148552 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras/ooxmlimport')
-rw-r--r--sw/qa/extras/ooxmlimport/data/grouped_link.docxbin0 -> 21001 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport2.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/grouped_link.docx b/sw/qa/extras/ooxmlimport/data/grouped_link.docx
new file mode 100644
index 000000000000..8c5657b708b4
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/grouped_link.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index 6436d68ec89e..c201e585e997 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -1092,6 +1092,16 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf154319)
}
}
+CPPUNIT_TEST_FIXTURE(Test, testTdf145147)
+{
+ createSwDoc("grouped_link.docx");
+ uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("https://www.libreoffice.org"),
+ getProperty<OUString>(xGroupShape->getByIndex(0), "Hyperlink"));
+ CPPUNIT_ASSERT_EQUAL(OUString("https://www.documentfoundation.org"),
+ getProperty<OUString>(xGroupShape->getByIndex(1), "Hyperlink"));
+}
+
// tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT
CPPUNIT_PLUGIN_IMPLEMENT();