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 2018/09/18 12:46:04 UTC

[Bug 62733] New: [PATCH] XSLFBackground setFill() can corrupt the document

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

            Bug ID: 62733
           Summary: [PATCH] XSLFBackground setFill() can corrupt the
                    document
           Product: POI
           Version: 4.0.0-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLF
          Assignee: dev@poi.apache.org
          Reporter: bmateusz@gmail.com
  Target Milestone: ---

Created attachment 36152
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36152&action=edit
patch setFill function of XSLFBackground

The current setFill implementation only cares about noFill and solidFill
attributes.
If the presentation already contains e.g. a gradFill and you call
setFill(null), it results in a background containing both a noFill and a
gradFill, which is an invalid document and cannot be opened by PPT.

See my patch which would fix that 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 62733] [PATCH] XSLFBackground setFill() can corrupt the document

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

PJ Fanning <fa...@yahoo.com> changed:

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

--- Comment #3 from PJ Fanning <fa...@yahoo.com> ---
changes applied using
https://svn.apache.org/viewvc?view=revision&revision=1841240

-- 
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 62733] [PATCH] XSLFBackground setFill() can corrupt the document

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

--- Comment #2 from Mate Borcsok <bm...@gmail.com> ---
Created attachment 36154
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36154&action=edit
testcase
src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFBackground.java

I added a new test suite with 4 test cases which covers the common use-cases,
using some existing test pptx files from the repo.

-- 
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 62733] [PATCH] XSLFBackground setFill() can corrupt the document

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

--- Comment #1 from PJ Fanning <fa...@yahoo.com> ---
Comment on attachment 36152
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36152
patch setFill function of XSLFBackground

Looks sensible enough to me. Could you add a test case though?

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