Kaydet (Commit) 9e208f28 authored tarafından Chr. Rossmanith's avatar Chr. Rossmanith Kaydeden (comit) Caolán McNamara

fdo#38838 use OUString instead of String

Change-Id: I281bd6872e44a122556462afd20a2af75c8b04fe
Reviewed-on: https://gerrit.libreoffice.org/6195Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 7e7a487e
...@@ -1393,7 +1393,7 @@ OUString SwAccessibleContext::GetResource( sal_uInt16 nResId, ...@@ -1393,7 +1393,7 @@ OUString SwAccessibleContext::GetResource( sal_uInt16 nResId,
const OUString *pArg1, const OUString *pArg1,
const OUString *pArg2 ) const OUString *pArg2 )
{ {
String sStr; OUString sStr;
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
...@@ -1402,16 +1402,14 @@ OUString SwAccessibleContext::GetResource( sal_uInt16 nResId, ...@@ -1402,16 +1402,14 @@ OUString SwAccessibleContext::GetResource( sal_uInt16 nResId,
if( pArg1 ) if( pArg1 )
{ {
sStr.SearchAndReplace( OUString("$(ARG1)"), sStr = sStr.replaceFirst( OUString("$(ARG1)"), *pArg1 );
String( *pArg1 ) );
} }
if( pArg2 ) if( pArg2 )
{ {
sStr.SearchAndReplace( OUString("$(ARG2)"), sStr = sStr.replaceFirst( OUString("$(ARG2)"), *pArg2 );
String( *pArg2 ) );
} }
return OUString( sStr ); return sStr;
} }
void SwAccessibleContext::RemoveFrmFromAccessibleMap() void SwAccessibleContext::RemoveFrmFromAccessibleMap()
......
...@@ -427,7 +427,7 @@ const SwFrm* SwAccessibleFrame::GetParent( const SwAccessibleChild& rFrmOrObj, ...@@ -427,7 +427,7 @@ const SwFrm* SwAccessibleFrame::GetParent( const SwAccessibleChild& rFrmOrObj,
return rFrmOrObj.GetParent( bInPagePreview ); return rFrmOrObj.GetParent( bInPagePreview );
} }
String SwAccessibleFrame::GetFormattedPageNumber() const OUString SwAccessibleFrame::GetFormattedPageNumber() const
{ {
sal_uInt16 nPageNum = GetFrm()->GetVirtPageNum(); sal_uInt16 nPageNum = GetFrm()->GetVirtPageNum();
sal_uInt32 nFmt = GetFrm()->FindPageFrm()->GetPageDesc() sal_uInt32 nFmt = GetFrm()->FindPageFrm()->GetPageDesc()
...@@ -435,7 +435,7 @@ String SwAccessibleFrame::GetFormattedPageNumber() const ...@@ -435,7 +435,7 @@ String SwAccessibleFrame::GetFormattedPageNumber() const
if( SVX_NUM_NUMBER_NONE == nFmt ) if( SVX_NUM_NUMBER_NONE == nFmt )
nFmt = SVX_NUM_ARABIC; nFmt = SVX_NUM_ARABIC;
String sRet( FormatNumber( nPageNum, nFmt ) ); OUString sRet( FormatNumber( nPageNum, nFmt ) );
return sRet; return sRet;
} }
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <swrect.hxx> #include <swrect.hxx>
#include <sal/types.h> #include <sal/types.h>
#include <tools/string.hxx> #include <rtl/ustring.hxx>
#include <list> #include <list>
#include <accfrmobj.hxx> #include <accfrmobj.hxx>
...@@ -140,7 +140,7 @@ protected: ...@@ -140,7 +140,7 @@ protected:
return maVisArea; return maVisArea;
} }
String GetFormattedPageNumber() const; OUString GetFormattedPageNumber() const;
}; };
inline sal_Bool SwAccessibleFrame::IsShowing( const SwRect& rFrm ) const inline sal_Bool SwAccessibleFrame::IsShowing( const SwRect& rFrm ) const
......
...@@ -95,9 +95,9 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem ...@@ -95,9 +95,9 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem
// #i73249# // #i73249#
case RES_TITLE_CHANGED: case RES_TITLE_CHANGED:
{ {
const String& sOldTitle( const OUString& sOldTitle(
dynamic_cast<const SwStringMsgPoolItem*>(pOld)->GetString() ); dynamic_cast<const SwStringMsgPoolItem*>(pOld)->GetString() );
const String& sNewTitle( const OUString& sNewTitle(
dynamic_cast<const SwStringMsgPoolItem*>(pNew)->GetString() ); dynamic_cast<const SwStringMsgPoolItem*>(pNew)->GetString() );
if ( sOldTitle == sNewTitle ) if ( sOldTitle == sNewTitle )
{ {
...@@ -106,7 +106,7 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem ...@@ -106,7 +106,7 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem
msTitle = sNewTitle; msTitle = sNewTitle;
AccessibleEventObject aEvent; AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::NAME_CHANGED; aEvent.EventId = AccessibleEventId::NAME_CHANGED;
aEvent.OldValue <<= OUString( sOldTitle ); aEvent.OldValue <<= sOldTitle;
aEvent.NewValue <<= msTitle; aEvent.NewValue <<= msTitle;
FireAccessibleEvent( aEvent ); FireAccessibleEvent( aEvent );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment