Skip to content

poi-ooxml: add new API to add text transparency on XLSX#214

Open
artragis wants to merge 1 commit into
apache:trunkfrom
artragis:add_new_api_for_alpha_rebased
Open

poi-ooxml: add new API to add text transparency on XLSX#214
artragis wants to merge 1 commit into
apache:trunkfrom
artragis:add_new_api_for_alpha_rebased

Conversation

@artragis

@artragis artragis commented Jan 4, 2021

Copy link
Copy Markdown

This API uses XSSFColor built with alpha channel to set up the right value.
We must take care of the fact Excel uses 1000th of percent and positive numbers

This API uses XSSFColor built with alpha channel to set up the right value.
We must take care of the fact Excel uses 1000th of percent and positive numbers
return ok;
}

public void setTextFillColor(XSSFColor color) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add a getTextFillColor?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must I return null if no fill colour is found?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best to return null if no value is set

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I will try to do so. But translating CTColors into XSSFColor may be hard, Is there any helper to do that in the project?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XSSFColor has public static XSSFColor from(CTColor color, IndexedColorMap map) - you can use new DefaultIndexedColorMap()

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I will try to build org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor from CTSolidColorFillProperties.

I'm wondering if we cannot create a sub interface for all those colors instead of CTColor

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.

2 participants