Skip to content

Conversation

@Alain-Bearez
Copy link
Contributor

@Alain-Bearez Alain-Bearez commented Sep 26, 2017

The main goal of this work is to provide a user model API in order to handle the shape properties without using underlying XmlBeans objects and interfaces. Among others, handling properties related to colors is made simpler by returning and accepting an abstract XDDFColor, which has six distinct implementations, where the developers were required to check whether or not one of the six properties was set.

What is left to be done:

  • refactor XSLFColor to make use of the new shareable code;
  • deprecate methods that return XmlBeans objects where a user model object now exists.

@centic9
Copy link
Member

centic9 commented Sep 28, 2017

Testing Github->Jenkins integration: run tests

@asfgit
Copy link

asfgit commented Sep 28, 2017

Can one of the admins verify this patch?

@centic9
Copy link
Member

centic9 commented Sep 28, 2017

FYI, CI on this branch failed with

compile-ooxml:
    [javac] Compiling 524 source files to /home/jenkins/jenkins-slave/workspace/POI-Github-PullRequests/build/ooxml-classes
    [javac] /home/jenkins/jenkins-slave/workspace/POI-Github-PullRequests/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFValueAxis.java:56: error: XDDFShapeProperties(CTShapeProperties) has protected access in XDDFShapeProperties
    [javac]         return new XDDFShapeProperties(getOrAddLinesProperties(majorGridlines));
    [javac]                ^
    [javac] /home/jenkins/jenkins-slave/workspace/POI-Github-PullRequests/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFValueAxis.java:67: error: XDDFShapeProperties(CTShapeProperties) has protected access in XDDFShapeProperties
    [javac]         return new XDDFShapeProperties(getOrAddLinesProperties(minorGridlines));
    [javac]                ^
    [javac] /home/jenkins/jenkins-slave/workspace/POI-Github-PullRequests/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFValueAxis.java:78: error: XDDFShapeProperties(CTShapeProperties) has protected access in XDDFShapeProperties
    [javac]         return new XDDFShapeProperties(properties);
    [javac]                ^
    [javac] /home/jenkins/jenkins-slave/workspace/POI-Github-PullRequests/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFCategoryAxis.java:56: error: XDDFShapeProperties(CTShapeProperties) has protected access in XDDFShapeProperties
    [javac]         return new XDDFShapeProperties(getOrAddLinesProperties(majorGridlines));
    [javac]                ^
    [javac] /home/jenkins/jenkins-slave/workspace/POI-Github-PullRequests/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFCategoryAxis.java:67: error: XDDFShapeProperties(CTShapeProperties) has protected access in XDDFShapeProperties
    [javac]         return new XDDFShapeProperties(getOrAddLinesProperties(minorGridlines));
    [javac]                ^
    [javac] /home/jenkins/jenkins-slave/workspace/POI-Github-PullRequests/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFCategoryAxis.java:79: error: XDDFShapeProperties(CTShapeProperties) has protected access in XDDFShapeProperties
    [javac]         return new XDDFShapeProperties(properties);
    [javac]                ^
    [javac] /home/jenkins/jenkins-slave/workspace/POI-Github-PullRequests/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFDateAxis.java:60: error: XDDFShapeProperties(CTShapeProperties) has protected access in XDDFShapeProperties
    [javac]         return new XDDFShapeProperties(getOrAddLinesProperties(majorGridlines));
    [javac]                ^
    [javac] /home/jenkins/jenkins-slave/workspace/POI-Github-PullRequests/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFDateAxis.java:71: error: XDDFShapeProperties(CTShapeProperties) has protected access in XDDFShapeProperties
    [javac]         return new XDDFShapeProperties(getOrAddLinesProperties(minorGridlines));
    [javac]                ^
    [javac] /home/jenkins/jenkins-slave/workspace/POI-Github-PullRequests/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFDateAxis.java:82: error: XDDFShapeProperties(CTShapeProperties) has protected access in XDDFShapeProperties
    [javac]         return new XDDFShapeProperties(properties);

See https://builds.apache.org/job/POI-Github-PullRequests/3/console

@pjfanning
Copy link
Member

@Alain-Bearez the changes generally look good but would it be possible to add more unit tests?

@Alain-Bearez
Copy link
Contributor Author

Alain-Bearez commented Dec 24, 2017

It would be a bunch of tests for getters and setters...

I will try to find some time before the end of the year to copy and adapt the tests from TestXSLFColor and TestXSSFColor which are also mainly testing getters and setters.

@Alain-Bearez Alain-Bearez changed the title Define XDDF user model for shape properties to be shared between XSSF and XSLF Define XDDF user model for shape properties to be shared between XSLF, XSSF and XWPF Dec 31, 2017
@pjfanning
Copy link
Member

@Alain-Bearez If this is ready to merge, I can go ahead and do that.

@Alain-Bearez
Copy link
Contributor Author

@pjfanning I was only waiting for Dominik to confirm that the integration tests are passing for that branch.

@asfgit asfgit closed this in 5f00729 Jan 6, 2018
@Alain-Bearez Alain-Bearez deleted the xddf-shape-properties branch January 6, 2018 02:59
@centic9
Copy link
Member

centic9 commented Jan 6, 2018

Alain-Bearez pushed a commit to cuali/poi that referenced this pull request Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants