diff options
Diffstat (limited to 'odk/examples/DevelopersGuide')
7 files changed, 0 insertions, 163 deletions
diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java index 32473a3ce10a..74f53fdaef2c 100644 --- a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java +++ b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java @@ -65,7 +65,6 @@ import com.sun.star.test.XTestDialogHandler; // ComponentBase, see implementation of TestComponentA. public class DialogComponent { - // public static class _DialogComponent extends WeakBase public static class _DialogComponent implements XTypeProvider, XServiceInfo, XTestDialogHandler, XDialogEventHandler { diff --git a/odk/examples/DevelopersGuide/Config/ConfigExamples.java b/odk/examples/DevelopersGuide/Config/ConfigExamples.java index cac019463982..37debea990ff 100644 --- a/odk/examples/DevelopersGuide/Config/ConfigExamples.java +++ b/odk/examples/DevelopersGuide/Config/ConfigExamples.java @@ -863,8 +863,6 @@ public class ConfigExamples String sSampleDataSourceName = "SampleTextDatabase"; String sSampleDataSourceURL = "sdbc:flat:$(userurl)/database/SampleTextDatabase"; - // String sSampleDataSourceURL = "sdbc:flat:file:///usr/local/database/SampleTextDatabase"; - // String sSampleDataSourceURL = "sdbc:flat:file:///C:/data/database/SampleTextDatabase"; com.sun.star.beans.NamedValue [] aSettings = new com.sun.star.beans.NamedValue [2]; aSettings[0] = new com.sun.star.beans.NamedValue("HeaderLine",new Boolean(true)); diff --git a/odk/examples/DevelopersGuide/Database/Sales.java b/odk/examples/DevelopersGuide/Database/Sales.java index c90ae134b3b1..12f68e9f6b45 100644 --- a/odk/examples/DevelopersGuide/Database/Sales.java +++ b/odk/examples/DevelopersGuide/Database/Sales.java @@ -32,7 +32,6 @@ * *************************************************************************/ -// import com.sun.star.bridge.XUnoUrlResolver; import com.sun.star.uno.*; import com.sun.star.util.Date; import com.sun.star.beans.XPropertySet; diff --git a/odk/examples/DevelopersGuide/Database/SalesMan.java b/odk/examples/DevelopersGuide/Database/SalesMan.java index 0eaa3cdab070..5aead056c4c6 100644 --- a/odk/examples/DevelopersGuide/Database/SalesMan.java +++ b/odk/examples/DevelopersGuide/Database/SalesMan.java @@ -32,7 +32,6 @@ * *************************************************************************/ -// import com.sun.star.bridge.XUnoUrlResolver; import com.sun.star.uno.*; import com.sun.star.util.Date; import com.sun.star.sdbc.*; diff --git a/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java b/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java index 0bc329cd26a7..ac8d6430874b 100644 --- a/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java +++ b/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java @@ -161,159 +161,3 @@ public class FirstLoadComponent { } } - - -// import com.sun.star.uno.UnoRuntime; -// import com.sun.star.uno.XComponentContext; -// import com.sun.star.lang.XMultiComponentFactory; -// import com.sun.star.lang.XComponent; -// import com.sun.star.beans.XPropertySet; -// import com.sun.star.beans.PropertyValue; -// import com.sun.star.sheet.XSpreadsheetDocument; -// import com.sun.star.sheet.XSpreadsheets; -// import com.sun.star.sheet.XSpreadsheet; -// import com.sun.star.sheet.XSpreadsheetView; -// import com.sun.star.sheet.XCellRangesQuery; -// import com.sun.star.sheet.XSheetCellRanges; -// import com.sun.star.sheet.XCellAddressable; -// import com.sun.star.table.XCell; -// import com.sun.star.frame.XModel; -// import com.sun.star.frame.XController; -// import com.sun.star.frame.XComponentLoader; -// import com.sun.star.container.XEnumeration; -// import com.sun.star.container.XEnumerationAccess; - -// import com.sun.star.uno.AnyConverter; - -// public class FirstLoadComponent { - -// /** Creates a new instance of FirstLoadComponent */ -// public FirstLoadComponent() { -// } - -// /** -// * @param args the command line arguments -// */ -// private XComponentContext xRemoteContext = null; -// private XMultiComponentFactory xRemoteServiceManager = null; - -// public static void main(String[] args) { -// FirstLoadComponent firstLoadComponent1 = new FirstLoadComponent(); -// try { -// firstLoadComponent1.useConnection(); -// } -// catch (java.lang.Exception e){ -// System.out.println(e.getMessage()); -// e.printStackTrace(); -// } -// finally { -// System.exit(0); -// } -// } - -// private void useConnection() throws java.lang.Exception { -// try { -// // get the remote office component context -// xRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap(); -// System.out.println("Connected to a running office ..."); - -// xRemoteServiceManager = xRemoteContext.getServiceManager(); -// } -// catch( Exception e) { -// e.printStackTrace(); -// System.exit(1); -// } - -// try { -// Object desktop = xRemoteServiceManager.createInstanceWithContext( -// "com.sun.star.frame.Desktop", xRemoteContext); -// XComponentLoader xComponentLoader = (XComponentLoader) -// UnoRuntime.queryInterface(XComponentLoader.class, desktop); - -// PropertyValue[] loadProps = new PropertyValue[0]; -// XComponent xSpreadsheetComponent = xComponentLoader.loadComponentFromURL("private:factory/scalc", "_blank", 0, loadProps); - -// XSpreadsheetDocument xSpreadsheetDocument = (XSpreadsheetDocument) -// UnoRuntime.queryInterface(XSpreadsheetDocument.class, -// xSpreadsheetComponent); - -// XSpreadsheets xSpreadsheets = xSpreadsheetDocument.getSheets(); -// xSpreadsheets.insertNewByName("MySheet", (short)0); -// com.sun.star.uno.Type elemType = xSpreadsheets.getElementType(); - -// System.out.println(elemType.getTypeName()); -// Object sheet = xSpreadsheets.getByName("MySheet"); -// XSpreadsheet xSpreadsheet = (XSpreadsheet)UnoRuntime.queryInterface( -// XSpreadsheet.class, sheet); - -// XCell xCell = xSpreadsheet.getCellByPosition(0, 0); -// xCell.setValue(21); -// xCell = xSpreadsheet.getCellByPosition(0, 1); -// xCell.setValue(21); -// xCell = xSpreadsheet.getCellByPosition(0, 2); -// xCell.setFormula("=sum(A1:A2)"); - -// XPropertySet xCellProps = (XPropertySet)UnoRuntime.queryInterface( -// XPropertySet.class, xCell); -// xCellProps.setPropertyValue("CellStyle", "Result"); - -// XModel xSpreadsheetModel = (XModel)UnoRuntime.queryInterface( -// XModel.class, xSpreadsheetComponent); -// XController xSpreadsheetController = xSpreadsheetModel.getCurrentController(); -// XSpreadsheetView xSpreadsheetView = (XSpreadsheetView) -// UnoRuntime.queryInterface(XSpreadsheetView.class, -// xSpreadsheetController); -// xSpreadsheetView.setActiveSheet(xSpreadsheet); - -// // ********************************************************* -// // example for use of enum types -// xCellProps.setPropertyValue("VertJustify", -// com.sun.star.table.CellVertJustify.TOP); - - -// // ********************************************************* -// // example for a sequence of PropertyValue structs -// // create an array with one PropertyValue struct, it contains -// // references only -// loadProps = new PropertyValue[1]; - -// // instantiate PropertyValue struct and set its member fields -// PropertyValue asTemplate = new PropertyValue(); -// asTemplate.Name = "AsTemplate"; -// asTemplate.Value = new Boolean(true); - -// // assign PropertyValue struct to array of references for PropertyValue -// // structs -// loadProps[0] = asTemplate; - -// // load calc file as template -// //xSpreadsheetComponent = xComponentLoader.loadComponentFromURL( -// // "file:///c:/temp/DataAnalysys.ods", "_blank", 0, loadProps); - -// // ********************************************************* -// // example for use of XEnumerationAccess -// XCellRangesQuery xCellQuery = (XCellRangesQuery) -// UnoRuntime.queryInterface(XCellRangesQuery.class, sheet); -// XSheetCellRanges xFormulaCells = xCellQuery.queryContentCells( -// (short)com.sun.star.sheet.CellFlags.FORMULA); -// XEnumerationAccess xFormulas = xFormulaCells.getCells(); -// XEnumeration xFormulaEnum = xFormulas.createEnumeration(); - -// while (xFormulaEnum.hasMoreElements()) { -// Object formulaCell = xFormulaEnum.nextElement(); -// xCell = (XCell)UnoRuntime.queryInterface(XCell.class, formulaCell); -// XCellAddressable xCellAddress = (XCellAddressable) -// UnoRuntime.queryInterface(XCellAddressable.class, xCell); -// System.out.println("Formula cell in column " + -// xCellAddress.getCellAddress().Column -// + ", row " + xCellAddress.getCellAddress().Row -// + " contains " + xCell.getFormula()); -// } - -// } -// catch( com.sun.star.lang.DisposedException e ) { //works from Patch 1 -// xRemoteContext = null; -// throw e; -// } -// } -// } diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java index a5097b1d0621..10bdcc37f2b8 100644 --- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java +++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java @@ -60,7 +60,6 @@ import com.sun.star.awt.XItemEventBroadcaster; import com.sun.star.awt.XItemListener; import com.sun.star.awt.XKeyListener; import com.sun.star.awt.XListBox; -//import com.sun.star.awt.XMessageBoxFactory; import com.sun.star.awt.XMouseListener; import com.sun.star.awt.XPointer; import com.sun.star.awt.XReschedule; diff --git a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java index 5cc0b4a1ac04..dbdbc8004df2 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java @@ -51,7 +51,6 @@ public class SpreadsheetDocHelper private com.sun.star.uno.XComponentContext mxRemoteContext; private com.sun.star.lang.XMultiComponentFactory mxRemoteServiceManager; -// private com.sun.star.lang.XMultiServiceFactory mxMSFactory; private com.sun.star.sheet.XSpreadsheetDocument mxDocument; |