summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/options/optmemory.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx
index 614662066306..82782f5aa82b 100644
--- a/cui/source/options/optmemory.cxx
+++ b/cui/source/options/optmemory.cxx
@@ -43,7 +43,6 @@
#include <sfx2/viewfrm.hxx>
#include <vcl/msgbox.hxx>
#include <rtl/math.hxx>
-#include <unotools/undoopt.hxx>
#include <unotools/useroptions.hxx>
#include <unotools/fontoptions.hxx>
#include <svtools/menuoptions.hxx>
@@ -185,14 +184,16 @@ sal_Bool OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet )
{
sal_Bool bModified = sal_False;
- // Undo-Schritte
- if ( aUndoEdit.GetText() != aUndoEdit.GetSavedValue() )
- SvtUndoOptions().SetUndoCount((sal_uInt16)aUndoEdit.GetValue());
-
boost::shared_ptr< unotools::ConfigurationChanges > batch(
unotools::ConfigurationChanges::create(
comphelper::getProcessComponentContext()));
+ // Undo-Schritte
+ if ( aUndoEdit.GetText() != aUndoEdit.GetSavedValue() )
+ officecfg::Office::Common::Undo::Steps::set(
+ comphelper::getProcessComponentContext(), batch,
+ aUndoEdit.GetValue());
+
// GraphicCache
sal_Int32 totalCacheSize = GetNfGraphicCacheVal();
officecfg::Office::Common::Cache::GraphicManager::TotalCacheSize::set(
@@ -241,7 +242,9 @@ void OfaMemoryOptionsPage::Reset( const SfxItemSet& rSet )
const SfxPoolItem* pItem;
// Undo-Schritte
- aUndoEdit.SetValue( SvtUndoOptions().GetUndoCount() );
+ aUndoEdit.SetValue(
+ officecfg::Office::Common::Undo::Steps::get(
+ comphelper::getProcessComponentContext()));
aUndoEdit.SaveValue();
// GraphicCache