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 16:31:15 UTC

[Bug 60870] New: [PATCH] in XSSF files getErrorStyle() and setErrorStyle() have mismatching enum values -> #60803

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

            Bug ID: 60870
           Summary: [PATCH] in XSSF files getErrorStyle() and
                    setErrorStyle() have mismatching enum values -> #60803
           Product: POI
           Version: 3.15-dev
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: gstrada@imolinfo.it
  Target Milestone: ---

Created attachment 34834
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34834&action=edit
file containing diffs between patched class and the original one

the problem is explained in the bug report 60803.

the solution i promote is to use a map into XSSFDataValidation to convert the
Enums, which come from STDataValidation (range 1-3), into the ints exposed in
DataValidation (range 0-2) so getErrorStyle returns values between 0-2.
This adjustment is required when we want to copy the errorstyle of a cell, or a
group of cells, into another one : 

(working example with patch)
    newDataValidation.setErrorStyle(anotherDataValidation.getErrorStyle());


(working example without patch)
    newDataValidation.setErrorStyle(anotherDataValidation.getErrorStyle() - 1);

-- 
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 60870] [PATCH] in XSSF files getErrorStyle() and setErrorStyle() have mismatching enum values -> #60803

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

-- 
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 60870] [PATCH] in XSSF files getErrorStyle() and setErrorStyle() have mismatching enum values -> #60803

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

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

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

--- Comment #2 from Dominik Stadler <do...@gmx.at> ---
This was actually already fixed in bug 55713

*** This bug has been marked as a duplicate of bug 55713 ***

-- 
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 60870] [PATCH] in XSSF files getErrorStyle() and setErrorStyle() have mismatching enum values -> #60803

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

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
*** Bug 60803 has been marked as a duplicate of this bug. ***

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