Apache OpenOffice (AOO) Bugzilla – Issue 85188
Table.width incorrect in API (when table orientation is set to automatic)
Last modified: 2013-02-24 21:08:44 UTC
Open a document in Writer. Create a table, either with the button or with the menu. Put the cursor in the table. Run the following code : o_curs = thisComponent.getcurrentcontroller.getviewCursor o_table = o_curs.TextTable msgbox o_table.width the value reported is : 115595 (sometimes 155596) Open the table properties and set the alignment to anything else than automatic. Run the code again : the correct value is reported (17000 in my example). Setback alignment to automatic and run the code : the value is correct. Close the document. Open it again, run the code : you get 115595.
115595 is not the maximum possible value for a table. I made the same tests on a page 220 cm wide. In the second step of the text I got the expected 220000
jsc -> tl:seems to be one for you
confirming with OOo 3.2.0 on linux → OS to All correction to initial description: after setting back to automatic, not the "correct" value is returned. It is rather the width of the table before setting it to automatic. I.e. shrink the table, run the code: Get correct result. Aet table to automatic: Table is full-width, but result is that of the shrunk table, the "previously correct" value.
.