diff options
Diffstat (limited to 'odk/examples/java/ToDo')
-rw-r--r-- | odk/examples/java/ToDo/ToDo.idl | 4 | ||||
-rw-r--r-- | odk/examples/java/ToDo/ToDo.java | 262 | ||||
-rw-r--r-- | odk/examples/java/ToDo/XToDo.idl | 10 |
3 files changed, 138 insertions, 138 deletions
diff --git a/odk/examples/java/ToDo/ToDo.idl b/odk/examples/java/ToDo/ToDo.idl index 3aa45ccf4448..317671d1bf7e 100644 --- a/odk/examples/java/ToDo/ToDo.idl +++ b/odk/examples/java/ToDo/ToDo.idl @@ -2,7 +2,7 @@ * * The Contents of this file are made available subject to the terms of * the BSD license. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * All rights reserved. * @@ -29,7 +29,7 @@ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * *************************************************************************/ #ifndef INCLUDED_ORG_OPENOFFICE_TODO_IDL diff --git a/odk/examples/java/ToDo/ToDo.java b/odk/examples/java/ToDo/ToDo.java index 87257c406903..df6310b360d3 100644 --- a/odk/examples/java/ToDo/ToDo.java +++ b/odk/examples/java/ToDo/ToDo.java @@ -2,7 +2,7 @@ * * The Contents of this file are made available subject to the terms of * the BSD license. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * All rights reserved. * @@ -29,7 +29,7 @@ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * *************************************************************************/ import com.sun.star.lib.uno.helper.Factory; @@ -78,17 +78,17 @@ import java.util.Arrays; * (<CODE>__writeRegistryServiceInfo</CODE>). */ public class ToDo { - + /** This class implements the component. At least the interfaces * XInterface, XTypeProvider, and XWeak implemented by the helper class * WeakBase and XServiceInfo should be provided by the service. */ public static class ToDoImpl extends WeakBase implements XServiceInfo, XToDo { - + /** The service name, that must be used to get an instance of this service. */ private static final String __serviceName = "org.openoffice.ToDo"; - + /** The initial component contextr, that gives access to * the service manager, supported singletons, ... * It's often later used @@ -110,28 +110,28 @@ public class ToDo { static private final int INT_COLUMN_END_DAY_OF_WEEK = 6; static private final int INT_COLUMN_DUEDATE = 7; static private final int INT_COLUMN_STATUS = 8; - + static private final int INT_ROW_FROM = 14; // 8 - + static private final int INT_ROW_HOLIDAYS_START = 4; static private final int INT_COLUMN_HOLIDAYS_START = 7; // 10 - + static private final String STRING_SEPARATOR = "/"; - + /** The constructor of the inner class has a XComponenContext parameter. * @param xCompContext the initial component context */ public ToDoImpl(XComponentContext xCompContext) { try { m_cmpCtx = xCompContext; - m_xMCF = m_cmpCtx.getServiceManager(); + m_xMCF = m_cmpCtx.getServiceManager(); } catch( Exception e ) { e.printStackTrace(System.err); } } - + /** This method returns an array of all supported service names. * @return Array of supported service names. */ @@ -142,8 +142,8 @@ public class ToDo { public static String[] getServiceNames() { String[] sSupportedServiceNames = { __serviceName }; return sSupportedServiceNames; - } - + } + /** This method returns true, if the given service will be * supported by the component. * @param sService Service name. @@ -152,14 +152,14 @@ public class ToDo { public boolean supportsService(String sServiceName) { return sServiceName.equals( __serviceName ); } - + /** Return the class name of the component. * @return Class name of the component. */ public String getImplementationName() { return ToDoImpl.class.getName(); } - + /** For every bug/feature listed in a spreadsheet document this method * calculates the start date, day of week of the start date, the end date * and the day of week of the end date. All calculations are dependent @@ -181,74 +181,74 @@ public class ToDo { XSpreadsheetDocument xspreadsheetdocument = ( XSpreadsheetDocument ) UnoRuntime.queryInterface( XSpreadsheetDocument.class, aInstance ); - + // Querying for the interface XIndexAccess XIndexAccess xindexaccess = ( XIndexAccess ) UnoRuntime.queryInterface( XIndexAccess.class, xspreadsheetdocument.getSheets() ); - + // Getting the first XSpreadsheet XSpreadsheet xspreadsheet = (XSpreadsheet)UnoRuntime.queryInterface( XSpreadsheet.class, xindexaccess.getByIndex( 0 )); - + // Querying for the interface XCellRange on the XSpeadsheet XCellRange xcellrange = ( XCellRange ) UnoRuntime.queryInterface( XCellRange.class, xspreadsheet ); - + /* Getting the gregorian calendar with the date on which to start the calculation */ GregorianCalendar gregCalAbsoluteStartDate = this.getGregorianCalendarFromString(this.getStringFromCell( xcellrange, 5, 2 ) ); gregCalAbsoluteStartDate.add( Calendar.DATE, -1 ); - + // Set the start date with the absolute start date GregorianCalendar gregCalStartDate = (GregorianCalendar) gregCalAbsoluteStartDate.clone(); - + /* Creating the service FunctionAccess, which allows generic access to all spreadsheet functions */ Object objectFunctionAccess = m_xMCF.createInstanceWithContext( "com.sun.star.sheet.FunctionAccess", m_cmpCtx ); - + // Querying for the interface XFunctionAccess on service // FunctionAccess XFunctionAccess xfunctionaccess = (XFunctionAccess) UnoRuntime.queryInterface(XFunctionAccess.class, objectFunctionAccess ); - + // Creating vector for holidays Vector vectorHolidays = new Vector(); - + // Get the Official Holidays this.getOfficialHolidays( vectorHolidays, xcellrange, xfunctionaccess, gregCalStartDate.get( Calendar.YEAR ) ); - + // Get the private holidays this.getPrivateHolidays(vectorHolidays, xcellrange, xfunctionaccess); - + // Getting the object array of holidays Object[] objectSortedHolidays = vectorHolidays.toArray(); - + // Sorting the holidays Arrays.sort( objectSortedHolidays ); - + // Collect the Official Holidays and the private holidays Object [][]objectHolidays = new Object[][] { objectSortedHolidays }; - + // Row index int intRowTo = this.INT_ROW_FROM - 1; - + // Getting the feature of the first cell String sFeature = this.getStringFromCell(xcellrange, intRowTo + 1, this.INT_COLUMN_FEATURE); - + // Determine the last row with an entry in the first column while ( ( sFeature != null ) && ( !sFeature.equals( "" ) ) ) { @@ -256,10 +256,10 @@ public class ToDo { sFeature = this.getStringFromCell( xcellrange, intRowTo + 1, this.INT_COLUMN_FEATURE ); } - + // Setting the last row to be calculated final int INT_ROW_TO = intRowTo + 1; - + // Deleting cells which will be recalculated for ( int intRow = this.INT_ROW_FROM; intRow < INT_ROW_TO + 5; intRow++ ) { @@ -269,11 +269,11 @@ public class ToDo { this.setStringToCell(xcellrange, intRow, intColumn, ""); } } - + /* Clearing the background color of the due date cells and setting the hyperlink to the bugtracker */ for (int intRow = this.INT_ROW_FROM; intRow < INT_ROW_TO; intRow++) - { + { // Querying for the interface XPropertySet for the cell // providing the due date XPropertySet xpropertyset = ( XPropertySet ) @@ -281,73 +281,73 @@ public class ToDo { xcellrange.getCellByPosition( this.INT_COLUMN_DUEDATE, intRow )); - + // Changing the background color of the cell to white xpropertyset.setPropertyValue( "CellBackColor", new Integer( 16777215 ) ); - + // Getting the cell of the bug id XCell xcell = xcellrange.getCellByPosition( this.INT_COLUMN_FEATURE, intRow ); - + // Querying for the interface XSimpleText XSimpleText xsimpletext = ( XSimpleText ) UnoRuntime.queryInterface( XSimpleText.class, xcell ); - + // Getting the text cursor XTextCursor xtextcursor = xsimpletext.createTextCursor(); - + // Querying for the interface XTextRange XTextRange xtextrange = ( XTextRange ) UnoRuntime.queryInterface( XTextRange.class, xtextcursor ); - + // Getting the bug ID from the cell - String sBugID = xtextrange.getString(); + String sBugID = xtextrange.getString(); if ( !sBugID.startsWith( "http://www.openoffice.org/issues/show_bug.cgi?id=") ) { String sBugIDLink = "http://www.openoffice.org/issues/show_bug.cgi?id=" + sBugID; - + // Querying for the interface XMultiServiceFactory XMultiServiceFactory xMSFTextField = (XMultiServiceFactory)UnoRuntime.queryInterface( XMultiServiceFactory.class, aInstance ); - + // Creating an instance of the text field URL Object objectTextField = xMSFTextField.createInstance( "com.sun.star.text.TextField.URL" ); - + // Querying for the interface XTextField XTextField xtextfield = ( XTextField ) UnoRuntime.queryInterface( XTextField.class, objectTextField ); - + // Querying for the interface XPropertySet XPropertySet xpropertysetTextField = ( XPropertySet ) UnoRuntime.queryInterface( XPropertySet.class, xtextfield ); - + // Setting the URL xpropertysetTextField.setPropertyValue( "URL", sBugIDLink ); - + // Setting the representation of the URL xpropertysetTextField.setPropertyValue( "Representation", sBugID ); - + // Querying for the interface XText XText xtext = ( XText )UnoRuntime.queryInterface( XText.class, xcell ); - + // Delete cell content xtextrange.setString( "" ); - + // Inserting the text field URL to the cell xtext.insertTextContent( xtextrange, xtextfield, false ); } } - + // Processing all features/bugs in the table for (int intRow = this.INT_ROW_FROM; intRow < INT_ROW_TO; intRow++) { @@ -358,11 +358,11 @@ public class ToDo { // Getting the number of needed days to perform the feature int intNeededDays = (int) Math.round( xcell.getValue() ); - + // Getting the content of a specified cell String sStatus = this.getStringFromCell( xcellrange, intRow, this.INT_COLUMN_STATUS ); - + /* Testing if the number of needed days is greater than zero and if the status is not "done" */ @@ -373,54 +373,54 @@ public class ToDo { gregCalStartDate = this.getWorkday( gregCalStartDate, 1, objectHolidays, xfunctionaccess ); - + // Getting a string with the date format jjjj-mm-dd from // the gregorian calendar String sDate = this.getStringFromGregorianCalendar( gregCalStartDate ); - + // Set the start date in the specified cell of the table this.setStringToCell(xcellrange, intRow, this.INT_COLUMN_STARTDATE, sDate); - + // For the start day set the day of week in the specified // cell of the table this.setDayOfWeek( gregCalStartDate, xcellrange, intRow, this.INT_COLUMN_START_DAY_OF_WEEK ); - + // Getting the end date after a specified number of workdays GregorianCalendar gregCalEndDate = this.getWorkday( gregCalStartDate, intNeededDays - 1, objectHolidays, xfunctionaccess ); - + // Creating a string with the date format jjjj-mm-dd sDate = this.getStringFromGregorianCalendar( gregCalEndDate ); - + // Set the end date in the specified cell of the table this.setStringToCell( xcellrange, intRow, this.INT_COLUMN_ENDDATE, sDate ); - + // For the end day set the day of week in the specified // cell of the table this.setDayOfWeek(gregCalEndDate, xcellrange, intRow, this.INT_COLUMN_END_DAY_OF_WEEK); - + // Set the initial date for the next loop gregCalStartDate = ( GregorianCalendar ) gregCalEndDate.clone(); - + // Get the due date from the table String sDueDate = this.getStringFromCell( xcellrange, intRow, this.INT_COLUMN_DUEDATE ); - + // Testing if the due date is not empty if ( !sDueDate.equals( "" ) ) { GregorianCalendar gregCalDueDate = this.getGregorianCalendarFromString(sDueDate); - + // Testing if the due date is before the calculated // end date if ( gregCalDueDate.before( @@ -433,10 +433,10 @@ public class ToDo { -( intNeededDays - 1 ), objectHolidays, xfunctionaccess); - + // Begin with the current row int intRowToInsert = intRow; - + // Get the start date for the feature/bug in the // current row GregorianCalendar gregCalPreviousStartDate = @@ -444,7 +444,7 @@ public class ToDo { this.getStringFromCell( xcellrange, intRowToInsert, this.INT_COLUMN_STARTDATE ) ); - + // Testing if we have to search for an earlier date // to begin while ((gregCalLatestDateToStart.before( @@ -452,32 +452,32 @@ public class ToDo { (INT_ROW_FROM != intRowToInsert)) { // Decrease the row intRowToInsert--; - + // Get the start date for the feature/bug in // the current row String sStartDate = this.getStringFromCell( xcellrange, intRowToInsert, this.INT_COLUMN_STARTDATE ); - + // Search until a valid start date is found while ( sStartDate.equals( "" ) ) { // Decrease the row intRowToInsert--; - + // Get the start date for the feature/bug // in the current row sStartDate = this.getStringFromCell( xcellrange, intRowToInsert, this.INT_COLUMN_STARTDATE ); } - + // Get the GregorianCalender format for the // start date gregCalPreviousStartDate = this.getGregorianCalendarFromString( sStartDate ); } - + // Getting the cell of the column "Needed Days" // in the row where to insert XCell xcellNeededDaysWhereToInsert = @@ -488,25 +488,25 @@ public class ToDo { int intNeededDaysWhereToInsert = (int) Math.round( xcellNeededDaysWhereToInsert.getValue()); - + GregorianCalendar gregCalPreviousNewEndDate = this.getWorkday(gregCalPreviousStartDate, intNeededDays - 1 + intNeededDaysWhereToInsert, objectHolidays, - xfunctionaccess); + xfunctionaccess); String sPreviousDueDate = this.getStringFromCell( xcellrange, intRowToInsert, this.INT_COLUMN_DUEDATE ); - + GregorianCalendar gregCalPreviousDueDate = null; - + if ( !sPreviousDueDate.equals( "" ) ) { gregCalPreviousDueDate = this.getGregorianCalendarFromString( sPreviousDueDate ); } - + if ( ( intRowToInsert == intRow ) || ( gregCalPreviousNewEndDate.after( gregCalPreviousDueDate ) ) ) { @@ -518,7 +518,7 @@ public class ToDo { xcellrange.getCellByPosition( this.INT_COLUMN_DUEDATE, intRow ) ); - + // Changing the background color of the cell // to red xpropertyset.setPropertyValue( @@ -533,19 +533,19 @@ public class ToDo { XTableRows xTableRows = xcolumnrowrange.getRows(); xTableRows.insertByIndex( intRowToInsert, 1 ); - + // Querying for the interface // XCellRangeMovement on XCellRange XCellRangeMovement xcellrangemovement = (XCellRangeMovement)UnoRuntime.queryInterface( XCellRangeMovement.class, xcellrange ); - + // Creating the cell address of the destination CellAddress celladdress = new CellAddress(); celladdress.Sheet = 0; celladdress.Column = 0; celladdress.Row = intRowToInsert; - + // Creating the cell range of the source CellRangeAddress cellrangeaddress = new CellRangeAddress(); @@ -554,20 +554,20 @@ public class ToDo { cellrangeaddress.StartRow = intRow + 1; cellrangeaddress.EndColumn = 8; cellrangeaddress.EndRow = intRow + 1; - + // Moves the cell range to another position in // the document xcellrangemovement.moveRange(celladdress, cellrangeaddress); - + // Removing the row not needed anymore xcolumnrowrange.getRows().removeByIndex(intRow + 1, 1); - + // Set the current row, because we want to // recalculate all rows below intRow = intRowToInsert - 1; - + // Tests at which line we want to insert if ( intRow >= this.INT_ROW_FROM ) { // Get the start date @@ -591,8 +591,8 @@ public class ToDo { catch( Exception exception ) { showExceptionMessage( exception ); } - } - + } + /** Getting a string from a gregorian calendar. * @param gregCal Date to be converted. * @return string (converted gregorian calendar). @@ -602,45 +602,45 @@ public class ToDo { + STRING_SEPARATOR + gregCal.get( Calendar.DATE ) // + STRING_SEPARATOR + ( gregCal.get( Calendar.MONTH ) + 1 ) + STRING_SEPARATOR + gregCal.get( Calendar.YEAR ); - + return sDate; } - + /** Getting a GregorianCalendar from a string. * @param sDate String to be converted. * @return The result of the converting of the string. */ public GregorianCalendar getGregorianCalendarFromString( String sDate ) { int []intDateValue = this.getDateValuesFromString( sDate ); - + return( new GregorianCalendar( intDateValue[ 2 ], intDateValue[ 0 ], intDateValue[ 1 ] ) ); } - + /** Getting the day, month and year from a string. * @param sDate String to be parsed. * @return Returns an array of integer variables. */ public int[] getDateValuesFromString( String sDate) { int[] intDateValues = new int[ 3 ]; - + int intPositionFirstTag = sDate.indexOf( STRING_SEPARATOR ); int intPositionSecondTag = sDate.indexOf(STRING_SEPARATOR, intPositionFirstTag + 1); - + // Getting the value of the month intDateValues[ 0 ] = Integer.parseInt( sDate.substring(0, intPositionFirstTag)) - 1; // Getting the value of the day intDateValues[ 1 ] = Integer.parseInt( - sDate.substring(intPositionFirstTag + 1, intPositionSecondTag)); + sDate.substring(intPositionFirstTag + 1, intPositionSecondTag)); // Getting the value of the year intDateValues[ 2 ] = Integer.parseInt( sDate.substring(intPositionSecondTag + 1, sDate.length())); - + return intDateValues; } - + /** Getting a content from a specified cell. * @param xcellrange Providing access to cells. * @param intRow Number of row. @@ -650,7 +650,7 @@ public class ToDo { public String getStringFromCell( XCellRange xcellrange, int intRow, int intColumn ) { XTextRange xtextrangeStartDate = null; - + try { // Getting the cell holding the information about the start date XCell xcellStartDate = xcellrange.getCellByPosition(intColumn, @@ -662,11 +662,11 @@ public class ToDo { catch( Exception exception ) { this.showExceptionMessage( exception ); } - + // Getting the start date return xtextrangeStartDate.getString().trim(); } - + /** Writing a specified string to a specified cell. * @param xcellrange Providing access to the cells. * @param intRow Number of row. @@ -689,7 +689,7 @@ public class ToDo { this.showExceptionMessage( exception ); } } - + /** Calculates the week of day and calls the method "setStringToCell". * @param gregCal Day to be written to the cell. * @param xcellrange Providing access to the cells. @@ -712,11 +712,11 @@ public class ToDo { } else if ( intDayOfWeek == Calendar.FRIDAY ) { sDayOfWeek = "FRI"; } - + this.setStringToCell( xcellrange, intRow, intColumn, sDayOfWeek ); } - + /** Calculates the dates of the official holidays with help of Calc * functions. * @param vectorHolidays Holding all holidays. @@ -738,15 +738,15 @@ public class ToDo { intNumberOfYear <= ( intHowManyYears - 1 ); intNumberOfYear++ ) { intYear += intNumberOfYear; - + // Getting the Easter sunday Double dEasterSunday = ( Double ) xfunctionaccess.callFunction( "EASTERSUNDAY", new Object[] { new Integer(intYear) }); - + int intEasterSunday = (int)Math.round( dEasterSunday.doubleValue()); - + // New-year vectorHolidays.addElement( xfunctionaccess.callFunction( "DATE", @@ -754,15 +754,15 @@ public class ToDo { new Integer( intYear ), new Integer( 1 ), new Integer( 1 ) } )); - + // Good Friday vectorHolidays.addElement( new Double( intEasterSunday - 2 ) ); - + // Easter monday vectorHolidays.addElement( new Double( intEasterSunday + 1 ) ); - + // Labour Day vectorHolidays.addElement( xfunctionaccess.callFunction( "DATE", @@ -770,13 +770,13 @@ public class ToDo { new Integer( intYear ), new Integer( 5 ), new Integer( 1 ) } )); - + // Ascension Day vectorHolidays.addElement(new Double(intEasterSunday + 39 )); - + // Pentecost monday vectorHolidays.addElement(new Double(intEasterSunday + 50 )); - + // German Unification vectorHolidays.addElement( xfunctionaccess.callFunction( "DATE", @@ -784,7 +784,7 @@ public class ToDo { new Integer( intYear ), new Integer( 10 ), new Integer( 3 ) } )); - + // Christmas Day First vectorHolidays.addElement( xfunctionaccess.callFunction( "DATE", @@ -792,7 +792,7 @@ public class ToDo { new Integer( intYear ), new Integer( 12 ), new Integer( 25 ) } )); - + // Christmas Day Second vectorHolidays.addElement( xfunctionaccess.callFunction( "DATE", @@ -806,7 +806,7 @@ public class ToDo { this.showExceptionMessage( exception ); } } - + /** Returns the serial number of the date before or after a specified * number of workdays. * @param gregCalStartDate Date to start with the calculation. @@ -821,7 +821,7 @@ public class ToDo { int intDays, Object[][] objectHolidays, XFunctionAccess xfunctionaccess ) { GregorianCalendar gregCalWorkday = null; - + try { // Getting the value of the start date Double dDate = ( Double ) xfunctionaccess.callFunction( @@ -831,18 +831,18 @@ public class ToDo { new Integer( gregCalStartDate.get( Calendar.MONTH ) + 1 ), new Integer( gregCalStartDate.get( Calendar.DATE ) ) } ); - + Double dWorkday = ( Double ) xfunctionaccess.callFunction( "com.sun.star.sheet.addin.Analysis.getWorkday", new Object[] { dDate, new Integer( intDays ), objectHolidays } ); - + Double dYear = ( Double ) xfunctionaccess.callFunction( "YEAR", new Object[] { dWorkday } ); Double dMonth = ( Double ) xfunctionaccess.callFunction( "MONTH", new Object[] { dWorkday } ); Double dDay = ( Double ) xfunctionaccess.callFunction( "DAY", new Object[] { dWorkday } ); - + gregCalWorkday = new GregorianCalendar( dYear.intValue(), dMonth.intValue() - 1, @@ -851,10 +851,10 @@ public class ToDo { catch( Exception exception ) { this.showExceptionMessage( exception ); } - + return gregCalWorkday; } - + /** Getting the holidays from the spreadsheet. * @param vectorHolidays Holding all holidays. * @param xcellrange Providing the cells. @@ -866,13 +866,13 @@ public class ToDo { try { int intRow = this.INT_ROW_HOLIDAYS_START; int intColumn = this.INT_COLUMN_HOLIDAYS_START; - + double dHolidayStart = xcellrange.getCellByPosition( intColumn, intRow ).getValue(); - + double dHolidayEnd = xcellrange.getCellByPosition( intColumn + 1, intRow ).getValue(); - + while ( dHolidayStart != 0 ) { if ( dHolidayEnd == 0 ) { vectorHolidays.addElement( @@ -887,7 +887,7 @@ public class ToDo { vectorHolidays.addElement( new Double( intHoliday ) ); } } - + intRow++; dHolidayStart = xcellrange.getCellByPosition( intColumn, intRow).getValue(); @@ -899,7 +899,7 @@ public class ToDo { this.showExceptionMessage( exception ); } } - + /** Showing the stack trace in a JOptionPane. * @param sMessage The message to show. */ @@ -913,7 +913,7 @@ public class ToDo { javax.swing.JOptionPane.INFORMATION_MESSAGE); jframe.dispose(); } - + /** Writing the stack trace from an exception to a string and calling * the method showMessage() with this string. * @param exception The occured exception. @@ -926,9 +926,9 @@ public class ToDo { exception.printStackTrace( printwriter); System.err.println( exception ); this.showMessage( swriter.getBuffer().substring(0) ); - } + } } - + /** * Gives a factory for creating the service. * This method is called by the <code>JavaLoader</code> @@ -941,11 +941,11 @@ public class ToDo { */ public static XSingleComponentFactory __getComponentFactory(String sImplName) { XSingleComponentFactory xFactory = null; - + if ( sImplName.equals( ToDoImpl.class.getName() ) ) xFactory = Factory.createComponentFactory(ToDoImpl.class, ToDoImpl.getServiceNames()); - + return xFactory; } diff --git a/odk/examples/java/ToDo/XToDo.idl b/odk/examples/java/ToDo/XToDo.idl index 5cae425c4ea0..10d592f77aad 100644 --- a/odk/examples/java/ToDo/XToDo.idl +++ b/odk/examples/java/ToDo/XToDo.idl @@ -2,7 +2,7 @@ * * The Contents of this file are made available subject to the terms of * the BSD license. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * All rights reserved. * @@ -29,7 +29,7 @@ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * *************************************************************************/ #ifndef INCLUDED_ORG_OPENOFFICE_XTODO_IDL @@ -40,10 +40,10 @@ module org { /// openoffice module openoffice { - /// example interface + /// example interface interface XToDo { - void recalc( [in] any aInstance ); - }; + void recalc( [in] any aInstance ); + }; }; }; |