Hello Rahul,
On Fri, Aug 3, 2018 at 7:27 PM, Rahul Gurung <gurungrahul2@gmail.com> wrote:
Hi,
I am trying to convert java unit tests to cppunit test and I am currently
studying old commits, and came across this line,
"UnoRuntime.queryInterface (XArrayFormulaRange.class, new_range);"
I checked the documentation but couldn't find what this
XArrayFormulaRange.class means, can anyone explain? I am new to Open Source.
UNO (our extension framework) works through interfaces. Usually names
starting with X like XArrayFormulaRange are an interface (
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1sheet_1_1XArrayFormulaRange.html
).
To access the corresponding methods of an interface that an object
implements we need to cast between the different interfaces. This is done
in Java through UnoRuntime.queryInterface and in C++ through
uno::Reference<XArrayFormulaRange>(new_range, UNO_QUERY);
Jens Carl is currently working on the same task and has many existing
patches that you can use to understand how to convert existing code. A
recent example is
https://cgit.freedesktop.org/libreoffice/core/commit/?id=8164399df0df976784ddc1a76b46939c53ae51ee
but you can find many more through
https://cgit.freedesktop.org/libreoffice/core/log/?qt=grep&q=45904
Regards,
Markus
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.