Hi!
I habe this code: Reference < XTextDocument > xTextDocument (xWriterComponent,UNO_QUERY); Reference< XText > xText = xTextDocument->getText(); How can i convert xTextDocument->getText() to char * ? I used to convert it like this: int nLenOfAnsiChar = WideCharToMultiByte(CP_OEMCP, NULL, xText->getString().pData->buffer, -1, NULL, 0, NULL, NULL ); char * str = new char(nLenOfAnsiChar); WideCharToMultiByte(CP_OEMCP, NULL, xText->getString().pData->buffer, nLenOfAnsiChar, str, nLenOfAnsiChar, NULL, NULL ); I converted it from unicode to ansi. But when i'm doing it in writer - i have broken data. I think data here is in ANSI. Thanks!