diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-08-26 19:33:59 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-08-26 19:34:42 -0400 |
commit | 69841530937c5a110bd37fe7c0c600a19551ed07 (patch) | |
tree | c0d8ca5e4ca5c0f8c8e81f0a7918b09c2b4f36bc /sc/source/ui | |
parent | f952331f0cf11f624d1df7c1c5a7468c16ffdc82 (diff) |
String to rtl::OUString.
Diffstat (limited to 'sc/source/ui')
44 files changed, 171 insertions, 172 deletions
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx index 11bd1af6accc..725b90c91884 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx @@ -634,7 +634,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessiblePreviewTable::getImplementationId() if ( mpTableInfo ) { - String sCoreName; + rtl::OUString sCoreName; if (mpViewShell->GetDocument()->GetName( mpTableInfo->GetTab(), sCoreName )) sName.SearchAndReplaceAscii("%1", sCoreName); } diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx index 0704f32dcb12..2c54f38f78c5 100644 --- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx @@ -362,7 +362,7 @@ uno::Reference< XAccessible > SAL_CALL throw (uno::RuntimeException) { String sName(ScResId(STR_ACC_TABLE_NAME)); - String sCoreName; + rtl::OUString sCoreName; if (mpDoc && mpDoc->GetName( maRange.aStart.Tab(), sCoreName )) sName.SearchAndReplaceAscii("%1", sCoreName); return rtl::OUString(sName); diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index d99b7a277509..26d6bc46537e 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -600,7 +600,7 @@ void ScTransferObj::InitDocShell() pDestDoc->SetDocOptions( pDoc->GetDocOptions() ); // #i42666# - String aTabName; + rtl::OUString aTabName; pDoc->GetName( aBlock.aStart.Tab(), aTabName ); pDestDoc->RenameTab( 0, aTabName, false ); // no UpdateRef (empty) diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 773dfd081496..d5d04492e9e6 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -606,23 +606,18 @@ String AbstractScDPShowDetailDlg_Impl::GetDimensionName() const return pDlg->GetDimensionName(); } - - -void AbstractScNewScenarioDlg_Impl::SetScenarioData( const String& rName, const String& rComment, - const Color& rColor, sal_uInt16 nFlags ) +void AbstractScNewScenarioDlg_Impl::SetScenarioData( + const rtl::OUString& rName, const rtl::OUString& rComment, const Color& rColor, sal_uInt16 nFlags ) { - pDlg->SetScenarioData(rName,rComment, rColor,nFlags); + pDlg->SetScenarioData(rName, rComment, rColor, nFlags); } -void AbstractScNewScenarioDlg_Impl::GetScenarioData( String& rName, String& rComment, - Color& rColor, sal_uInt16& rFlags ) const +void AbstractScNewScenarioDlg_Impl::GetScenarioData( + rtl::OUString& rName, rtl::OUString& rComment, Color& rColor, sal_uInt16& rFlags ) const { - pDlg->GetScenarioData( rName,rComment,rColor,rFlags); + pDlg->GetScenarioData(rName, rComment, rColor, rFlags); } - - - void AbstractScShowTabDlg_Impl::Insert( const String& rString, sal_Bool bSelected ) { pDlg->Insert( rString, bSelected); @@ -649,7 +644,7 @@ String AbstractScShowTabDlg_Impl::GetSelectEntry(sal_uInt16 nPos) const -void AbstractScStringInputDlg_Impl::GetInputString( String& rString ) const +void AbstractScStringInputDlg_Impl::GetInputString( rtl::OUString& rString ) const { pDlg->GetInputString( rString ); } diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 2de66973efee..0ea51db0c22b 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -327,10 +327,10 @@ class AbstractScDPShowDetailDlg_Impl : public AbstractScDPShowDetailDlg class AbstractScNewScenarioDlg_Impl : public AbstractScNewScenarioDlg //add for ScNewScenarioDlg { DECL_ABSTDLG_BASE( AbstractScNewScenarioDlg_Impl, ScNewScenarioDlg ) - virtual void SetScenarioData( const String& rName, const String& rComment, + virtual void SetScenarioData( const rtl::OUString& rName, const rtl::OUString& rComment, const Color& rColor, sal_uInt16 nFlags ); - virtual void GetScenarioData( String& rName, String& rComment, + virtual void GetScenarioData( rtl::OUString& rName, rtl::OUString& rComment, Color& rColor, sal_uInt16& rFlags ) const; }; @@ -347,7 +347,7 @@ class AbstractScShowTabDlg_Impl : public AbstractScShowTabDlg //add for ScShowT class AbstractScStringInputDlg_Impl : public AbstractScStringInputDlg //add for ScStringInputDlg { DECL_ABSTDLG_BASE( AbstractScStringInputDlg_Impl, ScStringInputDlg ) - virtual void GetInputString( String& rString ) const; + virtual void GetInputString( rtl::OUString& rString ) const; }; class AbstractScTabBgColorDlg_Impl : public AbstractScTabBgColorDlg //add for ScTabBgColorDlg diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx index 466642b8e087..a018b1943d4f 100644 --- a/sc/source/ui/dbgui/scendlg.cxx +++ b/sc/source/ui/dbgui/scendlg.cxx @@ -158,13 +158,13 @@ ScNewScenarioDlg::~ScNewScenarioDlg() //------------------------------------------------------------------------ -void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment, +void ScNewScenarioDlg::GetScenarioData( rtl::OUString& rName, rtl::OUString& rComment, Color& rColor, sal_uInt16& rFlags ) const { rComment = aEdComment.GetText(); rName = aEdName.GetText(); - if ( rName.Len() == 0 ) + if (rName.isEmpty()) rName = aDefScenarioName; rColor = aLbColor.GetSelectEntryColor(); @@ -190,7 +190,7 @@ void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment, rFlags = nBits; } -void ScNewScenarioDlg::SetScenarioData( const String& rName, const String& rComment, +void ScNewScenarioDlg::SetScenarioData( const rtl::OUString& rName, const rtl::OUString& rComment, const Color& rColor, sal_uInt16 nFlags ) { aEdComment.SetText(rComment); diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 64c6cfcc5828..cb79c5026c75 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -2678,7 +2678,7 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String } } -void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName ) +void VBA_DeleteModule( ScDocShell& rDocSh, const rtl::OUString& sModuleName ) { uno::Reference< script::XLibraryContainer > xLibContainer = rDocSh.GetBasicContainer(); OSL_ENSURE( xLibContainer.is(), "No BasicContainer!" ); @@ -2784,7 +2784,7 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi pUndoDoc->AddUndoTab( 0, nCount-1 ); // alle Tabs fuer Referenzen pDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, pUndoDoc ); - String aOldName; + rtl::OUString aOldName; pDoc->GetName( nTab, aOldName ); pUndoDoc->RenameTab( nTab, aOldName, false ); if (bWasLinked) @@ -2796,7 +2796,7 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi if ( pDoc->IsScenario(nTab) ) { pUndoDoc->SetScenario( nTab, sal_True ); - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nScenFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags ); @@ -2814,7 +2814,7 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi pUndoData = new ScRefUndoData( pDoc ); } - String sCodeName; + rtl::OUString sCodeName; sal_Bool bHasCodeName = pDoc->GetCodeName( nTab, sCodeName ); if (pDoc->DeleteTab( nTab, pUndoDoc )) { @@ -2956,7 +2956,7 @@ sal_Bool ScDocFunc::RenameTable( SCTAB nTab, const String& rName, sal_Bool bReco ScDocShellModificator aModificator( rDocShell ); sal_Bool bSuccess = false; - String sOldName; + rtl::OUString sOldName; pDoc->GetName(nTab, sOldName); if (pDoc->RenameTab( nTab, rName )) { diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 87c0f8f7d62f..d09eb8f33647 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -319,16 +319,16 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) { if (aDocument.IsLinked( i )) { - String aName; + rtl::OUString aName; aDocument.GetName(i, aName); - String aLinkTabName = aDocument.GetLinkTab(i); - xub_StrLen nLinkTabNameLength = aLinkTabName.Len(); - xub_StrLen nNameLength = aName.Len(); + rtl::OUString aLinkTabName = aDocument.GetLinkTab(i); + sal_Int32 nLinkTabNameLength = aLinkTabName.getLength(); + sal_Int32 nNameLength = aName.getLength(); if (nLinkTabNameLength < nNameLength) { // remove the quottes on begin and end of the docname and restore the escaped quotes - const sal_Unicode* pNameBuffer = aName.GetBuffer(); + const sal_Unicode* pNameBuffer = aName.getStr(); if ( *pNameBuffer == '\'' && // all docnames have to have a ' character on the first pos ScGlobal::UnicodeStrChr( pNameBuffer, SC_COMPILER_FILE_TAB_SEP ) ) { @@ -349,8 +349,8 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) { xub_StrLen nIndex = nNameLength - nLinkTabNameLength; INetURLObject aINetURLObject(aDocURLBuffer.makeStringAndClear()); - if( aName.Equals(aLinkTabName, nIndex, nLinkTabNameLength) && - (aName.GetChar(nIndex - 1) == '#') && // before the table name should be the # char + if( String(aName).Equals(String(aLinkTabName), nIndex, nLinkTabNameLength) && + (aName.getStr()[nIndex - 1] == '#') && // before the table name should be the # char !aINetURLObject.HasError()) // the docname should be a valid URL { aName = ScGlobal::GetDocTabName( aDocument.GetLinkDoc( i ), aDocument.GetLinkTab( i ) ); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 7e9fb513807b..356b6b52de10 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -877,13 +877,13 @@ void ScDocShell::Execute( SfxRequest& rReq ) { if ( pItem->ISA(SfxStringItem) ) { - String aName = ((const SfxStringItem*)pItem)->GetValue(); + rtl::OUString aName = ((const SfxStringItem*)pItem)->GetValue(); SCTAB nTab; if (aDocument.GetTable( aName, nTab )) { if (aDocument.IsScenario(nTab)) { - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; aDocument.GetScenarioData( nTab, aComment, aColor, nFlags ); diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index 1e6c2474ffbc..c2d2958590db 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -484,9 +484,9 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource ) } } -String lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea ) +rtl::OUString lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea ) { - String aName; + rtl::OUString aName; sal_Bool bOk = false; ScDBData* pData = pDoc->GetDBAtArea( pArea->nTab, pArea->nColStart, pArea->nRowStart, pArea->nColEnd, pArea->nRowEnd ); @@ -666,14 +666,14 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, sal_Bool bRecord SCTAB nTabCount = aDocument.GetTableCount(); SCTAB nSrcTab = SCTAB_MAX; SCTAB nEndTab = nTab; - String aCompare; + rtl::OUString aCompare; while ( nEndTab+1 < nTabCount && aDocument.IsScenario(nEndTab+1) ) { ++nEndTab; if (nSrcTab > MAXTAB) // noch auf der Suche nach dem Szenario? { aDocument.GetName( nEndTab, aCompare ); - if (aCompare == rName) + if (aCompare.equals(rName)) nSrcTab = nEndTab; // gefunden } } @@ -702,7 +702,7 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, sal_Bool bRecord for (SCTAB i=nTab+1; i<=nEndTab; i++) { pUndoDoc->SetScenario( i, sal_True ); - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nScenFlags; aDocument.GetScenarioData( i, aComment, aColor, nScenFlags ); @@ -754,9 +754,9 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const String& rName, const String& const Color& rColor, sal_uInt16 nFlags ) { // Undo - String aOldName; + rtl::OUString aOldName; aDocument.GetName( nTab, aOldName ); - String aOldComment; + rtl::OUString aOldComment; Color aOldColor; sal_uInt16 nOldFlags; aDocument.GetScenarioData( nTab, aOldComment, aOldColor, nOldFlags ); @@ -772,7 +772,7 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const String& rName, const String& PostPaintGridAll(); aModificator.SetDocumentModified(); - if ( rName != aOldName ) + if (!aOldName.equals(rName)) SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); SfxBindings* pBindings = GetViewBindings(); @@ -862,7 +862,7 @@ sal_uLong ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos, if(nErrVal>0 && pSrcDoc->IsScenario( nSrcPos )) { - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; @@ -902,7 +902,7 @@ sal_Bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bCopy, s if (bRecord) aDocument.BeginDrawUndo(); // drawing layer must do its own undo actions - String sSrcCodeName; + rtl::OUString sSrcCodeName; aDocument.GetCodeName( nSrcTab, sSrcCodeName ); if (!aDocument.CopyTab( nSrcTab, nDestTab )) { diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 54380e25d6b1..cb8255085872 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -280,7 +280,7 @@ sal_Bool ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, if ( bNewUrlName && nMode == SC_LINK_VALUE ) { - String aName; + rtl::OUString aName; pDoc->GetName( nTab, aName ); if ( ScGlobal::GetpTransliteration()->isEqual( ScGlobal::GetDocTabName( aFileName, aTabName ), aName ) ) diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx index e654d8268604..b797bb370b08 100644 --- a/sc/source/ui/inc/navipi.hxx +++ b/sc/source/ui/inc/navipi.hxx @@ -290,7 +290,7 @@ private: void SetCurrentCell( SCCOL nCol, SCROW Row ); void SetCurrentCellStr( const String rName ); void SetCurrentTable( SCTAB nTab ); - void SetCurrentTableStr( const String rName ); + void SetCurrentTableStr( const rtl::OUString& rName ); void SetCurrentObject( const String rName ); void SetCurrentDoc( const String& rDocName ); diff --git a/sc/source/ui/inc/retypepassdlg.hxx b/sc/source/ui/inc/retypepassdlg.hxx index 92a41599821f..19250a728068 100644 --- a/sc/source/ui/inc/retypepassdlg.hxx +++ b/sc/source/ui/inc/retypepassdlg.hxx @@ -119,7 +119,7 @@ private: struct TableItem { - String maName; + rtl::OUString maName; TabProtectionPtr mpProtect; }; ::std::vector<TableItem> maTableItems; diff --git a/sc/source/ui/inc/scendlg.hxx b/sc/source/ui/inc/scendlg.hxx index e9acea5c11aa..4da9411f3477 100644 --- a/sc/source/ui/inc/scendlg.hxx +++ b/sc/source/ui/inc/scendlg.hxx @@ -45,11 +45,11 @@ public: ScNewScenarioDlg( Window* pParent, const String& rName, sal_Bool bEdit = false, sal_Bool bSheetProtected = false ); ~ScNewScenarioDlg(); - void SetScenarioData( const String& rName, const String& rComment, - const Color& rColor, sal_uInt16 nFlags ); + void SetScenarioData( const rtl::OUString& rName, const rtl::OUString& rComment, + const Color& rColor, sal_uInt16 nFlags ); - void GetScenarioData( String& rName, String& rComment, - Color& rColor, sal_uInt16& rFlags ) const; + void GetScenarioData( rtl::OUString& rName, rtl::OUString& rComment, + Color& rColor, sal_uInt16& rFlags ) const; private: FixedLine aFlName; diff --git a/sc/source/ui/inc/strindlg.hxx b/sc/source/ui/inc/strindlg.hxx index 16630a099a41..3d8c9744e02d 100644 --- a/sc/source/ui/inc/strindlg.hxx +++ b/sc/source/ui/inc/strindlg.hxx @@ -50,7 +50,7 @@ public: const rtl::OString& sHelpId, const rtl::OString& sEditHelpId ); ~ScStringInputDlg(); - void GetInputString( String& rString ) const; + void GetInputString( rtl::OUString& rString ) const; private: FixedText aFtEditTitle; diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx index 564f75708656..b2bfe045b7ff 100644 --- a/sc/source/ui/miscdlgs/conflictsdlg.cxx +++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx @@ -477,7 +477,7 @@ ScConflictsDlg::~ScConflictsDlg() String ScConflictsDlg::GetConflictString( const ScConflictsListEntry& rConflictEntry ) { - String aString; + rtl::OUString aString; if ( mpOwnTrack ) { const ScChangeAction* pAction = mpOwnTrack->GetAction( rConflictEntry.maOwnActions[ 0 ] ); diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx index 3a3e0726705e..d5e47ce425e2 100644 --- a/sc/source/ui/miscdlgs/instbdlg.cxx +++ b/sc/source/ui/miscdlgs/instbdlg.cxx @@ -233,7 +233,7 @@ void ScInsertTableDlg::FillTables_Impl( ScDocument* pSrcDoc ) if ( pSrcDoc ) { SCTAB nCount = pSrcDoc->GetTableCount(); - String aName; + rtl::OUString aName; for ( SCTAB i=0; i<nCount; i++ ) { diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx index c2a4d2036c7f..0da0a3234c6f 100644 --- a/sc/source/ui/miscdlgs/mvtabdlg.cxx +++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx @@ -339,7 +339,7 @@ IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb ) if ( pLb == &aLbDoc ) { ScDocument* pDoc = GetSelectedDoc(); - String aName; + rtl::OUString aName; aLbTable.Clear(); aLbTable.SetUpdateMode( false ); diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index 9ed724c31063..f78a922c789a 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -253,7 +253,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG ) if ( !bFmtInserted && pSelFmtData ) { String aStrStandard( SfxResId(STR_STANDARD) ); - String aFormatName; + rtl::OUString aFormatName; ScStringInputDlg* pDlg; sal_Bool bOk = false; @@ -269,7 +269,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG ) { pDlg->GetInputString( aFormatName ); - if ( (aFormatName.Len() > 0) && (aFormatName != aStrStandard) ) + if ( !aFormatName.isEmpty() && !aFormatName.equals(aStrStandard) ) { ScAutoFormatData* pNewData = new ScAutoFormatData( *pSelFmtData ); @@ -363,7 +363,7 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG ) while( !bOk ) { - String aFormatName=aLbFormat.GetSelectEntry(); + rtl::OUString aFormatName = aLbFormat.GetSelectEntry(); String aEntry; ScStringInputDlg* pDlg = new ScStringInputDlg( this, @@ -377,12 +377,12 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG ) pDlg->GetInputString( aFormatName ); sal_uInt16 n; - if ( aFormatName.Len() > 0 ) + if (!aFormatName.isEmpty()) { for( n = 0; n < pFormat->GetCount(); ++n ) { (*pFormat)[n]->GetName(aEntry); - if ( aEntry== aFormatName) + if (aFormatName.equals(aEntry)) break; } if( n >= pFormat->GetCount() ) diff --git a/sc/source/ui/miscdlgs/strindlg.cxx b/sc/source/ui/miscdlgs/strindlg.cxx index 1379145c539a..d511b1a72049 100644 --- a/sc/source/ui/miscdlgs/strindlg.cxx +++ b/sc/source/ui/miscdlgs/strindlg.cxx @@ -75,7 +75,7 @@ ScStringInputDlg::ScStringInputDlg( Window* pParent, //------------------------------------------------------------------------ -void ScStringInputDlg::GetInputString( String& rString ) const +void ScStringInputDlg::GetInputString( rtl::OUString& rString ) const { rString = aEdInput.GetText(); } diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx index e42dee1d50f3..6a22a44e2731 100644 --- a/sc/source/ui/namedlg/namedlg.cxx +++ b/sc/source/ui/namedlg/namedlg.cxx @@ -181,7 +181,7 @@ void ScNameDlg::Init() SCTAB n = pDoc->GetTableCount(); for (SCTAB i = 0; i < n; ++i) { - String aTabName; + rtl::OUString aTabName; pDoc->GetName(i, aTabName); maLbScope.InsertEntry(aTabName); } diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 5f2defeb6a61..5c07de058916 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -644,7 +644,7 @@ void ScContentTree::GetTableNames() if (!pDoc) return; - String aName; + rtl::OUString aName; SCTAB nCount = pDoc->GetTableCount(); for ( SCTAB i=0; i<nCount; i++ ) { diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index bb1eb1eae56f..afe56afb4328 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -1021,18 +1021,18 @@ void ScNavigatorDlg::SetCurrentTable( SCTAB nTabNo ) } } -void ScNavigatorDlg::SetCurrentTableStr( const String rName ) +void ScNavigatorDlg::SetCurrentTableStr( const rtl::OUString& rName ) { if (!GetViewData()) return; ScDocument* pDoc = pViewData->GetDocument(); SCTAB nCount = pDoc->GetTableCount(); - String aTabName; + rtl::OUString aTabName; for ( SCTAB i=0; i<nCount; i++ ) { pDoc->GetName( i, aTabName ); - if ( aTabName == rName ) + if ( aTabName.equals(rName) ) { SetCurrentTable( i ); return; diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 4b046f839ad4..6625dc08be77 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -1502,7 +1502,7 @@ void ScUndoUseScenario::Undo() for (SCTAB i = nTab+1; i<=nEndTab; i++) { // Flags immer - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nScenFlags; pUndoDoc->GetScenarioData( i, aComment, aColor, nScenFlags ); diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index 96f8d46ea4bb..4c94b983fddf 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -348,7 +348,7 @@ void ScUndoDeleteTab::Undo() ScDocument* pDoc = pDocShell->GetDocument(); sal_Bool bLink = false; - String aName; + rtl::OUString aName; for(i=0; i<theTabs.size(); ++i) { @@ -362,7 +362,7 @@ void ScUndoDeleteTab::Undo() { pRefUndoDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, pDoc ); - String aOldName; + rtl::OUString aOldName; pRefUndoDoc->GetName( nTab, aOldName ); pDoc->RenameTab( nTab, aOldName, false ); if (pRefUndoDoc->IsLinked(nTab)) @@ -376,7 +376,7 @@ void ScUndoDeleteTab::Undo() if ( pRefUndoDoc->IsScenario(nTab) ) { pDoc->SetScenario( nTab, sal_True ); - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nScenFlags; pRefUndoDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags ); @@ -734,7 +734,7 @@ void ScUndoCopyTab::Redo() if ( pDoc->IsScenario(nAdjSource) ) { pDoc->SetScenario(nNewTab, sal_True ); - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nScenFlags; pDoc->GetScenarioData(nAdjSource, aComment, aColor, nScenFlags ); @@ -1001,7 +1001,7 @@ void ScUndoImportTab::Undo() pRedoDoc = new ScDocument( SCDOCMODE_UNDO ); pRedoDoc->InitUndo( pDoc, nTab,nTab+nCount-1, sal_True,sal_True ); - String aOldName; + rtl::OUString aOldName; for (i=0; i<nCount; i++) { SCTAB nTabPos=nTab+i; @@ -1013,7 +1013,7 @@ void ScUndoImportTab::Undo() if ( pDoc->IsScenario(nTabPos) ) { pRedoDoc->SetScenario(nTabPos, sal_True ); - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nScenFlags; pDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags ); @@ -1049,7 +1049,7 @@ void ScUndoImportTab::Redo() } ScDocument* pDoc = pDocShell->GetDocument(); - String aName; + rtl::OUString aName; SCTAB i; for (i=0; i<nCount; i++) // first insert all sheets (#63304#) { @@ -1067,7 +1067,7 @@ void ScUndoImportTab::Redo() if ( pRedoDoc->IsScenario(nTabPos) ) { pDoc->SetScenario(nTabPos, sal_True ); - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nScenFlags; pRedoDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags ); diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 9d33a95a061f..f6543d62bfc8 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -7205,7 +7205,7 @@ void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeExc rtl::OUString SAL_CALL ScTableSheetObj::getName() throw(uno::RuntimeException) { SolarMutexGuard aGuard; - String aName; + rtl::OUString aName; ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) pDocSh->GetDocument()->GetName( GetTab_Impl(), aName ); @@ -8015,7 +8015,7 @@ rtl::OUString SAL_CALL ScTableSheetObj::getScenarioComment() throw(uno::RuntimeE ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDocSh->GetDocument()->GetScenarioData( GetTab_Impl(), aComment, aColor, nFlags ); @@ -8034,8 +8034,8 @@ void SAL_CALL ScTableSheetObj::setScenarioComment( const rtl::OUString& aScenari ScDocument* pDoc = pDocSh->GetDocument(); SCTAB nTab = GetTab_Impl(); - String aName; - String aComment; + rtl::OUString aName; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); @@ -8094,7 +8094,7 @@ void SAL_CALL ScTableSheetObj::apply() throw(uno::RuntimeException) { ScDocument* pDoc = pDocSh->GetDocument(); SCTAB nTab = GetTab_Impl(); - String aName; + rtl::OUString aName; pDoc->GetName( nTab, aName ); // Name dieses Szenarios SCTAB nDestTab = nTab; @@ -8254,8 +8254,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn sal_Int32 nNewColor = 0; if (aValue >>= nNewColor) { - String aName; - String aComment; + rtl::OUString aName; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); @@ -8271,8 +8271,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { if (pDoc->IsScenario(nTab)) { - String aName; - String aComment; + rtl::OUString aName; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); @@ -8304,8 +8304,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { if (pDoc->IsScenario(nTab)) { - String aName; - String aComment; + rtl::OUString aName; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); @@ -8337,8 +8337,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { if (pDoc->IsScenario(nTab)) { - String aName; - String aComment; + rtl::OUString aName; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); @@ -8370,8 +8370,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { if (pDoc->IsScenario(nTab)) { - String aName; - String aComment; + rtl::OUString aName; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); @@ -8403,8 +8403,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { if (pDoc->IsScenario(nTab)) { - String aName; - String aComment; + rtl::OUString aName; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); @@ -8436,8 +8436,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { if (pDoc->IsScenario(nTab)) { - String aName; - String aComment; + rtl::OUString aName; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); @@ -8550,7 +8550,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { if (pDoc->IsScenario(nTab)) { - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); @@ -8562,7 +8562,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { if (pDoc->IsScenario(nTab)) { - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); @@ -8574,7 +8574,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { if (pDoc->IsScenario(nTab)) { - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); @@ -8586,7 +8586,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { if (pDoc->IsScenario(nTab)) { - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); @@ -8598,7 +8598,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { if (pDoc->IsScenario(nTab)) { - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); @@ -8610,7 +8610,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { if (pDoc->IsScenario(nTab)) { - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); @@ -8622,7 +8622,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { if (pDoc->IsScenario(nTab)) { - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); @@ -8648,7 +8648,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn } else if ( pEntry->nWID == SC_WID_UNO_CODENAME ) { - String aCodeName; + rtl::OUString aCodeName; if ( pDocSh ) pDocSh->GetDocument()->GetCodeName( GetTab_Impl(), aCodeName ); rAny <<= rtl::OUString( aCodeName ); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 11ef07a27674..24e3d5c90da3 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1168,7 +1168,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec // the sheet starts at the top of the page Rectangle aArea( pDev->PixelToLogic( Rectangle( 0,0,0,0 ) ) ); sal_Int32 nDestID = pPDFData->CreateDest( aArea ); - String aTabName; + rtl::OUString aTabName; pDoc->GetName( nTab, aTabName ); sal_Int32 nParent = -1; // top-level pPDFData->CreateOutlineItem( nParent, aTabName, nDestID ); @@ -1177,7 +1177,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec if( pPDFData && pPDFData->GetIsExportNamedDestinations() ) { Rectangle aArea( pDev->PixelToLogic( Rectangle( 0,0,0,0 ) ) ); - String aTabName; + rtl::OUString aTabName; pDoc->GetName( nTab, aTabName ); //need the PDF page number here pPDFData->CreateNamedDest( aTabName, aArea ); @@ -1564,7 +1564,7 @@ uno::Reference< container::XIndexAccess > SAL_CALL ScModelObj::getViewData( ) { uno::Sequence< beans::PropertyValue > aSeq; aSeq.realloc(1); - String sName; + rtl::OUString sName; pDocShell->GetDocument()->GetName( pDocShell->GetDocument()->GetVisibleTab(), sName ); rtl::OUString sOUName(sName); aSeq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_ACTIVETABLE)); @@ -2750,7 +2750,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScTableSheetsObj::getElementNames() { ScDocument* pDoc = pDocShell->GetDocument(); SCTAB nCount = pDoc->GetTableCount(); - String aName; + rtl::OUString aName; uno::Sequence<rtl::OUString> aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); for (SCTAB i=0; i<nCount; i++) @@ -3550,14 +3550,12 @@ sal_Bool ScScenariosObj::GetScenarioIndex_Impl( const rtl::OUString& rName, SCTA if ( pDocShell ) { - String aString(rName); - - String aTabName; + rtl::OUString aTabName; ScDocument* pDoc = pDocShell->GetDocument(); SCTAB nCount = (SCTAB)getCount(); for (SCTAB i=0; i<nCount; i++) if (pDoc->GetName( nTab+i+1, aTabName )) - if ( aTabName == aString ) + if (aTabName.equals(rName)) { rIndex = i; return sal_True; @@ -3709,7 +3707,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScScenariosObj::getElementNames() if ( pDocShell ) // sonst ist auch Count = 0 { - String aTabName; + rtl::OUString aTabName; ScDocument* pDoc = pDocShell->GetDocument(); rtl::OUString* pAry = aSeq.getArray(); for (SCTAB i=0; i<nCount; i++) diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index ba27fc889450..f4605cc85d9c 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -126,16 +126,16 @@ public: maCachedObject = maWorkbook; else { - String sCodeName; + rtl::OUString sCodeName; SCTAB nCount = pDoc->GetTableCount(); for( SCTAB i = 0; i < nCount; i++ ) { pDoc->GetCodeName( i, sCodeName ); // aName ( sName ) is generated from the stream name which can be different ( case-wise ) // from the code name - if( sCodeName.EqualsIgnoreCaseAscii( sName ) ) + if( String(sCodeName).EqualsIgnoreCaseAscii( sName ) ) { - String sSheetName; + rtl::OUString sSheetName; if( pDoc->GetName( i, sSheetName ) ) { uno::Reference< frame::XModel > xModel( mpDocShell->GetModel() ); @@ -175,7 +175,7 @@ public: SCTAB nCount = pDoc->GetTableCount(); uno::Sequence< rtl::OUString > aNames( nCount + 1 ); SCTAB index = 0; - String sCodeName; + rtl::OUString sCodeName; for( ; index < nCount; ++index ) { pDoc->GetCodeName( index, sCodeName ); @@ -222,7 +222,7 @@ public: bMatched = ( xControl == xIf ); if ( bMatched ) { - String sName; + rtl::OUString sName; mrDocShell.GetDocument()->GetCodeName( static_cast<SCTAB>( index ), sName ); sCodeName = sName; } @@ -253,7 +253,7 @@ public: uno::Reference<container::XIndexAccess> xFormControls(xFormIndex->getByIndex(0), uno::UNO_QUERY_THROW); if (xFormControls == xContainer) { - String aName; + rtl::OUString aName; if (mrDocShell.GetDocument()->GetCodeName(static_cast<SCTAB>(i), aName)) return aName; } diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index 027cfd90c139..7ee13b2ca1c0 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -505,7 +505,7 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >& for ( SCTAB index = 0; index < pDoc->GetTableCount(); index++) { - String aName; + rtl::OUString aName; pDoc->GetCodeName( index, aName ); sDocModuleNames.push_back( aName ); } diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx index f332248c8db6..2854586923d6 100644 --- a/sc/source/ui/vba/vbaeventshelper.cxx +++ b/sc/source/ui/vba/vbaeventshelper.cxx @@ -807,7 +807,7 @@ OUString ScVbaEventsHelper::implGetDocumentModuleName( const EventHandlerInfo& r if( bSheetEvent && (nTab < 0) ) throw lang::IllegalArgumentException(); - String aCodeName; + rtl::OUString aCodeName; if( bSheetEvent ) mpDoc->GetCodeName( nTab, aCodeName ); else diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx index 35a1b7a734a2..64f25ea04a0c 100644 --- a/sc/source/ui/vba/vbaworksheet.cxx +++ b/sc/source/ui/vba/vbaworksheet.cxx @@ -255,7 +255,7 @@ ScVbaWorksheet::createSheetCopyInNewDoc(rtl::OUString aCurrSheetName) uno::Reference< sheet::XSpreadsheet > xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW); ScDocShell* pShell = excel::getDocShell( xModel ); - String aCodeName; + rtl::OUString aCodeName; pShell->GetDocument()->GetCodeName( 0, aCodeName ); return uno::Reference< excel::XWorksheet >( getUnoDocModule( aCodeName, pShell ), uno::UNO_QUERY_THROW ); } diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index 054dcbfa5fc9..b2fe2800e752 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -740,7 +740,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) if ( !pDoc->IsScenario(nTab) ) { - String aStr; + rtl::OUString aStr; sal_uInt16 nFlags; SCTAB nScTab = nTab + 1; String aProtect; @@ -760,7 +760,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) } else { - String aComment; + rtl::OUString aComment; sal_uInt16 nDummyFlags; pDoc->GetScenarioData( nTab, aComment, aDummyCol, nDummyFlags ); OSL_ENSURE( aList.empty(), "List not empty!" ); diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index 72cf8c94908f..b7d6750b3314 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -430,12 +430,14 @@ void ScCellShell::Execute( SfxRequest& rReq ) { SCTAB i=1; String aBaseName; - String aName; - String aComment; + rtl::OUString aName; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; - pDoc->GetName( nTab, aBaseName ); + rtl::OUString aTmp; + pDoc->GetName(nTab, aTmp); + aBaseName = aTmp; aBaseName += '_'; aBaseName += ScGlobal::GetRscString(STR_SCENARIO); aBaseName += '_'; diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 9158fb828633..0788988ce97c 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -613,11 +613,11 @@ bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, SCTAB nSrcTab = GetViewData()->GetTabNo(); String aName( ScGlobal::GetRscString(STR_PIVOT_TABLE) ); - String aStr; + rtl::OUString aStr; pDoc->GetName( nSrcTab, aStr ); aName += '_'; - aName += aStr; + aName += String(aStr); aName += '_'; SCTAB nNewTab = nSrcTab+1; diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 0d637b3d726f..bc05d5fe242f 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -811,8 +811,8 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange ) // Listbox fuellen long nMaxText = 0; - String aCurrent; - String aTabName; + rtl::OUString aCurrent; + rtl::OUString aTabName; SCTAB nTabCount = pDoc->GetTableCount(); SCTAB nEntryCount = 0; for (SCTAB i=nTab+1; i<nTabCount && pDoc->IsScenario(i); i++) @@ -859,9 +859,9 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange ) pFilterBox->GrabFocus(); sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND; - if (aCurrent.Len()) + if (!aCurrent.isEmpty()) { - nPos = pFilterBox->GetEntryPos( aCurrent ); + nPos = pFilterBox->GetEntryPos(String(aCurrent)); } if (LISTBOX_ENTRY_NOTFOUND == nPos && pFilterBox->GetEntryCount() > 0 ) nPos = 0; diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index ea4fe2a0ac74..03cd63f388f1 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -237,18 +237,18 @@ void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, ScSplitP sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 ); - String aCurrent; + rtl::OUString aCurrent; Color aColor( COL_LIGHTGRAY ); for (SCTAB nAct=nTab+1; nAct<nTabCount && pDoc->IsScenario(nAct); nAct++) if ( pDoc->IsActiveScenario(nAct) && pDoc->HasScenarioRange(nAct,aRange) ) { - String aDummyComment; + rtl::OUString aDummyComment; sal_uInt16 nDummyFlags; pDoc->GetName( nAct, aCurrent ); pDoc->GetScenarioData( nAct, aDummyComment, aColor, nDummyFlags ); } - if (!aCurrent.Len()) + if (aCurrent.isEmpty()) aCurrent = ScGlobal::GetRscString( STR_EMPTYDATA ); //! eigener Text "(keins)" statt "(leer)" ??? diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index dded26f23572..0c0a493c9ec0 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -834,7 +834,9 @@ void ScPreviewShell::FillFieldData( ScHeaderFieldData& rData ) { ScDocument* pDoc = pDocShell->GetDocument(); SCTAB nTab = pPreview->GetTab(); - pDoc->GetName( nTab, rData.aTabName ); + rtl::OUString aTmp; + pDoc->GetName(nTab, aTmp); + rData.aTabName = aTmp; rData.aTitle = pDocShell->GetTitle(); const INetURLObject& rURLObj = pDocShell->GetMedium()->GetURLObject(); diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 15c43b3c1834..a1ee4dfb457f 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -1715,7 +1715,9 @@ sal_Bool ScPrintFunc::IsLeft( long nPageNo ) // linke Fussnoten ? void ScPrintFunc::MakeTableString() { - pDoc->GetName( nPrintTab, aFieldData.aTabName ); + rtl::OUString aTmp; + pDoc->GetName(nPrintTab, aTmp); + aFieldData.aTabName = aTmp; } void ScPrintFunc::MakeEditEngine() diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index cac5bb9dfac4..a42190e0ee1e 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -67,7 +67,7 @@ ScTabControl::ScTabControl( Window* pParent, ScViewData* pData ) : { ScDocument* pDoc = pViewData->GetDocument(); - String aString; + rtl::OUString aString; Color aTabBgColor; SCTAB nCount = pDoc->GetTableCount(); for (SCTAB i=0; i<nCount; i++) @@ -315,7 +315,7 @@ void ScTabControl::UpdateStatus() SCTAB nCount = pDoc->GetTableCount(); SCTAB i; - String aString; + rtl::OUString aString; SCTAB nMaxCnt = Max( nCount, static_cast<SCTAB>(GetMaxId()) ); Color aTabBgColor; @@ -329,10 +329,10 @@ void ScTabControl::UpdateStatus() } else { - aString.Erase(); + aString = rtl::OUString(); } - if ( (GetPageText(static_cast<sal_uInt16>(i)+1) != aString) || (GetTabBgColor(static_cast<sal_uInt16>(i)+1) != aTabBgColor) ) + if ( !aString.equals(GetPageText(static_cast<sal_uInt16>(i)+1)) || (GetTabBgColor(static_cast<sal_uInt16>(i)+1) != aTabBgColor) ) bModified = sal_True; } diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index 43775adb70ef..06265d49e6a4 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -826,7 +826,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) GetStaticInterface()->GetSlot(SID_SELECT_TABLES)->GetCommand(), HID_SELECTTABLES ); // fill all table names with selection state - String aTabName; + rtl::OUString aTabName; for( nTab = 0; nTab < nTabCount; ++nTab ) { rDoc.GetName( nTab, aTabName ); diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index f26874465932..0ade3a71d492 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1807,7 +1807,9 @@ void ScTabViewShell::FillFieldData( ScHeaderFieldData& rData ) ScDocShell* pDocShell = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocShell->GetDocument(); SCTAB nTab = GetViewData()->GetTabNo(); - pDoc->GetName( nTab, rData.aTabName ); + rtl::OUString aTmp; + pDoc->GetName(nTab, aTmp); + rData.aTabName = aTmp; rData.aTitle = pDocShell->GetTitle(); const INetURLObject& rURLObj = pDocShell->GetMedium()->GetURLObject(); diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index 6b1ab39d1038..7e4a932073e4 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -87,7 +87,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { case FID_TABLE_VISIBLE: { - String aName; + rtl::OUString aName; pDoc->GetName( nCurrentTab, aName ); sal_Bool bVisible=sal_True; @@ -132,7 +132,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) break; - String aName; + rtl::OUString aName; if( pReqArgs != NULL ) { const SfxPoolItem* pItem; @@ -140,7 +140,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) aName = ((const SfxStringItem*)pItem)->GetValue(); } - if (!aName.Len()) + if (aName.isEmpty()) { pDoc->GetName( nCurrentTab, aName ); // aktuelle Tabelle rReq.AppendItem( SfxStringItem( FID_TABLE_HIDE, aName ) ); @@ -179,7 +179,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) AbstractScShowTabDlg* pDlg = pFact->CreateScShowTabDlg( GetDialogParent(), RID_SCDLG_SHOW_TAB); OSL_ENSURE(pDlg, "Dialog create fail!"); - String aTabName; + rtl::OUString aTabName; sal_Bool bFirst = sal_True; for ( SCTAB i=0; i != nTabCount; i++ ) { @@ -397,7 +397,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) sal_uInt16 nRet = RET_OK; sal_Bool bDone = false; String aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) ); - String aName; + rtl::OUString aName; String aDlgTitle; const sal_Char* pHelpId = 0; @@ -539,7 +539,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) } else { - String aDefaultName; + rtl::OUString aDefaultName; pDoc->GetName( pViewData->GetTabNo(), aDefaultName ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); @@ -926,7 +926,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) case FID_TAB_RENAME: { - String aTabName; + rtl::OUString aTabName; pDoc->GetName( nTab, aTabName ); rSet.Put( SfxStringItem( nWhich, aTabName )); diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 81b6b3a65b8a..37830ee3bf84 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -2632,9 +2632,8 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe { uno::Sequence <beans::PropertyValue> aTableViewSettings; maTabData[nTab]->WriteUserDataSequence(aTableViewSettings, *this, nTab); - String sTabName; + rtl::OUString sTabName; GetDocument()->GetName( nTab, sTabName ); - rtl::OUString sOUName(sTabName); uno::Any aAny; aAny <<= aTableViewSettings; try @@ -2657,11 +2656,10 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe } } - String sName; + rtl::OUString sName; GetDocument()->GetName( nTabNo, sName ); - rtl::OUString sOUName(sName); pSettings[SC_ACTIVE_TABLE].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_ACTIVETABLE)); - pSettings[SC_ACTIVE_TABLE].Value <<= sOUName; + pSettings[SC_ACTIVE_TABLE].Value <<= sName; pSettings[SC_HORIZONTAL_SCROLL_BAR_WIDTH].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_HORIZONTALSCROLLBARWIDTH)); pSettings[SC_HORIZONTAL_SCROLL_BAR_WIDTH].Value <<= sal_Int32(pView->GetTabBarWidth()); sal_Int32 nZoomValue ((pThisTab->aZoomY.GetNumerator() * 100) / pThisTab->aZoomY.GetDenominator()); diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index d23aebe1b18d..d38131ea9e9f 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -109,7 +109,7 @@ using ::std::vector; using ::std::auto_ptr; // helper func defined in docfunc.cxx -void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName ); +void VBA_DeleteModule( ScDocShell& rDocSh, const rtl::OUString& sModuleName ); // STATIC DATA --------------------------------------------------------------- @@ -2081,7 +2081,7 @@ bool ScViewFunc::DeleteTables( const SCTAB nTab, SCTAB nSheets ) { for (SCTAB aTab = 0; aTab < nSheets; ++aTab) { - String sCodeName; + rtl::OUString sCodeName; bool bHasCodeName = pDoc->GetCodeName( nTab + aTab, sCodeName ); if ( bHasCodeName ) VBA_DeleteModule( *pDocSh, sCodeName ); @@ -2128,7 +2128,7 @@ sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); SCTAB nCount = pDoc->GetTableCount(); - String aOldName; + rtl::OUString aOldName; for(unsigned int i=0; i<TheTabs.size(); ++i) { SCTAB nTab = TheTabs[i]; @@ -2151,7 +2151,7 @@ sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord if ( pDoc->IsScenario(nTab) ) { pUndoDoc->SetScenario( nTab, sal_True ); - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nScenFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags ); @@ -2181,7 +2181,7 @@ sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord for(int i=TheTabs.size()-1; i>=0; --i) { - String sCodeName; + rtl::OUString sCodeName; sal_Bool bHasCodeName = pDoc->GetCodeName( TheTabs[i], sCodeName ); if (pDoc->DeleteTab( TheTabs[i], pUndoDoc )) { @@ -2307,12 +2307,12 @@ void ScViewFunc::InsertTableLink( const String& rFile, nTab = 0; else { - String aTemp; + rtl::OUString aTemp; SCTAB nCount = pSrcDoc->GetTableCount(); for (SCTAB i=0; i<nCount; i++) { pSrcDoc->GetName( i, aTemp ); - if ( aTemp == rTabName ) + if ( aTemp.equals(rTabName) ) nTab = i; } } @@ -2350,7 +2350,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell, SCTAB i; for( i=0; i<nCount; i++ ) { // insert sheets first and update all references - String aName; + rtl::OUString aName; pSrcDoc->GetName( pSrcTabs[i], aName ); pDoc->CreateValidTabName( aName ); if ( !pDoc->InsertTab( nTab+i, aName ) ) @@ -2399,7 +2399,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell, sal_Bool bWasThere = pDoc->HasLink( aFileName, aFilterName, aOptions ); sal_uLong nRefresh = 0; - String aTabStr; + rtl::OUString aTabStr; for (i=0; i<nInsCount; i++) { pSrcDoc->GetName( pSrcTabs[i], aTabStr ); @@ -2530,7 +2530,7 @@ void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCop { if(rMark.GetTableSelect(i)) { - String aTabName; + rtl::OUString aTabName; pDoc->GetName( i, aTabName); TheTabs.push_back(i); for(SCTAB j=i+1;j<nTabCount;j++) @@ -2560,7 +2560,7 @@ void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCop SCTAB nDestTab1=nDestTab; for( sal_uInt16 j=0; j<TheTabs.size(); ++j, ++nDestTab1 ) { // insert sheets first and update all references - String aName; + rtl::OUString aName; if (bRename) aName = *pNewTabName; else @@ -2582,7 +2582,7 @@ void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCop nDestTab1++; } } - String sName; + rtl::OUString sName; if (!bNewDoc && bUndo) { pDestDoc->GetName(nDestTab, sName); @@ -2667,13 +2667,13 @@ void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCop pSrcTabs->reserve(nTabCount); pDestTabs->reserve(nTabCount); pTabNames->reserve(nTabCount); - String aDestName; + rtl::OUString aDestName; for(SCTAB i=0;i<nTabCount;i++) { if(rMark.GetTableSelect(i)) { - String aTabName; + rtl::OUString aTabName; pDoc->GetName( i, aTabName); pTabNames->push_back(aTabName); @@ -2712,7 +2712,7 @@ void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCop if(bCopy && pDoc->IsScenario(nMovTab)) { - String aComment; + rtl::OUString aComment; Color aColor; sal_uInt16 nFlags; @@ -2799,12 +2799,12 @@ void ScViewFunc::ShowTable( const String& rName ) sal_Bool bUndo(pDoc->IsUndoEnabled()); sal_Bool bFound = false; SCTAB nPos = 0; - String aTabName; + rtl::OUString aTabName; SCTAB nCount = pDoc->GetTableCount(); for (SCTAB i=0; i<nCount; i++) { pDoc->GetName( i, aTabName ); - if ( aTabName == rName ) + if ( aTabName.equals(rName) ) { nPos = i; bFound = sal_True; |