summaryrefslogtreecommitdiff
path: root/svx/source/form
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/form
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/form')
-rw-r--r--svx/source/form/datanavi.cxx2
-rw-r--r--svx/source/form/filtnav.cxx2
-rw-r--r--svx/source/form/fmPropBrw.cxx2
-rw-r--r--svx/source/form/fmexpl.cxx2
-rw-r--r--svx/source/form/fmshell.cxx2
-rw-r--r--svx/source/form/fmshimp.cxx4
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx2
-rw-r--r--svx/source/form/fmview.cxx2
-rw-r--r--svx/source/form/tabwin.cxx2
-rw-r--r--svx/source/form/tbxform.cxx4
10 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 0d746437043c..bfc357101e1f 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -2162,7 +2162,7 @@ namespace svxform
if ( !pState || SID_FM_DATANAVIGATOR_CONTROL != nSID )
return;
- if ( eState >= SFX_ITEM_DEFAULT )
+ if ( eState >= SfxItemState::DEFAULT )
{
FmFormShell* pShell = PTR_CAST( FmFormShell,((SfxObjectItem*)pState)->GetShell() );
Update( pShell );
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index efd0890eb4a5..ea6fa56e03c9 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1910,7 +1910,7 @@ void FmFilterNavigatorWin::StateChanged( sal_uInt16 nSID, SfxItemState eState, c
if( !pState || SID_FM_FILTER_NAVIGATOR_CONTROL != nSID )
return;
- if( eState >= SFX_ITEM_DEFAULT )
+ if( eState >= SfxItemState::DEFAULT )
{
FmFormShell* pShell = PTR_CAST( FmFormShell,((SfxObjectItem*)pState)->GetShell() );
UpdateContent( pShell );
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index 86964972ba5c..6eefc8108c18 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -627,7 +627,7 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool
m_bInStateChange = true;
try
{
- if (eState >= SFX_ITEM_DEFAULT)
+ if (eState >= SfxItemState::DEFAULT)
{
FmFormShell* pShell = PTR_CAST(FmFormShell,((SfxObjectItem*)pState)->GetShell());
InterfaceBag aSelection;
diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx
index aae32a4fc7b0..e49e4dab2de8 100644
--- a/svx/source/form/fmexpl.cxx
+++ b/svx/source/form/fmexpl.cxx
@@ -529,7 +529,7 @@ namespace svxform
if( !pState || SID_FM_FMEXPLORER_CONTROL != nSID )
return;
- if( eState >= SFX_ITEM_DEFAULT )
+ if( eState >= SfxItemState::DEFAULT )
{
FmFormShell* pShell = PTR_CAST( FmFormShell,((SfxObjectItem*)pState)->GetShell() );
UpdateContent( pShell );
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 36671195d898..69d232a590ae 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -739,7 +739,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
if ( pArgs )
{
const SfxPoolItem* pItem;
- if ( ( pArgs->GetItemState( FN_PARAM_1, true, &pItem ) ) == SFX_ITEM_SET )
+ if ( ( pArgs->GetItemState( FN_PARAM_1, true, &pItem ) ) == SfxItemState::SET )
{
const SfxInt32Item* pTypedItem = PTR_CAST( SfxInt32Item, pItem );
if ( pTypedItem )
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index b555eb8c7942..379188c3f769 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -4083,11 +4083,11 @@ void ControlConversionMenuController::StateChanged(sal_uInt16 nSID, SfxItemState
SfxMenuControl::StateChanged(nSID, eState, pState);
else if (FmXFormShell::isControlConversionSlot(nSID))
{
- if ((m_pConversionMenu->GetItemPos(nSID) != MENU_ITEM_NOTFOUND) && (eState == SFX_ITEM_DISABLED))
+ if ((m_pConversionMenu->GetItemPos(nSID) != MENU_ITEM_NOTFOUND) && (eState == SfxItemState::DISABLED))
{
m_pConversionMenu->RemoveItem(m_pConversionMenu->GetItemPos(nSID));
}
- else if ((m_pConversionMenu->GetItemPos(nSID) == MENU_ITEM_NOTFOUND) && (eState != SFX_ITEM_DISABLED))
+ else if ((m_pConversionMenu->GetItemPos(nSID) == MENU_ITEM_NOTFOUND) && (eState != SfxItemState::DISABLED))
{
// We can't simply re-insert the item because we have a clear order for all the our items.
// So first we have to determine the position of the item to insert.
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index 2a7c71e59018..a1c5702c858b 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -663,7 +663,7 @@ namespace svx
const SfxItemSet& rModifiedItems = *xDialog->GetOutputItemSet();
for ( WhichId nWhich = pPool->GetFirstWhich(); nWhich <= pPool->GetLastWhich(); ++nWhich )
{
- if ( rModifiedItems.GetItemState( nWhich ) == SFX_ITEM_SET )
+ if ( rModifiedItems.GetItemState( nWhich ) == SfxItemState::SET )
{
SfxSlotId nSlotForItemSet = pPool->GetSlotId( nWhich );
const SfxPoolItem* pModifiedItem = rModifiedItems.GetItem( nWhich );
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index b4e8a960975a..b5da823bbc3a 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -123,7 +123,7 @@ void FmFormView::Init()
if ( pObjShell && pObjShell->GetMedium() )
{
const SfxPoolItem *pItem=0;
- if ( pObjShell->GetMedium()->GetItemSet()->GetItemState( SID_COMPONENTDATA, false, &pItem ) == SFX_ITEM_SET )
+ if ( pObjShell->GetMedium()->GetItemSet()->GetItemState( SID_COMPONENTDATA, false, &pItem ) == SfxItemState::SET )
{
::comphelper::NamedValueCollection aComponentData( ((SfxUnoAnyItem*)pItem)->GetValue() );
bInitDesignMode = aComponentData.getOrDefault( "ApplyFormDesignMode", bInitDesignMode );
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index 58b357b31f14..6de6ee7ab443 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -280,7 +280,7 @@ void FmFieldWin::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoo
if (!pState || SID_FM_FIELDS_CONTROL != nSID)
return;
- if (eState >= SFX_ITEM_DEFAULT)
+ if (eState >= SfxItemState::DEFAULT)
{
FmFormShell* pShell = PTR_CAST(FmFormShell,((SfxObjectItem*)pState)->GetShell());
UpdateContent(pShell);
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
index 6405cf53afbc..f519dd462b19 100644
--- a/svx/source/form/tbxform.cxx
+++ b/svx/source/form/tbxform.cxx
@@ -156,7 +156,7 @@ void SvxFmTbxCtlConfig::StateChanged(sal_uInt16 nSID, SfxItemState eState, const
if (nSID == SID_FM_CONFIG)
{
sal_uInt16 nSlot = 0;
- if (eState >= SFX_ITEM_DEFAULT)
+ if (eState >= SfxItemState::DEFAULT)
nSlot = ((SfxUInt16Item*)pState)->GetValue();
switch( nSlot )
@@ -264,7 +264,7 @@ void SvxFmTbxCtlAbsRec::StateChanged( sal_uInt16 nSID, SfxItemState eState, cons
pWin->SetValue( pItem ? pItem->GetValue() : -1 );
}
- bool bEnable = SFX_ITEM_DISABLED != eState && pState;
+ bool bEnable = SfxItemState::DISABLED != eState && pState;
if (!bEnable)
pWin->SetText(OUString());