]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/function/All.java
Spreadsheet Fixes
[simantics/platform.git] / bundles / org.simantics.spreadsheet.graph / src / org / simantics / spreadsheet / graph / function / All.java
index 1439a941dcb53d5a023d894a4615cb8924d469d0..39e5778f9ddd5bfef7acee410973dc9f008f61df 100644 (file)
@@ -620,20 +620,21 @@ public class All {
                
             private CellEditor<Write> getPossibleCellEditor(WriteGraph graph, String location, Variant value) throws DatabaseException {
                 SpreadsheetResource SHEET = SpreadsheetResource.getInstance(graph);
-                Range range = SpreadsheetUtils.decodeCellAbsolute(location);
-                
-                List<Variable> cells = SpreadsheetGraphUtils.possibleConfigurationCellVariables(graph, sheet, range);
-                if (cells.isEmpty()) {
-                    if (value == null) {
-                        return null;
-                    } else {
-                        cells = SpreadsheetGraphUtils.getOrCreateConfigurationCellVariables(graph, sheet, range);
-                    }
-                }
-                if (cells.size() != 1)
-                    throw new DatabaseException("Can edit only one cell at a time!");
-                
-                return cells.iterator().next().getPropertyValue(graph, SHEET.cellEditor);
+                   Range range = SpreadsheetUtils.decodePossibleCellAbsolute(location);
+                   if(range == null) return null; //No editor found
+                   
+                   List<Variable> cells = SpreadsheetGraphUtils.possibleConfigurationCellVariables(graph, sheet, range);
+                   if (cells.isEmpty()) {
+                       if (value == null) {
+                           return null;
+                       } else {
+                           cells = SpreadsheetGraphUtils.getOrCreateConfigurationCellVariables(graph, sheet, range);
+                       }
+                   }
+                   if (cells.size() != 1)
+                       throw new DatabaseException("Can edit only one cell at a time!");
+                       
+                   return cells.iterator().next().getPropertyValue(graph, SHEET.cellEditor);
             }
 
                @Override