You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2008/06/30 08:47:55 UTC

DO NOT REPLY [Bug 45312] New: HSSFSimpleShape can not draw line properly.

https://issues.apache.org/bugzilla/show_bug.cgi?id=45312

           Summary: HSSFSimpleShape can not draw line properly.
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: ta-seok@brainsellers.com


I draw two lines by using HSSFSimpleShape.

I expected that it looks like a V mark ("\/").

But it looks "\_" at the excel of ms office 2007.

and looks "\ \" at the excel of ms office 2003.

If end_x or end_y is greater than start_x or start_y then it dose not go
properly.

The following is the part of source.

        {
            HSSFClientAnchor a1 = new HSSFClientAnchor();
            a1.setAnchor( (short)1, 1, 0, 0, (short) 1, 1, 512, 100);
            HSSFSimpleShape shape1 = patriarch.createSimpleShape(a1);
            shape1.setShapeType(HSSFSimpleShape.OBJECT_TYPE_LINE);
        }
        {
            HSSFClientAnchor a1 = new HSSFClientAnchor();
            a1.setAnchor( (short)1, 1, 512, 100, (short) 1, 1, 1024, 0);
            HSSFSimpleShape shape1 = patriarch.createSimpleShape(a1);
            shape1.setShapeType(HSSFSimpleShape.OBJECT_TYPE_LINE);
        }

The original source code from 
http://www.koders.com/java/fidEACAA8D909E44C6F130B34CFA76FDA1738FD719D.aspx


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 45312] HSSFSimpleShape can not draw line properly.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45312

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
I did some analysis: it seems Excel and OpenOffice use a flag "FLIPVERT" and
reverse vertical coordinates for the second drawing, so a workaround currently
is to use the following:

                HSSFClientAnchor a1 = new HSSFClientAnchor();
                a1.setAnchor( (short)2, 2, 512, 0, (short) 2, 2, 1024, 100);
                HSSFSimpleShape shape1 = patriarch.createSimpleShape(a1);
                shape1.setFlipVertical(true);
                shape1.setShapeType(HSSFSimpleShape.OBJECT_TYPE_LINE);

we probably need to search the spec if this behavior is described, when the
record is serialized, the data ends up in two separate sub-records of the
EscherContainerRecord:

           Child 0:
            org.apache.poi.ddf.EscherSpRecord:
              RecordId: 0xF00A
              Version: 0x0002
              ShapeType: 0x0014
              ShapeId: 1025
              Flags: FLIPVERT|HAVEANCHOR|HASSHAPETYPE (0x00000A80)
            ...
           Child 2:
            org.apache.poi.ddf.EscherClientAnchorRecord:
              RecordId: 0xF010
              Version: 0x0000
              Instance: 0x0000
              Flag: 0
              Col1: 2
              DX1: 512
              Row1: 2
              DY1: 0
              Col2: 2
              DX2: 1024
              Row2: 2
              DY2: 100
              Extra Data:
            No Data

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 45312] HSSFSimpleShape can not draw line properly.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45312

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #2 from Dominik Stadler <do...@gmx.at> ---
I looked at the spec, there is no mention of this behavior and I don't see an
easy way of handling this inside POI with correct backwards compatibility. 

Therefore I have updated javadoc via r1621586 to mention that some flipping
might be necessary.

So overall this Bug is WONTFIX as we don't fix it in POI as the behavior is
caused by Excel itself in an undocumented way.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org