https://bugs.documentfoundation.org/show_bug.cgi?id=173022
--- Comment #7 from nobu <[email protected]> --- Created attachment 208947 --> https://bugs.documentfoundation.org/attachment.cgi?id=208947&action=edit sample ods Reference: Time measured on my PC 1. Slow version : 50 sec 2. Fast version : I have no patch. 3. ActionLock version : 5.4 sec 4. DataArray version : 0.20 sec ``` py def rotate_selection_lock(*args): doc = XSCRIPTCONTEXT.getDocument() doc.addActionLock() # TODO try: selection = XSCRIPTCONTEXT.getDocument().getCurrentSelection() if selection.supportsService("com.sun.star.sheet.SheetCellRanges"): # The selection has multiple ranges for cell_range in selection: rotate_cell_range(cell_range) else: # The selection is one simple range rotate_cell_range(selection) except Exception as err: print(str(err)) finally: doc.removeActionLock() # TODO def rotate180_selection_dataarray(*args): rng = XSCRIPTCONTEXT.getDocument().CurrentSelection rng.setDataArray([x[::-1] for x in rng.DataArray[::-1]]) ``` -- You are receiving this mail because: You are the assignee for the bug.
