summaryrefslogtreecommitdiff
path: root/sc/source/ui/namedlg
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-02 23:48:44 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-03 00:58:38 +0100
commit6e93e78c85e0c4eea174483f1d27ee38fd00ee21 (patch)
tree4bf6698a6e44eb9d0b3aa596fc2b7e06e452b45f /sc/source/ui/namedlg
parent947a51f5fe4450c5da8c1f784eccb756e9320e32 (diff)
don't show an error message for empty names in Define Names, fdo#46816
Diffstat (limited to 'sc/source/ui/namedlg')
-rw-r--r--sc/source/ui/namedlg/namedefdlg.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index a9795d560a08..282c47a3a9b1 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -167,7 +167,13 @@ bool ScNameDefDlg::IsNameValid()
}
maFtInfo.SetControlBackground(GetSettings().GetStyleSettings().GetDialogColor());
- if (!ScRangeData::IsNameValid( aName, mpDoc ))
+ if ( aName.isEmpty() )
+ {
+ maBtnAdd.Disable();
+ maFtInfo.SetText(maStrInfoDefault);
+ return false;
+ }
+ else if (!ScRangeData::IsNameValid( aName, mpDoc ))
{
maFtInfo.SetControlBackground(GetSettings().GetStyleSettings().GetHighlightColor());
maFtInfo.SetText(maErrInvalidNameStr);