summaryrefslogtreecommitdiff
path: root/include/svx/sdrundomanager.hxx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2012-08-09 08:42:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-28 15:55:23 +0100
commit12a4200e8ff7f045efcc7e9d15a24b15b248c437 (patch)
tree00363aedf07713ec9ff931d933b86a6b35e20267 /include/svx/sdrundomanager.hxx
parent64b07d99aa0b31b3d04519afe6afe0cdf36bcd6f (diff)
Related: #i120498# Enhanced Undo/Redo and user experience...
when editing texts in graphic objects and/or tables (cherry picked from commit a096725779b210c7a2706e72596fd7c80e049fdd) Conflicts: editeng/inc/editeng/editeng.hxx editeng/inc/editeng/editund2.hxx editeng/inc/editeng/outliner.hxx editeng/source/editeng/editundo.cxx editeng/source/editeng/impedit.hxx editeng/source/outliner/outliner.cxx sd/source/core/undo/undomanager.cxx sd/source/ui/view/drviewse.cxx svx/Library_svxcore.mk svx/Package_inc.mk svx/inc/svx/svdedxv.hxx svx/source/svdraw/svdedxv.cxx Change-Id: I40e3ef2dff681f9b6f2f6b5d35507071f8110533 Comment unused variable pNewEditUndoManager to silence the compiler (cherry picked from commit 568655083af7830e7b9edf56ef862ddf9a99003b) Change-Id: Ib7179ee6c34ce03a75942978831c3a55968f161f Removed unused variable (cherry picked from commit 0bbde4414badfd40234de4a4c9f750194f5d1d5e) Change-Id: I39e7f25426e8e7d1367102d603b0f6c84d96622f
Diffstat (limited to 'include/svx/sdrundomanager.hxx')
-rw-r--r--include/svx/sdrundomanager.hxx55
1 files changed, 55 insertions, 0 deletions
diff --git a/include/svx/sdrundomanager.hxx b/include/svx/sdrundomanager.hxx
new file mode 100644
index 000000000000..0d899f647aa9
--- /dev/null
+++ b/include/svx/sdrundomanager.hxx
@@ -0,0 +1,55 @@
+/*
+ * 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 _SDR_UNDOMANAGER_HXX
+#define _SDR_UNDOMANAGER_HXX
+
+#include "svx/svxdllapi.h"
+#include <sal/types.h>
+#include <editeng/editund2.hxx>
+#include <tools/link.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SVX_DLLPUBLIC SdrUndoManager : public EditUndoManager
+{
+private:
+ using EditUndoManager::Undo;
+ using EditUndoManager::Redo;
+
+ Link maEndTextEditHdl;
+ SfxUndoAction* mpLastUndoActionBeforeTextEdit;
+
+public:
+ SdrUndoManager(sal_uInt16 nMaxUndoActionCount = 20);
+ virtual ~SdrUndoManager();
+
+ /// react depending on edit mode and if no more undo is possible
+ virtual sal_Bool Undo();
+ virtual sal_Bool Redo();
+
+ // Call for the view which starts the interactive text edit. Use link to
+ // activate (start text edit) and empty link to reset (end text edit). On
+ // reset all text edit actions will be removed from this undo manager to
+ // restore the state before activation
+ void SetEndTextEditHdl(const Link& rLink);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_UNDOMANAGER_HXX
+// eof