summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx55
-rw-r--r--basctl/source/basicide/baside2b.cxx14
-rw-r--r--basctl/source/basicide/basidesh.cxx20
-rw-r--r--basic/source/basmgr/basicmanagerrepository.cxx2
-rw-r--r--basic/source/basmgr/basmgr.cxx2
-rw-r--r--basic/source/classes/sb.cxx8
-rw-r--r--basic/source/classes/sbunoobj.cxx12
-rw-r--r--basic/source/classes/sbxmod.cxx30
-rw-r--r--basic/source/runtime/methods.cxx2
-rw-r--r--basic/source/runtime/runtime.cxx24
-rw-r--r--basic/source/runtime/stdobj.cxx8
-rw-r--r--basic/source/runtime/stdobj1.cxx12
-rw-r--r--basic/source/sbx/sbxcoll.cxx6
-rw-r--r--basic/source/sbx/sbxexec.cxx2
-rw-r--r--basic/source/sbx/sbxobj.cxx14
-rw-r--r--basic/source/sbx/sbxvalue.cxx14
-rw-r--r--basic/source/sbx/sbxvar.cxx20
-rw-r--r--desktop/source/deployment/gui/license_dialog.cxx6
-rw-r--r--editeng/source/editeng/editeng.cxx2
-rw-r--r--editeng/source/editeng/impedit3.cxx4
-rw-r--r--editeng/source/editeng/impedit5.cxx31
-rw-r--r--editeng/source/uno/unoedhlp.cxx28
-rw-r--r--forms/source/richtext/richtextimplcontrol.cxx4
-rw-r--r--include/basic/sbdef.hxx3
-rw-r--r--include/basic/sbmeth.hxx2
-rw-r--r--include/basic/sbx.hxx4
-rw-r--r--include/basic/sbxdef.hxx8
-rw-r--r--include/basic/sbxvar.hxx5
-rw-r--r--include/editeng/AccessibleStaticTextBase.hxx12
-rw-r--r--include/editeng/editdata.hxx2
-rw-r--r--include/editeng/editstat.hxx2
-rw-r--r--include/editeng/unoedhlp.hxx11
-rw-r--r--include/svl/hint.hxx118
-rw-r--r--include/svl/style.hxx33
-rw-r--r--include/svx/AccessibleTextHelper.hxx16
-rw-r--r--include/vcl/textdata.hxx20
-rw-r--r--reportdesign/source/core/sdr/UndoEnv.cxx2
-rw-r--r--reportdesign/source/ui/misc/ColorListener.cxx2
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx2
-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
-rw-r--r--scripting/source/basprov/basscript.cxx2
-rw-r--r--sd/source/core/drawdoc3.cxx2
-rw-r--r--sd/source/core/sdpage.cxx6
-rw-r--r--sd/source/core/stlpool.cxx6
-rw-r--r--sd/source/core/stlsheet.cxx16
-rw-r--r--sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx6
-rw-r--r--sd/source/ui/app/sdmod.cxx2
-rw-r--r--sd/source/ui/app/sdxfer.cxx2
-rw-r--r--sd/source/ui/dlg/docprev.cxx2
-rw-r--r--sd/source/ui/dlg/unchss.cxx8
-rw-r--r--sd/source/ui/docshell/docshell.cxx4
-rw-r--r--sd/source/ui/framework/tools/FrameworkHelper.cxx2
-rw-r--r--sd/source/ui/func/fupage.cxx4
-rw-r--r--sd/source/ui/func/fuprobjs.cxx2
-rw-r--r--sd/source/ui/func/futempl.cxx8
-rw-r--r--sd/source/ui/slidesorter/controller/SlsListener.cxx11
-rw-r--r--sd/source/ui/slidesorter/controller/SlsTransferableData.cxx2
-rw-r--r--sd/source/ui/tools/EventMultiplexer.cxx2
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx2
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx2
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx2
-rw-r--r--sd/source/ui/view/FormShellManager.cxx2
-rw-r--r--sd/source/ui/view/drawview.cxx10
-rw-r--r--sd/source/ui/view/drviewsa.cxx2
-rw-r--r--sd/source/ui/view/viewoverlaymanager.cxx2
-rw-r--r--sfx2/source/appl/app.cxx2
-rw-r--r--sfx2/source/appl/appbaslib.cxx2
-rw-r--r--sfx2/source/appl/appcfg.cxx2
-rw-r--r--sfx2/source/appl/appinit.cxx2
-rw-r--r--sfx2/source/control/bindings.cxx6
-rw-r--r--sfx2/source/control/request.cxx2
-rw-r--r--sfx2/source/dialog/basedlgs.cxx14
-rw-r--r--sfx2/source/dialog/templdlg.cxx11
-rw-r--r--sfx2/source/doc/objmisc.cxx20
-rw-r--r--sfx2/source/doc/objserv.cxx2
-rw-r--r--sfx2/source/doc/objstor.cxx8
-rw-r--r--sfx2/source/doc/objxtor.cxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx6
-rw-r--r--sfx2/source/notify/openurlhint.cxx1
-rw-r--r--sfx2/source/view/frame.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx22
-rw-r--r--sfx2/source/view/viewfrm2.cxx4
-rw-r--r--sfx2/source/view/viewprn.cxx2
-rw-r--r--starmath/inc/format.hxx5
-rw-r--r--starmath/source/cfgitem.cxx2
-rw-r--r--starmath/source/document.cxx12
-rw-r--r--starmath/source/view.cxx4
-rw-r--r--svl/source/items/itempool.cxx2
-rw-r--r--svl/source/items/style.cxx29
-rw-r--r--svl/source/notify/SfxBroadcaster.cxx2
-rw-r--r--svl/source/notify/broadcast.cxx2
-rw-r--r--svtools/source/config/accessibilityoptions.cxx2
-rw-r--r--svtools/source/config/extcolorcfg.cxx6
-rw-r--r--svx/source/accessibility/AccessibleTextHelper.cxx82
-rw-r--r--svx/source/accessibility/GraphCtlAccessibleContext.cxx2
-rw-r--r--svx/source/dialog/svxruler.cxx2
-rw-r--r--svx/source/form/fmundo.cxx7
-rw-r--r--svx/source/form/navigatortreemodel.cxx5
-rw-r--r--svx/source/sdr/properties/attributeproperties.cxx13
-rw-r--r--svx/source/sdr/properties/customshapeproperties.cxx9
-rw-r--r--svx/source/sdr/properties/textproperties.cxx8
-rw-r--r--svx/source/svdraw/svdoattr.cxx2
-rw-r--r--svx/source/svdraw/svdoedge.cxx10
-rw-r--r--svx/source/svdraw/svdotext.cxx2
-rw-r--r--svx/source/svdraw/svdpage.cxx5
-rw-r--r--svx/source/svdraw/svdpntv.cxx2
-rw-r--r--svx/source/table/svdotable.cxx2
-rw-r--r--svx/source/unodraw/unoshtxt.cxx4
-rw-r--r--sw/inc/doc.hxx2
-rw-r--r--sw/inc/section.hxx2
-rw-r--r--sw/inc/swhints.hxx29
-rw-r--r--sw/source/core/doc/DocumentDrawModelManager.cxx4
-rw-r--r--sw/source/core/doc/docdesc.cxx6
-rw-r--r--sw/source/core/doc/docdraw.cxx2
-rw-r--r--sw/source/core/doc/docfmt.cxx16
-rw-r--r--sw/source/core/doc/docnum.cxx6
-rw-r--r--sw/source/core/docnode/ndtbl.cxx4
-rw-r--r--sw/source/core/layout/frmtool.cxx2
-rw-r--r--sw/source/core/layout/pagechg.cxx2
-rw-r--r--sw/source/core/layout/sectfrm.cxx2
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx4
-rw-r--r--sw/source/core/unocore/unostyle.cxx6
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx4
-rw-r--r--sw/source/uibase/app/apphdl.cxx2
-rw-r--r--sw/source/uibase/app/docsh2.cxx14
-rw-r--r--sw/source/uibase/app/docst.cxx4
-rw-r--r--sw/source/uibase/app/docstyle.cxx14
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx13
-rw-r--r--sw/source/uibase/docvw/srcedtw.cxx9
-rw-r--r--sw/source/uibase/inc/redlndlg.hxx2
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx4
-rw-r--r--sw/source/uibase/uiview/srcview.cxx4
-rw-r--r--sw/source/uibase/uiview/view.cxx14
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx2
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx2
-rw-r--r--sw/source/uibase/utlui/navipi.cxx2
-rw-r--r--vcl/source/edit/textdata.cxx4
-rw-r--r--vcl/source/edit/texteng.cxx16
-rw-r--r--vcl/source/edit/textview.cxx16
-rw-r--r--vcl/source/edit/vclmedit.cxx24
251 files changed, 1000 insertions, 1093 deletions
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index 6964ea409d65..c7180e8e13c4 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -1533,22 +1533,22 @@ void Document::Notify(::SfxBroadcaster &, ::SfxHint const & rHint)
::TextHint const & rTextHint = *pTextHint;
switch (rTextHint.GetId())
{
- case TEXT_HINT_PARAINSERTED:
- case TEXT_HINT_PARAREMOVED:
- // TEXT_HINT_PARAINSERTED and TEXT_HINT_PARAREMOVED are sent at
+ case SfxHintId::TextParaInserted:
+ case SfxHintId::TextParaRemoved:
+ // SfxHintId::TextParaInserted and SfxHintId::TextParaRemoved are sent at
// "unsafe" times (when the text engine has not yet re-formatted its
// content), so that for example calling ::TextEngine::GetTextHeight
- // from within the code that handles TEXT_HINT_PARAINSERTED causes
+ // from within the code that handles SfxHintId::TextParaInserted causes
// trouble within the text engine. Therefore, these hints are just
// buffered until a following ::TextEngine::FormatDoc causes a
- // TEXT_HINT_TEXTFORMATTED to come in:
- case TEXT_HINT_FORMATPARA:
+ // SfxHintId::TextFormatted to come in:
+ case SfxHintId::TextFormatPara:
// ::TextEngine::FormatDoc sends a sequence of
- // TEXT_HINT_FORMATPARAs, followed by an optional
- // TEXT_HINT_TEXTHEIGHTCHANGED, followed in all cases by one
- // TEXT_HINT_TEXTFORMATTED. Only the TEXT_HINT_FORMATPARAs contain
+ // SfxHintId::TextFormatParas, followed by an optional
+ // SfxHintId::TextHeightChanged, followed in all cases by one
+ // SfxHintId::TextFormatted. Only the SfxHintId::TextFormatParas contain
// the numbers of the affected paragraphs, but they are sent
- // before the changes are applied. Therefore, TEXT_HINT_FORMATPARAs
+ // before the changes are applied. Therefore, SfxHintId::TextFormatParas
// are just buffered until another hint comes in:
{
::osl::MutexGuard aInternalGuard(GetMutex());
@@ -1558,9 +1558,9 @@ void Document::Notify(::SfxBroadcaster &, ::SfxHint const & rHint)
m_aParagraphNotifications.push(rTextHint);
break;
}
- case TEXT_HINT_TEXTFORMATTED:
- case TEXT_HINT_TEXTHEIGHTCHANGED:
- case TEXT_HINT_MODIFIED:
+ case SfxHintId::TextFormatted:
+ case SfxHintId::TextHeightChanged:
+ case SfxHintId::TextModified:
{
::osl::MutexGuard aInternalGuard(GetMutex());
if (!isAlive())
@@ -1568,7 +1568,7 @@ void Document::Notify(::SfxBroadcaster &, ::SfxHint const & rHint)
handleParagraphNotifications();
break;
}
- case TEXT_HINT_VIEWSCROLLED:
+ case SfxHintId::TextViewScrolled:
{
::osl::MutexGuard aInternalGuard(GetMutex());
if (!isAlive())
@@ -1594,8 +1594,8 @@ void Document::Notify(::SfxBroadcaster &, ::SfxHint const & rHint)
}
break;
}
- case TEXT_HINT_VIEWSELECTIONCHANGED:
- case TEXT_HINT_VIEWCARETCHANGED:
+ case SfxHintId::TextViewSelectionChanged:
+ case SfxHintId::TextViewCaretChanged:
{
::osl::MutexGuard aInternalGuard(GetMutex());
if (!isAlive())
@@ -1607,20 +1607,21 @@ void Document::Notify(::SfxBroadcaster &, ::SfxHint const & rHint)
}
else
{
- // TEXT_HINT_VIEWSELECTIONCHANGED is sometimes sent at
+ // SfxHintId::TextViewSelectionChanged is sometimes sent at
// "unsafe" times (when the text engine has not yet re-
// formatted its content), so that for example calling
// ::TextEngine::GetTextHeight from within the code that
- // handles a previous TEXT_HINT_PARAINSERTED causes
+ // handles a previous SfxHintId::TextParaInserted causes
// trouble within the text engine. Therefore, these
// hints are just buffered (along with
- // TEXT_HINT_PARAINSERTED/REMOVED/FORMATPARA) until a
+ // SfxHintId::TextParaInserted/REMOVED/FORMATPARA) until a
// following ::TextEngine::FormatDoc causes a
- // TEXT_HINT_TEXTFORMATTED to come in:
+ // SfxHintId::TextFormatted to come in:
m_bSelectionChangedNotification = true;
}
break;
}
+ default: break;
}
}
}
@@ -1875,10 +1876,10 @@ void Document::handleParagraphNotifications()
m_aParagraphNotifications.pop();
switch (aHint.GetId())
{
- case TEXT_HINT_PARAINSERTED:
+ case SfxHintId::TextParaInserted:
{
::sal_uLong n = aHint.GetValue();
- assert(n <= m_xParagraphs->size() && "bad TEXT_HINT_PARAINSERTED event");
+ assert(n <= m_xParagraphs->size() && "bad SfxHintId::TextParaInserted event");
// Save the values of old iterators (the iterators themselves
// will get invalidated), and adjust the old values so that they
@@ -1926,7 +1927,7 @@ void Document::handleParagraphNotifications()
m_xParagraphs->begin() + nOldVisibleEnd, aIns);
break;
}
- case TEXT_HINT_PARAREMOVED:
+ case SfxHintId::TextParaRemoved:
{
::sal_uLong n = aHint.GetValue();
if (n == TEXT_PARA_ALL)
@@ -1951,7 +1952,7 @@ void Document::handleParagraphNotifications()
}
else
{
- assert(n < m_xParagraphs->size() && "Bad TEXT_HINT_PARAREMOVED event");
+ assert(n < m_xParagraphs->size() && "Bad SfxHintId::TextParaRemoved event");
Paragraphs::iterator aIt(m_xParagraphs->begin() + n);
// numeric overflow cannot occur
@@ -2040,10 +2041,10 @@ void Document::handleParagraphNotifications()
}
break;
}
- case TEXT_HINT_FORMATPARA:
+ case SfxHintId::TextFormatPara:
{
::sal_uLong n = aHint.GetValue();
- assert(n < m_xParagraphs->size() && "Bad TEXT_HINT_FORMATPARA event");
+ assert(n < m_xParagraphs->size() && "Bad SfxHintId::TextFormatPara event");
(*m_xParagraphs)[static_cast< Paragraphs::size_type >(n)].
changeHeight(static_cast< ::sal_Int32 >(
@@ -2208,7 +2209,7 @@ void Document::handleSelectionChangeNotification()
::TextSelection const & rSelection = m_rView.GetSelection();
assert(rSelection.GetStart().GetPara() < m_xParagraphs->size() &&
rSelection.GetEnd().GetPara() < m_xParagraphs->size() &&
- "bad TEXT_HINT_VIEWSELECTIONCHANGED event");
+ "bad SfxHintId::TextViewSelectionChanged event");
::sal_Int32 nNewFirstPara
= static_cast< ::sal_Int32 >(rSelection.GetStart().GetPara());
::sal_Int32 nNewFirstPos = rSelection.GetStart().GetIndex();
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 33fbf526b93d..2ae1b955d8d8 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1038,7 +1038,7 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
if (TextHint const* pTextHint = dynamic_cast<TextHint const*>(&rHint))
{
TextHint const& rTextHint = *pTextHint;
- if( rTextHint.GetId() == TEXT_HINT_VIEWSCROLLED )
+ if( rTextHint.GetId() == SfxHintId::TextViewScrolled )
{
if ( rModulWindow.GetHScrollBar() )
rModulWindow.GetHScrollBar()->SetThumbPos( pEditView->GetStartDocPos().X() );
@@ -1048,7 +1048,7 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
rModulWindow.GetLineNumberWindow().DoScroll
( rModulWindow.GetLineNumberWindow().GetCurYOffset() - pEditView->GetStartDocPos().Y() );
}
- else if( rTextHint.GetId() == TEXT_HINT_TEXTHEIGHTCHANGED )
+ else if( rTextHint.GetId() == SfxHintId::TextHeightChanged )
{
if ( pEditView->GetStartDocPos().Y() )
{
@@ -1062,7 +1062,7 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
SetScrollBarRanges();
}
- else if( rTextHint.GetId() == TEXT_HINT_TEXTFORMATTED )
+ else if( rTextHint.GetId() == SfxHintId::TextFormatted )
{
if ( rModulWindow.GetHScrollBar() )
{
@@ -1079,20 +1079,20 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
if ( nCurTextWidth != nPrevTextWidth )
SetScrollBarRanges();
}
- else if( rTextHint.GetId() == TEXT_HINT_PARAINSERTED )
+ else if( rTextHint.GetId() == SfxHintId::TextParaInserted )
{
ParagraphInsertedDeleted( rTextHint.GetValue(), true );
DoDelayedSyntaxHighlight( rTextHint.GetValue() );
}
- else if( rTextHint.GetId() == TEXT_HINT_PARAREMOVED )
+ else if( rTextHint.GetId() == SfxHintId::TextParaRemoved )
{
ParagraphInsertedDeleted( rTextHint.GetValue(), false );
}
- else if( rTextHint.GetId() == TEXT_HINT_PARACONTENTCHANGED )
+ else if( rTextHint.GetId() == SfxHintId::TextParaContentChanged )
{
DoDelayedSyntaxHighlight( rTextHint.GetValue() );
}
- else if( rTextHint.GetId() == TEXT_HINT_VIEWSELECTIONCHANGED )
+ else if( rTextHint.GetId() == SfxHintId::TextViewSelectionChanged )
{
if (SfxBindings* pBindings = GetBindingsPtr())
{
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 762b90b43b0a..90e093ae885e 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -475,21 +475,17 @@ void Shell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if (GetShell())
{
- switch (rHint.GetId())
+ if (rHint.GetId() == SfxHintId::Dying)
{
- case SFX_HINT_DYING:
- {
- EndListening( rBC, true /* log off all */ );
- aObjectCatalog->UpdateEntries();
- }
- break;
+ EndListening( rBC, true /* log off all */ );
+ aObjectCatalog->UpdateEntries();
}
if (SbxHint const* pSbxHint = dynamic_cast<SbxHint const*>(&rHint))
{
- const sal_uInt32 nHintId = pSbxHint->GetId();
- if ( ( nHintId == SBX_HINT_BASICSTART ) ||
- ( nHintId == SBX_HINT_BASICSTOP ) )
+ const SfxHintId nHintId = pSbxHint->GetId();
+ if ( ( nHintId == SfxHintId::BasicStart ) ||
+ ( nHintId == SfxHintId::BasicStop ) )
{
if (SfxBindings* pBindings = GetBindingsPtr())
{
@@ -515,7 +511,7 @@ void Shell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
pBindings->Update( SID_BASICLOAD );
}
- if ( nHintId == SBX_HINT_BASICSTOP )
+ if ( nHintId == SfxHintId::BasicStop )
{
// not only at error/break or explicit stoppage,
// if the update is turned off due to a programming bug
@@ -533,7 +529,7 @@ void Shell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
{
BaseWindow* pWin = it->second;
- if ( nHintId == SBX_HINT_BASICSTART )
+ if ( nHintId == SfxHintId::BasicStart )
pWin->BasicStarted();
else
pWin->BasicStopped();
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index cb09047ec184..03d730985b2c 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -577,7 +577,7 @@ namespace basic
void ImplRepository::Notify( SfxBroadcaster& _rBC, const SfxHint& _rHint )
{
- if ( _rHint.GetId() != SFX_HINT_DYING )
+ if ( _rHint.GetId() != SfxHintId::Dying )
// not interested in
return;
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index f7ee7b1e6af0..236c14e853b9 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -849,7 +849,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
BasicManager::~BasicManager()
{
// Notify listener if something needs to be saved
- Broadcast( SfxHint( SFX_HINT_DYING) );
+ Broadcast( SfxHint( SfxHintId::Dying) );
}
void BasicManager::LegacyDeleteBasicManager( BasicManager*& _rpManager )
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index d03eaa35c34b..b991514a4825 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -2061,10 +2061,10 @@ void BasicCollection::Notify( SfxBroadcaster& rCst, const SfxHint& rHint )
const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint);
if( p )
{
- const sal_uInt32 nId = p->GetId();
- bool bRead = nId == SBX_HINT_DATAWANTED;
- bool bWrite = nId == SBX_HINT_DATACHANGED;
- bool bRequestInfo = nId == SBX_HINT_INFOWANTED;
+ const SfxHintId nId = p->GetId();
+ bool bRead = nId == SfxHintId::BasicDataWanted;
+ bool bWrite = nId == SfxHintId::BasicDataChanged;
+ bool bRequestInfo = nId == SfxHintId::BasicInfoWanted;
SbxVariable* pVar = p->GetVar();
SbxArray* pArg = pVar->GetParameters();
OUString aVarName( pVar->GetName() );
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index e87d267823fc..18c000924ae1 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -1999,7 +1999,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( pProp )
{
bool bInvocation = pProp->isInvocationBased();
- if( pHint->GetId() == SBX_HINT_DATAWANTED )
+ if( pHint->GetId() == SfxHintId::BasicDataWanted )
{
// Test-Properties
sal_Int32 nId = pProp->nId;
@@ -2102,7 +2102,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
}
}
- else if( pHint->GetId() == SBX_HINT_DATACHANGED )
+ else if( pHint->GetId() == SfxHintId::BasicDataChanged )
{
if( !bInvocation && mxUnoAccess.is() )
{
@@ -2160,7 +2160,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
else if( pMeth )
{
bool bInvocation = pMeth->isInvocationBased();
- if( pHint->GetId() == SBX_HINT_DATAWANTED )
+ if( pHint->GetId() == SfxHintId::BasicDataWanted )
{
// number of Parameter -1 because of Param0 == this
sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0;
@@ -3560,7 +3560,7 @@ void SbUnoService::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SbxVariable* pVar = pHint->GetVar();
SbxArray* pParams = pVar->GetParameters();
SbUnoServiceCtor* pUnoCtor = dynamic_cast<SbUnoServiceCtor*>( pVar );
- if( pUnoCtor && pHint->GetId() == SBX_HINT_DATAWANTED )
+ if( pUnoCtor && pHint->GetId() == SfxHintId::BasicDataWanted )
{
// Parameter count -1 because of Param0 == this
sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0;
@@ -4912,7 +4912,7 @@ void SbUnoStructRefObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
StructFieldInfo::iterator it = maFields.find( pProp->GetName() );
// handle get/set of members of struct
- if( pHint->GetId() == SBX_HINT_DATAWANTED )
+ if( pHint->GetId() == SfxHintId::BasicDataWanted )
{
// Test-Properties
sal_Int32 nId = pProp->nId;
@@ -4957,7 +4957,7 @@ void SbUnoStructRefObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
else
StarBASIC::Error( ERRCODE_BASIC_PROPERTY_NOT_FOUND );
}
- else if( pHint->GetId() == SBX_HINT_DATACHANGED )
+ else if( pHint->GetId() == SfxHintId::BasicDataChanged )
{
if ( it != maFields.end() )
{
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 5ffda81153f0..972c47bb7c5b 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -318,7 +318,7 @@ DocObjectWrapper::getValue( const OUString& aPropertyName ) throw (UnknownProper
SbxVariable* pProp = pProperty.get();
if ( pProp->GetType() == SbxEMPTY )
- pProperty->Broadcast( SBX_HINT_DATAWANTED );
+ pProperty->Broadcast( SfxHintId::BasicDataWanted );
Any aRet = sbxToUnoValue( pProp );
return aRet;
@@ -718,7 +718,7 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( pProcProperty )
{
- if( pHint->GetId() == SBX_HINT_DATAWANTED )
+ if( pHint->GetId() == SfxHintId::BasicDataWanted )
{
OUString aProcName = "Property Get "
+ pProcProperty->GetName();
@@ -753,7 +753,7 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
pVar->Put( aVals );
}
}
- else if( pHint->GetId() == SBX_HINT_DATACHANGED )
+ else if( pHint->GetId() == SfxHintId::BasicDataChanged )
{
SbxVariable* pMethVar = nullptr;
@@ -794,7 +794,7 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
else if( pMeth )
{
- if( pHint->GetId() == SBX_HINT_DATAWANTED )
+ if( pHint->GetId() == SfxHintId::BasicDataWanted )
{
if( pMeth->bInvalid && !Compile() )
{
@@ -817,8 +817,8 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
// side effects when using name as variable implicitly
bool bForwardToSbxObject = true;
- const sal_uInt32 nId = pHint->GetId();
- if( (nId == SBX_HINT_DATAWANTED || nId == SBX_HINT_DATACHANGED) &&
+ const SfxHintId nId = pHint->GetId();
+ if( (nId == SfxHintId::BasicDataWanted || nId == SfxHintId::BasicDataChanged) &&
pVar->GetName().equalsIgnoreAsciiCase( "name" ) )
{
bForwardToSbxObject = false;
@@ -929,7 +929,7 @@ void SbModule::SetSource32( const OUString& r )
// Broadcast of a hint to all Basics
-static void SendHint_( SbxObject* pObj, sal_uInt32 nId, SbMethod* p )
+static void SendHint_( SbxObject* pObj, SfxHintId nId, SbMethod* p )
{
// Self a BASIC?
if( dynamic_cast<const StarBASIC *>(pObj) != nullptr && pObj->IsBroadcaster() )
@@ -944,7 +944,7 @@ static void SendHint_( SbxObject* pObj, sal_uInt32 nId, SbMethod* p )
}
}
-static void SendHint( SbxObject* pObj, sal_uInt32 nId, SbMethod* p )
+static void SendHint( SbxObject* pObj, SfxHintId nId, SbMethod* p )
{
while( pObj->GetParent() )
pObj = pObj->GetParent();
@@ -1120,7 +1120,7 @@ void SbModule::Run( SbMethod* pMeth )
{
if( bDelInst )
{
- SendHint( GetParent(), SBX_HINT_BASICSTART, pMeth );
+ SendHint( GetParent(), SfxHintId::BasicStart, pMeth );
// 1996-10-16: #31460 New concept for StepInto/Over/Out
// For an explanation see runtime.cxx at SbiInstance::CalcBreakCallLevel()
@@ -1186,7 +1186,7 @@ void SbModule::Run( SbMethod* pMeth )
// #i30690
SolarMutexGuard aSolarGuard;
- SendHint( GetParent(), SBX_HINT_BASICSTOP, pMeth );
+ SendHint( GetParent(), SfxHintId::BasicStop, pMeth );
GlobalRunDeInit();
@@ -1847,7 +1847,7 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH
{
bDone = true;
- if( pHint->GetId() == SBX_HINT_DATAWANTED )
+ if( pHint->GetId() == SfxHintId::BasicDataWanted )
{
OUString aProcName = "Property Get "
+ pProcProperty->GetName();
@@ -1882,7 +1882,7 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH
pVar->Put( aVals );
}
}
- else if( pHint->GetId() == SBX_HINT_DATACHANGED )
+ else if( pHint->GetId() == SfxHintId::BasicDataChanged )
{
SbxVariable* pMeth = nullptr;
@@ -2101,16 +2101,16 @@ ErrCode SbMethod::Call( SbxValue* pRet, SbxVariable* pCaller )
// #100883 Own Broadcast for SbMethod
-void SbMethod::Broadcast( sal_uInt32 nHintId )
+void SbMethod::Broadcast( SfxHintId nHintId )
{
if( pCst && !IsSet( SbxFlagBits::NoBroadcast ) )
{
// Because the method could be called from outside, test here once again
// the authorisation
- if( nHintId & SBX_HINT_DATAWANTED )
+ if( nHintId == SfxHintId::BasicDataWanted )
if( !CanRead() )
return;
- if( nHintId & SBX_HINT_DATACHANGED )
+ if( nHintId == SfxHintId::BasicDataChanged )
if( !CanWrite() )
return;
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 1fa46b1123c6..a95cf5c9219a 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2610,7 +2610,7 @@ RTLFUNC(IsEmpty)
}
if ( pVar )
{
- pVar->Broadcast( SBX_HINT_DATAWANTED );
+ pVar->Broadcast( SfxHintId::BasicDataWanted );
rPar.Get( 0 )->PutBool( pVar->IsEmpty() );
}
else
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 98510c629d28..23d3f82d5955 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -1019,13 +1019,13 @@ void SbiRuntime::TOSMakeTemp()
SbxVariable* p = refExprStk->Get( nExprLvl - 1 );
if ( p->GetType() == SbxEMPTY )
{
- p->Broadcast( SBX_HINT_DATAWANTED );
+ p->Broadcast( SfxHintId::BasicDataWanted );
}
SbxVariable* pDflt = nullptr;
if ( bVBAEnabled && ( p->GetType() == SbxOBJECT || p->GetType() == SbxVARIANT ) && ((pDflt = getDefaultProp(p)) != nullptr) )
{
- pDflt->Broadcast( SBX_HINT_DATAWANTED );
+ pDflt->Broadcast( SfxHintId::BasicDataWanted );
// replacing new p on stack causes object pointed by
// pDft->pParent to be deleted, when p2->Compute() is
// called below pParent is accessed (but it's deleted)
@@ -1301,12 +1301,12 @@ void SbiRuntime::StepCompare( SbxOperator eOp )
SbxDataType p2Type = p2->GetType();
if ( p1Type == SbxEMPTY )
{
- p1->Broadcast( SBX_HINT_DATAWANTED );
+ p1->Broadcast( SfxHintId::BasicDataWanted );
p1Type = p1->GetType();
}
if ( p2Type == SbxEMPTY )
{
- p2->Broadcast( SBX_HINT_DATAWANTED );
+ p2->Broadcast( SfxHintId::BasicDataWanted );
p2Type = p2->GetType();
}
if ( p1Type == p2Type )
@@ -1322,13 +1322,13 @@ void SbiRuntime::StepCompare( SbxOperator eOp )
if ( pDflt )
{
p1 = pDflt;
- p1->Broadcast( SBX_HINT_DATAWANTED );
+ p1->Broadcast( SfxHintId::BasicDataWanted );
}
pDflt = getDefaultProp( p2.get() );
if ( pDflt )
{
p2 = pDflt;
- p2->Broadcast( SBX_HINT_DATAWANTED );
+ p2->Broadcast( SfxHintId::BasicDataWanted );
}
}
@@ -1543,12 +1543,12 @@ void SbiRuntime::StepIS()
SbxDataType eType2 = refVar2->GetType();
if ( eType1 == SbxEMPTY )
{
- refVar1->Broadcast( SBX_HINT_DATAWANTED );
+ refVar1->Broadcast( SfxHintId::BasicDataWanted );
eType1 = refVar1->GetType();
}
if ( eType2 == SbxEMPTY )
{
- refVar2->Broadcast( SBX_HINT_DATAWANTED );
+ refVar2->Broadcast( SfxHintId::BasicDataWanted );
eType2 = refVar2->GetType();
}
@@ -1568,7 +1568,7 @@ void SbiRuntime::StepIS()
void SbiRuntime::StepGET()
{
SbxVariable* p = GetTOS();
- p->Broadcast( SBX_HINT_DATAWANTED );
+ p->Broadcast( SfxHintId::BasicDataWanted );
}
// #67607 copy Uno-Structs
@@ -1672,7 +1672,7 @@ void SbiRuntime::StepPUT()
// aren't dealt with if the object is a member of some parent object
bool bObjAssign = false;
if ( refVar->GetType() == SbxEMPTY )
- refVar->Broadcast( SBX_HINT_DATAWANTED );
+ refVar->Broadcast( SfxHintId::BasicDataWanted );
if ( refVar->GetType() == SbxOBJECT )
{
if ( dynamic_cast<const SbxMethod *>(refVar.get()) != nullptr || ! refVar->GetParent() )
@@ -2806,7 +2806,7 @@ void SbiRuntime::StepARGN( sal_uInt32 nOp1 )
{
// named variables ( that are Any especially properties ) can be empty at this point and need a broadcast
if ( pVal->GetType() == SbxEMPTY )
- pVal->Broadcast( SBX_HINT_DATAWANTED );
+ pVal->Broadcast( SfxHintId::BasicDataWanted );
// evaluate methods and properties!
SbxVariable* pRes = new SbxVariable( *pVal );
pVal = pRes;
@@ -3862,7 +3862,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
SbxVariable* pDflt = getDefaultProp( pElem );
if ( pDflt )
{
- pDflt->Broadcast( SBX_HINT_DATAWANTED );
+ pDflt->Broadcast( SfxHintId::BasicDataWanted );
SbxBaseRef pDfltObj = pDflt->GetObject();
if( pDfltObj.Is() )
{
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index 115252c5b6a9..0eac637f8fba 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -824,15 +824,15 @@ void SbiStdObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
const sal_uInt16 nCallId = static_cast<sal_uInt16>(pVar->GetUserData());
if( nCallId )
{
- const sal_uInt32 t = pHint->GetId();
- if( t == SBX_HINT_INFOWANTED )
+ const SfxHintId t = pHint->GetId();
+ if( t == SfxHintId::BasicInfoWanted )
pVar->SetInfo( GetInfo( static_cast<short>(pVar->GetUserData()) ) );
else
{
bool bWrite = false;
- if( t == SBX_HINT_DATACHANGED )
+ if( t == SfxHintId::BasicDataChanged )
bWrite = true;
- if( t == SBX_HINT_DATAWANTED || bWrite )
+ if( t == SfxHintId::BasicDataWanted || bWrite )
{
RtlCall p = aMethods[ nCallId-1 ].pFunc;
SbxArrayRef rPar( pPar_ );
diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx
index a46520bbd544..3635a47e3bc4 100644
--- a/basic/source/runtime/stdobj1.cxx
+++ b/basic/source/runtime/stdobj1.cxx
@@ -134,7 +134,7 @@ void SbStdPicture::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( pHint )
{
- if( pHint->GetId() == SBX_HINT_INFOWANTED )
+ if( pHint->GetId() == SfxHintId::BasicInfoWanted )
{
SbxObject::Notify( rBC, rHint );
return;
@@ -143,7 +143,7 @@ void SbStdPicture::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SbxVariable* pVar = pHint->GetVar();
SbxArray* pPar_ = pVar->GetParameters();
const sal_uInt32 nWhich = pVar->GetUserData();
- bool bWrite = pHint->GetId() == SBX_HINT_DATACHANGED;
+ bool bWrite = pHint->GetId() == SfxHintId::BasicDataChanged;
// Propteries
switch( nWhich )
@@ -252,7 +252,7 @@ void SbStdFont::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( pHint )
{
- if( pHint->GetId() == SBX_HINT_INFOWANTED )
+ if( pHint->GetId() == SfxHintId::BasicInfoWanted )
{
SbxObject::Notify( rBC, rHint );
return;
@@ -261,7 +261,7 @@ void SbStdFont::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SbxVariable* pVar = pHint->GetVar();
SbxArray* pPar_ = pVar->GetParameters();
const sal_uInt32 nWhich = pVar->GetUserData();
- bool bWrite = pHint->GetId() == SBX_HINT_DATACHANGED;
+ bool bWrite = pHint->GetId() == SfxHintId::BasicDataChanged;
// Propteries
switch( nWhich )
@@ -407,7 +407,7 @@ void SbStdClipboard::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( pHint )
{
- if( pHint->GetId() == SBX_HINT_INFOWANTED )
+ if( pHint->GetId() == SfxHintId::BasicInfoWanted )
{
SbxObject::Notify( rBC, rHint );
return;
@@ -416,7 +416,7 @@ void SbStdClipboard::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SbxVariable* pVar = pHint->GetVar();
SbxArray* pPar_ = pVar->GetParameters();
const sal_uInt32 nWhich = pVar->GetUserData();
- bool bWrite = pHint->GetId() == SBX_HINT_DATACHANGED;
+ bool bWrite = pHint->GetId() == SfxHintId::BasicDataChanged;
// Methods
switch( nWhich )
diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx
index 8971c866619a..3fa3b690d19b 100644
--- a/basic/source/sbx/sbxcoll.cxx
+++ b/basic/source/sbx/sbxcoll.cxx
@@ -117,9 +117,9 @@ void SbxCollection::Notify( SfxBroadcaster& rCst, const SfxHint& rHint )
const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint);
if( p )
{
- const sal_uInt32 nId = p->GetId();
- bool bRead = ( nId == SBX_HINT_DATAWANTED );
- bool bWrite = ( nId == SBX_HINT_DATACHANGED );
+ const SfxHintId nId = p->GetId();
+ bool bRead = ( nId == SfxHintId::BasicDataWanted );
+ bool bWrite = ( nId == SfxHintId::BasicDataChanged );
SbxVariable* pVar = p->GetVar();
SbxArray* pArg = pVar->GetParameters();
if( bRead || bWrite )
diff --git a/basic/source/sbx/sbxexec.cxx b/basic/source/sbx/sbxexec.cxx
index 47775b02a554..24afd3388d0b 100644
--- a/basic/source/sbx/sbxexec.cxx
+++ b/basic/source/sbx/sbxexec.cxx
@@ -261,7 +261,7 @@ static SbxVariableRef Assign( SbxObject* pObj, SbxObject* pGbl, const sal_Unicod
}
else
// Simple call: once activating
- refVar->Broadcast( SBX_HINT_DATAWANTED );
+ refVar->Broadcast( SfxHintId::BasicDataWanted );
}
*ppBuf = p;
return refVar;
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index e4e7e3827493..098a580a9869 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -136,9 +136,9 @@ void SbxObject::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint);
if( p )
{
- const sal_uInt32 nId = p->GetId();
- bool bRead = ( nId == SBX_HINT_DATAWANTED );
- bool bWrite = ( nId == SBX_HINT_DATACHANGED );
+ const SfxHintId nId = p->GetId();
+ bool bRead = ( nId == SfxHintId::BasicDataWanted );
+ bool bWrite = ( nId == SfxHintId::BasicDataChanged );
SbxVariable* pVar = p->GetVar();
if( bRead || bWrite )
{
@@ -295,7 +295,7 @@ bool SbxObject::Call( const OUString& rName, SbxArray* pParam )
{
pMeth->SetParameters( pParam );
}
- pMeth->Broadcast( SBX_HINT_DATAWANTED );
+ pMeth->Broadcast( SfxHintId::BasicDataWanted );
pMeth->SetParameters( nullptr );
return true;
}
@@ -413,7 +413,7 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp
SetModified( true );
// The object listen always
StartListening( pVar->GetBroadcaster(), true );
- Broadcast( SBX_HINT_OBJECTCHANGED );
+ Broadcast( SfxHintId::BasicObjectChanged );
return pVar;
}
@@ -457,7 +457,7 @@ void SbxObject::Insert( SbxVariable* pVar )
pVar->SetParent( this );
}
SetModified( true );
- Broadcast( SBX_HINT_OBJECTCHANGED );
+ Broadcast( SfxHintId::BasicObjectChanged );
#ifdef DBG_UTIL
static const char* pCls[] =
{ "DontCare","Array","Value","Variable","Method","Property","Object" };
@@ -557,7 +557,7 @@ void SbxObject::Remove( SbxVariable* pVar )
pVar_->SetParent( nullptr );
}
SetModified( true );
- Broadcast( SBX_HINT_OBJECTCHANGED );
+ Broadcast( SfxHintId::BasicObjectChanged );
}
}
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 1c9352368517..6ce2239206e1 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -59,7 +59,7 @@ SbxValue::SbxValue( const SbxValue& r )
}
else
{
- const_cast<SbxValue*>(&r)->Broadcast( SBX_HINT_DATAWANTED );
+ const_cast<SbxValue*>(&r)->Broadcast( SfxHintId::BasicDataWanted );
aData = r.aData;
// Copy pointer, increment references
switch( aData.eType )
@@ -133,7 +133,7 @@ SbxValue& SbxValue::operator=( const SbxValue& r )
SbxValue::~SbxValue()
{
- Broadcast( SBX_HINT_DYING );
+ Broadcast( SfxHintId::BasicDying );
SetFlag( SbxFlagBits::Write );
SbxValue::Clear();
}
@@ -182,7 +182,7 @@ void SbxValue::Clear()
// Dummy
-void SbxValue::Broadcast( sal_uInt32 )
+void SbxValue::Broadcast( SfxHintId )
{}
//////////////////////////// Readout data
@@ -284,7 +284,7 @@ bool SbxValue::Get( SbxValues& rRes ) const
p = TheRealValue( true );
if( p )
{
- p->Broadcast( SBX_HINT_DATAWANTED );
+ p->Broadcast( SfxHintId::BasicDataWanted );
switch( rRes.eType )
{
case SbxEMPTY:
@@ -519,7 +519,7 @@ bool SbxValue::Put( const SbxValues& rVal )
if( !IsError() )
{
p->SetModified( true );
- p->Broadcast( SBX_HINT_DATACHANGED );
+ p->Broadcast( SfxHintId::BasicDataChanged );
if( eOld != ERRCODE_SBX_OK )
SetError( eOld );
bRes = true;
@@ -689,7 +689,7 @@ bool SbxValue::ImpIsNumeric( bool bOnlyIntntl ) const
}
// Test downcast!!!
if( nullptr != dynamic_cast<const SbxVariable*>( this) )
- const_cast<SbxVariable*>(static_cast<const SbxVariable*>(this))->Broadcast( SBX_HINT_DATAWANTED );
+ const_cast<SbxVariable*>(static_cast<const SbxVariable*>(this))->Broadcast( SfxHintId::BasicDataWanted );
SbxDataType t = GetType();
if( t == SbxSTRING )
{
@@ -817,7 +817,7 @@ bool SbxValue::Convert( SbxDataType eTo )
Put( aNew );
SetModified( true );
}
- Broadcast( SBX_HINT_CONVERTED );
+ Broadcast( SfxHintId::BasicConverted );
return true;
}
else
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 27766dfc7fd4..5e8307d0a6a9 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -155,20 +155,20 @@ SbxArray* SbxVariable::GetParameters() const
// Perhaps some day one could cut the parameter 0.
// Then the copying will be dropped...
-void SbxVariable::Broadcast( sal_uInt32 nHintId )
+void SbxVariable::Broadcast( SfxHintId nHintId )
{
if( pCst && !IsSet( SbxFlagBits::NoBroadcast ) )
{
// Because the method could be called from outside, check the
// rights here again
- if( nHintId & SBX_HINT_DATAWANTED )
+ if( nHintId == SfxHintId::BasicDataWanted )
{
if( !CanRead() )
{
return;
}
}
- if( nHintId & SBX_HINT_DATACHANGED )
+ if( nHintId == SfxHintId::BasicDataChanged )
{
if( !CanWrite() )
{
@@ -201,7 +201,7 @@ SbxInfo* SbxVariable::GetInfo()
{
if( !pInfo.Is() )
{
- Broadcast( SBX_HINT_INFOWANTED );
+ Broadcast( SfxHintId::BasicInfoWanted );
if( pInfo.Is() )
{
SetModified( true );
@@ -582,7 +582,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
pInfo = new SbxInfo;
pInfo->LoadData( rStrm, (sal_uInt16) cMark );
}
- Broadcast( SBX_HINT_DATACHANGED );
+ Broadcast( SfxHintId::BasicDataChanged );
nHash = MakeHashCode( maName );
SetModified( true );
return true;
@@ -662,20 +662,20 @@ SbxAlias::~SbxAlias()
}
}
-void SbxAlias::Broadcast( sal_uInt32 nHt )
+void SbxAlias::Broadcast( SfxHintId nHt )
{
if( xAlias.Is() )
{
xAlias->SetParameters( GetParameters() );
- if( nHt == SBX_HINT_DATAWANTED )
+ if( nHt == SfxHintId::BasicDataWanted )
{
SbxVariable::operator=( *xAlias );
}
- else if( nHt == SBX_HINT_DATACHANGED || nHt == SBX_HINT_CONVERTED )
+ else if( nHt == SfxHintId::BasicDataChanged || nHt == SfxHintId::BasicConverted )
{
*xAlias = *this;
}
- else if( nHt == SBX_HINT_INFOWANTED )
+ else if( nHt == SfxHintId::BasicInfoWanted )
{
xAlias->Broadcast( nHt );
pInfo = xAlias->GetInfo();
@@ -686,7 +686,7 @@ void SbxAlias::Broadcast( sal_uInt32 nHt )
void SbxAlias::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint);
- if( p && p->GetId() == SBX_HINT_DYING )
+ if( p && p->GetId() == SfxHintId::BasicDying )
{
xAlias.Clear();
// delete the alias?
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index 5624865ff149..142c85d6881e 100644
--- a/desktop/source/deployment/gui/license_dialog.cxx
+++ b/desktop/source/deployment/gui/license_dialog.cxx
@@ -173,14 +173,14 @@ void LicenseView::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( pTextHint )
{
bool bLastVal = EndReached();
- const sal_uInt32 nId = pTextHint->GetId();
+ const SfxHintId nId = pTextHint->GetId();
- if ( nId == TEXT_HINT_PARAINSERTED )
+ if ( nId == SfxHintId::TextParaInserted )
{
if ( bLastVal )
mbEndReached = IsEndReached();
}
- else if ( nId == TEXT_HINT_VIEWSCROLLED )
+ else if ( nId == SfxHintId::TextViewScrolled )
{
if ( ! mbEndReached )
mbEndReached = IsEndReached();
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index e4b0fb0afe4c..8f37954ce5ea 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2475,7 +2475,7 @@ void EditEngine::ParagraphHeightChanged( sal_Int32 nPara )
if ( GetNotifyHdl().IsSet() )
{
- EENotify aNotify( EE_NOTIFY_TEXTHEIGHTCHANGED );
+ EENotify aNotify( EE_NOTIFY_TextHeightChanged );
aNotify.pEditEngine = this;
aNotify.nParagraph = nPara;
pImpEditEngine->CallNotify( aNotify );
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 2331fe1c179b..bcfb89e8bddc 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -425,7 +425,7 @@ void ImpEditEngine::FormatDoc()
sal_uInt32 nNewHeight = CalcTextHeight( &nNewHeightNTP );
long nDiff = nNewHeight - nCurTextHeight;
if ( nDiff )
- aStatus.GetStatusWord() |= !IsVertical() ? EditStatusFlags::TEXTHEIGHTCHANGED : EditStatusFlags::TEXTWIDTHCHANGED;
+ aStatus.GetStatusWord() |= !IsVertical() ? EditStatusFlags::TextHeightChanged : EditStatusFlags::TEXTWIDTHCHANGED;
if ( nNewHeight < nCurTextHeight )
{
aInvalidRect.Bottom() = (long)std::max( nNewHeight, nCurTextHeight );
@@ -516,7 +516,7 @@ void ImpEditEngine::CheckAutoPageSize()
|| ( IsVertical() && ( aPaperSize.Height() != aPrevPaperSize.Height() ) ) )
{
// If ahead is centered / right or tabs ...
- aStatus.GetStatusWord() |= !IsVertical() ? EditStatusFlags::TEXTWIDTHCHANGED : EditStatusFlags::TEXTHEIGHTCHANGED;
+ aStatus.GetStatusWord() |= !IsVertical() ? EditStatusFlags::TEXTWIDTHCHANGED : EditStatusFlags::TextHeightChanged;
for ( sal_Int32 nPara = 0; nPara < GetParaPortions().Count(); nPara++ )
{
// Only paragraphs which are not aligned to the left need to be
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx
index 1b3c5b382b0d..100af463f818 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -143,32 +143,31 @@ void ImpEditEngine::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if ( !bDowning )
{
- SfxStyleSheet* pStyle = nullptr;
- sal_uInt32 nId = 0;
-
const SfxStyleSheetHint* pStyleSheetHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint);
if ( pStyleSheetHint )
{
DBG_ASSERT( dynamic_cast< const SfxStyleSheet* >(pStyleSheetHint->GetStyleSheet()) != nullptr, "No SfxStyleSheet!" );
- pStyle = static_cast<SfxStyleSheet*>( pStyleSheetHint->GetStyleSheet() );
- nId = pStyleSheetHint->GetHint();
+ SfxStyleSheet* pStyle = static_cast<SfxStyleSheet*>( pStyleSheetHint->GetStyleSheet() );
+ SfxHintId nId = pStyleSheetHint->GetId();
+ if ( ( nId == SfxHintId::StyleSheetInDestruction ) ||
+ ( nId == SfxHintId::StyleSheetErased ) )
+ {
+ RemoveStyleFromParagraphs( pStyle );
+ }
+ else if ( nId == SfxHintId::StyleSheetModified )
+ {
+ UpdateParagraphsWithStyleSheet( pStyle );
+ }
}
else if ( dynamic_cast< const SfxStyleSheet* >(&rBC) != nullptr )
{
- pStyle = static_cast<SfxStyleSheet*>(&rBC);
- nId = rHint.GetId();
- }
-
- if ( pStyle )
- {
- if ( ( nId == SFX_HINT_DYING ) ||
- ( nId == SfxStyleSheetHintId::INDESTRUCTION ) ||
- ( nId == SfxStyleSheetHintId::ERASED ) )
+ SfxStyleSheet* pStyle = static_cast<SfxStyleSheet*>(&rBC);
+ SfxHintId nId = rHint.GetId();
+ if ( nId == SfxHintId::Dying )
{
RemoveStyleFromParagraphs( pStyle );
}
- else if ( ( nId == SFX_HINT_DATACHANGED ) ||
- ( nId == SfxStyleSheetHintId::MODIFIED ) )
+ else if ( nId == SfxHintId::DataChanged )
{
UpdateParagraphsWithStyleSheet( pStyle );
}
diff --git a/editeng/source/uno/unoedhlp.cxx b/editeng/source/uno/unoedhlp.cxx
index 268d18872cd5..646d009d0b20 100644
--- a/editeng/source/uno/unoedhlp.cxx
+++ b/editeng/source/uno/unoedhlp.cxx
@@ -26,14 +26,14 @@
#include <osl/diagnose.h>
-SvxEditSourceHint::SvxEditSourceHint( sal_uInt32 _nId ) :
+SvxEditSourceHint::SvxEditSourceHint( SfxHintId _nId ) :
TextHint( _nId ),
mnStart( 0 ),
mnEnd( 0 )
{
}
-SvxEditSourceHint::SvxEditSourceHint( sal_uInt32 _nId, sal_uLong nValue, sal_Int32 nStart, sal_Int32 nEnd ) :
+SvxEditSourceHint::SvxEditSourceHint( SfxHintId _nId, sal_uLong nValue, sal_Int32 nStart, sal_Int32 nEnd ) :
TextHint( _nId, nValue ),
mnStart( nStart),
mnEnd( nEnd )
@@ -48,37 +48,37 @@ SvxEditSourceHint::SvxEditSourceHint( sal_uInt32 _nId, sal_uLong nValue, sal_Int
switch( aNotify->eNotificationType )
{
case EE_NOTIFY_TEXTMODIFIED:
- return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_MODIFIED, aNotify->nParagraph ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextModified, aNotify->nParagraph ) );
case EE_NOTIFY_PARAGRAPHINSERTED:
- return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_PARAINSERTED, aNotify->nParagraph ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextParaInserted, aNotify->nParagraph ) );
case EE_NOTIFY_PARAGRAPHREMOVED:
- return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_PARAREMOVED, aNotify->nParagraph ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextParaRemoved, aNotify->nParagraph ) );
case EE_NOTIFY_PARAGRAPHSMOVED:
- return ::std::unique_ptr<SfxHint>( new SvxEditSourceHint( EDITSOURCE_HINT_PARASMOVED, aNotify->nParagraph, aNotify->nParam1, aNotify->nParam2 ) );
+ return ::std::unique_ptr<SfxHint>( new SvxEditSourceHint( SfxHintId::EditSourceParasMoved, aNotify->nParagraph, aNotify->nParam1, aNotify->nParam2 ) );
- case EE_NOTIFY_TEXTHEIGHTCHANGED:
- return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_TEXTHEIGHTCHANGED, aNotify->nParagraph ) );
+ case EE_NOTIFY_TextHeightChanged:
+ return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextHeightChanged, aNotify->nParagraph ) );
case EE_NOTIFY_TEXTVIEWSCROLLED:
- return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_VIEWSCROLLED ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextViewScrolled ) );
case EE_NOTIFY_TEXTVIEWSELECTIONCHANGED:
- return ::std::unique_ptr<SfxHint>( new SvxEditSourceHint( EDITSOURCE_HINT_SELECTIONCHANGED ) );
+ return ::std::unique_ptr<SfxHint>( new SvxEditSourceHint( SfxHintId::EditSourceSelectionChanged ) );
case EE_NOTIFY_BLOCKNOTIFICATION_START:
- return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_BLOCKNOTIFICATION_START, 0 ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextBlockNotificationStart, 0 ) );
case EE_NOTIFY_BLOCKNOTIFICATION_END:
- return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_BLOCKNOTIFICATION_END, 0 ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextBlockNotificationEnd, 0 ) );
case EE_NOTIFY_INPUT_START:
- return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_INPUT_START, 0 ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextInputStart, 0 ) );
case EE_NOTIFY_INPUT_END:
- return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_INPUT_END, 0 ) );
+ return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextInputEnd, 0 ) );
case EE_NOTIFY_TEXTVIEWSELECTIONCHANGED_ENDD_PARA:
return ::std::unique_ptr<SfxHint>( new SvxEditSourceHintEndPara );
default:
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx
index 3bc77a4d52c4..5a11fa9dd031 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -276,10 +276,10 @@ namespace frm
{
EditStatusFlags nStatusWord( _rStatus.GetStatusWord() );
if ( ( nStatusWord & EditStatusFlags::TEXTWIDTHCHANGED )
- || ( nStatusWord & EditStatusFlags::TEXTHEIGHTCHANGED )
+ || ( nStatusWord & EditStatusFlags::TextHeightChanged )
)
{
- if ( ( nStatusWord & EditStatusFlags::TEXTHEIGHTCHANGED ) && windowHasAutomaticLineBreak() )
+ if ( ( nStatusWord & EditStatusFlags::TextHeightChanged ) && windowHasAutomaticLineBreak() )
m_pEngine->SetPaperSize( Size( m_pEngine->GetPaperSize().Width(), m_pEngine->GetTextHeight() ) );
updateScrollbars();
diff --git a/include/basic/sbdef.hxx b/include/basic/sbdef.hxx
index 39576fbe7f87..40071031eff2 100644
--- a/include/basic/sbdef.hxx
+++ b/include/basic/sbdef.hxx
@@ -59,9 +59,6 @@ namespace o3tl {
#define SBXID_JSCRIPTMOD 0x6a62 // jm: JavaScript Module
#define SBXID_JSCRIPTMETH 0x6a64 // jm: JavaScript Module
-#define SBX_HINT_BASICSTART SFX_HINT_USER04
-#define SBX_HINT_BASICSTOP SFX_HINT_USER05
-
enum class PropertyMode
{
NONE,
diff --git a/include/basic/sbmeth.hxx b/include/basic/sbmeth.hxx
index e0d57a695d09..2a67dc7ad592 100644
--- a/include/basic/sbmeth.hxx
+++ b/include/basic/sbmeth.hxx
@@ -62,7 +62,7 @@ public:
// Interface to execute a method from the applications
ErrCode Call( SbxValue* pRet, SbxVariable* pCaller = nullptr );
- virtual void Broadcast( sal_uInt32 nHintId ) override;
+ virtual void Broadcast( SfxHintId nHintId ) override;
};
typedef tools::SvRef<SbMethod> SbMethodRef;
diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx
index 35d09c45d450..d52b6ce42d42 100644
--- a/include/basic/sbx.hxx
+++ b/include/basic/sbx.hxx
@@ -94,7 +94,7 @@ class BASIC_DLLPUBLIC SbxHint : public SfxHint
{
SbxVariable* pVar;
public:
- SbxHint( sal_uInt32 n, SbxVariable* v ) : SfxHint( n ), pVar( v ) {}
+ SbxHint( SfxHintId n, SbxVariable* v ) : SfxHint( n ), pVar( v ) {}
SbxVariable* GetVar() const { return pVar; }
};
@@ -103,7 +103,7 @@ class BASIC_DLLPUBLIC SbxAlias : public SbxVariable, public SfxListener
{
SbxVariableRef xAlias;
virtual ~SbxAlias() override;
- virtual void Broadcast( sal_uInt32 ) override;
+ virtual void Broadcast( SfxHintId ) override;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
public:
SbxAlias( const SbxAlias& );
diff --git a/include/basic/sbxdef.hxx b/include/basic/sbxdef.hxx
index 42863984f68c..44c75dbb03b6 100644
--- a/include/basic/sbxdef.hxx
+++ b/include/basic/sbxdef.hxx
@@ -200,14 +200,6 @@ namespace o3tl
template<> struct typed_flags<SbxFlagBits> : is_typed_flags<SbxFlagBits, 0xffff> {};
}
-// Broadcaster-IDs:
-#define SBX_HINT_DYING SFX_HINT_DYING
-#define SBX_HINT_DATAWANTED SFX_HINT_USER00
-#define SBX_HINT_DATACHANGED SFX_HINT_DATACHANGED
-#define SBX_HINT_CONVERTED SFX_HINT_USER01
-#define SBX_HINT_INFOWANTED SFX_HINT_USER02
-#define SBX_HINT_OBJECTCHANGED SFX_HINT_USER03
-
// List of all creators for Load/Store
#define SBXCR_SBX 0x20584253 // SBX(blank)
diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx
index 9ad6cb3f92b5..82acb60f2982 100644
--- a/include/basic/sbxvar.hxx
+++ b/include/basic/sbxvar.hxx
@@ -28,6 +28,7 @@
class SbxDecimal;
+enum class SfxHintId;
struct SbxValues
{
@@ -82,7 +83,7 @@ protected:
OUString aPic; // Picture-String
OUString aToolString; // tool string copy
- virtual void Broadcast( sal_uInt32 ); // Broadcast-Call
+ virtual void Broadcast( SfxHintId ); // Broadcast-Call
virtual ~SbxValue() override;
virtual bool LoadData( SvStream&, sal_uInt16 ) override;
virtual bool StoreData( SvStream& ) const override;
@@ -269,7 +270,7 @@ public:
// Due to data reduction and better DLL-hierarchy currently via casting
SfxBroadcaster& GetBroadcaster();
bool IsBroadcaster() const { return pCst != nullptr; }
- virtual void Broadcast( sal_uInt32 nHintId ) override;
+ virtual void Broadcast( SfxHintId nHintId ) override;
inline const SbxObject* GetParent() const { return pParent; }
SbxObject* GetParent() { return pParent;}
diff --git a/include/editeng/AccessibleStaticTextBase.hxx b/include/editeng/AccessibleStaticTextBase.hxx
index aaa5f43e57be..09af887c1554 100644
--- a/include/editeng/AccessibleStaticTextBase.hxx
+++ b/include/editeng/AccessibleStaticTextBase.hxx
@@ -117,15 +117,15 @@ namespace accessibility
only be called from the main office thread.
The EditSource set here is required to broadcast out the
- following hints: EDITSOURCE_HINT_PARASMOVED,
- EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED,
- TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED,
- TEXT_HINT_TEXTHEIGHTCHANGED,
- TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes
+ following hints: SfxHintId::EditSourceParasMoved,
+ SfxHintId::EditSourceSelectionChanged, SfxHintId::TextModified,
+ SfxHintId::TextParaInserted, SfxHintId::TextParaRemoved,
+ SfxHintId::TextHeightChanged,
+ SfxHintId::TextViewScrolled. Otherwise, not all state changes
will get noticed by the accessibility object. Further
more, when the corresponding core object or the model is
dying, either the edit source must be set to NULL or it
- has to broadcast a SFX_HINT_DYING hint.
+ has to broadcast a SfxHintId::Dying hint.
This class does not have a dispose method, since it is not
a UNO component. Nevertheless, it holds C++ references to
diff --git a/include/editeng/editdata.hxx b/include/editeng/editdata.hxx
index 33de259fc6c2..34187ecb8f0a 100644
--- a/include/editeng/editdata.hxx
+++ b/include/editeng/editdata.hxx
@@ -297,7 +297,7 @@ enum EENotifyType
EE_NOTIFY_PARAGRAPHSMOVED,
/// The height of at least one paragraph has changed
- EE_NOTIFY_TEXTHEIGHTCHANGED,
+ EE_NOTIFY_TextHeightChanged,
/// The view area of the EditEngine scrolled
EE_NOTIFY_TEXTVIEWSCROLLED,
diff --git a/include/editeng/editstat.hxx b/include/editeng/editstat.hxx
index fa5c771c7b88..c6b099d2202a 100644
--- a/include/editeng/editstat.hxx
+++ b/include/editeng/editstat.hxx
@@ -86,7 +86,7 @@ enum class EditStatusFlags
CRSRMOVEFAIL = 0x0008,
CRSRLEFTPARA = 0x0010,
TEXTWIDTHCHANGED = 0x0020,
- TEXTHEIGHTCHANGED = 0x0040,
+ TextHeightChanged = 0x0040,
WRONGWORDCHANGED = 0x0080
};
namespace o3tl
diff --git a/include/editeng/unoedhlp.hxx b/include/editeng/unoedhlp.hxx
index ca8dac26fcb0..c08576741cd8 100644
--- a/include/editeng/unoedhlp.hxx
+++ b/include/editeng/unoedhlp.hxx
@@ -30,11 +30,8 @@
struct EENotify;
class EditEngine;
-#define EDITSOURCE_HINT_PARASMOVED 20
-#define EDITSOURCE_HINT_SELECTIONCHANGED 21
-
/** Extends TextHint by two additional parameters which are necessary
- for the EDITSOURCE_HINT_PARASMOVED hint. TextHint's value in this
+ for the SfxHintId::EditSourceParasMoved hint. TextHint's value in this
case denotes the destination position, the two parameters the
start and the end of the moved paragraph range.
*/
@@ -45,8 +42,8 @@ private:
sal_Int32 mnEnd;
public:
- SvxEditSourceHint( sal_uInt32 nId );
- SvxEditSourceHint( sal_uInt32 nId, sal_uLong nValue, sal_Int32 nStart, sal_Int32 nEnd );
+ SvxEditSourceHint( SfxHintId nId );
+ SvxEditSourceHint( SfxHintId nId, sal_uLong nValue, sal_Int32 nStart, sal_Int32 nEnd );
using TextHint::GetValue;
sal_Int32 GetStartValue() const { return mnStart;}
@@ -55,7 +52,7 @@ public:
class SvxEditSourceHintEndPara :public SvxEditSourceHint
{
public:
- SvxEditSourceHintEndPara() : SvxEditSourceHint(EDITSOURCE_HINT_SELECTIONCHANGED) {}
+ SvxEditSourceHintEndPara() : SvxEditSourceHint(SfxHintId::EditSourceSelectionChanged) {}
};
/** Helper class for common functionality in edit sources
*/
diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index a31cea4e6a47..fb1f2d03067a 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -22,37 +22,105 @@
#include <sal/types.h>
#include <svl/svldllapi.h>
-#define SFX_HINT_DYING 0x00000001
-#define SFX_HINT_NAMECHANGED 0x00000002
-#define SFX_HINT_TITLECHANGED 0x00000004
-#define SFX_HINT_DATACHANGED 0x00000008
-#define SFX_HINT_DOCCHANGED 0x00000010
-#define SFX_HINT_UPDATEDONE 0x00000020
-#define SFX_HINT_DEINITIALIZING 0x00000040
-#define SFX_HINT_MODECHANGED 0x00000080
- // unused, formerly SFX_HINT_CANCELLABLE
- // unused, formerly SFX_HINT_DATAAVAILABLE
- // unused, formerly SFX_HINT_SAVECOMPLETED
- // unused, formerly SFX_HINT_RELEASEREF
-#define SFX_HINT_COLORS_CHANGED 0x00001000
-#define SFX_HINT_ACCESSIBILITY_CHANGED 0x00004000
- // unused, formerly SFX_HINT_VIEWCREATED
-#define SFX_HINT_USER00 0x00010000
-#define SFX_HINT_USER01 0x00020000
-#define SFX_HINT_USER02 0x00040000
-#define SFX_HINT_USER03 0x00080000
-#define SFX_HINT_USER04 0x00100000
-#define SFX_HINT_USER05 0x00200000
+enum class SfxHintId {
+ NONE,
+ Dying,
+ NameChanged,
+ TitleChanged,
+ DataChanged,
+ DocChanged,
+ UpdateDone,
+ Deinitializing,
+ ModeChanged,
+ ColorsChanged,
+ AccessibilityChanged,
+
+// VCL text hints
+ TextParaInserted,
+ TextParaRemoved,
+ TextParaContentChanged,
+ TextHeightChanged,
+ TextFormatPara,
+ TextFormatted,
+ TextModified,
+ TextBlockNotificationStart,
+ TextBlockNotificationEnd,
+ TextInputStart,
+ TextInputEnd,
+ TextViewScrolled,
+ TextViewSelectionChanged,
+ TextViewCaretChanged,
+
+// BASIC hints
+ BasicDying,
+ BasicDataWanted,
+ BasicDataChanged,
+ BasicConverted,
+ BasicInfoWanted,
+ BasicObjectChanged,
+ BasicStart,
+ BasicStop,
+
+// SVX edit source
+ EditSourceParasMoved,
+ EditSourceSelectionChanged,
+
+// SC hints
+ ScDataChanged,
+ ScTableOpDirty,
+ ScCalcAll,
+ ScReference,
+ ScDrawLayerNew,
+ ScDbAreasChanged,
+ ScAreasChanged,
+ ScTablesChanged,
+ ScDrawChanged,
+ ScDocNameChanged,
+ ScAreaLinksChanged,
+ ScShowRangeFinder,
+ ScDocSaved,
+ ScForceSetTab,
+ ScNavigatorUpdateAll,
+ ScAnyDataChanged,
+ ScPrintOptions,
+ ScRefModeChanged,
+ ScKillEditView,
+ ScKillEditViewNoPaint,
+
+// SC accessibility hints
+ ScAccTableChanged,
+ ScAccCursorChanged,
+ ScAccVisAreaChanged,
+ ScAccEnterEditMode,
+ ScAccLeaveEditMode,
+ ScAccMakeDrawLayer,
+ ScAccWindowResized,
+
+
+// SFX stylesheet
+ StyleSheetCreated, // new
+ StyleSheetModified, // changed
+ StyleSheetChanged, // erased and re-created (replaced)
+ StyleSheetErased, // erased
+ StyleSheetInDestruction, // in the process of being destructed
+
+// STARMATH
+ MathFormatChanged,
+
+// SW
+ SwDrawViewsCreated,
+ SwSplitNodeOperation,
+};
class SVL_DLLPUBLIC SfxHint
{
private:
- sal_uInt32 mnId;
+ SfxHintId mnId;
public:
- SfxHint() : mnId(0) {}
- explicit SfxHint( sal_uInt32 nId ) : mnId(nId) {}
+ SfxHint() : mnId(SfxHintId::NONE) {}
+ explicit SfxHint( SfxHintId nId ) : mnId(nId) {}
virtual ~SfxHint();
- sal_uInt32 GetId() const { return mnId; }
+ SfxHintId GetId() const { return mnId; }
};
#endif
diff --git a/include/svl/style.hxx b/include/svl/style.hxx
index 6e0b0b996a9c..69bc70f0dbd2 100644
--- a/include/svl/style.hxx
+++ b/include/svl/style.hxx
@@ -49,24 +49,24 @@ must broadcast this using <SfxStyleSheetBasePool::GetBroadcaster()> broadcasts.
The class <SfxStyleSheetHint> is used for this, it contains an Action-Id and a
pointer to the <SfxStyleSheetBase>. The actions are:
-#define SfxStyleSheetHintId::CREATED // style is created
-#define SfxStyleSheetHintId::MODIFIED // style is modified
-#define SfxStyleSheetHintId::CHANGED // style is replaced
-#define SfxStyleSheetHintId::ERASED // style is deleted
+#define SfxHintId::StyleSheetCreated // style is created
+#define SfxHintId::StyleSheetModified // style is modified
+#define SfxHintId::StyleSheetChanged // style is replaced
+#define SfxHintId::StyleSheetErased // style is deleted
The following methods already broadcast themself
-SfxSimpleHint(SFX_HINT_DYING) from:
+SfxSimpleHint(SfxHintId::Dying) from:
SfxStyleSheetBasePool::~SfxStyleSheetBasePool()
-SfxStyleSheetHint( SfxStyleSheetHintId::CREATED, *p ) from:
+SfxStyleSheetHint( SfxHintId::StyleSheetCreated, *p ) from:
SfxStyleSheetBasePool::Make( const String& rName,
SfxStyleFamily eFam, sal_uInt16 mask)
-SfxStyleSheetHint( SfxStyleSheetHintId::CHANGED, *pNew ) from:
+SfxStyleSheetHint( SfxHintId::StyleSheetChanged, *pNew ) from:
SfxStyleSheetBasePool::Add( SfxStyleSheetBase& rSheet )
-SfxStyleSheetHint( SfxStyleSheetHintId::ERASED, *p ) from:
+SfxStyleSheetHint( SfxHintId::StyleSheetErased, *p ) from:
SfxStyleSheetBasePool::Erase( SfxStyleSheetBase* p )
SfxStyleSheetBasePool::Clear()
*/
@@ -292,15 +292,6 @@ public:
};
-enum SfxStyleSheetHintId
-{
- CREATED = 1, // new
- MODIFIED = 2, // changed
- CHANGED = 3, // erased and re-created (replaced)
- ERASED = 4, // erased
- INDESTRUCTION = 5, // in the process of being destructed
-};
-
class SVL_DLLPUBLIC SfxStyleSheetPoolHint : public SfxHint
{
public:
@@ -311,14 +302,10 @@ public:
class SVL_DLLPUBLIC SfxStyleSheetHint: public SfxHint
{
SfxStyleSheetBase* pStyleSh;
- sal_uInt16 nHint;
-
public:
- SfxStyleSheetHint( sal_uInt16, SfxStyleSheetBase& );
+ SfxStyleSheetHint( SfxHintId, SfxStyleSheetBase& );
SfxStyleSheetBase* GetStyleSheet() const
{ return pStyleSh; }
- sal_uInt16 GetHint() const
- { return nHint; }
};
class SVL_DLLPUBLIC SfxStyleSheetHintExtended: public SfxStyleSheetHint
@@ -326,7 +313,7 @@ class SVL_DLLPUBLIC SfxStyleSheetHintExtended: public SfxStyleSheetHint
OUString aName;
public:
- SfxStyleSheetHintExtended( sal_uInt16, const OUString& rOld,
+ SfxStyleSheetHintExtended( SfxHintId, const OUString& rOld,
SfxStyleSheetBase& );
const OUString& GetOldName() const { return aName; }
};
diff --git a/include/svx/AccessibleTextHelper.hxx b/include/svx/AccessibleTextHelper.hxx
index 7fdee91520de..f156397ef6c9 100644
--- a/include/svx/AccessibleTextHelper.hxx
+++ b/include/svx/AccessibleTextHelper.hxx
@@ -85,7 +85,7 @@ namespace accessibility
AccessibleTextHelper will call the SvxEditSource and their
forwarder to update it's state. Avoid being inconsistent in
the facts you tell in the events, e.g. when sending a
- TEXT_HINT_PARAINSERTED event, the
+ SfxHintId::TextParaInserted event, the
SvxEditSource::GetTextForwarder().GetParagraphCount() should
already include the newly inserted paragraph.
@@ -147,15 +147,15 @@ namespace accessibility
from the main office thread.
The EditSource set here is required to broadcast out the
- following hints: EDITSOURCE_HINT_PARASMOVED,
- EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED,
- TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED,
- TEXT_HINT_TEXTHEIGHTCHANGED,
- TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes
+ following hints: SfxHintId::EditSourceParasMoved,
+ SfxHintId::EditSourceSelectionChanged, SfxHintId::TextModified,
+ SfxHintId::TextParaInserted, SfxHintId::TextParaRemoved,
+ SfxHintId::TextHeightChanged,
+ SfxHintId::TextViewScrolled. Otherwise, not all state changes
will get noticed by the accessibility object. Further
more, when the corresponding core object or the model is
dying, either the edit source must be set to NULL or it
- has to broadcast a SFX_HINT_DYING hint.
+ has to broadcast a SfxHintId::Dying hint.
If the SvxEditSource's managed text can change between
edit/non-edit mode (i.e. there are times when
@@ -262,7 +262,7 @@ namespace accessibility
children. Call this method if your visibility state has
changed somehow, e.g. if the visible area has changed and
the AccessibleTextHelper isn't notified internally
- (e.g. via TEXT_HINT_VIEWSCROLLED). Normally, there should
+ (e.g. via SfxHintId::TextViewScrolled). Normally, there should
not be a need to call this method.
*/
void UpdateChildren();
diff --git a/include/vcl/textdata.hxx b/include/vcl/textdata.hxx
index abcd6629dad3..de0dabd93348 100644
--- a/include/vcl/textdata.hxx
+++ b/include/vcl/textdata.hxx
@@ -111,30 +111,14 @@ inline bool TextSelection::operator != ( const TextSelection& rSel ) const
return !( *this == rSel );
}
-#define TEXT_HINT_PARAINSERTED 1
-#define TEXT_HINT_PARAREMOVED 2
-#define TEXT_HINT_PARACONTENTCHANGED 3
-#define TEXT_HINT_TEXTHEIGHTCHANGED 4
-#define TEXT_HINT_FORMATPARA 5
-#define TEXT_HINT_TEXTFORMATTED 6
-#define TEXT_HINT_MODIFIED 7
-#define TEXT_HINT_BLOCKNOTIFICATION_START 8
-#define TEXT_HINT_BLOCKNOTIFICATION_END 9
-#define TEXT_HINT_INPUT_START 10
-#define TEXT_HINT_INPUT_END 11
-
-#define TEXT_HINT_VIEWSCROLLED 100
-#define TEXT_HINT_VIEWSELECTIONCHANGED 101
-#define TEXT_HINT_VIEWCARETCHANGED 102
-
class VCL_DLLPUBLIC TextHint : public SfxHint
{
private:
sal_uLong mnValue;
public:
- TextHint( sal_uInt32 nId );
- TextHint( sal_uInt32 nId, sal_uLong nValue );
+ TextHint( SfxHintId nId );
+ TextHint( SfxHintId nId, sal_uLong nValue );
sal_uLong GetValue() const { return mnValue; }
};
diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx
index 0b0fcf1696be..ecf834aa70a2 100644
--- a/reportdesign/source/core/sdr/UndoEnv.cxx
+++ b/reportdesign/source/core/sdr/UndoEnv.cxx
@@ -191,7 +191,7 @@ void OXUndoEnvironment::ModeChanged()
void OXUndoEnvironment::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
- if (rHint.GetId() == SFX_HINT_MODECHANGED )
+ if (rHint.GetId() == SfxHintId::ModeChanged )
ModeChanged();
}
diff --git a/reportdesign/source/ui/misc/ColorListener.cxx b/reportdesign/source/ui/misc/ColorListener.cxx
index b119a1bdcc9a..bbd66c5c84ba 100644
--- a/reportdesign/source/ui/misc/ColorListener.cxx
+++ b/reportdesign/source/ui/misc/ColorListener.cxx
@@ -51,7 +51,7 @@ void OColorListener::dispose()
void OColorListener::Notify(SfxBroadcaster & /*rBc*/, SfxHint const & rHint)
{
- if (rHint.GetId() == SFX_HINT_COLORS_CHANGED)
+ if (rHint.GetId() == SfxHintId::ColorsChanged)
{
m_nColor = m_aExtendedColorConfig.GetColorValue(CFG_REPORTDESIGNER,m_sColorEntry).getColor();
m_nTextBoundaries = m_aColorConfig.GetColorValue(::svtools::DOCBOUNDARIES).nColor;
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index 0e1d0f3b385b..59276321d8bd 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -253,7 +253,7 @@ void OStartMarker::setTitle(const OUString& _sTitle)
void OStartMarker::Notify(SfxBroadcaster & rBc, SfxHint const & rHint)
{
OColorListener::Notify(rBc, rHint);
- if (rHint.GetId() == SFX_HINT_COLORS_CHANGED)
+ if (rHint.GetId() == SfxHintId::ColorsChanged)
{
setColor();
Invalidate(InvalidateFlags::Children);
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();
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx
index 14a0d6fb4824..1c991dbf8d48 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -100,7 +100,7 @@ namespace basprov
// not interested in
return;
}
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
m_documentBasicManager = nullptr;
EndListening( rBC ); // prevent multiple notifications
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index e20c8d0ccdda..ec85bb7cb0a7 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -1585,7 +1585,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
pUndoMgr->AddUndoAction(pUndoChStyle);
}
pMySheet->GetItemSet().Put(pHisSheet->GetItemSet());
- pMySheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ pMySheet->Broadcast(SfxHint(SfxHintId::DataChanged));
}
else
{
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 945056d55f71..6fb1ae934307 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1941,7 +1941,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
rSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CTL));
}
- pTitleSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ pTitleSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
}
}
else if (pObj == GetPresObj(PRESOBJ_OUTLINE, nIndexOutline))
@@ -2001,7 +2001,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
}
pOutlineSheet->GetItemSet().Put(aTempSet);
- pOutlineSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ pOutlineSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
}
}
}
@@ -2017,7 +2017,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
rSet.Put( SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT ));
rSet.Put( SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CJK ));
rSet.Put( SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CTL ));
- pNotesSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ pNotesSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
}
}
}
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index a71f529bc7a9..607028598f26 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -1112,7 +1112,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
}
rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET ) );
- static_cast<SfxStyleSheet*>(pSheet)->Broadcast(SfxHint( SFX_HINT_DATACHANGED ) );
+ static_cast<SfxStyleSheet*>(pSheet)->Broadcast(SfxHint( SfxHintId::DataChanged ) );
}
break;
@@ -1145,7 +1145,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
}
rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET ) );
- static_cast<SfxStyleSheet*>(pSheet)->Broadcast(SfxHint( SFX_HINT_DATACHANGED ) );
+ static_cast<SfxStyleSheet*>(pSheet)->Broadcast(SfxHint( SfxHintId::DataChanged ) );
}
}
break;
@@ -1170,7 +1170,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
}
rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET ) );
- static_cast<SfxStyleSheet*>(pSheet)->Broadcast(SfxHint( SFX_HINT_DATACHANGED ) );
+ static_cast<SfxStyleSheet*>(pSheet)->Broadcast(SfxHint( SfxHintId::DataChanged ) );
}
break;
}
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index c0b7a0d98523..87cfcfed59cc 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -192,14 +192,14 @@ bool SdStyleSheet::SetParent(const OUString& rParentName)
bResult = true;
SfxItemSet& rParentSet = pStyle->GetItemSet();
GetItemSet().SetParent(&rParentSet);
- Broadcast( SfxHint( SFX_HINT_DATACHANGED ) );
+ Broadcast( SfxHint( SfxHintId::DataChanged ) );
}
}
else
{
bResult = true;
GetItemSet().SetParent(nullptr);
- Broadcast( SfxHint( SFX_HINT_DATACHANGED ) );
+ Broadcast( SfxHint( SfxHintId::DataChanged ) );
}
}
else
@@ -526,7 +526,7 @@ void SdStyleSheet::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
/* if the dummy gets a notify about a changed attribute, he takes care that
the actual ment style sheet sends broadcasts. */
- if (rHint.GetId() == SFX_HINT_DATACHANGED)
+ if (rHint.GetId() == SfxHintId::DataChanged)
{
SdStyleSheet* pRealStyle = GetRealStyleSheet();
if (pRealStyle)
@@ -883,7 +883,7 @@ void SAL_CALL SdStyleSheet::setName( const OUString& rName ) throw(RuntimeExcep
if( SetName( rName ) )
{
msApiName = rName;
- Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ Broadcast(SfxHint(SfxHintId::DataChanged));
}
}
@@ -1048,7 +1048,7 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, con
}
rStyleSet.Put( aSet );
- Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ Broadcast(SfxHint(SfxHintId::DataChanged));
}
}
@@ -1281,7 +1281,7 @@ void SAL_CALL SdStyleSheet::setPropertyToDefault( const OUString& PropertyName )
{
rStyleSet.ClearItem( pEntry->nWID );
}
- Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ Broadcast(SfxHint(SfxHintId::DataChanged));
}
Any SAL_CALL SdStyleSheet::getPropertyDefault( const OUString& aPropertyName ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception)
@@ -1329,7 +1329,7 @@ void SdStyleSheet::BroadcastSdStyleSheetChange(SfxStyleSheetBase* pStyleSheet,
PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool)
{
SdStyleSheet* pRealSheet = static_cast<SdStyleSheet*>(pStyleSheet)->GetRealStyleSheet();
- pRealSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ pRealSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
if( (ePO >= PO_OUTLINE_1) && (ePO <= PO_OUTLINE_8) )
{
@@ -1344,7 +1344,7 @@ void SdStyleSheet::BroadcastSdStyleSheetChange(SfxStyleSheetBase* pStyleSheet,
if(pSheet)
{
SdStyleSheet* pRealStyleSheet = static_cast<SdStyleSheet*>(pSheet)->GetRealStyleSheet();
- pRealStyleSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ pRealStyleSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
}
}
}
diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
index d7f0dc03ab3c..5a1aa3f7e655 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
@@ -49,7 +49,7 @@ namespace accessibility
{
if( mpOutliner )
mpOutliner->SetNotifyHdl( Link<EENotify&,void>() );
- Broadcast( TextHint( SFX_HINT_DYING ) );
+ Broadcast( TextHint( SfxHintId::Dying ) );
}
SvxEditSource* AccessibleOutlineEditSource::Clone() const
@@ -175,7 +175,7 @@ namespace accessibility
if( &rBroadcaster == mpOutliner )
{
- if( rHint.GetId() == SFX_HINT_DYING )
+ if( rHint.GetId() == SfxHintId::Dying )
{
bDispose = true;
mpOutliner = nullptr;
@@ -198,7 +198,7 @@ namespace accessibility
mpOutliner->SetNotifyHdl( Link<EENotify&,void>() );
mpOutliner = nullptr;
mpOutlinerView = nullptr;
- Broadcast( TextHint( SFX_HINT_DYING ) );
+ Broadcast( TextHint( SfxHintId::Dying ) );
}
}
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index 18df03c9cd69..ebef895ad347 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -119,7 +119,7 @@ SdModule::~SdModule()
/// get notifications
void SdModule::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if( rHint.GetId() == SFX_HINT_DEINITIALIZING )
+ if( rHint.GetId() == SfxHintId::Deinitializing )
{
delete pImpressOptions;
pImpressOptions = nullptr;
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 12b55eeb1d8f..f0a06b234fdd 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -809,7 +809,7 @@ void SdTransferable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
else
{
- if( rHint.GetId() == SFX_HINT_DYING )
+ if( rHint.GetId() == SfxHintId::Dying )
{
if( &rBC == mpSourceDoc )
mpSourceDoc = nullptr;
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 6d987cbd59ab..6efc4a9f826b 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -193,7 +193,7 @@ void SdDocPreviewWin::updateViewSettings()
void SdDocPreviewWin::Notify(SfxBroadcaster&, const SfxHint& rHint)
{
- if( rHint.GetId() == SFX_HINT_COLORS_CHANGED )
+ if( rHint.GetId() == SfxHintId::ColorsChanged )
{
updateViewSettings();
}
diff --git a/sd/source/ui/dlg/unchss.cxx b/sd/source/ui/dlg/unchss.cxx
index a0cd44131be1..604ddd093209 100644
--- a/sd/source/ui/dlg/unchss.cxx
+++ b/sd/source/ui/dlg/unchss.cxx
@@ -101,9 +101,9 @@ void StyleSheetUndoAction::Undo()
mpStyleSheet->GetItemSet().Set(aNewSet);
if( mpStyleSheet->GetFamily() == SD_STYLE_FAMILY_PSEUDO )
- static_cast<SdStyleSheet*>(mpStyleSheet)->GetRealStyleSheet()->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ static_cast<SdStyleSheet*>(mpStyleSheet)->GetRealStyleSheet()->Broadcast(SfxHint(SfxHintId::DataChanged));
else
- mpStyleSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ mpStyleSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
}
void StyleSheetUndoAction::Redo()
@@ -113,9 +113,9 @@ void StyleSheetUndoAction::Redo()
mpStyleSheet->GetItemSet().Set(aNewSet);
if( mpStyleSheet->GetFamily() == SD_STYLE_FAMILY_PSEUDO )
- static_cast<SdStyleSheet*>(mpStyleSheet)->GetRealStyleSheet()->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ static_cast<SdStyleSheet*>(mpStyleSheet)->GetRealStyleSheet()->Broadcast(SfxHint(SfxHintId::DataChanged));
else
- mpStyleSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ mpStyleSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index f07eb0fbac75..05d27b647db1 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -172,7 +172,7 @@ DrawDocShell::~DrawDocShell()
// destroyed. This has been introduced for the PreviewRenderer to
// free its view (that uses the item poll of the doc shell) but
// may be useful in other places as well.
- Broadcast(SfxHint(SFX_HINT_DYING));
+ Broadcast(SfxHint(SfxHintId::Dying));
mbInDestruction = true;
@@ -429,7 +429,7 @@ void DrawDocShell::SetModified( bool bSet /* = true */ )
if ( mpDoc )
mpDoc->NbcSetChanged( bSet );
- Broadcast( SfxHint( SFX_HINT_DOCCHANGED ) );
+ Broadcast( SfxHint( SfxHintId::DocChanged ) );
}
}
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index d614f06c3a5f..faff98541cac 100644
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -970,7 +970,7 @@ void SAL_CALL LifetimeController::disposing (const lang::EventObject& rEvent)
void LifetimeController::Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint)
{
(void)rBroadcaster;
- if (rHint.GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SfxHintId::Dying)
{
mbListeningToViewShellBase = false;
Update();
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 15515f88463c..998e15756133 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -412,7 +412,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
mpDocSh->GetUndoManager()->AddUndoAction(pAction);
pStyleSheet->GetItemSet().Put( *(pTempSet.get()) );
sdr::properties::CleanupFillProperties( pStyleSheet->GetItemSet() );
- pStyleSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ pStyleSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
}
else if( bSetToAllPages )
{
@@ -434,7 +434,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
pUndoGroup->AddAction(pAction);
pStyle->GetItemSet().Put( *(pTempSet.get()) );
sdr::properties::CleanupFillProperties( pStyleSheet->GetItemSet() );
- pStyle->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ pStyle->Broadcast(SfxHint(SfxHintId::DataChanged));
}
//Remove background from all pages to reset to the master bg
diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx
index 575638d4f58d..683c7e58cab1 100644
--- a/sd/source/ui/func/fuprobjs.cxx
+++ b/sd/source/ui/func/fuprobjs.cxx
@@ -149,7 +149,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
mpDocSh->GetUndoManager()->AddUndoAction(pAction);
pStyleSheet->GetItemSet().Put( *pOutSet );
- static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxHint( SFX_HINT_DATACHANGED ) );
+ static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxHint( SfxHintId::DataChanged ) );
}
}
}
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index 535237564c7a..33d8a0e654a2 100644
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -420,7 +420,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
{
pFirstStyleSheet->GetItemSet().Put( SvxNumBulletItem( aRule, EE_PARA_NUMBULLET ));
SdStyleSheet* pRealSheet = static_cast<SdStyleSheet*>(pFirstStyleSheet)->GetRealStyleSheet();
- pRealSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ pRealSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
}
aTempSet.ClearItem( EE_PARA_NUMBULLET );
@@ -507,7 +507,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
}
}
- static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxHint( SFX_HINT_DATACHANGED ) );
+ static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxHint( SfxHintId::DataChanged ) );
DrawViewShell* pDrawViewShell = dynamic_cast< DrawViewShell* >( mpViewShell );
if( pDrawViewShell )
@@ -596,7 +596,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
mpView->SetStyleSheet( static_cast<SfxStyleSheet*>(pStyleSheet));
}
- static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxHint( SFX_HINT_DATACHANGED ) );
+ static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxHint( SfxHintId::DataChanged ) );
mpDoc->SetChanged();
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_STYLE_FAMILY2 );
@@ -623,7 +623,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
mpView->SetStyleSheet( static_cast<SfxStyleSheet*>(pStyleSheet));
- static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxHint( SFX_HINT_DATACHANGED ) );
+ static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxHint( SfxHintId::DataChanged ) );
mpDoc->SetChanged();
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_STYLE_FAMILY2 );
}
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index 4e7ed4167752..0d6f2a499945 100644
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -332,15 +332,10 @@ void Listener::Notify (
break;
}
}
- else
+ else if (rHint.GetId() == SfxHintId::DocChanged)
{
- switch (rHint.GetId())
- {
- case SFX_HINT_DOCCHANGED:
- mrController.CheckForMasterPageAssignment();
- mrController.CheckForSlideTransitionAssignment();
- break;
- }
+ mrController.CheckForMasterPageAssignment();
+ mrController.CheckForSlideTransitionAssignment();
}
}
diff --git a/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx b/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx
index 34b85638bd31..f2935097d846 100644
--- a/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx
@@ -72,7 +72,7 @@ void TransferableData::Notify (SfxBroadcaster&, const SfxHint& rHint)
{
if (mpViewShell)
{
- if (rHint.GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SfxHintId::Dying)
{
// This hint may come either from the ViewShell or from the
// document (registered by SdTransferable). We do not know
diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx
index 924a5e91e6a9..fc9f3763f1cc 100644
--- a/sd/source/ui/tools/EventMultiplexer.cxx
+++ b/sd/source/ui/tools/EventMultiplexer.cxx
@@ -655,7 +655,7 @@ void EventMultiplexer::Implementation::Notify (
}
else
{
- if (rHint.GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SfxHintId::Dying)
mpDocument = nullptr;
}
}
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index 8d39a1e335dc..f174577eef6c 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -477,7 +477,7 @@ void PreviewRenderer::Notify(SfxBroadcaster&, const SfxHint& rHint)
if (!mpDocShellOfView)
return;
- if (rHint.GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SfxHintId::Dying)
{
// The doc shell is dying. Our view uses its item pool and
// has to be destroyed as well. The next call to
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index b3ef578dbe1c..bfa63e6d8ff4 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -428,7 +428,7 @@ void SdXImpressDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
else
{
// did our SdDrawDocument just died?
- if(rHint.GetId() == SFX_HINT_DYING)
+ if(rHint.GetId() == SfxHintId::Dying)
{
// yes, so we ask for a new one
if( mpDocShell )
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 79256111916b..6dfcbfd36747 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1174,7 +1174,7 @@ public:
if (&rBroadcaster != &static_cast<SfxBroadcaster&>(mrBase))
return;
- if (rHint.GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SfxHintId::Dying)
{
mbIsDisposed = true;
}
diff --git a/sd/source/ui/view/FormShellManager.cxx b/sd/source/ui/view/FormShellManager.cxx
index 41b567fb9107..e10c6120ac76 100644
--- a/sd/source/ui/view/FormShellManager.cxx
+++ b/sd/source/ui/view/FormShellManager.cxx
@@ -263,7 +263,7 @@ IMPL_LINK(FormShellManager, WindowEventHandler, VclWindowEvent&, rEvent, void)
void FormShellManager::Notify(SfxBroadcaster&, const SfxHint& rHint)
{
- if (rHint.GetId()==SFX_HINT_DYING)
+ if (rHint.GetId()==SfxHintId::Dying)
{
// If all goes well this listener is called after the
// FormShellManager was notified about the dying form shell by the
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index d91cc295a6ca..c5f2cd99b179 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -167,7 +167,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
mpDocSh->GetUndoManager()->AddUndoAction(pAction);
pSheet->GetItemSet().Put(aTempSet);
- pSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ pSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
bOk = true;
}
else if (eObjKind == OBJ_OUTLINETEXT)
@@ -218,7 +218,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
mpDocSh->GetUndoManager()->AddUndoAction(pAction);
pSheet->GetItemSet().Put(aTempSet);
- pSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ pSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
// now also broadcast any child sheets
sal_Int16 nChild;
@@ -229,7 +229,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
SfxStyleSheet* pOutlSheet = static_cast< SfxStyleSheet* >(pStShPool->Find(aSheetName, SD_STYLE_FAMILY_MASTERPAGE));
if( pOutlSheet )
- pOutlSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ pOutlSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
}
}
@@ -294,7 +294,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
mpDocSh->GetUndoManager()->AddUndoAction(pAction);
pSheet->GetItemSet().Put(aTempSet,false);
- pSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ pSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
bOk = true;
}
else if (eObjKind == OBJ_OUTLINETEXT)
@@ -337,7 +337,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
mpDocSh->GetUndoManager()->AddUndoAction(pAction);
pSheet->GetItemSet().Set(aTempSet,false);
- pSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
+ pSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
}
// remove all hard set items from shape that are now set in style
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 56c43e9d67d4..17b136025af7 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -723,7 +723,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
void DrawViewShell::Notify (SfxBroadcaster&, const SfxHint& rHint)
{
- if (rHint.GetId()==SFX_HINT_MODECHANGED)
+ if (rHint.GetId()==SfxHintId::ModeChanged)
{
// Change to selection when turning on read-only mode.
if(GetDocSh()->IsReadOnly() && dynamic_cast< FuSelection* >( GetCurrentFunction().get() ) )
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index 1a3433913fc2..0785329a912b 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -419,7 +419,7 @@ ViewOverlayManager::~ViewOverlayManager()
void ViewOverlayManager::Notify(SfxBroadcaster&, const SfxHint& rHint)
{
- if (rHint.GetId() == SFX_HINT_DOCCHANGED)
+ if (rHint.GetId() == SfxHintId::DocChanged)
{
UpdateTags();
}
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 246d6854cea5..b240377a881c 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -217,7 +217,7 @@ SfxApplication::~SfxApplication()
{
SAL_WARN_IF(GetObjectShells_Impl().size() != 0, "sfx.appl", "Memory leak: some object shells were not removed!");
- Broadcast( SfxHint(SFX_HINT_DYING) );
+ Broadcast( SfxHint(SfxHintId::Dying) );
for (auto &module : pImpl->aModules) // Clear modules
module.reset();
diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx
index 48a0839aef4f..a93ff2c24c3a 100644
--- a/sfx2/source/appl/appbaslib.cxx
+++ b/sfx2/source/appl/appbaslib.cxx
@@ -45,7 +45,7 @@ void SfxBasicManagerHolder::Notify(SfxBroadcaster& rBC, SfxHint const& rHint)
{
if (!mpBasicManager || &rBC != mpBasicManager)
return;
- if (SFX_HINT_DYING == rHint.GetId())
+ if (SfxHintId::Dying == rHint.GetId())
{
mpBasicManager = nullptr;
mxBasicContainer.clear();
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 4b4a394c2bc2..2bae14867dc3 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -95,7 +95,7 @@ public:
void SfxEventAsyncer_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if( rHint.GetId() == SFX_HINT_DYING && pIdle->IsActive() )
+ if( rHint.GetId() == SfxHintId::Dying && pIdle->IsActive() )
{
pIdle->Stop();
delete this;
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 592420ef9b91..c3808798d0f8 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -111,7 +111,7 @@ void SAL_CALL SfxTerminateListener_Impl::notifyTermination( const EventObject& a
Scheduler::ImplDeInitScheduler();
SfxApplication* pApp = SfxGetpApp();
- pApp->Broadcast( SfxHint( SFX_HINT_DEINITIALIZING ) );
+ pApp->Broadcast( SfxHint( SfxHintId::Deinitializing ) );
pApp->Get_Impl()->pAppDispatch->ReleaseAll();
pApp->Get_Impl()->pAppDispatch->release();
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 4562cc1d8063..e5f1d86db779 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1198,7 +1198,7 @@ void SfxBindings::UpdateSlotServer_Impl()
}
pImpl->bMsgDirty = pImpl->bAllMsgDirty = false;
- Broadcast( SfxHint(SFX_HINT_DOCCHANGED) );
+ Broadcast( SfxHint(SfxHintId::DocChanged) );
}
@@ -1529,7 +1529,7 @@ bool SfxBindings::NextJob_Impl(Timer * pTimer)
// Update round is finished
pImpl->bInNextJob = false;
- Broadcast(SfxHint(SFX_HINT_UPDATEDONE));
+ Broadcast(SfxHint(SfxHintId::UpdateDone));
return true;
}
@@ -1686,7 +1686,7 @@ void SfxBindings::SetDispatcher( SfxDispatcher *pDisp )
}
}
- Broadcast( SfxHint( SFX_HINT_DATACHANGED ) );
+ Broadcast( SfxHint( SfxHintId::DataChanged ) );
if ( pDisp )
{
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index 2c8f1ea69cb4..de254f1b2e8c 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -95,7 +95,7 @@ struct SfxRequest_Impl: public SfxListener
void SfxRequest_Impl::Notify( SfxBroadcaster&, const SfxHint &rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
pAnti->Cancel();
}
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 266f98f559b7..b319f2957ec3 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -64,11 +64,8 @@ public:
void SfxModelessDialog_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- switch( rHint.GetId() )
- {
- case SFX_HINT_DYING:
- pMgr->Destroy();
- break;
+ if( rHint.GetId() == SfxHintId::Dying) {
+ pMgr->Destroy();
}
}
@@ -85,11 +82,8 @@ public:
void SfxFloatingWindow_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- switch( rHint.GetId() )
- {
- case SFX_HINT_DYING:
- pMgr->Destroy();
- break;
+ if( rHint.GetId() == SfxHintId::Dying) {
+ pMgr->Destroy();
}
}
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 833c25487b4f..d84f7300d5a0 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1409,12 +1409,12 @@ IMPL_LINK_NOARG( SfxCommonTemplateDialog_Impl, TimeOut, Idle *, void )
void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
- const sal_uInt32 nId = rHint.GetId();
+ const SfxHintId nId = rHint.GetId();
// tap update
switch(nId)
{
- case SFX_HINT_UPDATEDONE:
+ case SfxHintId::UpdateDone:
{
SfxViewFrame *pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
SfxObjectShell *pDocShell = pViewFrame->GetObjectShell();
@@ -1464,22 +1464,23 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
// Necessary if switching between documents and in both documents
// the same template is used. Do not immediately call Update_Impl,
// for the case that one of the documents is an internal InPlaceObjekt!
- case SFX_HINT_DOCCHANGED:
+ case SfxHintId::DocChanged:
bUpdate = true;
break;
- case SFX_HINT_DYING:
+ case SfxHintId::Dying:
{
EndListening(*pStyleSheetPool);
pStyleSheetPool=nullptr;
break;
}
+ default: break;
}
// Do not set timer when the stylesheet pool is in the box, because it is
// possible that a new one is registered after the timer is up -
// works bad in UpdateStyles_Impl ()!
- if(!bDontUpdate && nId != SFX_HINT_DYING &&
+ if(!bDontUpdate && nId != SfxHintId::Dying &&
(dynamic_cast<const SfxStyleSheetPoolHint*>(&rHint) ||
dynamic_cast<const SfxStyleSheetHint*>(&rHint) ||
dynamic_cast<const SfxStyleSheetHintExtended*>(&rHint)))
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 569a92f87939..4fc3f8212ef2 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -339,7 +339,7 @@ void SfxObjectShell::ModifyChanged()
Invalidate( SID_SIGNATURE );
Invalidate( SID_MACRO_SIGNATURE );
- Broadcast( SfxHint( SFX_HINT_TITLECHANGED ) ); // xmlsec05, signed state might change in title...
+ Broadcast( SfxHint( SfxHintId::TitleChanged ) ); // xmlsec05, signed state might change in title...
SfxGetpApp()->NotifyEvent( SfxEventHint( SFX_EVENT_MODIFYCHANGED, GlobalEventConfig::GetEventName(GlobalEventId::MODIFYCHANGED), this ) );
}
@@ -394,7 +394,7 @@ void SfxObjectShell::SetReadOnlyUI( bool bReadOnly )
if ( bReadOnly != pImpl->bReadOnlyUI )
{
pImpl->bReadOnlyUI = bReadOnly;
- Broadcast( SfxHint(SFX_HINT_MODECHANGED) );
+ Broadcast( SfxHint(SfxHintId::ModeChanged) );
}
}
@@ -420,7 +420,7 @@ void SfxObjectShell::SetReadOnly()
pMedium->GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, true ) );
if ( !bWasROUI )
- Broadcast( SfxHint(SFX_HINT_MODECHANGED) );
+ Broadcast( SfxHint(SfxHintId::ModeChanged) );
}
}
@@ -447,7 +447,7 @@ void SfxObjectShell::SetMacroMode_Impl( bool bModal )
if ( !pImpl->bRunningMacro != !bModal )
{
pImpl->bRunningMacro = bModal;
- Broadcast( SfxHint( SFX_HINT_MODECHANGED ) );
+ Broadcast( SfxHint( SfxHintId::ModeChanged ) );
}
}
@@ -467,7 +467,7 @@ void SfxObjectShell::SetModalMode_Impl( bool bModal )
// Switch
pImpl->bModalMode = bModal;
- Broadcast( SfxHint( SFX_HINT_MODECHANGED ) );
+ Broadcast( SfxHint( SfxHintId::ModeChanged ) );
}
}
@@ -706,7 +706,7 @@ void SfxObjectShell::SetTitle
if ( GetMedium() )
{
SfxShell::SetName( GetTitle(SFX_TITLE_APINAME) );
- Broadcast( SfxHint(SFX_HINT_TITLECHANGED) );
+ Broadcast( SfxHint(SfxHintId::TitleChanged) );
}
}
@@ -900,7 +900,7 @@ void SfxObjectShell::InvalidateName()
pImpl->aTitle.clear();
SetName( GetTitle( SFX_TITLE_APINAME ) );
- Broadcast( SfxHint(SFX_HINT_TITLECHANGED) );
+ Broadcast( SfxHint(SfxHintId::TitleChanged) );
}
@@ -912,7 +912,7 @@ void SfxObjectShell::SetNamedVisibility_Impl()
if ( !HasName() && USHRT_MAX == pImpl->nVisualDocumentNumber && pImpl->aTitle.isEmpty() )
{
pImpl->nVisualDocumentNumber = SfxGetpApp()->GetFreeIndex();
- Broadcast( SfxHint(SFX_HINT_TITLECHANGED) );
+ Broadcast( SfxHint(SfxHintId::TitleChanged) );
}
}
@@ -1210,7 +1210,7 @@ void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags )
SetInitialized_Impl( false );
// Title is not available until loading has finished
- Broadcast( SfxHint( SFX_HINT_TITLECHANGED ) );
+ Broadcast( SfxHint( SfxHintId::TitleChanged ) );
if ( pImpl->nEventId )
PostActivateEvent_Impl(SfxViewFrame::GetFirst(this));
}
@@ -1301,7 +1301,7 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad()
pTmpMedium->SetOpenMode( SFX_STREAM_READWRITE, true );
// notifications about possible changes in readonly state and document info
- Broadcast( SfxHint(SFX_HINT_MODECHANGED) );
+ Broadcast( SfxHint(SfxHintId::ModeChanged) );
// created untitled document can't be modified
SetModified( false );
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 6547aff74b5d..82b94fd0b467 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1462,7 +1462,7 @@ void SfxObjectShell::ImplSign( bool bScriptingContent )
Invalidate( SID_SIGNATURE );
Invalidate( SID_MACRO_SIGNATURE );
- Broadcast( SfxHint(SFX_HINT_TITLECHANGED) );
+ Broadcast( SfxHint(SfxHintId::TitleChanged) );
}
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index ed67e58d5a11..5067d18d2218 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -838,7 +838,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
if( IsOwnStorageFormat(*pMed) && pMed->GetFilter() )
{
}
- Broadcast( SfxHint(SFX_HINT_NAMECHANGED) );
+ Broadcast( SfxHint(SfxHintId::NameChanged) );
if ( SfxObjectCreateMode::EMBEDDED != eCreateMode )
{
@@ -1961,7 +1961,7 @@ bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed, bool bRegisterRecent )
{
if (!pNewMed->GetName().isEmpty())
bHasName = true;
- Broadcast( SfxHint(SFX_HINT_NAMECHANGED) );
+ Broadcast( SfxHint(SfxHintId::NameChanged) );
EnableSetModified(false);
getDocProperties()->setGenerator(
::utl::DocInfoHelper::GetGeneratorString() );
@@ -2075,7 +2075,7 @@ bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed, bool bRegisterRecent )
if (!pNewMed->GetName().isEmpty() && SfxObjectCreateMode::EMBEDDED != eCreateMode)
InvalidateName();
SetModified(false); // reset only by set medium
- Broadcast( SfxHint(SFX_HINT_MODECHANGED) );
+ Broadcast( SfxHint(SfxHintId::ModeChanged) );
// this is the end of the saving process, it is possible that
// the file was changed
@@ -2736,7 +2736,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
}
if ( bWasReadonly && !bSaveTo )
- Broadcast( SfxHint(SFX_HINT_MODECHANGED) );
+ Broadcast( SfxHint(SfxHintId::ModeChanged) );
return true;
}
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 438b4d7b2493..4bfbe7a3fa9d 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -168,7 +168,7 @@ void SAL_CALL SfxModelListener_Impl::queryClosing( const css::lang::EventObject&
void SAL_CALL SfxModelListener_Impl::notifyClosing( const css::lang::EventObject& ) throw ( css::uno::RuntimeException, std::exception )
{
SolarMutexGuard aSolarGuard;
- mpDoc->Broadcast( SfxHint(SFX_HINT_DEINITIALIZING) );
+ mpDoc->Broadcast( SfxHint(SfxHintId::Deinitializing) );
}
void SAL_CALL SfxModelListener_Impl::disposing( const css::lang::EventObject& _rEvent ) throw ( css::uno::RuntimeException, std::exception )
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 17e248a3cda0..2570e16fb763 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2716,7 +2716,7 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
if ( &rBC == m_pData->m_pObjectShell.get() )
{
- if ( rHint.GetId() == SFX_HINT_DOCCHANGED )
+ if ( rHint.GetId() == SfxHintId::DocChanged )
changing();
const SfxEventHint* pNamedHint = dynamic_cast<const SfxEventHint*>(&rHint);
@@ -2792,13 +2792,13 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
postEvent_Impl( pNamedHint->GetEventName(), pViewHint ? pViewHint->GetController() : Reference< frame::XController2 >() );
}
- if ( rHint.GetId() == SFX_HINT_TITLECHANGED )
+ if ( rHint.GetId() == SfxHintId::TitleChanged )
{
OUString aTitle = m_pData->m_pObjectShell->GetTitle();
addTitle_Impl( m_pData->m_seqArguments, aTitle );
postEvent_Impl( GlobalEventConfig::GetEventName( GlobalEventId::TITLECHANGED ) );
}
- if ( rHint.GetId() == SFX_HINT_MODECHANGED )
+ if ( rHint.GetId() == SfxHintId::ModeChanged )
{
postEvent_Impl( GlobalEventConfig::GetEventName( GlobalEventId::MODECHANGED ) );
}
diff --git a/sfx2/source/notify/openurlhint.cxx b/sfx2/source/notify/openurlhint.cxx
index 2ac7a0c5a67b..424c0d81b157 100644
--- a/sfx2/source/notify/openurlhint.cxx
+++ b/sfx2/source/notify/openurlhint.cxx
@@ -21,7 +21,6 @@
#include <sfx2/sfxsids.hrc>
SfxOpenUrlHint::SfxOpenUrlHint( const OUString& sDocumentURL ) :
- SfxHint( SID_OPENURL ),
msDocumentURL(sDocumentURL) { }
const OUString& SfxOpenUrlHint::GetDocumentURL() const
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index e9cf6eb1d55d..75d4a4348915 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -270,7 +270,7 @@ void SfxFrame::CancelTransfers()
if( !pFrm )
{
pObj->CancelTransfers();
- GetCurrentDocument()->Broadcast( SfxHint(SFX_HINT_TITLECHANGED) );
+ GetCurrentDocument()->Broadcast( SfxHint(SfxHintId::TitleChanged) );
}
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 42d97d8ab626..6e11dfdf55fc 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -498,7 +498,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
else
{
pSh->DoSaveCompleted( pMed );
- pSh->Broadcast( SfxHint(SFX_HINT_MODECHANGED) );
+ pSh->Broadcast( SfxHint(SfxHintId::ModeChanged) );
rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), true ) );
rReq.Done( true );
return;
@@ -1031,8 +1031,8 @@ void SfxViewFrame::ReleaseObjectShell_Impl()
m_pDispatcher->Flush();
EndListening( *m_xObjSh );
- Notify( *m_xObjSh, SfxHint(SFX_HINT_TITLECHANGED) );
- Notify( *m_xObjSh, SfxHint(SFX_HINT_DOCCHANGED) );
+ Notify( *m_xObjSh, SfxHint(SfxHintId::TitleChanged) );
+ Notify( *m_xObjSh, SfxHint(SfxHintId::DocChanged) );
if ( 1 == m_xObjSh->GetOwnerLockCount() && m_pImpl->bObjLocked && m_xObjSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
m_xObjSh->DoClose();
@@ -1059,7 +1059,7 @@ bool SfxViewFrame::Close()
// not be saved automatically anymore.
if ( GetViewShell() )
GetViewShell()->DiscardClients_Impl();
- Broadcast( SfxHint( SFX_HINT_DYING ) );
+ Broadcast( SfxHint( SfxHintId::Dying ) );
if (SfxViewFrame::Current() == this)
SfxViewFrame::SetViewFrame( nullptr );
@@ -1245,7 +1245,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
switch( rHint.GetId() )
{
- case SFX_HINT_MODECHANGED:
+ case SfxHintId::ModeChanged:
{
UpdateTitle();
@@ -1283,7 +1283,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
break;
}
- case SFX_HINT_TITLECHANGED:
+ case SfxHintId::TitleChanged:
{
UpdateTitle();
SfxBindings& rBind = GetBindings();
@@ -1294,17 +1294,17 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
break;
}
- case SFX_HINT_DEINITIALIZING:
+ case SfxHintId::Deinitializing:
GetFrame().DoClose();
break;
- case SFX_HINT_DYING:
+ case SfxHintId::Dying:
// when the Object is being deleted, destroy the view too
if ( m_xObjSh.Is() )
ReleaseObjectShell_Impl();
else
GetFrame().DoClose();
break;
-
+ default: break;
}
}
}
@@ -1359,8 +1359,8 @@ void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
m_pDispatcher->Push( *pObjSh );
m_pDispatcher->Flush();
StartListening( *pObjSh );
- Notify( *pObjSh, SfxHint(SFX_HINT_TITLECHANGED) );
- Notify( *pObjSh, SfxHint(SFX_HINT_DOCCHANGED) );
+ Notify( *pObjSh, SfxHint(SfxHintId::TitleChanged) );
+ Notify( *pObjSh, SfxHint(SfxHintId::DocChanged) );
m_pDispatcher->SetReadOnly_Impl( pObjSh->IsReadOnly() );
}
else
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index 625bf0a526c5..e031b206fd74 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -85,7 +85,7 @@ void SfxViewFrame::UpdateTitle()
[Note]
This is for example necessary if one listens to the SfxObjectShell as
- SfxListener and then react on the <SfxSimpleHint> SFX_HINT_TITLECHANGED,
+ SfxListener and then react on the <SfxSimpleHint> SfxHintId::TitleChanged,
then query the title of his views. However these views (SfxTopViewFrames)
are also SfxListener and because the order of notifications might not be
fixed, the title update will be enforced in advance.
@@ -98,7 +98,7 @@ void SfxViewFrame::UpdateTitle()
{
switch( ( (SfxSimpleHint&) rHint ).GetId() )
{
- case SFX_HINT_TITLECHANGED:
+ case SfxHintId::TitleChanged:
for ( SfxViewFrame *pTop = SfxViewFrame::GetFirst( this );
pTop;
pTop = SfxViewFrame::GetNext( this );
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 605ca9db7cbc..b139f55e3e5e 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -168,7 +168,7 @@ SfxPrinterController::SfxPrinterController( const VclPtr<Printer>& i_rPrinter,
void SfxPrinterController::Notify( SfxBroadcaster& , const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SfxHintId::Dying )
{
EndListening(*mpViewShell);
EndListening(*mpObjectShell);
diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx
index c49655f2a0e4..7dc1a9c32930 100644
--- a/starmath/inc/format.hxx
+++ b/starmath/inc/format.hxx
@@ -82,9 +82,6 @@
#define DIS_END 23
-// to be broadcasted on format changes:
-#define HINT_FORMATCHANGED 10003
-
enum SmHorAlign { AlignLeft, AlignCenter, AlignRight };
OUString GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent );
@@ -140,7 +137,7 @@ public:
void RequestApplyChanges()
{
- Broadcast(SfxHint(HINT_FORMATCHANGED));
+ Broadcast(SfxHint(SfxHintId::MathFormatChanged));
}
};
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index b849bdd4e0be..1ea663b8ddb9 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -1188,7 +1188,7 @@ void SmMathConfig::ItemSetToConfig(const SfxItemSet &rSet)
SetIgnoreSpacesRight( bVal );
// reformat (displayed) formulas accordingly
- Broadcast(SfxHint(HINT_FORMATCHANGED));
+ Broadcast(SfxHint(SfxHintId::MathFormatChanged));
}
}
if (rSet.GetItemState(SID_SAVE_ONLY_USED_SYMBOLS, true, &pItem) == SfxItemState::SET)
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 142bc78f9f28..87c1961d431a 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -115,15 +115,13 @@ SFX_IMPL_OBJECTFACTORY(SmDocShell, SvGlobalName(SO3_SM_CLASSID), SfxObjectShellF
void SmDocShell::Notify(SfxBroadcaster&, const SfxHint& rHint)
{
- switch (rHint.GetId())
+ if (rHint.GetId() == SfxHintId::MathFormatChanged)
{
- case HINT_FORMATCHANGED:
- SetFormulaArranged(false);
+ SetFormulaArranged(false);
- mnModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
+ mnModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
- Repaint();
- break;
+ Repaint();
}
}
@@ -1312,7 +1310,7 @@ void SmDocShell::SetModified(bool bModified)
if( IsEnableSetModified() )
{
SfxObjectShell::SetModified( bModified );
- Broadcast(SfxHint(SFX_HINT_DOCCHANGED));
+ Broadcast(SfxHint(SfxHintId::DocChanged));
}
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 00bae3b48c3f..4486a89bbd27 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -2043,8 +2043,8 @@ void SmViewShell::Notify( SfxBroadcaster& , const SfxHint& rHint )
{
switch( rHint.GetId() )
{
- case SFX_HINT_MODECHANGED:
- case SFX_HINT_DOCCHANGED:
+ case SfxHintId::ModeChanged:
+ case SfxHintId::DocChanged:
GetViewFrame()->GetBindings().InvalidateAll(false);
break;
default:
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index c61fec457129..27caf7c2e708 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -488,7 +488,7 @@ void SfxItemPool::Delete()
return;
// Inform e.g. running Requests
- pImpl->aBC.Broadcast( SfxHint( SFX_HINT_DYING ) );
+ pImpl->aBC.Broadcast( SfxHint( SfxHintId::Dying ) );
// Iterate through twice: first for the SetItems.
if (pImpl->ppStaticDefaults != nullptr) {
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 63842fdaa655..a96cc5f22019 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -62,7 +62,7 @@ aDbgStyleSheetReferences;
SfxStyleSheetHintExtended::SfxStyleSheetHintExtended
(
- sal_uInt16 nAction, // SfxStyleSheetHintId::... (see above)
+ SfxHintId nAction,
const OUString& rOldName,
SfxStyleSheetBase& rStyleSheet // Remains with the caller
)
@@ -73,11 +73,10 @@ SfxStyleSheetHintExtended::SfxStyleSheetHintExtended
SfxStyleSheetHint::SfxStyleSheetHint
(
- sal_uInt16 nAction, // SfxStyleSheetHintId::... (see above)
+ SfxHintId nAction,
SfxStyleSheetBase& rStyleSheet // Remains with the caller
)
-: pStyleSh( &rStyleSheet ),
- nHint( nAction )
+: SfxHint(nAction), pStyleSh( &rStyleSheet )
{}
@@ -187,7 +186,7 @@ bool SfxStyleSheetBase::SetName(const OUString& rName, bool bReIndexNow)
pPool->Reindex();
pPool->SetSearchMask(eTmpFam, nTmpMask);
pPool->Broadcast( SfxStyleSheetHintExtended(
- SfxStyleSheetHintId::MODIFIED, aOldName, *this ) );
+ SfxHintId::StyleSheetModified, aOldName, *this ) );
}
return true;
}
@@ -235,14 +234,14 @@ bool SfxStyleSheetBase::SetParent( const OUString& rName )
}
aParent = rName;
}
- pPool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::MODIFIED, *this ) );
+ pPool->Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetModified, *this ) );
return true;
}
void SfxStyleSheetBase::SetHidden( bool hidden )
{
bHidden = hidden;
- pPool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::MODIFIED, *this ) );
+ pPool->Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetModified, *this ) );
}
/**
@@ -264,7 +263,7 @@ bool SfxStyleSheetBase::SetFollow( const OUString& rName )
}
aFollow = rName;
}
- pPool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::MODIFIED, *this ) );
+ pPool->Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetModified, *this ) );
return true;
}
@@ -606,7 +605,7 @@ SfxStyleSheetBasePool::~SfxStyleSheetBasePool()
aDbgStyleSheetReferences.mnPools--;
#endif
- Broadcast( SfxHint(SFX_HINT_DYING) );
+ Broadcast( SfxHint(SfxHintId::Dying) );
Clear();
}
@@ -664,7 +663,7 @@ SfxStyleSheetBase& SfxStyleSheetBasePool::Make( const OUString& rName, SfxStyleF
{
xStyle = Create( rName, eFam, mask );
StoreStyleSheet(xStyle);
- Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::CREATED, *xStyle.get() ) );
+ Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetCreated, *xStyle.get() ) );
}
return *xStyle.get();
}
@@ -682,7 +681,7 @@ void SfxStyleSheetBasePool::Add( const SfxStyleSheetBase& rSheet )
}
rtl::Reference< SfxStyleSheetBase > xNew( Create( rSheet ) );
pImpl->mxIndexedStyleSheets->AddStyleSheet(xNew);
- Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::CHANGED, *xNew.get() ) );
+ Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetChanged, *xNew.get() ) );
}
SfxStyleSheetBasePool& SfxStyleSheetBasePool::operator=( const SfxStyleSheetBasePool& r )
@@ -773,7 +772,7 @@ void SfxStyleSheetBasePool::Remove( SfxStyleSheetBase* p )
// catch( css::uno::Exception& )
// {
// }
- Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::ERASED, *p ) );
+ Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetErased, *p ) );
}
}
}
@@ -793,7 +792,7 @@ void SfxStyleSheetBasePool::Insert( SfxStyleSheetBase* p )
}
#endif
StoreStyleSheet(rtl::Reference< SfxStyleSheetBase >( p ) );
- Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::CREATED, *p ) );
+ Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetCreated, *p ) );
}
namespace
@@ -816,7 +815,7 @@ struct StyleSheetDisposerFunctor final : public svl::StyleSheetDisposer
catch( css::uno::Exception& )
{
}
- mPool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::ERASED, *styleSheet.get() ) );
+ mPool->Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetErased, *styleSheet.get() ) );
}
SfxStyleSheetBasePool* mPool;
@@ -871,7 +870,7 @@ SfxStyleSheet::SfxStyleSheet(const SfxStyleSheet& rStyle)
SfxStyleSheet::~SfxStyleSheet()
{
- Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::INDESTRUCTION, *this ) );
+ Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetInDestruction, *this ) );
}
diff --git a/svl/source/notify/SfxBroadcaster.cxx b/svl/source/notify/SfxBroadcaster.cxx
index 3b069b1989fc..089628112b71 100644
--- a/svl/source/notify/SfxBroadcaster.cxx
+++ b/svl/source/notify/SfxBroadcaster.cxx
@@ -55,7 +55,7 @@ void SfxBroadcaster::Broadcast( const SfxHint &rHint )
SfxBroadcaster::~SfxBroadcaster()
{
- Broadcast( SfxHint(SFX_HINT_DYING) );
+ Broadcast( SfxHint(SfxHintId::Dying) );
// remove all still registered listeners
for (size_t i = 0; i < mpImpl->m_Listeners.size(); ++i)
diff --git a/svl/source/notify/broadcast.cxx b/svl/source/notify/broadcast.cxx
index cd110e19e66e..237c323e5d0b 100644
--- a/svl/source/notify/broadcast.cxx
+++ b/svl/source/notify/broadcast.cxx
@@ -101,7 +101,7 @@ SvtBroadcaster::SvtBroadcaster( const SvtBroadcaster &rBC ) :
SvtBroadcaster::~SvtBroadcaster()
{
mbDisposing = true;
- Broadcast( SfxHint(SFX_HINT_DYING) );
+ Broadcast( SfxHint(SfxHintId::Dying) );
Normalize();
diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx
index 32bd75a5973c..95f82913fd12 100644
--- a/svtools/source/config/accessibilityoptions.cxx
+++ b/svtools/source/config/accessibilityoptions.cxx
@@ -391,7 +391,7 @@ SvtAccessibilityOptions::~SvtAccessibilityOptions()
void SvtAccessibilityOptions::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
NotifyListeners(ConfigurationHints::NONE);
- if ( rHint.GetId() == SFX_HINT_ACCESSIBILITY_CHANGED )
+ if ( rHint.GetId() == SfxHintId::AccessibilityChanged )
SetVCLSettings();
}
diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index 9c6c9d187140..07ba461c310b 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -396,7 +396,7 @@ void ExtendedColorConfig_Impl::Notify( const uno::Sequence<OUString>& /*rProp
m_bBroadcastWhenUnlocked = true;
}
else
- Broadcast(SfxHint(SFX_HINT_COLORS_CHANGED));
+ Broadcast(SfxHint(SfxHintId::ColorsChanged));
}
void ExtendedColorConfig_Impl::ImplCommit()
@@ -495,7 +495,7 @@ void ExtendedColorConfig_Impl::SettingsChanged()
{
SolarMutexGuard aVclGuard;
- Broadcast( SfxHint( SFX_HINT_COLORS_CHANGED ) );
+ Broadcast( SfxHint( SfxHintId::ColorsChanged ) );
}
void ExtendedColorConfig_Impl::LockBroadcast()
@@ -513,7 +513,7 @@ void ExtendedColorConfig_Impl::UnlockBroadcast()
if ( ExtendedColorConfig::m_pImpl && ExtendedColorConfig::m_pImpl->m_bIsBroadcastEnabled )
{
m_bBroadcastWhenUnlocked = false;
- ExtendedColorConfig::m_pImpl->Broadcast(SfxHint(SFX_HINT_COLORS_CHANGED));
+ ExtendedColorConfig::m_pImpl->Broadcast(SfxHint(SfxHintId::ColorsChanged));
}
}
}
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx
index 39ad4c88b44e..e3b392258ee0 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -991,7 +991,7 @@ namespace accessibility
/** functor processing queue events
- Reacts on TEXT_HINT_PARAINSERTED/REMOVED events and stores
+ Reacts on SfxHintId::TextParaInserted/REMOVED events and stores
their content
*/
class AccessibleTextHelper_QueueFunctor : public ::std::unary_function< const SfxHint*, void >
@@ -1000,7 +1000,7 @@ namespace accessibility
AccessibleTextHelper_QueueFunctor() :
mnParasChanged( 0 ),
mnParaIndex(-1),
- mnHintId(-1)
+ mnHintId(SfxHintId::NONE)
{}
void operator()( const SfxHint* pEvent )
{
@@ -1012,8 +1012,8 @@ namespace accessibility
const SvxEditSourceHint* pEditSourceHint = dynamic_cast<const SvxEditSourceHint*>( pEvent );
if( !pEditSourceHint && pTextHint &&
- (pTextHint->GetId() == TEXT_HINT_PARAINSERTED ||
- pTextHint->GetId() == TEXT_HINT_PARAREMOVED ) )
+ (pTextHint->GetId() == SfxHintId::TextParaInserted ||
+ pTextHint->GetId() == SfxHintId::TextParaRemoved ) )
{
if( pTextHint->GetValue() == EE_PARA_ALL )
{
@@ -1045,7 +1045,7 @@ namespace accessibility
@return hint id of last interesting event (REMOVED/INSERTED).
*/
- int GetHintId() { return mnHintId; }
+ SfxHintId GetHintId() { return mnHintId; }
private:
/** number of paragraphs changed during queue processing. -1 for
@@ -1055,7 +1055,7 @@ namespace accessibility
/// index of paragraph added/removed last
sal_Int32 mnParaIndex;
/// TextHint ID (removed/inserted) of last interesting event
- int mnHintId;
+ SfxHintId mnHintId;
};
void AccessibleTextHelper_Impl::ProcessQueue()
@@ -1083,7 +1083,7 @@ namespace accessibility
// #103483# Exactly one paragraph added/removed. This is
// the normal case, optimize event handling here.
- if( aFunctor.GetHintId() == TEXT_HINT_PARAINSERTED )
+ if( aFunctor.GetHintId() == SfxHintId::TextParaInserted )
{
// update num of paras
maParaManager.SetNum( nNewParas );
@@ -1110,7 +1110,7 @@ namespace accessibility
OSL_FAIL("AccessibleTextHelper_Impl::ProcessQueue: could not create new paragraph");
}
}
- else if( aFunctor.GetHintId() == TEXT_HINT_PARAREMOVED )
+ else if( aFunctor.GetHintId() == SfxHintId::TextParaRemoved )
{
::accessibility::AccessibleParaManager::VectorOfChildren::const_iterator begin = maParaManager.begin();
::std::advance( begin, aFunctor.GetParaIndex() );
@@ -1185,7 +1185,7 @@ namespace accessibility
{
switch( pEditSourceHint->GetId() )
{
- case EDITSOURCE_HINT_PARASMOVED:
+ case SfxHintId::EditSourceParasMoved:
{
DBG_ASSERT( pEditSourceHint->GetStartValue() < GetTextForwarder().GetParagraphCount() &&
pEditSourceHint->GetEndValue() < GetTextForwarder().GetParagraphCount(),
@@ -1203,7 +1203,7 @@ namespace accessibility
break;
}
- case EDITSOURCE_HINT_SELECTIONCHANGED:
+ case SfxHintId::EditSourceSelectionChanged:
// notify listeners
try
{
@@ -1212,13 +1212,14 @@ namespace accessibility
// maybe we're not in edit mode (this is not an error)
catch( const uno::Exception& ) {}
break;
+ default: break;
}
}
else if( pTextHint )
{
switch( pTextHint->GetId() )
{
- case TEXT_HINT_MODIFIED:
+ case SfxHintId::TextModified:
{
// notify listeners
sal_Int32 nPara( pTextHint->GetValue() );
@@ -1242,21 +1243,22 @@ namespace accessibility
break;
}
- case TEXT_HINT_PARAINSERTED:
+ case SfxHintId::TextParaInserted:
// already happened above
break;
- case TEXT_HINT_PARAREMOVED:
+ case SfxHintId::TextParaRemoved:
// already happened above
break;
- case TEXT_HINT_TEXTHEIGHTCHANGED:
+ case SfxHintId::TextHeightChanged:
// visibility changed, done below
break;
- case TEXT_HINT_VIEWSCROLLED:
+ case SfxHintId::TextViewScrolled:
// visibility changed, done below
break;
+ default: break;
}
// in all cases, check visibility afterwards.
@@ -1306,22 +1308,16 @@ namespace accessibility
}
}
// it's VITAL to keep the SfxSimpleHint last! It's the base of some classes above!
- else if( rHint.GetId() )
+ else if( rHint.GetId() == SfxHintId::Dying)
{
- switch( rHint.GetId() )
+ // edit source is dying under us, become defunc then
+ try
{
- case SFX_HINT_DYING:
- // edit source is dying under us, become defunc then
- try
- {
- // make edit source inaccessible
- // Note: cannot destroy it here, since we're called from there!
- ShutdownEditSource();
- }
- catch( const uno::Exception& ) {}
-
- break;
+ // make edit source inaccessible
+ // Note: cannot destroy it here, since we're called from there!
+ ShutdownEditSource();
}
+ catch( const uno::Exception& ) {}
}
}
catch( const uno::Exception& )
@@ -1384,8 +1380,8 @@ namespace accessibility
{
switch( pTextHint->GetId() )
{
- case TEXT_HINT_BLOCKNOTIFICATION_END:
- case TEXT_HINT_INPUT_END:
+ case SfxHintId::TextBlockNotificationEnd:
+ case SfxHintId::TextInputEnd:
--maEventOpenFrames;
if( maEventOpenFrames == 0 )
@@ -1411,8 +1407,8 @@ namespace accessibility
}
break;
- case TEXT_HINT_BLOCKNOTIFICATION_START:
- case TEXT_HINT_INPUT_START:
+ case SfxHintId::TextBlockNotificationStart:
+ case SfxHintId::TextInputStart:
++maEventOpenFrames;
// no FALLTHROUGH reason: event will not be processed,
// thus appending the event isn't necessary. (#i27299#)
@@ -1426,24 +1422,18 @@ namespace accessibility
}
}
// it's VITAL to keep the SfxHint last! It's the base of the classes above!
- else if( rHint.GetId() )
+ else if( rHint.GetId() == SfxHintId::Dying )
{
// handle this event _at once_, because after that, objects are invalid
- switch( rHint.GetId() )
+ // edit source is dying under us, become defunc then
+ maEventQueue.Clear();
+ try
{
- case SFX_HINT_DYING:
- // edit source is dying under us, become defunc then
- maEventQueue.Clear();
- try
- {
- // make edit source inaccessible
- // Note: cannot destroy it here, since we're called from there!
- ShutdownEditSource();
- }
- catch( const uno::Exception& ) {}
-
- break;
+ // make edit source inaccessible
+ // Note: cannot destroy it here, since we're called from there!
+ ShutdownEditSource();
}
+ catch( const uno::Exception& ) {}
}
}
catch( const uno::Exception& )
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index 261bb8cc1579..6f7e27cf8a13 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -747,7 +747,7 @@ void SvxGraphCtrlAccessibleContext::Notify( SfxBroadcaster& /*rBC*/, const SfxHi
else
{
// Has our SdDrawDocument just died?
- if(rHint.GetId() == SFX_HINT_DYING)
+ if(rHint.GetId() == SfxHintId::Dying)
{
dispose();
}
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 9cd586654e31..e5b256036021 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -3336,7 +3336,7 @@ void SvxRuler::Notify(SfxBroadcaster&, const SfxHint& rHint)
*/
// start update
- if (bActive && rHint.GetId() == SFX_HINT_UPDATEDONE)
+ if (bActive && rHint.GetId() == SfxHintId::UpdateDone)
{
Update();
EndListening(*pBindings);
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index e70361d6d91b..da616c8bf9fe 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -305,17 +305,18 @@ void FmXUndoEnvironment::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
break;
}
}
- else if (rHint.GetId())
+ else if (rHint.GetId() != SfxHintId::NONE)
{
switch (rHint.GetId())
{
- case SFX_HINT_DYING:
+ case SfxHintId::Dying:
dispose();
rModel.SetObjectShell( nullptr );
break;
- case SFX_HINT_MODECHANGED:
+ case SfxHintId::ModeChanged:
ModeChanged();
break;
+ default: break;
}
}
else if (const SfxEventHint* pEventHint = dynamic_cast<const SfxEventHint*>(&rHint))
diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx
index db20c2f75650..8775fe5bd32f 100644
--- a/svx/source/form/navigatortreemodel.cxx
+++ b/svx/source/form/navigatortreemodel.cxx
@@ -701,10 +701,9 @@ namespace svxform
}
}
// is shell gone?
- else if (rHint.GetId())
+ else if (rHint.GetId() == SfxHintId::Dying)
{
- if (rHint.GetId() == SFX_HINT_DYING)
- UpdateContent(nullptr);
+ UpdateContent(nullptr);
}
// changed mark of controls?
else if (const FmNavViewMarksChanged* pvmcHint = dynamic_cast<const FmNavViewMarksChanged*>(&rHint))
diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx
index 23cb3d0e945c..5dad59138d08 100644
--- a/svx/source/sdr/properties/attributeproperties.cxx
+++ b/svx/source/sdr/properties/attributeproperties.cxx
@@ -525,21 +525,21 @@ namespace sdr
SdrObject& rObj = GetSdrObject();
//SdrPage* pPage = rObj.GetPage();
- switch(pStyleHint->GetHint())
+ switch(pStyleHint->GetId())
{
- case SfxStyleSheetHintId::CREATED :
+ case SfxHintId::StyleSheetCreated :
{
// cannot happen, nothing to do
break;
}
- case SfxStyleSheetHintId::MODIFIED :
- case SfxStyleSheetHintId::CHANGED :
+ case SfxHintId::StyleSheetModified :
+ case SfxHintId::StyleSheetChanged :
{
// notify change
break;
}
- case SfxStyleSheetHintId::ERASED :
- case SfxStyleSheetHintId::INDESTRUCTION :
+ case SfxHintId::StyleSheetErased :
+ case SfxHintId::StyleSheetInDestruction :
{
// Style needs to be exchanged
SfxStyleSheet* pNewStSh = nullptr;
@@ -572,6 +572,7 @@ namespace sdr
break;
}
+ default: break;
}
// Get old BoundRect. Do this after the style change is handled
diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx
index 6246d5804971..2f7c2fd0f5f2 100644
--- a/svx/source/sdr/properties/customshapeproperties.cxx
+++ b/svx/source/sdr/properties/customshapeproperties.cxx
@@ -215,15 +215,16 @@ namespace sdr
if ( pStyleHint && pStyleHint->GetStyleSheet() == GetStyleSheet() )
{
- switch( pStyleHint->GetHint() )
+ switch( pStyleHint->GetId() )
{
- case SfxStyleSheetHintId::MODIFIED :
- case SfxStyleSheetHintId::CHANGED :
+ case SfxHintId::StyleSheetModified :
+ case SfxHintId::StyleSheetChanged :
bRemoveRenderGeometry = true;
break;
+ default: break;
};
}
- else if ( rHint.GetId() == SFX_HINT_DATACHANGED )
+ else if ( rHint.GetId() == SfxHintId::DataChanged )
{
bRemoveRenderGeometry = true;
}
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index e87d52509653..884f9be39bca 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -554,9 +554,9 @@ namespace sdr
const svx::ITextProvider& rTextProvider(getTextProvider());
if(dynamic_cast<const SfxStyleSheet *>(&rBC) != nullptr)
{
- sal_uInt32 nId(rHint.GetId());
+ SfxHintId nId(rHint.GetId());
- if(SFX_HINT_DATACHANGED == nId)
+ if(SfxHintId::DataChanged == nId)
{
rObj.SetPortionInfoChecked(false);
@@ -580,7 +580,7 @@ namespace sdr
maVersion++;
}
- if(SFX_HINT_DYING == nId)
+ if(SfxHintId::Dying == nId)
{
rObj.SetPortionInfoChecked(false);
sal_Int32 nText = rTextProvider.getTextCount();
@@ -597,7 +597,7 @@ namespace sdr
const SfxStyleSheetHintExtended* pExtendedHint = dynamic_cast<const SfxStyleSheetHintExtended*>(&rHint);
if(pExtendedHint
- && SfxStyleSheetHintId::MODIFIED == pExtendedHint->GetHint())
+ && SfxHintId::StyleSheetModified == pExtendedHint->GetId())
{
OUString aOldName(pExtendedHint->GetOldName());
OUString aNewName(pExtendedHint->GetStyleSheet()->GetName());
diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx
index a188e1d2a105..964bf6388d9c 100644
--- a/svx/source/svdraw/svdoattr.cxx
+++ b/svx/source/svdraw/svdoattr.cxx
@@ -121,7 +121,7 @@ void SdrAttrObj::SetModel(SdrModel* pNewModel)
void SdrAttrObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
- bool bDataChg(SFX_HINT_DATACHANGED == rHint.GetId());
+ bool bDataChg(SfxHintId::DataChanged == rHint.GetId());
if(bDataChg)
{
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 5b7c594e5730..1dca9ab9b943 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -1561,9 +1561,9 @@ line (CL). The number of object margins per object varies between 0 and 3:
void SdrEdgeObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
- const sal_uInt32 nId = rHint.GetId();
- bool bDataChg=nId==SFX_HINT_DATACHANGED;
- bool bDying=nId==SFX_HINT_DYING;
+ const SfxHintId nId = rHint.GetId();
+ bool bDataChg=nId==SfxHintId::DataChanged;
+ bool bDying=nId==SfxHintId::Dying;
bool bObj1=aCon1.pObj!=nullptr && aCon1.pObj->GetBroadcaster()==&rBC;
bool bObj2=aCon2.pObj!=nullptr && aCon2.pObj->GetBroadcaster()==&rBC;
if (bDying && (bObj1 || bObj2)) {
@@ -1609,13 +1609,13 @@ void SdrEdgeObj::Reformat()
{
if( nullptr != aCon1.pObj )
{
- SfxHint aHint( SFX_HINT_DATACHANGED );
+ SfxHint aHint( SfxHintId::DataChanged );
Notify( *const_cast<SfxBroadcaster*>(aCon1.pObj->GetBroadcaster()), aHint );
}
if( nullptr != aCon2.pObj )
{
- SfxHint aHint( SFX_HINT_DATACHANGED );
+ SfxHint aHint( SfxHintId::DataChanged );
Notify( *const_cast<SfxBroadcaster*>(aCon2.pObj->GetBroadcaster()), aHint );
}
}
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index f052d6964c1a..b40fd8bd9176 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1929,7 +1929,7 @@ void SdrTextObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus )
{
const EditStatusFlags nStat = pEditStatus->GetStatusWord();
const bool bGrowX = bool(nStat & EditStatusFlags::TEXTWIDTHCHANGED);
- const bool bGrowY = bool(nStat & EditStatusFlags::TEXTHEIGHTCHANGED);
+ const bool bGrowY = bool(nStat & EditStatusFlags::TextHeightChanged);
if(bTextFrame && (bGrowX || bGrowY))
{
if ((bGrowX && IsAutoGrowWidth()) || (bGrowY && IsAutoGrowHeight()))
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index c24ee3560094..4a7ef86fd10e 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -1101,18 +1101,19 @@ void SdrPageProperties::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
switch(rHint.GetId())
{
- case SFX_HINT_DATACHANGED :
+ case SfxHintId::DataChanged :
{
// notify change, broadcast
ImpPageChange(*mpSdrPage);
break;
}
- case SFX_HINT_DYING :
+ case SfxHintId::Dying :
{
// Style needs to be forgotten
ImpRemoveStyleSheet();
break;
}
+ default: break;
}
}
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index ba49f814d698..0642d39f5cee 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -231,7 +231,7 @@ void SdrPaintView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
//If the stylesheet has been destroyed
if (&rBC == mpDefaultStyleSheet)
{
- if (rHint.GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SfxHintId::Dying)
mpDefaultStyleSheet = nullptr;
return;
}
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 0f448535b777..c951223827f1 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -1313,7 +1313,7 @@ bool SdrTableObj::IsTextEditActive( const CellPos& rPos )
void SdrTableObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus )
{
- if( (pEditStatus->GetStatusWord() & EditStatusFlags::TEXTHEIGHTCHANGED) && mpImpl.is() && mpImpl->mpLayouter )
+ if( (pEditStatus->GetStatusWord() & EditStatusFlags::TextHeightChanged) && mpImpl.is() && mpImpl->mpLayouter )
{
Rectangle aRect0( maRect );
maRect = maLogicRect;
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 3a5705f64508..11b57fa15b5c 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -317,7 +317,7 @@ void SvxTextEditSourceImpl::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
// #i105988 keep reference to this object
rtl::Reference< SvxTextEditSourceImpl > xThis( this );
- if (SFX_HINT_DYING == rHint.GetId())
+ if (SfxHintId::Dying == rHint.GetId())
{
if (&rBC == mpView)
{
@@ -445,7 +445,7 @@ void SvxTextEditSourceImpl::ObjectInDestruction(const SdrObject&)
{
mpObject = nullptr;
dispose();
- Broadcast( SfxHint( SFX_HINT_DYING ) );
+ Broadcast( SfxHint( SfxHintId::Dying ) );
}
/* unregister at all objects and set all references to 0 */
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 175dc6eca1c7..7e901e8906d8 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -931,7 +931,7 @@ public:
bool bRegardLanguage = true,
bool bBroadcast = false);
void BroadcastStyleOperation(const OUString& rName, SfxStyleFamily eFamily,
- sal_uInt16 nOp);
+ SfxHintId nOp);
/** The html import sometimes overwrites the
page sizes set in the page descriptions. This function is used to
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index 78a65d6a7dab..6af436661c51 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -252,7 +252,7 @@ class SwSectionFrameMoveAndDeleteHint : public SfxHint
{
public:
SwSectionFrameMoveAndDeleteHint( const bool bSaveContent )
- : SfxHint( SFX_HINT_DYING )
+ : SfxHint( SfxHintId::Dying )
, mbSaveContent( bSaveContent )
{}
diff --git a/sw/inc/swhints.hxx b/sw/inc/swhints.hxx
deleted file mode 100644
index 04361fbe1af4..000000000000
--- a/sw/inc/swhints.hxx
+++ /dev/null
@@ -1,29 +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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SW_INC_SWHINTS_HXX
-#define INCLUDED_SW_INC_SWHINTS_HXX
-
-#include <svl/hint.hxx>
-
-#define SW_BROADCASTID_START SFX_HINT_USER00
-#define SW_BROADCAST_DRAWVIEWS_CREATED SW_BROADCASTID_START
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx
index bde43a81c846..4f95094eb545 100644
--- a/sw/source/core/doc/DocumentDrawModelManager.cxx
+++ b/sw/source/core/doc/DocumentDrawModelManager.cxx
@@ -29,7 +29,7 @@
#include <wrtsh.hxx>
#include <swtypes.hxx>
#include <ndtxt.hxx>
-#include <swhints.hxx>
+#include <svl/hint.hxx>
#include <viewsh.hxx>
#include <view.hxx>
#include <drawdoc.hxx>
@@ -226,7 +226,7 @@ SwDrawModel* DocumentDrawModelManager::MakeDrawModel_()
// Broadcast, so that the FormShell can be connected to the DrawView
if( m_rDoc.GetDocShell() )
{
- SfxHint aHint( SW_BROADCAST_DRAWVIEWS_CREATED );
+ SfxHint aHint( SfxHintId::SwDrawViewsCreated );
m_rDoc.GetDocShell()->Broadcast( aHint );
}
}
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 7d3d6fb29c0e..43bf4c721e46 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -594,7 +594,7 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
}
void SwDoc::BroadcastStyleOperation(const OUString& rName, SfxStyleFamily eFamily,
- sal_uInt16 nOp)
+ SfxHintId nOp)
{
if (mpDocShell)
{
@@ -622,7 +622,7 @@ void SwDoc::DelPageDesc( size_t i, bool bBroadcast )
if (bBroadcast)
BroadcastStyleOperation(rDel.GetName(), SfxStyleFamily::Page,
- SfxStyleSheetHintId::ERASED);
+ SfxHintId::StyleSheetErased);
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -672,7 +672,7 @@ SwPageDesc* SwDoc::MakePageDesc(const OUString &rName, const SwPageDesc *pCpy,
if (bBroadcast)
BroadcastStyleOperation(rName, SfxStyleFamily::Page,
- SfxStyleSheetHintId::CREATED);
+ SfxHintId::StyleSheetCreated);
if (GetIDocumentUndoRedo().DoesUndo())
{
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 7669a6d7d4bd..f628efd2733f 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -35,7 +35,7 @@
#include <frmfmt.hxx>
#include <charfmt.hxx>
#include <viewimp.hxx>
-#include <swhints.hxx>
+#include <svl/hint.hxx>
#include <doc.hxx>
#include <docfunc.hxx>
#include <IDocumentUndoRedo.hxx>
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index c8a03546eed1..738ad8b6dfbe 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -678,7 +678,7 @@ void SwDoc::DelCharFormat(size_t nFormat, bool bBroadcast)
if (bBroadcast)
BroadcastStyleOperation(pDel->GetName(), SfxStyleFamily::Char,
- SfxStyleSheetHintId::ERASED);
+ SfxHintId::StyleSheetErased);
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -717,7 +717,7 @@ void SwDoc::DelFrameFormat( SwFrameFormat *pFormat, bool bBroadcast )
if (bBroadcast)
BroadcastStyleOperation(pFormat->GetName(),
SfxStyleFamily::Frame,
- SfxStyleSheetHintId::ERASED);
+ SfxHintId::StyleSheetErased);
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -831,7 +831,7 @@ SwFrameFormat *SwDoc::MakeFrameFormat(const OUString &rFormatName,
if (bBroadcast)
{
BroadcastStyleOperation(rFormatName, SfxStyleFamily::Frame,
- SfxStyleSheetHintId::CREATED);
+ SfxHintId::StyleSheetCreated);
}
return pFormat;
@@ -867,7 +867,7 @@ SwCharFormat *SwDoc::MakeCharFormat( const OUString &rFormatName,
if (bBroadcast)
{
BroadcastStyleOperation(rFormatName, SfxStyleFamily::Char,
- SfxStyleSheetHintId::CREATED);
+ SfxHintId::StyleSheetCreated);
}
return pFormat;
@@ -903,7 +903,7 @@ SwTextFormatColl* SwDoc::MakeTextFormatColl( const OUString &rFormatName,
if (bBroadcast)
BroadcastStyleOperation(rFormatName, SfxStyleFamily::Para,
- SfxStyleSheetHintId::CREATED);
+ SfxHintId::StyleSheetCreated);
return pFormatColl;
}
@@ -937,7 +937,7 @@ SwConditionTextFormatColl* SwDoc::MakeCondTextFormatColl( const OUString &rForma
if (bBroadcast)
BroadcastStyleOperation(rFormatName, SfxStyleFamily::Para,
- SfxStyleSheetHintId::CREATED);
+ SfxHintId::StyleSheetCreated);
return pFormatColl;
}
@@ -966,7 +966,7 @@ void SwDoc::DelTextFormatColl(size_t nFormatColl, bool bBroadcast)
if (bBroadcast)
BroadcastStyleOperation(pDel->GetName(), SfxStyleFamily::Para,
- SfxStyleSheetHintId::ERASED);
+ SfxHintId::StyleSheetErased);
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -1911,7 +1911,7 @@ void SwDoc::RenameFormat(SwFormat & rFormat, const OUString & sNewName,
rFormat.SetName(sNewName);
if (bBroadcast)
- BroadcastStyleOperation(sNewName, eFamily, SfxStyleSheetHintId::MODIFIED);
+ BroadcastStyleOperation(sNewName, eFamily, SfxHintId::StyleSheetModified);
}
void SwDoc::dumpAsXml(xmlTextWriterPtr pWriter) const
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 202eb060dac2..deed273a105a 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1024,7 +1024,7 @@ bool SwDoc::DelNumRule( const OUString& rName, bool bBroadcast )
if (bBroadcast)
BroadcastStyleOperation(rName, SfxStyleFamily::Pseudo,
- SfxStyleSheetHintId::ERASED);
+ SfxHintId::StyleSheetErased);
getIDocumentListsAccess().deleteListForListStyle( rName );
getIDocumentListsAccess().deleteListsByDefaultListStyle( rName );
@@ -1097,7 +1097,7 @@ bool SwDoc::RenameNumRule(const OUString & rOldName, const OUString & rNewName,
if (bBroadcast)
BroadcastStyleOperation(rOldName, SfxStyleFamily::Pseudo,
- SfxStyleSheetHintId::MODIFIED);
+ SfxHintId::StyleSheetModified);
}
return bResult;
@@ -2183,7 +2183,7 @@ sal_uInt16 SwDoc::MakeNumRule( const OUString &rName,
if (bBroadcast)
BroadcastStyleOperation(pNew->GetName(), SfxStyleFamily::Pseudo,
- SfxStyleSheetHintId::CREATED);
+ SfxHintId::StyleSheetCreated);
return nRet;
}
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 633f3a860d82..9c8eb82e6020 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -4617,7 +4617,7 @@ SwTableAutoFormat* SwDoc::MakeTableStyle(const OUString& rName, bool bBroadcast)
}
if (bBroadcast)
- BroadcastStyleOperation(rName, SfxStyleFamily::Table, SfxStyleSheetHintId::CREATED);
+ BroadcastStyleOperation(rName, SfxStyleFamily::Table, SfxHintId::StyleSheetCreated);
return pTableFormat;
}
@@ -4625,7 +4625,7 @@ SwTableAutoFormat* SwDoc::MakeTableStyle(const OUString& rName, bool bBroadcast)
std::unique_ptr<SwTableAutoFormat> SwDoc::DelTableStyle(const OUString& rName, bool bBroadcast)
{
if (bBroadcast)
- BroadcastStyleOperation(rName, SfxStyleFamily::Table, SfxStyleSheetHintId::ERASED);
+ BroadcastStyleOperation(rName, SfxStyleFamily::Table, SfxHintId::StyleSheetErased);
std::unique_ptr<SwTableAutoFormat> pReleasedFormat = GetTableStyles().ReleaseAutoFormat(rName);
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 1cf252f3fffc..a40babee438d 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -3241,7 +3241,7 @@ void SwFrameHolder::Reset()
void SwFrameHolder::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_DYING && &rBC == pFrame )
+ if ( rHint.GetId() == SfxHintId::Dying && &rBC == pFrame )
{
pFrame = nullptr;
}
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 8f828e91eb37..6ced59ba0fa3 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -2231,7 +2231,7 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
if (bOldCallbackActionEnabled)
{
pSh->InvalidateWindows( SwRect( 0, 0, SAL_MAX_INT32, SAL_MAX_INT32 ) );
- pSh->GetDoc()->GetDocShell()->Broadcast(SfxHint(SFX_HINT_DOCCHANGED));
+ pSh->GetDoc()->GetDocShell()->Broadcast(SfxHint(SfxHintId::DocChanged));
}
}
}
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 08230e6a3329..db1e0e9bcd6f 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -2298,7 +2298,7 @@ void SwSectionFrame::SwClientNotify( const SwModify& rMod, const SfxHint& rHint
// #i117863#
const SwSectionFrameMoveAndDeleteHint* pHint =
dynamic_cast<const SwSectionFrameMoveAndDeleteHint*>(&rHint);
- if ( pHint && pHint->GetId() == SFX_HINT_DYING && &rMod == GetRegisteredIn() )
+ if ( pHint && pHint->GetId() == SfxHintId::Dying && &rMod == GetRegisteredIn() )
{
SwSectionFrame::MoveContentAndDelete( this, pHint->IsSaveContent() );
}
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 6e639627d404..46d4e078866d 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -2165,7 +2165,7 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
// do not delete note and later add it -> sidebar flickering
if (GetDoc()->GetDocShell())
{
- GetDoc()->GetDocShell()->Broadcast( SfxHint(SFX_HINT_USER04));
+ GetDoc()->GetDocShell()->Broadcast( SfxHint(SfxHintId::SwSplitNodeOperation));
}
// Attribut verschieben
m_pSwpHints->Delete( pHt );
@@ -2188,7 +2188,7 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
| SetAttrMode::DONTREPLACE );
if (GetDoc()->GetDocShell())
{
- GetDoc()->GetDocShell()->Broadcast( SfxHint(SFX_HINT_USER04));
+ GetDoc()->GetDocShell()->Broadcast( SfxHint(SfxHintId::SwSplitNodeOperation));
}
continue; // while-Schleife weiter, ohne ++ !
}
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 0615ff5857ec..f84ddc7362ef 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -243,7 +243,7 @@ namespace sw
//SfxListener
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override
{
- if(rHint.GetId() & SFX_HINT_DYING)
+ if(rHint.GetId() == SfxHintId::Dying)
{
m_pBasePool = nullptr;
m_pDocShell = nullptr;
@@ -2761,12 +2761,12 @@ uno::Any SwXStyle::getPropertyDefault(const OUString& rPropertyName)
void SwXStyle::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
- if((rHint.GetId() & SFX_HINT_DYING) || (rHint.GetId() & SfxStyleSheetHintId::ERASED))
+ if((rHint.GetId() == SfxHintId::Dying) || (rHint.GetId() == SfxHintId::StyleSheetErased))
{
m_pBasePool = nullptr;
EndListening(rBC);
}
- else if(rHint.GetId() & (SfxStyleSheetHintId::CHANGED))
+ else if(rHint.GetId() == SfxHintId::StyleSheetChanged)
{
static_cast<SfxStyleSheetBasePool&>(rBC).SetSearchMask(m_rEntry.m_eFamily);
SfxStyleSheetBase* pOwnBase = static_cast<SfxStyleSheetBasePool&>(rBC).Find(m_sStyleName);
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 8463afda22ce..bb6bcd8e7390 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -1342,8 +1342,8 @@ void AddressMultiLineEdit::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
if (m_aSelectionLink.IsSet() && dynamic_cast<const TextHint*>(&rHint))
{
const TextHint& rTextHint = static_cast<const TextHint&>(rHint);
- if (rTextHint.GetId() == TEXT_HINT_VIEWSELECTIONCHANGED ||
- rTextHint.GetId() == TEXT_HINT_VIEWCARETCHANGED)
+ if (rTextHint.GetId() == SfxHintId::TextViewSelectionChanged ||
+ rTextHint.GetId() == SfxHintId::TextViewCaretChanged)
{
m_aSelectionLink.Call(*this);
}
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 3db0af314bf0..3948cf591b0b 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -874,7 +874,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
else
{
- if (rHint.GetId() == SFX_HINT_DEINITIALIZING)
+ if (rHint.GetId() == SfxHintId::Deinitializing)
{
DELETEZ(m_pWebUsrPref);
DELETEZ(m_pUsrPref);
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 899ee0ea20e7..65080d282cdc 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -247,8 +247,8 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
lcl_processCompatibleSfxHint( xVbaEvents, rHint );
sal_uInt16 nAction = 0;
- if( dynamic_cast<const SfxEventHint*>(&rHint) &&
- static_cast<const SfxEventHint&>( rHint).GetEventId() == SFX_EVENT_LOADFINISHED )
+ auto pEventHint = dynamic_cast<const SfxEventHint*>(&rHint);
+ if( pEventHint && pEventHint->GetEventId() == SFX_EVENT_LOADFINISHED )
{
// #i38126# - own action id
nAction = 3;
@@ -256,12 +256,10 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
else
{
// switch for more actions
- switch( rHint.GetId() )
+ if( rHint.GetId() == SfxHintId::TitleChanged)
{
- case SFX_HINT_TITLECHANGED:
- if( GetMedium() )
- nAction = 2;
- break;
+ if( GetMedium() )
+ nAction = 2;
}
}
@@ -1262,7 +1260,7 @@ void SwDocShell::SetModified( bool bSet )
}
UpdateChildWindows();
- Broadcast(SfxHint(SFX_HINT_DOCCHANGED));
+ Broadcast(SfxHint(SfxHintId::DocChanged));
}
}
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index ee02b382a861..2172c86653ce 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -628,7 +628,7 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl, LinkParamNone*, void)
pView->InvalidateRulerPos();
if( m_bNew )
- m_xBasePool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::CREATED, *m_xTmp.get() ) );
+ m_xBasePool->Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetCreated, *m_xTmp.get() ) );
pDoc->getIDocumentState().SetModified();
if( !m_bModified )
@@ -880,7 +880,7 @@ sal_uInt16 SwDocShell::Edit(
m_pView->InvalidateRulerPos();
if( bNew )
- m_xBasePool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::CREATED, *xTmp.get() ) );
+ m_xBasePool->Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetCreated, *xTmp.get() ) );
m_pDoc->getIDocumentState().SetModified();
if( !bModified ) // Bug 57028
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index aa999ea4894e..a4257fa71fb3 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -564,7 +564,7 @@ void SwDocStyleSheet::SetGrabBagItem(const uno::Any& rVal)
if (bChg)
{
dynamic_cast<SwDocStyleSheetPool&>(*pPool).InvalidateIterator();
- pPool->Broadcast(SfxStyleSheetHint(SfxStyleSheetHintId::MODIFIED, *this));
+ pPool->Broadcast(SfxStyleSheetHint(SfxHintId::StyleSheetModified, *this));
SwEditShell* pSh = rDoc.GetEditShell();
if (pSh)
pSh->CallChgLnk();
@@ -675,7 +675,7 @@ void SwDocStyleSheet::SetHidden( bool bValue )
{
// calling pPool->First() here would be quite slow...
dynamic_cast<SwDocStyleSheetPool&>(*pPool).InvalidateIterator(); // internal list has to be updated
- pPool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::MODIFIED, *this ) );
+ pPool->Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetModified, *this ) );
SwEditShell* pSh = rDoc.GetEditShell();
if( pSh )
pSh->CallChgLnk();
@@ -1153,7 +1153,7 @@ bool SwDocStyleSheet::SetName(const OUString& rStr, bool bReindexNow)
if( bChg )
{
pPool->First(); // internal list has to be updated
- pPool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::MODIFIED, *this ) );
+ pPool->Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetModified, *this ) );
SwEditShell* pSh = rDoc.GetEditShell();
if( pSh )
pSh->CallChgLnk();
@@ -1204,7 +1204,7 @@ bool SwDocStyleSheet::SetParent( const OUString& rStr)
if( bRet )
{
aParent = rStr;
- pPool->Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::MODIFIED,
+ pPool->Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetModified,
*this ) );
}
}
@@ -2508,7 +2508,7 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
}
if( bBroadcast )
- Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::ERASED, *pStyle ) );
+ Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetErased, *pStyle ) );
}
bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
@@ -2560,7 +2560,7 @@ bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
else
mxStyleSheet->PresetFollow( OUString() );
- Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::MODIFIED,
+ Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetModified,
*(mxStyleSheet.get()) ) );
}
}
@@ -3204,7 +3204,7 @@ void SwStyleSheetIterator::Notify( SfxBroadcaster&, const SfxHint& rHint )
// search and remove from View-List!!
const SfxStyleSheetHint* pStyleSheetHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint);
if( pStyleSheetHint &&
- SfxStyleSheetHintId::ERASED == pStyleSheetHint->GetHint() )
+ SfxHintId::StyleSheetErased == pStyleSheetHint->GetId() )
{
SfxStyleSheetBase* pStyle = pStyleSheetHint->GetStyleSheet();
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 8b2656a49c65..3e4aff029336 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -157,7 +157,7 @@ SwPostItMgr::SwPostItMgr(SwView* pView)
/* this code can be used once we want redline comments in the Sidebar
AddRedlineComments(false,false);
*/
- // we want to receive stuff like SFX_HINT_DOCCHANGED
+ // we want to receive stuff like SfxHintId::DocChanged
StartListening(*mpView->GetDocShell());
if (!mvPostItFields.empty())
{
@@ -363,10 +363,10 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
else
{
- sal_uInt32 nId = rHint.GetId();
+ SfxHintId nId = rHint.GetId();
switch ( nId )
{
- case SFX_HINT_MODECHANGED:
+ case SfxHintId::ModeChanged:
{
if ( mbReadOnly != !!(mpView->GetDocShell()->IsReadOnly()) )
{
@@ -376,7 +376,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
break;
}
- case SFX_HINT_DOCCHANGED:
+ case SfxHintId::DocChanged:
{
if ( mpView->GetDocShell() == &rBC )
{
@@ -388,13 +388,13 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
break;
}
- case SFX_HINT_USER04:
+ case SfxHintId::SwSplitNodeOperation:
{
// if we are in a SplitNode/Cut operation, do not delete note and then add again, as this will flicker
mbDeleteNote = !mbDeleteNote;
break;
}
- case SFX_HINT_DYING:
+ case SfxHintId::Dying:
{
if ( mpView->GetDocShell() != &rBC )
{
@@ -404,6 +404,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
break;
}
+ default: break;
}
}
}
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 1e7da99e0b69..51fa941346af 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -739,26 +739,27 @@ void SwSrcEditWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
switch (pTextHint->GetId())
{
- case TEXT_HINT_VIEWSCROLLED:
+ case SfxHintId::TextViewScrolled:
m_pHScrollbar->SetThumbPos( m_pTextView->GetStartDocPos().X() );
m_pVScrollbar->SetThumbPos( m_pTextView->GetStartDocPos().Y() );
break;
- case TEXT_HINT_TEXTHEIGHTCHANGED:
+ case SfxHintId::TextHeightChanged:
if ( m_pTextEngine->GetTextHeight() < m_pOutWin->GetOutputSizePixel().Height() )
m_pTextView->Scroll( 0, m_pTextView->GetStartDocPos().Y() );
m_pVScrollbar->SetThumbPos( m_pTextView->GetStartDocPos().Y() );
SetScrollBarRanges();
break;
- case TEXT_HINT_PARAINSERTED:
- case TEXT_HINT_PARACONTENTCHANGED:
+ case SfxHintId::TextParaInserted:
+ case SfxHintId::TextParaContentChanged:
if ( !m_bHighlighting )
{
m_aSyntaxLineTable.insert( static_cast<sal_uInt16>(pTextHint->GetValue()) );
m_aSyntaxIdle.Start();
}
break;
+ default: break;
}
}
diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx
index cfb0a8b69b84..328ac4518885 100644
--- a/sw/source/uibase/inc/redlndlg.hxx
+++ b/sw/source/uibase/inc/redlndlg.hxx
@@ -172,7 +172,7 @@ public:
virtual ~SwRedlineAcceptPanel() override;
virtual void dispose() override;
- /// We need to be a SfxListener to be able to update the list of changes when we get SFX_HINT_DOCCHANGED.
+ /// We need to be a SfxListener to be able to update the list of changes when we get SfxHintId::DocChanged.
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
};
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index ccfc18e8fb77..6263e25a2625 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -1235,7 +1235,7 @@ SwRedlineAcceptPanel::SwRedlineAcceptPanel(vcl::Window* pParent, const css::uno:
mpImplDlg->Init();
- // we want to receive SFX_HINT_DOCCHANGED
+ // we want to receive SfxHintId::DocChanged
StartListening(*(SW_MOD()->GetView()->GetDocShell()));
}
@@ -1253,7 +1253,7 @@ void SwRedlineAcceptPanel::dispose()
void SwRedlineAcceptPanel::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
- if (mpImplDlg && rHint.GetId() == SFX_HINT_DOCCHANGED)
+ if (mpImplDlg && rHint.GetId() == SfxHintId::DocChanged)
mpImplDlg->Activate();
}
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index 4903d09d0446..77950de87c9f 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -751,9 +751,9 @@ sal_Int32 SwSrcView::PrintSource(
void SwSrcView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- if ( rHint.GetId() == SFX_HINT_MODECHANGED ||
+ if ( rHint.GetId() == SfxHintId::ModeChanged ||
(
- rHint.GetId() == SFX_HINT_TITLECHANGED &&
+ rHint.GetId() == SfxHintId::TitleChanged &&
!GetDocShell()->IsReadOnly() && aEditWin->IsReadonly()
)
)
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index b0dba6ee354f..fcaf9de3fa8f 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -44,7 +44,7 @@
#include <svx/fontworkbar.hxx>
#include <unotxvw.hxx>
#include <cmdid.h>
-#include <swhints.hxx>
+#include <svl/hint.hxx>
#include <swmodule.hxx>
#include <inputwin.hxx>
#include <chartins.hxx>
@@ -1574,12 +1574,12 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
else
{
- sal_uInt32 nId = rHint.GetId();
+ SfxHintId nId = rHint.GetId();
switch ( nId )
{
// sub shells will be destroyed by the
// dispatcher, if the view frame is dying. Thus, reset member <pShell>.
- case SFX_HINT_DYING:
+ case SfxHintId::Dying:
{
if ( &rBC == GetViewFrame() )
{
@@ -1587,7 +1587,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
}
break;
- case SFX_HINT_MODECHANGED:
+ case SfxHintId::ModeChanged:
{
// Modal mode change-over?
bool bModal = GetDocShell()->IsInModalMode();
@@ -1597,7 +1597,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SAL_FALLTHROUGH;
- case SFX_HINT_TITLECHANGED:
+ case SfxHintId::TitleChanged:
if ( GetDocShell()->IsReadOnly() != GetWrtShell().GetViewOptions()->IsReadonly() )
{
SwWrtShell &rSh = GetWrtShell();
@@ -1629,7 +1629,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
break;
- case SW_BROADCAST_DRAWVIEWS_CREATED:
+ case SfxHintId::SwDrawViewsCreated:
{
bCallBase = false;
if ( GetFormShell() )
@@ -1641,6 +1641,8 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
}
break;
+
+ default: break;
}
}
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index dbb2cb51550f..44f96d8e1854 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -774,7 +774,7 @@ void SwXAutoTextEntry::Notify( SfxBroadcaster& _rBC, const SfxHint& _rHint )
}
else
{
- if ( SFX_HINT_DEINITIALIZING == _rHint.GetId() )
+ if ( SfxHintId::Deinitializing == _rHint.GetId() )
{
// our document is dying (possibly because we're shuting down, and the document was notified
// earlier than we are?)
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index cee4def454f0..79eed51b5295 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -130,7 +130,7 @@ public:
void SwGlobalFrameListener_Impl::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
- if( rHint.GetId() == SFX_HINT_DYING)
+ if( rHint.GetId() == SfxHintId::Dying)
bValid = false;
}
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 1a73048cc2d4..2adcb91b7c76 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -870,7 +870,7 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint )
{
if(&rBrdc == m_pCreateView)
{
- if (rHint.GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SfxHintId::Dying)
{
m_pCreateView = nullptr;
}
diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx
index 5a3b15c3ceaf..dec9f36b3429 100644
--- a/vcl/source/edit/textdata.cxx
+++ b/vcl/source/edit/textdata.cxx
@@ -311,11 +311,11 @@ void IdleFormatter::ForceTimeout()
}
}
-TextHint::TextHint( sal_uInt32 Id ) : SfxHint( Id ), mnValue(0)
+TextHint::TextHint( SfxHintId Id ) : SfxHint( Id ), mnValue(0)
{
}
-TextHint::TextHint( sal_uInt32 Id, sal_uLong nValue ) : SfxHint( Id ), mnValue(nValue)
+TextHint::TextHint( SfxHintId Id, sal_uLong nValue ) : SfxHint( Id ), mnValue(nValue)
{
}
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 4ba1f2353821..a631effaeea8 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -834,7 +834,7 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM )
TextModified();
if ( bFirstParaContentChanged )
- Broadcast( TextHint( TEXT_HINT_PARACONTENTCHANGED, rPaM.GetPara() ) );
+ Broadcast( TextHint( SfxHintId::TextParaContentChanged, rPaM.GetPara() ) );
return aPaM;
}
@@ -1518,7 +1518,7 @@ void TextEngine::FormatDoc()
{
const long nOldParaWidth = mnCurTextWidth >= 0 ? CalcTextWidth( nPara ) : -1;
- Broadcast( TextHint( TEXT_HINT_FORMATPARA, nPara ) );
+ Broadcast( TextHint( SfxHintId::TextFormatPara, nPara ) );
if ( CreateLines( nPara ) )
bGrow = true;
@@ -1577,14 +1577,14 @@ void TextEngine::FormatDoc()
if ( nDiff )
{
mbFormatted = true;
- Broadcast( TextHint( TEXT_HINT_TEXTHEIGHTCHANGED ) );
+ Broadcast( TextHint( SfxHintId::TextHeightChanged ) );
}
}
mbIsFormatting = false;
mbFormatted = true;
- Broadcast( TextHint( TEXT_HINT_TEXTFORMATTED ) );
+ Broadcast( TextHint( SfxHintId::TextFormatted ) );
}
void TextEngine::CreateAndInsertEmptyLine( sal_uInt32 nPara )
@@ -2663,7 +2663,7 @@ void TextEngine::ImpParagraphInserted( sal_uInt32 nPara )
}
}
}
- Broadcast( TextHint( TEXT_HINT_PARAINSERTED, nPara ) );
+ Broadcast( TextHint( SfxHintId::TextParaInserted, nPara ) );
}
void TextEngine::ImpParagraphRemoved( sal_uInt32 nPara )
@@ -2691,7 +2691,7 @@ void TextEngine::ImpParagraphRemoved( sal_uInt32 nPara )
}
}
}
- Broadcast( TextHint( TEXT_HINT_PARAREMOVED, nPara ) );
+ Broadcast( TextHint( SfxHintId::TextParaRemoved, nPara ) );
}
void TextEngine::ImpCharsRemoved( sal_uInt32 nPara, sal_Int32 nPos, sal_Int32 nChars )
@@ -2718,7 +2718,7 @@ void TextEngine::ImpCharsRemoved( sal_uInt32 nPara, sal_Int32 nPos, sal_Int32 nC
}
}
}
- Broadcast( TextHint( TEXT_HINT_PARACONTENTCHANGED, nPara ) );
+ Broadcast( TextHint( SfxHintId::TextParaContentChanged, nPara ) );
}
void TextEngine::ImpCharsInserted( sal_uInt32 nPara, sal_Int32 nPos, sal_Int32 nChars )
@@ -2742,7 +2742,7 @@ void TextEngine::ImpCharsInserted( sal_uInt32 nPara, sal_Int32 nPos, sal_Int32 n
}
}
}
- Broadcast( TextHint( TEXT_HINT_PARACONTENTCHANGED, nPara ) );
+ Broadcast( TextHint( SfxHintId::TextParaContentChanged, nPara ) );
}
void TextEngine::Draw( OutputDevice* pDev, const Point& rPos )
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 42c2201e0237..08627478b8e7 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -421,10 +421,10 @@ void TextView::ImpSetSelection( const TextSelection& rSelection )
mpImpl->maSelection = rSelection;
if (bSelection)
- mpImpl->mpTextEngine->Broadcast(TextHint(TEXT_HINT_VIEWSELECTIONCHANGED));
+ mpImpl->mpTextEngine->Broadcast(TextHint(SfxHintId::TextViewSelectionChanged));
if (bCaret)
- mpImpl->mpTextEngine->Broadcast(TextHint(TEXT_HINT_VIEWCARETCHANGED));
+ mpImpl->mpTextEngine->Broadcast(TextHint(SfxHintId::TextViewCaretChanged));
}
}
@@ -729,7 +729,7 @@ bool TextView::KeyInput( const KeyEvent& rKeyEvent )
}
if ( mpImpl->mpTextEngine->IsModified() )
- mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
+ mpImpl->mpTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
else if ( bWasModified )
mpImpl->mpTextEngine->SetModified( true );
@@ -747,7 +747,7 @@ void TextView::MouseButtonUp( const MouseEvent& rMouseEvent )
css::uno::Reference<css::datatransfer::clipboard::XClipboard> aSelection(GetWindow()->GetPrimarySelection());
Paste( aSelection );
if ( mpImpl->mpTextEngine->IsModified() )
- mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
+ mpImpl->mpTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
}
else if ( rMouseEvent.IsLeft() && GetSelection().HasRange() )
{
@@ -870,7 +870,7 @@ void TextView::Command( const CommandEvent& rCEvt )
SetInsertMode( bInsertMode );
if ( mpImpl->mpTextEngine->IsModified() )
- mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
+ mpImpl->mpTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
}
}
else if ( rCEvt.GetCommand() == CommandEventId::ExtTextInput )
@@ -1025,7 +1025,7 @@ void TextView::Scroll( long ndX, long ndY )
mpImpl->mpCursor->Show();
}
- mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_VIEWSCROLLED ) );
+ mpImpl->mpTextEngine->Broadcast( TextHint( SfxHintId::TextViewScrolled ) );
}
void TextView::Undo()
@@ -1109,7 +1109,7 @@ void TextView::Paste( css::uno::Reference< css::datatransfer::clipboard::XClipbo
if( mpImpl->mpTextEngine->GetMaxTextLen() != 0 )
bWasTruncated = ImplTruncateNewText( aText );
InsertText( aText );
- mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
+ mpImpl->mpTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
if( bWasTruncated )
Edit::ShowTruncationWarning( mpImpl->mpWindow );
@@ -2042,7 +2042,7 @@ void TextView::drop( const css::datatransfer::dnd::DropTargetDropEvent& rDTDE )
mpImpl->mpTextEngine->FormatAndUpdate( this );
- mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
+ mpImpl->mpTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
}
rDTDE.Context->dropComplete( bChanges );
}
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 5004862dd0cd..036783956b62 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -515,14 +515,14 @@ void ImpVclMEdit::Notify( SfxBroadcaster&, const SfxHint& rHint )
switch (pTextHint->GetId())
{
- case TEXT_HINT_VIEWSCROLLED:
+ case SfxHintId::TextViewScrolled:
if ( mpHScrollBar )
ImpSetHScrollBarThumbPos();
if ( mpVScrollBar )
mpVScrollBar->SetThumbPos( mpTextWindow->GetTextView()->GetStartDocPos().Y() );
break;
- case TEXT_HINT_TEXTHEIGHTCHANGED:
+ case SfxHintId::TextHeightChanged:
if ( mpTextWindow->GetTextView()->GetStartDocPos().Y() )
{
long nOutHeight = mpTextWindow->GetOutputSizePixel().Height();
@@ -533,7 +533,7 @@ void ImpVclMEdit::Notify( SfxBroadcaster&, const SfxHint& rHint )
ImpSetScrollBarRanges();
break;
- case TEXT_HINT_TEXTFORMATTED:
+ case SfxHintId::TextFormatted:
if ( mpHScrollBar )
{
const long nWidth = mpTextWindow->GetTextEngine()->CalcTextWidth();
@@ -546,18 +546,20 @@ void ImpVclMEdit::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
break;
- case TEXT_HINT_MODIFIED:
+ case SfxHintId::TextModified:
ImpUpdateSrollBarVis(pVclMultiLineEdit->GetStyle());
pVclMultiLineEdit->Modify();
break;
- case TEXT_HINT_VIEWSELECTIONCHANGED:
+ case SfxHintId::TextViewSelectionChanged:
pVclMultiLineEdit->SelectionChanged();
break;
- case TEXT_HINT_VIEWCARETCHANGED:
+ case SfxHintId::TextViewCaretChanged:
pVclMultiLineEdit->CaretChanged();
break;
+
+ default: break;
}
}
@@ -856,21 +858,21 @@ void TextWindow::Command( const CommandEvent& rCEvt )
{
case SV_MENU_EDIT_UNDO: mpExtTextView->Undo();
mpExtTextEngine->SetModified( true );
- mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
+ mpExtTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
break;
case SV_MENU_EDIT_CUT: mpExtTextView->Cut();
mpExtTextEngine->SetModified( true );
- mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
+ mpExtTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
break;
case SV_MENU_EDIT_COPY: mpExtTextView->Copy();
break;
case SV_MENU_EDIT_PASTE: mpExtTextView->Paste();
mpExtTextEngine->SetModified( true );
- mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
+ mpExtTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
break;
case SV_MENU_EDIT_DELETE: mpExtTextView->DeleteSelected();
mpExtTextEngine->SetModified( true );
- mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
+ mpExtTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
break;
case SV_MENU_EDIT_SELECTALL: mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( TEXT_PARA_ALL, TEXT_INDEX_ALL ) ) );
break;
@@ -881,7 +883,7 @@ void TextWindow::Command( const CommandEvent& rCEvt )
{
mpExtTextView->InsertText( aChars );
mpExtTextEngine->SetModified( true );
- mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
+ mpExtTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
}
}
break;