summaryrefslogtreecommitdiff
path: root/nlpsolver/src
diff options
context:
space:
mode:
authorAlexander Wilms <f.alexander.wilms@gmail.com>2014-02-25 19:20:44 +0100
committerDavid Tardon <dtardon@redhat.com>2014-02-26 08:43:56 -0600
commitfed2f0698c4e108c2ad65ec5a6ae8c6211c14326 (patch)
tree9894bfa7021bf9e7c9f415486cdda3e86bc1bda3 /nlpsolver/src
parentca884aab652b2eba6e05e7fae0f2d2d9a8dae5db (diff)
Remove trailing whitespace from nlpsolver
Change-Id: I8ee2aff2c18adaf5582ed6eeb174e88313d8c8a2 Reviewed-on: https://gerrit.libreoffice.org/8283 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'nlpsolver/src')
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java2
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/ResourceManager.java2
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/SCOSolverImpl.java2
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java26
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/DummyEvolutionarySolverStatusDialog.java12
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java6
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java32
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/Button.java8
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/Label.java4
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/LabeledControl.java8
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/TextAlign.java6
11 files changed, 54 insertions, 54 deletions
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java
index 77be94dae30d..e51f2e6e7de7 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java
@@ -229,7 +229,7 @@ public abstract class BaseEvolutionarySolver extends BaseNLPSolver {
ArrayList<ExtSolverConstraint> constraints = new ArrayList<ExtSolverConstraint>();
for (int i = 0; i < m_constraintCount; i++) {
Double doubleValue;
-
+
if (m_extConstraints[i].Right != null)
doubleValue = null;
else
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/ResourceManager.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/ResourceManager.java
index 1484173ff280..5acffa0a4ec2 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/ResourceManager.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/ResourceManager.java
@@ -94,5 +94,5 @@ public class ResourceManager {
return defaultValue;
}
}
-
+
}
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/SCOSolverImpl.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/SCOSolverImpl.java
index e3ce2045ebd1..67e0ce7c86a6 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/SCOSolverImpl.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/SCOSolverImpl.java
@@ -119,7 +119,7 @@ public final class SCOSolverImpl extends BaseEvolutionarySolver
if (m_solverStatusDialog.getUserState() == IEvolutionarySolverStatusDialog.CONTINUE)
lockDocument();
-
+
m_toleratedCount = 0;
m_toleratedMin = -1.0 * m_tolerance.getValue();
m_toleratedMax = m_tolerance.getValue();
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java
index b0a1ebd303ea..fec55c92a833 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java
@@ -55,7 +55,7 @@ import java.util.logging.Logger;
* It automatically loads the necessary interfaces to access OpenOffice.org dialogs.
*/
public abstract class BaseDialog extends BaseControl {
-
+
private XMultiComponentFactory xMCF;
private Object toolkit;
private XMultiServiceFactory xMSF;
@@ -63,12 +63,12 @@ public abstract class BaseDialog extends BaseControl {
protected XDialog xDialog;
protected XWindowPeer xWindowPeer;
protected ModalState modalState;
-
+
@Override
public String getName() {
return null;
}
-
+
public XMultiServiceFactory getMultiServiceFactory() {
return xMSF;
}
@@ -89,7 +89,7 @@ public abstract class BaseDialog extends BaseControl {
public Rectangle getWorkspaceDimensions() {
return getCurrentFrame().getComponentWindow().getPosSize();
}
-
+
public BaseDialog(XComponentContext context, String title, int x, int y, int width, int height) {
super(context);
modalState = ModalState.Exit;
@@ -97,7 +97,7 @@ public abstract class BaseDialog extends BaseControl {
xMCF = context.getServiceManager();
setUnoModel(xMCF.createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", context));
xMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, getUnoModel());
-
+
setProperty("Title", title);
setPosition(x, y);
setSize(width, height);
@@ -106,7 +106,7 @@ public abstract class BaseDialog extends BaseControl {
XControl xControl = UnoRuntime.queryInterface(XControl.class, unoControl);
XControlModel xControlModel = UnoRuntime.queryInterface(XControlModel.class, getUnoModel());
xControl.setModel(xControlModel);
-
+
toolkit = xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", context);
XToolkit xToolkit = UnoRuntime.queryInterface(XToolkit.class, toolkit);
xWindow = UnoRuntime.queryInterface(XWindow.class, unoControl);
@@ -114,9 +114,9 @@ public abstract class BaseDialog extends BaseControl {
XWindowPeer xParentWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, getCurrentFrame().getComponentWindow());
xControl.createPeer(xToolkit, xParentWindowPeer);
xWindowPeer = xControl.getPeer();
-
+
xDialog = UnoRuntime.queryInterface(XDialog.class, unoControl);
-
+
//center if necessary
if (x < 0 || y < 0) {
Rectangle workspacePosSize = getWorkspaceDimensions();
@@ -125,11 +125,11 @@ public abstract class BaseDialog extends BaseControl {
dialogPosSize.X = workspacePosSize.X + (workspacePosSize.Width / 2) - (dialogPosSize.Width / 2);
if (y < 0)
dialogPosSize.Y = workspacePosSize.Y + (workspacePosSize.Height / 2) - (dialogPosSize.Height / 2);
-
+
xWindow.setPosSize(dialogPosSize.X, dialogPosSize.Y,
dialogPosSize.Width, dialogPosSize.Height, PosSize.POS);
}
-
+
} catch (Exception ex) {
Logger.getLogger(BaseDialog.class.getName()).log(Level.SEVERE, null, ex);
}
@@ -141,13 +141,13 @@ public abstract class BaseDialog extends BaseControl {
xComponent.dispose();
super.finalize();
}
-
+
public ModalState showModal() {
xWindow.setVisible(true);
xDialog.execute();
return modalState;
}
-
+
public void close() {
xDialog.endExecute();
xWindow.setVisible(false);
@@ -161,5 +161,5 @@ public abstract class BaseDialog extends BaseControl {
xWindowPeer.invalidate((short)(InvalidateStyle.CHILDREN /*| InvalidateStyle.NOERASE*/ |
InvalidateStyle.UPDATE | InvalidateStyle.TRANSPARENT));
}
-
+
}
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/DummyEvolutionarySolverStatusDialog.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/DummyEvolutionarySolverStatusDialog.java
index a57b0dd0fb43..92f45b9a85fb 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/DummyEvolutionarySolverStatusDialog.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/DummyEvolutionarySolverStatusDialog.java
@@ -35,23 +35,23 @@ public class DummyEvolutionarySolverStatusDialog
}
public void setBestSolution(double solution, boolean feasible) {
-
+
}
public void setMaxIterations(int maxIterations) {
-
+
}
public void setMaxStagnation(int maxStagnation) {
-
+
}
public void setIteration(int iteration) {
-
+
}
public void setStagnation(int stagnation) {
-
+
}
public void setRuntime(long runtime) {
@@ -67,7 +67,7 @@ public class DummyEvolutionarySolverStatusDialog
}
public void dispose() {
-
+
}
}
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
index 6cb8adfaaf9a..aa9f46d1f3ad 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
@@ -225,7 +225,7 @@ public class EvolutionarySolverStatusUno extends BaseDialog
resourceManager.getLocalizedString("Message.StopIteration",
"Maximum iterations reached."));
}
-
+
if (pbStagnation.getValue() >= maxStagnation) {
lblStagnation.setTextColor(COLOR_RED);
if (userState != IEvolutionarySolverStatusDialog.CANCEL)
@@ -247,7 +247,7 @@ public class EvolutionarySolverStatusUno extends BaseDialog
pbStagnation.setVisible(false);
lblIterationValue.setVisible(true);
lblStagnationValue.setVisible(true);
-
+
repaint();
userState = IEvolutionarySolverStatusDialog.WAITING;
@@ -293,7 +293,7 @@ public class EvolutionarySolverStatusUno extends BaseDialog
}
public void disposing(EventObject eventObject) {
-
+
}
}
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java
index 84c38d66e7fd..01d724c351d0 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java
@@ -42,19 +42,19 @@ import java.util.logging.Level;
import java.util.logging.Logger;
public abstract class BaseControl {
-
+
protected XComponentContext context;
private Object unoModel;
protected Object unoControl;
protected XPropertySet properties;
protected BaseControl parentControl;
-
+
public abstract String getName();
-
+
public Object getUnoModel() {
return unoModel;
}
-
+
/**
* This is used <b>internally</b> to update the UnoModel and refresh the
* associated PropertySet.
@@ -64,21 +64,21 @@ public abstract class BaseControl {
this.unoModel = unoModel;
properties = UnoRuntime.queryInterface(XPropertySet.class, unoModel);
}
-
+
public Object getUnoControl() {
return unoControl;
}
-
+
public void setParentControl(BaseControl parentControl) {
//TODO : remove from existing parentControl
try {
String name = getName();
XNameContainer nameContainer = UnoRuntime.queryInterface(XNameContainer.class, parentControl.unoModel);
nameContainer.insertByName(name, unoModel);
-
+
XControlContainer controlContainer = UnoRuntime.queryInterface(XControlContainer.class, parentControl.unoControl);
unoControl = controlContainer.getControl(name);
-
+
this.parentControl = parentControl;
} catch (IllegalArgumentException ex) {
Logger.getLogger(BaseControl.class.getName()).log(Level.SEVERE, null, ex);
@@ -88,14 +88,14 @@ public abstract class BaseControl {
Logger.getLogger(BaseControl.class.getName()).log(Level.SEVERE, null, ex);
}
}
-
+
public BaseControl(XComponentContext context) {
this.context = context;
unoModel = null;
unoControl = null;
parentControl = null;
}
-
+
protected void setProperty(String name, Object value) {
try {
properties.setPropertyValue(name, value);
@@ -109,7 +109,7 @@ public abstract class BaseControl {
Logger.getLogger(BaseControl.class.getName()).log(Level.SEVERE, null, ex);
}
}
-
+
protected Object getProperty(String name) {
try {
return properties.getPropertyValue(name);
@@ -120,19 +120,19 @@ public abstract class BaseControl {
}
return null;
}
-
+
// <editor-fold defaultstate="collapsed" desc="Uno Properties">
-
+
public void setPosition(int x, int y) {
setProperty("PositionX", new Integer(x));
setProperty("PositionY", new Integer(y));
}
-
+
public void setSize(int width, int height) {
setProperty("Width", new Integer(width));
setProperty("Height", new Integer(height));
}
-
+
public void setEnabled(boolean enabled) {
setProperty("Enabled", new Boolean(enabled));
}
@@ -141,7 +141,7 @@ public abstract class BaseControl {
XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, unoControl);
xWindow.setVisible(visible);
}
-
+
// </editor-fold>
}
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/Button.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/Button.java
index bf59d5210bdc..61ae47c196a5 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/Button.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/Button.java
@@ -36,10 +36,10 @@ import java.util.logging.Logger;
import com.sun.star.comp.Calc.NLPSolver.dialogs.BaseDialog;
public class Button extends LabeledControl {
-
+
private String name;
private XButton xButton;
-
+
public Button(BaseDialog owner, String name) {
super(owner.context);
try {
@@ -61,11 +61,11 @@ public class Button extends LabeledControl {
super.setParentControl(parentControl);
xButton = UnoRuntime.queryInterface(XButton.class, unoControl);
}
-
+
public void addActionListener(XActionListener actionListener) {
xButton.addActionListener(actionListener);
}
-
+
public void setActionCommand(String actionCommand) {
xButton.setActionCommand(actionCommand);
}
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/Label.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/Label.java
index 4b1b2625157b..5b7fdf348888 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/Label.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/Label.java
@@ -36,7 +36,7 @@ import java.util.logging.Logger;
import com.sun.star.comp.Calc.NLPSolver.dialogs.BaseDialog;
public class Label extends LabeledControl {
-
+
private String name;
public Label(BaseDialog owner, String name) {
@@ -74,5 +74,5 @@ public class Label extends LabeledControl {
}
return 0;
}
-
+
}
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/LabeledControl.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/LabeledControl.java
index 5ca05e44a17d..2852f27400a5 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/LabeledControl.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/LabeledControl.java
@@ -34,17 +34,17 @@ public abstract class LabeledControl extends BaseControl {
public LabeledControl(XComponentContext context) {
super(context);
}
-
+
public void setLabel(String label) {
setProperty("Label", label);
}
-
+
public void setAlign(TextAlign align) {
setProperty("Align", new Short(align.getUnoValue()));
}
-
+
public void setMultiLine(boolean multiLine) {
setProperty("MultiLine", new Boolean(multiLine));
}
-
+
}
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/TextAlign.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/TextAlign.java
index c59b82496ad7..54ec52f26041 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/TextAlign.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/TextAlign.java
@@ -31,13 +31,13 @@ public enum TextAlign {
Left(0),
Center(1),
Right(2);
-
+
private short unoValue;
-
+
private TextAlign(int unoValue) {
this.unoValue = (short)unoValue;
}
-
+
public short getUnoValue() {
return unoValue;
}