Steps to reproduce. 1) Write "Hello" in a cell. 2) Triple-click cell to select cell contents in X clipboard 3) Middle-click to paste in another cell 4) Press Ctrl-Z to undo. Note that the new cell contents are not removed! 5) Press Ctrl-Z again. Note that the originally typed text "Hello" is removed, but the middle-click pasted text remains!
How odd, I just fell over this too - that's quite amazing :-) apparently middle-click paste doesn't setup / manage the undo/redo structures correctly.
If a complex chunk of text is pasted; undo is fine; I suspect viewfun4's void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow, has no undo logic.
Turns out we had an undo record on the undo stack, but it was not correctly configured, and so didn't undo/redo anything ;-) needs review for 4-1 at: https://gerrit.libreoffice.org/5538 Thanks for the report.
Michael Meeks committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=ab55228f6c524ddefde2d7e1d6688b8a407da3ad fdo#53032 - Use the right mark area to undo paste of RTF. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Meeks committed a patch related to this issue. It has been pushed to "libreoffice-4-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=c10b18e3405a0c501114ce435886b22ec59e53ab&h=libreoffice-4-1 fdo#53032 - Use the right mark area to undo paste of RTF. It will be available in LibreOffice 4.1.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Meeks committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=621c1e491e56db5416da1c763aaff862e8ede67a fdo#53032 - Use the right mark area to undo paste of RTF. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.