summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-04-26 08:36:04 +0200
committerNoel Grandin <noel@peralex.com>2013-04-26 08:36:04 +0200
commit6f17a2f66fa2a4fec56334783410005c4f2f357a (patch)
tree728696d0f0603783e8d50b9c4c7b43f3016d51ce /odk
parent6d4c1f0d4a623bf7f3b3a0af2ece5c969d5aec77 (diff)
Java cleanup, access static methods using correct syntax
Change-Id: I8443aef43d82de33ac7cb47d40cc5b544f7c9c87
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/java/Inspector/Inspector.java2
-rw-r--r--odk/examples/java/Inspector/SourceCodeGenerator.java14
-rw-r--r--odk/examples/java/Spreadsheet/ChartTypeChange.java2
-rw-r--r--odk/examples/java/ToDo/ToDo.java50
4 files changed, 34 insertions, 34 deletions
diff --git a/odk/examples/java/Inspector/Inspector.java b/odk/examples/java/Inspector/Inspector.java
index a9ceb1c5a3a2..3b5052d7041b 100644
--- a/odk/examples/java/Inspector/Inspector.java
+++ b/odk/examples/java/Inspector/Inspector.java
@@ -129,7 +129,7 @@ public class Inspector{
public String getIDLPath(){
String sRetPath = getSDKPath();
if (m_oIntrospector.isValidSDKInstallationPath(sRetPath)){
- sRetPath = m_oIntrospector.addToPath(sRetPath, sIDLDOCUMENTSUBFOLDER);
+ sRetPath = Introspector.addToPath(sRetPath, sIDLDOCUMENTSUBFOLDER);
}
else{
sRetPath = "";
diff --git a/odk/examples/java/Inspector/SourceCodeGenerator.java b/odk/examples/java/Inspector/SourceCodeGenerator.java
index 0601da98b4a8..45431bd86f38 100644
--- a/odk/examples/java/Inspector/SourceCodeGenerator.java
+++ b/odk/examples/java/Inspector/SourceCodeGenerator.java
@@ -613,7 +613,7 @@ class UnoObjectDefinition{
case TypeClass.INTERFACE_METHOD_value:
case TypeClass.INTERFACE_value:
case TypeClass.PROPERTY_value:
- String sShortClassName = m_oIntrospector.getShortClassName(getTypeName());
+ String sShortClassName = Introspector.getShortClassName(getTypeName());
sCentralVariableStemName = getVariableNameforUnoObject(sShortClassName);
default:
sCentralVariableStemName = SVARIABLENAME;
@@ -726,7 +726,7 @@ class UnoObjectDefinition{
case TypeClass.INTERFACE_METHOD_value:
case TypeClass.INTERFACE_value:
case TypeClass.PROPERTY_value:
- String sShortClassName = m_oIntrospector.getShortClassName(getTypeName());
+ String sShortClassName = Introspector.getShortClassName(getTypeName());
sVariableStemName = getVariableNameforUnoObject(sShortClassName);
default:
}
@@ -999,7 +999,7 @@ class UnoObjectDefinition{
}
public String getqueryInterfaceSourceCode(String _sClassName, String _sReturnVariableName, String _sIncomingObjectName){
- String sShortClassName = m_oIntrospector.getShortClassName(_sClassName);
+ String sShortClassName = Introspector.getShortClassName(_sClassName);
return "\t" + _sReturnVariableName + " = (" + sShortClassName + ") UnoRuntime.queryInterface(" + sShortClassName + ".class, " + _sIncomingObjectName + ");\n";
}
@@ -1020,7 +1020,7 @@ class UnoObjectDefinition{
sReturn = _sClassName;
}
else{
- sReturn = m_oIntrospector.getShortClassName(_sClassName);
+ sReturn = Introspector.getShortClassName(_sClassName);
}
return sReturn;
}
@@ -1562,9 +1562,9 @@ class UnoObjectDefinition{
sReturn = _sClassName.replace('.', '/');
}
else{
- String sModuleName = m_oIntrospector.getModuleName(_sClassName);
- sModuleName = m_oIntrospector.getShortClassName(sModuleName);
- sReturn = getCSSNameSpaceString() + "::" + sModuleName + "::" + m_oIntrospector.getShortClassName(_sClassName);
+ String sModuleName = Introspector.getModuleName(_sClassName);
+ sModuleName = Introspector.getShortClassName(sModuleName);
+ sReturn = getCSSNameSpaceString() + "::" + sModuleName + "::" + Introspector.getShortClassName(_sClassName);
}
return sReturn;
}
diff --git a/odk/examples/java/Spreadsheet/ChartTypeChange.java b/odk/examples/java/Spreadsheet/ChartTypeChange.java
index 98a143762cab..9638fd0ba865 100644
--- a/odk/examples/java/Spreadsheet/ChartTypeChange.java
+++ b/odk/examples/java/Spreadsheet/ChartTypeChange.java
@@ -250,7 +250,7 @@ public class ChartTypeChange {
for ( int intX = 0; intX < stringValues[ intY ].length;
intX++ ) {
// Insert the value to the cell, specified by intY and intX.
- this.insertIntoCell( intY, intX,
+ ChartTypeChange.insertIntoCell( intY, intX,
stringValues[ intY ][ intX ], xspreadsheet, "" );
}
}
diff --git a/odk/examples/java/ToDo/ToDo.java b/odk/examples/java/ToDo/ToDo.java
index 98ece6192583..fa457156978a 100644
--- a/odk/examples/java/ToDo/ToDo.java
+++ b/odk/examples/java/ToDo/ToDo.java
@@ -231,29 +231,29 @@ public class ToDo {
new Object[][] { objectSortedHolidays };
// Row index
- int intRowTo = this.INT_ROW_FROM - 1;
+ int intRowTo = ToDoImpl.INT_ROW_FROM - 1;
// Getting the feature of the first cell
String sFeature = this.getStringFromCell(xcellrange,
intRowTo + 1,
- this.INT_COLUMN_FEATURE);
+ ToDoImpl.INT_COLUMN_FEATURE);
// Determine the last row with an entry in the first column
while ( ( sFeature != null ) &&
( !sFeature.equals( "" ) ) ) {
intRowTo++;
sFeature = this.getStringFromCell( xcellrange,
- intRowTo + 1, this.INT_COLUMN_FEATURE );
+ intRowTo + 1, ToDoImpl.INT_COLUMN_FEATURE );
}
// Setting the last row to be calculated
final int INT_ROW_TO = intRowTo + 1;
// Deleting cells which will be recalculated
- for ( int intRow = this.INT_ROW_FROM; intRow < INT_ROW_TO + 5;
+ for ( int intRow = ToDoImpl.INT_ROW_FROM; intRow < INT_ROW_TO + 5;
intRow++ ) {
- for ( int intColumn = this.INT_COLUMN_STARTDATE;
- intColumn <= this.INT_COLUMN_END_DAY_OF_WEEK;
+ for ( int intColumn = ToDoImpl.INT_COLUMN_STARTDATE;
+ intColumn <= ToDoImpl.INT_COLUMN_END_DAY_OF_WEEK;
intColumn++ ) {
this.setStringToCell(xcellrange, intRow, intColumn, "");
}
@@ -261,13 +261,13 @@ public class ToDo {
/* Clearing the background color of the due date cells and setting
the hyperlink to the bugtracker */
- for (int intRow = this.INT_ROW_FROM; intRow < INT_ROW_TO; intRow++)
+ for (int intRow = ToDoImpl.INT_ROW_FROM; intRow < INT_ROW_TO; intRow++)
{
// Querying for the interface XPropertySet for the cell
// providing the due date
XPropertySet xpropertyset = UnoRuntime.queryInterface(XPropertySet.class,
xcellrange.getCellByPosition(
- this.INT_COLUMN_DUEDATE,
+ ToDoImpl.INT_COLUMN_DUEDATE,
intRow ));
// Changing the background color of the cell to white
@@ -276,7 +276,7 @@ public class ToDo {
// Getting the cell of the bug id
XCell xcell = xcellrange.getCellByPosition(
- this.INT_COLUMN_FEATURE, intRow );
+ ToDoImpl.INT_COLUMN_FEATURE, intRow );
// Querying for the interface XSimpleText
XSimpleText xsimpletext = UnoRuntime.queryInterface( XSimpleText.class, xcell );
@@ -333,7 +333,7 @@ public class ToDo {
}
// Processing all features/bugs in the table
- for (int intRow = this.INT_ROW_FROM; intRow < INT_ROW_TO; intRow++)
+ for (int intRow = ToDoImpl.INT_ROW_FROM; intRow < INT_ROW_TO; intRow++)
{
// Getting the cell of the column "Needed Days" in the
// current row
@@ -345,7 +345,7 @@ public class ToDo {
// Getting the content of a specified cell
String sStatus = this.getStringFromCell( xcellrange,
- intRow, this.INT_COLUMN_STATUS );
+ intRow, ToDoImpl.INT_COLUMN_STATUS );
/* Testing if the number of needed days is greater than
zero and if
@@ -365,13 +365,13 @@ public class ToDo {
// Set the start date in the specified cell of the table
this.setStringToCell(xcellrange, intRow,
- this.INT_COLUMN_STARTDATE, sDate);
+ ToDoImpl.INT_COLUMN_STARTDATE, sDate);
// For the start day set the day of week in the specified
// cell of the table
this.setDayOfWeek( gregCalStartDate,
xcellrange, intRow,
- this.INT_COLUMN_START_DAY_OF_WEEK );
+ ToDoImpl.INT_COLUMN_START_DAY_OF_WEEK );
// Getting the end date after a specified number of workdays
GregorianCalendar gregCalEndDate =
@@ -385,12 +385,12 @@ public class ToDo {
// Set the end date in the specified cell of the table
this.setStringToCell( xcellrange, intRow,
- this.INT_COLUMN_ENDDATE, sDate );
+ ToDoImpl.INT_COLUMN_ENDDATE, sDate );
// For the end day set the day of week in the specified
// cell of the table
this.setDayOfWeek(gregCalEndDate, xcellrange,
- intRow, this.INT_COLUMN_END_DAY_OF_WEEK);
+ intRow, ToDoImpl.INT_COLUMN_END_DAY_OF_WEEK);
// Set the initial date for the next loop
gregCalStartDate = ( GregorianCalendar )
@@ -398,7 +398,7 @@ public class ToDo {
// Get the due date from the table
String sDueDate = this.getStringFromCell(
- xcellrange, intRow, this.INT_COLUMN_DUEDATE );
+ xcellrange, intRow, ToDoImpl.INT_COLUMN_DUEDATE );
// Testing if the due date is not empty
if ( !sDueDate.equals( "" ) ) {
@@ -427,7 +427,7 @@ public class ToDo {
this.getGregorianCalendarFromString(
this.getStringFromCell(
xcellrange, intRowToInsert,
- this.INT_COLUMN_STARTDATE ) );
+ ToDoImpl.INT_COLUMN_STARTDATE ) );
// Testing if we have to search for an earlier date
// to begin
@@ -441,7 +441,7 @@ public class ToDo {
// the current row
String sStartDate = this.getStringFromCell(
xcellrange, intRowToInsert,
- this.INT_COLUMN_STARTDATE );
+ ToDoImpl.INT_COLUMN_STARTDATE );
// Search until a valid start date is found
while ( sStartDate.equals( "" ) ) {
@@ -452,7 +452,7 @@ public class ToDo {
// in the current row
sStartDate = this.getStringFromCell(
xcellrange, intRowToInsert,
- this.INT_COLUMN_STARTDATE );
+ ToDoImpl.INT_COLUMN_STARTDATE );
}
// Get the GregorianCalender format for the
@@ -481,7 +481,7 @@ public class ToDo {
xfunctionaccess);
String sPreviousDueDate = this.getStringFromCell(
xcellrange, intRowToInsert,
- this.INT_COLUMN_DUEDATE );
+ ToDoImpl.INT_COLUMN_DUEDATE );
GregorianCalendar gregCalPreviousDueDate = null;
@@ -499,7 +499,7 @@ public class ToDo {
XPropertySet xpropertyset = UnoRuntime.queryInterface(
XPropertySet.class,
xcellrange.getCellByPosition(
- this.INT_COLUMN_DUEDATE,
+ ToDoImpl.INT_COLUMN_DUEDATE,
intRow ) );
// Changing the background color of the cell
@@ -552,12 +552,12 @@ public class ToDo {
intRow = intRowToInsert - 1;
// Tests at which line we want to insert
- if ( intRow >= this.INT_ROW_FROM ) {
+ if ( intRow >= ToDoImpl.INT_ROW_FROM ) {
// Get the start date
gregCalStartDate =
this.getGregorianCalendarFromString(
this.getStringFromCell( xcellrange,
- intRow,this.INT_COLUMN_ENDDATE));
+ intRow,ToDoImpl.INT_COLUMN_ENDDATE));
}
else {
// Set the start date with the absolute s
@@ -845,8 +845,8 @@ public class ToDo {
XCellRange xcellrange,
XFunctionAccess xfunctionaccess ) {
try {
- int intRow = this.INT_ROW_HOLIDAYS_START;
- int intColumn = this.INT_COLUMN_HOLIDAYS_START;
+ int intRow = ToDoImpl.INT_ROW_HOLIDAYS_START;
+ int intColumn = ToDoImpl.INT_COLUMN_HOLIDAYS_START;
double dHolidayStart = xcellrange.getCellByPosition(
intColumn, intRow ).getValue();