diff options
Diffstat (limited to 'sc/source/core/tool/chgtrack.cxx')
-rw-r--r-- | sc/source/core/tool/chgtrack.cxx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx index 22d996dd701f..7dfd75206a9f 100644 --- a/sc/source/core/tool/chgtrack.cxx +++ b/sc/source/core/tool/chgtrack.cxx @@ -36,12 +36,12 @@ #include <tools/shl.hxx> // SHL_CALC #include <tools/stack.hxx> #include <tools/rtti.hxx> -#include <svtools/zforlist.hxx> -#include <svtools/itemset.hxx> -#include <svtools/isethint.hxx> -#include <svtools/itempool.hxx> +#include <svl/zforlist.hxx> +#include <svl/itemset.hxx> +#include <svl/isethint.hxx> +#include <svl/itempool.hxx> #include <sfx2/app.hxx> -#include <svtools/useroptions.hxx> +#include <unotools/useroptions.hxx> #include <sfx2/sfxsids.hrc> #include "cell.hxx" @@ -2229,7 +2229,7 @@ ScChangeTrack::ScChangeTrack( ScDocument* pDocP ) : pDoc( pDocP ) { Init(); - StartListening(SC_MOD()->GetUserOptions()); + SC_MOD()->GetUserOptions().AddListener(this); ppContentSlots = new ScChangeActionContent* [ nContentSlots ]; memset( ppContentSlots, 0, nContentSlots * sizeof( ScChangeActionContent* ) ); @@ -2240,13 +2240,14 @@ ScChangeTrack::ScChangeTrack( ScDocument* pDocP, const ScStrCollection& aTempUse pDoc( pDocP ) { Init(); - StartListening(SC_MOD()->GetUserOptions()); + SC_MOD()->GetUserOptions().AddListener(this); ppContentSlots = new ScChangeActionContent* [ nContentSlots ]; memset( ppContentSlots, 0, nContentSlots * sizeof( ScChangeActionContent* ) ); } ScChangeTrack::~ScChangeTrack() { + SC_MOD()->GetUserOptions().RemoveListener(this); DtorClear(); delete [] ppContentSlots; } @@ -2339,11 +2340,9 @@ void ScChangeTrack::Clear() } -void __EXPORT ScChangeTrack::Notify( SfxBroadcaster&, const SfxHint& rHint ) +void __EXPORT ScChangeTrack::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) { - if ( !pDoc->IsInDtorClear() && - rHint.ISA(SfxSimpleHint) && - ((SfxSimpleHint&)rHint).GetId() == SFX_HINT_USER_OPTIONS_CHANGED ) + if ( !pDoc->IsInDtorClear() ) { const SvtUserOptions& rUserOptions = SC_MOD()->GetUserOptions(); USHORT nOldCount = aUserCollection.GetCount(); |