summaryrefslogtreecommitdiff
path: root/odk
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
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')
-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
-rw-r--r--odk/examples/java/Inspector/Inspector.java4
-rw-r--r--odk/examples/java/Inspector/ProtocolHandlerAddon.java2
-rw-r--r--odk/examples/java/MinimalComponent/MinimalComponent.java2
-rw-r--r--odk/examples/java/Spreadsheet/CalcAddins.java6
-rw-r--r--odk/examples/java/ToDo/ToDo.java24
16 files changed, 56 insertions, 56 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;
diff --git a/odk/examples/java/Inspector/Inspector.java b/odk/examples/java/Inspector/Inspector.java
index a537d9c77941..fe10fac255f7 100644
--- a/odk/examples/java/Inspector/Inspector.java
+++ b/odk/examples/java/Inspector/Inspector.java
@@ -75,9 +75,9 @@ public class Inspector{
/** This class implements the method of the interface XInstanceInspector.
* Also the class implements the interfaces XServiceInfo, and XTypeProvider.
*/
- static public class _Inspector extends WeakBase implements XInstanceInspector, XServiceInfo{
+ public static class _Inspector extends WeakBase implements XInstanceInspector, XServiceInfo{
- static private final String __serviceName = "org.openoffice.InstanceInspector";
+ private static final String __serviceName = "org.openoffice.InstanceInspector";
private HashMap<String, String> aApplicationHashMap = new HashMap<String, String>();
private String sTitle = "Object Inspector";
private ArrayList<XComponent> aHiddenDocuments = new ArrayList<XComponent>();
diff --git a/odk/examples/java/Inspector/ProtocolHandlerAddon.java b/odk/examples/java/Inspector/ProtocolHandlerAddon.java
index 80e52db58f9a..5492d217d845 100644
--- a/odk/examples/java/Inspector/ProtocolHandlerAddon.java
+++ b/odk/examples/java/Inspector/ProtocolHandlerAddon.java
@@ -65,7 +65,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/java/MinimalComponent/MinimalComponent.java b/odk/examples/java/MinimalComponent/MinimalComponent.java
index 30b984c75c46..decc2417ea67 100644
--- a/odk/examples/java/MinimalComponent/MinimalComponent.java
+++ b/odk/examples/java/MinimalComponent/MinimalComponent.java
@@ -53,7 +53,7 @@ public class MinimalComponent {
implements XInitialization, 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.MinimalComponent";
/** The initial component contextr, that gives access to
diff --git a/odk/examples/java/Spreadsheet/CalcAddins.java b/odk/examples/java/Spreadsheet/CalcAddins.java
index 790a71655a35..81951954e6be 100644
--- a/odk/examples/java/Spreadsheet/CalcAddins.java
+++ b/odk/examples/java/Spreadsheet/CalcAddins.java
@@ -60,7 +60,7 @@ public class CalcAddins {
* of the service description. It implements the needed interfaces.
* @implements XCalcAddins, XAddIn, XServiceName, XServiceInfo, XTypeProvider
*/
- static private class _CalcAddins extends WeakBase implements
+ private static class _CalcAddins extends WeakBase implements
XCalcAddins,
XAddIn,
XServiceName,
@@ -69,9 +69,9 @@ public class CalcAddins {
/** The component will be registered under this name.
*/
- static private final String __serviceName = "org.openoffice.sheet.addin.CalcAddins";
+ private static final String __serviceName = "org.openoffice.sheet.addin.CalcAddins";
- static private final String ADDIN_SERVICE = "com.sun.star.sheet.AddIn";
+ private static final String ADDIN_SERVICE = "com.sun.star.sheet.AddIn";
private Locale aFuncLoc;
diff --git a/odk/examples/java/ToDo/ToDo.java b/odk/examples/java/ToDo/ToDo.java
index c22ad16ab32f..150dc1d99f10 100644
--- a/odk/examples/java/ToDo/ToDo.java
+++ b/odk/examples/java/ToDo/ToDo.java
@@ -93,21 +93,21 @@ public class ToDo {
private XMultiComponentFactory m_xMCF;
// Implementation helper variables
- static private final int INT_COLUMN_FEATURE = 0;
- static private final int INT_COLUMN_NEEDEDDAYS = 2;
- static private final int INT_COLUMN_STARTDATE = 3;
- static private final int INT_COLUMN_START_DAY_OF_WEEK = 4;
- static private final int INT_COLUMN_ENDDATE = 5;
- static private final int INT_COLUMN_END_DAY_OF_WEEK = 6;
- static private final int INT_COLUMN_DUEDATE = 7;
- static private final int INT_COLUMN_STATUS = 8;
+ private static final int INT_COLUMN_FEATURE = 0;
+ private static final int INT_COLUMN_NEEDEDDAYS = 2;
+ private static final int INT_COLUMN_STARTDATE = 3;
+ private static final int INT_COLUMN_START_DAY_OF_WEEK = 4;
+ private static final int INT_COLUMN_ENDDATE = 5;
+ private static final int INT_COLUMN_END_DAY_OF_WEEK = 6;
+ private static final int INT_COLUMN_DUEDATE = 7;
+ private static final int INT_COLUMN_STATUS = 8;
- static private final int INT_ROW_FROM = 14; // 8
+ private static final int INT_ROW_FROM = 14; // 8
- static private final int INT_ROW_HOLIDAYS_START = 4;
- static private final int INT_COLUMN_HOLIDAYS_START = 7; // 10
+ private static final int INT_ROW_HOLIDAYS_START = 4;
+ private static final int INT_COLUMN_HOLIDAYS_START = 7; // 10
- static private final String STRING_SEPARATOR = "/";
+ private static final String STRING_SEPARATOR = "/";
/** The constructor of the inner class has a XComponenContext parameter.