summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2017-11-28 10:48:08 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2017-11-28 10:00:10 +0100
commit22e747284c92b69175d3add4d1033a0e7aaacc5e (patch)
treed419ec3f33c25ef8ce644459a6a052d9d7ad872b
parente5527e606e224cc87fa2482545c770c38128c26e (diff)
tdf#113455 follow-up: clear spin buttons when disabled in Reset
otherwise they show "1" in disabled state, unlike after being enabled and then disabled again manually (see ToggleHdl) Change-Id: I4ff4d0ef006b7530bb20d9b830dc5e2f5732530d Reviewed-on: https://gerrit.libreoffice.org/45383 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--sc/source/ui/pagedlg/tptable.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index a6c1954aaabe..0c9c80f8d141 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -221,11 +221,20 @@ void ScTablePage::Reset( const SfxItemSet* rCoreSet )
else
nWidth = nHeight = 1;
- m_pEdScalePageWidth->SetValue(nWidth);
+ if (nWidth)
+ m_pEdScalePageWidth->SetValue(nWidth);
+ else
+ m_pEdScalePageWidth->SetText(OUString());
+
m_pEdScalePageWidth->Enable(nWidth);
- m_pEdScalePageHeight->SetValue(nHeight);
- m_pEdScalePageHeight->Enable(nHeight);
m_pCbScalePageWidth->Check(nWidth);
+
+ if(nHeight)
+ m_pEdScalePageHeight->SetValue(nHeight);
+ else
+ m_pEdScalePageHeight->SetText(OUString());
+
+ m_pEdScalePageHeight->Enable(nHeight);
m_pCbScalePageHeight->Check(nHeight);
}