Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hello list,

I have difficulties to access table columns (and rows) via the UNO interface. 
I have no problems to create a table, but I am not able to manipulate the 
properties of the columns.
Basically my code can be nailed down to

Reference<XMultiServiceFactory> docServices (rDocument, UNO_QUERY_THROW);
Reference<XTextTable> tabelle(docServices->
        createInstance(OUString::createFromAscii("com.sun.star.text.TextTable")),
        UNO_QUERY_THROW);
tabelle->initialize(2, 5);
Reference<XTableColumns> tcols (tabelle->getColumns(), UNO_SET_THROW);
Any pval;
pval <<= tcols->getByIndex(2);
Reference<XPropertySet> s_properties(pval, UNO_QUERY_THROW);

Some debugging showed that the method getByIndex returns an Any with a pointer 
to 0. Since in my case "tcols" seems to be initiated correctly
(tcols->getCount() returns 5 as expected, and tcols->hasElements() returns 
true),
can someone please tell me what is wrong in my code!

I am using LO-3.5 as distributed from www.libreoffice.org; I observe this 
behavior under SuSE Linux 12.1 (64bit).

Thanks in advance,
Helmar

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.