Adding utility method to check any protection is enforced #27

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
2 participants

This utility method is useful if it is to check only whether document is
enforced (any type) or not

prasad-babu added some commits Jan 25, 2016

@prasad-babu prasad-babu Adding utility method to check any protection is enforced
This utility method is useful if it is to check only whether document is
enforced (any type) or not
b2cec9b
@prasad-babu prasad-babu Fixed nullpointer exception
By default table cell doesnt have any vertical alignment details
e37084e
Member

centic9 commented Feb 14, 2016

Any chance of a small unit-test together with a sample document (or using one of the available sample-documents) which covers the new function?

@prasad-babu prasad-babu Adding unit test for enforced with util method
Adding unit test for enforced with util method
c6b7757

Added test case with sample document

prasad-babu reopened this Feb 15, 2016

sorry, i accidentally closed the request.

@centic9 centic9 commented on the diff Feb 15, 2016

...java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java
@@ -233,8 +233,9 @@ public XWPFVertAlign getVerticalAlignment() {
XWPFVertAlign vAlign = null;
CTTcPr tcpr = ctTc.getTcPr();
if (tcpr != null) {
- CTVerticalJc va = tcpr.getVAlign();
- vAlign = stVertAlignTypeMap.get(va.getVal().intValue());
+ CTVerticalJc va = tcpr.getVAlign();
+ if(va != null)
@centic9

centic9 Feb 15, 2016

Member

Is this change related? Looks like a different change/fix

asfgit closed this in 677b19a Feb 15, 2016

Member

centic9 commented Feb 15, 2016

FYI, I left out the seemingly unrelated change to XWPFTableCell.java, please create a separate PR with a short description and unit-test which reproduces the problem that you try to fix with it if you think this should be applied as well.

Sorry that was different bug fix. Unfortunately it was added to this pull request.

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