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 /include/sfx2/event.hxx | |
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 'include/sfx2/event.hxx')
-rw-r--r-- | include/sfx2/event.hxx | 47 |
1 files changed, 38 insertions, 9 deletions
diff --git a/include/sfx2/event.hxx b/include/sfx2/event.hxx index 7dbb9c08cf32..3e86bcd9989b 100644 --- a/include/sfx2/event.hxx +++ b/include/sfx2/event.hxx @@ -30,16 +30,45 @@ #include <com/sun/star/frame/XController2.hpp> #include <com/sun/star/view/PrintableState.hpp> -#define EVENT_SFX_START 5000 -// EVENT_SFX_END 9999 - -#define EVENT_APP_START 20000 -// EVENT_APP_END 29999 +/** + these values get stored in streams in a 16-bit value +*/ +enum class SvMacroItemId : sal_uInt16 { + NONE = 0, + + // used by SwHTMLForm_Impl + HtmlOnSubmitForm, + HtmlOnResetForm, + HtmlOnGetFocus, + HtmlOnLoseFocus, + HtmlOnClick, + HtmlOnClickItem, + HtmlOnChange, + HtmlOnSelect, + + // used by SwHTMLParser + OpenDoc, + PrepareCloseDoc, + ActivateDoc, + DeactivateDoc, -// Events for Controls etc. -#define SFX_EVENT_MOUSEOVER_OBJECT ( EVENT_SFX_START + 100 ) -#define SFX_EVENT_MOUSECLICK_OBJECT ( EVENT_SFX_START + 101 ) -#define SFX_EVENT_MOUSEOUT_OBJECT ( EVENT_SFX_START + 102 ) + // Events for Controls etc. + OnMouseOver = 5100, + OnClick = 5101, + OnMouseOut = 5102, + + OnImageLoadDone = 10000, + OnImageLoadCancel = 10001, + OnImageLoadError = 10002, + + SwObjectSelect = 20000, + SwStartInsGlossary = 20001, + SwEndInsGlossary = 20002, + SwFrmKeyInputAlpha = 20004, + SwFrmKeyInputNoAlpha = 20005, + SwFrmResize = 20006, + SwFrmMove = 20007, +}; class SfxObjectShell; |