FormatterCreator docCreator = new FormatterCreator() {
@Override
public ReportFormatter create(FormatterFactoryInput factoryInput) {
if (officeIntegration == null) {
throw new UnsupportedFormatException("Could not use doc templates because Open Office connection params not set. Please check, that \"cuba.reporting.openoffice.path\" property is set in properties file.");
}
DocFormatter docFormatter = new DocFormatter(factoryInput, officeIntegration);
docFormatter.setDefaultFormatProvider(defaultFormatProvider);
return docFormatter;
}