summaryrefslogtreecommitdiff
path: root/odk/examples
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-04 16:12:55 +0200
committerNoel Grandin <noel@peralex.com>2014-08-05 11:31:49 +0200
commitf124688cfdfbe96ff2be5ab44ea5023725548146 (patch)
tree4874bf2b2504979b9733f200e05b68034c7eaefe /odk/examples
parent36a74fe54a0cd99372ea646af31ce41ac5ec5b08 (diff)
java: remove various unused variables
Change-Id: Id9f30938f594cb6fe73bf40adfffa65ec1b42cd1
Diffstat (limited to 'odk/examples')
-rw-r--r--odk/examples/DevelopersGuide/GUI/MessageBox.java8
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoDialogSample.java4
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoMenu.java4
-rw-r--r--odk/examples/java/Storage/TestHelper.java2
4 files changed, 3 insertions, 15 deletions
diff --git a/odk/examples/DevelopersGuide/GUI/MessageBox.java b/odk/examples/DevelopersGuide/GUI/MessageBox.java
index 63b2d03d7511..c43b4743b290 100644
--- a/odk/examples/DevelopersGuide/GUI/MessageBox.java
+++ b/odk/examples/DevelopersGuide/GUI/MessageBox.java
@@ -176,7 +176,7 @@ public class MessageBox {
XMessageBox xMessageBox = xMessageBoxFactory.createMessageBox(_xParentWindowPeer, MessageBoxType.ERRORBOX, com.sun.star.awt.MessageBoxButtons.BUTTONS_OK, _sTitle, _sMessage);
xComponent = UnoRuntime.queryInterface(XComponent.class, xMessageBox);
if (xMessageBox != null){
- short nResult = xMessageBox.execute();
+ xMessageBox.execute();
}
} catch (com.sun.star.uno.Exception ex) {
ex.printStackTrace(System.err);
@@ -216,23 +216,17 @@ public class MessageBox {
public static int getRedColorShare(int _nColor) {
int nRed = _nColor/65536;
int nRedModulo = _nColor % 65536;
- int nGreen = nRedModulo / 256;
- int nGreenModulo = (nRedModulo % 256);
- int nBlue = nGreenModulo;
return nRed;
}
public static int getGreenColorShare(int _nColor) {
- int nRed = _nColor/65536;
int nRedModulo = _nColor % 65536;
int nGreen = nRedModulo / 256;
return nGreen;
}
public static int getBlueColorShare(int _nColor) {
- int nRed = _nColor/65536;
int nRedModulo = _nColor % 65536;
- int nGreen = nRedModulo / 256;
int nGreenModulo = (nRedModulo % 256);
int nBlue = nGreenModulo;
return nBlue;
diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
index aef248ba5c89..a5097b1d0621 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
@@ -859,7 +859,6 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
public static String createUniqueName(XNameAccess _xElementContainer, String _sElementName) {
boolean bElementexists = true;
int i = 1;
- String sIncSuffix = "";
String BaseName = _sElementName;
while (bElementexists) {
bElementexists = _xElementContainer.hasByName(_sElementName);
@@ -1473,9 +1472,6 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
public void keyReleased(KeyEvent keyEvent) {
- int i = keyEvent.KeyChar;
- int n = keyEvent.KeyCode;
- int m = keyEvent.KeyFunc;
}
public void keyPressed(KeyEvent keyEvent) {
diff --git a/odk/examples/DevelopersGuide/GUI/UnoMenu.java b/odk/examples/DevelopersGuide/GUI/UnoMenu.java
index 3c424d60eaed..8f915bdb2761 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoMenu.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoMenu.java
@@ -175,14 +175,12 @@ public UnoMenu(XComponentContext _xContext, XMultiComponentFactory _xMCF) {
}
public void itemHighlighted(MenuEvent menuEvent) {
- int i = 0;
}
public void itemDeactivated(MenuEvent menuEvent) {
- int i = 0; }
+ }
public void itemActivated(MenuEvent menuEvent) {
- int i = 0;
}
}
diff --git a/odk/examples/java/Storage/TestHelper.java b/odk/examples/java/Storage/TestHelper.java
index ac0c3b9c2d03..02a1bad0893a 100644
--- a/odk/examples/java/Storage/TestHelper.java
+++ b/odk/examples/java/Storage/TestHelper.java
@@ -516,7 +516,7 @@ public class TestHelper {
pWrongPass[0] += pPass[0];
try
{
- Object oSubStream = xParentStorage.openEncryptedStreamElement( sName, ElementModes.READ, new String(pWrongPass) );
+ xParentStorage.openEncryptedStreamElement( sName, ElementModes.READ, new String(pWrongPass) );
Error( "Encrypted stream '" + sName + "' was opened with wrong password!" );
return false;
}