]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.spreadsheet.ui/src/org/simantics/spreadsheet/ui/ExcelAdapter.java
Adopt spreadsheet changes made in Balas development
[simantics/platform.git] / bundles / org.simantics.spreadsheet.ui / src / org / simantics / spreadsheet / ui / ExcelAdapter.java
index b21a22500eddf2898fdee4febf1f6ecb6f22b559..f39e92c7a42613d555ae13445bfafe0066b8c6e8 100644 (file)
@@ -24,10 +24,11 @@ import org.simantics.databoard.binding.mutable.MutableVariant;
 import org.simantics.databoard.binding.mutable.Variant;
 import org.simantics.spreadsheet.Adaptable;
 import org.simantics.spreadsheet.CellEditor;
-import org.simantics.spreadsheet.CellEditor.Transaction;
-import org.simantics.spreadsheet.ClientModel.OperationMode;
 import org.simantics.spreadsheet.ClientModel;
+import org.simantics.spreadsheet.OperationMode;
 import org.simantics.spreadsheet.Range;
+import org.simantics.spreadsheet.Spreadsheets;
+import org.simantics.spreadsheet.Transaction;
 import org.simantics.spreadsheet.common.cell.StringCellParser;
 import org.simantics.spreadsheet.util.SpreadsheetUtils;
 import org.simantics.utils.threads.logger.ITask;
@@ -196,7 +197,7 @@ public class ExcelAdapter implements ActionListener {
 
                                                        CellValue cell = (CellValue)table.getValueAt(startRow+i, startCol+j);
                                                        if(cell.label != null) {
-                                                               String location = SpreadsheetUtils.cellName(startRow+i, startCol+j);
+                                                               String location = Spreadsheets.cellName(startRow+i, startCol+j);
                                                                Boolean computed = model.getPropertyAt(location, ClientModel.COMPUTED);
                                                                if(computed != null && computed) return;
                                                                removals.add(location);
@@ -221,9 +222,9 @@ public class ExcelAdapter implements ActionListener {
                                                                startCol+j< table.getColumnCount()) {
 
                                                        if (value.startsWith("=")) {
-                                                               editor.edit(tr, SpreadsheetUtils.cellName(startRow+i, startCol+j), ClientModel.CONTENT_EXPRESSION, value, Bindings.STRING, null);
+                                                               editor.edit(tr, Spreadsheets.cellName(startRow+i, startCol+j), ClientModel.CONTENT_EXPRESSION, value, Bindings.STRING, null);
                                                        } else {
-                                                               editor.edit(tr, SpreadsheetUtils.cellName(startRow+i, startCol+j), Variant.ofInstance(value), null);
+                                                               editor.edit(tr, Spreadsheets.cellName(startRow+i, startCol+j), Variant.ofInstance(value), null);
                                                        }
 
                                                }
@@ -243,8 +244,8 @@ public class ExcelAdapter implements ActionListener {
 
                                for(int i=0;i<from.height();i++) {
                                        for(int j=0;j<from.width();j++) {
-                                               String fromCell = SpreadsheetUtils.cellName(from.startRow+i, from.startColumn+j);
-                                               String toCell = SpreadsheetUtils.cellName(to.startRow+i, to.startColumn+j);
+                                               String fromCell = Spreadsheets.cellName(from.startRow+i, from.startColumn+j);
+                                               String toCell = Spreadsheets.cellName(to.startRow+i, to.startColumn+j);
                                                Object obj = model.getPropertyAt(fromCell, "content");
                                                if (obj == null)
                                                    continue;