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 2016/03/18 15:57:12 UTC

[Bug 59200] New: Creating a data validation with prompt text longer than max leads to file failing office validation

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

            Bug ID: 59200
           Summary: Creating a data validation with prompt text longer
                    than max leads to file failing office validation
           Product: POI
           Version: 3.13-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SS Common
          Assignee: dev@poi.apache.org
          Reporter: hullmo@gmail.com

If you create a DataValidation with a prompt text longer than the excel maximum
(seems to be 32 characters) POI allows this to be made.  However, when opening
the file with excel, assuming protected view is enabled, excel will go to
protected view.  Furthermore, if you open up the data validation from excel you
will not be able to edit the prompt title.

-- 
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 59200] Creating a data validation with prompt text longer than max leads to file failing office validation

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

Morgan Hull <hu...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
                 CC|                            |hullmo@gmail.com

-- 
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 59200] Creating a data validation with prompt text longer than max leads to file failing office validation

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

Morgan Hull <hu...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #2 from Morgan Hull <hu...@gmail.com> ---
Sorry if this isn't in a reasonable format, I'm completely new to this.

        String promptTitle;
        DataValidation dataValidation;
        CellRangeAddressList headerCell = new
CellRangeAddressList(ImportFileBundleSheets.FIRST_ROW_INDEX,
ImportFileBundleSheets.FIRST_ROW_INDEX, columnNum, columnNum);
        DataValidationConstraint constraint =
sheet.getDataValidationHelper().createCustomConstraint("A1<>\"\"");

        dataValidation = new HSSFDataValidation(headerCell, constraint);
        promptTitle = PortalServices.getI18nString(adminLocale,
GroupImportConstants.PROMPT_TITLE);

        dataValidation.createPromptBox("Some long title that is greater than 32
characters in length", promptDescription);
        dataValidation.setShowErrorBox(false);
        sheet.addValidationData(dataValidation);

-- 
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 59200] Creating a data validation with prompt text longer than max leads to file failing office validation

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |igdevaal@hotmail.com

--- Comment #5 from Dominik Stadler <do...@gmx.at> ---
*** Bug 54662 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


[Bug 59200] Creating a data validation with prompt text longer than max leads to file failing office validation

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

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

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

--- Comment #3 from Dominik Stadler <do...@gmx.at> ---
Fixed via r1771254, the spec states a limit for HSSF of 32 length for title and
255 length for text. For XSSF it does not state a limit as far as I saw, but
Excel imposes a 255 length limit for both title and text, so I applied this
limit as well here.

-- 
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 59200] Creating a data validation with prompt text longer than max leads to file failing office validation

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
Can you provide a unit-test or at least a code-snippet that shows how you
create the invalid data validation? This would make it much easier for others
to reproduce the problem.

-- 
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 59200] Creating a data validation with prompt text longer than max leads to file failing office validation

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

--- Comment #4 from Javen O'Neal <on...@apache.org> ---
(In reply to Morgan Hull from comment #2)
> Sorry if this isn't in a reasonable format, I'm completely new to this.

It's fine to submit small, trivial changes as a comment, preferably prefixing
each line with "> " so that Bugzilla doesn't text-wrap the code.

If your changes get much bigger or it's ambiguous *what* you're suggesting
should be changed, there's an easier way.

Check out the source code using SVN [1], save your changes in the source code,
then save an svn patch file ("svn diff > patch.txt" or using a graphical
client). Then upload the patch file.
See [2] for more info.

Thanks for contributing!

[1] https://poi.apache.org/subversion.html
[2] https://poi.apache.org/guidelines.html#Submitting+Patches

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