Skip to content
Snippets Groups Projects
Commit fd65a4ed3560 authored by Fabien George's avatar Fabien George
Browse files

fix ods to pdf conversion

parent bfb7bf06e2a6
No related branches found
No related tags found
1 merge request!3fix ods to pdf conversion
......@@ -92,5 +92,6 @@
protected void refreshIndexes(XComponent document) {
XDocumentIndexesSupplier indexsupplier = (XDocumentIndexesSupplier) UnoRuntime.queryInterface(XDocumentIndexesSupplier.class, document);
XIndexAccess indexaccess = indexsupplier.getDocumentIndexes();
if (indexsupplier != null) {
XIndexAccess indexaccess = indexsupplier.getDocumentIndexes();
......@@ -96,15 +97,16 @@
for (int i = 0; i < indexaccess.getCount(); i++) {
try {
XDocumentIndex index = (XDocumentIndex) UnoRuntime.queryInterface(XDocumentIndex.class, indexaccess.getByIndex(i));
if (index != null) {
index.update();
}
} catch (IndexOutOfBoundsException e) {
e.printStackTrace();
} catch (WrappedTargetException e) {
e.printStackTrace();
}
for (int i = 0; i < indexaccess.getCount(); i++) {
try {
XDocumentIndex index = (XDocumentIndex) UnoRuntime.queryInterface(XDocumentIndex.class, indexaccess.getByIndex(i));
if (index != null) {
index.update();
}
} catch (IndexOutOfBoundsException e) {
e.printStackTrace();
} catch (WrappedTargetException e) {
e.printStackTrace();
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment