[Libreoffice-commits] core.git: accessibility/inc basctl/inc basctl/source basic/source chart2/inc cui/inc dbaccess/source editeng/source include/basic include/sfx2 include/svl include/svx include/vcl reportdesign/inc reportdesign/source sc/inc scripting/source sc/source sd/inc sd/source sfx2/source starmath/inc starmath/source svl/source svtools/inc svtools/source svx/inc svx/source sw/inc sw/source vbahelper/inc vcl/source
Eike Rathke
erack at redhat.com
Fri Sep 23 15:17:39 UTC 2016
accessibility/inc/pch/precompiled_acc.hxx | 1
basctl/inc/pch/precompiled_basctl.hxx | 1
basctl/source/basicide/basidesh.cxx | 107 +++---
basic/source/basmgr/basicmanagerrepository.cxx | 5
basic/source/basmgr/basmgr.cxx | 4
chart2/inc/pch/precompiled_chartcontroller.hxx | 1
cui/inc/pch/precompiled_cui.hxx | 1
dbaccess/source/ui/control/sqledit.cxx | 1
editeng/source/editeng/impedit5.cxx | 6
include/basic/sbx.hxx | 6
include/sfx2/app.hxx | 1
include/svl/hint.hxx | 30 +
include/svl/smplhint.hxx | 60 ---
include/svx/svdpntv.hxx | 1
include/vcl/textdata.hxx | 6
reportdesign/inc/pch/precompiled_rptui.hxx | 1
reportdesign/source/core/sdr/UndoActions.cxx | 1
reportdesign/source/core/sdr/UndoEnv.cxx | 5
reportdesign/source/ui/misc/ColorListener.cxx | 5
reportdesign/source/ui/report/ReportControllerObserver.cxx | 1
reportdesign/source/ui/report/StartMarker.cxx | 4
sc/inc/brdcst.hxx | 2
sc/inc/bulkdatahint.hxx | 2
sc/inc/pch/precompiled_sc.hxx | 1
sc/inc/refhint.hxx | 2
sc/inc/simplehintids.hxx | 2
sc/source/core/data/colorscale.cxx | 3
sc/source/core/data/documen2.cxx | 2
sc/source/core/data/documen3.cxx | 5
sc/source/core/data/documen7.cxx | 2
sc/source/core/data/documen8.cxx | 2
sc/source/core/data/formulacell.cxx | 6
sc/source/core/data/stlsheet.cxx | 5
sc/source/core/tool/addinlis.cxx | 2
sc/source/core/tool/adiasync.cxx | 2
sc/source/core/tool/brdcst.cxx | 2
sc/source/core/tool/bulkdatahint.cxx | 2
sc/source/core/tool/cellform.cxx | 1
sc/source/core/tool/grouparealistener.cxx | 10
sc/source/core/tool/refhint.cxx | 2
sc/source/ui/Accessibility/AccessibleContextBase.cxx | 12
sc/source/ui/Accessibility/AccessibleDocument.cxx | 13
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx | 25 -
sc/source/ui/Accessibility/AccessiblePageHeader.cxx | 74 ++--
sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx | 20 -
sc/source/ui/Accessibility/AccessiblePreviewCell.cxx | 3
sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx | 26 -
sc/source/ui/Accessibility/AccessiblePreviewTable.cxx | 30 -
sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 127 +++----
sc/source/ui/Accessibility/AccessibleText.cxx | 21 -
sc/source/ui/app/inputhdl.cxx | 20 -
sc/source/ui/app/inputwin.cxx | 13
sc/source/ui/app/scmod.cxx | 7
sc/source/ui/dbgui/csvgrid.cxx | 1
sc/source/ui/docshell/dbdocfun.cxx | 8
sc/source/ui/docshell/docfunc.cxx | 30 -
sc/source/ui/docshell/docsh.cxx | 36 +-
sc/source/ui/docshell/docsh2.cxx | 2
sc/source/ui/docshell/docsh3.cxx | 4
sc/source/ui/docshell/docsh4.cxx | 8
sc/source/ui/docshell/docsh5.cxx | 10
sc/source/ui/docshell/externalrefmgr.cxx | 1
sc/source/ui/docshell/servobj.cxx | 11
sc/source/ui/inc/AccessibilityHints.hxx | 1
sc/source/ui/miscdlgs/anyrefdg.cxx | 2
sc/source/ui/namedlg/namedefdlg.cxx | 2
sc/source/ui/navipi/navipi.cxx | 23 -
sc/source/ui/undo/undoblk.cxx | 16
sc/source/ui/undo/undoblk3.cxx | 8
sc/source/ui/undo/undocell.cxx | 2
sc/source/ui/undo/undodat.cxx | 8
sc/source/ui/undo/undorangename.cxx | 6
sc/source/ui/undo/undotab.cxx | 34 +-
sc/source/ui/unoobj/addruno.cxx | 3
sc/source/ui/unoobj/appluno.cxx | 2
sc/source/ui/unoobj/cellsuno.cxx | 59 +--
sc/source/ui/unoobj/chart2uno.cxx | 82 ++--
sc/source/ui/unoobj/chartuno.cxx | 6
sc/source/ui/unoobj/condformatuno.cxx | 3
sc/source/ui/unoobj/confuno.cxx | 3
sc/source/ui/unoobj/dapiuno.cxx | 8
sc/source/ui/unoobj/datauno.cxx | 14
sc/source/ui/unoobj/defltuno.cxx | 5
sc/source/ui/unoobj/dispuno.cxx | 8
sc/source/ui/unoobj/docuno.cxx | 82 ++--
sc/source/ui/unoobj/drdefuno.cxx | 3
sc/source/ui/unoobj/editsrc.cxx | 4
sc/source/ui/unoobj/eventuno.cxx | 3
sc/source/ui/unoobj/fielduno.cxx | 5
sc/source/ui/unoobj/forbiuno.cxx | 3
sc/source/ui/unoobj/funcuno.cxx | 3
sc/source/ui/unoobj/linkuno.cxx | 50 +--
sc/source/ui/unoobj/nameuno.cxx | 14
sc/source/ui/unoobj/notesuno.cxx | 5
sc/source/ui/unoobj/styleuno.cxx | 9
sc/source/ui/unoobj/targuno.cxx | 8
sc/source/ui/unoobj/textuno.cxx | 4
sc/source/ui/unoobj/tokenuno.cxx | 3
sc/source/ui/unoobj/viewuno.cxx | 6
sc/source/ui/view/dbfunc3.cxx | 2
sc/source/ui/view/preview.cxx | 2
sc/source/ui/view/prevwsh.cxx | 2
sc/source/ui/view/prevwsh2.cxx | 36 +-
sc/source/ui/view/tabview.cxx | 4
sc/source/ui/view/tabview3.cxx | 8
sc/source/ui/view/tabview5.cxx | 4
sc/source/ui/view/tabvwsh4.cxx | 2
sc/source/ui/view/tabvwsh5.cxx | 182 +++++------
sc/source/ui/view/tabvwshb.cxx | 2
sc/source/ui/view/viewfun2.cxx | 26 -
sc/source/ui/view/viewfunc.cxx | 4
sc/source/ui/xmlsource/xmlsourcedlg.cxx | 2
scripting/source/basprov/basscript.cxx | 3
sd/inc/pch/precompiled_sd.hxx | 2
sd/inc/pch/precompiled_sdui.hxx | 1
sd/source/core/anminfo.cxx | 1
sd/source/core/drawdoc3.cxx | 2
sd/source/core/sdpage.cxx | 8
sd/source/core/stlpool.cxx | 8
sd/source/core/stlsheet.cxx | 19 -
sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx | 3
sd/source/ui/app/sdmod.cxx | 3
sd/source/ui/app/sdxfer.cxx | 3
sd/source/ui/dlg/docprev.cxx | 3
sd/source/ui/dlg/unchss.cxx | 10
sd/source/ui/docshell/docshell.cxx | 4
sd/source/ui/framework/tools/FrameworkHelper.cxx | 3
sd/source/ui/func/fupage.cxx | 4
sd/source/ui/func/fuprlout.cxx | 1
sd/source/ui/func/fuprobjs.cxx | 4
sd/source/ui/func/futempl.cxx | 8
sd/source/ui/slidesorter/controller/SlsListener.cxx | 5
sd/source/ui/slidesorter/controller/SlsTransferableData.cxx | 5
sd/source/ui/tools/EventMultiplexer.cxx | 5
sd/source/ui/tools/PreviewRenderer.cxx | 3
sd/source/ui/unoidl/unomodel.cxx | 4
sd/source/ui/view/DocumentRenderer.cxx | 3
sd/source/ui/view/FormShellManager.cxx | 3
sd/source/ui/view/WindowUpdater.cxx | 1
sd/source/ui/view/drawview.cxx | 10
sd/source/ui/view/drviewsa.cxx | 3
sd/source/ui/view/viewoverlaymanager.cxx | 8
sfx2/source/appl/app.cxx | 2
sfx2/source/appl/appbaslib.cxx | 3
sfx2/source/appl/appcfg.cxx | 3
sfx2/source/appl/appinit.cxx | 2
sfx2/source/control/bindings.cxx | 6
sfx2/source/control/request.cxx | 5
sfx2/source/dialog/basedlgs.cxx | 24 -
sfx2/source/dialog/templdlg.cxx | 44 +-
sfx2/source/doc/objmisc.cxx | 20 -
sfx2/source/doc/objserv.cxx | 2
sfx2/source/doc/objstor.cxx | 8
sfx2/source/doc/objxtor.cxx | 2
sfx2/source/doc/sfxbasemodel.cxx | 22 -
sfx2/source/inc/openurlhint.hxx | 4
sfx2/source/notify/openurlhint.cxx | 2
sfx2/source/sidebar/SidebarController.cxx | 1
sfx2/source/view/frame.cxx | 2
sfx2/source/view/viewfrm.cxx | 173 +++++-----
sfx2/source/view/viewprn.cxx | 14
starmath/inc/format.hxx | 4
starmath/inc/pch/precompiled_sm.hxx | 1
starmath/source/cfgitem.cxx | 2
starmath/source/document.cxx | 6
starmath/source/view.cxx | 18 -
svl/source/config/ctloptions.cxx | 2
svl/source/items/itempool.cxx | 4
svl/source/items/style.cxx | 4
svl/source/notify/SfxBroadcaster.cxx | 4
svl/source/notify/broadcast.cxx | 4
svtools/inc/pch/precompiled_svt.hxx | 1
svtools/source/config/accessibilityoptions.cxx | 10
svtools/source/config/colorcfg.cxx | 1
svtools/source/config/extcolorcfg.cxx | 8
svx/inc/pch/precompiled_svx.hxx | 1
svx/inc/pch/precompiled_svxcore.hxx | 1
svx/source/accessibility/AccessibleTextHelper.cxx | 10
svx/source/accessibility/GraphCtlAccessibleContext.cxx | 5
svx/source/dialog/svxruler.cxx | 9
svx/source/form/fmundo.cxx | 4
svx/source/form/navigatortreemodel.cxx | 4
svx/source/sdr/properties/attributeproperties.cxx | 2
svx/source/sdr/properties/customshapeproperties.cxx | 5
svx/source/sdr/properties/textproperties.cxx | 5
svx/source/svdraw/svdoattr.cxx | 5
svx/source/svdraw/svdoedge.cxx | 9
svx/source/svdraw/svdomeas.cxx | 1
svx/source/svdraw/svdotxat.cxx | 1
svx/source/svdraw/svdpage.cxx | 13
svx/source/svdraw/svdpntv.cxx | 5
svx/source/tbxctrls/tbcontrl.cxx | 1
svx/source/unodraw/unoshtxt.cxx | 17 -
sw/inc/fmtfld.hxx | 1
sw/inc/pch/precompiled_msword.hxx | 1
sw/inc/pch/precompiled_sw.hxx | 1
sw/inc/pch/precompiled_swui.hxx | 1
sw/inc/redline.hxx | 1
sw/inc/section.hxx | 6
sw/inc/swhints.hxx | 2
sw/source/core/doc/DocumentDrawModelManager.cxx | 4
sw/source/core/docnode/ndsect.cxx | 1
sw/source/core/docnode/nodes.cxx | 1
sw/source/core/docnode/section.cxx | 1
sw/source/core/layout/frmtool.cxx | 3
sw/source/core/layout/pagechg.cxx | 2
sw/source/core/txtnode/atrfld.cxx | 1
sw/source/core/txtnode/ndtxt.cxx | 4
sw/source/core/txtnode/thints.cxx | 1
sw/source/core/unocore/unostyle.cxx | 12
sw/source/uibase/app/apphdl.cxx | 4
sw/source/uibase/app/docsh2.cxx | 18 -
sw/source/uibase/app/docstyle.cxx | 1
sw/source/uibase/docvw/PostItMgr.cxx | 92 ++---
sw/source/uibase/misc/redlndlg.cxx | 3
sw/source/uibase/uiview/srcview.cxx | 10
sw/source/uibase/uiview/view.cxx | 26 -
sw/source/uibase/uno/unoatxt.cxx | 22 -
sw/source/uibase/utlui/content.cxx | 3
sw/source/uibase/utlui/glbltree.cxx | 3
sw/source/uibase/utlui/navipi.cxx | 3
vbahelper/inc/pch/precompiled_msforms.hxx | 1
vbahelper/inc/pch/precompiled_vbahelper.hxx | 2
vcl/source/edit/textdata.cxx | 4
vcl/source/edit/vclmedit.cxx | 1
225 files changed, 1092 insertions(+), 1368 deletions(-)
New commits:
commit 7d8196ea2f4ec3634dbad7367345e62c4ea9893d
Author: Eike Rathke <erack at redhat.com>
Date: Thu Sep 22 22:20:48 2016 +0200
perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 related
There were over 150 places in *::Notify() functions that did some
dynamic_cast<SfxSimpleHint*> of which ~98% were unnecessary because the
base class SfxHint passed was an SfxSimpleHint anyway. dynamic_cast
operations come with quite some cost, so avoid if possible. Specifically
for ScFormulaCell::Notify() that created a bottleneck in scenarios where
cells were notified that already handled a previous notification. In
mass operations doing the dynamic_cast before it could be decided
whether having to act on it or not this made 2/3 of all time spent in
the Notify() call.
To get rid of that rename/move SfxSimpleHint to SfxHint and let classes
derive from SfxHint instead of SfxSimpleHint. This comes only with a
slight cost that an additional sal_uInt32 is transported in such hints,
initialized to 0, but this is neglectable compared to the huge gain.
For the rare cases where a Notify() actually expects both, an SfxHint
(formerly SfxSimpleHint) and a derived hint, this changed order of the
dynamic_cast involved so the simple SfxHint::GetId() is handled last.
Modules using such combinations can further optimize by treating the
simple SfxHint::GetId() first once verified that none of the other
derived hints use an ID not equal to zero respectively none of the ID
values the simple hint uses.
Change-Id: I9fcf723e3a4487ceb92336189d23a62c344cf0ce
Reviewed-on: https://gerrit.libreoffice.org/29205
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/accessibility/inc/pch/precompiled_acc.hxx b/accessibility/inc/pch/precompiled_acc.hxx
index f0c4ba2..e50eaef 100644
--- a/accessibility/inc/pch/precompiled_acc.hxx
+++ b/accessibility/inc/pch/precompiled_acc.hxx
@@ -286,7 +286,6 @@
#include <rsc/rsc-vcl-shared-types.hxx>
#include <sot/formats.hxx>
#include <svl/hint.hxx>
-#include <svl/smplhint.hxx>
#include <svl/svldllapi.h>
#include <svtools/AccessibleBrowseBoxObjType.hxx>
#include <svtools/accessibletable.hxx>
diff --git a/basctl/inc/pch/precompiled_basctl.hxx b/basctl/inc/pch/precompiled_basctl.hxx
index 6cb86b1..ace1ace 100644
--- a/basctl/inc/pch/precompiled_basctl.hxx
+++ b/basctl/inc/pch/precompiled_basctl.hxx
@@ -418,7 +418,6 @@
#include <svl/languageoptions.hxx>
#include <svl/lstner.hxx>
#include <svl/poolitem.hxx>
-#include <svl/smplhint.hxx>
#include <svl/srchitem.hxx>
#include <svl/stritem.hxx>
#include <svl/style.hxx>
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 75a75c0..e919ebe 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -480,71 +480,68 @@ void Shell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if (GetShell())
{
- if (SfxSimpleHint const* pSimpleHint = dynamic_cast<SfxSimpleHint const*>(&rHint))
+ switch (rHint.GetId())
{
- switch (pSimpleHint->GetId())
- {
- case SFX_HINT_DYING:
+ case SFX_HINT_DYING:
{
EndListening( rBC, true /* log off all */ );
aObjectCatalog->UpdateEntries();
}
- break;
- }
+ break;
+ }
- if (SbxHint const* pSbxHint = dynamic_cast<SbxHint const*>(&rHint))
+ 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 sal_uInt32 nHintId = pSbxHint->GetId();
- if ( ( nHintId == SBX_HINT_BASICSTART ) ||
- ( nHintId == SBX_HINT_BASICSTOP ) )
+ if (SfxBindings* pBindings = GetBindingsPtr())
{
- if (SfxBindings* pBindings = GetBindingsPtr())
- {
- pBindings->Invalidate( SID_BASICRUN );
- pBindings->Update( SID_BASICRUN );
- pBindings->Invalidate( SID_BASICCOMPILE );
- pBindings->Update( SID_BASICCOMPILE );
- pBindings->Invalidate( SID_BASICSTEPOVER );
- pBindings->Update( SID_BASICSTEPOVER );
- pBindings->Invalidate( SID_BASICSTEPINTO );
- pBindings->Update( SID_BASICSTEPINTO );
- pBindings->Invalidate( SID_BASICSTEPOUT );
- pBindings->Update( SID_BASICSTEPOUT );
- pBindings->Invalidate( SID_BASICSTOP );
- pBindings->Update( SID_BASICSTOP );
- pBindings->Invalidate( SID_BASICIDE_TOGGLEBRKPNT );
- pBindings->Update( SID_BASICIDE_TOGGLEBRKPNT );
- pBindings->Invalidate( SID_BASICIDE_MANAGEBRKPNTS );
- pBindings->Update( SID_BASICIDE_MANAGEBRKPNTS );
- pBindings->Invalidate( SID_BASICIDE_MODULEDLG );
- pBindings->Update( SID_BASICIDE_MODULEDLG );
- pBindings->Invalidate( SID_BASICLOAD );
- pBindings->Update( SID_BASICLOAD );
- }
+ pBindings->Invalidate( SID_BASICRUN );
+ pBindings->Update( SID_BASICRUN );
+ pBindings->Invalidate( SID_BASICCOMPILE );
+ pBindings->Update( SID_BASICCOMPILE );
+ pBindings->Invalidate( SID_BASICSTEPOVER );
+ pBindings->Update( SID_BASICSTEPOVER );
+ pBindings->Invalidate( SID_BASICSTEPINTO );
+ pBindings->Update( SID_BASICSTEPINTO );
+ pBindings->Invalidate( SID_BASICSTEPOUT );
+ pBindings->Update( SID_BASICSTEPOUT );
+ pBindings->Invalidate( SID_BASICSTOP );
+ pBindings->Update( SID_BASICSTOP );
+ pBindings->Invalidate( SID_BASICIDE_TOGGLEBRKPNT );
+ pBindings->Update( SID_BASICIDE_TOGGLEBRKPNT );
+ pBindings->Invalidate( SID_BASICIDE_MANAGEBRKPNTS );
+ pBindings->Update( SID_BASICIDE_MANAGEBRKPNTS );
+ pBindings->Invalidate( SID_BASICIDE_MODULEDLG );
+ pBindings->Update( SID_BASICIDE_MODULEDLG );
+ pBindings->Invalidate( SID_BASICLOAD );
+ pBindings->Update( SID_BASICLOAD );
+ }
- if ( nHintId == SBX_HINT_BASICSTOP )
- {
- // not only at error/break or explicit stoppage,
- // if the update is turned off due to a programming bug
- BasicStopped();
- if (pLayout)
- pLayout->UpdateDebug(true); // clear...
- if( m_pCurLocalizationMgr )
- m_pCurLocalizationMgr->handleBasicStopped();
- }
- else if( m_pCurLocalizationMgr )
- {
- m_pCurLocalizationMgr->handleBasicStarted();
- }
+ if ( nHintId == SBX_HINT_BASICSTOP )
+ {
+ // not only at error/break or explicit stoppage,
+ // if the update is turned off due to a programming bug
+ BasicStopped();
+ if (pLayout)
+ pLayout->UpdateDebug(true); // clear...
+ if( m_pCurLocalizationMgr )
+ m_pCurLocalizationMgr->handleBasicStopped();
+ }
+ else if( m_pCurLocalizationMgr )
+ {
+ m_pCurLocalizationMgr->handleBasicStarted();
+ }
- for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
- {
- BaseWindow* pWin = it->second;
- if ( nHintId == SBX_HINT_BASICSTART )
- pWin->BasicStarted();
- else
- pWin->BasicStopped();
- }
+ for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
+ {
+ BaseWindow* pWin = it->second;
+ if ( nHintId == SBX_HINT_BASICSTART )
+ pWin->BasicStarted();
+ else
+ pWin->BasicStopped();
}
}
}
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index 25b71c7..cb09047 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -30,7 +30,7 @@
#include <svtools/ehdl.hxx>
#include <svtools/sfxecode.hxx>
#include <unotools/pathoptions.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <vcl/svapp.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
@@ -577,8 +577,7 @@ namespace basic
void ImplRepository::Notify( SfxBroadcaster& _rBC, const SfxHint& _rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast< const SfxSimpleHint* >( &_rHint );
- if ( !pSimpleHint || ( pSimpleHint->GetId() != SFX_HINT_DYING ) )
+ if ( _rHint.GetId() != SFX_HINT_DYING )
// not interested in
return;
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 55ccad2..66e16c5 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -20,7 +20,7 @@
#include <tools/stream.hxx>
#include <sot/storage.hxx>
#include <tools/urlobj.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
#include <vcl/wrkwin.hxx>
@@ -851,7 +851,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
BasicManager::~BasicManager()
{
// Notify listener if something needs to be saved
- Broadcast( SfxSimpleHint( SFX_HINT_DYING) );
+ Broadcast( SfxHint( SFX_HINT_DYING) );
}
void BasicManager::LegacyDeleteBasicManager( BasicManager*& _rpManager )
diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx b/chart2/inc/pch/precompiled_chartcontroller.hxx
index b74e19a..458f9b9 100644
--- a/chart2/inc/pch/precompiled_chartcontroller.hxx
+++ b/chart2/inc/pch/precompiled_chartcontroller.hxx
@@ -382,7 +382,6 @@
#include <svl/lstner.hxx>
#include <svl/metitem.hxx>
#include <svl/poolitem.hxx>
-#include <svl/smplhint.hxx>
#include <svl/stritem.hxx>
#include <svl/style.hxx>
#include <svl/stylesheetuser.hxx>
diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx
index bd28f00..a071f59 100644
--- a/cui/inc/pch/precompiled_cui.hxx
+++ b/cui/inc/pch/precompiled_cui.hxx
@@ -348,7 +348,6 @@
#include <svl/lstner.hxx>
#include <svl/macitem.hxx>
#include <svl/poolitem.hxx>
-#include <svl/smplhint.hxx>
#include <svl/stritem.hxx>
#include <svl/style.hxx>
#include <svl/stylesheetuser.hxx>
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 8fa8486..d06125a 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -33,7 +33,6 @@
#include "querycontroller.hxx"
#include "undosqledit.hxx"
#include "QueryDesignView.hxx"
-#include <svl/smplhint.hxx>
#include <vcl/settings.hxx>
#include <cppuhelper/implbase.hxx>
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx
index e360c0a..e091a14 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -24,7 +24,7 @@
#include <impedit.hxx>
#include <editeng/editeng.hxx>
#include <editdbg.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <editeng/lrspitem.hxx>
void ImpEditEngine::SetStyleSheetPool( SfxStyleSheetPool* pSPool )
@@ -153,10 +153,10 @@ void ImpEditEngine::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
pStyle = static_cast<SfxStyleSheet*>( pStyleSheetHint->GetStyleSheet() );
nId = pStyleSheetHint->GetHint();
}
- else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) && dynamic_cast< const SfxStyleSheet* >(&rBC) != nullptr )
+ else if ( dynamic_cast< const SfxStyleSheet* >(&rBC) != nullptr )
{
pStyle = static_cast<SfxStyleSheet*>(&rBC);
- nId = dynamic_cast<const SfxSimpleHint*>(&rHint)->GetId();
+ nId = rHint.GetId();
}
if ( pStyle )
diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx
index 96fe6db..35d09c4 100644
--- a/include/basic/sbx.hxx
+++ b/include/basic/sbx.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_BASIC_SBX_HXX
#include <tools/ref.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <svl/lstner.hxx>
#include <basic/sbxdef.hxx>
@@ -90,11 +90,11 @@ public:
void SetComment( const OUString& r ) { aComment = r; }
};
-class BASIC_DLLPUBLIC SbxHint : public SfxSimpleHint
+class BASIC_DLLPUBLIC SbxHint : public SfxHint
{
SbxVariable* pVar;
public:
- SbxHint( sal_uInt32 n, SbxVariable* v ) : SfxSimpleHint( n ), pVar( v ) {}
+ SbxHint( sal_uInt32 n, SbxVariable* v ) : SfxHint( n ), pVar( v ) {}
SbxVariable* GetVar() const { return pVar; }
};
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 947387a..7117b6c 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -23,7 +23,6 @@
#include <sfx2/dllapi.h>
#include <sal/types.h>
#include <tools/errcode.hxx>
-#include <svl/smplhint.hxx>
#include <svl/poolitem.hxx>
#include <vcl/image.hxx>
#include <com/sun/star/script/XLibraryContainer.hpp>
diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index 4aec700..8de965d 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -19,15 +19,43 @@
#ifndef INCLUDED_SVL_HINT_HXX
#define INCLUDED_SVL_HINT_HXX
+#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_CTL_SETTINGS_CHANGED 0x00002000
+#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
+
class SVL_DLLPUBLIC SfxHint
{
+private:
+ sal_uInt32 mnId;
public:
+ SfxHint() : mnId(0) {}
+ explicit SfxHint( sal_uInt32 nId ) : mnId(nId) {}
virtual ~SfxHint();
+ sal_uInt32 GetId() const { return mnId; }
};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svl/smplhint.hxx b/include/svl/smplhint.hxx
deleted file mode 100644
index bdf9800..0000000
--- a/include/svl/smplhint.hxx
+++ /dev/null
@@ -1,60 +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_SVL_SMPLHINT_HXX
-#define INCLUDED_SVL_SMPLHINT_HXX
-
-#include <svl/svldllapi.h>
-#include <svl/hint.hxx>
-#include <tools/solar.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_CTL_SETTINGS_CHANGED 0x00002000
-#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
-
-class SVL_DLLPUBLIC SfxSimpleHint: public SfxHint
-{
-private:
- sal_uInt32 mnId;
-public:
- SfxSimpleHint( sal_uInt32 nId ) { mnId = nId; }
- sal_uInt32 GetId() const { return mnId; }
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index 1581115..07cacf1 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -22,7 +22,6 @@
#include <svl/SfxBroadcaster.hxx>
#include <svl/lstner.hxx>
-#include <svl/smplhint.hxx>
#include <svl/undo.hxx>
#include <svx/svddrag.hxx>
#include <svx/svdlayer.hxx>
diff --git a/include/vcl/textdata.hxx b/include/vcl/textdata.hxx
index 7339f0f..abcd662 100644
--- a/include/vcl/textdata.hxx
+++ b/include/vcl/textdata.hxx
@@ -20,8 +20,10 @@
#ifndef INCLUDED_VCL_TEXTDATA_HXX
#define INCLUDED_VCL_TEXTDATA_HXX
+#include <sal/types.h>
+#include <tools/solar.h>
#include <rtl/ustring.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <vcl/dllapi.h>
enum class ExtTextInputAttr;
@@ -125,7 +127,7 @@ inline bool TextSelection::operator != ( const TextSelection& rSel ) const
#define TEXT_HINT_VIEWSELECTIONCHANGED 101
#define TEXT_HINT_VIEWCARETCHANGED 102
-class VCL_DLLPUBLIC TextHint : public SfxSimpleHint
+class VCL_DLLPUBLIC TextHint : public SfxHint
{
private:
sal_uLong mnValue;
diff --git a/reportdesign/inc/pch/precompiled_rptui.hxx b/reportdesign/inc/pch/precompiled_rptui.hxx
index 7b366c8..d7b6b85 100644
--- a/reportdesign/inc/pch/precompiled_rptui.hxx
+++ b/reportdesign/inc/pch/precompiled_rptui.hxx
@@ -400,7 +400,6 @@
#include <svl/lstner.hxx>
#include <svl/metitem.hxx>
#include <svl/poolitem.hxx>
-#include <svl/smplhint.hxx>
#include <svl/stritem.hxx>
#include <svl/style.hxx>
#include <svl/stylesheetuser.hxx>
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx
index c029bae..390b9a0 100644
--- a/reportdesign/source/core/sdr/UndoActions.cxx
+++ b/reportdesign/source/core/sdr/UndoActions.cxx
@@ -37,7 +37,6 @@
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <connectivity/dbtools.hxx>
-#include <svl/smplhint.hxx>
#include <tools/diagnose_ex.h>
#include <comphelper/stl_types.hxx>
#include <vcl/svapp.hxx>
diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx
index 4d20683..0b0fcf1 100644
--- a/reportdesign/source/core/sdr/UndoEnv.cxx
+++ b/reportdesign/source/core/sdr/UndoEnv.cxx
@@ -39,7 +39,7 @@
#include <com/sun/star/beans/XIntrospection.hpp>
#include <connectivity/dbtools.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <tools/diagnose_ex.h>
#include <comphelper/stl_types.hxx>
#include <vcl/svapp.hxx>
@@ -191,8 +191,7 @@ void OXUndoEnvironment::ModeChanged()
void OXUndoEnvironment::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint && pSimpleHint->GetId() == SFX_HINT_MODECHANGED )
+ if (rHint.GetId() == SFX_HINT_MODECHANGED )
ModeChanged();
}
diff --git a/reportdesign/source/ui/misc/ColorListener.cxx b/reportdesign/source/ui/misc/ColorListener.cxx
index a4ec6fa..b119a1b 100644
--- a/reportdesign/source/ui/misc/ColorListener.cxx
+++ b/reportdesign/source/ui/misc/ColorListener.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "ColorListener.hxx"
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <vcl/settings.hxx>
#include "uistrings.hrc"
@@ -51,8 +51,7 @@ void OColorListener::dispose()
void OColorListener::Notify(SfxBroadcaster & /*rBc*/, SfxHint const & rHint)
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint && pSimpleHint->GetId() == SFX_HINT_COLORS_CHANGED)
+ if (rHint.GetId() == SFX_HINT_COLORS_CHANGED)
{
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/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx
index 801880d..6e3dc68 100644
--- a/reportdesign/source/ui/report/ReportControllerObserver.cxx
+++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx
@@ -23,7 +23,6 @@
#include <ReportControllerObserver.hxx>
#include <ReportController.hxx>
-#include <svl/smplhint.hxx>
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index 7bbf488..0e1d0f3 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -32,7 +32,6 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <unotools/syslocale.hxx>
-#include <svl/smplhint.hxx>
#define CORNER_SPACE 5
@@ -254,8 +253,7 @@ void OStartMarker::setTitle(const OUString& _sTitle)
void OStartMarker::Notify(SfxBroadcaster & rBc, SfxHint const & rHint)
{
OColorListener::Notify(rBc, rHint);
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint && pSimpleHint->GetId() == SFX_HINT_COLORS_CHANGED)
+ if (rHint.GetId() == SFX_HINT_COLORS_CHANGED)
{
setColor();
Invalidate(InvalidateFlags::Children);
diff --git a/sc/inc/brdcst.hxx b/sc/inc/brdcst.hxx
index 5c91138..5a283bc 100644
--- a/sc/inc/brdcst.hxx
+++ b/sc/inc/brdcst.hxx
@@ -25,7 +25,7 @@
class SvtBroadcaster;
-class ScHint : public SfxSimpleHint
+class ScHint : public SfxHint
{
ScAddress aAddress;
diff --git a/sc/inc/bulkdatahint.hxx b/sc/inc/bulkdatahint.hxx
index 4bd02c6..96ee103 100644
--- a/sc/inc/bulkdatahint.hxx
+++ b/sc/inc/bulkdatahint.hxx
@@ -19,7 +19,7 @@ namespace sc {
class ColumnSpanSet;
-class BulkDataHint : public SfxSimpleHint
+class BulkDataHint : public SfxHint
{
struct Impl;
std::unique_ptr<Impl> mpImpl;
diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index db6cd27..986f9e3 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -454,7 +454,6 @@
#include <svl/poolitem.hxx>
#include <svl/sharedstring.hxx>
#include <svl/sharedstringpool.hxx>
-#include <svl/smplhint.hxx>
#include <svl/srchitem.hxx>
#include <svl/stritem.hxx>
#include <svl/stylesheetuser.hxx>
diff --git a/sc/inc/refhint.hxx b/sc/inc/refhint.hxx
index 209d35c..a162774 100644
--- a/sc/inc/refhint.hxx
+++ b/sc/inc/refhint.hxx
@@ -18,7 +18,7 @@ namespace sc {
struct RefUpdateContext;
class ColRowReorderMapType;
-class RefHint : public SfxSimpleHint
+class RefHint : public SfxHint
{
public:
enum Type {
diff --git a/sc/inc/simplehintids.hxx b/sc/inc/simplehintids.hxx
index 64d2b08..9794072 100644
--- a/sc/inc/simplehintids.hxx
+++ b/sc/inc/simplehintids.hxx
@@ -10,7 +10,7 @@
#ifndef INCLUDED_SC_INC_SIMPLEHINTIDS_HXX
#define INCLUDED_SC_INC_SIMPLEHINTIDS_HXX
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#define SC_HINT_DATACHANGED SFX_HINT_DATACHANGED
#define SC_HINT_TABLEOPDIRTY SFX_HINT_USER00
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 4d38970..2f816b0 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -135,8 +135,7 @@ void ScFormulaListener::Notify(const SfxHint& rHint)
{
mbDirty = true;
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SFX_HINT_DYING)
return;
if (maCallbackFunction)
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index dddcde6..1de3620 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -328,7 +328,7 @@ IMPL_LINK_NOARG_TYPED(ScDocument, TrackTimeHdl, Idle *, void)
else if (pShell) // execute
{
TrackFormulas();
- pShell->Broadcast( SfxSimpleHint( FID_DATACHANGED ) );
+ pShell->Broadcast( SfxHint( FID_DATACHANGED ) );
// modified...
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 2bfff6a..5aa0fcf 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -940,9 +940,8 @@ void ScDocument::BroadcastUno( const SfxHint &rHint )
// The listener calls must be processed after completing the broadcast,
// because they can add or remove objects from pUnoBroadcaster.
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if ( pUnoListenerCalls && pSimpleHint &&
- pSimpleHint->GetId() == SFX_HINT_DATACHANGED &&
+ if ( pUnoListenerCalls &&
+ rHint.GetId() == SFX_HINT_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 d956ba4..1a61323 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -126,7 +126,7 @@ void ScDocument::BroadcastCells( const ScRange& rRange, sal_uInt32 nHint, bool b
pTab->SetStreamValid(false);
}
- BroadcastUno(SfxSimpleHint(SC_HINT_DATACHANGED));
+ BroadcastUno(SfxHint(SC_HINT_DATACHANGED));
}
namespace {
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 85957cc..e0992b5 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( SfxSimpleHint(FID_DATACHANGED) );
+ pShell->Broadcast( SfxHint(FID_DATACHANGED) );
// #i101960# set document modified, as in TrackTimeHdl for DDE links
if (!pShell->IsModified())
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 5968110..322f0d5 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2205,11 +2205,7 @@ void ScFormulaCell::SetInChangeTrack( bool bVal )
void ScFormulaCell::Notify( const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (!pSimpleHint)
- return;
-
- const sal_uInt32 nHint = pSimpleHint->GetId();
+ const sal_uInt32 nHint = rHint.GetId();
if (nHint == SC_HINT_REFERENCE)
{
const sc::RefHint& rRefHint = static_cast<const sc::RefHint&>(rHint);
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index 323545c..fedd318 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -33,7 +33,7 @@
#include <sfx2/printer.hxx>
#include <svl/itempool.hxx>
#include <svl/itemset.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include "attrib.hxx"
#include <vcl/svapp.hxx>
@@ -269,8 +269,7 @@ bool ScStyleSheet::IsUsed() const
void ScStyleSheet::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SFX_HINT_DYING )
GetItemSet().SetParent( nullptr );
}
diff --git a/sc/source/core/tool/addinlis.cxx b/sc/source/core/tool/addinlis.cxx
index 845b556..73e73a6 100644
--- a/sc/source/core/tool/addinlis.cxx
+++ b/sc/source/core/tool/addinlis.cxx
@@ -120,7 +120,7 @@ void SAL_CALL ScAddInListener::modified( const css::sheet::ResultEvent& aEvent )
{
ScDocument* pDoc = *it;
pDoc->TrackFormulas();
- pDoc->GetDocumentShell()->Broadcast( SfxSimpleHint( FID_DATACHANGED ) );
+ pDoc->GetDocumentShell()->Broadcast( SfxHint( FID_DATACHANGED ) );
}
}
diff --git a/sc/source/core/tool/adiasync.cxx b/sc/source/core/tool/adiasync.cxx
index 06e22f1..83548bd 100644
--- a/sc/source/core/tool/adiasync.cxx
+++ b/sc/source/core/tool/adiasync.cxx
@@ -112,7 +112,7 @@ void ScAddInAsync::CallBack( sal_uLong nHandleP, void* pData )
{
ScDocument* pDoc = *it;
pDoc->TrackFormulas();
- pDoc->GetDocumentShell()->Broadcast( SfxSimpleHint( FID_DATACHANGED ) );
+ pDoc->GetDocumentShell()->Broadcast( SfxHint( FID_DATACHANGED ) );
}
}
diff --git a/sc/source/core/tool/brdcst.cxx b/sc/source/core/tool/brdcst.cxx
index d573094..ce740c0 100644
--- a/sc/source/core/tool/brdcst.cxx
+++ b/sc/source/core/tool/brdcst.cxx
@@ -20,6 +20,6 @@
#include "brdcst.hxx"
ScHint::ScHint( sal_uInt32 n, const ScAddress& a ) :
- SfxSimpleHint(n), aAddress(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 e21df76..bdd0215 100644
--- a/sc/source/core/tool/bulkdatahint.cxx
+++ b/sc/source/core/tool/bulkdatahint.cxx
@@ -22,7 +22,7 @@ struct BulkDataHint::Impl
};
BulkDataHint::BulkDataHint( ScDocument& rDoc ) :
- SfxSimpleHint(SC_HINT_BULK_DATACHANGED), mpImpl(new Impl(rDoc)) {}
+ SfxHint(SC_HINT_BULK_DATACHANGED), mpImpl(new Impl(rDoc)) {}
BulkDataHint::~BulkDataHint()
{
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index a9877ce..38bf70f 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -20,7 +20,6 @@
#include "cellform.hxx"
#include <sfx2/objsh.hxx>
-#include <svl/smplhint.hxx>
#include <svl/zforlist.hxx>
#include <svl/sharedstring.hxx>
diff --git a/sc/source/core/tool/grouparealistener.cxx b/sc/source/core/tool/grouparealistener.cxx
index 70847d82..c4f2773 100644
--- a/sc/source/core/tool/grouparealistener.cxx
+++ b/sc/source/core/tool/grouparealistener.cxx
@@ -107,18 +107,14 @@ ScRange FormulaGroupAreaListener::getListeningRange() const
void FormulaGroupAreaListener::Notify( const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (!pSimpleHint)
- return;
-
- switch (pSimpleHint->GetId())
+ switch (rHint.GetId())
{
case SC_HINT_DATACHANGED:
- notifyCellChange(rHint, static_cast<const ScHint*>(pSimpleHint)->GetAddress());
+ notifyCellChange(rHint, static_cast<const ScHint*>(&rHint)->GetAddress());
break;
case SC_HINT_BULK_DATACHANGED:
{
- const BulkDataHint& rBulkHint = static_cast<const BulkDataHint&>(*pSimpleHint);
+ const BulkDataHint& rBulkHint = static_cast<const BulkDataHint&>(rHint);
notifyBulkChange(rBulkHint);
}
break;
diff --git a/sc/source/core/tool/refhint.cxx b/sc/source/core/tool/refhint.cxx
index c159e96..3f64ef8 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 ) : SfxSimpleHint(SC_HINT_REFERENCE), meType(eType) {}
+RefHint::RefHint( Type eType ) : SfxHint(SC_HINT_REFERENCE), 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 a044814..66ac3ac 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -26,7 +26,7 @@
#include <tools/gen.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <toolkit/helper/convert.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -126,14 +126,10 @@ void SAL_CALL ScAccessibleContextBase::release()
void ScAccessibleContextBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint)
+ if (rHint.GetId() == SFX_HINT_DYING)
{
- if (pSimpleHint->GetId() == SFX_HINT_DYING)
- {
- // it seems the Broadcaster is dying, since the view is dying
- dispose();
- }
+ // 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 76a0997..a21d4ff 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -1552,11 +1552,10 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
}
}
- else if (dynamic_cast<const SfxSimpleHint*>(&rHint))
+ else
{
- const SfxSimpleHint* pSimpleHint = static_cast<const SfxSimpleHint*>(&rHint);
// only notify if child exist, otherwise it is not necessary
- if ((pSimpleHint->GetId() == SC_HINT_ACC_TABLECHANGED) &&
+ if ((rHint.GetId() == SC_HINT_ACC_TABLECHANGED) &&
mpAccessibleSpreadsheet.is())
{
FreeAccessibleSpreadsheet();
@@ -1580,12 +1579,12 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if (mpAccessibleSpreadsheet.is())
mpAccessibleSpreadsheet->FireFirstCellFocus();
}
- else if (pSimpleHint->GetId() == SC_HINT_ACC_MAKEDRAWLAYER)
+ else if (rHint.GetId() == SC_HINT_ACC_MAKEDRAWLAYER)
{
if (mpChildrenShapes)
mpChildrenShapes->SetDrawBroadcaster();
}
- else if ((pSimpleHint->GetId() == SC_HINT_ACC_ENTEREDITMODE)) // this event comes only on creating edit field of a cell
+ else if ((rHint.GetId() == SC_HINT_ACC_ENTEREDITMODE)) // this event comes only on creating edit field of a cell
{
if (mpViewShell->GetViewData().HasEditView(meSplitPos))
{
@@ -1609,7 +1608,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
}
}
- else if (pSimpleHint->GetId() == SC_HINT_ACC_LEAVEEDITMODE)
+ else if (rHint.GetId() == SC_HINT_ACC_LEAVEEDITMODE)
{
if (mxTempAcc.is())
{
@@ -1624,7 +1623,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
CommitFocusGained();
}
}
- else if ((pSimpleHint->GetId() == SC_HINT_ACC_VISAREACHANGED) || (pSimpleHint->GetId() == SC_HINT_ACC_WINDOWRESIZED))
+ else if ((rHint.GetId() == SC_HINT_ACC_VISAREACHANGED) || (rHint.GetId() == SC_HINT_ACC_WINDOWRESIZED))
{
Rectangle aOldVisArea(maVisArea);
maVisArea = GetVisibleArea_Impl();
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 6fdad87..05108da 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1230,11 +1230,18 @@ void SAL_CALL ScAccessibleDocumentPagePreview::disposing()
void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint)
+ if ( dynamic_cast<const ScAccWinFocusLostHint*>(&rHint) )
+ {
+ CommitFocusLost();
+ }
+ else if ( dynamic_cast<const ScAccWinFocusGotHint*>(&rHint) )
+ {
+ CommitFocusGained();
+ }
+ else
{
// only notify if child exist, otherwise it is not necessary
- if (pSimpleHint->GetId() == SC_HINT_DATACHANGED)
+ if (rHint.GetId() == SC_HINT_DATACHANGED)
{
if (mpTable.is()) // if there is no table there is nothing to notify, because no one recongnizes the change
{
@@ -1282,11 +1289,11 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint
}
}
}
- else if (pSimpleHint->GetId() == SC_HINT_ACC_MAKEDRAWLAYER)
+ else if (rHint.GetId() == SC_HINT_ACC_MAKEDRAWLAYER)
{
GetShapeChildren()->SetDrawBroadcaster();
}
- else if (pSimpleHint->GetId() == SC_HINT_ACC_VISAREACHANGED)
+ else if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED)
{
Size aOutputSize;
vcl::Window* pSizeWindow = mpViewShell->GetWindow();
@@ -1304,14 +1311,6 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint
CommitChange(aEvent);
}
}
- else if ( dynamic_cast<const ScAccWinFocusLostHint*>(&rHint) )
- {
- CommitFocusLost();
- }
- else if ( dynamic_cast<const ScAccWinFocusGotHint*>(&rHint) )
- {
- CommitFocusGained();
- }
ScAccessibleDocumentBase::Notify(rBC, rHint);
}
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
index eda1199..956675a 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
@@ -35,7 +35,7 @@
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <vcl/window.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <vcl/svapp.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <svl/style.hxx>
@@ -122,51 +122,47 @@ void SAL_CALL ScAccessiblePageHeader::disposing()
void ScAccessiblePageHeader::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>( &rHint );
- if (pSimpleHint)
+ // only notify if child exist, otherwise it is not necessary
+ if (rHint.GetId() == SC_HINT_DATACHANGED)
{
- // only notify if child exist, otherwise it is not necessary
- if (pSimpleHint->GetId() == SC_HINT_DATACHANGED)
+ ScHFAreas aOldAreas(maAreas);
+ std::for_each(aOldAreas.begin(), aOldAreas.end(), Acquire());
+ mnChildCount = -1;
+ getAccessibleChildCount();
+ for (sal_uInt8 i = 0; i < MAX_AREAS; ++i)
{
- ScHFAreas aOldAreas(maAreas);
- std::for_each(aOldAreas.begin(), aOldAreas.end(), Acquire());
- mnChildCount = -1;
- getAccessibleChildCount();
- for (sal_uInt8 i = 0; i < MAX_AREAS; ++i)
- {
- if ((aOldAreas[i] && maAreas[i] && !ScGlobal::EETextObjEqual(aOldAreas[i]->GetEditTextObject(), maAreas[i]->GetEditTextObject())) ||
+ if ((aOldAreas[i] && maAreas[i] && !ScGlobal::EETextObjEqual(aOldAreas[i]->GetEditTextObject(), maAreas[i]->GetEditTextObject())) ||
(aOldAreas[i] && !maAreas[i]) || (!aOldAreas[i] && maAreas[i]))
+ {
+ if (aOldAreas[i] && aOldAreas[i]->GetEditTextObject())
{
- if (aOldAreas[i] && aOldAreas[i]->GetEditTextObject())
- {
- AccessibleEventObject aEvent;
- aEvent.EventId = AccessibleEventId::CHILD;
- aEvent.Source = uno::Reference< XAccessibleContext >(this);
- aEvent.OldValue = uno::makeAny(uno::Reference<XAccessible>(aOldAreas[i]));
-
- CommitChange(aEvent); // child gone - event
- aOldAreas[i]->dispose();
- }
- if (maAreas[i] && maAreas[i]->GetEditTextObject())
- {
- AccessibleEventObject aEvent;
- aEvent.EventId = AccessibleEventId::CHILD;
- aEvent.Source = uno::Reference< XAccessibleContext >(this);
- aEvent.NewValue = uno::makeAny(uno::Reference<XAccessible>(maAreas[i]));
-
- CommitChange(aEvent); // new child - event
- }
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ aEvent.Source = uno::Reference< XAccessibleContext >(this);
+ aEvent.OldValue = uno::makeAny(uno::Reference<XAccessible>(aOldAreas[i]));
+
+ CommitChange(aEvent); // child gone - event
+ aOldAreas[i]->dispose();
+ }
+ if (maAreas[i] && maAreas[i]->GetEditTextObject())
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ aEvent.Source = uno::Reference< XAccessibleContext >(this);
+ aEvent.NewValue = uno::makeAny(uno::Reference<XAccessible>(maAreas[i]));
+
+ CommitChange(aEvent); // new child - event
}
}
- std::for_each(aOldAreas.begin(), aOldAreas.end(), Release());
- }
- else if (pSimpleHint->GetId() == SC_HINT_ACC_VISAREACHANGED)
- {
- AccessibleEventObject aEvent;
- aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;
- aEvent.Source = uno::Reference< XAccessibleContext >(this);
- CommitChange(aEvent);
}
+ std::for_each(aOldAreas.begin(), aOldAreas.end(), Release());
+ }
+ else if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED)
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;
+ aEvent.Source = uno::Reference< XAccessibleContext >(this);
+ CommitChange(aEvent);
}
ScAccessibleContextBase::Notify(rBC, rHint);
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
index 4b6f9bc..669c818 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
@@ -92,20 +92,16 @@ void SAL_CALL ScAccessiblePageHeaderArea::disposing()
void ScAccessiblePageHeaderArea::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint)
+ // only notify if child exist, otherwise it is not necessary
+ if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED)
{
- // only notify if child exist, otherwise it is not necessary
- if (pSimpleHint->GetId() == SC_HINT_ACC_VISAREACHANGED)
- {
- if (mpTextHelper)
- mpTextHelper->UpdateChildren();
+ if (mpTextHelper)
+ mpTextHelper->UpdateChildren();
- AccessibleEventObject aEvent;
- aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;
- aEvent.Source = uno::Reference< XAccessibleContext >(this);
- CommitChange(aEvent);
- }
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;
+ aEvent.Source = uno::Reference< XAccessibleContext >(this);
+ CommitChange(aEvent);
}
ScAccessibleContextBase::Notify(rBC, rHint);
}
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index 5383e68..a123298 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -83,8 +83,7 @@ void SAL_CALL ScAccessiblePreviewCell::disposing()
void ScAccessiblePreviewCell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint && pSimpleHint->GetId() == SC_HINT_ACC_VISAREACHANGED)
+ if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED)
{
if (mpTextHelper)
mpTextHelper->UpdateChildren();
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index 3aed647..31d9768 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -55,7 +55,7 @@
#include <vcl/window.hxx>
#include <vcl/svapp.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
@@ -116,21 +116,17 @@ void SAL_CALL ScAccessiblePreviewHeaderCell::disposing()
void ScAccessiblePreviewHeaderCell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint)
+ const sal_uInt32 nId = rHint.GetId();
+ if (nId == SC_HINT_ACC_VISAREACHANGED)
{
- const sal_uInt32 nId {pSimpleHint->GetId()};
- if (nId == SC_HINT_ACC_VISAREACHANGED)
- {
- if (mpTextHelper)
- mpTextHelper->UpdateChildren();
- }
- else if ( nId == SFX_HINT_DATACHANGED )
- {
- // column / row layout may change with any document change,
- // so it must be invalidated
- DELETEZ( mpTableInfo );
- }
+ if (mpTextHelper)
+ mpTextHelper->UpdateChildren();
+ }
+ else if ( nId == SFX_HINT_DATACHANGED )
+ {
+ // column / row layout may change with any document change,
+ // so it must be invalidated
+ DELETEZ( mpTableInfo );
}
ScAccessibleContextBase::Notify(rBC, rHint);
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index 4e083a6..abfa701 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -36,7 +36,7 @@
#include <vcl/window.hxx>
#include <vcl/svapp.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
@@ -86,23 +86,19 @@ void SAL_CALL ScAccessiblePreviewTable::disposing()
void ScAccessiblePreviewTable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint)
+ const sal_uInt32 nId = rHint.GetId();
+ if ( nId == SFX_HINT_DATACHANGED )
{
- const sal_uInt32 nId {pSimpleHint->GetId()};
- if ( nId == SFX_HINT_DATACHANGED )
- {
- // column / row layout may change with any document change,
- // so it must be invalidated
- DELETEZ( mpTableInfo );
- }
- else if (nId == SC_HINT_ACC_VISAREACHANGED)
- {
- AccessibleEventObject aEvent;
- aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;
- aEvent.Source = uno::Reference< XAccessibleContext >(this);
- CommitChange(aEvent);
- }
+ // column / row layout may change with any document change,
+ // so it must be invalidated
+ DELETEZ( mpTableInfo );
+ }
+ else if (nId == SC_HINT_ACC_VISAREACHANGED)
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;
+ aEvent.Source = uno::Reference< XAccessibleContext >(this);
+ CommitChange(aEvent);
}
ScAccessibleContextBase::Notify(rBC, rHint);
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 69d23e0..889e2f5 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -417,10 +417,69 @@ void ScAccessibleSpreadsheet::VisAreaChanged()
void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint)
+ if ( dynamic_cast<const ScUpdateRefHint*>(&rHint) )
{
- if (pSimpleHint->GetId() == SC_HINT_ACC_CURSORCHANGED)
+ const ScUpdateRefHint& rRef = static_cast<const ScUpdateRefHint&>(rHint);
+ if (rRef.GetMode() == URM_INSDEL && rRef.GetDz() == 0) //test whether table is inserted or deleted
+ {
+ if (((rRef.GetRange().aStart.Col() == maRange.aStart.Col()) &&
+ (rRef.GetRange().aEnd.Col() == maRange.aEnd.Col())) ||
+ ((rRef.GetRange().aStart.Row() == maRange.aStart.Row()) &&
+ (rRef.GetRange().aEnd.Row() == maRange.aEnd.Row())))
+ {
+ // ignore next SC_HINT_DATACHANGED notification
+ mbDelIns = true;
+
+ sal_Int16 nId(0);
+ SCsCOL nX(rRef.GetDx());
+ SCsROW nY(rRef.GetDy());
+ ScRange aRange(rRef.GetRange());
+ if ((nX < 0) || (nY < 0))
+ {
+ OSL_ENSURE(!((nX < 0) && (nY < 0)), "should not be possible to remove row and column at the same time");
+ nId = AccessibleTableModelChangeType::DELETE;
+ if (nX < 0)
+ {
+ nX = -nX;
+ nY = aRange.aEnd.Row() - aRange.aStart.Row();
+ }
+ else
+ {
+ nY = -nY;
+ nX = aRange.aEnd.Col() - aRange.aStart.Col();
+ }
+ }
+ else if ((nX > 0) || (nY > 0))
+ {
+ OSL_ENSURE(!((nX > 0) && (nY > 0)), "should not be possible to add row and column at the same time");
+ nId = AccessibleTableModelChangeType::INSERT;
+ if (nX < 0)
+ nY = aRange.aEnd.Row() - aRange.aStart.Row();
+ else
+ nX = aRange.aEnd.Col() - aRange.aStart.Col();
+ }
+ else
+ {
+ OSL_FAIL("is it a deletion or a insertion?");
+ }
+
+ CommitTableModelChange(rRef.GetRange().aStart.Row(),
+ rRef.GetRange().aStart.Col(),
+ rRef.GetRange().aStart.Row() + nY,
+ rRef.GetRange().aStart.Col() + nX, nId);
+
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
+ aEvent.Source = uno::Reference< XAccessibleContext >(this);
+ aEvent.NewValue <<= uno::Reference<XAccessible>(mpAccCell.get());
+
+ CommitChange(aEvent);
+ }
+ }
+ }
+ else
+ {
+ if (rHint.GetId() == SC_HINT_ACC_CURSORCHANGED)
{
if (mpViewShell)
{
@@ -598,7 +657,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
m_LastMarkedRanges = *mpMarkedRanges;
}
}
- else if (pSimpleHint->GetId() == SC_HINT_DATACHANGED)
+ else if (rHint.GetId() == SC_HINT_DATACHANGED)
{
if (!mbDelIns)
CommitTableModelChange(maRange.aStart.Row(), maRange.aStart.Col(), maRange.aEnd.Row(), maRange.aEnd.Col(), AccessibleTableModelChangeType::UPDATE);
@@ -656,66 +715,6 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
}
}*/
}
- else if ( dynamic_cast<const ScUpdateRefHint*>(&rHint) )
- {
- const ScUpdateRefHint& rRef = static_cast<const ScUpdateRefHint&>(rHint);
- if (rRef.GetMode() == URM_INSDEL && rRef.GetDz() == 0) //test whether table is inserted or deleted
- {
- if (((rRef.GetRange().aStart.Col() == maRange.aStart.Col()) &&
- (rRef.GetRange().aEnd.Col() == maRange.aEnd.Col())) ||
- ((rRef.GetRange().aStart.Row() == maRange.aStart.Row()) &&
- (rRef.GetRange().aEnd.Row() == maRange.aEnd.Row())))
- {
- // ignore next SC_HINT_DATACHANGED notification
- mbDelIns = true;
-
- sal_Int16 nId(0);
- SCsCOL nX(rRef.GetDx());
- SCsROW nY(rRef.GetDy());
- ScRange aRange(rRef.GetRange());
- if ((nX < 0) || (nY < 0))
- {
- OSL_ENSURE(!((nX < 0) && (nY < 0)), "should not be possible to remove row and column at the same time");
- nId = AccessibleTableModelChangeType::DELETE;
- if (nX < 0)
- {
- nX = -nX;
- nY = aRange.aEnd.Row() - aRange.aStart.Row();
- }
- else
- {
- nY = -nY;
- nX = aRange.aEnd.Col() - aRange.aStart.Col();
- }
- }
- else if ((nX > 0) || (nY > 0))
- {
- OSL_ENSURE(!((nX > 0) && (nY > 0)), "should not be possible to add row and column at the same time");
- nId = AccessibleTableModelChangeType::INSERT;
- if (nX < 0)
- nY = aRange.aEnd.Row() - aRange.aStart.Row();
- else
- nX = aRange.aEnd.Col() - aRange.aStart.Col();
- }
- else
- {
- OSL_FAIL("is it a deletion or a insertion?");
- }
-
- CommitTableModelChange(rRef.GetRange().aStart.Row(),
- rRef.GetRange().aStart.Col(),
- rRef.GetRange().aStart.Row() + nY,
- rRef.GetRange().aStart.Col() + nX, nId);
-
- AccessibleEventObject aEvent;
- aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
- aEvent.Source = uno::Reference< XAccessibleContext >(this);
- aEvent.NewValue <<= uno::Reference<XAccessible>(mpAccCell.get());
-
- CommitChange(aEvent);
- }
- }
- }
ScAccessibleTableBase::Notify(rBC, rHint);
}
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 80f7393..dc7ce41 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -720,8 +720,7 @@ ScAccessibleCellTextData::~ScAccessibleCellTextData()
void ScAccessibleCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SFX_HINT_DYING )
{
mpViewShell = nullptr; // invalid now
if (mpViewForwarder)
@@ -948,8 +947,7 @@ ScAccessibleEditObjectTextData::~ScAccessibleEditObjectTextData()
void ScAccessibleEditObjectTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SFX_HINT_DYING )
{
mpWindow = nullptr;
mpEditView = nullptr;
@@ -1205,8 +1203,7 @@ ScAccessiblePreviewCellTextData::~ScAccessiblePreviewCellTextData()
void ScAccessiblePreviewCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SFX_HINT_DYING )
{
mpViewShell = nullptr; // invalid now
if (mpViewForwarder)
@@ -1279,8 +1276,7 @@ ScAccessiblePreviewHeaderCellTextData::~ScAccessiblePreviewHeaderCellTextData()
void ScAccessiblePreviewHeaderCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SFX_HINT_DYING )
{
mpViewShell = nullptr; // invalid now
if (mpViewForwarder)
@@ -1398,8 +1394,7 @@ ScAccessibleTextData* ScAccessibleHeaderTextData::Clone() const
void ScAccessibleHeaderTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SFX_HINT_DYING )
{
mpViewShell = nullptr;// invalid now
mpDocSh = nullptr;
@@ -1512,8 +1507,7 @@ ScAccessibleTextData* ScAccessibleNoteTextData::Clone() const
void ScAccessibleNoteTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SFX_HINT_DYING )
{
mpViewShell = nullptr;// invalid now
mpDocSh = nullptr;
@@ -1649,8 +1643,7 @@ ScAccessibleCsvTextData::~ScAccessibleCsvTextData()
void ScAccessibleCsvTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SFX_HINT_DYING )
{
mpWindow = nullptr;
mpEditEngine = nullptr;
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index d7e8160..26b14ac 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -394,7 +394,7 @@ handle_r1c1:
{
pEngine->SetUpdateMode( true );
- pDocSh->Broadcast( SfxSimpleHint( SC_HINT_SHOWRANGEFINDER ) );
+ pDocSh->Broadcast( SfxHint( SC_HINT_SHOWRANGEFINDER ) );
}
}
@@ -484,7 +484,7 @@ void ScInputHandler::DeleteRangeFinder()
{
ScDocShell* pDocSh = pActiveViewSh->GetViewData().GetDocShell();
pRangeFindList->SetHidden(true);
- pDocSh->Broadcast( SfxSimpleHint( SC_HINT_SHOWRANGEFINDER ) ); // Steal
+ pDocSh->Broadcast( SfxHint( SC_HINT_SHOWRANGEFINDER ) ); // Steal
DELETEZ(pRangeFindList);
}
}
@@ -1837,7 +1837,7 @@ void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // Executed synchron
EnterHandler();
bFormulaMode = false;
pRefViewSh = nullptr;
- SfxGetpApp()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( FID_REFMODECHANGED ) );
SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
pInputWin->SetFormulaMode(false);
@@ -2359,7 +2359,7 @@ void ScInputHandler::UpdateFormulaMode()
{
bFormulaMode = true;
pRefViewSh = pActiveViewSh;
- pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
+ pSfxApp->Broadcast( SfxHint( FID_REFMODECHANGED ) );
SC_MOD()->SetRefInputHdl(this);
if (pInputWin)
pInputWin->SetFormulaMode(true);
@@ -2378,7 +2378,7 @@ void ScInputHandler::UpdateFormulaMode()
ShowRefFrame();
bFormulaMode = false;
pRefViewSh = nullptr;
- pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
+ pSfxApp->Broadcast( SfxHint( FID_REFMODECHANGED ) );
SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
pInputWin->SetFormulaMode(false);
@@ -2810,7 +2810,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
}
bFormulaMode = false;
- pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
+ pSfxApp->Broadcast( SfxHint( FID_REFMODECHANGED ) );
SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
pInputWin->SetFormulaMode(false);
@@ -2865,7 +2865,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
}
}
- pSfxApp->Broadcast( SfxSimpleHint( FID_KILLEDITVIEW_NOPAINT ) );
+ pSfxApp->Broadcast( SfxHint( FID_KILLEDITVIEW_NOPAINT ) );
if ( pExecuteSh )
{
@@ -2894,7 +2894,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
pLastState = nullptr;
}
else
- pSfxApp->Broadcast( SfxSimpleHint( FID_KILLEDITVIEW ) );
+ pSfxApp->Broadcast( SfxHint( FID_KILLEDITVIEW ) );
if ( bOldMod && pExecuteSh && pCellAttrs && !bForget )
{
@@ -2938,7 +2938,7 @@ void ScInputHandler::CancelHandler()
pExecuteSh->ActiveGrabFocus();
}
bFormulaMode = false;
- SfxGetpApp()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( FID_REFMODECHANGED ) );
SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
pInputWin->SetFormulaMode(false);
@@ -3688,7 +3688,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
}
if (bStopEditing)
- SfxGetpApp()->Broadcast( SfxSimpleHint( FID_KILLEDITVIEW ) );
+ SfxGetpApp()->Broadcast( SfxHint( FID_KILLEDITVIEW ) );
// 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 e62888f..fae016f 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -2066,17 +2066,16 @@ void ScPosWnd::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( !bFormulaMode )
{
// Does the list of range names need updating?
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if ( pSimpleHint )
+ if ( dynamic_cast<const SfxEventHint*>(&rHint) )
{
- const sal_uInt32 nHintId = pSimpleHint->GetId();
- if ( nHintId == SC_HINT_AREAS_CHANGED || nHintId == SC_HINT_NAVIGATOR_UPDATEALL)
+ sal_uLong nEventId = static_cast<const SfxEventHint*>(&rHint)->GetEventId();
+ if ( nEventId == SFX_EVENT_ACTIVATEDOC )
FillRangeNames();
}
- else if ( dynamic_cast<const SfxEventHint*>(&rHint) )
+ else
{
- sal_uLong nEventId = static_cast<const SfxEventHint*>(&rHint)->GetEventId();
- if ( nEventId == SFX_EVENT_ACTIVATEDOC )
+ const sal_uInt32 nHintId = rHint.GetId();
+ if ( nHintId == SC_HINT_AREAS_CHANGED || nHintId == SC_HINT_NAVIGATOR_UPDATEALL)
FillRangeNames();
}
}
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index ac5ddec..4a33953 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -319,8 +319,7 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3
void ScModule::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DEINITIALIZING )
+ if ( rHint.GetId() == SFX_HINT_DEINITIALIZING )
{
// ConfigItems must be removed before ConfigManager
DeleteCfg();
@@ -1251,7 +1250,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
SetPrintOptions( rNewOpt );
// broadcast causes all previews to recalc page numbers
- SfxGetpApp()->Broadcast( SfxSimpleHint( SID_SCPRINTOPTIONS ) );
+ SfxGetpApp()->Broadcast( SfxHint( SID_SCPRINTOPTIONS ) );
}
if ( bSaveAppOptions )
@@ -1553,7 +1552,7 @@ void ScModule::SetRefDialog( sal_uInt16 nId, bool bVis, SfxViewFrame* pViewFrm )
}
SfxApplication* pSfxApp = SfxGetpApp();
- pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
+ pSfxApp->Broadcast( SfxHint( FID_REFMODECHANGED ) );
}
}
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 5221907..ad90f5d 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -24,7 +24,6 @@
#include <comphelper/string.hxx>
#include <svtools/colorcfg.hxx>
-#include <svl/smplhint.hxx>
#include <sal/macros.h>
#include <tools/poly.hxx>
#include "scmod.hxx"
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 1e5ce4c..4137625 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( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
return true;
}
@@ -139,7 +139,7 @@ bool ScDBDocFunc::DeleteDBRange(const OUString& rName)
}
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
bDone = true;
}
@@ -186,7 +186,7 @@ bool ScDBDocFunc::RenameDBRange( const OUString& rOld, const OUString& rNew )
delete pUndoColl;
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
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), PAINT_GRID);
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
if (bRecord)
{
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 877fadd..58862d9 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2087,7 +2087,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
return bSuccess;
}
@@ -2583,7 +2583,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
return true;
}
@@ -2909,7 +2909,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
delete pClipDoc;
return true;
@@ -3057,7 +3057,7 @@ bool ScDocFunc::InsertTable( SCTAB nTab, const OUString& rName, bool bRecord, bo
rDocShell.PostPaintExtras();
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
bSuccess = true;
}
else if (!bApi)
@@ -3153,9 +3153,9 @@ bool ScDocFunc::DeleteTable( SCTAB nTab, bool bRecord, bool /* bApi */ )
aModificator.SetDocumentModified();
SfxApplication* pSfxApp = SfxGetpApp(); // Navigator
- pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
- pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+ pSfxApp->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ pSfxApp->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
+ pSfxApp->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
bSuccess = true;
}
@@ -3213,7 +3213,7 @@ void ScDocFunc::SetTableVisible( SCTAB nTab, bool bVisible, bool bApi )
if (!bVisible)
rDocShell.Broadcast( ScTablesHint( SC_TAB_HIDDEN, nTab ) );
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
rDocShell.PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS);
aModificator.SetDocumentModified();
}
@@ -3275,7 +3275,7 @@ bool ScDocFunc::RenameTable( SCTAB nTab, const OUString& rName, bool bRecord, bo
}
rDocShell.PostPaintExtras();
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
bSuccess = true;
}
@@ -3312,7 +3312,7 @@ bool ScDocFunc::SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bo
rDocShell.PostPaintExtras();
ScDocShellModificator aModificator( rDocShell );
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
bSuccess = true;
}
@@ -4914,7 +4914,7 @@ void ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc, SCTA
if (bModifyDoc)
{
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxSimpleHint(SC_HINT_AREAS_CHANGED) );
+ SfxGetpApp()->Broadcast( SfxHint(SC_HINT_AREAS_CHANGED) );
}
}
@@ -4936,7 +4936,7 @@ void ScDocFunc::ModifyAllRangeNames(const std::map<OUString, std::unique_ptr<ScR
rDoc.CompileHybridFormula();
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast(SfxSimpleHint(SC_HINT_AREAS_CHANGED));
+ SfxGetpApp()->Broadcast(SfxHint(SC_HINT_AREAS_CHANGED));
}
void ScDocFunc::CreateOneName( ScRangeName& rList,
@@ -5332,7 +5332,7 @@ void ScDocFunc::InsertAreaLink( const OUString& rFile, const OUString& rFilter,
if (pBindings)
pBindings->Invalidate( SID_LINKS );
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
}
void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFormat* pFormat, SCTAB nTab, const ScRangeList& rRanges )
@@ -5408,7 +5408,7 @@ void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFor
rDocShell.PostPaint(*pRepaintRange, PAINT_GRID);
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast(SfxSimpleHint(SC_HINT_AREAS_CHANGED));
+ SfxGetpApp()->Broadcast(SfxHint(SC_HINT_AREAS_CHANGED));
}
void ScDocFunc::SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB nTab )
@@ -5436,7 +5436,7 @@ void ScDocFunc::SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB
rDoc.SetStreamValid(nTab, false);
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast(SfxSimpleHint(SC_HINT_AREAS_CHANGED));
+ SfxGetpApp()->Broadcast(SfxHint(SC_HINT_AREAS_CHANGED));
}
void ScDocFunc::ConvertFormulaToValue( const ScRange& rRange, bool bInteraction )
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 83b43f7..823cf06 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -653,18 +653,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
}
- if ( dynamic_cast<const SfxSimpleHint*>(&rHint) ) // Without parameter
- {
- switch ( static_cast<const SfxSimpleHint&>(rHint).GetId() )
- {
- case SFX_HINT_TITLECHANGED:
- aDocument.SetName( SfxShell::GetName() );
- // RegisterNewTargetNames gibts nicht mehr
- SfxGetpApp()->Broadcast(SfxSimpleHint( SC_HINT_DOCNAME_CHANGED )); // Navigator
- break;
- }
- }
- else if ( dynamic_cast<const SfxStyleSheetHint*>(&rHint) ) // Template changed
+ if ( dynamic_cast<const SfxStyleSheetHint*>(&rHint) ) // Template changed
NotifyStyle( static_cast<const SfxStyleSheetHint&>(rHint) );
else if ( dynamic_cast<const ScAutoStyleHint*>(&rHint) )
{
@@ -1000,6 +989,17 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
break;
}
}
+ else // 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;
+ }
+ }
}
// Load contents for organizer
@@ -2491,7 +2491,7 @@ bool ScDocShell::DoSaveCompleted( SfxMedium * pNewStor, bool bRegisterRecent )
bool bRet = SfxObjectShell::DoSaveCompleted( pNewStor, bRegisterRecent );
// SC_HINT_DOC_SAVED for change ReadOnly -> Read/Write
- Broadcast( SfxSimpleHint( SC_HINT_DOC_SAVED ) );
+ Broadcast( SfxHint( SC_HINT_DOC_SAVED ) );
return bRet;
}
@@ -2803,7 +2803,7 @@ void ScDocShell::SetModified( bool bModified )
if ( SfxObjectShell::IsEnableSetModified() )
{
SfxObjectShell::SetModified( bModified );
- Broadcast( SfxSimpleHint( SFX_HINT_DOCCHANGED ) );
+ Broadcast( SfxHint( SFX_HINT_DOCCHANGED ) );
}
}
@@ -2819,7 +2819,7 @@ void ScDocShell::SetDocumentModified()
// of RecalcModeAlways formulas (like OFFSET) after modifying cells
aDocument.Broadcast(ScHint(SC_HINT_DATACHANGED, BCA_BRDCST_ALWAYS));
aDocument.InvalidateTableArea(); // #i105279# needed here
- aDocument.BroadcastUno( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+ aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) );
pPaintLockData->SetModified(); // Later on ...
return;
@@ -2856,7 +2856,7 @@ void ScDocShell::SetDocumentModified()
}
// notify UNO objects after BCA_BRDCST_ALWAYS etc.
- aDocument.BroadcastUno( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+ aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) );
}
/**
@@ -2894,7 +2894,7 @@ void ScDocShell::SetDrawModified()
if ( aDocument.IsChartListenerCollectionNeedsUpdate() )
{
aDocument.UpdateChartListenerCollection();
- SfxGetpApp()->Broadcast(SfxSimpleHint( SC_HINT_DRAW_CHANGED )); // Navigator
+ SfxGetpApp()->Broadcast(SfxHint( SC_HINT_DRAW_CHANGED )); // Navigator
}
SC_MOD()->AnythingChanged();
}
@@ -3160,7 +3160,7 @@ void ScDocShellModificator::SetDocumentModified()
{
// uno broadcast is necessary for api to work
// -> must also be done during xml import
- rDoc.BroadcastUno( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+ rDoc.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) );
}
}
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index 86055ed..e211ee3 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -173,7 +173,7 @@ ScDrawLayer* ScDocShell::MakeDrawLayer()
aDocument.InitDrawLayer(this);
pDrawLayer = aDocument.GetDrawLayer();
InitItems(); // including Undo and Basic
- Broadcast( SfxSimpleHint( SC_HINT_DRWLAYER_NEW ) );
+ Broadcast( SfxHint( SC_HINT_DRWLAYER_NEW ) );
if (nDocumentLock)
pDrawLayer->setLock(true);
}
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index baf3908..e236620 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( SfxSimpleHint( FID_DATACHANGED ) );
- SfxGetpApp()->Broadcast(SfxSimpleHint( FID_ANYDATACHANGED )); // Navigator
+ Broadcast( SfxHint( FID_DATACHANGED ) );
+ SfxGetpApp()->Broadcast(SfxHint( FID_ANYDATACHANGED )); // Navigator
aDocument.ClearFormulaContext();
//! Navigator direkt benachrichtigen!
}
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 6d0f62a..c992590 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(SfxSimpleHint(FID_DATACHANGED));
+ Broadcast(SfxHint(FID_DATACHANGED));
// 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( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+ aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) );
// Wenn es Charts gibt, dann alles painten, damit nicht
// PostDataChanged und die Charts nacheinander kommen und Teile
@@ -1272,8 +1272,8 @@ void ScDocShell::DoHardRecalc( bool /* bApi */ )
// CalcAll doesn't broadcast value changes, so SC_HINT_CALCALL is broadcasted globally
// in addition to SFX_HINT_DATACHANGED.
- aDocument.BroadcastUno( SfxSimpleHint( SC_HINT_CALCALL ) );
- aDocument.BroadcastUno( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+ aDocument.BroadcastUno( SfxHint( SC_HINT_CALCALL ) );
+ aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) );
// use hard recalc also to disable stream-copying of all sheets
// (somewhat consistent with charts)
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 4778dc1..a57eb3d 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, PAINT_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( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+ aDocument.BroadcastUno( SfxHint( SFX_HINT_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( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
}
pData = pNoNameData;
}
@@ -758,7 +758,7 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const OUString& rName, const OUStri
aModificator.SetDocumentModified();
if (!aOldName.equals(rName))
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
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( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
return nNewTab;
}
@@ -991,7 +991,7 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec
PostPaintGridAll();
PostPaintExtras();
aModificator.SetDocumentModified();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
return true;
}
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 663cbd4..b34cb9d 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -42,7 +42,6 @@
#include <sfx2/sfxsids.hrc>
#include <sfx2/objsh.hxx>
#include <svl/broadcast.hxx>
-#include <svl/smplhint.hxx>
#include <svl/itemset.hxx>
#include <svl/stritem.hxx>
#include <svl/urihelper.hxx>
diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx
index 21d7c2c..b7d53b9 100644
--- a/sc/source/ui/docshell/servobj.cxx
+++ b/sc/source/ui/docshell/servobj.cxx
@@ -201,8 +201,7 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if ( &rBC == pDocSh )
{
// from DocShell, only SFX_HINT_DYING is interesting
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>( &rHint );
- if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
+ if ( rHint.GetId() == SFX_HINT_DYING )
{
pDocSh = nullptr;
EndListening(*SfxGetpApp());
@@ -211,9 +210,7 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
else if (dynamic_cast<const SfxApplication*>( &rBC) != nullptr)
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>( &rHint );
- if ( !aItemStr.isEmpty() && pSimpleHint &&
- pSimpleHint->GetId() == SC_HINT_AREAS_CHANGED )
+ if ( !aItemStr.isEmpty() && rHint.GetId() == SC_HINT_AREAS_CHANGED )
{
// check if named range was modified
ScRange aNew;
@@ -237,9 +234,9 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
bDataChanged = true;
}
}
- else if (const SfxSimpleHint *pSplHint = dynamic_cast<const SfxSimpleHint*>(&rHint))
+ else
{
- if (pSplHint->GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SFX_HINT_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 182e142..38617b3 100644
--- a/sc/source/ui/inc/AccessibilityHints.hxx
+++ b/sc/source/ui/inc/AccessibilityHints.hxx
@@ -22,7 +22,6 @@
#include "viewdata.hxx"
#include <com/sun/star/uno/XInterface.hpp>
-#include <svl/smplhint.hxx>
#include <svl/hint.hxx>
#define SC_HINT_ACC_SIMPLE_START SFX_HINT_USER00
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 63e6cef..4ed52bd 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -642,7 +642,7 @@ void ScFormulaReferenceHelper::DoClose( sal_uInt16 nId )
}
SC_MOD()->SetRefDialog( nId, false, pMyViewFrm );
- pSfxApp->Broadcast( SfxSimpleHint( FID_KILLEDITVIEW ) );
+ pSfxApp->Broadcast( SfxHint( FID_KILLEDITVIEW ) );
ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell();
if ( pScViewShell )
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index 73a293b..c46f17e 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( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREAS_CHANGED ) );
mpDocShell->SetDocumentModified();
Close();
}
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 73ee425..3099de8 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -817,10 +817,18 @@ void ScNavigatorDlg::DoResize()
void ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>( &rHint );
- if ( pSimpleHint )
+ if ( dynamic_cast<const SfxEventHint*>(&rHint) )
{
- const sal_uInt32 nHintId = pSimpleHint->GetId();
+ sal_uLong nEventId = static_cast<const SfxEventHint&>(rHint).GetEventId();
+ if ( nEventId == SFX_EVENT_ACTIVATEDOC )
+ {
+ aLbEntries->ActiveDocChanged();
+ UpdateAll();
+ }
+ }
+ else
+ {
+ const sal_uInt32 nHintId = rHint.GetId();
if ( nHintId == SC_HINT_DOCNAME_CHANGED )
{
@@ -876,15 +884,6 @@ void ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
}
}
- else if ( dynamic_cast<const SfxEventHint*>(&rHint) )
- {
- sal_uLong nEventId = static_cast<const SfxEventHint&>(rHint).GetEventId();
- if ( nEventId == SFX_EVENT_ACTIVATEDOC )
- {
- aLbEntries->ActiveDocChanged();
- UpdateAll();
- }
- }
}
IMPL_LINK_TYPED( ScNavigatorDlg, TimeHdl, Idle*, pIdle, void )
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index a11065e..c7bd629 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( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
// Selection not until EndUndo
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -524,7 +524,7 @@ void ScUndoDeleteCells::Redo()
BeginRedo();
DoChange( false);
EndRedo();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
@@ -683,7 +683,7 @@ void ScUndoDeleteMulti::Undo()
//! since no data for selection exist
EndUndo();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
}
void ScUndoDeleteMulti::Redo()
@@ -710,7 +710,7 @@ void ScUndoDeleteMulti::Redo()
DoChange();
EndRedo();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
}
void ScUndoDeleteMulti::Repeat(SfxRepeatTarget& rTarget)
@@ -1062,7 +1062,7 @@ void ScUndoPaste::Undo()
if (!maBlockRanges.empty())
ShowTable(*maBlockRanges.front());
EndUndo();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
}
void ScUndoPaste::Redo()
@@ -1073,7 +1073,7 @@ void ScUndoPaste::Redo()
DoChange( false );
EnableDrawAdjust( &rDoc, true ); //! include in ScBlockUndo?
EndRedo();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
}
void ScUndoPaste::Repeat(SfxRepeatTarget& rTarget)
@@ -1335,7 +1335,7 @@ void ScUndoDragDrop::Undo()
}
EndUndo();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
}
void ScUndoDragDrop::Redo()
@@ -1419,7 +1419,7 @@ void ScUndoDragDrop::Redo()
EnableDrawAdjust( &rDoc, true ); //! include in ScBlockUndo?
EndRedo();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
}
void ScUndoDragDrop::Repeat(SfxRepeatTarget& /* rTarget */)
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 2f88c29..6f52603 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -1516,7 +1516,7 @@ void ScUndoInsertAreaLink::Undo()
if (pLink)
pLinkManager->Remove( pLink );
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
}
void ScUndoInsertAreaLink::Redo()
@@ -1532,7 +1532,7 @@ void ScUndoInsertAreaLink::Redo()
pLink->Update();
pLink->SetInCreate( false );
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
}
void ScUndoInsertAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
@@ -1581,7 +1581,7 @@ void ScUndoRemoveAreaLink::Undo()
pLink->Update();
pLink->SetInCreate( false );
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
}
void ScUndoRemoveAreaLink::Redo()
@@ -1594,7 +1594,7 @@ void ScUndoRemoveAreaLink::Redo()
if (pLink)
pLinkManager->Remove( pLink );
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
}
void ScUndoRemoveAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index 8e3c685..dcf04df 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( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREAS_CHANGED ) );
}
void ScUndoRangeNames::Undo()
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 28d5dcf..3fc8183 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( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
EndUndo();
}
@@ -1020,7 +1020,7 @@ void ScUndoDBData::Redo()
rDoc.CompileHybridFormula();
rDoc.SetAutoCalc( bOldAutoCalc );
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
EndRedo();
}
@@ -1842,7 +1842,7 @@ void ScUndoDataForm::Undo()
DoChange( true );
ShowTable( aBlockRange );
EndUndo();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
}
void ScUndoDataForm::Redo()
@@ -1853,7 +1853,7 @@ void ScUndoDataForm::Redo()
DoChange( false );
EnableDrawAdjust( &rDoc, true ); //! include in ScBlockUndo?
EndRedo();
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
}
void ScUndoDataForm::Repeat(SfxRepeatTarget& /*rTarget*/)
diff --git a/sc/source/ui/undo/undorangename.cxx b/sc/source/ui/undo/undorangename.cxx
index f775269..5ed0df8 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(SfxSimpleHint(SC_HINT_AREAS_CHANGED));
+ SfxGetpApp()->Broadcast(SfxHint(SC_HINT_AREAS_CHANGED));
}
ScUndoAddRangeData::ScUndoAddRangeData(ScDocShell* pDocSh, ScRangeData* pRangeData, SCTAB nTab) :
@@ -103,7 +103,7 @@ void ScUndoAddRangeData::Undo()
pRangeName = rDoc.GetRangeName( mnTab );
}
pRangeName->erase(*mpRangeData);
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREAS_CHANGED ) );
}
@@ -120,7 +120,7 @@ void ScUndoAddRangeData::Redo()
pRangeName = rDoc.GetRangeName( mnTab );
}
pRangeName->insert(new ScRangeData(*mpRangeData));
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) );
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREAS_CHANGED ) );
}
void ScUndoAddRangeData::Repeat(SfxRepeatTarget& /*rTarget*/)
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 4470fc1..59bba80 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -20,7 +20,7 @@
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include "undotab.hxx"
#include "document.hxx"
@@ -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( SfxSimpleHint( SC_HINT_FORCESETTAB ) );
+ pDocShell->Broadcast( SfxHint( SC_HINT_FORCESETTAB ) );
}
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( SfxSimpleHint( SC_HINT_FORCESETTAB ) );
+ pDocShell->Broadcast( SfxHint( SC_HINT_FORCESETTAB ) );
}
void ScUndoInsertTables::Redo()
@@ -362,9 +362,9 @@ void ScUndoDeleteTab::Undo()
pDocShell->Broadcast( ScTablesHint( SC_TAB_INSERTED, theTabs[i]) );
}
SfxApplication* pSfxApp = SfxGetpApp(); // Navigator
- pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
- pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+ pSfxApp->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
+ pSfxApp->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
+ pSfxApp->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) );
pDocShell->PostPaint(0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_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( SfxSimpleHint( SC_HINT_FORCESETTAB ) );
+ pDocShell->Broadcast( SfxHint( SC_HINT_FORCESETTAB ) );
}
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( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); // Navigator
pDocShell->PostPaintGridAll();
pDocShell->PostPaintExtras();
@@ -540,7 +540,7 @@ void ScUndoMoveTab::DoChange( bool bUndo ) const
}
}
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); // Navigator
pDocShell->PostPaintGridAll();
pDocShell->PostPaintExtras();
@@ -601,7 +601,7 @@ void ScUndoCopyTab::DoChange() const
if (pViewShell)
pViewShell->SetTabNo((*mpOldTabs)[0],true);
- SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator
+ SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); // Navigator
pDocShell->PostPaintGridAll();
pDocShell->PostPaintExtras();
@@ -820,10 +820,10 @@ void ScUndoMakeScenario::Undo()
if (pViewShell)
pViewShell->SetTabNo( nSrcTab, true );
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list