<div dir="ltr"><div>Hello Rahul,</div><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 3, 2018 at 7:27 PM, Rahul Gurung <span dir="ltr"><<a href="mailto:gurungrahul2@gmail.com" target="_blank">gurungrahul2@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I am trying to convert java unit tests to cppunit test and I am currently studying old commits, and came across this line,</div><div><br></div><div><br></div><div>"UnoRuntime.queryInterface (XArrayFormulaRange.class, new_range);"<br></div><div><br></div><div>I checked the documentation but couldn't find what this XArrayFormulaRange.class means, can anyone explain? I am new to Open Source.</div><div><br></div><br></div></blockquote></div><div><br></div><div>UNO (our extension framework) works through 
interfaces. Usually names starting with X like XArrayFormulaRange are an
 interface 
(<a href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1sheet_1_1XArrayFormulaRange.html">https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1sheet_1_1XArrayFormulaRange.html</a>).</div><div><br></div><div>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);</div><div><br></div><div>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 
<a href="https://cgit.freedesktop.org/libreoffice/core/commit/?id=8164399df0df976784ddc1a76b46939c53ae51ee">https://cgit.freedesktop.org/libreoffice/core/commit/?id=8164399df0df976784ddc1a76b46939c53ae51ee</a>
 but you can find many more through 
<a href="https://cgit.freedesktop.org/libreoffice/core/log/?qt=grep&q=45904">https://cgit.freedesktop.org/libreoffice/core/log/?qt=grep&q=45904</a></div><div><br></div><div>Regards,</div><div>Markus</div><br></div></div>