Problems to access table columns via UNO interface

Helmar Spangenberg hspangenberg at frey.de
Fri Mar 9 02:44:31 PST 2012


Hi Michael,

Am Freitag, 9. März 2012, 09:51:06 schrieb Michael Meeks:
> 
> 	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
> columns.
> 
> > 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 :-)

Last night, after several hours reading the big manual called source code and 
reading several comments in the lists reaching back to 2003 I actually found 
in sw/source/core/unocore/unotbl.cxx within the function getByIndex() the 
coment "!! writer tables do not have columns!!". A little bit mean is, this 
function seems to do something maybe useful, but at the end unconditionally 
returns an empty XInterface :-(

Thus, my nice idea of creating extending tables in a text probably never will 
work...

As a workaround I am now experimenting with text frames to set up a table-like 
structure. Seems to work rather nice (although a little bit slow); the only 
issue is to force the frames to have an equal height (depending on that frame 
containing the highest amount of text). Is there a possibility to obtain the 
physical position of a text or whatever cursor on the page?

Thanks,
Helmar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120309/0ff7c496/attachment.html>


More information about the LibreOffice mailing list