summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star
diff options
context:
space:
mode:
authorJose Guilherme Vanz <guilherme.sft@gmail.com>2012-10-08 21:22:03 -0300
committerThomas Arnhold <thomas@arnhold.org>2012-10-10 06:56:57 +0000
commitf6739073edc1b593035f25becbd0e9d6d536ef0c (patch)
treeb924eed7dd488313dd938ba95ae93eb1f14b9ec0 /wizards/com/sun/star
parent1818256fb39d292cc7ed7d24f1db4b4b03e74c58 (diff)
Remove commented code and empty methods
This patch removes commented code and some empty private methods Change-Id: I4a79e521399a07873030f021a97c01cf8d2e81d7 Signed-off-by: José Guilherme Vanz <guilherme.sft@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/844 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'wizards/com/sun/star')
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaTemplate.java4
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java10
-rw-r--r--wizards/com/sun/star/wizards/agenda/TopicsControl.java16
-rw-r--r--wizards/com/sun/star/wizards/common/ConfigGroup.java1
-rw-r--r--wizards/com/sun/star/wizards/common/NumberFormatter.java2
-rw-r--r--wizards/com/sun/star/wizards/common/NumericalHelper.java114
6 files changed, 2 insertions, 145 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java
index 6be8215f8498..69659f529681 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java
+++ b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java
@@ -1757,10 +1757,6 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
}
XTableRows tableRows = table.getRows();
int targetNumOfRows = topics * rowsPerTopic + 1;
- if (tableRows.getCount() > targetNumOfRows)
- {
- //tableRows.removeByIndex(targetNumOfRows, tableRows.getCount() - targetNumOfRows);
- }
formatLastRow();
while (writtenTopics.size() > topics)
{
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
index adab22a168a9..8d7804610144 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
@@ -490,16 +490,6 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
//document, but it is already stored, written down by a code above. The
//reason this piece is malfunctioning, because the agendaTemplate.document
//is read-only (At least as my tests indicated.).
- /*
- * try {
- * XStorable xStoreable = UnoRuntime.queryInterface(XStorable.class, agendaTemplate.document);
- * xStoreable.store();
- * }
- * catch (Exception ex) {
- * SystemDialog.showMessageBox(xMSF, "ErrorBox", VclWindowPeerAttribute.OK, resources.resErrSaveTemplate);
- * ex.printStackTrace();
- * }
- */
agendaTemplate.xTextDocument.unlockControllers();
diff --git a/wizards/com/sun/star/wizards/agenda/TopicsControl.java b/wizards/com/sun/star/wizards/agenda/TopicsControl.java
index 4a72e26d89c9..551c8da86b0d 100644
--- a/wizards/com/sun/star/wizards/agenda/TopicsControl.java
+++ b/wizards/com/sun/star/wizards/agenda/TopicsControl.java
@@ -404,16 +404,6 @@ public class TopicsControl extends ControlScroller implements XFocusListener
((AgendaWizardDialogImpl)CurUnoDialog).agendaTemplate.refreshTopicConstants();
}
- private void lockDoc()
- {
- //((AgendaWizardDialogImpl)CurUnoDialog).agendaTemplate.xTextDocument.lockControllers();
- }
-
- private void unlockDoc()
- {
- //((AgendaWizardDialogImpl)CurUnoDialog).agendaTemplate.xTextDocument.unlockControllers();
- }
-
/**
* Removes the current row.
* See general class documentation explanation about the
@@ -421,7 +411,6 @@ public class TopicsControl extends ControlScroller implements XFocusListener
*/
public void removeRow()
{
- lockDoc();
for (int i = lastFocusRow; i < scrollfields.size() - 1; i++)
{
PropertyValue[] pv1 = scrollfields.get(i);
@@ -445,8 +434,6 @@ public class TopicsControl extends ControlScroller implements XFocusListener
// the focus should return to the edit control
focus(lastFocusControl);
-
- unlockDoc();
}
/**
@@ -456,7 +443,6 @@ public class TopicsControl extends ControlScroller implements XFocusListener
*/
public void insertRow()
{
- lockDoc();
insertRowAtEnd();
for (int i = scrollfields.size() - 2; i > lastFocusRow; i--)
{
@@ -487,8 +473,6 @@ public class TopicsControl extends ControlScroller implements XFocusListener
fillupControls(lastFocusRow - nscrollvalue);
focus(lastFocusControl);
-
- unlockDoc();
}
/**
diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.java b/wizards/com/sun/star/wizards/common/ConfigGroup.java
index 4a48caa464d2..0f9970d5ecec 100644
--- a/wizards/com/sun/star/wizards/common/ConfigGroup.java
+++ b/wizards/com/sun/star/wizards/common/ConfigGroup.java
@@ -51,7 +51,6 @@ public class ConfigGroup implements ConfigNode
private void writeField(Field field, Object configView, String prefix) throws Exception
{
String propertyName = field.getName().substring(prefix.length());
- //System.out.println("Going to save:" + propertyName);
Class<?> fieldType = field.getType();
if (ConfigNode.class.isAssignableFrom(fieldType))
{
diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.java b/wizards/com/sun/star/wizards/common/NumberFormatter.java
index c90ce2f2546d..b5920de3c885 100644
--- a/wizards/com/sun/star/wizards/common/NumberFormatter.java
+++ b/wizards/com/sun/star/wizards/common/NumberFormatter.java
@@ -187,7 +187,7 @@ public class NumberFormatter
{
try
{
- XPropertySet xNumberFormat = _oNumberFormatter.xNumberFormats.getByKey(_FormatKey); //CurDBField.DBFormatKey);
+ XPropertySet xNumberFormat = _oNumberFormatter.xNumberFormats.getByKey(_FormatKey);
String FormatString = AnyConverter.toString(Helper.getUnoPropertyValue(xNumberFormat, "FormatString"));
Locale oLocale = (Locale) Helper.getUnoPropertyValue(xNumberFormat, "Locale");
int NewFormatKey = defineNumberFormat(FormatString, oLocale);
diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java
index d5a198f65693..22eb3b1c7a03 100644
--- a/wizards/com/sun/star/wizards/common/NumericalHelper.java
+++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java
@@ -17,7 +17,6 @@
*/
package com.sun.star.wizards.common;
-// import com.sun.star.beans.XPropertySet;
import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.TypeClass;
@@ -92,7 +91,6 @@ public class NumericalHelper
{
byte retValue = 0;
- // boolean hasConversionWarning = false;
TypeObject aTypeObject = getTypeObject(aValue);
switch (aTypeObject.iType)
{
@@ -396,97 +394,7 @@ public class NumericalHelper
}
return false;
}
-// public static int toIntWithErrorMessage(Object _aValue) throws com.sun.star.script.BasicErrorException{
-// try {
-// return toInt(_aValue);
-// }
-// catch(com.sun.star.lang.IllegalArgumentException e) {
-// DebugHelper.exception(BasicErrorCode.SbERR_CONVERSION, PropertyNames.EMPTY_STRING);
-// return 0;
-// }}
-//
-//
-// public static String toStringWithErrorMessage(Object _aValue) throws com.sun.star.script.BasicErrorException{
-// try {
-// return toString(_aValue);
-// }
-// catch(com.sun.star.lang.IllegalArgumentException e) {
-// DebugHelper.exception(BasicErrorCode.SbERR_CONVERSION, PropertyNames.EMPTY_STRING);
-// return PropertyNames.EMPTY_STRING;
-// }}
-//
-//
-// public static int toIntWithErrorMessage(Object _aValue, int _ndefaultValue) throws com.sun.star.script.BasicErrorException{
-// try {
-// return toInt(_aValue, _ndefaultValue);
-// }
-// catch(com.sun.star.uno.Exception e) {
-// DebugHelper.exception(BasicErrorCode.SbERR_CONVERSION, PropertyNames.EMPTY_STRING);
-// return 0;
-// }}
-//
-// public static boolean toBooleanWithErrorMessage(Object _oObject, int _nTrueField, int _nFalseField) throws com.sun.star.script.BasicErrorException{
-// return toBooleanWithErrorMessage(_oObject, new int[]{_nTrueField}, new int[]{_nFalseField});
-// }
-//
-//
-// public static boolean toBooleanWithErrorMessage(Object _oObject) throws com.sun.star.script.BasicErrorException{
-// try{
-// return toBoolean(_oObject);
-// }
-// catch (java.lang.Exception e){
-// DebugHelper.exception(BasicErrorCode.SbERR_BAD_ARGUMENT, PropertyNames.EMPTY_STRING);
-// return false;
-// }
-// }
-//
-//
-// public static boolean toBooleanWithErrorMessage(Object _oObject, int[] _nTrueFields, int[] _nFalseFields) throws com.sun.star.script.BasicErrorException{
-// try{
-// int nValue = NumericalHelper.toIntWithErrorMessage(_oObject);
-// if (ContainerUtilities.FieldInIntTable(_nTrueFields, nValue) > -1){
-// return true;
-// }
-// else if (ContainerUtilities.FieldInIntTable(_nFalseFields, nValue) > -1){
-// return false;
-// }
-// else{
-// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, PropertyNames.EMPTY_STRING);
-// return false;
-// }
-// }catch (java.lang.Exception e){
-// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, PropertyNames.EMPTY_STRING);
-// return false;
-// }}
-//
-//
-// public static boolean toBooleanWithErrorMessage(Object _oObject, int _nTrueField, int _nFalseField, boolean _bdefaultValue) throws com.sun.star.script.BasicErrorException{
-// return toBooleanWithErrorMessage(_oObject, new int[]{_nTrueField}, new int[]{_nFalseField}, _bdefaultValue);
-// }
-//
-//
-// public static boolean toBooleanWithErrorMessage(Object _oObject, int[] _nTrueFields, int[] _nFalseFields, boolean _bdefaultValue) throws com.sun.star.script.BasicErrorException{
-// try{
-// if ((_oObject == null) || (AnyConverter.isVoid(_oObject))){
-// return _bdefaultValue;
-// }
-// else{
-// int nValue = NumericalHelper.toIntWithErrorMessage(_oObject);
-// if (ContainerUtilities.FieldInIntTable(_nTrueFields, nValue) > -1){
-// return true;
-// }
-// else if (ContainerUtilities.FieldInIntTable(_nFalseFields, nValue) > -1){
-// return false;
-// }
-// else{
-// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, PropertyNames.EMPTY_STRING);
-// return false;
-// }
-// }
-// }catch (java.lang.Exception e){
-// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, PropertyNames.EMPTY_STRING);
-// return false;
-// }}
+
/**
* get an int value from the object
* @param aValue
@@ -1484,26 +1392,6 @@ public class NumericalHelper
return destObject;
}
-// public static boolean isObjectNumericRepresentation(Object _oValue, NumberFormatter _oNumberFormatter, XPropertySet _xPropertySet) throws com.sun.star.script.BasicErrorException{
-// try{
-// int nNumberFormat = AnyConverter.toInt(_xPropertySet.getPropertyValue("NumberFormat"));
-// if (AnyConverter.isString(_oValue)){
-// String sCellContent = AnyConverter.toString(_oValue);
-// try{
-// _oNumberFormatter.convertStringToNumber(nNumberFormat, sCellContent);
-// return true;
-// }catch (Exception e){
-// return false;
-// }
-// }
-// else{
-// return true;
-// }
-// }
-// catch (com.sun.star.uno.Exception e){
-// DebugHelper.exception(1 /*BasicErrorCode.SbERR_METHOD_FAILED*/, PropertyNames.EMPTY_STRING);
-// return false;
-// }}
/**
* Helper class for roman numbering
*/