summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-11-06 18:11:43 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-11-07 03:46:21 +0100
commitcc59e69c6f2c95a4434623dfea9ab666de6ebe76 (patch)
treeaf2d28a7c336db5583c4d6a54e120c6608939305 /sc/source/ui
parent128947050b4506bf1fd57d93fe249c476a184f61 (diff)
String->OUString in ScDocument and follow up
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/app/inputhdl.cxx4
-rw-r--r--sc/source/ui/docshell/docfunc.cxx9
-rw-r--r--sc/source/ui/docshell/docsh.cxx63
-rw-r--r--sc/source/ui/docshell/docsh3.cxx6
-rw-r--r--sc/source/ui/docshell/docsh4.cxx10
-rw-r--r--sc/source/ui/docshell/docsh5.cxx10
-rw-r--r--sc/source/ui/docshell/docsh6.cxx10
-rw-r--r--sc/source/ui/docshell/docsh8.cxx10
-rw-r--r--sc/source/ui/docshell/tablink.cxx12
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx2
-rw-r--r--sc/source/ui/inc/docsh.hxx2
-rw-r--r--sc/source/ui/inc/linkarea.hxx2
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/linkarea.cxx8
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx6
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx4
-rw-r--r--sc/source/ui/navipi/content.cxx10
-rw-r--r--sc/source/ui/undo/undotab.cxx6
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx16
-rw-r--r--sc/source/ui/unoobj/docuno.cxx4
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx10
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx4
-rw-r--r--sc/source/ui/view/dbfunc3.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx7
-rw-r--r--sc/source/ui/view/output2.cxx8
-rw-r--r--sc/source/ui/view/printfun.cxx2
-rw-r--r--sc/source/ui/view/tabcont.cxx2
-rw-r--r--sc/source/ui/view/viewfun2.cxx9
28 files changed, 126 insertions, 116 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index c30a8fd5824a..2f3f7e8eec67 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3417,7 +3417,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
if ( pInputWin ) // Bereichsanzeige
{
- String aPosStr;
+ rtl::OUString aPosStr;
const ScAddress::Details aAddrDetails( pDoc, aCursorPos );
// Ist der Bereich ein Name?
@@ -3427,7 +3427,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
pActiveViewSh->GetViewData()->GetDocument()->
GetRangeAtBlock( ScRange( rSPos, rEPos ), &aPosStr );
- if ( !aPosStr.Len() ) // kein Name -> formatieren
+ if ( !aPosStr.getLength() ) // kein Name -> formatieren
{
sal_uInt16 nFlags = 0;
if( aAddrDetails.eConv == formula::FormulaGrammar::CONV_XL_R1C1 )
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index e8be035e8699..d2b6087057ef 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2631,7 +2631,7 @@ script::ModuleInfo lcl_InitModuleInfo( SfxObjectShell& rDocSh, String& sModule )
return sModuleInfo;
}
-void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String& sSource )
+void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, const rtl::OUString& sModuleName, const rtl::OUString& sSource )
{
SfxObjectShell& rDocSh = *rDoc.GetDocumentShell();
uno::Reference< script::XLibraryContainer > xLibContainer = rDocSh.GetBasicContainer();
@@ -2651,7 +2651,7 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String
// if the Module with codename exists then find a new name
sal_Int32 nNum = 0;
String genModuleName;
- if ( sModuleName.Len() )
+ if ( !sModuleName.isEmpty() )
genModuleName = sModuleName;
else
{
@@ -2663,7 +2663,7 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String
uno::Any aSourceAny;
rtl::OUString sTmpSource = sSource;
- if ( sTmpSource.getLength() == 0 )
+ if ( sTmpSource.isEmpty() )
sTmpSource = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Rem Attribute VBA_ModuleType=VBADocumentModule\nOption VBASupport 1\n" ));
aSourceAny <<= sTmpSource;
uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY );
@@ -2735,7 +2735,6 @@ sal_Bool ScDocFunc::InsertTable( SCTAB nTab, const String& rName, sal_Bool bReco
if (pDoc->InsertTab( nTab, rName ))
{
- String sCodeName;
if (bRecord)
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoInsertTab( &rDocShell, nTab, bAppend, rName));
@@ -2743,7 +2742,7 @@ sal_Bool ScDocFunc::InsertTable( SCTAB nTab, const String& rName, sal_Bool bReco
// Only insert vba modules if vba mode ( and not currently importing XML )
if( bInsertDocModule )
{
- String sSource;
+ rtl::OUString sSource, sCodeName;
VBA_InsertModule( *pDoc, nTab, sCodeName, sSource );
}
rDocShell.Broadcast( ScTablesHint( SC_TAB_INSERTED, nTab ) );
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index d09eb8f33647..93bb4bcef2ad 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1605,18 +1605,19 @@ xub_StrLen lcl_ScDocShell_GetColWidthInChars( sal_uInt16 nWidth )
}
-void lcl_ScDocShell_GetFixedWidthString( String& rStr, const ScDocument& rDoc,
+void lcl_ScDocShell_GetFixedWidthString( rtl::OUString& rStr, const ScDocument& rDoc,
SCTAB nTab, SCCOL nCol, sal_Bool bValue, SvxCellHorJustify eHorJust )
{
+ String aString = rStr;
xub_StrLen nLen = lcl_ScDocShell_GetColWidthInChars(
rDoc.GetColWidth( nCol, nTab ) );
- if ( nLen < rStr.Len() )
+ if ( nLen < aString.Len() )
{
if ( bValue )
- rStr.AssignAscii( "###" );
- rStr.Erase( nLen );
+ aString.AssignAscii( "###" );
+ aString.Erase( nLen );
}
- if ( nLen > rStr.Len() )
+ if ( nLen > aString.Len() )
{
if ( bValue && eHorJust == SVX_HOR_JUSTIFY_STANDARD )
eHorJust = SVX_HOR_JUSTIFY_RIGHT;
@@ -1625,30 +1626,31 @@ void lcl_ScDocShell_GetFixedWidthString( String& rStr, const ScDocument& rDoc,
case SVX_HOR_JUSTIFY_RIGHT:
{
String aTmp;
- aTmp.Fill( nLen - rStr.Len() );
- rStr.Insert( aTmp, 0 );
+ aTmp.Fill( nLen - aString.Len() );
+ aString.Insert( aTmp, 0 );
}
break;
case SVX_HOR_JUSTIFY_CENTER:
{
- xub_StrLen nLen2 = (nLen - rStr.Len()) / 2;
+ xub_StrLen nLen2 = (nLen - aString.Len()) / 2;
String aTmp;
aTmp.Fill( nLen2 );
- rStr.Insert( aTmp, 0 );
- rStr.Expand( nLen );
+ aString.Insert( aTmp, 0 );
+ aString.Expand( nLen );
}
break;
default:
- rStr.Expand( nLen );
+ aString.Expand( nLen );
}
}
+ rStr = aString;
}
void lcl_ScDocShell_WriteEmptyFixedWidthString( SvStream& rStream,
const ScDocument& rDoc, SCTAB nTab, SCCOL nCol )
{
- String aString;
+ rtl::OUString aString;
lcl_ScDocShell_GetFixedWidthString( aString, rDoc, nTab, nCol, false,
SVX_HOR_JUSTIFY_STANDARD );
rStream.WriteUnicodeOrByteText( aString );
@@ -1706,7 +1708,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
ScProgress aProgress( this, ScGlobal::GetRscString( STR_SAVE_DOC ), nEndRow );
- String aString;
+ rtl::OUString aString;
ScTabViewShell* pViewSh = PTR_CAST(ScTabViewShell, SfxViewShell::Current());
const ScViewOptions& rOpt = (pViewSh)
@@ -1800,7 +1802,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
{
case CELLTYPE_NOTE:
case CELLTYPE_NONE:
- aString.Erase();
+ aString = rtl::OUString();
bString = false;
break;
case CELLTYPE_FORMULA :
@@ -1888,7 +1890,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
break;
default:
OSL_FAIL( "ScDocShell::AsciiSave: unknown CellType" );
- aString.Erase();
+ aString = rtl::OUString();
bString = false;
}
@@ -1903,14 +1905,15 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
}
else
{
- if (!bString && cStrDelim != 0 && aString.Len() > 0)
+ String aUniString = aString;//remove that later
+ if (!bString && cStrDelim != 0 && aUniString.Len() > 0)
{
- sal_Unicode c = aString.GetChar(0);
+ sal_Unicode c = aUniString.GetChar(0);
bString = (c == cStrDelim || c == ' ' ||
- aString.GetChar( aString.Len()-1) == ' ' ||
- aString.Search( cStrDelim) != STRING_NOTFOUND);
+ aUniString.GetChar( aUniString.Len()-1) == ' ' ||
+ aUniString.Search( cStrDelim) != STRING_NOTFOUND);
if (!bString && cDelim != 0)
- bString = (aString.Search( cDelim) != STRING_NOTFOUND);
+ bString = (aUniString.Search( cDelim) != STRING_NOTFOUND);
}
if ( bString )
{
@@ -1918,20 +1921,20 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
{
if ( eCharSet == RTL_TEXTENCODING_UNICODE )
{
- xub_StrLen nPos = aString.Search( cStrDelim );
+ xub_StrLen nPos = aUniString.Search( cStrDelim );
// #i116636# quotes are needed if text delimiter (quote), field delimiter, or LF is in the cell text
bool bNeedQuotes = rAsciiOpt.bQuoteAllText ||
( nPos != STRING_NOTFOUND ) ||
- ( aString.Search( cDelim ) != STRING_NOTFOUND ) ||
- ( aString.Search( sal_Unicode(_LF) ) != STRING_NOTFOUND );
+ ( aUniString.Search( cDelim ) != STRING_NOTFOUND ) ||
+ ( aUniString.Search( sal_Unicode(_LF) ) != STRING_NOTFOUND );
while ( nPos != STRING_NOTFOUND )
{
- aString.Insert( cStrDelim, nPos );
- nPos = aString.Search( cStrDelim, nPos+2 );
+ aUniString.Insert( cStrDelim, nPos );
+ nPos = aUniString.Search( cStrDelim, nPos+2 );
}
if ( bNeedQuotes )
rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
- rStream.WriteUnicodeText( aString );
+ rStream.WriteUnicodeText( aUniString );
if ( bNeedQuotes )
rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
}
@@ -1954,7 +1957,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
if ( bContextOrNotAsciiEncoding )
{
// to byte encoding
- ByteString aStrEnc( aString, eCharSet );
+ ByteString aStrEnc( aUniString, eCharSet );
// back to Unicode
UniString aStrDec( aStrEnc, eCharSet );
// search on re-decoded string
@@ -1978,7 +1981,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
}
else
{
- ByteString aStrEnc( aString, eCharSet );
+ ByteString aStrEnc( aUniString, eCharSet );
// search on encoded string
xub_StrLen nPos = aStrEnc.Search( aStrDelimEncoded );
bool bNeedQuotes = rAsciiOpt.bQuoteAllText ||
@@ -2003,10 +2006,10 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
}
}
else
- rStream.WriteUnicodeOrByteText( aString );
+ rStream.WriteUnicodeOrByteText( aUniString );
}
else
- rStream.WriteUnicodeOrByteText( aString );
+ rStream.WriteUnicodeOrByteText( aUniString );
}
if( nCol < nEndCol )
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 49b5f459efd2..23355664b27b 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -1063,7 +1063,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
break;
case SC_CAT_INSERT_TABS :
{
- String aName;
+ rtl::OUString aName;
aDocument.CreateValidTabName( aName );
GetDocFunc().InsertTable( aSourceRange.aStart.Tab(), aName, sal_True, false );
}
@@ -1230,7 +1230,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
ScDocument* pTmpDoc = new ScDocument;
for ( sal_Int32 nIndex = 0; nIndex < aDocument.GetTableCount(); ++nIndex )
{
- String sTabName;
+ rtl::OUString sTabName;
pTmpDoc->CreateValidTabName( sTabName );
pTmpDoc->InsertTab( SC_TAB_APPEND, sTabName );
}
@@ -1275,7 +1275,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
pTmpDoc = new ScDocument;
for ( sal_Int32 nIndex = 0; nIndex < aDocument.GetTableCount(); ++nIndex )
{
- String sTabName;
+ rtl::OUString sTabName;
pTmpDoc->CreateValidTabName( sTabName );
pTmpDoc->InsertTab( SC_TAB_APPEND, sTabName );
}
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index f8875896f4b5..858809bcda24 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1334,8 +1334,8 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
{
ScDocShellModificator aModificator( *this );
- String aNewName = pStyle->GetName();
- String aOldName = aNewName;
+ rtl::OUString aNewName = pStyle->GetName();
+ rtl::OUString aOldName = aNewName;
sal_Bool bExtended = rHint.ISA(SfxStyleSheetHintExtended); // Name geaendert?
if (bExtended)
aOldName = ((SfxStyleSheetHintExtended&)rHint).GetOldName();
@@ -1372,8 +1372,8 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
{
if ( nId == SFX_STYLESHEET_MODIFIED)
{
- String aNewName = pStyle->GetName();
- String aOldName = aNewName;
+ rtl::OUString aNewName = pStyle->GetName();
+ rtl::OUString aOldName = aNewName;
sal_Bool bExtended = rHint.ISA(SfxStyleSheetHintExtended);
if (bExtended)
aOldName = ((SfxStyleSheetHintExtended&)rHint).GetOldName();
@@ -1504,7 +1504,7 @@ sal_Bool ScDocShell::AdjustPrintZoom( const ScRange& rRange )
return bChange;
}
-void ScDocShell::PageStyleModified( const String& rStyleName, sal_Bool bApi )
+void ScDocShell::PageStyleModified( const rtl::OUString& rStyleName, sal_Bool bApi )
{
ScDocShellModificator aModificator( *this );
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index a2d5ba50bcd4..081fe0d0161e 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -75,7 +75,7 @@
#include <vector>
// defined in docfunc.cxx
-void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String& sModuleSource );
+void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, const rtl::OUString& sModuleName, const rtl::OUString& sModuleSource );
using com::sun::star::script::XLibraryContainer;
using com::sun::star::script::vba::XVBACompatibility;
@@ -943,8 +943,8 @@ sal_Bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bCopy, s
SCTAB nTabToUse = nDestTab;
if ( nDestTab == SC_TAB_APPEND )
nTabToUse = aDocument.GetMaxTableNumber() - 1;
- String sCodeName;
- String sSource;
+ rtl::OUString sCodeName;
+ rtl::OUString sSource;
Reference< XNameContainer > xLib;
if( xLibContainer.is() )
{
@@ -953,9 +953,7 @@ sal_Bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bCopy, s
}
if( xLib.is() )
{
- rtl::OUString sRTLSource;
- xLib->getByName( sSrcCodeName ) >>= sRTLSource;
- sSource = sRTLSource;
+ xLib->getByName( sSrcCodeName ) >>= sSource;
}
VBA_InsertModule( aDocument, nTabToUse, sCodeName, sSource );
}
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index d2f72271dfce..511abb514363 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -425,9 +425,9 @@ void ScDocShell::UpdateLinks()
for (SCTAB i=0; i<nTabCount; i++)
if (aDocument.IsLinked(i))
{
- String aDocName = aDocument.GetLinkDoc(i);
- String aFltName = aDocument.GetLinkFlt(i);
- String aOptions = aDocument.GetLinkOpt(i);
+ rtl::OUString aDocName = aDocument.GetLinkDoc(i);
+ rtl::OUString aFltName = aDocument.GetLinkFlt(i);
+ rtl::OUString aOptions = aDocument.GetLinkOpt(i);
sal_uLong nRefresh = aDocument.GetLinkRefreshDelay(i);
sal_Bool bThere = false;
for (SCTAB j=0; j<i && !bThere; j++) // im Dokument mehrfach?
@@ -453,7 +453,9 @@ void ScDocShell::UpdateLinks()
{
ScTableLink* pLink = new ScTableLink( this, aDocName, aFltName, aOptions, nRefresh );
pLink->SetInCreate( sal_True );
- pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aDocName, &aFltName );
+ String aStringDocName = aDocName;
+ String aStringFltName = aFltName;
+ pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aStringDocName, &aStringFltName );
pLink->Update();
pLink->SetInCreate( false );
}
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index c97dddf7861a..9058f7be4cb5 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -772,14 +772,14 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
}
-inline void lcl_getLongVarCharEditString( String& rString,
+inline void lcl_getLongVarCharEditString( rtl::OUString& rString,
const ScBaseCell* pCell, ScFieldEditEngine& rEditEngine )
{
rEditEngine.SetText( *((const ScEditCell*)pCell)->GetData() );
rString = rEditEngine.GetText( LINEEND_CRLF );
}
-inline void lcl_getLongVarCharString( String& rString, ScBaseCell* pCell,
+inline void lcl_getLongVarCharString( rtl::OUString& rString, ScBaseCell* pCell,
ScDocument& rDocument, SCCOL nCol, SCROW nRow, SCTAB nTab,
SvNumberFormatter& rNumFmt )
{
@@ -833,7 +833,7 @@ sal_uLong ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet
// also needed for exception catch
SCROW nDocRow = 0;
ScFieldEditEngine aEditEngine( aDocument.GetEditPool() );
- String aString;
+ rtl::OUString aString;
String aTabName;
try
@@ -996,7 +996,7 @@ sal_uLong ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet
case sdbc::DataType::VARCHAR:
aDocument.GetString( nDocCol, nDocRow, nTab, aString );
xRowUpdate->updateString( nCol+1, aString );
- if ( nErr == eERR_OK && pColLengths[nCol] < aString.Len() )
+ if ( nErr == eERR_OK && pColLengths[nCol] < aString.getLength() )
nErr = SCWARN_EXPORT_DATALOST;
break;
@@ -1136,7 +1136,7 @@ sal_uLong ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet
#endif
}
else
- nLen = aString.Len() * sizeof(sal_Unicode);
+ nLen = aString.getLength() * sizeof(sal_Unicode);
if (!bEncErr &&
pColTypes[nCol] != sdbc::DataType::LONGVARCHAR &&
pColLengths[nCol] < nLen)
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index 386dde4ea179..a5d537f7a407 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -547,20 +547,20 @@ void ScDocumentLoader::RemoveAppPrefix( rtl::OUString& rFilterName )
rFilterName = rFilterName.copy(nPreLen);
}
-ScDocumentLoader::ScDocumentLoader( const String& rFileName,
- String& rFilterName, String& rOptions,
+ScDocumentLoader::ScDocumentLoader( const rtl::OUString& rFileName,
+ rtl::OUString& rFilterName, rtl::OUString& rOptions,
sal_uInt32 nRekCnt, bool bWithInteraction ) :
pDocShell(0),
pMedium(0)
{
- if ( !rFilterName.Len() )
+ if ( rFilterName.isEmpty() )
GetFilterName( rFileName, rFilterName, rOptions, true, bWithInteraction );
const SfxFilter* pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName( rFilterName );
// ItemSet immer anlegen, damit die DocShell die Optionen setzen kann
SfxItemSet* pSet = new SfxAllItemSet( SFX_APP()->GetPool() );
- if ( rOptions.Len() )
+ if ( !rOptions.isEmpty() )
pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, rOptions ) );
pMedium = new SfxMedium( rFileName, STREAM_STD_READ, false, pFilter, pSet );
@@ -587,8 +587,8 @@ ScDocumentLoader::ScDocumentLoader( const String& rFileName,
pDocShell->DoLoad( pMedium );
- String aNew = GetOptions(*pMedium); // Optionen werden beim Laden per Dialog gesetzt
- if (aNew.Len() && aNew != rOptions)
+ rtl::OUString aNew = GetOptions(*pMedium); // Optionen werden beim Laden per Dialog gesetzt
+ if (!aNew.isEmpty() && aNew != rOptions)
rOptions = aNew;
}
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 3efae6b07752..610f16f1813a 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -632,7 +632,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
if ( nToTable == pScDoc->GetTableCount() )
{
// dann los...
- String aTabName;
+ rtl::OUString aTabName;
SCTAB nNewTab = pScDoc->GetTableCount();
pScDoc->CreateValidTabName( aTabName );
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index c3b5c932b14a..c468ddfa9341 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -284,7 +284,7 @@ public:
void LoadStylesArgs( ScDocShell& rSource, sal_Bool bReplace, sal_Bool bCellStyles, sal_Bool bPageStyles );
- void PageStyleModified( const String& rStyleName, sal_Bool bApi );
+ void PageStyleModified( const rtl::OUString& rStyleName, sal_Bool bApi );
void NotifyStyle( const SfxStyleSheetHint& rHint );
void DoAutoStyle( const ScRange& rRange, const String& rStyle );
diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx
index 20724fa7293d..e3cf0e7c2d62 100644
--- a/sc/source/ui/inc/linkarea.hxx
+++ b/sc/source/ui/inc/linkarea.hxx
@@ -76,7 +76,7 @@ private:
void UpdateSourceRanges();
void UpdateEnable();
- void LoadDocument( const String& rFile, const String& rFilter,
+ void LoadDocument( const rtl::OUString& rFile, const String& rFilter,
const String& rOptions );
public:
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index d5e47ce425e2..718f02702b1b 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -130,7 +130,7 @@ void ScInsertTableDlg::Init_Impl( bool bFromFile )
if(nTableCount==1)
{
- String aName;
+ rtl::OUString aName;
rDoc.CreateValidTabName( aName );
aEdName.SetText( aName );
}
@@ -299,7 +299,7 @@ IMPL_LINK( ScInsertTableDlg, CountHdl_Impl, NumericField*, EMPTYARG )
nTableCount = static_cast<SCTAB>(aNfCount.GetValue());
if ( nTableCount==1)
{
- String aName;
+ rtl::OUString aName;
rDoc.CreateValidTabName( aName );
aEdName.SetText( aName );
aFtName.Enable();
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index dd7d129b0c58..67fe1ac1157e 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -150,7 +150,7 @@ IMPL_LINK( ScLinkedAreaDlg, FileHdl, ComboBox*, EMPTYARG )
return 0;
}
-void ScLinkedAreaDlg::LoadDocument( const String& rFile, const String& rFilter, const String& rOptions )
+void ScLinkedAreaDlg::LoadDocument( const rtl::OUString& rFile, const String& rFilter, const String& rOptions )
{
if ( pSourceShell )
{
@@ -160,12 +160,12 @@ void ScLinkedAreaDlg::LoadDocument( const String& rFile, const String& rFilter,
aSourceRef.Clear();
}
- if ( rFile.Len() )
+ if ( rFile.getLength() )
{
WaitObject aWait( this );
- String aNewFilter = rFilter;
- String aNewOptions = rOptions;
+ rtl::OUString aNewFilter = rFilter;
+ rtl::OUString aNewOptions = rOptions;
SfxErrorContext aEc( ERRCTX_SFX_OPENDOC, rFile );
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index a89cf6f06bc2..c29cc630db30 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -313,12 +313,12 @@ IMPL_LINK( ScMoveTableDlg, OkHdl, void *, EMPTYARG )
{
// Return an empty string when the new name is the same as the
// automatic name assigned by the document.
- String aCopyName = maDefaultName;
+ rtl::OUString aCopyName = maDefaultName;
ScDocument* pDoc = GetSelectedDoc();
if (pDoc)
pDoc->CreateValidTabName(aCopyName);
- if (aCopyName == aEdTabName.GetText())
- aEdTabName.SetText( String() );
+ if (aCopyName == rtl::OUString(aEdTabName.GetText()))
+ aEdTabName.SetText( rtl::OUString() );
}
else
{
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index 5c4fa32b1381..3607f7a1adea 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -389,7 +389,7 @@ void ScOptSolverDlg::Init(const ScAddress& rCursorPos)
else
{
maRbMax.Check();
- String aCursorStr;
+ rtl::OUString aCursorStr;
if ( !mpDoc->GetRangeAtBlock( ScRange(rCursorPos), &aCursorStr ) )
rCursorPos.Format( aCursorStr, SCA_ABS, NULL, mpDoc->GetAddressConvention() );
maEdObjectiveCell.SetRefString( aCursorStr );
@@ -503,7 +503,7 @@ void ScOptSolverDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
if ( bSingle )
aNewRef.aEnd = aAdr;
- String aName;
+ rtl::OUString aName;
if ( pDocP->GetRangeAtBlock( aNewRef, &aName ) ) // named range: show name
aStr = aName;
else // format cell/range reference
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 25330e7ca78c..bd32d1c50d57 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -1204,8 +1204,9 @@ void ScContentTree::DoDrag()
ScDocShell* pSrcShell = NULL;
if ( bHiddenDoc )
{
- String aFilter, aOptions;
- pDocLoader = new ScDocumentLoader( aHiddenName, aFilter, aOptions );
+ rtl::OUString aFilter, aOptions;
+ rtl::OUString aURL = aHiddenName;
+ pDocLoader = new ScDocumentLoader( aURL, aFilter, aOptions );
if (!pDocLoader->IsError())
pSrcShell = pDocLoader->GetDocShell();
}
@@ -1282,8 +1283,9 @@ sal_Bool ScContentTree::LoadFile( const String& rUrl )
aDocName.Erase(nPos); // nur der Name, ohne #...
sal_Bool bReturn = false;
- String aFilter, aOptions;
- ScDocumentLoader aLoader( aDocName, aFilter, aOptions );
+ rtl::OUString aURL = aDocName;
+ rtl::OUString aFilter, aOptions;
+ ScDocumentLoader aLoader( aURL, aFilter, aOptions );
if ( !aLoader.IsError() )
{
bHiddenDoc = sal_True;
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 1a2f9f58707e..0dc6c48d1d18 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -1120,7 +1120,7 @@ ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, const String& rDoc ) :
{
sal_uInt8 nMode = pDoc->GetLinkMode(i);
if (nMode)
- if (pDoc->GetLinkDoc(i) == aDocName)
+ if (pDoc->GetLinkDoc(i) == rtl::OUString(aDocName))
{
if (!nCount)
{
@@ -1130,8 +1130,8 @@ ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, const String& rDoc ) :
}
else
{
- OSL_ENSURE(aFltName == pDoc->GetLinkFlt(i) &&
- aOptions == pDoc->GetLinkOpt(i),
+ OSL_ENSURE(rtl::OUString(aFltName) == pDoc->GetLinkFlt(i) &&
+ rtl::OUString(aOptions) == pDoc->GetLinkOpt(i),
"verschiedene Filter fuer ein Dokument?");
}
pTabs[nCount] = i;
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 5f7db570726b..618a8f5e40f5 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -1272,7 +1272,7 @@ sal_Bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
// used in ScCellRangeObj::getFormulaArray and ScCellObj::GetInputString_Impl
String lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPosition, sal_Bool bEnglish )
{
- String aVal;
+ rtl::OUString aVal;
if ( pDoc )
{
ScBaseCell* pCell = pDoc->GetCell( rPosition );
@@ -1314,16 +1314,18 @@ String lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPosition, sal_Boo
if ( eType == CELLTYPE_STRING || eType == CELLTYPE_EDIT )
{
double fDummy;
- sal_Bool bIsNumberFormat(pFormatter->IsNumberFormat(aVal, nNumFmt, fDummy));
+ String aTempString = aVal;
+ sal_Bool bIsNumberFormat(pFormatter->IsNumberFormat(aTempString, nNumFmt, fDummy));
if ( bIsNumberFormat )
- aVal.Insert('\'',0);
- else if ( aVal.Len() && aVal.GetChar(0) == '\'' )
+ aTempString.Insert('\'',0);
+ else if ( aTempString.Len() && aTempString.GetChar(0) == '\'' )
{
// if the string starts with a "'", add another one because setFormula
// strips one (like text input, except for "text" number formats)
if ( bEnglish || ( pFormatter->GetType(nNumFmt) != NUMBERFORMAT_TEXT ) )
- aVal.Insert('\'',0);
+ aTempString.Insert('\'',0);
}
+ aVal = aTempString;
}
}
}
@@ -6174,7 +6176,7 @@ String ScCellObj::GetInputString_Impl(sal_Bool bEnglish) const // fuer getF
String ScCellObj::GetOutputString_Impl(ScDocument* pDoc, const ScAddress& aCellPos)
{
- String aVal;
+ rtl::OUString aVal;
if ( pDoc )
{
ScBaseCell* pCell = pDoc->GetCell( aCellPos );
@@ -8223,7 +8225,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
rtl::OUString aStrVal;
aValue >>= aStrVal;
- String aNewStr(ScStyleNameConversion::ProgrammaticToDisplayName(
+ rtl::OUString aNewStr(ScStyleNameConversion::ProgrammaticToDisplayName(
aStrVal, SFX_STYLE_FAMILY_PAGE ));
//! Undo? (auch bei SID_STYLE_APPLY an der View)
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 8015b2c876af..46f94f8d52e7 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -2333,10 +2333,10 @@ uno::Reference<drawing::XDrawPage> SAL_CALL ScDrawPagesObj::insertNewByIndex( sa
uno::Reference<drawing::XDrawPage> xRet;
if (pDocShell)
{
- String aNewName;
+ rtl::OUString aNewName;
pDocShell->GetDocument()->CreateValidTabName(aNewName);
ScDocFunc aFunc(*pDocShell);
- if ( aFunc.InsertTable( (SCTAB)nPos, aNewName, sal_True, sal_True ) )
+ if ( aFunc.InsertTable( static_cast<SCTAB>(nPos), aNewName, true, true ) )
xRet.set(GetObjectByIndex_Impl( nPos ));
}
return xRet;
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index 1a64b92ab960..a5af4e632742 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -312,7 +312,7 @@ void ScSheetLinkObj::setFileName(const rtl::OUString& rNewName)
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
- if ( pDoc->IsLinked(nTab) && pDoc->GetLinkDoc(nTab) == aFileName ) // alte Datei
+ if ( pDoc->IsLinked(nTab) && pDoc->GetLinkDoc(nTab) == rtl::OUString(aFileName) ) // alte Datei
pDoc->SetLink( nTab, pDoc->GetLinkMode(nTab), aNewStr,
pDoc->GetLinkFlt(nTab), pDoc->GetLinkOpt(nTab),
pDoc->GetLinkTab(nTab),
@@ -1305,7 +1305,7 @@ ScDDELinkObj* ScDDELinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
{
if (pDocShell)
{
- String aAppl, aTopic, aItem;
+ rtl::OUString aAppl, aTopic, aItem;
if ( nIndex <= USHRT_MAX &&
pDocShell->GetDocument()->GetDdeLinkData( (sal_uInt16)nIndex, aAppl, aTopic, aItem ) )
return new ScDDELinkObj( pDocShell, aAppl, aTopic, aItem );
@@ -1318,7 +1318,7 @@ ScDDELinkObj* ScDDELinksObj::GetObjectByName_Impl(const rtl::OUString& aName)
if (pDocShell)
{
String aNamStr(aName);
- String aAppl, aTopic, aItem;
+ rtl::OUString aAppl, aTopic, aItem;
ScDocument* pDoc = pDocShell->GetDocument();
sal_uInt16 nCount = pDoc->GetDdeLinkCount();
@@ -1393,7 +1393,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScDDELinksObj::getElementNames() throw(uno
SolarMutexGuard aGuard;
if (pDocShell)
{
- String aAppl, aTopic, aItem;
+ rtl::OUString aAppl, aTopic, aItem;
ScDocument* pDoc = pDocShell->GetDocument();
sal_uInt16 nCount = pDoc->GetDdeLinkCount();
@@ -1417,7 +1417,7 @@ sal_Bool SAL_CALL ScDDELinksObj::hasByName( const rtl::OUString& aName )
if (pDocShell)
{
String aNamStr(aName);
- String aAppl, aTopic, aItem;
+ rtl::OUString aAppl, aTopic, aItem;
ScDocument* pDoc = pDocShell->GetDocument();
sal_uInt16 nCount = pDoc->GetDdeLinkCount();
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 41cef8d44003..0efc5577e08e 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -689,8 +689,8 @@ void SAL_CALL ScStyleFamiliesObj::loadStylesFromURL( const rtl::OUString& aURL,
//! use aOptions (like Writer)
//! set flag to disable filter option dialogs when importing
- String aFilter; // empty - detect
- String aFiltOpt;
+ rtl::OUString aFilter; // empty - detect
+ rtl::OUString aFiltOpt;
ScDocumentLoader aLoader( aURL, aFilter, aFiltOpt );
ScDocShell* pSource = aLoader.GetDocShell();
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 3b03dec46a73..e4c4f9e0fa96 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -2154,7 +2154,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet
String aUndo = ScGlobal::GetRscString( STR_UNDO_DOOUTLINE );
pMgr->EnterListAction( aUndo, aUndo );
- String aNewTabName;
+ rtl::OUString aNewTabName;
pDoc->CreateValidTabName(aNewTabName);
if ( InsertTable(aNewTabName, nNewTab) )
PasteFromClip( IDF_ALL, pInsDoc.get() );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index aab30fc77519..bc78aaa4c03b 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3407,7 +3407,8 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
ScDocument* pThisDoc = pViewData->GetDocument();
if (pSourceDoc == pThisDoc)
{
- if ( pThisDoc->HasChartAtPoint(pViewData->GetTabNo(), PixelToLogic(aPos)) )
+ rtl::OUString aName;
+ if ( pThisDoc->HasChartAtPoint(pViewData->GetTabNo(), PixelToLogic(aPos), aName ))
{
if (bDragRect) // Rechteck loeschen
{
@@ -3957,8 +3958,8 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
}
else // move/copy block
{
- String aChartName;
- if (pThisDoc->HasChartAtPoint( nThisTab, rLogicPos, &aChartName ))
+ rtl::OUString aChartName;
+ if (pThisDoc->HasChartAtPoint( nThisTab, rLogicPos, aChartName ))
{
String aRangeName;
aSource.Format( aRangeName, SCR_ABS_3D, pThisDoc );
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index b0dba17f4507..1b732e72fbb7 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -495,12 +495,14 @@ sal_Bool ScDrawStringsVars::SetText( ScBaseCell* pCell )
Color* pColor;
sal_uLong nFormat = GetValueFormat();
+ rtl::OUString aOUString = aString;
ScCellFormat::GetString( pCell,
- nFormat, aString, &pColor,
+ nFormat, aOUString, &pColor,
*pOutput->pDoc->GetFormatTable(),
pOutput->bShowNullValues,
pOutput->bShowFormulas,
ftCheck );
+ aString = aOUString;
if (aString.Len() > DRAWTEXT_MAX)
aString.Erase(DRAWTEXT_MAX);
@@ -2167,7 +2169,7 @@ bool ScOutputData::DrawEditParam::readCellContent(
{
sal_uLong nFormat = mpPattern->GetNumberFormat(
pDoc->GetFormatTable(), mpCondSet );
- String aString;
+ rtl::OUString aString;
Color* pColor;
ScCellFormat::GetString( mpCell,
nFormat,aString, &pColor,
@@ -4904,7 +4906,7 @@ void ScOutputData::DrawRotated(sal_Bool bPixelToLogic)
{
sal_uLong nFormat = pPattern->GetNumberFormat(
pDoc->GetFormatTable(), pCondSet );
- String aString;
+ rtl::OUString aString;
Color* pColor;
ScCellFormat::GetString( pCell,
nFormat,aString, &pColor,
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 7c07e11c714f..592bc82425f5 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -2440,7 +2440,7 @@ sal_Bool ScPrintFunc::UpdatePages()
nZoom = ZOOM_MIN;
}
- String aName = pDoc->GetPageStyle( nPrintTab );
+ rtl::OUString aName = pDoc->GetPageStyle( nPrintTab );
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if ( nTab==nPrintTab || pDoc->GetPageStyle(nTab)==aName )
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 18ec9bbecae3..db140e745adf 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -185,7 +185,7 @@ void ScTabControl::MouseButtonUp( const MouseEvent& rMEvt )
ScDocument* pDoc = pViewData->GetDocument();
if (!pDoc->IsDocEditable())
return;
- String aName;
+ rtl::OUString aName;
pDoc->CreateValidTabName(aName);
SCTAB nTabCount = pDoc->GetTableCount();
pViewData->GetViewShell()->InsertTable(aName, nTabCount);
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index ee80993645f1..6b900e452ab3 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2299,9 +2299,10 @@ void ScViewFunc::InsertTableLink( const String& rFile,
const String& rFilter, const String& rOptions,
const String& rTabName )
{
- String aFilterName = rFilter;
- String aOpt = rOptions;
- ScDocumentLoader aLoader( rFile, aFilterName, aOpt );
+ rtl::OUString aFilterName = rFilter;
+ rtl::OUString aOpt = rOptions;
+ rtl::OUString aURL = rFile;
+ ScDocumentLoader aLoader( aURL, aFilterName, aOpt );
if (!aLoader.IsError())
{
ScDocShell* pSrcSh = aLoader.GetDocShell();
@@ -2754,7 +2755,7 @@ void ScViewFunc::MoveTable(
for (size_t j = 0; j < n; ++j)
{
SCTAB nRenameTab = (*pDestTabs)[j];
- String aTabName = *pNewTabName;
+ rtl::OUString aTabName = *pNewTabName;
pDoc->CreateValidTabName( aTabName );
pDestNames->push_back(aTabName);
pDoc->RenameTab(nRenameTab, aTabName);