Problems to access table columns via UNO interface

Michael Meeks michael.meeks at
Fri Mar 9 01:51:06 PST 2012

Hi Helmar,

On Thu, 2012-03-08 at 17:52 +0100, Helmar Spangenberg wrote:
> 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.

	I've no idea how all this is supposed to work :-) but if I wanted to
dig out something that did, I'd try to copy an existing sample - if you
'git grep TextTable' in the source checkout, you'll see where this is
implemented in writer, and some samples:


	for example. In this case you're going to need to read the code I think
to work out what's up. Personally, I loathe the (IMHO brain-damaged)
design choice of using (y, x) instead of (x, y) as all right thinking
people do ;-) but at least you seem to get that right - there are 5

> tabelle->initialize(2, 5);
> Reference<XTableColumns> tcols (tabelle->getColumns(), UNO_SET_THROW);
> pval <<= tcols->getByIndex(2);

	So I'd read around sw/source/core/unocore/unotbl.cxx in particular:

uno::Any SwXTableColumns::getByIndex(sal_Int32 nIndex)

	And see what is going on there :-)



michael.meeks at  <><, Pseudo Engineer, itinerant idiot

More information about the LibreOffice mailing list