diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-01-27 15:03:39 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-01-27 15:04:26 +0100 |
commit | 452d86c9cbfb6b4b7e86426931a0d982dd8bb180 (patch) | |
tree | 4f80b7cc380d731c71f566ee7e91b2e300126360 /sw/source/ui/app/apphdl.cxx | |
parent | db59e4481614f58e111a86a1926e49fb523ebbae (diff) |
Replace SvtUndoOptions with (simplified) direct configuration access.
Also, code in sw can be simplified under the premise that always
/org.openoffice.Office.Common/Undo/Steps > 0.
Diffstat (limited to 'sw/source/ui/app/apphdl.cxx')
-rw-r--r-- | sw/source/ui/app/apphdl.cxx | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 716300ef3d6e..34fce61edd66 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -32,7 +32,6 @@ #include <tools/link.hxx> #include <svl/svstdarr.hxx> #include <svl/urihelper.hxx> -#include <unotools/undoopt.hxx> #include <unotools/pathoptions.hxx> #include <svtools/accessibilityoptions.hxx> #include <sfx2/dispatch.hxx> @@ -770,11 +769,6 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) pUserOptions->RemoveListener(this); DELETEZ(pUserOptions); } - if( pUndoOptions ) - { - pUndoOptions->RemoveListener(this); - DELETEZ(pUndoOptions); - } } } } @@ -785,22 +779,6 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal { bAuthorInitialised = sal_False; } - else if( pBrdCst == pUndoOptions ) - { - sal_Int32 const nNew = GetUndoOptions().GetUndoCount(); - bool const bUndo = (nNew != 0); - // switch Undo for all DocShells - // Iterate through DocShells and switch undos - TypeId aType(TYPE(SwDocShell)); - SwDocShell * pDocShell = - static_cast<SwDocShell *>(SfxObjectShell::GetFirst(&aType)); - while (pDocShell) - { - pDocShell->GetDoc()->GetIDocumentUndoRedo().DoUndo(bUndo); - pDocShell = static_cast<SwDocShell *>( - SfxObjectShell::GetNext(*pDocShell, &aType)); - } - } else if ( pBrdCst == pColorConfig || pBrdCst == pAccessibilityOptions ) { sal_Bool bAccessibility = sal_False; @@ -902,16 +880,6 @@ SvtUserOptions& SwModule::GetUserOptions() return *pUserOptions; } -SvtUndoOptions& SwModule::GetUndoOptions() -{ - if(!pUndoOptions) - { - pUndoOptions = new SvtUndoOptions; - pUndoOptions->AddListener(this); - } - return *pUndoOptions; -} - const SwMasterUsrPref *SwModule::GetUsrPref(sal_Bool bWeb) const { SwModule* pNonConstModule = (SwModule*)this; |