[Libreoffice-commits] core.git: sw/inc sw/source
Matteo Casalin
matteo.casalin at yahoo.com
Sun Aug 25 08:23:28 PDT 2013
sw/inc/doc.hxx | 6 +++---
sw/inc/fesh.hxx | 4 ++--
sw/source/core/doc/docredln.cxx | 6 +++---
sw/source/core/docnode/ndtbl.cxx | 2 +-
sw/source/core/edit/autofmt.cxx | 9 ++++-----
sw/source/core/frmedt/fetab.cxx | 2 +-
sw/source/ui/utlui/content.cxx | 2 +-
7 files changed, 15 insertions(+), 16 deletions(-)
New commits:
commit d4c97a522e269a8875a8dadea1f6d728e91d77f7
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Sun Aug 25 13:30:29 2013 +0200
String to OUString
Change-Id: I4e35c8876d9bfbddb9da6c96cd605905343df1e7
Reviewed-on: https://gerrit.libreoffice.org/5626
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index ded1285..831fcba 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 4aaa973..b1b5a11 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 0acb592..1ac94ad 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 751b6dc..db0de08 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 c3c28df..9b4dae9 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 2442438..08966bc 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 5bc51f2..1a471c1 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 );
More information about the Libreoffice-commits
mailing list