Hello,
I'm currently writing a program using the libreoffice java api.
It's a programm controlling the Writer component. I can insert tables,
place images inside the table and also change the height of table rows.
Now I want to change the width of a table column. But when I try to get
a column, I always get an empty object.
Here's what I do (it's JRuby code, but very similar to java):
[27] pry(main)> table.java_object
=>
[Proxy:1640296160,7f207000c9b0;gcc3[0];d5b23e2451b4b4a295c975776715,Type[com.sun.star.text.XTextTable]]>
[28] pry(main)> columns = table.columns
=> #<Java::Default::$Proxy60:0x5b799640>
[29] pry(main)> columns.java_object
=>
[Proxy:1534694976,7f207c000de0;gcc3[0];d5b23e2451b4b4a295c975776715,Type[com.sun.star.table.XTableColumns]]>
[30] pry(main)> columns.getCount
=> 12
[31] pry(main)> col = columns.getByIndex 0
=> nil
I always get nil :(
There's some kind of functionality behind the method, because if I enter
a wrong index, an exception is raised
[32] pry(main)> col = columns.getByIndex 13
Java::ComSunStarLang::IndexOutOfBoundsException:
from
com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(com/sun/star/lib/uno/environments/remote/Job.java:158)
[33] pry(main)>
Is this a bug or what am I doing wrong?
kind regards,
Andy
Context
- Writer Table Columns Access via Java API · fxruby
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.