Apache OpenOffice (AOO) Bugzilla – Issue 108148
Table formatting wrong in hidden documents after insertion of rows
Last modified: 2017-05-20 11:18:17 UTC
I've noticed some api queries are executed in wrong order. In most cases it seems to be ok, but in some - not. For example if I tried to add new row and next immediately move table cursor down on it, insertByIndex() function returns false, because there isn't a row this time. But after a few ms I can move cursor and I have this row inserted. Tested on Ubuntu with OOo 3.1.1 and on Windows XP with OOo 2.4.6 also. OOo service started as '/usr/bin/openoffice.org "- accept=socket,tcpNoDelay=1,host=localhost,port=8100;urp,Negotiate=1,ForceSynchronous=1;StarOffice.ServiceManager" -nologo -headless -nofirststartwizard' I've attached sample code with sample doc file. It returns something like: Rows: 2 added #0/3 crap! #1/4 crap! #2/5 crap! #3/6 crap! #4/7 crap! #5/8 crap! #6/9 crap! #7/10 crap! #8/11 crap! #9/12 Rows: 12 added added added added added added added added added added Rows: 12 But should only "added".
Created attachment 67067 [details] Sample code to reproduce this error
Created attachment 67068 [details] Sample rtf file to use with code attached above
some comments independent from the original problem: - ForceSynchronous=1 should be unnecessary because it's the default. - when you load a template you don't have to set the property AsTemplate =true, this means that you want to load the document as template to modify the template - Any values, you can't simply cast, you have to use queryInterface jsc -> os; as discussed probably one for you
My mistake in description. Of course not "insertByIndex()" returns false, but "cursor.goDown((short) 1, false)" as in attached example above. jsc, thanks for advice.
->akusmierz: The scenario is a bit different: This should happen: You start in "A1", insert a new second row then move the cursor to "A2". Then again a new second row is inserted which changes the cursors position to "A3" and the cursor is moved to "A4". After that the move operations of the cursor will always fail as it is already in the last row. That _does_ happen: The cursor is set to "A1", the row is inserted and the cursor is directly moved to cell "A3". At this point no cursor movements are possible anymore. changed summary, was: "Async query to api regardless of documentation"
Created attachment 67078 [details] sample code in Basic
OK, mea culpa. Wrong example, it was to simple. I've attached new one. Change path in SaveDocument(document, "/tmp/test.pdf"); if you wish and run it. What happens? OOo replaces 1st row (but formatting is wrong!), next adds 10 new (empty!) rows, and replaces last row whith another content (which shuoldn't!) What _should_ happens? OOo should replace first row for 10 rows filled with "test1", "test2", "test3" and "test4" everyone (if you are using test.rtf attached above). Last row should be untouched. Weird, if I uncomment Thread.Sleep() (line 135), it everething works fine. Why?
Created attachment 67081 [details] Java App - example of bug
added me to cc
Could someone tell me, how work is going on? Is it bug? Who and when repair it?
It is a bug. I'm probably the one to fix it. I cannot predict when this issue will be fixed.
Reset assigne to the default "issues@openoffice.apache.org".