Kaydet (Commit) c726a1b1 authored tarafından Armin Le Grand's avatar Armin Le Grand Kaydeden (comit) Caolán McNamara

Related: #i120515# Implemented and finetuned the enhanced Undo feature

(see #i120498#) for sc

(cherry picked from commit 472c175d)

Conflicts:
	sc/source/core/data/document.cxx
	sc/source/ui/view/drawview.cxx

Change-Id: I4ae171807b80e3f6c9f44028bd04dfac9338e627
üst 71e37a5c
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "editeng/editobj.hxx" #include "editeng/editobj.hxx"
#include <svx/pageitem.hxx> #include <svx/pageitem.hxx>
#include <editeng/editeng.hxx> #include <editeng/editeng.hxx>
#include <svx/sdrundomanager.hxx>
#include <svx/svditer.hxx> #include <svx/svditer.hxx>
#include <svx/svdpage.hxx> #include <svx/svdpage.hxx>
#include <svx/svdocapt.hxx> #include <svx/svdocapt.hxx>
...@@ -5869,7 +5870,11 @@ bool ScDocument::NeedPageResetAfterTab( SCTAB nTab ) const ...@@ -5869,7 +5870,11 @@ bool ScDocument::NeedPageResetAfterTab( SCTAB nTab ) const
SfxUndoManager* ScDocument::GetUndoManager() SfxUndoManager* ScDocument::GetUndoManager()
{ {
if (!mpUndoManager) if (!mpUndoManager)
mpUndoManager = new SfxUndoManager; {
// to support enhanced text edit for draw objects, use an SdrUndoManager
mpUndoManager = new SdrUndoManager;
}
return mpUndoManager; return mpUndoManager;
} }
......
...@@ -29,6 +29,7 @@ namespace com { namespace sun { namespace star { namespace datatransfer { class ...@@ -29,6 +29,7 @@ namespace com { namespace sun { namespace star { namespace datatransfer { class
class ScDocument; class ScDocument;
class ScViewData; class ScViewData;
class ScDrawObjData; class ScDrawObjData;
class SdrUndoManager;
class ScDrawView: public FmFormView class ScDrawView: public FmFormView
{ {
...@@ -53,6 +54,9 @@ protected: ...@@ -53,6 +54,9 @@ protected:
void ImplClearCalcDropMarker(); void ImplClearCalcDropMarker();
// support enhanced text edit for draw objects
virtual SdrUndoManager* getSdrUndoManagerForEnhancedTextEdit() const;
public: public:
ScDrawView( OutputDevice* pOut, ScViewData* pData ); ScDrawView( OutputDevice* pOut, ScViewData* pData );
virtual ~ScDrawView(); virtual ~ScDrawView();
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <svx/sdrpaintwindow.hxx> #include <svx/sdrpaintwindow.hxx>
#include <sfx2/bindings.hxx> #include <sfx2/bindings.hxx>
#include <sfx2/viewfrm.hxx> #include <sfx2/viewfrm.hxx>
#include <svx/sdrundomanager.hxx>
#include "drawview.hxx" #include "drawview.hxx"
#include "global.hxx" #include "global.hxx"
...@@ -849,4 +850,11 @@ void ScDrawView::SyncForGrid( SdrObject* pObj ) ...@@ -849,4 +850,11 @@ void ScDrawView::SyncForGrid( SdrObject* pObj )
pObj->SetGridOffset( aGridOff ); pObj->SetGridOffset( aGridOff );
} }
} }
// support enhanced text edit for draw objects
SdrUndoManager* ScDrawView::getSdrUndoManagerForEnhancedTextEdit() const
{
return pDoc ? dynamic_cast< SdrUndoManager* >(pDoc->GetUndoManager()) : 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment