diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-05 11:08:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-08 09:48:16 +0200 |
commit | 8d6cf7a147acde4e4a4f7600af25ed614b07f90d (patch) | |
tree | ae8f52bd74fb33459fe69eadbdb57271df86fd94 /wizards/com | |
parent | 60fad3fabb26a50ea238bed2f046670c6e5678f7 (diff) |
java: remove dead methods
Change-Id: I9f2e705fd603a7c8832c0f0772bee9f395380a0d
Diffstat (limited to 'wizards/com')
13 files changed, 0 insertions, 273 deletions
diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java index afcab2a472a1..16cded8b34bc 100644 --- a/wizards/com/sun/star/wizards/common/NumericalHelper.java +++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java @@ -1352,97 +1352,6 @@ public class NumericalHelper return aShortVal; } - /** - * Helper class for roman numbering - */ - private static class RomanNumbering - { - - /** the used roman lettesrs **/ - private static final String[] ROMAN_EQUIV = new String[] - { - "I", "V", "X", "L", "C", "D", "M" - }; - /** max number that can be converted **/ - private static final int MAX_NUMBER = 3999; - /** min number that can be converted **/ - private static final int MIN_NUMBER = 1; - /** ASCII code for the number 0 **/ - private static final int ASCII_CODE_0 = 48; - /** special number for the conversion algorithm **/ - private static final int FOUR = 4; - /** special number for the conversion algorithm **/ - private static final int FIVE = 5; - /** special number for the conversion algorithm **/ - private static final int NINE = 9; - - /** - * Get the roman equivalent to an arabic number, e.g. 17 -> XVII. - * The allowed range for numbers goes from 1 to 3999. These can be - * converted using ASCII letters (3999 -> MMMCMXCIX). - * @param n the arabic number - * @return the roman equivalent as string - * @throws com.sun.star.script.BasicErrorException if the number cannot be converted. - */ - public static String getRomanEquivalent(int n) - throws Exception - { - StringBuffer romanNumber = new StringBuffer(); - try - { - if (n > MAX_NUMBER || n < MIN_NUMBER) - { - DebugHelper.exception(1 /*BasicErrorCode.SbERR_OUT_OF_RANGE*/, PropertyNames.EMPTY_STRING); - } - String number = NumericalHelper.toString(new Integer(n)); - /* converison idea: every digit is written with a maximum of two - * different roman symbols, using three in total, e.g. CC, CD, - * DCC, CM for the hundreds (meaning 200, 400, 700 and 900). - * So every digit is converted separately with regard to the - * special cases 4 and 9. - */ - int symbolIndex = 0; - for (int i = number.length() - 1; i >= 0; i--) - { - StringBuffer romanDigit = new StringBuffer(); - int b = number.charAt(i) - ASCII_CODE_0; - if (b == FOUR) - { // special case IV - romanDigit.append(ROMAN_EQUIV[symbolIndex]); - romanDigit.append(ROMAN_EQUIV[symbolIndex + 1]); - } - else if (b == NINE) - { // special case IX - romanDigit.append(ROMAN_EQUIV[symbolIndex]); - romanDigit.append(ROMAN_EQUIV[symbolIndex + 2]); - } - else - { - if (b >= FIVE) - { // special case V - romanDigit.append(ROMAN_EQUIV[symbolIndex + 1]); - b = b - FIVE; - } - for (int j = 0; j < b; j++) - { // append I's - romanDigit.append(ROMAN_EQUIV[symbolIndex]); - } - } - // next group of three symbols - symbolIndex += 2; - // append in reverse: we are starting at the right - romanNumber.append(romanDigit.reverse()); - } - } - catch (com.sun.star.lang.IllegalArgumentException e) - { -//TODO does not do anything anyway DebugHelper.exception(e); - } - // reverse again to get the number - return romanNumber.reverse().toString(); - } - } - public static boolean representsIntegerNumber(double _dblvalue) { double dblsecvalue = ((int) _dblvalue); diff --git a/wizards/com/sun/star/wizards/db/ColumnPropertySet.java b/wizards/com/sun/star/wizards/db/ColumnPropertySet.java index 03465a57b61a..e8c2f108c234 100644 --- a/wizards/com/sun/star/wizards/db/ColumnPropertySet.java +++ b/wizards/com/sun/star/wizards/db/ColumnPropertySet.java @@ -124,19 +124,6 @@ public class ColumnPropertySet } } - private int getPrecision() - { - try - { - return ((Integer) xPropertySet.getPropertyValue("Precision")).intValue(); - } - catch (Exception e) - { - e.printStackTrace(System.err); - return 0; - } - } - private void setType(int _nType, String _sTypeName, Integer precision) { if (_sTypeName.equals(PropertyNames.EMPTY_STRING)) @@ -197,8 +184,4 @@ public class ColumnPropertySet } } - private int getType() - { - return nType; - } } diff --git a/wizards/com/sun/star/wizards/document/Control.java b/wizards/com/sun/star/wizards/document/Control.java index 9e550ed3a21e..b581898dd5a5 100644 --- a/wizards/com/sun/star/wizards/document/Control.java +++ b/wizards/com/sun/star/wizards/document/Control.java @@ -170,11 +170,6 @@ public class Control extends Shape return controlname; } - private void setDefaultValue(Object DatabaseField) - { - oDefaultValue = Helper.getUnoPropertyValue(DatabaseField, "DefaultValue"); - } - public int getPreferredWidth(String sText) { Size aPeerSize = getPreferredSize(sText); diff --git a/wizards/com/sun/star/wizards/form/FormControlArranger.java b/wizards/com/sun/star/wizards/form/FormControlArranger.java index f8b919c7e626..4b49ebc737b6 100644 --- a/wizards/com/sun/star/wizards/form/FormControlArranger.java +++ b/wizards/com/sun/star/wizards/form/FormControlArranger.java @@ -171,18 +171,6 @@ public class FormControlArranger return bisreducable; } - private int getControlGroupWidth() - { - if (m_dbControlWidth > m_LabelWidth) - { - return m_dbControlWidth; - } - else - { - return m_LabelWidth; - } - } - private void checkJustifiedPosition(int a) { int nBaseWidth = nFormWidth + cXOffset; @@ -648,18 +636,6 @@ public class FormControlArranger } } - private int assignFieldLength(int _fieldlength) - { - if (_fieldlength >= 65535) - { - return -1; - } - else - { - return _fieldlength; - } - } - public int getFormHeight() { return m_controlMaxPosY - cYOffset; diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java b/wizards/com/sun/star/wizards/form/UIControlArranger.java index e1f2b86ea2d1..b44e595c5cd9 100644 --- a/wizards/com/sun/star/wizards/form/UIControlArranger.java +++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java @@ -238,19 +238,6 @@ public class UIControlArranger m_aButtonList.addItemListener(this); } - public void setToLeftAlign() - { - Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), PropertyNames.PROPERTY_STATE, new Short((short) 1)); - } - - /* (non-Javadoc) - * @see javax.swing.ListModel#addListDataListener(javax.swing.event.ListDataListener) - */ - public void addListDataListener(ListDataListener arg0) - { - // TODO Auto-generated method stub - } - public void itemStateChanged(ItemEvent arg0) { try @@ -284,30 +271,6 @@ public class UIControlArranger } /* (non-Javadoc) - * @see javax.swing.event.ListDataListener#contentsChanged(javax.swing.event.ListDataEvent) - */ - public void contentsChanged(ListDataEvent arg0) - { - // TODO Auto-generated method stub - } - - /* (non-Javadoc) - * @see javax.swing.event.ListDataListener#intervalAdded(javax.swing.event.ListDataEvent) - */ - public void intervalAdded(ListDataEvent arg0) - { - // TODO Auto-generated method stub - } - - /* (non-Javadoc) - * @see javax.swing.event.ListDataListener#intervalRemoved(javax.swing.event.ListDataEvent) - */ - public void intervalRemoved(ListDataEvent arg0) - { - // TODO Auto-generated method stub - } - - /* (non-Javadoc) * @see com.sun.star.lang.XEventListener#disposing(com.sun.star.lang.EventObject) */ public void disposing(EventObject arg0) diff --git a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java index 4e186e322ac0..7bce85cc5e6d 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java +++ b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java @@ -179,18 +179,6 @@ public class ReportBuilderImplementation extends ReportImplementationHelper } } - private void sleep(int _nSeconds) - { - try - { - Thread.sleep(_nSeconds * 1000); - } - catch (java.lang.InterruptedException e) - { - } - - } - private void switchOffPropertyBrowser() { try @@ -462,11 +450,6 @@ public class ReportBuilderImplementation extends ReportImplementationHelper dispose(); } - private XConnection getConnection() - { - return getRecordParser().DBConnection; - } - public void initializeFieldColumns(final int _nType, final String TableName, final String[] FieldNames) { getRecordParser().initializeFieldColumns(FieldNames, TableName); diff --git a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java index 7737c02026e7..9b4281297427 100644 --- a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java +++ b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java @@ -382,12 +382,6 @@ public class PrimaryKeyHandler implements XFieldSelectionListener Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoenableAutoValueCheckBox)); } - private void toggleSeveralPrimeKeyFields() - { - boolean bdoEnable = (this.optUseSeveral.getState()); - curPrimaryKeySelection.toggleListboxControls(Boolean.valueOf(bdoEnable)); - } - public String[] getPrimaryKeyFields(TableDescriptor _curtabledescriptor) { if (chkcreatePrimaryKey.getState() == 0) diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java index 97844cca8967..5ce45963b124 100644 --- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java +++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java @@ -543,16 +543,6 @@ public class AggregateComponent extends ControlScroller } } - private String getSelectedFieldName() - { - return xFieldListBox.getSelectedItem(); - } - - private String getSelectedFunction() - { - return xFunctionListBox.getSelectedItem(); - } - private void setVisible(boolean _bvisible) { CurUnoDialog.setControlVisible(getFunctionControlName(index), _bvisible); diff --git a/wizards/com/sun/star/wizards/ui/ButtonList.java b/wizards/com/sun/star/wizards/ui/ButtonList.java index 10b80afbb5fb..c14ce73fa1f6 100644 --- a/wizards/com/sun/star/wizards/ui/ButtonList.java +++ b/wizards/com/sun/star/wizards/ui/ButtonList.java @@ -359,11 +359,6 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener return pageStart + i; } - private int getImageIndexFor(int i) - { - return i - pageStart; - } - public void contentsChanged(ListDataEvent event) { } @@ -636,12 +631,6 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener return UnoRuntime.queryInterface(XControl.class, control).getModel(); } - private void setBorder(Object control, Short border) - { - Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_BORDER, border); - } - - public Object[] getSelectedObjects() { return new Object[] diff --git a/wizards/com/sun/star/wizards/ui/ImageList.java b/wizards/com/sun/star/wizards/ui/ImageList.java index 7998a8fd3224..e61b31364529 100644 --- a/wizards/com/sun/star/wizards/ui/ImageList.java +++ b/wizards/com/sun/star/wizards/ui/ImageList.java @@ -765,12 +765,6 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener return UnoRuntime.queryInterface(XControl.class, control).getModel(); } - //TODO what is when the image does not display an image? - private void setBorder(Object control, Short border) - { - Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_BORDER, border); - } - private int getImageFromEvent(Object event) { Object image = ((EventObject) event).Source; diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index 094b58844cf5..fed0a32424de 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -521,26 +521,6 @@ public class UnoDialog implements EventNames /** * The problem with setting the visibility of controls is that changing the current step * of a dialog will automatically make all controls visible. The PropertyNames.PROPERTY_STEP property always wins against - * the property "visible". Therefore a control meant to be invisible is placed on a step far far away. - * @param controlname the name of the control - * @param iStep change the step if you want to make the control invisible - */ - private void setControlVisible(String controlname, int iStep) - { - try - { - int iCurStep = AnyConverter.toInt(getControlProperty(controlname, PropertyNames.PROPERTY_STEP)); - setControlProperty(controlname, PropertyNames.PROPERTY_STEP, new Integer(iStep)); - } - catch (com.sun.star.lang.IllegalArgumentException exception) - { - exception.printStackTrace(System.err); - } - } - - /** - * The problem with setting the visibility of controls is that changing the current step - * of a dialog will automatically make all controls visible. The PropertyNames.PROPERTY_STEP property always wins against * the property "visible". Therfor a control meant to be invisible is placed on a step far far away. * Afterwards the step property of the dialog has to be set with "repaintDialogStep". As the performance * of that method is very bad it should be used only once for all controls diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java b/wizards/com/sun/star/wizards/ui/UnoDialog2.java index c068cd114ef1..fbf72b7a0df7 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java @@ -338,17 +338,6 @@ public class UnoDialog2 extends UnoDialog return xDlgContainer.getControl(componentName); } - private void setControlPropertiesDebug(Object model, String[] names, Object[] values) - { - for (int i = 0; i < names.length; i++) - { - System.out.println(" Settings: " + names[i]); - Helper.setUnoPropertyValue(model, names[i], values[i]); - } - - - } - public Object insertControlModel2(String serviceName, String componentName, String[] sPropNames, Object[] oPropValues, Class<? extends XInterface> type) { return UnoRuntime.queryInterface(type, insertControlModel2(serviceName, componentName, sPropNames, oPropValues)); diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java index 416efe9a7c37..5d3675bc8d09 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java @@ -72,24 +72,6 @@ public class UnoDataAware extends DataAware Helper.setUnoPropertyValue(unoModel, unoPropName, value); } - private String stringof(Object value) - { - if (value.getClass().isArray()) - { - StringBuffer sb = new StringBuffer("["); - for (int i = 0; i < ((short[]) value).length; i++) - { - sb.append(((short[]) value)[i]).append(" , "); - } - sb.append("]"); - return sb.toString(); - } - else - { - return value.toString(); - } - } - /** * Try to get from an arbitrary object a boolean value. * Null returns Boolean.FALSE; |