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


On 12/02/13 16:31, Rai, Neeraj wrote:
Hi Stephan,

Is there any example of using uno calls from the forms bundled with LO ?
I am not very familiar with the Reference <> and googling uno::Reference is not helping me either.
I also couldn't find usage in sdk dir and examples dir. Would it be possible to point out a 
dir/file or a web link.

please read this chapter:

http://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/C%2B%2B/C%2B%2B_Language_Binding

and especially:

http://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/C%2B%2B/Mapping_of_Interface_Types

I  also wanted to understand the lifetime of uno objects .
Does the CalcAddimThr_impl object live for the life of open doc ?
I tried to keep my object without reference counting as there is only one instance of it and I am 
unfamiliar with Reference.
The runThread was passed the same pointer that I assumed with live for the life of open scalc doc.
But you seem to be suggesting that some other reference counted object is going out of scope 
making the pointer dangling.

it is generally unsound to retain a plain C++ pointer to an object after
the first uno::Reference for it has been constructed.  (you may retain a
rtl::Reference however, which is often convenient because it can contain
your implementation class directly and not just some UNO interface).


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.