https://bugs.documentfoundation.org/show_bug.cgi?id=157053
Stéphane Guillou (stragu) <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stephane.guillou@libreoffic | |e.org Ever confirmed|0 |1 Version|24.2.0.0 alpha0+ Master |Inherited From OOo Status|UNCONFIRMED |NEEDINFO --- Comment #1 from Stéphane Guillou (stragu) <[email protected]> --- Reproduced in: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: b3fdd999f87312447d03915585812b3a5cd48141 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Same in OOo 3.3. Using a different variable name (e.g. "aSeps2") works. However, I found that you don't need to reassign a second time with aSeps=oRow.TableColumnSeparators for what you want to achieve. Try this: Sub changeWidthsInTextTable dim oDoc as object, oTable as object, oVCur as object, oRow as object, oCell as object, oTableCursor as object, aSeps() oDoc=ThisComponent rem insert table oTable=oDoc.createInstance("com.sun.star.text.TextTable") with oTable .initialize(3, 4) '3 rows, 4 columns .RelativeWidth=100 .HoriOrient=0 end with oVCur=oDoc.CurrentController.ViewCursor oDoc.Text.insertTextContent(oVCur.End, oTable, false) '1st change of cell-width -> OK oRow=oTable.Rows(0) '1st row aSeps=oRow.TableColumnSeparators aSeps(0).Position=500 oRow.TableColumnSeparators=aSeps() '2nd change oRow=oTable.Rows(2) '3rd row 'aSeps=oRow.TableColumnSeparators aSeps(0).Position=1500 oRow.TableColumnSeparators=aSeps() End Sub Does that fix your issue? Related: https://ask.libreoffice.org/t/object-not-accessible-invalid-use-of-an-object-after-executeupdate/31829 -- You are receiving this mail because: You are the assignee for the bug.
