[Libreoffice-commits] .: Branch 'libreoffice-3-5-1' - sc/source
Eike Rathke
erack at kemper.freedesktop.org
Mon Mar 5 04:28:22 PST 2012
sc/source/ui/namedlg/namedefdlg.cxx | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit 3730a7173298814a709a0bcbb2150288ea1c464d
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Mar 2 23:48:44 2012 +0100
don't show an error message for empty names in Define Names, fdo#46816
Signed-off-by: Kohei Yoshida <kohei.yoshida at suse.com>
(cherry picked from commit f4f0ef5790bd06145d977183da0ee244c5c46058)
Signed-off-by: Eike Rathke <erack at redhat.com>
Signed-off-by: Michael Meeks <michael.meeks at suse.com>
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index 45c600b..d060566 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -166,7 +166,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);
More information about the Libreoffice-commits
mailing list