summaryrefslogtreecommitdiff
path: root/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.java
diff options
context:
space:
mode:
Diffstat (limited to 'scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.java')
-rw-r--r--scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.java33
1 files changed, 17 insertions, 16 deletions
diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.java
index d47481ec39d5..268c6054b2bb 100644
--- a/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.java
+++ b/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.java
@@ -59,6 +59,7 @@ public class OfficeDocumentDataLoader extends UniFileLoader {
protected FileObject findPrimaryFile(FileObject fo) {
ExtensionList extensions = getExtensions();
+
if (!extensions.isRegistered(fo))
return null;
@@ -67,32 +68,32 @@ public class OfficeDocumentDataLoader extends UniFileLoader {
try {
jarFs.setJarFile(document);
- }
- catch (IOException e) {
+ } catch (IOException e) {
return null;
- }
- catch (Exception e) {
+ } catch (Exception e) {
return null;
}
+
return fo;
}
protected SystemAction[] defaultActions() {
return new SystemAction[] {
- SystemAction.get(OpenAction.class),
- null,
- SystemAction.get(CutAction.class),
- SystemAction.get(CopyAction.class),
- SystemAction.get(PasteAction.class),
- null,
- SystemAction.get(DeleteAction.class),
- SystemAction.get(RenameAction.class),
- null,
- SystemAction.get(PropertiesAction.class),
- };
+ SystemAction.get(OpenAction.class),
+ null,
+ SystemAction.get(CutAction.class),
+ SystemAction.get(CopyAction.class),
+ SystemAction.get(PasteAction.class),
+ null,
+ SystemAction.get(DeleteAction.class),
+ SystemAction.get(RenameAction.class),
+ null,
+ SystemAction.get(PropertiesAction.class),
+ };
}
- protected MultiDataObject createMultiObject(FileObject primaryFile) throws DataObjectExistsException, IOException {
+ protected MultiDataObject createMultiObject(FileObject primaryFile) throws
+ DataObjectExistsException, IOException {
return new OfficeDocumentDataObject(primaryFile, this);
}
}