summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2019-10-04 18:26:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-05 09:10:58 +0200
commitb0b8851021cee26412182b51ed28fe574632a4d6 (patch)
tree06a657408a115e3fd8bbab63d667537b3462829d /sc
parent9ba86e80ec77c02e4b759a08264c035fba6f2b7c (diff)
Convert various FID_VALID_* to SfxUInt16Item
Change-Id: Ic21ec69513ee520cedc026b8c2d657464beed19b Reviewed-on: https://gerrit.libreoffice.org/80250 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/dbgui/validate.cxx12
-rw-r--r--sc/source/ui/view/cellsh2.cxx12
2 files changed, 12 insertions, 12 deletions
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index b6d880b92bd1..2ee9cf39f446 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -416,13 +416,13 @@ void ScTPValidationValue::Reset( const SfxItemSet* rArgSet )
sal_uInt16 nLbPos = SC_VALIDDLG_ALLOW_ANY;
if( rArgSet->GetItemState( FID_VALID_MODE, true, &pItem ) == SfxItemState::SET )
nLbPos = lclGetPosFromValMode( static_cast< ScValidationMode >(
- static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) );
+ static_cast< const SfxUInt16Item* >( pItem )->GetValue() ) );
m_xLbAllow->set_active( nLbPos );
nLbPos = SC_VALIDDLG_DATA_EQUAL;
if( rArgSet->GetItemState( FID_VALID_CONDMODE, true, &pItem ) == SfxItemState::SET )
nLbPos = lclGetPosFromCondMode( static_cast< ScConditionMode >(
- static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) );
+ static_cast< const SfxUInt16Item* >( pItem )->GetValue() ) );
m_xLbValue->set_active( nLbPos );
// *** check boxes ***
@@ -463,9 +463,9 @@ bool ScTPValidationValue::FillItemSet( SfxItemSet* rArgSet )
ScConditionMode eCondMode = bCustom ?
ScConditionMode::Direct : lclGetCondModeFromPos( m_xLbValue->get_active() );
- rArgSet->Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>(
+ rArgSet->Put( SfxUInt16Item( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>(
lclGetValModeFromPos( nLbPos ) ) ) );
- rArgSet->Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>( eCondMode ) ) );
+ rArgSet->Put( SfxUInt16Item( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>( eCondMode ) ) );
rArgSet->Put( SfxStringItem( FID_VALID_VALUE1, GetFirstFormula() ) );
rArgSet->Put( SfxStringItem( FID_VALID_VALUE2, GetSecondFormula() ) );
rArgSet->Put( SfxBoolItem( FID_VALID_BLANK, m_xCbAllow->get_active() ) );
@@ -775,7 +775,7 @@ void ScTPValidationError::Reset( const SfxItemSet* rArgSet )
m_xTsbShow->set_state( TRISTATE_TRUE ); // check by default
if ( rArgSet->GetItemState( FID_VALID_ERRSTYLE, true, &pItem ) == SfxItemState::SET )
- m_xLbAction->set_active( static_cast<const SfxAllEnumItem*>(pItem)->GetValue() );
+ m_xLbAction->set_active( static_cast<const SfxUInt16Item*>(pItem)->GetValue() );
else
m_xLbAction->set_active( 0 );
@@ -795,7 +795,7 @@ void ScTPValidationError::Reset( const SfxItemSet* rArgSet )
bool ScTPValidationError::FillItemSet( SfxItemSet* rArgSet )
{
rArgSet->Put( SfxBoolItem( FID_VALID_SHOWERR, m_xTsbShow->get_state() == TRISTATE_TRUE ) );
- rArgSet->Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, m_xLbAction->get_active() ) );
+ rArgSet->Put( SfxUInt16Item( FID_VALID_ERRSTYLE, m_xLbAction->get_active() ) );
rArgSet->Put( SfxStringItem( FID_VALID_ERRTITLE, m_xEdtTitle->get_text() ) );
rArgSet->Put( SfxStringItem( FID_VALID_ERRTEXT, m_xEdError->get_text() ) );
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index d7f88f710513..ef5c0086b7cd 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -869,8 +869,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
bShowHelp = pOldData->GetInput( aHelpTitle, aHelpText );
bShowError = pOldData->GetErrMsg( aErrTitle, aErrText, eErrStyle );
- aArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>(eMode) ) );
- aArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>(eOper) ) );
+ aArgSet.Put( SfxUInt16Item( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>(eMode) ) );
+ aArgSet.Put( SfxUInt16Item( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>(eOper) ) );
aArgSet.Put( SfxStringItem( FID_VALID_VALUE1, aExpr1 ) );
aArgSet.Put( SfxStringItem( FID_VALID_VALUE2, aExpr2 ) );
aArgSet.Put( SfxBoolItem( FID_VALID_BLANK, bBlank ) );
@@ -879,7 +879,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
aArgSet.Put( SfxStringItem( FID_VALID_HELPTITLE, aHelpTitle ) );
aArgSet.Put( SfxStringItem( FID_VALID_HELPTEXT, aHelpText ) );
aArgSet.Put( SfxBoolItem( FID_VALID_SHOWERR, bShowError ) );
- aArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, sal::static_int_cast<sal_uInt16>(eErrStyle) ) );
+ aArgSet.Put( SfxUInt16Item( FID_VALID_ERRSTYLE, sal::static_int_cast<sal_uInt16>(eErrStyle) ) );
aArgSet.Put( SfxStringItem( FID_VALID_ERRTITLE, aErrTitle ) );
aArgSet.Put( SfxStringItem( FID_VALID_ERRTEXT, aErrText ) );
}
@@ -897,9 +897,9 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
const SfxItemSet* pOutSet = static_cast<ScValidationDlg*>(xDlg.get())->GetOutputItemSet();
if ( pOutSet->GetItemState( FID_VALID_MODE, true, &pItem ) == SfxItemState::SET )
- eMode = static_cast<ScValidationMode>(static_cast<const SfxAllEnumItem*>(pItem)->GetValue());
+ eMode = static_cast<ScValidationMode>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
if ( pOutSet->GetItemState( FID_VALID_CONDMODE, true, &pItem ) == SfxItemState::SET )
- eOper = static_cast<ScConditionMode>(static_cast<const SfxAllEnumItem*>(pItem)->GetValue());
+ eOper = static_cast<ScConditionMode>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
if ( pOutSet->GetItemState( FID_VALID_VALUE1, true, &pItem ) == SfxItemState::SET )
{
OUString aTemp1 = static_cast<const SfxStringItem*>(pItem)->GetValue();
@@ -966,7 +966,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
if ( pOutSet->GetItemState( FID_VALID_SHOWERR, true, &pItem ) == SfxItemState::SET )
bShowError = static_cast<const SfxBoolItem*>(pItem)->GetValue();
if ( pOutSet->GetItemState( FID_VALID_ERRSTYLE, true, &pItem ) == SfxItemState::SET )
- eErrStyle = static_cast<ScValidErrorStyle>(static_cast<const SfxAllEnumItem*>(pItem)->GetValue());
+ eErrStyle = static_cast<ScValidErrorStyle>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
if ( pOutSet->GetItemState( FID_VALID_ERRTITLE, true, &pItem ) == SfxItemState::SET )
aErrTitle = static_cast<const SfxStringItem*>(pItem)->GetValue();
if ( pOutSet->GetItemState( FID_VALID_ERRTEXT, true, &pItem ) == SfxItemState::SET )