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


Hi Everyone,

This is regarding this bug - https://bugs.freedesktop.org/show_bug.cgi?id=30508

Goal: To be able to open an image(Graphic item) in an external
application for advanced editing
What is already done: Added a menu item to right click popup on the
graphic, coupled the menu item with a method that handles the event.(I
have attached a snippet of that method as a preliminary hack for the
same)

I current way I am implementing is that I save the Graphic a temporary
file,then to create a new thread ( using osl_createThread from
osl/thread.h ) and from within the new thread execute the external
application to open the temp ( using osl_executeProcess from
osl/process.h). Then on I poll for the exit of the process and after
exit, exit the new thread and main thread updates the graphic with the
new temporary image. But the current way blocks the main loop and I
end up getting an unresponsive libreoffice window which is not
desirable at all.

Please advice me how to go about this further. I thought off
interrupts but not really sure to proceed. I searched opengrok for
interrupt but couldn't find anything helpful.
If I have been doing it the wrong way altogether please suggest me how
to proceed.

Please bear with the varied string classes used in the snippet, will
fix them all before submitting the patch. Also Currently I am
implementing this in Gnome ( just using eog as the external command),
but will give the user the option to choose the application with a
file chooser dialog.

Many thanks for Thorsten and many others so far who have helped to get
me this far.

-- 
regards
Suren
Learning < Doing
Learn By doing.

Attachment: snippet.cpp
Description: Binary data


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.