summaryrefslogtreecommitdiff
path: root/sc/source/ui/sidebar
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 /sc/source/ui/sidebar
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 'sc/source/ui/sidebar')
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.cxx16
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx24
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx4
3 files changed, 22 insertions, 22 deletions
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index 462a69c7ea00..03432bec2530 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -236,7 +236,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
case SID_H_ALIGNCELL:
{
SvxCellHorJustify meHorAlignState = SVX_HOR_JUSTIFY_STANDARD;
- if(eState >= SFX_ITEM_DEFAULT && pState && pState->ISA(SvxHorJustifyItem) )
+ if(eState >= SfxItemState::DEFAULT && pState && pState->ISA(SvxHorJustifyItem) )
{
const SvxHorJustifyItem* pItem = (const SvxHorJustifyItem*)pState;
meHorAlignState = (SvxCellHorJustify)pItem->GetValue();
@@ -261,7 +261,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
}
break;
case SID_ATTR_ALIGN_INDENT:
- if(eState >= SFX_ITEM_DEFAULT && pState && pState->ISA(SfxUInt16Item) )
+ if(eState >= SfxItemState::DEFAULT && pState && pState->ISA(SfxUInt16Item) )
{
const SfxUInt16Item* pItem = (const SfxUInt16Item*)pState;
sal_uInt16 nVal = pItem->GetValue();
@@ -274,7 +274,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
}
break;
case FID_MERGE_TOGGLE:
- if(eState >= SFX_ITEM_DEFAULT && pState && pState->ISA(SfxBoolItem) )
+ if(eState >= SfxItemState::DEFAULT && pState && pState->ISA(SfxBoolItem) )
{
mpCBXMergeCell->Enable();
const SfxBoolItem* pItem = (const SfxBoolItem*)pState;
@@ -288,7 +288,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
break;
case SID_ATTR_ALIGN_LINEBREAK:
- if(eState == SFX_ITEM_DISABLED)
+ if(eState == SfxItemState::DISABLED)
{
mpCBXWrapText->EnableTriState(false);
mpCBXWrapText->Check(false);
@@ -297,13 +297,13 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
else
{
mpCBXWrapText->Enable();
- if(eState >= SFX_ITEM_DEFAULT && pState && pState->ISA(SfxBoolItem) )
+ if(eState >= SfxItemState::DEFAULT && pState && pState->ISA(SfxBoolItem) )
{
mpCBXWrapText->EnableTriState(false);
const SfxBoolItem* pItem = (const SfxBoolItem*)pState;
mpCBXWrapText->Check(pItem->GetValue());
}
- else if(eState == SFX_ITEM_DONTCARE)
+ else if(eState == SfxItemState::DONTCARE)
{
mpCBXWrapText->EnableTriState(true);
mpCBXWrapText->SetState(TRISTATE_INDET);
@@ -311,7 +311,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
}
break;
case SID_ATTR_ALIGN_DEGREES:
- if (eState >= SFX_ITEM_DEFAULT)
+ if (eState >= SfxItemState::DEFAULT)
{
long nTmp = ((const SfxInt32Item*)pState)->GetValue();
mpMtrAngle->SetValue( nTmp / 100); //wj
@@ -350,7 +350,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
}
break;
case SID_ATTR_ALIGN_STACKED:
- if (eState >= SFX_ITEM_DEFAULT)
+ if (eState >= SfxItemState::DEFAULT)
{
mpCbStacked->EnableTriState(false);
const SfxBoolItem* aStackItem = (const SfxBoolItem*)pState;
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index a16668c3ca40..49bfa73a0570 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -387,7 +387,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
switch(nSID)
{
case SID_BACKGROUND_COLOR:
- if(eState >= SFX_ITEM_DEFAULT)
+ if(eState >= SfxItemState::DEFAULT)
{
const SvxColorItem* pSvxColorItem = dynamic_cast< const SvxColorItem* >(pState);
@@ -405,7 +405,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
mpFillColorUpdater->Update(COL_TRANSPARENT);
break;
case SID_FRAME_LINECOLOR:
- if( eState == SFX_ITEM_DONTCARE)
+ if( eState == SfxItemState::DONTCARE)
{
mbLineColorAvailable = true;
maLineColor.SetColor( COL_TRANSPARENT );
@@ -413,7 +413,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
break;
}
- if(eState >= SFX_ITEM_DEFAULT && pState && pState->ISA(SvxColorItem) )
+ if(eState >= SfxItemState::DEFAULT && pState && pState->ISA(SvxColorItem) )
{
const SvxColorItem* pSvxColorItem = dynamic_cast< const SvxColorItem* >(pState);
@@ -439,7 +439,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
UpdateControlState();
break;
case SID_FRAME_LINESTYLE:
- if( eState == SFX_ITEM_DONTCARE )
+ if( eState == SfxItemState::DONTCARE )
{
mbBorderStyleAvailable = true;
mnIn = 0;
@@ -449,7 +449,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
break;
}
- if(eState >= SFX_ITEM_DEFAULT)
+ if(eState >= SfxItemState::DEFAULT)
{
const SvxLineItem* pSvxLineItem = dynamic_cast< const SvxLineItem* >(pState);
@@ -474,7 +474,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
SetStyleIcon();
break;
case SID_ATTR_BORDER_OUTER:
- if(eState >= SFX_ITEM_DEFAULT)
+ if(eState >= SfxItemState::DEFAULT)
{
const SvxBoxItem* pBoxItem = dynamic_cast< const SvxBoxItem* >(pState);
@@ -509,7 +509,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
}
break;
case SID_ATTR_BORDER_INNER:
- if(eState >= SFX_ITEM_DEFAULT)
+ if(eState >= SfxItemState::DEFAULT)
{
const SvxBoxInfoItem* pBoxInfoItem = dynamic_cast< const SvxBoxInfoItem* >(pState);
@@ -552,7 +552,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
}
break;
case SID_ATTR_BORDER_DIAG_TLBR:
- if( eState == SFX_ITEM_DONTCARE )
+ if( eState == SfxItemState::DONTCARE )
{
mbTLBR = true;
maTLBRColor.SetColor(COL_TRANSPARENT);
@@ -561,7 +561,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
break;
}
- if(eState >= SFX_ITEM_DEFAULT)
+ if(eState >= SfxItemState::DEFAULT)
{
const SvxLineItem* pItem = dynamic_cast< const SvxLineItem* >(pState);
@@ -594,7 +594,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
UpdateControlState();
break;
case SID_ATTR_BORDER_DIAG_BLTR:
- if( eState == SFX_ITEM_DONTCARE )
+ if( eState == SfxItemState::DONTCARE )
{
mbBLTR = true;
maBLTRColor.SetColor( COL_TRANSPARENT );
@@ -603,7 +603,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
break;
}
- if(eState >= SFX_ITEM_DEFAULT)
+ if(eState >= SfxItemState::DEFAULT)
{
const SvxLineItem* pItem = dynamic_cast< const SvxLineItem* >(pState);
@@ -636,7 +636,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
UpdateControlState();
break;
case FID_TAB_TOGGLE_GRID:
- if(eState >= SFX_ITEM_DEFAULT)
+ if(eState >= SfxItemState::DEFAULT)
{
const SfxBoolItem* pItem = dynamic_cast< const SfxBoolItem* >(pState);
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index 51bc433e63ff..a63f065182e7 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -216,7 +216,7 @@ void NumberFormatPropertyPanel::NotifyItemUpdate(
{
case SID_NUMBER_TYPE_FORMAT:
{
- if( eState >= SFX_ITEM_DEFAULT)
+ if( eState >= SfxItemState::DEFAULT)
{
const SfxInt16Item* pItem = (const SfxInt16Item*)pState;
sal_uInt16 nVal = pItem->GetValue();
@@ -254,7 +254,7 @@ void NumberFormatPropertyPanel::NotifyItemUpdate(
bool bNegRed = false;
sal_uInt16 nPrecision = 0;
sal_uInt16 nLeadZeroes = 0;
- if( eState >= SFX_ITEM_DEFAULT)
+ if( eState >= SfxItemState::DEFAULT)
{
const SfxStringItem* pItem = (const SfxStringItem*)pState;
OUString aCode = pItem->GetValue();