New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define XDDF user model for shape properties to be shared between XSLF, XSSF and XWPF #72

Closed
wants to merge 2 commits into
base: trunk
from

Conversation

Projects
None yet
4 participants
@Alain-Bearez
Contributor

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

This comment has been minimized.

Member

centic9 commented Sep 28, 2017

Testing Github->Jenkins integration: run tests

@asfgit

This comment has been minimized.

asfgit commented Sep 28, 2017

Can one of the admins verify this patch?

@centic9

This comment has been minimized.

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

This comment has been minimized.

Contributor

pjfanning commented Dec 23, 2017

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

@Alain-Bearez

This comment has been minimized.

Contributor

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 from Define XDDF user model for shape properties to be shared between XSSF and XSLF to Define XDDF user model for shape properties to be shared between XSLF, XSSF and XWPF Dec 31, 2017

@pjfanning

This comment has been minimized.

Contributor

pjfanning commented Jan 2, 2018

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

@Alain-Bearez

This comment has been minimized.

Contributor

Alain-Bearez commented Jan 2, 2018

@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 cuali:xddf-shape-properties branch Jan 6, 2018

@centic9

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment