diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-10 17:53:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-12 06:08:32 +0000 |
commit | ea733ab5b632109d28bb8f1dc37116340b26229b (patch) | |
tree | 78a5c4d6cad5d6f2c58a89745ba0af130ef0e188 /sfx2/source | |
parent | cc3294e127a6aedb8f6da5741ac9063da1cc2135 (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 'sfx2/source')
31 files changed, 305 insertions, 305 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 8ced478adf56..a88ae482b2d0 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -507,7 +507,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) SvtMiscOptions aMiscOptions; boost::shared_ptr< comphelper::ConfigurationChanges > batch( comphelper::ConfigurationChanges::create()); - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_OUTSTYLE3D), true, &pItem) ) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_OUTSTYLE3D), true, &pItem) ) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); sal_uInt16 nOutStyle = @@ -515,7 +515,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) aMiscOptions.SetToolboxStyle( nOutStyle ); } - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_BIGSIZE), true, &pItem) ) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_BIGSIZE), true, &pItem) ) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); bool bBigSize = ( (const SfxBoolItem*)pItem )->GetValue(); @@ -533,104 +533,104 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) } // Backup - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BACKUP), true, &pItem) ) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BACKUP), true, &pItem) ) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetBackup( ( (const SfxBoolItem*)pItem )->GetValue() ); } // PrettyPrinting - if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_PRETTYPRINTING ), true, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_PRETTYPRINTING ), true, &pItem ) ) { DBG_ASSERT( pItem->ISA( SfxBoolItem ), "BoolItem expected" ); aSaveOptions.SetPrettyPrinting( static_cast< const SfxBoolItem*> ( pItem )->GetValue() ); } // WarnAlienFormat - if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_WARNALIENFORMAT ), true, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_WARNALIENFORMAT ), true, &pItem ) ) { DBG_ASSERT( pItem->ISA( SfxBoolItem ), "BoolItem expected" ); aSaveOptions.SetWarnAlienFormat( static_cast< const SfxBoolItem*> ( pItem )->GetValue() ); } // AutoSave - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVE), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVE), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetAutoSave( ( (const SfxBoolItem*)pItem )->GetValue() ); } // AutoSave-Propt - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEPROMPT), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEPROMPT), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetAutoSavePrompt(((const SfxBoolItem *)pItem)->GetValue()); } // AutoSave-Time - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEMINUTE), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEMINUTE), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected"); aSaveOptions.SetAutoSaveTime(((const SfxUInt16Item *)pItem)->GetValue()); } // UserAutoSave - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_USERAUTOSAVE), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_USERAUTOSAVE), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetUserAutoSave( ( (const SfxBoolItem*)pItem )->GetValue() ); } // DocInfo - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_DOCINFO), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_DOCINFO), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetDocInfoSave(((const SfxBoolItem *)pItem)->GetValue()); } // Mark open Documents - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WORKINGSET), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WORKINGSET), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetSaveWorkingSet(((const SfxBoolItem *)pItem)->GetValue()); } // Save window settings - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_SAVEDOCVIEW), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_SAVEDOCVIEW), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetSaveDocView(((const SfxBoolItem *)pItem)->GetValue()); } // Metric - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_METRIC), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_METRIC), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected"); } // HelpBalloons - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELPBALLOONS), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_HELPBALLOONS), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aHelpOptions.SetExtendedHelp(((const SfxBoolItem *)pItem)->GetValue()); } // HelpTips - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELPTIPS), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_HELPTIPS), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aHelpOptions.SetHelpTips(((const SfxBoolItem *)pItem)->GetValue()); } // WelcomeScreen - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WELCOMESCREEN ), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WELCOMESCREEN ), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aHelpOptions.SetWelcomeScreen( ((const SfxBoolItem *)pItem)->GetValue() ); } // WelcomeScreen - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_WELCOMESCREEN_RESET ), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_WELCOMESCREEN_RESET ), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); bool bReset = ((const SfxBoolItem *)pItem)->GetValue(); @@ -639,28 +639,28 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) OSL_FAIL( "Not implemented, may be EOL!" ); } } - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELP_STYLESHEET ), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_HELP_STYLESHEET ), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected"); aHelpOptions.SetHelpStyleSheet( ((const SfxStringItem *)pItem)->GetValue() ); } // SaveRelINet - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_INET), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_INET), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetSaveRelINet(((const SfxBoolItem *)pItem)->GetValue()); } // SaveRelFSys - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_FSYS), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_FSYS), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); aSaveOptions.SetSaveRelFSys(((const SfxBoolItem *)pItem)->GetValue()); } // Undo-Count - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_UNDO_COUNT), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_UNDO_COUNT), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected"); sal_uInt16 nUndoCount = ((const SfxUInt16Item*)pItem)->GetValue(); @@ -689,58 +689,58 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) } // Office autostart - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_QUICKLAUNCHER), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_QUICKLAUNCHER), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); ShutdownIcon::SetAutostart( ( (const SfxBoolItem*)pItem )->GetValue() ); } // StarBasic Enable - if ( SFX_ITEM_SET == rSet.GetItemState(SID_BASIC_ENABLED, true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(SID_BASIC_ENABLED, true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxUInt16Item), "SfxInt16Item expected"); aSecurityOptions.SetBasicMode( (EBasicSecurityMode)( (const SfxUInt16Item*)pItem )->GetValue() ); } // Execute PlugIns - if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_EXE_PLUGIN, true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(SID_INET_EXE_PLUGIN, true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected"); aSecurityOptions.SetExecutePlugins( ( (const SfxBoolItem *)pItem )->GetValue() ); } - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_PROXY_TYPE), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_INET_PROXY_TYPE), true, &pItem)) { DBG_ASSERT( pItem->ISA(SfxUInt16Item), "UInt16Item expected" ); officecfg::Inet::Settings::ooInetProxyType::set( static_cast< SfxUInt16Item const * >(pItem)->GetValue(), batch); } - if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_NAME ), true, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_NAME ), true, &pItem ) ) { DBG_ASSERT( pItem->ISA(SfxStringItem), "StringItem expected" ); officecfg::Inet::Settings::ooInetHTTPProxyName::set( static_cast< SfxStringItem const * >(pItem)->GetValue(), batch); } - if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_PORT ), true, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_PORT ), true, &pItem ) ) { DBG_ASSERT( pItem->ISA(SfxInt32Item), "Int32Item expected" ); officecfg::Inet::Settings::ooInetHTTPProxyPort::set( static_cast< SfxInt32Item const * >(pItem)->GetValue(), batch); } - if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_NAME ), true, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_NAME ), true, &pItem ) ) { DBG_ASSERT( pItem->ISA(SfxStringItem), "StringItem expected" ); officecfg::Inet::Settings::ooInetFTPProxyName::set( static_cast< SfxStringItem const * >(pItem)->GetValue(), batch); } - if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_PORT ), true, &pItem ) ) + if ( SfxItemState::SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_PORT ), true, &pItem ) ) { DBG_ASSERT( pItem->ISA(SfxInt32Item), "Int32Item expected" ); officecfg::Inet::Settings::ooInetFTPProxyPort::set( static_cast< SfxInt32Item const * >(pItem)->GetValue(), batch); } - if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_NOPROXY, true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(SID_INET_NOPROXY, true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected"); officecfg::Inet::Settings::ooInetNoProxy::set( @@ -748,7 +748,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) } // Secure-Referers - if ( SFX_ITEM_SET == rSet.GetItemState(SID_SECURE_URL, true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(SID_SECURE_URL, true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxStringListItem), "StringListItem expected"); ::com::sun::star::uno::Sequence< OUString > seqURLs; @@ -756,12 +756,12 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) aSecurityOptions.SetSecureURLs( seqURLs ); } - if ( SFX_ITEM_SET == rSet.GetItemState(SID_MACRO_WARNING, true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(SID_MACRO_WARNING, true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected"); aSecurityOptions.SetWarningEnabled( ( (const SfxBoolItem *)pItem )->GetValue() ); } - if ( SFX_ITEM_SET == rSet.GetItemState(SID_MACRO_CONFIRMATION, true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(SID_MACRO_CONFIRMATION, true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected"); aSecurityOptions.SetConfirmationEnabled( ( (const SfxBoolItem *)pItem )->GetValue() ); @@ -783,7 +783,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet) SfxAllItemSet aSendSet( rSet ); // PathName - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_PATHNAME), true, &pItem)) + if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_PATHNAME), true, &pItem)) { DBG_ASSERT(pItem->ISA(SfxAllEnumItem), "AllEnumItem expected"); const SfxAllEnumItem* pEnumItem = (const SfxAllEnumItem *)pItem; diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index f16be36b767e..7fcb63c9c470 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -811,8 +811,8 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) const SfxPoolItem *pItem; SfxItemState aState = pCurrentShell ? - pCurrentShell->GetDispatcher()->QueryState(SID_ATTR_ZOOM, pItem) : SFX_ITEM_DISABLED; - if ( aState == SFX_ITEM_DISABLED ) + pCurrentShell->GetDispatcher()->QueryState(SID_ATTR_ZOOM, pItem) : SfxItemState::DISABLED; + if ( aState == SfxItemState::DISABLED ) rSet.DisableItem( nWhich ); } break; @@ -975,7 +975,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) const SfxItemSet* pArgs = rReq.GetInternalArgs_Impl(); const SfxPoolItem* pItem = NULL; Reference < XFrame > xFrame; - if ( pArgs && pArgs->GetItemState( SID_FILLFRAME, false, &pItem ) == SFX_ITEM_SET ) + if ( pArgs && pArgs->GetItemState( SID_FILLFRAME, false, &pItem ) == SfxItemState::SET ) { OSL_ENSURE( pItem->ISA( SfxUnoFrameItem ), "SfxApplication::OfaExec_Impl: XFrames are to be transported via SfxUnoFrameItem by now!" ); xFrame = static_cast< const SfxUnoFrameItem*>( pItem )->GetFrame(); @@ -1106,7 +1106,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) const SfxPoolItem* pItem; bool bChooseOnly = false; Reference< XModel > xLimitToModel; - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_RECORDMACRO, false, &pItem) ) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_RECORDMACRO, false, &pItem) ) { bool bRecord = ((SfxBoolItem*)pItem)->GetValue(); if ( bRecord ) @@ -1131,7 +1131,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; sal_Int16 nTabId = 0; - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_MACROORGANIZER, false, &pItem) ) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_MACROORGANIZER, false, &pItem) ) { nTabId = ((SfxUInt16Item*)pItem)->GetValue(); } @@ -1201,7 +1201,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; OUString aLanguage; - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_SCRIPTORGANIZER, false, &pItem) ) + if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_SCRIPTORGANIZER, false, &pItem) ) { aLanguage = ((SfxScriptOrganizerItem*)pItem)->getLanguage(); } @@ -1250,7 +1250,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) const SfxPoolItem* pItem=NULL; const SfxItemSet* pSet = rReq.GetArgs(); SfxItemPool* pSetPool = pSet ? pSet->GetPool() : NULL; - if ( pSet && pSet->GetItemState( pSetPool->GetWhich( SID_AUTO_CORRECT_DLG ), false, &pItem ) == SFX_ITEM_SET ) + if ( pSet && pSet->GetItemState( pSetPool->GetWhich( SID_AUTO_CORRECT_DLG ), false, &pItem ) == SfxItemState::SET ) aSet.Put( *pItem ); boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTabDialog( RID_OFA_AUTOCORR_DLG, NULL, &aSet, NULL )); diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index c77707bd40fa..6cb532108eee 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -940,7 +940,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b { // slot is a property sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId); - if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) //??? + if ( rSet.GetItemState( nWhich ) == SfxItemState::SET ) //??? { sal_uInt16 nSubCount = pType->nAttribs; if ( nSubCount ) @@ -976,7 +976,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b const SfxFormalArgument &rArg = bIsMediaDescriptor ? aFormalArgs[nArg] : pSlot->GetFormalArgument( nArg ); sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId ); - if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) //??? + if ( rSet.GetItemState( nWhich ) == SfxItemState::SET ) //??? { sal_uInt16 nSubCount = rArg.pType->nAttribs; if ( nSubCount ) @@ -996,109 +996,109 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b if ( bIsMediaDescriptor ) { sal_Int32 nAdditional=0; - if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_INTERACTIONHANDLER ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_INTERACTIONHANDLER ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOC_SALVAGE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_SALVAGE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_PATH ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PATH ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_FILE_DIALOG ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FILE_DIALOG ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_STANDARD_DIR ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_STANDARD_DIR ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_BLACK_LIST ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_BLACK_LIST ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_CONTENT ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_CONTENT ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_INPUTSTREAM ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_INPUTSTREAM ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_STREAM ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_STREAM ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_OUTPUTSTREAM ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_OUTPUTSTREAM ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_TEMPLATE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TEMPLATE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_OPEN_NEW_VIEW ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_OPEN_NEW_VIEW ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_FAIL_ON_WARNING ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FAIL_ON_WARNING ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_VIEW_ID ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_VIEW_ID ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_VIEW_DATA ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_VIEW_DATA ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_FILTER_DATA ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FILTER_DATA ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_PLUGIN_MODE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PLUGIN_MODE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOC_READONLY ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_READONLY ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DDE_RECONNECT_ONLOAD ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DDE_RECONNECT_ONLOAD ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOC_STARTPRESENTATION ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_STARTPRESENTATION ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_SELECTION ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SELECTION ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_CONTENTTYPE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_CONTENTTYPE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_POSTDATA ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_POSTDATA ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_FILLFRAME ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FILLFRAME ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_CHARSET ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_CHARSET ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_TARGETNAME ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TARGETNAME ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_TEMPLATE_NAME ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TEMPLATE_NAME ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_HIDDEN ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_HIDDEN ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_MINIMIZED ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_MINIMIZED ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_PREVIEW ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PREVIEW ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_VIEWONLY ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_VIEWONLY ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_EDITDOC ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_EDITDOC ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_SILENT ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SILENT ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_JUMPMARK ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_JUMPMARK ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOCUMENT ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOCUMENT ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_MACROEXECMODE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_MACROEXECMODE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_UPDATEDOCMODE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_UPDATEDOCMODE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_REPAIRPACKAGE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_REPAIRPACKAGE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOCINFO_TITLE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOCINFO_TITLE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_COMPONENTDATA ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_COMPONENTDATA ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_COMPONENTCONTEXT ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_COMPONENTCONTEXT ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOC_BASEURL ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_BASEURL ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_NOAUTOSAVE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_NOAUTOSAVE ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_ENCRYPTIONDATA ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_ENCRYPTIONDATA ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME ) == SfxItemState::SET ) nAdditional++; - if ( rSet.GetItemState( SID_DOC_SERVICE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_SERVICE ) == SfxItemState::SET ) nAdditional++; if (rSet.HasItem(SID_FILTER_PROVIDER)) ++nAdditional; @@ -1122,7 +1122,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b { for(sal_uInt16 nId = *pRanges++; nId <= *pRanges; ++nId) { - if ( rSet.GetItemState(nId) < SFX_ITEM_SET ) //??? + if ( rSet.GetItemState(nId) < SfxItemState::SET ) //??? // not really set continue; @@ -1377,67 +1377,67 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b nSlotId == SID_SAVEACOPY ) { const SfxPoolItem *pItem=0; - if ( rSet.GetItemState( SID_COMPONENTDATA, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_COMPONENTDATA, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sComponentData); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_COMPONENTCONTEXT, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_COMPONENTCONTEXT, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sComponentContext); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sStatusInd); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_INTERACTIONHANDLER, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_INTERACTIONHANDLER, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sInteractionHdl); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_VIEW_DATA, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_VIEW_DATA, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sViewData); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_FILTER_DATA, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FILTER_DATA, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sFilterData); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_DOCUMENT, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOCUMENT, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sModel); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_CONTENT, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_CONTENT, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sUCBContent); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_INPUTSTREAM, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_INPUTSTREAM, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sInputStream); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_STREAM, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_STREAM, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sStream); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_OUTPUTSTREAM, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_OUTPUTSTREAM, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sOutputStream); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_POSTDATA, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_POSTDATA, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sPostData); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_FILLFRAME, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FILLFRAME, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sFrame); if ( pItem->ISA( SfxUsrAnyItem ) ) @@ -1450,92 +1450,92 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b else OSL_FAIL( "TransformItems: invalid item type for SID_FILLFRAME!" ); } - if ( rSet.GetItemState( SID_TEMPLATE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TEMPLATE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sAsTemplate); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_OPEN_NEW_VIEW, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_OPEN_NEW_VIEW, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sOpenNewView); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_FAIL_ON_WARNING, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FAIL_ON_WARNING, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sFailOnWarning); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_VIEW_ID, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_VIEW_ID, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sViewId); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_PLUGIN_MODE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PLUGIN_MODE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sPluginMode); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_DOC_READONLY, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_READONLY, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sReadOnly); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_DDE_RECONNECT_ONLOAD, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DDE_RECONNECT_ONLOAD, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sDdeReconnect); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_DOC_STARTPRESENTATION, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_STARTPRESENTATION, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sStartPresentation); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_SELECTION, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SELECTION, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sSelectionOnly); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_HIDDEN, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_HIDDEN, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sHidden); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_MINIMIZED, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_MINIMIZED, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sMinimized); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_SILENT, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SILENT, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sSilent); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_PREVIEW, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PREVIEW, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sPreview); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_VIEWONLY, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_VIEWONLY, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sViewOnly); pValue[nActProp++].Value <<= ((SfxBoolItem*)pItem)->GetValue() ; } - if ( rSet.GetItemState( SID_EDITDOC, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_EDITDOC, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sDontEdit); pValue[nActProp++].Value <<= !( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_FILE_DIALOG, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_FILE_DIALOG, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sUseSystemDialog); pValue[nActProp++].Value <<= ((SfxBoolItem*)pItem)->GetValue(); } - if ( rSet.GetItemState( SID_STANDARD_DIR, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_STANDARD_DIR, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sStandardDir); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_BLACK_LIST, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_BLACK_LIST, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sBlackList); @@ -1543,108 +1543,108 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b ((SfxStringListItem*)pItem)->GetStringList( aList ); pValue[nActProp++].Value <<= aList ; } - if ( rSet.GetItemState( SID_TARGETNAME, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TARGETNAME, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sFrameName); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_DOC_SALVAGE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_SALVAGE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sSalvagedFile); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_PATH, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_PATH, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sFolderName); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_CONTENTTYPE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_CONTENTTYPE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sMediaType); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_TEMPLATE_NAME, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TEMPLATE_NAME, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sTemplateName); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sTemplateRegionName); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_JUMPMARK, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_JUMPMARK, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sJumpMark); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_CHARSET, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_CHARSET, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sCharacterSet); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_MACROEXECMODE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_MACROEXECMODE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sMacroExecMode); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_UPDATEDOCMODE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_UPDATEDOCMODE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sUpdateDocMode); pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_REPAIRPACKAGE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_REPAIRPACKAGE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sRepairPackage); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_DOCINFO_TITLE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOCINFO_TITLE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sDocumentTitle); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_DOC_BASEURL, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_BASEURL, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sDocumentBaseURL); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sHierarchicalDocumentName); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sCopyStreamIfPossible); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_NOAUTOSAVE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_NOAUTOSAVE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sNoAutoSave); pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sModifyPasswordInfo); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_ENCRYPTIONDATA, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_ENCRYPTIONDATA, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sEncryptionData); pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); } - if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sSuggestedSaveAsDir); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sSuggestedSaveAsName); pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) ); } - if ( rSet.GetItemState( SID_DOC_SERVICE, false, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( SID_DOC_SERVICE, false, &pItem ) == SfxItemState::SET ) { pValue[nActProp].Name = OUString(sDocumentService); pValue[nActProp++].Value <<= OUString(static_cast<const SfxStringItem*>(pItem)->GetValue()); diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 0b95c9bc368a..4184c34b10fd 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -382,7 +382,7 @@ void SfxBindings::Update_Impl sal_uInt16 nWhich = pFound->nWhichId; const SfxPoolItem *pItem = 0; SfxItemState eState = pSet->GetItemState(nWhich, true, &pItem); - if ( eState == SFX_ITEM_DEFAULT && SfxItemPool::IsWhich(nWhich) ) + if ( eState == SfxItemState::DEFAULT && SfxItemPool::IsWhich(nWhich) ) pItem = &pSet->Get(nWhich); UpdateControllers_Impl( pInterface, aFound[nPos], pItem, eState ); } @@ -400,7 +400,7 @@ void SfxBindings::Update_Impl SfxFoundCache_Impl aFoundCache( pCache->GetId(), 0, pRealSlot, pCache ); - UpdateControllers_Impl( 0, &aFoundCache, 0, SFX_ITEM_DISABLED); + UpdateControllers_Impl( 0, &aFoundCache, 0, SfxItemState::DISABLED); } } @@ -472,7 +472,7 @@ void SfxBindings::Update } if (!pMsgServer) { - pCache->SetState(SFX_ITEM_DISABLED, 0); + pCache->SetState(SfxItemState::DISABLED, 0); pImp->bInUpdate = false; InvalidateSlotsInMap_Impl(); return; @@ -549,7 +549,7 @@ void SfxBindings::SetState // Update status if ( !pCache->IsControllerDirty() ) pCache->Invalidate(false); - pCache->SetState( SFX_ITEM_DEFAULT, pItem ); + pCache->SetState( SfxItemState::DEFAULT, pItem ); //! Not implemented: Updates from EnumSlots via master slots } @@ -583,7 +583,7 @@ void SfxBindings::SetState // Update Status if ( !pCache->IsControllerDirty() ) pCache->Invalidate(false); - pCache->SetState( SFX_ITEM_DEFAULT, &rItem ); + pCache->SetState( SfxItemState::DEFAULT, &rItem ); //! Not implemented: Updates from EnumSlots via master slots } @@ -1168,14 +1168,14 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell pShell->CallState( aFunc, aSet ); const SfxPoolItem *pOldItem; SfxItemState eState = aSet.GetItemState(nWhich, true, &pOldItem); - if ( eState == SFX_ITEM_DISABLED ) + if ( eState == SfxItemState::DISABLED ) return; - if ( SFX_ITEM_DEFAULT == eState && SfxItemPool::IsWhich(nWhich) ) + if ( SfxItemState::DEFAULT == eState && SfxItemPool::IsWhich(nWhich) ) pOldItem = &aSet.Get(nWhich); - if ( SFX_ITEM_SET == eState || - ( SFX_ITEM_DEFAULT == eState && + if ( SfxItemState::SET == eState || + ( SfxItemState::DEFAULT == eState && SfxItemPool::IsWhich(nWhich) && pOldItem ) ) { @@ -1202,7 +1202,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell OSL_FAIL( "Toggle only for Enums and Bools allowed" ); } } - else if ( SFX_ITEM_DONTCARE == eState ) + else if ( SfxItemState::DONTCARE == eState ) { // Create one Status-Item for each Factory SfxPoolItem *pNewItem = pSlot->GetType()->CreateItem(); @@ -1423,22 +1423,22 @@ void SfxBindings::UpdateControllers_Impl // bound until now, the Controller to update the Slot. if ( pCache && pCache->IsControllerDirty() ) { - if ( SFX_ITEM_DONTCARE == eState ) + if ( SfxItemState::DONTCARE == eState ) { // ambiguous - pCache->SetState( SFX_ITEM_DONTCARE, (SfxPoolItem *)-1 ); + pCache->SetState( SfxItemState::DONTCARE, (SfxPoolItem *)-1 ); } - else if ( SFX_ITEM_DEFAULT == eState && + else if ( SfxItemState::DEFAULT == eState && pFound->nWhichId > SFX_WHICH_MAX ) { // no Status or Default but without Pool SfxVoidItem aVoid(0); - pCache->SetState( SFX_ITEM_UNKNOWN, &aVoid ); + pCache->SetState( SfxItemState::UNKNOWN, &aVoid ); } - else if ( SFX_ITEM_DISABLED == eState ) - pCache->SetState(SFX_ITEM_DISABLED, 0); + else if ( SfxItemState::DISABLED == eState ) + pCache->SetState(SfxItemState::DISABLED, 0); else - pCache->SetState(SFX_ITEM_DEFAULT, pItem); + pCache->SetState(SfxItemState::DEFAULT, pItem); } // Update the slots for so far available and bound Controllers for @@ -1452,8 +1452,8 @@ void SfxBindings::UpdateControllers_Impl // Items cast on EnumItem const SfxEnumItemInterface *pEnumItem = PTR_CAST(SfxEnumItemInterface,pItem); - if ( eState == SFX_ITEM_DEFAULT && !pEnumItem ) - eState = SFX_ITEM_DONTCARE; + if ( eState == SfxItemState::DEFAULT && !pEnumItem ) + eState = SfxItemState::DONTCARE; else eState = SfxControllerItem::GetItemState( pEnumItem ); @@ -1471,10 +1471,10 @@ void SfxBindings::UpdateControllers_Impl pEnumCache->Invalidate(false); // HACK(CONTROL/SELECT Kram) ??? - if ( eState == SFX_ITEM_DONTCARE && pFound->nWhichId == 10144 ) + if ( eState == SfxItemState::DONTCARE && pFound->nWhichId == 10144 ) { SfxVoidItem aVoid(0); - pEnumCache->SetState( SFX_ITEM_UNKNOWN, &aVoid ); + pEnumCache->SetState( SfxItemState::UNKNOWN, &aVoid ); if (pSlave->GetNextSlot() == pFirstSlave) break; @@ -1482,22 +1482,22 @@ void SfxBindings::UpdateControllers_Impl continue; } - if ( SFX_ITEM_DISABLED == eState || (pEnumItem && !pEnumItem->IsEnabled( pSlave->GetSlotId())) ) + if ( SfxItemState::DISABLED == eState || (pEnumItem && !pEnumItem->IsEnabled( pSlave->GetSlotId())) ) { // disabled - pEnumCache->SetState(SFX_ITEM_DISABLED, 0); + pEnumCache->SetState(SfxItemState::DISABLED, 0); } - else if ( SFX_ITEM_DEFAULT == eState && pEnumItem ) + else if ( SfxItemState::DEFAULT == eState && pEnumItem ) { // Determine enum value sal_uInt16 nValue = pEnumItem->GetEnumValue(); SfxBoolItem aBool( pFound->nWhichId, pSlave->GetValue() == nValue ); - pEnumCache->SetState(SFX_ITEM_DEFAULT, &aBool); + pEnumCache->SetState(SfxItemState::DEFAULT, &aBool); } else { // ambiguous - pEnumCache->SetState( SFX_ITEM_DONTCARE, (SfxPoolItem *)-1 ); + pEnumCache->SetState( SfxItemState::DONTCARE, (SfxPoolItem *)-1 ); } } @@ -1848,7 +1848,7 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState ) { const SfxSlot* pSlot = SfxSlotPool::GetSlotPool( pDispatcher->GetFrame() ).GetSlot( nSlot ); if ( !pSlot || !pSlot->pUnoName ) - return SFX_ITEM_DISABLED; + return SfxItemState::DISABLED; ::com::sun::star::util::URL aURL; OUString aCmd( ".uno:" ); @@ -1881,14 +1881,14 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState ) bDeleteCache = true; } - SfxItemState eState = SFX_ITEM_SET; + SfxItemState eState = SfxItemState::SET; SfxPoolItem *pItem=NULL; BindDispatch_Impl *pBind = new BindDispatch_Impl( xDisp, aURL, pCache, pSlot ); pBind->acquire(); xDisp->addStatusListener( pBind, aURL ); if ( !pBind->GetStatus().IsEnabled ) { - eState = SFX_ITEM_DISABLED; + eState = SfxItemState::DISABLED; } else { @@ -1938,13 +1938,13 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState ) // order to allow for transition of ownership. const SfxPoolItem *pItem = NULL; SfxItemState eState = pDispatcher->QueryState( nSlot, pItem ); - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) { - DBG_ASSERT( pItem, "SFX_ITEM_SET but no item!" ); + DBG_ASSERT( pItem, "SfxItemState::SET but no item!" ); if ( pItem ) rpState = pItem->Clone(); } - else if ( eState == SFX_ITEM_DEFAULT && pItem ) + else if ( eState == SfxItemState::DEFAULT && pItem ) { rpState = pItem->Clone(); } diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx index f28ba9883dac..dcc788ea5c7e 100644 --- a/sfx2/source/control/ctrlitem.cxx +++ b/sfx2/source/control/ctrlitem.cxx @@ -302,21 +302,21 @@ SfxItemState SfxControllerItem::GetItemState [Return value] - SfxItemState SFX_ITEM_UNKNOWN + SfxItemState SfxItemState::UNKNOWN Enabled, but no further status information available. Typical for <Slot>s, which anyway are sometimes disabled, but otherwise do not change their appearance. - SFX_ITEM_DISABLED + SfxItemState::DISABLED Disabled and no further status information available. All other values that may appear should be reset to default. - SFX_ITEM_DONTCARE + SfxItemState::DONTCARE Enabled but there were only ambiguous values available (i.e. non that can be queried). - SFX_ITEM_DEFAULT + SfxItemState::DEFAULT Enabled and with available values, which are queried by 'pState'. The Type is thus clearly defined in the entire Program and specified through the Slot. @@ -324,12 +324,12 @@ SfxItemState SfxControllerItem::GetItemState { return !pState - ? SFX_ITEM_DISABLED + ? SfxItemState::DISABLED : IsInvalidItem(pState) - ? SFX_ITEM_DONTCARE + ? SfxItemState::DONTCARE : pState->ISA(SfxVoidItem) && !pState->Which() - ? SFX_ITEM_UNKNOWN - : SFX_ITEM_DEFAULT; + ? SfxItemState::UNKNOWN + : SfxItemState::DEFAULT; } diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index d04075e41fb8..bbd0d20698e1 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -2056,12 +2056,12 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSlot, const SfxPoolItem* &rp { rpState = pShell->GetSlotState(nSlot); if ( !rpState ) - return SFX_ITEM_DISABLED; + return SfxItemState::DISABLED; else - return SFX_ITEM_DEFAULT; + return SfxItemState::DEFAULT; } - return SFX_ITEM_DISABLED; + return SfxItemState::DISABLED; } SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, ::com::sun::star::uno::Any& rAny ) @@ -2074,7 +2074,7 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, ::com::sun::star::uno:: pItem = pShell->GetSlotState( nSID ); if ( !pItem ) - return SFX_ITEM_DISABLED; + return SfxItemState::DISABLED; else { ::com::sun::star::uno::Any aState; @@ -2089,11 +2089,11 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, ::com::sun::star::uno:: } rAny = aState; - return SFX_ITEM_DEFAULT; + return SfxItemState::DEFAULT; } } - return SFX_ITEM_DISABLED; + return SfxItemState::DISABLED; } bool SfxDispatcher::IsReadOnlyShell_Impl( sal_uInt16 nShell ) const diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx index e97616a68237..751614ce9f1c 100644 --- a/sfx2/source/control/querystatus.cxx +++ b/sfx2/source/control/querystatus.cxx @@ -75,7 +75,7 @@ class SfxQueryStatus_Impl: SfxQueryStatus_Impl::SfxQueryStatus_Impl( const Reference< XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const OUString& rCommand ) : m_bQueryInProgress( false ), - m_eState( SFX_ITEM_DISABLED ), + m_eState( SfxItemState::DISABLED ), m_pItem( 0 ), m_nSlotID( nSlotId ) { @@ -104,11 +104,11 @@ throw( RuntimeException, std::exception ) SolarMutexGuard aGuard; m_pItem = NULL; - m_eState = SFX_ITEM_DISABLED; + m_eState = SfxItemState::DISABLED; if ( rEvent.IsEnabled ) { - m_eState = SFX_ITEM_DEFAULT; + m_eState = SfxItemState::DEFAULT; ::com::sun::star::uno::Type pType = rEvent.State.getValueType(); if ( pType == ::getBooleanCppuType() ) @@ -150,7 +150,7 @@ throw( RuntimeException, std::exception ) } else { - m_eState = SFX_ITEM_UNKNOWN; + m_eState = SfxItemState::UNKNOWN; m_pItem = new SfxVoidItem( m_nSlotID ); } } @@ -176,7 +176,7 @@ SfxItemState SfxQueryStatus_Impl::QueryState( SfxPoolItem*& rpPoolItem ) if ( !m_bQueryInProgress ) { m_pItem = NULL; - m_eState = SFX_ITEM_DISABLED; + m_eState = SfxItemState::DISABLED; if ( m_xDispatch.is() ) { diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index fed4e29738b0..b3d8b0d79c1e 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -489,7 +489,7 @@ const SfxPoolItem* SfxRequest::GetItem // Is the item set or available at bDeep == sal_True? const SfxPoolItem *pItem = 0; - if ( ( bDeep ? SFX_ITEM_DEFAULT : SFX_ITEM_SET ) + if ( ( bDeep ? SfxItemState::DEFAULT : SfxItemState::SET ) <= pArgs->GetItemState( nWhich, bDeep, &pItem ) ) { // Compare type @@ -703,9 +703,9 @@ void SfxRequest::Done_Impl // get the property as SfxPoolItem const SfxPoolItem *pItem; sal_uInt16 nWhich = rPool.GetWhich(pImp->pSlot->GetSlotId()); - SfxItemState eState = pSet ? pSet->GetItemState( nWhich, false, &pItem ) : SFX_ITEM_UNKNOWN; + SfxItemState eState = pSet ? pSet->GetItemState( nWhich, false, &pItem ) : SfxItemState::UNKNOWN; #ifdef DBG_UTIL - if ( SFX_ITEM_SET != eState ) + if ( SfxItemState::SET != eState ) { OStringBuffer aStr("Recording property not available: "); aStr.append(static_cast<sal_Int32>(pImp->pSlot->GetSlotId())); @@ -713,7 +713,7 @@ void SfxRequest::Done_Impl } #endif uno::Sequence < beans::PropertyValue > aSeq; - if ( eState == SFX_ITEM_SET ) + if ( eState == SfxItemState::SET ) TransformItems( pImp->pSlot->GetSlotId(), *pSet, aSeq, pImp->pSlot ); pImp->Record( aSeq ); } diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx index 96c77e4565d1..56b9aecdc6a5 100644 --- a/sfx2/source/control/sfxstatuslistener.cxx +++ b/sfx2/source/control/sfxstatuslistener.cxx @@ -163,17 +163,17 @@ throw( RuntimeException, std::exception ) SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( pViewFrame ); const SfxSlot* pSlot = rPool.GetSlot( m_nSlotID ); - SfxItemState eState = SFX_ITEM_DISABLED; + SfxItemState eState = SfxItemState::DISABLED; SfxPoolItem* pItem = NULL; if ( rEvent.IsEnabled ) { - eState = SFX_ITEM_DEFAULT; + eState = SfxItemState::DEFAULT; ::com::sun::star::uno::Type pType = rEvent.State.getValueType(); if ( pType == ::cppu::UnoType< ::cppu::UnoVoidType >::get() ) { pItem = new SfxVoidItem( m_nSlotID ); - eState = SFX_ITEM_UNKNOWN; + eState = SfxItemState::UNKNOWN; } else if ( pType == cppu::UnoType< bool >::get() ) { diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index 140726e2e189..808c0b439a3f 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -210,7 +210,7 @@ void SfxShell::PutItem SfxStateCache* pCache = pBindings->GetStateCache( nSlotId ); if ( pCache ) { - pCache->SetState( SFX_ITEM_DEFAULT, pItem->Clone(), true ); + pCache->SetState( SfxItemState::DEFAULT, pItem->Clone(), true ); pCache->SetCachedState( true ); } } @@ -424,7 +424,7 @@ bool SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot ) SfxItemSet aSet(rPool, nId, nId); SfxStateFunc pFunc = rSlot.GetStateFnc(); CallState( pFunc, aSet ); - return aSet.GetItemState(nId) != SFX_ITEM_DISABLED; + return aSet.GetItemState(nId) != SfxItemState::DISABLED; } long ShellCall_Impl( void* pObj, void* pArg ) @@ -481,7 +481,7 @@ const SfxPoolItem* SfxShell::GetSlotState // Get Slot on the given Interface if ( !pIF ) pIF = GetInterface(); - SfxItemState eState = SFX_ITEM_UNKNOWN; + SfxItemState eState = SfxItemState::UNKNOWN; SfxItemPool &rPool = GetPool(); const SfxSlot* pSlot = NULL; @@ -505,26 +505,26 @@ const SfxPoolItem* SfxShell::GetSlotState eState = aSet.GetItemState( nSlotId, true, &pItem ); // get default Item if possible - if ( eState == SFX_ITEM_DEFAULT ) + if ( eState == SfxItemState::DEFAULT ) { if ( SfxItemPool::IsWhich(nSlotId) ) pItem = &rPool.GetDefaultItem(nSlotId); else - eState = SFX_ITEM_DONTCARE; + eState = SfxItemState::DONTCARE; } } else - eState = SFX_ITEM_UNKNOWN; + eState = SfxItemState::UNKNOWN; // Evaluate Item and item status and possibly maintain them in pStateSet SfxPoolItem *pRetItem = 0; - if ( eState <= SFX_ITEM_DISABLED ) + if ( eState <= SfxItemState::DISABLED ) { if ( pStateSet ) pStateSet->DisableItem(nSlotId); return 0; } - else if ( eState == SFX_ITEM_DONTCARE ) + else if ( eState == SfxItemState::DONTCARE ) { if ( pStateSet ) pStateSet->ClearItem(nSlotId); diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index ec2b36c70a63..61d65b499d6b 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -85,14 +85,14 @@ void SAL_CALL BindDispatch_Impl::statusChanged( const ::com::sun::star::frame:: { SfxPoolItem *pItem=NULL; sal_uInt16 nId = pCache->GetId(); - SfxItemState eState = SFX_ITEM_DISABLED; + SfxItemState eState = SfxItemState::DISABLED; if ( !aStatus.IsEnabled ) { // default } else if (aStatus.State.hasValue()) { - eState = SFX_ITEM_DEFAULT; + eState = SfxItemState::DEFAULT; ::com::sun::star::uno::Any aAny = aStatus.State; ::com::sun::star::uno::Type pType = aAny.getValueType(); @@ -137,7 +137,7 @@ void SAL_CALL BindDispatch_Impl::statusChanged( const ::com::sun::star::frame:: { // DONTCARE status pItem = new SfxVoidItem(0); - eState = SFX_ITEM_UNKNOWN; + eState = SfxItemState::UNKNOWN; } for ( SfxControllerItem *pCtrl = pCache->GetItemLink(); @@ -184,7 +184,7 @@ SfxStateCache::SfxStateCache( sal_uInt16 nFuncId ): pInternalController(0), pController(0), pLastItem( 0 ), - eLastState( SFX_ITEM_UNKNOWN ), + eLastState( SfxItemState::UNKNOWN ), bItemVisible( true ) { bCtrlDirty = true; @@ -343,7 +343,7 @@ void SfxStateCache::SetState void SfxStateCache::SetVisibleState( bool bShow ) { - SfxItemState eState( SFX_ITEM_DEFAULT ); + SfxItemState eState( SfxItemState::DEFAULT ); const SfxPoolItem* pState( NULL ); bool bDeleteItem( false ); diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index f25c0e6755e0..9086313fd26a 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -134,11 +134,11 @@ void SAL_CALL SfxUnoControllerItem::statusChanged(const ::com::sun::star::frame: } else if ( pCtrlItem ) { - SfxItemState eState = SFX_ITEM_DISABLED; + SfxItemState eState = SfxItemState::DISABLED; SfxPoolItem* pItem = NULL; if ( rEvent.IsEnabled ) { - eState = SFX_ITEM_DEFAULT; + eState = SfxItemState::DEFAULT; ::com::sun::star::uno::Type pType = rEvent.State.getValueType(); if ( pType == cppu::UnoType< bool >::get() ) @@ -223,7 +223,7 @@ void SfxUnoControllerItem::GetNewDispatch() if ( xDispatch.is() ) xDispatch->addStatusListener( (::com::sun::star::frame::XStatusListener*) this, aCommand ); else if ( pCtrlItem ) - pCtrlItem->StateChanged( pCtrlItem->GetId(), SFX_ITEM_DISABLED, NULL ); + pCtrlItem->StateChanged( pCtrlItem->GetId(), SfxItemState::DISABLED, NULL ); } ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SfxUnoControllerItem::TryGetDispatch( SfxFrame *pFrame ) @@ -808,9 +808,9 @@ void SAL_CALL SfxDispatchController_Impl::addStatusListener(const ::com::sun::st ::com::sun::star::uno::Any aState; if ( !pDispatcher && pBindings ) pDispatcher = GetBindings().GetDispatcher_Impl(); - SfxItemState eState = pDispatcher ? pDispatcher->QueryState( GetId(), aState ) : SFX_ITEM_DONTCARE; + SfxItemState eState = pDispatcher ? pDispatcher->QueryState( GetId(), aState ) : SfxItemState::DONTCARE; - if ( eState == SFX_ITEM_DONTCARE ) + if ( eState == SfxItemState::DONTCARE ) { // Use special uno struct to transport don't care state ::com::sun::star::frame::status::ItemStatus aItemStatus; @@ -824,7 +824,7 @@ void SAL_CALL SfxDispatchController_Impl::addStatusListener(const ::com::sun::st aEvent.Requery = sal_False; if ( bVisible ) { - aEvent.IsEnabled = eState != SFX_ITEM_DISABLED; + aEvent.IsEnabled = eState != SfxItemState::DISABLED; aEvent.State = aState; } else @@ -876,7 +876,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt if ( bNotify && pContnr ) { ::com::sun::star::uno::Any aState; - if ( ( eState >= SFX_ITEM_DEFAULT ) && pState && !IsInvalidItem( pState ) && !pState->ISA(SfxVoidItem) ) + if ( ( eState >= SfxItemState::DEFAULT ) && pState && !IsInvalidItem( pState ) && !pState->ISA(SfxVoidItem) ) { // Retrieve metric from pool to have correct sub ID when calling QueryValue sal_uInt16 nSubId( 0 ); @@ -899,7 +899,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt pState->QueryValue( aState, (sal_uInt8)nSubId ); } - else if ( eState == SFX_ITEM_DONTCARE ) + else if ( eState == SfxItemState::DONTCARE ) { // Use special uno struct to transport don't care state ::com::sun::star::frame::status::ItemStatus aItemStatus; @@ -910,7 +910,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt ::com::sun::star::frame::FeatureStateEvent aEvent; aEvent.FeatureURL = aDispatchURL; aEvent.Source = (::com::sun::star::frame::XDispatch*) pDispatch; - aEvent.IsEnabled = eState != SFX_ITEM_DISABLED; + aEvent.IsEnabled = eState != SfxItemState::DISABLED; aEvent.Requery = sal_False; aEvent.State = aState; diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index d92fa6b6d62f..561f5ce1bd0c 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -655,7 +655,7 @@ bool SfxDocumentDescPage::FillItemSet(SfxItemSet *rSet) if ( pDlg ) pExSet = pDlg->GetExampleSet(); - if ( pExSet && SFX_ITEM_SET != pExSet->GetItemState( SID_DOCINFO, true, &pItem ) ) + if ( pExSet && SfxItemState::SET != pExSet->GetItemState( SID_DOCINFO, true, &pItem ) ) pInfo = m_pInfoItem; else if ( pItem ) pInfo = new SfxDocumentInfoItem( *(const SfxDocumentInfoItem *)pItem ); @@ -936,7 +936,7 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet ) const SfxItemSet* pExpSet = GetTabDialog()->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, true, &pItem ) ) + if ( pExpSet && SfxItemState::SET == pExpSet->GetItemState( SID_DOCINFO, true, &pItem ) ) { SfxDocumentInfoItem* m_pInfoItem = (SfxDocumentInfoItem*)pItem; bool bUseData = ( TRISTATE_TRUE == m_pUseUserDataCB->GetState() ); @@ -950,7 +950,7 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet ) { const SfxItemSet* pExpSet = GetTabDialog()->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, true, &pItem ) ) + if ( pExpSet && SfxItemState::SET == pExpSet->GetItemState( SID_DOCINFO, true, &pItem ) ) { SfxDocumentInfoItem* m_pInfoItem = (SfxDocumentInfoItem*)pItem; bool bUseAuthor = bEnableUseUserData && m_pUseUserDataCB->IsChecked(); @@ -1012,7 +1012,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) // determine name OUString aName; const SfxPoolItem* pItem = 0; - if ( SFX_ITEM_SET != rSet->GetItemState( ID_FILETP_TITLE, false, &pItem ) ) + if ( SfxItemState::SET != rSet->GetItemState( ID_FILETP_TITLE, false, &pItem ) ) { INetURLObject aURL(aFile); aName = aURL.GetName( INetURLObject::DECODE_WITH_CHARSET ); @@ -1029,7 +1029,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) m_pNameED->ClearModifyFlag(); // determine RO-Flag - if ( SFX_ITEM_UNKNOWN == rSet->GetItemState( ID_FILETP_READONLY, false, &pItem ) + if ( SfxItemState::UNKNOWN == rSet->GetItemState( ID_FILETP_READONLY, false, &pItem ) || !pItem ) m_pReadOnlyCB->Hide(); else @@ -1173,7 +1173,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent, // Determine the Titels const SfxPoolItem* pItem = 0; OUString aTitle( GetText() ); - if ( SFX_ITEM_SET != + if ( SfxItemState::SET != rItemSet.GetItemState( SID_EXPLORER_PROPS_START, false, &pItem ) ) { // File name @@ -2129,7 +2129,7 @@ bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet* rSet ) if ( GetTabDialog() && GetTabDialog()->GetExampleSet() ) { - if ( SFX_ITEM_SET != + if ( SfxItemState::SET != GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, true, &pItem ) ) pInfo = &( SfxDocumentInfoItem& )rSet->Get( SID_DOCINFO ); else @@ -2601,7 +2601,7 @@ bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet* rSet ) if ( GetTabDialog() && GetTabDialog()->GetExampleSet() ) { - if ( SFX_ITEM_SET != + if ( SfxItemState::SET != GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, true, &pItem ) ) pInfo = &( SfxDocumentInfoItem& )rSet->Get( SID_DOCINFO ); else diff --git a/sfx2/source/dialog/itemconnect.cxx b/sfx2/source/dialog/itemconnect.cxx index 921132947d58..de97fa5246dc 100644 --- a/sfx2/source/dialog/itemconnect.cxx +++ b/sfx2/source/dialog/itemconnect.cxx @@ -49,13 +49,13 @@ sal_uInt16 ItemWrapperHelper::GetWhichId( const SfxItemSet& rItemSet, sal_uInt16 bool ItemWrapperHelper::IsKnownItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot ) { - return rItemSet.GetItemState( GetWhichId( rItemSet, nSlot ), true ) != SFX_ITEM_UNKNOWN; + return rItemSet.GetItemState( GetWhichId( rItemSet, nSlot ), true ) != SfxItemState::UNKNOWN; } const SfxPoolItem* ItemWrapperHelper::GetUniqueItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot ) { sal_uInt16 nWhich = GetWhichId( rItemSet, nSlot ); - return (rItemSet.GetItemState( nWhich, true ) >= SFX_ITEM_DEFAULT) ? rItemSet.GetItem( nWhich, true ) : 0; + return (rItemSet.GetItemState( nWhich, true ) >= SfxItemState::DEFAULT) ? rItemSet.GetItem( nWhich, true ) : 0; } const SfxPoolItem& ItemWrapperHelper::GetDefaultItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot ) @@ -66,7 +66,7 @@ const SfxPoolItem& ItemWrapperHelper::GetDefaultItem( const SfxItemSet& rItemSet void ItemWrapperHelper::RemoveDefaultItem( SfxItemSet& rDestSet, const SfxItemSet& rOldSet, sal_uInt16 nSlot ) { sal_uInt16 nWhich = GetWhichId( rDestSet, nSlot ); - if( rOldSet.GetItemState( nWhich, false ) == SFX_ITEM_DEFAULT ) + if( rOldSet.GetItemState( nWhich, false ) == SfxItemState::DEFAULT ) rDestSet.ClearItem( nWhich ); } diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 90c11e82533f..a563b553e769 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -221,7 +221,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(Window* pParent, const SfxItemS LINK( this, SfxManageStyleSheetPage, LoseFocusHdl ) ); } // It is a style with auto update? (SW only) - if(SFX_ITEM_SET == rAttrSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE)) + if(SfxItemState::SET == rAttrSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE)) m_pAutoCB->Show(); } @@ -504,7 +504,7 @@ void SfxManageStyleSheetPage::ActivatePage( const SfxItemSet& rSet) // It is a style with auto update? (SW only) const SfxPoolItem* pPoolItem; - if ( SFX_ITEM_SET == + if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_AUTO_STYLE_UPDATE, false, &pPoolItem ) ) m_pAutoCB->Check( ( (const SfxBoolItem*)pPoolItem )->GetValue() ); m_pAutoCB->SaveValue(); diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index ee897442ad77..c8bce8afa3d2 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -60,7 +60,7 @@ namespace const SfxPoolItem* pItem; SfxDispatcher* pDisp = pViewSh->GetDispatcher(); SfxItemState nState = pDisp->QueryState( _nSlot, pItem ); - bRet = SFX_ITEM_DEFAULT <= nState; + bRet = SfxItemState::DEFAULT <= nState; if (bRet) _rValue = ( static_cast< const SfxBoolItem* >( pItem ) )->GetValue(); } @@ -261,7 +261,7 @@ void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & ) { const SfxPoolItem* pItem; SfxDispatcher* pDisp = pViewSh->GetDispatcher(); - if (SFX_ITEM_DEFAULT <= pDisp->QueryState( SID_HTML_MODE, pItem )) + if (SfxItemState::DEFAULT <= pDisp->QueryState( SID_HTML_MODE, pItem )) { sal_uInt16 nMode = static_cast< const SfxUInt16Item* >( pItem )->GetValue(); bIsHTMLDoc = ( ( nMode & HTMLMODE_ON ) != 0 ); diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx index 664468a769d5..52669b69e170 100644 --- a/sfx2/source/dialog/styledlg.cxx +++ b/sfx2/source/dialog/styledlg.cxx @@ -134,7 +134,7 @@ IMPL_LINK( SfxStyleDialog, CancelHdl, Button *, pButton ) { SfxItemState eState = pInSet->GetItemState( nWhich, false ); - if ( SFX_ITEM_DEFAULT == eState ) + if ( SfxItemState::DEFAULT == eState ) pExampleSet->ClearItem( nWhich ); else pExampleSet->Put( pInSet->Get( nWhich ) ); diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index e0a7ce4ccebb..d71879ef83cb 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -282,7 +282,7 @@ const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet, if ( pImpl->mbStandard && rOldSet.GetParent() ) pItem = GetItem( *rOldSet.GetParent(), nSlot ); else if ( rSet.GetParent() && - SFX_ITEM_DONTCARE == rSet.GetItemState( nWh ) ) + SfxItemState::DONTCARE == rSet.GetItemState( nWh ) ) pItem = GetItem( *rSet.GetParent(), nSlot ); else pItem = GetItem( rOldSet, nSlot ); diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx index cdb9899f7e7f..aad39a00fffb 100644 --- a/sfx2/source/dialog/tplcitem.cxx +++ b/sfx2/source/dialog/tplcitem.cxx @@ -66,7 +66,7 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta case SID_STYLE_FAMILY4: case SID_STYLE_FAMILY5: { - bool bAvailable = SFX_ITEM_DEFAULT == eState; + bool bAvailable = SfxItemState::DEFAULT == eState; if ( !bAvailable ) rTemplateDlg.SetFamilyState(GetId(), 0); else { @@ -75,7 +75,7 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta DBG_ASSERT(pStateItem != 0, "SfxTemplateItem expected"); rTemplateDlg.SetFamilyState( GetId(), pStateItem ); } - bool bDisable = eState == SFX_ITEM_DISABLED; + bool bDisable = eState == SfxItemState::DISABLED; // Disable Familly sal_uInt16 nFamily = 0; switch( GetId()) @@ -98,9 +98,9 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta } case SID_STYLE_WATERCAN: { - if ( eState == SFX_ITEM_DISABLED ) + if ( eState == SfxItemState::DISABLED ) nWaterCanState = 0xff; - else if( eState == SFX_ITEM_DEFAULT ) + else if( eState == SfxItemState::DEFAULT ) { const SfxBoolItem *pStateItem = PTR_CAST(SfxBoolItem, pItem); assert(pStateItem); //BoolItem expected @@ -116,36 +116,36 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta break; } case SID_STYLE_EDIT: - rTemplateDlg.EnableEdit( SFX_ITEM_DISABLED != eState ); + rTemplateDlg.EnableEdit( SfxItemState::DISABLED != eState ); break; case SID_STYLE_DELETE: - rTemplateDlg.EnableDel( SFX_ITEM_DISABLED != eState ); + rTemplateDlg.EnableDel( SfxItemState::DISABLED != eState ); break; case SID_STYLE_HIDE: - rTemplateDlg.EnableHide( SFX_ITEM_DISABLED != eState ); + rTemplateDlg.EnableHide( SfxItemState::DISABLED != eState ); break; case SID_STYLE_SHOW: - rTemplateDlg.EnableShow( SFX_ITEM_DISABLED != eState ); + rTemplateDlg.EnableShow( SfxItemState::DISABLED != eState ); break; case SID_STYLE_NEW_BY_EXAMPLE: rTemplateDlg.EnableExample_Impl( - GetId(), SFX_ITEM_DISABLED != eState ); + GetId(), SfxItemState::DISABLED != eState ); break; case SID_STYLE_UPDATE_BY_EXAMPLE: { rTemplateDlg.EnableExample_Impl( - GetId(), eState != SFX_ITEM_DISABLED ); + GetId(), eState != SfxItemState::DISABLED ); break; } case SID_STYLE_NEW: { - rTemplateDlg.EnableNew( SFX_ITEM_DISABLED != eState ); + rTemplateDlg.EnableNew( SfxItemState::DISABLED != eState ); break; } case SID_STYLE_DRAGHIERARCHIE: { - rTemplateDlg.EnableTreeDrag( SFX_ITEM_DISABLED != eState ); + rTemplateDlg.EnableTreeDrag( SfxItemState::DISABLED != eState ); break; } case SID_STYLE_FAMILY : diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 62146bac2ec4..eceacca0e6bf 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -382,7 +382,7 @@ IMPL_LINK_NOARG(SfxVersionDialog, SelectHdl_Impl) const SfxPoolItem *pDummy=NULL; SfxItemState eState = pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_MERGE, pDummy ); eState = pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_COMPARE, pDummy ); - m_pCompareButton->Enable(bEnable && eState >= SFX_ITEM_DEFAULT); + m_pCompareButton->Enable(bEnable && eState >= SfxItemState::DEFAULT); return 0L; } diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index e19e5172117a..1922cad4c5b7 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -1057,7 +1057,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, NULL ); const SfxPoolItem* pItem = NULL; - if ( bPreselectPassword && aDialogParams.GetItemState( SID_ENCRYPTIONDATA, true, &pItem ) != SFX_ITEM_SET ) + if ( bPreselectPassword && aDialogParams.GetItemState( SID_ENCRYPTIONDATA, true, &pItem ) != SfxItemState::SET ) { // the file dialog preselects the password checkbox if the provided mediadescriptor has encryption data entry // after dialog execution the password interaction flag will be either removed or not diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 33700ffc22f7..a5ec5c907ecc 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -352,7 +352,7 @@ void SfxObjectShell::LoadStyles for ( sal_uInt16 i = 0; i < nFound; ++i ) { - pFound[i].pDest->GetItemSet().PutExtended(pFound[i].pSource->GetItemSet(), SFX_ITEM_DONTCARE, SFX_ITEM_DEFAULT); + pFound[i].pDest->GetItemSet().PutExtended(pFound[i].pSource->GetItemSet(), SfxItemState::DONTCARE, SfxItemState::DEFAULT); if(pFound[i].pSource->HasParentSupport()) pFound[i].pDest->SetParent(pFound[i].pSource->GetParent()); if(pFound[i].pSource->HasFollowSupport()) diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index d534b6b958c0..41f05b33117c 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -917,11 +917,11 @@ sal_uInt32 SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDo // we need some properties in the media descriptor, so we have to make sure that they are in Any aStreamAny; aStreamAny <<= pMedium->GetInputStream(); - if ( pSet->GetItemState( SID_INPUTSTREAM ) < SFX_ITEM_SET ) + if ( pSet->GetItemState( SID_INPUTSTREAM ) < SfxItemState::SET ) pSet->Put( SfxUnoAnyItem( SID_INPUTSTREAM, aStreamAny ) ); - if ( pSet->GetItemState( SID_FILE_NAME ) < SFX_ITEM_SET ) + if ( pSet->GetItemState( SID_FILE_NAME ) < SfxItemState::SET ) pSet->Put( SfxStringItem( SID_FILE_NAME, pMedium->GetName() ) ); - if ( pSet->GetItemState( SID_FILTER_NAME ) < SFX_ITEM_SET ) + if ( pSet->GetItemState( SID_FILTER_NAME ) < SfxItemState::SET ) pSet->Put( SfxStringItem( SID_FILTER_NAME, pFilter->GetName() ) ); Sequence< PropertyValue > rProperties; @@ -2666,7 +2666,7 @@ bool SfxObjectShell::CommonSaveAs_Impl } aParams->ClearItem( SID_COPY_STREAM_IF_POSSIBLE ); - pImp->bPasswd = SFX_ITEM_SET == aParams->GetItemState(SID_PASSWORD); + pImp->bPasswd = SfxItemState::SET == aParams->GetItemState(SID_PASSWORD); SfxMedium *pActMed = GetMedium(); const INetURLObject aActName(pActMed->GetName()); @@ -2680,7 +2680,7 @@ bool SfxObjectShell::CommonSaveAs_Impl return false; } - if( SFX_ITEM_SET != aParams->GetItemState(SID_UNPACK) && SvtSaveOptions().IsSaveUnpacked() ) + if( SfxItemState::SET != aParams->GetItemState(SID_UNPACK) && SvtSaveOptions().IsSaveUnpacked() ) aParams->Put( SfxBoolItem( SID_UNPACK, false ) ); OUString aTempFileURL; @@ -2788,7 +2788,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl pMergedParams->Put( *pParams ); #ifdef DBG_UTIL - if ( pMergedParams->GetItemState( SID_DOC_SALVAGE) >= SFX_ITEM_SET ) + if ( pMergedParams->GetItemState( SID_DOC_SALVAGE) >= SfxItemState::SET ) SAL_WARN( "sfx.doc","Salvage item present in Itemset, check the parameters!"); #endif diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx index f7bfe683da08..cf58c3c6557d 100644 --- a/sfx2/source/inet/inettbc.cxx +++ b/sfx2/source/inet/inettbc.cxx @@ -204,7 +204,7 @@ void SfxURLToolBoxControl_Impl::StateChanged if ( nSID == SID_OPENURL ) { // Disable URL box if command is disabled - GetURLBox()->Enable( SFX_ITEM_DISABLED != eState ); + GetURLBox()->Enable( SfxItemState::DISABLED != eState ); } if ( GetURLBox()->IsEnabled() ) @@ -214,7 +214,7 @@ void SfxURLToolBoxControl_Impl::StateChanged if ( GetURLBox()->IsVisible() ) GetURLBox()->GrabFocus(); } - else if ( !GetURLBox()->IsModified() && SFX_ITEM_DEFAULT == eState ) + else if ( !GetURLBox()->IsModified() && SfxItemState::DEFAULT == eState ) { SvtURLBox* pURLBox = GetURLBox(); pURLBox->Clear(); diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index eb4cf2575ac6..69799c96c55e 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -178,9 +178,9 @@ void SfxMenuControl::StateChanged #endif pOwnMenu->EnableItem( GetId(), bIsObjMenu ? 0 != pOwnMenu->GetSVMenu()->GetPopupMenu( GetId() ) - : eState != SFX_ITEM_DISABLED ); + : eState != SfxItemState::DISABLED ); - if ( eState != SFX_ITEM_DEFAULT ) + if ( eState != SfxItemState::DEFAULT ) { // check only for non-Object Menus if ( !bIsObjMenu ) diff --git a/sfx2/source/sidebar/ControllerItem.cxx b/sfx2/source/sidebar/ControllerItem.cxx index bf817cd69563..a0de0e3ebae3 100644 --- a/sfx2/source/sidebar/ControllerItem.cxx +++ b/sfx2/source/sidebar/ControllerItem.cxx @@ -141,7 +141,7 @@ void ControllerItem::StateChanged ( bool ControllerItem::IsEnabled (SfxItemState eState) const { - if (eState == SFX_ITEM_DISABLED) + if (eState == SfxItemState::DISABLED) return false; else if ( ! SvtCommandOptions().HasEntries(SvtCommandOptions::CMDOPTION_DISABLED)) { diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index 41f77ae74fd0..70e828000a4d 100644 --- a/sfx2/source/statbar/stbitem.cxx +++ b/sfx2/source/statbar/stbitem.cxx @@ -249,17 +249,17 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) svt::StatusbarController::statusChanged( rEvent ); else { - SfxItemState eState = SFX_ITEM_DISABLED; + SfxItemState eState = SfxItemState::DISABLED; SfxPoolItem* pItem = NULL; if ( rEvent.IsEnabled ) { - eState = SFX_ITEM_DEFAULT; + eState = SfxItemState::DEFAULT; uno::Type pType = rEvent.State.getValueType(); if ( pType == ::getVoidCppuType() ) { pItem = new SfxVoidItem( nSlotID ); - eState = SFX_ITEM_UNKNOWN; + eState = SfxItemState::UNKNOWN; } else if ( pType == ::getBooleanCppuType() ) { @@ -446,11 +446,11 @@ void SfxStatusBarControl::StateChanged DBG_ASSERT( pBar != 0, "setting state to dangling StatusBar" ); const SfxStringItem* pStr = PTR_CAST( SfxStringItem, pState ); - if ( eState == SFX_ITEM_DEFAULT && pStr ) + if ( eState == SfxItemState::DEFAULT && pStr ) pBar->SetItemText( nSID, pStr->GetValue() ); else { - DBG_ASSERT( eState != SFX_ITEM_DEFAULT || pState->ISA(SfxVoidItem), + DBG_ASSERT( eState != SfxItemState::DEFAULT || pState->ISA(SfxVoidItem), "wrong SfxPoolItem subclass in SfxStatusBarControl" ); pBar->SetItemText( nSID, OUString() ); } diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 0e559cb18169..7133fefa9526 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -388,21 +388,21 @@ SfxItemState SfxToolBoxControl::GetItemState( [Return value] - SfxItemState SFX_ITEM_UNKNOWN + SfxItemState SfxItemState::UNKNOWN Enabled, however no further status information is available. Typical for <Slot>s, which are temporarily disabled a anyway but other than that do not change their appearance. - SFX_ITEM_DISABLED + SfxItemState::DISABLED Disabled, no further status information is available. All other displayed values should be reset to the default if possible. - SFX_ITEM_DONTCARE + SfxItemState::DONTCARE Enabled but there were only ambiguous values available (i.e. none that could be queried). - SFX_ITEM_DEFAULT + SfxItemState::DEFAULT Enabled and with available values which can be queried through'pState'. The type is thus by the Slot clearly defined in the entire Program. @@ -410,12 +410,12 @@ SfxItemState SfxToolBoxControl::GetItemState( { return !pState - ? SFX_ITEM_DISABLED + ? SfxItemState::DISABLED : IsInvalidItem(pState) - ? SFX_ITEM_DONTCARE + ? SfxItemState::DONTCARE : pState->ISA(SfxVoidItem) && !pState->Which() - ? SFX_ITEM_UNKNOWN - : SFX_ITEM_DEFAULT; + ? SfxItemState::UNKNOWN + : SfxItemState::DEFAULT; } void SfxToolBoxControl::Dispatch( @@ -507,17 +507,17 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) svt::ToolboxController::statusChanged( rEvent ); else { - SfxItemState eState = SFX_ITEM_DISABLED; + SfxItemState eState = SfxItemState::DISABLED; SfxPoolItem* pItem = NULL; if ( rEvent.IsEnabled ) { - eState = SFX_ITEM_DEFAULT; + eState = SfxItemState::DEFAULT; ::com::sun::star::uno::Type pType = rEvent.State.getValueType(); if ( pType == ::getVoidCppuType() ) { pItem = new SfxVoidItem( nSlotId ); - eState = SFX_ITEM_UNKNOWN; + eState = SfxItemState::UNKNOWN; } else if ( pType == ::getBooleanCppuType() ) { @@ -549,9 +549,9 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) rEvent.State >>= aItemStatus; SfxItemState tmpState = (SfxItemState) aItemStatus.State; // make sure no-one tries to send us a combination of states - if (eState != SFX_ITEM_UNKNOWN && eState != SFX_ITEM_DISABLED && - eState != SFX_ITEM_READONLY && eState != SFX_ITEM_DONTCARE && - eState != SFX_ITEM_DEFAULT && eState != SFX_ITEM_SET) + if (eState != SfxItemState::UNKNOWN && eState != SfxItemState::DISABLED && + eState != SfxItemState::READONLY && eState != SfxItemState::DONTCARE && + eState != SfxItemState::DEFAULT && eState != SfxItemState::SET) throw ::com::sun::star::uno::RuntimeException("unknown status"); eState = tmpState; pItem = new SfxVoidItem( nSlotId ); @@ -908,14 +908,14 @@ void SfxToolBoxControl::StateChanged return; // enabled/disabled-Flag correcting the lump sum - pImpl->pBox->EnableItem( GetId(), eState != SFX_ITEM_DISABLED ); + pImpl->pBox->EnableItem( GetId(), eState != SfxItemState::DISABLED ); sal_uInt16 nItemBits = pImpl->pBox->GetItemBits( GetId() ); nItemBits &= ~TIB_CHECKABLE; ::TriState eTri = TRISTATE_FALSE; switch ( eState ) { - case SFX_ITEM_DEFAULT: + case SfxItemState::DEFAULT: if ( pState ) { if ( pState->ISA(SfxBoolItem) ) @@ -938,7 +938,7 @@ void SfxToolBoxControl::StateChanged } break; - case SFX_ITEM_DONTCARE: + case SfxItemState::DONTCARE: { eTri = TRISTATE_INDET; nItemBits |= TIB_CHECKABLE; @@ -1061,17 +1061,17 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) } else { - SfxItemState eState = SFX_ITEM_DISABLED; + SfxItemState eState = SfxItemState::DISABLED; SfxPoolItem* pItem = NULL; if ( rEvent.IsEnabled ) { - eState = SFX_ITEM_DEFAULT; + eState = SfxItemState::DEFAULT; ::com::sun::star::uno::Type pType = rEvent.State.getValueType(); if ( pType == ::getVoidCppuType() ) { pItem = new SfxVoidItem( nSlotId ); - eState = SFX_ITEM_UNKNOWN; + eState = SfxItemState::UNKNOWN; } else if ( pType == ::getBooleanCppuType() ) { @@ -1103,9 +1103,9 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) rEvent.State >>= aItemStatus; SfxItemState tmpState = (SfxItemState) aItemStatus.State; // make sure no-one tries to send us a combination of states - if (eState != SFX_ITEM_UNKNOWN && eState != SFX_ITEM_DISABLED && - eState != SFX_ITEM_READONLY && eState != SFX_ITEM_DONTCARE && - eState != SFX_ITEM_DEFAULT && eState != SFX_ITEM_SET) + if (eState != SfxItemState::UNKNOWN && eState != SfxItemState::DISABLED && + eState != SfxItemState::READONLY && eState != SfxItemState::DONTCARE && + eState != SfxItemState::DEFAULT && eState != SfxItemState::SET) throw ::com::sun::star::uno::RuntimeException("unknown status"); eState = tmpState; pItem = new SfxVoidItem( nSlotId ); @@ -1357,7 +1357,7 @@ void SfxPopupWindow::StateChanged( /* [Description] See also <SfxControllerItem::StateChanged()>. In addition the Popup - will become hidden when eState==SFX_ITEM_DISABLED and in all other + will become hidden when eState==SfxItemState::DISABLED and in all other cases it will be shown again if it is floating. In general this requires to call the Base class. @@ -1365,7 +1365,7 @@ void SfxPopupWindow::StateChanged( */ { - if ( SFX_ITEM_DISABLED == eState ) + if ( SfxItemState::DISABLED == eState ) { Hide(); } diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index f28748f44386..98402fc29acc 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -375,7 +375,7 @@ void SfxFrame::GetViewData_Impl() SfxItemSet *pSet = GetDescriptor()->GetArgs(); bool bGetViewData = false; - if ( GetController().is() && pSet->GetItemState( SID_VIEW_DATA ) != SFX_ITEM_SET ) + if ( GetController().is() && pSet->GetItemState( SID_VIEW_DATA ) != SfxItemState::SET ) { ::com::sun::star::uno::Any aData = GetController()->getViewData(); pSet->Put( SfxUsrAnyItem( SID_VIEW_DATA, aData ) ); diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 0a89ad9d3dda..e7ebd7686800 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2259,7 +2259,7 @@ void SfxViewFrame::ExecView_Impl { const SfxPoolItem *pItem = 0; if ( rReq.GetArgs() - && SFX_ITEM_SET == rReq.GetArgs()->GetItemState( SID_VIEWSHELL, false, &pItem ) + && SfxItemState::SET == rReq.GetArgs()->GetItemState( SID_VIEWSHELL, false, &pItem ) ) { const sal_uInt16 nViewId = static_cast< const SfxUInt16Item* >( pItem )->GetValue(); @@ -3185,7 +3185,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState ) { const SfxPoolItem* pDummy = NULL; SfxItemState eState = GetDispatcher()->QueryState( SID_HYPERLINK_SETLINK, pDummy ); - if ( SFX_ITEM_DISABLED == eState ) + if ( SfxItemState::DISABLED == eState ) rState.DisableItem(nSID); else { diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index 9590acc75922..404a8b8ca1ff 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -361,7 +361,7 @@ void SfxViewFrame::INetExecute_Impl( SfxRequest &rRequest ) SfxControllerItem* pCtrl = pCache->GetItemLink(); while( pCtrl ) { - pCtrl->StateChanged( SID_FOCUSURLBOX, SFX_ITEM_UNKNOWN, 0 ); + pCtrl->StateChanged( SID_FOCUSURLBOX, SfxItemState::UNKNOWN, 0 ); pCtrl = pCtrl->GetItemLink(); } } |