summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-08 10:26:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-08 12:35:09 +0000
commita66731982e93cdcc5beaa5b0586a7f12a7fc0ef6 (patch)
tree19064090be4d97781c16aa6e79a4f7a09d561ae9 /sc
parent20475c78db5c62f2c8711e59753476bd9b4e2f1c (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')
-rw-r--r--sc/inc/brdcst.hxx3
-rw-r--r--sc/inc/bulkdatahint.hxx4
-rw-r--r--sc/inc/column.hxx2
-rw-r--r--sc/inc/document.hxx8
-rw-r--r--sc/inc/refhint.hxx2
-rw-r--r--sc/inc/sc.hrc16
-rw-r--r--sc/inc/simplehintids.hxx23
-rw-r--r--sc/source/core/data/bcaslot.cxx10
-rw-r--r--sc/source/core/data/colorscale.cxx2
-rw-r--r--sc/source/core/data/column.cxx10
-rw-r--r--sc/source/core/data/column3.cxx6
-rw-r--r--sc/source/core/data/column4.cxx6
-rw-r--r--sc/source/core/data/documen2.cxx6
-rw-r--r--sc/source/core/data/documen3.cxx2
-rw-r--r--sc/source/core/data/documen7.cxx10
-rw-r--r--sc/source/core/data/documen8.cxx2
-rw-r--r--sc/source/core/data/document.cxx18
-rw-r--r--sc/source/core/data/formulacell.cxx10
-rw-r--r--sc/source/core/data/stlsheet.cxx2
-rw-r--r--sc/source/core/data/table2.cxx6
-rw-r--r--sc/source/core/inc/bcaslot.hxx12
-rw-r--r--sc/source/core/tool/addinlis.cxx4
-rw-r--r--sc/source/core/tool/adiasync.cxx4
-rw-r--r--sc/source/core/tool/brdcst.cxx2
-rw-r--r--sc/source/core/tool/bulkdatahint.cxx4
-rw-r--r--sc/source/core/tool/chartlis.cxx2
-rw-r--r--sc/source/core/tool/dbdata.cxx2
-rw-r--r--sc/source/core/tool/ddelink.cxx2
-rw-r--r--sc/source/core/tool/grouparealistener.cxx13
-rw-r--r--sc/source/core/tool/lookupcache.cxx2
-rw-r--r--sc/source/core/tool/refhint.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleContextBase.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx10
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeader.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewCell.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewTable.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx14
-rw-r--r--sc/source/ui/app/inputhdl.cxx20
-rw-r--r--sc/source/ui/app/inputwin.cxx6
-rw-r--r--sc/source/ui/app/scmod.cxx8
-rw-r--r--sc/source/ui/app/uiitems.cxx4
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx14
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx8
-rw-r--r--sc/source/ui/docshell/docfunc.cxx32
-rw-r--r--sc/source/ui/docshell/docsh.cxx33
-rw-r--r--sc/source/ui/docshell/docsh2.cxx2
-rw-r--r--sc/source/ui/docshell/docsh3.cxx4
-rw-r--r--sc/source/ui/docshell/docsh4.cxx20
-rw-r--r--sc/source/ui/docshell/docsh5.cxx10
-rw-r--r--sc/source/ui/docshell/impex.cxx4
-rw-r--r--sc/source/ui/docshell/servobj.cxx14
-rw-r--r--sc/source/ui/inc/AccessibilityHints.hxx9
-rw-r--r--sc/source/ui/inc/preview.hxx2
-rw-r--r--sc/source/ui/inc/uiitems.hxx4
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx2
-rw-r--r--sc/source/ui/namedlg/namedefdlg.cxx2
-rw-r--r--sc/source/ui/navipi/navcitem.cxx2
-rw-r--r--sc/source/ui/navipi/navipi.cxx24
-rw-r--r--sc/source/ui/undo/undobase.cxx4
-rw-r--r--sc/source/ui/undo/undoblk.cxx20
-rw-r--r--sc/source/ui/undo/undoblk3.cxx10
-rw-r--r--sc/source/ui/undo/undocell.cxx2
-rw-r--r--sc/source/ui/undo/undoconvert.cxx2
-rw-r--r--sc/source/ui/undo/undodat.cxx8
-rw-r--r--sc/source/ui/undo/undorangename.cxx6
-rw-r--r--sc/source/ui/undo/undosort.cxx2
-rw-r--r--sc/source/ui/undo/undotab.cxx32
-rw-r--r--sc/source/ui/unoobj/addruno.cxx2
-rw-r--r--sc/source/ui/unoobj/appluno.cxx2
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx34
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx20
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx4
-rw-r--r--sc/source/ui/unoobj/condformatuno.cxx2
-rw-r--r--sc/source/ui/unoobj/confuno.cxx2
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx4
-rw-r--r--sc/source/ui/unoobj/datauno.cxx8
-rw-r--r--sc/source/ui/unoobj/defltuno.cxx2
-rw-r--r--sc/source/ui/unoobj/dispuno.cxx4
-rw-r--r--sc/source/ui/unoobj/docuno.cxx18
-rw-r--r--sc/source/ui/unoobj/drdefuno.cxx2
-rw-r--r--sc/source/ui/unoobj/editsrc.cxx6
-rw-r--r--sc/source/ui/unoobj/eventuno.cxx2
-rw-r--r--sc/source/ui/unoobj/fielduno.cxx2
-rw-r--r--sc/source/ui/unoobj/forbiuno.cxx2
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx4
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx12
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx8
-rw-r--r--sc/source/ui/unoobj/notesuno.cxx2
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx6
-rw-r--r--sc/source/ui/unoobj/targuno.cxx4
-rw-r--r--sc/source/ui/unoobj/textuno.cxx6
-rw-r--r--sc/source/ui/unoobj/tokenuno.cxx2
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx4
-rw-r--r--sc/source/ui/view/dbfunc3.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sc/source/ui/view/preview.cxx14
-rw-r--r--sc/source/ui/view/prevwsh.cxx2
-rw-r--r--sc/source/ui/view/prevwsh2.cxx11
-rw-r--r--sc/source/ui/view/tabview.cxx4
-rw-r--r--sc/source/ui/view/tabview3.cxx8
-rw-r--r--sc/source/ui/view/tabview5.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh5.cxx40
-rw-r--r--sc/source/ui/view/tabvwshb.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx2
-rw-r--r--sc/source/ui/view/viewfun2.cxx26
-rw-r--r--sc/source/ui/view/viewfunc.cxx4
-rw-r--r--sc/source/ui/xmlsource/xmlsourcedlg.cxx2
112 files changed, 394 insertions, 460 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: */
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 64cf53cdfd57..3cef49ac30e5 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -260,7 +260,7 @@ ScBroadcastAreas::iterator ScBroadcastAreaSlot::FindBroadcastArea(
namespace {
-void broadcastRangeByCell( SvtBroadcaster& rBC, const ScRange& rRange, sal_uInt32 nHint )
+void broadcastRangeByCell( SvtBroadcaster& rBC, const ScRange& rRange, SfxHintId nHint )
{
ScHint aHint(nHint, ScAddress());
ScAddress& rPos = aHint.GetAddress();
@@ -281,7 +281,7 @@ void broadcastRangeByCell( SvtBroadcaster& rBC, const ScRange& rRange, sal_uInt3
}
-bool ScBroadcastAreaSlot::AreaBroadcast( const ScRange& rRange, sal_uInt32 nHint )
+bool ScBroadcastAreaSlot::AreaBroadcast( const ScRange& rRange, SfxHintId nHint )
{
if (aBroadcastAreaTbl.empty())
return false;
@@ -828,7 +828,7 @@ void ScBroadcastAreaSlotMachine::EndListeningArea(
}
}
-bool ScBroadcastAreaSlotMachine::AreaBroadcast( const ScRange& rRange, sal_uInt32 nHint )
+bool ScBroadcastAreaSlotMachine::AreaBroadcast( const ScRange& rRange, SfxHintId nHint )
{
bool bBroadcasted = false;
SCTAB nEndTab = rRange.aEnd.Tab();
@@ -1095,7 +1095,7 @@ void ScBroadcastAreaSlotMachine::EnterBulkBroadcast()
++nInBulkBroadcast;
}
-void ScBroadcastAreaSlotMachine::LeaveBulkBroadcast( sal_uInt32 nHintId )
+void ScBroadcastAreaSlotMachine::LeaveBulkBroadcast( SfxHintId nHintId )
{
if (nInBulkBroadcast > 0)
{
@@ -1131,7 +1131,7 @@ void ScBroadcastAreaSlotMachine::InsertBulkGroupArea( ScBroadcastArea* pArea, co
pSet->set(rRange, true);
}
-bool ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas( sal_uInt32 nHintId )
+bool ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas( SfxHintId nHintId )
{
if (m_BulkGroupAreas.empty())
return false;
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 5f87b328538a..2690be1aa5e3 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -135,7 +135,7 @@ void ScFormulaListener::Notify(const SfxHint& rHint)
{
mbDirty = true;
- if (rHint.GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SfxHintId::Dying)
return;
if (maCallbackFunction)
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index dd2d2e0ddea8..d143e48b6042 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1963,7 +1963,7 @@ void ScColumn::MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn& rCol)
rCol.CellStorageModified();
// Broadcast on moved ranges. Area-broadcast only.
- ScHint aHint(SC_HINT_DATACHANGED, ScAddress(nCol, 0, nTab));
+ ScHint aHint(SfxHintId::ScDataChanged, ScAddress(nCol, 0, nTab));
ScAddress& rPos = aHint.GetAddress();
sc::SingleColumnSpanSet::SpansType::const_iterator itRange = aRanges.begin(), itRangeEnd = aRanges.end();
for (; itRange != itRangeEnd; ++itRange)
@@ -2749,7 +2749,7 @@ public:
{
std::vector<SCROW> aRows;
maValueRanges.getRows(aRows);
- mrColumn.BroadcastCells(aRows, SC_HINT_DATACHANGED);
+ mrColumn.BroadcastCells(aRows, SfxHintId::ScDataChanged);
}
void fillBroadcastSpans( sc::ColumnSpanSet& rBroadcastSpans ) const
@@ -2793,7 +2793,7 @@ public:
{
std::vector<SCROW> aRows;
maValueRanges.getRows(aRows);
- mrColumn.BroadcastCells(aRows, SC_HINT_TABLEOPDIRTY);
+ mrColumn.BroadcastCells(aRows, SfxHintId::ScTableOpDirty);
}
};
@@ -3222,7 +3222,7 @@ void ScColumn::SetDirty( SCROW nRow1, SCROW nRow2, BroadcastMode eMode )
SetDirtyOnRangeHandler aHdl(*this);
sc::ProcessFormula(maCells.begin(), maCells, nRow1, nRow2, aHdl);
// Broadcast all broadcasters in range.
- ScHint aHint( SC_HINT_DATACHANGED, ScAddress( nCol, nRow1, nTab));
+ ScHint aHint( SfxHintId::ScDataChanged, ScAddress( nCol, nRow1, nTab));
if (BroadcastBroadcasters( nRow1, nRow2, aHint))
{
// SetDirtyOnRangeHandler implicitly tracks notified
@@ -3285,7 +3285,7 @@ void ScColumn::BroadcastRecalcOnRefMove()
sc::AutoCalcSwitch aSwitch(*pDocument, false);
RecalcOnRefMoveCollector aFunc;
sc::ProcessFormula(maCells, aFunc);
- BroadcastCells(aFunc.getDirtyRows(), SC_HINT_DATACHANGED);
+ BroadcastCells(aFunc.getDirtyRows(), SfxHintId::ScDataChanged);
}
namespace {
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 3af350d2aaf9..f736aa0c27bf 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -71,11 +71,11 @@ using namespace formula;
void ScColumn::Broadcast( SCROW nRow )
{
- ScHint aHint(SC_HINT_DATACHANGED, ScAddress(nCol, nRow, nTab));
+ ScHint aHint(SfxHintId::ScDataChanged, ScAddress(nCol, nRow, nTab));
pDocument->Broadcast(aHint);
}
-void ScColumn::BroadcastCells( const std::vector<SCROW>& rRows, sal_uInt32 nHint )
+void ScColumn::BroadcastCells( const std::vector<SCROW>& rRows, SfxHintId nHint )
{
if (rRows.empty())
return;
@@ -707,7 +707,7 @@ void ScColumn::DeleteArea(
// cells that were already empty before the deletion.
std::vector<SCROW> aRows;
aDeletedRows.getRows(aRows);
- BroadcastCells(aRows, SC_HINT_DATACHANGED);
+ BroadcastCells(aRows, SfxHintId::ScDataChanged);
}
}
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index e3cfb3d193b6..ddf18d68f1a0 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -277,7 +277,7 @@ void ScColumn::SetValues( SCROW nRow, const std::vector<double>& rVals )
for (SCROW i = nRow; i <= nLastRow; ++i)
aRows.push_back(i);
- BroadcastCells(aRows, SC_HINT_DATACHANGED);
+ BroadcastCells(aRows, SfxHintId::ScDataChanged);
}
void ScColumn::TransferCellValuesTo( SCROW nRow, size_t nLen, sc::CellValues& rDest )
@@ -302,7 +302,7 @@ void ScColumn::TransferCellValuesTo( SCROW nRow, size_t nLen, sc::CellValues& rD
for (SCROW i = nRow; i <= nLastRow; ++i)
aRows.push_back(i);
- BroadcastCells(aRows, SC_HINT_DATACHANGED);
+ BroadcastCells(aRows, SfxHintId::ScDataChanged);
}
void ScColumn::CopyCellValuesFrom( SCROW nRow, const sc::CellValues& rSrc )
@@ -327,7 +327,7 @@ void ScColumn::CopyCellValuesFrom( SCROW nRow, const sc::CellValues& rSrc )
for (SCROW i = nRow; i <= nLastRow; ++i)
aRows.push_back(i);
- BroadcastCells(aRows, SC_HINT_DATACHANGED);
+ BroadcastCells(aRows, SfxHintId::ScDataChanged);
}
namespace {
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 05f2e56bc7f7..23569de87f72 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -330,7 +330,7 @@ IMPL_LINK_NOARG(ScDocument, TrackTimeHdl, Idle *, void)
else if (pShell) // execute
{
TrackFormulas();
- pShell->Broadcast( SfxHint( FID_DATACHANGED ) );
+ pShell->Broadcast( SfxHint( SfxHintId::ScDataChanged ) );
// modified...
@@ -386,7 +386,7 @@ ScDocument::~ScDocument()
delete pBASM; // BroadcastAreaSlotMachine
pBASM = nullptr;
- delete pUnoBroadcaster; // broadcasted nochmal SFX_HINT_DYING
+ delete pUnoBroadcaster; // broadcasted nochmal SfxHintId::Dying
pUnoBroadcaster = nullptr;
delete pUnoRefUndoList;
@@ -1009,7 +1009,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
sc::CopyToDocContext aCxt(*this);
nDestPos = std::min(nDestPos, (SCTAB)(GetTableCount() - 1));
{ // scope for bulk broadcast
- ScBulkBroadcast aBulkBroadcast( pBASM, SC_HINT_DATACHANGED);
+ ScBulkBroadcast aBulkBroadcast( pBASM, SfxHintId::ScDataChanged);
if (!bResultsOnly)
{
const bool bGlobalNamesToLocal = false;
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 7a5376ee88b4..3e2d1acc94b1 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -936,7 +936,7 @@ void ScDocument::BroadcastUno( const SfxHint &rHint )
// because they can add or remove objects from pUnoBroadcaster.
if ( pUnoListenerCalls &&
- rHint.GetId() == SFX_HINT_DATACHANGED &&
+ rHint.GetId() == SfxHintId::DataChanged &&
!bInUnoListenerCall )
{
// Listener calls may lead to BroadcastUno calls again. The listener calls
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index 437cf4c815e6..9ea2a2ead368 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -82,7 +82,7 @@ void ScDocument::Broadcast( const ScHint& rHint )
}
}
-void ScDocument::BroadcastCells( const ScRange& rRange, sal_uInt32 nHint, bool bBroadcastSingleBroadcasters )
+void ScDocument::BroadcastCells( const ScRange& rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters )
{
PrepareFormulaCalc();
@@ -126,7 +126,7 @@ void ScDocument::BroadcastCells( const ScRange& rRange, sal_uInt32 nHint, bool b
pTab->SetStreamValid(false);
}
- BroadcastUno(SfxHint(SC_HINT_DATACHANGED));
+ BroadcastUno(SfxHint(SfxHintId::ScDataChanged));
}
namespace {
@@ -535,7 +535,7 @@ bool ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) const
return pCell->GetPreviousTrack() || pFormulaTrack == pCell;
}
-void ScDocument::FinalTrackFormulas( sal_uInt32 nHintId )
+void ScDocument::FinalTrackFormulas( SfxHintId nHintId )
{
mbTrackFormulasPending = false;
mbFinalTrackFormulas = true;
@@ -556,9 +556,9 @@ void ScDocument::FinalTrackFormulas( sal_uInt32 nHintId )
The next is broadcasted again, and so on.
View initiates Interpret.
*/
-void ScDocument::TrackFormulas( sal_uInt32 nHintId )
+void ScDocument::TrackFormulas( SfxHintId nHintId )
{
- if (pBASM->IsInBulkBroadcast() && !IsFinalTrackFormulas() && nHintId == SC_HINT_DATACHANGED)
+ if (pBASM->IsInBulkBroadcast() && !IsFinalTrackFormulas() && nHintId == SfxHintId::ScDataChanged)
{
SetTrackFormulasPending();
return;
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index e2a339c528a7..55ca6a5a867f 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -849,7 +849,7 @@ void ScDocument::UpdateExternalRefLinks(vcl::Window* pWin)
if (bAny)
{
TrackFormulas();
- pShell->Broadcast( SfxHint(FID_DATACHANGED) );
+ pShell->Broadcast( SfxHint(SfxHintId::ScDataChanged) );
// #i101960# set document modified, as in TrackTimeHdl for DDE links
if (!pShell->IsModified())
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 17ed40c87d89..429eff05319d 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1241,7 +1241,7 @@ struct BroadcastRecalcOnRefMoveHandler : std::unary_function<ScTable*, void>
explicit BroadcastRecalcOnRefMoveHandler( ScDocument* pDoc ) :
aSwitch( *pDoc, false),
- aBulk( pDoc->GetBASM(), SC_HINT_DATACHANGED)
+ aBulk( pDoc->GetBASM(), SfxHintId::ScDataChanged)
{
}
@@ -2734,7 +2734,7 @@ public:
assert(mpCol);
ScRange aRange(mpCol->GetCol(), nRow1, mpCol->GetTab());
aRange.aEnd.SetRow(nRow2);
- mrDoc.BroadcastCells(aRange, SC_HINT_DATACHANGED);
+ mrDoc.BroadcastCells(aRange, SfxHintId::ScDataChanged);
};
};
@@ -2943,7 +2943,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
StartListeningFromClip( nAllCol1, nAllRow1, nAllCol2, nAllRow2, rMark, nInsFlag );
{
- ScBulkBroadcast aBulkBroadcast( GetBASM(), SC_HINT_DATACHANGED);
+ ScBulkBroadcast aBulkBroadcast( GetBASM(), SfxHintId::ScDataChanged);
// Set all formula cells dirty, and collect non-empty non-formula cell
// positions so that we can broadcast on them below.
@@ -3031,7 +3031,7 @@ void ScDocument::CopyMultiRangeFromClip(
aDestRange.aEnd.Col(), aDestRange.aEnd.Row(), rMark, nInsFlag );
{
- ScBulkBroadcast aBulkBroadcast( GetBASM(), SC_HINT_DATACHANGED);
+ ScBulkBroadcast aBulkBroadcast( GetBASM(), SfxHintId::ScDataChanged);
// Set formula cells dirty and collect non-formula cells.
SetDirtyFromClip(
@@ -3325,7 +3325,7 @@ bool ScDocument::SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString&
// Listeners may just have been setup that are affected by the current
// position thus were not notified by a ScColumn::BroadcastNewCell()
// during ScTable::SetString(), so do it here.
- Broadcast( ScHint( SC_HINT_DATACHANGED, aPos));
+ Broadcast( ScHint( SfxHintId::ScDataChanged, aPos));
}
else
{
@@ -3436,7 +3436,7 @@ void ScDocument::SetValue( const ScAddress& rPos, double fVal )
// Listeners may just have been setup that are affected by the current
// position thus were not notified by a ScColumn::BroadcastNewCell()
// during ScTable::SetValue(), so do it here.
- Broadcast( ScHint( SC_HINT_DATACHANGED, rPos));
+ Broadcast( ScHint( SfxHintId::ScDataChanged, rPos));
}
else
{
@@ -3774,7 +3774,7 @@ void ScDocument::SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt )
bool bOldAutoCalc = GetAutoCalc();
bAutoCalc = false; // no mulitple calculations
{ // scope for bulk broadcast
- ScBulkBroadcast aBulkBroadcast( GetBASM(), SC_HINT_DATACHANGED);
+ ScBulkBroadcast aBulkBroadcast( GetBASM(), SfxHintId::ScDataChanged);
TableContainer::iterator it = maTabs.begin();
for (;it != maTabs.end(); ++it)
if (*it)
@@ -3795,7 +3795,7 @@ void ScDocument::SetDirty( const ScRange& rRange, bool bIncludeEmptyCells )
bool bOldAutoCalc = GetAutoCalc();
bAutoCalc = false; // no mulitple calculations
{ // scope for bulk broadcast
- ScBulkBroadcast aBulkBroadcast( GetBASM(), SC_HINT_DATACHANGED);
+ ScBulkBroadcast aBulkBroadcast( GetBASM(), SfxHintId::ScDataChanged);
SCTAB nTab2 = rRange.aEnd.Tab();
for (SCTAB i=rRange.aStart.Tab(); i<=nTab2 && i < static_cast<SCTAB>(maTabs.size()); i++)
if (maTabs[i]) maTabs[i]->SetDirty( rRange,
@@ -3806,7 +3806,7 @@ void ScDocument::SetDirty( const ScRange& rRange, bool bIncludeEmptyCells )
* desired side effect, or should we come up with a method that
* doesn't? */
if (bIncludeEmptyCells)
- BroadcastCells( rRange, SC_HINT_DATACHANGED, false);
+ BroadcastCells( rRange, SfxHintId::ScDataChanged, false);
}
SetAutoCalc( bOldAutoCalc );
}
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index f59ad0933a50..56646fbb4d3b 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2204,8 +2204,8 @@ void ScFormulaCell::Notify( const SfxHint& rHint )
if (pDocument->IsInDtorClear())
return;
- const sal_uInt32 nHint = rHint.GetId();
- if (nHint == SC_HINT_REFERENCE)
+ const SfxHintId nHint = rHint.GetId();
+ if (nHint == SfxHintId::ScReference)
{
const sc::RefHint& rRefHint = static_cast<const sc::RefHint&>(rHint);
@@ -2272,10 +2272,10 @@ void ScFormulaCell::Notify( const SfxHint& rHint )
if ( pDocument->GetHardRecalcState() == ScDocument::HARDRECALCSTATE_OFF )
{
- if (nHint & (SC_HINT_DATACHANGED | SC_HINT_TABLEOPDIRTY))
+ if (nHint == SfxHintId::ScDataChanged || nHint == SfxHintId::ScTableOpDirty)
{
bool bForceTrack = false;
- if ( nHint & SC_HINT_TABLEOPDIRTY )
+ if ( nHint == SfxHintId::ScTableOpDirty )
{
bForceTrack = !bTableOpDirty;
if ( !bTableOpDirty )
@@ -2395,7 +2395,7 @@ void ScFormulaCell::SetTableOpDirty()
bTableOpDirty = true;
}
pDocument->AppendToFormulaTrack( this );
- pDocument->TrackFormulas( SC_HINT_TABLEOPDIRTY );
+ pDocument->TrackFormulas( SfxHintId::ScTableOpDirty );
}
}
}
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index fedd318decf0..a9ee5354c768 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -269,7 +269,7 @@ bool ScStyleSheet::IsUsed() const
void ScStyleSheet::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
GetItemSet().SetParent( nullptr );
}
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index a046bc5cab23..defa169836fe 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -242,7 +242,7 @@ void ScTable::DeleteRow(
}
{ // scope for bulk broadcast
- ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM(), SC_HINT_DATACHANGED);
+ ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM(), SfxHintId::ScDataChanged);
for (SCCOL j=nStartCol; j<=nEndCol; j++)
aCol[j].DeleteRow(nStartRow, nSize, pGroupPos);
}
@@ -430,7 +430,7 @@ void ScTable::DeleteArea(
if (ValidColRow(nCol1, nRow1) && ValidColRow(nCol2, nRow2))
{
{ // scope for bulk broadcast
- ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM(), SC_HINT_DATACHANGED);
+ ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM(), SfxHintId::ScDataChanged);
for (SCCOL i = nCol1; i <= nCol2; i++)
aCol[i].DeleteArea(nRow1, nRow2, nDelFlag, bBroadcast, pBroadcastSpans);
}
@@ -457,7 +457,7 @@ void ScTable::DeleteArea(
void ScTable::DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast )
{
{ // scope for bulk broadcast
- ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM(), SC_HINT_DATACHANGED);
+ ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM(), SfxHintId::ScDataChanged);
for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].DeleteSelection(nDelFlag, rMark, bBroadcast);
}
diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx
index 29a9934390f0..fd91de8ee3ad 100644
--- a/sc/source/core/inc/bcaslot.hxx
+++ b/sc/source/core/inc/bcaslot.hxx
@@ -211,7 +211,7 @@ public:
void EndListeningArea(
const ScRange& rRange, bool bGroupListening, SvtListener* pListener, ScBroadcastArea*& rpArea );
- bool AreaBroadcast( const ScRange& rRange, sal_uInt32 nHint );
+ bool AreaBroadcast( const ScRange& rRange, SfxHintId nHint );
bool AreaBroadcast( const ScHint& rHint );
void DelBroadcastAreasInRange( const ScRange& rRange );
void UpdateRemove( UpdateRefMode eUpdateRefMode,
@@ -310,7 +310,7 @@ public:
void EndListeningArea(
const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
- bool AreaBroadcast( const ScRange& rRange, sal_uInt32 nHint );
+ bool AreaBroadcast( const ScRange& rRange, SfxHintId nHint );
bool AreaBroadcast( const ScHint& rHint ) const;
// return: at least one broadcast occurred
void DelBroadcastAreasInRange( const ScRange& rRange );
@@ -318,12 +318,12 @@ public:
const ScRange& rRange,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
void EnterBulkBroadcast();
- void LeaveBulkBroadcast( sal_uInt32 nHintId );
+ void LeaveBulkBroadcast( SfxHintId nHintId );
bool InsertBulkArea( const ScBroadcastArea* p );
void InsertBulkGroupArea( ScBroadcastArea* pArea, const ScRange& rRange );
void RemoveBulkGroupArea( ScBroadcastArea* pArea );
- bool BulkBroadcastGroupAreas( sal_uInt32 nHintId );
+ bool BulkBroadcastGroupAreas( SfxHintId nHintId );
/// @return: how many removed
size_t RemoveBulkArea( const ScBroadcastArea* p );
@@ -350,9 +350,9 @@ public:
class ScBulkBroadcast
{
ScBroadcastAreaSlotMachine* pBASM;
- sal_uInt32 mnHintId;
+ SfxHintId mnHintId;
public:
- explicit ScBulkBroadcast( ScBroadcastAreaSlotMachine* p, sal_uInt32 nHintId ) :
+ explicit ScBulkBroadcast( ScBroadcastAreaSlotMachine* p, SfxHintId nHintId ) :
pBASM(p),
mnHintId(nHintId)
{
diff --git a/sc/source/core/tool/addinlis.cxx b/sc/source/core/tool/addinlis.cxx
index 73e73a6367f6..95ebc60f80f9 100644
--- a/sc/source/core/tool/addinlis.cxx
+++ b/sc/source/core/tool/addinlis.cxx
@@ -114,13 +114,13 @@ void SAL_CALL ScAddInListener::modified( const css::sheet::ResultEvent& aEvent )
// notify document of changes
- Broadcast( ScHint(SC_HINT_DATACHANGED, ScAddress()) );
+ Broadcast( ScHint(SfxHintId::ScDataChanged, ScAddress()) );
for ( ScAddInDocs::iterator it = pDocs->begin(); it != pDocs->end(); ++it )
{
ScDocument* pDoc = *it;
pDoc->TrackFormulas();
- pDoc->GetDocumentShell()->Broadcast( SfxHint( FID_DATACHANGED ) );
+ pDoc->GetDocumentShell()->Broadcast( SfxHint( SfxHintId::ScDataChanged ) );
}
}
diff --git a/sc/source/core/tool/adiasync.cxx b/sc/source/core/tool/adiasync.cxx
index 83548bda687b..7d2150fc4811 100644
--- a/sc/source/core/tool/adiasync.cxx
+++ b/sc/source/core/tool/adiasync.cxx
@@ -106,13 +106,13 @@ void ScAddInAsync::CallBack( sal_uLong nHandleP, void* pData )
return;
}
p->bValid = true;
- p->Broadcast( ScHint(SC_HINT_DATACHANGED, ScAddress()) );
+ p->Broadcast( ScHint(SfxHintId::ScDataChanged, ScAddress()) );
for ( ScAddInDocs::iterator it = p->pDocs->begin(); it != p->pDocs->end(); ++it )
{
ScDocument* pDoc = *it;
pDoc->TrackFormulas();
- pDoc->GetDocumentShell()->Broadcast( SfxHint( FID_DATACHANGED ) );
+ pDoc->GetDocumentShell()->Broadcast( SfxHint( SfxHintId::ScDataChanged ) );
}
}
diff --git a/sc/source/core/tool/brdcst.cxx b/sc/source/core/tool/brdcst.cxx
index ce740c000928..963a4fb543fb 100644
--- a/sc/source/core/tool/brdcst.cxx
+++ b/sc/source/core/tool/brdcst.cxx
@@ -19,7 +19,7 @@
#include "brdcst.hxx"
-ScHint::ScHint( sal_uInt32 n, const ScAddress& a ) :
+ScHint::ScHint( SfxHintId n, const ScAddress& a ) :
SfxHint(n), aAddress(a) {}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/bulkdatahint.cxx b/sc/source/core/tool/bulkdatahint.cxx
index 4b71c74e84ae..5a6bb434420b 100644
--- a/sc/source/core/tool/bulkdatahint.cxx
+++ b/sc/source/core/tool/bulkdatahint.cxx
@@ -21,8 +21,8 @@ struct BulkDataHint::Impl
mpSpans(nullptr) {}
};
-BulkDataHint::BulkDataHint( ScDocument& rDoc, sal_uInt32 nHintId ) :
- SfxHint( SC_HINT_BULK_DATACHANGED | nHintId ), mpImpl(new Impl(rDoc)) {}
+BulkDataHint::BulkDataHint( ScDocument& rDoc, SfxHintId nHintId ) :
+ SfxHint( nHintId ), mpImpl(new Impl(rDoc)) {}
BulkDataHint::~BulkDataHint()
{
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index b23aa4b914ba..750678588b84 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -194,7 +194,7 @@ uno::Reference< chart::XChartData > ScChartListener::GetUnoSource() const
void ScChartListener::Notify( const SfxHint& rHint )
{
const ScHint* p = dynamic_cast<const ScHint*>(&rHint);
- if (p && (p->GetId() & SC_HINT_DATACHANGED))
+ if (p && (p->GetId() == SfxHintId::ScDataChanged))
SetUpdateQueue();
}
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 1d62a479981b..aa4a74c0aa4d 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -893,7 +893,7 @@ void ScDBData::Notify( const SfxHint& rHint )
if (!pScHint)
return;
- if (pScHint->GetId() & SC_HINT_DATACHANGED)
+ if (pScHint->GetId() == SfxHintId::ScDataChanged)
{
mbTableColumnNamesDirty = true;
if (!mpContainer)
diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx
index 8a785546e583..5390726cf1f2 100644
--- a/sc/source/core/tool/ddelink.cxx
+++ b/sc/source/core/tool/ddelink.cxx
@@ -198,7 +198,7 @@ sfx2::SvBaseLink::UpdateResult ScDdeLink::DataChanged(
if (HasListeners())
{
- Broadcast(ScHint(SC_HINT_DATACHANGED, ScAddress()));
+ Broadcast(ScHint(SfxHintId::ScDataChanged, ScAddress()));
pDoc->TrackFormulas(); // muss sofort passieren
pDoc->StartTrackTimer();
diff --git a/sc/source/core/tool/grouparealistener.cxx b/sc/source/core/tool/grouparealistener.cxx
index aca46a4585b0..043cc746a1c0 100644
--- a/sc/source/core/tool/grouparealistener.cxx
+++ b/sc/source/core/tool/grouparealistener.cxx
@@ -107,14 +107,13 @@ ScRange FormulaGroupAreaListener::getListeningRange() const
void FormulaGroupAreaListener::Notify( const SfxHint& rHint )
{
- // SC_HINT_BULK_DATACHANGED may include (SC_HINT_DATACHANGED |
- // SC_HINT_TABLEOPDIRTY) so has to be checked first.
- if (rHint.GetId() & SC_HINT_BULK_DATACHANGED)
+ // BulkDataHint may include (SfxHintId::ScDataChanged |
+ // SfxHintId::ScTableOpDirty) so has to be checked first.
+ if ( const BulkDataHint* pBulkHint = dynamic_cast<const BulkDataHint*>(&rHint) )
{
- const BulkDataHint& rBulkHint = static_cast<const BulkDataHint&>(rHint);
- notifyBulkChange(rBulkHint);
+ notifyBulkChange(*pBulkHint);
}
- else if (rHint.GetId() & (SC_HINT_DATACHANGED | SC_HINT_TABLEOPDIRTY))
+ else if (rHint.GetId() == SfxHintId::ScDataChanged || rHint.GetId() == SfxHintId::ScTableOpDirty)
{
notifyCellChange(rHint, static_cast<const ScHint*>(&rHint)->GetAddress());
}
@@ -151,7 +150,7 @@ void FormulaGroupAreaListener::notifyBulkChange( const BulkDataHint& rHint )
std::vector<ScFormulaCell*> aCells;
aAction.swapCells(aCells);
- ScHint aHint(SC_HINT_DATACHANGED, ScAddress());
+ ScHint aHint(SfxHintId::ScDataChanged, ScAddress());
std::for_each(aCells.begin(), aCells.end(), Notifier(aHint));
}
diff --git a/sc/source/core/tool/lookupcache.cxx b/sc/source/core/tool/lookupcache.cxx
index 8fed6400267b..c0140d9046b6 100644
--- a/sc/source/core/tool/lookupcache.cxx
+++ b/sc/source/core/tool/lookupcache.cxx
@@ -111,7 +111,7 @@ void ScLookupCache::Notify( const SfxHint& rHint )
if (!mpDoc->IsInDtorClear())
{
const ScHint* p = dynamic_cast<const ScHint*>(&rHint);
- if ((p && (p->GetId() & SC_HINT_DATACHANGED)) || dynamic_cast<const ScAreaChangedHint*>(&rHint))
+ if ((p && (p->GetId() == SfxHintId::ScDataChanged)) || dynamic_cast<const ScAreaChangedHint*>(&rHint))
{
mpDoc->RemoveLookupCache( *this);
delete this;
diff --git a/sc/source/core/tool/refhint.cxx b/sc/source/core/tool/refhint.cxx
index 3f64ef8b772d..b453a42132bc 100644
--- a/sc/source/core/tool/refhint.cxx
+++ b/sc/source/core/tool/refhint.cxx
@@ -11,7 +11,7 @@
namespace sc {
-RefHint::RefHint( Type eType ) : SfxHint(SC_HINT_REFERENCE), meType(eType) {}
+RefHint::RefHint( Type eType ) : SfxHint(SfxHintId::ScReference), meType(eType) {}
RefHint::~RefHint() {}
RefHint::Type RefHint::getType() const
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
index 66ac3accfb18..3bf756a1c36f 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -126,7 +126,7 @@ void SAL_CALL ScAccessibleContextBase::release()
void ScAccessibleContextBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if (rHint.GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SfxHintId::Dying)
{
// it seems the Broadcaster is dying, since the view is dying
dispose();
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 6b57a08b27db..cbdc599b0dc8 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -1551,7 +1551,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
else
{
// only notify if child exist, otherwise it is not necessary
- if ((rHint.GetId() == SC_HINT_ACC_TABLECHANGED) &&
+ if ((rHint.GetId() == SfxHintId::ScAccTableChanged) &&
mpAccessibleSpreadsheet.is())
{
FreeAccessibleSpreadsheet();
@@ -1575,12 +1575,12 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if (mpAccessibleSpreadsheet.is())
mpAccessibleSpreadsheet->FireFirstCellFocus();
}
- else if (rHint.GetId() == SC_HINT_ACC_MAKEDRAWLAYER)
+ else if (rHint.GetId() == SfxHintId::ScAccMakeDrawLayer)
{
if (mpChildrenShapes)
mpChildrenShapes->SetDrawBroadcaster();
}
- else if ((rHint.GetId() == SC_HINT_ACC_ENTEREDITMODE)) // this event comes only on creating edit field of a cell
+ else if ((rHint.GetId() == SfxHintId::ScAccEnterEditMode)) // this event comes only on creating edit field of a cell
{
if (mpViewShell->GetViewData().HasEditView(meSplitPos))
{
@@ -1604,7 +1604,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
}
}
- else if (rHint.GetId() == SC_HINT_ACC_LEAVEEDITMODE)
+ else if (rHint.GetId() == SfxHintId::ScAccLeaveEditMode)
{
if (mxTempAcc.is())
{
@@ -1619,7 +1619,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
CommitFocusGained();
}
}
- else if ((rHint.GetId() == SC_HINT_ACC_VISAREACHANGED) || (rHint.GetId() == SC_HINT_ACC_WINDOWRESIZED))
+ else if ((rHint.GetId() == SfxHintId::ScAccVisAreaChanged) || (rHint.GetId() == SfxHintId::ScAccWindowResized))
{
Rectangle aOldVisArea(maVisArea);
maVisArea = GetVisibleArea_Impl();
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 31c49300e57b..f8f55086484c 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1236,7 +1236,7 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint
else
{
// only notify if child exist, otherwise it is not necessary
- if (rHint.GetId() == SC_HINT_DATACHANGED)
+ if (rHint.GetId() == SfxHintId::ScDataChanged)
{
if (mpTable.is()) // if there is no table there is nothing to notify, because no one recongnizes the change
{
@@ -1284,11 +1284,11 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint
}
}
}
- else if (rHint.GetId() == SC_HINT_ACC_MAKEDRAWLAYER)
+ else if (rHint.GetId() == SfxHintId::ScAccMakeDrawLayer)
{
GetShapeChildren()->SetDrawBroadcaster();
}
- else if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED)
+ else if (rHint.GetId() == SfxHintId::ScAccVisAreaChanged)
{
Size aOutputSize;
vcl::Window* pSizeWindow = mpViewShell->GetWindow();
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
index 956675a70fcb..134fdf10006f 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
@@ -123,7 +123,7 @@ void SAL_CALL ScAccessiblePageHeader::disposing()
void ScAccessiblePageHeader::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
// only notify if child exist, otherwise it is not necessary
- if (rHint.GetId() == SC_HINT_DATACHANGED)
+ if (rHint.GetId() == SfxHintId::ScDataChanged)
{
ScHFAreas aOldAreas(maAreas);
std::for_each(aOldAreas.begin(), aOldAreas.end(), Acquire());
@@ -157,7 +157,7 @@ void ScAccessiblePageHeader::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
std::for_each(aOldAreas.begin(), aOldAreas.end(), Release());
}
- else if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED)
+ else if (rHint.GetId() == SfxHintId::ScAccVisAreaChanged)
{
AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
index 669c818bf038..662b6d3d285e 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
@@ -93,7 +93,7 @@ void SAL_CALL ScAccessiblePageHeaderArea::disposing()
void ScAccessiblePageHeaderArea::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
// only notify if child exist, otherwise it is not necessary
- if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED)
+ if (rHint.GetId() == SfxHintId::ScAccVisAreaChanged)
{
if (mpTextHelper)
mpTextHelper->UpdateChildren();
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index a1232985fc31..f7f457ff4446 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -83,7 +83,7 @@ void SAL_CALL ScAccessiblePreviewCell::disposing()
void ScAccessiblePreviewCell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED)
+ if (rHint.GetId() == SfxHintId::ScAccVisAreaChanged)
{
if (mpTextHelper)
mpTextHelper->UpdateChildren();
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index 31d9768ecbdb..de1ba2790abc 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -116,13 +116,13 @@ void SAL_CALL ScAccessiblePreviewHeaderCell::disposing()
void ScAccessiblePreviewHeaderCell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const sal_uInt32 nId = rHint.GetId();
- if (nId == SC_HINT_ACC_VISAREACHANGED)
+ const SfxHintId nId = rHint.GetId();
+ if (nId == SfxHintId::ScAccVisAreaChanged)
{
if (mpTextHelper)
mpTextHelper->UpdateChildren();
}
- else if ( nId == SFX_HINT_DATACHANGED )
+ else if ( nId == SfxHintId::DataChanged )
{
// column / row layout may change with any document change,
// so it must be invalidated
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index abfa70176c90..ac7deac10917 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -86,14 +86,14 @@ void SAL_CALL ScAccessiblePreviewTable::disposing()
void ScAccessiblePreviewTable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const sal_uInt32 nId = rHint.GetId();
- if ( nId == SFX_HINT_DATACHANGED )
+ const SfxHintId nId = rHint.GetId();
+ if ( nId == SfxHintId::DataChanged )
{
// column / row layout may change with any document change,
// so it must be invalidated
DELETEZ( mpTableInfo );
}
- else if (nId == SC_HINT_ACC_VISAREACHANGED)
+ else if (nId == SfxHintId::ScAccVisAreaChanged)
{
AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index b0053a33fb3e..203a048bb0a4 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -427,7 +427,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
((rRef.GetRange().aStart.Row() == maRange.aStart.Row()) &&
(rRef.GetRange().aEnd.Row() == maRange.aEnd.Row())))
{
- // ignore next SC_HINT_DATACHANGED notification
+ // ignore next SfxHintId::ScDataChanged notification
mbDelIns = true;
sal_Int16 nId(0);
@@ -479,7 +479,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
}
else
{
- if (rHint.GetId() == SC_HINT_ACC_CURSORCHANGED)
+ if (rHint.GetId() == SfxHintId::ScAccCursorChanged)
{
if (mpViewShell)
{
@@ -657,7 +657,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
m_LastMarkedRanges = *mpMarkedRanges;
}
}
- else if (rHint.GetId() == SC_HINT_DATACHANGED)
+ else if (rHint.GetId() == SfxHintId::ScDataChanged)
{
if (!mbDelIns)
CommitTableModelChange(maRange.aStart.Row(), maRange.aStart.Col(), maRange.aEnd.Row(), maRange.aEnd.Col(), AccessibleTableModelChangeType::UPDATE);
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 1323dd17e04b..11346e1c5d2c 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -680,7 +680,7 @@ ScAccessibleCellTextData::~ScAccessibleCellTextData()
void ScAccessibleCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
mpViewShell = nullptr; // invalid now
if (mpViewForwarder)
@@ -907,7 +907,7 @@ ScAccessibleEditObjectTextData::~ScAccessibleEditObjectTextData()
void ScAccessibleEditObjectTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
mpWindow = nullptr;
mpEditView = nullptr;
@@ -1165,7 +1165,7 @@ ScAccessiblePreviewCellTextData::~ScAccessiblePreviewCellTextData()
void ScAccessiblePreviewCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
mpViewShell = nullptr; // invalid now
if (mpViewForwarder)
@@ -1238,7 +1238,7 @@ ScAccessiblePreviewHeaderCellTextData::~ScAccessiblePreviewHeaderCellTextData()
void ScAccessiblePreviewHeaderCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
mpViewShell = nullptr; // invalid now
if (mpViewForwarder)
@@ -1356,7 +1356,7 @@ ScAccessibleTextData* ScAccessibleHeaderTextData::Clone() const
void ScAccessibleHeaderTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
mpViewShell = nullptr;// invalid now
mpDocSh = nullptr;
@@ -1469,7 +1469,7 @@ ScAccessibleTextData* ScAccessibleNoteTextData::Clone() const
void ScAccessibleNoteTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
mpViewShell = nullptr;// invalid now
mpDocSh = nullptr;
@@ -1605,7 +1605,7 @@ ScAccessibleCsvTextData::~ScAccessibleCsvTextData()
void ScAccessibleCsvTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
mpWindow = nullptr;
mpEditEngine = nullptr;
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 33ec65641b00..e2c96c62b02c 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -394,7 +394,7 @@ handle_r1c1:
{
mpEditEngine->SetUpdateMode( true );
- pDocSh->Broadcast( SfxHint( SC_HINT_SHOWRANGEFINDER ) );
+ pDocSh->Broadcast( SfxHint( SfxHintId::ScShowRangeFinder ) );
}
}
@@ -484,7 +484,7 @@ void ScInputHandler::DeleteRangeFinder()
{
ScDocShell* pDocSh = pActiveViewSh->GetViewData().GetDocShell();
pRangeFindList->SetHidden(true);
- pDocSh->Broadcast( SfxHint( SC_HINT_SHOWRANGEFINDER ) ); // Steal
+ pDocSh->Broadcast( SfxHint( SfxHintId::ScShowRangeFinder ) ); // Steal
DELETEZ(pRangeFindList);
}
}
@@ -1838,7 +1838,7 @@ void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // Executed synchron
EnterHandler();
bFormulaMode = false;
pRefViewSh = nullptr;
- SfxGetpApp()->Broadcast( SfxHint( FID_REFMODECHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
pInputWin->SetFormulaMode(false);
@@ -2368,7 +2368,7 @@ void ScInputHandler::UpdateFormulaMode()
{
bFormulaMode = true;
pRefViewSh = pActiveViewSh;
- pSfxApp->Broadcast( SfxHint( FID_REFMODECHANGED ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
SC_MOD()->SetRefInputHdl(this);
if (pInputWin)
pInputWin->SetFormulaMode(true);
@@ -2387,7 +2387,7 @@ void ScInputHandler::UpdateFormulaMode()
ShowRefFrame();
bFormulaMode = false;
pRefViewSh = nullptr;
- pSfxApp->Broadcast( SfxHint( FID_REFMODECHANGED ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
pInputWin->SetFormulaMode(false);
@@ -2819,7 +2819,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
}
bFormulaMode = false;
- pSfxApp->Broadcast( SfxHint( FID_REFMODECHANGED ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
pInputWin->SetFormulaMode(false);
@@ -2874,7 +2874,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
}
}
- pSfxApp->Broadcast( SfxHint( FID_KILLEDITVIEW_NOPAINT ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScKillEditViewNoPaint ) );
if ( pExecuteSh )
{
@@ -2903,7 +2903,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
pLastState = nullptr;
}
else
- pSfxApp->Broadcast( SfxHint( FID_KILLEDITVIEW ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScKillEditView ) );
if ( bOldMod && pExecuteSh && pCellAttrs && !bForget )
{
@@ -2947,7 +2947,7 @@ void ScInputHandler::CancelHandler()
pExecuteSh->ActiveGrabFocus();
}
bFormulaMode = false;
- SfxGetpApp()->Broadcast( SfxHint( FID_REFMODECHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
pInputWin->SetFormulaMode(false);
@@ -3697,7 +3697,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
}
if (bStopEditing)
- SfxGetpApp()->Broadcast( SfxHint( FID_KILLEDITVIEW ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScKillEditView ) );
// As long as the content is not edited, turn off online spelling.
// Online spelling is turned back on in StartTable, after setting
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index c014cf6ffadc..1ed5a0f608e0 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1518,7 +1518,7 @@ IMPL_LINK(ScTextWnd, NotifyHdl, EENotify&, rNotify, void)
// down to generate a scroll event
if ( rNotify.eNotificationType == EE_NOTIFY_TEXTVIEWSCROLLED
- || rNotify.eNotificationType == EE_NOTIFY_TEXTHEIGHTCHANGED )
+ || rNotify.eNotificationType == EE_NOTIFY_TextHeightChanged )
SetScrollBarRange();
}
@@ -1954,8 +1954,8 @@ void ScPosWnd::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else
{
- const sal_uInt32 nHintId = rHint.GetId();
- if ( nHintId == SC_HINT_AREAS_CHANGED || nHintId == SC_HINT_NAVIGATOR_UPDATEALL)
+ const SfxHintId nHintId = rHint.GetId();
+ if ( nHintId == SfxHintId::ScAreasChanged || nHintId == SfxHintId::ScNavigatorUpdateAll)
FillRangeNames();
}
}
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index ff0b4c951a29..be0319dbbc1f 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -190,7 +190,7 @@ ScModule::ScModule( SfxObjectFactory* pFact ) :
SetPool( pMessagePool );
ScGlobal::InitTextHeight( pMessagePool );
- StartListening( *SfxGetpApp() ); // for SFX_HINT_DEINITIALIZING
+ StartListening( *SfxGetpApp() ); // for SfxHintId::Deinitializing
}
ScModule::~ScModule()
@@ -322,7 +322,7 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, Configura
void ScModule::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DEINITIALIZING )
+ if ( rHint.GetId() == SfxHintId::Deinitializing )
{
// ConfigItems must be removed before ConfigManager
DeleteCfg();
@@ -1253,7 +1253,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
SetPrintOptions( rNewOpt );
// broadcast causes all previews to recalc page numbers
- SfxGetpApp()->Broadcast( SfxHint( SID_SCPRINTOPTIONS ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScPrintOptions ) );
}
if ( bSaveAppOptions )
@@ -1555,7 +1555,7 @@ void ScModule::SetRefDialog( sal_uInt16 nId, bool bVis, SfxViewFrame* pViewFrm )
}
SfxApplication* pSfxApp = SfxGetpApp();
- pSfxApp->Broadcast( SfxHint( FID_REFMODECHANGED ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
}
}
diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx
index aa2ec2cddd3f..51661bd9e470 100644
--- a/sc/source/ui/app/uiitems.cxx
+++ b/sc/source/ui/app/uiitems.cxx
@@ -95,8 +95,8 @@ ScTablesHint::~ScTablesHint()
{
}
-ScIndexHint::ScIndexHint(sal_uInt16 nNewId, sal_uInt16 nIdx) :
- nId( nNewId ),
+ScIndexHint::ScIndexHint(SfxHintId nNewId, sal_uInt16 nIdx) :
+ SfxHint( nNewId ),
nIndex( nIdx )
{
}
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index fb613d84d7b0..3433673e911d 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -470,12 +470,7 @@ void UpdateStyleList(ListBox& rLbStyle, ScDocument* pDoc)
void ScConditionFrmtEntry::Notify(SfxBroadcaster&, const SfxHint& rHint)
{
- const SfxStyleSheetHint* pHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint);
- if(!pHint)
- return;
-
- sal_uInt16 nHint = pHint->GetHint();
- if(nHint == SfxStyleSheetHintId::MODIFIED)
+ if(rHint.GetId() == SfxHintId::StyleSheetModified)
{
if(!mbIsInStyleCreate)
UpdateStyleList(*maLbStyle.get(), mpDoc);
@@ -1301,12 +1296,7 @@ void ScDateFrmtEntry::SetInactive()
void ScDateFrmtEntry::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- const SfxStyleSheetHint* pHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint);
- if(!pHint)
- return;
-
- sal_uInt16 nHint = pHint->GetHint();
- if(nHint == SfxStyleSheetHintId::MODIFIED)
+ if(rHint.GetId() == SfxHintId::StyleSheetModified)
{
if(!mbIsInStyleCreate)
UpdateStyleList(*maLbStyle.get(), mpDoc);
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index f33efe8cf789..a0690244fc8a 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -106,7 +106,7 @@ bool ScDBDocFunc::AddDBRange( const OUString& rName, const ScRange& rRange, bool
}
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
return true;
}
@@ -139,7 +139,7 @@ bool ScDBDocFunc::DeleteDBRange(const OUString& rName)
}
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
bDone = true;
}
@@ -186,7 +186,7 @@ bool ScDBDocFunc::RenameDBRange( const OUString& rOld, const OUString& rNew )
delete pUndoColl;
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
bDone = true;
}
}
@@ -267,7 +267,7 @@ void ScDBDocFunc::ModifyAllDBData( const ScDBCollection& rNewColl, const std::ve
pOldColl = nullptr;
rDocShell.PostPaint(ScRange(0, 0, 0, MAXCOL, MAXROW, MAXTAB), PaintPartFlags::Grid);
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
if (bRecord)
{
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index d84c47da3c90..3a5eaee43c94 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2100,7 +2100,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
return bSuccess;
}
@@ -2609,7 +2609,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
return true;
}
@@ -2935,7 +2935,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
delete pClipDoc;
return true;
@@ -3083,7 +3083,7 @@ bool ScDocFunc::InsertTable( SCTAB nTab, const OUString& rName, bool bRecord, bo
rDocShell.PostPaintExtras();
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
bSuccess = true;
}
else if (!bApi)
@@ -3179,9 +3179,9 @@ bool ScDocFunc::DeleteTable( SCTAB nTab, bool bRecord, bool /* bApi */ )
aModificator.SetDocumentModified();
SfxApplication* pSfxApp = SfxGetpApp(); // Navigator
- pSfxApp->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
- pSfxApp->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
- pSfxApp->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
bSuccess = true;
}
@@ -3239,7 +3239,7 @@ void ScDocFunc::SetTableVisible( SCTAB nTab, bool bVisible, bool bApi )
if (!bVisible)
rDocShell.Broadcast( ScTablesHint( SC_TAB_HIDDEN, nTab ) );
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
rDocShell.PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PaintPartFlags::Extras);
aModificator.SetDocumentModified();
}
@@ -3301,7 +3301,7 @@ bool ScDocFunc::RenameTable( SCTAB nTab, const OUString& rName, bool bRecord, bo
}
rDocShell.PostPaintExtras();
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
bSuccess = true;
}
@@ -3338,7 +3338,7 @@ bool ScDocFunc::SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bo
rDocShell.PostPaintExtras();
ScDocShellModificator aModificator( rDocShell );
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
bSuccess = true;
}
@@ -4953,7 +4953,7 @@ void ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc, SCTA
if (bModifyDoc)
{
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint(SC_HINT_AREAS_CHANGED) );
+ SfxGetpApp()->Broadcast( SfxHint(SfxHintId::ScAreasChanged) );
}
}
@@ -4975,7 +4975,7 @@ void ScDocFunc::ModifyAllRangeNames(const std::map<OUString, std::unique_ptr<ScR
rDoc.CompileHybridFormula();
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast(SfxHint(SC_HINT_AREAS_CHANGED));
+ SfxGetpApp()->Broadcast(SfxHint(SfxHintId::ScAreasChanged));
}
void ScDocFunc::CreateOneName( ScRangeName& rList,
@@ -5371,7 +5371,7 @@ void ScDocFunc::InsertAreaLink( const OUString& rFile, const OUString& rFilter,
if (pBindings)
pBindings->Invalidate( SID_LINKS );
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) ); // Navigator
}
void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFormat* pFormat, SCTAB nTab, const ScRangeList& rRanges )
@@ -5447,7 +5447,7 @@ void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFor
rDocShell.PostPaint(*pRepaintRange, PaintPartFlags::Grid);
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast(SfxHint(SC_HINT_AREAS_CHANGED));
+ SfxGetpApp()->Broadcast(SfxHint(SfxHintId::ScAreasChanged));
}
void ScDocFunc::SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB nTab )
@@ -5475,7 +5475,7 @@ void ScDocFunc::SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB
rDoc.SetStreamValid(nTab, false);
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast(SfxHint(SC_HINT_AREAS_CHANGED));
+ SfxGetpApp()->Broadcast(SfxHint(SfxHintId::ScAreasChanged));
}
void ScDocFunc::ConvertFormulaToValue( const ScRange& rRange, bool bInteraction )
@@ -5507,7 +5507,7 @@ void ScDocFunc::ConvertFormulaToValue( const ScRange& rRange, bool bInteraction
rDocShell.PostPaint(rRange, PaintPartFlags::Grid);
rDocShell.PostDataChanged();
- rDoc.BroadcastCells(rRange, SC_HINT_DATACHANGED);
+ rDoc.BroadcastCells(rRange, SfxHintId::ScDataChanged);
aModificator.SetDocumentModified();
}
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 18c4db7fc1db..075c446b8b9e 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -507,7 +507,7 @@ bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const css::uno::Reference< css
else
{
// still need to recalc volatile formula cells.
- aDocument.Broadcast(ScHint(SC_HINT_DATACHANGED, BCA_BRDCST_ALWAYS));
+ aDocument.Broadcast(ScHint(SfxHintId::ScDataChanged, BCA_BRDCST_ALWAYS));
}
AfterXMLLoading(bRet);
@@ -987,16 +987,11 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
break;
}
}
- else // Without parameter
+ else if (rHint.GetId() == SfxHintId::TitleChanged) // Without parameter
{
- switch ( rHint.GetId() )
- {
- case SFX_HINT_TITLECHANGED:
- aDocument.SetName( SfxShell::GetName() );
- // RegisterNewTargetNames gibts nicht mehr
- SfxGetpApp()->Broadcast(SfxHint( SC_HINT_DOCNAME_CHANGED )); // Navigator
- break;
- }
+ aDocument.SetName( SfxShell::GetName() );
+ // RegisterNewTargetNames gibts nicht mehr
+ SfxGetpApp()->Broadcast(SfxHint( SfxHintId::ScDocNameChanged )); // Navigator
}
}
@@ -2488,8 +2483,8 @@ bool ScDocShell::DoSaveCompleted( SfxMedium * pNewStor, bool bRegisterRecent )
{
bool bRet = SfxObjectShell::DoSaveCompleted( pNewStor, bRegisterRecent );
- // SC_HINT_DOC_SAVED for change ReadOnly -> Read/Write
- Broadcast( SfxHint( SC_HINT_DOC_SAVED ) );
+ // SfxHintId::ScDocSaved for change ReadOnly -> Read/Write
+ Broadcast( SfxHint( SfxHintId::ScDocSaved ) );
return bRet;
}
@@ -2804,7 +2799,7 @@ void ScDocShell::SetModified( bool bModified )
if ( SfxObjectShell::IsEnableSetModified() )
{
SfxObjectShell::SetModified( bModified );
- Broadcast( SfxHint( SFX_HINT_DOCCHANGED ) );
+ Broadcast( SfxHint( SfxHintId::DocChanged ) );
}
}
@@ -2818,9 +2813,9 @@ void ScDocShell::SetDocumentModified()
{
// #i115009# broadcast BCA_BRDCST_ALWAYS, so a component can read recalculated results
// of RecalcModeAlways formulas (like OFFSET) after modifying cells
- aDocument.Broadcast(ScHint(SC_HINT_DATACHANGED, BCA_BRDCST_ALWAYS));
+ aDocument.Broadcast(ScHint(SfxHintId::ScDataChanged, BCA_BRDCST_ALWAYS));
aDocument.InvalidateTableArea(); // #i105279# needed here
- aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) );
+ aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
pPaintLockData->SetModified(); // Later on ...
return;
@@ -2836,7 +2831,7 @@ void ScDocShell::SetDocumentModified()
aDocument.InvalidateStyleSheetUsage();
aDocument.InvalidateTableArea();
aDocument.InvalidateLastTableOpParams();
- aDocument.Broadcast(ScHint(SC_HINT_DATACHANGED, BCA_BRDCST_ALWAYS));
+ aDocument.Broadcast(ScHint(SfxHintId::ScDataChanged, BCA_BRDCST_ALWAYS));
if ( aDocument.IsForcedFormulaPending() && aDocument.GetAutoCalc() )
aDocument.CalcFormulaTree( true );
aDocument.RefreshDirtyTableColumnNames();
@@ -2857,7 +2852,7 @@ void ScDocShell::SetDocumentModified()
}
// notify UNO objects after BCA_BRDCST_ALWAYS etc.
- aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) );
+ aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
}
/**
@@ -2895,7 +2890,7 @@ void ScDocShell::SetDrawModified()
if ( aDocument.IsChartListenerCollectionNeedsUpdate() )
{
aDocument.UpdateChartListenerCollection();
- SfxGetpApp()->Broadcast(SfxHint( SC_HINT_DRAW_CHANGED )); // Navigator
+ SfxGetpApp()->Broadcast(SfxHint( SfxHintId::ScDrawChanged )); // Navigator
}
SC_MOD()->AnythingChanged();
}
@@ -3169,7 +3164,7 @@ void ScDocShellModificator::SetDocumentModified()
{
// uno broadcast is necessary for api to work
// -> must also be done during xml import
- rDoc.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) );
+ rDoc.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
}
}
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index 539d8f3bd0ca..f9b006c184c6 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -170,7 +170,7 @@ ScDrawLayer* ScDocShell::MakeDrawLayer()
aDocument.InitDrawLayer(this);
pDrawLayer = aDocument.GetDrawLayer();
InitItems(); // including Undo and Basic
- Broadcast( SfxHint( SC_HINT_DRWLAYER_NEW ) );
+ Broadcast( SfxHint( SfxHintId::ScDrawLayerNew ) );
if (nDocumentLock)
pDrawLayer->setLock(true);
}
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 9963f9824a2a..d8d208dbe9c0 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -84,8 +84,8 @@ void ScDocShell::PostEditView( ScEditEngineDefaulter* pEditEngine, const ScAddre
void ScDocShell::PostDataChanged()
{
- Broadcast( SfxHint( FID_DATACHANGED ) );
- SfxGetpApp()->Broadcast(SfxHint( FID_ANYDATACHANGED )); // Navigator
+ Broadcast( SfxHint( SfxHintId::ScDataChanged ) );
+ SfxGetpApp()->Broadcast(SfxHint( SfxHintId::ScAnyDataChanged )); // Navigator
aDocument.PrepareFormulaCalc();
//! Navigator direkt benachrichtigen!
}
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 63a2db5e8f32..3f11472077cf 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -456,7 +456,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
// Formeln berechnen und painten wie im TrackTimeHdl
aDocument.TrackFormulas();
- Broadcast(SfxHint(FID_DATACHANGED));
+ Broadcast(SfxHint(SfxHintId::ScDataChanged));
// wenn FID_DATACHANGED irgendwann mal asynchron werden sollte
// (z.B. mit Invalidate am Window), muss hier ein Update erzwungen werden.
@@ -1235,7 +1235,7 @@ void ScDocShell::DoRecalc( bool bApi )
if ( pSh )
pSh->UpdateCharts(true);
- aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) );
+ aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
// Wenn es Charts gibt, dann alles painten, damit nicht
// PostDataChanged und die Charts nacheinander kommen und Teile
@@ -1263,17 +1263,17 @@ void ScDocShell::DoHardRecalc( bool /* bApi */ )
if ( pSh )
pSh->UpdateCharts(true);
- // set notification flags for "calculate" event (used in SFX_HINT_DATACHANGED broadcast)
+ // set notification flags for "calculate" event (used in SfxHintId::DataChanged broadcast)
// (might check for the presence of any formulas on each sheet)
SCTAB nTabCount = aDocument.GetTableCount();
if (aDocument.HasAnySheetEventScript( ScSheetEventId::CALCULATE, true )) // search also for VBA handler
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
aDocument.SetCalcNotification(nTab);
- // CalcAll doesn't broadcast value changes, so SC_HINT_CALCALL is broadcasted globally
- // in addition to SFX_HINT_DATACHANGED.
- aDocument.BroadcastUno( SfxHint( SC_HINT_CALCALL ) );
- aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) );
+ // CalcAll doesn't broadcast value changes, so SfxHintId::ScCalcAll is broadcasted globally
+ // in addition to SfxHintId::DataChanged.
+ aDocument.BroadcastUno( SfxHint( SfxHintId::ScCalcAll ) );
+ aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
// use hard recalc also to disable stream-copying of all sheets
// (somewhat consistent with charts)
@@ -1309,14 +1309,14 @@ void ScDocShell::DoAutoStyle( const ScRange& rRange, const OUString& rStyle )
void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
{
- sal_uInt16 nId = rHint.GetHint();
+ SfxHintId nId = rHint.GetId();
const SfxStyleSheetBase* pStyle = rHint.GetStyleSheet();
if (!pStyle)
return;
if ( pStyle->GetFamily() == SfxStyleFamily::Page )
{
- if ( nId == SfxStyleSheetHintId::MODIFIED )
+ if ( nId == SfxHintId::StyleSheetModified )
{
ScDocShellModificator aModificator( *this );
@@ -1356,7 +1356,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
}
else if ( pStyle->GetFamily() == SfxStyleFamily::Para )
{
- if ( nId == SfxStyleSheetHintId::MODIFIED)
+ if ( nId == SfxHintId::StyleSheetModified)
{
OUString aNewName = pStyle->GetName();
OUString aOldName = aNewName;
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index d3437b8c5dcb..8313311d9e47 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -102,7 +102,7 @@ void ScDocShell::DBAreaDeleted( SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2, SCR
PostPaint( nX1, nY1, nTab, nX2, nY1, nTab, PaintPartFlags::Grid );
// No SetDocumentModified, as the unnamed database range might have to be restored later.
// The UNO hint is broadcast directly instead, to keep UNO objects in valid state.
- aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) );
+ aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
}
ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGetDBSelection eSel )
@@ -314,7 +314,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
// "Import1" etc am Navigator bekanntmachen
if (eMode==SC_DB_IMPORT)
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
}
pData = pNoNameData;
}
@@ -758,7 +758,7 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const OUString& rName, const OUStri
aModificator.SetDocumentModified();
if (!aOldName.equals(rName))
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
SfxBindings* pBindings = GetViewBindings();
if (pBindings)
@@ -824,7 +824,7 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const OUString& rName, const OUStrin
PostPaintExtras(); // Tabellenreiter
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
return nNewTab;
}
@@ -991,7 +991,7 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec
PostPaintGridAll();
PostPaintExtras();
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
return true;
}
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 35527ff8ce7a..cae9393e4fc8 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -939,7 +939,7 @@ bool ScImportExport::Text2Doc( SvStream& rStrm )
EndPaste();
if (bOk && mbImportBroadcast)
{
- pDoc->BroadcastCells(aRange, SC_HINT_DATACHANGED);
+ pDoc->BroadcastCells(aRange, SfxHintId::ScDataChanged);
pDocSh->PostDataChanged();
}
@@ -1504,7 +1504,7 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm )
if (mbImportBroadcast && !mbOverwriting)
{
- pDoc->BroadcastCells(aRange, SC_HINT_DATACHANGED);
+ pDoc->BroadcastCells(aRange, SfxHintId::ScDataChanged);
pDocSh->PostDataChanged();
}
return true;
diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx
index b7d53b95ccd4..8de01c74af5b 100644
--- a/sc/source/ui/docshell/servobj.cxx
+++ b/sc/source/ui/docshell/servobj.cxx
@@ -103,7 +103,7 @@ ScServerObject::ScServerObject( ScDocShell* pShell, const OUString& rItem ) :
pDocSh->GetDocument().StartListeningArea( aRange, false, &aForwarder );
StartListening(*pDocSh); // um mitzubekommen, wenn die DocShell geloescht wird
- StartListening(*SfxGetpApp()); // for SC_HINT_AREAS_CHANGED
+ StartListening(*SfxGetpApp()); // for SfxHintId::ScAreasChanged
}
ScServerObject::~ScServerObject()
@@ -197,11 +197,11 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
bool bDataChanged = false;
- // DocShell can't be tested via type info, because SFX_HINT_DYING comes from the dtor
+ // DocShell can't be tested via type info, because SfxHintId::Dying comes from the dtor
if ( &rBC == pDocSh )
{
- // from DocShell, only SFX_HINT_DYING is interesting
- if ( rHint.GetId() == SFX_HINT_DYING )
+ // from DocShell, only SfxHintId::Dying is interesting
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocSh = nullptr;
EndListening(*SfxGetpApp());
@@ -210,7 +210,7 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
else if (dynamic_cast<const SfxApplication*>( &rBC) != nullptr)
{
- if ( !aItemStr.isEmpty() && rHint.GetId() == SC_HINT_AREAS_CHANGED )
+ if ( !aItemStr.isEmpty() && rHint.GetId() == SfxHintId::ScAreasChanged )
{
// check if named range was modified
ScRange aNew;
@@ -223,7 +223,7 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
// must be from Area broadcasters
const ScHint* pScHint = dynamic_cast<const ScHint*>( &rHint );
- if (pScHint && (pScHint->GetId() & SC_HINT_DATACHANGED))
+ if (pScHint && (pScHint->GetId() == SfxHintId::ScDataChanged))
bDataChanged = true;
else if (const ScAreaChangedHint *pChgHint = dynamic_cast<const ScAreaChangedHint*>(&rHint)) // position of broadcaster changed
{
@@ -236,7 +236,7 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
else
{
- if (rHint.GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SfxHintId::Dying)
{
// If the range is being deleted, listening must be restarted
// after the deletion is complete (done in GetData)
diff --git a/sc/source/ui/inc/AccessibilityHints.hxx b/sc/source/ui/inc/AccessibilityHints.hxx
index 38617b3213e3..3a289dd1db87 100644
--- a/sc/source/ui/inc/AccessibilityHints.hxx
+++ b/sc/source/ui/inc/AccessibilityHints.hxx
@@ -24,15 +24,6 @@
#include <com/sun/star/uno/XInterface.hpp>
#include <svl/hint.hxx>
-#define SC_HINT_ACC_SIMPLE_START SFX_HINT_USER00
-#define SC_HINT_ACC_TABLECHANGED SC_HINT_ACC_SIMPLE_START + 1
-#define SC_HINT_ACC_CURSORCHANGED SC_HINT_ACC_SIMPLE_START + 2
-#define SC_HINT_ACC_VISAREACHANGED SC_HINT_ACC_SIMPLE_START + 3
-#define SC_HINT_ACC_ENTEREDITMODE SC_HINT_ACC_SIMPLE_START + 4
-#define SC_HINT_ACC_LEAVEEDITMODE SC_HINT_ACC_SIMPLE_START + 5
-#define SC_HINT_ACC_MAKEDRAWLAYER SC_HINT_ACC_SIMPLE_START + 6
-#define SC_HINT_ACC_WINDOWRESIZED SC_HINT_ACC_SIMPLE_START + 7
-
class ScAccWinFocusLostHint : public SfxHint
{
public:
diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx
index ca5dbb461254..1e47c34debb2 100644
--- a/sc/source/ui/inc/preview.hxx
+++ b/sc/source/ui/inc/preview.hxx
@@ -98,7 +98,7 @@ private:
void UpdateDrawView();
void DoPrint( ScPreviewLocationData* pFillLocation );
- void InvalidateLocationData( sal_uLong nId );
+ void InvalidateLocationData( SfxHintId nId );
using Window::SetZoom;
diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx
index f114e0cb82e7..0bde21bdcdff 100644
--- a/sc/source/ui/inc/uiitems.hxx
+++ b/sc/source/ui/inc/uiitems.hxx
@@ -115,14 +115,12 @@ public:
class ScIndexHint : public SfxHint
{
- sal_uInt16 nId;
sal_uInt16 nIndex;
public:
- ScIndexHint(sal_uInt16 nNewId, sal_uInt16 nIdx);
+ ScIndexHint(SfxHintId nNewId, sal_uInt16 nIdx);
virtual ~ScIndexHint() override;
- sal_uInt16 GetIndexHintId() const { return nId; }
sal_uInt16 GetIndex() const { return nIndex; }
};
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 48a3449fb6f3..1498a1f79524 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -641,7 +641,7 @@ void ScFormulaReferenceHelper::DoClose( sal_uInt16 nId )
}
SC_MOD()->SetRefDialog( nId, false, pMyViewFrm );
- pSfxApp->Broadcast( SfxHint( FID_KILLEDITVIEW ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScKillEditView ) );
ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell();
if ( pScViewShell )
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index 4584095dcc8f..aa9642758f61 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -256,7 +256,7 @@ void ScNameDefDlg::AddPushed()
// call invalidates the stream
if (nTab != -1)
mpDoc->SetStreamValid(nTab, false);
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreasChanged ) );
mpDocShell->SetDocumentModified();
Close();
}
diff --git a/sc/source/ui/navipi/navcitem.cxx b/sc/source/ui/navipi/navcitem.cxx
index 0eea0c2dc4d7..1afb11c849b2 100644
--- a/sc/source/ui/navipi/navcitem.cxx
+++ b/sc/source/ui/navipi/navcitem.cxx
@@ -81,7 +81,7 @@ void ScNavigatorControllerItem::StateChanged( sal_uInt16 /* nSID */, SfxItemStat
case SID_CURRENTDOC:
- // gar nix mehr, wird ueber SFX_HINT_DOCCHANGED erledigt
+ // gar nix mehr, wird ueber SfxHintId::DocChanged erledigt
break;
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index abdc36d4eab7..80b3c2431116 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -591,9 +591,9 @@ void ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else
{
- const sal_uInt32 nHintId = rHint.GetId();
+ const SfxHintId nHintId = rHint.GetId();
- if (nHintId == SC_HINT_DOCNAME_CHANGED)
+ if (nHintId == SfxHintId::ScDocNameChanged)
{
aLbEntries->ActiveDocChanged();
}
@@ -605,39 +605,39 @@ void ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
switch ( nHintId )
{
- case SC_HINT_TABLES_CHANGED:
+ case SfxHintId::ScTablesChanged:
aLbEntries->Refresh( ScContentId::TABLE );
break;
- case SC_HINT_DBAREAS_CHANGED:
+ case SfxHintId::ScDbAreasChanged:
aLbEntries->Refresh( ScContentId::DBAREA );
break;
- case SC_HINT_AREAS_CHANGED:
+ case SfxHintId::ScAreasChanged:
aLbEntries->Refresh( ScContentId::RANGENAME );
break;
- case SC_HINT_DRAW_CHANGED:
+ case SfxHintId::ScDrawChanged:
aLbEntries->Refresh( ScContentId::GRAPHIC );
aLbEntries->Refresh( ScContentId::OLEOBJECT );
aLbEntries->Refresh( ScContentId::DRAWING );
break;
- case SC_HINT_AREALINKS_CHANGED:
+ case SfxHintId::ScAreaLinksChanged:
aLbEntries->Refresh( ScContentId::AREALINK );
break;
- // SFX_HINT_DOCCHANGED not only at document change
+ // SfxHintId::DocChanged not only at document change
- case SC_HINT_NAVIGATOR_UPDATEALL:
+ case SfxHintId::ScNavigatorUpdateAll:
UpdateAll();
break;
- case FID_DATACHANGED:
- case FID_ANYDATACHANGED:
+ case SfxHintId::ScDataChanged:
+ case SfxHintId::ScAnyDataChanged:
aContentIdle.Start(); // Do not search notes immediately
break;
- case FID_KILLEDITVIEW:
+ case SfxHintId::ScKillEditView:
aLbEntries->ObjectFresh( ScContentId::OLEOBJECT );
aLbEntries->ObjectFresh( ScContentId::DRAWING );
aLbEntries->ObjectFresh( ScContentId::GRAPHIC );
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 795270d77557..5ac882779ec3 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -181,7 +181,7 @@ void ScSimpleUndo::EndRedo()
void ScSimpleUndo::BroadcastChanges( const ScRange& rRange )
{
ScDocument& rDoc = pDocShell->GetDocument();
- rDoc.BroadcastCells(rRange, SC_HINT_DATACHANGED);
+ rDoc.BroadcastCells(rRange, SfxHintId::ScDataChanged);
}
namespace {
@@ -207,7 +207,7 @@ public:
return;
ScRange aRange(mnCurCol, nRow1, mnCurTab, mnCurCol, nRow2, mnCurTab);
- mrDoc.BroadcastCells(aRange, SC_HINT_DATACHANGED);
+ mrDoc.BroadcastCells(aRange, SfxHintId::ScDataChanged);
};
};
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 46b2ba31db27..4a693e4a2c45 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -501,7 +501,7 @@ void ScUndoDeleteCells::Undo()
BeginUndo();
DoChange( true );
EndUndo();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
// Selection not until EndUndo
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -524,7 +524,7 @@ void ScUndoDeleteCells::Redo()
BeginRedo();
DoChange( false);
EndRedo();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
@@ -683,7 +683,7 @@ void ScUndoDeleteMulti::Undo()
//! since no data for selection exist
EndUndo();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
}
void ScUndoDeleteMulti::Redo()
@@ -710,7 +710,7 @@ void ScUndoDeleteMulti::Redo()
DoChange();
EndRedo();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
}
void ScUndoDeleteMulti::Repeat(SfxRepeatTarget& rTarget)
@@ -943,7 +943,7 @@ void ScUndoPaste::DoChange(bool bUndo)
aMarkData.MarkToMulti();
rDoc.DeleteSelection(nUndoFlags, aMarkData, false); // no broadcasting here
for (size_t i = 0, n = maBlockRanges.size(); i < n; ++i)
- rDoc.BroadcastCells(*maBlockRanges[i], SC_HINT_DATACHANGED);
+ rDoc.BroadcastCells(*maBlockRanges[i], SfxHintId::ScDataChanged);
aMarkData.MarkToSimple();
@@ -1062,7 +1062,7 @@ void ScUndoPaste::Undo()
if (!maBlockRanges.empty())
ShowTable(*maBlockRanges.front());
EndUndo();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
}
void ScUndoPaste::Redo()
@@ -1073,7 +1073,7 @@ void ScUndoPaste::Redo()
DoChange( false );
EnableDrawAdjust( &rDoc, true ); //! include in ScBlockUndo?
EndRedo();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
}
void ScUndoPaste::Repeat(SfxRepeatTarget& rTarget)
@@ -1251,7 +1251,7 @@ class DataChangeNotifier : public std::unary_function<SvtListener*, void>
{
ScHint maHint;
public:
- DataChangeNotifier() : maHint(SC_HINT_DATACHANGED, ScAddress()) {}
+ DataChangeNotifier() : maHint(SfxHintId::ScDataChanged, ScAddress()) {}
void operator() ( SvtListener* p )
{
@@ -1335,7 +1335,7 @@ void ScUndoDragDrop::Undo()
}
EndUndo();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
}
void ScUndoDragDrop::Redo()
@@ -1419,7 +1419,7 @@ void ScUndoDragDrop::Redo()
EnableDrawAdjust( &rDoc, true ); //! include in ScBlockUndo?
EndRedo();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
}
void ScUndoDragDrop::Repeat(SfxRepeatTarget& /* rTarget */)
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 7d1f2d97eb82..1d3d707bbaa5 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -728,7 +728,7 @@ void ScUndoMerge::DoChange( bool bUndo ) const
if (!bDidPaint)
ScUndoUtil::PaintMore(pDocShell, aRange);
- rDoc.BroadcastCells(aRange, SC_HINT_DATACHANGED);
+ rDoc.BroadcastCells(aRange, SfxHintId::ScDataChanged);
}
ShowTable(aCurRange);
@@ -1518,7 +1518,7 @@ void ScUndoInsertAreaLink::Undo()
if (pLink)
pLinkManager->Remove( pLink );
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) ); // Navigator
}
void ScUndoInsertAreaLink::Redo()
@@ -1534,7 +1534,7 @@ void ScUndoInsertAreaLink::Redo()
pLink->Update();
pLink->SetInCreate( false );
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) ); // Navigator
}
void ScUndoInsertAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
@@ -1583,7 +1583,7 @@ void ScUndoRemoveAreaLink::Undo()
pLink->Update();
pLink->SetInCreate( false );
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) ); // Navigator
}
void ScUndoRemoveAreaLink::Redo()
@@ -1596,7 +1596,7 @@ void ScUndoRemoveAreaLink::Redo()
if (pLink)
pLinkManager->Remove( pLink );
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) ); // Navigator
}
void ScUndoRemoveAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index f9d082f0f902..8c3555b14440 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -986,7 +986,7 @@ void ScUndoRangeNames::DoChange( bool bUndo )
rDoc.CompileHybridFormula();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreasChanged ) );
}
void ScUndoRangeNames::Undo()
diff --git a/sc/source/ui/undo/undoconvert.cxx b/sc/source/ui/undo/undoconvert.cxx
index b23465b93a65..7778b2b745d5 100644
--- a/sc/source/ui/undo/undoconvert.cxx
+++ b/sc/source/ui/undo/undoconvert.cxx
@@ -43,7 +43,7 @@ void UndoFormulaToValue::Execute()
pDocShell->PostPaint(maUndoValues.getRange(), PaintPartFlags::Grid);
pDocShell->PostDataChanged();
- rDoc.BroadcastCells(maUndoValues.getRange(), SC_HINT_DATACHANGED);
+ rDoc.BroadcastCells(maUndoValues.getRange(), SfxHintId::ScDataChanged);
}
}
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 1595bf118e74..e78330161810 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -1002,7 +1002,7 @@ void ScUndoDBData::Undo()
rDoc.CompileHybridFormula();
rDoc.SetAutoCalc( bOldAutoCalc );
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
EndUndo();
}
@@ -1020,7 +1020,7 @@ void ScUndoDBData::Redo()
rDoc.CompileHybridFormula();
rDoc.SetAutoCalc( bOldAutoCalc );
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
EndRedo();
}
@@ -1842,7 +1842,7 @@ void ScUndoDataForm::Undo()
DoChange( true );
ShowTable( aBlockRange );
EndUndo();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
}
void ScUndoDataForm::Redo()
@@ -1853,7 +1853,7 @@ void ScUndoDataForm::Redo()
DoChange( false );
EnableDrawAdjust( &rDoc, true ); //! include in ScBlockUndo?
EndRedo();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
}
void ScUndoDataForm::Repeat(SfxRepeatTarget& /*rTarget*/)
diff --git a/sc/source/ui/undo/undorangename.cxx b/sc/source/ui/undo/undorangename.cxx
index 5ed0df811f6f..16624c901a6e 100644
--- a/sc/source/ui/undo/undorangename.cxx
+++ b/sc/source/ui/undo/undorangename.cxx
@@ -74,7 +74,7 @@ void ScUndoAllRangeNames::DoChange(const std::map<OUString, std::unique_ptr<ScRa
rDoc.SetAllRangeNames(rNames);
rDoc.CompileHybridFormula();
- SfxGetpApp()->Broadcast(SfxHint(SC_HINT_AREAS_CHANGED));
+ SfxGetpApp()->Broadcast(SfxHint(SfxHintId::ScAreasChanged));
}
ScUndoAddRangeData::ScUndoAddRangeData(ScDocShell* pDocSh, ScRangeData* pRangeData, SCTAB nTab) :
@@ -103,7 +103,7 @@ void ScUndoAddRangeData::Undo()
pRangeName = rDoc.GetRangeName( mnTab );
}
pRangeName->erase(*mpRangeData);
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreasChanged ) );
}
@@ -120,7 +120,7 @@ void ScUndoAddRangeData::Redo()
pRangeName = rDoc.GetRangeName( mnTab );
}
pRangeName->insert(new ScRangeData(*mpRangeData));
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreasChanged ) );
}
void ScUndoAddRangeData::Repeat(SfxRepeatTarget& /*rTarget*/)
diff --git a/sc/source/ui/undo/undosort.cxx b/sc/source/ui/undo/undosort.cxx
index f8d12664225f..4b1ec6bab60b 100644
--- a/sc/source/ui/undo/undosort.cxx
+++ b/sc/source/ui/undo/undosort.cxx
@@ -66,7 +66,7 @@ void UndoSort::Execute( bool bUndo )
rDoc.SetDirty(maParam.maSortRange, true);
if (!aParam.mbUpdateRefs)
- rDoc.BroadcastCells(aParam.maSortRange, SC_HINT_DATACHANGED);
+ rDoc.BroadcastCells(aParam.maSortRange, SfxHintId::ScDataChanged);
pDocShell->PostPaint(maParam.maSortRange, PaintPartFlags::Grid);
pDocShell->PostDataChanged();
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 7245cc99a1f6..5ace37ef7dff 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -116,7 +116,7 @@ void ScUndoInsertTab::Undo()
pChangeTrack->Undo( nEndChangeAction, nEndChangeAction );
// SetTabNo(...,sal_True) for all views to sync with drawing layer pages
- pDocShell->Broadcast( SfxHint( SC_HINT_FORCESETTAB ) );
+ pDocShell->Broadcast( SfxHint( SfxHintId::ScForceSetTab ) );
}
void ScUndoInsertTab::Redo()
@@ -215,7 +215,7 @@ void ScUndoInsertTables::Undo()
pChangeTrack->Undo( nStartChangeAction, nEndChangeAction );
// SetTabNo(...,sal_True) for all views to sync with drawing layer pages
- pDocShell->Broadcast( SfxHint( SC_HINT_FORCESETTAB ) );
+ pDocShell->Broadcast( SfxHint( SfxHintId::ScForceSetTab ) );
}
void ScUndoInsertTables::Redo()
@@ -362,9 +362,9 @@ void ScUndoDeleteTab::Undo()
pDocShell->Broadcast( ScTablesHint( SC_TAB_INSERTED, theTabs[i]) );
}
SfxApplication* pSfxApp = SfxGetpApp(); // Navigator
- pSfxApp->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
- pSfxApp->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
- pSfxApp->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
pDocShell->PostPaint(0,0,0, MAXCOL,MAXROW,MAXTAB, PaintPartFlags::All ); // incl. extras
@@ -390,7 +390,7 @@ void ScUndoDeleteTab::Redo()
SetChangeTrack();
// SetTabNo(...,sal_True) for all views to sync with drawing layer pages
- pDocShell->Broadcast( SfxHint( SC_HINT_FORCESETTAB ) );
+ pDocShell->Broadcast( SfxHint( SfxHintId::ScForceSetTab ) );
}
void ScUndoDeleteTab::Repeat(SfxRepeatTarget& rTarget)
@@ -432,7 +432,7 @@ void ScUndoRenameTab::DoChange( SCTAB nTabP, const OUString& rName ) const
ScDocument& rDoc = pDocShell->GetDocument();
rDoc.RenameTab( nTabP, rName );
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); // Navigator
pDocShell->PostPaintGridAll();
pDocShell->PostPaintExtras();
@@ -540,7 +540,7 @@ void ScUndoMoveTab::DoChange( bool bUndo ) const
}
}
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); // Navigator
pDocShell->PostPaintGridAll();
pDocShell->PostPaintExtras();
@@ -601,7 +601,7 @@ void ScUndoCopyTab::DoChange() const
if (pViewShell)
pViewShell->SetTabNo((*mpOldTabs)[0],true);
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); // Navigator
pDocShell->PostPaintGridAll();
pDocShell->PostPaintExtras();
@@ -820,10 +820,10 @@ void ScUndoMakeScenario::Undo()
if (pViewShell)
pViewShell->SetTabNo( nSrcTab, true );
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
// SetTabNo(...,sal_True) for all views to sync with drawing layer pages
- pDocShell->Broadcast( SfxHint( SC_HINT_FORCESETTAB ) );
+ pDocShell->Broadcast( SfxHint( SfxHintId::ScForceSetTab ) );
}
void ScUndoMakeScenario::Redo()
@@ -844,7 +844,7 @@ void ScUndoMakeScenario::Redo()
if (pViewShell)
pViewShell->SetTabNo( nDestTab, true );
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
}
void ScUndoMakeScenario::Repeat(SfxRepeatTarget& rTarget)
@@ -899,7 +899,7 @@ void ScUndoImportTab::DoChange() const
}
}
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); // Navigator
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB,
PaintPartFlags::Grid | PaintPartFlags::Top | PaintPartFlags::Left | PaintPartFlags::Extras );
}
@@ -1123,7 +1123,7 @@ void ScUndoShowHideTab::DoChange( bool bShowP ) const
pViewShell->SetTabNo(nTab,true);
}
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
pDocShell->SetDocumentModified();
}
@@ -1400,7 +1400,7 @@ void ScUndoScenarioFlags::Undo()
pViewShell->UpdateInputHandler();
if ( aOldName != aNewName )
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
}
void ScUndoScenarioFlags::Redo()
@@ -1417,7 +1417,7 @@ void ScUndoScenarioFlags::Redo()
pViewShell->UpdateInputHandler();
if ( aOldName != aNewName )
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
}
void ScUndoScenarioFlags::Repeat(SfxRepeatTarget& /* rTarget */)
diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx
index 97566b03b265..ea22d9b824d5 100644
--- a/sc/source/ui/unoobj/addruno.cxx
+++ b/sc/source/ui/unoobj/addruno.cxx
@@ -50,7 +50,7 @@ ScAddressConversionObj::~ScAddressConversionObj()
void ScAddressConversionObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // invalid
}
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 2845341982c1..242b8a03fd8b 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -376,7 +376,7 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue(
ScPrintOptions aPrintOpt(pScMod->GetPrintOptions());
aPrintOpt.SetSkipEmpty( !ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); // reversed
pScMod->SetPrintOptions( aPrintOpt );
- SfxGetpApp()->Broadcast( SfxHint( SID_SCPRINTOPTIONS ) ); // update previews
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScPrintOptions ) ); // update previews
}
if ( bSaveApp )
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index a1084a6e0cad..c469ebe4cb95 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -1555,7 +1555,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
uno::Reference<uno::XInterface> const xThis(m_wThis);
if (!xThis.is())
{ // fdo#72695: if UNO object is already dead, don't revive it with event
- if (SFX_HINT_DYING == rHint.GetId())
+ if (SfxHintId::Dying == rHint.GetId())
{ // if the document dies, must reset to avoid crash in dtor!
ForgetCurrentAttrs();
pDocShell = nullptr;
@@ -1615,8 +1615,8 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else
{
- const sal_uInt32 nId = rHint.GetId();
- if ( nId == SFX_HINT_DYING )
+ const SfxHintId nId = rHint.GetId();
+ if ( nId == SfxHintId::Dying )
{
ForgetCurrentAttrs();
pDocShell = nullptr; // invalid
@@ -1636,7 +1636,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
// by the DocShell.
}
}
- else if ( nId == SFX_HINT_DATACHANGED )
+ else if ( nId == SfxHintId::DataChanged )
{
// document content changed -> forget cached attributes
ForgetCurrentAttrs();
@@ -1649,7 +1649,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
// UNO broadcaster list must not be modified.
// Instead, add to the document's list of listener calls,
// which will be executed directly after the broadcast of
- // SFX_HINT_DATACHANGED.
+ // SfxHintId::DataChanged.
lang::EventObject aEvent;
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
@@ -1663,10 +1663,10 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
bGotDataChangedHint = false;
}
}
- else if ( nId == SC_HINT_CALCALL )
+ else if ( nId == SfxHintId::ScCalcAll )
{
// broadcast from DoHardRecalc - set bGotDataChangedHint
- // (SFX_HINT_DATACHANGED follows separately)
+ // (SfxHintId::DataChanged follows separately)
if ( !aValueListeners.empty() )
bGotDataChangedHint = true;
@@ -2805,11 +2805,11 @@ void SAL_CALL ScCellRangesBase::firePropertiesChangeEvent( const uno::Sequence<
IMPL_LINK( ScCellRangesBase, ValueListenerHdl, const SfxHint&, rHint, void )
{
- if ( pDocShell && (rHint.GetId() & SC_HINT_DATACHANGED))
+ if ( pDocShell && (rHint.GetId() == SfxHintId::ScDataChanged))
{
// This may be called several times for a single change, if several formulas
// in the range are notified. So only a flag is set that is checked when
- // SFX_HINT_DATACHANGED is received.
+ // SfxHintId::DataChanged is received.
bGotDataChangedHint = true;
}
@@ -9039,7 +9039,7 @@ void ScCellsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
aRanges.UpdateReference( rRef.GetMode(), &pDocShell->GetDocument(), rRef.GetRange(),
rRef.GetDx(), rRef.GetDy(), rRef.GetDz() );
}
- else if ( rHint.GetId() == SFX_HINT_DYING )
+ else if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
@@ -9176,7 +9176,7 @@ void ScCellsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
}
}
- else if ( rHint.GetId() == SFX_HINT_DYING )
+ else if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
@@ -9230,7 +9230,7 @@ void ScCellFormatsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
//! aTotalRange...
}
- else if ( rHint.GetId() == SFX_HINT_DYING )
+ else if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
@@ -9400,14 +9400,14 @@ void ScCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else
{
- const sal_uInt32 nId = rHint.GetId();
- if ( nId == SFX_HINT_DYING )
+ const SfxHintId nId = rHint.GetId();
+ if ( nId == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
delete pIter;
pIter = nullptr;
}
- else if ( nId == SFX_HINT_DATACHANGED )
+ else if ( nId == SfxHintId::DataChanged )
{
bDirty = true; // AttrArray-Index evtl. ungueltig geworden
}
@@ -9451,7 +9451,7 @@ void ScUniqueCellFormatsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
pDocShell = nullptr; // ungueltig geworden
}
}
@@ -9713,7 +9713,7 @@ void ScUniqueCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHi
}
else
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
pDocShell = nullptr; // ungueltig geworden
}
}
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 40cc47469878..5ff63561eae9 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1018,7 +1018,7 @@ ScChart2DataProvider::~ScChart2DataProvider()
void ScChart2DataProvider::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
m_pDocument = nullptr;
}
@@ -2404,7 +2404,7 @@ ScChart2DataSource::~ScChart2DataSource()
void ScChart2DataSource::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
m_pDocument = nullptr;
}
@@ -2635,7 +2635,7 @@ void ScChart2DataSequence::RebuildDataCache()
if (!m_bExtDataRebuildQueued)
{
m_aDataArray.clear();
- m_pDocument->BroadcastUno(ScHint(SC_HINT_DATACHANGED, ScAddress()));
+ m_pDocument->BroadcastUno(ScHint(SfxHintId::ScDataChanged, ScAddress()));
m_bExtDataRebuildQueued = true;
m_bGotDataChangedHint = true;
}
@@ -2881,12 +2881,12 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
}
else
{
- const sal_uInt32 nId = rHint.GetId();
- if ( nId ==SFX_HINT_DYING )
+ const SfxHintId nId = rHint.GetId();
+ if ( nId ==SfxHintId::Dying )
{
m_pDocument = nullptr;
}
- else if ( nId == SFX_HINT_DATACHANGED )
+ else if ( nId == SfxHintId::DataChanged )
{
// delayed broadcast as in ScCellRangesBase
@@ -2905,10 +2905,10 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
m_bGotDataChangedHint = false;
}
}
- else if ( nId == SC_HINT_CALCALL )
+ else if ( nId == SfxHintId::ScCalcAll )
{
// broadcast from DoHardRecalc - set m_bGotDataChangedHint
- // (SFX_HINT_DATACHANGED follows separately)
+ // (SfxHintId::DataChanged follows separately)
if ( !m_aValueListeners.empty() )
m_bGotDataChangedHint = true;
@@ -2918,11 +2918,11 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
IMPL_LINK( ScChart2DataSequence, ValueListenerHdl, const SfxHint&, rHint, void )
{
- if ( m_pDocument && (rHint.GetId() & SC_HINT_DATACHANGED) )
+ if ( m_pDocument && (rHint.GetId() == SfxHintId::ScDataChanged) )
{
// This may be called several times for a single change, if several formulas
// in the range are notified. So only a flag is set that is checked when
- // SFX_HINT_DATACHANGED is received.
+ // SfxHintId::DataChanged is received.
setDataChangedHint(true);
}
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 467e41c14f62..124245fddd08 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -107,7 +107,7 @@ void ScChartsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
//! Referenz-Update
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
@@ -467,7 +467,7 @@ void ScChartObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
//! Referenz-Update
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx
index d64b71d9bedd..58f6371bddcc 100644
--- a/sc/source/ui/unoobj/condformatuno.cxx
+++ b/sc/source/ui/unoobj/condformatuno.cxx
@@ -324,7 +324,7 @@ ScCondFormatsObj::~ScCondFormatsObj()
void ScCondFormatsObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
mpDocShell = nullptr; // ungueltig geworden
}
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 7377860b7a73..b4a43981531c 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -101,7 +101,7 @@ void ScDocumentConfiguration::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
// Referenz-Update interessiert hier nicht
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 41e3887201bb..8166bb535370 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -305,7 +305,7 @@ void ScDataPilotTablesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
//! Referenz-Update
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
@@ -648,7 +648,7 @@ void ScDataPilotDescriptorBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
//! Referenz-Update?
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 718af054bfcb..a955e551cb1d 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -983,7 +983,7 @@ ScFilterDescriptorBase::~ScFilterDescriptorBase()
void ScFilterDescriptorBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocSh = nullptr; // invalid
}
@@ -1627,7 +1627,7 @@ ScDatabaseRangeObj::~ScDatabaseRangeObj()
void ScDatabaseRangeObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
pDocShell = nullptr; // ungueltig geworden
else if ( dynamic_cast<const ScDBRangeRefreshedHint*>(&rHint) )
{
@@ -2193,7 +2193,7 @@ void ScDatabaseRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
// Referenz-Update interessiert hier nicht
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
@@ -2386,7 +2386,7 @@ void ScUnnamedDatabaseRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
// Referenz-Update interessiert hier nicht
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx
index 41f3caae3a3a..f7a6ba2888e3 100644
--- a/sc/source/ui/unoobj/defltuno.cxx
+++ b/sc/source/ui/unoobj/defltuno.cxx
@@ -89,7 +89,7 @@ ScDocDefaultsObj::~ScDocDefaultsObj()
void ScDocDefaultsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // document gone
}
diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx
index a9ce806a6d0f..49250b5ca9a8 100644
--- a/sc/source/ui/unoobj/dispuno.cxx
+++ b/sc/source/ui/unoobj/dispuno.cxx
@@ -82,7 +82,7 @@ ScDispatchProviderInterceptor::~ScDispatchProviderInterceptor()
void ScDispatchProviderInterceptor::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
pViewShell = nullptr;
}
@@ -208,7 +208,7 @@ ScDispatch::~ScDispatch()
void ScDispatch::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
pViewShell = nullptr;
}
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index ca17d5950101..a7a3bf73402e 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1110,8 +1110,8 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
// Not interested in reference update hints here
- const sal_uInt32 nId = rHint.GetId();
- if ( nId == SFX_HINT_DYING )
+ const SfxHintId nId = rHint.GetId();
+ if ( nId == SfxHintId::Dying )
{
pDocShell = nullptr; // has become invalid
if (xNumberAgg.is())
@@ -1125,7 +1125,7 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
DELETEZ( pPrintFuncCache ); // must be deleted because it has a pointer to the DocShell
}
- else if ( nId == SFX_HINT_DATACHANGED )
+ else if ( nId == SfxHintId::DataChanged )
{
// cached data for rendering become invalid when contents change
// (if a broadcast is added to SetDrawModified, is has to be tested here, too)
@@ -3021,7 +3021,7 @@ void ScDrawPagesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
// Referenz-Update interessiert hier nicht
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
@@ -3132,7 +3132,7 @@ void ScTableSheetsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
// Referenz-Update interessiert hier nicht
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
@@ -3539,7 +3539,7 @@ void ScTableColumnsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
//! Referenz-Update fuer Tab und Start/Ende
}
- else if ( rHint.GetId() == SFX_HINT_DYING )
+ else if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
@@ -3802,7 +3802,7 @@ void ScTableRowsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
//! Referenz-Update fuer Tab und Start/Ende
}
- else if ( rHint.GetId() == SFX_HINT_DYING )
+ else if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
@@ -4113,7 +4113,7 @@ void ScAnnotationsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
//! nTab bei Referenz-Update anpassen!!!
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
@@ -4246,7 +4246,7 @@ void ScScenariosObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
//! Referenz-Update fuer Tab und Start/Ende
}
- else if ( rHint.GetId() == SFX_HINT_DYING )
+ else if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
diff --git a/sc/source/ui/unoobj/drdefuno.cxx b/sc/source/ui/unoobj/drdefuno.cxx
index 9f9ec17a246f..6fc63b7f5a74 100644
--- a/sc/source/ui/unoobj/drdefuno.cxx
+++ b/sc/source/ui/unoobj/drdefuno.cxx
@@ -43,7 +43,7 @@ ScDrawDefaultsObj::~ScDrawDefaultsObj() throw ()
void ScDrawDefaultsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // document gone
}
diff --git a/sc/source/ui/unoobj/editsrc.cxx b/sc/source/ui/unoobj/editsrc.cxx
index d07bb30e84fd..4d443ba0988a 100644
--- a/sc/source/ui/unoobj/editsrc.cxx
+++ b/sc/source/ui/unoobj/editsrc.cxx
@@ -202,15 +202,15 @@ void ScAnnotationEditSource::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else
{
- const sal_uInt32 nId = rHint.GetId();
- if ( nId == SFX_HINT_DYING )
+ const SfxHintId nId = rHint.GetId();
+ if ( nId == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
DELETEZ( pForwarder );
DELETEZ( pEditEngine ); // EditEngine uses document's pool
}
- else if ( nId == SFX_HINT_DATACHANGED )
+ else if ( nId == SfxHintId::DataChanged )
bDataValid = false; // Text muss neu geholt werden
}
}
diff --git a/sc/source/ui/unoobj/eventuno.cxx b/sc/source/ui/unoobj/eventuno.cxx
index 3e121f6ffa15..2eb4d60cca78 100644
--- a/sc/source/ui/unoobj/eventuno.cxx
+++ b/sc/source/ui/unoobj/eventuno.cxx
@@ -46,7 +46,7 @@ ScSheetEventsObj::~ScSheetEventsObj()
void ScSheetEventsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
//! reference update
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
mpDocShell = nullptr;
}
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 8edc341cbcfa..e67e93822e21 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -317,7 +317,7 @@ void ScCellFieldsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
//! Ref-Update
}
- else if ( rHint.GetId() == SFX_HINT_DYING )
+ else if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
diff --git a/sc/source/ui/unoobj/forbiuno.cxx b/sc/source/ui/unoobj/forbiuno.cxx
index 80330854d023..2ad3874ea97f 100644
--- a/sc/source/ui/unoobj/forbiuno.cxx
+++ b/sc/source/ui/unoobj/forbiuno.cxx
@@ -61,7 +61,7 @@ ScForbiddenCharsObj::~ScForbiddenCharsObj()
void ScForbiddenCharsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // document gone
}
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index 31f2e1eacb7b..5fae65828bf0 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -179,7 +179,7 @@ ScFunctionAccess::ScFunctionAccess() :
mbArray( true ), // default according to behaviour of older Office versions
mbValid( true )
{
- StartListening( *SfxGetpApp() ); // for SFX_HINT_DEINITIALIZING
+ StartListening( *SfxGetpApp() ); // for SfxHintId::Deinitializing
}
ScFunctionAccess::~ScFunctionAccess()
@@ -194,7 +194,7 @@ ScFunctionAccess::~ScFunctionAccess()
void ScFunctionAccess::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DEINITIALIZING )
+ if ( rHint.GetId() == SfxHintId::Deinitializing )
{
// document must not be used anymore
aDocCache.Clear();
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index b0e43eb052bc..d001bd989c93 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -99,7 +99,7 @@ void ScSheetLinkObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
pDocShell = nullptr; // pointer is invalid
}
}
@@ -383,7 +383,7 @@ void ScSheetLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
// Referenz-Update interessiert hier nicht
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
@@ -619,7 +619,7 @@ void ScAreaLinkObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
pDocShell = nullptr; // pointer is invalid
}
}
@@ -918,7 +918,7 @@ void ScAreaLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
// Referenz-Update interessiert hier nicht
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
@@ -1054,7 +1054,7 @@ void ScDDELinkObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
pDocShell = nullptr; // pointer is invalid
}
}
@@ -1236,7 +1236,7 @@ void ScDDELinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
// Referenz-Update interessiert hier nicht
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index ffc5512a3f06..a8f31d101c41 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -102,7 +102,7 @@ void ScNamedRangeObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
// reference update is of no interest
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
pDocShell = nullptr; // became invalid
}
@@ -480,7 +480,7 @@ void ScNamedRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
// reference update is of no interest
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // became invalid
}
@@ -944,7 +944,7 @@ void ScLabelRangeObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
//! Ref-Update !!!
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
pDocShell = nullptr; // became invalid
}
@@ -1064,7 +1064,7 @@ void ScLabelRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
// reference update is of no interest
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // became invalid
}
diff --git a/sc/source/ui/unoobj/notesuno.cxx b/sc/source/ui/unoobj/notesuno.cxx
index 2735e588fea0..ec1d5956043f 100644
--- a/sc/source/ui/unoobj/notesuno.cxx
+++ b/sc/source/ui/unoobj/notesuno.cxx
@@ -81,7 +81,7 @@ void ScAnnotationObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
//! Ref-Update
}
- else if ( rHint.GetId() == SFX_HINT_DYING )
+ else if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 1a6e8e90859a..e646e70e5dfd 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -413,7 +413,7 @@ void ScStyleFamiliesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
// Referenz-Update interessiert hier nicht
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // ungueltig geworden
}
@@ -621,7 +621,7 @@ void ScStyleFamilyObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
// Referenz-Update interessiert hier nicht
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // has become invalid
}
@@ -1011,7 +1011,7 @@ void ScStyleObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
// Referenz-Update interessiert hier nicht
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
pDocShell = nullptr; // has become invalid
}
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index 28326e49b9a5..0e080ad6d981 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -83,7 +83,7 @@ ScLinkTargetTypesObj::~ScLinkTargetTypesObj()
void ScLinkTargetTypesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
pDocShell = nullptr; // document gone
}
@@ -149,7 +149,7 @@ ScLinkTargetTypeObj::~ScLinkTargetTypeObj()
void ScLinkTargetTypeObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
pDocShell = nullptr; // document gone
}
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index 74e1967f317c..5d61fd03794b 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -1022,15 +1022,15 @@ void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else
{
- const sal_uInt32 nId = rHint.GetId();
- if ( nId == SFX_HINT_DYING )
+ const SfxHintId nId = rHint.GetId();
+ if ( nId == SfxHintId::Dying )
{
pDocShell = nullptr; // invalid now
DELETEZ( pForwarder );
DELETEZ( pEditEngine ); // EditEngine uses document's pool
}
- else if ( nId == SFX_HINT_DATACHANGED )
+ else if ( nId == SfxHintId::DataChanged )
{
if (!bInUpdate) // not for own UpdateData calls
bDataValid = false; // text has to be read from the cell again
diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx
index 9077109d1711..b766a89bbdbf 100644
--- a/sc/source/ui/unoobj/tokenuno.cxx
+++ b/sc/source/ui/unoobj/tokenuno.cxx
@@ -80,7 +80,7 @@ ScFormulaParserObj::~ScFormulaParserObj()
void ScFormulaParserObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
mpDocShell = nullptr;
}
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 6db54a3de384..0a7b17577caf 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -136,7 +136,7 @@ ScViewPaneBase::~ScViewPaneBase()
void ScViewPaneBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
pViewShell = nullptr;
}
@@ -2330,7 +2330,7 @@ void ScPreviewObj::release() throw()
void ScPreviewObj::Notify(SfxBroadcaster&, const SfxHint& rHint)
{
- if (rHint.GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SfxHintId::Dying)
mpViewShell = nullptr;
}
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index e8eccb1a62f2..72985854facb 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -625,7 +625,7 @@ bool ScDBFunc::MakePivotTable(
if ( bNewTable )
{
pDocSh->PostPaintExtras();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
}
return bSuccess;
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 81f9b9ee5af3..79b3ebac77df 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5141,7 +5141,7 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, bool bUp )
lcl_PaintRefChanged( pDocSh, aOld, aNew );
// only redraw new frame (synchronously)
- pDocSh->Broadcast( ScIndexHint( SC_HINT_SHOWRANGEFINDER, nRFIndex ) );
+ pDocSh->Broadcast( ScIndexHint( SfxHintId::ScShowRangeFinder, nRFIndex ) );
Update(); // what you move, will be seen immediately
}
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 7099142c5dc9..63afadfc9e5c 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -707,7 +707,7 @@ void ScPreview::DataChanged(bool bNewTime)
}
bValid = false;
- InvalidateLocationData( SC_HINT_DATACHANGED );
+ InvalidateLocationData( SfxHintId::ScDataChanged );
Invalidate();
}
@@ -750,7 +750,7 @@ void ScPreview::SetZoom(sal_uInt16 nNewZoom)
bInSetZoom = false;
bStateValid = false;
- InvalidateLocationData( SC_HINT_ACC_VISAREACHANGED );
+ InvalidateLocationData( SfxHintId::ScAccVisAreaChanged );
DoInvalidate();
Invalidate();
}
@@ -761,7 +761,7 @@ void ScPreview::SetPageNo( long nPage )
nPageNo = nPage;
RecalcPages();
UpdateDrawView(); // The table eventually changes
- InvalidateLocationData( SC_HINT_DATACHANGED );
+ InvalidateLocationData( SfxHintId::ScDataChanged );
Invalidate();
}
@@ -864,7 +864,7 @@ void ScPreview::SetXOffset( long nX )
if (!bInSetZoom)
Invalidate();
}
- InvalidateLocationData( SC_HINT_ACC_VISAREACHANGED );
+ InvalidateLocationData( SfxHintId::ScAccVisAreaChanged );
Invalidate();
}
@@ -890,7 +890,7 @@ void ScPreview::SetYOffset( long nY )
if (!bInSetZoom)
Invalidate();
}
- InvalidateLocationData( SC_HINT_ACC_VISAREACHANGED );
+ InvalidateLocationData( SfxHintId::ScAccVisAreaChanged );
Invalidate();
}
@@ -959,7 +959,7 @@ void ScPreview::DataChanged( const DataChangedEvent& rDCEvt )
pViewShell->InvalidateBorder(); // calls OuterResizePixel
}
Invalidate();
- InvalidateLocationData( SC_HINT_DATACHANGED );
+ InvalidateLocationData( SfxHintId::ScDataChanged );
}
}
}
@@ -1496,7 +1496,7 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt )
}
}
-void ScPreview::InvalidateLocationData(sal_uLong nId)
+void ScPreview::InvalidateLocationData(SfxHintId nId)
{
bLocationValid = false;
if (pViewShell->HasAccessibilityObjects())
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 86febd581aa2..a283d811f98c 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -187,7 +187,7 @@ ScPreviewShell::~ScPreviewShell()
mpFrameWindow->SetCloseHdl(Link<SystemWindow&,void>()); // Remove close handler.
// #108333#; notify Accessibility that Shell is dying and before destroy all
- BroadcastAccessibility( SfxHint( SFX_HINT_DYING ) );
+ BroadcastAccessibility( SfxHint( SfxHintId::Dying ) );
DELETEZ(pAccessibilityBroadcaster);
SfxBroadcaster* pDrawBC = pDocShell->GetDocument().GetDrawBroadcaster();
diff --git a/sc/source/ui/view/prevwsh2.cxx b/sc/source/ui/view/prevwsh2.cxx
index 31f82086dbfb..190c2d053a5a 100644
--- a/sc/source/ui/view/prevwsh2.cxx
+++ b/sc/source/ui/view/prevwsh2.cxx
@@ -39,27 +39,28 @@ void ScPreviewShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
bDataChanged = true;
}
}
- else if (dynamic_cast<const SdrHint*>(&rHint))
+ else if (const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint))
{
// SdrHints are no longer used for invalidating, thus react on objectchange instead
- if(SdrHintKind::ObjectChange == static_cast<const SdrHint&>(rHint).GetKind())
+ if(SdrHintKind::ObjectChange == pSdrHint->GetKind())
bDataChanged = true;
}
else
{
switch ( rHint.GetId() )
{
- case FID_DATACHANGED:
- case SID_SCPRINTOPTIONS:
+ case SfxHintId::ScDataChanged:
+ case SfxHintId::ScPrintOptions:
bDataChanged = true;
break;
- case SC_HINT_DRWLAYER_NEW:
+ case SfxHintId::ScDrawLayerNew:
{
SfxBroadcaster* pDrawBC = pDocShell->GetDocument().GetDrawBroadcaster();
if (pDrawBC)
StartListening(*pDrawBC);
}
break;
+ default: break;
}
}
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index c05d098dcf21..3cabc9273fcd 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -738,7 +738,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& rSize, bool bInner )
UpdateVarZoom(); // update variable zoom types (after resizing GridWindows)
if (aViewData.GetViewShell()->HasAccessibilityObjects())
- aViewData.GetViewShell()->BroadcastAccessibility(SfxHint(SC_HINT_ACC_WINDOWRESIZED));
+ aViewData.GetViewShell()->BroadcastAccessibility(SfxHint(SfxHintId::ScAccWindowResized));
}
void ScTabView::UpdateVarZoom()
@@ -2176,7 +2176,7 @@ void ScTabView::SetNewVisArea()
}
}
if (aViewData.GetViewShell()->HasAccessibilityObjects())
- aViewData.GetViewShell()->BroadcastAccessibility(SfxHint(SC_HINT_ACC_VISAREACHANGED));
+ aViewData.GetViewShell()->BroadcastAccessibility(SfxHint(SfxHintId::ScAccVisAreaChanged));
}
bool ScTabView::HasPageFieldDataAtCursor() const
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index fb3d6b47ee50..1854e7c6d382 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -539,7 +539,7 @@ void ScTabView::SelectionChanged()
rBindings.Invalidate( SID_SORT_DESCENDING );
if (aViewData.GetViewShell()->HasAccessibilityObjects())
- aViewData.GetViewShell()->BroadcastAccessibility(SfxHint(SC_HINT_ACC_CURSORCHANGED));
+ aViewData.GetViewShell()->BroadcastAccessibility(SfxHint(SfxHintId::ScAccCursorChanged));
CellContentChanged();
}
@@ -548,7 +548,7 @@ void ScTabView::CursorPosChanged()
{
bool bRefMode = SC_MOD()->IsFormulaMode();
if ( !bRefMode ) // check that RefMode works when switching sheets
- aViewData.GetDocShell()->Broadcast( SfxHint( FID_KILLEDITVIEW ) );
+ aViewData.GetDocShell()->Broadcast( SfxHint( SfxHintId::ScKillEditView ) );
// Broadcast, so that other Views of the document also switch
@@ -2044,7 +2044,7 @@ void ScTabView::MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW
}
if (aViewData.GetViewShell()->HasAccessibilityObjects())
- aViewData.GetViewShell()->BroadcastAccessibility(SfxHint(SC_HINT_ACC_ENTEREDITMODE));
+ aViewData.GetViewShell()->BroadcastAccessibility(SfxHint(SfxHintId::ScAccEnterEditMode));
}
void ScTabView::UpdateEditView()
@@ -2092,7 +2092,7 @@ void ScTabView::KillEditView( bool bNoPaint )
// #108931#; notify accessibility before all things happen
if (bNotifyAcc && aViewData.GetViewShell()->HasAccessibilityObjects())
- aViewData.GetViewShell()->BroadcastAccessibility(SfxHint(SC_HINT_ACC_LEAVEEDITMODE));
+ aViewData.GetViewShell()->BroadcastAccessibility(SfxHint(SfxHintId::ScAccLeaveEditMode));
aViewData.ResetEditView();
for (i=0; i<4; i++)
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index fdb0823baa8e..a528e511e479 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -259,7 +259,7 @@ void ScTabView::MakeDrawView( TriState nForceDesignMode )
pFormSh->SetView(pDrawView);
if (aViewData.GetViewShell()->HasAccessibilityObjects())
- aViewData.GetViewShell()->BroadcastAccessibility(SfxHint(SC_HINT_ACC_MAKEDRAWLAYER));
+ aViewData.GetViewShell()->BroadcastAccessibility(SfxHint(SfxHintId::ScAccMakeDrawLayer));
}
}
@@ -298,7 +298,7 @@ void ScTabView::TabChanged( bool bSameTabButMoved )
if (aViewData.GetViewShell()->HasAccessibilityObjects())
{
- SfxHint aAccHint(SC_HINT_ACC_TABLECHANGED);
+ SfxHint aAccHint(SfxHintId::ScAccTableChanged);
aViewData.GetViewShell()->BroadcastAccessibility(aAccHint);
}
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 9889bea2b52f..11168716c613 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -161,7 +161,7 @@ void ScTabViewShell::Activate(bool bMDI)
if ( bFirstActivate )
{
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_NAVIGATOR_UPDATEALL ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScNavigatorUpdateAll ) );
bFirstActivate = false;
// ReadExtOptions (view settings from Excel import) must also be done
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx
index f46bbbfa9868..4e635ada68ed 100644
--- a/sc/source/ui/view/tabvwsh5.cxx
+++ b/sc/source/ui/view/tabvwsh5.cxx
@@ -199,28 +199,28 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
bool bForce = !bStayOnActiveTab;
SetTabNo( nNewTab, bForce, false, bStayOnActiveTab );
}
- else if (dynamic_cast<const ScIndexHint*>(&rHint))
+ else if (const ScIndexHint* pIndexHint = dynamic_cast<const ScIndexHint*>(&rHint))
{
- const ScIndexHint& rIndexHint = static_cast<const ScIndexHint&>(rHint);
- sal_uInt16 nId = rIndexHint.GetIndexHintId();
- sal_uInt16 nIndex = rIndexHint.GetIndex();
+ SfxHintId nId = pIndexHint->GetId();
+ sal_uInt16 nIndex = pIndexHint->GetIndex();
switch (nId)
{
- case SC_HINT_SHOWRANGEFINDER:
+ case SfxHintId::ScShowRangeFinder:
PaintRangeFinder( nIndex );
break;
+ default: break;
}
}
else // ohne Parameter
{
- const sal_uInt32 nSlot = rHint.GetId();
+ const SfxHintId nSlot = rHint.GetId();
switch ( nSlot )
{
- case FID_DATACHANGED:
+ case SfxHintId::ScDataChanged:
UpdateFormulas();
break;
- case FID_REFMODECHANGED:
+ case SfxHintId::ScRefModeChanged:
{
bool bRefMode = SC_MOD()->IsFormulaMode();
if (!bRefMode)
@@ -234,19 +234,19 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
break;
- case FID_KILLEDITVIEW:
- case FID_KILLEDITVIEW_NOPAINT:
+ case SfxHintId::ScKillEditView:
+ case SfxHintId::ScKillEditViewNoPaint:
if (!comphelper::LibreOfficeKit::isActive()
|| this == SfxViewShell::Current()
|| bInPrepareClose
|| bInDispose)
{
StopEditShell();
- KillEditView( nSlot == FID_KILLEDITVIEW_NOPAINT );
+ KillEditView( nSlot == SfxHintId::ScKillEditViewNoPaint );
}
break;
- case SFX_HINT_DOCCHANGED:
+ case SfxHintId::DocChanged:
{
ScDocument* pDoc = GetViewData().GetDocument();
if (!pDoc->HasTable( GetViewData().GetTabNo() ))
@@ -256,28 +256,28 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
break;
- case SC_HINT_DRWLAYER_NEW:
+ case SfxHintId::ScDrawLayerNew:
MakeDrawView(TRISTATE_INDET);
break;
- case SC_HINT_DOC_SAVED:
+ case SfxHintId::ScDocSaved:
{
// beim "Save as" kann ein vorher schreibgeschuetztes Dokument
// bearbeitbar werden, deshalb die Layer-Locks neu (#39884#)
// (Invalidate etc. passiert schon vom Sfx her)
- // bei SID_EDITDOC kommt kein SFX_HINT_TITLECHANGED, darum
+ // bei SID_EDITDOC kommt kein SfxHintId::TitleChanged, darum
// der eigene Hint aus DoSaveCompleted
- //! was ist mit SFX_HINT_SAVECOMPLETED ?
+ //! was ist mit SfxHintId::SAVECOMPLETED ?
UpdateLayerLocks();
// Design-Modus bei jedem Speichern anzupassen, waere zuviel
// (beim Speichern unter gleichem Namen soll er unveraendert bleiben)
- // Darum nur bei SFX_HINT_MODECHANGED (vom ViewFrame)
+ // Darum nur bei SfxHintId::ModeChanged (vom ViewFrame)
}
break;
- case SFX_HINT_MODECHANGED:
+ case SfxHintId::ModeChanged:
// Da man sich nicht mehr darauf verlassen kann, woher
// dieser Hint kommt, den Design-Modus immer dann umschalten, wenn der
// ReadOnly-Status sich wirklich geaendert hat:
@@ -294,11 +294,11 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
break;
- case SC_HINT_SHOWRANGEFINDER:
+ case SfxHintId::ScShowRangeFinder:
PaintRangeFinder(-1);
break;
- case SC_HINT_FORCESETTAB:
+ case SfxHintId::ScForceSetTab:
SetTabNo( GetViewData().GetTabNo(), true );
break;
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index f06d7d3bde98..29072585e656 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -360,7 +360,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
{
pDlg->Execute();
rBindings.Invalidate( nSlot );
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) ); // Navigator
rReq.Done();
}
}
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index c6111917c6ec..b5ead95f4a98 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1188,7 +1188,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
IMPL_LINK( ScViewData, EditEngineHdl, EditStatus&, rStatus, void )
{
EditStatusFlags nStatus = rStatus.GetStatusWord();
- if (nStatus & (EditStatusFlags::HSCROLL | EditStatusFlags::TEXTHEIGHTCHANGED | EditStatusFlags::TEXTWIDTHCHANGED | EditStatusFlags::CURSOROUT))
+ if (nStatus & (EditStatusFlags::HSCROLL | EditStatusFlags::TextHeightChanged | EditStatusFlags::TEXTWIDTHCHANGED | EditStatusFlags::CURSOROUT))
{
EditGrowY();
EditGrowX();
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index b790b7d16008..fb1e85918d3b 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2142,7 +2142,7 @@ void ScViewFunc::InsertTables(std::vector<OUString>& aNames, SCTAB nTab,
SetTabNo( nTab, true );
pDocSh->PostPaintExtras();
pDocSh->SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
}
}
@@ -2168,7 +2168,7 @@ bool ScViewFunc::AppendTable( const OUString& rName, bool bRecord )
SetTabNo( nTab, true );
pDocSh->PostPaintExtras();
pDocSh->SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
return true;
}
else
@@ -2227,9 +2227,9 @@ void ScViewFunc::DeleteTables( const SCTAB nTab, SCTAB nSheets )
pDocSh->SetDocumentModified();
SfxApplication* pSfxApp = SfxGetpApp(); // Navigator
- pSfxApp->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
- pSfxApp->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
- pSfxApp->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
}
}
@@ -2349,9 +2349,9 @@ bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, bool bRecord )
pDocSh->SetDocumentModified();
SfxApplication* pSfxApp = SfxGetpApp(); // Navigator
- pSfxApp->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
- pSfxApp->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
- pSfxApp->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
}
else
{
@@ -2547,8 +2547,8 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
PaintPartFlags::Grid | PaintPartFlags::Top | PaintPartFlags::Left | PaintPartFlags::Extras );
SfxApplication* pSfxApp = SfxGetpApp();
- pSfxApp->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
- pSfxApp->Broadcast( SfxHint( SC_HINT_AREAS_CHANGED ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
+ pSfxApp->Broadcast( SfxHint( SfxHintId::ScAreasChanged ) );
pDocSh->PostPaintExtras();
pDocSh->PostPaintGridAll();
@@ -2774,7 +2774,7 @@ void ScViewFunc::MoveTable(
TheTabs.clear();
pDestShell->SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
}
else
{
@@ -2929,7 +2929,7 @@ void ScViewFunc::ShowTable( const std::vector<OUString>& rNames )
{
rDoc.SetVisible( nPos, true );
SetTabNo( nPos, true );
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
if (!bFound)
bFound = true;
if (bUndo)
@@ -2989,7 +2989,7 @@ void ScViewFunc::HideTable( const ScMarkData& rMark )
}
// Update views
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
pDocSh->PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PaintPartFlags::Extras);
pDocSh->SetDocumentModified();
}
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index ef317d7389ae..ee69a1488ce8 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1731,7 +1731,7 @@ void ScViewFunc::DeleteMulti( bool bRows )
nCurX = static_cast<SCCOL>(aSpans[0].mnStart);
SetCursor( nCurX, nCurY );
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
}
// delete contents
@@ -2698,7 +2698,7 @@ bool ScViewFunc::InsertName( const OUString& rName, const OUString& rSymbol,
rDoc.CompileHybridFormula();
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreasChanged ) );
}
delete pNewEntry; // if it wasn't inserted
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 2d6bafeba7d6..8b8c4461cb5f 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -597,7 +597,7 @@ void ScXMLSourceDlg::OkPressed()
// Don't forget to broadcast the change.
SfxObjectShell* pShell = mpDoc->GetDocumentShell();
- pShell->Broadcast(SfxHint(FID_DATACHANGED));
+ pShell->Broadcast(SfxHint(SfxHintId::ScDataChanged));
// Repaint the grid to force repaint the cell values.
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();