summaryrefslogtreecommitdiff
path: root/sw/source/ui/ribbar/inputwin.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-27 15:03:39 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-27 15:04:26 +0100
commit452d86c9cbfb6b4b7e86426931a0d982dd8bb180 (patch)
tree4f80b7cc380d731c71f566ee7e91b2e300126360 /sw/source/ui/ribbar/inputwin.cxx
parentdb59e4481614f58e111a86a1926e49fb523ebbae (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/ribbar/inputwin.cxx')
-rw-r--r--sw/source/ui/ribbar/inputwin.cxx18
1 files changed, 7 insertions, 11 deletions
diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx
index 9657ca359da6..34497e82f274 100644
--- a/sw/source/ui/ribbar/inputwin.cxx
+++ b/sw/source/ui/ribbar/inputwin.cxx
@@ -26,8 +26,10 @@
*
************************************************************************/
+#include "sal/config.h"
-
+#include <comphelper/processfactory.hxx>
+#include <officecfg/Office/Common.hxx>
#include <tools/gen.hxx>
#include <sfx2/imgmgr.hxx>
#include <sfx2/viewfrm.hxx>
@@ -35,7 +37,6 @@
#include <svx/ruler.hxx>
#include <svl/zforlist.hxx>
#include <svl/stritem.hxx>
-#include <unotools/undoopt.hxx>
#include "swtypes.hxx"
#include "cmdid.h"
@@ -74,7 +75,6 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind )
pView(0),
pBindings(pBind),
aAktTableName(aEmptyStr)
- , m_nActionCount(0)
, m_bDoesUndo(true)
, m_bResetUndo(false)
, m_bCallUndo(false)
@@ -158,10 +158,6 @@ void SwInputWindow::CleanupUglyHackWithUndo()
{
pWrtShell->Undo();
}
- if (0 == m_nActionCount)
- {
- SW_MOD()->GetUndoOptions().SetUndoCount(0);
- }
m_bResetUndo = false; // #i117122# once is enough :)
}
}
@@ -246,10 +242,10 @@ void SwInputWindow::ShowWin()
if( bIsTable )
{
m_bResetUndo = true;
- m_nActionCount = SW_MOD()->GetUndoOptions().GetUndoCount();
- if (0 == m_nActionCount) { // deactivated? turn it on...
- SW_MOD()->GetUndoOptions().SetUndoCount(1);
- }
+ SAL_WARN_IF(
+ officecfg::Office::Common::Undo::Steps::get(
+ comphelper::getProcessComponentContext()) <= 0,
+ "sw", "/org.openoffice.Office.Common/Undo/Steps <= 0");
m_bDoesUndo = pWrtShell->DoesUndo();
if( !m_bDoesUndo )