summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-08-23 10:17:56 +0200
committerThorsten Behrens <thorsten.behrens@allotropia.de>2021-08-24 11:28:37 +0200
commit96e106495a45fbb3d70e1266a95f5e31703abb83 (patch)
tree27122f8402c391d854cc745deaabb5662a7fc4ad /xmloff
parent3d81a3c586690fbeca551dcc1cf83b03b591ed22 (diff)
tdf#143736 Load hyperlink from more shapes
And limit the shape types which can have a hyperlink to those known to work. Change-Id: I3d3522bea1e756dad8ddc2041e6588a367f42a7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120861 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> (cherry picked from commit 75cd2b0fa71c73ae815b80d8e42328024ea63555) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120935 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/text/XMLTextFrameHyperlinkContext.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
index 278d6d953205..3901a010fbd9 100644
--- a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
+++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
@@ -113,14 +113,23 @@ SvXMLImportContextRef XMLTextFrameHyperlinkContext::CreateChildContext(
SvXMLImportContext *pContext = nullptr;
XMLTextFrameContext *pTextFrameContext = nullptr;
- if( XML_NAMESPACE_DRAW == nPrefix )
+ if( XML_NAMESPACE_DRAW == nPrefix || XML_NAMESPACE_DR3D == nPrefix)
{
- if( IsXMLToken( rLocalName, XML_FRAME ) )
+ if( XML_NAMESPACE_DRAW == nPrefix && IsXMLToken( rLocalName, XML_FRAME ) )
pTextFrameContext = new XMLTextFrameContext( GetImport(), nPrefix,
rLocalName, xAttrList,
eDefaultAnchorType );
- else if (IsXMLToken(rLocalName, XML_CUSTOM_SHAPE) || IsXMLToken(rLocalName, XML_PATH)
- || IsXMLToken(rLocalName, XML_ELLIPSE) || IsXMLToken(rLocalName, XML_LINE))
+ else if ((XML_NAMESPACE_DRAW == nPrefix && (
+ IsXMLToken(rLocalName, XML_CUSTOM_SHAPE) || IsXMLToken(rLocalName, XML_PATH)
+ || IsXMLToken(rLocalName, XML_ELLIPSE) || IsXMLToken(rLocalName, XML_LINE)
+ || IsXMLToken(rLocalName, XML_RECT) || IsXMLToken(rLocalName, XML_CAPTION)
+ || IsXMLToken(rLocalName, XML_POLYGON) || IsXMLToken(rLocalName, XML_POLYLINE)
+ || IsXMLToken(rLocalName, XML_MEASURE) || IsXMLToken(rLocalName, XML_CIRCLE)
+ || IsXMLToken(rLocalName, XML_CONNECTOR) || IsXMLToken(rLocalName, XML_CONTROL)
+ || IsXMLToken(rLocalName, XML_PAGE_THUMBNAIL) || IsXMLToken(rLocalName, XML_G)
+ ))
+ || (XML_NAMESPACE_DR3D == nPrefix && IsXMLToken(rLocalName, XML_SCENE))
+ )
{
Reference<XShapes> xShapes;
SvXMLShapeContext* pShapeContext