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

--- Comment #4 from Akkuzin Anton <akku...@gmail.com> ---
Is there any plans for implementing XSSFWorkbook#isHidden ?

HSSFWorkbook implemented this feature (afaik with assumption that there is only
one workbookview)

May be it make sense to split this task into two steps:

1) Implement setting hidden flag for any(first or last) or all workbookview. 

I am personally encountered case when existing workbook with one HIDDEN
workbookview need to be modified to "show" data (=marked VISIBLE). As of 5.2.5
it is possible with HSSF and not possible with XSSF.

2) Leave fully functional management of workbookviews for another ticket




PS
Simple implementation of isHidden/setHidden seem to do the trick with goal 1):

@Override
public boolean isHidden() {
   return Optional.ofNullable(workbook.getBookViews())
            .map(bookView -> bookView.getWorkbookViewList())
            .flatMap(workbookView -> workbookView.stream().findFirst())
            .map(bookView -> bookView.getVisibility())
            .equals(of(STVisibility.HIDDEN));
}

@Override
public void setHidden(boolean hiddenFlag) {
    Optional.ofNullable(workbook.getBookViews())
            .map(bookView -> bookView.getWorkbookViewList())
            .flatMap(workbookView -> workbookView.stream().findFirst())
            .ifPresent(bookView ->
bookView.setVisibility(STVisibility.VISIBLE));
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to