From 3e11d7a6b89ed426257c1faa80fee08c97c2e388 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 22 Oct 2013 21:37:35 +0200 Subject: sc: remove StringPtr type, just use OUString directly Change-Id: I2e74afb0c5bdd4d980feb43500117e731cdf578e --- sc/source/filter/excel/xecontent.cxx | 12 ++++++------ sc/source/filter/inc/xecontent.hxx | 7 +++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 9132b48d1b96..35ad9b29e3c4 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -350,7 +350,7 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU aXclStrm << sal_uInt16( 0 ); mnFlags |= EXC_HLINK_DESCR; - mxRepr.reset( new OUString( rRepr ) ); + m_Repr = rRepr; } // file link or URL @@ -387,8 +387,8 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU << sal_uInt16( 0x0003 ); aLink.WriteBuffer( aXclStrm ); // NO flags - if( !mxRepr.get() ) - mxRepr.reset( new OUString( aFileName ) ); + if (m_Repr.isEmpty()) + m_Repr = aFileName; msTarget = XclXmlUtils::ToOUString( aLink ); // ooxml expects the file:/// part appended ( or at least @@ -404,8 +404,8 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU aXclStrm << sal_uInt16( 0 ); mnFlags |= EXC_HLINK_BODY | EXC_HLINK_ABS; - if( !mxRepr.get() ) - mxRepr.reset( new OUString( rUrl ) ); + if (m_Repr.isEmpty()) + m_Repr = rUrl; msTarget = XclXmlUtils::ToOUString( aUrl ); } @@ -513,7 +513,7 @@ void XclExpHyperlink::SaveXml( XclExpXmlStream& rStrm ) ? XclXmlUtils::ToOString( *mxTextMark ).getStr() : NULL, // OOXTODO: XML_tooltip, from record HLinkTooltip 800h wzTooltip - XML_display, XclXmlUtils::ToOString( *mxRepr ).getStr(), + XML_display, XclXmlUtils::ToOString(m_Repr).getStr(), FSEND ); } diff --git a/sc/source/filter/inc/xecontent.hxx b/sc/source/filter/inc/xecontent.hxx index 8c0386f73803..81ed8e89a822 100644 --- a/sc/source/filter/inc/xecontent.hxx +++ b/sc/source/filter/inc/xecontent.hxx @@ -104,7 +104,7 @@ public: virtual ~XclExpHyperlink(); /** Returns the cell representation text or 0, if not available. */ - inline const OUString* GetRepr() const { return mxRepr.get(); } + inline const OUString* GetRepr() const { return m_Repr.isEmpty() ? 0 : &m_Repr; } virtual void SaveXml( XclExpXmlStream& rStrm ); @@ -121,14 +121,13 @@ private: virtual void WriteBody( XclExpStream& rStrm ); private: - typedef boost::scoped_ptr< OUString > StringPtr; typedef boost::scoped_ptr< SvStream > SvStreamPtr; ScAddress maScPos; /// Position of the hyperlink. - StringPtr mxRepr; /// Cell representation text. + OUString m_Repr; /// Cell representation text. SvStreamPtr mxVarData; /// Buffer stream with variable data. sal_uInt32 mnFlags; /// Option flags. - XclExpStringRef mxTextMark; /// Location within mxRepr + XclExpStringRef mxTextMark; /// Location within m_Repr OUString msTarget; /// Target URL }; -- cgit