diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-08-25 13:30:29 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-08-25 15:22:52 +0000 |
commit | d4c97a522e269a8875a8dadea1f6d728e91d77f7 (patch) | |
tree | 3e88f7f6d46541b02c99376d67dd50468a7c4cd9 | |
parent | ab5c85f1307ceb3e0ac97b601e01d74ffd5778b7 (diff) |
String to OUString
Change-Id: I4e35c8876d9bfbddb9da6c96cd605905343df1e7
Reviewed-on: https://gerrit.libreoffice.org/5626
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | sw/inc/doc.hxx | 6 | ||||
-rw-r--r-- | sw/inc/fesh.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/docredln.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/edit/autofmt.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/frmedt/fetab.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/utlui/content.cxx | 2 |
7 files changed, 15 insertions, 16 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index ded1285aa7d4..831fcbaf55a8 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -359,7 +359,7 @@ class SW_DLLPUBLIC SwDoc : tHashMapForLists maListStyleLists; SwRedlineTbl *mpRedlineTbl; ///< List of all Redlines. - String *mpAutoFmtRedlnComment; ///< Comment for Redlines inserted via AutoFormat. + OUString *mpAutoFmtRedlnComment; ///< Comment for Redlines inserted via AutoFormat. SwUnoCrsrTbl *mpUnoCrsrTbl; @@ -1689,7 +1689,7 @@ public: sal_Bool UnProtectCells( const SwSelBoxes& rBoxes ); sal_Bool UnProtectTbls( const SwPaM& rPam ); sal_Bool HasTblAnyProtection( const SwPosition* pPos, - const String* pTblName = 0, + const OUString* pTblName = 0, sal_Bool* pFullTblProtection = 0 ); /// Split table at baseline position, i.e. create a new table. @@ -1854,7 +1854,7 @@ public: /** Set comment-text for Redline. It then comes in via AppendRedLine. Used by AutoFormat. 0-pointer resets mode. Sequence number is for conjoining of Redlines by the UI. */ - void SetAutoFmtRedlineComment( const String* pTxt, sal_uInt16 nSeqNo = 0 ); + void SetAutoFmtRedlineComment( const OUString* pTxt, sal_uInt16 nSeqNo = 0 ); bool IsAutoFmtRedline() const { return mbIsAutoFmtRedline; } void SetAutoFmtRedline( bool bFlag ) { mbIsAutoFmtRedline = bFlag; } diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 4aaa9736c3a3..b1b5a1194fd0 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -29,7 +29,7 @@ #include <flyenum.hxx> #include <svx/svdtypes.hxx> - +#include "rtl/ustring.hxx" #include <svtools/embedhlp.hxx> #include <vector> @@ -651,7 +651,7 @@ public: cursor is not allowed in readonly. */ void UnProtectCells(); ///< Refers to table selection. void UnProtectTbls(); ///< Unprotect all tables in selection. - sal_Bool HasTblAnyProtection( const String* pTblName = 0, + sal_Bool HasTblAnyProtection( const OUString* pTblName = 0, sal_Bool* pFullTblProtection = 0 ); sal_Bool CanUnProtectCells() const; diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 0acb59251d47..1ac94ad064bd 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -298,7 +298,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) if( mbIsAutoFmtRedline ) { pNewRedl->SetAutoFmtFlag(); - if( mpAutoFmtRedlnComment && mpAutoFmtRedlnComment->Len() ) + if( mpAutoFmtRedlnComment && !mpAutoFmtRedlnComment->isEmpty() ) { pNewRedl->SetComment( *mpAutoFmtRedlnComment ); pNewRedl->SetSeqNo( mnAutoFmtRedlnCommentNo ); @@ -2537,13 +2537,13 @@ void SwDoc::UpdateRedlineAttr() /// AppendRedline. Is used by Autoformat. /// A null pointer resets the mode. The pointer is not copied, so it /// needs to stay valid! -void SwDoc::SetAutoFmtRedlineComment( const String* pTxt, sal_uInt16 nSeqNo ) +void SwDoc::SetAutoFmtRedlineComment( const OUString* pTxt, sal_uInt16 nSeqNo ) { mbIsAutoFmtRedline = 0 != pTxt; if( pTxt ) { if( !mpAutoFmtRedlnComment ) - mpAutoFmtRedlnComment = new String( *pTxt ); + mpAutoFmtRedlnComment = new OUString( *pTxt ); else *mpAutoFmtRedlnComment = *pTxt; } diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 751b6dce22a7..db0de086bdf3 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -4538,7 +4538,7 @@ sal_Bool SwDoc::UnProtectTbls( const SwPaM& rPam ) } sal_Bool SwDoc::HasTblAnyProtection( const SwPosition* pPos, - const String* pTblName, + const OUString* pTblName, sal_Bool* pFullTblProtection ) { sal_Bool bHasProtection = sal_False; diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index c3c28dfae689..9b4dae95fc3a 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -265,7 +265,7 @@ void SwAutoFormat::_GetCharClass( LanguageType eLang ) void SwAutoFormat::_SetRedlineTxt( sal_uInt16 nActionId ) { - String sTxt; + OUString sTxt; sal_uInt16 nSeqNo = 0; if( STR_AUTOFMTREDL_END > nActionId ) { @@ -292,7 +292,7 @@ void SwAutoFormat::_SetRedlineTxt( sal_uInt16 nActionId ) } #if OSL_DEBUG_LEVEL > 0 else - sTxt = OUString("Action text is missing"); + sTxt = "Action text is missing"; #endif pDoc->SetAutoFmtRedlineComment( &sTxt, nSeqNo ); @@ -1765,10 +1765,9 @@ void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl ) { if( aFlags.bWithRedlining ) { - String sTxt(ViewShell::GetShellRes()->GetAutoFmtNameLst()[ + OUString sTxt(ViewShell::GetShellRes()->GetAutoFmtNameLst()[ STR_AUTOFMTREDL_SET_TMPL_HEADLINE ] ); - sTxt.SearchAndReplace( OUString("$(ARG1)"), - OUString::number( nLvl + 1 ) ); + sTxt = sTxt.replaceAll( "$(ARG1)", OUString::number( nLvl + 1 ) ); pDoc->SetAutoFmtRedlineComment( &sTxt ); } diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 24424386ba21..08966bc2e5ba 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -1031,7 +1031,7 @@ void SwFEShell::UnProtectTbls() EndAllActionAndCall(); } -sal_Bool SwFEShell::HasTblAnyProtection( const String* pTblName, +sal_Bool SwFEShell::HasTblAnyProtection( const OUString* pTblName, sal_Bool* pFullTblProtection ) { return GetDoc()->HasTblAnyProtection( GetCrsr()->GetPoint(), pTblName, diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index 5bc51f2583c7..1a471c17e41e 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -1051,7 +1051,7 @@ PopupMenu* SwContentTree::CreateContextMenu( void ) pSubPop4->InsertItem(403, aContextStrings[ST_EDIT_ENTRY - ST_CONTEXT_FIRST]); pSubPop4->InsertItem(404, sUnprotTbl); sal_Bool bFull = sal_False; - String sTblName = ((SwContent*)pEntry->GetUserData())->GetName(); + OUString sTblName = ((SwContent*)pEntry->GetUserData())->GetName(); sal_Bool bProt =pActiveShell->HasTblAnyProtection( &sTblName, &bFull ); pSubPop4->EnableItem(403, !bFull ); pSubPop4->EnableItem(404, bProt ); |