Remember, I have never done this, but, you want to know how to cast an
object to the required interface..... So, I simply looked for a few examples
http://moutou.pagesperso-orange.fr/MyUNODoc_HTML/UNOCppAPI4.html
I found this in listing 4.16
*// Don't forget to add : #include <com/sun/star/frame/XStorable.hpp>*
*// Don't forget to add "com.sun.star.frame.XStorable \" in the makefile*
*Reference<XStorable> storeable(comp, UNO_QUERY);*
*if (storeable->hasLocation()) {*
*OString loc = OUStringToOString(storeable->getLocation(),*
*RTL_TEXTENCODING_ASCII_US);*
*printf("-- %s\n",loc.pData->buffer);*
*}*
Some of this is probably useful
http://www.openoffice.org/udk/cpp/man/tutorial/unointro.html
This is old
http://wiki.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
On 11/13/2012 12:31 PM, Rai, Neeraj wrote:
Hi Andrew,
I know you said you don't work with c++/java, but you are only hope I can see
so far :-) Hope I am not bothering too much.
After a few more find/grep, I found class XSpreadsheetDocument in a dir that I
had specified as OO_SDK_OUTPUT_DIR.
You were right about the examples being similar. I was able to port most of the
lines from Scalc.java to Scalc.cxx.
I am now down to last line
xSpreadSheetDoc = (XSpreadSheetDocument)
UnoRuntime.queryInterface(XSpreadSheetDocument.class, xComp);
This looks so java specific, I am not even sure what google or grep.
Any links/googlable key words would be appreciated.
Thx
Neeraj
-----Original Message-----
From: Rai, Neeraj [ICG-MKTS]
Sent: Tuesday, November 13, 2012 10:16 AM
To: 'and...@pitonyak.org'; 'users@global.libreoffice.org'
Subject: RE: [libreoffice-users] - novice question about scalc and C++ uno
objects
Hi Andrew,
Thanks for responding. Maybe I am looking in wrong place.
The Java examples :
http://api.libreoffice.org/examples/examples.html#Java_examples
The C++ examples :
http://api.libreoffice.org/examples/examples.html#Cpp_examples
I see only 4 C++ examples.
I can't find the class used in Scalc.java (XSpreadsheetDocument) in sdk/include.
Is there any other dir I should look in ?
Thanks
Neeraj
-----Original Message-----
From: Andrew Douglas Pitonyak [mailto:and...@pitonyak.org]
Sent: Tuesday, November 13, 2012 12:20 AM
To: users@global.libreoffice.org
Subject: Re: [libreoffice-users] - novice question about scalc and C++ uno
objects
On 11/12/2012 06:28 PM, Rai, Neeraj wrote:
Hi ,
I am trying to learn about UNO objects and how to remotely update scalc data. I
have looked at Scalc.java and would like to convert it to c++.
What is the best way to go about it and are there cpp examples publicly
available ?
The cpp examples that come with libreoffice (remoteclient/docloader etc) don't
seem to get interact with scalc.
Any pointers / links/ tutorials and samples would be appreciated.
Thanks
Neeraj
Although I don't spend time writing in C++ or Java (to access OOo), my
expectation is that the Java and the C++ examples will look very similar.
I thought that the examples in the developer's guide were in C++
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info: http://www.pitonyak.org/oo.php
--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info: http://www.pitonyak.org/oo.php
--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted