Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing
|Summary:||Table formatting wrong in hidden documents after insertion of rows|
|Component:||code||Assignee:||AOO issues mailing list <issues>|
|Status:||ACCEPTED ---||QA Contact:|
|Issue Type:||DEFECT||Latest Confirmation in:||---|
Description akusmierz 2010-01-08 07:44:18 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".
Comment 1 akusmierz 2010-01-08 07:45:44 UTC
Created attachment 67067 [details] Sample code to reproduce this error
Comment 2 akusmierz 2010-01-08 07:46:16 UTC
Created attachment 67068 [details] Sample rtf file to use with code attached above
Comment 3 jsc 2010-01-08 09:00:54 UTC
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
Comment 4 akusmierz 2010-01-08 09:41:51 UTC
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.
Comment 5 Oliver Specht 2010-01-08 12:50:18 UTC
->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"
Comment 6 Oliver Specht 2010-01-08 12:53:10 UTC
Created attachment 67078 [details] sample code in Basic
Comment 7 akusmierz 2010-01-08 14:35:24 UTC
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?
Comment 8 akusmierz 2010-01-08 14:37:04 UTC
Created attachment 67081 [details] Java App - example of bug
Comment 9 Oliver Brinzing 2010-01-11 08:51:48 UTC
added me to cc
Comment 10 akusmierz 2010-02-01 14:05:48 UTC
Could someone tell me, how work is going on? Is it bug? Who and when repair it?
Comment 11 Oliver Specht 2010-02-01 14:48:47 UTC
It is a bug. I'm probably the one to fix it. I cannot predict when this issue will be fixed.