diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-06-24 19:34:03 +0300 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-06-28 09:02:50 +0000 |
commit | 8810d26c92c4f70b2a05c63088e30fc780ed6caf (patch) | |
tree | 0af69efb6f42cb257e2f1ba2d740d2283d8725c0 /oox/source/drawingml/hyperlinkcontext.cxx | |
parent | bc8f89931ab4cc0537e7710b6bc375c844ba6e68 (diff) |
Convert all ContextHandler-derived clases over to ContextHandler2
Change-Id: I81f54e3b7d29a0807ec4c2f082ae00fd6e1d6138
Reviewed-on: https://gerrit.libreoffice.org/4580
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'oox/source/drawingml/hyperlinkcontext.cxx')
-rw-r--r-- | oox/source/drawingml/hyperlinkcontext.cxx | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/oox/source/drawingml/hyperlinkcontext.cxx b/oox/source/drawingml/hyperlinkcontext.cxx index 44892cf1579c..c84c17171239 100644 --- a/oox/source/drawingml/hyperlinkcontext.cxx +++ b/oox/source/drawingml/hyperlinkcontext.cxx @@ -33,13 +33,13 @@ using namespace ::com::sun::star::xml::sax; namespace oox { namespace drawingml { -HyperLinkContext::HyperLinkContext( ContextHandler& rParent, - const Reference< XFastAttributeList >& xAttributes, PropertyMap& aProperties ) - : ContextHandler( rParent ) +HyperLinkContext::HyperLinkContext( ContextHandler2Helper& rParent, + const AttributeList& rAttribs, PropertyMap& aProperties ) + : ContextHandler2( rParent ) , maProperties(aProperties) { OUString sURL, sHref; - OUString aRelId = xAttributes->getOptionalValue( R_TOKEN( id ) ); + OUString aRelId = rAttribs.getString( R_TOKEN( id ) ).get(); if ( !aRelId.isEmpty() ) { OSL_TRACE("OOX: URI rId %s", OUStringToOString (aRelId, RTL_TEXTENCODING_UTF8).pData->buffer); @@ -55,13 +55,13 @@ HyperLinkContext::HyperLinkContext( ContextHandler& rParent, sURL = getRelations().getInternalTargetFromRelId( aRelId ); } } - OUString sTooltip = xAttributes->getOptionalValue( R_TOKEN( tooltip ) ); + OUString sTooltip = rAttribs.getString( R_TOKEN( tooltip ) ).get(); if ( !sTooltip.isEmpty() ) maProperties[ PROP_Representation ] <<= sTooltip; - OUString sFrame = xAttributes->getOptionalValue( R_TOKEN( tgtFrame ) ); + OUString sFrame = rAttribs.getString( R_TOKEN( tgtFrame ) ).get(); if( !sFrame.isEmpty() ) maProperties[ PROP_TargetFrame ] <<= sFrame; - OUString aAction = xAttributes->getOptionalValue( XML_action ); + OUString aAction = rAttribs.getString( XML_action ).get(); if ( !aAction.isEmpty() ) { // reserved values of the unrestricted string aAction: @@ -149,22 +149,20 @@ HyperLinkContext::~HyperLinkContext() { } -Reference< XFastContextHandler > HyperLinkContext::createFastChildContext( - ::sal_Int32 aElement, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException) +ContextHandlerRef HyperLinkContext::onCreateContext( + ::sal_Int32 aElement, const AttributeList& rAttribs ) { - Reference< XFastContextHandler > xRet; switch( aElement ) { case A_TOKEN( extLst ): - return xRet; + return 0; case A_TOKEN( snd ): EmbeddedWAVAudioFile aAudio; - getEmbeddedWAVAudioFile( getRelations(), xAttribs, aAudio ); + getEmbeddedWAVAudioFile( getRelations(), rAttribs.getFastAttributeList(), aAudio ); break; } - if ( !xRet.is() ) - xRet.set( this ); - return xRet; + + return this; } } // namespace drawingml |