Hi,

On Tue, Sep 24, 2013 at 06:44:05PM +0300, K.Misha wrote:
> Hi!
> 
>  
> 
> I habe this code:
> 
>  
> 
> Reference < XTextDocument > xTextDocument (xWriterComponent,UNO_QUERY);
> 
> Reference< XText > xText = xTextDocument->getText();
> 
>  
> 
> How can i convert xTextDocument->getText() to char * ?

First, the css.text.XText is not a string, use XTextRange::getString()
to get the rtl::OUString.

Then, convert the OUString to an OString and then use OString::getStr()

Reference< XText > xText  = xTextDocument->getText();
const rtl::OUString uText = xText->getString();
const rtl::OString sText  = rtl::OUStringToOString( sText, 
RTL_TEXTENCODING_UTF8 );
const char *pzstr = sText.getStr();



Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Attachment: pgpge2XRd6BvB.pgp
Description: PGP signature

Reply via email to