diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-22 08:24:14 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-08-22 08:24:48 +0200 |
commit | 0552ec9828ad65b1cf90f4e5253f0108facd5bf3 (patch) | |
tree | b7b889ef11c53126304f77dd31d509fb633859ef /sd | |
parent | 2309217a55c8d5e6bdde2a6d4775f10415505fcd (diff) |
convert SdrHintKind to scoped enum
Change-Id: I77ad33425d440263a71bc94f41d8e141f16dfb78
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/drawdoc.cxx | 2 | ||||
-rw-r--r-- | sd/source/core/drawdoc3.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/accessibility/AccessibleSlideSorterView.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/app/sdxfer.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/SpellDialogChildWindow.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/sidebar/MasterPageObserver.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsListener.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/tools/EventMultiplexer.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopback.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drawview.cxx | 6 |
12 files changed, 23 insertions, 25 deletions
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 2b06a98c1477..bdf3395cd677 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -373,7 +373,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) // Destructor SdDrawDocument::~SdDrawDocument() { - Broadcast(SdrHint(HINT_MODELCLEARED)); + Broadcast(SdrHint(SdrHintKind::ModelCleared)); if (mpWorkStartupTimer) { diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 5321eb928da5..2c090c0db1fb 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -847,13 +847,11 @@ bool SdDrawDocument::InsertBookmarkAsPage( // Get the name to use from Exchange list OUString aExchangeName(*pExchangeIter); pRefPage->SetName(aExchangeName); - SdrHint aHint(HINT_PAGEORDERCHG); - aHint.SetPage(pRefPage); - Broadcast(aHint); + Broadcast(SdrHint(SdrHintKind::PageOrderChange, pRefPage)); + SdPage* pNewNotesPage = GetSdPage(nSdPage, PK_NOTES); pNewNotesPage->SetName(aExchangeName); - aHint.SetPage(pNewNotesPage); - Broadcast(aHint); + Broadcast(SdrHint(SdrHintKind::PageOrderChange, pNewNotesPage)); ++pExchangeIter; } diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx index f9e9d2ca56b3..a586545cb2f2 100644 --- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx +++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx @@ -186,7 +186,7 @@ namespace accessibility { const SdrHint* pSdrHint = dynamic_cast< const SdrHint* >( &rHint ); - if( pSdrHint && ( pSdrHint->GetKind() == HINT_MODELCLEARED ) ) + if( pSdrHint && ( pSdrHint->GetKind() == SdrHintKind::ModelCleared ) ) { // model is dying under us, going defunc bDispose = true; diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx index 1afc650031a8..3380de7ef4e3 100644 --- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx +++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx @@ -853,7 +853,7 @@ void AccessibleSlideSorterView::Implementation::Notify ( { switch (pSdrHint->GetKind()) { - case HINT_PAGEORDERCHG: + case SdrHintKind::PageOrderChange: RequestUpdateChildren(); break; default: diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index 2091166dacd2..6f07464ae178 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -801,7 +801,7 @@ void SdTransferable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) const SdrHint* pSdrHint = dynamic_cast< const SdrHint* >( &rHint ); if( pSdrHint ) { - if( HINT_MODELCLEARED == pSdrHint->GetKind() ) + if( SdrHintKind::ModelCleared == pSdrHint->GetKind() ) { EndListening(*mpSourceDoc); mpSourceDoc = nullptr; diff --git a/sd/source/ui/dlg/SpellDialogChildWindow.cxx b/sd/source/ui/dlg/SpellDialogChildWindow.cxx index 6870683598a9..5dcd4b78db14 100644 --- a/sd/source/ui/dlg/SpellDialogChildWindow.cxx +++ b/sd/source/ui/dlg/SpellDialogChildWindow.cxx @@ -115,7 +115,7 @@ void SpellDialogChildWindow::Notify(SfxBroadcaster&, const SfxHint& rHint) { if (const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint)) { - if (HINT_MODELCLEARED == pSdrHint->GetKind()) + if (SdrHintKind::ModelCleared == pSdrHint->GetKind()) { EndSpellingAndClearOutliner(); } diff --git a/sd/source/ui/sidebar/MasterPageObserver.cxx b/sd/source/ui/sidebar/MasterPageObserver.cxx index cc32177d3bfa..4b2db78b4244 100644 --- a/sd/source/ui/sidebar/MasterPageObserver.cxx +++ b/sd/source/ui/sidebar/MasterPageObserver.cxx @@ -226,7 +226,7 @@ void MasterPageObserver::Implementation::Notify( { switch (pSdrHint->GetKind()) { - case HINT_PAGEORDERCHG: + case SdrHintKind::PageOrderChange: // Process the modified set of pages only when the number of // standard and notes master pages are equal. This test // filters out events that are sent in between the insertion diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx index 22e6f7118316..a775b80e6a97 100644 --- a/sd/source/ui/slidesorter/controller/SlsListener.cxx +++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx @@ -282,14 +282,14 @@ void Listener::Notify ( { switch (pSdrHint->GetKind()) { - case HINT_MODELCLEARED: + case SdrHintKind::ModelCleared: if (&rBroadcaster == mrSlideSorter.GetModel().GetDocument()) { // rhbz#965646 stop listening to dying document EndListening(rBroadcaster); return; } break; - case HINT_PAGEORDERCHG: + case SdrHintKind::PageOrderChange: if (&rBroadcaster == mrSlideSorter.GetModel().GetDocument()) HandleModelChange(pSdrHint->GetPage()); break; diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx index 7a505eeb871b..3b048aedf555 100644 --- a/sd/source/ui/tools/EventMultiplexer.cxx +++ b/sd/source/ui/tools/EventMultiplexer.cxx @@ -641,26 +641,26 @@ void EventMultiplexer::Implementation::Notify ( { switch (pSdrHint->GetKind()) { - case HINT_MODELCLEARED: - case HINT_PAGEORDERCHG: + case SdrHintKind::ModelCleared: + case SdrHintKind::PageOrderChange: CallListeners (EventMultiplexerEvent::EID_PAGE_ORDER); break; - case HINT_SWITCHTOPAGE: + case SdrHintKind::SwitchToPage: CallListeners (EventMultiplexerEvent::EID_CURRENT_PAGE); break; - case HINT_OBJCHG: + case SdrHintKind::ObjectChange: CallListeners(EventMultiplexerEvent::EID_SHAPE_CHANGED, const_cast<void*>(static_cast<const void*>(pSdrHint->GetPage()))); break; - case HINT_OBJINSERTED: + case SdrHintKind::ObjectInserted: CallListeners(EventMultiplexerEvent::EID_SHAPE_INSERTED, const_cast<void*>(static_cast<const void*>(pSdrHint->GetPage()))); break; - case HINT_OBJREMOVED: + case SdrHintKind::ObjectRemoved: CallListeners(EventMultiplexerEvent::EID_SHAPE_REMOVED, const_cast<void*>(static_cast<const void*>(pSdrHint->GetPage()))); break; diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 0f14dfbdbd1a..27fd3ce6361f 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -158,7 +158,7 @@ void SdUnoForbiddenCharsTable::Notify( SfxBroadcaster&, const SfxHint& rHint ) t if( pSdrHint ) { - if( HINT_MODELCLEARED == pSdrHint->GetKind() ) + if( SdrHintKind::ModelCleared == pSdrHint->GetKind() ) { mpModel = nullptr; } @@ -417,7 +417,7 @@ void SdXImpressDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) notifyEvent( aEvent ); } - if( pSdrHint->GetKind() == HINT_MODELCLEARED ) + if( pSdrHint->GetKind() == SdrHintKind::ModelCleared ) { if( mpDoc ) EndListening( *mpDoc ); diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx index 06941d2204ee..77b63c0bda99 100644 --- a/sd/source/ui/unoidl/unopback.cxx +++ b/sd/source/ui/unoidl/unopback.cxx @@ -85,7 +85,7 @@ void SdUnoPageBackground::Notify( SfxBroadcaster&, const SfxHint& rHint ) { // delete item set if document is dying because then the pool // will also die - if( pSdrHint->GetKind() == HINT_MODELCLEARED ) + if( pSdrHint->GetKind() == SdrHintKind::ModelCleared ) { delete mpSet; mpSet = nullptr; diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index a05aa94b1956..f2f0bcf4f8be 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -377,17 +377,17 @@ void DrawView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) { SdrHintKind eHintKind = static_cast<const SdrHint&>(rHint).GetKind(); - if ( mnPOCHSmph == 0 && eHintKind == HINT_PAGEORDERCHG ) + if ( mnPOCHSmph == 0 && eHintKind == SdrHintKind::PageOrderChange ) { mpDrawViewShell->ResetActualPage(); } - else if ( eHintKind == HINT_LAYERCHG || eHintKind == HINT_LAYERORDERCHG ) + else if ( eHintKind == SdrHintKind::LayerChange || eHintKind == SdrHintKind::LayerOrderChange ) { mpDrawViewShell->ResetActualLayer(); } // switch to that page when it's not a master page - if(HINT_SWITCHTOPAGE == eHintKind) + if(SdrHintKind::SwitchToPage == eHintKind) { const SdrPage* pPage = static_cast<const SdrHint&>(rHint).GetPage(); |