summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2013-10-10 22:05:23 +0200
committerCaolán McNamara <caolanm@redhat.com>2013-10-14 11:10:26 +0000
commit9e208f28255eab69ee2ef372df90b1b636d97e0a (patch)
tree73e17ed850f136d2927e3b2c8ae976e478e1f6a5 /sw/source
parent7e7a487e904143cbc282a2b90c4cb3918bfa151f (diff)
fdo#38838 use OUString instead of String
Change-Id: I281bd6872e44a122556462afd20a2af75c8b04fe Reviewed-on: https://gerrit.libreoffice.org/6195 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/access/acccontext.cxx10
-rw-r--r--sw/source/core/access/accframe.cxx4
-rw-r--r--sw/source/core/access/accframe.hxx4
-rw-r--r--sw/source/core/access/accnotextframe.cxx6
4 files changed, 11 insertions, 13 deletions
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 <swrect.hxx>
#include <sal/types.h>
-#include <tools/string.hxx>
+#include <rtl/ustring.hxx>
#include <list>
#include <accfrmobj.hxx>
@@ -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<const SwStringMsgPoolItem*>(pOld)->GetString() );
- const String& sNewTitle(
+ const OUString& sNewTitle(
dynamic_cast<const SwStringMsgPoolItem*>(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 );