diff options
-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 | 8 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/mvtabdlg.cxx | 14 |
5 files changed, 19 insertions, 9 deletions
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index 54507551df20..2aeedfef4b2c 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -212,7 +212,7 @@ class AbstractScMoveTableDlg : public VclAbstractDialog //add for ScMoveTableDl public: virtual USHORT GetSelectedDocument () const = 0; virtual USHORT GetSelectedTable () const = 0; - virtual BOOL GetCopyTable () const = 0; + virtual bool GetCopyTable () const = 0; virtual bool GetRenameTable () const = 0; virtual void GetTabNameString( String& rString ) const = 0; virtual void SetForceCopyTable () = 0; diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 4b292d3b8a0b..bdb06e62b072 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -498,7 +498,7 @@ USHORT AbstractScMoveTableDlg_Impl::GetSelectedTable() const { return pDlg->GetSelectedTable(); } -BOOL AbstractScMoveTableDlg_Impl::GetCopyTable() const +bool AbstractScMoveTableDlg_Impl::GetCopyTable() const { return pDlg->GetCopyTable(); } diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 40b80b43f69f..d89ee8203dbe 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -262,7 +262,7 @@ class AbstractScMoveTableDlg_Impl : public AbstractScMoveTableDlg //add for ScM DECL_ABSTDLG_BASE( AbstractScMoveTableDlg_Impl, ScMoveTableDlg) virtual USHORT GetSelectedDocument () const; virtual USHORT GetSelectedTable () const; - virtual BOOL GetCopyTable () const; + virtual bool GetCopyTable () const; virtual bool GetRenameTable () const; virtual void GetTabNameString( String& rString ) const; virtual void SetForceCopyTable (); diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx index 152a8bf927a6..e850d9bff41c 100644 --- a/sc/source/ui/inc/mvtabdlg.hxx +++ b/sc/source/ui/inc/mvtabdlg.hxx @@ -50,7 +50,7 @@ public: USHORT GetSelectedDocument () const; SCTAB GetSelectedTable () const; - BOOL GetCopyTable () const; + bool GetCopyTable () const; bool GetRenameTable () const; void GetTabNameString( String& rString ) const; void SetForceCopyTable (); @@ -87,8 +87,10 @@ private: USHORT nDocument; SCTAB nTable; - BOOL bCopyTable; - BOOL bRenameTable; + bool bCopyTable:1; + bool bRenameTable:1; + bool mbEverEdited:1; + //-------------------------------------- void Init (); void InitBtnRename (); diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx index 4985706c3991..92598a96fcfb 100644 --- a/sc/source/ui/miscdlgs/mvtabdlg.cxx +++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx @@ -84,8 +84,9 @@ ScMoveTableDlg::ScMoveTableDlg( Window* pParent, mrDefaultName( rDefault ), nDocument ( 0 ), nTable ( 0 ), - bCopyTable ( FALSE ), - bRenameTable( FALSE ) + bCopyTable ( false ), + bRenameTable( false ), + mbEverEdited( false ) { #if ENABLE_LAYOUT #undef ScResId @@ -107,7 +108,7 @@ USHORT ScMoveTableDlg::GetSelectedDocument () const { return nDocument; } SCTAB ScMoveTableDlg::GetSelectedTable () const { return nTable; } -BOOL ScMoveTableDlg::GetCopyTable () const { return bCopyTable; } +bool ScMoveTableDlg::GetCopyTable () const { return bCopyTable; } bool ScMoveTableDlg::GetRenameTable () const { return bRenameTable; } @@ -141,6 +142,10 @@ void ScMoveTableDlg::EnableRenameTable(BOOL bFlag) void ScMoveTableDlg::ResetRenameInput() { + if (mbEverEdited) + // Don't reset the name when the sheet name has ever been edited. + return; + if (!aEdTabName.IsEnabled()) { aEdTabName.SetText(String()); @@ -360,7 +365,10 @@ IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb ) IMPL_LINK( ScMoveTableDlg, CheckNameHdl, Edit *, pEdt ) { if ( pEdt == &aEdTabName ) + { + mbEverEdited = true; CheckNewTabName(); + } return 0; } |