[Libreoffice-commits] core.git: 2 commits - nlpsolver/src rsc/inc
Alexander Wilms
f.alexander.wilms at gmail.com
Wed Feb 26 06:44:24 PST 2014
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java | 2
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/ResourceManager.java | 2
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/SCOSolverImpl.java | 2
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java | 26 +++----
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/DummyEvolutionarySolverStatusDialog.java | 12 +--
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java | 6 -
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java | 32 ++++-----
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/Button.java | 8 +-
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/Label.java | 4 -
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/LabeledControl.java | 8 +-
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/TextAlign.java | 6 -
rsc/inc/rscerror.h | 34 +++++-----
12 files changed, 71 insertions(+), 71 deletions(-)
New commits:
commit f7857265f2b36a884b189e43f514026a34b5a882
Author: Alexander Wilms <f.alexander.wilms at gmail.com>
Date: Tue Feb 25 19:50:41 2014 +0100
Remove visual noise from rsc
Change-Id: Idc310247ae677687fbfb2912d9e4a0f5e5880190
Reviewed-on: https://gerrit.libreoffice.org/8296
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/rsc/inc/rscerror.h b/rsc/inc/rscerror.h
index 6c7fd6e..418cb85 100644
--- a/rsc/inc/rscerror.h
+++ b/rsc/inc/rscerror.h
@@ -28,9 +28,9 @@
#define ERR_OPENFILE 0x0102 // Return
#define ERR_NOCHAR 0x0103 // Return
#define ERR_NORSCINST 0x0104 // Return
-#define ERR_USAGE 0x0105 //
+#define ERR_USAGE 0x0105
#define ERR_NOINPUT 0x0106 // Return
-#define ERR_UNKNOWNSW 0x0107 //
+#define ERR_UNKNOWNSW 0x0107
#define ERR_REFTODEEP 0x0108 // Return
#define ERR_FILEFORMAT 0x0109 // Return
#define ERR_FILESIZE 0x010A // Return
@@ -52,22 +52,22 @@
#define ERR_RSCINST_RESERVEDNAME (ERR_RSCINST +2 ) // Return
#define ERR_LEX 0x0270
-#define ERR_YACC 0x0280 //
-#define ERR_DOUBLEID (ERR_YACC +1 ) //
-#define ERR_FALSETYPE (ERR_YACC +2 ) //
-#define ERR_NOVARIABLENAME (ERR_YACC +3 ) //
-#define ERR_USHORTRANGE (ERR_YACC +4 ) //
-#define ERR_IDRANGE (ERR_YACC +5 ) //
-#define ERR_NOCOPYOBJ (ERR_YACC +6 ) //
+#define ERR_YACC 0x0280
+#define ERR_DOUBLEID (ERR_YACC +1 )
+#define ERR_FALSETYPE (ERR_YACC +2 )
+#define ERR_NOVARIABLENAME (ERR_YACC +3 )
+#define ERR_USHORTRANGE (ERR_YACC +4 )
+#define ERR_IDRANGE (ERR_YACC +5 )
+#define ERR_NOCOPYOBJ (ERR_YACC +6 )
#define ERR_REFNOTALLOWED (ERR_YACC +7 ) // Return
-#define ERR_DOUBLEDEFINE (ERR_YACC +8 ) //
-#define ERR_COPYNOTALLOWED (ERR_YACC +9 ) //
-#define ERR_IDEXPECTED (ERR_YACC +10) //
-#define ERR_ZERODIVISION (ERR_YACC +11) //
-#define ERR_PRAGMA (ERR_YACC +12) //
-#define ERR_DECLAREDEFINE (ERR_YACC +13) //
-#define ERR_NOTUPELNAME (ERR_YACC +14) //
-#define ERR_NOTYPE (ERR_YACC +15) //
+#define ERR_DOUBLEDEFINE (ERR_YACC +8 )
+#define ERR_COPYNOTALLOWED (ERR_YACC +9 )
+#define ERR_IDEXPECTED (ERR_YACC +10)
+#define ERR_ZERODIVISION (ERR_YACC +11)
+#define ERR_PRAGMA (ERR_YACC +12)
+#define ERR_DECLAREDEFINE (ERR_YACC +13)
+#define ERR_NOTUPELNAME (ERR_YACC +14)
+#define ERR_NOTYPE (ERR_YACC +15)
#define ERR_RSCARRAY 0x02A0 // Return
#define ERR_ARRAY_INVALIDINDEX (ERR_RSCARRAY +1 ) // Return
commit fed2f0698c4e108c2ad65ec5a6ae8c6211c14326
Author: Alexander Wilms <f.alexander.wilms at gmail.com>
Date: Tue Feb 25 19:20:44 2014 +0100
Remove trailing whitespace from nlpsolver
Change-Id: I8ee2aff2c18adaf5582ed6eeb174e88313d8c8a2
Reviewed-on: https://gerrit.libreoffice.org/8283
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
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 77be94d..e51f2e6 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 1484173..5acffa0 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 e3ce204..67e0ce7 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 b0a1ebd..fec55c9 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 a57b0dd..92f45b9 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 6cb8adf..aa9f46d 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 84c38d6..01d724c 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 bf59d52..61ae47c 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 4b1b262..5b7fdf3 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 5ca05e4..2852f27 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 c59b824..54ec52f 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;
}
More information about the Libreoffice-commits
mailing list