License for API Examples?

I am looking at developing a Java application using the LIbreOffice 6.0 API for school. I am curious what is the license terms of the sample classes? Presently, I am interested in using the SpreadSheetDocHelper class (located here), but this could change or expand. Is it acceptable to use these classes as part of a larger work as long as the final application is used only for educational purposes or also released under an open-source license?


In general, all files available from LibreOffice site are free and open-source (unless there’s an explicit statement).

The Developer’s guide samples are covered by BSD license mentioned in the beginning of each source file (.java, .cpp, etc.) in accordance with original license terms when they were part of Developer’s guide on (currently the relevant OOo page is unavailable).