[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - svx/source
matteocam
matteo.campanelli at gmail.com
Fri Aug 7 05:34:02 PDT 2015
svx/source/svdraw/svdedxv.cxx | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
New commits:
commit 0a831fb805994ddeabc36c3512198e6eadb9b0d2
Author: matteocam <matteo.campanelli at gmail.com>
Date: Fri Aug 7 14:33:33 2015 +0200
Add UndoSetText for chaining in edit mode
Change-Id: I684c9cfed36510a967ad043cceeb71f91fd56ae8
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 53a0af2..c731052 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -517,9 +517,27 @@ IMPL_LINK_NOARG(SdrObjEditView,ImpChainingEventHdl)
pTextChain->SetPreChainingSel(pTextObj, pOLV->GetSelection());
//maPreChainingSel = new ESelection(pOLV->GetSelection());
+ // Handling Undo
+ const int nText = 0; // XXX: hardcoded index (SdrTextObj::getText handles only 0)
+
+ SdrUndoObjSetText *pTxtUndo = dynamic_cast< SdrUndoObjSetText* >
+ ( GetModel()->GetSdrUndoFactory().CreateUndoObjectSetText(*pTextObj, nText ) );
+
// trigger actual chaining
pTextObj->onChainingEvent();
+ if (pTxtUndo!=NULL)
+ {
+ pTxtUndo->AfterSetText();
+ if (!pTxtUndo->IsDifferent())
+ {
+ delete pTxtUndo;
+ pTxtUndo=NULL;
+ }
+ }
+
+ AddUndo(pTxtUndo);
+
//maCursorEvent = new CursorChainingEvent(pTextChain->GetCursorEvent(pTextObj));
//SdrTextObj *pNextLink = pTextObj->GetNextLinkInChain();
More information about the Libreoffice-commits
mailing list