summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2012-02-13 15:20:58 +0000
committerNoel Power <noel.power@novell.com>2012-02-13 15:22:37 +0000
commit0c998c462aa553f52b849a26e3ca8df077fb5622 (patch)
tree909dfd7e88f1f4b39474004b4d919a7d91981821 /sc
parentafeb347c909fa2deb37694d4b9fd6509ec305366 (diff)
some very minor tweak(s) to "Improvment-of-Custom-Sheet-Prefix-Option"
a) allow blank default prefix b) select the entire last good prefix is some illegal character used
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/optdlg/tpdefaults.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx
index ec29550fa818..ba294c542377 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -127,10 +127,12 @@ void ScTpDefaultsOptions::CheckPrefix(Edit* pEdit)
OUString aSheetPrefix = pEdit->GetText();
- if ( !ScDocument::ValidTabName( aSheetPrefix ) )
+ if ( !aSheetPrefix.isEmpty() && !ScDocument::ValidTabName( aSheetPrefix ) )
{
- // Revert to last good Prefix
- pEdit->SetText( maOldPrefixValue );
+ // Revert to last good Prefix and also select it to
+ // indicate something illegal was typed
+ Selection aSel( 0, maOldPrefixValue.getLength() );
+ pEdit->SetText( maOldPrefixValue, aSel );
}
else
{