Apache OpenOffice (AOO) Bugzilla – Issue 119400
Undo broken in several contexts (Basic Editor, Math Editor, Calc Input Line, MultiLine controls, etc)
Last modified: 2013-02-24 21:01:08 UTC
In OO 3.4.0 undoing edits in the IDE leaves a horrible mix of recent additions and deletions. For example if you do the following: 1. create a new Macro in a new module in a new file 2. type "fruitbat" 3. select "fruitbat" 4. type "aardvark" 5. hit ctrl-Z you will see "fruitbataardvark". While fixing this, it would be useful to have ctrl-Y bound to 'Redo' as well.
Ctrl-Z works for me. OpenOffice.org 3.3.0 OOO330m20 on Windows XP
I could confirm on AOO 3.4.0, Linux (Xubuntu 12.01) 32bit and Xfce 4.8. It works on OOo 3.3.0.
Sorry for my previous comment. I mixed up versions! Confirmed with 3.4.0.
Confirmed under 3.4 Beta on WV. That should narrow the search.
This undo problem is not only on Basic IDE. I met the same problem on HTML source window and multi-line text field on basic dialog. It seems edit engine has such problem.
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;
I forgot to mention about the patch above, comment 6. When I push key to input a charactor in focused text field (multi-lined), TextEngine::ImpInsertText method in main/svtools/source/edit/texteng.cxx is called. In the method, bTryMerge is true for InsertUndo( pNewUndo, bTryMerge ) call for first key input. pMergeWithAction is NULL for first input in SfxUndoManager::ImplAddUndoAction_NoNotify method. So, the action is abandoned at the if statement and not tracked.
Created attachment 77735 [details] Proposed patch to fix this problem I met the same problem in these edit context: - Input line of Calc - Multi line text field of dialogs - Text editing in drawing object
Could it be a release blocker for 3.4.1 and included in 3.4.1?
(In reply to comment #8) > Created attachment 77735 [details] > Proposed patch to fix this problem > > I met the same problem in these edit context: > - Input line of Calc > - Multi line text field of dialogs > - Text editing in drawing object It also happens on Math. Adjusting the subject to reflect this "brokenness" everywhere.
This bug can repros on AOO3.4.O Rev. 1327774, and I change the status from Unconfirmed to confirmed.
I am volunteering to review the proposed patch.
Patch looks good. Taking over this issue for integration of the patch. I also agree to solve this issue for AOO 3.4.1 -> I will send a corresponding request to ooo-dev
This is a regression in AOO 3.4 - OOo 3.3 works fine.
set release blocker flag
commited patch on branch AOO34 - change file: svl/source/undo/undo.cxx, revision 1350569
merged patch from branch AOO34 into trunk - revision 1350585
Thanks for committing.
verified in r1350879 against Basic IDE, spreadsheet, multi-line field of dialogs, text editing in drawing object
set release blocker flag for 3.4.1
Verify fixed on AOO 3.4 Branch Dev snapshot rev.1351960 and AOO Trunk Rev. 1351712 Suggest close this bug
set target milestone AOO 3.4.1
*** Issue 119160 has been marked as a duplicate of this issue. ***