[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Fri Mar 2 19:17:15 PST 2012


 sc/source/ui/namedlg/namedefdlg.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit f4f0ef5790bd06145d977183da0ee244c5c46058
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>

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