From 9e208f28255eab69ee2ef372df90b1b636d97e0a Mon Sep 17 00:00:00 2001 From: "Chr. Rossmanith" Date: Thu, 10 Oct 2013 22:05:23 +0200 Subject: fdo#38838 use OUString instead of String MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I281bd6872e44a122556462afd20a2af75c8b04fe Reviewed-on: https://gerrit.libreoffice.org/6195 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- sw/source/core/access/acccontext.cxx | 10 ++++------ sw/source/core/access/accframe.cxx | 4 ++-- sw/source/core/access/accframe.hxx | 4 ++-- sw/source/core/access/accnotextframe.cxx | 6 +++--- 4 files changed, 11 insertions(+), 13 deletions(-) (limited to 'sw') diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index e664fbf7a31a..88f5ddd37e4d 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -1393,7 +1393,7 @@ OUString SwAccessibleContext::GetResource( sal_uInt16 nResId, const OUString *pArg1, const OUString *pArg2 ) { - String sStr; + OUString sStr; { SolarMutexGuard aGuard; @@ -1402,16 +1402,14 @@ OUString SwAccessibleContext::GetResource( sal_uInt16 nResId, if( pArg1 ) { - sStr.SearchAndReplace( OUString("$(ARG1)"), - String( *pArg1 ) ); + sStr = sStr.replaceFirst( OUString("$(ARG1)"), *pArg1 ); } if( pArg2 ) { - sStr.SearchAndReplace( OUString("$(ARG2)"), - String( *pArg2 ) ); + sStr = sStr.replaceFirst( OUString("$(ARG2)"), *pArg2 ); } - return OUString( sStr ); + return sStr; } void SwAccessibleContext::RemoveFrmFromAccessibleMap() diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx index 4d4e4d7c610d..154cd7d06dbc 100644 --- a/sw/source/core/access/accframe.cxx +++ b/sw/source/core/access/accframe.cxx @@ -427,7 +427,7 @@ const SwFrm* SwAccessibleFrame::GetParent( const SwAccessibleChild& rFrmOrObj, return rFrmOrObj.GetParent( bInPagePreview ); } -String SwAccessibleFrame::GetFormattedPageNumber() const +OUString SwAccessibleFrame::GetFormattedPageNumber() const { sal_uInt16 nPageNum = GetFrm()->GetVirtPageNum(); sal_uInt32 nFmt = GetFrm()->FindPageFrm()->GetPageDesc() @@ -435,7 +435,7 @@ String SwAccessibleFrame::GetFormattedPageNumber() const if( SVX_NUM_NUMBER_NONE == nFmt ) nFmt = SVX_NUM_ARABIC; - String sRet( FormatNumber( nPageNum, nFmt ) ); + OUString sRet( FormatNumber( nPageNum, nFmt ) ); return sRet; } diff --git a/sw/source/core/access/accframe.hxx b/sw/source/core/access/accframe.hxx index 77093d1642b1..b435b936d0ae 100644 --- a/sw/source/core/access/accframe.hxx +++ b/sw/source/core/access/accframe.hxx @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include @@ -140,7 +140,7 @@ protected: return maVisArea; } - String GetFormattedPageNumber() const; + OUString GetFormattedPageNumber() const; }; inline sal_Bool SwAccessibleFrame::IsShowing( const SwRect& rFrm ) const diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx index 9277c725bf9c..d2af5ba1c4a9 100644 --- a/sw/source/core/access/accnotextframe.cxx +++ b/sw/source/core/access/accnotextframe.cxx @@ -95,9 +95,9 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem // #i73249# case RES_TITLE_CHANGED: { - const String& sOldTitle( + const OUString& sOldTitle( dynamic_cast(pOld)->GetString() ); - const String& sNewTitle( + const OUString& sNewTitle( dynamic_cast(pNew)->GetString() ); if ( sOldTitle == sNewTitle ) { @@ -106,7 +106,7 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem msTitle = sNewTitle; AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::NAME_CHANGED; - aEvent.OldValue <<= OUString( sOldTitle ); + aEvent.OldValue <<= sOldTitle; aEvent.NewValue <<= msTitle; FireAccessibleEvent( aEvent ); -- cgit