diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-01-03 19:49:41 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-01-03 19:49:41 -0500 |
commit | cf92f247fdf953b41e868ded0dd3f0456b82dfe8 (patch) | |
tree | 99ed4f8c3c10a74b5d7701ed98b10c4617a1d797 /sc/source/ui/miscdlgs | |
parent | 8a3f4fb915e240bc26b0ba6337acc751cee05d8c (diff) |
Don't reset the default sheet name when the name has evern been edited.
Diffstat (limited to 'sc/source/ui/miscdlgs')
-rw-r--r-- | sc/source/ui/miscdlgs/mvtabdlg.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
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; } |