summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui/dbnamdlg.cxx
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2021-07-29 10:00:06 +0200
committerEike Rathke <erack@redhat.com>2021-08-02 21:19:36 +0200
commita07351e8181353c0c0b6df5d2ccbad4615c6706b (patch)
tree34b1bc4f6e0e92a6993c325db78e15c97f6d5642 /sc/source/ui/dbgui/dbnamdlg.cxx
parentc4ff09fc8c55af1f5fadb452eef16b15be8e202a (diff)
tdf#115520 sc UI: Define Database Range dialog disappeared
if the name of the database range was invalid. Change-Id: If0eb08d35b2187f04ef93136acd6f7eafa3b588a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119652 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/ui/dbgui/dbnamdlg.cxx')
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index 4939663f29b4..1043e899af6d 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -249,6 +249,7 @@ void ScDbNameDlg::Init()
bSaved = true;
xSaveObj->Save();
NameModifyHdl( *m_xEdName );
+ bInvalid = false;
}
void ScDbNameDlg::SetInfoStrings( const ScDBData* pDBData )
@@ -376,17 +377,18 @@ bool ScDbNameDlg::IsRefInputMode() const
IMPL_LINK_NOARG(ScDbNameDlg, OkBtnHdl, weld::Button&, void)
{
+ bInvalid = false;
AddBtnHdl(*m_xBtnAdd);
// Pass the changes and the remove list to the view: both are
// transferred as a reference only, so that no dead memory can
// be created at this point:
+ if (!bInvalid)
{
ScDBDocFunc aFunc(*m_rViewData.GetDocShell());
aFunc.ModifyAllDBData(aLocalDbCol, aRemoveList);
+ response(RET_OK);
}
-
- response(RET_OK);
}
IMPL_LINK_NOARG(ScDbNameDlg, CancelBtnHdl, weld::Button&, void)
@@ -469,6 +471,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl, weld::Button&, void)
ERRORBOX(m_xDialog.get(), aStrInvalid);
m_xEdAssign->SelectAll();
m_xEdAssign->GrabFocus();
+ bInvalid = true;
}
}
else
@@ -476,6 +479,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl, weld::Button&, void)
ERRORBOX(m_xDialog.get(), ScResId(STR_INVALIDNAME));
m_xEdName->select_entry_region(0, -1);
m_xEdName->grab_focus();
+ bInvalid = true;
}
}