summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-06-09 13:30:49 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-06-11 09:34:00 +0000
commitefd4bfa818e262d7dc219ac3ceb85526fedc732c (patch)
tree932b54f6c3689d3c087f4f3911f66695c8817229 /odk/examples/DevelopersGuide
parenta6f4fde8baf3eeb36820d18ffad84192e995145f (diff)
java:regulatize the order of 'final' and public/private
Make the order be 'public static' or 'private static' Just makes the code nicer to read. Change-Id: I182424bda45a2d68642e5d04c6091d268ace1fe2 Reviewed-on: https://gerrit.libreoffice.org/16202 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'odk/examples/DevelopersGuide')
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java2
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java2
-rw-r--r--odk/examples/DevelopersGuide/Drawing/Helper.java4
-rw-r--r--odk/examples/DevelopersGuide/Drawing/PageHelper.java22
-rw-r--r--odk/examples/DevelopersGuide/Forms/DocumentHelper.java2
-rw-r--r--odk/examples/DevelopersGuide/Forms/FLTools.java6
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java2
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java6
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/MenuElement.java4
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java8
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java16
11 files changed, 37 insertions, 37 deletions
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
index a969253bc9c4..08633ee67bc3 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
@@ -64,7 +64,7 @@ public class ProtocolHandlerAddon {
/** The service name, that must be used to get an instance of this service.
*/
- static private final String[] m_serviceNames = { "com.sun.star.frame.ProtocolHandler" };
+ private static final String[] m_serviceNames = { "com.sun.star.frame.ProtocolHandler" };
/** The component context, that gives access to the service manager and all registered services.
*/
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
index 02ca5d9c02b0..5839875b4e86 100644
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
+++ b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
@@ -50,7 +50,7 @@ public class LicenseTest {
implements XServiceInfo {
/** The service name, that must be used to get an instance of this service.
*/
- static private final String __serviceName =
+ private static final String __serviceName =
"org.openoffice.LicenseTest";
/** This method returns an array of all supported service names.
diff --git a/odk/examples/DevelopersGuide/Drawing/Helper.java b/odk/examples/DevelopersGuide/Drawing/Helper.java
index a232e9418be4..a904675d9a95 100644
--- a/odk/examples/DevelopersGuide/Drawing/Helper.java
+++ b/odk/examples/DevelopersGuide/Drawing/Helper.java
@@ -47,7 +47,7 @@ public class Helper
* A new connection is established and the service manger from the running
* offic eis returned.
*/
- static public XComponentContext connect()
+ public static XComponentContext connect()
throws Exception
{
// get the remote office component context
@@ -62,7 +62,7 @@ public class Helper
/** creates and instantiates new document
*/
- static public com.sun.star.lang.XComponent createDocument(
+ public static com.sun.star.lang.XComponent createDocument(
com.sun.star.uno.XComponentContext xOfficeContext,
String sURL, String sTargetFrame, int nSearchFlags,
com.sun.star.beans.PropertyValue[] aArgs )
diff --git a/odk/examples/DevelopersGuide/Drawing/PageHelper.java b/odk/examples/DevelopersGuide/Drawing/PageHelper.java
index cbf8d9cdcfd3..02e46d7bc8f0 100644
--- a/odk/examples/DevelopersGuide/Drawing/PageHelper.java
+++ b/odk/examples/DevelopersGuide/Drawing/PageHelper.java
@@ -60,7 +60,7 @@ public class PageHelper
/** get the page count for standard pages
*/
- static public int getDrawPageCount( XComponent xComponent )
+ public static int getDrawPageCount( XComponent xComponent )
{
XDrawPagesSupplier xDrawPagesSupplier =
UnoRuntime.queryInterface(
@@ -71,7 +71,7 @@ public class PageHelper
/** get draw page by index
*/
- static public XDrawPage getDrawPageByIndex( XComponent xComponent, int nIndex )
+ public static XDrawPage getDrawPageByIndex( XComponent xComponent, int nIndex )
throws com.sun.star.lang.IndexOutOfBoundsException,
com.sun.star.lang.WrappedTargetException
{
@@ -85,7 +85,7 @@ public class PageHelper
/** creates and inserts a draw page into the giving position,
the method returns the new created page
*/
- static public XDrawPage insertNewDrawPageByIndex( XComponent xComponent, int nIndex )
+ public static XDrawPage insertNewDrawPageByIndex( XComponent xComponent, int nIndex )
throws Exception
{
XDrawPagesSupplier xDrawPagesSupplier =
@@ -99,7 +99,7 @@ public class PageHelper
/** get size of the given page
*/
- static public Size getPageSize( XDrawPage xDrawPage )
+ public static Size getPageSize( XDrawPage xDrawPage )
throws com.sun.star.beans.UnknownPropertyException,
com.sun.star.lang.WrappedTargetException
{
@@ -113,7 +113,7 @@ public class PageHelper
/** get the page count for master pages
*/
- static public int getMasterPageCount( XComponent xComponent )
+ public static int getMasterPageCount( XComponent xComponent )
{
XMasterPagesSupplier xMasterPagesSupplier =
UnoRuntime.queryInterface(
@@ -124,7 +124,7 @@ public class PageHelper
/** get master page by index
*/
- static public XDrawPage getMasterPageByIndex( XComponent xComponent, int nIndex )
+ public static XDrawPage getMasterPageByIndex( XComponent xComponent, int nIndex )
throws com.sun.star.lang.IndexOutOfBoundsException,
com.sun.star.lang.WrappedTargetException
{
@@ -138,7 +138,7 @@ public class PageHelper
/** creates and inserts a new master page into the giving position,
the method returns the new created page
*/
- static public XDrawPage insertNewMasterPageByIndex( XComponent xComponent, int nIndex )
+ public static XDrawPage insertNewMasterPageByIndex( XComponent xComponent, int nIndex )
{
XMasterPagesSupplier xMasterPagesSupplier =
UnoRuntime.queryInterface(
@@ -153,7 +153,7 @@ public class PageHelper
/** sets given masterpage at the drawpage
*/
- static public void setMasterPage( XDrawPage xDrawPage, XDrawPage xMasterPage )
+ public static void setMasterPage( XDrawPage xDrawPage, XDrawPage xMasterPage )
{
XMasterPageTarget xMasterPageTarget =
UnoRuntime.queryInterface(
@@ -167,7 +167,7 @@ public class PageHelper
This is important, because only presentation documents
have notes and handout pages
*/
- static public boolean isImpressDocument( XComponent xComponent )
+ public static boolean isImpressDocument( XComponent xComponent )
{
XServiceInfo xInfo = UnoRuntime.queryInterface(
XServiceInfo.class, xComponent );
@@ -176,7 +176,7 @@ public class PageHelper
/** in impress documents each normal draw page has a corresponding notes page
*/
- static public XDrawPage getNotesPage( XDrawPage xDrawPage )
+ public static XDrawPage getNotesPage( XDrawPage xDrawPage )
{
XPresentationPage aPresentationPage =
UnoRuntime.queryInterface(
@@ -186,7 +186,7 @@ public class PageHelper
/** in impress each documents has one handout page
*/
- static public XDrawPage getHandoutMasterPage( XComponent xComponent )
+ public static XDrawPage getHandoutMasterPage( XComponent xComponent )
{
XHandoutMasterSupplier aHandoutMasterSupplier =
UnoRuntime.queryInterface(
diff --git a/odk/examples/DevelopersGuide/Forms/DocumentHelper.java b/odk/examples/DevelopersGuide/Forms/DocumentHelper.java
index 3bae7b154847..173433499e28 100644
--- a/odk/examples/DevelopersGuide/Forms/DocumentHelper.java
+++ b/odk/examples/DevelopersGuide/Forms/DocumentHelper.java
@@ -175,7 +175,7 @@ public class DocumentHelper
/* ------------------------------------------------------------------ */
/** retrieves the document model which a given form component belongs to
*/
- static public DocumentHelper getDocumentForComponent( Object aFormComponent, XComponentContext xCtx )
+ public static DocumentHelper getDocumentForComponent( Object aFormComponent, XComponentContext xCtx )
{
XChild xChild = UnoRuntime.queryInterface( XChild.class, aFormComponent );
XModel xModel = null;
diff --git a/odk/examples/DevelopersGuide/Forms/FLTools.java b/odk/examples/DevelopersGuide/Forms/FLTools.java
index cef9e4e1f32d..4e1aa9a8d710 100644
--- a/odk/examples/DevelopersGuide/Forms/FLTools.java
+++ b/odk/examples/DevelopersGuide/Forms/FLTools.java
@@ -120,7 +120,7 @@ public class FLTools
/* ------------------------------------------------------------------ */
/** disposes the component given
*/
- static public void disposeComponent( Object xComp ) throws java.lang.RuntimeException
+ public static void disposeComponent( Object xComp ) throws java.lang.RuntimeException
{
XComponent xComponent = UnoRuntime.queryInterface( XComponent.class,
xComp );
@@ -131,7 +131,7 @@ public class FLTools
/* ------------------------------------------------------------------ */
/** get's the XControlModel for a control
*/
- static public <T> T getModel( Object aControl, Class<T> aInterfaceClass )
+ public static <T> T getModel( Object aControl, Class<T> aInterfaceClass )
{
XControl xControl = UnoRuntime.queryInterface(
XControl.class, aControl );
@@ -149,7 +149,7 @@ public class FLTools
forms container; and it is able to classify grid columns (which are no form components)
as well.</p>
*/
- static public String classifyFormComponentType( XPropertySet xComponent ) throws com.sun.star.uno.Exception
+ public static String classifyFormComponentType( XPropertySet xComponent ) throws com.sun.star.uno.Exception
{
String sType = "<unknown component>";
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java b/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
index 406cdcb69866..89bf023eadde 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
@@ -50,7 +50,7 @@ public class DisableCommandsTest {
/*
* A list of command names
*/
- final static private String[] aCommandURLTestSet =
+ final private static String[] aCommandURLTestSet =
{
"Open",
"About",
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java
index d999bd2df718..19e307ffa761 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java
@@ -59,9 +59,9 @@ public class FlatXml implements XImportFilter, XExportFilter, XServiceName,
private XExtendedDocumentHandler m_xHandler;
private static final boolean m_bPrettyPrint = true;
- static private final String __serviceName = "devguide.officedev.samples.filter.FlatXmlJava";
- static private final String __implName = "FlatXml";
- static private final String[] __supportedServiceNames = {
+ private static final String __serviceName = "devguide.officedev.samples.filter.FlatXmlJava";
+ private static final String __implName = "FlatXml";
+ private static final String[] __supportedServiceNames = {
"devguide.officedev.samples.filter.FlatXmlJava"
};
diff --git a/odk/examples/DevelopersGuide/OfficeDev/MenuElement.java b/odk/examples/DevelopersGuide/OfficeDev/MenuElement.java
index fa351f1c7f5e..40b483b8f350 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/MenuElement.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/MenuElement.java
@@ -37,7 +37,7 @@ import com.sun.star.uno.UnoRuntime;
// A helper class to determine the menu element type
public class MenuElement
{
- static public boolean IsMenuEntry( com.sun.star.beans.XPropertySet xMenuElement ) {
+ public static boolean IsMenuEntry( com.sun.star.beans.XPropertySet xMenuElement ) {
com.sun.star.lang.XServiceInfo xServiceInfo =
UnoRuntime.queryInterface(
com.sun.star.lang.XServiceInfo.class, xMenuElement );
@@ -45,7 +45,7 @@ public class MenuElement
return xServiceInfo.supportsService( "com.sun.star.ui.ActionTrigger" );
}
- static public boolean IsMenuSeparator( com.sun.star.beans.XPropertySet xMenuElement ) {
+ public static boolean IsMenuSeparator( com.sun.star.beans.XPropertySet xMenuElement ) {
com.sun.star.lang.XServiceInfo xServiceInfo =
UnoRuntime.queryInterface(
com.sun.star.lang.XServiceInfo.class, xMenuElement );
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
index e6d6830a48ed..5c9a2b2f5611 100644
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
+++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
@@ -108,15 +108,15 @@ class ExampleAddInThread extends Thread
public class ExampleAddIn
{
- static public class _ExampleAddIn extends com.sun.star.lib.uno.helper.WeakBase
+ public static class _ExampleAddIn extends com.sun.star.lib.uno.helper.WeakBase
implements org.openoffice.sheet.addin.XExampleAddIn,
com.sun.star.sheet.XAddIn,
com.sun.star.lang.XServiceName,
com.sun.star.lang.XServiceInfo
{
- static private final String aExampleService = "org.openoffice.sheet.addin.ExampleAddIn";
- static private final String aAddInService = "com.sun.star.sheet.AddIn";
- static private final String aImplName = _ExampleAddIn.class.getName();
+ private static final String aExampleService = "org.openoffice.sheet.addin.ExampleAddIn";
+ private static final String aAddInService = "com.sun.star.sheet.AddIn";
+ private static final String aImplName = _ExampleAddIn.class.getName();
private static final short FUNCTION_INVALID = -1;
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java
index bea38f1ef896..5fab2ab13c7f 100644
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java
+++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java
@@ -40,13 +40,13 @@ import com.sun.star.sheet.DataPilotFieldFilter;
class ExampleSettings
{
- static public final int nDimensionCount = 6;
- static public final int nValueDimension = 4;
- static public final int nDataDimension = 5;
- static public final String [] aDimensionNames = {
+ public static final int nDimensionCount = 6;
+ public static final int nValueDimension = 4;
+ public static final int nDataDimension = 5;
+ public static final String [] aDimensionNames = {
"ones", "tens", "hundreds", "thousands", "value", "" };
- static public final String getMemberName( int nMember )
+ public static final String getMemberName( int nMember )
{
return String.valueOf( nMember );
}
@@ -752,7 +752,7 @@ public class ExampleDataPilotSource
{
// implementation of com.sun.star.sheet.DataPilotSource
- static public class _ExampleDataPilotSource implements
+ public static class _ExampleDataPilotSource implements
com.sun.star.sheet.XDimensionsSupplier,
com.sun.star.sheet.XDataPilotResults,
com.sun.star.util.XRefreshable,
@@ -760,8 +760,8 @@ public class ExampleDataPilotSource
com.sun.star.lang.XInitialization,
com.sun.star.lang.XServiceInfo
{
- static private final String aServiceName = "com.sun.star.sheet.DataPilotSource";
- static private final String aImplName = _ExampleDataPilotSource.class.getName();
+ private static final String aServiceName = "com.sun.star.sheet.DataPilotSource";
+ private static final String aImplName = _ExampleDataPilotSource.class.getName();
private final ExampleSettings aSettings = new ExampleSettings();
private ExampleDimensions aDimensions;