Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


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


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.