I have this code, made with your example:

 

char * getWText( char * text )

{

      Reference < XTextDocument > xTextDocument
(xWriterComponent,UNO_QUERY);

    Reference< XText > xText = xTextDocument->getText();

 

      rtl::OUString uText = xText->getString();

      rtl::OString str = rtl::OUStringToOString( uText,
RTL_TEXTENCODING_UTF8 );

 

      char * str1 = (char *)str.getStr();

      return str1;

}

 

This is original file:



 

And this is my return str1:



 

What i'm doing wrong? =(

Reply via email to