diff options
Diffstat (limited to 'xmloff/source/draw/ximpshap.cxx')
-rw-r--r-- | xmloff/source/draw/ximpshap.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index b073e1e28d40..19ad2e9acc32 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -374,9 +374,15 @@ void SdXMLShapeContext::EndElement() if( msHyperlink.getLength() != 0 ) try { + uno::Reference< beans::XPropertySet > xProp( mxShape, uno::UNO_QUERY ); + + rtl::OUString sLink( RTL_CONSTASCII_USTRINGPARAM( "Hyperlink" ) ); + if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName( sLink ) ) + xProp->setPropertyValue( sLink, uno::Any( msHyperlink ) ); + Reference< XEventsSupplier > xEventsSupplier( mxShape, UNO_QUERY_THROW ); + Reference< XNameReplace > xEvents( xEventsSupplier->getEvents(), UNO_QUERY_THROW ); const OUString sBookmark( RTL_CONSTASCII_USTRINGPARAM( "Bookmark" ) ); - Reference< XEventsSupplier > xEventsSupplier( mxShape, UNO_QUERY ); if( xEventsSupplier.is() ) { const OUString sEventType( RTL_CONSTASCII_USTRINGPARAM( "EventType" ) ); @@ -3306,9 +3312,16 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( USHORT nPrefix, if( !mxImplContext.Is() ) { - pContext = GetImport().GetShapeImport()->CreateFrameChildContext( + + SvXMLShapeContext* pShapeContext= GetImport().GetShapeImport()->CreateFrameChildContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShapes, mxAttrList ); + pContext = pShapeContext; + + // propagate the hyperlink to child context + if ( msHyperlink.getLength() > 0 ) + pShapeContext->setHyperlink( msHyperlink ); + mxImplContext = pContext; mbSupportsReplacement = IsXMLToken( rLocalName, XML_OBJECT ) || IsXMLToken( rLocalName, XML_OBJECT_OLE ); |