From a66731982e93cdcc5beaa5b0586a7f12a7fc0ef6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 8 Dec 2016 10:26:01 +0200 Subject: convert SFX_HINT to scoped enum Notes (*) In SC, BULK_DATACHANGED was or'ed into the hint id. Replaced with a dynamic_cast check. (*) In SC, removed the hint id field from ScIndexHint, no point in storing the hint id twice (*) Fold the SfxStyleSheetHintId enum into the new SfxHintId enum, no point in storing two different hint ids (*) In some cases, multiple #define's used to map to the same SFX_HINT value (notably the SFX_HINT_USER* values). I made all of those separate values. Change-Id: I990e2fb587335ebc51c9005588c6a44f768d9de5 Reviewed-on: https://gerrit.libreoffice.org/31751 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- reportdesign/source/core/sdr/UndoEnv.cxx | 2 +- reportdesign/source/ui/misc/ColorListener.cxx | 2 +- reportdesign/source/ui/report/StartMarker.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'reportdesign') diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx index 0b0fcf1696be..ecf834aa70a2 100644 --- a/reportdesign/source/core/sdr/UndoEnv.cxx +++ b/reportdesign/source/core/sdr/UndoEnv.cxx @@ -191,7 +191,7 @@ void OXUndoEnvironment::ModeChanged() void OXUndoEnvironment::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) { - if (rHint.GetId() == SFX_HINT_MODECHANGED ) + if (rHint.GetId() == SfxHintId::ModeChanged ) ModeChanged(); } diff --git a/reportdesign/source/ui/misc/ColorListener.cxx b/reportdesign/source/ui/misc/ColorListener.cxx index b119a1bdcc9a..bbd66c5c84ba 100644 --- a/reportdesign/source/ui/misc/ColorListener.cxx +++ b/reportdesign/source/ui/misc/ColorListener.cxx @@ -51,7 +51,7 @@ void OColorListener::dispose() void OColorListener::Notify(SfxBroadcaster & /*rBc*/, SfxHint const & rHint) { - if (rHint.GetId() == SFX_HINT_COLORS_CHANGED) + if (rHint.GetId() == SfxHintId::ColorsChanged) { m_nColor = m_aExtendedColorConfig.GetColorValue(CFG_REPORTDESIGNER,m_sColorEntry).getColor(); m_nTextBoundaries = m_aColorConfig.GetColorValue(::svtools::DOCBOUNDARIES).nColor; diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index 0e1d0f3b385b..59276321d8bd 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -253,7 +253,7 @@ void OStartMarker::setTitle(const OUString& _sTitle) void OStartMarker::Notify(SfxBroadcaster & rBc, SfxHint const & rHint) { OColorListener::Notify(rBc, rHint); - if (rHint.GetId() == SFX_HINT_COLORS_CHANGED) + if (rHint.GetId() == SfxHintId::ColorsChanged) { setColor(); Invalidate(InvalidateFlags::Children); -- cgit