summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-19 14:18:44 +0200
committerNoel Grandin <noel@peralex.com>2014-08-19 14:57:16 +0200
commit56ef5533fc1bce2134721ae64d4d6c18a3526a7a (patch)
treeeafaa8b3c9c7fd4bbeb03fdb1be091f94c870953 /odk
parent1e6f0b2d8b35f856637eedf91729e522fcc633e8 (diff)
java: classes in java.lang package do not need to be fully qualified
Change-Id: I7b18f62336c3a8ca4c538b30ce04c99f202a4756
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/DevelopersGuide/Charts/CalcHelper.java2
-rw-r--r--odk/examples/DevelopersGuide/Charts/ChartInDraw.java12
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java30
-rw-r--r--odk/examples/DevelopersGuide/Forms/NumericValidator.java2
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java1
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java2
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java1
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java3
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/Lifetime/MyUnoObject.java2
-rw-r--r--odk/examples/java/Drawing/SDraw.java2
-rw-r--r--odk/examples/java/Inspector/UnoNode.java2
11 files changed, 25 insertions, 34 deletions
diff --git a/odk/examples/DevelopersGuide/Charts/CalcHelper.java b/odk/examples/DevelopersGuide/Charts/CalcHelper.java
index 5d8a80061181..fa02dc398ac0 100644
--- a/odk/examples/DevelopersGuide/Charts/CalcHelper.java
+++ b/odk/examples/DevelopersGuide/Charts/CalcHelper.java
@@ -281,7 +281,7 @@ public class CalcHelper
int nCol, nRow;
double fValue;
- double fFactor = 2.0 * java.lang.Math.PI / (nRowCount - 1);
+ double fFactor = 2.0 * Math.PI / (nRowCount - 1);
String aFormula;
// set variable factor for cos formula
diff --git a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java b/odk/examples/DevelopersGuide/Charts/ChartInDraw.java
index bf16e57bb40e..cf9822c9bdb8 100644
--- a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java
+++ b/odk/examples/DevelopersGuide/Charts/ChartInDraw.java
@@ -237,18 +237,18 @@ public class ChartInDraw
// rotate 10 degrees along the x axis
double fAngle = 10.0;
- double fCosX = java.lang.Math.cos( java.lang.Math.PI / 180.0 * fAngle );
- double fSinX = java.lang.Math.sin( java.lang.Math.PI / 180.0 * fAngle );
+ double fCosX = Math.cos( Math.PI / 180.0 * fAngle );
+ double fSinX = Math.sin( Math.PI / 180.0 * fAngle );
// rotate -20 degrees along the y axis
fAngle = -20.0;
- double fCosY = java.lang.Math.cos( java.lang.Math.PI / 180.0 * fAngle );
- double fSinY = java.lang.Math.sin( java.lang.Math.PI / 180.0 * fAngle );
+ double fCosY = Math.cos( Math.PI / 180.0 * fAngle );
+ double fSinY = Math.sin( Math.PI / 180.0 * fAngle );
// rotate -5 degrees along the z axis
fAngle = -5.0;
- double fCosZ = java.lang.Math.cos( java.lang.Math.PI / 180.0 * fAngle );
- double fSinZ = java.lang.Math.sin( java.lang.Math.PI / 180.0 * fAngle );
+ double fCosZ = Math.cos( Math.PI / 180.0 * fAngle );
+ double fSinZ = Math.sin( Math.PI / 180.0 * fAngle );
aMatrix.Line1.Column1 = fCosY * fCosZ;
aMatrix.Line1.Column2 = fCosY * -fSinZ;
diff --git a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
index c59942ce0c35..fd852f3c6fab 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
+++ b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
@@ -52,13 +52,13 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob
public final XComponentContext m_xCmpCtx;
/** the const list of supported uno service names. */
- public static final java.lang.String[] SERVICENAMES = {"com.sun.star.task.AsyncJob"};
+ public static final String[] SERVICENAMES = {"com.sun.star.task.AsyncJob"};
/** the const uno implementation name.
* It must be an unique value! The best naming schema seems to use
* a registered domain in reverse order ...
*/
- public static final java.lang.String IMPLEMENTATIONNAME = "com.sun.star.comp.framework.java.services.AsyncJob";
+ public static final String IMPLEMENTATIONNAME = "com.sun.star.comp.framework.java.services.AsyncJob";
// interface
@@ -122,8 +122,8 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob
if (lEnvironment == null)
throw new com.sun.star.lang.IllegalArgumentException("no environment");
- java.lang.String sEnvType = null;
- java.lang.String sEventName = null;
+ String sEnvType = null;
+ String sEventName = null;
com.sun.star.frame.XFrame xFrame = null;
c = lEnvironment.length;
for (int i=0; i<c; ++i)
@@ -149,7 +149,7 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob
)
)
{
- java.lang.String sMessage = "\"" + sEnvType + "\" isn't a valid value for EnvType";
+ String sMessage = "\"" + sEnvType + "\" isn't a valid value for EnvType";
throw new com.sun.star.lang.IllegalArgumentException(sMessage);
}
@@ -166,7 +166,7 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob
// do your job ...
// Here we print out all found arguments.
- java.lang.String sOut = formatOutArgs(lGenericConfig, lJobConfig, lEnvironment, lDynamicData);
+ String sOut = formatOutArgs(lGenericConfig, lJobConfig, lEnvironment, lDynamicData);
if (xFrame != null)
showInfoModal(xFrame.getContainerWindow(), "Arguments of AsyncJob initialization ...", sOut);
else
@@ -246,8 +246,8 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob
*/
private void showInfoModal( com.sun.star.awt.XWindow xParent ,
- java.lang.String sTitle ,
- java.lang.String sMessage )
+ String sTitle ,
+ String sMessage )
{
try
{
@@ -293,15 +293,15 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob
- private void showInfoNonModal( java.lang.String sTitle ,
- java.lang.String sMessage )
+ private void showInfoNonModal( String sTitle ,
+ String sMessage )
{
// Couldnt be implemented really using the toolkit ...
// Because we need a parent anytime.
// And showing e.g. a java dialog can make some trouble
// inside office ... but we have no chance here.
- final java.lang.String sFinalTitle = sTitle;
- final java.lang.String sFinalMessage = sMessage;
+ final String sFinalTitle = sTitle;
+ final String sFinalMessage = sMessage;
// On Mac OS X, AWT/Swing must not be accessed from the AppKit thread, so call
// SwingUtilities.invokeLater always on a fresh thread to avoid that problem
@@ -336,12 +336,12 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob
* contains optional data of a might corresponding dispatch() request
*/
- private java.lang.String formatOutArgs(com.sun.star.beans.NamedValue[] lGenericConfig,
+ private String formatOutArgs(com.sun.star.beans.NamedValue[] lGenericConfig,
com.sun.star.beans.NamedValue[] lJobConfig ,
com.sun.star.beans.NamedValue[] lEnvironment ,
com.sun.star.beans.NamedValue[] lDynamicData )
{
- java.lang.StringBuffer sOut = new java.lang.StringBuffer(1024);
+ StringBuffer sOut = new StringBuffer(1024);
sOut.append("list \"Config\": ");
if (lGenericConfig==null)
@@ -409,7 +409,7 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob
- public synchronized static com.sun.star.lang.XSingleComponentFactory __getComponentFactory(java.lang.String sImplName)
+ public synchronized static com.sun.star.lang.XSingleComponentFactory __getComponentFactory(String sImplName)
{
com.sun.star.lang.XSingleComponentFactory xFactory = null;
if (sImplName.equals(AsyncJob.IMPLEMENTATIONNAME))
diff --git a/odk/examples/DevelopersGuide/Forms/NumericValidator.java b/odk/examples/DevelopersGuide/Forms/NumericValidator.java
index 38a9972c7363..ec1f2cf96965 100644
--- a/odk/examples/DevelopersGuide/Forms/NumericValidator.java
+++ b/odk/examples/DevelopersGuide/Forms/NumericValidator.java
@@ -69,6 +69,6 @@ public class NumericValidator extends ControlValidator
private boolean isProperDigitCount( double value)
{
- return ( java.lang.Math.floor( value * 10 ) == value * 10 );
+ return ( Math.floor( value * 10 ) == value * 10 );
}
}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java
index 68524136d84a..e02af229a601 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java
@@ -34,7 +34,6 @@
import java.awt.*;
import javax.swing.*;
-import java.lang.String;
import java.awt.event.*;
/**
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java
index d89a413decff..77779e73be54 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java
@@ -34,8 +34,6 @@
// __________ Imports __________
-import java.lang.String;
-
// __________ Implementation __________
/**
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java
index f34f6f9a96cc..ae7625bfff7e 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java
@@ -36,7 +36,6 @@
import java.awt.*;
import javax.swing.*;
-import java.lang.String;
// __________ Implementation __________
diff --git a/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java b/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java
index 7990a226a20e..f6ec7bf5a280 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java
@@ -36,9 +36,6 @@
import com.sun.star.uno.UnoRuntime;
-// others
-import java.lang.String;
-
// __________ Implementation __________
/**
diff --git a/odk/examples/DevelopersGuide/ProfUNO/Lifetime/MyUnoObject.java b/odk/examples/DevelopersGuide/ProfUNO/Lifetime/MyUnoObject.java
index 62949299b37f..5f0e975bdf78 100644
--- a/odk/examples/DevelopersGuide/ProfUNO/Lifetime/MyUnoObject.java
+++ b/odk/examples/DevelopersGuide/ProfUNO/Lifetime/MyUnoObject.java
@@ -42,7 +42,7 @@ class MyUnoObject implements com.sun.star.uno.XInterface
System.out.println( "finalizer called" );
}
- public static void main( String args[] ) throws java.lang.InterruptedException
+ public static void main( String args[] ) throws InterruptedException
{
com.sun.star.uno.XInterface a = new MyUnoObject();
a = null;
diff --git a/odk/examples/java/Drawing/SDraw.java b/odk/examples/java/Drawing/SDraw.java
index f48f485854b8..a70a9288e01f 100644
--- a/odk/examples/java/Drawing/SDraw.java
+++ b/odk/examples/java/Drawing/SDraw.java
@@ -39,8 +39,6 @@
-import java.lang.Math;
-
import com.sun.star.uno.UnoRuntime;
public class SDraw {
diff --git a/odk/examples/java/Inspector/UnoNode.java b/odk/examples/java/Inspector/UnoNode.java
index 965f8aa0ad0a..c4789303dd45 100644
--- a/odk/examples/java/Inspector/UnoNode.java
+++ b/odk/examples/java/Inspector/UnoNode.java
@@ -330,7 +330,7 @@ public class UnoNode{
if ( xServiceInfo != null ) {
return xServiceInfo.getImplementationName();
}
- if (Introspector.isObjectPrimitive(_oUnoObject)){ //super.isO{sObjectClassName.equals("java.lang.String"))issClassName.equals("java.lang.String"))
+ if (Introspector.isObjectPrimitive(_oUnoObject)){ //super.isO{sObjectClassName.equals("String"))issClassName.equals("String"))
return _oUnoObject.toString();
}
else{