summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail..com>2019-12-29 13:44:57 -0900
committerJim Raykowski <raykowj@gmail.com>2020-01-20 09:29:31 +0100
commit39a8a3b6b459a21907966c657e32b4498a643a3a (patch)
treeee1f6f316908a7a724f40379ce3871ab02f186ac
parentfc1f85127968d1c2e0a53dace51bf8a78f9e6ca5 (diff)
tdf#129488 Fix Font size control enabled state
Set the enabled state of toolbox that contains the font size control to that of the font size control This patch was inspired by the code used to set the enabled state of the font name control in SvxFontNameToolBoxControl::statusChanged Change-Id: I50b7852e3cbb4c552fe8b38e7e6529b75e404ae0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86040 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
-rw-r--r--svx/source/tbxctrls/tbunocontroller.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx
index ca264c232de4..313810b6a329 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -364,6 +364,11 @@ void SAL_CALL FontHeightToolBoxControl::statusChanged(
SolarMutexGuard aSolarMutexGuard;
if ( rEvent.FeatureURL.Path == "FontHeight" )
{
+ ToolBox* pToolBox = nullptr;
+ sal_uInt16 nId = 0;
+ if ( !getToolboxId( nId, &pToolBox ) )
+ return;
+
if ( rEvent.IsEnabled )
{
m_pBox->Enable();
@@ -374,7 +379,12 @@ void SAL_CALL FontHeightToolBoxControl::statusChanged(
m_pBox->statusChanged_Impl( long( -1 ), true );
}
else
+ {
m_pBox->Disable();
+ m_pBox->statusChanged_Impl( long( -1 ), true );
+ }
+
+ pToolBox->EnableItem( nId, rEvent.IsEnabled );
}
else if ( rEvent.FeatureURL.Path == "CharFontName" )
{