To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=94515
Issue #|94515
Summary|XTransferable.getTransferDataFlavors() of writer docum
|ents lists unsupported DataFlavors
Component|api
Version|OOo 2.3.1
Platform|All
URL|
OS/Version|All
Status|NEW
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|code
Assigned to|jsc
Reported by|clutz
--- Additional comments from [EMAIL PROTECTED] Wed Oct 1 07:03:30 +
2008 ---
I have got a small codesnippet that tries to call
XTransferable.getTransferData(flavor) for all flavors listed in
XTransferable.getTransferDataFlavors() for a TextDocument.
The DataFlavor "Star Embed Source (XML)" is listed in the list of supported
DataFlavors for this Component, but trying to get the respective transfer data
throws an UnsupportedFlavorException.
So please either remove "Star Embed Source (XML)" from the list of supported
DataFlavors or enable this functionality that the exception is not thrown.
To reproduce, I used the following snippet:
byte[] buffy;
XTransferable transferable = (XTransferable)
UnoRuntime.queryInterface(XTransferable.class,
UNO.desktop.getCurrentComponent());
DataFlavor[] flavors = transferable.getTransferDataFlavors();
for (DataFlavor fl : flavors) {
System.out.println(fl.HumanPresentableName + " (" + fl.MimeType + ") " +
fl.DataType);
try {
buffy = (byte[]) transferable.getTransferData(fl);
} catch (Exception e) {
e.printStackTrace();
}
}
The output of the snippet is:
Windows MetaFile (application/x-openoffice-wmf;windows_formatname="Image WMF")
Type[[]byte]
Star Object Descriptor (XML)
(application/x-openoffice-objectdescriptor-xml;windows_formatname="Star Object
Descriptor (XML)") Type[[]byte]
Star Embed Source (XML)
(application/x-openoffice-embed-source-xml;windows_formatname="Star Embed Source
(XML)") Type[[]byte]
com.sun.star.datatransfer.UnsupportedFlavorException:
at
com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:187)
at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:153)
at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:349)
at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:318)
at
com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:106)
at
com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:657)
at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:159)
at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:141)
at $Proxy17.getTransferData(Unknown Source)
at TransferableText.main(TransferableText.java:32)
Bitmap (application/x-openoffice-bitmap;windows_formatname="Bitmap")
Type[[]byte]
PNG (image/png) Type[[]byte]
-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]