You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2015/07/02 08:13:40 UTC

[Issue 126391] New: race in using udk api to set a fat border to a rectangle/range in a text table

https://bz.apache.org/ooo/show_bug.cgi?id=126391

          Issue ID: 126391
        Issue Type: DEFECT
           Summary: race in using udk api to set a fat border to a
                    rectangle/range in a text table
           Product: Writer
           Version: 4.1.1
          Hardware: PC
                OS: Linux64
            Status: UNCONFIRMED
          Severity: normal
          Priority: P5
         Component: formatting
          Assignee: issues@openoffice.apache.org
          Reporter: mjmbakker@hotmail.com

Created attachment 84811
  --> https://bz.apache.org/ooo/attachment.cgi?id=84811&action=edit
wrong output

when trying to give a cellrange in a writer table fat borderlines more lines
are fattened than ordered.

inserting a sleep a more than 500 msec corrects this behaviour.
the time is dependend on at least the amount of work done to the table ahead of
this (eg , when also doing cell merging and text bolding this increases to 1000
msec)


 BorderLine borderstruct = new BorderLine();
 borderstruct.Color = 0;
 borderstruct.InnerLineWidth = 50;
 borderstruct.LineDistance = 0;
 borderstruct.OuterLineWidth = 0;


xCellRange = xCellRange.getCellRangeByPosition(1, 1, 2, 2);

XPropertySet xCellProperties = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xCellRange);

xCellProperties.setPropertyValue("TopBorder", borderstruct);

Thread.sleep(500);

xCellProperties.setPropertyValue("RightBorder", borderstruct);
xCellProperties.setPropertyValue("BottomBorder", borderstruct);
xCellProperties.setPropertyValue("LeftBorder", borderstruct);

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126391] race in using sdk api to set a fat border to a rectangle/range in a text table

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126391

Martin <mj...@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Product|Writer                      |App Dev
          Component|formatting                  |sdk

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126391] race in using sdk api to set a fat border to a rectangle/range in a text table

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126391

Martin <mj...@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Latest|4.1.6                       |4.1.7
    Confirmation in|                            |

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126391] race in using sdk api to set a fat border to a rectangle/range in a text table

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126391

--- Comment #6 from Martin <mj...@hotmail.com> ---
Comment on attachment 84817
  --> https://bz.apache.org/ooo/attachment.cgi?id=84817
Document with a table and two macros

I agree I mixed up the inner with the outer. 
Changing this however does not improve when using the java code. the race
remains. ( guess basic is not fast enough?)

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126391] race in using sdk api to set a fat border to a rectangle/range in a text table

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126391

Martin <mj...@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Latest|4.1.3                       |4.1.6
    Confirmation in|                            |

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126391] race in using sdk api to set a fat border to a rectangle/range in a text table

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126391

--- Comment #8 from Martin <mj...@hotmail.com> ---
Created attachment 84820
  --> https://bz.apache.org/ooo/attachment.cgi?id=84820&action=edit
file as intended when using sleep 1000

changing to using OuterLineWidth indeed shows the document on reload equivelant
to what was saved, and it is correct when using enough sleep

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126391] race in using sdk api to set a fat border to a rectangle/range in a text table

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126391

Martin <mj...@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|race in using udk api to    |race in using sdk api to
                   |set a fat border to a       |set a fat border to a
                   |rectangle/range in a text   |rectangle/range in a text
                   |table                       |table

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126391] race in using sdk api to set a fat border to a rectangle/range in a text table

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126391

--- Comment #4 from Martin <mj...@hotmail.com> ---
Created attachment 84815
  --> https://bz.apache.org/ooo/attachment.cgi?id=84815&action=edit
java test program

sorry, having to learn the aoo-basic proved to be to difficult without having
any ide comfort or huge amounts of time. :(

Attached is the smallest netbeans/java project I could make showing the
erronous behaviour. it is build from using the aoo plugin. no gui , all
statics.

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126391] race in using sdk api to set a fat border to a rectangle/range in a text table

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126391

--- Comment #2 from Martin <mj...@hotmail.com> ---
also I noticed that opening the previous attachments from a windows pc using
a00 4.1.1 both attachments look wrong!? As obvious from the code, there should
be a thick line around the cellRange (1,1,2,2).

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126391] race in using udk api to set a fat border to a rectangle/range in a text table

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126391

--- Comment #1 from Martin <mj...@hotmail.com> ---
Created attachment 84812
  --> https://bz.apache.org/ooo/attachment.cgi?id=84812&action=edit
the correct output

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126391] race in using sdk api to set a fat border to a rectangle/range in a text table

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126391

--- Comment #10 from Martin <mj...@hotmail.com> ---
4.1.10 stil fails.

(change  test code to read
borderstruct.Color = 0;
borderstruct.InnerLineWidth = 0;
borderstruct.LineDistance = 0;
borderstruct.OuterLineWidth = 50;

to accommodate comment 5)

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126391] race in using sdk api to set a fat border to a rectangle/range in a text table

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126391

--- Comment #3 from mroe <mr...@gmx.net> ---
Please provide a full running macro (sub/function) for testing. Best way is to
include it in a macro library inside the document.

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126391] race in using sdk api to set a fat border to a rectangle/range in a text table

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126391

Keith N. McKenna <kn...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Latest|4.1.7                       |---
    Confirmation in|                            |
                 CC|                            |knmc@apache.org

--- Comment #9 from Keith N. McKenna <kn...@apache.org> ---
As this appears not to have been ever been confirmed by another user. The use
of the last confirmation field is not appropriate.

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126391] race in using sdk api to set a fat border to a rectangle/range in a text table

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126391

--- Comment #7 from Martin <mj...@hotmail.com> ---
Created attachment 84819
  --> https://bz.apache.org/ooo/attachment.cgi?id=84819&action=edit
used outborder with sleep 100

changing to using OuterLineWidth indeed show the document on reload equivalant
to what was saved, but it is still wrong when using non or little sleep

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126391] race in using sdk api to set a fat border to a rectangle/range in a text table

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126391

Matthias Seidel <ms...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mseidel@apache.org

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126391] race in using sdk api to set a fat border to a rectangle/range in a text table

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126391

bmarcelly <ma...@club-internet.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marcelly@club-internet.fr

--- Comment #5 from bmarcelly <ma...@club-internet.fr> ---
Created attachment 84817
  --> https://bz.apache.org/ooo/attachment.cgi?id=84817&action=edit
Document with a table and two macros

Attachment 84811 and attachment 84812 are Writer files, extension odt is
missing.

I confirm that both documents are incorrect, as seen from Windows 7. It may be
due to an incorrect structure of the table after setting of borders.

Read the API documentation of BorderLine structure :
 InnerLineWidth is only used as the inner part of a double line.
 OuterLineWidth has to be used for a single line.

According to the API doc, your usage of the borders is incorrect.


My attachment FatBorders is a proof.
Macro Main1 contains the Basic equivalent to your Java code. Run it, save to
another name, reload : the borders have changed.
Macro Main2 is the same, but uses OuterLineWidth instead of InnerLineWidth.
This time the borders stay correct after reload.

-- 
You are receiving this mail because:
You are the assignee for the issue.