summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-04 16:14:14 +0200
committerNoel Grandin <noel@peralex.com>2013-10-08 10:03:09 +0200
commite12ae54991b70027bbff21bb948c4923898d32eb (patch)
treeacf87f03f7fb89872a86abde2e623d92fd844cb5
parent6f93499b881416140c57bc86acdac0ae6e01c314 (diff)
convert sc/source/ui/view/*.cxx from String to OUString
Change-Id: I906217b453d3a0ec2ec8deaa5dce739f0cacfd01
-rw-r--r--sc/source/core/tool/address.cxx30
-rw-r--r--sc/source/ui/inc/viewfunc.hxx2
-rw-r--r--sc/source/ui/view/cellsh.cxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx144
-rw-r--r--sc/source/ui/view/cellsh2.cxx16
-rw-r--r--sc/source/ui/view/cellsh3.cxx18
-rw-r--r--sc/source/ui/view/colrowba.cxx8
-rw-r--r--sc/source/ui/view/dbfunc.cxx2
-rw-r--r--sc/source/ui/view/dbfunc3.cxx22
-rw-r--r--sc/source/ui/view/dbfunc4.cxx2
-rw-r--r--sc/source/ui/view/editsh.cxx24
-rw-r--r--sc/source/ui/view/formatsh.cxx64
-rw-r--r--sc/source/ui/view/gridwin.cxx22
-rw-r--r--sc/source/ui/view/gridwin2.cxx2
-rw-r--r--sc/source/ui/view/gridwin4.cxx4
-rw-r--r--sc/source/ui/view/gridwin5.cxx32
-rw-r--r--sc/source/ui/view/hdrcont.cxx6
-rw-r--r--sc/source/ui/view/hintwin.cxx4
-rw-r--r--sc/source/ui/view/notemark.cxx2
-rw-r--r--sc/source/ui/view/output.cxx6
-rw-r--r--sc/source/ui/view/output2.cxx42
-rw-r--r--sc/source/ui/view/preview.cxx4
-rw-r--r--sc/source/ui/view/prevwsh.cxx4
-rw-r--r--sc/source/ui/view/printfun.cxx8
-rw-r--r--sc/source/ui/view/spelleng.cxx2
-rw-r--r--sc/source/ui/view/tabcont.cxx2
-rw-r--r--sc/source/ui/view/tabview.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx26
-rw-r--r--sc/source/ui/view/tabvwsh9.cxx2
-rw-r--r--sc/source/ui/view/tabvwsha.cxx14
-rw-r--r--sc/source/ui/view/tabvwshf.cxx28
-rw-r--r--sc/source/ui/view/tabvwshh.cxx4
-rw-r--r--sc/source/ui/view/viewfun2.cxx24
-rw-r--r--sc/source/ui/view/viewfun3.cxx12
-rw-r--r--sc/source/ui/view/viewfun4.cxx14
-rw-r--r--sc/source/ui/view/viewfun5.cxx12
-rw-r--r--sc/source/ui/view/viewfun6.cxx2
-rw-r--r--sc/source/ui/view/viewfun7.cxx6
-rw-r--r--sc/source/ui/view/viewfunc.cxx47
40 files changed, 333 insertions, 338 deletions
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 7cde74d07238..cd24430155b6 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -142,12 +142,12 @@ static bool lcl_ScRange_External_TabSpan(
ScRange & rRange,
sal_uInt16 & rFlags,
ScAddress::ExternalInfo* pExtInfo,
- const String & rExternDocName,
- const String & rStartTabName,
- const String & rEndTabName,
+ const OUString & rExternDocName,
+ const OUString & rStartTabName,
+ const OUString & rEndTabName,
ScDocument* pDoc )
{
- if (!rExternDocName.Len())
+ if (rExternDocName.isEmpty())
return !pExtInfo || !pExtInfo->mbExternal;
ScExternalRefManager* pRefMgr = pDoc->GetExternalRefManager();
@@ -155,14 +155,14 @@ static bool lcl_ScRange_External_TabSpan(
{
// This is an internal document. Get the sheet positions from the
// ScDocument instance.
- if (rStartTabName.Len())
+ if (!rStartTabName.isEmpty())
{
SCTAB nTab;
if (pDoc->GetTable(rStartTabName, nTab))
rRange.aStart.SetTab(nTab);
}
- if (rEndTabName.Len())
+ if (!rEndTabName.isEmpty())
{
SCTAB nTab;
if (pDoc->GetTable(rEndTabName, nTab))
@@ -188,7 +188,7 @@ static bool lcl_ScRange_External_TabSpan(
}
}
- if (!rEndTabName.Len() || rStartTabName == rEndTabName)
+ if (rEndTabName.isEmpty() || rStartTabName == rEndTabName)
{
rRange.aEnd.SetTab( rRange.aStart.Tab());
return true;
@@ -1381,7 +1381,7 @@ void ScRange::ExtendTo( const ScRange& rRange )
}
static sal_uInt16
-lcl_ScRange_Parse_OOo( ScRange &aRange, const String& r, ScDocument* pDoc, ScAddress::ExternalInfo* pExtInfo = NULL )
+lcl_ScRange_Parse_OOo( ScRange &aRange, const OUString& r, ScDocument* pDoc, ScAddress::ExternalInfo* pExtInfo = NULL )
{
sal_uInt16 nRes1 = 0, nRes2 = 0;
xub_StrLen nPos = ScGlobal::FindUnquoted( r, ':');
@@ -1653,12 +1653,12 @@ lcl_r1c1_append_r ( OUString &r, int nRow, bool bIsAbs,
}
}
-static String
+static OUString
getFileNameFromDoc( const ScDocument* pDoc )
{
// TODO : er points at ScGlobal::GetAbsDocName()
// as a better template. Look into it
- String sFileName;
+ OUString sFileName;
SfxObjectShell* pShell;
if( NULL != pDoc &&
@@ -2024,17 +2024,17 @@ void ScColToAlpha( OUStringBuffer& rBuf, SCCOL nCol )
}
else
{
- String aStr;
+ OUString aStr;
while (nCol >= 26)
{
SCCOL nC = nCol % 26;
- aStr += static_cast<sal_Unicode>( 'A' +
- static_cast<sal_uInt16>(nC));
+ aStr += OUString( static_cast<sal_Unicode>( 'A' +
+ static_cast<sal_uInt16>(nC)));
nCol = sal::static_int_cast<SCCOL>( nCol - nC );
nCol = nCol / 26 - 1;
}
- aStr += static_cast<sal_Unicode>( 'A' +
- static_cast<sal_uInt16>(nCol));
+ aStr += OUString(static_cast<sal_Unicode>( 'A' +
+ static_cast<sal_uInt16>(nCol)));
rBuf.append(comphelper::string::reverseString(aStr));
}
}
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 86d829cd63fc..c48834bcedfd 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -273,7 +273,7 @@ public:
const OUString& rFilter, const OUString& rOptions,
const OUString& rSource, sal_uLong nRefresh );
- void ShowTable( const std::vector<String>& rNames );
+ void ShowTable( const std::vector<OUString>& rNames );
void HideTable( const ScMarkData& rMark );
void MakeScenario( const OUString& rName, const OUString& rComment,
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 6d38103cd63b..6fe7c0e2ffff 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -601,7 +601,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
case SID_RANGE_NOTETEXT:
{
// always take cursor position, do not use top-left cell of selection
- String aNoteText;
+ OUString aNoteText;
if ( const ScPostIt* pNote = pDoc->GetNotes(nTab)->findByAddress(nPosX, nPosY) )
aNoteText = pNote->GetText();
rSet.Put( SfxStringItem( nWhich, aNoteText ) );
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 408b37df1843..32fb834cbf6f 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -172,13 +172,13 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pReqArgs )
{
const SfxPoolItem* pItem;
- String aFlags;
+ OUString aFlags;
if( pReqArgs->HasItem( FID_INS_CELL, &pItem ) )
aFlags = ((const SfxStringItem*)pItem)->GetValue();
- if( aFlags.Len() )
+ if( !aFlags.isEmpty() )
{
- switch( aFlags.GetChar(0) )
+ switch( aFlags[0] )
{
case 'V': eCmd = INS_CELLSDOWN ;break;
case '>': eCmd = INS_CELLSRIGHT ;break;
@@ -215,14 +215,14 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( ! rReq.IsAPI() )
{
- String aParam;
+ OUString aParam;
switch( eCmd )
{
- case INS_CELLSDOWN: aParam='V'; break;
- case INS_CELLSRIGHT: aParam='>'; break;
- case INS_INSROWS: aParam='R'; break;
- case INS_INSCOLS: aParam='C'; break;
+ case INS_CELLSDOWN: aParam = "V"; break;
+ case INS_CELLSRIGHT: aParam = ">"; break;
+ case INS_INSROWS: aParam = "R"; break;
+ case INS_INSCOLS: aParam = "C"; break;
default:
{
// added to avoid warnings
@@ -242,13 +242,13 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pReqArgs )
{
const SfxPoolItem* pItem;
- String aFlags;
+ OUString aFlags;
if( pReqArgs->HasItem( FID_DELETE_CELL, &pItem ) )
aFlags = ((const SfxStringItem*)pItem)->GetValue();
- if( aFlags.Len() )
+ if( !aFlags.isEmpty() )
{
- switch( aFlags.GetChar(0) )
+ switch( aFlags[0] )
{
case 'U': eCmd = DEL_CELLSUP ;break;
case 'L': eCmd = DEL_CELLSLEFT ;break;
@@ -289,14 +289,14 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( ! rReq.IsAPI() )
{
- String aParam;
+ OUString aParam;
switch( eCmd )
{
- case DEL_CELLSUP: aParam='U'; break;
- case DEL_CELLSLEFT: aParam='L'; break;
- case DEL_DELROWS: aParam='R'; break;
- case DEL_DELCOLS: aParam='C'; break;
+ case DEL_CELLSUP: aParam = "U"; break;
+ case DEL_CELLSLEFT: aParam = "L"; break;
+ case DEL_DELROWS: aParam = "R"; break;
+ case DEL_DELCOLS: aParam = "C"; break;
default:
{
// added to avoid warnings
@@ -381,21 +381,21 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( ! rReq.IsAPI() )
{
- String aFlags;
+ OUString aFlags;
if( nFlags == IDF_ALL )
{
- aFlags += 'A';
+ aFlags += "A";
}
else
{
- if( nFlags & IDF_STRING ) aFlags += 'S';
- if( nFlags & IDF_VALUE ) aFlags += 'V';
- if( nFlags & IDF_DATETIME ) aFlags += 'D';
- if( nFlags & IDF_FORMULA ) aFlags += 'F';
- if( nFlags & IDF_NOTE ) aFlags += 'N';
- if( nFlags & IDF_ATTRIB ) aFlags += 'T';
- if( nFlags & IDF_OBJECTS ) aFlags += 'O';
+ if( nFlags & IDF_STRING ) aFlags += "S";
+ if( nFlags & IDF_VALUE ) aFlags += "V";
+ if( nFlags & IDF_DATETIME ) aFlags += "D";
+ if( nFlags & IDF_FORMULA ) aFlags += "F";
+ if( nFlags & IDF_NOTE ) aFlags += "N";
+ if( nFlags & IDF_ATTRIB ) aFlags += "T";
+ if( nFlags & IDF_OBJECTS ) aFlags += "O";
}
rReq.AppendItem( SfxStringItem( SID_DELETE, aFlags ) );
@@ -492,20 +492,20 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( ! rReq.IsAPI() )
{
- String aFlags;
+ OUString aFlags;
if( nFlags == IDF_ALL )
{
- aFlags += 'A';
+ aFlags += "A";
}
else
{
- if( nFlags & IDF_STRING ) aFlags += 'S';
- if( nFlags & IDF_VALUE ) aFlags += 'V';
- if( nFlags & IDF_DATETIME ) aFlags += 'D';
- if( nFlags & IDF_FORMULA ) aFlags += 'F';
- if( nFlags & IDF_NOTE ) aFlags += 'N';
- if( nFlags & IDF_ATTRIB ) aFlags += 'T';
+ if( nFlags & IDF_STRING ) aFlags += "S";
+ if( nFlags & IDF_VALUE ) aFlags += "V";
+ if( nFlags & IDF_DATETIME ) aFlags += "D";
+ if( nFlags & IDF_FORMULA ) aFlags += "F";
+ if( nFlags & IDF_NOTE ) aFlags += "N";
+ if( nFlags & IDF_ATTRIB ) aFlags += "T";
}
rReq.AppendItem( SfxStringItem( FID_FILL_TAB, aFlags ) );
@@ -553,8 +553,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( pReqArgs )
{
const SfxPoolItem* pItem;
- String aFillDir, aFillCmd, aFillDateCmd;
- String aFillStep, aFillStart, aFillMax;
+ OUString aFillDir, aFillCmd, aFillDateCmd;
+ OUString aFillStep, aFillStart, aFillMax;
sal_uInt32 nKey;
double fTmpVal;
@@ -573,8 +573,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( pReqArgs->HasItem( FN_PARAM_5, &pItem ) )
aFillMax = ((const SfxStringItem*)pItem)->GetValue();
- if( aFillDir.Len() )
- switch( aFillDir.GetChar(0) )
+ if( !aFillDir.isEmpty() )
+ switch( aFillDir[0] )
{
case 'B': case 'b': eFillDir=FILL_TO_BOTTOM; break;
case 'R': case 'r': eFillDir=FILL_TO_RIGHT; break;
@@ -582,8 +582,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case 'L': case 'l': eFillDir=FILL_TO_LEFT; break;
}
- if( aFillCmd.Len() )
- switch( aFillCmd.GetChar(0) )
+ if( !aFillCmd.isEmpty() )
+ switch( aFillCmd[0] )
{
case 'S': case 's': eFillCmd=FILL_SIMPLE; break;
case 'L': case 'l': eFillCmd=FILL_LINEAR; break;
@@ -592,8 +592,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case 'A': case 'a': eFillCmd=FILL_AUTO; break;
}
- if( aFillDateCmd.Len() )
- switch( aFillDateCmd.GetChar(0) )
+ if( !aFillDateCmd.isEmpty() )
+ switch( aFillDateCmd[0] )
{
case 'D': case 'd': eFillDateCmd=FILL_DAY; break;
case 'W': case 'w': eFillDateCmd=FILL_WEEKDAY; break;
@@ -722,8 +722,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if(eFillCmd==FILL_AUTO)
{
- String aStr=pDlg->GetStartStr();
- if(aStr.Len()>0)
+ OUString aStr = pDlg->GetStartStr();
+ if(!aStr.isEmpty())
pTabViewShell->EnterData( nStartCol, nStartRow, nStartTab, aStr );
}
fStartVal = pDlg->GetStart();
@@ -813,7 +813,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( pReqArgs->HasItem( FID_FILL_AUTO, &pItem ) )
{
ScAddress aScAddress;
- String aArg = ((const SfxStringItem*)pItem)->GetValue();
+ OUString aArg = ((const SfxStringItem*)pItem)->GetValue();
if( aScAddress.Parse( aArg, pDoc, pDoc->GetAddressConvention() ) & SCA_VALID )
{
@@ -1401,20 +1401,20 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( !pReqArgs )
{
- String aFlags;
+ OUString aFlags;
if( nFlags == IDF_ALL )
{
- aFlags += 'A';
+ aFlags += "A";
}
else
{
- if( nFlags & IDF_STRING ) aFlags += 'S';
- if( nFlags & IDF_VALUE ) aFlags += 'V';
- if( nFlags & IDF_DATETIME ) aFlags += 'D';
- if( nFlags & IDF_FORMULA ) aFlags += 'F';
- if( nFlags & IDF_NOTE ) aFlags += 'N';
- if( nFlags & IDF_ATTRIB ) aFlags += 'T';
+ if( nFlags & IDF_STRING ) aFlags += "S";
+ if( nFlags & IDF_VALUE ) aFlags += "V";
+ if( nFlags & IDF_DATETIME ) aFlags += "D";
+ if( nFlags & IDF_FORMULA ) aFlags += "F";
+ if( nFlags & IDF_NOTE ) aFlags += "N";
+ if( nFlags & IDF_ATTRIB ) aFlags += "T";
}
rReq.AppendItem( SfxStringItem( FID_INS_CELL_CONTENTS, aFlags ) );
@@ -1512,10 +1512,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
for (sal_uInt16 i=0; i<nFormatCount; i++)
{
sal_uLong nFormatId = aFormats.GetClipbrdFormatId( i );
- String aName = aFormats.GetClipbrdFormatName( i );
+ OUString aName = aFormats.GetClipbrdFormatName( i );
// special case for paste dialog: '*' is replaced by object type
if ( nFormatId == SOT_FORMATSTR_ID_EMBED_SOURCE )
- aName.Assign((sal_Unicode)'*');
+ aName = "*";
pDlg->Insert( nFormatId, aName );
}
@@ -1798,7 +1798,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pReqArgs )
{
const SfxPoolItem* pItem;
- String aName, aSymbol, aAttrib;
+ OUString aName, aSymbol, aAttrib;
if( pReqArgs->HasItem( FID_DEFINE_NAME, &pItem ) )
aName = ((const SfxStringItem*)pItem)->GetValue();
@@ -1809,7 +1809,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( pReqArgs->HasItem( FN_PARAM_2, &pItem ) )
aAttrib = ((const SfxStringItem*)pItem)->GetValue();
- if ( aName.Len() && aSymbol.Len() )
+ if ( !aName.isEmpty() && !aSymbol.isEmpty() )
{
if (pTabViewShell->InsertName( aName, aSymbol, aAttrib ))
rReq.Done();
@@ -2162,7 +2162,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScRangeList aRanges = *aRangesRef;
size_t nRangeSize = aRanges.size();
- String aUndo = ScGlobal::GetRscString( bShowNote ? STR_UNDO_SHOWNOTE : STR_UNDO_HIDENOTE );
+ OUString aUndo = ScGlobal::GetRscString( bShowNote ? STR_UNDO_SHOWNOTE : STR_UNDO_HIDENOTE );
pData->GetDocShell()->GetUndoManager()->EnterListAction( aUndo, aUndo );
for ( size_t i = 0; i < nRangeSize; ++i )
@@ -2232,7 +2232,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_CHARMAP:
if( pReqArgs != NULL )
{
- String aChars, aFontName;
+ OUString aChars, aFontName;
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if ( pArgs )
@@ -2249,12 +2249,12 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
aFontName = pFontItem->GetValue();
}
- if ( aChars.Len() )
+ if ( !aChars.isEmpty() )
{
Font aFont;
pTabViewShell->GetSelectionPattern()->GetFont( aFont, SC_AUTOCOL_BLACK, NULL, NULL, NULL,
pTabViewShell->GetSelectionScriptType() );
- if ( aFontName.Len() )
+ if ( !aFontName.isEmpty() )
aFont = Font( aFontName, Size(1,1) );
pTabViewShell->InsertSpecialChar( aChars, aFont );
if( ! rReq.IsAPI() )
@@ -2328,9 +2328,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( pReqArgs->HasItem( SID_HYPERLINK_SETLINK, &pItem ) )
{
const SvxHyperlinkItem* pHyper = (const SvxHyperlinkItem*) pItem;
- const String& rName = pHyper->GetName();
- const String& rURL = pHyper->GetURL();
- const String& rTarget = pHyper->GetTargetFrame();
+ const OUString& rName = pHyper->GetName();
+ const OUString& rURL = pHyper->GetURL();
+ const OUString& rTarget = pHyper->GetTargetFrame();
sal_uInt16 nType = (sal_uInt16) pHyper->GetInsertMode();
pTabViewShell->InsertURL( rName, rURL, rTarget, nType );
@@ -2369,10 +2369,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_EXTERNAL_SOURCE:
{
- String aFile;
- String aFilter;
- String aOptions;
- String aSource;
+ OUString aFile;
+ OUString aFilter;
+ OUString aOptions;
+ OUString aSource;
sal_uLong nRefresh=0;
SFX_REQUEST_ARG( rReq, pFile, SfxStringItem, SID_FILE_NAME, false );
@@ -2766,7 +2766,7 @@ IMPL_LINK_NOARG(ScCellShell, DialogClosed)
{
OSL_ENSURE( pImpl->m_pLinkedDlg, "ScCellShell::DialogClosed(): invalid request" );
OSL_ENSURE( pImpl->m_pRequest, "ScCellShell::DialogClosed(): invalid request" );
- String sFile, sFilter, sOptions, sSource;
+ OUString sFile, sFilter, sOptions, sSource;
sal_uLong nRefresh = 0;
if ( pImpl->m_pLinkedDlg->GetResult() == RET_OK )
@@ -2776,13 +2776,13 @@ IMPL_LINK_NOARG(ScCellShell, DialogClosed)
sOptions = pImpl->m_pLinkedDlg->GetOptions();
sSource = pImpl->m_pLinkedDlg->GetSource();
nRefresh = pImpl->m_pLinkedDlg->GetRefresh();
- if ( sFile.Len() )
+ if ( !sFile.isEmpty() )
pImpl->m_pRequest->AppendItem( SfxStringItem( SID_FILE_NAME, sFile ) );
- if ( sFilter.Len() )
+ if ( !sFilter.isEmpty() )
pImpl->m_pRequest->AppendItem( SfxStringItem( SID_FILTER_NAME, sFilter ) );
- if ( sOptions.Len() )
+ if ( !sOptions.isEmpty() )
pImpl->m_pRequest->AppendItem( SfxStringItem( SID_FILE_FILTEROPTIONS, sOptions ) );
- if ( sSource.Len() )
+ if ( !sSource.isEmpty() )
pImpl->m_pRequest->AppendItem( SfxStringItem( FN_PARAM_1, sSource ) );
if ( nRefresh )
pImpl->m_pRequest->AppendItem( SfxUInt32Item( FN_PARAM_2, nRefresh ) );
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 9da5ace1bde5..2b6a835daa04 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -721,7 +721,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
- String aName = pDlg->GetSelectEntry();
+ OUString aName = pDlg->GetSelectEntry();
pTabViewShell->GotoDBArea( aName );
rReq.AppendItem( SfxStringItem( SID_SELECT_DB, aName ) );
rReq.Done();
@@ -753,7 +753,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
SfxItemSet aArgSet( GetPool(), (*ScTPValidationValueGetRanges)() );
ScValidationMode eMode = SC_VALID_ANY;
ScConditionMode eOper = SC_COND_EQUAL;
- String aExpr1, aExpr2;
+ OUString aExpr1, aExpr2;
sal_Bool bBlank = sal_True;
sal_Int16 nListType = ValidListType::UNSORTED;
sal_Bool bShowHelp = false;
@@ -825,7 +825,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
eOper = (ScConditionMode) ((const SfxAllEnumItem*)pItem)->GetValue();
if ( pOutSet->GetItemState( FID_VALID_VALUE1, sal_True, &pItem ) == SFX_ITEM_SET )
{
- String aTemp1 = ((const SfxStringItem*)pItem)->GetValue();
+ OUString aTemp1 = ((const SfxStringItem*)pItem)->GetValue();
if (eMode == SC_VALID_DATE || eMode == SC_VALID_TIME)
{
sal_uInt32 nNumIndex = 0;
@@ -842,7 +842,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
}
if ( pOutSet->GetItemState( FID_VALID_VALUE2, sal_True, &pItem ) == SFX_ITEM_SET )
{
- String aTemp2 = ((const SfxStringItem*)pItem)->GetValue();
+ OUString aTemp2 = ((const SfxStringItem*)pItem)->GetValue();
if (eMode == SC_VALID_DATE || eMode == SC_VALID_TIME)
{
sal_uInt32 nNumIndex = 0;
@@ -922,12 +922,12 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
SvMemoryStream aStream;
aStream.SetStreamCharSet( RTL_TEXTENCODING_UNICODE );
ScImportExport::SetNoEndianSwap( aStream );
- aExport.ExportStream( aStream, String(), FORMAT_STRING );
+ aExport.ExportStream( aStream, OUString(), FORMAT_STRING );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE( pFact, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pFact is null!" );
AbstractScImportAsciiDlg *pDlg = pFact->CreateScImportAsciiDlg(
- NULL, String(), &aStream, SC_TEXTTOCOLUMNS);
+ NULL, OUString(), &aStream, SC_TEXTTOCOLUMNS);
OSL_ENSURE( pDlg, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pDlg is null!" );
if ( pDlg->Execute() == RET_OK )
@@ -935,7 +935,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScDocShell* pDocSh = pData->GetDocShell();
OSL_ENSURE( pDocSh, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pDocSh is null!" );
- String aUndo = ScGlobal::GetRscString( STR_UNDO_TEXTTOCOLUMNS );
+ OUString aUndo = ScGlobal::GetRscString( STR_UNDO_TEXTTOCOLUMNS );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
ScImportExport aImport( pDoc, aRange.aStart );
@@ -945,7 +945,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
aImport.SetExtOptions( aOptions );
aImport.SetApi( false );
aStream.Seek( 0 );
- aImport.ImportStream( aStream, String(), FORMAT_STRING );
+ aImport.ImportStream( aStream, OUString(), FORMAT_STRING );
pDocSh->GetUndoManager()->LeaveListAction();
}
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index aa1aeea03884..3720e003810b 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -178,7 +178,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
{
if ( pReqArgs )
{
- String aStr( ((const SfxStringItem&)pReqArgs->
+ OUString aStr( ((const SfxStringItem&)pReqArgs->
Get( SID_ENTER_STRING )).GetValue() );
pTabViewShell->EnterData( GetViewData()->GetCurX(),
@@ -209,7 +209,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
{
if ( pReqArgs )
{
- String aStr = ((const SfxStringItem&)pReqArgs->
+ OUString aStr = ((const SfxStringItem&)pReqArgs->
Get( SID_INSERT_MATRIX )).GetValue();
ScDocument* pDoc = GetViewData()->GetDocument();
pTabViewShell->EnterMatrix( aStr, pDoc->GetGrammar() );
@@ -230,7 +230,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
Get( FID_INPUTLINE_STATUS );
ScAddress aCursorPos = pStatusItem->GetPos();
- String aString = pStatusItem->GetString();
+ OUString aString = pStatusItem->GetString();
const EditTextObject* pData = pStatusItem->GetEditData();
if (pData)
@@ -239,7 +239,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
{
pTabViewShell->EnterBlock( aString, pData );
}
- else if ( aString.Len() > 0 && ( aString.GetChar(0) == '=' || aString.GetChar(0) == '+' || aString.GetChar(0) == '-' ) )
+ else if ( !aString.isEmpty() && ( aString[0] == '=' || aString[0] == '+' || aString[0] == '-' ) )
{
pTabViewShell->EnterData( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), aString, pData );
}
@@ -436,7 +436,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
if ( rMark.IsMultiMarked() )
{
SCTAB i=1;
- String aBaseName;
+ OUString aBaseName;
OUString aName;
OUString aComment;
Color aColor;
@@ -445,9 +445,9 @@ void ScCellShell::Execute( SfxRequest& rReq )
OUString aTmp;
pDoc->GetName(nTab, aTmp);
aBaseName = aTmp;
- aBaseName += '_';
+ aBaseName += "_";
aBaseName += ScGlobal::GetRscString(STR_SCENARIO);
- aBaseName += '_';
+ aBaseName += "_";
// first test, if the prefix is recognised as valid,
// else avoid only doubles
@@ -472,8 +472,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
if ( pReqArgs != NULL )
{
- String aArgName;
- String aArgComment;
+ OUString aArgName;
+ OUString aArgComment;
const SfxPoolItem* pItem;
if ( pReqArgs->GetItemState( SID_SCENARIOS, sal_True, &pItem ) == SFX_ITEM_SET )
aArgName = ((const SfxStringItem*)pItem)->GetValue();
diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx
index c504d3fd2e4f..0c2f35133a32 100644
--- a/sc/source/ui/view/colrowba.cxx
+++ b/sc/source/ui/view/colrowba.cxx
@@ -33,7 +33,7 @@
//==================================================================
-static String lcl_MetricString( long nTwips, const String& rText )
+static OUString lcl_MetricString( long nTwips, const OUString& rText )
{
if ( nTwips <= 0 )
return ScGlobal::GetRscString(STR_TIP_HIDE);
@@ -43,10 +43,10 @@ static String lcl_MetricString( long nTwips, const String& rText )
sal_Int64 nUserVal = MetricField::ConvertValue( nTwips*100, 1, 2, FUNIT_TWIP, eUserMet );
- String aStr = rText;
- aStr += ' ';
+ OUString aStr = rText;
+ aStr += " ";
aStr += ScGlobal::pLocaleData->getNum( nUserVal, 2 );
- aStr += ' ';
+ aStr += " ";
aStr += SdrFormatter::GetUnitStr(eUserMet);
return aStr;
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index 534e853a1349..e5ebd37a6e9c 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -376,7 +376,7 @@ void ScDBFunc::ToggleAutoFilter()
// use a list action for the AutoFilter buttons (ScUndoAutoFilter) and the filter operation
- String aUndo = ScGlobal::GetRscString( STR_UNDO_QUERY );
+ OUString aUndo = ScGlobal::GetRscString( STR_UNDO_QUERY );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
ScRange aRange;
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 622dbcc73ee9..c9111d30f3f8 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -555,7 +555,7 @@ void ScDBFunc::Consolidate( const ScConsolidateParam& rParam, sal_Bool bRecord )
// Pivot
//
-static OUString lcl_MakePivotTabName( const String& rPrefix, SCTAB nNumber )
+static OUString lcl_MakePivotTabName( const OUString& rPrefix, SCTAB nNumber )
{
OUString aName = rPrefix + OUString::number( nNumber );
return aName;
@@ -583,13 +583,13 @@ bool ScDBFunc::MakePivotTable(
{
SCTAB nSrcTab = GetViewData()->GetTabNo();
- String aName( ScGlobal::GetRscString(STR_PIVOT_TABLE) );
+ OUString aName( ScGlobal::GetRscString(STR_PIVOT_TABLE) );
OUString aStr;
pDoc->GetName( nSrcTab, aStr );
- aName += '_';
- aName += String(aStr);
- aName += '_';
+ aName += "_";
+ aName += aStr;
+ aName += "_";
SCTAB nNewTab = nSrcTab+1;
@@ -770,7 +770,7 @@ bool ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
{
bool bIsDataLayout;
OUString aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
- String aBaseDimName( aDimName );
+ OUString aBaseDimName( aDimName );
sal_Bool bInGroupDim = false;
sal_Bool bFoundParts = false;
@@ -1548,13 +1548,13 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const OUString& rString )
break;
const OUString* pLayoutName = pMem->GetLayoutName();
- String aMemberName;
+ OUString aMemberName;
if (pLayoutName)
aMemberName = *pLayoutName;
else
aMemberName = aPosData.MemberName;
- String aNew = lcl_replaceMemberNameInSubtotal(rString, aMemberName);
+ OUString aNew = lcl_replaceMemberNameInSubtotal(rString, aMemberName);
pDim->SetSubtotalName(aNew);
bChange = true;
}
@@ -1602,7 +1602,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const OUString& rString )
}
}
-static void lcl_MoveToEnd( ScDPSaveDimension& rDim, const String& rItemName )
+static void lcl_MoveToEnd( ScDPSaveDimension& rDim, const OUString& rItemName )
{
ScDPSaveMember* pNewMember = NULL;
const ScDPSaveMember* pOldMember = rDim.GetExistingMemberByName( rItemName );
@@ -1822,7 +1822,7 @@ sal_Bool ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest
sal_Int32 nMemberCount = aMemberNames.getLength();
for (sal_Int32 nMemberPos=0; nMemberPos<nMemberCount; ++nMemberPos)
{
- String aMemberStr( aMemberNames[nMemberPos] );
+ OUString aMemberStr( aMemberNames[nMemberPos] );
if ( !bInserted && aMemberNames[nMemberPos] == aDestData.MemberName )
{
@@ -2064,7 +2064,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet
pInsDoc->SetClipArea( ScRange( 0, 0, nNewTab, nEndCol, nEndRow, nNewTab ) );
::svl::IUndoManager* pMgr = GetViewData()->GetDocShell()->GetUndoManager();
- String aUndo = ScGlobal::GetRscString( STR_UNDO_DOOUTLINE );
+ OUString aUndo = ScGlobal::GetRscString( STR_UNDO_DOOUTLINE );
pMgr->EnterListAction( aUndo, aUndo );
OUString aNewTabName;
diff --git a/sc/source/ui/view/dbfunc4.cxx b/sc/source/ui/view/dbfunc4.cxx
index 447d487f2993..8ca6ee7679ae 100644
--- a/sc/source/ui/view/dbfunc4.cxx
+++ b/sc/source/ui/view/dbfunc4.cxx
@@ -51,7 +51,7 @@ sal_uInt16 ScDBFunc::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sa
{
if ( pObject->GetObjIdentifier() == OBJ_OLE2 && pDoc->IsChart( pObject ) )
{
- String aName = ((SdrOle2Obj*)pObject)->GetPersistName();
+ OUString aName = ((SdrOle2Obj*)pObject)->GetPersistName();
bool bHit = true;
if ( !bAllCharts )
{
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 115c823a46d4..96b54df6d447 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -134,7 +134,7 @@ static void lcl_RemoveAttribs( EditView& rEditView )
sal_Bool bOld = pEngine->GetUpdateMode();
pEngine->SetUpdateMode(false);
- String aName = ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS );
+ OUString aName = ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS );
pEngine->GetUndoManager().EnterListAction( aName, aName );
rEditView.RemoveAttribs(true);
@@ -205,11 +205,11 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_THES:
{
- String aReplaceText;
+ OUString aReplaceText;
SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES , false );
if (pItem2)
aReplaceText = pItem2->GetValue();
- if (aReplaceText.Len() > 0)
+ if (!aReplaceText.isEmpty())
ReplaceTextWithSynonym( *pEditView, aReplaceText );
}
break;
@@ -354,7 +354,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
{
- String aFontName(pFontItem->GetValue());
+ OUString aFontName(pFontItem->GetValue());
Font aFont(aFontName, Size(1,1)); // Size nur wg. CTOR
aNewItem = SvxFontItem( aFont.GetFamily(), aFont.GetName(),
aFont.GetStyleName(), aFont.GetPitch(),
@@ -487,7 +487,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
{
if (pEngine->GetParagraphCount() == 1)
{
- String aText = pEngine->GetText();
+ OUString aText = pEngine->GetText();
ESelection aSel = pEditView->GetSelection(); // aktuelle View
ScDocument* pDoc = pViewData->GetDocument();
@@ -495,7 +495,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
aFinder.ToggleRel( aSel.nStartPos, aSel.nEndPos );
if (aFinder.GetFound())
{
- String aNew = aFinder.GetText();
+ OUString aNew = aFinder.GetText();
ESelection aNewSel( 0,aFinder.GetSelStart(), 0,aFinder.GetSelEnd() );
pEngine->SetText( aNew );
pTableView->SetSelection( aNewSel );
@@ -519,9 +519,9 @@ void ScEditShell::Execute( SfxRequest& rReq )
if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, sal_True, &pItem ) == SFX_ITEM_SET )
{
const SvxHyperlinkItem* pHyper = (const SvxHyperlinkItem*) pItem;
- const String& rName = pHyper->GetName();
- const String& rURL = pHyper->GetURL();
- const String& rTarget = pHyper->GetTargetFrame();
+ const OUString& rName = pHyper->GetName();
+ const OUString& rURL = pHyper->GetURL();
+ const OUString& rTarget = pHyper->GetTargetFrame();
SvxLinkInsertMode eMode = pHyper->GetInsertMode();
sal_Bool bDone = false;
@@ -697,8 +697,8 @@ void ScEditShell::GetState( SfxItemSet& rSet )
else if ( pActiveView )
{
// use selected text as name for urls
- String sReturn = pActiveView->GetSelected();
- sReturn.Erase(255);
+ OUString sReturn = pActiveView->GetSelected();
+ sReturn = sReturn.copy(0, 255);
aHLinkItem.SetName(comphelper::string::stripEnd(sReturn, ' '));
}
rSet.Put(aHLinkItem);
@@ -1151,7 +1151,7 @@ OUString ScEditShell::GetSelectionText( bool bWholeWord )
{
EditEngine* pEngine = pEditView->GetEditEngine();
ESelection aSel = pEditView->GetSelection();
- String aStrCurrentDelimiters = pEngine->GetWordDelimiters();
+ OUString aStrCurrentDelimiters = pEngine->GetWordDelimiters();
pEngine->SetWordDelimiters(" .,;\"'");
aStrSelection = pEngine->GetWord( aSel.nEndPara, aSel.nEndPos );
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index a3da82d94857..fe7d8b2e5d82 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -187,21 +187,21 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
if ( pStyleSheet )
rSet.Put( SfxTemplateItem( nSlotId, pStyleSheet->GetName() ) );
else
- rSet.Put( SfxTemplateItem( nSlotId, String() ) );
+ rSet.Put( SfxTemplateItem( nSlotId, OUString() ) );
}
break;
case SID_STYLE_FAMILY4: // page style sheets
{
SCTAB nCurTab = GetViewData()->GetTabNo();
- String aPageStyle = pDoc->GetPageStyle( nCurTab );
+ OUString aPageStyle = pDoc->GetPageStyle( nCurTab );
SfxStyleSheet* pStyleSheet = (SfxStyleSheet*)pStylePool->
Find( aPageStyle, SFX_STYLE_FAMILY_PAGE );
if ( pStyleSheet )
rSet.Put( SfxTemplateItem( nSlotId, aPageStyle ) );
else
- rSet.Put( SfxTemplateItem( nSlotId, String() ) );
+ rSet.Put( SfxTemplateItem( nSlotId, OUString() ) );
}
break;
@@ -265,7 +265,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
ScDocument* pDoc = pDocSh->GetDocument();
ScMarkData& rMark = GetViewData()->GetMarkData();
ScModule* pScMod = SC_MOD();
- String aRefName;
+ OUString aRefName;
bool bUndo = pDoc->IsUndoEnabled();
SfxStyleSheetBasePool* pStylePool = pDoc->GetStyleSheetPool();
@@ -353,15 +353,15 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
eFamily = (SfxStyleFamily)((const SfxUInt16Item*)pFamItem)->GetValue();
else if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, sal_True, &pFamItem ) )
{
- String sFamily = ((const SfxStringItem*)pFamItem)->GetValue();
- if (sFamily.CompareToAscii("CellStyles") == COMPARE_EQUAL)
+ OUString sFamily = ((const SfxStringItem*)pFamItem)->GetValue();
+ if (sFamily.equalsAscii("CellStyles"))
eFamily = SFX_STYLE_FAMILY_PARA;
- else if (sFamily.CompareToAscii("PageStyles") == COMPARE_EQUAL)
+ else if (sFamily.equalsAscii("PageStyles"))
eFamily = SFX_STYLE_FAMILY_PAGE;
}
- String aStyleName;
- sal_uInt16 nRetMask = 0xffff;
+ OUString aStyleName;
+ sal_uInt16 nRetMask = 0xffff;
pStylePool->SetSearchMask( eFamily, SFXSTYLEBIT_ALL );
@@ -558,7 +558,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
if ( bUndo )
{
- String aUndo = ScGlobal::GetRscString( STR_UNDO_EDITCELLSTYLE );
+ OUString aUndo = ScGlobal::GetRscString( STR_UNDO_EDITCELLSTYLE );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
bListAction = true;
}
@@ -620,7 +620,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
if ( bUndo )
{
- String aUndo = ScGlobal::GetRscString( STR_UNDO_EDITCELLSTYLE );
+ OUString aUndo = ScGlobal::GetRscString( STR_UNDO_EDITCELLSTYLE );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
bListAction = true;
}
@@ -694,7 +694,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end();
for (; itr != itrEnd && *itr < nTabCount; ++itr)
{
- String aOldName = pDoc->GetPageStyle( *itr );
+ OUString aOldName = pDoc->GetPageStyle( *itr );
if ( aOldName != aStyleName )
{
pDoc->SetPageStyle( *itr, aStyleName );
@@ -719,7 +719,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_NEW_BY_EXAMPLE:
{
- const String& rStrCurStyle = pDoc->GetPageStyle( nCurTab );
+ const OUString& rStrCurStyle = pDoc->GetPageStyle( nCurTab );
if ( rStrCurStyle != aStyleName )
{
@@ -775,7 +775,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
// alte Items aus der Vorlage merken
SfxItemSet aOldSet = pStyleSheet->GetItemSet();
- String aOldName = pStyleSheet->GetName();
+ OUString aOldName = pStyleSheet->GetName();
switch ( eFam )
{
@@ -903,7 +903,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
//! auch fuer Seitenvorlagen die Abfragen hier
- String aNewName = pStyleSheet->GetName();
+ OUString aNewName = pStyleSheet->GetName();
if ( aNewName != aOldName &&
pDoc->RenamePageStyleInUse( aOldName, aNewName ) )
{
@@ -1124,16 +1124,16 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
if(SFX_ITEM_SET == pReqArgs->GetItemState(nSlot, true, &pItem) && eType != -1)
{
- String aCode = ((const SfxStringItem*)pItem)->GetValue();
- sal_uInt16 aLen = aCode.Len();
- String* sFormat = new String[4];
- String sTmpStr = OUString();
+ OUString aCode = ((const SfxStringItem*)pItem)->GetValue();
+ sal_uInt16 aLen = aCode.getLength();
+ OUString* sFormat = new OUString[4];
+ OUString sTmpStr = OUString();
sal_uInt16 nCount(0);
sal_uInt16 nStrCount(0);
while(nCount < aLen)
{
- sal_Unicode cChar = aCode.GetChar(nCount);
+ sal_Unicode cChar = aCode[nCount];
if(cChar == sal_Unicode(','))
{
@@ -1143,7 +1143,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
}
else
{
- sTmpStr += cChar;
+ sTmpStr += OUString(cChar);
}
nCount++;
@@ -1152,10 +1152,10 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
break;
}
- const sal_Bool bThousand = (sal_Bool)sFormat[0].ToInt32();
- const sal_Bool bNegRed = (sal_Bool)sFormat[1].ToInt32();
- const sal_uInt16 nPrecision = (sal_uInt16)sFormat[2].ToInt32();
- const sal_uInt16 nLeadZeroes = (sal_uInt16)sFormat[3].ToInt32();
+ const sal_Bool bThousand = (sal_Bool)sFormat[0].toInt32();
+ const sal_Bool bNegRed = (sal_Bool)sFormat[1].toInt32();
+ const sal_uInt16 nPrecision = (sal_uInt16)sFormat[2].toInt32();
+ const sal_uInt16 nLeadZeroes = (sal_uInt16)sFormat[3].toInt32();
aCode = pFormatter->GenerateFormat(
nCurrentNumberFormat,//modify
@@ -2443,12 +2443,12 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
sal_uInt16 nLeadZeroes(0);
pFormatter->GetFormatSpecialInfo(nNumberFormat,bThousand, bNegRed, nPrecision, nLeadZeroes);
- String aFormat;
- static String sBreak = OUString(",");
- const String sThousand = OUString::number(static_cast<sal_Int32>(bThousand));
- const String sNegRed = OUString::number(static_cast<sal_Int32>(bNegRed));
- const String sPrecision = OUString::number(nPrecision);
- const String sLeadZeroes = OUString::number(nLeadZeroes);
+ OUString aFormat;
+ static OUString sBreak = OUString(",");
+ const OUString sThousand = OUString::number(static_cast<sal_Int32>(bThousand));
+ const OUString sNegRed = OUString::number(static_cast<sal_Int32>(bNegRed));
+ const OUString sPrecision = OUString::number(nPrecision);
+ const OUString sLeadZeroes = OUString::number(nLeadZeroes);
aFormat += sThousand;
aFormat += sBreak;
@@ -2600,7 +2600,7 @@ void ScFormatShell::ExecuteTextDirection( SfxRequest& rReq )
SvxFrameDirection eDirection = ( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT ) ?
FRMDIR_HORI_LEFT_TOP : FRMDIR_HORI_RIGHT_TOP;
- String aUndo = ScGlobal::GetRscString( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT ?
+ OUString aUndo = ScGlobal::GetRscString( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT ?
STR_UNDO_L2R : STR_UNDO_R2L );
ScDocShell* pDocSh = GetViewData()->GetDocShell();
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index d437bee9d2f1..5f12fde489f4 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1134,7 +1134,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
const size_t nDefCount = SAL_N_ELEMENTS(nDefIDs);
for (i=0; i<nDefCount; i++)
{
- String aEntry( (ScResId) nDefIDs[i] );
+ OUString aEntry( (ScResId) nDefIDs[i] );
pFilterBox->InsertEntry( aEntry );
long nTextWidth = pFilterBox->GetTextWidth( aEntry );
if ( nTextWidth > nMaxText )
@@ -1334,7 +1334,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
void ScGridWindow::FilterSelect( sal_uLong nSel )
{
- String aString = pFilterBox->GetEntry( static_cast< sal_uInt16 >( nSel ) );
+ OUString aString = pFilterBox->GetEntry( static_cast< sal_uInt16 >( nSel ) );
SCCOL nCol = pFilterBox->GetCol();
SCROW nRow = pFilterBox->GetRow();
@@ -2399,7 +2399,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if ( pDisp && !bFormulaMode && !rMark.IsMultiMarked() )
{
- String aAddr; // CurrentCell
+ OUString aAddr; // CurrentCell
if( rMark.IsMarked() )
{
ScRange aScRange;
@@ -2408,9 +2408,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if ( aScRange.aStart == aScRange.aEnd )
{
// make sure there is a range selection string even for a single cell
- String aSingle = aAddr;
- aAddr.Append( (sal_Char) ':' );
- aAddr.Append( aSingle );
+ aAddr = aAddr + ":" + aAddr;
}
//! SID_MARKAREA gibts nicht mehr ???
@@ -4070,7 +4068,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
else if ( nDestPosX != aSource.aStart.Col() || nDestPosY != aSource.aStart.Row() ||
nSourceTab != nThisTab )
{
- String aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY );
+ OUString aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
SCsCOL nCorrectCursorPosCol = 0;
@@ -4212,7 +4210,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
OSL_ENSURE(pSourceSh, "drag document has no shell");
if (pSourceSh)
{
- String aUndo = ScGlobal::GetRscString( STR_UNDO_COPY );
+ OUString aUndo = ScGlobal::GetRscString( STR_UNDO_COPY );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
bDone = sal_True;
@@ -4229,13 +4227,13 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( bDone )
{
- String aApp = Application::GetAppName();
- String aTopic = pSourceSh->GetTitle( SFX_TITLE_FULLNAME );
+ OUString aApp = Application::GetAppName();
+ OUString aTopic = pSourceSh->GetTitle( SFX_TITLE_FULLNAME );
OUString aItem(aSource.Format(SCA_VALID | SCA_TAB_3D, pSourceDoc));
// TODO: we could define ocQuote for "
const OUString aQuote('"');
- const String& sSep = ScCompiler::GetNativeSymbol( ocSep);
+ const OUString& sSep = ScCompiler::GetNativeSymbol( ocSep);
OUStringBuffer aFormula;
aFormula.append('=');
aFormula.append(ScCompiler::GetNativeSymbol(ocDde));
@@ -4272,7 +4270,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
//! HasSelectedBlockMatrixFragment without selected sheet?
//! or don't start dragging on a part of a matrix
- String aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY );
+ OUString aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
bDone = sal_True;
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 2e5fecb249f7..61f9bab3ac28 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -948,7 +948,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, sal_Bool bUp )
{
if (bUndo)
{
- String aUndo = ScGlobal::GetRscString( STR_UNDO_DRAG_BREAK );
+ OUString aUndo = ScGlobal::GetRscString( STR_UNDO_DRAG_BREAK );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
}
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 7213f6a19a74..5ef56322ad5a 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -77,7 +77,7 @@ static void lcl_LimitRect( Rectangle& rRect, const Rectangle& rVisible )
}
static void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel,
- const String& rTitle, const Color& rColor, sal_Bool bTextBelow,
+ const OUString& rTitle, const Color& rColor, sal_Bool bTextBelow,
double nPPTX, double nPPTY, const Fraction& rZoomY,
ScDocument* pDoc, ScViewData* pButtonViewData, sal_Bool bLayoutRTL )
{
@@ -917,7 +917,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
Color aManual( rColorCfg.GetColorValue(svtools::CALCPAGEBREAKMANUAL).nColor );
Color aAutomatic( rColorCfg.GetColorValue(svtools::CALCPAGEBREAK).nColor );
- String aPageStr = ScGlobal::GetRscString( STR_PGNUM );
+ OUString aPageStr = ScGlobal::GetRscString( STR_PGNUM );
if ( nPageScript == 0 )
{
// get script type of translated "Page" string only once
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index d1f0856dd52e..fc08d7e4ef13 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -62,7 +62,7 @@ bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, bool bKeyboard )
SCTAB nTab = pViewData->GetTabNo();
ScAddress aCellPos( nPosX, nPosY, nTab );
- String aTrackText;
+ OUString aTrackText;
bool bLeftEdge = false;
// Change-Tracking
@@ -141,30 +141,30 @@ bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, bool bKeyboard )
DateTime aDT = pFound->GetDateTime();
aTrackText = pFound->GetUser();
- aTrackText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ", " ));
+ aTrackText += ", ";
aTrackText += ScGlobal::pLocaleData->getDate(aDT);
- aTrackText += ' ';
+ aTrackText += " ";
aTrackText += ScGlobal::pLocaleData->getTime(aDT);
- aTrackText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ":\n" ));
- String aComStr=pFound->GetComment();
- if(aComStr.Len()>0)
+ aTrackText += ":\n";
+ OUString aComStr=pFound->GetComment();
+ if(!aComStr.isEmpty())
{
aTrackText += aComStr;
- aTrackText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "\n( " ));
+ aTrackText += "\n( ";
}
OUString aTmp;
pFound->GetDescription(aTmp, pDoc);
- aTrackText += String(aTmp);
- if(aComStr.Len()>0)
+ aTrackText += aTmp;
+ if(!aComStr.isEmpty())
{
- aTrackText +=')';
+ aTrackText += ")";
}
}
}
// Notiz nur, wenn sie nicht schon auf dem Drawing-Layer angezeigt wird:
const ScPostIt* pNote = pDoc->GetNotes( aCellPos.Tab() )->findByAddress( aCellPos );
- if ( (aTrackText.Len() > 0) || (pNote && !pNote->IsCaptionShown()) )
+ if ( (!aTrackText.isEmpty()) || (pNote && !pNote->IsCaptionShown()) )
{
bool bNew = true;
bool bFast = false;
@@ -286,7 +286,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
if ( bHelpEnabled && !bDone && !nButtonDown ) // nur ohne gedrueckten Button
{
- String aHelpText;
+ OUString aHelpText;
Rectangle aPixRect;
Point aPosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
@@ -309,7 +309,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
{
// Bei ImageMaps die Description anzeigen, wenn vorhanden
aHelpText = pIMapObj->GetAltText();
- if (!aHelpText.Len())
+ if (aHelpText.isEmpty())
aHelpText = pIMapObj->GetURL();
if( bCtrlClickHlink )
{
@@ -325,7 +325,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
}
}
// URL in shape text or at shape itself (URL in text overrides object URL)
- if ( aHelpText.Len() == 0 )
+ if ( aHelpText.isEmpty() )
{
if( aVEvt.eEvent == SDREVENT_EXECUTEURL )
{
@@ -368,7 +368,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
}
}
- if ( !aHelpText.Len() ) // Text-URL
+ if ( aHelpText.isEmpty() ) // Text-URL
{
OUString aUrl;
if ( GetEditUrl( aPosPixel, NULL, &aUrl, NULL ) )
@@ -400,7 +400,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
}
}
- if ( aHelpText.Len() )
+ if ( !aHelpText.isEmpty() )
{
Rectangle aScreenRect(OutputToScreenPixel(aPixRect.TopLeft()),
OutputToScreenPixel(aPixRect.BottomRight()));
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index 42af6b064d5d..13a1a09cbe2f 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -270,8 +270,8 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
long nLayoutSign = bLayoutRTL ? -1 : 1;
sal_Bool bMirrored = IsMirrored();
- String aString;
- sal_uInt16 nBarSize;
+ OUString aString;
+ sal_uInt16 nBarSize;
Point aScrPos;
Size aTextSize;
@@ -908,7 +908,7 @@ void ScHeaderControl::ShowDragHelp()
long nVal = bLayoutRTL ? ( nScrPos - nDragPos + 1 )
: ( nDragPos + 2 - nScrPos );
- String aHelpStr = GetDragHelp( nVal );
+ OUString aHelpStr = GetDragHelp( nVal );
Point aPos = OutputToScreenPixel( Point(0,0) );
Size aSize = GetSizePixel();
diff --git a/sc/source/ui/view/hintwin.cxx b/sc/source/ui/view/hintwin.cxx
index f674eb6c3501..b1d725a49849 100644
--- a/sc/source/ui/view/hintwin.cxx
+++ b/sc/source/ui/view/hintwin.cxx
@@ -49,7 +49,7 @@ ScHintWindow::ScHintWindow( Window* pParent, const OUString& rTit, const OUStrin
sal_Int32 nIndex = 0;
while ( nIndex != -1 )
{
- String aLine = aMessage.getToken( 0, CHAR_CR, nIndex );
+ OUString aLine = aMessage.getToken( 0, CHAR_CR, nIndex );
Size aLineSize( GetTextWidth( aLine ), GetTextHeight() );
nTextHeight = aLineSize.Height();
aTextSize.Height() += nTextHeight;
@@ -82,7 +82,7 @@ void ScHintWindow::Paint( const Rectangle& /* rRect */ )
Point aLineStart = aTextStart;
while ( nIndex != -1 )
{
- String aLine = aMessage.getToken( 0, CHAR_CR, nIndex );
+ OUString aLine = aMessage.getToken( 0, CHAR_CR, nIndex );
DrawText( aLineStart, aLine );
aLineStart.Y() += nTextHeight;
}
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index 11bc7c2abb03..ec17f6d77e51 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -78,7 +78,7 @@ IMPL_LINK_NOARG(ScNoteMarker, TimeHdl)
if (!bVisible)
{
SvtPathOptions aPathOpt;
- String aPath = aPathOpt.GetPalettePath();
+ OUString aPath = aPathOpt.GetPalettePath();
pModel = new SdrModel(aPath);
pModel->SetScaleUnit(MAP_100TH_MM);
SfxItemPool& rPool = pModel->GetItemPool();
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 1208699965df..58673afd7eb7 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -2459,10 +2459,8 @@ void ScOutputData::AddPDFNotes()
OUString aTitle(aAddress.Format(SCA_VALID, mpDoc, mpDoc->GetAddressConvention()));
// Content has to be a simple string without line breaks
- String aContent = pNote->GetText();
- xub_StrLen nPos;
- while ( (nPos=aContent.Search('\n')) != STRING_NOTFOUND )
- aContent.SetChar( nPos, ' ' );
+ OUString aContent = pNote->GetText();
+ aContent = aContent.replaceAll("\n", " ");
vcl::PDFNote aNote;
aNote.Title = aTitle;
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 4dd83a3f882e..957de521855c 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1771,10 +1771,10 @@ void ScOutputData::DrawStrings( sal_Bool bPixelToLogic )
long nRepeatCount = nAvailable / nRepeatSize;
if ( nRepeatCount > 1 )
{
- String aCellStr = aVars.GetString();
- String aRepeated = aCellStr;
+ OUString aCellStr = aVars.GetString();
+ OUString aRepeated = aCellStr;
for ( long nRepeat = 1; nRepeat < nRepeatCount; nRepeat++ )
- aRepeated.Append( aCellStr );
+ aRepeated += aCellStr;
aVars.SetAutoText( aRepeated );
}
}
@@ -2005,17 +2005,17 @@ void ScOutputData::DrawStrings( sal_Bool bPixelToLogic )
// in Metafiles immer DrawTextArray, damit die Positionen mit
// aufgezeichnet werden (fuer nicht-proportionales Resize):
- String aString = aVars.GetString();
+ OUString aString = aVars.GetString();
if (bMetaFile || pFmtDevice != mpDev || aZoomX != aZoomY)
{
- sal_Int32* pDX = new sal_Int32[aString.Len()];
+ sal_Int32* pDX = new sal_Int32[aString.getLength()];
pFmtDevice->GetTextArray( aString, pDX );
if ( !mpRefDevice->GetConnectMetaFile() ||
mpRefDevice->GetOutDevType() == OUTDEV_PRINTER )
{
double fMul = GetStretch();
- xub_StrLen nLen = aString.Len();
+ xub_StrLen nLen = aString.getLength();
for (xub_StrLen i=0; i<nLen; i++)
pDX[i] = (long)(pDX[i] / fMul + 0.5);
}
@@ -2842,7 +2842,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
if ( nAvailable >= 2 * nFormatted )
{
// "repeat" is handled with unformatted text (for performance reasons)
- String aCellStr = rParam.mpEngine->GetText();
+ OUString aCellStr = rParam.mpEngine->GetText();
rParam.mpEngine->SetText( aCellStr );
long nRepeatSize = (long) rParam.mpEngine->CalcTextWidth();
@@ -2855,9 +2855,9 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
long nRepeatCount = nAvailable / nRepeatSize;
if ( nRepeatCount > 1 )
{
- String aRepeated = aCellStr;
+ OUString aRepeated = aCellStr;
for ( long nRepeat = 1; nRepeat < nRepeatCount; nRepeat++ )
- aRepeated.Append( aCellStr );
+ aRepeated += aCellStr;
rParam.mpEngine->SetText( aRepeated );
nEngineHeight = rParam.mpEngine->GetTextHeight();
@@ -3336,7 +3336,7 @@ void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
if ( nAvailable >= 2 * nFormatted )
{
// "repeat" is handled with unformatted text (for performance reasons)
- String aCellStr = rParam.mpEngine->GetText();
+ OUString aCellStr = rParam.mpEngine->GetText();
rParam.mpEngine->SetText( aCellStr );
long nRepeatSize = static_cast<long>( rParam.mpEngine->CalcTextWidth() );
@@ -3349,9 +3349,9 @@ void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
const long nRepeatCount = nAvailable / nRepeatSize;
if ( nRepeatCount > 1 )
{
- String aRepeated = aCellStr;
+ OUString aRepeated = aCellStr;
for ( long nRepeat = 1; nRepeat < nRepeatCount; nRepeat++ )
- aRepeated.Append( aCellStr );
+ aRepeated += aCellStr;
rParam.mpEngine->SetText( aRepeated );
nEngineHeight = rParam.mpEngine->GetTextHeight();
@@ -3607,7 +3607,7 @@ void ScOutputData::DrawEditTopBottom(DrawEditParam& rParam)
if ( nAvailable >= 2 * nFormatted )
{
// "repeat" is handled with unformatted text (for performance reasons)
- String aCellStr = rParam.mpEngine->GetText();
+ OUString aCellStr = rParam.mpEngine->GetText();
rParam.mpEngine->SetText( aCellStr );
long nRepeatSize = static_cast<long>( rParam.mpEngine->CalcTextWidth() );
@@ -3620,9 +3620,9 @@ void ScOutputData::DrawEditTopBottom(DrawEditParam& rParam)
const long nRepeatCount = nAvailable / nRepeatSize;
if ( nRepeatCount > 1 )
{
- String aRepeated = aCellStr;
+ OUString aRepeated = aCellStr;
for ( long nRepeat = 1; nRepeat < nRepeatCount; nRepeat++ )
- aRepeated.Append( aCellStr );
+ aRepeated += aCellStr;
rParam.mpEngine->SetText( aRepeated );
nEngineHeight = rParam.mpEngine->GetTextHeight();
@@ -3891,7 +3891,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
if ( nAvailable >= 2 * nFormatted )
{
// "repeat" is handled with unformatted text (for performance reasons)
- String aCellStr = rParam.mpEngine->GetText();
+ OUString aCellStr = rParam.mpEngine->GetText();
rParam.mpEngine->SetText( aCellStr );
long nRepeatSize = (long) rParam.mpEngine->CalcTextWidth();
@@ -3904,9 +3904,9 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
long nRepeatCount = nAvailable / nRepeatSize;
if ( nRepeatCount > 1 )
{
- String aRepeated = aCellStr;
+ OUString aRepeated = aCellStr;
for ( long nRepeat = 1; nRepeat < nRepeatCount; nRepeat++ )
- aRepeated.Append( aCellStr );
+ aRepeated += aCellStr;
rParam.mpEngine->SetText( aRepeated );
nEngineHeight = rParam.mpEngine->GetTextHeight();
@@ -4300,7 +4300,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
if ( nAvailable >= 2 * nFormatted )
{
// "repeat" is handled with unformatted text (for performance reasons)
- String aCellStr = rParam.mpEngine->GetText();
+ OUString aCellStr = rParam.mpEngine->GetText();
rParam.mpEngine->SetText( aCellStr );
long nRepeatSize = (long) rParam.mpEngine->CalcTextWidth();
@@ -4313,9 +4313,9 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
long nRepeatCount = nAvailable / nRepeatSize;
if ( nRepeatCount > 1 )
{
- String aRepeated = aCellStr;
+ OUString aRepeated = aCellStr;
for ( long nRepeat = 1; nRepeat < nRepeatCount; nRepeat++ )
- aRepeated.Append( aCellStr );
+ aRepeated += aCellStr;
rParam.mpEngine->SetText( aRepeated );
nEngineHeight = rParam.mpEngine->GetTextHeight();
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 66850d5dd72b..8261cd365618 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -738,7 +738,7 @@ long ScPreview::GetFirstPage(SCTAB nTabP)
static Size lcl_GetDocPageSize( ScDocument* pDoc, SCTAB nTab )
{
- String aName = pDoc->GetPageStyle( nTab );
+ OUString aName = pDoc->GetPageStyle( nTab );
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aName, SFX_STYLE_FAMILY_PAGE );
if ( pStyleSheet )
@@ -1015,7 +1015,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
ScDocument * pDoc = pDocShell->GetDocument();
- String aOldName = pDoc->GetPageStyle( nTab );
+ OUString aOldName = pDoc->GetPageStyle( nTab );
bool bUndo = pDoc->IsUndoEnabled();
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE );
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index da931900baac..b0a5a40d7f6e 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -738,7 +738,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
SCTAB nTab = pPreview->GetTab();
- String aOldName = pDocShell->GetDocument()->GetPageStyle( pPreview->GetTab() );
+ OUString aOldName = pDocShell->GetDocument()->GetPageStyle( pPreview->GetTab() );
ScStyleSheetPool* pStylePool = pDocShell->GetDocument()->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE );
OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" );
@@ -852,7 +852,7 @@ void ScPreviewShell::GetState( SfxItemSet& rSet )
rSet.DisableItem( nWhich );
else
{
- String aOldName = pDocShell->GetDocument()->GetPageStyle( pPreview->GetTab() );
+ OUString aOldName = pDocShell->GetDocument()->GetPageStyle( pPreview->GetTab() );
ScStyleSheetPool* pStylePool = pDocShell->GetDocument()->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE );
OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" );
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 93488e1a094f..3a1bac8e4058 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1365,7 +1365,7 @@ void ScPrintFunc::PrintColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY )
else
nPosX -= nOneX;
long nPosY = nScrY - nOneY;
- String aText;
+ OUString aText;
for (nCol=nX1; nCol<=nX2; nCol++)
{
@@ -1409,7 +1409,7 @@ void ScPrintFunc::PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY )
nPosX -= nOneX;
}
long nPosY = nScrY - nOneY;
- String aText;
+ OUString aText;
for (SCROW nRow=nY1; nRow<=nY2; nRow++)
{
@@ -1874,8 +1874,8 @@ long ScPrintFunc::DoNotes( long nNoteStart, sal_Bool bDoPrint, ScPreviewLocation
{
pEditEngine->Draw( pDev, Point( nPosX, nPosY ), 0 );
- String aMarkStr(rPos.Format(SCA_VALID, pDoc, pDoc->GetAddressConvention()));
- aMarkStr += ':';
+ OUString aMarkStr(rPos.Format(SCA_VALID, pDoc, pDoc->GetAddressConvention()));
+ aMarkStr += ":";
// cell position also via EditEngine, for correct positioning
pEditEngine->SetText(aMarkStr);
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index b900c01308c6..bc1f0fd78006 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -90,7 +90,7 @@ bool ScConversionEngineBase::FindNextConversionCell()
{
mbIsAnyModified = true;
- String aNewStr = GetText();
+ OUString aNewStr = GetText();
bool bMultiTab = (rMark.GetSelectCount() > 1);
OUString aVisibleStr;
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 4056748c5a9f..b4fca9100183 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -599,7 +599,7 @@ long ScTabControl::AllowRenaming()
if ( nId )
{
SCTAB nTab = nId - 1;
- String aNewName = GetEditText();
+ OUString aNewName = GetEditText();
sal_Bool bDone = pViewSh->RenameTable( aNewName, nTab );
if ( bDone )
nRet = TABBAR_RENAMING_YES;
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 7feb1b7b11e8..1086a923c991 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1098,7 +1098,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
nScrollMin = aViewData.GetFixPosY();
long nScrollPos = GetScrollBarPos( *pScroll ) + nScrollMin;
- String aHelpStr;
+ OUString aHelpStr;
Rectangle aRect;
sal_uInt16 nAlign;
if (bHoriz)
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 28b69ba711ac..fc8fe9c04a76 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -147,14 +147,14 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
nNewFormId = ((const SfxUInt16Item*)pItem)->GetValue();
}
- String sStringItemValue;
+ OUString sStringItemValue;
if ( pArgs )
{
const SfxPoolItem* pItem;
if ( pArgs->GetItemState( nNewId, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA( SfxStringItem ) )
sStringItemValue = static_cast<const SfxStringItem*>(pItem)->GetValue();
}
- bool bSwitchCustom = ( sStringItemValue.Len() && !sDrawCustom.isEmpty() && sStringItemValue != sDrawCustom );
+ bool bSwitchCustom = ( !sStringItemValue.isEmpty() && !sDrawCustom.isEmpty() && sStringItemValue != sDrawCustom );
if (nNewId == SID_INSERT_FRAME) // vom Tbx-Button
nNewId = SID_DRAW_TEXT;
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index ccf94e21a302..5cc58dc4b7cc 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -74,7 +74,7 @@ using ::std::auto_ptr;
/** Try to parse the given range using Calc-style syntax first, then
Excel-style if that fails. */
-static sal_uInt16 lcl_ParseRange(ScRange& rScRange, const String& aAddress, ScDocument* pDoc, sal_uInt16 /* nSlot */)
+static sal_uInt16 lcl_ParseRange(ScRange& rScRange, const OUString& aAddress, ScDocument* pDoc, sal_uInt16 /* nSlot */)
{
sal_uInt16 nResult = rScRange.Parse(aAddress, pDoc);
if ( (nResult & SCA_VALID) )
@@ -85,7 +85,7 @@ static sal_uInt16 lcl_ParseRange(ScRange& rScRange, const String& aAddress, ScDo
/** Try to parse the given address using Calc-style syntax first, then
Excel-style if that fails. */
-static sal_uInt16 lcl_ParseAddress(ScAddress& rScAddress, const String& aAddress, ScDocument* pDoc, sal_uInt16 /* nSlot */)
+static sal_uInt16 lcl_ParseAddress(ScAddress& rScAddress, const OUString& aAddress, ScDocument* pDoc, sal_uInt16 /* nSlot */)
{
sal_uInt16 nResult = rScAddress.Parse(aAddress, pDoc);
if ( (nResult & SCA_VALID) )
@@ -113,7 +113,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if ( pReqArgs &&
pReqArgs->GetItemState(FID_INSERT_FILE,sal_True,&pItem) == SFX_ITEM_SET )
{
- String aFileName = ((const SfxStringItem*)pItem)->GetValue();
+ OUString aFileName = ((const SfxStringItem*)pItem)->GetValue();
// Einfuege-Position
@@ -224,7 +224,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_CURRENTCELL:
if ( pReqArgs )
{
- String aAddress;
+ OUString aAddress;
const SfxPoolItem* pItem;
if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET )
aAddress = ((const SfxStringItem*)pItem)->GetValue();
@@ -307,7 +307,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if ( !(nResult & SCA_VALID) && comphelper::string::isdigitAsciiString(aAddress) )
{
- sal_Int32 nNumeric = aAddress.ToInt32();
+ sal_Int32 nNumeric = aAddress.toInt32();
if ( nNumeric > 0 && nNumeric <= MAXROW+1 )
{
// 1-basierte Zeilennummer
@@ -423,7 +423,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_CURRENTOBJECT:
if ( pReqArgs )
{
- String aName = ((const SfxStringItem&)pReqArgs->Get(nSlot)).GetValue();
+ OUString aName = ((const SfxStringItem&)pReqArgs->Get(nSlot)).GetValue();
SelectObject( aName );
}
break;
@@ -449,7 +449,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_CURRENTDOC:
if ( pReqArgs )
{
- String aStrDocName( ((const SfxStringItem&)pReqArgs->
+ OUString aStrDocName( ((const SfxStringItem&)pReqArgs->
Get(nSlot)).GetValue() );
SfxViewFrame* pViewFrame = NULL;
@@ -798,8 +798,8 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
AbstractScShowTabDlg* pDlg = pFact->CreateScShowTabDlg( GetDialogParent(), RID_SCDLG_SHOW_TAB);
OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->SetDescription(
- String( ScResId( STR_DLG_SELECTTABLES_TITLE ) ),
- String( ScResId( STR_DLG_SELECTTABLES_LBNAME ) ),
+ OUString( ScResId( STR_DLG_SELECTTABLES_TITLE ) ),
+ OUString( ScResId( STR_DLG_SELECTTABLES_LBNAME ) ),
GetStaticInterface()->GetSlot(SID_SELECT_TABLES)->GetCommand(), HID_SELECTTABLES );
// fill all table names with selection state
@@ -945,7 +945,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA( SfxStringItem ) )
{
- String aComment = ((const SfxStringItem*)pItem)->GetValue();
+ OUString aComment = ((const SfxStringItem*)pItem)->GetValue();
pDocSh->SetChangeComment( pAction, aComment );
rReq.Done();
}
@@ -1026,7 +1026,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if (pDlg->Execute() == RET_OK)
{
- String aPassword = pDlg->GetPassword();
+ OUString aPassword = pDlg->GetPassword();
Protect( TABLEID_DOC, aPassword );
rReq.AppendItem( SfxBoolItem( FID_PROTECT_DOC, sal_True ) );
rReq.Done();
@@ -1074,13 +1074,13 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if (pDlg->Execute() == RET_OK)
{
- String aPassword = pDlg->GetPassword();
+ OUString aPassword = pDlg->GetPassword();
Unprotect(nTab, aPassword);
}
}
else
// this sheet is not password-protected.
- Unprotect(nTab, String());
+ Unprotect(nTab, OUString());
if (!pReqArgs)
{
diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx
index b468aefde6eb..22d2df68b9e6 100644
--- a/sc/source/ui/view/tabvwsh9.cxx
+++ b/sc/source/ui/view/tabvwsh9.cxx
@@ -90,7 +90,7 @@ void ScTabViewShell::ExecGallery( SfxRequest& rReq )
Graphic aGraphic( pGalleryItem->GetGraphic() );
Point aPos = GetInsertPos();
- String aPath, aFilter;
+ OUString aPath, aFilter;
PasteGraphic( aPos, aGraphic, aPath, aFilter );
}
else if ( nType == com::sun::star::gallery::GalleryItemType::MEDIA )
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 807b25d6fcff..e819b2c10d1e 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -55,7 +55,7 @@
sal_Bool ScTabViewShell::GetFunction( OUString& rFuncStr, sal_uInt16 nErrCode )
{
- String aStr;
+ OUString aStr;
ScSubTotalFunc eFunc = (ScSubTotalFunc) SC_MOD()->GetAppOptions().GetStatusFunc();
ScViewData* pViewData = GetViewData();
@@ -95,14 +95,14 @@ sal_Bool ScTabViewShell::GetFunction( OUString& rFuncStr, sal_uInt16 nErrCode )
SCTAB nTab = pViewData->GetTabNo();
aStr = ScGlobal::GetRscString(nGlobStrId);
- aStr += '=';
+ aStr += "=";
ScAddress aCursor( nPosX, nPosY, nTab );
double nVal;
if ( pDoc->GetSelectionFunction( eFunc, aCursor, rMark, nVal ) )
{
if ( nVal == 0.0 )
- aStr += '0';
+ aStr += "0";
else
{
// Number in the standard format, the other on the cursor position
@@ -268,7 +268,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
{
// disable if already set to default
- String aStyleName = pDoc->GetPageStyle( nTab );
+ OUString aStyleName = pDoc->GetPageStyle( nTab );
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName,
SFX_STYLE_FAMILY_PAGE );
@@ -551,9 +551,9 @@ bool ScTabViewShell::IsRefInputMode() const
ScInputHandler* pHdl = pScMod->GetInputHdl();
if ( pHdl )
{
- String aString = pHdl->GetEditString();
- if ( !pHdl->GetSelIsRef() && aString.Len() > 1 &&
- ( aString.GetChar(0) == '+' || aString.GetChar(0) == '-' ) )
+ OUString aString = pHdl->GetEditString();
+ if ( !pHdl->GetSelIsRef() && aString.getLength() > 1 &&
+ ( aString[0] == '+' || aString[0] == '-' ) )
{
const ScViewData* pViewData = GetViewData();
if ( pViewData )
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index ae34e8eada93..d8fcbaf1d7e0 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -92,7 +92,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
}
else // einblenden
{
- std::vector<String> rNames;
+ std::vector<OUString> rNames;
rNames.push_back(aName);
ShowTable( rNames );
}
@@ -111,8 +111,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
case FID_TABLE_SHOW:
{
- String aName;
- std::vector<String> rNames;
+ OUString aName;
+ std::vector<OUString> rNames;
if ( pReqArgs )
{
const SfxPoolItem* pItem;
@@ -178,7 +178,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
sal_Bool bOk = false;
const SfxPoolItem* pTabItem;
const SfxPoolItem* pNameItem;
- String aName;
+ OUString aName;
if ( pReqArgs->HasItem( FN_PARAM_1, &pTabItem ) &&
pReqArgs->HasItem( nSlot, &pNameItem ) )
@@ -324,7 +324,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
sal_Bool bDone = false;
const SfxPoolItem* pItem;
- String aName;
+ OUString aName;
if( pReqArgs->HasItem( FN_PARAM_1, &pItem ) )
nTabNr = ((const SfxUInt16Item*)pItem)->GetValue();
@@ -351,21 +351,21 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
sal_uInt16 nRet = RET_OK;
sal_Bool bDone = false;
- String aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) );
+ OUString aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) );
OUString aName;
- String aDlgTitle;
+ OUString aDlgTitle;
const sal_Char* pHelpId = 0;
switch ( nSlot )
{
case FID_TAB_APPEND:
- aDlgTitle = String(ScResId(SCSTR_APDTABLE));
+ aDlgTitle = OUString(ScResId(SCSTR_APDTABLE));
pDoc->CreateValidTabName( aName );
pHelpId = HID_SC_APPEND_NAME;
break;
case FID_TAB_RENAME:
- aDlgTitle = String(ScResId(SCSTR_RENAMETAB));
+ aDlgTitle = OUString(ScResId(SCSTR_RENAMETAB));
pDoc->GetName( pViewData->GetTabNo(), aName );
pHelpId = HID_SC_RENAME_NAME;
break;
@@ -375,7 +375,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScStringInputDlg* pDlg = pFact->CreateScStringInputDlg(
- GetDialogParent(), aDlgTitle, String(ScResId(SCSTR_NAME)),
+ GetDialogParent(), aDlgTitle, OUString(ScResId(SCSTR_NAME)),
aName, GetStaticInterface()->GetSlot(nSlot)->GetCommand(),
pHelpId, RID_SCDLG_STRINPUT);
@@ -533,7 +533,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
}
bDoIt = true;
- String aFoundDocName;
+ OUString aFoundDocName;
if ( nDoc != SC_DOC_NEW )
{
ScDocShell* pSh = ScDocShell::GetShellByNum( nDoc );
@@ -619,7 +619,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
// handle several sheets
::svl::IUndoManager* pUndoManager = pDocSh->GetUndoManager();
- String aUndo = ScGlobal::GetRscString( STR_UNDO_TAB_RTL );
+ OUString aUndo = ScGlobal::GetRscString( STR_UNDO_TAB_RTL );
pUndoManager->EnterListAction( aUndo, aUndo );
ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end();
@@ -705,8 +705,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScTabBgColorDlg* pDlg = pFact->CreateScTabBgColorDlg(
GetDialogParent(),
- String(ScResId(SCSTR_SET_TAB_BG_COLOR)),
- String(ScResId(SCSTR_NO_TAB_BG_COLOR)),
+ OUString(ScResId(SCSTR_SET_TAB_BG_COLOR)),
+ OUString(ScResId(SCSTR_NO_TAB_BG_COLOR)),
aTabBgColor,
CMD_FID_TAB_SET_TAB_BG_COLOR,
RID_SCDLG_TAB_BG_COLOR);
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index c43e33572a9e..74505f003e2e 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -75,7 +75,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
{
// in beiden Faellen erstmal auf der sichtbaren View selektieren
- String aName;
+ OUString aName;
SdrView* pDrView = GetSdrView();
if (pDrView)
{
@@ -177,7 +177,7 @@ void ScTabViewShell::GetObjectState( SfxItemSet& rSet )
{
case SID_ACTIVE_OBJ_NAME:
{
- String aName;
+ OUString aName;
uno::Reference < embed::XEmbeddedObject > xOLE = lcl_GetSelectedObj( GetSdrView() );
if (xOLE.is())
{
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 20b7b6a9a5f3..5f1f59284535 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -505,7 +505,7 @@ sal_Bool ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
void ScViewFunc::EnterAutoSum(const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr)
{
- String aFormula = GetAutoSumFormula( rRangeList, bSubTotal, rAddr );
+ OUString aFormula = GetAutoSumFormula( rRangeList, bSubTotal, rAddr );
EnterBlock( aFormula, NULL );
}
@@ -658,7 +658,7 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor
const ScRange aRange( nCol, nStartRow, nTab, nCol, nSumEndRow, nTab );
if ( lcl_GetAutoSumForColumnRange( pDoc, aRangeList, aRange ) )
{
- const String aFormula = GetAutoSumFormula(
+ const OUString aFormula = GetAutoSumFormula(
aRangeList, bSubTotal, ScAddress(nCol, nInsRow, nTab));
EnterData( nCol, nInsRow, nTab, aFormula );
}
@@ -692,7 +692,7 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor
const ScRange aRange( nStartCol, nRow, nTab, nSumEndCol, nRow, nTab );
if ( lcl_GetAutoSumForRowRange( pDoc, aRangeList, aRange ) )
{
- const String aFormula = GetAutoSumFormula( aRangeList, bSubTotal, ScAddress(nInsCol, nRow, nTab) );
+ const OUString aFormula = GetAutoSumFormula( aRangeList, bSubTotal, ScAddress(nInsCol, nRow, nTab) );
EnterData( nInsCol, nRow, nTab, aFormula );
}
}
@@ -782,7 +782,7 @@ void ScViewFunc::EnterBlock( const OUString& rString, const EditTextObject* pDat
}
ScDocument* pDoc = GetViewData()->GetDocument();
- String aNewStr = rString;
+ OUString aNewStr = rString;
if ( pData )
{
const ScPatternAttr* pOldPattern = pDoc->GetPattern( nCol, nRow, nTab );
@@ -806,7 +806,7 @@ void ScViewFunc::EnterBlock( const OUString& rString, const EditTextObject* pDat
ScDocument* pInsDoc = new ScDocument( SCDOCMODE_CLIP );
pInsDoc->ResetClip( pDoc, nTab );
- if (aNewStr.GetChar(0) == '=') // Formula ?
+ if (aNewStr[0] == '=') // Formula ?
{
// SetString not possible, because in Clipboard-Documents nothing will be compiled!
pInsDoc->SetFormulaCell(aPos, new ScFormulaCell(pDoc, aPos, aNewStr));
@@ -968,7 +968,7 @@ void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const OUString* pPrint,
sal_uInt16 nTCount = comphelper::string::getTokenCount(*pPrint, sep);
for (sal_uInt16 i=0; i<nTCount; i++)
{
- String aToken = pPrint->getToken(i, sep);
+ OUString aToken = pPrint->getToken(i, sep);
if ( aRange.ParseAny( aToken, pDoc, aDetails ) & SCA_VALID )
pDoc->AddPrintRange( nTab, aRange );
}
@@ -1830,7 +1830,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
if ( pDoc )
{
- String aTargetValStr;
+ OUString aTargetValStr;
if ( rParam.pStrTargetVal != NULL )
aTargetValStr = *(rParam.pStrTargetVal);
@@ -2411,7 +2411,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
OUString aFilterName;
if (pMed->GetFilter())
aFilterName = pMed->GetFilter()->GetFilterName();
- String aOptions = ScDocumentLoader::GetOptions(*pMed);
+ OUString aOptions = ScDocumentLoader::GetOptions(*pMed);
sal_Bool bWasThere = pDoc->HasLink( aFileName, aFilterName, aOptions );
@@ -2486,8 +2486,8 @@ void ScViewFunc::MoveTable(
// execute without SFX_CALLMODE_RECORD, because already contained in move command
- String aUrl = OUString("private:factory/");
- aUrl.AppendAscii(RTL_CONSTASCII_STRINGPARAM( STRING_SCAPP )); // "scalc"
+ OUString aUrl("private:factory/");
+ aUrl += STRING_SCAPP; // "scalc"
SfxStringItem aItem( SID_FILE_NAME, aUrl );
SfxStringItem aTarget( SID_TARGETNAME, OUString("_blank") );
@@ -2824,7 +2824,7 @@ void ScViewFunc::MoveTable(
//----------------------------------------------------------------------------
-void ScViewFunc::ShowTable( const std::vector<String>& rNames )
+void ScViewFunc::ShowTable( const std::vector<OUString>& rNames )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
@@ -2836,7 +2836,7 @@ void ScViewFunc::ShowTable( const std::vector<String>& rNames )
bool bFound(false);
- for (std::vector<String>::const_iterator itr=rNames.begin(), itrEnd = rNames.end(); itr!=itrEnd; ++itr)
+ for (std::vector<OUString>::const_iterator itr=rNames.begin(), itrEnd = rNames.end(); itr!=itrEnd; ++itr)
{
aName = *itr;
if (pDoc->GetTable(aName, nPos))
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index aa4b9e93cdce..4d2ba297f072 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -977,7 +977,7 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
( bMarkIsFiltered && nUnfilteredRows < nDestSizeY+1 ) )
{
ScWaitCursorOff aWaitOff( GetFrameWin() );
- String aMessage = ScGlobal::GetRscString( STR_PASTE_BIGGER );
+ OUString aMessage = ScGlobal::GetRscString( STR_PASTE_BIGGER );
QueryBox aBox( GetViewData()->GetDialogParent(),
WinBits(WB_YES_NO | WB_DEF_NO), aMessage );
if ( aBox.Execute() != RET_YES )
@@ -1111,7 +1111,7 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
ScDocFunc& rDocFunc = pDocSh->GetDocFunc();
if ( bRecord )
{
- String aUndo = ScGlobal::GetRscString( pClipDoc->IsCutMode() ? STR_UNDO_MOVE : STR_UNDO_COPY );
+ OUString aUndo = ScGlobal::GetRscString( pClipDoc->IsCutMode() ? STR_UNDO_MOVE : STR_UNDO_COPY );
pUndoMgr->EnterListAction( aUndo, aUndo );
}
@@ -1508,7 +1508,7 @@ bool ScViewFunc::PasteMultiRangesFromClip(
if (pDoc->IsUndoEnabled())
{
::svl::IUndoManager* pUndoMgr = pDocSh->GetUndoManager();
- String aUndo = ScGlobal::GetRscString(
+ OUString aUndo = ScGlobal::GetRscString(
pClipDoc->IsCutMode() ? STR_UNDO_CUT : STR_UNDO_COPY);
pUndoMgr->EnterListAction(aUndo, aUndo);
@@ -1670,7 +1670,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
if (pDoc->IsUndoEnabled())
{
svl::IUndoManager* pUndoMgr = pDocSh->GetUndoManager();
- String aUndo = ScGlobal::GetRscString(
+ OUString aUndo = ScGlobal::GetRscString(
pClipDoc->IsCutMode() ? STR_UNDO_CUT : STR_UNDO_COPY);
pUndoMgr->EnterListAction(aUndo, aUndo);
@@ -1745,7 +1745,7 @@ sal_Bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDest
if ( bRecord )
{
- String aUndo = ScGlobal::GetRscString( bCut ? STR_UNDO_MOVE : STR_UNDO_COPY );
+ OUString aUndo = ScGlobal::GetRscString( bCut ? STR_UNDO_MOVE : STR_UNDO_COPY );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
}
@@ -1907,7 +1907,7 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
{
if (!aEdits.is_null(i))
{
- String aFieldName=aEdits[i].GetText();
+ OUString aFieldName=aEdits[i].GetText();
pDoc->SetString( nStartCol + i, nCurrentRow, nTab, aFieldName );
}
}
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 008e1643fd03..8d31df689958 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -166,7 +166,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
SotStorageStreamRef xStream;
if ( aDataHelper.GetSotStorageStream( SOT_FORMAT_RTF, xStream ) && xStream.Is() )
// mba: clipboard always must contain absolute URLs (could be from alien source)
- aImpEx.ImportStream( *xStream, String(), SOT_FORMAT_RTF );
+ aImpEx.ImportStream( *xStream, OUString(), SOT_FORMAT_RTF );
else if ( aDataHelper.GetString( SOT_FORMAT_RTF, aStr ) )
aImpEx.ImportString( aStr, SOT_FORMAT_RTF );
@@ -254,7 +254,7 @@ void ScViewFunc::DoRefConversion( sal_Bool bRecord )
if (aFinder.GetFound())
{
ScAddress aPos = pCell->aPos;
- String aNew = aFinder.GetText();
+ OUString aNew = aFinder.GetText();
ScCompiler aComp( pDoc, aPos);
aComp.SetGrammar(pDoc->GetGrammar());
ScTokenArray* pArr = aComp.CompileString( aNew );
@@ -308,7 +308,7 @@ void ScViewFunc::DoThesaurus( sal_Bool bRecord )
ScMarkData& rMark = GetViewData()->GetMarkData();
ScSplitPos eWhich = GetViewData()->GetActivePart();
EESpellState eState;
- String sOldText, sNewString;
+ OUString sOldText, sNewString;
EditTextObject* pOldTObj = NULL;
const EditTextObject* pTObject = NULL;
EditView* pEditView = NULL;
@@ -397,7 +397,7 @@ void ScViewFunc::DoThesaurus( sal_Bool bRecord )
{
LanguageType eLnge = ScViewUtil::GetEffLanguage( pDoc, ScAddress( nCol, nRow, nTab ) );
SvtLanguageTable aLangTab;
- String aErr = aLangTab.GetString(eLnge);
+ OUString aErr = aLangTab.GetString(eLnge);
aErr += ScGlobal::GetRscString( STR_SPELLING_NO_LANG );
InfoBox aBox( GetViewData()->GetDialogParent(), aErr );
aBox.Execute();
@@ -582,7 +582,7 @@ sal_Bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, sal_Bo
{
INetURLObject aURL;
aURL.SetSmartURL( rFile );
- String aStrURL = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ OUString aStrURL = aURL.GetMainURL( INetURLObject::NO_DECODE );
// is it a media URL?
if( ::avmedia::MediaWindow::isMediaURL( aStrURL ) )
@@ -635,7 +635,7 @@ sal_Bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, sal_Bo
{
if ( bLink )
{
- String aFltName = rGraphicFilter.GetImportFormatName(nFilterFormat);
+ OUString aFltName = rGraphicFilter.GetImportFormatName(nFilterFormat);
return PasteGraphic( rPos, aGraphic, aStrURL, aFltName );
}
else
@@ -706,7 +706,7 @@ void ScViewFunc::InsertBookmark( const OUString& rDescription, const OUString& r
{
// in die gerade editierte Zelle einfuegen
- String aTargetFrame;
+ OUString aTargetFrame;
if (pTarget)
aTargetFrame = *pTarget;
pViewData->GetViewShell()->InsertURLField( rDescription, rURL, aTargetFrame );
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 9d99869e76c5..bdf7a51306be 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -130,7 +130,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId,
// mba: BaseURL doesn't make sense for clipboard
// #i43716# Medium must be allocated with "new".
// DoLoad stores the pointer and deletes it with the SfxObjectShell.
- SfxMedium* pMedium = new SfxMedium( xStore, String() );
+ SfxMedium* pMedium = new SfxMedium( xStore, OUString() );
// TODO/LATER: is it a problem that we don't support binary formats here?
ScDocShellRef xDocShRef = new ScDocShell(SFX_CREATE_MODE_EMBEDDED);
@@ -316,7 +316,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId,
}
}
if(!bRet)
- bRet = aObj.ImportStream( *xStream, String(), nFormatId );
+ bRet = aObj.ImportStream( *xStream, OUString(), nFormatId );
// mba: clipboard always must contain absolute URLs (could be from alien source)
}
else if (nFormatId == FORMAT_STRING && aDataHelper.GetString( nFormatId, aStr ))
@@ -329,7 +329,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId,
ScAbstractDialogFactory* pFact =
ScAbstractDialogFactory::Create();
AbstractScImportAsciiDlg *pDlg =
- pFact->CreateScImportAsciiDlg( NULL, String(), &aStrm,
+ pFact->CreateScImportAsciiDlg( NULL, OUString(), &aStrm,
SC_PASTETEXT);
if (pDlg->Execute() == RET_OK)
@@ -386,7 +386,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId,
// slot execute, so it can be added to the undo action
ScDBData* pDBData = pDocSh->GetDBData( ScRange(nPosX,nPosY,nTab), SC_DB_OLD, SC_DBSEL_KEEP );
- String sTarget;
+ OUString sTarget;
if (pDBData)
sTarget = pDBData->GetName();
else
@@ -482,7 +482,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId,
MakeDrawLayer(); // before loading model, so 3D factory has been created
SvtPathOptions aPathOpt;
- String aPath = aPathOpt.GetPalettePath();
+ OUString aPath = aPathOpt.GetPalettePath();
ScDocShellRef aDragShellRef( new ScDocShell );
aDragShellRef->DoInitNew(NULL);
@@ -595,7 +595,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId,
sal_uLong nCount = aFileList.Count();
for( sal_uLong i = 0; i < nCount ; i++ )
{
- String aFile = aFileList.GetFile( i );
+ OUString aFile = aFileList.GetFile( i );
PasteFile( aPos, aFile, bLink );
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index e324d4aae08f..08ab7db6c3ec 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -181,7 +181,7 @@ void ScViewFunc::DetectiveMarkPred()
ScRange aRange;
if (pPath && ScRefTokenHelper::getRangeFromToken(aRange, p, aCurPos, true))
{
- const String& rTabName = p->GetString();
+ const OUString& rTabName = p->GetString();
OUStringBuffer aBuf;
aBuf.append(*pPath);
aBuf.append(sal_Unicode('#'));
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index 2f2702d2dbd7..18e49492f1a2 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -361,14 +361,14 @@ sal_Bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embe
sal_Bool ScViewFunc::PasteBitmapEx( const Point& rPos, const BitmapEx& rBmpEx )
{
- String aEmpty;
+ OUString aEmpty;
Graphic aGraphic(rBmpEx);
return PasteGraphic( rPos, aGraphic, aEmpty, aEmpty );
}
sal_Bool ScViewFunc::PasteMetaFile( const Point& rPos, const GDIMetaFile& rMtf )
{
- String aEmpty;
+ OUString aEmpty;
Graphic aGraphic(rMtf);
return PasteGraphic( rPos, aGraphic, aEmpty, aEmpty );
}
@@ -406,7 +406,7 @@ sal_Bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
// path was the name of the graphic in history
ScDrawLayer* pLayer = (ScDrawLayer*) pScDrawView->GetModel();
- String aName = pLayer->GetNewGraphicName(); // "Graphics"
+ OUString aName = pLayer->GetNewGraphicName(); // "Graphics"
pGrafObj->SetName(aName);
// don't mark if OLE
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 5fc0e25c4463..ff0874185c97 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -358,18 +358,18 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
else if ( rString[0] == '+' || rString[0] == '-' )
{
// if there is more than one leading '+' or '-' character, remove the additional ones
- String aString( rString );
+ OUString aString( rString );
xub_StrLen nIndex = 1;
- xub_StrLen nLen = aString.Len();
- while ( nIndex < nLen && ( aString.GetChar( nIndex ) == '+' || aString.GetChar( nIndex ) == '-' ) )
+ xub_StrLen nLen = aString.getLength();
+ while ( nIndex < nLen && ( aString[ nIndex ] == '+' || aString[ nIndex ] == '-' ) )
{
++nIndex;
}
- aString.Erase( 1, nIndex - 1 );
+ aString = aString.replaceAt( 1, nIndex - 1, "" );
// if the remaining part without the leading '+' or '-' character
// is non-empty and not a number, handle as formula
- if ( aString.Len() > 1 )
+ if ( aString.getLength() > 1 )
{
sal_uInt32 nFormat = 0;
pDoc->GetNumberFormat( nCol, nRow, nTab, nFormat );
@@ -396,7 +396,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
{
aComp.SetExtendedErrorDetection( ScCompiler::EXTENDED_ERROR_DETECTION_NAME_BREAK );
}
- String aFormula( rString );
+ OUString aFormula( rString );
ScTokenArray* pArr;
sal_Bool bAgain;
do
@@ -417,20 +417,19 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
}
if ( bCorrected )
{
- String aCorrectedFormula;
+ OUString aCorrectedFormula;
if ( bAddEqual )
{
- aCorrectedFormula = '=';
- aCorrectedFormula += aComp.GetCorrectedFormula();
+ aCorrectedFormula = "=" + aComp.GetCorrectedFormula();
}
else
aCorrectedFormula = aComp.GetCorrectedFormula();
short nResult;
- if ( aCorrectedFormula.Len() == 1 )
+ if ( aCorrectedFormula.getLength() == 1 )
nResult = RET_NO; // empty formula, just '='
else
{
- String aMessage( ScResId( SCSTR_FORMULA_AUTOCORRECTION ) );
+ OUString aMessage( ScResId( SCSTR_FORMULA_AUTOCORRECTION ) );
aMessage += aCorrectedFormula;
nResult = QueryBox( GetViewData()->GetDialogParent(),
WinBits(WB_YES_NO | WB_DEF_YES),
@@ -634,7 +633,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
sal_Bool bSimple = false;
sal_Bool bCommon = false;
ScPatternAttr* pCellAttrs = NULL;
- String aString;
+ OUString aString;
const ScPatternAttr* pOldPattern = pDoc->GetPattern( nCol, nRow, nTab );
ScTabEditEngine aEngine( *pOldPattern, pDoc->GetEnginePool() );
@@ -651,8 +650,8 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
if ( !bSimple && aEngine.GetParagraphCount() == 1 )
{
- String aParStr = aEngine.GetText( 0 );
- if ( aParStr.GetChar(0) == '=' )
+ OUString aParStr = aEngine.GetText( 0 );
+ if ( aParStr[0] == '=' )
bSimple = sal_True;
}
@@ -1367,7 +1366,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, sal_Bool bRe
pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pUndoDoc, &aFuncMark );
aFuncMark.MarkToMulti();
- String aName = pStyleSheet->GetName();
+ OUString aName = pStyleSheet->GetName();
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoSelectionStyle( pDocSh, aFuncMark, aMarkRange, aName, pUndoDoc ) );
}
@@ -1401,7 +1400,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, sal_Bool bRe
ScMarkData aUndoMark = aFuncMark;
aUndoMark.SetMultiMarkArea( aMarkRange );
- String aName = pStyleSheet->GetName();
+ OUString aName = pStyleSheet->GetName();
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoSelectionStyle( pDocSh, aUndoMark, aMarkRange, aName, pUndoDoc ) );
}
@@ -2436,7 +2435,7 @@ void ScViewFunc::ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect )
if (bUndo)
{
- String aUndo = ScGlobal::GetRscString( STR_UNDO_PROTECT_TAB );
+ OUString aUndo = ScGlobal::GetRscString( STR_UNDO_PROTECT_TAB );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
}
@@ -2466,7 +2465,7 @@ void ScViewFunc::Protect( SCTAB nTab, const OUString& rPassword )
if (bUndo)
{
- String aUndo = ScGlobal::GetRscString( STR_UNDO_PROTECT_TAB );
+ OUString aUndo = ScGlobal::GetRscString( STR_UNDO_PROTECT_TAB );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
}
@@ -2498,7 +2497,7 @@ sal_Bool ScViewFunc::Unprotect( SCTAB nTab, const OUString& rPassword )
if (bUndo)
{
- String aUndo = ScGlobal::GetRscString( STR_UNDO_UNPROTECT_TAB );
+ OUString aUndo = ScGlobal::GetRscString( STR_UNDO_UNPROTECT_TAB );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
}
@@ -2776,14 +2775,14 @@ sal_Bool ScViewFunc::InsertName( const OUString& rName, const OUString& rSymbol,
ScRangeData* pNewEntry = new ScRangeData( pDoc, rName, rSymbol,
ScAddress( GetViewData()->GetCurX(), GetViewData()->GetCurY(),
nTab), nType );
- String aUpType = rType.toAsciiUpperCase();
- if ( aUpType.Search( 'P' ) != STRING_NOTFOUND )
+ OUString aUpType = rType.toAsciiUpperCase();
+ if ( aUpType.indexOf( 'P' ) != -1 )
nType |= RT_PRINTAREA;
- if ( aUpType.Search( 'R' ) != STRING_NOTFOUND )
+ if ( aUpType.indexOf( 'R' ) != -1 )
nType |= RT_ROWHEADER;
- if ( aUpType.Search( 'C' ) != STRING_NOTFOUND )
+ if ( aUpType.indexOf( 'C' ) != -1 )
nType |= RT_COLHEADER;
- if ( aUpType.Search( 'F' ) != STRING_NOTFOUND )
+ if ( aUpType.indexOf( 'F' ) != -1 )
nType |= RT_CRITERIA;
pNewEntry->AddType(nType);