0

My program generates data that are transferable through the flavors html+MathML, or html+png (The second is actually the first one where every MathML element has been replaced by it's image).

The issue is that I am completely unable to make a distinction between these two flavours. In the end, it creates a problem because MSWord accepts MathML, whereas LibreOffice Writer doesn't. But in the getTransferData(), I have to retrieve or html+MathML, or html+png. So or LibreOffice users will not get at all the MathML part, or the Office users will get a basic png whereas they could have an equation...

So, how would you make the difference between a call from MSOffice and from LibreOffice ? I'm out of ideas...

Sharcoux
  • 5,546
  • 7
  • 45
  • 78
  • How does MS Office or LibreOffice call your program? If your program is loaded as a linked library, you could use two different functions as entry points, one for MS Office and one for LibreOffice. – Jim K Feb 24 '16 at 21:14
  • They don't call my program. They use the clipboard, which uses the DataFlavor/Transferable API... – Sharcoux Feb 24 '16 at 21:19
  • Looking at the DataFlavor documentation, I doubt that it will provide information more detailed than simply "HTML." Can you add a "Copy as MathML" option in your application's settings? That way the user could choose. – Jim K Feb 24 '16 at 22:10
  • It will not be as user-friendly as I wanted it to be, but fine, I'll put an option for copy/paste. Thanks for your time anyway. – Sharcoux Feb 25 '16 at 10:03

0 Answers0