diff options
author | Tünde Tóth <toth.tunde@nisz.hu> | 2023-03-09 16:01:03 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-05-13 20:01:48 +0200 |
commit | f285682b5fd818e0b12649c39f600e6423401751 (patch) | |
tree | 122ed050cc180fa1c792a84604512ec51860c6b0 /oox | |
parent | c74e1c3742e69763a0dacb8a607a5556f62a10c8 (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>
(cherry picked from commit b5a0fa42adf68b33970da93c2b04f935f72cffde)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149608
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/shape.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 113c55a1770a..48acc4efa945 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -406,6 +406,18 @@ void Shape::addShape( ? *getTextBody()->getTextProperties().moInsets[3] : 0)); } + + // tdf#145147 Set the Hyperlink property to the child wps shape. + if (getShapeProperties().hasProperty(PROP_URL)) try + { + uno::Any aAny = getShapeProperties().getProperty(PROP_URL); + OUString sUrl = aAny.get<OUString>(); + if (!sUrl.isEmpty()) + xChildWPSProperties->setPropertyValue(UNO_NAME_HYPERLINK, aAny); + } + catch (const Exception&) + { + } } if( meFrameType == FRAMETYPE_DIAGRAM ) |