You are viewing a plain text version of this content. The canonical link for it is here.
Posted to api@openoffice.apache.org by "k.misha" <mi...@4k.com.ua> on 2012/12/31 12:44:51 UTC

RE: UNO API

Hi! I build C++ project and connected to OpenOffice service. I used a code from example "DocumentLoader"!<неиI wrote some functions like SetText(), SetBold(), GetText() which are working with OO Calc. I used examples in wiki to build my project and write functions. But I can't find more examples or documentations to work with more interfaces and write more useful functions =(<неи<неи-----Original Message-----<неиFrom: Shukla, Mangesh [mailto:mangesh.shukla@siemens.com] <неиSent: Tuesday, April 02, 2013 1:39 PM<неиTo: api@openoffice.apache.org<неиSubject: RE: UNO API<неи<неиHi Misha,<неи    Have you succeeded in setting up the build environment using the scripts. Are you able to build the C++  samples given in the SDK. I ask this, because it is important that you follow the steps mentioned in the wiki. http://wiki.openoffice.org/wiki/SDKInstallation<неи<неиHere you will also find instructions to build the C++ samples under VC++ .<неи<неиOnce you are able to do this, let me know if you have any specific query on the use of UNO Api's.<неи<неиThanks,<неиMangesh.<неи<неи-----Original Message-----<неиFrom: k.misha [mailto:misha@4k.com.ua] <неиSent: Tuesday, April 02, 2013 4:01 PM<неиTo: api@openoffice.apache.org<неиSubject: RE: UNO API<неи<неиBut where can I get some examples in visual studio C++? That documentation don't have enough examples =(<неи<неи-----Original Message-----<неиFrom: Andreas Säger [mailto:villeroy@t-online.de] <неиSent: Tuesday, April 02, 2013 1:06 PM<неиTo: api@openoffice.apache.org<неиSubject: Re: UNO API<неи<неи-----BEGIN PGP SIGNED MESSAGE-----<неиHash: SHA1<неи<неиAm 02.04.2013 12:00, k.misha wrote:<неи> http://wiki.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide<неи<неиThis<неи> page is empty!<неи<неи-----<неи<неиThis page is far from empty. It contains lots of text with an index to<неиthousands of documentation pages covering each and every aspect.<неи<неи-----BEGIN PGP SIGNATURE-----<неиVersion: GnuPG v1.4.11 (GNU/Linux)<неиComment: Using GnuPG with undefined - http://www.enigmail.net/<неи<неиiQEcBAEBAgAGBQJRWq2SAAoJEGTlfXWiA5oe3AYIAIGRa5YHm+15dnarzkZn3PSb<неиVOM8GiRPLh+TzaXwGixtAgpO9PVgDZumHCEbPNBXMf5yjKOHdqz1NxiF84+HWvmK<неи8TCOuJg8tuQ2fKjaRALu+cB9/tfHviSFWeKJ3EXx6kMsN3w5fCzGBSuFdklIYSBI<неиLi2LtVQ1BtIKV6oLUIxZ+rjM9w4CU+5I6Y+s7AnlW1JHGAirGSzehXmUhpdhUNib<неиxqHjQKQpSfrr5bbKM2dJVRL9a92G6q/bpVhEQnlGvMJtVTb9ccK7sdo9X/2n8aky<неиJAunOebYotihDNANgAjMX0MUQRpeTSJitIoKhrREZIxo2Pcj0H4wFZb2tub3Oj8=<неи=Za7H<неи-----END PGP SIGNATURE-----<неи<неи---------------------------------------------------------------------<неиTo unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org<неиFor additional commands, e-mail: api-help@openoffice.apache.org<неи<неи<неи<неи<неи---------------------------------------------------------------------<неиTo unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org<неиFor additional commands, e-mail: api-help@openoffice.apache.org<неи<неи<неи-----------------------<неи ssi,-i inbrepoi.aer<неиrdtn mn,-i ie@efcac.g<неи


---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org
For additional commands, e-mail: api-help@openoffice.apache.org


Re: UNO API

Posted by Alexandro Colorado <jz...@oooes.org>.
There is some specializied pages on C++/Visual STudio. I suggest this
page for C++ related tutorials.

Unfortuantely some moderation needs to be done to verify these
tutorials are still up to date and if not they should be either
labeled or updated.

http://wiki.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK

