diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-08-18 01:03:43 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-08-18 01:03:43 +0200 |
commit | a38f4e61b5611850f3b4f56cc5f6d9a6cb400d2e (patch) | |
tree | eaf1c5fdf8b9293e0212d4971e50bf8dd60359ee /sw | |
parent | 63b86dfdf84edfca0b49d97687e4759dd8d8efff (diff) |
String to OUString
Change-Id: I22624e2f15b95257f950f48704909aeb6ae54ef4
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/fmturl.hxx | 16 | ||||
-rw-r--r-- | sw/source/core/crsr/crstrvl.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/notxtfrm.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/draw/dflyobj.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/draw/dpage.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/frmedt/fefly1.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/atrfrm.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8gr.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dochdl/swdtflvr.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/docvw/romenu.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/utlui/attrdesc.cxx | 4 |
11 files changed, 27 insertions, 33 deletions
diff --git a/sw/inc/fmturl.hxx b/sw/inc/fmturl.hxx index 4782a3d6320f..9c394349ea46 100644 --- a/sw/inc/fmturl.hxx +++ b/sw/inc/fmturl.hxx @@ -31,9 +31,9 @@ class IntlWrapper; class SW_DLLPUBLIC SwFmtURL: public SfxPoolItem { - String sTargetFrameName; ///< Target frame for URL. - String sURL; ///< Simple URL. - String sName; ///< Name of the anchor. + OUString sTargetFrameName; ///< Target frame for URL. + OUString sURL; ///< Simple URL. + OUString sName; ///< Name of the anchor. ImageMap *pMap; ///< ClientSide images. sal_Bool bIsServerMap; ///< A ServerSideImageMap with the URL. @@ -59,18 +59,18 @@ public: virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - void SetTargetFrameName( const String& rStr ) { sTargetFrameName = rStr; } + void SetTargetFrameName( const OUString& rStr ) { sTargetFrameName = rStr; } void SetURL(const OUString &rURL, bool bServerMap); void SetMap( const ImageMap *pM ); ///< Pointer will be copied. - const String &GetTargetFrameName()const { return sTargetFrameName; } - const String &GetURL() const { return sURL; } + OUString GetTargetFrameName()const { return sTargetFrameName; } + OUString GetURL() const { return sURL; } sal_Bool IsServerMap() const { return bIsServerMap; } const ImageMap *GetMap() const { return pMap; } ImageMap *GetMap() { return pMap; } - const String& GetName() const { return sName; } - void SetName( const String& rNm ) { sName = rNm; } + OUString GetName() const { return sName; } + void SetName( const OUString& rNm ) { sName = rNm; } }; diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 8e9cc14a5cfa..1b11a31e75a2 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -2113,7 +2113,7 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext ) { SwFlyFrmFmt* pFmt = (SwFlyFrmFmt*)(*pFmts)[ n ]; const SwFmtURL& rURLItem = pFmt->GetURL(); - if( rURLItem.GetMap() || rURLItem.GetURL().Len() ) + if( rURLItem.GetMap() || !rURLItem.GetURL().isEmpty() ) { SwFlyFrm* pFly = pFmt->GetFrm( &aPt, sal_False ); SwPosition aTmpPos( *pBodySttNd ); diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index e3be83431f1a..52a2c4c2dac1 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -104,7 +104,7 @@ static void lcl_PaintReplacement( const SwRect &rRect, const String &rText, Color aCol( COL_RED ); FontUnderline eUnderline = UNDERLINE_NONE; const SwFmtURL &rURL = pFrm->FindFlyFrm()->GetFmt()->GetURL(); - if( rURL.GetURL().Len() || rURL.GetMap() ) + if( !rURL.GetURL().isEmpty() || rURL.GetMap() ) { bool bVisited = false; if ( rURL.GetMap() ) @@ -120,7 +120,7 @@ static void lcl_PaintReplacement( const SwRect &rRect, const String &rText, } } } - else if ( rURL.GetURL().Len() ) + else if ( !rURL.GetURL().isEmpty() ) bVisited = rSh.GetDoc()->IsVisitedURL( rURL.GetURL() ); SwFmt *pFmt = rSh.GetDoc()->GetFmtFromPool( static_cast<sal_uInt16> diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index ab9c5bc0cb13..6b83fea70c53 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -860,13 +860,13 @@ Pointer SwVirtFlyDrawObj::GetMacroPointer( bool SwVirtFlyDrawObj::HasMacro() const { const SwFmtURL &rURL = pFlyFrm->GetFmt()->GetURL(); - return rURL.GetMap() || rURL.GetURL().Len(); + return rURL.GetMap() || !rURL.GetURL().isEmpty(); } SdrObject* SwVirtFlyDrawObj::CheckMacroHit( const SdrObjMacroHitRec& rRec ) const { const SwFmtURL &rURL = pFlyFrm->GetFmt()->GetURL(); - if( rURL.GetMap() || rURL.GetURL().Len() ) + if( rURL.GetMap() || !rURL.GetURL().isEmpty() ) { SwRect aRect; if ( pFlyFrm->Lower() && pFlyFrm->Lower()->IsNoTxtFrm() ) diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx index ff1fcde712a6..db945d6ac19c 100644 --- a/sw/source/core/draw/dpage.cxx +++ b/sw/source/core/draw/dpage.cxx @@ -152,7 +152,7 @@ sal_Bool SwDPage::RequestHelp( Window* pWindow, SdrView* pView, INetURLObject::DECODE_UNAMBIGUOUS); } } - else if ( rURL.GetURL().Len() ) + else if ( !rURL.GetURL().isEmpty() ) { sTxt = URIHelper::removePassword( rURL.GetURL(), INetURLObject::WAS_ENCODED, diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 78f792f01566..4765b7124c64 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -1564,7 +1564,7 @@ const SwFrmFmt* SwFEShell::IsURLGrfAtPos( const Point& rPt, String* pURL, { SwFlyFrm *pFly = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm(); const SwFmtURL &rURL = pFly->GetFmt()->GetURL(); - if( rURL.GetURL().Len() || rURL.GetMap() ) + if( !rURL.GetURL().isEmpty() || rURL.GetMap() ) { bool bSetTargetFrameName = pTargetFrameName != 0; bool bSetDescription = pDescription != 0; diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 25288062d823..c71b8a07fab3 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -1665,19 +1665,13 @@ bool SwFmtURL::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const switch ( nMemberId ) { case MID_URL_URL: - { - OUString sRet = GetURL(); - rVal <<= sRet; - } + rVal <<= GetURL(); break; case MID_URL_TARGET: - { - OUString sRet = GetTargetFrameName(); - rVal <<= sRet; - } + rVal <<= GetTargetFrameName(); break; case MID_URL_HYPERLINKNAME: - rVal <<= OUString( GetName() ); + rVal <<= GetName(); break; case MID_URL_CLIENTMAP: { diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index 80a078bad58b..e32b9a6df34e 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -388,7 +388,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame) //will be exported to ensure the fidelity const SwFmtURL& rURL = rFrame.GetFrmFmt().GetAttrSet().GetURL(); bool bURLStarted = false; - if( rURL.GetURL().Len() && rFrame.GetWriterType() == sw::Frame::eGraphic) + if( !rURL.GetURL().isEmpty() && rFrame.GetWriterType() == sw::Frame::eGraphic) { bURLStarted = true; m_pAttrOutput->StartURL( rURL.GetURL(), rURL.GetTargetFrameName() ); diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index a09a05766e7e..1c9999d206ed 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -469,7 +469,7 @@ sal_Bool SwTransferable::GetData( const DataFlavor& rFlavor ) const SwFmtURL& rURL = (SwFmtURL&)aSet.Get( RES_URL ); if( rURL.GetMap() ) pImageMap = new ImageMap( *rURL.GetMap() ); - else if( rURL.GetURL().Len() ) + else if( !rURL.GetURL().isEmpty() ) pTargetURL = new INetImage( aEmptyStr, rURL.GetURL(), rURL.GetTargetFrameName(), aEmptyStr, Size() ); @@ -972,7 +972,7 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut ) pImageMap = new ImageMap( *rURL.GetMap() ); AddFormat( SOT_FORMATSTR_ID_SVIM ); } - else if( rURL.GetURL().Len() ) + else if( !rURL.GetURL().isEmpty() ) { pTargetURL = new INetImage( sGrfNm, rURL.GetURL(), rURL.GetTargetFrameName(), @@ -2439,7 +2439,7 @@ int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData, rSh.GetFlyFrmAttr( aSet ); SwFmtURL aURL2( (SwFmtURL&)aSet.Get( RES_URL ) ); aURL2.SetURL( sFile, sal_False ); - if( !aURL2.GetName().Len() ) + if( aURL2.GetName().isEmpty() ) aURL2.SetName( sFile ); aSet.Put( aURL2 ); rSh.SetFlyFrmAttr( aSet ); @@ -2526,7 +2526,7 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData, rSh.GetFlyFrmAttr( aSet ); SwFmtURL aURL2( (SwFmtURL&)aSet.Get( RES_URL ) ); aURL2.SetURL( sFile, sal_False ); - if( !aURL2.GetName().Len() ) + if( aURL2.GetName().isEmpty() ) aURL2.SetName( sFile ); aSet.Put( aURL2 ); rSh.SetFlyFrmAttr( aSet ); @@ -3061,7 +3061,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) pImageMap = new ImageMap( *rURL.GetMap() ); AddFormat( SOT_FORMATSTR_ID_SVIM ); } - else if( rURL.GetURL().Len() ) + else if( !rURL.GetURL().isEmpty() ) { pTargetURL = new INetImage( sGrfNm, rURL.GetURL(), rURL.GetTargetFrameName(), diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx index 4adf9753fbba..9d0947a4f112 100644 --- a/sw/source/ui/docvw/romenu.cxx +++ b/sw/source/ui/docvw/romenu.cxx @@ -121,7 +121,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : const SwFmtURL& rURL = *(SwFmtURL*)pURLItem; if( rURL.GetMap() ) pImageMap = new ImageMap( *rURL.GetMap() ); - else if( rURL.GetURL().Len() ) + else if( !rURL.GetURL().isEmpty() ) pTargetURL = new INetImage( bLink ? sGrfName : aEmptyStr, rURL.GetURL(), rURL.GetTargetFrameName(), diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx index 4c2e5d572066..344e18047813 100644 --- a/sw/source/ui/utlui/attrdesc.cxx +++ b/sw/source/ui/utlui/attrdesc.cxx @@ -724,7 +724,7 @@ SfxItemPresentation SwFmtURL::GetPresentation { if ( pMap ) rText += "Client-Map"; - if ( sURL.Len() ) + if ( !sURL.isEmpty() ) { if ( pMap ) rText += " - "; @@ -732,7 +732,7 @@ SfxItemPresentation SwFmtURL::GetPresentation if ( bIsServerMap ) rText += " (Server-Map)"; } - if ( sTargetFrameName.Len() ) + if ( !sTargetFrameName.isEmpty() ) { rText = rText + ", Target: " + sTargetFrameName; } |