diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-12 08:43:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-12 08:44:50 +0200 |
commit | 942716fee138b68c2af9411384f402b5692a88b2 (patch) | |
tree | 61ac99aa7ad3cdedd1c75621f5e4146f819e7bc2 /sd/source/ui/sidebar | |
parent | b417930dce9570ad16d04a1f834f5be2738b19ed (diff) |
convert EID constants to typed_flags
Change-Id: I3bcccd8836e54dd33bb079856226fbedd574c824
Diffstat (limited to 'sd/source/ui/sidebar')
-rw-r--r-- | sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx | 33 | ||||
-rw-r--r-- | sd/source/ui/sidebar/LayoutMenu.cxx | 24 | ||||
-rw-r--r-- | sd/source/ui/sidebar/SlideBackground.cxx | 30 |
3 files changed, 44 insertions, 43 deletions
diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx index 09458acb2b3d..465938a4e02c 100644 --- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx @@ -75,13 +75,13 @@ CurrentMasterPagesSelector::CurrentMasterPagesSelector ( { Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this,CurrentMasterPagesSelector,EventMultiplexerListener)); rBase.GetEventMultiplexer()->AddEventListener(aLink, - sd::tools::EventMultiplexerEvent::EID_CURRENT_PAGE - | sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_NORMAL - | sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_MASTER - | sd::tools::EventMultiplexerEvent::EID_PAGE_ORDER - | sd::tools::EventMultiplexerEvent::EID_SHAPE_CHANGED - | sd::tools::EventMultiplexerEvent::EID_SHAPE_INSERTED - | sd::tools::EventMultiplexerEvent::EID_SHAPE_REMOVED); + EventMultiplexerEventId::CurrentPageChanged + | EventMultiplexerEventId::EditModeNormal + | EventMultiplexerEventId::EditModeMaster + | EventMultiplexerEventId::PageOrder + | EventMultiplexerEventId::ShapeChanged + | EventMultiplexerEventId::ShapeInserted + | EventMultiplexerEventId::ShapeRemoved); } CurrentMasterPagesSelector::~CurrentMasterPagesSelector() @@ -255,14 +255,14 @@ IMPL_LINK(CurrentMasterPagesSelector,EventMultiplexerListener, { switch (rEvent.meEventId) { - case sd::tools::EventMultiplexerEvent::EID_CURRENT_PAGE: - case sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_NORMAL: - case sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_MASTER: - case sd::tools::EventMultiplexerEvent::EID_SLIDE_SORTER_SELECTION: + case EventMultiplexerEventId::CurrentPageChanged: + case EventMultiplexerEventId::EditModeNormal: + case EventMultiplexerEventId::EditModeMaster: + case EventMultiplexerEventId::SlideSortedSelection: UpdateSelection(); break; - case sd::tools::EventMultiplexerEvent::EID_PAGE_ORDER: + case EventMultiplexerEventId::PageOrder: // This is tricky. If a master page is removed, moved, or // added we have to wait until both the notes master page // and the standard master page have been removed, moved, @@ -274,11 +274,12 @@ IMPL_LINK(CurrentMasterPagesSelector,EventMultiplexerListener, MasterPagesSelector::Fill(); break; - case sd::tools::EventMultiplexerEvent::EID_SHAPE_CHANGED: - case sd::tools::EventMultiplexerEvent::EID_SHAPE_INSERTED: - case sd::tools::EventMultiplexerEvent::EID_SHAPE_REMOVED: - InvalidatePreview(static_cast<const SdPage*>(rEvent.mpUserData)); + case EventMultiplexerEventId::ShapeChanged: + case EventMultiplexerEventId::ShapeInserted: + case EventMultiplexerEventId::ShapeRemoved: + InvalidatePreview(static_cast<const SdPage*>(rEvent.mpUserData)); break; + default: break; } } diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index 9169178ab18b..16ae669a4507 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -169,13 +169,13 @@ void LayoutMenu::implConstruct( DrawDocShell& rDocumentShell ) Link<::sd::tools::EventMultiplexerEvent&,void> aEventListenerLink (LINK(this,LayoutMenu,EventMultiplexerListener)); mrBase.GetEventMultiplexer()->AddEventListener(aEventListenerLink, - ::sd::tools::EventMultiplexerEvent::EID_CURRENT_PAGE - | ::sd::tools::EventMultiplexerEvent::EID_SLIDE_SORTER_SELECTION - | ::sd::tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED - | ::sd::tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED - | ::sd::tools::EventMultiplexerEvent::EID_CONFIGURATION_UPDATED - | ::sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_NORMAL - | ::sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_MASTER); + EventMultiplexerEventId::CurrentPageChanged + | EventMultiplexerEventId::SlideSortedSelection + | EventMultiplexerEventId::MainViewAdded + | EventMultiplexerEventId::MainViewRemoved + | EventMultiplexerEventId::ConfigurationUpdated + | EventMultiplexerEventId::EditModeNormal + | EventMultiplexerEventId::EditModeMaster); Window::SetHelpId(HID_SD_TASK_PANE_PREVIEW_LAYOUTS); SetAccessibleName(SdResId(STR_TASKPANEL_LAYOUT_MENU_TITLE)); @@ -710,21 +710,21 @@ IMPL_LINK(LayoutMenu, EventMultiplexerListener, ::sd::tools::EventMultiplexerEve { switch (rEvent.meEventId) { - case ::sd::tools::EventMultiplexerEvent::EID_CURRENT_PAGE: - case ::sd::tools::EventMultiplexerEvent::EID_SLIDE_SORTER_SELECTION: + case EventMultiplexerEventId::CurrentPageChanged: + case EventMultiplexerEventId::SlideSortedSelection: if ( ! mbSelectionUpdatePending) UpdateSelection(); break; - case ::sd::tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED: + case EventMultiplexerEventId::MainViewAdded: mbIsMainViewChangePending = true; break; - case ::sd::tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED: + case EventMultiplexerEventId::MainViewRemoved: HideFocus(); break; - case ::sd::tools::EventMultiplexerEvent::EID_CONFIGURATION_UPDATED: + case EventMultiplexerEventId::ConfigurationUpdated: if (mbIsMainViewChangePending) { mbIsMainViewChangePending = false; diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index ec2361765fd9..89587c52282d 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -332,14 +332,14 @@ void SlideBackground::addListener() Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this, SlideBackground, EventMultiplexerListener) ); mrBase.GetEventMultiplexer()->AddEventListener ( aLink, - tools::EventMultiplexerEvent::EID_CURRENT_PAGE | - tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED | - tools::EventMultiplexerEvent::EID_SHAPE_CHANGED | - tools::EventMultiplexerEvent::EID_EDIT_MODE_NORMAL | - tools::EventMultiplexerEvent::EID_EDIT_MODE_MASTER | - tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION | - tools::EventMultiplexerEvent::EID_END_TEXT_EDIT | - tools::EventMultiplexerEvent::EID_VIEW_ADDED); + EventMultiplexerEventId::CurrentPageChanged | + EventMultiplexerEventId::MainViewAdded | + EventMultiplexerEventId::ShapeChanged | + EventMultiplexerEventId::EditModeNormal | + EventMultiplexerEventId::EditModeMaster | + EventMultiplexerEventId::EditViewSelection | + EventMultiplexerEventId::EndTextEdit | + EventMultiplexerEventId::ViewAdded); } void SlideBackground::removeListener() @@ -355,15 +355,15 @@ IMPL_LINK(SlideBackground, EventMultiplexerListener, { // add more events as per requirement // Master Page change triggers a shape change event. Solves sync problem. - case tools::EventMultiplexerEvent::EID_SHAPE_CHANGED: + case EventMultiplexerEventId::ShapeChanged: populateMasterSlideDropdown(); break; - case tools::EventMultiplexerEvent::EID_EDIT_MODE_NORMAL: - case tools::EventMultiplexerEvent::EID_EDIT_MODE_MASTER: + case EventMultiplexerEventId::EditModeNormal: + case EventMultiplexerEventId::EditModeMaster: mbEditModeChangePending = true; break; - case tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION: - case tools::EventMultiplexerEvent::EID_END_TEXT_EDIT: + case EventMultiplexerEventId::EditViewSelection: + case EventMultiplexerEventId::EndTextEdit: { if (mbEditModeChangePending) { @@ -407,7 +407,7 @@ IMPL_LINK(SlideBackground, EventMultiplexerListener, } } break; - case tools::EventMultiplexerEvent::EID_CURRENT_PAGE: + case EventMultiplexerEventId::CurrentPageChanged: { static sal_uInt16 SidArray[] = { SID_ATTR_PAGE_COLOR, @@ -422,7 +422,7 @@ IMPL_LINK(SlideBackground, EventMultiplexerListener, GetBindings()->Invalidate( SidArray ); } break; - case tools::EventMultiplexerEvent::EID_VIEW_ADDED: + case EventMultiplexerEventId::ViewAdded: { if(!mbTitle) { |