diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-11 16:01:26 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-10-11 15:14:52 +0000 |
commit | 8044acf2db9d125d5ed58ed25df5df4a90f37ac6 (patch) | |
tree | 67af1fff3f9bc0d144b80d5ecbe5a078cd08dbd3 /cui/source | |
parent | cb7ede2d9970a4d162dc71922f578922c0d6235a (diff) |
convert SFX_CALLMODE constants to SfxCallMode enum class
and fix a couple of bugs in SC and SW where the call mode was
being passed to the hints parameter by accident
Change-Id: Ief805410b3f7035e012e229e77f92d5832430f58
Reviewed-on: https://gerrit.libreoffice.org/11916
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/cuihyperdlg.cxx | 8 | ||||
-rw-r--r-- | cui/source/dialogs/hldocntp.cxx | 4 | ||||
-rw-r--r-- | cui/source/dialogs/hlinettp.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/hlmailtp.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/treeopt.cxx | 14 | ||||
-rw-r--r-- | cui/source/tabpages/tpcolor.cxx | 4 |
7 files changed, 18 insertions, 18 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index a6440fce4afc..a8a87d28f96e 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -739,7 +739,7 @@ bool SpellDialog::Close() { GetBindings().GetDispatcher()-> Execute(rParent.GetType(), - SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_RECORD); + SfxCallMode::ASYNCHRON|SfxCallMode::RECORD); return true; } diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 7224ed36c8da..c355fe0f5cfa 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -173,8 +173,8 @@ SvxHpLinkDlg::~SvxHpLinkDlg () bool SvxHpLinkDlg::Close() { GetDispatcher()->Execute( SID_HYPERLINK_DIALOG, - SFX_CALLMODE_ASYNCHRON | - SFX_CALLMODE_RECORD); + SfxCallMode::ASYNCHRON | + SfxCallMode::RECORD); return true; } @@ -194,8 +194,8 @@ void SvxHpLinkDlg::Apply() aItemSet.GetItem (SID_HYPERLINK_SETLINK); OUString aStrEmpty; if ( aItem->GetURL() != aStrEmpty ) - GetDispatcher()->Execute( SID_HYPERLINK_SETLINK, SFX_CALLMODE_ASYNCHRON | - SFX_CALLMODE_RECORD, aItem, 0L); + GetDispatcher()->Execute( SID_HYPERLINK_SETLINK, SfxCallMode::ASYNCHRON | + SfxCallMode::RECORD, aItem, 0L); ( (SvxHyperlinkTabPageBase*)GetTabPage ( GetCurPageId() ) )->DoApply(); } diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 97ea77ddd274..e03e94032103 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -344,7 +344,7 @@ void SvxHyperlinkNewDocTp::DoApply () // open url const SfxPoolItem* pReturn = GetDispatcher()->Execute( SID_OPENDOC, - SFX_CALLMODE_SYNCHRON, + SfxCallMode::SYNCHRON, &aName, &aFlags, &aFrame, &aReferer, 0L ); @@ -358,7 +358,7 @@ void SvxHyperlinkNewDocTp::DoApply () SfxStringItem aNewName( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::NO_DECODE ) ); pViewFrame->GetDispatcher()->Execute( SID_SAVEASDOC, - SFX_CALLMODE_SYNCHRON, + SfxCallMode::SYNCHRON, &aNewName, 0L ); } diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 433d06f08978..8f51b8fab196 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -401,7 +401,7 @@ IMPL_LINK_NOARG(SvxHyperlinkInternetTp, ClickBrowseHdl_Impl) SfxBoolItem aBrowse( SID_BROWSE, true ); const SfxPoolItem *ppItems[] = { &aName, &aNewView, &aSilent, &aReadOnly, &aRefererItem, &aBrowse, NULL }; - (((SvxHpLinkDlg*)mpDialog)->GetBindings())->Execute( SID_OPENDOC, ppItems, 0, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD ); + (((SvxHpLinkDlg*)mpDialog)->GetBindings())->Execute( SID_OPENDOC, ppItems, 0, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD ); return( 0L ); } diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx index 00f8c97131d4..8540db472097 100644 --- a/cui/source/dialogs/hlmailtp.cxx +++ b/cui/source/dialogs/hlmailtp.cxx @@ -284,7 +284,7 @@ IMPL_LINK_NOARG(SvxHyperlinkMailTp, ClickAdrBookHdl_Impl) if( pViewFrame ) { SfxItemPool &rPool = pViewFrame->GetPool(); - SfxRequest aReq(SID_VIEW_DATA_SOURCE_BROWSER, 0, rPool); + SfxRequest aReq(SID_VIEW_DATA_SOURCE_BROWSER, SfxCallMode::SLOT, rPool); pViewFrame->ExecuteSlot( aReq, true ); } diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 88900347d401..52fa7ed7388a 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1342,7 +1342,7 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet if ( pViewFrame ) { SfxDispatcher* pDispatch = pViewFrame->GetDispatcher(); - pDispatch->Execute( SID_ATTR_YEAR2000, SFX_CALLMODE_ASYNCHRON, pItem, 0L); + pDispatch->Execute( SID_ATTR_YEAR2000, SfxCallMode::ASYNCHRON, pItem, 0L); } aMisc.SetYear2000(nY2K); } @@ -1422,17 +1422,17 @@ void OfaTreeOptionsDialog::ApplyLanguageOptions(const SfxItemSet& rSet) pItem = 0; if(SfxItemState::SET == rSet.GetItemState( SID_ATTR_LANGUAGE, false, &pItem )) { - pDispatch->Execute(pItem->Which(), SFX_CALLMODE_ASYNCHRON, pItem, 0L); + pDispatch->Execute(pItem->Which(), SfxCallMode::ASYNCHRON, pItem, 0L); bSaveSpellCheck = true; } if(SfxItemState::SET == rSet.GetItemState( SID_ATTR_CHAR_CTL_LANGUAGE, false, &pItem )) { - pDispatch->Execute(pItem->Which(), SFX_CALLMODE_ASYNCHRON, pItem, 0L); + pDispatch->Execute(pItem->Which(), SfxCallMode::ASYNCHRON, pItem, 0L); bSaveSpellCheck = true; } if(SfxItemState::SET == rSet.GetItemState( SID_ATTR_CHAR_CJK_LANGUAGE, false, &pItem )) { - pDispatch->Execute(pItem->Which(), SFX_CALLMODE_ASYNCHRON, pItem, 0L); + pDispatch->Execute(pItem->Which(), SfxCallMode::ASYNCHRON, pItem, 0L); bSaveSpellCheck = true; } @@ -1440,7 +1440,7 @@ void OfaTreeOptionsDialog::ApplyLanguageOptions(const SfxItemSet& rSet) { bool bOnlineSpelling = ((const SfxBoolItem*)pItem)->GetValue(); pDispatch->Execute(SID_AUTOSPELL_CHECK, - SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_RECORD, pItem, 0L); + SfxCallMode::ASYNCHRON|SfxCallMode::RECORD, pItem, 0L); xProp->setIsSpellAuto( bOnlineSpelling ); } @@ -1449,7 +1449,7 @@ void OfaTreeOptionsDialog::ApplyLanguageOptions(const SfxItemSet& rSet) { //! the config item has changed since we modified the //! property set it uses - pDispatch->Execute(SID_SPELLCHECKER_CHANGED, SFX_CALLMODE_ASYNCHRON); + pDispatch->Execute(SID_SPELLCHECKER_CHANGED, SfxCallMode::ASYNCHRON); } } @@ -1458,7 +1458,7 @@ void OfaTreeOptionsDialog::ApplyLanguageOptions(const SfxItemSet& rSet) SfxViewFrame* _pViewFrame = SfxViewFrame::GetFirst(); while ( _pViewFrame ) { - _pViewFrame->GetDispatcher()->Execute(pItem->Which(), SFX_CALLMODE_ASYNCHRON, pItem, 0L); + _pViewFrame->GetDispatcher()->Execute(pItem->Which(), SfxCallMode::ASYNCHRON, pItem, 0L); _pViewFrame = SfxViewFrame::GetNext( *_pViewFrame ); } } diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 2fc15158a11a..58e8a1c87d20 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -1126,7 +1126,7 @@ void SvxColorTabPage::SetupForViewFrame( SfxViewFrame *pViewFrame ) if ( pViewFrame != NULL && pViewFrame->GetDispatcher() ) pPtr = (const OfaRefItem<XColorList> *)pViewFrame-> GetDispatcher()->Execute( SID_GET_COLORLIST, - SFX_CALLMODE_SYNCHRON ); + SfxCallMode::SYNCHRON ); pColorList = pPtr ? pPtr->GetValue() : XColorList::GetStdColorList(); SetPageType( &pShadow->nUnknownType ); @@ -1152,7 +1152,7 @@ void SvxColorTabPage::SaveToViewFrame( SfxViewFrame *pViewFrame ) return; const OfaRefItem<XColorList> * pPtr; - pPtr = (const OfaRefItem<XColorList>*)pViewFrame->GetDispatcher()->Execute( SID_GET_COLORLIST, SFX_CALLMODE_SYNCHRON ); + pPtr = (const OfaRefItem<XColorList>*)pViewFrame->GetDispatcher()->Execute( SID_GET_COLORLIST, SfxCallMode::SYNCHRON ); if( pPtr ) { XColorListRef pReference = pPtr->GetValue(); |