diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-08 10:26:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-08 12:35:09 +0000 |
commit | a66731982e93cdcc5beaa5b0586a7f12a7fc0ef6 (patch) | |
tree | 19064090be4d97781c16aa6e79a4f7a09d561ae9 /sc/inc | |
parent | 20475c78db5c62f2c8711e59753476bd9b4e2f1c (diff) |
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 <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/brdcst.hxx | 3 | ||||
-rw-r--r-- | sc/inc/bulkdatahint.hxx | 4 | ||||
-rw-r--r-- | sc/inc/column.hxx | 2 | ||||
-rw-r--r-- | sc/inc/document.hxx | 8 | ||||
-rw-r--r-- | sc/inc/refhint.hxx | 2 | ||||
-rw-r--r-- | sc/inc/sc.hrc | 16 | ||||
-rw-r--r-- | sc/inc/simplehintids.hxx | 23 |
7 files changed, 9 insertions, 49 deletions
diff --git a/sc/inc/brdcst.hxx b/sc/inc/brdcst.hxx index 5a283bce71fe..fc0fb7e109af 100644 --- a/sc/inc/brdcst.hxx +++ b/sc/inc/brdcst.hxx @@ -20,7 +20,6 @@ #define INCLUDED_SC_INC_BRDCST_HXX #include "address.hxx" -#include "simplehintids.hxx" #include <svl/hint.hxx> class SvtBroadcaster; @@ -30,7 +29,7 @@ class ScHint : public SfxHint ScAddress aAddress; public: - ScHint( sal_uInt32 n, const ScAddress& a ); + ScHint( SfxHintId n, const ScAddress& a ); const ScAddress& GetAddress() const { return aAddress; } ScAddress& GetAddress() { return aAddress; } }; diff --git a/sc/inc/bulkdatahint.hxx b/sc/inc/bulkdatahint.hxx index 0fc35feeebf6..913019edf3f9 100644 --- a/sc/inc/bulkdatahint.hxx +++ b/sc/inc/bulkdatahint.hxx @@ -10,7 +10,7 @@ #ifndef INCLUDED_SC_BULKDATAHINT_HXX #define INCLUDED_SC_BULKDATAHINT_HXX -#include <simplehintids.hxx> +#include <svl/hint.hxx> #include <memory> class ScDocument; @@ -28,7 +28,7 @@ class BulkDataHint : public SfxHint BulkDataHint& operator= ( const BulkDataHint& ) = delete; public: - BulkDataHint( ScDocument& rDoc, sal_uInt32 nHintId ); + BulkDataHint( ScDocument& rDoc, SfxHintId nHintId ); virtual ~BulkDataHint() override; void setSpans( const ColumnSpanSet* pSpans ); diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 5539f82d5fcc..0568aa91dbb2 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -584,7 +584,7 @@ public: void PrepareBroadcastersForDestruction(); void Broadcast( SCROW nRow ); - void BroadcastCells( const std::vector<SCROW>& rRows, sal_uInt32 nHint ); + void BroadcastCells( const std::vector<SCROW>& rRows, SfxHintId nHint ); // cell notes ScPostIt* GetCellNote( SCROW nRow ); diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 44092fd69006..3d5d8f77457a 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -36,7 +36,7 @@ #include "typedstrdata.hxx" #include "calcmacros.hxx" #include "calcconfig.hxx" -#include <simplehintids.hxx> +#include <svl/hint.hxx> #include <tools/gen.hxx> #include <svl/zforlist.hxx> @@ -2041,7 +2041,7 @@ public: */ void Broadcast( const ScHint& rHint ); - void BroadcastCells( const ScRange& rRange, sal_uInt32 nHint, bool bBroadcastSingleBroadcasters = true ); + void BroadcastCells( const ScRange& rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters = true ); void BroadcastRefMoved( const sc::RefMovedHint& rHint ); /// only area, no cell broadcast @@ -2084,10 +2084,10 @@ public: void ClearFormulaTree(); void AppendToFormulaTrack( ScFormulaCell* pCell ); void RemoveFromFormulaTrack( ScFormulaCell* pCell ); - void TrackFormulas( sal_uInt32 nHintId = SC_HINT_DATACHANGED ); + void TrackFormulas( SfxHintId nHintId = SfxHintId::ScDataChanged ); void SetTrackFormulasPending() { mbTrackFormulasPending = true; } bool IsTrackFormulasPending() const { return mbTrackFormulasPending; } - void FinalTrackFormulas( sal_uInt32 nHintId ); + void FinalTrackFormulas( SfxHintId nHintId ); bool IsFinalTrackFormulas() const { return mbFinalTrackFormulas; } bool IsInFormulaTree( ScFormulaCell* pCell ) const; bool IsInFormulaTrack( ScFormulaCell* pCell ) const; diff --git a/sc/inc/refhint.hxx b/sc/inc/refhint.hxx index a1627748cb23..e558c8e7fe48 100644 --- a/sc/inc/refhint.hxx +++ b/sc/inc/refhint.hxx @@ -11,7 +11,7 @@ #define INCLUDED_SC_INC_REFHINT_HXX #include "address.hxx" -#include "simplehintids.hxx" +#include <svl/hint.hxx> namespace sc { diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index d5b87c4a2f0e..ddf6012c5287 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -203,23 +203,14 @@ #define FID_INPUTLINE_STATUS (SC_MESSAGE_START) #define FID_INPUTLINE_ENTER (SC_MESSAGE_START + 1) #define FID_REPAINT (SC_MESSAGE_START + 2) -#define FID_DATACHANGED (SC_MESSAGE_START + 3) -#define FID_REFMODECHANGED (SC_MESSAGE_START + 4) -#define FID_KILLEDITVIEW (SC_MESSAGE_START + 5) #define SID_SOLVE (SC_MESSAGE_START + 6) #define FID_FILTER_OK (SC_MESSAGE_START + 8) -#define SC_HINT_DRWLAYER_NEW (SC_MESSAGE_START + 9) #define FID_INPUTLINE_MATRIX (SC_MESSAGE_START + 11) #define SID_DLG_RETOK (SC_MESSAGE_START + 12) -#define FID_ANYDATACHANGED (SC_MESSAGE_START + 13) #define SID_STATUS_DOCPOS (SC_MESSAGE_START + 14) #define SID_STATUS_PAGESTYLE (SC_MESSAGE_START + 15) #define SID_STATUS_SELMODE (SC_MESSAGE_START + 16) -#define FID_KILLEDITVIEW_NOPAINT (SC_MESSAGE_START + 17) #define SID_DLG_MATRIX (SC_MESSAGE_START + 18) -#define SC_HINT_DBAREAS_CHANGED (SC_MESSAGE_START + 19) -#define SC_HINT_AREAS_CHANGED (SC_MESSAGE_START + 20) -#define SC_HINT_TABLES_CHANGED (SC_MESSAGE_START + 21) #define SID_STATUS_SELMODE_ERG (SC_MESSAGE_START + 22) #define SID_STATUS_SELMODE_ERW (SC_MESSAGE_START + 23) @@ -235,12 +226,6 @@ #define SID_STATUS_SUM (SC_MESSAGE_START + 30) -#define SC_HINT_DRAW_CHANGED (SC_MESSAGE_START + 31) -#define SC_HINT_DOCNAME_CHANGED (SC_MESSAGE_START + 32) -#define SC_HINT_AREALINKS_CHANGED (SC_MESSAGE_START + 33) -#define SC_HINT_SHOWRANGEFINDER (SC_MESSAGE_START + 34) -#define SC_HINT_DOC_SAVED (SC_MESSAGE_START + 35) -#define SC_HINT_FORCESETTAB (SC_MESSAGE_START + 36) #define SID_ENTER_STRING (SC_MESSAGE_START + 37) #define SID_ROWCOL_SELCOUNT (SC_MESSAGE_START + 38) #define SID_AUTO_SUM (SC_MESSAGE_START + 39) @@ -256,7 +241,6 @@ #define SID_VALIDITY_REFERENCE (SC_MESSAGE_START + 61) #define SID_OPENDLG_CONDFRMT_MANAGER (SC_MESSAGE_START + 62) #define SID_POPUP_CONDFRMT (SC_MESSAGE_START + 63) -#define SC_HINT_NAVIGATOR_UPDATEALL (SC_MESSAGE_START + 65) #define SID_OPENDLG_COLORSCALE (SC_MESSAGE_START + 66) #define SID_OPENDLG_DATABAR (SC_MESSAGE_START + 67) #define SID_OPENDLG_ICONSET (SC_MESSAGE_START + 68) diff --git a/sc/inc/simplehintids.hxx b/sc/inc/simplehintids.hxx deleted file mode 100644 index 97940728602f..000000000000 --- a/sc/inc/simplehintids.hxx +++ /dev/null @@ -1,23 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_SC_INC_SIMPLEHINTIDS_HXX -#define INCLUDED_SC_INC_SIMPLEHINTIDS_HXX - -#include <svl/hint.hxx> - -#define SC_HINT_DATACHANGED SFX_HINT_DATACHANGED -#define SC_HINT_TABLEOPDIRTY SFX_HINT_USER00 -#define SC_HINT_CALCALL SFX_HINT_USER01 -#define SC_HINT_REFERENCE SFX_HINT_USER02 -#define SC_HINT_BULK_DATACHANGED SFX_HINT_USER03 - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |