summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-09-10 17:53:41 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-12 06:08:32 +0000
commitea733ab5b632109d28bb8f1dc37116340b26229b (patch)
tree78a5c4d6cad5d6f2c58a89745ba0af130ef0e188 /svx/source/tbxctrls
parentcc3294e127a6aedb8f6da5741ac9063da1cc2135 (diff)
Turn SfxItemState into a C++11 scoped enumeration
...to gain further confidence in the claim "that none of the existing code tries to uses combinations of these enum values" (d92602c5b13d0a60439d86c5a033d124178726ca "more fixes for SfxItemState") Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13 Reviewed-on: https://gerrit.libreoffice.org/11384 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx2
-rw-r--r--svx/source/tbxctrls/fillctrl.cxx4
-rw-r--r--svx/source/tbxctrls/formatpaintbrushctrl.cxx2
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx32
-rw-r--r--svx/source/tbxctrls/layctrl.cxx8
-rw-r--r--svx/source/tbxctrls/lboxctrl.cxx6
-rw-r--r--svx/source/tbxctrls/linectrl.cxx12
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx48
-rw-r--r--svx/source/tbxctrls/tbxdrctl.cxx2
9 files changed, 58 insertions, 58 deletions
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index 0d8ad1a2b725..e5ff211eef23 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -403,7 +403,7 @@ IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl)
{
SfxItemSet aAttrSet( pView->GetModel()->GetItemPool() );
pView->GetAttributes( aAttrSet );
- if ( aAttrSet.GetItemState( XATTR_LINESTYLE ) != SFX_ITEM_DONTCARE )
+ if ( aAttrSet.GetItemState( XATTR_LINESTYLE ) != SfxItemState::DONTCARE )
{
XLineStyle eXLS = (XLineStyle)
( (const XLineStyleItem&)aAttrSet.Get( XATTR_LINESTYLE ) ).GetValue();
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
index 5b46ff9d2311..2a5b26a0e3a2 100644
--- a/svx/source/tbxctrls/fillctrl.cxx
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -92,7 +92,7 @@ void SvxFillToolBoxControl::StateChanged(
SfxItemState eState,
const SfxPoolItem* pState)
{
- if(eState == SFX_ITEM_DISABLED)
+ if(eState == SfxItemState::DISABLED)
{
// slot disable state
if(nSID == SID_ATTR_FILL_STYLE)
@@ -104,7 +104,7 @@ void SvxFillToolBoxControl::StateChanged(
mpFillAttrLB->Disable();
mpFillAttrLB->SetNoSelection();
}
- else if(SFX_ITEM_DEFAULT == eState)
+ else if(SfxItemState::DEFAULT == eState)
{
bool bEnableControls(false);
diff --git a/svx/source/tbxctrls/formatpaintbrushctrl.cxx b/svx/source/tbxctrls/formatpaintbrushctrl.cxx
index 7e5619deeffa..2bcccfa2b978 100644
--- a/svx/source/tbxctrls/formatpaintbrushctrl.cxx
+++ b/svx/source/tbxctrls/formatpaintbrushctrl.cxx
@@ -96,7 +96,7 @@ void FormatPaintBrushToolBoxControl::Select(sal_uInt16 /*nSelectModifier*/)
void FormatPaintBrushToolBoxControl::StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState )
{
- if( eState != SFX_ITEM_DEFAULT && eState != SFX_ITEM_SET )
+ if( eState != SfxItemState::DEFAULT && eState != SfxItemState::SET )
m_bPersistentCopy = false;
SfxToolBoxControl::StateChanged( nSID, eState, pState );
}
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 23a0d24ce4ad..2fff9959d316 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -440,7 +440,7 @@ SvxGrafFilterToolBoxControl::~SvxGrafFilterToolBoxControl()
void SvxGrafFilterToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* )
{
- GetToolBox().EnableItem( GetId(), ( eState != SFX_ITEM_DISABLED ) );
+ GetToolBox().EnableItem( GetId(), ( eState != SfxItemState::DISABLED ) );
}
SfxPopupWindowType SvxGrafFilterToolBoxControl::GetPopupWindowType() const
@@ -473,7 +473,7 @@ void SvxGrafToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const
ImplGrafControl* pCtrl = (ImplGrafControl*) GetToolBox().GetItemWindow( GetId() );
DBG_ASSERT( pCtrl, "Control not found" );
- if( eState == SFX_ITEM_DISABLED )
+ if( eState == SfxItemState::DISABLED )
{
pCtrl->Disable();
pCtrl->SetText( OUString() );
@@ -482,7 +482,7 @@ void SvxGrafToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const
{
pCtrl->Enable();
- if( eState == SFX_ITEM_DEFAULT )
+ if( eState == SfxItemState::DEFAULT )
pCtrl->Update( pState );
else
pCtrl->Update( NULL );
@@ -560,7 +560,7 @@ void SvxGrafModeToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, c
ImplGrafModeControl* pCtrl = (ImplGrafModeControl*) GetToolBox().GetItemWindow( GetId() );
DBG_ASSERT( pCtrl, "Control not found" );
- if( eState == SFX_ITEM_DISABLED )
+ if( eState == SfxItemState::DISABLED )
{
pCtrl->Disable();
pCtrl->SetText( OUString() );
@@ -569,7 +569,7 @@ void SvxGrafModeToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, c
{
pCtrl->Enable();
- if( eState == SFX_ITEM_DEFAULT )
+ if( eState == SfxItemState::DEFAULT )
pCtrl->Update( pState );
else
pCtrl->Update( NULL );
@@ -598,7 +598,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
const SfxPoolItem* pItem;
sal_uInt16 nSlot = rReq.GetSlot();
- if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, false, &pItem ))
+ if( !pArgs || SfxItemState::SET != pArgs->GetItemState( nSlot, false, &pItem ))
pItem = 0;
switch( nSlot )
@@ -757,7 +757,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFCROP );
// set crop attributes
- if( SFX_ITEM_SET <= pOutAttr->GetItemState( SDRATTR_GRAFCROP ) )
+ if( SfxItemState::SET <= pOutAttr->GetItemState( SDRATTR_GRAFCROP ) )
{
const SdrGrafCropItem& rNewCrop = (const SdrGrafCropItem&) pOutAttr->Get( SDRATTR_GRAFCROP );
@@ -767,7 +767,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
}
// set new logic rect
- if( SFX_ITEM_SET <= pOutAttr->GetItemState( SID_ATTR_GRAF_FRMSIZE ) )
+ if( SfxItemState::SET <= pOutAttr->GetItemState( SID_ATTR_GRAF_FRMSIZE ) )
{
Point aNewOrigin( pObj->GetLogicRect().TopLeft() );
const Size& rGrfSize = ( (const SvxSizeItem&) pOutAttr->Get( SID_ATTR_GRAF_FRMSIZE ) ).GetSize();
@@ -898,7 +898,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
{
case( SID_ATTR_GRAF_MODE ):
{
- if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFMODE ) )
+ if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFMODE ) )
{
if( bEnableColors )
{
@@ -915,7 +915,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
case( SID_ATTR_GRAF_RED ):
{
- if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFRED ) )
+ if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFRED ) )
{
if( bEnableColors )
{
@@ -932,7 +932,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
case( SID_ATTR_GRAF_GREEN ):
{
- if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFGREEN ) )
+ if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFGREEN ) )
{
if( bEnableColors )
{
@@ -949,7 +949,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
case( SID_ATTR_GRAF_BLUE ):
{
- if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFBLUE ) )
+ if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFBLUE ) )
{
if( bEnableColors )
{
@@ -966,7 +966,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
case( SID_ATTR_GRAF_LUMINANCE ):
{
- if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFLUMINANCE ) )
+ if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFLUMINANCE ) )
{
if( bEnableColors )
{
@@ -983,7 +983,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
case( SID_ATTR_GRAF_CONTRAST ):
{
- if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFCONTRAST ) )
+ if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFCONTRAST ) )
{
if( bEnableColors )
{
@@ -1000,7 +1000,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
case( SID_ATTR_GRAF_GAMMA ):
{
- if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFGAMMA ) )
+ if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFGAMMA ) )
{
if( bEnableColors )
{
@@ -1017,7 +1017,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
case( SID_ATTR_GRAF_TRANSPARENCE ):
{
- if( SFX_ITEM_DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFTRANSPARENCE ) )
+ if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFTRANSPARENCE ) )
{
if( bEnableTransparency )
{
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 4e59d1d4df7c..4917f107f4e1 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -755,14 +755,14 @@ void SvxTableToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, cons
bEnabled = ( nValue != 0 );
}
else
- bEnabled = SFX_ITEM_DISABLED != eState;
+ bEnabled = SfxItemState::DISABLED != eState;
sal_uInt16 nId = GetId();
ToolBox& rTbx = GetToolBox();
- rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
+ rTbx.EnableItem( nId, SfxItemState::DISABLED != eState );
rTbx.SetItemState( nId,
- ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
+ ( SfxItemState::DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
}
SvxColumnsToolBoxControl::SvxColumnsToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx )
@@ -817,7 +817,7 @@ void SvxColumnsToolBoxControl::StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState )
{
- bEnabled = SFX_ITEM_DISABLED != eState;
+ bEnabled = SfxItemState::DISABLED != eState;
SfxToolBoxControl::StateChanged(nSID, eState, pState );
}
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index 33340d59cddf..5dea6904fca6 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -119,7 +119,7 @@ void SvxPopupWindowListBox::PopupModeEnd()
void SvxPopupWindowListBox::StateChanged(
sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
{
- rToolBox.EnableItem( nTbxId, ( SfxToolBoxControl::GetItemState( pState ) != SFX_ITEM_DISABLED) );
+ rToolBox.EnableItem( nTbxId, ( SfxToolBoxControl::GetItemState( pState ) != SfxItemState::DISABLED) );
SfxPopupWindow::StateChanged( nSID, eState, pState );
}
@@ -161,7 +161,7 @@ void SvxListBoxControl::StateChanged(
sal_uInt16, SfxItemState, const SfxPoolItem* pState )
{
GetToolBox().EnableItem( GetId(),
- SFX_ITEM_DISABLED != GetItemState(pState) );
+ SfxItemState::DISABLED != GetItemState(pState) );
}
@@ -241,7 +241,7 @@ void SvxUndoRedoControl::StateChanged(
{
if ( nSID == SID_UNDO || nSID == SID_REDO )
{
- if ( eState == SFX_ITEM_DISABLED )
+ if ( eState == SfxItemState::DISABLED )
{
ToolBox& rBox = GetToolBox();
rBox.SetQuickHelpText( GetId(), aDefaultText );
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index a02b499abfc4..07eb01230c05 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -79,7 +79,7 @@ void SvxLineStyleToolBoxControl::StateChanged (
SvxLineBox* pBox = (SvxLineBox*)GetToolBox().GetItemWindow( GetId() );
DBG_ASSERT( pBox, "Window not found!" );
- if( eState == SFX_ITEM_DISABLED )
+ if( eState == SfxItemState::DISABLED )
{
pBox->Disable();
pBox->SetNoSelection();
@@ -88,7 +88,7 @@ void SvxLineStyleToolBoxControl::StateChanged (
{
pBox->Enable();
- if ( eState == SFX_ITEM_DEFAULT )
+ if ( eState == SfxItemState::DEFAULT )
{
if( nSID == SID_ATTR_LINE_STYLE )
{
@@ -215,7 +215,7 @@ void SvxLineWidthToolBoxControl::StateChanged(
}
else
{
- if ( eState == SFX_ITEM_DISABLED )
+ if ( eState == SfxItemState::DISABLED )
{
pFld->Disable();
pFld->SetText( "" );
@@ -224,7 +224,7 @@ void SvxLineWidthToolBoxControl::StateChanged(
{
pFld->Enable();
- if ( eState == SFX_ITEM_DEFAULT )
+ if ( eState == SfxItemState::DEFAULT )
{
DBG_ASSERT( pState->ISA(XLineWidthItem), "wrong ItemType" );
@@ -644,8 +644,8 @@ void SvxLineEndToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, co
sal_uInt16 nId = GetId();
ToolBox& rTbx = GetToolBox();
- rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
+ rTbx.EnableItem( nId, SfxItemState::DISABLED != eState );
+ rTbx.SetItemState( nId, ( SfxItemState::DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 1b5972446ecb..288df13186ef 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1039,7 +1039,7 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
SID_ATTR_AUTO_COLOR_INVALID,
OUString( ".uno:AutoColorInvalid" ));
SfxItemState eState = aQueryStatus.QueryState( pDummy );
- if( (SFX_ITEM_DEFAULT > eState) || ( SID_EXTRUSION_3D_COLOR == theSlotId ) )
+ if( (SfxItemState::DEFAULT > eState) || ( SID_EXTRUSION_3D_COLOR == theSlotId ) )
{
aColorSet.SetStyle( aColorSet.GetStyle() | WB_NONEFIELD );
aColorSet.SetText( SVX_RESSTR( RID_SVXSTR_AUTOMATIC ) );
@@ -1145,7 +1145,7 @@ bool SvxColorWindow_Impl::Close()
void SvxColorWindow_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
{
- if (( SFX_ITEM_DISABLED != eState ) && pState )
+ if (( SfxItemState::DISABLED != eState ) && pState )
{
if (( nSID == SID_COLOR_TABLE ) && ( pState->ISA( SvxColorListItem )))
{
@@ -1159,7 +1159,7 @@ void SvxColorWindow_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, co
aColorSet.Clear();
aColorSet.addEntriesForXColorList(*pColorList);
}
- else if ( SFX_ITEM_DEFAULT <= eState )
+ else if ( SfxItemState::DEFAULT <= eState )
{
aColorSet.SetNoSelection();
@@ -1598,7 +1598,7 @@ void SfxStyleControllerItem_Impl::StateChanged(
{
const sal_uInt16 nIdx = GetId() - SID_STYLE_FAMILY_START;
- if ( SFX_ITEM_DEFAULT == eState )
+ if ( SfxItemState::DEFAULT == eState )
{
const SfxTemplateItem* pStateItem =
PTR_CAST( SfxTemplateItem, pState );
@@ -2050,22 +2050,22 @@ void SvxStyleToolBoxControl::StateChanged(
DBG_ASSERT( pBox, "Control not found!" );
- if ( SFX_ITEM_DISABLED == eState )
+ if ( SfxItemState::DISABLED == eState )
pBox->Disable();
else
pBox->Enable();
- rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
+ rTbx.EnableItem( nId, SfxItemState::DISABLED != eState );
switch ( eState )
{
- case SFX_ITEM_DEFAULT:
+ case SfxItemState::DEFAULT:
eTri = ((const SfxBoolItem*)pState)->GetValue()
? TRISTATE_TRUE
: TRISTATE_FALSE;
break;
- case SFX_ITEM_DONTCARE:
+ case SfxItemState::DONTCARE:
eTri = TRISTATE_INDET;
break;
@@ -2075,7 +2075,7 @@ void SvxStyleToolBoxControl::StateChanged(
rTbx.SetItemState( nId, eTri );
- if ( SFX_ITEM_DISABLED != eState )
+ if ( SfxItemState::DISABLED != eState )
Update();
}
@@ -2114,7 +2114,7 @@ void SvxFontNameToolBoxControl::StateChanged(
DBG_ASSERT( pBox, "Control not found!" );
- if ( SFX_ITEM_DISABLED == eState )
+ if ( SfxItemState::DISABLED == eState )
{
pBox->Disable();
pBox->Update( (const SvxFontItem*)NULL );
@@ -2123,7 +2123,7 @@ void SvxFontNameToolBoxControl::StateChanged(
{
pBox->Enable();
- if ( SFX_ITEM_DEFAULT == eState )
+ if ( SfxItemState::DEFAULT == eState )
{
const SvxFontItem* pFontItem = dynamic_cast< const SvxFontItem* >( pState );
@@ -2136,7 +2136,7 @@ void SvxFontNameToolBoxControl::StateChanged(
pBox->SaveValue();
}
- rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
+ rTbx.EnableItem( nId, SfxItemState::DISABLED != eState );
}
Window* SvxFontNameToolBoxControl::CreateItemWindow( Window *pParent )
@@ -2259,12 +2259,12 @@ void SvxColorToolBoxControl::StateChanged(
{
ToolBox& rTbx = GetToolBox();
sal_uInt16 nId = GetId();
- rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
+ rTbx.EnableItem( nId, SfxItemState::DISABLED != eState );
+ rTbx.SetItemState( nId, ( SfxItemState::DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
if ( nSID == SID_ATTR_CHAR_COLOR_EXT || nSID == SID_ATTR_CHAR_COLOR_BACKGROUND_EXT )
{
- if ( pState && SFX_ITEM_DONTCARE != eState )
+ if ( pState && SfxItemState::DONTCARE != eState )
{
const SfxBoolItem* pBool = static_cast< const SfxBoolItem* >( pState );
rTbx.CheckItem( nId, pBool && pBool->GetValue() );
@@ -2368,8 +2368,8 @@ void SvxLineColorToolBoxControl::StateChanged(
{
ToolBox& rTbx = GetToolBox();
sal_uInt16 nId = GetId();
- rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
+ rTbx.EnableItem( nId, SfxItemState::DISABLED != eState );
+ rTbx.SetItemState( nId, ( SfxItemState::DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
}
void SvxLineColorToolBoxControl::Select(sal_uInt16 /*nSelectModifier*/)
@@ -2415,8 +2415,8 @@ void SvxFrameToolBoxControl::StateChanged(
sal_uInt16 nId = GetId();
ToolBox& rTbx = GetToolBox();
- rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, (SFX_ITEM_DONTCARE == eState)
+ rTbx.EnableItem( nId, SfxItemState::DISABLED != eState );
+ rTbx.SetItemState( nId, (SfxItemState::DONTCARE == eState)
? TRISTATE_INDET
: TRISTATE_FALSE );
}
@@ -2454,8 +2454,8 @@ void SvxFrameLineStyleToolBoxControl::StateChanged(
sal_uInt16 nId = GetId();
ToolBox& rTbx = GetToolBox();
- rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, (SFX_ITEM_DONTCARE == eState)
+ rTbx.EnableItem( nId, SfxItemState::DISABLED != eState );
+ rTbx.SetItemState( nId, (SfxItemState::DONTCARE == eState)
? TRISTATE_INDET
: TRISTATE_FALSE );
}
@@ -2474,14 +2474,14 @@ void SvxSimpleUndoRedoController::StateChanged( sal_uInt16, SfxItemState eState,
{
SfxStringItem* pItem = PTR_CAST( SfxStringItem, pState );
ToolBox& rBox = GetToolBox();
- if ( pItem && eState != SFX_ITEM_DISABLED )
+ if ( pItem && eState != SfxItemState::DISABLED )
{
OUString aNewText( MnemonicGenerator::EraseAllMnemonicChars( pItem->GetValue() ) );
rBox.SetQuickHelpText( GetId(), aNewText );
}
- if ( eState == SFX_ITEM_DISABLED )
+ if ( eState == SfxItemState::DISABLED )
rBox.SetQuickHelpText( GetId(), aDefaultText );
- rBox.EnableItem( GetId(), eState != SFX_ITEM_DISABLED );
+ rBox.EnableItem( GetId(), eState != SfxItemState::DISABLED );
}
static void lcl_ResizeValueSet( Window &rWin, ValueSet &rValueSet )
diff --git a/svx/source/tbxctrls/tbxdrctl.cxx b/svx/source/tbxctrls/tbxdrctl.cxx
index 69c36b62cd55..52d208d94c25 100644
--- a/svx/source/tbxctrls/tbxdrctl.cxx
+++ b/svx/source/tbxctrls/tbxdrctl.cxx
@@ -57,7 +57,7 @@ SvxTbxCtlDraw::SvxTbxCtlDraw( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx
void SvxTbxCtlDraw::StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState )
{
- GetToolBox().EnableItem( GetId(), ( eState != SFX_ITEM_DISABLED ) );
+ GetToolBox().EnableItem( GetId(), ( eState != SfxItemState::DISABLED ) );
SfxToolBoxControl::StateChanged( nSID, eState, pState );
Reference< XLayoutManager > xLayoutMgr = getLayoutManager();