diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-25 10:03:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-25 12:21:22 +0200 |
commit | 31a85a9a13595a9aeae1932ee08c9b09ead384cd (patch) | |
tree | d3cf4136e21a3acee1ddbf77aca62f3d73c3ed55 /sw/source/uibase/wrtsh | |
parent | 2fffaf6f05d829e345ad8b391646a6e8df9a9a26 (diff) |
convert UNO event ids to scoped enum
I'm fairly sure there are more simplifications that could be make here.
It seems like we have both an ID and a string name for all of these
events, and we could probably get by with just one of those, or
alternately, centralise the name<->id mapping somewhere
Change-Id: I978073822ddbebce94ac5b560fea675bea905a35
Reviewed-on: https://gerrit.libreoffice.org/40392
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/wrtsh')
-rw-r--r-- | sw/source/uibase/wrtsh/select.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh2.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh3.cxx | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index 29bca71acd2b..231902eeb2b2 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -708,9 +708,9 @@ IMPL_LINK( SwWrtShell, ExecFlyMac, const SwFlyFrameFormat*, pFlyFormat, void ) OSL_ENSURE(pFormat, "no frame format"); const SvxMacroItem &rFormatMac = pFormat->GetMacro(); - if(rFormatMac.HasMacro(SW_EVENT_OBJECT_SELECT)) + if(rFormatMac.HasMacro(SvMacroItemId::SwObjectSelect)) { - const SvxMacro &rMac = rFormatMac.GetMacro(SW_EVENT_OBJECT_SELECT); + const SvxMacro &rMac = rFormatMac.GetMacro(SvMacroItemId::SwObjectSelect); if( IsFrameSelected() ) m_bLayoutMode = true; CallChgLnk(); diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index f4ed6cc0afa0..ca25cce2f77b 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -414,12 +414,12 @@ void SwWrtShell::ClickToINetAttr( const SwFormatINetFormat& rItem, LoadUrlFlags m_bIsInClickToEdit = true; // At first run the possibly set ObjectSelect Macro - const SvxMacro* pMac = rItem.GetMacro( SFX_EVENT_MOUSECLICK_OBJECT ); + const SvxMacro* pMac = rItem.GetMacro( SvMacroItemId::OnClick ); if( pMac ) { SwCallMouseEvent aCallEvent; aCallEvent.Set( &rItem ); - GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent ); + GetDoc()->CallEvent( SvMacroItemId::OnClick, aCallEvent ); } // So that the implementation of templates is displayed immediately @@ -444,12 +444,12 @@ bool SwWrtShell::ClickToINetGrf( const Point& rDocPt, LoadUrlFlags nFilter ) { bRet = true; // At first run the possibly set ObjectSelect Macro - const SvxMacro* pMac = &pFnd->GetMacro().GetMacro( SFX_EVENT_MOUSECLICK_OBJECT ); + const SvxMacro* pMac = &pFnd->GetMacro().GetMacro( SvMacroItemId::OnClick ); if( pMac ) { SwCallMouseEvent aCallEvent; aCallEvent.Set( EVENT_OBJECT_URLITEM, pFnd ); - GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent ); + GetDoc()->CallEvent( SvMacroItemId::OnClick, aCallEvent ); } ::LoadURL(*this, sURL, nFilter, sTargetFrameName); diff --git a/sw/source/uibase/wrtsh/wrtsh3.cxx b/sw/source/uibase/wrtsh/wrtsh3.cxx index db7de18d251b..63e15214e217 100644 --- a/sw/source/uibase/wrtsh/wrtsh3.cxx +++ b/sw/source/uibase/wrtsh/wrtsh3.cxx @@ -157,7 +157,7 @@ void SwWrtShell::ExecMacro( const SvxMacro& rMacro, OUString* pRet, SbxArray* pA } } -sal_uInt16 SwWrtShell::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent, +sal_uInt16 SwWrtShell::CallEvent( SvMacroItemId nEvent, const SwCallMouseEvent& rCallEvent, bool bChkPtr) { return GetDoc()->CallEvent( nEvent, rCallEvent, bChkPtr ); |