https://bugs.documentfoundation.org/show_bug.cgi?id=83522
pierre-yves samyn <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |et --- Comment #5 from pierre-yves samyn <[email protected]> --- Hi I reproduce but getTransferable get access to a transferable representation of *a selected part* of an object. The following line *removes* the selection: cur.String = "" If you comment this line the selection is still active and the content of the clipboard is preserved. Steps to reproduce: 1. Open your test case 2. Comment cur.String = "" 3. Select and copy "Bugzilla – Bug 83522" to the top left of this page 4. Click at the beginning of your document (before the text) 5. Run your macro 6. Goto the end of your document, paste Expected & actual result: "Bugzilla – Bug 83522" pasted So you have to do the insertTransferable before you change the selection, e.g. oSource = ThisComponent cur = oSource.Text.createTextCursor() cur.goRight(3, True) oSource.CurrentController.select(cur) transferable = ThisComponent.CurrentController.getTransferable() oTarget = stardesktop.loadcomponentfromurl("private:factory/swriter", "_blank", 0, array()) oTarget.currentController.insertTransferable(transferable) document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") dispatcher.executeDispatch(document, ".uno:Escape", "", 0, Array()) transferable = ThisComponent.CurrentController.getTransferable() cur.String = "" HTH Regards Pierre-Yves. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
