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 2017/03/15 11:06:49 UTC

[Bug 60868] New: CTRow#isSetCustomHeight not working when customHeight set to "false"

https://bz.apache.org/bugzilla/show_bug.cgi?id=60868

            Bug ID: 60868
           Summary: CTRow#isSetCustomHeight not working when customHeight
                    set to "false"
           Product: POI
           Version: 3.15-FINAL
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: guarale@hotmail.com
  Target Milestone: ---

If I call CTRow#isSetCustomHeight() on a row tag which has customHeight="false"
 the method call actually returns true.

ECMA 376 specifications (on 18.3.1.73) say that the possible values for
attribute "customHeight" of "row" node are defined by the W3C XML Schema
boolean datatype so both "0" and "false" values should be accepted.

Please note that Microsoft Excel writes "1" for "true" and removes the
attribute for "false": in both cases CTRow#isSetCustomHeight() works fine, 
whereas CTRow#setCustomHeight(false) actually writes "false", which is not
properly recognized by CTRow#isSetCustomHeight().

-- 
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 60868] CTRow#isSetCustomHeight not working when customHeight set to "false"

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

--- Comment #1 from Javen O'Neal <on...@apache.org> ---
Thr CTRow class is generated from the OOXML XSD schemas. So the bug is XSSFRow
or other XSSF class not comparing CTRow.isSetCustomHeight against all valid
boolean values.

If you have the time to find the offending XSSF classes and write a patch, it'd
be greatly appreciated!

-- 
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 60868] CTRow#isSetCustomHeight not working when customHeight set to "false"

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

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

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

--- Comment #2 from Dominik Stadler <do...@gmx.at> ---
I did take a look, 

the generated isSetCustomHeight() actually does the following:

            return this.get_store().find_attribute_user(CUSTOMHEIGHT$16) !=
null;

so it returns true if the attribute appears in the XML.

The only place where POI itself uses isSetCustomHeight() is during clearing the
manually set height, where a general isSet-call makes sense to use the default
that is applied when the flag is not set at all.

So I currently don't see much that can be done inside Apache POI here, please
reopen the bug with more suggestions if you disagree.

-- 
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 60868] CTRow#isSetCustomHeight not working when customHeight set to "false"

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

--- Comment #3 from Alessandro Guarascio <gu...@hotmail.com> ---
I probably have misunanderstood the meaning of isSetCustomHeight().
It seems that the method I looked for was getCustomHeight().

Since in Java boolean getters do not usually starts with "get" I have got
confused by "isSet...".

Unfortunately, since these classes are autogenerated, patching with better
naming or clear javadoc is not possible.

Thanks for your answer and sorry again.

-- 
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