[Bug 61584] New: NPE in XDGFPage getPageOffset: check for x instead of y

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 61584] New: NPE in XDGFPage getPageOffset: check for x instead of y

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61584

            Bug ID: 61584
           Summary: NPE in XDGFPage getPageOffset: check for x instead of
                    y
           Product: POI
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XDGF
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

XDGFPage getPageOffset contains a wrong check for null, causing an NPE for
.vsdx documents that don't have the YRulerOrigin set.

The code in question has been there ever since this was contributed, so it
appears to affect all versions.

,-- XDGFPage.java, lines 99ff [1] --
   99    if (xoffcell != null)
  100        xoffset = Double.parseDouble(xoffcell.getValue());
  101
  102    if (xoffcell != null)
  103        yoffset = Double.parseDouble(yoffcell.getValue());
`-----

The fix is trivial, line 102 should check yoffcell for being null.

[1]
https://apache.googlesource.com/poi/+/refs/heads/trunk/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPage.java#102

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61584] NPE in XDGFPage getPageOffset: check for x instead of y

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61584

Marko Friedemann <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61584] NPE in XDGFPage getPageOffset: check for x instead of y

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61584

Dominik Stadler <[hidden email]> changed:

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

--- Comment #1 from Dominik Stadler <[hidden email]> ---
Can you provide a sample document that we can use to verify the fix?

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61584] NPE in XDGFPage getPageOffset: check for x instead of y

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61584

--- Comment #2 from Marko Friedemann <[hidden email]> ---
I am afraid I can't, as the document in question originated with a customer and
I don't have a Visio version capable of generating .vsdx.

While I can understand the question of reproducability and verification, could
an exception be made here, as this specific bug should be trivial and obvious
enough to be handled?

If it helps, I added the fix to my copy and can now import the document without
issue.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61584] NPE in XDGFPage getPageOffset: check for x instead of y

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61584

virtuald <[hidden email]> changed:

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

--- Comment #3 from virtuald <[hidden email]> ---
I no longer have Visio installed with, but you're right that this is obviously
a typo. Pushed fix @ 1812240.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61584] NPE in XDGFPage getPageOffset: check for x instead of y

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61584

--- Comment #4 from virtuald <[hidden email]> ---
No longer have Visio installed either*

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]