diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-05 09:54:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-05 11:31:50 +0200 |
commit | 0c5f51ebbcb7e22baa913e2012e3dcfcc6cf7897 (patch) | |
tree | 3d441110176e37c1a6ba2d15a3653d5023863075 /wizards | |
parent | d26540bb05b0443e7988da34372c86f88cbf1f6c (diff) |
java: remove commented out code
Change-Id: I44e2043e5da23bc9421c03e550ef1d8b7ebaad36
Diffstat (limited to 'wizards')
46 files changed, 5 insertions, 392 deletions
diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java index 091aef9e637a..afcab2a472a1 100644 --- a/wizards/com/sun/star/wizards/common/NumericalHelper.java +++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java @@ -1038,18 +1038,6 @@ public class NumericalHelper } /** - * 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 BasicErrorException if the number cannot be converted. - */ -// public static String getRomanEquivalent(int n) -// throws com.sun.star.script.BasicErrorException { -// return RomanNumbering.getRomanEquivalent(n); -// } - /** * get the type object from the given object * @param aValue an object representing a (numerical) value; can also be an 'any' * @return a type object: the object together with the its type information diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.java b/wizards/com/sun/star/wizards/common/PropertySetHelper.java index e0c5a119cb1b..8cf933d3bea2 100644 --- a/wizards/com/sun/star/wizards/common/PropertySetHelper.java +++ b/wizards/com/sun/star/wizards/common/PropertySetHelper.java @@ -24,7 +24,6 @@ import com.sun.star.beans.XPropertySetInfo; import com.sun.star.uno.AnyConverter; import com.sun.star.lang.XServiceInfo; -// import com.sun.star.container.XNameAccess; import java.util.HashMap; public class PropertySetHelper @@ -101,7 +100,6 @@ public class PropertySetHelper } else { - // DebugHelper.writeInfo("PropertySetHelper.setProperty() can't get XPropertySet"); getHashMap().put(_sName, _aValue); } } diff --git a/wizards/com/sun/star/wizards/common/TerminateWizardException.java b/wizards/com/sun/star/wizards/common/TerminateWizardException.java index 6da8fd47dccd..507836caa250 100644 --- a/wizards/com/sun/star/wizards/common/TerminateWizardException.java +++ b/wizards/com/sun/star/wizards/common/TerminateWizardException.java @@ -17,7 +17,6 @@ */ package com.sun.star.wizards.common; -// import com.sun.star.wizards.common.Resource; import com.sun.star.lang.XMultiServiceFactory; public class TerminateWizardException extends Exception diff --git a/wizards/com/sun/star/wizards/common/UCB.java b/wizards/com/sun/star/wizards/common/UCB.java index 9406fe7a34cb..46e1cd2a69b5 100644 --- a/wizards/com/sun/star/wizards/common/UCB.java +++ b/wizards/com/sun/star/wizards/common/UCB.java @@ -74,7 +74,6 @@ public class UCB public void delete(String filename) throws Exception { - //System.out.println("UCB.delete(" + filename); executeCommand( getContent(filename),"delete",Boolean.TRUE); } diff --git a/wizards/com/sun/star/wizards/db/ColumnPropertySet.java b/wizards/com/sun/star/wizards/db/ColumnPropertySet.java index bc0be014b77b..03465a57b61a 100644 --- a/wizards/com/sun/star/wizards/db/ColumnPropertySet.java +++ b/wizards/com/sun/star/wizards/db/ColumnPropertySet.java @@ -23,7 +23,6 @@ import com.sun.star.beans.XPropertySet; import com.sun.star.sdbc.DataType; import com.sun.star.wizards.common.Properties; import com.sun.star.wizards.common.PropertyNames; -// import com.sun.star.wizards.db.TypeInspector; public class ColumnPropertySet { diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index 1e376ce8efb8..a4fe38852e9c 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -89,10 +89,6 @@ public class CommandMetaData extends DBMetaData for (int i = 0; i < _FieldNames.length; i++) { FieldColumns[i] = new FieldColumn(this, _FieldNames[i], this.getCommandName(), false); -// if (_bgetDefaultValue) -// { -// FieldColumns[i].getDefaultValue(); -// } } } @@ -279,7 +275,6 @@ public class CommandMetaData extends DBMetaData { try { - // Object oField; java.util.ArrayList<String> ResultFieldNames = new java.util.ArrayList<String>(10); String[] FieldNames; CommandObject oCommand = this.getCommandByName(_commandname, _commandtype); @@ -294,9 +289,6 @@ public class CommandMetaData extends DBMetaData // BinaryFieldTypes are not included in the WidthList if (JavaTools.FieldInIntTable(WidthList, iType) >= 0) { -// if (_bAppendMode) -// ResultFieldNames.addElement(_commandname + "." + FieldNames[n]); -// else ResultFieldNames.add(sFieldName); } else if (JavaTools.FieldInIntTable(BinaryTypes, iType) >= 0) @@ -304,8 +296,6 @@ public class CommandMetaData extends DBMetaData ResultFieldNames.add(sFieldName); } } - // FieldNames = new String[FieldNames.length]; - // FieldTypes = new int[FieldNames.length]; m_aAllFieldNames = new String[ResultFieldNames.size()]; m_aAllFieldNames = ResultFieldNames.toArray(m_aAllFieldNames); return true; @@ -550,7 +540,6 @@ public class CommandMetaData extends DBMetaData String CurFieldName; int GroupFieldCount; int TotFieldCount = FieldColumns.length; - // int SortFieldCount = SortFieldNames[0].length; GroupFieldCount = JavaTools.getArraylength(GroupFieldNames); RecordFieldNames = new String[TotFieldCount - GroupFieldCount]; @@ -561,7 +550,6 @@ public class CommandMetaData extends DBMetaData if (JavaTools.FieldInList(GroupFieldNames, CurFieldName) < 0) { RecordFieldNames[a] = CurFieldName; - // a += 1; ++a; } } @@ -607,7 +595,6 @@ public class CommandMetaData extends DBMetaData int curtype = AnyConverter.toInt(xPropertySet.getPropertyValue("Type")); if (curtype == KeyType.FOREIGN) { - // getImportedKeys (RelationController.cxx /source/ui/relationdesign) /Zeile 475 String sreftablename = AnyConverter.toString(xPropertySet.getPropertyValue("ReferencedTable")); if (getTableNamesAsNameAccess().hasByName(sreftablename)) { diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index cda9ee32e00e..fdc0e6fb7e05 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -296,10 +296,6 @@ public class DBMetaData Object oCommand; this.Name = _CommandName; this.CommandType = _CommandType; - // if (getTableNamesAsNameAccess() == null) - // { - // initCommandNames(); - // } if (CommandType == com.sun.star.sdb.CommandType.TABLE) { oCommand = getTableNamesAsNameAccess().getByName(Name); diff --git a/wizards/com/sun/star/wizards/db/FieldColumn.java b/wizards/com/sun/star/wizards/db/FieldColumn.java index 7f8cc70d88a3..409af6e15002 100644 --- a/wizards/com/sun/star/wizards/db/FieldColumn.java +++ b/wizards/com/sun/star/wizards/db/FieldColumn.java @@ -19,7 +19,6 @@ package com.sun.star.wizards.db; import com.sun.star.beans.XPropertySet; import com.sun.star.container.XNameAccess; -// import com.sun.star.lang.IllegalArgumentException; import com.sun.star.sdbc.DataType; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Exception; diff --git a/wizards/com/sun/star/wizards/db/QueryMetaData.java b/wizards/com/sun/star/wizards/db/QueryMetaData.java index ac94dea871fc..4b994ac667d9 100644 --- a/wizards/com/sun/star/wizards/db/QueryMetaData.java +++ b/wizards/com/sun/star/wizards/db/QueryMetaData.java @@ -83,15 +83,6 @@ public class QueryMetaData extends CommandMetaData { return this.GroupByFilterConditions; } -// public void addFieldColumn(String _FieldName, String _sCommandName){ -// FieldColumn oFieldColumn = getFieldColumn(_FieldName, _sCommandName); -// if (oFieldColumn == null){ -// FieldColumn[] LocFieldColumns = new FieldColumn[FieldColumns.length + 1]; -// System.arraycopy(FieldColumns, 0, LocFieldColumns, 0, FieldColumns.length); -// LocFieldColumns[FieldColumns.length] = new FieldColumn(this, _FieldName, _sCommandName); -// FieldColumns = LocFieldColumns; -// } -// } public void addSeveralFieldColumns(String[] _FieldNames, String _sCommandName) { @@ -164,9 +155,7 @@ public class QueryMetaData extends CommandMetaData public String[] getIncludedCommandNames() { - // FieldColumn CurQueryField; ArrayList<String> CommandNamesV = new ArrayList<String>(1); - // String CurCommandName; for (int i = 0; i < FieldColumns.length; i++) { final FieldColumn CurQueryField = FieldColumns[i]; @@ -215,7 +204,6 @@ public class QueryMetaData extends CommandMetaData { try { - // this.getIncludedCommandNames(); // fills the var CommandNamesV indirectly :-( if (FieldTitleSet == null) { FieldTitleSet = new HashMap<String, String>(); diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java b/wizards/com/sun/star/wizards/db/RecordParser.java index caeb1461597a..bbe917b59094 100644 --- a/wizards/com/sun/star/wizards/db/RecordParser.java +++ b/wizards/com/sun/star/wizards/db/RecordParser.java @@ -199,7 +199,6 @@ public class RecordParser extends QueryMetaData } // Is the index OK; increment? - // String sValue = xResultSetRow.getString(ColIndex); return oAny; } diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java index 5dd833764e12..46239f8380e8 100644 --- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java +++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java @@ -18,15 +18,11 @@ package com.sun.star.wizards.db; -// import com.sun.star.lang.IllegalArgumentException; -// import com.sun.star.lang.WrappedTargetException; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.beans.*; -// import com.sun.star.container.NoSuchElementException; import com.sun.star.container.XIndexAccess; import com.sun.star.container.XNameAccess; import com.sun.star.sdbcx.XColumnsSupplier; -// import com.sun.star.sdb.XColumn; import com.sun.star.sdb.XSingleSelectQueryComposer; import com.sun.star.sdb.XSingleSelectQueryAnalyzer; import com.sun.star.ui.dialogs.XExecutableDialog; @@ -45,10 +41,7 @@ public class SQLQueryComposer { public XColumnsSupplier xColSuppl; - // XSQLQueryComposer xSQLQueryComposer; QueryMetaData CurDBMetaData; - // String m_sSelectClause; - // String m_sFromClause; public XSingleSelectQueryAnalyzer m_xQueryAnalyzer; ArrayList<CommandName> composedCommandNames = new ArrayList<CommandName>(1); private XSingleSelectQueryComposer m_queryComposer; diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java b/wizards/com/sun/star/wizards/db/TableDescriptor.java index 3801ee176b72..2d34c4fe504c 100644 --- a/wizards/com/sun/star/wizards/db/TableDescriptor.java +++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java @@ -73,7 +73,6 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen private boolean bIDFieldisInserted = false; private String IDFieldName = PropertyNames.EMPTY_STRING; private String sColumnAlreadyExistsMessage = PropertyNames.EMPTY_STRING; -// private WizardDialog oUnoDialog; private XWindow xWindow; /** @@ -105,8 +104,6 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { if (super.getConnection(_curPropertyValue)) { - // XTablesSupplier xDBTables = (XTablesSupplier) UnoRuntime.queryInterface(XTablesSupplier.class, DBConnection); - // xTableNames = xDBTables.getTables(); xTableAppend = UnoRuntime.queryInterface( XAppend.class, getTableNamesAsNameAccess() ); xTableDrop = UnoRuntime.queryInterface( XDrop.class, getTableNamesAsNameAccess() ); xTableDataDescriptorFactory = UnoRuntime.queryInterface( XDataDescriptorFactory.class, getTableNamesAsNameAccess() ); diff --git a/wizards/com/sun/star/wizards/db/TypeInspector.java b/wizards/com/sun/star/wizards/db/TypeInspector.java index a5ae2925b1dc..d0fde032d4a5 100644 --- a/wizards/com/sun/star/wizards/db/TypeInspector.java +++ b/wizards/com/sun/star/wizards/db/TypeInspector.java @@ -77,8 +77,6 @@ public class TypeInspector ArrayList<Integer> aMinScaleVector = new ArrayList<Integer>(); ArrayList<Integer> aMaxScaleVector = new ArrayList<Integer>(); ArrayList<Integer> aSearchableVector = new ArrayList<Integer>(); - // Integer[] aIntegerDataTypes = null; -// XResultSet xResultSet = xDBMetaDagetTypeInfo(); XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet); while (xResultSet.next()) { @@ -274,8 +272,6 @@ public class TypeInspector { if (nDataTypeInfos[i] == _curDataType) { -// System.out.println( "Desired prec " + precision + ",nPrecisionInfos[i]="+nPrecisionInfos[i] + ",sDataTypeNames[i]="+sDataTypeNames[i] ); - if (precision == null || nPrecisionInfos[i] >= precision.intValue()) { ret = sDataTypeNames[i]; // this fits best ! @@ -289,7 +285,6 @@ public class TypeInspector } } } -// System.out.println( "_curDataType="+_curDataType+",precision="+precision+",ret="+ return ret; } diff --git a/wizards/com/sun/star/wizards/document/FormHandler.java b/wizards/com/sun/star/wizards/document/FormHandler.java index 065c28b0150f..8cd448917141 100644 --- a/wizards/com/sun/star/wizards/document/FormHandler.java +++ b/wizards/com/sun/star/wizards/document/FormHandler.java @@ -139,7 +139,6 @@ public class FormHandler oControlData[14] = createControlData(DataType.DATE, SODATECONTROL, DATEFIELD, DATEFIELD, false); oControlData[15] = createControlData(DataType.TIME, SOTIMECONTROL, TIMEFIELD, TIMEFIELD, false); oControlData[16] = createControlData(DataType.TIMESTAMP, SODATECONTROL, DATEFIELD, TEXTFIELD, false); - // oImageControlData = new ControlData[4]; oControlData[17] = createControlData(DataType.BINARY, SOIMAGECONTROL, IMAGECONTROL, TEXTFIELD, false); oControlData[18] = createControlData(DataType.VARBINARY, SOIMAGECONTROL, IMAGECONTROL, TEXTFIELD, false); oControlData[19] = createControlData(DataType.LONGVARBINARY, SOIMAGECONTROL, IMAGECONTROL, TEXTFIELD, false); diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.java b/wizards/com/sun/star/wizards/document/OfficeDocument.java index 6fbf0da777fd..b2ca63020948 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.java +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.java @@ -256,10 +256,8 @@ public class OfficeDocument public static Object load(XInterface xInterface, String sURL, String sFrame, PropertyValue[] xValues) { - // XComponent xComponent = null; Object oDocument = null; com.sun.star.frame.XComponentLoader xComponentLoader = null; - //XInterface xInterface = null; try { xComponentLoader = UnoRuntime.queryInterface(XComponentLoader.class, xInterface); @@ -422,9 +420,6 @@ public class OfficeDocument public static int showMessageBox(XMultiServiceFactory xMSF, String windowServiceName, int windowAttribute, String MessageText) { -// if (getWindowPeer() != null) - // return SystemDialog.showMessageBox(xMSF, xWindowPeer, windowServiceName, windowAttribute, MessageText); -// else return SystemDialog.showMessageBox(xMSF, windowServiceName, windowAttribute, MessageText); } diff --git a/wizards/com/sun/star/wizards/document/TimeStampControl.java b/wizards/com/sun/star/wizards/document/TimeStampControl.java index 2d7f45bbef5f..476c6bfdfd3d 100644 --- a/wizards/com/sun/star/wizards/document/TimeStampControl.java +++ b/wizards/com/sun/star/wizards/document/TimeStampControl.java @@ -141,9 +141,6 @@ public class TimeStampControl extends DatabaseControl // --> TESTING Point aBeforePt = xShapeGroup.getPosition(); xShapeGroup.setPosition(_aPoint); -// oDateControl.xShape.setPosition(_aPoint); -// Point atimepoint = new Point(oDateControl.xShape.getPosition().X + oDateControl.xShape.getSize().Width, oDateControl.xShape.getPosition().Y ); -// oTimeControl.xShape.setPosition(atimepoint); // --> TESTING Point aAfterPt = xShapeGroup.getPosition(); } diff --git a/wizards/com/sun/star/wizards/form/FieldLinker.java b/wizards/com/sun/star/wizards/form/FieldLinker.java index fa2a89e3200a..7ebf56607fcb 100644 --- a/wizards/com/sun/star/wizards/form/FieldLinker.java +++ b/wizards/com/sun/star/wizards/form/FieldLinker.java @@ -156,7 +156,6 @@ public class FieldLinker extends DBLimitedFieldSelection protected void enableNextControlRow(int curindex) { - // setMaxSelIndex(); boolean bSlaveField = lstSlaveFields[curindex].getSelectedItemPos() > 0; boolean bMasterField = lstMasterFields[curindex].getSelectedItemPos() > 0; boolean bDoEnable = (bSlaveField && bMasterField); @@ -217,8 +216,6 @@ public class FieldLinker extends DBLimitedFieldSelection public void initialize(String[] _AllMasterFieldNames, String[] _AllSlaveFieldNames, String[][] _LinkFieldNames) { - // short[] MasterSelList = null; - // short[] SlaveSelList = null; int SOMASTERINDEX = 1; String[] MasterLinkNames = JavaTools.ArrayOutOfMultiDimArray(_LinkFieldNames, SOMASTERINDEX); int SOSLAVEINDEX = 0; @@ -252,7 +249,6 @@ public class FieldLinker extends DBLimitedFieldSelection */ public String[][] getLinkFieldNames() { - // setMaxSelIndex(); int nSelectedIndex = getMaxSelIndex(); String[][] LinkFieldNames = new String[2][nSelectedIndex + 1]; for (int i = 0; i <= nSelectedIndex; i++) diff --git a/wizards/com/sun/star/wizards/form/Finalizer.java b/wizards/com/sun/star/wizards/form/Finalizer.java index 8c4a63b19c02..6a4cf5902b84 100644 --- a/wizards/com/sun/star/wizards/form/Finalizer.java +++ b/wizards/com/sun/star/wizards/form/Finalizer.java @@ -123,8 +123,6 @@ public class Finalizer public boolean finish() { -// if (!oFormDocument.oMainFormDBMetaData.hasFormDocumentByName(sFormName)){ return oFormDocument.oMainFormDBMetaData.storeDatabaseDocumentToTempPath(this.oFormDocument.xComponent, getName()); -// } } } diff --git a/wizards/com/sun/star/wizards/form/FormConfiguration.java b/wizards/com/sun/star/wizards/form/FormConfiguration.java index bc372e2e7913..230ca59bf6b5 100644 --- a/wizards/com/sun/star/wizards/form/FormConfiguration.java +++ b/wizards/com/sun/star/wizards/form/FormConfiguration.java @@ -45,7 +45,6 @@ public class FormConfiguration XFixedText lblRelations; XListBox lstRelations; String[] sreferencedTables; - // Integer ISubFormStep; CommandFieldSelection CurSubFormFieldSelection; String SSUBFORMMODE = "toggleSubFormMode"; String STOGGLESTEPS = "toggleSteps"; diff --git a/wizards/com/sun/star/wizards/form/FormControlArranger.java b/wizards/com/sun/star/wizards/form/FormControlArranger.java index 48230befde13..f8b919c7e626 100644 --- a/wizards/com/sun/star/wizards/form/FormControlArranger.java +++ b/wizards/com/sun/star/wizards/form/FormControlArranger.java @@ -455,7 +455,6 @@ public class FormControlArranger { ++iReduceWidth; } - //if (m_maxPostionX > (nFormWidth-cXOffset-cXOffset)) // cXOffset + nFormWidth if (m_maxPostionX > cXOffset + nFormWidth) { checkJustifiedPosition(a); @@ -587,9 +586,6 @@ public class FormControlArranger { curLabelControl.setSize(new Size(m_LabelWidth, m_LabelHeight)); } -// if (CurHelpText != PropertyNames.EMPTY_STRING){ -// oModel.HelpText = CurHelptext; -// } } catch (Exception e) { diff --git a/wizards/com/sun/star/wizards/form/FormDocument.java b/wizards/com/sun/star/wizards/form/FormDocument.java index bea2cc54a69c..eb2a997ef6bf 100644 --- a/wizards/com/sun/star/wizards/form/FormDocument.java +++ b/wizards/com/sun/star/wizards/form/FormDocument.java @@ -176,14 +176,12 @@ public class FormDocument extends TextDocument else { ControlForm aMainForm = oControlForms.get(0); - // boolean bHasSubForm = aMainForm.xFormContainer.hasByName(SOSUBFORM); // WRONG if (oFormHandler.hasFormByName(SOSUBFORM)) if (aMainForm.xFormContainer != null && aMainForm.xFormContainer.hasByName(SOSUBFORM)) { oFormHandler.removeControlsofForm(SOSUBFORM); oFormHandler.removeElement( aMainForm.xFormContainer, SOSUBFORM ); oControlForms.get(1).oFormController = null; - // aMainForm.xFormContainer = null; // .removeFormByName(SOSUBFORM); oControlForms.remove(1); adjustMainFormSize(_NBorderType); } @@ -219,9 +217,6 @@ public class FormDocument extends TextDocument private Size getSubFormSize() { -// int nSubFormHeight = (int) ((double)nFormHeight/2) - SOFORMGAP; -// int nSubFormFieldCount = this.oSubFormDBMetaData.FieldNames.length; -// int totfieldcount = oMainFormDBMetaData.FieldNames.length + nSubFormFieldCount; int nMainFormHeight = oControlForms.get(0).getActualFormHeight(); return new Size(nFormWidth, nFormHeight - nMainFormHeight - SOFORMGAP); } diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java b/wizards/com/sun/star/wizards/form/UIControlArranger.java index ff3a16859564..e1f2b86ea2d1 100644 --- a/wizards/com/sun/star/wizards/form/UIControlArranger.java +++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java @@ -28,7 +28,6 @@ import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.NoValidPathException; import com.sun.star.wizards.document.Control; -// import com.sun.star.wizards.ui.ImageList; import com.sun.star.wizards.ui.ButtonList; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UnoDialog; @@ -48,8 +47,6 @@ public class UIControlArranger private XRadioButton optAlignRight; private XControl flnLabelPlacement; private String[] HelpTexts = new String[4]; - // private String[] sArrangementHeader = new String[2]; - // private ArrangeImageList[] m_aArrangeList = new ArrangeImageList[2]; private ArrangeButtonList[] m_aArrangeList = new ArrangeButtonList[2]; private Integer IControlStep; private final int SOBASEIMAGEYPOSITION = 66; @@ -131,8 +128,6 @@ public class UIControlArranger { new Integer(ResId), new Integer(ResId + 1) }; -// String s = CurUnoDialog.getWizardImageUrl(ResId, ResId + 1); //((Integer)listitem).intValue(), )sBitmapPath + "/Arrange_" + (((Integer)listitem).intValue() + 1) + ".gif"; -// return s; } public String render(Object listItem) @@ -188,127 +183,6 @@ public class UIControlArranger Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignRight), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bEnableAlignControlGroup)); } -// private class ArrangeImageList implements XItemListener -// { - -// private int formindex; -// private ImageList m_aButtonList = null; // new ImageList(); - -// public ArrangeImageList(int _formindex, ListModel model, String _sArrangementHeader) -// { -// formindex = _formindex; -// Integer YPos = new Integer(SOBASEIMAGEYPOSITION + _formindex * SOIMAGELISTHEIGHT); -// // Label ArrangementHeader ---------------------- -// CurUnoDialog.insertFixedLine("lnLabelPlacment_" + (_formindex + 1), -// new String[] -// { -// PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH -// }, -// new Object[] -// { -// UIConsts.INTEGERS[8], _sArrangementHeader, 97, YPos, IControlStep, new Short(curtabindex++), 207 -// }); - -// int nypos = SOBASEIMAGEYPOSITION + 12 + _formindex * SOIMAGELISTHEIGHT; -// m_aButtonList = new ImageList(); -// m_aButtonList.setPos(new Size(107, nypos)); -// m_aButtonList.setImageSize(new Size(26, 26)); -// m_aButtonList.setCols(4); -// m_aButtonList.setRows(1); -// m_aButtonList.m_aControlName = "ImageList_" + formindex; -// m_aButtonList.setStep(new Short((short) FormWizard.SOCONTROL_PAGE)); -// m_aButtonList.setShowButtons(false); -// m_aButtonList.setRenderer(new LayoutRenderer()); -// m_aButtonList.setSelectionGap(new Size(2, 2)); -// m_aButtonList.setGap(new Size(3, 3)); -// m_aButtonList.scaleImages = Boolean.FALSE; -// m_aButtonList.tabIndex = (int) curtabindex++; -// m_aButtonList.helpURL = 34453 + (formindex * 4); - -// m_aButtonList.setListModel(model); -// m_aButtonList.create(CurUnoDialog); -// m_aButtonList.setSelected(FormWizard.SOGRID - 1); -// 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 -// { -// if (m_aArrangeList[formindex].m_aButtonList.isenabled()) -// { -// boolean bEnableAlignControlGroup; -// if (curFormDocument.oControlForms.size() == 2) -// { -// final int nSelected0 = (m_aArrangeList[0].m_aButtonList.getSelected() + 1); -// final int nSelected1 = (m_aArrangeList[1].m_aButtonList.getSelected() + 1); - -// bEnableAlignControlGroup = ((nSelected0 == FormWizard.SOCOLUMNARLEFT) || -// (nSelected1 == FormWizard.SOCOLUMNARLEFT)); -// } -// else -// { -// final int nSelected0 = (m_aArrangeList[0].m_aButtonList.getSelected() + 1); -// bEnableAlignControlGroup = (nSelected0 == FormWizard.SOCOLUMNARLEFT); -// } -// enableAlignControlGroup(bEnableAlignControlGroup); -// final Short nBorderType = CurUnoDialog.getBorderType(); -// final int nSelected = m_aButtonList.getSelected() + 1; -// ((FormDocument.ControlForm) curFormDocument.oControlForms.get(formindex)).initialize(nSelected, nBorderType); -// } -// } -// catch (RuntimeException e) -// { -// e.printStackTrace(); -// } -// } - -// /* (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) -// { -// // TODO Auto-generated method stub -// } -// } - private class ArrangeButtonList implements XItemListener { diff --git a/wizards/com/sun/star/wizards/query/QuerySummary.java b/wizards/com/sun/star/wizards/query/QuerySummary.java index 4b915a80d35e..47dc89fa2432 100644 --- a/wizards/com/sun/star/wizards/query/QuerySummary.java +++ b/wizards/com/sun/star/wizards/query/QuerySummary.java @@ -33,7 +33,6 @@ public class QuerySummary extends QueryMetaData final protected int RID_REPORT = 2400; String sSummary; Resource oResource; - // XMultiServiceFactory xMSF; private String sSeparator; private String sReturnChar; private String sAnd; @@ -43,7 +42,6 @@ public class QuerySummary extends QueryMetaData { super(_xMSF); this.oResource = _oResource; - // this.xMSF = _xMSF; sAnd = oResource.getResText(RID_QUERY + 38); sOr = oResource.getResText(RID_QUERY + 39); sSeparator = oResource.getResText(RID_QUERY + 91); @@ -66,8 +64,6 @@ public class QuerySummary extends QueryMetaData "<FIELDNAME>", "<SORTMODE>" }) + sReturnChar; sFilterFraction = combineFilterNameFraction(this.getFilterConditions(), RID_QUERY + 53, RID_QUERY + 54) + sReturnChar; - // if (xDBMetaData.getNumericFunctions().length() > 0) - // sAggregateFraction = combinePartString(RID_QUERY + 55, AggregateFieldNames, RID_QUERY + 56, RID_QUERY + 95, new String[]{ "<CALCULATEDFUNCTION>", "<FIELDNAME>"}) + sReturnChar; if (xDBMetaData.supportsGroupBy()) { sGroupByFraction = combinePartString(RID_QUERY + 57, GroupFieldNames, RID_QUERY + 58) + sReturnChar; diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java index efa0df4fb981..5001dd04fb64 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -209,7 +209,6 @@ public class QueryWizard extends DatabaseObjectWizard i = insertRoadmapItem(i, false, SOGROUPSELECTION_PAGE - 1, SOGROUPSELECTION_PAGE); i = insertRoadmapItem(i, false, SOGROUPFILTER_PAGE - 1, SOGROUPFILTER_PAGE); } - // if (CurDBMetaData.xDBMetaData.supportsColumnAliasing()) don't use -> too dangerous!!! i = insertRoadmapItem(i, false, SOTITLES_PAGE - 1, SOTITLES_PAGE); i = insertRoadmapItem(i, false, SOSUMMARY_PAGE - 1, SOSUMMARY_PAGE); setRoadmapInteractive(true); diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java index 78064756c425..095ff23d9c52 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -22,7 +22,6 @@ import com.sun.star.beans.XPropertySet; import com.sun.star.beans.XPropertyState; import com.sun.star.container.XNameAccess; import com.sun.star.container.XNamed; -// import com.sun.star.lang.IndexOutOfBoundsException; import com.sun.star.style.ParagraphAdjust; import com.sun.star.table.XCell; import com.sun.star.table.XCellRange; @@ -464,8 +463,6 @@ public class DBColumn // Todo: Insert a resource; Exception should be thrown to the calling routine catch (Exception exception) { -// sMsgInvalidTextField = oResource.getResText(UIConsts.RID_REPORT + 73); -// SystemDialog.showMessageBox(oTextTableHandler.xMSFDoc, "ErrorBox", VclWindowPeerAttribute.OK, sMsgInvalidTextField); exception.printStackTrace(System.err); return true; //most probably this is really the Namecell!!!! } diff --git a/wizards/com/sun/star/wizards/report/Dataimport.java b/wizards/com/sun/star/wizards/report/Dataimport.java index 690d52f1bfd4..acf3cc63c73f 100644 --- a/wizards/com/sun/star/wizards/report/Dataimport.java +++ b/wizards/com/sun/star/wizards/report/Dataimport.java @@ -29,12 +29,11 @@ import java.util.logging.Level; import java.util.logging.Logger; public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionListener -{ // extends ReportWizard +{ // ReportTextDocument CurReportDocument; IReportDocument CurReportDocument; -// PropertyValue[] CurProperties; static boolean bStopProcess; static String sProgressDBConnection; static String sProgressDataImport; @@ -43,14 +42,6 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi static String sProgressTitle; static String sStop; -// public static final String TBLRECORDSECTION = ReportTextDocument.TBLRECORDSECTION; -// public static final String TBLGROUPSECTION = ReportTextDocument.TBLGROUPSECTION; -// public static final String RECORDSECTION = ReportTextDocument.RECORDSECTION; -// public static final String GROUPSECTION = ReportTextDocument.GROUPSECTION; -// public static final String COPYOFTBLRECORDSECTION = ReportTextDocument.COPYOFTBLRECORDSECTION; -// public static final String COPYOFTBLGROUPSECTION = ReportTextDocument.COPYOFTBLGROUPSECTION; -// public static final String COPYOFRECORDSECTION = ReportTextDocument.COPYOFRECORDSECTION; -// public static final String COPYOFGROUPSECTION = ReportTextDocument.COPYOFGROUPSECTION; public Dataimport(XMultiServiceFactory _xMSF) { super(_xMSF); @@ -158,7 +149,6 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi } } - // public void importReportData(final XMultiServiceFactory xMSF, final Dataimport CurDataimport, final ReportTextDocument CurReportDocument.getDoc()) { public void importReportData(final XMultiServiceFactory _xMSF, final Dataimport _CurDataimport, IReportDocument _CurReportDocument, PropertyValue[] _properties) { if (CurReportDocument.reconnectToDatabase(_xMSF, _properties)) diff --git a/wizards/com/sun/star/wizards/report/IReportDocument.java b/wizards/com/sun/star/wizards/report/IReportDocument.java index 6c05418d18c5..f071a2e480be 100644 --- a/wizards/com/sun/star/wizards/report/IReportDocument.java +++ b/wizards/com/sun/star/wizards/report/IReportDocument.java @@ -166,8 +166,6 @@ public interface IReportDocument */ public void liveupdate_changeContentTemplate(String ContentTemplatePath); - // public String[] getLayoutTemplates(); - // public String[] getContentTemplates(); public void layout_selectFirstPage(); public void layout_setupRecordSection(String TemplateName); @@ -217,13 +215,11 @@ public interface IReportDocument /* DataImport */ // ??? - // public void addTextSectionCopies(); // ??? public boolean reconnectToDatabase(XMultiServiceFactory xMSF, PropertyValue[] Properties); // ??? public void insertDatabaseDatatoReportDocument(XMultiServiceFactory xMSF); // ??? - // public com.sun.star.lang.XMultiServiceFactory getDocumentServiceFactory(); /** * set a internal variable to stop a maybe longer DB access. */ diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java index 73a82c2d86e7..dbd01df3cc05 100644 --- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java +++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java @@ -16,7 +16,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ package com.sun.star.wizards.report; -//import com.sun.star.ucb.CommandAbortedException; import com.sun.star.ucb.XSimpleFileAccess; import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; @@ -26,13 +25,8 @@ import com.sun.star.wizards.common.*; import com.sun.star.wizards.ui.*; import com.sun.star.awt.VclWindowPeerAttribute; import com.sun.star.awt.XTextComponent; -//import com.sun.star.container.XHierarchicalNameAccess; -//import com.sun.star.container.XNameAccess; -//import com.sun.star.lang.EventObject; -//import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.wizards.db.RecordParser; -//import com.sun.star.wizards.document.OfficeDocument; public class ReportFinalizer { @@ -42,23 +36,16 @@ public class ReportFinalizer Object chkTemplate; String CHANGEREPORTTITLE_FUNCNAME = "changeReportTitle"; String TOGGLESUBTEMPLATECONTROLS_FUNCNAME = "toggleSubTemplateControls"; -// String slblHowProceed; -// String slblChooseReportKind; String TemplatePath; String StoreName; boolean bfinalaskbeforeOverwrite; String DefaultName; String OldDefaultName; - // ReportTextDocument CurReportDocument; IReportDocument CurReportDocument; - // Desktop.OfficePathRetriever curofficepath; -// short curtabindex; -// String sMsgReportDocumentNameDuplicate; public static final int SOCREATEDOCUMENT = 1; public static final int SOCREATETEMPLATE = 2; public static final int SOUSETEMPLATE = 3; private XMultiServiceFactory m_xMSF; - // public Finalizer(ReportTextDocument _CurReportDocument, WizardDialog _CurUnoDialog) { public ReportFinalizer(XMultiServiceFactory _xMSF, IReportDocument _CurReportDocument, WizardDialog _CurUnoDialog) { m_xMSF = _xMSF; @@ -67,13 +54,11 @@ public class ReportFinalizer this.CurReportDocument = _CurReportDocument; short curtabindex = (short) (ReportWizard.SOSTOREPAGE * 100); Desktop odesktop = new Desktop(); - // curofficepath = odesktop.new OfficePathRetriever(m_xMSF); String sSaveAsTemplate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 40); String sUseTemplate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 41); String sEditTemplate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 42); String sSaveAsDocument = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 43); -// String sSaveAs = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 44); String sReportTitle = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 33); String slblHowProceed = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 78); String slblChooseReportKind = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 79); @@ -178,15 +163,6 @@ public class ReportFinalizer boolean bDoEnable = sTitle.equals(PropertyNames.EMPTY_STRING); CurUnoDialog.enableFinishButton(!bDoEnable); } -// private boolean fileexists(XMultiServiceFactory _xMSF, String _spath){ -// try { -// XInterface xUcbInterface = (XInterface) _xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); -// XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface); -// return xSimpleFileAccess.exists(_spath); -// } catch (Exception exception) { -// exception.printStackTrace(System.err); -// return false; -// }} public void initialize(RecordParser _CurDBMetaData) { String FirstCommandName = (_CurDBMetaData.getIncludedCommandNames())[0]; diff --git a/wizards/com/sun/star/wizards/report/ReportLayouter.java b/wizards/com/sun/star/wizards/report/ReportLayouter.java index e48e3d7a5167..598b74a8d0dd 100644 --- a/wizards/com/sun/star/wizards/report/ReportLayouter.java +++ b/wizards/com/sun/star/wizards/report/ReportLayouter.java @@ -18,7 +18,6 @@ package com.sun.star.wizards.report; import com.sun.star.awt.XListBox; -// import com.sun.star.awt.XTextComponent; import com.sun.star.lang.EventObject; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.wizards.common.*; @@ -38,29 +37,19 @@ public class ReportLayouter { UnoDialog CurUnoDialog; -// static String sOrientationHeader; -// static String sOrientVertical; -// static String sOrientHorizontal; final int SOTXTTITLE = 28; final int SOCONTENTLST = 29; final static public int SOOPTLANDSCAPE = 30; final static public int SOOPTPORTRAIT = 31; final int SOLAYOUTLST = 32; -// static String sReportTitle; -// static String slblDataStructure; -// static String slblPageLayout; -// static String sOrganizeFields; XListBox xContentListBox; XListBox xLayoutListBox; int iOldContentPos; int iOldLayoutPos; - // ReportTextDocument CurReportDocument; IReportDocument CurReportDocument; public String[][] LayoutFiles; public String[][] ContentFiles; - // private Desktop.OfficePathRetriever curofficepath; Object aOrientationImage; - // boolean m_bLandscape = true; private XMultiServiceFactory m_xMSF; private XTextRange trTitleconst, trAuthorconst, trDateconst, trPageconst; private TextElement teTitleconst, teAuthorconst, teDateconst, tePageconst; @@ -77,24 +66,13 @@ public class ReportLayouter this.CurUnoDialog = _CurUnoDialog; this.CurReportDocument = _CurReportDocument; //TODO the constructor for the OfficePathRetriever is redundant and should be instantiated elsewhere - // Desktop odesktop = new Desktop(); - // curofficepath = odesktop.new OfficePathRetriever(m_xMSF); String slblDataStructure = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 15); String slblPageLayout = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 16); -// String sOrganizeFields = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 19); String sOrientationHeader = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 22); String sOrientVertical = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 23); String sOrientHorizontal = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 24); - // XInterface xUcbInterface = (XInterface) m_xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - // XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface); - // boolean bcntexists = xSimpleFileAccess.exists(CurReportDocument.getReportPath() + "/cnt-default.ott"); - // boolean bstlexists = xSimpleFileAccess.exists(CurReportDocument.getReportPath() + "/stl-default.ott"); - // if ((bcntexists == false) || (bstlexists == false)) - // throw new NoValidPathException(CurReportDocument.xMSF); - - CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblContent", new String[] { @@ -106,7 +84,6 @@ public class ReportLayouter }); short iSelPos = 0; -// ContentFiles = FileAccess.getFolderTitles(m_xMSF, "cnt", CurReportDocument.getReportPath()); ContentFiles = CurReportDocument.getDataLayout(); iSelPos = (short) JavaTools.FieldInList(ContentFiles[1], CurReportDocument.getContentPath()); if (iSelPos < 0) @@ -138,7 +115,6 @@ public class ReportLayouter }); short iSelLayoutPos = 0; -// LayoutFiles = FileAccess.getFolderTitles(m_xMSF, "stl", CurReportDocument.getReportPath()); LayoutFiles = CurReportDocument.getHeaderLayout(); iSelLayoutPos = (short) JavaTools.FieldInList(LayoutFiles[1], CurReportDocument.getLayoutPath()); if (iSelLayoutPos < 0) @@ -231,17 +207,14 @@ public class ReportLayouter public void initialize(String _defaultTemplatePath) { -// CurReportDocument.getDoc().xTextDocument.lockControllers(); CurReportDocument.layout_setupRecordSection(_defaultTemplatePath); if (CurUnoDialog.getControlProperty("txtTitle", "Text").equals(PropertyNames.EMPTY_STRING)) { String[] sCommandNames = CurReportDocument.getRecordParser().getIncludedCommandNames(); CurUnoDialog.setControlProperty("txtTitle", "Text", sCommandNames[0]); } - // CurReportDocument.getDoc().oViewHandler.selectFirstPage(CurReportDocument.getDoc().oTextTableHandler); CurReportDocument.layout_selectFirstPage(); CurUnoDialog.setFocus("lblContent"); -// CurReportDocument.getDoc().unlockallControllers(); } class ItemListenerImpl implements com.sun.star.awt.XItemListener @@ -321,7 +294,6 @@ public class ReportLayouter { e.printStackTrace(); } - // CurReportDocument.getDoc().unlockallControllers(); Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); } @@ -342,7 +314,6 @@ public class ReportLayouter try { Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); -// CurReportDocument.getDoc().xTextDocument.lockControllers(); boolean blandscape = (((Short) CurUnoDialog.getControlProperty("optLandscape", PropertyNames.PROPERTY_STATE)).shortValue() == 1); CurReportDocument.setPageOrientation((blandscape) ? SOOPTLANDSCAPE : SOOPTPORTRAIT); } @@ -350,7 +321,6 @@ public class ReportLayouter { exception.printStackTrace(System.err); } -// CurReportDocument.getDoc().unlockallControllers(); Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); } } diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index 2c3963b81177..7db1ff85e56f 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -22,7 +22,6 @@ import com.sun.star.text.XRelativeTextContentRemove; import com.sun.star.text.XTextContent; import java.util.ArrayList; import java.util.Comparator; -import com.sun.star.awt.Rectangle; import com.sun.star.awt.VclWindowPeerAttribute; import com.sun.star.container.XNameAccess; import com.sun.star.lang.XMultiServiceFactory; @@ -33,7 +32,6 @@ import com.sun.star.wizards.db.*; import com.sun.star.wizards.common.*; import com.sun.star.wizards.ui.*; import com.sun.star.sdb.CommandType; -// import com.sun.star.table.XCell; import com.sun.star.text.XTextDocument; import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.text.TextTableHandler; @@ -52,18 +50,14 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen private static final String ISVISIBLE = "IsVisible"; private static final String QUERYNAME = "QueryName"; private static final String SIZE = "Size"; - // private XMultiServiceFactory xMSF; - // private XMultiServiceFactory xMSFDoc; private Object ReportPageStyle; private Object FirstPageStyle; - // private String ReportFolderName; public ArrayList<DBColumn> DBColumnsVector; private RecordTable CurRecordTable; private String sMsgTableNotExisting; private String sMsgCommonReportError; private String ContentTemplatePath; private String LayoutTemplatePath; - // private String sMsgInvalidTextField; private String sMsgEndAutopilot; public boolean bIsCurLandscape; public TextTableHandler oTextTableHandler; @@ -152,35 +146,25 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen public void swapContentTemplate(String ContentTemplatePath) { -// unlockallControllers(); - //xProgressBar.start("", 10); this.ContentTemplatePath = ContentTemplatePath; loadSectionsfromTemplate(ContentTemplatePath); - // xProgressBar.setValue(40); oTextStyleHandler.loadStyleTemplates(ContentTemplatePath, "LoadTextStyles"); - // xProgressBar.setValue(70); if (CurRecordTable != null) { CurRecordTable.adjustOptimalTableWidths(xMSF, oViewHandler); } - // xProgressBar.setValue(100); oViewHandler.selectFirstPage(oTextTableHandler); - // xProgressBar.end(); } public void swapLayoutTemplate(String LayoutTemplatePath/*, String BitmapPath*/) { try { - // xProgressBar.start("", 10); this.LayoutTemplatePath = LayoutTemplatePath; boolean bOldIsCurLandscape = AnyConverter.toBoolean(Helper.getUnoPropertyValue(ReportPageStyle, ISLANDSCAPE)); oTextStyleHandler.loadStyleTemplates(LayoutTemplatePath, "LoadPageStyles"); - // xProgressBar.setValue(60); changePageOrientation(bOldIsCurLandscape); - // xProgressBar.setValue(100); oViewHandler.selectFirstPage(oTextTableHandler); - // xProgressBar.end(); } catch (IllegalArgumentException e) { @@ -353,10 +337,6 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } } } - //public boolean isGroupField(String _FieldName) - // { - // return (JavaTools.FieldInList(CurDBMetaData.GroupFieldNames, _FieldName) != -1); - // } public void replaceFieldValueInRecordSection(int RecordCount) { @@ -714,7 +694,6 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { try { -// xRelativeTextContentRemove.removeTextContentBefore(xTextContent); xRelativeTextContentRemove.removeTextContentAfter(xTextContent); // IllegalArgumentException may be thrown when no paragraphbreak is there } diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java index 9e57fdc696c7..89d757107142 100644 --- a/wizards/com/sun/star/wizards/report/ReportWizard.java +++ b/wizards/com/sun/star/wizards/report/ReportWizard.java @@ -17,7 +17,6 @@ */ package com.sun.star.wizards.report; -// import java.util.Vector; import com.sun.star.awt.TextEvent; import com.sun.star.awt.VclWindowPeerAttribute; import com.sun.star.awt.XTextListener; @@ -124,8 +123,6 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener { if ((nOldStep >= SOTEMPLATEPAGE) && (nNewStep < SOTEMPLATEPAGE)) { - // CurReportDocument.getDoc().oTextSectionHandler.removeTextSectionbyName("RecordSection"); - // CurReportDocument.getDoc().oTextTableHandler.removeTextTablebyName("Tbl_RecordSection"); m_reportDocument.removeTextTableAndTextSection(); } switch (nNewStep) @@ -279,7 +276,6 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener String sCommand = (String) oCommand.getPropertySet().getPropertyValue(PropertyNames.COMMAND); if (bHasEscapeProcessing) { - // String sCommand = (String) oCommand.xPropertySet.getPropertyValue(PropertyNames.COMMAND); bQueryCreated = (!sCommand.equals(PropertyNames.EMPTY_STRING)); if (m_reportDocument instanceof ReportTextImplementation) { @@ -325,20 +321,13 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener 16, sShowBinaryFields, 95, 162, 1, 210 }); } - // CurReportDocument.getDoc().xProgressBar.setValue(40); CurTitlesComponent = new TitlesComponent(this, SOTITLEPAGE, 97, 37, 210, 7, slblColumnNames, slblColumnTitles, 34381); CurTitlesComponent.addTextListener(this); - // CurReportDocument.getDoc().xProgressBar.setValue(50); CurGroupFieldHandler = new GroupFieldHandler(m_reportDocument, this); - // CurReportDocument.getDoc().xProgressBar.setValue(60); CurSortingComponent = new SortingComponent(this, SOSORTPAGE, 95, 30, 210, 34346); - // CurReportDocument.getDoc().xProgressBar.setValue(70); CurReportLayouter = new ReportLayouter(xMSF, m_reportDocument, this, isReportBuilderInstalled()); - // CurReportDocument.getDoc().xProgressBar.setValue(80); CurReportFinalizer = new ReportFinalizer(xMSF, m_reportDocument, this); - // CurReportDocument.getDoc().xProgressBar.setValue(100); bCloseDocument = true; - // CurReportDocument.getDoc().xProgressBar.end(); enableNavigationButtons(false, false, false); } diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java index 3797eb16a82e..5a1c0e24790e 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java @@ -26,9 +26,6 @@ public class SectionLabel extends SectionObject protected SectionLabel(XFixedText _aFixedText) { m_aParentObject = _aFixedText; - // We would like to know, what properties are in this object. -// PropertySetHelper aHelper = new PropertySetHelper(_aFixedText); -// aHelper.showProperties(); } public static SectionObject create(XFixedText _aFixedText) diff --git a/wizards/com/sun/star/wizards/table/FieldDescription.java b/wizards/com/sun/star/wizards/table/FieldDescription.java index a1b655b777b2..b122b40ecb5c 100644 --- a/wizards/com/sun/star/wizards/table/FieldDescription.java +++ b/wizards/com/sun/star/wizards/table/FieldDescription.java @@ -32,12 +32,10 @@ import com.sun.star.wizards.common.PropertyNames; public class FieldDescription { private String tablename = PropertyNames.EMPTY_STRING; -// String fieldname; private String keyname; private XNameAccess xNameAccessTableNode; private XPropertySet xPropertySet; private ArrayList<PropertyValue> aPropertyValues; -// PropertyValue[] aPropertyValues; private Integer Type; private String Name; private XMultiServiceFactory xMSF; @@ -121,7 +119,6 @@ public class FieldDescription try { xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, _xNameAccessFieldNode); -// Integer Index = (Integer) xPropertySet.getPropertyValue("Index"); if (propertyexists(PropertyNames.PROPERTY_NAME)) { aPropertyValues.add(Properties.createProperty(PropertyNames.PROPERTY_NAME, Name)); @@ -133,12 +130,10 @@ public class FieldDescription if (propertyexists("Scale")) { aPropertyValues.add(Properties.createProperty("Scale", xPropertySet.getPropertyValue("Scale"))); -// Scale = } if (propertyexists("Precision")) { aPropertyValues.add(Properties.createProperty("Precision", xPropertySet.getPropertyValue("Precision"))); -// Precision = (Integer) xPropertySet.getPropertyValue("Precision"); } if (propertyexists("DefaultValue")) { diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java b/wizards/com/sun/star/wizards/table/ScenarioSelector.java index f7a808812105..64823324e029 100644 --- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java +++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java @@ -270,8 +270,6 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X public void fillupTables() { -// if (optBusiness.getState()) -// else } public void fillupFieldsListbox() diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.java b/wizards/com/sun/star/wizards/text/TextFieldHandler.java index 4daf2ed62ba6..0ecc84da19ec 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.java +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.java @@ -106,18 +106,6 @@ public class TextFieldHandler xDepField.attachTextFieldMaster(xPSet); xTextCursor.getText().insertTextContent(xTextCursor, xFieldContent, false); -// try -// { -// XPropertySet xTestProp = xDepField.getTextFieldMaster(); -// String UserFieldName = (String) xTestProp.getPropertyValue(PropertyNames.PROPERTY_NAME); -// // UserFieldName == FieldName? -// int dummy = 0; -// } -// catch (com.sun.star.uno.Exception e) -// { -// int dummy2 = 0; -// } - } catch (com.sun.star.uno.Exception exception) { @@ -132,9 +120,6 @@ public class TextFieldHandler xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, FieldName); xPSet.setPropertyValue("Content", FieldTitle); - // DEBUG - // String sFieldName = (String)xPSet.getPropertyValue(PropertyNames.PROPERTY_NAME); - return xPSet; } diff --git a/wizards/com/sun/star/wizards/text/TextTableHandler.java b/wizards/com/sun/star/wizards/text/TextTableHandler.java index c992946f163b..b61a080319fb 100644 --- a/wizards/com/sun/star/wizards/text/TextTableHandler.java +++ b/wizards/com/sun/star/wizards/text/TextTableHandler.java @@ -213,15 +213,12 @@ public class TextTableHandler { BreakType CorrBreakValue = null; BreakType BreakValue = (BreakType) com.sun.star.wizards.common.Helper.getUnoStructValue(oTextTable, "BreakType"); - // if (BreakValue.equals(BreakType.NONE) == false){ - // CorrBreakValue = BreakValue; Helper.setUnoPropertyValue(oTextTable, "BreakType", BreakType.NONE); - // } return BreakType.NONE; } public void adjustOptimalTableWidths(XMultiServiceFactory _xMSF, XTextTable xTextTable) - { // setTableColumnSeparators(){ + { try { XFrame xFrame = this.xTextDocument.getCurrentController().getFrame(); diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.java b/wizards/com/sun/star/wizards/text/ViewHandler.java index 1d333bcccd40..c0a92184b63f 100644 --- a/wizards/com/sun/star/wizards/text/ViewHandler.java +++ b/wizards/com/sun/star/wizards/text/ViewHandler.java @@ -67,11 +67,6 @@ public class ViewHandler XTextContent xTextTable = UnoRuntime.queryInterface(XTextContent.class, xAllTextTables.getByIndex(0)); XTextRange xRange = UnoRuntime.queryInterface(XTextRange.class, xTextTable.getAnchor().getText()); xViewTextCursor.gotoRange(xRange, false); -// if (xPageCursor.getPage() == (short) 1) { -// Helper.setUnoPropertyValue(xTextTable, "PageDescName", "First Page"); -// TextTableHandler.resetBreakTypeofTextTable(xTextTable); -// } - // } XTextRange xHeaderRange = (XTextRange) Helper.getUnoPropertyValue(oPageStyle, "HeaderText", XTextRange.class); if (!com.sun.star.uno.AnyConverter.isVoid(xHeaderRange)) { diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java index 0f1010bc4012..97844cca8967 100644 --- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java +++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java @@ -351,9 +351,6 @@ public class AggregateComponent extends ControlScroller for (int i = _index; i < ControlRowVector.size(); i++) { ControlRow oControlRow = ControlRowVector.get(i); -// if (i == _index) -// oControlRow.settovoid(); -// else oControlRow.setVisible(false); } } diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java index db20bff27904..80b5b9c3ae03 100644 --- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java @@ -19,12 +19,9 @@ package com.sun.star.wizards.ui; import com.sun.star.wizards.common.*; import com.sun.star.wizards.db.*; -// import com.sun.star.awt.XWindow; import com.sun.star.lang.IllegalArgumentException; import com.sun.star.sdb.CommandType; -// import com.sun.star.sdbc.SQLException; import com.sun.star.uno.AnyConverter; -// import com.sun.star.uno.UnoRuntime; import com.sun.star.awt.*; import com.sun.star.beans.PropertyValue; import java.text.Collator; @@ -36,7 +33,6 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< private CommandMetaData CurDBMetaData; private XListBox xTableListBox; private XFixedText xlblTable; - // private String SFILLUPFIELDSLISTBOX = "fillUpFieldsListbox"; private String sTableListBoxName; private String sTableLabelName; private String sQueryPrefix; @@ -45,7 +41,6 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< private short iOldSelPos = -1; private boolean bpreselectCommand = true; private boolean bgetQueries; - // boolean AppendMode; private WizardDialog oWizardDialog; private Collator aCollator = null; @@ -145,7 +140,6 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< { Boolean.TRUE, Boolean.FALSE, 12, HelpIds.getHelpIdString(super.FirstHelpIndex - 1), new Short(UnoDialog.getListBoxLineCount()), 95, 37, IStep, new Short((short) 4), getListboxWidth() }); - // XWindow xTableListBoxWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xTableListBox); fillupCommandListBox(); } catch (Exception exception) @@ -223,7 +217,6 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< String curCommandName = PropertyNames.EMPTY_STRING; //As the peer of the control might not yet exist we have to query the model for the SelectedItems short iSelPos = getselectedItemPos(); - // String[] sLocList = (String[]) CurUnoDialog.getControlProperty(sTableListBoxName, PropertyNames.STRING_ITEM_LIST); final String sSelectedTableName = xTableListBox.getItem(iSelPos); if (!bgetQueries) { @@ -278,7 +271,6 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< short[] iSelArray = new short[0]; boolean bgetFields = false; String[] ContentList = new String[0]; - // CurDBMetaData.initCommandNames(); if (bgetQueries) { ContentList = new String[CurDBMetaData.getTableNames().length + CurDBMetaData.getQueryNames().length]; diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index 546c21530304..7bc43dd540db 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -17,7 +17,6 @@ */ package com.sun.star.wizards.ui; -// import java.util.Vector; import com.sun.star.awt.TextEvent; import com.sun.star.awt.VclWindowPeerAttribute; import com.sun.star.awt.XControl; @@ -200,7 +199,6 @@ public class FilterComponent */ private void togglefollowingControlRow(String _scurName) { - // String sNameSuffix = sIncSuffix + "_" + _scurName.substring(_scurName.length() - 1, _scurName.length()); int Index = Integer.valueOf(getIndexNumber(_scurName)).intValue(); if (Index < oControlRows.length) { @@ -226,8 +224,6 @@ public class FilterComponent public PropertyValue[][] getFilterConditions() { - // ControlRow CurControlRow; - // getfilterstate(); int nFilterCount = getFilterCount(); if (nFilterCount > 0) { diff --git a/wizards/com/sun/star/wizards/ui/ImageList.java b/wizards/com/sun/star/wizards/ui/ImageList.java index 048ff0d6d390..7998a8fd3224 100644 --- a/wizards/com/sun/star/wizards/ui/ImageList.java +++ b/wizards/com/sun/star/wizards/ui/ImageList.java @@ -504,14 +504,6 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener public void contentsChanged(ListDataEvent event) { - /*//if the content that was changed is in the displayed range, refresh... - if ( (event.getIndex1() < getIndexFor(0)) // range is before... - || event.getIndex0() > getIndexFor( cols*rows - 1)) ; //do nothing - else - refreshImages(); - */ //selected = 0; - //pageStart = 0; - //if (event.refreshImages(); } public void intervalAdded(ListDataEvent event) diff --git a/wizards/com/sun/star/wizards/ui/SortingComponent.java b/wizards/com/sun/star/wizards/ui/SortingComponent.java index a5c0790c4e94..9b0ff2e8649f 100644 --- a/wizards/com/sun/star/wizards/ui/SortingComponent.java +++ b/wizards/com/sun/star/wizards/ui/SortingComponent.java @@ -242,7 +242,6 @@ public class SortingComponent short iCurState; String CurFieldName; setMaxSortIndex(); - // String[][] SortFieldNames = new String[MaxSortIndex + 1][2]; ArrayList<String[]> SortFieldNames = new ArrayList<String[]>(); ArrayList<String> SortDescriptions = new ArrayList<String>(); for (int i = 0; i <= MaxSortIndex; i++) diff --git a/wizards/com/sun/star/wizards/ui/TitlesComponent.java b/wizards/com/sun/star/wizards/ui/TitlesComponent.java index 8aa15c29b3d5..6a0d9573aea4 100644 --- a/wizards/com/sun/star/wizards/ui/TitlesComponent.java +++ b/wizards/com/sun/star/wizards/ui/TitlesComponent.java @@ -170,7 +170,6 @@ public class TitlesComponent extends ControlScroller initializeScrollFields(); super.initialize(fieldnames.length); adjustPosSizes(); -// setComponentMouseTransparent(); } private void setFieldTitles() diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index 56974cfb6723..094b58844cf5 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -192,9 +192,9 @@ public class UnoDialog implements EventNames return xPSet.getPropertyValue(PropertyName); } catch (com.sun.star.uno.Exception exception) - { // com.sun.star.container.NoSuchElementException, com.sun.star.beans.UnknownPropertyException, - exception.printStackTrace(System.err); // com.sun.star.lang.WrappedTargetException, com.sun.star.beans.PropertyVetoException - return null; // com.sun.star.lang.IllegalArgumentException + { + exception.printStackTrace(System.err); + return null; } } diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java b/wizards/com/sun/star/wizards/ui/UnoDialog2.java index 3a93236db6dd..c068cd114ef1 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java @@ -323,15 +323,12 @@ public class UnoDialog2 extends UnoDialog { try { - //System.out.println("Inserting : " + componentName); XInterface xControlModel = insertControlModel(serviceName, componentName, new String[] { }, new Object[] { }); Helper.setUnoPropertyValues(xControlModel, sPropNames, oPropValues); - //setControlPropertiesDebug(xControlModel, sPropNames, oPropValues); - //System.out.println(" Setting props successful !"); Helper.setUnoPropertyValue(xControlModel, PropertyNames.PROPERTY_NAME, componentName); } catch (Exception ex) diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java index 63f20366866b..6ed54d9f2e4c 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.java +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java @@ -250,8 +250,6 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL xSSFRoadmap = UnoRuntime.queryInterface(XSingleServiceFactory.class, oRoadmap); xIndexContRoadmap = UnoRuntime.queryInterface(XIndexContainer.class, oRoadmap); - // XPropertySet xPropRoadmapModel = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRoadmap); - // xPropRoadmapModel.addPropertyChangeListener("CurrentItemID", new WizardDialog.RoadmapItemListener(this.xDialogModel)); MethodInvocation mi = new MethodInvocation("itemStateChanged", this, com.sun.star.awt.ItemEvent.class); getGuiEventListener().add("rdmNavi", EventNames.EVENT_ITEM_CHANGED, mi); @@ -259,8 +257,6 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL xRoadmapBroadcaster = UnoRuntime.queryInterface(XItemEventBroadcaster.class, xRoadmapControl); xRoadmapBroadcaster.addItemListener((XItemListener) getGuiEventListener()); - // xRoadmapControl = this.xDlgContainer.getControl("rdmNavi"); - // xRoadmapBroadcaster.addItemListener(new RoadmapItemListener()); Helper.setUnoPropertyValue(oRoadmap, "Text", oWizardResource.getResText(UIConsts.RID_COMMON + 16)); } catch (NoSuchMethodException ex) |