On 12/31/12, k.misha <mi...@4k.com.ua> wrote:
> Hi! I build C++ project and connected to OpenOffice service. I used a code
> from example "DocumentLoader"!<неиI wrote some functions like SetText(),
> SetBold(), GetText() which are working with OO Calc. I used examples in wiki
> to build my project and write functions. But I can't find more examples or
> documentations to work with more interfaces and write more useful functions
> =(<неи<неи-----Original Message-----<неиFrom: Shukla, Mangesh
> [mailto:mangesh.shukla@siemens.com] <неиSent: Tuesday, April 02, 2013 1:39
> PM<неиTo: api@openoffice.apache.org<неиSubject: RE: UNO API<неи<неиHi
> Misha,<неи    Have you succeeded in setting up the build environment using
> the scripts. Are you able to build the C++  samples given in the SDK. I ask
> this, because it is important that you follow the steps mentioned in the
> wiki. http://wiki.openoffice.org/wiki/SDKInstallation<неи<неиHere you will
> also find instructions to build the C++ samples under VC++ .<неи<неиOnce you
> are able to do this, let me know if you have any specific query on the use
> of UNO Api's.<неи<неиThanks,<неиMangesh.<неи<неи-----Original
> Message-----<неиFrom: k.misha [mailto:misha@4k.com.ua] <неиSent: Tuesday,
> April 02, 2013 4:01 PM<неиTo: api@openoffice.apache.org<неиSubject: RE: UNO
> API<неи<неиBut where can I get some examples in visual studio C++? That
> documentation don't have enough examples =(<неи<неи-----Original
> Message-----<неиFrom: Andreas Säger [mailto:villeroy@t-online.de] <неиSent:
> Tuesday, April 02, 2013 1:06 PM<неиTo: api@openoffice.apache.org<неиSubject:
> Re: UNO API<неи<неи-----BEGIN PGP SIGNED MESSAGE-----<неиHash:
> SHA1<неи<неиAm 02.04.2013 12:00, k.misha wrote:<неи>
> http://wiki.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide<неи<неиThis<неи>
> page is empty!<неи<неи-----<неи<неиThis page is far from empty. It contains
> lots of text with an index to<неиthousands of documentation pages covering
> each and every aspect.<неи<неи-----BEGIN PGP SIGNATURE-----<неиVersion:
> GnuPG v1.4.11 (GNU/Linux)<неиComment: Using GnuPG with undefined -
> http://www.enigmail.net/<неи<неиiQEcBAEBAgAGBQJRWq2SAAoJEGTlfXWiA5oe3AYIAIGRa5YHm+15dnarzkZn3PSb<неиVOM8GiRPLh+TzaXwGixtAgpO9PVgDZumHCEbPNBXMf5yjKOHdqz1NxiF84+HWvmK<неи8TCOuJg8tuQ2fKjaRALu+cB9/tfHviSFWeKJ3EXx6kMsN3w5fCzGBSuFdklIYSBI<неиLi2LtVQ1BtIKV6oLUIxZ+rjM9w4CU+5I6Y+s7AnlW1JHGAirGSzehXmUhpdhUNib<неиxqHjQKQpSfrr5bbKM2dJVRL9a92G6q/bpVhEQnlGvMJtVTb9ccK7sdo9X/2n8aky<неиJAunOebYotihDNANgAjMX0MUQRpeTSJitIoKhrREZIxo2Pcj0H4wFZb2tub3Oj8=<неи=Za7H<неи-----END
> PGP
> SIGNATURE-----<неи<неи---------------------------------------------------------------------<неиTo
> unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org<неиFor additional
> commands, e-mail:
> api-help@openoffice.apache.org<неи<неи<неи<неи<неи---------------------------------------------------------------------<неиTo
> unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org<неиFor additional
> commands, e-mail:
> api-help@openoffice.apache.org<неи<неи<неи-----------------------<неи ssi,-i
> inbrepoi.aer<неиrdtn mn,-i ie@efcac.g<неи
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: api-help@openoffice.apache.org
>
>


-- 
Alexandro Colorado
Apache OpenOffice Contributor
http://es.openoffice.org

---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org
For additional commands, e-mail: api-help@openoffice.apache.org


Re: UNO API

Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hi k.misha,

On Wed, Apr 10, 2013 at 01:00:58PM +0300, k.misha wrote:
> Hi! 
> I have a code:
> <неи<неиReference< ::com::sun::star::sheet::XSpreadsheetDocument > xSpreadsheetDocument(xCalcComponent, UNO_QUERY);
> <неиReference< ::com::sun::star::sheet::XSpreadsheets > xSpreadsheets = xSpreadsheetDocument->getSheets();
> <неиReference< ::com::sun::star::container::XNameAccess > xNameAccess(xSpreadsheets, UNO_QUERY);
> <неи<неиSequence< OUString > sElementNames = xNameAccess->getElementNames();
> <неи<неиI want to get a list of sheets in document. 
> How I can see it using printf("%s", variable)?<неи<неиThanks!<неи

(side note: your mail client, Microsoft Office Outlook 12.0, seems to
mess with the format; at least gmail shows your mails in a single line,
almost impossible to read)

Iterate over the css::uno::Sequence, and get the null terminated string
from the rtl::OUString with rtl::OUStringToOString
http://www.openoffice.org/api/docs/cpp/ref/names/rtl/o-ustring.hxx.html#OUStringToOString-1421

Alternatively, you can use operator<< with std::ostream instead of C's
printf, as in the example attached.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

RE: UNO API

Posted by "k.misha" <mi...@4k.com.ua>.
Hi! I have a code:<неи<неиReference< ::com::sun::star::sheet::XSpreadsheetDocument > xSpreadsheetDocument(xCalcComponent, UNO_QUERY);<неиReference< ::com::sun::star::sheet::XSpreadsheets > xSpreadsheets = xSpreadsheetDocument->getSheets();<неиReference< ::com::sun::star::container::XNameAccess > xNameAccess(xSpreadsheets, UNO_QUERY);<неи<неиSequence< OUString > sElementNames = xNameAccess->getElementNames();<неи<неиI want to get a list of sheets in document. How I can see it using printf("%s", variable)?<неи<неиThanks!<неи


---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org
For additional commands, e-mail: api-help@openoffice.apache.org


Re: UNO API

Posted by Andreas Säger <vi...@t-online.de>.
Am 31.12.2012 12:44, k.misha wrote:
> Hi! I build C++ project and connected to OpenOffice service. I used a code from example "DocumentLoader"!<неиI wrote some functions like SetText(), SetBold(), GetText() which are working with OO Calc. I used examples in wiki to build my project and write functions. But I can't find more examples or documentations to work with more interfaces and write more useful functions


The API is _exactly_ the same for all languages and it is perfectly well
documented in the link I gave you.
You have to install an additional object inspector.

I recommend
> http://extensions.services.openoffice.org/de/project/MRI

which can even write code snippets in C++, Java, Python and Basic.

MRI tutorial:
> http://forum.openoffice.org/en/forum/viewtopic.php?f=74&t=49294



---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org
For additional commands, e-mail: api-help@openoffice.apache.org