incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 119400] Undo in the BASIC editor in the IDE garbles code (regression)
Date Fri, 25 May 2012 07:11:50 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=119400

--- Comment #6 from hanya <hanya.runo@gmail.com> ---
Hm, input line of Calc has the same problem.

I thought the problem is there in undo action of overwrite selection but I
noticed 
input events through keyboard are not tracked as undo action.

The following patch is influenced to svl, so it is widely used in the code, it
should be well tested.

Index: svl/source/undo/undo.cxx
===================================================================
--- svl/source/undo/undo.cxx    (revision 1342285)
+++ svl/source/undo/undo.cxx    (working copy)
@@ -627,7 +627,7 @@
     // merge, if required
     SfxUndoAction* pMergeWithAction = m_pData->pActUndoArray->nCurUndoAction ?
        
m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1].pAction
: NULL;
-    if ( bTryMerge && ( !pMergeWithAction || !pMergeWithAction->Merge( pAction
) ) )
+    if ( bTryMerge && ( pMergeWithAction && pMergeWithAction->Merge( pAction
)
) )
     {
         i_guard.markForDeletion( pAction );
         return false;

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message