https://bugs.documentfoundation.org/show_bug.cgi?id=114038

--- Comment #1 from Mátyás Jani <[email protected]> ---
Workaround: set the target cells of the range to empty string before applying
the range operation. Do it in an undo context, to have enough undo steps to
undo the whole action in one.

Something like this:

        undo = ThisComponent.UndoManager
        undo.enterUndoContext("Copy range action")
        ' clear target range, undo workaround
        for row = 4 to 8
                for col = 0 to 1
                        sheet.getCellByPosition(col, row).string = ""
                next col
        next row
        copyRange = sheet.getCellRangeByName("A1:B4")
        pasteRange = sheet.getCellRangeByName("A5:B8")
        pasteRange.DataArray = copyRange.DataArray
        undo.leaveUndoContext

(Note, clearing the target range with range operation will not work.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to