diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-07-19 12:00:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-19 12:01:33 +0100 |
commit | 86b8b3b7e0fd384378f76e21ff170c76ee0ab7f5 (patch) | |
tree | 6b8069c0ef1fd3ea25e9c373287c01ff5b83a6c1 | |
parent | 5652d862bb32940f9bca338a2143916f70a6f036 (diff) |
WaE: returning temporary
Change-Id: Ibb401d8df817ca700a806ef28ac359e0b74ec3e2
-rw-r--r-- | vcl/inc/impgraph.hxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx index 0b09c1261452..4c879d6ba75c 100644 --- a/vcl/inc/impgraph.hxx +++ b/vcl/inc/impgraph.hxx @@ -60,7 +60,7 @@ private: ImpSwapFile* mpSwapFile; GfxLink* mpGfxLink; GraphicType meType; - String maDocFileURLStr; + OUString maDocFileURLStr; sal_uLong mnDocFilePos; mutable sal_uLong mnSizeBytes; sal_uLong mnRefCount; @@ -137,8 +137,8 @@ private: private: - void ImplSetDocFileName( const String& rName, sal_uLong nFilePos ); - const String& ImplGetDocFileName() const; + void ImplSetDocFileName( const OUString& rName, sal_uLong nFilePos ); + const OUString& ImplGetDocFileName() const; sal_uLong ImplGetDocFilePos() const; sal_Bool ImplReadEmbedded( SvStream& rIStream, sal_Bool bSwap = sal_False ); diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 7132284d6b12..6ef8d63860f1 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -393,7 +393,7 @@ void ImpGraphic::ImplClear() mbSwapOut = sal_False; mnDocFilePos = 0UL; - maDocFileURLStr.Erase(); + maDocFileURLStr = OUString(); // cleanup ImplClearGraphics( sal_False ); @@ -961,17 +961,17 @@ void ImpGraphic::ImplSetContext( GraphicReader* pReader ) mpContext = pReader; } -void ImpGraphic::ImplSetDocFileName( const String& rName, sal_uLong nFilePos ) +void ImpGraphic::ImplSetDocFileName( const OUString& rName, sal_uLong nFilePos ) { const INetURLObject aURL( rName ); - DBG_ASSERT( !rName.Len() || ( aURL.GetProtocol() != INET_PROT_NOT_VALID ), "Graphic::SetDocFileName(...): invalid URL" ); + DBG_ASSERT( rName.isEmpty() || ( aURL.GetProtocol() != INET_PROT_NOT_VALID ), "Graphic::SetDocFileName(...): invalid URL" ); maDocFileURLStr = aURL.GetMainURL( INetURLObject::NO_DECODE ); mnDocFilePos = nFilePos; } -const String& ImpGraphic::ImplGetDocFileName() const +const OUString& ImpGraphic::ImplGetDocFileName() const { return maDocFileURLStr; } @@ -996,8 +996,8 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap ) if( !mbSwapUnderway ) { - const String aTempURLStr( maDocFileURLStr ); - const sal_uLong nTempPos = mnDocFilePos; + const OUString aTempURLStr( maDocFileURLStr ); + const sal_uLong nTempPos = mnDocFilePos; ImplClear(); @@ -1086,7 +1086,7 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap ) if( bSwap ) { - if( maDocFileURLStr.Len() ) + if (!maDocFileURLStr.isEmpty()) { rIStm.Seek( nStartPos + nHeaderLen + nLen ); bRet = mbSwapOut = sal_True; @@ -1303,7 +1303,7 @@ sal_Bool ImpGraphic::ImplSwapOut() if( !ImplIsSwapOut() ) { - if( !maDocFileURLStr.Len() ) + if (maDocFileURLStr.isEmpty()) { ::utl::TempFile aTempFile; const INetURLObject aTmpURL( aTempFile.GetURL() ); |