summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortagezi <lera.goncharuk@gmail.com>2017-12-19 13:32:26 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-12-19 21:47:32 +0100
commit7504af39686171ffb16e70f798d9ecf4ea98f1d3 (patch)
tree7116d366046f3a2720e8c9ac2f2be63ab1fc2370
parentb181d66c350416fed0a284b9d8db9c02a25c8dc5 (diff)
tdf#114545 Enabling/Disabling Ok button depending on correct format
Change-Id: Iab3c4363dda0260d16c7167946044c39c21b863a Reviewed-on: https://gerrit.libreoffice.org/46790 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 1a5ccb659943..4f9f82568d1a 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -772,9 +772,15 @@ IMPL_LINK( ScCondFormatDlg, EdRangeModifyHdl, Edit&, rEdit, void )
ScRefFlags nFlags = aRange.Parse(aRangeStr, mpViewData->GetDocument(),
mpViewData->GetDocument()->GetAddressConvention());
if(nFlags & ScRefFlags::VALID)
+ {
rEdit.SetControlBackground(GetSettings().GetStyleSettings().GetWindowColor());
+ mpBtnOk->Enable(true);
+ }
else
+ {
rEdit.SetControlBackground(COL_LIGHTRED);
+ mpBtnOk->Enable(false);
+ }
updateTitle();
}