Read odt files using c++

Hello, All !

I have to read odt files and search there tables using Qt 5 and libreoffice sdk on C++. As I read documentation I can do it via classes XTextDocument and XTable, but when I read

osl::File osf( fileName );

I can receive only binary content that will be acceptable for sending by network, but not for text analysis, which way I can read data from odt file that fill XTextDocument and other similar classes ?

Thanks in advance,

What you’re looking for is XComponentLoader::loadComponentFromURL. The SDK has the cpp example DocumentLoader, which you can use as a start.

Thanks a lot, but could you answer one’s more question, is it possible to parse odt document using this example, when I try to obtain property value using _xPropSet->getPropertyValue(“DefaultContext”), I have got a bug, bacause _xPropSet was null, _xPropSet =Reference< XPropertySet >( _xInterface, UNO_QUERY );

and it was null.