summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/linewidthctrl.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-06 10:59:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-02-06 18:17:02 +0100
commit97a5da96159f28de0b846de7dd94d2880251e8b3 (patch)
tree091f4334ff184047376240a4deb5bfb9b0da5b1e /svx/source/tbxctrls/linewidthctrl.cxx
parentbf2f1adfd2e4725518147657c6b57eb5697a29d5 (diff)
weld SvxMetricField
split off SdPagesField as its not really a MetricSpinButton and can be a SpinButton with a custom output function. while I'm at it use ngettext to provide better plurals for the output. Change-Id: Idc9ce0513c9fce60c8713c7361fd40f0dbd01f64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88100 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/tbxctrls/linewidthctrl.cxx')
-rw-r--r--svx/source/tbxctrls/linewidthctrl.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/svx/source/tbxctrls/linewidthctrl.cxx b/svx/source/tbxctrls/linewidthctrl.cxx
index 0a6d75446819..61f48a0293e5 100644
--- a/svx/source/tbxctrls/linewidthctrl.cxx
+++ b/svx/source/tbxctrls/linewidthctrl.cxx
@@ -83,12 +83,11 @@ void SvxLineWidthToolBoxControl::StateChanged(
{
if ( eState == SfxItemState::DISABLED )
{
- pFld->Disable();
- pFld->SetText( "" );
+ pFld->set_sensitive(false);
}
else
{
- pFld->Enable();
+ pFld->set_sensitive(true);
if ( eState == SfxItemState::DEFAULT )
{
@@ -107,10 +106,12 @@ void SvxLineWidthToolBoxControl::StateChanged(
}
}
-
-VclPtr<vcl::Window> SvxLineWidthToolBoxControl::CreateItemWindow( vcl::Window *pParent )
+VclPtr<vcl::Window> SvxLineWidthToolBoxControl::CreateItemWindow(vcl::Window *pParent)
{
- return VclPtr<SvxMetricField>::Create( pParent, m_xFrame ).get();
+ VclPtr<SvxMetricField> pWindow = VclPtr<SvxMetricField>::Create(pParent, m_xFrame);
+ pWindow->Show();
+
+ return pWindow;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */