diff options
Diffstat (limited to 'scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataNode.java')
-rw-r--r-- | scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataNode.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataNode.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataNode.java index 91f393e5d176..32d438f1f3c2 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataNode.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataNode.java @@ -36,7 +36,7 @@ public class OfficeDocumentDataNode extends DataNode { public OfficeDocumentDataNode(OfficeDocumentDataObject obj) { this(obj, new OfficeDocumentChildren((OfficeDocumentCookie) - obj.getCookie(OfficeDocumentCookie.class))); + obj.getCookie(OfficeDocumentCookie.class))); } public OfficeDocumentDataNode(OfficeDocumentDataObject obj, Children ch) { @@ -55,27 +55,32 @@ public class OfficeDocumentDataNode extends DataNode { if (copies != null) { for (int i = 0; i < copies.length; i++) { if (copies[i] instanceof ParcelDataNode) { - File source = FileUtil.toFile(((ParcelDataNode)copies[i]).getDataObject().getPrimaryFile()); + File source = FileUtil.toFile(((ParcelDataNode) + copies[i]).getDataObject().getPrimaryFile()); File target = FileUtil.toFile(getDataObject().getPrimaryFile()); if (source.exists() && source.canRead() && target.exists() && target.canWrite()) { - ls.add(new ParcelDataNode.ParcelPasteType((ParcelDataNode)copies[i], target, false)); + ls.add(new ParcelDataNode.ParcelPasteType((ParcelDataNode)copies[i], target, + false)); } } } } Node[] moves = NodeTransfer.nodes(t, NodeTransfer.MOVE); + if (moves != null) { for (int i = 0; i < moves.length; i++) { if (moves[i] instanceof ParcelDataNode) { - File source = FileUtil.toFile(((ParcelDataNode)moves[i]).getDataObject().getPrimaryFile()); + File source = FileUtil.toFile(((ParcelDataNode) + moves[i]).getDataObject().getPrimaryFile()); File target = FileUtil.toFile(getDataObject().getPrimaryFile()); if (source.exists() && source.canRead() && target.exists() && target.canWrite()) { - ls.add(new ParcelDataNode.ParcelPasteType((ParcelDataNode)moves[i], target, true)); + ls.add(new ParcelDataNode.ParcelPasteType((ParcelDataNode)moves[i], target, + true)); } } } |