Kaydet (Commit) f6739073 authored tarafından Jose Guilherme Vanz's avatar Jose Guilherme Vanz Kaydeden (comit) Thomas Arnhold

Remove commented code and empty methods

This patch removes commented code and some empty private methods

Change-Id: I4a79e521399a07873030f021a97c01cf8d2e81d7
Signed-off-by: 's avatarJosé Guilherme Vanz <guilherme.sft@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/844Reviewed-by: 's avatarThomas Arnhold <thomas@arnhold.org>
Tested-by: 's avatarThomas Arnhold <thomas@arnhold.org>
üst 1818256f
......@@ -179,17 +179,6 @@ public class SDBCReportData implements DataSource
{
}
// public int getCurrentRow() throws DataSourceException
// {
// try
// {
// return rowSet.getRow();
// }
// catch (SQLException e)
// {
// throw new DataSourceException(e.getMessage(), e);
// }
// }
static private java.sql.Date getDate(final Object obj)
{
final java.sql.Date date;
......
......@@ -81,7 +81,6 @@ public class SOImageService implements ImageService
{
new PropertyValue()
};
// value[0] = new PropertyValue();
value[0].Name = "InputStream";
value[0].Value = image;
......
......@@ -309,11 +309,6 @@ public final class SOFormulaParser extends ComponentBase
public void setOpCodeMap(com.sun.star.sheet.FormulaOpCodeMapEntry[] the_value)
{
// m_prophlp.prepareSet("OpCodeMap", null);
// synchronized (this)
// {
// m_OpCodeMap.clear();
// }
}
public String getImplementationName()
......
......@@ -179,7 +179,6 @@ public class FormatValueUtility
if (!"string".equals(valueType))
{
variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE_TYPE, "string");
//variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE, String.valueOf(value));
}
variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, STRING_VALUE, String.valueOf(value));
}
......
......@@ -111,7 +111,6 @@ public class FormattedTextLayoutController
variablesGet.setAttribute(JFreeReportInfo.REPORT_NAMESPACE,
Element.NAMESPACE_ATTRIBUTE, OfficeNamespaces.TEXT_NS);
variablesGet.setAttribute(OfficeNamespaces.TEXT_NS, "name", name);
//variablesGet.setAttribute(OfficeNamespaces.TEXT_NS, "display", "value");
final String dataStyleName = computeValueStyle();
if (dataStyleName != null)
......
......@@ -198,11 +198,6 @@ public class ImageElementLayoutController
continue;
}
final Element child = (Element) node;
/*
if (! OfficeToken.COVERED_TABLE_CELL.equals(child.getType()) &&
(ObjectUtilities.equal(child.getNamespace(), namespace) == false ||
ObjectUtilities.equal(child.getType(), type) == false))
*/
if (!ObjectUtilities.equal(child.getNamespace(), namespace) || (!ObjectUtilities.equal(child.getType(), type) && (secondType == null || !ObjectUtilities.equal(child.getType(), secondType))))
{
continue;
......
......@@ -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)
{
......
......@@ -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();
......
......@@ -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();
}
/**
......
......@@ -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))
{
......
......@@ -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);
......
......@@ -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
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment