CalcTools.java (ef39d40d) | CalcTools.java (bb6af6bc) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 25 unchanged lines hidden (view full) --- 34import com.sun.star.sheet.XSpreadsheets; 35import com.sun.star.table.XCellRange; 36import com.sun.star.uno.AnyConverter; 37import com.sun.star.uno.Exception; 38import com.sun.star.uno.Type; 39import com.sun.star.uno.UnoRuntime; 40 41/** | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 25 unchanged lines hidden (view full) --- 34import com.sun.star.sheet.XSpreadsheets; 35import com.sun.star.table.XCellRange; 36import com.sun.star.uno.AnyConverter; 37import com.sun.star.uno.Exception; 38import com.sun.star.uno.Type; 39import com.sun.star.uno.UnoRuntime; 40 41/** |
42 * This class contains some usefull mathods to handle Calc documents | 42 * This class contains some useful mathods to handle Calc documents |
43 * and its sheets. 44 */ 45public class CalcTools { 46 47 /** 48 * fills a range of a calc sheet with computed data of type 49 * <CODE>Double</CODE>. | 43 * and its sheets. 44 */ 45public class CalcTools { 46 47 /** 48 * fills a range of a calc sheet with computed data of type 49 * <CODE>Double</CODE>. |
50 * @param xSheetDoc the Clac documents wich should be filled | 50 * @param xSheetDoc the Clac documents which should be filled |
51 * @param sheetNumber the number of the sheet of <CODE>xSheetDoc</CODE> 52 * @param startCellX the cell number of the X start point (row) of the range to fill 53 * @param startCellY the cell number of the Y start point (column) of the range to fill 54 * @param rangeLengthX the size of the range expansion in X-direction 55 * @param rangeLengthY the size of the range expansion in Y-direction 56 * @throws java.lang.Exception on any error an <CODE>java.lang.Exception</CODE> was thrown 57 */ 58 public static void fillCalcSheetWithContent(XComponent xSheetDoc, int sheetNumber, --- 48 unchanged lines hidden (view full) --- 107 throw new Exception( 108 "Couldn't fill CalcSheet with content: " + e.toString()); 109 } 110 } 111 112 /** 113 * 114 * returns an <CODE>XSpreadsheet</CODE> from a Calc document. | 51 * @param sheetNumber the number of the sheet of <CODE>xSheetDoc</CODE> 52 * @param startCellX the cell number of the X start point (row) of the range to fill 53 * @param startCellY the cell number of the Y start point (column) of the range to fill 54 * @param rangeLengthX the size of the range expansion in X-direction 55 * @param rangeLengthY the size of the range expansion in Y-direction 56 * @throws java.lang.Exception on any error an <CODE>java.lang.Exception</CODE> was thrown 57 */ 58 public static void fillCalcSheetWithContent(XComponent xSheetDoc, int sheetNumber, --- 48 unchanged lines hidden (view full) --- 107 throw new Exception( 108 "Couldn't fill CalcSheet with content: " + e.toString()); 109 } 110 } 111 112 /** 113 * 114 * returns an <CODE>XSpreadsheet</CODE> from a Calc document. |
115 * @param xSheetDoc the Calc docuent which containes the sheet | 115 * @param xSheetDoc the Calc docuent which contains the sheet |
116 * @param sheetNumber the number of the sheet to return 117 * @throws java.lang.Exception on any error an <CODE>java.lang.Exception</CODE> was thrown 118 * @return calc sheet 119 * @see com.sun.star.sheet.XSpreadsheet 120 */ 121 public static XSpreadsheet getSpreadSheetFromSheetDoc(XComponent xSheetDoc, int sheetNumber) 122 throws java.lang.Exception { 123 --- 32 unchanged lines hidden --- | 116 * @param sheetNumber the number of the sheet to return 117 * @throws java.lang.Exception on any error an <CODE>java.lang.Exception</CODE> was thrown 118 * @return calc sheet 119 * @see com.sun.star.sheet.XSpreadsheet 120 */ 121 public static XSpreadsheet getSpreadSheetFromSheetDoc(XComponent xSheetDoc, int sheetNumber) 122 throws java.lang.Exception { 123 --- 32 unchanged lines hidden --- |