diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/scabstdlg.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/mvtabdlg.hxx | 16 | ||||
-rw-r--r-- | sc/source/ui/inc/viewfunc.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/mvtabdlg.cxx | 39 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshf.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 5 |
8 files changed, 38 insertions, 38 deletions
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index e474a4210876..babe95662360 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -215,7 +215,7 @@ public: virtual sal_uInt16 GetSelectedTable () const = 0; virtual bool GetCopyTable () const = 0; virtual bool GetRenameTable () const = 0; - virtual void GetTabNameString( String& rString ) const = 0; + virtual void GetTabNameString( rtl::OUString& rString ) const = 0; virtual void SetForceCopyTable () = 0; virtual void EnableCopyTable (sal_Bool bFlag=true) = 0; virtual void EnableRenameTable (sal_Bool bFlag=true) = 0; diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index d5d04492e9e6..ee09f61897f8 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -522,7 +522,7 @@ bool AbstractScMoveTableDlg_Impl::GetRenameTable() const { return pDlg->GetRenameTable(); } -void AbstractScMoveTableDlg_Impl::GetTabNameString( String& rString ) const +void AbstractScMoveTableDlg_Impl::GetTabNameString( rtl::OUString& rString ) const { pDlg->GetTabNameString( rString ); } diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 0ea51db0c22b..e55a523f1588 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -267,7 +267,7 @@ class AbstractScMoveTableDlg_Impl : public AbstractScMoveTableDlg //add for ScM virtual sal_uInt16 GetSelectedTable () const; virtual bool GetCopyTable () const; virtual bool GetRenameTable () const; - virtual void GetTabNameString( String& rString ) const; + virtual void GetTabNameString( rtl::OUString& rString ) const; virtual void SetForceCopyTable (); virtual void EnableCopyTable (sal_Bool bFlag=true); virtual void EnableRenameTable (sal_Bool bFlag=true); diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx index d563650fca05..50a51ee55e4d 100644 --- a/sc/source/ui/inc/mvtabdlg.hxx +++ b/sc/source/ui/inc/mvtabdlg.hxx @@ -45,14 +45,14 @@ class ScMoveTableDlg : public ModalDialog { public: - ScMoveTableDlg( Window* pParent, const String& rDefault ); - ~ScMoveTableDlg(); + ScMoveTableDlg(Window* pParent, const rtl::OUString& rDefault); + ~ScMoveTableDlg(); sal_uInt16 GetSelectedDocument () const; SCTAB GetSelectedTable () const; bool GetCopyTable () const; bool GetRenameTable () const; - void GetTabNameString( String& rString ) const; + void GetTabNameString( rtl::OUString& rString ) const; void SetForceCopyTable (); void EnableCopyTable (sal_Bool bFlag=true); void EnableRenameTable (sal_Bool bFlag=true); @@ -79,13 +79,13 @@ private: CancelButton aBtnCancel; HelpButton aBtnHelp; - String maStrTabNameUsed; - String maStrTabNameEmpty; - String maStrTabNameInvalid; + rtl::OUString maStrTabNameUsed; + rtl::OUString maStrTabNameEmpty; + rtl::OUString maStrTabNameInvalid; - const String& mrDefaultName; + const rtl::OUString maDefaultName; - sal_uInt16 nDocument; + sal_uInt16 nDocument; SCTAB nTable; bool bCopyTable:1; bool bRenameTable:1; diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index e6b3d4faabf4..06beba0868e6 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -271,7 +271,7 @@ public: bool DeleteTables(SCTAB nTab, SCTAB nSheets); sal_Bool RenameTable( const String& rName, SCTAB nTabNr ); - void MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCopy, const String* pNewTabName = NULL ); + void MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const rtl::OUString* pNewTabName = NULL ); void ImportTables( ScDocShell* pSrcShell, SCTAB nCount, const SCTAB* pSrcTabs, sal_Bool bLink,SCTAB nTab); diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx index 0da0a3234c6f..a89cf6f06bc2 100644 --- a/sc/source/ui/miscdlgs/mvtabdlg.cxx +++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx @@ -56,8 +56,7 @@ //================================================================== -ScMoveTableDlg::ScMoveTableDlg( Window* pParent, - const String& rDefault ) +ScMoveTableDlg::ScMoveTableDlg(Window* pParent, const rtl::OUString& rDefault) : ModalDialog ( pParent, ScResId( RID_SCDLG_MOVETAB ) ), // @@ -77,11 +76,11 @@ ScMoveTableDlg::ScMoveTableDlg( Window* pParent, aBtnCancel ( this, ScResId( BTN_CANCEL ) ), aBtnHelp ( this, ScResId( BTN_HELP ) ), - maStrTabNameUsed( ScResId(STR_TABNAME_WARN_USED) ), - maStrTabNameEmpty( ScResId(STR_TABNAME_WARN_EMPTY) ), - maStrTabNameInvalid( ScResId(STR_TABNAME_WARN_INVALID) ), + maStrTabNameUsed( ResId::toString(ScResId(STR_TABNAME_WARN_USED)) ), + maStrTabNameEmpty( ResId::toString(ScResId(STR_TABNAME_WARN_EMPTY)) ), + maStrTabNameInvalid( ResId::toString(ScResId(STR_TABNAME_WARN_INVALID)) ), // - mrDefaultName( rDefault ), + maDefaultName( rDefault ), nDocument ( 0 ), nTable ( 0 ), bCopyTable ( false ), @@ -112,7 +111,7 @@ bool ScMoveTableDlg::GetCopyTable () const { return bCopyTable; } bool ScMoveTableDlg::GetRenameTable () const { return bRenameTable; } -void ScMoveTableDlg::GetTabNameString( String& rString ) const +void ScMoveTableDlg::GetTabNameString( rtl::OUString& rString ) const { rString = aEdTabName.GetText(); } @@ -159,24 +158,24 @@ void ScMoveTableDlg::ResetRenameInput() ScDocument* pDoc = GetSelectedDoc(); if (pDoc) { - String aStr = mrDefaultName; + rtl::OUString aStr = maDefaultName; pDoc->CreateValidTabName(aStr); aEdTabName.SetText(aStr); } else - aEdTabName.SetText(mrDefaultName); + aEdTabName.SetText(maDefaultName); } else // move - aEdTabName.SetText(mrDefaultName); + aEdTabName.SetText(maDefaultName); CheckNewTabName(); } void ScMoveTableDlg::CheckNewTabName() { - const String& rNewName = aEdTabName.GetText(); - if (!rNewName.Len()) + const rtl::OUString aNewName = aEdTabName.GetText(); + if (aNewName.isEmpty()) { // New sheet name is empty. This is not good. aFtWarn.SetText(maStrTabNameEmpty); @@ -185,7 +184,7 @@ void ScMoveTableDlg::CheckNewTabName() return; } - if (!ScDocument::ValidTabName(rNewName)) + if (!ScDocument::ValidTabName(aNewName)) { // New sheet name contains invalid characters. aFtWarn.SetText(maStrTabNameInvalid); @@ -198,11 +197,11 @@ void ScMoveTableDlg::CheckNewTabName() sal_uInt16 nLast = aLbTable.GetEntryCount() - 1; for ( sal_uInt16 i=0; i<=nLast; ++i ) { - if ( rNewName == aLbTable.GetEntry( i ) ) + if ( aNewName.equals(aLbTable.GetEntry(i)) ) { - if( ( aBtnMove.IsChecked() ) && - ( aLbDoc.GetSelectEntryPos() == 0 ) && - ( aEdTabName.GetText() == mrDefaultName) ) + if (aBtnMove.IsChecked() && + aLbDoc.GetSelectEntryPos() == 0 && + maDefaultName.equals(aEdTabName.GetText())) // Move inside same document, thus same name is allowed. bFound = false; @@ -314,7 +313,7 @@ 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 = mrDefaultName; + String aCopyName = maDefaultName; ScDocument* pDoc = GetSelectedDoc(); if (pDoc) pDoc->CreateValidTabName(aCopyName); @@ -325,8 +324,8 @@ IMPL_LINK( ScMoveTableDlg, OkHdl, void *, EMPTYARG ) { // Return an empty string, when the new name is the same as the // original name. - if( mrDefaultName == aEdTabName.GetText() ) - aEdTabName.SetText( String() ); + if (maDefaultName.equals(aEdTabName.GetText())) + aEdTabName.SetText(rtl::OUString()); } EndDialog( RET_OK ); diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index 7e4a932073e4..7a113612cc3d 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -480,8 +480,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) sal_uInt16 nDoc = 0; SCTAB nTab = pViewData->GetTabNo(); sal_Bool bCpy = false; - String aDocName; - String aTabName; + rtl::OUString aDocName; + rtl::OUString aTabName; if( pReqArgs != NULL ) { @@ -500,7 +500,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) if( IS_AVAILABLE( FN_PARAM_2, &pItem ) ) bCpy = ((const SfxBoolItem*)pItem)->GetValue(); - if( aDocName.Len() ) + if (!aDocName.isEmpty()) { SfxObjectShell* pSh = SfxObjectShell::GetFirst(); ScDocShell* pScSh = NULL; @@ -514,7 +514,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { pScSh->GetTitle(); - if( pScSh->GetTitle() == aDocName ) + if (aDocName.equals(pScSh->GetTitle())) { nDoc = i; ScDocument* pDestDoc = pScSh->GetDocument(); diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index d38131ea9e9f..506f148b178f 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -2451,7 +2451,8 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell, //---------------------------------------------------------------------------- // Move/Copy table to another document -void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCopy, const String* pNewTabName ) +void ScViewFunc::MoveTable( + sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const rtl::OUString* pNewTabName ) { ScDocument* pDoc = GetViewData()->GetDocument(); ScDocShell* pDocShell = GetViewData()->GetDocShell(); @@ -2459,7 +2460,7 @@ void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCop ScDocShell* pDestShell = NULL; ScTabViewShell* pDestViewSh = NULL; sal_Bool bUndo (pDoc->IsUndoEnabled()); - bool bRename = pNewTabName && pNewTabName->Len(); + bool bRename = pNewTabName && !pNewTabName->isEmpty(); sal_Bool bNewDoc = ( nDestDocNo == SC_DOC_NEW ); if ( bNewDoc ) |