diff options
Diffstat (limited to 'odk/examples/DevelopersGuide')
69 files changed, 374 insertions, 374 deletions
diff --git a/odk/examples/DevelopersGuide/Charts/CalcHelper.java b/odk/examples/DevelopersGuide/Charts/CalcHelper.java index ade201ccd297..5d8a80061181 100644 --- a/odk/examples/DevelopersGuide/Charts/CalcHelper.java +++ b/odk/examples/DevelopersGuide/Charts/CalcHelper.java @@ -70,7 +70,7 @@ public class CalcHelper initSpreadSheet(); } - // ____________________ + public XSpreadsheet getChartSheet() throws RuntimeException { @@ -93,7 +93,7 @@ public class CalcHelper return aSheet; } - // ____________________ + public XSpreadsheet getDataSheet() throws RuntimeException { @@ -119,7 +119,7 @@ public class CalcHelper return aSheet; } - // ____________________ + /** Insert a chart using the given name as name of the OLE object and the range as correspoding range of data to be used for rendering. The chart is placed in the sheet for charts at @@ -197,7 +197,7 @@ public class CalcHelper return aResult; } - // ____________________ + /** Fill a rectangular range with random numbers. The first column has increasing values @@ -263,7 +263,7 @@ public class CalcHelper return aRange; } - // ____________________ + public XCellRange insertFormulaRange( int nColumnCount, int nRowCount ) { @@ -323,7 +323,7 @@ public class CalcHelper return aRange; } - // ____________________ + /** Bring the sheet containing charts visually to the foreground */ @@ -345,7 +345,7 @@ public class CalcHelper private XSpreadsheetDocument maSpreadSheetDoc; - // ____________________ + /** create two sheets, one for data and one for charts in the document */ diff --git a/odk/examples/DevelopersGuide/Charts/ChartInCalc.java b/odk/examples/DevelopersGuide/Charts/ChartInCalc.java index 62042b95b5b7..4192f866a6f2 100644 --- a/odk/examples/DevelopersGuide/Charts/ChartInCalc.java +++ b/odk/examples/DevelopersGuide/Charts/ChartInCalc.java @@ -70,7 +70,7 @@ import com.sun.star.util.MalformedNumberFormatException; public class ChartInCalc { - // ____________________ + public static void main( String args[] ) { @@ -137,7 +137,7 @@ public class ChartInCalc } - // ________________________________________ + public ChartInCalc( XChartDocument aChartDoc ) { @@ -145,7 +145,7 @@ public class ChartInCalc maDiagram = maChartDocument.getDiagram(); } - // ____________________ + public void lockControllers() throws RuntimeException @@ -153,7 +153,7 @@ public class ChartInCalc UnoRuntime.queryInterface( XModel.class, maChartDocument ).lockControllers(); } - // ____________________ + public void unlockControllers() throws RuntimeException @@ -161,7 +161,7 @@ public class ChartInCalc UnoRuntime.queryInterface( XModel.class, maChartDocument ).unlockControllers(); } - // ____________________ + public void testDiagram() throws RuntimeException, UnknownPropertyException, PropertyVetoException, @@ -180,7 +180,7 @@ public class ChartInCalc } } - // ____________________ + public void testDataRowProperties() throws RuntimeException, UnknownPropertyException, PropertyVetoException, @@ -225,7 +225,7 @@ public class ChartInCalc } } - // ____________________ + public void testDataPointProperties() throws RuntimeException, UnknownPropertyException, PropertyVetoException, @@ -271,7 +271,7 @@ public class ChartInCalc } } - // ____________________ + public void testArea() throws RuntimeException, UnknownPropertyException, PropertyVetoException, @@ -287,7 +287,7 @@ public class ChartInCalc } } - // ____________________ + public void testWall() throws RuntimeException, UnknownPropertyException, PropertyVetoException, @@ -301,7 +301,7 @@ public class ChartInCalc aWall.setPropertyValue( "FillColor", new Integer( 0xcccccc )); } - // ____________________ + public void testTitle() throws RuntimeException, UnknownPropertyException, PropertyVetoException, @@ -336,7 +336,7 @@ public class ChartInCalc } } - // ____________________ + public void testAxis() throws RuntimeException, UnknownPropertyException, PropertyVetoException, @@ -376,7 +376,7 @@ public class ChartInCalc } } - // ____________________ + public void testGrid() throws RuntimeException, UnknownPropertyException, PropertyVetoException, @@ -406,10 +406,10 @@ public class ChartInCalc } - // ______________________________ - // + + // private members - // ______________________________ + private XChartDocument maChartDocument; private XDiagram maDiagram; diff --git a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java b/odk/examples/DevelopersGuide/Charts/ChartInDraw.java index f7fbb2cff263..ae1bd973f8be 100644 --- a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java +++ b/odk/examples/DevelopersGuide/Charts/ChartInDraw.java @@ -60,7 +60,7 @@ import com.sun.star.beans.UnknownPropertyException; public class ChartInDraw { - // ____________________ + public static void main( String args[] ) { @@ -108,7 +108,7 @@ public class ChartInDraw } - // ________________________________________ + public ChartInDraw( XChartDocument aChartDoc ) { @@ -116,7 +116,7 @@ public class ChartInDraw maDiagram = maChartDocument.getDiagram(); } - // ____________________ + public void lockControllers() throws RuntimeException @@ -124,7 +124,7 @@ public class ChartInDraw UnoRuntime.queryInterface( XModel.class, maChartDocument ).lockControllers(); } - // ____________________ + public void unlockControllers() throws RuntimeException @@ -132,7 +132,7 @@ public class ChartInDraw UnoRuntime.queryInterface( XModel.class, maChartDocument ).unlockControllers(); } - // ____________________ + public void testArea() throws RuntimeException, UnknownPropertyException, PropertyVetoException, @@ -148,7 +148,7 @@ public class ChartInDraw } } - // ____________________ + public void testWall() throws RuntimeException, UnknownPropertyException, PropertyVetoException, @@ -162,7 +162,7 @@ public class ChartInDraw aWall.setPropertyValue( "FillStyle", FillStyle.SOLID ); } - // ____________________ + public void testTitle() throws RuntimeException, UnknownPropertyException, PropertyVetoException, @@ -183,7 +183,7 @@ public class ChartInDraw } } - // ____________________ + public void testLegend() throws RuntimeException, UnknownPropertyException, PropertyVetoException, @@ -197,7 +197,7 @@ public class ChartInDraw aLegendProp.setPropertyValue( "FillColor", new Integer( 0xeeddee )); } - // ____________________ + public void testThreeD() throws RuntimeException, UnknownPropertyException, PropertyVetoException, @@ -283,10 +283,10 @@ public class ChartInDraw aDiaProp.setPropertyValue( "D3DSceneLightOn1", new Boolean( true )); } - // ______________________________ - // + + // private members - // ______________________________ + private XChartDocument maChartDocument; private XDiagram maDiagram; diff --git a/odk/examples/DevelopersGuide/Charts/ChartInWriter.java b/odk/examples/DevelopersGuide/Charts/ChartInWriter.java index 6506cb92f32e..34678a1eccad 100644 --- a/odk/examples/DevelopersGuide/Charts/ChartInWriter.java +++ b/odk/examples/DevelopersGuide/Charts/ChartInWriter.java @@ -66,7 +66,7 @@ import com.sun.star.beans.UnknownPropertyException; */ public class ChartInWriter { - // ____________________ + public static void main( String args[] ) { @@ -113,7 +113,7 @@ public class ChartInWriter } - // ________________________________________ + public ChartInWriter( XChartDocument aChartDoc ) { @@ -121,7 +121,7 @@ public class ChartInWriter maDiagram = maChartDocument.getDiagram(); } - // ____________________ + public void lockControllers() throws RuntimeException @@ -129,7 +129,7 @@ public class ChartInWriter UnoRuntime.queryInterface( XModel.class, maChartDocument ).lockControllers(); } - // ____________________ + public void unlockControllers() throws RuntimeException @@ -137,7 +137,7 @@ public class ChartInWriter UnoRuntime.queryInterface( XModel.class, maChartDocument ).unlockControllers(); } - // ____________________ + public void testWall() throws RuntimeException, UnknownPropertyException, PropertyVetoException, @@ -151,10 +151,10 @@ public class ChartInWriter aWall.setPropertyValue( "FillStyle", FillStyle.SOLID ); } - // ______________________________ - // + + // private members - // ______________________________ + private XChartDocument maChartDocument; private XDiagram maDiagram; diff --git a/odk/examples/DevelopersGuide/Charts/Helper.java b/odk/examples/DevelopersGuide/Charts/Helper.java index 92ba8c476474..580d5adc4fa4 100644 --- a/odk/examples/DevelopersGuide/Charts/Helper.java +++ b/odk/examples/DevelopersGuide/Charts/Helper.java @@ -71,7 +71,7 @@ public class Helper } } - // ____________________ + public XSpreadsheetDocument createSpreadsheetDocument() { @@ -79,28 +79,28 @@ public class Helper XSpreadsheetDocument.class, createDocument( "scalc" )); } - // ____________________ + public XModel createPresentationDocument() { return createDocument( "simpress" ); } - // ____________________ + public XModel createDrawingDocument() { return createDocument( "sdraw" ); } - // ____________________ + public XModel createTextDocument() { return createDocument( "swriter" ); } - // ____________________ + public XModel createDocument( String sDocType ) { diff --git a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java index a70481e1631b..c71496547374 100644 --- a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java +++ b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java @@ -208,7 +208,7 @@ public class JavaSampleChartAddIn extends WeakBase implements } // position lines - // -------------- + // get data XChartDataArray aDataArray = UnoRuntime.queryInterface( diff --git a/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java b/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java index 266f07a9c728..c1227b2d2721 100644 --- a/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java +++ b/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java @@ -99,7 +99,7 @@ public class ListenAtCalcRangeInDraw implements XChartDataChangeEventListener maChartDocument.attachData( maChartData ); } - // ____________________ + public void run() { @@ -131,7 +131,7 @@ public class ListenAtCalcRangeInDraw implements XChartDataChangeEventListener chartDataChanged( aEvent ); } - // ____________________ + // XEventListener (base of XChartDataChangeEventListener) public void disposing( EventObject aSourceObj ) @@ -154,7 +154,7 @@ public class ListenAtCalcRangeInDraw implements XChartDataChangeEventListener System.exit( 0 ); } - // ____________________ + // XChartDataChangeEventListener public void chartDataChanged( ChartDataChangeEvent aEvent ) diff --git a/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java b/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java index d544d03abdf3..98f2dbb2abd7 100644 --- a/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java +++ b/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java @@ -107,7 +107,7 @@ public class SelectionChangeListener implements XSelectionChangeListener { "com.sun.star.chart.XYDiagram" ); } - // ____________________ + public void run() { boolean bTrying = true; @@ -138,7 +138,7 @@ public class SelectionChangeListener implements XSelectionChangeListener { } } - // ____________________ + // XEventListener (base of XSelectionChangeListener) public void disposing( EventObject aSourceObj ) { @@ -159,7 +159,7 @@ public class SelectionChangeListener implements XSelectionChangeListener { System.exit( 0 ); } - // ____________________ + // XSelectionChangeListener public void selectionChanged( EventObject aEvent ) { diff --git a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java index d0ffaafebaa7..1070ffcb0c78 100644 --- a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java +++ b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java @@ -60,7 +60,7 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob */ public static final java.lang.String IMPLEMENTATIONNAME = "com.sun.star.comp.framework.java.services.AsyncJob"; - //___________________________________________ + // interface /** initialize a new instance of this class with default values. */ @@ -69,7 +69,7 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob m_xCmpCtx = xCompContext; } - //___________________________________________ + /** starts execution of this job. * @@ -222,7 +222,7 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob xListener.jobFinished(this, lReturn); } - //___________________________________________ + /** show an info box with the UNO based toolkit. * @@ -292,7 +292,7 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob } } - //___________________________________________ + private void showInfoNonModal( java.lang.String sTitle , java.lang.String sMessage ) @@ -319,7 +319,7 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob }.start(); } - //___________________________________________ + /** helper to print out the given argument list. * @@ -407,7 +407,7 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob } - //___________________________________________ + public synchronized static com.sun.star.lang.XSingleComponentFactory __getComponentFactory(java.lang.String sImplName) { @@ -418,7 +418,7 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob return xFactory; } - //___________________________________________ + // This method not longer necessary since OOo 3.4 where the component registration // was changed to passive component registration. For more details see // http://wiki.openoffice.org/wiki/Passive_Component_Registration diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx index 5456af87ee22..6233fb7c2913 100644 --- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx +++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx @@ -53,9 +53,9 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::registry; -//################################################################################################## + //#### EXPORTED #################################################################################### -//################################################################################################## + /** * This function is called to get service factories for an implementation. diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.hxx index 8072094d7346..9aa70405ee60 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.hxx +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.hxx @@ -77,9 +77,9 @@ namespace connectivity protected: rtl_TextEncoding m_nTextEncoding; // the encoding which is used for all text conversions - //==================================================================== + // Data attributes - //==================================================================== + TTypeInfoVector m_aTypeInfo; // vector containing an entry // for each row returned by // DatabaseMetaData.getTypeInfo. @@ -142,7 +142,7 @@ namespace connectivity // XWarningsSupplier virtual ::com::sun::star::uno::Any SAL_CALL getWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL clearWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - // + // should we use the catalog on filebased databases inline sal_Bool isCatalogUsed() const { return m_bUseCatalog; } diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.hxx index bdd3ac439796..f7d294871700 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.hxx +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.hxx @@ -44,9 +44,9 @@ namespace connectivity { namespace skeleton { - //************************************************************** + //************ Class: ODatabaseMetaData - //************************************************************** + typedef ::cppu::WeakImplHelper1< ::com::sun::star::sdbc::XDatabaseMetaData> ODatabaseMetaData_BASE; diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx index 4134c83aff47..8cf29445361b 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx @@ -144,12 +144,12 @@ sal_Int32 SAL_CALL SkeletonDriver::getMinorVersion( ) throw(RuntimeException) } -//......................................................................... + namespace connectivity { namespace skeleton { -//......................................................................... + void release(oslInterlockedCount& _refCount, ::cppu::OBroadcastHelper& rBHelper, @@ -194,9 +194,9 @@ void checkDisposed(sal_Bool _bThrow) throw ( DisposedException ) throw DisposedException(); } -//......................................................................... + } } -//......................................................................... + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.hxx index 315d781d40fb..0914e5c5f76d 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.hxx +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.hxx @@ -71,9 +71,9 @@ namespace connectivity }; ::std::vector< Parameter> m_aParameters; - //==================================================================== + // Data attributes - //==================================================================== + TTypeInfoVector m_aTypeInfo; // Hashtable containing an entry // for each row returned by // DatabaseMetaData.getTypeInfo. diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.hxx index 7ce5fd56fa14..1c78c6e032cb 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.hxx +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.hxx @@ -44,9 +44,9 @@ namespace connectivity { namespace skeleton { - //************************************************************** + //************ Class: ResultSetMetaData - //************************************************************** + typedef ::cppu::WeakImplHelper1< ::com::sun::star::sdbc::XResultSetMetaData> OResultSetMetaData_BASE; class OResultSetMetaData : public OResultSetMetaData_BASE diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx index 83c3870bae5f..b3ccf08216bd 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx @@ -56,11 +56,11 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* ); -//*************************************************************************************** -// + + // The required C-Api must be provided! // It contains of 3 special functions that have to be exported. -// + void REGISTER_PROVIDER( diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.hxx index 942d43fef216..1e3d06c82358 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.hxx +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.hxx @@ -60,10 +60,10 @@ namespace connectivity ::com::sun::star::sdbc::XCloseable, ::com::sun::star::sdbc::XMultipleResults> OStatement_BASE; - //************************************************************** + //************ Class: OStatement_Base // is a base class for the normal statement and for the prepared statement - //************************************************************** + class OStatement_Base : public OBase_Mutex, public OStatement_BASE, public ::cppu::OPropertySetHelper, diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.cxx index 9b69be270c2e..e71ed7924474 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.cxx +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.cxx @@ -90,9 +90,9 @@ namespace skeleton const sal_Char* getPROPERTY_AUTOINCREMENTCREATION() { return "AutoIncrementCreation"; } const sal_Char* getPROPERTY_PRIVILEGES() { return "Privileges"; } - //============================================================ + //= error messages - //============================================================ + const sal_Char* getERRORMSG_SEQUENCE() { return "Function sequence error"; } const sal_Char* getSQLSTATE_SEQUENCE() { return "HY010"; } const sal_Char* getSQLSTATE_GENERAL() { return "HY0000"; } diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.hxx index 95b9275954c9..71c2b35dffec 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.hxx +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.hxx @@ -83,16 +83,16 @@ namespace skeleton } -//------------------------------------------------------------------------------ + #define DECL_PROP1IMPL(varname, type) \ pProperties[nPos++] = ::com::sun::star::beans::Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::cppu::UnoType< type >::get(), -//------------------------------------------------------------------------------ + #define DECL_PROP0(varname, type) \ DECL_PROP1IMPL(varname, type) 0) -//------------------------------------------------------------------------------ + #define DECL_BOOL_PROP1IMPL(varname) \ pProperties[nPos++] = ::com::sun::star::beans::Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::getBooleanCppuType(), -//------------------------------------------------------------------------------ + #define DECL_BOOL_PROP0(varname) \ DECL_BOOL_PROP1IMPL(varname) 0) diff --git a/odk/examples/DevelopersGuide/Database/sdbcx.java b/odk/examples/DevelopersGuide/Database/sdbcx.java index 696857b0344e..32c434273a38 100644 --- a/odk/examples/DevelopersGuide/Database/sdbcx.java +++ b/odk/examples/DevelopersGuide/Database/sdbcx.java @@ -123,7 +123,7 @@ public class sdbcx new com.sun.star.beans.PropertyValue("user",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE), new com.sun.star.beans.PropertyValue("password",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE) }; - // + // now create a connection to adabas con = xDriver.connect(adabasURL,adabasProps); @@ -172,10 +172,10 @@ public class sdbcx } } - //########################################################### + // 15. example // print all columns of a XColumnsSupplier - //########################################################### + public static void printColumns(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception,SQLException { System.out.println("Example printColumns"); @@ -186,10 +186,10 @@ public class sdbcx for ( int i =0; i<= aColumnNames.length-1; i++) System.out.println(" " + aColumnNames[i]); } - //########################################################### + // 16. example // print all keys inclusive the columns of a key - //########################################################### + public static void printKeys(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception,SQLException { System.out.println("Example printKeys"); @@ -208,10 +208,10 @@ public class sdbcx } } } - //########################################################### + // 17. example // print all keys inclusive the columns of a key - //########################################################### + public static void printIndexes(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception,SQLException { System.out.println("Example printIndexes"); @@ -231,10 +231,10 @@ public class sdbcx } } - //########################################################### + // 18. example // column properties - //########################################################### + public static void printColumnProperties(Object column) throws com.sun.star.uno.Exception,SQLException { System.out.println("Example printColumnProperties"); @@ -256,10 +256,10 @@ public class sdbcx System.out.println("DefaultValue: " + xProp.getPropertyValue("DefaultValue")); } - //########################################################### + // 19. example // index properties - //########################################################### + public static void printIndexProperties(Object index) throws com.sun.star.uno.Exception,SQLException { System.out.println("Example printIndexProperties"); @@ -271,10 +271,10 @@ public class sdbcx System.out.println("IsClustered: " + xProp.getPropertyValue("IsClustered")); } - //########################################################### + // 20. example // key properties - //########################################################### + public static void printKeyProperties(Object key) throws com.sun.star.uno.Exception,SQLException { System.out.println("Example printKeyProperties"); @@ -286,10 +286,10 @@ public class sdbcx System.out.println("DeleteRule: " + xProp.getPropertyValue("DeleteRule")); } - //########################################################### + // 21. example // print all groups and the users with their privileges who belong to this group - //########################################################### + public static void printGroups(XTablesSupplier xTabSup) throws com.sun.star.uno.Exception,SQLException { System.out.println("Example printGroups"); @@ -320,10 +320,10 @@ public class sdbcx } } - //########################################################### + // 22. example // create the table salesmen - //########################################################### + public static void createTableSalesMen(XNameAccess xTables) throws com.sun.star.uno.Exception,SQLException { System.out.println("Example createTableSalesMen"); @@ -395,10 +395,10 @@ public class sdbcx } } - //########################################################### + // 23. example // create a user - //########################################################### + public static void createUser(XNameAccess xUsers) throws com.sun.star.uno.Exception,SQLException { System.out.println("Example createUser"); diff --git a/odk/examples/DevelopersGuide/Drawing/ShapeHelper.java b/odk/examples/DevelopersGuide/Drawing/ShapeHelper.java index 6f1d4aff680c..a16bb2e9e798 100644 --- a/odk/examples/DevelopersGuide/Drawing/ShapeHelper.java +++ b/odk/examples/DevelopersGuide/Drawing/ShapeHelper.java @@ -59,7 +59,7 @@ import com.sun.star.text.XTextRange; public class ShapeHelper { // __________ static helper methods __________ - // + public static XPropertySet createAndInsertShape( XComponent xDrawDoc, XShapes xShapes, Point aPos, Size aSize, String sShapeType ) throws java.lang.Exception diff --git a/odk/examples/DevelopersGuide/Forms/DataAwareness.java b/odk/examples/DevelopersGuide/Forms/DataAwareness.java index 70323e25a373..b11098698700 100644 --- a/odk/examples/DevelopersGuide/Forms/DataAwareness.java +++ b/odk/examples/DevelopersGuide/Forms/DataAwareness.java @@ -690,7 +690,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan // ensure that we have the tables needed for our example ensureTables(); - // -------------------------------------------------------------- + /* create some shapes */ XPropertySet xSNRField = m_formLayer.insertControlLine( "NumericField", "SNR", "", 3 ); m_formLayer.insertControlLine( "TextField", "FIRSTNAME", "", 11); @@ -704,7 +704,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan xSNRField.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) ); xZipField.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) ); - // -------------------------------------------------------------- + /** need the form the control models belong to for this, we simply obtain the parent for any of the control models we have @@ -720,7 +720,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan m_xMasterForm.setPropertyValue( "CommandType", new Integer( CommandType.TABLE ) ); m_xMasterForm.setPropertyValue( "Command", "SALESMEN" ); - // -------------------------------------------------------------- + // insert the buttons // create our button operator, if necessary m_aOperator = new ButtonOperator( m_xCtx, m_document, m_xMasterForm ); @@ -732,7 +732,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan createButton( 42, 63, 8, "new", ">*", FormFeature.MoveToInsertRow ); createButton( 58, 63, 13, "reload", "reload", FormFeature.ReloadForm ); - // -------------------------------------------------------------- + // create a sub for for the sales // for this, first create a sub form and bind it to the SALES table @@ -786,7 +786,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan xFormReset.addResetListener( this ); - // -------------------------------------------------------------- + // the option for filtering the sales form XIndexContainer xSalesFilterForm = m_document.createSiblingForm( xSalesForm, "SalesFilter" ); XPropertySet xSFFProps = UNO.queryPropertySet( xSalesFilterForm ); @@ -806,7 +806,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan xManualFilter, xApplyFilter ); - // -------------------------------------------------------------- + // the options section // for this, we need a form which is a sibling of our master form (don't want to interfere // the controls which represent options only with the controls which are used for data access) @@ -858,7 +858,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan // initally, we want to generate keys when moving to a new record xKeyGen.setPropertyValue( "DefaultState", new Short( (short)1 ) ); - // -------------------------------------------------------------- + // second options block xLabel = m_formLayer.createControlAndShape( "GroupBox", 103, 33, 56, 25, xOptionsForm ); xLabel.setPropertyValue( "Name", "Misc" ); diff --git a/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java b/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java index 456e4125c9d2..04a4dbc26199 100644 --- a/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java +++ b/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java @@ -87,7 +87,7 @@ public abstract class DocumentBasedExample implements com.sun.star.lang.XEventLi // grab the focus to the first control m_document.getCurrentView().grabControlFocus(); - // ---------------------------------------------- + // wait for the user to confirm that we can exit if ( waitForUserInput() ) { diff --git a/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java b/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java index d56501ad9f19..0a4e46e48e3b 100644 --- a/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java +++ b/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java @@ -46,21 +46,21 @@ public class HsqlDatabase // the default connection XConnection m_connection; - // -------------------------------------------------------------------------------------------------------- + public HsqlDatabase( XComponentContext _context ) throws Exception { m_context = _context; createDBDocument(); } - // -------------------------------------------------------------------------------------------------------- + public HsqlDatabase( XComponentContext _context, String _existingDocumentURL ) throws Exception { m_context = _context; createDBDocument( _existingDocumentURL ); } - // -------------------------------------------------------------------------------------------------------- + private void createDBDocument( String _docURL ) throws Exception { m_databaseDocumentFile = _docURL; diff --git a/odk/examples/DevelopersGuide/Forms/SalesFilter.java b/odk/examples/DevelopersGuide/Forms/SalesFilter.java index 932cf5c93981..59d979f19e4f 100644 --- a/odk/examples/DevelopersGuide/Forms/SalesFilter.java +++ b/odk/examples/DevelopersGuide/Forms/SalesFilter.java @@ -70,7 +70,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis m_nPreviousFilterIndex = -1; initFilterDates(); - // ------------------------------------------------------------- + // remember the components m_aDocument = aDocument; m_xSalesForm = xSalesForm; @@ -81,7 +81,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis try { - // ---------------------------------------------------------- + // init control models m_xFilterList.setPropertyValue( "Dropdown", new Boolean( true ) ); m_xFilterList.setPropertyValue( "LineCount", new Short( (short)11 ) ); @@ -93,7 +93,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis updateFilterControl(); updateApplyButton(); - // ---------------------------------------------------------- + // add as listener to the events which require action // want to know about changed selection diff --git a/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java b/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java index c54283470963..4cf81b5a53b7 100644 --- a/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java +++ b/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java @@ -102,7 +102,7 @@ public class SingleControlValidation implements XFormComponentValidityListener } m_inputField = controls[ 0 ]; - // ---------------------------------- + controlPos += 4; XPropertySet xLabel = m_formLayer.createControlAndShape( "FixedText", columnPos, controlPos, 70, 4, null ); xLabel.setPropertyValue( "Label", new String( "Status:" ) ); @@ -110,7 +110,7 @@ public class SingleControlValidation implements XFormComponentValidityListener m_statusField = m_formLayer.createControlAndShape( "FixedText", columnPos, controlPos, 70, 4, null ); m_statusField.setPropertyValue( "Label", new String( "" ) ); - // ---------------------------------- + controlPos += 6; xLabel = m_formLayer.createControlAndShape( "FixedText", columnPos, controlPos, 70, 4, null ); xLabel.setPropertyValue( "Label", new String( "Explanation for invalidity:" ) ); diff --git a/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java b/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java index 09233addc5dd..e3555b308a0c 100644 --- a/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java +++ b/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java @@ -46,7 +46,7 @@ public class SpreadsheetValueBinding extends DocumentBasedExample final short exchangeRow = (short)1; // 2 final Integer backColor = new Integer( 0x00E0E0E0 ); - // ---------------------------------------------------------------------- + // a numeric control XPropertySet numericControl = m_formLayer.insertControlLine( "NumericField", "enter a value", "", 30 ); @@ -59,7 +59,7 @@ public class SpreadsheetValueBinding extends DocumentBasedExample // bind the control model to cell B2 implBind( numericControl, document.createCellBinding( sheet, exchangeColumn, exchangeRow ) ); - // ---------------------------------------------------------------------- + // insert a list box XPropertySet listBox = m_formLayer.insertControlLine( "ListBox", "select an entry", "", 2, 40, 20 ); @@ -81,7 +81,7 @@ public class SpreadsheetValueBinding extends DocumentBasedExample // and also put the list selection index into cell B2 implBind( listBox, document.createListIndexBinding( sheet, exchangeColumn, exchangeRow ) ); - // ---------------------------------------------------------------------- + // fill the cells which we just bound the listbox to XCellRange exchangeSheet = document.getSheet( listSourceSheet ); String[] listContent = new String[] { "first", "second", "third", "forth", "fivth" }; diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java index 60eb85475dd5..aef248ba5c89 100644 --- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java +++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java @@ -1296,7 +1296,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis // just in case the listener has been added to several controls, // we make sure we refer to the right one if (sName.equals("CommandButton1")) { - //... + } }catch (com.sun.star.uno.Exception ex){ /* perform individual exception handling here. diff --git a/odk/examples/DevelopersGuide/GUI/UnoMenu.java b/odk/examples/DevelopersGuide/GUI/UnoMenu.java index 87e7fce68085..d72ab7e704ac 100644 --- a/odk/examples/DevelopersGuide/GUI/UnoMenu.java +++ b/odk/examples/DevelopersGuide/GUI/UnoMenu.java @@ -171,7 +171,7 @@ public UnoMenu(XComponentContext _xContext, XMultiComponentFactory _xMCF) { case 8: closeDialog(); default: - //.. + } } diff --git a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java index 5dc01aa3fca1..41af02a39613 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java @@ -45,9 +45,9 @@ import com.sun.star.datatransfer.clipboard.XSystemClipboard; import com.sun.star.text.XTextDocument; import com.sun.star.uno.AnyConverter; -//------------------------------------------------- + // Demonstrates the usage of the clipboard service -//------------------------------------------------- + public class Clipboard { @@ -89,9 +89,9 @@ public class Clipboard XSystemClipboard xClipboard = SystemClipboard.create(xOfficeContext); - //--------------------------------------------------- + // registering as clipboard listener - //--------------------------------------------------- + ClipboardListener aClipListener= new ClipboardListener(); @@ -100,9 +100,9 @@ public class Clipboard // Read ClipBoard readClipBoard(xClipboard); - //--------------------------------------------------- + // becoming a clipboard owner - //--------------------------------------------------- + System.out.println("Becoming a clipboard owner..."); System.out.println(""); @@ -130,9 +130,9 @@ public class Clipboard // Read ClipBoard again readClipBoard(xClipboard); - //--------------------------------------------------- + // unregistering as clipboard listener - //--------------------------------------------------- + xClipboard.removeClipboardListener(aClipListener); // close test document @@ -157,9 +157,9 @@ public class Clipboard public static void readClipBoard(XClipboard xClipboard) throws java.lang.Exception { - //--------------------------------------------------- + // get a list of formats currently on the clipboard - //--------------------------------------------------- + XTransferable xTransferable = xClipboard.getContents(); diff --git a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardListener.java b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardListener.java index 49efd28c0ea8..21d23ff92b43 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardListener.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardListener.java @@ -36,9 +36,9 @@ import com.sun.star.lang.EventObject; import com.sun.star.datatransfer.clipboard.ClipboardEvent; import com.sun.star.datatransfer.clipboard.XClipboardListener; -//----------------------------- + // A simple clipboard listener -//----------------------------- + public class ClipboardListener implements XClipboardListener { diff --git a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardOwner.java b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardOwner.java index eb745bae4119..94987b89b37c 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardOwner.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardOwner.java @@ -36,9 +36,9 @@ import com.sun.star.datatransfer.XTransferable; import com.sun.star.datatransfer.clipboard.XClipboard; import com.sun.star.datatransfer.clipboard.XClipboardOwner; -//-------------------------- + // A simple clipboard owner -//-------------------------- + public class ClipboardOwner implements XClipboardOwner { diff --git a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/TextTransferable.java b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/TextTransferable.java index 291cbbb97e22..8ce14f408a92 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/TextTransferable.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/TextTransferable.java @@ -37,10 +37,10 @@ import com.sun.star.datatransfer.UnsupportedFlavorException; import com.sun.star.datatransfer.XTransferable; import com.sun.star.uno.Type; -//--------------------------------------- + // A simple transferable containing only // one format, unicode text -//--------------------------------------- + public class TextTransferable implements XTransferable { diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java index ea8645d9fc4c..769768b027ca 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java @@ -69,7 +69,7 @@ public class CustomizeView extends JPanel private static final String TOOLBAR_OFF = "toolbar off" ; private static final String OBJECTBAR_OFF = "objectbar off" ; - // ____________________ + // member /** @@ -89,7 +89,7 @@ public class CustomizeView extends JPanel private StatusListener m_aToolBarListener ; private StatusListener m_aObjectBarListener; - // ____________________ + /** * ctor @@ -117,7 +117,7 @@ public class CustomizeView extends JPanel this.add(m_cbObjectBar); } - // ____________________ + /** * set new frame for this view @@ -160,7 +160,7 @@ public class CustomizeView extends JPanel m_aObjectBarListener.startListening(); } - // ____________________ + /** * react for click events of the used check boxes @@ -186,7 +186,7 @@ public class CustomizeView extends JPanel /// we must use this frame to dispatch a request com.sun.star.frame.XFrame m_xFrame; - //_____________________ + /** * ctor @@ -201,7 +201,7 @@ public class CustomizeView extends JPanel m_xFrame = xFrame; } - //_____________________ + /** * callback for action events @@ -242,7 +242,7 @@ public class CustomizeView extends JPanel FunctionHelper.execute(m_xFrame,aURL,lProperties,null); } - // ____________________ + /** * callback for disposing events @@ -264,7 +264,7 @@ public class CustomizeView extends JPanel } } - // ____________________ + /** * If this java application shutdown - we must cancel all current existing diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java index 9641dc8864a9..6553b3b2ff20 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java @@ -44,7 +44,7 @@ import java.lang.String; */ public class Desk { - // ____________________ + /** * main diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java index 7cbb0e3ecf8b..9e679b1eed11 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java @@ -61,7 +61,7 @@ public class DocumentView extends JFrame implements com.sun.star.lang.XEventListener, // react for Frame::disposing() IShutdownListener // react for System.exit() { - // ____________________ + /** * const @@ -73,7 +73,7 @@ public class DocumentView extends JFrame public static final String COMMAND_EXPORT = "export" ; public static final String COMMAND_EXIT = "exit" ; - // ____________________ + /** * @member mxFrame office frame which contains the document of this view @@ -108,7 +108,7 @@ public class DocumentView extends JFrame private boolean mbDead ; - // ____________________ + /** * ctor @@ -195,7 +195,7 @@ public class DocumentView extends JFrame this.enableEvents(AWTEvent.WINDOW_EVENT_MASK); } - // ____________________ + /** * Create the view frame for showing the office documents on demand. @@ -241,7 +241,7 @@ public class DocumentView extends JFrame } } - // ____________________ + /** * Different ways to load any URL from outside (may be by the command line) @@ -252,7 +252,7 @@ public class DocumentView extends JFrame load(sURL,new com.sun.star.beans.PropertyValue[0]); } - // ____________________ + public void load(String sURL, com.sun.star.beans.PropertyValue[] lArguments) { @@ -269,7 +269,7 @@ public class DocumentView extends JFrame } } - // ____________________ + public void save() { @@ -282,7 +282,7 @@ public class DocumentView extends JFrame FunctionHelper.saveDocument(xDocument); } - // ____________________ + public void exportHTML(String sURL) { @@ -295,7 +295,7 @@ public class DocumentView extends JFrame FunctionHelper.saveAsHTML(xDocument,sURL); } - // ____________________ + /** * Overridden so we can react for window closing of this view. @@ -315,7 +315,7 @@ public class DocumentView extends JFrame } } - // ____________________ + /** * Here we can react for System.exit() normaly. @@ -355,7 +355,7 @@ public class DocumentView extends JFrame ViewContainer.getGlobalContainer().removeView(this); } - // ____________________ + /** * callback from our internal saved frame @@ -372,7 +372,7 @@ public class DocumentView extends JFrame mxFrame = null; } - // ____________________ + /** * This inner class is used to react for events of our own UI controls. @@ -380,7 +380,7 @@ public class DocumentView extends JFrame */ private class Reactor implements ActionListener { - // ____________________ + /** * This method react for pressed buttons or selected check boxes. @@ -388,7 +388,7 @@ public class DocumentView extends JFrame public void actionPerformed(ActionEvent aEvent) { String sCommand = aEvent.getActionCommand(); - //----------------------------- + // open any file from disk if( sCommand.compareTo(COMMAND_OPEN) == 0 ) { @@ -397,14 +397,14 @@ public class DocumentView extends JFrame DocumentView.this.load(sURL); } else - //----------------------------- + // save current document if( sCommand.compareTo(COMMAND_SAVE) == 0 ) { DocumentView.this.save(); } else - //----------------------------- + // export current document to html if( sCommand.compareTo(COMMAND_EXPORT) == 0 ) { @@ -413,7 +413,7 @@ public class DocumentView extends JFrame DocumentView.this.exportHTML(sURL); } else - //----------------------------- + // exit application if( sCommand.compareTo(COMMAND_EXIT) == 0 ) { diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java index 88b80d34037b..6060292b95b3 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java @@ -61,7 +61,7 @@ import java.net.*; */ public class FunctionHelper { - // ____________________ + /** * This convert an URL (formated as a string) to a struct com.sun.star.util.URL. @@ -124,7 +124,7 @@ public class FunctionHelper return aURL; } - // ____________________ + /** * create a new empty target frame @@ -165,7 +165,7 @@ public class FunctionHelper return xFrame; } - // ____________________ + /** * create a new window which can be used as container window of an office frame @@ -323,7 +323,7 @@ public class FunctionHelper return xWindow; } - // ____________________ + /** * This method create a new empty child frame on desktop instance of remote office. @@ -423,7 +423,7 @@ public class FunctionHelper return xFrame; } - // ____________________ + /** * Dispatch an URL to given frame. @@ -488,7 +488,7 @@ public class FunctionHelper return xDispatcher; } - // ____________________ + /** * Dispatch an URL to given frame. @@ -535,7 +535,7 @@ public class FunctionHelper } } - // ____________________ + /** * Load document specified by an URL into given frame synchronously. @@ -627,7 +627,7 @@ public class FunctionHelper return xDocument; } - // ____________________ + /** * Save currently loaded document of given frame. @@ -675,7 +675,7 @@ public class FunctionHelper } } - // ____________________ + /** * It try to export given document in HTML format. @@ -780,7 +780,7 @@ public class FunctionHelper } } - // ____________________ + /** * Try to close the document without any saving of modifications. @@ -855,7 +855,7 @@ public class FunctionHelper } } - // ____________________ + /** * Try to close the frame instead of the document. @@ -918,7 +918,7 @@ public class FunctionHelper return bClosed; } - // ____________________ + /** * Try to find an unique frame name, which isn't currently used inside @@ -979,7 +979,7 @@ public class FunctionHelper return sName; } - // ____________________ + /** * helper to get a file URL selected by user @@ -1042,7 +1042,7 @@ public class FunctionHelper return sFileURL; } - // ____________________ + /** * @member maLastDir save the last visited directory of used file open/save dialog diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/IOnewayLink.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/IOnewayLink.java index 33a6b3c79a4e..1ad68bb82f4b 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/IOnewayLink.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/IOnewayLink.java @@ -48,7 +48,7 @@ import java.util.ArrayList; */ public interface IOnewayLink { - // _______________________________ + /** * @param nRequest diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java index 88eeb2fd322f..c8e300eadca6 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java @@ -63,7 +63,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, IShutdownListener, IOnewayLink { - // ____________________ + /** * const @@ -74,7 +74,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, "slot:5300" , ".uno:Quit" }; - // ____________________ + /** * @member m_xMaster use this interceptor if he doesn't handle queried dispatch request @@ -89,7 +89,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, private boolean m_bIsRegistered ; private boolean m_bDead ; - // ____________________ + /** * ctor @@ -111,7 +111,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, m_bDead = false ; } - //_____________________ + /** * start working as frame action listener really. @@ -140,7 +140,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, } } - //_____________________ + /** * In case we got an oneway listener callback - we had to use the office @@ -188,7 +188,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, } } - // ____________________ + /** * call back for frame action events @@ -243,7 +243,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, aExecutor.start(); } - // ____________________ + /** * Indicates using of us as an interceptor. @@ -282,7 +282,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, } - //_____________________ + /** * Internal call back for frame action events, triggered by the used @@ -342,7 +342,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, } } - // ____________________ + /** * Implementation of interface XDispatchProviderInterceptor @@ -361,7 +361,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, } } - // ____________________ + public void setSlaveDispatchProvider(com.sun.star.frame.XDispatchProvider xSlave) { @@ -371,7 +371,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, } } - // ____________________ + public com.sun.star.frame.XDispatchProvider getMasterDispatchProvider() { @@ -381,7 +381,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, } } - // ____________________ + public void setMasterDispatchProvider(com.sun.star.frame.XDispatchProvider xMaster) { @@ -391,7 +391,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, } } - // ____________________ + /** * Implementation of interface XDispatchProvider @@ -457,7 +457,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, return null; } - // ____________________ + public com.sun.star.frame.XDispatch[] queryDispatches(/*IN*/ com.sun.star.frame.DispatchDescriptor[] lDescriptor) { @@ -479,7 +479,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, return lDispatcher; } - // ____________________ + /** * This method is called if this interceptor "wins the request". @@ -520,7 +520,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, } } - // ____________________ + /** * Notification of status listener isn't guaranteed (instead of listener on XNotifyingDispatch interface). @@ -545,13 +545,13 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, }*/ } - // ____________________ + public /*ONEWAY*/ void removeStatusListener(/*IN*/ com.sun.star.frame.XStatusListener xListener,/*IN*/ com.sun.star.util.URL aURL) { } - // ____________________ + /** * Implements (optional!) optimization for interceptor mechanism. @@ -568,7 +568,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, return INTERCEPTED_URLS; } - // ____________________ + /** * This class listen on the intercepted frame to free all used resources on closing. @@ -593,7 +593,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, shutdown(); } - // ____________________ + /** * If this java application shutdown - we must cancel all current existing diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/JavaWindowPeerFake.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/JavaWindowPeerFake.java index 3bc089543687..4405f05ebf09 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/JavaWindowPeerFake.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/JavaWindowPeerFake.java @@ -47,7 +47,7 @@ class JavaWindowPeerFake implements com.sun.star.awt.XSystemDependentWindowPeer, maView = aNative; } - // ____________________ + /** * Implementation of XSystemDependentWindowPeer (that's all we really need). * This method is called back from the Office toolkit to retrieve the system data. diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/NativeView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/NativeView.java index 270baf201062..7fd846983d74 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/NativeView.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/NativeView.java @@ -50,7 +50,7 @@ import java.awt.*; public class NativeView extends java.awt.Canvas { - // ____________________ + /** * ctor @@ -67,7 +67,7 @@ public class NativeView extends java.awt.Canvas this.setBackground(Color.white); } - // ____________________ + /** * Overload this method to make necessary initializations here. @@ -84,7 +84,7 @@ public class NativeView extends java.awt.Canvas getHWND(); } - // ____________________ + /** * to guarantee right resize handling inside a swing container @@ -106,7 +106,7 @@ public class NativeView extends java.awt.Canvas return new Dimension(100,100); } - // ____________________ + /** * overload paint routine to show provide against @@ -125,7 +125,7 @@ public class NativeView extends java.awt.Canvas } } - // ____________________ + /** * JNI interface of this class @@ -156,7 +156,7 @@ public class NativeView extends java.awt.Canvas return maHandle; } - // ____________________ + /** * for using of the JNI methods it's necessary to load @@ -167,7 +167,7 @@ public class NativeView extends java.awt.Canvas System.loadLibrary("nativeview"); } - // ____________________ + /** * @member maHandle system window handle diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OfficeConnect.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OfficeConnect.java index e8a345ce1c4b..fb14f5acdacc 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OfficeConnect.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OfficeConnect.java @@ -52,7 +52,7 @@ import java.lang.String; */ public class OfficeConnect { - // ____________________ + /** * At first call we create static connection object and open connection to an @@ -65,7 +65,7 @@ public class OfficeConnect maConnection = new OfficeConnect(); } - // ____________________ + /** * close connection to remote office if it exist @@ -80,7 +80,7 @@ public class OfficeConnect } } - // ____________________ + /** * ctor @@ -110,7 +110,7 @@ public class OfficeConnect } } - // ____________________ + /** * create uno components inside remote office process @@ -145,7 +145,7 @@ public class OfficeConnect return aResult; } - // ____________________ + /** * same as "createRemoteInstance()" but supports additional parameter for @@ -176,7 +176,7 @@ public class OfficeConnect return aResult; } - // ____________________ + /** * returns remote component context of the connected office @@ -186,7 +186,7 @@ public class OfficeConnect return mxOfficeContext; } - // ____________________ + /** * member diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java index 51435cb5b6a2..bd8db66ed431 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java @@ -48,7 +48,7 @@ import java.util.ArrayList; */ class OnewayExecutor extends Thread { - // _______________________________ + /** * const @@ -66,7 +66,7 @@ class OnewayExecutor extends Thread public static final boolean ENCODE_PARAMS = true ; public static final boolean DECODE_PARAMS = false ; - // _______________________________ + /** * @member m_rLink the object, which wish to be called back by this thread @@ -78,7 +78,7 @@ class OnewayExecutor extends Thread private int m_nRequest ; private ArrayList<Object> m_lParams ; - // _______________________________ + /** * ctor @@ -114,7 +114,7 @@ class OnewayExecutor extends Thread System.out.println("ctor ... m_lParams == null"); } - // _______________________________ + /** * implements the thread function @@ -133,7 +133,7 @@ class OnewayExecutor extends Thread m_rLink.execOneway( m_nRequest, m_lParams ); } - // _______________________________ + /** * static helper! @@ -142,7 +142,7 @@ class OnewayExecutor extends Thread * must be coded. It's not a must to use it - but you can ... */ - // _______________________________ + public static ArrayList<Object> encodeDispatch( com.sun.star.util.URL[] aURL, diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java index 29c4fffecda7..6e65c8375a7a 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java @@ -67,7 +67,7 @@ class StatusListener implements com.sun.star.frame.XStatusListener, IShutdownListener, IOnewayLink { - //_____________________ + /** * @member m_rControl reference to the UI control, which should be updated @@ -90,7 +90,7 @@ class StatusListener implements com.sun.star.frame.XStatusListener, private boolean m_bIsStatusListener; private boolean m_bDead ; - //_____________________ + /** * ctor @@ -115,7 +115,7 @@ class StatusListener implements com.sun.star.frame.XStatusListener, m_aURL = FunctionHelper.parseURL(sURL); } - //_____________________ + /** * start working as frame action listener really. @@ -146,7 +146,7 @@ class StatusListener implements com.sun.star.frame.XStatusListener, } } - //_____________________ + /** * In case we got an oneway listener callback - we had to use the office @@ -180,7 +180,7 @@ class StatusListener implements com.sun.star.frame.XStatusListener, } } - //_____________________ + /** * This is the callback method for such frame action events, we listen for. @@ -222,7 +222,7 @@ class StatusListener implements com.sun.star.frame.XStatusListener, aExecutor.start(); } - //_____________________ + /** * This is the callback method for the status we listen for an wish to show it @@ -252,7 +252,7 @@ class StatusListener implements com.sun.star.frame.XStatusListener, // look for the right type ofthe UI control // Following actions depend on it. - //............................................................. + // it's a check box if (m_rControl instanceof JCheckBox) { @@ -271,7 +271,7 @@ class StatusListener implements com.sun.star.frame.XStatusListener, aBox.setText(m_sFalseText); } else - //............................................................. + // it's a label if (m_rControl instanceof JLabel) { @@ -305,7 +305,7 @@ class StatusListener implements com.sun.star.frame.XStatusListener, } } - //_____________________ + /** * Internal call back for frame action events, triggered by the used @@ -377,7 +377,7 @@ class StatusListener implements com.sun.star.frame.XStatusListener, } } - // ____________________ + /** * callback for disposing events @@ -414,7 +414,7 @@ class StatusListener implements com.sun.star.frame.XStatusListener, shutdown(); } - // ____________________ + /** * If this java application shutdown - we must cancel all current existing diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java index aad53937aaae..08616cfe617d 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java @@ -61,7 +61,7 @@ import java.lang.String; public class StatusView extends JPanel implements IShutdownListener { - // ____________________ + /** * const @@ -73,7 +73,7 @@ public class StatusView extends JPanel public static final String FEATUREURL_ITALIC = "slot:10008"; public static final String FEATUREURL_UNDERLINE = "slot:10014"; - // ____________________ + /** * const @@ -91,7 +91,7 @@ public class StatusView extends JPanel public static final String ITALIC_ON = "X" ; public static final String UNDERLINE_ON = "X" ; - // ____________________ + /** * @member mlaFontValue shows status of font name @@ -118,7 +118,7 @@ public class StatusView extends JPanel private StatusListener m_aUnderlineListener ; private StatusListener m_aItalicListener ; - // ____________________ + /** * ctor @@ -201,7 +201,7 @@ public class StatusView extends JPanel m_laUnderlineValue.setText(UNDERLINE_OFF); } - // ____________________ + /** * Set new frame for this view and start listening for events imedatly. @@ -235,7 +235,7 @@ public class StatusView extends JPanel m_aUnderlineListener.startListening(); } - // ____________________ + /** * If this java application shutdown - we must cancel all current existing diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/ViewContainer.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/ViewContainer.java index 5b9851188aea..ef632f98b0f2 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/ViewContainer.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/ViewContainer.java @@ -49,7 +49,7 @@ import java.util.*; */ public class ViewContainer extends Thread { - // ____________________ + /** * provides a singleton view container @@ -65,7 +65,7 @@ public class ViewContainer extends Thread return maSingleton; } - // ____________________ + /** * ctor @@ -80,7 +80,7 @@ public class ViewContainer extends Thread Runtime.getRuntime().addShutdownHook(this); } - // ____________________ + /** * This register a new view inside this global container @@ -97,7 +97,7 @@ public class ViewContainer extends Thread } } - // ____________________ + /** * This deregister a view from this global container. @@ -158,7 +158,7 @@ public class ViewContainer extends Thread } } - // ____________________ + /** * add/remove listener for possibe shutdown events @@ -172,7 +172,7 @@ public class ViewContainer extends Thread } } - // ____________________ + public void removeListener( IShutdownListener rListener ) { @@ -183,7 +183,7 @@ public class ViewContainer extends Thread } } - // ____________________ + /** * Is called from current runtime system of the java machine @@ -237,14 +237,14 @@ public class ViewContainer extends Thread } } - // ____________________ + /** * @const BASICNAME it's used to create uinque names for all regieterd views */ private static final String BASICNAME = "Document View "; - // ____________________ + /** * @member mbInplace indicates using of inplace office frames instead of outplace ones diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java index 1dc93286f94c..81303623f517 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java @@ -85,7 +85,7 @@ public class AsciiReplaceFilter public static final int FILTERPROC_BREAK = 1; public static final int FILTERPROC_STOPPED = 2; - //______________________________ + // member @@ -102,7 +102,7 @@ public class AsciiReplaceFilter // we need a flag to cancel any running filter operation private int m_nFilterProcState; - //______________________________ + // native interface /** * special debug helper to get an idea how expensive @@ -122,7 +122,7 @@ public class AsciiReplaceFilter m_nLast = nNow; } - //______________________________ + // native interface /** * The constructor to initialize every instance @@ -154,7 +154,7 @@ public class AsciiReplaceFilter m_nStart = m_nLast; } - //______________________________ + // interface XInitialization /** * used for initializing after creation @@ -210,7 +210,7 @@ public class AsciiReplaceFilter measure("} initialize"); } - //______________________________ + // interface XNamed /** * For external user of us we must provide our internal filter name @@ -238,7 +238,7 @@ public class AsciiReplaceFilter { } - //______________________________ + // interface XImporter /** * This interface is used to tell us: "you will be used for importing a document". @@ -274,7 +274,7 @@ public class AsciiReplaceFilter measure("} setTargetDocument"); } - //______________________________ + // interface XExporter /** * This interface is used to tell us: "you will be used for exporting a document". @@ -311,7 +311,7 @@ public class AsciiReplaceFilter } - //______________________________ + // interface XFilter /** * Implements the real filter method. We detect if it must be an import or an export. @@ -387,7 +387,7 @@ public class AsciiReplaceFilter measure("} cancel"); } - //______________________________ + // private helper /** * This helper function imports a simple ascii text file into @@ -630,7 +630,7 @@ public class AsciiReplaceFilter } - //______________________________ + // interface XServiceInfo /** * This method returns an array of all supported service names. diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java index 73198adb717a..2a14247d1379 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java @@ -56,7 +56,7 @@ import com.sun.star.uno.UnoRuntime; public class FilterOptions { - //_____________________________________ + // public member to provide these options to our outside filter class public com.sun.star.io.XInputStream m_xInput ; public com.sun.star.io.XOutputStream m_xOutput ; @@ -67,12 +67,12 @@ public class FilterOptions public boolean m_bCaseChange ; public boolean m_bLower ; - //_____________________________________ + // private members for internal things private XMultiComponentFactory m_xMCF ; private XComponentContext m_Ctx ; - //_____________________________________ + // interface /** * creates a new instance of this class @@ -187,7 +187,7 @@ public class FilterOptions return(m_xInput!=null || m_xOutput!=null); } - //_____________________________________ + // helper /** * In case we couldn't found any valid stream inside the given MediaDescriptor, diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx index 84731ba73d6d..4baad95d7070 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx @@ -116,7 +116,7 @@ OUString SAL_CALL FilterDetect::detect(Sequence< PropertyValue >& aArguments ) // flatxml starts with an office:document element. this element // conatains a clas="..." attribut by which we can deduct the // type of document that is to be loaded - // + // WARNING: // parsing the plain text of the document is an easy way to do this // but not the purest solution, since namespaces and other xml details diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java index b6b0383531c2..b7c23161709e 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java @@ -244,7 +244,7 @@ public class FlatXml implements XImportFilter, XExportFilter, XServiceName, m_xHandler.setDocumentLocator(xLocator); } - // ------------------------------------------------------------ + // component management public static XSingleServiceFactory __getServiceFactory(String implName, diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java index 114d1bda2e94..2a33ecb4d6cf 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java @@ -42,11 +42,11 @@ import com.sun.star.uno.UnoRuntime; import java.lang.reflect.Constructor; -// + // purpose of this class is to provide a service factory that instantiates // the services only once (as long as this factory itself exists) // and returns only reference to that instance. -// + public class OneInstanceFactory implements XSingleServiceFactory, @@ -71,9 +71,9 @@ public class OneInstanceFactory implements xInstantiatedService = null; } - //********************** + // XSingleServiceFactory - //********************** + public Object createInstance() throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException @@ -123,9 +123,9 @@ public class OneInstanceFactory implements } - //************* + // XServiceInfo - //************* + public boolean supportsService( String aServiceName ) throws com.sun.star.uno.RuntimeException { diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java index 2932a7791367..98f7e27e259e 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java @@ -138,9 +138,9 @@ public class PropChgHelper implements // __________ interface methods __________ - //*************** + // XEventListener - //*************** + public void disposing( EventObject aSource ) throws com.sun.star.uno.RuntimeException { @@ -150,18 +150,18 @@ public class PropChgHelper implements } } - //************************ + // XPropertyChangeListener - //************************ + public void propertyChange( PropertyChangeEvent aEvt ) throws com.sun.star.uno.RuntimeException { // will be overloaded in derived classes } - //****************************** + // XLinguServiceEventBroadcaster - //****************************** + public boolean addLinguServiceEventListener( XLinguServiceEventListener xListener ) throws com.sun.star.uno.RuntimeException diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Hyph.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Hyph.java index cb0e2811c0a4..95047d436bee 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Hyph.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Hyph.java @@ -46,9 +46,9 @@ public class PropChgHelper_Hyph extends PropChgHelper super( xEvtSource, aPropNames ); } - //************************ + // XPropertyChangeListener - //************************ + public void propertyChange( PropertyChangeEvent aEvt ) throws com.sun.star.uno.RuntimeException { diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Spell.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Spell.java index 68c3c3b46d69..cf1aef3d0f33 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Spell.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Spell.java @@ -46,9 +46,9 @@ public class PropChgHelper_Spell extends PropChgHelper super( xEvtSource, aPropNames ); } - //************************ + // XPropertyChangeListener - //************************ + public void propertyChange( PropertyChangeEvent aEvt ) throws com.sun.star.uno.RuntimeException { diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java index be0b47d90134..ffa8358227cd 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java @@ -177,9 +177,9 @@ public class SampleHyphenator extends ComponentBase implements // __________ interface methods __________ - //***************** + //XSupportedLocales - //***************** + public Locale[] getLocales() throws com.sun.star.uno.RuntimeException { @@ -202,9 +202,9 @@ public class SampleHyphenator extends ComponentBase implements return bRes; } - //*********** + //XHyphenator - //*********** + public XHyphenatedWord hyphenate( String aWord, Locale aLocale, short nMaxLeading, PropertyValue[] aProperties ) @@ -400,9 +400,9 @@ public class SampleHyphenator extends ComponentBase implements return xRes; } - //***************************** + //XLinguServiceEventBroadcaster - //***************************** + public boolean addLinguServiceEventListener ( XLinguServiceEventListener xLstnr ) throws com.sun.star.uno.RuntimeException @@ -423,18 +423,18 @@ public class SampleHyphenator extends ComponentBase implements return bRes; } - //******************** + // XServiceDisplayName - //******************** + public String getServiceDisplayName( Locale aLocale ) throws com.sun.star.uno.RuntimeException { return "Java Samples"; } - //**************** + // XInitialization - //**************** + public void initialize( Object[] aArguments ) throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException @@ -450,9 +450,9 @@ public class SampleHyphenator extends ComponentBase implements } - //************* + // XServiceInfo - //************* + public boolean supportsService( String aServiceName ) throws com.sun.star.uno.RuntimeException { diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java index 2ae92beb043b..00fbab8365d9 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java @@ -253,9 +253,9 @@ public class SampleSpellChecker extends ComponentBase implements // __________ interface methods __________ - //***************** + //XSupportedLocales - //***************** + public Locale[] getLocales() throws com.sun.star.uno.RuntimeException { @@ -279,9 +279,9 @@ public class SampleSpellChecker extends ComponentBase implements } - //************* + //XSpellChecker - //************* + public boolean isValid( String aWord, Locale aLocale, PropertyValue[] aProperties ) @@ -344,9 +344,9 @@ public class SampleSpellChecker extends ComponentBase implements } - //***************************** + //XLinguServiceEventBroadcaster - //***************************** + public boolean addLinguServiceEventListener ( XLinguServiceEventListener xLstnr ) throws com.sun.star.uno.RuntimeException @@ -367,18 +367,18 @@ public class SampleSpellChecker extends ComponentBase implements return bRes; } - //******************** + // XServiceDisplayName - //******************** + public String getServiceDisplayName( Locale aLocale ) throws com.sun.star.uno.RuntimeException { return "Java Samples"; } - //**************** + // XInitialization - //**************** + public void initialize( Object[] aArguments ) throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException @@ -393,9 +393,9 @@ public class SampleSpellChecker extends ComponentBase implements } } - //************* + // XServiceInfo - //************* + public boolean supportsService( String aServiceName ) throws com.sun.star.uno.RuntimeException { diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java index 967d5c54cdbb..d51ccb71a440 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java @@ -135,9 +135,9 @@ public class SampleThesaurus extends ComponentBase implements // __________ interface methods __________ - //***************** + //XSupportedLocales - //***************** + public Locale[] getLocales() throws com.sun.star.uno.RuntimeException { @@ -158,9 +158,9 @@ public class SampleThesaurus extends ComponentBase implements return bRes; } - //********** + //XThesaurus - //********** + public XMeaning[] queryMeanings( String aTerm, Locale aLocale, PropertyValue[] aProperties ) @@ -203,18 +203,18 @@ public class SampleThesaurus extends ComponentBase implements } - //******************** + // XServiceDisplayName - //******************** + public String getServiceDisplayName( Locale aLocale ) throws com.sun.star.uno.RuntimeException { return "Java Samples"; } - //**************** + // XInitialization - //**************** + public void initialize( Object[] aArguments ) throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException @@ -229,9 +229,9 @@ public class SampleThesaurus extends ComponentBase implements } } - //************* + // XServiceInfo - //************* + public boolean supportsService( String aServiceName ) throws com.sun.star.uno.RuntimeException { diff --git a/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java b/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java index eb536ce02b15..d620d8e431da 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java @@ -56,7 +56,7 @@ public class Number_Formats // __________ public members and methods __________ - // ____________________ + public static void main( String args[] ) { @@ -76,7 +76,7 @@ public class Number_Formats System.exit(0); } - // ____________________ + public void doFunction() throws RuntimeException, Exception { @@ -178,7 +178,7 @@ public class Number_Formats xColPropSet.setPropertyValue( "OptimalWidth", new Boolean(true) ); } - // ____________________ + public Number_Formats( String[] args ) throws java.lang.Exception { @@ -214,7 +214,7 @@ public class Number_Formats private XSpreadsheet maSheet; // the first sheet - // ____________________ + /** init the first sheet */ diff --git a/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java b/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java index 47bf1bb74b04..be5404ae1965 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java +++ b/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java @@ -51,7 +51,7 @@ import java.lang.String; */ public class OfficeConnect { - // ____________________ + /** * At first call we create static connection object and get the remote office @@ -69,14 +69,14 @@ public class OfficeConnect return maConnection; } - // ____________________ + public static synchronized OfficeConnect getConnection() { return maConnection; } - // ____________________ + /** * ctor @@ -93,7 +93,7 @@ public class OfficeConnect mxServiceManager = mxOfficeContext.getServiceManager(); } - // ____________________ + /** * create uno components inside remote office process @@ -125,7 +125,7 @@ public class OfficeConnect return aResult; } - // ____________________ + /** * same as "createRemoteInstance()" but supports additional parameter for initializing created object @@ -154,7 +154,7 @@ public class OfficeConnect return aResult; } - // ____________________ + /** * member diff --git a/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java b/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java index 4b1682af2c7e..b018c55be9ef 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java @@ -43,7 +43,7 @@ import com.sun.star.uno.RuntimeException; public class GeneralTableSample extends SpreadsheetDocHelper { -// ________________________________________________________________ + public static void main( String args[] ) { @@ -64,7 +64,7 @@ public class GeneralTableSample extends SpreadsheetDocHelper System.exit( 0 ); } -// ________________________________________________________________ + /// This sample function modifies cells and cell ranges. public void doSampleFunction() throws RuntimeException, Exception @@ -217,12 +217,12 @@ public class GeneralTableSample extends SpreadsheetDocHelper xSheet.getCellByPosition( 2, 9 ).setFormula( aText ); } -// ________________________________________________________________ + public GeneralTableSample( String[] args ) { super( args ); } -// ________________________________________________________________ + } diff --git a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java index 58dbf4873d64..0526a474ae7b 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java @@ -56,7 +56,7 @@ public class SpreadsheetDocHelper // private com.sun.star.lang.XMultiServiceFactory mxMSFactory; private com.sun.star.sheet.XSpreadsheetDocument mxDocument; -// ________________________________________________________________ + public SpreadsheetDocHelper( String[] args ) { @@ -151,7 +151,7 @@ public class SpreadsheetDocHelper return xSheet; } -// ________________________________________________________________ + // Methods to fill values into cells. /** Writes a double value into a spreadsheet. @@ -249,7 +249,7 @@ public class SpreadsheetDocHelper xPropSet.setPropertyValue( "CharWeight", new Float( com.sun.star.awt.FontWeight.BOLD ) ); } -// ________________________________________________________________ + // Methods to create cell addresses and range addresses. /** Creates a com.sun.star.table.CellAddress and initializes it @@ -277,7 +277,7 @@ public class SpreadsheetDocHelper return xAddr.getRangeAddress(); } -// ________________________________________________________________ + // Methods to convert cell addresses and range addresses to strings. /** Returns the text address of the cell. @@ -345,7 +345,7 @@ public class SpreadsheetDocHelper return aStr; } -// ________________________________________________________________ + // Connect to a running office that is accepting connections. private void connect() @@ -384,5 +384,5 @@ public class SpreadsheetDocHelper com.sun.star.sheet.XSpreadsheetDocument.class, xComponent ); } -// ________________________________________________________________ + } diff --git a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java index 62726efafcbf..619ee83ee4ae 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java @@ -43,7 +43,7 @@ import com.sun.star.uno.AnyConverter; public class SpreadsheetSample extends SpreadsheetDocHelper { -// ________________________________________________________________ + public static void main( String args[] ) { @@ -63,14 +63,14 @@ public class SpreadsheetSample extends SpreadsheetDocHelper System.exit( 0 ); } -// ________________________________________________________________ + public SpreadsheetSample( String[] args ) { super( args ); } -// ________________________________________________________________ + /** This sample function performs all changes on the document. */ public void doSampleFunction() @@ -197,7 +197,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper } } -// ________________________________________________________________ + /** All samples regarding the service com.sun.star.sheet.SheetCell. */ private void doCellSamples() throws RuntimeException, Exception @@ -292,7 +292,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper xAnnotation.setIsVisible( true ); } -// ________________________________________________________________ + /** All samples regarding the service com.sun.star.sheet.SheetCellRange. */ private void doCellRangeSamples() throws RuntimeException, Exception @@ -527,7 +527,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper com.sun.star.sheet.XCellSeries.class, xSheet.getCellRangeByName( aRange ) ); } -// ________________________________________________________________ + /** All samples regarding cell range collections. */ private void doCellRangesSamples() throws RuntimeException, Exception @@ -591,7 +591,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper + " resulting list: " + xContainer.getRangeAddressesAsString() ); } -// ________________________________________________________________ + /** All samples regarding cell cursors. */ private void doCellCursorSamples() throws RuntimeException, Exception @@ -621,7 +621,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper System.out.println( "The used area is: " + getCellRangeAddressString( xCursor, true ) ); } -// ________________________________________________________________ + /** All samples regarding the formatting of cells and ranges. */ private void doFormattingSamples() throws RuntimeException, Exception @@ -790,7 +790,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper xPropSet.setPropertyValue( "ConditionalFormat", xEntries ); } -// ________________________________________________________________ + /** All samples regarding the spreadsheet document. */ private void doDocumentSamples() throws RuntimeException, Exception @@ -938,7 +938,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper xScenario.apply(); } -// ________________________________________________________________ + private void doNamedRangesSamples() throws RuntimeException, Exception { @@ -1003,7 +1003,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper xSheet.getCellByPosition( 8, 49 ).setFormula( "=Apples+Oranges" ); } -// ________________________________________________________________ + /** Helper for doDatabaseSamples: get name of first database. */ private String getFirstDatabaseName() @@ -1221,7 +1221,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper System.out.println("can't get database"); } -// ________________________________________________________________ + private void doDataPilotSamples() throws Exception { @@ -1270,7 +1270,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper xFieldProp.setPropertyValue( "Function", com.sun.star.sheet.GeneralFunction.AVERAGE ); } -// ________________________________________________________________ + private void doFunctionAccessSamples() throws RuntimeException, Exception { @@ -1322,7 +1322,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper System.out.println(); } -// ________________________________________________________________ + private void doApplicationSettingsSamples() throws RuntimeException, Exception { @@ -1345,6 +1345,6 @@ public class SpreadsheetSample extends SpreadsheetDocHelper System.out.println( aEntries[i] ); } -// ________________________________________________________________ + } diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java b/odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java index 8b4e8afaef10..d522b09cde5a 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java @@ -41,7 +41,7 @@ import com.sun.star.uno.UnoRuntime; public class ViewSample extends SpreadsheetDocHelper { -// ________________________________________________________________ + public static void main( String args[] ) { @@ -59,14 +59,14 @@ public class ViewSample extends SpreadsheetDocHelper System.exit( 0 ); } -// ________________________________________________________________ + public ViewSample( String[] args ) { super( args ); } -// ________________________________________________________________ + /** This sample function performs all changes on the view. */ public void doSampleFunction() throws Exception @@ -126,7 +126,7 @@ public class ViewSample extends SpreadsheetDocHelper } } -// ________________________________________________________________ + // listener to react on finished selection @@ -156,6 +156,6 @@ public class ViewSample extends SpreadsheetDocHelper } } -// ________________________________________________________________ + } diff --git a/odk/examples/DevelopersGuide/UCB/ChildrenRetriever.java b/odk/examples/DevelopersGuide/UCB/ChildrenRetriever.java index 03a45bae9c23..af37982133f7 100644 --- a/odk/examples/DevelopersGuide/UCB/ChildrenRetriever.java +++ b/odk/examples/DevelopersGuide/UCB/ChildrenRetriever.java @@ -141,9 +141,9 @@ public class ChildrenRetriever { result = new ArrayList<ArrayList<Object>>(); - ///////////////////////////////////////////////////////////////////// + // Iterate over children, access children and property values... - ///////////////////////////////////////////////////////////////////// + // Move to begin. if ( resultSet.first() ) { diff --git a/odk/examples/DevelopersGuide/UCB/DataStreamRetriever.java b/odk/examples/DevelopersGuide/UCB/DataStreamRetriever.java index 84529ab39533..e83a307e3e83 100644 --- a/odk/examples/DevelopersGuide/UCB/DataStreamRetriever.java +++ b/odk/examples/DevelopersGuide/UCB/DataStreamRetriever.java @@ -159,9 +159,9 @@ public class DataStreamRetriever { public void printStream( XInputStream data ) throws com.sun.star.uno.Exception { - ///////////////////////////////////////////////////////////////////// + // Read data from input stream...65536 - ///////////////////////////////////////////////////////////////////// + // Data buffer. Will be allocated by input stream implementation! byte[][] buffer = new byte[ 1 ][ 65536 ]; diff --git a/odk/examples/DevelopersGuide/UCB/Helper.java b/odk/examples/DevelopersGuide/UCB/Helper.java index 7bde0ce47e6e..0a53a2d4d574 100644 --- a/odk/examples/DevelopersGuide/UCB/Helper.java +++ b/odk/examples/DevelopersGuide/UCB/Helper.java @@ -147,17 +147,17 @@ public class Helper { Object executeCommand( XInterface ifc, String commandName, Object argument ) throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception { - ///////////////////////////////////////////////////////////////////// + // Obtain command processor interface from given content. - ///////////////////////////////////////////////////////////////////// + XCommandProcessor cmdProcessor = UnoRuntime.queryInterface( XCommandProcessor.class, ifc ); - ///////////////////////////////////////////////////////////////////// + // Assemble command to execute. - ///////////////////////////////////////////////////////////////////// + Command command = new Command(); command.Name = commandName; diff --git a/odk/examples/DevelopersGuide/UCB/ResourceCreator.java b/odk/examples/DevelopersGuide/UCB/ResourceCreator.java index c78710881698..566266246e77 100644 --- a/odk/examples/DevelopersGuide/UCB/ResourceCreator.java +++ b/odk/examples/DevelopersGuide/UCB/ResourceCreator.java @@ -160,9 +160,9 @@ public class ResourceCreator { if ( newContent != null ) { - ///////////////////////////////////////////////////////////////////// + // Set mandatory properties... - ///////////////////////////////////////////////////////////////////// + // Define property value sequence. PropertyValue[] props = new PropertyValue[ 1 ]; @@ -175,9 +175,9 @@ public class ResourceCreator { // Execute command "setPropertyValues". m_helper.executeCommand( newContent, "setPropertyValues", props ); - ///////////////////////////////////////////////////////////////////// + // Write the new file to disk... - ///////////////////////////////////////////////////////////////////// + // Obtain document data for the new file. XInputStream data = stream; diff --git a/odk/examples/DevelopersGuide/UCB/ResourceManager.java b/odk/examples/DevelopersGuide/UCB/ResourceManager.java index eb48a151f2a5..3ab7bbeecd5b 100644 --- a/odk/examples/DevelopersGuide/UCB/ResourceManager.java +++ b/odk/examples/DevelopersGuide/UCB/ResourceManager.java @@ -119,9 +119,9 @@ public class ResourceManager { ( transOperation.equals( "copy" ) || transOperation.equals( "move" ) || transOperation.equals( "link" ))) { - ///////////////////////////////////////////////////////////////////// + // Copy, move or create a link for a resource to another location... - ///////////////////////////////////////////////////////////////////// + GlobalTransferCommandArgument arg = new GlobalTransferCommandArgument(); if ( transOperation.equals( "copy" )) { arg.Operation = TransferCommandOperation.COPY; diff --git a/odk/examples/DevelopersGuide/UCB/ResourceRemover.java b/odk/examples/DevelopersGuide/UCB/ResourceRemover.java index f08740889cdb..560132acbf0e 100644 --- a/odk/examples/DevelopersGuide/UCB/ResourceRemover.java +++ b/odk/examples/DevelopersGuide/UCB/ResourceRemover.java @@ -80,9 +80,9 @@ public class ResourceRemover { boolean result = false; if ( m_content != null ) { - ///////////////////////////////////////////////////////////////////// + // Destroy a resource physically... - ///////////////////////////////////////////////////////////////////// + Boolean deletePhysically = new Boolean( true ); |