Hi all,

I struggle with the clipboard. My goal is to import MathML in module Math from clipboard, similar as it is imported from file. But I'm stuck. Therefore some questions:

(1)
Has someone tried such already and found, that it is not possible?

(2)
The comments in file exchange.cxx refer to a document "CLIP.SDW". Has someone this document and can provide it?

(3)
I have added a .uno command which is executed in SmViewShell::Execute(SfxRequest& rReq)

My current attempt looks like this:

TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard(GetEditWindow()) );
SotFormatStringId nId;
DataFlavorExVector* pFormats;
pFormats = &aDataHelper.GetDataFlavorExVector();
DataFlavorExVector::iterator aIter( ((DataFlavorExVector&)*pFormats).begin() ), aEnd( ((DataFlavorExVector&)*pFormats).end() );
while ( aIter != aEnd )
{
    nId = (*aIter).mnSotId;
...
    aIter++;
}

I get some nId-values and for some of them I can get a stream and can look at the content. But the clipboard content, which is generated by the Windows program "Math Input Control" (mip.exe) is not noticed. But I see that the clipboard has a content "MathML" and a content "MathML Presentation" using the clipboard viewer "Free Clipboard Viewer 2.0". Why do I get no nId for it?

(4)
The numbers I get in nId are those from the list in exchange.cxx, and for "application/mathml+xml", which is not listed there, I get the next one following the list. But how can I get the MimeType or the HumanPresentableName for the detected nId? My following try does not work, the strings are empty in all cases:

::com::sun::star::datatransfer::DataFlavor aFlavor;
SotExchange::GetFormatDataFlavor( nId, aFlavor ) )
String sHumanPresentableName(aFlavor.HumanPresentableName);
String sMimeType(aFlavor.MimeType);

(5)
I try to use SmViewShell::InsertFrom(SfxMedium &rMedium). It seems to work, but when the process arrives at SmXMLImport::endDocument(void), the node tree is empty. Any tips, what I might have missed?

Kind regards
Regina

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to