don't show an error message for empty names in Define Names, fdo#46816

This commit is contained in:
Markus Mohrhard 2012-03-02 23:48:44 +01:00
parent 947a51f5fe
commit 6e93e78c85

View file

@ -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);