summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-08-26 19:33:59 -0400
committerKohei Yoshida <kohei.yoshida@suse.com>2011-08-26 19:34:42 -0400
commit69841530937c5a110bd37fe7c0c600a19551ed07 (patch)
treec0d8ca5e4ca5c0f8c8e81f0a7918b09c2b4f36bc /sc/source
parentf952331f0cf11f624d1df7c1c5a7468c16ffdc82 (diff)
String to rtl::OUString.
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/cell2.cxx14
-rw-r--r--sc/source/core/data/documen2.cxx8
-rw-r--r--sc/source/core/data/documen3.cxx2
-rw-r--r--sc/source/core/data/documen4.cxx10
-rw-r--r--sc/source/core/data/documen9.cxx2
-rw-r--r--sc/source/core/data/document.cxx42
-rw-r--r--sc/source/core/data/drwlayer.cxx6
-rw-r--r--sc/source/core/data/table1.cxx14
-rw-r--r--sc/source/core/tool/address.cxx8
-rw-r--r--sc/source/core/tool/chgtrack.cxx8
-rw-r--r--sc/source/core/tool/compiler.cxx26
-rw-r--r--sc/source/core/tool/interpr1.cxx55
-rw-r--r--sc/source/core/tool/rangelst.cxx2
-rw-r--r--sc/source/filter/dif/difexp.cxx25
-rw-r--r--sc/source/filter/excel/excdoc.cxx2
-rw-r--r--sc/source/filter/excel/read.cxx4
-rw-r--r--sc/source/filter/excel/xehelper.cxx6
-rw-r--r--sc/source/filter/excel/xelink.cxx6
-rw-r--r--sc/source/filter/excel/xipage.cxx14
-rw-r--r--sc/source/filter/html/htmlexp.cxx4
-rw-r--r--sc/source/filter/inc/xehelper.hxx2
-rw-r--r--sc/source/filter/inc/xelink.hxx4
-rw-r--r--sc/source/filter/inc/xepivot.hxx4
-rw-r--r--sc/source/filter/lotus/lotread.cxx10
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx7
-rw-r--r--sc/source/filter/xml/XMLCodeNameProvider.cxx25
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewTable.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleTableBase.cxx2
-rw-r--r--sc/source/ui/app/transobj.cxx2
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx19
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx6
-rw-r--r--sc/source/ui/dbgui/scendlg.cxx6
-rw-r--r--sc/source/ui/docshell/docfunc.cxx10
-rw-r--r--sc/source/ui/docshell/docsh.cxx14
-rw-r--r--sc/source/ui/docshell/docsh4.cxx4
-rw-r--r--sc/source/ui/docshell/docsh5.cxx20
-rw-r--r--sc/source/ui/docshell/tablink.cxx2
-rw-r--r--sc/source/ui/inc/navipi.hxx2
-rw-r--r--sc/source/ui/inc/retypepassdlg.hxx2
-rw-r--r--sc/source/ui/inc/scendlg.hxx8
-rw-r--r--sc/source/ui/inc/strindlg.hxx2
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/scuiautofmt.cxx10
-rw-r--r--sc/source/ui/miscdlgs/strindlg.cxx2
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx2
-rw-r--r--sc/source/ui/navipi/content.cxx2
-rw-r--r--sc/source/ui/navipi/navipi.cxx6
-rw-r--r--sc/source/ui/undo/undoblk.cxx2
-rw-r--r--sc/source/ui/undo/undotab.cxx16
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx54
-rw-r--r--sc/source/ui/unoobj/docuno.cxx16
-rw-r--r--sc/source/ui/unoobj/servuno.cxx12
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx2
-rw-r--r--sc/source/ui/vba/vbaeventshelper.cxx2
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx2
-rw-r--r--sc/source/ui/view/cellsh.cxx4
-rw-r--r--sc/source/ui/view/cellsh3.cxx8
-rw-r--r--sc/source/ui/view/dbfunc3.cxx4
-rw-r--r--sc/source/ui/view/gridwin.cxx8
-rw-r--r--sc/source/ui/view/gridwin4.cxx6
-rw-r--r--sc/source/ui/view/prevwsh.cxx4
-rw-r--r--sc/source/ui/view/printfun.cxx4
-rw-r--r--sc/source/ui/view/tabcont.cxx8
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx4
-rw-r--r--sc/source/ui/view/tabvwshf.cxx14
-rw-r--r--sc/source/ui/view/viewdata.cxx8
-rw-r--r--sc/source/ui/view/viewfun2.cxx34
71 files changed, 351 insertions, 308 deletions
diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index 63784e9846e4..648cd2365270 100644
--- a/sc/source/core/data/cell2.cxx
+++ b/sc/source/core/data/cell2.cxx
@@ -143,6 +143,13 @@ void ScEditCell::GetString( String& rString ) const
rString.Erase();
}
+void ScEditCell::GetString( rtl::OUString& rString ) const
+{
+ String aTmp;
+ GetString(aTmp);
+ rString = aTmp;
+}
+
void ScEditCell::RemoveCharAttribs( const ScPatternAttr& rAttr )
{
const struct {
@@ -530,6 +537,13 @@ void ScFormulaCell::GetString( String& rString )
rString.Erase();
}
+void ScFormulaCell::GetString( rtl::OUString& rString )
+{
+ String aTmp;
+ GetString(aTmp);
+ rString = aTmp;
+}
+
const ScMatrix* ScFormulaCell::GetMatrix()
{
if ( pDocument->GetAutoCalc() )
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index a08865ec12a3..2c6cee5e1bbd 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -559,7 +559,7 @@ void ScDocument::ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks )
if (pSourceDoc->maTabs[i])
if (!pMarks || pMarks->GetTableSelect(i))
{
- String aString;
+ rtl::OUString aString;
pSourceDoc->maTabs[i]->GetName(aString);
if ( i < static_cast<SCTAB>(maTabs.size()) )
{
@@ -805,7 +805,7 @@ sal_Bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pO
{
if (SC_TAB_APPEND == nNewPos || nNewPos >= static_cast<SCTAB>(maTabs.size()))
nNewPos = static_cast<SCTAB>(maTabs.size());
- String aName;
+ rtl::OUString aName;
GetName(nOldPos, aName);
// vorneweg testen, ob der Prefix als gueltig erkannt wird
@@ -932,7 +932,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
sal_Bool bValid = sal_True;
if (bInsertNew) // neu einfuegen
{
- String aName;
+ rtl::OUString aName;
pSrcDoc->GetName(nSrcPos, aName);
CreateValidTabName(aName);
bValid = InsertTab(nDestPos, aName);
@@ -1112,7 +1112,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
if( xLib.is() )
{
- String sSrcCodeName;
+ rtl::OUString sSrcCodeName;
pSrcDoc->GetCodeName( nSrcPos, sSrcCodeName );
rtl::OUString sRTLSource;
xLib->getByName( sSrcCodeName ) >>= sRTLSource;
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 80c801deb3b0..2825e7fa4ce7 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -366,7 +366,7 @@ bool ScDocument::IsDefaultTabBgColor( SCTAB nTab ) const
return true;
}
-void ScDocument::GetScenarioData( SCTAB nTab, String& rComment,
+void ScDocument::GetScenarioData( SCTAB nTab, rtl::OUString& rComment,
Color& rColor, sal_uInt16& rFlags ) const
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->IsScenario())
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 4d95790df088..f821ccfb2cbc 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -998,8 +998,8 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
SCTAB nThisTab;
// Tabellen mit gleichen Namen vergleichen
- String aThisName;
- String aOtherName;
+ rtl::OUString aThisName;
+ rtl::OUString aOtherName;
for (nThisTab=0; nThisTab<nThisCount; nThisTab++)
{
SCTAB nOtherTab = SCTAB_MAX;
@@ -1010,7 +1010,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
if (!rOtherDoc.IsScenario(nTemp))
{
rOtherDoc.GetName( nTemp, aOtherName );
- if ( aThisName == aOtherName )
+ if ( aThisName.equals(aOtherName) )
nOtherTab = nTemp;
}
}
@@ -1068,11 +1068,11 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
sal_uLong n1,n2; // fuer AppendDeleteRange
//! ein Progress ueber alle Tabellen ???
- String aTabName;
+ rtl::OUString aTabName;
GetName( nThisTab, aTabName );
String aTemplate = ScGlobal::GetRscString(STR_PROGRESS_COMPARING);
String aProText = aTemplate.GetToken( 0, '#' );
- aProText += aTabName;
+ aProText.Append(String(aTabName));
aProText += aTemplate.GetToken( 1, '#' );
ScProgress aProgress( GetDocumentShell(),
aProText, 3*nThisEndRow ); // 2x FindOrder, 1x hier
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 0736e148c4d5..191ed190406e 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -163,7 +163,7 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell )
pDrawLayer->ScAddPage( nTab ); // always add page, with or without the table
if (maTabs[nTab])
{
- String aTabName;
+ rtl::OUString aTabName;
maTabs[nTab]->GetName(aTabName);
pDrawLayer->ScRenamePage( nTab, aTabName );
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index e475d8aa8172..dcb95021d48c 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -169,7 +169,7 @@ sal_Bool ScDocument::HasTable( SCTAB nTab ) const
return false;
}
-bool ScDocument::GetName( SCTAB nTab, String& rName ) const
+bool ScDocument::GetName( SCTAB nTab, rtl::OUString& rName ) const
{
if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
if (maTabs[nTab])
@@ -177,19 +177,11 @@ bool ScDocument::GetName( SCTAB nTab, String& rName ) const
maTabs[nTab]->GetName( rName );
return true;
}
- rName.Erase();
+ rName = rtl::OUString();
return false;
}
-bool ScDocument::GetName( SCTAB nTab, OUString& rName ) const
-{
- String aTmp;
- bool bRet = GetName(nTab, aTmp);
- rName = aTmp;
- return bRet;
-}
-
-sal_Bool ScDocument::SetCodeName( SCTAB nTab, const String& rName )
+bool ScDocument::SetCodeName( SCTAB nTab, const rtl::OUString& rName )
{
if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
{
@@ -203,7 +195,7 @@ sal_Bool ScDocument::SetCodeName( SCTAB nTab, const String& rName )
return false;
}
-sal_Bool ScDocument::GetCodeName( SCTAB nTab, String& rName ) const
+bool ScDocument::GetCodeName( SCTAB nTab, rtl::OUString& rName ) const
{
if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
if (maTabs[nTab])
@@ -211,19 +203,19 @@ sal_Bool ScDocument::GetCodeName( SCTAB nTab, String& rName ) const
maTabs[nTab]->GetCodeName( rName );
return true;
}
- rName.Erase();
+ rName = rtl::OUString();
return false;
}
-sal_Bool ScDocument::GetTable( const String& rName, SCTAB& rTab ) const
+bool ScDocument::GetTable( const rtl::OUString& rName, SCTAB& rTab ) const
{
- String aUpperName = rName;
+ rtl::OUString aUpperName = rName;
ScGlobal::pCharClass->toUpper(aUpperName);
for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()); i++)
if (maTabs[i])
{
- if ( maTabs[i]->GetUpperName() == aUpperName )
+ if (aUpperName.equals(maTabs[i]->GetUpperName()))
{
rTab = i;
return true;
@@ -294,7 +286,7 @@ sal_Bool ScDocument::ValidNewTabName( const String& rName ) const
for (; it != maTabs.end() && bValid; ++it)
if ( *it )
{
- String aOldName;
+ rtl::OUString aOldName;
(*it)->GetName(aOldName);
bValid = !ScGlobal::GetpTransliteration()->isEqual( rName, aOldName );
}
@@ -316,7 +308,7 @@ bool ScDocument::ValidNewTabName( const std::vector<String>& rNames ) const//TOD
{
for (nameIter = rNames.begin(); nameIter != rNames.end(); ++nameIter)
{
- String aOldName;
+ rtl::OUString aOldName;
(*it)->GetName(aOldName);
bValid = !ScGlobal::GetpTransliteration()->isEqual( *nameIter, aOldName );
}
@@ -371,6 +363,12 @@ void ScDocument::CreateValidTabName(String& rName) const
}
}
+void ScDocument::CreateValidTabName(rtl::OUString& rName) const
+{
+ String aTmp = rName;
+ CreateValidTabName(aTmp);
+ rName = aTmp;
+}
void ScDocument::CreateValidTabNames(std::vector<rtl::OUString>& aNames, SCTAB nCount) const
{
@@ -761,7 +759,7 @@ sal_Bool ScDocument::RenameTab( SCTAB nTab, const String& rName, sal_Bool /* bUp
for (i=0; (i< static_cast<SCTAB>(maTabs.size())) && bValid; i++)
if (maTabs[i] && (i != nTab))
{
- String aOldName;
+ rtl::OUString aOldName;
maTabs[i]->GetName(aOldName);
bValid = !ScGlobal::GetpTransliteration()->isEqual( rName, aOldName );
}
@@ -3053,6 +3051,12 @@ void ScDocument::GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rSt
rString.Erase();
}
+void ScDocument::GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, rtl::OUString& rString )
+{
+ String aTmp;
+ GetInputString(nCol, nRow, nTab, aTmp);
+ rString = aTmp;
+}
void ScDocument::GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, double& rValue )
{
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 9e690fad0590..e5cac4b258cc 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -1314,17 +1314,17 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
//#i110034# charts need correct sheet names for xml range conversion during load
//so the target sheet name is temporarily renamed (if we have any SdrObjects)
- String aDestTabName;
+ rtl::OUString aDestTabName;
sal_Bool bRestoreDestTabName = false;
if( pOldObject && !bSameDoc && !bDestClip )
{
if( pDoc && pClipDoc )
{
- String aSourceTabName;
+ rtl::OUString aSourceTabName;
if( pClipDoc->GetName( nSourceTab, aSourceTabName )
&& pDoc->GetName( nDestTab, aDestTabName ) )
{
- if( !(aSourceTabName==aDestTabName) &&
+ if( !aSourceTabName.equals(aDestTabName) &&
pDoc->ValidNewTabName(aSourceTabName) )
{
bRestoreDestTabName = pDoc->RenameTab( nDestTab, aSourceTabName ); //sal_Bool bUpdateRef = sal_True, sal_Bool bExternalDocument = sal_False
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 240d1d9025fe..770ff55d7778 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -229,7 +229,7 @@ bool SetOptimalHeightsToRows(OptimalHeightsFuncObjBase& rFuncObj,
// -----------------------------------------------------------------------
-ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
+ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const rtl::OUString& rNewName,
bool bColInfo, bool bRowInfo ) :
aName( rNewName ),
aCodeName( rNewName ),
@@ -345,23 +345,23 @@ ScTable::~ScTable()
DestroySortCollator();
}
-void ScTable::GetName( String& rName ) const
+void ScTable::GetName( rtl::OUString& rName ) const
{
rName = aName;
}
-void ScTable::SetName( const String& rNewName )
+void ScTable::SetName( const rtl::OUString& rNewName )
{
aName = rNewName;
- aUpperName.Erase(); // invalidated if the name is changed
+ aUpperName = rtl::OUString(); // invalidated if the name is changed
// SetStreamValid is handled in ScDocument::RenameTab
}
-const String& ScTable::GetUpperName() const
+const rtl::OUString& ScTable::GetUpperName() const
{
- if ( !aUpperName.Len() && aName.Len() )
- aUpperName = ScGlobal::pCharClass->upper( aName );
+ if (aUpperName.isEmpty() && !aName.isEmpty())
+ aUpperName = ScGlobal::pCharClass->upper(aName);
return aUpperName;
}
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 53def4f9c13f..64fe5e386aaf 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1657,7 +1657,9 @@ void ScAddress::Format( String& r, sal_uInt16 nFlags, ScDocument* pDoc,
if( nFlags & SCA_TAB_3D )
{
String aTabName, aDocName;
- pDoc->GetName( nTab, aTabName );
+ rtl::OUString aTmp;
+ pDoc->GetName(nTab, aTmp);
+ aTabName = aTmp; // TODO: remove use of String here.
// External Reference, same as in ScCompiler::MakeTabStr()
if( aTabName.GetChar(0) == '\'' )
{ // "'Doc'#Tab"
@@ -1732,7 +1734,9 @@ lcl_Split_DocTab( const ScDocument* pDoc, SCTAB nTab,
sal_uInt16 nFlags,
String& rTabName, String& rDocName )
{
- pDoc->GetName( nTab, rTabName );
+ rtl::OUString aTmp;
+ pDoc->GetName(nTab, aTmp);
+ rTabName = aTmp;
rDocName.Erase();
// External reference, same as in ScCompiler::MakeTabStr()
if ( rTabName.GetChar(0) == '\'' )
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 5a12539bea3b..8a341a6c4a7d 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -502,7 +502,9 @@ String ScChangeAction::GetRefString( const ScBigRange& rRange,
case SC_CAT_DELETE_COLS :
if ( bFlag3D )
{
- pDoc->GetName( aTmpRange.aStart.Tab(), aStr );
+ rtl::OUString aTmp;
+ pDoc->GetName( aTmpRange.aStart.Tab(), aTmp );
+ aStr = aTmp;
aStr += '.';
}
aStr += ::ScColToAlpha( aTmpRange.aStart.Col() );
@@ -513,7 +515,9 @@ String ScChangeAction::GetRefString( const ScBigRange& rRange,
case SC_CAT_DELETE_ROWS :
if ( bFlag3D )
{
- pDoc->GetName( aTmpRange.aStart.Tab(), aStr );
+ rtl::OUString aTmp;
+ pDoc->GetName( aTmpRange.aStart.Tab(), aTmp );
+ aStr = aTmp;
aStr += '.';
}
aStr += String::CreateFromInt32( aTmpRange.aStart.Row() + 1 );
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 22c6c910c533..2c14b8649169 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -782,10 +782,12 @@ struct ConventionOOO_A1 : public Convention_A1
static String MakeTabStr( const ScCompiler& rComp, SCTAB nTab, String& aDoc )
{
String aString;
- if (!rComp.GetDoc()->GetName( nTab, aString ))
+ rtl::OUString aTmp;
+ if (!rComp.GetDoc()->GetName( nTab, aTmp ))
aString = ScGlobal::GetRscString(STR_NO_REF_TABLE);
else
{
+ aString = aTmp;
if ( aString.GetChar(0) == '\'' )
{ // "'Doc'#Tab"
xub_StrLen nPos = ScGlobal::FindUnquoted( aString, SC_COMPILER_FILE_TAB_SEP);
@@ -868,8 +870,8 @@ struct ConventionOOO_A1 : public Convention_A1
(aRef.Ref1.IsColDeleted() || aRef.Ref1.IsRowDeleted() || aRef.Ref1.IsTabDeleted() ||
aRef.Ref2.IsColDeleted() || aRef.Ref2.IsRowDeleted() || aRef.Ref2.IsTabDeleted()))
rBuffer.append( rComp.GetCurrentOpCodeMap()->getSymbol( ocErrRef));
- // For ODFF write [#REF!], but not for PODF so apps reading ODF
- // 1.0/1.1 may have a better chance if they implemented the old
+ // For ODFF write [#REF!], but not for PODF so apps reading ODF
+ // 1.0/1.1 may have a better chance if they implemented the old
// form.
else
{
@@ -1114,12 +1116,14 @@ struct ConventionXL
bool bHasDoc = false;
rDocName.Erase();
+ rtl::OUString aTmp;
if (rRef.IsTabDeleted() ||
- !rComp.GetDoc()->GetName( rRef.nTab, rTabName ))
+ !rComp.GetDoc()->GetName( rRef.nTab, aTmp ))
{
rTabName = ScGlobal::GetRscString( STR_NO_REF_TABLE );
return false;
}
+ rTabName = aTmp;
// Cheesy hack to unparse the OOO style "'Doc'#Tab"
if ( rTabName.GetChar(0) == '\'' )
@@ -2175,13 +2179,13 @@ Label_MaskStateMachine:
case ssGetErrorConstant:
{
// ODFF Error ::= '#' [A-Z0-9]+ ([!?] | ('/' ([A-Z] | ([0-9] [!?]))))
- // BUT, in UI these may have been translated! So don't
+ // BUT, in UI these may have been translated! So don't
// check for ASCII alnum. Note that this construct can't be
// parsed with i18n.
- /* TODO: be strict when reading ODFF, check for ASCII alnum
- * and proper continuation after '/'. However, even with
- * the lax parsing only the error constants we have defined
- * as opcode symbols will be recognized and others result
+ /* TODO: be strict when reading ODFF, check for ASCII alnum
+ * and proper continuation after '/'. However, even with
+ * the lax parsing only the error constants we have defined
+ * as opcode symbols will be recognized and others result
* in ocBad, so the result is actually conformant. */
bool bAdd = true;
if ('!' == c || '?' == c)
@@ -2680,7 +2684,7 @@ bool ScCompiler::IsPredetectedReference( const String& rName )
* 'haha.#REF!1fooledyou' and will generate an error on such. */
if (nPos == 0)
{
- // Per ODFF the correct string for a reference error is just #REF!,
+ // Per ODFF the correct string for a reference error is just #REF!,
// so pass it on.
if (rName.Len() == 5)
return IsErrorConstant( rName);
@@ -3580,7 +3584,7 @@ bool ScCompiler::NextNewToken( bool bInArray )
* would need an ocBad token with additional error value.
* FormulaErrorToken wouldn't do because we want to preserve the
* original string containing partial valid address
- * information if not ODFF (in that case it was already handled).
+ * information if not ODFF (in that case it was already handled).
* */
ScRawToken aToken;
aToken.SetString( aStr.GetBuffer() );
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index fdbeb58e20a2..f581ac7a84d0 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1912,7 +1912,6 @@ void ScInterpreter::ScCell()
PushIllegalParameter();
else
{
- String aFuncResult;
ScBaseCell* pCell = GetCell( aCellPos );
ScCellKeywordTranslator::transKeyword(aInfoType, ScGlobal::GetLocale(), ocCell);
@@ -1933,12 +1932,14 @@ void ScInterpreter::ScCell()
else if( aInfoType.EqualsAscii( "ADDRESS" ) )
{ // address formatted as [['FILENAME'#]$TABLE.]$COL$ROW
sal_uInt16 nFlags = (aCellPos.Tab() == aPos.Tab()) ? (SCA_ABS) : (SCA_ABS_3D);
- aCellPos.Format( aFuncResult, nFlags, pDok, pDok->GetAddressConvention() );
- PushString( aFuncResult );
+ rtl::OUString aStr;
+ aCellPos.Format( aStr, nFlags, pDok, pDok->GetAddressConvention() );
+ PushString(aStr);
}
else if( aInfoType.EqualsAscii( "FILENAME" ) )
{ // file name and table name: 'FILENAME'#$TABLE
SCTAB nTab = aCellPos.Tab();
+ rtl::OUString aFuncResult;
if( nTab < pDok->GetTableCount() )
{
if( pDok->GetLinkMode( nTab ) == SC_LINK_VALUE )
@@ -1948,13 +1949,15 @@ void ScInterpreter::ScCell()
SfxObjectShell* pShell = pDok->GetDocumentShell();
if( pShell && pShell->GetMedium() )
{
- aFuncResult = (sal_Unicode) '\'';
+ rtl::OUStringBuffer aBuf;
+ aBuf.append(sal_Unicode('\''));
const INetURLObject& rURLObj = pShell->GetMedium()->GetURLObject();
- aFuncResult += String( rURLObj.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) );
- aFuncResult.AppendAscii( "'#$" );
- String aTabName;
+ aBuf.append(rURLObj.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS));
+ aBuf.appendAscii("'#$");
+ rtl::OUString aTabName;
pDok->GetName( nTab, aTabName );
- aFuncResult += aTabName;
+ aBuf.append(aTabName);
+ aFuncResult = aBuf.makeStringAndClear();
}
}
}
@@ -1963,14 +1966,16 @@ void ScInterpreter::ScCell()
else if( aInfoType.EqualsAscii( "COORD" ) )
{ // address, lotus 1-2-3 formatted: $TABLE:$COL$ROW
// Yes, passing tab as col is intentional!
+ rtl::OUStringBuffer aFuncResult;
+ rtl::OUString aCellStr;
ScAddress( static_cast<SCCOL>(aCellPos.Tab()), 0, 0 ).Format(
- aFuncResult, (SCA_COL_ABSOLUTE|SCA_VALID_COL), NULL, pDok->GetAddressConvention() );
- aFuncResult += ':';
- String aCellStr;
+ aCellStr, (SCA_COL_ABSOLUTE|SCA_VALID_COL), NULL, pDok->GetAddressConvention() );
+ aFuncResult.append(aCellStr);
+ aFuncResult.append(sal_Unicode(':'));
aCellPos.Format( aCellStr, (SCA_COL_ABSOLUTE|SCA_VALID_COL|SCA_ROW_ABSOLUTE|SCA_VALID_ROW),
NULL, pDok->GetAddressConvention() );
- aFuncResult += aCellStr;
- PushString( aFuncResult );
+ aFuncResult.append(aCellStr);
+ PushString( aFuncResult.makeStringAndClear() );
}
// *** CELL PROPERTIES ***
@@ -1978,19 +1983,21 @@ void ScInterpreter::ScCell()
{ // contents of the cell, no formatting
if( pCell && pCell->HasStringData() )
{
- GetCellString( aFuncResult, pCell );
- PushString( aFuncResult );
+ String aStr;
+ GetCellString( aStr, pCell );
+ PushString( aStr );
}
else
PushDouble( GetCellValue( aCellPos, pCell ) );
}
else if( aInfoType.EqualsAscii( "TYPE" ) )
{ // b = blank; l = string (label); v = otherwise (value)
+ sal_Unicode c;
if( HasCellStringData( pCell ) )
- aFuncResult = 'l';
+ c = 'l';
else
- aFuncResult = HasCellValueData( pCell ) ? 'v' : 'b';
- PushString( aFuncResult );
+ c = HasCellValueData( pCell ) ? 'v' : 'b';
+ PushString( rtl::OUString(c) );
}
else if( aInfoType.EqualsAscii( "WIDTH" ) )
{ // column width (rounded off as count of zero characters in standard font and size)
@@ -2011,6 +2018,7 @@ void ScInterpreter::ScCell()
}
else if( aInfoType.EqualsAscii( "PREFIX" ) )
{ // ' = left; " = right; ^ = centered
+ sal_Unicode c = 0;
if( HasCellStringData( pCell ) )
{
const SvxHorJustifyItem* pJustAttr = (const SvxHorJustifyItem*)
@@ -2019,13 +2027,13 @@ void ScInterpreter::ScCell()
{
case SVX_HOR_JUSTIFY_STANDARD:
case SVX_HOR_JUSTIFY_LEFT:
- case SVX_HOR_JUSTIFY_BLOCK: aFuncResult = '\''; break;
- case SVX_HOR_JUSTIFY_CENTER: aFuncResult = '^'; break;
- case SVX_HOR_JUSTIFY_RIGHT: aFuncResult = '"'; break;
- case SVX_HOR_JUSTIFY_REPEAT: aFuncResult = '\\'; break;
+ case SVX_HOR_JUSTIFY_BLOCK: c = '\''; break;
+ case SVX_HOR_JUSTIFY_CENTER: c = '^'; break;
+ case SVX_HOR_JUSTIFY_RIGHT: c = '"'; break;
+ case SVX_HOR_JUSTIFY_REPEAT: c = '\\'; break;
}
}
- PushString( aFuncResult );
+ PushString( rtl::OUString(c) );
}
else if( aInfoType.EqualsAscii( "PROTECT" ) )
{ // 1 = cell locked
@@ -2037,6 +2045,7 @@ void ScInterpreter::ScCell()
// *** FORMATTING ***
else if( aInfoType.EqualsAscii( "FORMAT" ) )
{ // specific format code for standard formats
+ String aFuncResult;
sal_uLong nFormat = pDok->GetNumberFormat( aCellPos );
bool bAppendPrec = true;
sal_uInt16 nPrec, nLeading;
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 946d93f61b89..cadd0d1ff19b 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -695,7 +695,7 @@ int SAL_CALL ScRangePairList_QsortNameCompare( const void* p1, const void* p2 )
const ScRangePairNameSort* ps2 = (const ScRangePairNameSort*)p2;
const ScAddress& rStartPos1 = ps1->pPair->GetRange(0).aStart;
const ScAddress& rStartPos2 = ps2->pPair->GetRange(0).aStart;
- String aStr1, aStr2;
+ rtl::OUString aStr1, aStr2;
sal_Int32 nComp;
if ( rStartPos1.Tab() == rStartPos2.Tab() )
nComp = COMPARE_EQUAL;
diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx
index 6e530505074d..980ca093f1fa 100644
--- a/sc/source/filter/dif/difexp.cxx
+++ b/sc/source/filter/dif/difexp.cxx
@@ -108,7 +108,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
FltError eRet = eERR_OK;
String aOS;
- String aString;
+ rtl::OUString aString;
SCCOL nEndCol = rRange.aEnd.Col();
SCROW nEndRow = rRange.aEnd.Row();
SCCOL nNumCols = nEndCol - rRange.aStart.Col() + 1;
@@ -130,7 +130,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
aOS.AppendAscii( "\n0,1\n\"" );
pDoc->GetName( nTab, aString );
- aOS += aString;
+ aOS.Append(String(aString));
aOS.AppendAscii( "\"\n" );
rOut.WriteUnicodeOrByteText( aOS );
@@ -190,7 +190,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
else
{
pDoc->GetInputString( nColCnt, nRowCnt, nTab, aString );
- aOS += aString;
+ aOS.Append(String(aString));
}
aOS.AppendAscii( "\nV\n" );
break;
@@ -199,7 +199,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
bWriteStringData = true;
break;
case CELLTYPE_STRING:
- ( ( ScStringCell* ) pAkt )->GetString( aString );
+ aString = static_cast<ScStringCell*>(pAkt)->GetString();
bWriteStringData = true;
break;
case CELLTYPE_FORMULA:
@@ -218,13 +218,13 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
else
{
pDoc->GetInputString( nColCnt, nRowCnt, nTab, aString );
- aOS += aString;
+ aOS.Append(String(aString));
}
aOS.AppendAscii( "\nV\n" );
}
else if( pAkt->HasStringData() )
{
- ( ( ScFormulaCell * ) pAkt )->GetString( aString );
+ static_cast<ScFormulaCell*>(pAkt)->GetString(aString);
bWriteStringData = true;
}
else
@@ -245,24 +245,25 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
// sc/source/ui/docsh.cxx:ScDocShell::AsciiSave()
// In fact we should create a common method if this would be
// needed just one more time..
+ String aTmpStr = aString;
aOS.AssignAscii( pStringData );
rOut.WriteUnicodeOrByteText( aOS, eCharSet );
if ( eCharSet == RTL_TEXTENCODING_UNICODE )
{
- xub_StrLen nPos = aString.Search( cStrDelim );
+ xub_StrLen nPos = aTmpStr.Search( cStrDelim );
while ( nPos != STRING_NOTFOUND )
{
- aString.Insert( cStrDelim, nPos );
- nPos = aString.Search( cStrDelim, nPos+2 );
+ aTmpStr.Insert( cStrDelim, nPos );
+ nPos = aTmpStr.Search( cStrDelim, nPos+2 );
}
rOut.WriteUniOrByteChar( cStrDelim, eCharSet );
- rOut.WriteUnicodeText( aString );
+ rOut.WriteUnicodeText(aTmpStr);
rOut.WriteUniOrByteChar( cStrDelim, eCharSet );
}
else if ( bContextOrNotAsciiEncoding )
{
// to byte encoding
- ByteString aStrEnc( aString, eCharSet );
+ ByteString aStrEnc( aTmpStr, eCharSet );
// back to Unicode
UniString aStrDec( aStrEnc, eCharSet );
// search on re-decoded string
@@ -280,7 +281,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
}
else
{
- ByteString aStrEnc( aString, eCharSet );
+ ByteString aStrEnc( aTmpStr, eCharSet );
// search on encoded string
xub_StrLen nPos = aStrEnc.Search( aStrDelimEncoded );
while ( nPos != STRING_NOTFOUND )
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index c5cc14b75089..7e29312e34de 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -193,7 +193,7 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
Add( new ExcBofW8 );
SCTAB nC;
- String aTmpString;
+ rtl::OUString aTmpString;
SCTAB nScTabCount = rTabInfo.GetScTabCount();
sal_uInt16 nExcTabCount = rTabInfo.GetXclTabCount();
sal_uInt16 nCodenames = static_cast< sal_uInt16 >( GetExtDocOptions().GetCodeNameCount() );
diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx
index e5284f3211f2..6d7c36c56ecd 100644
--- a/sc/source/filter/excel/read.cxx
+++ b/sc/source/filter/excel/read.cxx
@@ -1092,7 +1092,7 @@ FltError ImportExcel8::Read( void )
case 0x0A: // EOF [ 2345 ]
{
eAkt = EXC_STATE_SHEET;
- String sName;
+ rtl::OUString sName;
GetDoc().GetName( GetCurrScTab(), sName );
if ( !bSheetHasCodeName )
{
@@ -1101,7 +1101,7 @@ FltError ImportExcel8::Read( void )
}
else
{
- String sCodeName;
+ rtl::OUString sCodeName;
GetDoc().GetCodeName( GetCurrScTab(), sCodeName );
OSL_TRACE("Have CodeName %s for SheetName %s",
rtl::OUStringToOString( sCodeName, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString( sName, RTL_TEXTENCODING_UTF8 ).getStr() );
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index df2c4bc0992d..f36d318951f0 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -955,7 +955,7 @@ bool lclConvertToDos( String& rUrl, const String& rBasePath, bool bSaveRelUrl )
/** Encodes special parts of the URL, i.e. directory separators and volume names.
@param pTableName Pointer to a table name to be encoded in this URL, or 0. */
-void lclEncodeDosUrl( XclBiff eBiff, String& rUrl, const String* pTableName = 0 )
+void lclEncodeDosUrl( XclBiff eBiff, String& rUrl, const rtl::OUString* pTableName = 0 )
{
if( rUrl.Len() )
{
@@ -1010,14 +1010,14 @@ void lclEncodeDosUrl( XclBiff eBiff, String& rUrl, const String* pTableName = 0
// table name
if( pTableName )
- rUrl.Append( *pTableName );
+ rUrl.Append(String(*pTableName));
}
} // namespace
// ----------------------------------------------------------------------------
-String XclExpUrlHelper::EncodeUrl( const XclExpRoot& rRoot, const String& rAbsUrl, const String* pTableName )
+String XclExpUrlHelper::EncodeUrl( const XclExpRoot& rRoot, const String& rAbsUrl, const rtl::OUString* pTableName )
{
String aDosUrl( rAbsUrl );
if( !aDosUrl.Len() || lclConvertToDos( aDosUrl, rRoot.GetBasePath(), rRoot.IsRelUrl() ) )
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 14092c71b94f..faaac1cd9b3e 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -782,10 +782,10 @@ bool XclExpTabInfo::IsMirroredTab( SCTAB nScTab ) const
return GetFlag( nScTab, EXC_TABBUF_MIRRORED );
}
-const String& XclExpTabInfo::GetScTabName( SCTAB nScTab ) const
+rtl::OUString XclExpTabInfo::GetScTabName( SCTAB nScTab ) const
{
OSL_ENSURE( nScTab < mnScCnt, "XclExpTabInfo::IsActiveTab - sheet out of range" );
- return (nScTab < mnScCnt) ? maTabInfoVec[ nScTab ].maScName : EMPTY_STRING;
+ return (nScTab < mnScCnt) ? maTabInfoVec[ nScTab ].maScName : rtl::OUString();
}
sal_uInt16 XclExpTabInfo::GetXclTab( SCTAB nScTab ) const
@@ -844,7 +844,7 @@ void XclExpTabInfo::CalcXclIndexes()
// result: first occur all exported sheets, followed by all external sheets
}
-typedef ::std::pair< String, SCTAB > XclExpTabName;
+typedef ::std::pair< rtl::OUString, SCTAB > XclExpTabName;
typedef ::std::vector< XclExpTabName > XclExpTabNameVec;
inline bool operator<( const XclExpTabName& rArg1, const XclExpTabName& rArg2 )
diff --git a/sc/source/filter/excel/xipage.cxx b/sc/source/filter/excel/xipage.cxx
index 687daa9b3efe..07831f875875 100644
--- a/sc/source/filter/excel/xipage.cxx
+++ b/sc/source/filter/excel/xipage.cxx
@@ -226,14 +226,18 @@ void XclImpPageSettings::Finalize()
// *** create page style sheet ***
- String aStyleName( RTL_CONSTASCII_USTRINGPARAM( "PageStyle_" ) );
- String aTableName;
+ rtl::OUStringBuffer aStyleName;
+ aStyleName.appendAscii("PageStyle_");
+
+ rtl::OUString aTableName;
if( GetDoc().GetName( nScTab, aTableName ) )
- aStyleName.Append( aTableName );
+ aStyleName.append(aTableName);
else
- aStyleName.Append( String::CreateFromInt32( nScTab + 1 ) );
+ aStyleName.append(static_cast<sal_Int32>(nScTab+1));
+
+ ScStyleSheet& rStyleSheet = ScfTools::MakePageStyleSheet(
+ GetStyleSheetPool(), aStyleName.makeStringAndClear(), false);
- ScStyleSheet& rStyleSheet = ScfTools::MakePageStyleSheet( GetStyleSheetPool(), aStyleName, false );
SfxItemSet& rItemSet = rStyleSheet.GetItemSet();
// *** page settings ***
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 70d8ac866ad6..1aa0ce363681 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -443,7 +443,7 @@ void ScHTMLExport::WriteOverview()
OUT_STR( ScGlobal::GetRscString( STR_OVERVIEW ) );
TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_head1 );
- String aStr;
+ rtl::OUString aStr;
const SCTAB nCount = pDoc->GetTableCount();
for ( SCTAB nTab = 0; nTab < nCount; nTab++ )
@@ -665,7 +665,7 @@ void ScHTMLExport::WriteTables()
{
const SCTAB nTabCount = pDoc->GetTableCount();
const String aStrTable( ScResId( SCSTR_TABLE ) );
- String aStr;
+ rtl::OUString aStr;
String aStrOut;
SCCOL nStartCol;
SCROW nStartRow;
diff --git a/sc/source/filter/inc/xehelper.hxx b/sc/source/filter/inc/xehelper.hxx
index f02e8ad12bc1..6f43a38d02e6 100644
--- a/sc/source/filter/inc/xehelper.hxx
+++ b/sc/source/filter/inc/xehelper.hxx
@@ -410,7 +410,7 @@ class XclExpUrlHelper : boost::noncopyable
public:
/** Encodes and returns the URL passed in rAbsUrl to an Excel like URL.
@param pTableName Optional pointer to a table name to be encoded in this URL. */
- static String EncodeUrl( const XclExpRoot& rRoot, const String& rAbsUrl, const String* pTableName = 0 );
+ static String EncodeUrl( const XclExpRoot& rRoot, const String& rAbsUrl, const rtl::OUString* pTableName = 0 );
/** Encodes and returns the passed DDE link to an Excel like DDE link. */
static String EncodeDde( const String& rApplic, const String rTopic );
diff --git a/sc/source/filter/inc/xelink.hxx b/sc/source/filter/inc/xelink.hxx
index 866151df28f5..6d056fd6e488 100644
--- a/sc/source/filter/inc/xelink.hxx
+++ b/sc/source/filter/inc/xelink.hxx
@@ -76,7 +76,7 @@ public:
/** Returns true, if the specified Calc sheet is displayed in right-to-left mode. */
bool IsMirroredTab( SCTAB nScTab ) const;
/** Returns the Calc name of the specified sheet. */
- const String& GetScTabName( SCTAB nScTab ) const;
+ rtl::OUString GetScTabName( SCTAB nScTab ) const;
/** Returns the Excel sheet index for a given Calc sheet. */
sal_uInt16 GetXclTab( SCTAB nScTab ) const;
@@ -114,7 +114,7 @@ private:
/** Data structure with infoemation about one Calc sheet. */
struct XclExpTabInfoEntry
{
- String maScName;
+ rtl::OUString maScName;
sal_uInt16 mnXclTab;
sal_uInt8 mnFlags;
inline explicit XclExpTabInfoEntry() : mnXclTab( 0 ), mnFlags( 0 ) {}
diff --git a/sc/source/filter/inc/xepivot.hxx b/sc/source/filter/inc/xepivot.hxx
index 3279aa4ff290..b25609a2fbc4 100644
--- a/sc/source/filter/inc/xepivot.hxx
+++ b/sc/source/filter/inc/xepivot.hxx
@@ -242,8 +242,8 @@ private:
XclPCInfo maPCInfo; /// Pivot cache settings (SXDB record).
XclExpPCFieldList maFieldList; /// List of all pivot cache fields.
- String maTabName; /// Name of source data sheet.
- ::rtl::OUString maSrcRangeName; /// Range name for source data.
+ rtl::OUString maTabName; /// Name of source data sheet.
+ rtl::OUString maSrcRangeName; /// Range name for source data.
ScRange maOrigSrcRange; /// The original sheet source range.
ScRange maExpSrcRange; /// The exported sheet source range.
ScRange maDocSrcRange; /// The range used to build the cache fields and items.
diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx
index 0a4fe4fd16d7..188e70d9d4fe 100644
--- a/sc/source/filter/lotus/lotread.cxx
+++ b/sc/source/filter/lotus/lotread.cxx
@@ -212,22 +212,22 @@ FltError ImportLotus::Read()
// duemmliche Namen eliminieren
SCTAB nTabs = pD->GetTableCount();
SCTAB nCnt;
- String aTabName;
- String aBaseName;
- String aRef( RTL_CONSTASCII_USTRINGPARAM( "temp" ) );
+ rtl::OUString aTabName;
+ rtl::OUString aBaseName;
+ rtl::OUString aRef( RTL_CONSTASCII_USTRINGPARAM( "temp" ) );
if( nTabs != 0 )
{
if( nTabs > 1 )
{
pD->GetName( 0, aBaseName );
- aBaseName.Erase( aBaseName.Len() - 1 );
+ aBaseName = aBaseName.copy(0, aBaseName.getLength()-1);
}
for( nCnt = 1 ; nCnt < nTabs ; nCnt++ )
{
OSL_ENSURE( pD->HasTable( nCnt ),
"-ImportLotus::Read(): Wo ist meine Tabelle?!" );
pD->GetName( nCnt, aTabName );
- if( aTabName == aRef )
+ if( aTabName.equals(aRef) )
{
aTabName = aBaseName;
pD->CreateValidTabName( aTabName );
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 00f0b63fe273..615fdc6d71ea 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -1202,15 +1202,18 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab )
{
String sTmpName;
String sTmpComm;
+ rtl::OUString aTmp;
Color aDummyCol;
sal_uInt16 nFlags;
ScDocument& rDoc = rRoot.GetDoc();
- rDoc.GetName( nTab, sTmpName );
+ rDoc.GetName(nTab, aTmp);
+ sTmpName = aTmp;
sName.Assign( sTmpName, EXC_STR_8BITLENGTH );
nRecLen = 8 + sName.GetBufferSize();
- rDoc.GetScenarioData( nTab, sTmpComm, aDummyCol, nFlags );
+ rDoc.GetScenarioData( nTab, aTmp, aDummyCol, nFlags );
+ sTmpComm = aTmp;
sComment.Assign( sTmpComm, EXC_STR_DEFAULT, 255 );
if( sComment.Len() )
nRecLen += sComment.GetSize();
diff --git a/sc/source/filter/xml/XMLCodeNameProvider.cxx b/sc/source/filter/xml/XMLCodeNameProvider.cxx
index 0a0a825ceb31..9b7bf38ae9a2 100644
--- a/sc/source/filter/xml/XMLCodeNameProvider.cxx
+++ b/sc/source/filter/xml/XMLCodeNameProvider.cxx
@@ -81,14 +81,13 @@ XMLCodeNameProvider::~XMLCodeNameProvider()
return mpDoc->GetCodeName().Len() > 0;
SCTAB nCount = mpDoc->GetTableCount();
- String sName( aName );
- String sSheetName, sCodeName;
+ rtl::OUString sSheetName, sCodeName;
for( SCTAB i = 0; i < nCount; i++ )
{
- if( mpDoc->GetName( i, sSheetName ) && sSheetName == sName )
+ if( mpDoc->GetName( i, sSheetName ) && sSheetName.equals(aName) )
{
mpDoc->GetCodeName( i, sCodeName );
- return sCodeName.Len() > 0;
+ return !sCodeName.isEmpty();
}
}
@@ -111,15 +110,13 @@ uno::Any SAL_CALL XMLCodeNameProvider::getByName( const OUString& aName )
}
SCTAB nCount = mpDoc->GetTableCount();
- String sName( aName );
- String sSheetName, sCodeName;
+ rtl::OUString sSheetName, sCodeName;
for( SCTAB i = 0; i < nCount; i++ )
{
- if( mpDoc->GetName( i, sSheetName ) && sSheetName == sName )
+ if( mpDoc->GetName( i, sSheetName ) && sSheetName.equals(aName) )
{
mpDoc->GetCodeName( i, sCodeName );
- OUString sUCodeName( sCodeName );
- aProps[0].Value <<= sUCodeName;
+ aProps[0].Value <<= sCodeName;
aRet <<= aProps;
return aRet;
}
@@ -138,11 +135,11 @@ uno::Sequence< OUString > SAL_CALL XMLCodeNameProvider::getElementNames( )
if( mpDoc->GetCodeName().Len() )
aNames[nRealCount++] = msDocName;
- String sSheetName, sCodeName;
+ rtl::OUString sSheetName, sCodeName;
for( SCTAB i = 0; i < nCount; i++ )
{
mpDoc->GetCodeName( i, sCodeName );
- if( sCodeName.Len() > 0 )
+ if (!sCodeName.isEmpty())
{
if( mpDoc->GetName( i, sSheetName ) )
aNames[nRealCount++] = sSheetName;
@@ -168,11 +165,11 @@ uno::Type SAL_CALL XMLCodeNameProvider::getElementType( )
return sal_True;
SCTAB nCount = mpDoc->GetTableCount();
- String sSheetName, sCodeName;
+ rtl::OUString sSheetName, sCodeName;
for( SCTAB i = 0; i < nCount; i++ )
{
mpDoc->GetCodeName( i, sCodeName );
- if( sCodeName.Len() > 0 && mpDoc->GetName( i, sSheetName ) )
+ if (!sCodeName.isEmpty() && mpDoc->GetName(i, sSheetName))
return sal_True;
}
@@ -192,7 +189,7 @@ void XMLCodeNameProvider::set( const uno::Reference< container::XNameAccess>& xN
}
SCTAB nCount = pDoc->GetTableCount();
- String sSheetName;
+ rtl::OUString sSheetName;
for( SCTAB i = 0; i < nCount; i++ )
{
if( pDoc->GetName( i, sSheetName ) &&
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 782a7b167383..850173b3b234 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3635,7 +3635,7 @@ void ScXMLExport::WriteScenario()
{
if (pDoc && pDoc->IsScenario(static_cast<SCTAB>(nCurrentTable)))
{
- String sComment;
+ rtl::OUString sComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetScenarioData(static_cast<SCTAB>(nCurrentTable), sComment, aColor, nFlags);
@@ -3658,8 +3658,8 @@ void ScXMLExport::WriteScenario()
rtl::OUString sRangeListStr;
ScRangeStringConverter::GetStringFromRangeList( sRangeListStr, pRangeList, pDoc, FormulaGrammar::CONV_OOO );
AddAttribute(XML_NAMESPACE_TABLE, XML_SCENARIO_RANGES, sRangeListStr);
- if (sComment.Len())
- AddAttribute(XML_NAMESPACE_TABLE, XML_COMMENT, rtl::OUString(sComment));
+ if (!sComment.isEmpty())
+ AddAttribute(XML_NAMESPACE_TABLE, XML_COMMENT, sComment);
SvXMLElementExport aElem(*this, XML_NAMESPACE_TABLE, XML_SCENARIO, sal_True, sal_True);
}
}
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index 11bd1af6accc..725b90c91884 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -634,7 +634,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessiblePreviewTable::getImplementationId()
if ( mpTableInfo )
{
- String sCoreName;
+ rtl::OUString sCoreName;
if (mpViewShell->GetDocument()->GetName( mpTableInfo->GetTab(), sCoreName ))
sName.SearchAndReplaceAscii("%1", sCoreName);
}
diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
index 0704f32dcb12..2c54f38f78c5 100644
--- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
@@ -362,7 +362,7 @@ uno::Reference< XAccessible > SAL_CALL
throw (uno::RuntimeException)
{
String sName(ScResId(STR_ACC_TABLE_NAME));
- String sCoreName;
+ rtl::OUString sCoreName;
if (mpDoc && mpDoc->GetName( maRange.aStart.Tab(), sCoreName ))
sName.SearchAndReplaceAscii("%1", sCoreName);
return rtl::OUString(sName);
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index d99b7a277509..26d6bc46537e 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -600,7 +600,7 @@ void ScTransferObj::InitDocShell()
pDestDoc->SetDocOptions( pDoc->GetDocOptions() ); // #i42666#
- String aTabName;
+ rtl::OUString aTabName;
pDoc->GetName( aBlock.aStart.Tab(), aTabName );
pDestDoc->RenameTab( 0, aTabName, false ); // no UpdateRef (empty)
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 773dfd081496..d5d04492e9e6 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -606,23 +606,18 @@ String AbstractScDPShowDetailDlg_Impl::GetDimensionName() const
return pDlg->GetDimensionName();
}
-
-
-void AbstractScNewScenarioDlg_Impl::SetScenarioData( const String& rName, const String& rComment,
- const Color& rColor, sal_uInt16 nFlags )
+void AbstractScNewScenarioDlg_Impl::SetScenarioData(
+ const rtl::OUString& rName, const rtl::OUString& rComment, const Color& rColor, sal_uInt16 nFlags )
{
- pDlg->SetScenarioData(rName,rComment, rColor,nFlags);
+ pDlg->SetScenarioData(rName, rComment, rColor, nFlags);
}
-void AbstractScNewScenarioDlg_Impl::GetScenarioData( String& rName, String& rComment,
- Color& rColor, sal_uInt16& rFlags ) const
+void AbstractScNewScenarioDlg_Impl::GetScenarioData(
+ rtl::OUString& rName, rtl::OUString& rComment, Color& rColor, sal_uInt16& rFlags ) const
{
- pDlg->GetScenarioData( rName,rComment,rColor,rFlags);
+ pDlg->GetScenarioData(rName, rComment, rColor, rFlags);
}
-
-
-
void AbstractScShowTabDlg_Impl::Insert( const String& rString, sal_Bool bSelected )
{
pDlg->Insert( rString, bSelected);
@@ -649,7 +644,7 @@ String AbstractScShowTabDlg_Impl::GetSelectEntry(sal_uInt16 nPos) const
-void AbstractScStringInputDlg_Impl::GetInputString( String& rString ) const
+void AbstractScStringInputDlg_Impl::GetInputString( rtl::OUString& rString ) const
{
pDlg->GetInputString( rString );
}
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 2de66973efee..0ea51db0c22b 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -327,10 +327,10 @@ class AbstractScDPShowDetailDlg_Impl : public AbstractScDPShowDetailDlg
class AbstractScNewScenarioDlg_Impl : public AbstractScNewScenarioDlg //add for ScNewScenarioDlg
{
DECL_ABSTDLG_BASE( AbstractScNewScenarioDlg_Impl, ScNewScenarioDlg )
- virtual void SetScenarioData( const String& rName, const String& rComment,
+ virtual void SetScenarioData( const rtl::OUString& rName, const rtl::OUString& rComment,
const Color& rColor, sal_uInt16 nFlags );
- virtual void GetScenarioData( String& rName, String& rComment,
+ virtual void GetScenarioData( rtl::OUString& rName, rtl::OUString& rComment,
Color& rColor, sal_uInt16& rFlags ) const;
};
@@ -347,7 +347,7 @@ class AbstractScShowTabDlg_Impl : public AbstractScShowTabDlg //add for ScShowT
class AbstractScStringInputDlg_Impl : public AbstractScStringInputDlg //add for ScStringInputDlg
{
DECL_ABSTDLG_BASE( AbstractScStringInputDlg_Impl, ScStringInputDlg )
- virtual void GetInputString( String& rString ) const;
+ virtual void GetInputString( rtl::OUString& rString ) const;
};
class AbstractScTabBgColorDlg_Impl : public AbstractScTabBgColorDlg //add for ScTabBgColorDlg
diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx
index 466642b8e087..a018b1943d4f 100644
--- a/sc/source/ui/dbgui/scendlg.cxx
+++ b/sc/source/ui/dbgui/scendlg.cxx
@@ -158,13 +158,13 @@ ScNewScenarioDlg::~ScNewScenarioDlg()
//------------------------------------------------------------------------
-void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment,
+void ScNewScenarioDlg::GetScenarioData( rtl::OUString& rName, rtl::OUString& rComment,
Color& rColor, sal_uInt16& rFlags ) const
{
rComment = aEdComment.GetText();
rName = aEdName.GetText();
- if ( rName.Len() == 0 )
+ if (rName.isEmpty())
rName = aDefScenarioName;
rColor = aLbColor.GetSelectEntryColor();
@@ -190,7 +190,7 @@ void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment,
rFlags = nBits;
}
-void ScNewScenarioDlg::SetScenarioData( const String& rName, const String& rComment,
+void ScNewScenarioDlg::SetScenarioData( const rtl::OUString& rName, const rtl::OUString& rComment,
const Color& rColor, sal_uInt16 nFlags )
{
aEdComment.SetText(rComment);
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 64c6cfcc5828..cb79c5026c75 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2678,7 +2678,7 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String
}
}
-void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName )
+void VBA_DeleteModule( ScDocShell& rDocSh, const rtl::OUString& sModuleName )
{
uno::Reference< script::XLibraryContainer > xLibContainer = rDocSh.GetBasicContainer();
OSL_ENSURE( xLibContainer.is(), "No BasicContainer!" );
@@ -2784,7 +2784,7 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi
pUndoDoc->AddUndoTab( 0, nCount-1 ); // alle Tabs fuer Referenzen
pDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, pUndoDoc );
- String aOldName;
+ rtl::OUString aOldName;
pDoc->GetName( nTab, aOldName );
pUndoDoc->RenameTab( nTab, aOldName, false );
if (bWasLinked)
@@ -2796,7 +2796,7 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi
if ( pDoc->IsScenario(nTab) )
{
pUndoDoc->SetScenario( nTab, sal_True );
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nScenFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags );
@@ -2814,7 +2814,7 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi
pUndoData = new ScRefUndoData( pDoc );
}
- String sCodeName;
+ rtl::OUString sCodeName;
sal_Bool bHasCodeName = pDoc->GetCodeName( nTab, sCodeName );
if (pDoc->DeleteTab( nTab, pUndoDoc ))
{
@@ -2956,7 +2956,7 @@ sal_Bool ScDocFunc::RenameTable( SCTAB nTab, const String& rName, sal_Bool bReco
ScDocShellModificator aModificator( rDocShell );
sal_Bool bSuccess = false;
- String sOldName;
+ rtl::OUString sOldName;
pDoc->GetName(nTab, sOldName);
if (pDoc->RenameTab( nTab, rName ))
{
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 87c0f8f7d62f..d09eb8f33647 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -319,16 +319,16 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
{
if (aDocument.IsLinked( i ))
{
- String aName;
+ rtl::OUString aName;
aDocument.GetName(i, aName);
- String aLinkTabName = aDocument.GetLinkTab(i);
- xub_StrLen nLinkTabNameLength = aLinkTabName.Len();
- xub_StrLen nNameLength = aName.Len();
+ rtl::OUString aLinkTabName = aDocument.GetLinkTab(i);
+ sal_Int32 nLinkTabNameLength = aLinkTabName.getLength();
+ sal_Int32 nNameLength = aName.getLength();
if (nLinkTabNameLength < nNameLength)
{
// remove the quottes on begin and end of the docname and restore the escaped quotes
- const sal_Unicode* pNameBuffer = aName.GetBuffer();
+ const sal_Unicode* pNameBuffer = aName.getStr();
if ( *pNameBuffer == '\'' && // all docnames have to have a ' character on the first pos
ScGlobal::UnicodeStrChr( pNameBuffer, SC_COMPILER_FILE_TAB_SEP ) )
{
@@ -349,8 +349,8 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
{
xub_StrLen nIndex = nNameLength - nLinkTabNameLength;
INetURLObject aINetURLObject(aDocURLBuffer.makeStringAndClear());
- if( aName.Equals(aLinkTabName, nIndex, nLinkTabNameLength) &&
- (aName.GetChar(nIndex - 1) == '#') && // before the table name should be the # char
+ if( String(aName).Equals(String(aLinkTabName), nIndex, nLinkTabNameLength) &&
+ (aName.getStr()[nIndex - 1] == '#') && // before the table name should be the # char
!aINetURLObject.HasError()) // the docname should be a valid URL
{
aName = ScGlobal::GetDocTabName( aDocument.GetLinkDoc( i ), aDocument.GetLinkTab( i ) );
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 7e9fb513807b..356b6b52de10 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -877,13 +877,13 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
if ( pItem->ISA(SfxStringItem) )
{
- String aName = ((const SfxStringItem*)pItem)->GetValue();
+ rtl::OUString aName = ((const SfxStringItem*)pItem)->GetValue();
SCTAB nTab;
if (aDocument.GetTable( aName, nTab ))
{
if (aDocument.IsScenario(nTab))
{
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
aDocument.GetScenarioData( nTab, aComment, aColor, nFlags );
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 1e6c2474ffbc..c2d2958590db 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -484,9 +484,9 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource )
}
}
-String lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea )
+rtl::OUString lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea )
{
- String aName;
+ rtl::OUString aName;
sal_Bool bOk = false;
ScDBData* pData = pDoc->GetDBAtArea( pArea->nTab, pArea->nColStart, pArea->nRowStart,
pArea->nColEnd, pArea->nRowEnd );
@@ -666,14 +666,14 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, sal_Bool bRecord
SCTAB nTabCount = aDocument.GetTableCount();
SCTAB nSrcTab = SCTAB_MAX;
SCTAB nEndTab = nTab;
- String aCompare;
+ rtl::OUString aCompare;
while ( nEndTab+1 < nTabCount && aDocument.IsScenario(nEndTab+1) )
{
++nEndTab;
if (nSrcTab > MAXTAB) // noch auf der Suche nach dem Szenario?
{
aDocument.GetName( nEndTab, aCompare );
- if (aCompare == rName)
+ if (aCompare.equals(rName))
nSrcTab = nEndTab; // gefunden
}
}
@@ -702,7 +702,7 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, sal_Bool bRecord
for (SCTAB i=nTab+1; i<=nEndTab; i++)
{
pUndoDoc->SetScenario( i, sal_True );
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nScenFlags;
aDocument.GetScenarioData( i, aComment, aColor, nScenFlags );
@@ -754,9 +754,9 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const String& rName, const String&
const Color& rColor, sal_uInt16 nFlags )
{
// Undo
- String aOldName;
+ rtl::OUString aOldName;
aDocument.GetName( nTab, aOldName );
- String aOldComment;
+ rtl::OUString aOldComment;
Color aOldColor;
sal_uInt16 nOldFlags;
aDocument.GetScenarioData( nTab, aOldComment, aOldColor, nOldFlags );
@@ -772,7 +772,7 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const String& rName, const String&
PostPaintGridAll();
aModificator.SetDocumentModified();
- if ( rName != aOldName )
+ if (!aOldName.equals(rName))
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
SfxBindings* pBindings = GetViewBindings();
@@ -862,7 +862,7 @@ sal_uLong ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
if(nErrVal>0 && pSrcDoc->IsScenario( nSrcPos ))
{
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
@@ -902,7 +902,7 @@ sal_Bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bCopy, s
if (bRecord)
aDocument.BeginDrawUndo(); // drawing layer must do its own undo actions
- String sSrcCodeName;
+ rtl::OUString sSrcCodeName;
aDocument.GetCodeName( nSrcTab, sSrcCodeName );
if (!aDocument.CopyTab( nSrcTab, nDestTab ))
{
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index 54380e25d6b1..cb8255085872 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -280,7 +280,7 @@ sal_Bool ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
if ( bNewUrlName && nMode == SC_LINK_VALUE )
{
- String aName;
+ rtl::OUString aName;
pDoc->GetName( nTab, aName );
if ( ScGlobal::GetpTransliteration()->isEqual(
ScGlobal::GetDocTabName( aFileName, aTabName ), aName ) )
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index e654d8268604..b797bb370b08 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -290,7 +290,7 @@ private:
void SetCurrentCell( SCCOL nCol, SCROW Row );
void SetCurrentCellStr( const String rName );
void SetCurrentTable( SCTAB nTab );
- void SetCurrentTableStr( const String rName );
+ void SetCurrentTableStr( const rtl::OUString& rName );
void SetCurrentObject( const String rName );
void SetCurrentDoc( const String& rDocName );
diff --git a/sc/source/ui/inc/retypepassdlg.hxx b/sc/source/ui/inc/retypepassdlg.hxx
index 92a41599821f..19250a728068 100644
--- a/sc/source/ui/inc/retypepassdlg.hxx
+++ b/sc/source/ui/inc/retypepassdlg.hxx
@@ -119,7 +119,7 @@ private:
struct TableItem
{
- String maName;
+ rtl::OUString maName;
TabProtectionPtr mpProtect;
};
::std::vector<TableItem> maTableItems;
diff --git a/sc/source/ui/inc/scendlg.hxx b/sc/source/ui/inc/scendlg.hxx
index e9acea5c11aa..4da9411f3477 100644
--- a/sc/source/ui/inc/scendlg.hxx
+++ b/sc/source/ui/inc/scendlg.hxx
@@ -45,11 +45,11 @@ public:
ScNewScenarioDlg( Window* pParent, const String& rName, sal_Bool bEdit = false, sal_Bool bSheetProtected = false );
~ScNewScenarioDlg();
- void SetScenarioData( const String& rName, const String& rComment,
- const Color& rColor, sal_uInt16 nFlags );
+ void SetScenarioData( const rtl::OUString& rName, const rtl::OUString& rComment,
+ const Color& rColor, sal_uInt16 nFlags );
- void GetScenarioData( String& rName, String& rComment,
- Color& rColor, sal_uInt16& rFlags ) const;
+ void GetScenarioData( rtl::OUString& rName, rtl::OUString& rComment,
+ Color& rColor, sal_uInt16& rFlags ) const;
private:
FixedLine aFlName;
diff --git a/sc/source/ui/inc/strindlg.hxx b/sc/source/ui/inc/strindlg.hxx
index 16630a099a41..3d8c9744e02d 100644
--- a/sc/source/ui/inc/strindlg.hxx
+++ b/sc/source/ui/inc/strindlg.hxx
@@ -50,7 +50,7 @@ public:
const rtl::OString& sHelpId, const rtl::OString& sEditHelpId );
~ScStringInputDlg();
- void GetInputString( String& rString ) const;
+ void GetInputString( rtl::OUString& rString ) const;
private:
FixedText aFtEditTitle;
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 564f75708656..b2bfe045b7ff 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -477,7 +477,7 @@ ScConflictsDlg::~ScConflictsDlg()
String ScConflictsDlg::GetConflictString( const ScConflictsListEntry& rConflictEntry )
{
- String aString;
+ rtl::OUString aString;
if ( mpOwnTrack )
{
const ScChangeAction* pAction = mpOwnTrack->GetAction( rConflictEntry.maOwnActions[ 0 ] );
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index 3a3e0726705e..d5e47ce425e2 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -233,7 +233,7 @@ void ScInsertTableDlg::FillTables_Impl( ScDocument* pSrcDoc )
if ( pSrcDoc )
{
SCTAB nCount = pSrcDoc->GetTableCount();
- String aName;
+ rtl::OUString aName;
for ( SCTAB i=0; i<nCount; i++ )
{
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index c2a4d2036c7f..0da0a3234c6f 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -339,7 +339,7 @@ IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb )
if ( pLb == &aLbDoc )
{
ScDocument* pDoc = GetSelectedDoc();
- String aName;
+ rtl::OUString aName;
aLbTable.Clear();
aLbTable.SetUpdateMode( false );
diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index 9ed724c31063..f78a922c789a 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -253,7 +253,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
if ( !bFmtInserted && pSelFmtData )
{
String aStrStandard( SfxResId(STR_STANDARD) );
- String aFormatName;
+ rtl::OUString aFormatName;
ScStringInputDlg* pDlg;
sal_Bool bOk = false;
@@ -269,7 +269,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
{
pDlg->GetInputString( aFormatName );
- if ( (aFormatName.Len() > 0) && (aFormatName != aStrStandard) )
+ if ( !aFormatName.isEmpty() && !aFormatName.equals(aStrStandard) )
{
ScAutoFormatData* pNewData
= new ScAutoFormatData( *pSelFmtData );
@@ -363,7 +363,7 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG )
while( !bOk )
{
- String aFormatName=aLbFormat.GetSelectEntry();
+ rtl::OUString aFormatName = aLbFormat.GetSelectEntry();
String aEntry;
ScStringInputDlg* pDlg = new ScStringInputDlg( this,
@@ -377,12 +377,12 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG )
pDlg->GetInputString( aFormatName );
sal_uInt16 n;
- if ( aFormatName.Len() > 0 )
+ if (!aFormatName.isEmpty())
{
for( n = 0; n < pFormat->GetCount(); ++n )
{
(*pFormat)[n]->GetName(aEntry);
- if ( aEntry== aFormatName)
+ if (aFormatName.equals(aEntry))
break;
}
if( n >= pFormat->GetCount() )
diff --git a/sc/source/ui/miscdlgs/strindlg.cxx b/sc/source/ui/miscdlgs/strindlg.cxx
index 1379145c539a..d511b1a72049 100644
--- a/sc/source/ui/miscdlgs/strindlg.cxx
+++ b/sc/source/ui/miscdlgs/strindlg.cxx
@@ -75,7 +75,7 @@ ScStringInputDlg::ScStringInputDlg( Window* pParent,
//------------------------------------------------------------------------
-void ScStringInputDlg::GetInputString( String& rString ) const
+void ScStringInputDlg::GetInputString( rtl::OUString& rString ) const
{
rString = aEdInput.GetText();
}
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index e42dee1d50f3..6a22a44e2731 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -181,7 +181,7 @@ void ScNameDlg::Init()
SCTAB n = pDoc->GetTableCount();
for (SCTAB i = 0; i < n; ++i)
{
- String aTabName;
+ rtl::OUString aTabName;
pDoc->GetName(i, aTabName);
maLbScope.InsertEntry(aTabName);
}
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 5f2defeb6a61..5c07de058916 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -644,7 +644,7 @@ void ScContentTree::GetTableNames()
if (!pDoc)
return;
- String aName;
+ rtl::OUString aName;
SCTAB nCount = pDoc->GetTableCount();
for ( SCTAB i=0; i<nCount; i++ )
{
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index bb1eb1eae56f..afe56afb4328 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -1021,18 +1021,18 @@ void ScNavigatorDlg::SetCurrentTable( SCTAB nTabNo )
}
}
-void ScNavigatorDlg::SetCurrentTableStr( const String rName )
+void ScNavigatorDlg::SetCurrentTableStr( const rtl::OUString& rName )
{
if (!GetViewData()) return;
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nCount = pDoc->GetTableCount();
- String aTabName;
+ rtl::OUString aTabName;
for ( SCTAB i=0; i<nCount; i++ )
{
pDoc->GetName( i, aTabName );
- if ( aTabName == rName )
+ if ( aTabName.equals(rName) )
{
SetCurrentTable( i );
return;
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 4b046f839ad4..6625dc08be77 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -1502,7 +1502,7 @@ void ScUndoUseScenario::Undo()
for (SCTAB i = nTab+1; i<=nEndTab; i++)
{
// Flags immer
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nScenFlags;
pUndoDoc->GetScenarioData( i, aComment, aColor, nScenFlags );
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 96f8d46ea4bb..4c94b983fddf 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -348,7 +348,7 @@ void ScUndoDeleteTab::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
sal_Bool bLink = false;
- String aName;
+ rtl::OUString aName;
for(i=0; i<theTabs.size(); ++i)
{
@@ -362,7 +362,7 @@ void ScUndoDeleteTab::Undo()
{
pRefUndoDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, pDoc );
- String aOldName;
+ rtl::OUString aOldName;
pRefUndoDoc->GetName( nTab, aOldName );
pDoc->RenameTab( nTab, aOldName, false );
if (pRefUndoDoc->IsLinked(nTab))
@@ -376,7 +376,7 @@ void ScUndoDeleteTab::Undo()
if ( pRefUndoDoc->IsScenario(nTab) )
{
pDoc->SetScenario( nTab, sal_True );
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nScenFlags;
pRefUndoDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags );
@@ -734,7 +734,7 @@ void ScUndoCopyTab::Redo()
if ( pDoc->IsScenario(nAdjSource) )
{
pDoc->SetScenario(nNewTab, sal_True );
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nScenFlags;
pDoc->GetScenarioData(nAdjSource, aComment, aColor, nScenFlags );
@@ -1001,7 +1001,7 @@ void ScUndoImportTab::Undo()
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( pDoc, nTab,nTab+nCount-1, sal_True,sal_True );
- String aOldName;
+ rtl::OUString aOldName;
for (i=0; i<nCount; i++)
{
SCTAB nTabPos=nTab+i;
@@ -1013,7 +1013,7 @@ void ScUndoImportTab::Undo()
if ( pDoc->IsScenario(nTabPos) )
{
pRedoDoc->SetScenario(nTabPos, sal_True );
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nScenFlags;
pDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags );
@@ -1049,7 +1049,7 @@ void ScUndoImportTab::Redo()
}
ScDocument* pDoc = pDocShell->GetDocument();
- String aName;
+ rtl::OUString aName;
SCTAB i;
for (i=0; i<nCount; i++) // first insert all sheets (#63304#)
{
@@ -1067,7 +1067,7 @@ void ScUndoImportTab::Redo()
if ( pRedoDoc->IsScenario(nTabPos) )
{
pDoc->SetScenario(nTabPos, sal_True );
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nScenFlags;
pRedoDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags );
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 9d33a95a061f..f6543d62bfc8 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -7205,7 +7205,7 @@ void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeExc
rtl::OUString SAL_CALL ScTableSheetObj::getName() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- String aName;
+ rtl::OUString aName;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
pDocSh->GetDocument()->GetName( GetTab_Impl(), aName );
@@ -8015,7 +8015,7 @@ rtl::OUString SAL_CALL ScTableSheetObj::getScenarioComment() throw(uno::RuntimeE
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDocSh->GetDocument()->GetScenarioData( GetTab_Impl(), aComment, aColor, nFlags );
@@ -8034,8 +8034,8 @@ void SAL_CALL ScTableSheetObj::setScenarioComment( const rtl::OUString& aScenari
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = GetTab_Impl();
- String aName;
- String aComment;
+ rtl::OUString aName;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
@@ -8094,7 +8094,7 @@ void SAL_CALL ScTableSheetObj::apply() throw(uno::RuntimeException)
{
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = GetTab_Impl();
- String aName;
+ rtl::OUString aName;
pDoc->GetName( nTab, aName ); // Name dieses Szenarios
SCTAB nDestTab = nTab;
@@ -8254,8 +8254,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
sal_Int32 nNewColor = 0;
if (aValue >>= nNewColor)
{
- String aName;
- String aComment;
+ rtl::OUString aName;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
@@ -8271,8 +8271,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
if (pDoc->IsScenario(nTab))
{
- String aName;
- String aComment;
+ rtl::OUString aName;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
@@ -8304,8 +8304,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
if (pDoc->IsScenario(nTab))
{
- String aName;
- String aComment;
+ rtl::OUString aName;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
@@ -8337,8 +8337,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
if (pDoc->IsScenario(nTab))
{
- String aName;
- String aComment;
+ rtl::OUString aName;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
@@ -8370,8 +8370,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
if (pDoc->IsScenario(nTab))
{
- String aName;
- String aComment;
+ rtl::OUString aName;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
@@ -8403,8 +8403,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
if (pDoc->IsScenario(nTab))
{
- String aName;
- String aComment;
+ rtl::OUString aName;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
@@ -8436,8 +8436,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
if (pDoc->IsScenario(nTab))
{
- String aName;
- String aComment;
+ rtl::OUString aName;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
@@ -8550,7 +8550,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
if (pDoc->IsScenario(nTab))
{
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8562,7 +8562,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
if (pDoc->IsScenario(nTab))
{
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8574,7 +8574,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
if (pDoc->IsScenario(nTab))
{
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8586,7 +8586,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
if (pDoc->IsScenario(nTab))
{
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8598,7 +8598,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
if (pDoc->IsScenario(nTab))
{
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8610,7 +8610,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
if (pDoc->IsScenario(nTab))
{
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8622,7 +8622,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
if (pDoc->IsScenario(nTab))
{
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8648,7 +8648,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
}
else if ( pEntry->nWID == SC_WID_UNO_CODENAME )
{
- String aCodeName;
+ rtl::OUString aCodeName;
if ( pDocSh )
pDocSh->GetDocument()->GetCodeName( GetTab_Impl(), aCodeName );
rAny <<= rtl::OUString( aCodeName );
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 11ef07a27674..24e3d5c90da3 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1168,7 +1168,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
// the sheet starts at the top of the page
Rectangle aArea( pDev->PixelToLogic( Rectangle( 0,0,0,0 ) ) );
sal_Int32 nDestID = pPDFData->CreateDest( aArea );
- String aTabName;
+ rtl::OUString aTabName;
pDoc->GetName( nTab, aTabName );
sal_Int32 nParent = -1; // top-level
pPDFData->CreateOutlineItem( nParent, aTabName, nDestID );
@@ -1177,7 +1177,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
if( pPDFData && pPDFData->GetIsExportNamedDestinations() )
{
Rectangle aArea( pDev->PixelToLogic( Rectangle( 0,0,0,0 ) ) );
- String aTabName;
+ rtl::OUString aTabName;
pDoc->GetName( nTab, aTabName );
//need the PDF page number here
pPDFData->CreateNamedDest( aTabName, aArea );
@@ -1564,7 +1564,7 @@ uno::Reference< container::XIndexAccess > SAL_CALL ScModelObj::getViewData( )
{
uno::Sequence< beans::PropertyValue > aSeq;
aSeq.realloc(1);
- String sName;
+ rtl::OUString sName;
pDocShell->GetDocument()->GetName( pDocShell->GetDocument()->GetVisibleTab(), sName );
rtl::OUString sOUName(sName);
aSeq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_ACTIVETABLE));
@@ -2750,7 +2750,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScTableSheetsObj::getElementNames()
{
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nCount = pDoc->GetTableCount();
- String aName;
+ rtl::OUString aName;
uno::Sequence<rtl::OUString> aSeq(nCount);
rtl::OUString* pAry = aSeq.getArray();
for (SCTAB i=0; i<nCount; i++)
@@ -3550,14 +3550,12 @@ sal_Bool ScScenariosObj::GetScenarioIndex_Impl( const rtl::OUString& rName, SCTA
if ( pDocShell )
{
- String aString(rName);
-
- String aTabName;
+ rtl::OUString aTabName;
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nCount = (SCTAB)getCount();
for (SCTAB i=0; i<nCount; i++)
if (pDoc->GetName( nTab+i+1, aTabName ))
- if ( aTabName == aString )
+ if (aTabName.equals(rName))
{
rIndex = i;
return sal_True;
@@ -3709,7 +3707,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScScenariosObj::getElementNames()
if ( pDocShell ) // sonst ist auch Count = 0
{
- String aTabName;
+ rtl::OUString aTabName;
ScDocument* pDoc = pDocShell->GetDocument();
rtl::OUString* pAry = aSeq.getArray();
for (SCTAB i=0; i<nCount; i++)
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index ba27fc889450..f4605cc85d9c 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -126,16 +126,16 @@ public:
maCachedObject = maWorkbook;
else
{
- String sCodeName;
+ rtl::OUString sCodeName;
SCTAB nCount = pDoc->GetTableCount();
for( SCTAB i = 0; i < nCount; i++ )
{
pDoc->GetCodeName( i, sCodeName );
// aName ( sName ) is generated from the stream name which can be different ( case-wise )
// from the code name
- if( sCodeName.EqualsIgnoreCaseAscii( sName ) )
+ if( String(sCodeName).EqualsIgnoreCaseAscii( sName ) )
{
- String sSheetName;
+ rtl::OUString sSheetName;
if( pDoc->GetName( i, sSheetName ) )
{
uno::Reference< frame::XModel > xModel( mpDocShell->GetModel() );
@@ -175,7 +175,7 @@ public:
SCTAB nCount = pDoc->GetTableCount();
uno::Sequence< rtl::OUString > aNames( nCount + 1 );
SCTAB index = 0;
- String sCodeName;
+ rtl::OUString sCodeName;
for( ; index < nCount; ++index )
{
pDoc->GetCodeName( index, sCodeName );
@@ -222,7 +222,7 @@ public:
bMatched = ( xControl == xIf );
if ( bMatched )
{
- String sName;
+ rtl::OUString sName;
mrDocShell.GetDocument()->GetCodeName( static_cast<SCTAB>( index ), sName );
sCodeName = sName;
}
@@ -253,7 +253,7 @@ public:
uno::Reference<container::XIndexAccess> xFormControls(xFormIndex->getByIndex(0), uno::UNO_QUERY_THROW);
if (xFormControls == xContainer)
{
- String aName;
+ rtl::OUString aName;
if (mrDocShell.GetDocument()->GetCodeName(static_cast<SCTAB>(i), aName))
return aName;
}
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index 027cfd90c139..7ee13b2ca1c0 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -505,7 +505,7 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >&
for ( SCTAB index = 0; index < pDoc->GetTableCount(); index++)
{
- String aName;
+ rtl::OUString aName;
pDoc->GetCodeName( index, aName );
sDocModuleNames.push_back( aName );
}
diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx
index f332248c8db6..2854586923d6 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -807,7 +807,7 @@ OUString ScVbaEventsHelper::implGetDocumentModuleName( const EventHandlerInfo& r
if( bSheetEvent && (nTab < 0) )
throw lang::IllegalArgumentException();
- String aCodeName;
+ rtl::OUString aCodeName;
if( bSheetEvent )
mpDoc->GetCodeName( nTab, aCodeName );
else
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 35a1b7a734a2..64f25ea04a0c 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -255,7 +255,7 @@ ScVbaWorksheet::createSheetCopyInNewDoc(rtl::OUString aCurrSheetName)
uno::Reference< sheet::XSpreadsheet > xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW);
ScDocShell* pShell = excel::getDocShell( xModel );
- String aCodeName;
+ rtl::OUString aCodeName;
pShell->GetDocument()->GetCodeName( 0, aCodeName );
return uno::Reference< excel::XWorksheet >( getUnoDocModule( aCodeName, pShell ), uno::UNO_QUERY_THROW );
}
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 054dcbfa5fc9..b2fe2800e752 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -740,7 +740,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
if ( !pDoc->IsScenario(nTab) )
{
- String aStr;
+ rtl::OUString aStr;
sal_uInt16 nFlags;
SCTAB nScTab = nTab + 1;
String aProtect;
@@ -760,7 +760,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
}
else
{
- String aComment;
+ rtl::OUString aComment;
sal_uInt16 nDummyFlags;
pDoc->GetScenarioData( nTab, aComment, aDummyCol, nDummyFlags );
OSL_ENSURE( aList.empty(), "List not empty!" );
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 72cf8c94908f..b7d6750b3314 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -430,12 +430,14 @@ void ScCellShell::Execute( SfxRequest& rReq )
{
SCTAB i=1;
String aBaseName;
- String aName;
- String aComment;
+ rtl::OUString aName;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
- pDoc->GetName( nTab, aBaseName );
+ rtl::OUString aTmp;
+ pDoc->GetName(nTab, aTmp);
+ aBaseName = aTmp;
aBaseName += '_';
aBaseName += ScGlobal::GetRscString(STR_SCENARIO);
aBaseName += '_';
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 9158fb828633..0788988ce97c 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -613,11 +613,11 @@ bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest,
SCTAB nSrcTab = GetViewData()->GetTabNo();
String aName( ScGlobal::GetRscString(STR_PIVOT_TABLE) );
- String aStr;
+ rtl::OUString aStr;
pDoc->GetName( nSrcTab, aStr );
aName += '_';
- aName += aStr;
+ aName += String(aStr);
aName += '_';
SCTAB nNewTab = nSrcTab+1;
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 0d637b3d726f..bc05d5fe242f 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -811,8 +811,8 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
// Listbox fuellen
long nMaxText = 0;
- String aCurrent;
- String aTabName;
+ rtl::OUString aCurrent;
+ rtl::OUString aTabName;
SCTAB nTabCount = pDoc->GetTableCount();
SCTAB nEntryCount = 0;
for (SCTAB i=nTab+1; i<nTabCount && pDoc->IsScenario(i); i++)
@@ -859,9 +859,9 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
pFilterBox->GrabFocus();
sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
- if (aCurrent.Len())
+ if (!aCurrent.isEmpty())
{
- nPos = pFilterBox->GetEntryPos( aCurrent );
+ nPos = pFilterBox->GetEntryPos(String(aCurrent));
}
if (LISTBOX_ENTRY_NOTFOUND == nPos && pFilterBox->GetEntryCount() > 0 )
nPos = 0;
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index ea4fe2a0ac74..03cd63f388f1 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -237,18 +237,18 @@ void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, ScSplitP
sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 );
- String aCurrent;
+ rtl::OUString aCurrent;
Color aColor( COL_LIGHTGRAY );
for (SCTAB nAct=nTab+1; nAct<nTabCount && pDoc->IsScenario(nAct); nAct++)
if ( pDoc->IsActiveScenario(nAct) && pDoc->HasScenarioRange(nAct,aRange) )
{
- String aDummyComment;
+ rtl::OUString aDummyComment;
sal_uInt16 nDummyFlags;
pDoc->GetName( nAct, aCurrent );
pDoc->GetScenarioData( nAct, aDummyComment, aColor, nDummyFlags );
}
- if (!aCurrent.Len())
+ if (aCurrent.isEmpty())
aCurrent = ScGlobal::GetRscString( STR_EMPTYDATA );
//! eigener Text "(keins)" statt "(leer)" ???
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index dded26f23572..0c0a493c9ec0 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -834,7 +834,9 @@ void ScPreviewShell::FillFieldData( ScHeaderFieldData& rData )
{
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nTab = pPreview->GetTab();
- pDoc->GetName( nTab, rData.aTabName );
+ rtl::OUString aTmp;
+ pDoc->GetName(nTab, aTmp);
+ rData.aTabName = aTmp;
rData.aTitle = pDocShell->GetTitle();
const INetURLObject& rURLObj = pDocShell->GetMedium()->GetURLObject();
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 15c43b3c1834..a1ee4dfb457f 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1715,7 +1715,9 @@ sal_Bool ScPrintFunc::IsLeft( long nPageNo ) // linke Fussnoten ?
void ScPrintFunc::MakeTableString()
{
- pDoc->GetName( nPrintTab, aFieldData.aTabName );
+ rtl::OUString aTmp;
+ pDoc->GetName(nPrintTab, aTmp);
+ aFieldData.aTabName = aTmp;
}
void ScPrintFunc::MakeEditEngine()
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index cac5bb9dfac4..a42190e0ee1e 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -67,7 +67,7 @@ ScTabControl::ScTabControl( Window* pParent, ScViewData* pData ) :
{
ScDocument* pDoc = pViewData->GetDocument();
- String aString;
+ rtl::OUString aString;
Color aTabBgColor;
SCTAB nCount = pDoc->GetTableCount();
for (SCTAB i=0; i<nCount; i++)
@@ -315,7 +315,7 @@ void ScTabControl::UpdateStatus()
SCTAB nCount = pDoc->GetTableCount();
SCTAB i;
- String aString;
+ rtl::OUString aString;
SCTAB nMaxCnt = Max( nCount, static_cast<SCTAB>(GetMaxId()) );
Color aTabBgColor;
@@ -329,10 +329,10 @@ void ScTabControl::UpdateStatus()
}
else
{
- aString.Erase();
+ aString = rtl::OUString();
}
- if ( (GetPageText(static_cast<sal_uInt16>(i)+1) != aString) || (GetTabBgColor(static_cast<sal_uInt16>(i)+1) != aTabBgColor) )
+ if ( !aString.equals(GetPageText(static_cast<sal_uInt16>(i)+1)) || (GetTabBgColor(static_cast<sal_uInt16>(i)+1) != aTabBgColor) )
bModified = sal_True;
}
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 43775adb70ef..06265d49e6a4 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -826,7 +826,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
GetStaticInterface()->GetSlot(SID_SELECT_TABLES)->GetCommand(), HID_SELECTTABLES );
// fill all table names with selection state
- String aTabName;
+ rtl::OUString aTabName;
for( nTab = 0; nTab < nTabCount; ++nTab )
{
rDoc.GetName( nTab, aTabName );
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index f26874465932..0ade3a71d492 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1807,7 +1807,9 @@ void ScTabViewShell::FillFieldData( ScHeaderFieldData& rData )
ScDocShell* pDocShell = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nTab = GetViewData()->GetTabNo();
- pDoc->GetName( nTab, rData.aTabName );
+ rtl::OUString aTmp;
+ pDoc->GetName(nTab, aTmp);
+ rData.aTabName = aTmp;
rData.aTitle = pDocShell->GetTitle();
const INetURLObject& rURLObj = pDocShell->GetMedium()->GetURLObject();
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 6b1ab39d1038..7e4a932073e4 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -87,7 +87,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
case FID_TABLE_VISIBLE:
{
- String aName;
+ rtl::OUString aName;
pDoc->GetName( nCurrentTab, aName );
sal_Bool bVisible=sal_True;
@@ -132,7 +132,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
break;
- String aName;
+ rtl::OUString aName;
if( pReqArgs != NULL )
{
const SfxPoolItem* pItem;
@@ -140,7 +140,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
aName = ((const SfxStringItem*)pItem)->GetValue();
}
- if (!aName.Len())
+ if (aName.isEmpty())
{
pDoc->GetName( nCurrentTab, aName ); // aktuelle Tabelle
rReq.AppendItem( SfxStringItem( FID_TABLE_HIDE, aName ) );
@@ -179,7 +179,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
AbstractScShowTabDlg* pDlg = pFact->CreateScShowTabDlg( GetDialogParent(), RID_SCDLG_SHOW_TAB);
OSL_ENSURE(pDlg, "Dialog create fail!");
- String aTabName;
+ rtl::OUString aTabName;
sal_Bool bFirst = sal_True;
for ( SCTAB i=0; i != nTabCount; i++ )
{
@@ -397,7 +397,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
sal_uInt16 nRet = RET_OK;
sal_Bool bDone = false;
String aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) );
- String aName;
+ rtl::OUString aName;
String aDlgTitle;
const sal_Char* pHelpId = 0;
@@ -539,7 +539,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
}
else
{
- String aDefaultName;
+ rtl::OUString aDefaultName;
pDoc->GetName( pViewData->GetTabNo(), aDefaultName );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
@@ -926,7 +926,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
case FID_TAB_RENAME:
{
- String aTabName;
+ rtl::OUString aTabName;
pDoc->GetName( nTab, aTabName );
rSet.Put( SfxStringItem( nWhich, aTabName ));
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 81b6b3a65b8a..37830ee3bf84 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2632,9 +2632,8 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe
{
uno::Sequence <beans::PropertyValue> aTableViewSettings;
maTabData[nTab]->WriteUserDataSequence(aTableViewSettings, *this, nTab);
- String sTabName;
+ rtl::OUString sTabName;
GetDocument()->GetName( nTab, sTabName );
- rtl::OUString sOUName(sTabName);
uno::Any aAny;
aAny <<= aTableViewSettings;
try
@@ -2657,11 +2656,10 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe
}
}
- String sName;
+ rtl::OUString sName;
GetDocument()->GetName( nTabNo, sName );
- rtl::OUString sOUName(sName);
pSettings[SC_ACTIVE_TABLE].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_ACTIVETABLE));
- pSettings[SC_ACTIVE_TABLE].Value <<= sOUName;
+ pSettings[SC_ACTIVE_TABLE].Value <<= sName;
pSettings[SC_HORIZONTAL_SCROLL_BAR_WIDTH].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_HORIZONTALSCROLLBARWIDTH));
pSettings[SC_HORIZONTAL_SCROLL_BAR_WIDTH].Value <<= sal_Int32(pView->GetTabBarWidth());
sal_Int32 nZoomValue ((pThisTab->aZoomY.GetNumerator() * 100) / pThisTab->aZoomY.GetDenominator());
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index d23aebe1b18d..d38131ea9e9f 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -109,7 +109,7 @@ using ::std::vector;
using ::std::auto_ptr;
// helper func defined in docfunc.cxx
-void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName );
+void VBA_DeleteModule( ScDocShell& rDocSh, const rtl::OUString& sModuleName );
// STATIC DATA ---------------------------------------------------------------
@@ -2081,7 +2081,7 @@ bool ScViewFunc::DeleteTables( const SCTAB nTab, SCTAB nSheets )
{
for (SCTAB aTab = 0; aTab < nSheets; ++aTab)
{
- String sCodeName;
+ rtl::OUString sCodeName;
bool bHasCodeName = pDoc->GetCodeName( nTab + aTab, sCodeName );
if ( bHasCodeName )
VBA_DeleteModule( *pDocSh, sCodeName );
@@ -2128,7 +2128,7 @@ sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
SCTAB nCount = pDoc->GetTableCount();
- String aOldName;
+ rtl::OUString aOldName;
for(unsigned int i=0; i<TheTabs.size(); ++i)
{
SCTAB nTab = TheTabs[i];
@@ -2151,7 +2151,7 @@ sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord
if ( pDoc->IsScenario(nTab) )
{
pUndoDoc->SetScenario( nTab, sal_True );
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nScenFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags );
@@ -2181,7 +2181,7 @@ sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord
for(int i=TheTabs.size()-1; i>=0; --i)
{
- String sCodeName;
+ rtl::OUString sCodeName;
sal_Bool bHasCodeName = pDoc->GetCodeName( TheTabs[i], sCodeName );
if (pDoc->DeleteTab( TheTabs[i], pUndoDoc ))
{
@@ -2307,12 +2307,12 @@ void ScViewFunc::InsertTableLink( const String& rFile,
nTab = 0;
else
{
- String aTemp;
+ rtl::OUString aTemp;
SCTAB nCount = pSrcDoc->GetTableCount();
for (SCTAB i=0; i<nCount; i++)
{
pSrcDoc->GetName( i, aTemp );
- if ( aTemp == rTabName )
+ if ( aTemp.equals(rTabName) )
nTab = i;
}
}
@@ -2350,7 +2350,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
SCTAB i;
for( i=0; i<nCount; i++ )
{ // insert sheets first and update all references
- String aName;
+ rtl::OUString aName;
pSrcDoc->GetName( pSrcTabs[i], aName );
pDoc->CreateValidTabName( aName );
if ( !pDoc->InsertTab( nTab+i, aName ) )
@@ -2399,7 +2399,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
sal_Bool bWasThere = pDoc->HasLink( aFileName, aFilterName, aOptions );
sal_uLong nRefresh = 0;
- String aTabStr;
+ rtl::OUString aTabStr;
for (i=0; i<nInsCount; i++)
{
pSrcDoc->GetName( pSrcTabs[i], aTabStr );
@@ -2530,7 +2530,7 @@ void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCop
{
if(rMark.GetTableSelect(i))
{
- String aTabName;
+ rtl::OUString aTabName;
pDoc->GetName( i, aTabName);
TheTabs.push_back(i);
for(SCTAB j=i+1;j<nTabCount;j++)
@@ -2560,7 +2560,7 @@ void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCop
SCTAB nDestTab1=nDestTab;
for( sal_uInt16 j=0; j<TheTabs.size(); ++j, ++nDestTab1 )
{ // insert sheets first and update all references
- String aName;
+ rtl::OUString aName;
if (bRename)
aName = *pNewTabName;
else
@@ -2582,7 +2582,7 @@ void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCop
nDestTab1++;
}
}
- String sName;
+ rtl::OUString sName;
if (!bNewDoc && bUndo)
{
pDestDoc->GetName(nDestTab, sName);
@@ -2667,13 +2667,13 @@ void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCop
pSrcTabs->reserve(nTabCount);
pDestTabs->reserve(nTabCount);
pTabNames->reserve(nTabCount);
- String aDestName;
+ rtl::OUString aDestName;
for(SCTAB i=0;i<nTabCount;i++)
{
if(rMark.GetTableSelect(i))
{
- String aTabName;
+ rtl::OUString aTabName;
pDoc->GetName( i, aTabName);
pTabNames->push_back(aTabName);
@@ -2712,7 +2712,7 @@ void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCop
if(bCopy && pDoc->IsScenario(nMovTab))
{
- String aComment;
+ rtl::OUString aComment;
Color aColor;
sal_uInt16 nFlags;
@@ -2799,12 +2799,12 @@ void ScViewFunc::ShowTable( const String& rName )
sal_Bool bUndo(pDoc->IsUndoEnabled());
sal_Bool bFound = false;
SCTAB nPos = 0;
- String aTabName;
+ rtl::OUString aTabName;
SCTAB nCount = pDoc->GetTableCount();
for (SCTAB i=0; i<nCount; i++)
{
pDoc->GetName( i, aTabName );
- if ( aTabName == rName )
+ if ( aTabName.equals(rName) )
{
nPos = i;
bFound = sal_True;