Bug 151713 - API: The controller of a drawing doesn't export XTransferableSupplier
Summary: API: The controller of a drawing doesn't export XTransferableSupplier
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: UNO
  Show dependency treegraph
 
Reported: 2022-10-23 12:02 UTC by Wolfgang Jäger
Modified: 2023-02-28 11:23 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
The demo announced in the report (28.47 KB, application/vnd.oasis.opendocument.graphics)
2022-10-23 12:02 UTC, Wolfgang Jäger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Jäger 2022-10-23 12:02:49 UTC
Created attachment 183218 [details]
The demo announced in the report

The CurrentController of a drawing model claims to support the service 'DrawingDocumentDrawView' which in turn is specified to export the interface 'XTransferableSupplier'. 
It doesn't - and never did, as far as I could see.

Background: In pursuit of a question in the ask site I tried to use  "flavor conversion" via a helper drawing. The attenmpt faild in consequence of the bug.

To reproduce the bug do as described in the attached drawing which also contains the Sub: 

Sub demo()
cCtrl = ThisComponent.CurrentController
MsgBox(cCtrl.SupportedServiceNames(0))
REM cCtrl should export the interface XTransferableSupplier
REM See https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1datatransfer_1_1XTransferableSupplier.html 
For Each shape In ThisComponent.DrawPages(0)
 If shape.String="Ellipse" Then Exit For
Next shape
cCtrl.select(shape)
MsgBox(shape.String)
trans = cCtrl.getTransferable()
REM cCtrl doesn't know the method. 
REM Trying to order cCtrl.insertTransferable(trans) (with a valid object trans gotten elsewhere) shows that cCtrl also doesn't know the second method.  
End Sub
Comment 1 Buovjaga 2023-02-27 13:54:33 UTC
Yes, I get

BASIC runtime error.
Property or method not found: getTransferable

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9a930ef9ea45277109c9acd6e7e1ccfe47fe136c
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 27 February 2023
Comment 2 Maxim Monastirsky 2023-02-27 23:17:24 UTC
DrawingDocumentDrawView inherits XTransferableSupplier from css::frame::Controller, which has it marked as optional: https://git.libreoffice.org/core/+/3ffd375f/offapi/com/sun/star/frame/Controller.idl#77 (i.e. not every implementation has to support it).
Comment 3 Wolfgang Jäger 2023-02-28 11:23:28 UTC
(In reply to Maxim Monastirsky from comment #2)
> DrawingDocumentDrawView inherits XTransferableSupplier from
> css::frame::Controller, which has it marked as optional:
> https://git.libreoffice.org/core/+/3ffd375f/offapi/com/sun/star/frame/
> Controller.idl#77 (i.e. not every implementation has to support it).

Might there be an enhancement one day?