openoffice-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Constenla-Haile <arie...@apache.org>
Subject Re: UNO API
Date Wed, 10 Apr 2013 12:38:30 GMT
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

Mime
View raw message