cur = ThisComponent.Text.createTextCursor() cur.goRight(3, True) ThisComponent.CurrentController.select(cur) transferable = ThisComponent.CurrentController.getTransferable() cur.String = "" ' here System clipboard now contains transferable text. P.S. Does getTransferable really works through system clipboard? O_o
Reproducible with Version: 4.3.4.0.0+ Build ID: fae7fed54206b98cc3aac24abcdac384d3bd9437 TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:libreoffice-4-3, Time: 2014-11-06_02:16:12 don't know if it's bug or not, leaving unconfirmed
Created attachment 109095 [details] test case
(In reply to raal from comment #2) > Created attachment 109095 [details] > test case Yep, reproduced. Win 7 64-bit Version: 4.4.0.0.alpha2+ Build ID: b021b5983c62e266b82d9f0c5c6d8d8900553827 TinderBox: Win-x86@39, Branch:master, Time: 2014-11-12_01:10:08
Please, could you be more explicit and describe what is the current behavior and what would be the expected behavior? Best regards. JBF
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.
Dear Bug Submitter, This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information. For more information about our NEEDINFO policy please read the wiki located here: https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed. Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team Sun, 11 Sep 2016 21:43:24 +0200
Well, what is the conclusion after comment #5 ? Best regards. JBF
I guess it's notabug, then.. Original reporter is free to protest with an eloquent explanation.