summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/vmlexport.cxx4
-rw-r--r--oox/source/token/properties.txt1
-rw-r--r--oox/source/vml/vmlshape.cxx4
-rw-r--r--oox/source/vml/vmlshapecontext.cxx6
4 files changed, 15 insertions, 0 deletions
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 77d3e1686d16..5b267184a291 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -1389,6 +1389,10 @@ sal_Int32 VMLExport::StartShape()
break;
}
+ if (!m_pSdrObject->getHyperlink().isEmpty())
+ m_pShapeAttrList->add(
+ XML_href, OUStringToOString(m_pSdrObject->getHyperlink(), RTL_TEXTENCODING_UTF8));
+
m_pShapeAttrList->addNS(XML_o, XML_allowincell, m_IsFollowingTextFlow ? "t" : "f");
// add style
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 68b5e2d14af5..04b550e669ea 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -254,6 +254,7 @@ HoriOrientPosition
HoriOrientRelation
HorizontalSplitMode
HorizontalSplitPositionTwips
+Hyperlink
IgnoreBlankCells
IgnoreCase
IgnoreLeadingSpaces
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 98481299e412..d1029173a1db 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -813,6 +813,10 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
if(!maTypeModel.maWrapStyle.isEmpty())
PropertySet(xShape).setAnyProperty(PROP_TextWordWrap, makeAny(maTypeModel.maWrapStyle == "square"));
+ // tdf#123626
+ if (!maTypeModel.maHyperlink.isEmpty())
+ PropertySet(xShape).setAnyProperty(PROP_Hyperlink, makeAny(maTypeModel.maHyperlink));
+
PropertySet(xShape).setAnyProperty(PROP_TextAutoGrowHeight,
makeAny(maTypeModel.mbAutoHeight));
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index 0d0c00b61d8c..d53a924c278a 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -312,6 +312,7 @@ ShapeTypeContext::ShapeTypeContext(ContextHandler2Helper const & rParent,
mrTypeModel.moCoordPos = lclDecodeInt32Pair( rAttribs, XML_coordorigin );
mrTypeModel.moCoordSize = lclDecodeInt32Pair( rAttribs, XML_coordsize );
setStyle( rAttribs.getString( XML_style, OUString() ) );
+ setHyperlink( rAttribs.getString( XML_href, OUString() ) );
if( lclDecodeBool( rAttribs, O_TOKEN( hr )).get( false ))
{ // MSO's handling of o:hr width is nowhere near what the spec says:
// - o:hrpct is not in % but in 0.1%
@@ -469,6 +470,11 @@ void ShapeTypeContext::setStyle( const OUString& rStyle )
}
}
+void ShapeTypeContext::setHyperlink( const OUString& rHyperlink )
+{
+ mrTypeModel.maHyperlink = rHyperlink;
+}
+
ShapeContext::ShapeContext(ContextHandler2Helper const& rParent,
const std::shared_ptr<ShapeBase>& pShape, const AttributeList& rAttribs)
: ShapeTypeContext(rParent, pShape, rAttribs)