summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-18 02:27:27 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-18 02:27:27 +0200
commit57272eaaf5776f673b5141354a1d1e1af080d575 (patch)
tree9241d5523e03af24cd7ba2e45dd8b0951a9fdeb1 /wizards
parent1df024d97cc44155566f8db279e8cdba37e95fcf (diff)
parentf9d40c2b591215b57ece4ba6e623b7808a7ae717 (diff)
Merge commit 'f9d40c2b591215b57ece4ba6e623b7808a7ae717' into feature/gsoc2011_wizards
Conflicts: wizards/com/sun/star/wizards/common/Resource.java merged resolved as per: e52421bc118e9c5f3fce5a32ba9efdcad7627d92 9e91dbca08056fc31f388f5642fdfa3d2b910990 in the old components repository merging the corresponding commit 3b4fe490441f9f77829bc6c1ae30d79a4d50255b there
Diffstat (limited to 'wizards')
-rwxr-xr-xwizards/com/sun/star/wizards/RemoteFaxWizard2
-rwxr-xr-xwizards/com/sun/star/wizards/RemoteLetterWizard2
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaTemplate.java229
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.java226
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.java52
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java239
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.java70
-rw-r--r--wizards/com/sun/star/wizards/agenda/CGAgenda.java7
-rw-r--r--wizards/com/sun/star/wizards/agenda/CGTopic.java21
-rw-r--r--wizards/com/sun/star/wizards/agenda/CallWizard.java15
-rw-r--r--wizards/com/sun/star/wizards/agenda/TemplateConsts.java14
-rw-r--r--wizards/com/sun/star/wizards/agenda/TopicsControl.java134
-rw-r--r--wizards/com/sun/star/wizards/common/ConfigGroup.java6
-rw-r--r--wizards/com/sun/star/wizards/common/ConfigNode.java8
-rw-r--r--wizards/com/sun/star/wizards/common/ConfigSet.java8
-rw-r--r--wizards/com/sun/star/wizards/common/Configuration.java51
-rw-r--r--wizards/com/sun/star/wizards/common/DebugHelper.java2
-rw-r--r--wizards/com/sun/star/wizards/common/DebugHelper.py1
-rw-r--r--wizards/com/sun/star/wizards/common/Desktop.java94
-rw-r--r--wizards/com/sun/star/wizards/common/FileAccess.java200
-rw-r--r--wizards/com/sun/star/wizards/common/FileAccess.py1
-rw-r--r--wizards/com/sun/star/wizards/common/HelpIds.java730
-rw-r--r--wizards/com/sun/star/wizards/common/Helper.java51
-rw-r--r--wizards/com/sun/star/wizards/common/IRenderer.java4
-rw-r--r--wizards/com/sun/star/wizards/common/Indexable.java2
-rw-r--r--wizards/com/sun/star/wizards/common/InvalidQueryException.java2
-rw-r--r--wizards/com/sun/star/wizards/common/JavaTools.java75
-rw-r--r--wizards/com/sun/star/wizards/common/NamedValueCollection.java2
-rw-r--r--wizards/com/sun/star/wizards/common/NoValidPathException.java2
-rw-r--r--wizards/com/sun/star/wizards/common/NumberFormatter.java98
-rw-r--r--wizards/com/sun/star/wizards/common/NumericalHelper.java113
-rw-r--r--wizards/com/sun/star/wizards/common/Properties.java2
-rw-r--r--wizards/com/sun/star/wizards/common/PropertyNames.java21
-rw-r--r--wizards/com/sun/star/wizards/common/PropertyNames.py1
-rw-r--r--wizards/com/sun/star/wizards/common/PropertySetHelper.java12
-rw-r--r--wizards/com/sun/star/wizards/common/Resource.java2
-rw-r--r--wizards/com/sun/star/wizards/common/SystemDialog.java49
-rw-r--r--wizards/com/sun/star/wizards/common/TerminateWizardException.java2
-rw-r--r--wizards/com/sun/star/wizards/common/UCB.java90
-rw-r--r--wizards/com/sun/star/wizards/common/XMLHelper.java4
-rw-r--r--wizards/com/sun/star/wizards/common/XMLProvider.java2
-rw-r--r--wizards/com/sun/star/wizards/common/prova.py1
-rw-r--r--wizards/com/sun/star/wizards/db/BlindtextCreator.java12
-rw-r--r--wizards/com/sun/star/wizards/db/ColumnPropertySet.java10
-rw-r--r--wizards/com/sun/star/wizards/db/CommandMetaData.java884
-rw-r--r--wizards/com/sun/star/wizards/db/CommandName.java47
-rw-r--r--wizards/com/sun/star/wizards/db/DBMetaData.java99
-rw-r--r--wizards/com/sun/star/wizards/db/FieldColumn.java41
-rw-r--r--wizards/com/sun/star/wizards/db/QueryMetaData.java51
-rw-r--r--wizards/com/sun/star/wizards/db/RecordParser.java25
-rw-r--r--wizards/com/sun/star/wizards/db/RelationController.java11
-rw-r--r--wizards/com/sun/star/wizards/db/SQLQueryComposer.java163
-rw-r--r--wizards/com/sun/star/wizards/db/TableDescriptor.java48
-rw-r--r--wizards/com/sun/star/wizards/db/TypeInspector.java46
-rw-r--r--wizards/com/sun/star/wizards/document/Control.java18
-rw-r--r--wizards/com/sun/star/wizards/document/DatabaseControl.java14
-rw-r--r--wizards/com/sun/star/wizards/document/FormHandler.java139
-rw-r--r--wizards/com/sun/star/wizards/document/GridControl.java4
-rw-r--r--wizards/com/sun/star/wizards/document/OfficeDocument.java76
-rw-r--r--wizards/com/sun/star/wizards/document/OfficeDocument.py1
-rw-r--r--wizards/com/sun/star/wizards/document/Shape.java12
-rw-r--r--wizards/com/sun/star/wizards/document/TimeStampControl.java15
-rw-r--r--wizards/com/sun/star/wizards/fax/CGFax.java2
-rw-r--r--wizards/com/sun/star/wizards/fax/CGFaxWizard.java2
-rw-r--r--wizards/com/sun/star/wizards/fax/CGFaxWizard.py1
-rw-r--r--wizards/com/sun/star/wizards/fax/CallWizard.java9
-rw-r--r--wizards/com/sun/star/wizards/fax/CallWizard.py1
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxDocument.java29
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialog.java134
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.java6
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java89
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java4
-rw-r--r--wizards/com/sun/star/wizards/form/CallFormWizard.java7
-rw-r--r--wizards/com/sun/star/wizards/form/DataEntrySetter.java30
-rw-r--r--wizards/com/sun/star/wizards/form/FieldLinker.java87
-rw-r--r--wizards/com/sun/star/wizards/form/Finalizer.java14
-rw-r--r--wizards/com/sun/star/wizards/form/FormConfiguration.java30
-rw-r--r--wizards/com/sun/star/wizards/form/FormControlArranger.java401
-rw-r--r--wizards/com/sun/star/wizards/form/FormDocument.java42
-rw-r--r--wizards/com/sun/star/wizards/form/FormWizard.java72
-rw-r--r--wizards/com/sun/star/wizards/form/StyleApplier.java48
-rw-r--r--wizards/com/sun/star/wizards/form/UIControlArranger.java53
-rw-r--r--wizards/com/sun/star/wizards/letter/CGLetter.java2
-rw-r--r--wizards/com/sun/star/wizards/letter/CGLetterWizard.java2
-rw-r--r--wizards/com/sun/star/wizards/letter/CGPaperElementLocation.java2
-rw-r--r--wizards/com/sun/star/wizards/letter/CallWizard.java9
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterDocument.java45
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialog.java188
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.java2
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogEvents.java2
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java149
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java2
-rw-r--r--wizards/com/sun/star/wizards/letter/LocaleCodes.java2
-rw-r--r--wizards/com/sun/star/wizards/query/CallQueryWizard.java14
-rw-r--r--wizards/com/sun/star/wizards/query/Finalizer.java27
-rw-r--r--wizards/com/sun/star/wizards/query/QuerySummary.java89
-rw-r--r--wizards/com/sun/star/wizards/query/QueryWizard.java88
-rw-r--r--wizards/com/sun/star/wizards/report/CallReportWizard.java24
-rw-r--r--wizards/com/sun/star/wizards/report/DBColumn.java32
-rw-r--r--wizards/com/sun/star/wizards/report/Dataimport.java45
-rw-r--r--wizards/com/sun/star/wizards/report/GroupFieldHandler.java14
-rwxr-xr-xwizards/com/sun/star/wizards/report/IReportBuilderLayouter.java14
-rwxr-xr-xwizards/com/sun/star/wizards/report/IReportDefinitionReadAccess.java2
-rw-r--r--wizards/com/sun/star/wizards/report/IReportDocument.java26
-rw-r--r--wizards/com/sun/star/wizards/report/RecordTable.java14
-rw-r--r--wizards/com/sun/star/wizards/report/ReportFinalizer.java38
-rw-r--r--wizards/com/sun/star/wizards/report/ReportImplementationHelper.java6
-rw-r--r--wizards/com/sun/star/wizards/report/ReportLayouter.java42
-rw-r--r--wizards/com/sun/star/wizards/report/ReportTextDocument.java192
-rw-r--r--wizards/com/sun/star/wizards/report/ReportTextImplementation.java89
-rw-r--r--wizards/com/sun/star/wizards/report/ReportWizard.java91
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java123
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java8
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarThreeColumns.java7
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java8
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java23
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java10
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java10
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/LayoutConstants.java2
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java394
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/SectionEmptyObject.java7
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java7
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/SectionObject.java10
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/SectionTextField.java7
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/Tabular.java46
-rw-r--r--wizards/com/sun/star/wizards/table/CGCategory.java9
-rw-r--r--wizards/com/sun/star/wizards/table/CGTable.java2
-rw-r--r--wizards/com/sun/star/wizards/table/CallTableWizard.java11
-rw-r--r--wizards/com/sun/star/wizards/table/FieldDescription.java22
-rw-r--r--wizards/com/sun/star/wizards/table/FieldFormatter.java85
-rw-r--r--wizards/com/sun/star/wizards/table/Finalizer.java44
-rw-r--r--wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java52
-rw-r--r--wizards/com/sun/star/wizards/table/ScenarioSelector.java38
-rw-r--r--wizards/com/sun/star/wizards/table/TableWizard.java22
-rw-r--r--wizards/com/sun/star/wizards/text/TextDocument.java104
-rw-r--r--wizards/com/sun/star/wizards/text/TextFieldHandler.java43
-rw-r--r--wizards/com/sun/star/wizards/text/TextFieldHandler.py1
-rw-r--r--wizards/com/sun/star/wizards/text/TextFrameHandler.java7
-rw-r--r--wizards/com/sun/star/wizards/text/TextSectionHandler.java41
-rw-r--r--wizards/com/sun/star/wizards/text/TextSectionHandler.py1
-rw-r--r--wizards/com/sun/star/wizards/text/TextStyleHandler.java17
-rw-r--r--wizards/com/sun/star/wizards/text/TextTableHandler.java31
-rw-r--r--wizards/com/sun/star/wizards/text/ViewHandler.java20
-rw-r--r--wizards/com/sun/star/wizards/ui/AggregateComponent.java51
-rw-r--r--wizards/com/sun/star/wizards/ui/ButtonList.java52
-rw-r--r--wizards/com/sun/star/wizards/ui/CommandFieldSelection.java56
-rw-r--r--wizards/com/sun/star/wizards/ui/ControlScroller.java36
-rw-r--r--wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java20
-rw-r--r--wizards/com/sun/star/wizards/ui/DocumentPreview.java23
-rw-r--r--wizards/com/sun/star/wizards/ui/FieldSelection.java60
-rw-r--r--wizards/com/sun/star/wizards/ui/FilterComponent.java141
-rw-r--r--wizards/com/sun/star/wizards/ui/ImageList.java62
-rwxr-xr-xwizards/com/sun/star/wizards/ui/PathSelection.java16
-rw-r--r--wizards/com/sun/star/wizards/ui/PeerConfig.java30
-rw-r--r--wizards/com/sun/star/wizards/ui/SortingComponent.java69
-rw-r--r--wizards/com/sun/star/wizards/ui/TitlesComponent.java10
-rw-r--r--wizards/com/sun/star/wizards/ui/UIConsts.java16
-rw-r--r--wizards/com/sun/star/wizards/ui/UnoDialog.java197
-rw-r--r--wizards/com/sun/star/wizards/ui/UnoDialog2.java26
-rw-r--r--wizards/com/sun/star/wizards/ui/WizardDialog.java57
-rw-r--r--wizards/com/sun/star/wizards/ui/XCommandSelectionListener.java2
-rw-r--r--wizards/com/sun/star/wizards/ui/XCompletion.java2
-rw-r--r--wizards/com/sun/star/wizards/ui/XFieldSelectionListener.java2
-rwxr-xr-xwizards/com/sun/star/wizards/ui/XPathSelectionListener.java2
-rw-r--r--wizards/com/sun/star/wizards/ui/event/AbstractListener.java4
-rw-r--r--wizards/com/sun/star/wizards/ui/event/CommonListener.java2
-rw-r--r--wizards/com/sun/star/wizards/ui/event/DataAware.java30
-rw-r--r--wizards/com/sun/star/wizards/ui/event/DataAwareFields.java28
-rw-r--r--wizards/com/sun/star/wizards/ui/event/EventNames.java2
-rw-r--r--wizards/com/sun/star/wizards/ui/event/ListModelBinder.java29
-rw-r--r--wizards/com/sun/star/wizards/ui/event/MethodInvocation.java13
-rw-r--r--wizards/com/sun/star/wizards/ui/event/RadioDataAware.java6
-rw-r--r--wizards/com/sun/star/wizards/ui/event/SimpleDataAware.java6
-rw-r--r--wizards/com/sun/star/wizards/ui/event/Task.java2
-rw-r--r--wizards/com/sun/star/wizards/ui/event/TaskEvent.java2
-rw-r--r--wizards/com/sun/star/wizards/ui/event/TaskListener.java2
-rw-r--r--wizards/com/sun/star/wizards/ui/event/UnoDataAware.java28
-rw-r--r--wizards/com/sun/star/wizards/web/AbstractErrorHandler.java12
-rw-r--r--wizards/com/sun/star/wizards/web/BackgroundsDialog.java23
-rw-r--r--wizards/com/sun/star/wizards/web/CallWizard.java11
-rw-r--r--wizards/com/sun/star/wizards/web/ErrorHandler.java6
-rw-r--r--wizards/com/sun/star/wizards/web/ExtensionVerifier.java4
-rw-r--r--wizards/com/sun/star/wizards/web/FTPDialog.java89
-rw-r--r--wizards/com/sun/star/wizards/web/FTPDialogResources.java6
-rw-r--r--wizards/com/sun/star/wizards/web/IconsDialog.java9
-rw-r--r--wizards/com/sun/star/wizards/web/ImageListDialog.java40
-rw-r--r--wizards/com/sun/star/wizards/web/LogTaskListener.java5
-rw-r--r--wizards/com/sun/star/wizards/web/Process.java71
-rw-r--r--wizards/com/sun/star/wizards/web/ProcessErrorHandler.java2
-rw-r--r--wizards/com/sun/star/wizards/web/ProcessErrors.java2
-rw-r--r--wizards/com/sun/star/wizards/web/ProcessStatusRenderer.java4
-rw-r--r--wizards/com/sun/star/wizards/web/StatusDialog.java20
-rw-r--r--wizards/com/sun/star/wizards/web/StylePreview.java17
-rw-r--r--wizards/com/sun/star/wizards/web/TOCPreview.java23
-rw-r--r--wizards/com/sun/star/wizards/web/WWD_Events.java96
-rw-r--r--wizards/com/sun/star/wizards/web/WWD_General.java32
-rw-r--r--wizards/com/sun/star/wizards/web/WWD_Startup.java30
-rw-r--r--wizards/com/sun/star/wizards/web/WWHID.java2
-rw-r--r--wizards/com/sun/star/wizards/web/WebWizard.java2
-rw-r--r--wizards/com/sun/star/wizards/web/WebWizardConst.java2
-rw-r--r--wizards/com/sun/star/wizards/web/WebWizardDialog.java216
-rw-r--r--wizards/com/sun/star/wizards/web/WebWizardDialogResources.java6
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGArgument.java2
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGContent.java2
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGDesign.java4
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGDocument.java88
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGExporter.java7
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGFilter.java4
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGGeneralInfo.java2
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGIconSet.java2
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGImage.java2
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGLayout.java2
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGPublish.java7
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGSession.java2
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGSessionName.java2
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGSettings.java12
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGStyle.java8
-rw-r--r--wizards/com/sun/star/wizards/web/data/ConfigSetItem.java2
-rw-r--r--wizards/com/sun/star/wizards/web/data/TypeDetection.java10
-rw-r--r--wizards/com/sun/star/wizards/web/export/AbstractExporter.java8
-rw-r--r--wizards/com/sun/star/wizards/web/export/ConfiguredExporter.java2
-rw-r--r--wizards/com/sun/star/wizards/web/export/CopyExporter.java2
-rw-r--r--wizards/com/sun/star/wizards/web/export/Exporter.java8
-rw-r--r--wizards/com/sun/star/wizards/web/export/FilterExporter.java2
-rw-r--r--wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.java8
-rw-r--r--wizards/com/sun/star/wizards/web/status/ErrorLog.java2
-rw-r--r--wizards/com/sun/star/wizards/web/status/ErrorReporter.java2
-rw-r--r--wizards/com/sun/star/wizards/web/status/LogTaskListener.java2
-rw-r--r--wizards/com/sun/star/wizards/web/status/Task.java2
-rw-r--r--wizards/com/sun/star/wizards/web/status/TaskEvent.java2
-rw-r--r--wizards/com/sun/star/wizards/web/status/TaskListener.java2
-rw-r--r--wizards/prj/build.lst2
-rw-r--r--wizards/prj/d.lst44
-rw-r--r--wizards/source/euro/euro.src2
-rw-r--r--wizards/source/formwizard/dbwizres.src64
-rw-r--r--wizards/source/imagelists/imagelists.src38
-rw-r--r--wizards/source/importwizard/FilesModul.xba1
-rw-r--r--wizards/source/importwizard/importwi.src24
-rw-r--r--wizards/source/schedule/schedule.src72
-rw-r--r--wizards/source/template/template.src22
-rw-r--r--wizards/source/webwizard/webwizar.src2
-rw-r--r--wizards/util/helpids.h12
-rw-r--r--wizards/util/hidother.src728
243 files changed, 5400 insertions, 5513 deletions
diff --git a/wizards/com/sun/star/wizards/RemoteFaxWizard b/wizards/com/sun/star/wizards/RemoteFaxWizard
index c243c3137794..76144cbfef1d 100755
--- a/wizards/com/sun/star/wizards/RemoteFaxWizard
+++ b/wizards/com/sun/star/wizards/RemoteFaxWizard
@@ -3,5 +3,5 @@ from fax.FaxWizardDialogImpl import FaxWizardDialogImpl
import sys
if __name__ == "__main__":
-
+
FaxWizardDialogImpl.main(sys.argv)
diff --git a/wizards/com/sun/star/wizards/RemoteLetterWizard b/wizards/com/sun/star/wizards/RemoteLetterWizard
index e754f00408d7..9928625f6e5f 100755
--- a/wizards/com/sun/star/wizards/RemoteLetterWizard
+++ b/wizards/com/sun/star/wizards/RemoteLetterWizard
@@ -3,5 +3,5 @@ from letter.LetterWizardDialogImpl import LetterWizardDialogImpl
import sys
if __name__ == "__main__":
-
+
LetterWizardDialogImpl.main(sys.argv)
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java
index 2d7174bdb69f..9293d03dd072 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java
+++ b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,11 +26,7 @@
************************************************************************/
package com.sun.star.wizards.agenda;
-import java.util.Calendar;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
+import java.util.*;
import com.sun.star.awt.TextEvent;
@@ -66,13 +62,13 @@ import com.sun.star.wizards.ui.UnoDialog2;
import com.sun.star.wizards.ui.event.DataAware;
/**
- *
- * The classes here implement the whole document-functionality of the agenda wizard:
+ *
+ * The classes here implement the whole document-functionality of the agenda wizard:
* the live-preview and the final "creation" of the document, when the user clicks "finish". <br/>
* <br/>
* <h2>Some terminology:<h2/>
* items are names or headings. we don't make any distinction.
- *
+ *
* <br/>
* The Agenda Template is used as general "controller" of the whole document, whereas the
* two child-classes ItemsTable and TopicsTable control the item tables (note plural!) and the
@@ -106,7 +102,7 @@ import com.sun.star.wizards.ui.event.DataAware;
* Many methods here are synchronized, in order to avoid colission made by
* events fired too often.
* @author rpiterman
- *
+ *
*/
public class AgendaTemplate extends TextDocument implements TemplateConsts, DataAware.Listener
{
@@ -133,10 +129,10 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* The template-filename of the current template.
* Since we often re-link section and the break the link,
* inorder to restore them, we need a template to link to.
- * This is practically an identicall copy of the current template.
+ * This is practically an identicall copy of the current template.
*/
String template;
- /**
+ /**
* used for common operations on sections.
*/
TextSectionHandler textSectionHandler;
@@ -145,8 +141,8 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
*/
XComponentLoader xComponentLoader;
/**
- * an array containing all ItemTable object (which control each an Items
- * Table in the document.
+ * an array containing all ItemTable object (which control each an Items
+ * Table in the document.
*/
ItemsTable[] itemsTables;
/**
@@ -168,8 +164,8 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* A temporary variable used to list all items and map them.
*/
List _allItems = new Vector();
- /**
- * keep a reference on some static items in the document,
+ /**
+ * keep a reference on some static items in the document,
* so when their content is changed (through the user), we
* can just reference them and set their text.
*/
@@ -201,7 +197,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
{
template = calcTemplateName(templateURL);
document = loadAsPreview(templateURL, false);
- docMSF = ((XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, document));
+ docMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, document);
xFrame.getComponentWindow().setEnable(false);
xTextDocument.lockControllers();
initialize();
@@ -235,7 +231,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
{
try
{
- itemsTables[i].write("");
+ itemsTables[i].write(PropertyNames.EMPTY_STRING);
}
catch (Exception ex)
{
@@ -365,7 +361,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
}
/**
- * itemsCache is a Map containing all agenda item. These are object which
+ * itemsCache is a Map containing all agenda item. These are object which
* "write themselfs" to the table, given a table cursor.
* A cache is used in order to reuse the objects, instead of recreate them.
* This method fills the cache will all items objects (names and headings).
@@ -374,7 +370,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
{
itemsCache = new Hashtable(11);
- XMultiServiceFactory xmsf = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, document);
+ XMultiServiceFactory xmsf = UnoRuntime.queryInterface(XMultiServiceFactory.class, document);
// Headings
itemsCache.put(FILLIN_MEETING_TYPE,
@@ -442,7 +438,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
/*
* Get the default locale of the document, and create the date and time formatters.
*/
- XMultiServiceFactory docMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, document);
+ XMultiServiceFactory docMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, document);
try
{
Object defaults = docMSF.createInstance("com.sun.star.text.Defaults");
@@ -453,7 +449,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
calendar = Calendar.getInstance(jl);
- XNumberFormatsSupplier nfs = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, document);
+ XNumberFormatsSupplier nfs = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, document);
Object formatSettings = nfs.getNumberFormatSettings();
com.sun.star.util.Date date = (com.sun.star.util.Date) Helper.getUnoPropertyValue(formatSettings, "NullDate");
@@ -483,8 +479,8 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
initializeItems();
initializeTitles();
initializeItemsSections();
- XMultiServiceFactory xMultiServiceFactory = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, document);
- textSectionHandler = new TextSectionHandler(xMultiServiceFactory, (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, document));
+ XMultiServiceFactory xMultiServiceFactory = UnoRuntime.queryInterface(XMultiServiceFactory.class, document);
+ textSectionHandler = new TextSectionHandler(xMultiServiceFactory, UnoRuntime.queryInterface(XTextDocument.class, document));
initializeTopics();
_allItems.clear();
_allItems = null;
@@ -498,7 +494,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
{
XTextRange item = null;
- XMultiServiceFactory xmsf = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, document);
+ XMultiServiceFactory xmsf = UnoRuntime.queryInterface(XMultiServiceFactory.class, document);
for (int i = 0; i < _allItems.size(); i++)
{
@@ -550,7 +546,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
{
try
{
- XSearchable xSearchable = (XSearchable) UnoRuntime.queryInterface(XSearchable.class, document);
+ XSearchable xSearchable = UnoRuntime.queryInterface(XSearchable.class, document);
XSearchDescriptor sd = xSearchable.createSearchDescriptor();
sd.setSearchString("<[^>]+>");
sd.setPropertyValue("SearchRegularExpression", Boolean.TRUE);
@@ -558,12 +554,12 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
XIndexAccess ia = xSearchable.findAll(sd);
- List l = new Vector(ia.getCount());
+ List l = new ArrayList<XTextRange>(ia.getCount());
for (int i = 0; i < ia.getCount(); i++)
{
try
{
- l.add((XTextRange) UnoRuntime.queryInterface(XTextRange.class, ia.getByIndex(i)));
+ l.add(UnoRuntime.queryInterface(XTextRange.class, ia.getByIndex(i)));
}
catch (Exception ex)
{
@@ -607,20 +603,20 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
private String[] getSections(Object document, String s)
{
- XTextSectionsSupplier xTextSectionsSupplier = (XTextSectionsSupplier) UnoRuntime.queryInterface(XTextSectionsSupplier.class, document);
+ XTextSectionsSupplier xTextSectionsSupplier = UnoRuntime.queryInterface(XTextSectionsSupplier.class, document);
String[] allSections = xTextSectionsSupplier.getTextSections().getElementNames();
return getNamesWhichStartWith(allSections, s);
}
Object getSection(String name) throws NoSuchElementException, WrappedTargetException
{
- XTextSectionsSupplier xTextSectionsSupplier = (XTextSectionsSupplier) UnoRuntime.queryInterface(XTextSectionsSupplier.class, document);
+ XTextSectionsSupplier xTextSectionsSupplier = UnoRuntime.queryInterface(XTextSectionsSupplier.class, document);
return ((Any) (xTextSectionsSupplier.getTextSections().getByName(name))).getObject();
}
Object getTable(String name) throws NoSuchElementException, WrappedTargetException
{
- XTextTablesSupplier xTextTablesSupplier = (XTextTablesSupplier) UnoRuntime.queryInterface(XTextTablesSupplier.class, document);
+ XTextTablesSupplier xTextTablesSupplier = UnoRuntime.queryInterface(XTextTablesSupplier.class, document);
return ((Any) xTextTablesSupplier.getTextTables().getByName(name)).getObject();
}
@@ -665,18 +661,18 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
private void writeTitle(TextElement te, XTextRange tr, String text)
{
- te.text = (text == null ? "" : text);
+ te.text = (text == null ? PropertyNames.EMPTY_STRING : text);
te.write(tr);
}
private static long DAY_IN_MILLIS = (24 * 60 * 60 * 1000);
private String getDateString(String d)
{
- if (d == null || d.equals(""))
+ if (d == null || d.equals(PropertyNames.EMPTY_STRING))
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
- int date = new Integer(d).intValue();
+ int date = Integer.parseInt(d);
calendar.clear();
calendar.set(date / 10000,
(date % 10000) / 100 - 1,
@@ -694,11 +690,11 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
private String getTimeString(String s)
{
- if (s == null || s.equals(""))
+ if (s == null || s.equals(PropertyNames.EMPTY_STRING))
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
- int time = new Integer(s).intValue();
+ int time = Integer.parseInt(s);
double t = ((double) (time / 1000000) / 24) + ((double) ((time % 1000000) / 1000) / (24 * 60));
return timeFormatter.convertNumberToString(timeFormat, t);
@@ -715,14 +711,14 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
textSectionHandler.removeAllTextSections();
}
- /**
+ /**
* hidden sections exist when an item's section is hidden because the
* user specified not to display any items which it contains.
* When finishing the wizard removes this sections entireley from the document.
*/
private void deleteHiddenSections()
{
- XTextSectionsSupplier xTextSectionsSupplier = (XTextSectionsSupplier) UnoRuntime.queryInterface(XTextSectionsSupplier.class, document);
+ XTextSectionsSupplier xTextSectionsSupplier = UnoRuntime.queryInterface(XTextSectionsSupplier.class, document);
String[] allSections = xTextSectionsSupplier.getTextSections().getElementNames();
try
{
@@ -733,7 +729,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
boolean visible = ((Boolean) Helper.getUnoPropertyValue(section, "IsVisible")).booleanValue();
if (!visible)
{
- ((XTextContent) UnoRuntime.queryInterface(XTextContent.class, section)).getAnchor().setString("");
+ UnoRuntime.queryInterface(XTextContent.class, section).getAnchor().setString(PropertyNames.EMPTY_STRING);
}
}
}
@@ -745,9 +741,9 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
/**
* create the minutes for the given topics or remove the minutes section from the document.
- * If no topics are supplied, or the user
- * specified not to create minuts, the minutes section will be removed,
- * @param topicsData supplies PropertyValue arrays containing the values for the topics.
+ * If no topics are supplied, or the user
+ * specified not to create minuts, the minutes section will be removed,
+ * @param topicsData supplies PropertyValue arrays containing the values for the topics.
*/
public synchronized void createMinutes(List topicsData)
{
@@ -759,8 +755,8 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
try
{
Object minutesAllSection = getSection(SECTION_MINUTES_ALL);
- XTextSection xTextSection = (XTextSection) UnoRuntime.queryInterface(XTextSection.class, minutesAllSection);
- xTextSection.getAnchor().setString("");
+ XTextSection xTextSection = UnoRuntime.queryInterface(XTextSection.class, minutesAllSection);
+ xTextSection.getAnchor().setString(PropertyNames.EMPTY_STRING);
}
catch (Exception ex)
{
@@ -777,7 +773,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
int topicStartTime = 0;
try
{
- topicStartTime = new Integer(agenda.cp_Time).intValue();
+ topicStartTime = Integer.parseInt(agenda.cp_Time);
}
catch (Exception ex)
{
@@ -816,7 +812,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* now add minutes for each topic.
* The template contains *one* minutes section, so
* we first use the one available, and then add a new one...
- *
+ *
* topics data has *always* an empty topic at the end...
*/
for (int i = 0; i < topicsData.size() - 1; i++)
@@ -831,15 +827,15 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
if (itemText.equals(FILLIN_MINUTE_NUM))
{
- fillMinutesItem(item, topic[0].Value, "");
+ fillMinutesItem(item, topic[0].Value, PropertyNames.EMPTY_STRING);
}
else if (itemText.equals(FILLIN_MINUTE_TOPIC))
{
- fillMinutesItem(item, topic[1].Value, "");
+ fillMinutesItem(item, topic[1].Value, PropertyNames.EMPTY_STRING);
}
else if (itemText.equals(FILLIN_MINUTE_RESPONSIBLE))
{
- fillMinutesItem(item, topic[2].Value, "");
+ fillMinutesItem(item, topic[2].Value, PropertyNames.EMPTY_STRING);
}
else if (itemText.equals(FILLIN_MINUTE_TIME))
{
@@ -863,7 +859,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
topicStartTime += topicTime * 1000;
time += getTimeString(String.valueOf(topicStartTime));
}
- fillMinutesItem(item, time, "");
+ fillMinutesItem(item, time, PropertyNames.EMPTY_STRING);
}
}
@@ -889,16 +885,16 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* If the given text is empty, uses a placeholder with the giveb placeholder text.
* @param range text range to fill
* @param text the text to fill to the text range object.
- * @param placeholder the placeholder text to use, if the text argument is empty (null or "")
+ * @param placeholder the placeholder text to use, if the text argument is empty (null or PropertyNames.EMPTY_STRING)
*/
private void fillMinutesItem(XTextRange range, Object text, String placeholder)
{
String paraStyle = (String) Helper.getUnoPropertyValue(range, "ParaStyleName");
range.setString((String) text);
Helper.setUnoPropertyValue(range, "ParaStyleName", paraStyle);
- if (text == null || text.equals(""))
+ if (text == null || text.equals(PropertyNames.EMPTY_STRING))
{
- if (placeholder != null && !placeholder.equals(""))
+ if (placeholder != null && !placeholder.equals(PropertyNames.EMPTY_STRING))
{
XTextContent placeHolder = createPlaceHolder(docMSF, placeholder, resources.resPlaceHolderHint);
try
@@ -936,7 +932,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
Helper.setUnoPropertyValue(placeHolder, "PlaceHolder", ph);
Helper.setUnoPropertyValue(placeHolder, "Hint", hint);
Helper.setUnoPropertyValue(placeHolder, "PlaceHolderType", new Short(PlaceholderType.TEXT));
- return (XTextContent) UnoRuntime.queryInterface(XTextContent.class, placeHolder);
+ return UnoRuntime.queryInterface(XTextContent.class, placeHolder);
}
@@ -1016,7 +1012,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
table = getTable(name);
section = getSection(name);
- XTextTable xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, table);
+ XTextTable xTextTable = UnoRuntime.queryInterface(XTextTable.class, table);
XTextTableCursor cursor = xTextTable.createCursorByCellName("A1");
AgendaItem ai;
// should this section be visible?
@@ -1024,14 +1020,14 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
// write items
// ===========
- String cellName = "";
+ String cellName = PropertyNames.EMPTY_STRING;
/* now go through all items that belong to this
* table. Check each one agains the model. If it should
* be display, call it's write method.
- * All items are of type AgendaItem which means they write
+ * All items are of type AgendaItem which means they write
* two cells to the table: a title (text) and a placeholder.
- * see AgendaItem class below.
+ * see AgendaItem class below.
*/
for (int i = 0; i < items.size(); i++)
{
@@ -1072,7 +1068,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
while ((!cellName.equals(cursor.getRangeName()) && (!cursor.getRangeName().startsWith("A"))))
{
cell = xTextTable.getCellByName(cursor.getRangeName());
- ((XTextRange) UnoRuntime.queryInterface(XTextRange.class, cell)).setString("");
+ UnoRuntime.queryInterface(XTextRange.class, cell).setString(PropertyNames.EMPTY_STRING);
cellName = cursor.getRangeName();
cursor.goRight((short) 1, false);
}
@@ -1085,9 +1081,9 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
return;
}
int rowIndex = getRowIndex(cursor);
- int rowsCount = getRowCount((XTextTable) UnoRuntime.queryInterface(XTextTable.class, table));
+ int rowsCount = getRowCount(UnoRuntime.queryInterface(XTextTable.class, table));
- /* now before deleteing i move the cursor up so it
+ /* now before deleteing i move the cursor up so it
* does not disappear, because it will crash office.
*/
cursor.gotoStart(false);
@@ -1110,7 +1106,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
/**
* This class handles the preview of the topics table.
* You can call it the controller of the topics table.
- * It differs from ItemsTable in that it has no data model -
+ * It differs from ItemsTable in that it has no data model -
* the update is done programttically.<br/>
* <br/>
* The decision to make this class a class by its own
@@ -1118,7 +1114,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* since there is anyway only one instance of this class at runtime
* it could have also be implemented in the AgendaTemplate class
* but for clarity and separation I decided to make a sub class for it.
- *
+ *
* @author rp143992
*/
public class Topics
@@ -1148,7 +1144,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
List topicCells = new Vector();
int rowsPerTopic;
/**
- * fields which hold the number of the
+ * fields which hold the number of the
* fillins in the cells vectors.
*/
int numCell = -1;
@@ -1168,7 +1164,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
/**
* Analyze the structure of the Topics table.
* The structure Must be as follows:<br>
- * -One Header Row. <br>
+ * -One Header Row. <br>
* -arbitrary number of rows per topic <br>
* -arbitrary content in the topics row <br>
* -only soft formatting will be restored. <br>
@@ -1201,7 +1197,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
}
// and this is the XTable.
- table = ((XTextTable) UnoRuntime.queryInterface(XTextTable.class, t));
+ table = UnoRuntime.queryInterface(XTextTable.class, t);
/* first I store all <*> ranges
* which are in the topics table.
@@ -1226,7 +1222,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
}
/*
- * in the topics table, there are always one
+ * in the topics table, there are always one
* title row and three topics defined.
* So no mutter how many rows a topic takes - we
* can restore its structure and format.
@@ -1246,7 +1242,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
while (!cursor.getRangeName().equals(afterLastCell))
{
cell = table.getCellByName(cursor.getRangeName());
- XTextRange xTextRange = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, cell);
+ XTextRange xTextRange = UnoRuntime.queryInterface(XTextRange.class, cell);
// first I store the content and para style of the cell
AgendaElement ae = new TextElement(xTextRange);
// if the cell contains a relevant <...>
@@ -1277,7 +1273,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
- /* now that we know how the topics look like,
+ /* now that we know how the topics look like,
* we get the format of the first and last rows.
*/
@@ -1316,7 +1312,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
{
writtenTopics.add(null);
}
- writtenTopics.set(topic, "");
+ writtenTopics.set(topic, PropertyNames.EMPTY_STRING);
// make sure threr are enough rows for me...
int rows = getRowCount(table);
@@ -1353,8 +1349,8 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
/**
* check if the topic with the given index is written to the table.
* @param topic the topic number (0 base)
- * @return true if the topic is already written to the table. False if not.
- * (false would mean new rows must be added to the table in order to
+ * @return true if the topic is already written to the table. False if not.
+ * (false would mean new rows must be added to the table in order to
* be able to write this topic).
*/
private boolean isWritten(int topic)
@@ -1364,11 +1360,11 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
/**
* rewrites a single cell containing.
- * This is used in order to refresh the topic/responsible/duration data in the
+ * This is used in order to refresh the topic/responsible/duration data in the
* preview document, in response to a change in the gui (by the user).
* Since the structure of the topics table is flexible, we don't reference a cell
* number. Rather, we use "what" argument to specify which cell should be redrawn.
- * The Topics object, which analyzed the structure of the topics table appon
+ * The Topics object, which analyzed the structure of the topics table appon
* initialization, refreshes the approperiate cell.
* @param topic index of the topic (0 based).
* @param what 0 for num, 1 for topic, 2 for responsible, 3 for duration
@@ -1413,12 +1409,14 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
break;
}
// move the cursor to the needed cell...
- cursor.goRight((short) cursorMoves, false);
- XCell xc = table.getCellByName(cursor.getRangeName());
- // and write it !
- te.write(xc);
- ((TableCellFormatter) topicCellFormats.get(cursorMoves)).format(xc);
-
+ if ( te != null)
+ {
+ cursor.goRight((short) cursorMoves, false);
+ XCell xc = table.getCellByName(cursor.getRangeName());
+ // and write it !
+ te.write(xc);
+ ((TableCellFormatter) topicCellFormats.get(cursorMoves)).format(xc);
+ }
}
}
@@ -1426,10 +1424,10 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* writes the given topic.
* if the first topic was involved, reformat the
* first row.
- * If any rows were added to the table, reformat
- * the last row.
+ * If any rows were added to the table, reformat
+ * the last row.
* @param topic the index of the topic to write.
- * @param data the topic's data. (see TopicsControl
+ * @param data the topic's data. (see TopicsControl
* for explanation about the topics data model)
* @throws Exception if something goes wrong (though nothing should).
*/
@@ -1481,10 +1479,10 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* number of actuall topics it does *not* add
* new rows !
* Note also that the first topic will never be removed.
- * If the table contains no topics, the whole section will
+ * If the table contains no topics, the whole section will
* be removed uppon finishing.
* The reason for that is a "table-design" one: the first topic is
- * maintained in order to be able to add rows with a design of this topic,
+ * maintained in order to be able to add rows with a design of this topic,
* and not of the header row.
* @param topics the number of topics the table should contain.
* @throws Exception
@@ -1531,7 +1529,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
/**
* returns a text element for the given cell,
* which will write the given text.
- * @param cell the topics cell number.
+ * @param cell the topics cell number.
* @param value the value to write.
* @return a TextElement object which will write the given value
* to the given cell.
@@ -1554,7 +1552,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* formats a series of cells from the given one,
* using the given List of TableCellFormatter objects,
* in the given order.
- * This method is used to format the first (header) and the last
+ * This method is used to format the first (header) and the last
* rows of the table.
* @param cursor a table cursor, pointing to the start cell to format
* @param formats a List containing TableCellFormatter objects. Each will format one cell in the direction specified.
@@ -1585,7 +1583,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
*/
public static String[] getNamesWhichStartWith(String[] allNames, String prefix)
{
- Vector v = new Vector();
+ ArrayList<String> v = new ArrayList<String>();
for (int i = 0; i < allNames.length; i++)
{
if (allNames[i].startsWith(prefix))
@@ -1594,8 +1592,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
}
}
String[] s = new String[v.size()];
- System.arraycopy(v.toArray(), 0, s, 0, s.length);
- return s;
+ return v.toArray(s);
}
/**
@@ -1605,7 +1602,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
*/
public static String getName(Object obj)
{
- return ((XNamed) UnoRuntime.queryInterface(XNamed.class, obj)).getName();
+ return UnoRuntime.queryInterface(XNamed.class, obj).getName();
}
/**
@@ -1616,7 +1613,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
*/
public static void removeTableRows(Object table, int start, int count)
{
- XTableRows rows = ((XTextTable) UnoRuntime.queryInterface(XTextTable.class, table)).getRows();
+ XTableRows rows = UnoRuntime.queryInterface(XTextTable.class, table).getRows();
rows.removeByIndex(start, count);
}
@@ -1628,7 +1625,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
*/
public static void insertTableRows(Object table, int start, int count)
{
- XTableRows rows = ((XTextTable) UnoRuntime.queryInterface(XTextTable.class, table)).getRows();
+ XTableRows rows = UnoRuntime.queryInterface(XTextTable.class, table).getRows();
rows.insertByIndex(start, count);
}
@@ -1654,7 +1651,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
}
/**
- * returns the rows count of this table, assuming
+ * returns the rows count of this table, assuming
* there is no vertical merged cells.
* @param table
* @return the rows count of the given table.
@@ -1668,11 +1665,11 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
/*
* ===========================================================================================
- *
+ *
* End of AgendaTempalte class
- *
+ *
* ===========================================================================================
- *
+ *
*/
/*
* =================================
@@ -1680,7 +1677,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* =================================
*/
/**
- * Interface that is used for writing content to a Uno Text / TextRange
+ * Interface that is used for writing content to a Uno Text / TextRange
* @author rp143992
*
*/
@@ -1697,8 +1694,8 @@ interface AgendaElement
* =================================
*/
/**
- * Basic implementation of the AgendaElement interface -
- * writes nothing, but applies a ParaStyle to the given XText/XTextRange
+ * Basic implementation of the AgendaElement interface -
+ * writes nothing, but applies a ParaStyle to the given XText/XTextRange
* @author rp143992
*
* TODO To change the template for this generated type comment go to
@@ -1717,12 +1714,12 @@ class ParaStyled implements AgendaElement
void format(Object textRange)
{
XText o;
- o = ((XText) UnoRuntime.queryInterface(XText.class, textRange));
+ o = UnoRuntime.queryInterface(XText.class, textRange);
if (o == null)
{
- o = ((XTextRange) UnoRuntime.queryInterface(XTextRange.class, textRange)).getText();
+ o = UnoRuntime.queryInterface(XTextRange.class, textRange).getText();
}
- XTextRange xtr = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, textRange);
+ XTextRange xtr = UnoRuntime.queryInterface(XTextRange.class, textRange);
XTextCursor cursor = o.createTextCursorByRange(xtr);
Helper.setUnoPropertyValue(cursor, "ParaStyleName", paraStyle);
@@ -1763,8 +1760,8 @@ class TextElement extends ParaStyled
public void write(Object textRange)
{
- ((XTextRange) UnoRuntime.queryInterface(XTextRange.class, textRange)).setString(text);
- if (!text.equals(""))
+ UnoRuntime.queryInterface(XTextRange.class, textRange).setString(text);
+ if (!text.equals(PropertyNames.EMPTY_STRING))
{
super.write(textRange);
}
@@ -1772,7 +1769,7 @@ class TextElement extends ParaStyled
}
/**
- * A Text element which, if the text to write is empty (null or "")
+ * A Text element which, if the text to write is empty (null or PropertyNames.EMPTY_STRING)
* inserts a placeholder instead.
* @author rp143992
*
@@ -1805,9 +1802,9 @@ class PlaceholderTextElement extends TextElement
public void write(Object textRange)
{
super.write(textRange);
- if (text == null || text.equals(""))
+ if (text == null || text.equals(PropertyNames.EMPTY_STRING))
{
- XTextRange xTextRange = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, textRange);
+ XTextRange xTextRange = UnoRuntime.queryInterface(XTextRange.class, textRange);
try
{
XTextContent xTextContent = AgendaTemplate.createPlaceHolder(xmsf, placeHolderText, hint);
@@ -1826,7 +1823,7 @@ class PlaceholderTextElement extends TextElement
* The PlaceHolder class
* =================================
*/
-/**
+/**
* An Agenda element which writes no text, but inserts a placeholder, and formats
* it using a ParaStyleName.
* @author rp143992
@@ -1849,7 +1846,7 @@ class PlaceholderElement extends ParaStyled
public void write(Object textRange)
{
- XTextRange xTextRange = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, textRange);
+ XTextRange xTextRange = UnoRuntime.queryInterface(XTextRange.class, textRange);
try
{
XTextContent xTextContent = AgendaTemplate.createPlaceHolder(xmsf, placeHolderText, hint);
@@ -1870,7 +1867,7 @@ class PlaceholderElement extends ParaStyled
* =================================
*/
/**
- * An implementation of AgendaElement which
+ * An implementation of AgendaElement which
* gets as a parameter a table cursor, and writes
* a text to the cell marked by this table cursor, and
* a place holder to the next cell.
@@ -1896,8 +1893,8 @@ class AgendaItem implements AgendaElement
public void write(Object tableCursor) throws Exception
{
- XTextTableCursor xTextTableCursor = (XTextTableCursor) UnoRuntime.queryInterface(XTextTableCursor.class, tableCursor);
- XTextTable xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, table);
+ XTextTableCursor xTextTableCursor = UnoRuntime.queryInterface(XTextTableCursor.class, tableCursor);
+ XTextTable xTextTable = UnoRuntime.queryInterface(XTextTable.class, table);
String cellname = xTextTableCursor.getRangeName();
Object cell = xTextTable.getCellByName(cellname);
@@ -1957,6 +1954,6 @@ class TableCellFormatter
}
}
-
+
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.java b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.java
index 219125b64bd2..b7fe5d136c10 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.java
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-package com.sun.star.wizards.agenda;
-
+package com.sun.star.wizards.agenda;
+
import com.sun.star.awt.FontDescriptor;
import com.sun.star.awt.XButton;
import com.sun.star.awt.XCheckBox;
@@ -41,18 +41,18 @@ import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.ui.UIConsts;
import com.sun.star.wizards.ui.WizardDialog;
-
+
/**
* This class is generated Automatically....
* bla bla bla
- */
+ */
public abstract class AgendaWizardDialog extends WizardDialog implements AgendaWizardDialogConst, UIConsts {
//GUI Components as Class members.
XFixedText lblTitle1;
XCheckBox chkMinutes;
XFixedText lblHelp1;
XFixedText lblPageDesign;
- XListBox listPageDesign;
+ XListBox listPageDesign;
//Image Control
XControl imgHelp1;
XControl imgHelp2;
@@ -90,8 +90,8 @@ public abstract class AgendaWizardDialog extends WizardDialog implements Agenda
XFixedText lblDuration;
//XFixedText lblHelp5;
XTextComponent txtTemplateName;
- XRadioButton optCreateAgenda;
- XRadioButton optMakeChanges;
+ XRadioButton optCreateAgenda;
+ XRadioButton optMakeChanges;
XFixedText lblProceed;
XFixedText lblTemplateName;
XFixedText lblTemplatePath;
@@ -104,10 +104,10 @@ public abstract class AgendaWizardDialog extends WizardDialog implements Agenda
XButton btnRemove;
XButton btnUp;
XButton btnDown;
-
- final private String IMGHELP1_HID = "";
-
-
+
+ final private String IMGHELP1_HID = PropertyNames.EMPTY_STRING;
+
+
//Font Descriptors as Class members.
FontDescriptor fontDescriptor1 = new FontDescriptor();
FontDescriptor fontDescriptor2 = new FontDescriptor();
@@ -115,271 +115,271 @@ public abstract class AgendaWizardDialog extends WizardDialog implements Agenda
//Resources Object
AgendaWizardDialogResources resources;
-
+
private String[] PROPS_LIST = new String[] {"Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH};
- private String[] PROPS_LABEL_B = new String[] {"FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH};
+ private String[] PROPS_LABEL_B = new String[] {PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH};
private String[] PROPS_CHECK = new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH};
private String[] PROPS_BUTTON = new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH};
private String[] PROPS_X = new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH};
private String[] PROPS_TEXTAREA = new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH};
private String[] PROPS_TEXT = 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};
- private String[] PROPS_IMAGE = new String[] {"Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH};
-
+ private String[] PROPS_IMAGE = new String[] {PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH};
+
private static final Short NO_BORDER = new Short((short)0);
-
+
public AgendaWizardDialog(XMultiServiceFactory xmsf) {
super(xmsf,HID);
//Load Resources
resources = new AgendaWizardDialogResources(xmsf);
-
+
//set dialog properties...
- Helper.setUnoPropertyValues(xDialogModel,
- new String[] { "Closeable",PropertyNames.PROPERTY_HEIGHT,"Moveable",PropertyNames.PROPERTY_POSITION_X,PropertyNames.PROPERTY_POSITION_Y,PropertyNames.PROPERTY_STEP,PropertyNames.PROPERTY_TABINDEX,"Title",PropertyNames.PROPERTY_WIDTH},
- new Object[] { Boolean.TRUE,new Integer(210),Boolean.TRUE,new Integer(200),new Integer(52),INTEGERS[1],new Short((short)1),resources.resAgendaWizardDialog_title,new Integer(310)}
+ Helper.setUnoPropertyValues(xDialogModel,
+ new String[] { PropertyNames.PROPERTY_CLOSEABLE,PropertyNames.PROPERTY_HEIGHT,PropertyNames.PROPERTY_MOVEABLE,PropertyNames.PROPERTY_POSITION_X,PropertyNames.PROPERTY_POSITION_Y,PropertyNames.PROPERTY_STEP,PropertyNames.PROPERTY_TABINDEX,PropertyNames.PROPERTY_TITLE,PropertyNames.PROPERTY_WIDTH},
+ new Object[] { Boolean.TRUE,210,Boolean.TRUE,200,52,INTEGERS[1],new Short((short)1),resources.resAgendaWizardDialog_title,310}
);
-
+
//Set member- FontDescriptors...
fontDescriptor1.Weight = 150;
fontDescriptor1.Underline = com.sun.star.awt.FontUnderline.SINGLE;
fontDescriptor2.Weight = 100;
fontDescriptor4.Weight = 150;
}
-
+
//build components
public void buildStep1() {
- lblTitle1 = insertLabel("lblTitle1",
+ lblTitle1 = insertLabel("lblTitle1",
PROPS_LABEL_B,
- new Object[] { fontDescriptor4,INTEGER_16,resources.reslblTitle1_value,Boolean.TRUE,new Integer(91),INTEGERS[8],INTEGERS[1],new Short((short)100),new Integer(212)}
+ new Object[] { fontDescriptor4,INTEGER_16,resources.reslblTitle1_value,Boolean.TRUE,91,INTEGERS[8],INTEGERS[1],new Short((short)100),212}
);
- lblPageDesign = insertLabel("lblPageDesign",
+ lblPageDesign = insertLabel("lblPageDesign",
PROPS_TEXT,
- new Object[] { INTEGERS[8],resources.reslblPageDesign_value,new Integer(97),new Integer(32),INTEGERS[1],new Short((short)101),new Integer(66)}
+ new Object[] { INTEGERS[8],resources.reslblPageDesign_value,97,32,INTEGERS[1],new Short((short)101),66}
);
listPageDesign = insertListBox("listPageDesign", null, null,
PROPS_LIST,
- new Object[] { Boolean.TRUE,INTEGER_12,LISTPAGEDESIGN_HID,new Integer(166),new Integer(30),INTEGERS[1],new Short((short)102),new Integer(70)}
+ new Object[] { Boolean.TRUE,INTEGER_12,LISTPAGEDESIGN_HID,166,30,INTEGERS[1],new Short((short)102),70}
);
chkMinutes = insertCheckBox("chkMinutes", null,
PROPS_CHECK,
- new Object[] { INTEGERS[9],CHKMINUTES_HID,resources.reschkMinutes_value,new Integer(97),new Integer(50),new Short((short)0),INTEGERS[1],new Short((short)103),new Integer(203)}
+ new Object[] { INTEGERS[9],CHKMINUTES_HID,resources.reschkMinutes_value,97,50,new Short((short)0),INTEGERS[1],new Short((short)103),203}
);
- imgHelp1 = insertImage("imgHelp1",
+ imgHelp1 = insertImage("imgHelp1",
PROPS_IMAGE,
- new Object[] { NO_BORDER, INTEGERS[10],IMGHELP1_HID, AgendaWizardDialogConst.INFO_IMAGE_URL, new Integer(92),new Integer(145), Boolean.FALSE, INTEGERS[1], new Short((short)104),INTEGERS[10]}
+ new Object[] { NO_BORDER, INTEGERS[10],IMGHELP1_HID, AgendaWizardDialogConst.INFO_IMAGE_URL, 92,145, Boolean.FALSE, INTEGERS[1], new Short((short)104),INTEGERS[10]}
);
- lblHelp1 = insertLabel("lblHelp1",
+ lblHelp1 = insertLabel("lblHelp1",
PROPS_TEXTAREA,
- new Object[] { new Integer(39),resources.reslblHelp1_value,Boolean.TRUE,new Integer(104),new Integer(145),INTEGERS[1],new Short((short)105),new Integer(199)}
+ new Object[] { 39,resources.reslblHelp1_value,Boolean.TRUE,104,145,INTEGERS[1],new Short((short)105),199}
);
}
public void buildStep2() {
- lblTitle2 = insertLabel("lblTitle2",
+ lblTitle2 = insertLabel("lblTitle2",
PROPS_LABEL_B,
- new Object[] { fontDescriptor4,INTEGER_16,resources.reslblTitle2_value,Boolean.TRUE,new Integer(91),INTEGERS[8],INTEGERS[2],new Short((short)200),new Integer(212)}
+ new Object[] { fontDescriptor4,INTEGER_16,resources.reslblTitle2_value,Boolean.TRUE,91,INTEGERS[8],INTEGERS[2],new Short((short)200),212}
);
- lblDate = insertLabel("lblDate",
+ lblDate = insertLabel("lblDate",
PROPS_TEXT,
- new Object[] { INTEGERS[8],resources.reslblDate_value,new Integer(97),new Integer(32),INTEGERS[2],new Short((short)201),new Integer(66)}
+ new Object[] { INTEGERS[8],resources.reslblDate_value,97,32,INTEGERS[2],new Short((short)201),66}
);
txtDate = insertDateField("txtDate", null,
PROPS_LIST,
- new Object[] { Boolean.TRUE,INTEGER_12,TXTDATE_HID,new Integer(166),new Integer(30),INTEGERS[2],new Short((short)202),new Integer(70)}
+ new Object[] { Boolean.TRUE,INTEGER_12,TXTDATE_HID,166,30,INTEGERS[2],new Short((short)202),70}
);
- lblTime = insertLabel("lblTime",
+ lblTime = insertLabel("lblTime",
PROPS_TEXT,
- new Object[] { INTEGERS[8],resources.reslblTime_value,new Integer(97),new Integer(50),INTEGERS[2],new Short((short)203),new Integer(66)}
+ new Object[] { INTEGERS[8],resources.reslblTime_value,97,50,INTEGERS[2],new Short((short)203),66}
);
txtTime = insertTimeField("txtTime", null,
new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, "StrictFormat", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH},
- new Object[] { INTEGER_12,TXTTIME_HID,new Integer(166),new Integer(48),INTEGERS[2],Boolean.TRUE,new Short((short)204),new Integer(70)}
+ new Object[] { INTEGER_12,TXTTIME_HID,166,48,INTEGERS[2],Boolean.TRUE,new Short((short)204),70}
);
-
- lblTitle = insertLabel("lblTitle",
+
+ lblTitle = insertLabel("lblTitle",
PROPS_TEXT,
- new Object[] { INTEGERS[8],resources.reslblTitle_value,new Integer(97),new Integer(68),INTEGERS[2],new Short((short)205),new Integer(66)}
+ new Object[] { INTEGERS[8],resources.reslblTitle_value,97,68,INTEGERS[2],new Short((short)205),66}
);
txtTitle = insertTextField("txtTitle", null,
new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH},
- new Object[] { new Integer(26),TXTTITLE_HID,Boolean.TRUE,new Integer(166),new Integer(66),INTEGERS[2],new Short((short)206),new Integer(138)}
+ new Object[] { 26,TXTTITLE_HID,Boolean.TRUE,166,66,INTEGERS[2],new Short((short)206),138}
);
- lblLocation = insertLabel("lblLocation",
+ lblLocation = insertLabel("lblLocation",
PROPS_TEXT,
- new Object[] { INTEGERS[8],resources.reslblLocation_value,new Integer(97),new Integer(100),INTEGERS[2],new Short((short)207),new Integer(66)}
+ new Object[] { INTEGERS[8],resources.reslblLocation_value,97,100,INTEGERS[2],new Short((short)207),66}
);
cbLocation = insertTextField("cbLocation", null,null,
new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH},
- new Object[] { new Integer(34),CBLOCATION_HID,Boolean.TRUE,new Integer(166),new Integer(98),INTEGERS[2],new Short((short)208),new Integer(138)}
+ new Object[] { 34,CBLOCATION_HID,Boolean.TRUE,166,98,INTEGERS[2],new Short((short)208),138}
);
-
- imgHelp2 = insertImage("imgHelp2",
+
+ imgHelp2 = insertImage("imgHelp2",
PROPS_IMAGE,
- new Object[] { NO_BORDER, INTEGERS[10],IMGHELP1_HID,AgendaWizardDialogConst.INFO_IMAGE_URL, new Integer(92),new Integer(145),Boolean.FALSE, INTEGERS[2],new Short((short)209),INTEGERS[10]}
+ new Object[] { NO_BORDER, INTEGERS[10],IMGHELP1_HID,AgendaWizardDialogConst.INFO_IMAGE_URL, 92,145,Boolean.FALSE, INTEGERS[2],new Short((short)209),INTEGERS[10]}
);
- lblHelp2 = insertLabel("lblHelp2",
+ lblHelp2 = insertLabel("lblHelp2",
PROPS_TEXTAREA,
- new Object[] { new Integer(39),resources.reslblHelp2_value,Boolean.TRUE,new Integer(104),new Integer(145),INTEGERS[2],new Short((short)210),new Integer(199)}
+ new Object[] { 39,resources.reslblHelp2_value,Boolean.TRUE,104,145,INTEGERS[2],new Short((short)210),199}
);
-
+
}
public void buildStep3() {
- lblTitle3 = insertLabel("lblTitle3",
+ lblTitle3 = insertLabel("lblTitle3",
PROPS_LABEL_B,
- new Object[] { fontDescriptor4,INTEGER_16,resources.reslblTitle3_value,Boolean.TRUE,new Integer(91),INTEGERS[8],INTEGERS[3],new Short((short)300),new Integer(212)}
+ new Object[] { fontDescriptor4,INTEGER_16,resources.reslblTitle3_value,Boolean.TRUE,91,INTEGERS[8],INTEGERS[3],new Short((short)300),212}
);
chkMeetingTitle = insertCheckBox("chkMeetingTitle", null,
PROPS_CHECK,
- new Object[] { INTEGERS[8],CHKMEETINGTITLE_HID,resources.reschkMeetingTitle_value,new Integer(97),new Integer(32),new Short((short)1),INTEGERS[3],new Short((short)301),new Integer(69)}
+ new Object[] { INTEGERS[8],CHKMEETINGTITLE_HID,resources.reschkMeetingTitle_value,97,32,new Short((short)1),INTEGERS[3],new Short((short)301),69}
);
chkRead = insertCheckBox("chkRead", null,
PROPS_CHECK,
- new Object[] { INTEGERS[8],CHKREAD_HID,resources.reschkRead_value,new Integer(97),new Integer(46),new Short((short)0),INTEGERS[3],new Short((short)302),new Integer(162)}
+ new Object[] { INTEGERS[8],CHKREAD_HID,resources.reschkRead_value,97,46,new Short((short)0),INTEGERS[3],new Short((short)302),162}
);
chkBring = insertCheckBox("chkBring", null,
PROPS_CHECK,
- new Object[] { INTEGERS[8],CHKBRING_HID,resources.reschkBring_value,new Integer(97),new Integer(60),new Short((short)0),INTEGERS[3],new Short((short)303),new Integer(162)}
+ new Object[] { INTEGERS[8],CHKBRING_HID,resources.reschkBring_value,97,60,new Short((short)0),INTEGERS[3],new Short((short)303),162}
);
chkNotes = insertCheckBox("chkNotes", null,
PROPS_CHECK,
- new Object[] { INTEGERS[8],CHKNOTES_HID,resources.reschkNotes_value,new Integer(97),new Integer(74),new Short((short)1),INTEGERS[3],new Short((short)304),new Integer(160)}
+ new Object[] { INTEGERS[8],CHKNOTES_HID,resources.reschkNotes_value,97,74,new Short((short)1),INTEGERS[3],new Short((short)304),160}
);
- imgHelp3 = insertImage("imgHelp3",
+ imgHelp3 = insertImage("imgHelp3",
PROPS_IMAGE,
- new Object[] { NO_BORDER, INTEGERS[10],IMGHELP1_HID,AgendaWizardDialogConst.INFO_IMAGE_URL, new Integer(92),new Integer(145),Boolean.FALSE, INTEGERS[3],new Short((short)305),INTEGERS[10]}
+ new Object[] { NO_BORDER, INTEGERS[10],IMGHELP1_HID,AgendaWizardDialogConst.INFO_IMAGE_URL, 92,145,Boolean.FALSE, INTEGERS[3],new Short((short)305),INTEGERS[10]}
);
- lblHelp3 = insertLabel("lblHelp3",
+ lblHelp3 = insertLabel("lblHelp3",
PROPS_TEXTAREA,
- new Object[] { new Integer(39),resources.reslblHelp3_value,Boolean.TRUE,new Integer(104),new Integer(145),INTEGERS[3],new Short((short)306),new Integer(199)}
+ new Object[] { 39,resources.reslblHelp3_value,Boolean.TRUE,104,145,INTEGERS[3],new Short((short)306),199}
);
}
public void buildStep4() {
- lblTitle5 = insertLabel("lblTitle5",
+ lblTitle5 = insertLabel("lblTitle5",
PROPS_LABEL_B,
- new Object[] { fontDescriptor4,INTEGER_16,resources.reslblTitle5_value,Boolean.TRUE,new Integer(91),INTEGERS[8],INTEGERS[4],new Short((short)400),new Integer(212)}
+ new Object[] { fontDescriptor4,INTEGER_16,resources.reslblTitle5_value,Boolean.TRUE,91,INTEGERS[8],INTEGERS[4],new Short((short)400),212}
);
chkConvenedBy = insertCheckBox("chkConvenedBy", null,
PROPS_CHECK,
- new Object[] { INTEGERS[8],CHKCONVENEDBY_HID,resources.reschkConvenedBy_value,new Integer(97),new Integer(32),new Short((short)1),INTEGERS[4],new Short((short)401),new Integer(150)}
+ new Object[] { INTEGERS[8],CHKCONVENEDBY_HID,resources.reschkConvenedBy_value,97,32,new Short((short)1),INTEGERS[4],new Short((short)401),150}
);
chkPresiding = insertCheckBox("chkPresiding", null,
PROPS_CHECK,
- new Object[] { INTEGERS[8],CHKPRESIDING_HID,resources.reschkPresiding_value,new Integer(97),new Integer(46),new Short((short)0),INTEGERS[4],new Short((short)402),new Integer(150)}
+ new Object[] { INTEGERS[8],CHKPRESIDING_HID,resources.reschkPresiding_value,97,46,new Short((short)0),INTEGERS[4],new Short((short)402),150}
);
chkNoteTaker = insertCheckBox("chkNoteTaker", null,
PROPS_CHECK,
- new Object[] { INTEGERS[8],CHKNOTETAKER_HID,resources.reschkNoteTaker_value,new Integer(97),new Integer(60),new Short((short)0),INTEGERS[4],new Short((short)403),new Integer(150)}
+ new Object[] { INTEGERS[8],CHKNOTETAKER_HID,resources.reschkNoteTaker_value,97,60,new Short((short)0),INTEGERS[4],new Short((short)403),150}
);
chkTimekeeper = insertCheckBox("chkTimekeeper", null,
PROPS_CHECK,
- new Object[] { INTEGERS[8],CHKTIMEKEEPER_HID,resources.reschkTimekeeper_value,new Integer(97),new Integer(74),new Short((short)0),INTEGERS[4],new Short((short)404),new Integer(150)}
+ new Object[] { INTEGERS[8],CHKTIMEKEEPER_HID,resources.reschkTimekeeper_value,97,74,new Short((short)0),INTEGERS[4],new Short((short)404),150}
);
chkAttendees = insertCheckBox("chkAttendees", null,
PROPS_CHECK,
- new Object[] { INTEGERS[8],CHKATTENDEES_HID,resources.reschkAttendees_value,new Integer(97),new Integer(88),new Short((short)1),INTEGERS[4],new Short((short)405),new Integer(150)}
+ new Object[] { INTEGERS[8],CHKATTENDEES_HID,resources.reschkAttendees_value,97,88,new Short((short)1),INTEGERS[4],new Short((short)405),150}
);
chkObservers = insertCheckBox("chkObservers", null,
PROPS_CHECK,
- new Object[] { INTEGERS[8],CHKOBSERVERS_HID,resources.reschkObservers_value,new Integer(97),new Integer(102),new Short((short)0),INTEGERS[4],new Short((short)406),new Integer(150)}
+ new Object[] { INTEGERS[8],CHKOBSERVERS_HID,resources.reschkObservers_value,97,102,new Short((short)0),INTEGERS[4],new Short((short)406),150}
);
chkResourcePersons = insertCheckBox("chkResourcePersons", null,
PROPS_CHECK,
- new Object[] { INTEGERS[8],CHKRESOURCEPERSONS_HID,resources.reschkResourcePersons_value,new Integer(97),new Integer(116),new Short((short)0),INTEGERS[4],new Short((short)407),new Integer(150)}
+ new Object[] { INTEGERS[8],CHKRESOURCEPERSONS_HID,resources.reschkResourcePersons_value,97,116,new Short((short)0),INTEGERS[4],new Short((short)407),150}
);
- imgHelp4 = insertImage("imgHelp4",
+ imgHelp4 = insertImage("imgHelp4",
PROPS_IMAGE,
- new Object[] { NO_BORDER, INTEGERS[10],IMGHELP1_HID,AgendaWizardDialogConst.INFO_IMAGE_URL, new Integer(92),new Integer(145),Boolean.FALSE, INTEGERS[4],new Short((short)408),INTEGERS[10]}
+ new Object[] { NO_BORDER, INTEGERS[10],IMGHELP1_HID,AgendaWizardDialogConst.INFO_IMAGE_URL, 92,145,Boolean.FALSE, INTEGERS[4],new Short((short)408),INTEGERS[10]}
);
- lblHelp4 = insertLabel("lblHelp4",
+ lblHelp4 = insertLabel("lblHelp4",
PROPS_TEXTAREA,
- new Object[] { new Integer(39),resources.reslblHelp4_value,Boolean.TRUE,new Integer(104),new Integer(145),INTEGERS[4],new Short((short)409),new Integer(199)}
+ new Object[] { 39,resources.reslblHelp4_value,Boolean.TRUE,104,145,INTEGERS[4],new Short((short)409),199}
);
}
public void buildStep5() {
- lblTitle4 = insertLabel("lblTitle4",
+ lblTitle4 = insertLabel("lblTitle4",
PROPS_LABEL_B,
- new Object[] { fontDescriptor4,INTEGER_16,resources.reslblTitle4_value,Boolean.TRUE,new Integer(91),INTEGERS[8],INTEGERS[5],new Short((short)500),new Integer(212)}
+ new Object[] { fontDescriptor4,INTEGER_16,resources.reslblTitle4_value,Boolean.TRUE,91,INTEGERS[8],INTEGERS[5],new Short((short)500),212}
);
- lblTopic = insertLabel("lblTopic",
+ lblTopic = insertLabel("lblTopic",
PROPS_TEXT,
- new Object[] { INTEGERS[8],resources.reslblTopic_value,new Integer(107),new Integer(28),INTEGERS[5],new Short((short)71),new Integer(501)}
+ new Object[] { INTEGERS[8],resources.reslblTopic_value,107,28,INTEGERS[5],new Short((short)71),501}
);
- lblResponsible = insertLabel("lblResponsible",
+ lblResponsible = insertLabel("lblResponsible",
PROPS_TEXT,
- new Object[] { INTEGERS[8],resources.reslblResponsible_value,new Integer(195),new Integer(28),INTEGERS[5],new Short((short)72),new Integer(502)}
+ new Object[] { INTEGERS[8],resources.reslblResponsible_value,195,28,INTEGERS[5],new Short((short)72),502}
);
- lblDuration = insertLabel("lblDuration",
+ lblDuration = insertLabel("lblDuration",
PROPS_TEXT,
- new Object[] { INTEGERS[8],resources.reslblDuration_value,new Integer(267),new Integer(28),INTEGERS[5],new Short((short)73),new Integer(503)}
+ new Object[] { INTEGERS[8],resources.reslblDuration_value,267,28,INTEGERS[5],new Short((short)73),503}
);
-
-
-
-
-
+
+
+
+
+
btnInsert = insertButton("btnInsert", BTNINSERT_ACTION_PERFORMED,
PROPS_BUTTON,
- new Object[] { INTEGER_14,BTNINSERT_HID,resources.resButtonInsert,new Integer(92),new Integer(136),INTEGERS[5],new Short((short)580),INTEGER_40}
+ new Object[] { INTEGER_14,BTNINSERT_HID,resources.resButtonInsert,92,136,INTEGERS[5],new Short((short)580),INTEGER_40}
);
btnRemove = insertButton("btnRemove", BTNREMOVE_ACTION_PERFORMED,
PROPS_BUTTON,
- new Object[] { INTEGER_14,BTNREMOVE_HID,resources.resButtonRemove,new Integer(134),new Integer(136),INTEGERS[5],new Short((short)581),INTEGER_40}
+ new Object[] { INTEGER_14,BTNREMOVE_HID,resources.resButtonRemove,134,136,INTEGERS[5],new Short((short)581),INTEGER_40}
);
btnUp = insertButton("btnUp", BTNUP_ACTION_PERFORMED,
PROPS_BUTTON,
- new Object[] { INTEGER_14,BTNUP_HID,resources.resButtonUp,new Integer(222),new Integer(136),INTEGERS[5],new Short((short)582),INTEGER_40}
+ new Object[] { INTEGER_14,BTNUP_HID,resources.resButtonUp,222,136,INTEGERS[5],new Short((short)582),INTEGER_40}
);
btnDown = insertButton("btnDown", BTNDOWN_ACTION_PERFORMED,
PROPS_BUTTON,
- new Object[] { INTEGER_14,BTNDOWN_HID,resources.resButtonDown,new Integer(264),new Integer(136),INTEGERS[5],new Short((short)583),INTEGER_40}
+ new Object[] { INTEGER_14,BTNDOWN_HID,resources.resButtonDown,264,136,INTEGERS[5],new Short((short)583),INTEGER_40}
);
-
-
+
+
}
public void buildStep6() {
- lblTitle6 = insertLabel("lblTitle6",
+ lblTitle6 = insertLabel("lblTitle6",
PROPS_LABEL_B,
- new Object[] { fontDescriptor4,INTEGER_16,resources.reslblTitle6_value,Boolean.TRUE,new Integer(91),INTEGERS[8],INTEGERS[6],new Short((short)600),new Integer(212)}
+ new Object[] { fontDescriptor4,INTEGER_16,resources.reslblTitle6_value,Boolean.TRUE,91,INTEGERS[8],INTEGERS[6],new Short((short)600),212}
);
- lblHelpPg6 = insertLabel("lblHelpPg6",
+ lblHelpPg6 = insertLabel("lblHelpPg6",
PROPS_TEXTAREA,
- new Object[] { new Integer(24),resources.reslblHelpPg6_value,Boolean.TRUE,new Integer(97),new Integer(32),INTEGERS[6],new Short((short)601),new Integer(204)}
+ new Object[] { 24,resources.reslblHelpPg6_value,Boolean.TRUE,97,32,INTEGERS[6],new Short((short)601),204}
);
-
- lblTemplateName = insertLabel("lblTemplateName",
+
+ lblTemplateName = insertLabel("lblTemplateName",
PROPS_TEXT,
- new Object[] { INTEGERS[8],resources.reslblTemplateName_value,new Integer(97),new Integer(62),INTEGERS[6],new Short((short)602),new Integer(101)}
+ new Object[] { INTEGERS[8],resources.reslblTemplateName_value,97,62,INTEGERS[6],new Short((short)602),101}
);
txtTemplateName = insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED,
PROPS_X,
- new Object[] { INTEGER_12,TXTTEMPLATENAME_HID,new Integer(202),new Integer(60),INTEGERS[6],new Short((short)603),new Integer(100)}
+ new Object[] { INTEGER_12,TXTTEMPLATENAME_HID,202,60,INTEGERS[6],new Short((short)603),100}
);
- lblProceed = insertLabel("lblProceed",
+ lblProceed = insertLabel("lblProceed",
PROPS_TEXT,
- new Object[] { INTEGERS[8],resources.reslblProceed_value,new Integer(97),new Integer(101),INTEGERS[6],new Short((short)607),new Integer(204)}
+ new Object[] { INTEGERS[8],resources.reslblProceed_value,97,101,INTEGERS[6],new Short((short)607),204}
);
optCreateAgenda = insertRadioButton("optCreateAgenda", null,
PROPS_CHECK,
- new Object[] { INTEGERS[8],OPTCREATEAGENDA_HID,resources.resoptCreateAgenda_value,new Integer(103),new Integer(113),new Short((short)1),INTEGERS[6],new Short((short)608),new Integer(198)}
+ new Object[] { INTEGERS[8],OPTCREATEAGENDA_HID,resources.resoptCreateAgenda_value,103,113,new Short((short)1),INTEGERS[6],new Short((short)608),198}
);
optMakeChanges = insertRadioButton("optMakeChanges", null,
PROPS_BUTTON,
- new Object[] { INTEGERS[8],OPTMAKECHANGES_HID,resources.resoptMakeChanges_value,new Integer(103),new Integer(125),INTEGERS[6],new Short((short)609),new Integer(198)}
+ new Object[] { INTEGERS[8],OPTMAKECHANGES_HID,resources.resoptMakeChanges_value,103,125,INTEGERS[6],new Short((short)609),198}
);
- imgHelp6 = insertImage("imgHelp6",
+ imgHelp6 = insertImage("imgHelp6",
PROPS_IMAGE,
- new Object[] { NO_BORDER, INTEGERS[10],IMGHELP1_HID,AgendaWizardDialogConst.INFO_IMAGE_URL, new Integer(92),new Integer(145),Boolean.FALSE, INTEGERS[6],new Short((short)610),INTEGERS[10]}
+ new Object[] { NO_BORDER, INTEGERS[10],IMGHELP1_HID,AgendaWizardDialogConst.INFO_IMAGE_URL, 92,145,Boolean.FALSE, INTEGERS[6],new Short((short)610),INTEGERS[10]}
);
- lblHelp6 = insertLabel("lblHelp6",
+ lblHelp6 = insertLabel("lblHelp6",
PROPS_TEXTAREA,
- new Object[] { new Integer(39),resources.reslblHelp6_value,Boolean.TRUE,new Integer(104),new Integer(145),INTEGERS[6],new Short((short)611),new Integer(199)}
+ new Object[] { 39,resources.reslblHelp6_value,Boolean.TRUE,104,145,INTEGERS[6],new Short((short)611),199}
);
-
+
}
}
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.java b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.java
index 87d60d916731..6e06327ef244 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.java
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,28 +29,28 @@ package com.sun.star.wizards.agenda;
import com.sun.star.wizards.common.HelpIds;
public interface AgendaWizardDialogConst {
-
+
/**
* These are event method names, used with reflection
- * to call the methods under these names uppon
+ * to call the methods under these names uppon
* events.
*/
-
- final String LISTPAGEDESIGN_ACTION_PERFORMED = "pageDesignChanged";
- final String TXTTEMPLATENAME_TEXT_CHANGED = "templateTitleChanged";
- final String BTNTEMPLATEPATH_ACTION_PERFORMED = "saveAs";
- final String BTNINSERT_ACTION_PERFORMED = "insertRow";
- final String BTNREMOVE_ACTION_PERFORMED = "removeRow";
- final String BTNUP_ACTION_PERFORMED = "rowUp";
- final String BTNDOWN_ACTION_PERFORMED = "rowDown";
-
+
+ final String LISTPAGEDESIGN_ACTION_PERFORMED = "pageDesignChanged";
+ final String TXTTEMPLATENAME_TEXT_CHANGED = "templateTitleChanged";
+ final String BTNTEMPLATEPATH_ACTION_PERFORMED = "saveAs";
+ final String BTNINSERT_ACTION_PERFORMED = "insertRow";
+ final String BTNREMOVE_ACTION_PERFORMED = "removeRow";
+ final String BTNUP_ACTION_PERFORMED = "rowUp";
+ final String BTNDOWN_ACTION_PERFORMED = "rowDown";
+
final String INFO_IMAGE_URL = "private:resource/dbu/image/19205";
/* ====================================
* Help IDs
* ====================================
*/
- final int HID = 41051;
-
+ final int HID = 41051;
+
/*
* "HID:(hid)" - the dialog
* "HID:(hid+1) - the help button
@@ -59,19 +59,19 @@ public interface AgendaWizardDialogConst {
* "HID:(hid+4)" - the create button
* "HID:(hid+5)" - the cancel button
*/
-
+
final String LISTPAGEDESIGN_HID = HelpIds.getHelpIdString((HID + 6));
final String CHKMINUTES_HID = HelpIds.getHelpIdString((HID + 7));
final String TXTTIME_HID = HelpIds.getHelpIdString((HID + 8));
final String TXTDATE_HID = HelpIds.getHelpIdString((HID + 9));
final String TXTTITLE_HID = HelpIds.getHelpIdString((HID + 10));
final String CBLOCATION_HID = HelpIds.getHelpIdString((HID + 11));
-
+
final String CHKMEETINGTITLE_HID = HelpIds.getHelpIdString((HID + 12));
final String CHKREAD_HID = HelpIds.getHelpIdString((HID + 13));
final String CHKBRING_HID = HelpIds.getHelpIdString((HID + 14));
final String CHKNOTES_HID = HelpIds.getHelpIdString((HID + 15));
-
+
final String CHKCONVENEDBY_HID = HelpIds.getHelpIdString((HID + 16));
final String CHKPRESIDING_HID = HelpIds.getHelpIdString((HID + 17));
final String CHKNOTETAKER_HID = HelpIds.getHelpIdString((HID + 18));
@@ -79,22 +79,22 @@ public interface AgendaWizardDialogConst {
final String CHKATTENDEES_HID = HelpIds.getHelpIdString((HID + 20));
final String CHKOBSERVERS_HID = HelpIds.getHelpIdString((HID + 21));
final String CHKRESOURCEPERSONS_HID = HelpIds.getHelpIdString((HID + 22));
-
+
final String TXTTEMPLATENAME_HID = HelpIds.getHelpIdString((HID + 23));
final String TXTTEMPLATEPATH_HID = HelpIds.getHelpIdString((HID + 24));
final String BTNTEMPLATEPATH_HID = HelpIds.getHelpIdString((HID + 25));
-
+
final String OPTCREATEAGENDA_HID = HelpIds.getHelpIdString((HID + 26));
final String OPTMAKECHANGES_HID = HelpIds.getHelpIdString((HID + 27));
-
+
final String BTNINSERT_HID = HelpIds.getHelpIdString((HID + 28));
final String BTNREMOVE_HID = HelpIds.getHelpIdString((HID + 29));
final String BTNUP_HID = HelpIds.getHelpIdString((HID + 30));
final String BTNDOWN_HID = HelpIds.getHelpIdString((HID + 31));
-
+
final int LAST_HID = HID + 32;
-
- /*
+
+ /*
* 32 : scroll bar
* 33 - 35 first topics row
* 36 - 38 second
@@ -103,7 +103,7 @@ public interface AgendaWizardDialogConst {
* 45 - 47
* total 5 rows / 3 controls.
*/
-
-
+
+
}
-
+
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
index 50ee492f8c78..e3bd6b671ceb 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-package com.sun.star.wizards.agenda;
+
+package com.sun.star.wizards.agenda;
import java.util.Vector;
@@ -50,16 +50,17 @@ import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.common.NoValidPathException;
import com.sun.star.wizards.common.SystemDialog;
import com.sun.star.wizards.common.HelpIds;
+import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.document.OfficeDocument;
import com.sun.star.wizards.text.ViewHandler;
import com.sun.star.wizards.ui.PathSelection;
import com.sun.star.wizards.ui.XPathSelectionListener;
-import com.sun.star.wizards.ui.event.DataAware;
+import com.sun.star.wizards.ui.event.DataAware;
import com.sun.star.wizards.ui.event.RadioDataAware;
import com.sun.star.wizards.ui.event.UnoDataAware;
/**
- * This class is the dialog implementation class -
+ * This class is the dialog implementation class -
* there is not much business logic here - but mostley
* event methods.
* Some event methods are also implemented in TopicsControl and TopicsControl.ControlRow.
@@ -71,7 +72,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
* used to prevent a double start of the wizard.
*/
static boolean running;
-
+
/**
* the preview document controller.
*/
@@ -82,14 +83,14 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
* the data model changes, except for topics).
*/
private CGAgenda agenda;
-
+
/**
- * the topics control, a gui element which
+ * the topics control, a gui element which
* manipulates the topics data according to the
- * user's input.
+ * user's input.
*/
private TopicsControl topicsControl;
-
+
/**
* an array with two array memebers:
* agendaTemplates[0] contains an array with
@@ -98,31 +99,31 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
* corresponding URLs.
*/
private String[][] agendaTemplates;
-
+
PathSelection myPathSelection;
-
+
String sTemplatePath;
String sUserTemplatePath;
String sBitmapPath;
-
+
String sPath;
/** constructor */
- public AgendaWizardDialogImpl(XMultiServiceFactory xmsf)
+ public AgendaWizardDialogImpl(XMultiServiceFactory xmsf)
{
super(xmsf);
}
-
+
protected void enterStep(int OldStep, int NewStep) {}
protected void leaveStep(int OldStep, int NewStep) {}
-
+
/**
* read the configuration data, open the specified template,
* initialize the template controller (AgendaTemplate) and
- * set the status of the displayed template to the one
+ * set the status of the displayed template to the one
* read from the configuration.
* build the dialog.
- * Synchronize the dialog to the same status (read from
+ * Synchronize the dialog to the same status (read from
* the configuration).
* show the dialog.
*/
@@ -131,16 +132,16 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
try {
// read configuration data.
agenda = new CGAgenda();
-
+
Object root = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.Office.Writer/Wizards/Agenda", false);
agenda.readConfiguration(root,"cp_");
-
+
// initialize the agenda template
agendaTemplate = new AgendaTemplate(xMSF, agenda, resources, this);
initializeTemplates();
-
+
agendaTemplate.load(agendaTemplates[1][agenda.cp_AgendaType] , new Vector());
-
+
// build the dialog.
buildStep1();
buildStep2();
@@ -150,17 +151,17 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
topicsControl = new TopicsControl(this,xMSF, agenda);
buildStep6();
drawNaviBar();
-
+
initializePaths();
-
+
//special Control for setting the save Path:
insertPathSelectionControl();
-
+
// create the peer
XWindow xw = agendaTemplate.xFrame.getContainerWindow();
- XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xw);
+ XWindowPeer xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xw);
this.createWindowPeer( xWindowPeer );
-
+
// initialize roadmap
this.addRoadmap();
this.insertRoadMapItems(
@@ -169,38 +170,37 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
new boolean[] { true,true,true,true,true,true }
);
this.setMaxStep(6);
-
+
// synchronize GUI and CGAgenda object.
makeDA();
- if(myPathSelection.xSaveTextBox.getText().equalsIgnoreCase("")) {myPathSelection.initializePath();}
+ if(myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING)) {myPathSelection.initializePath();}
executeDialog(agendaTemplate.xFrame);
- removeTerminateListener();
+ removeTerminateListener();
closeDocument();
- running = false;
+ running = false;
}
catch (Exception ex) {
removeTerminateListener();
ex.printStackTrace();
running=false;
- return;
- }
-
-
+ }
+
+
}
-
+
private class myPathSelectionListener implements XPathSelectionListener {
public void validatePath() {
if (myPathSelection.usedPathPicker) {
- filenameChanged = true;
+ filenameChanged = true;
}
myPathSelection.usedPathPicker = false;
}
}
-
- public void insertPathSelectionControl() {
+
+ public void insertPathSelectionControl() {
myPathSelection = new PathSelection(xMSF, this, PathSelection.TransferMode.SAVE, PathSelection.DialogTypes.FILE);
myPathSelection.insert(6, 97, 70, 205, (short) 45, resources.reslblTemplatePath_value, true, HelpIds.getHelpIdString( HID + 24 ), HelpIds.getHelpIdString( HID + 25 ));
myPathSelection.sDefaultDirectory = sUserTemplatePath;
@@ -208,28 +208,28 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
myPathSelection.sDefaultFilter = "writer8_template";
myPathSelection.addSelectionListener(new myPathSelectionListener());
}
-
+
private void initializePaths() {
try {
sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard");
- sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", "");
+ sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", PropertyNames.EMPTY_STRING);
sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap");
} catch (NoValidPathException e) {
e.printStackTrace();
}
}
-
+
private void checkSavePath() {
- if (agenda.cp_TemplatePath == null ||
- agenda.cp_TemplatePath.equals("") ||
+ if (agenda.cp_TemplatePath == null ||
+ agenda.cp_TemplatePath.equals(PropertyNames.EMPTY_STRING) ||
!getFileAccess().exists(FileAccess.getParentDir(agenda.cp_TemplatePath),false) ||
!getFileAccess().isDirectory(FileAccess.getParentDir(agenda.cp_TemplatePath )))
{
- try {
- agenda.cp_TemplatePath =
+ try {
+ agenda.cp_TemplatePath =
FileAccess.connectURLs(
- FileAccess.getOfficePath(xMSF, "Work", "", "") ,
- resources.resDefaultFilename
+ FileAccess.getOfficePath(xMSF, "Work", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING) ,
+ resources.resDefaultFilename
);
}
catch (Exception ex) {
@@ -237,30 +237,30 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
}
}
}
-
+
/**
* bind controls to the agenda member (DataAware model)
*/
private void makeDA() {
-
- setControlProperty("listPageDesign", "StringItemList", agendaTemplates[0]);
-
+
+ setControlProperty("listPageDesign", PropertyNames.STRING_ITEM_LIST, agendaTemplates[0]);
+
checkSavePath();
//setFilename(agenda.cp_TemplatePath);
-
+
UnoDataAware.attachListBox( agenda, "cp_AgendaType", listPageDesign , null, true ).updateUI();
UnoDataAware.attachCheckBox( agenda, "cp_IncludeMinutes", chkMinutes, null, true).updateUI();
-
+
UnoDataAware.attachEditControl(agenda, "cp_Title", txtTitle, agendaTemplate , true).updateUI();
UnoDataAware.attachDateControl(agenda, "cp_Date", txtDate, agendaTemplate , true).updateUI();
UnoDataAware.attachTimeControl(agenda, "cp_Time", txtTime, agendaTemplate , true).updateUI();
UnoDataAware.attachEditControl(agenda, "cp_Location", cbLocation, agendaTemplate , true).updateUI();
-
+
UnoDataAware.attachCheckBox(agenda,"cp_ShowMeetingType", chkMeetingTitle , new RedrawListener( TemplateConsts.FILLIN_MEETING_TYPE ) , true);
UnoDataAware.attachCheckBox(agenda,"cp_ShowRead", chkRead , new RedrawListener( TemplateConsts.FILLIN_READ ) , true).updateUI();
UnoDataAware.attachCheckBox(agenda,"cp_ShowBring", chkBring , new RedrawListener( TemplateConsts.FILLIN_BRING ) , true).updateUI();
UnoDataAware.attachCheckBox(agenda,"cp_ShowNotes", chkNotes , new RedrawListener( TemplateConsts.FILLIN_NOTES ) , true).updateUI();
-
+
UnoDataAware.attachCheckBox(agenda,"cp_ShowCalledBy", chkConvenedBy , new RedrawListener( TemplateConsts.FILLIN_CALLED_BY ) , true).updateUI();
UnoDataAware.attachCheckBox(agenda,"cp_ShowFacilitator", chkPresiding , new RedrawListener( TemplateConsts.FILLIN_FACILITATOR ) , true).updateUI();
UnoDataAware.attachCheckBox(agenda,"cp_ShowNotetaker", chkNoteTaker , new RedrawListener( TemplateConsts.FILLIN_NOTETAKER ) , true).updateUI();
@@ -268,11 +268,11 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
UnoDataAware.attachCheckBox(agenda,"cp_ShowAttendees", chkAttendees , new RedrawListener( TemplateConsts.FILLIN_PARTICIPANTS ) , true).updateUI();
UnoDataAware.attachCheckBox(agenda,"cp_ShowObservers", chkObservers , new RedrawListener( TemplateConsts.FILLIN_OBSERVERS ) , true).updateUI();
UnoDataAware.attachCheckBox(agenda,"cp_ShowResourcePersons", chkResourcePersons , new RedrawListener( TemplateConsts.FILLIN_RESOURCE_PERSONS ) , true).updateUI();
-
+
UnoDataAware.attachEditControl(agenda, "cp_TemplateName", txtTemplateName, null, true).updateUI();
- RadioDataAware.attachRadioButtons( agenda, "cp_ProceedMethod",
+ RadioDataAware.attachRadioButtons( agenda, "cp_ProceedMethod",
new Object[] {optCreateAgenda, optMakeChanges} ,null,true).updateUI();
-
+
listPageDesign.addItemListener(new XItemListener() {
public void itemStateChanged(ItemEvent ie) {
pageDesignChanged(ie);
@@ -289,37 +289,37 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
XMultiServiceFactory xLocMSF = Desktop.connect(ConnectStr);
AgendaWizardDialogImpl wizard = new AgendaWizardDialogImpl(xLocMSF);
wizard.startWizard();
-
+
}
catch (Exception exception) {
exception.printStackTrace();
}
}
-
+
/*
private void initializePaths() {
try {
-
+
sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user");
sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap");
} catch (NoValidPathException e) {
e.printStackTrace();
}
}*/
-
+
/**
* read the available agenda wizard templates.
*/
public boolean initializeTemplates() {
try {
String sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard");
-
+
//sCurrentNorm = Norms[getCurrentLetter().cp_Norm];
String sAgendaPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/wizard/agenda" );
-
+
agendaTemplates = FileAccess.getFolderTitles(xMSF, "aw" , sAgendaPath);
-
+
return true;
} catch (NoValidPathException nopathexception) {
nopathexception.printStackTrace();
@@ -329,35 +329,35 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
return false;
}
}
-
+
/* ******************************
* Event methods
* ******************************
*/
-
+
/**
* first page, page design listbox changed.
*/
public void pageDesignChanged(ItemEvent ie) {
int selected = ie.Selected;
- try {
- agendaTemplate.load( agendaTemplates[1][selected] , topicsControl.getTopicsData());
+ try {
+ agendaTemplate.load( agendaTemplates[1][selected] , topicsControl.getTopicsData());
}
catch (Exception ex) {
SystemDialog.showMessageBox(xMSF, "ErrBox", VclWindowPeerAttribute.OK, resources.resErrOpenTemplate);
ex.printStackTrace();
}
}
-
+
/**
* last page, template title changed...
*/
public void templateTitleChanged() {
String title = (String)Helper.getUnoPropertyValue( getModel(txtTemplateName), "Text" );
- agendaTemplate.setTemplateTitle( title );
+ agendaTemplate.setTemplateTitle( title );
}
-
-
+
+
private FileAccess fileAccess1;
/** convenience method.
* instead of creating a FileAccess object every time
@@ -374,31 +374,31 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
e.printStackTrace();
}
return fileAccess1;
-
+
}
/**
* indicates if the filename was changed by the user through
* the "save as" dialog.
* If it is so, one needs not warn the user
- * upon overwrite, since she was already warned.
+ * upon overwrite, since she was already warned.
*/
private boolean filenameChanged = false;
-
+
/**
* last page, "browse" ("...") button was clicked...
*/
public void saveAs() {
try {
-
+
checkSavePath();
-
+
SystemDialog saveAs = SystemDialog.createStoreDialog(xMSF);
saveAs.addFilterToDialog("ott","writer8_template",true);
// call the saveAs dialog.
String url = saveAs.callStoreDialog(
- FileAccess.getParentDir(agenda.cp_TemplatePath),
+ FileAccess.getParentDir(agenda.cp_TemplatePath),
FileAccess.getFilename(agenda.cp_TemplatePath));
-
+
if (url != null) {
agenda.cp_TemplatePath = url;
setFilename(url);
@@ -408,10 +408,10 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
catch (Exception ex) {
ex.printStackTrace();
}
-
-
+
+
}
-
+
/**
* is called when the user
* changes the path through the "save as" dialog.
@@ -420,42 +420,42 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
*/
private void setFilename(String url) {
try {
- String path = getFileAccess().getPath(url,"");
+ String path = getFileAccess().getPath(url,PropertyNames.EMPTY_STRING);
Helper.setUnoPropertyValue( getModel(myPathSelection.xSaveTextBox), "Text", path);
}
catch (Exception ex) {
ex.printStackTrace();
}
-
+
}
-
+
public void insertRow() {
topicsControl.insertRow();
}
-
+
public void removeRow() {
topicsControl.removeRow();
}
-
+
public void rowUp() {
topicsControl.rowUp();
}
-
+
public void rowDown() {
topicsControl.rowDown();
}
-
-
+
+
/* ************************
* Navigation bar methods
* ************************
*/
-
+
public void cancelWizard() {
xDialog.endExecute();
running = false;
}
-
+
public boolean finishWizard() {
boolean bSaveSuccess = false; // pesimistic :(
XTextDocument xTextDocument;
@@ -463,33 +463,33 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
try {
FileAccess fileAccess = new FileAccess(xMSF);
sPath = myPathSelection.getSelectedPath();
- if (sPath.equals("")) {
+ if (sPath.equals(PropertyNames.EMPTY_STRING)) {
myPathSelection.triggerPathPicker();
sPath = myPathSelection.getSelectedPath();
}
sPath = fileAccess.getURL(sPath);
-
+
//first, if the filename was not changed, thus
//it is coming from a saved session, check if the
// file exists and warn the user.
if (!filenameChanged)
if (fileAccess.exists(sPath, true)) {
-
+
int answer = SystemDialog.showMessageBox(xMSF, xControl.getPeer(), "MessBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, resources.resFileExists);
if (answer == 3) // user said: no, do not overwrite....
return false;
}
agendaTemplate.xTextDocument.lockControllers();
-
- xTextDocument = (XTextDocument)UnoRuntime.queryInterface(XTextDocument.class,agendaTemplate.document);
-
+
+ xTextDocument = UnoRuntime.queryInterface(XTextDocument.class,agendaTemplate.document);
+
bSaveSuccess = OfficeDocument.store(xMSF, xTextDocument, sPath , "writer8_template", false );
} catch (Exception e) {
SystemDialog.showMessageBox(xMSF, xControl.getPeer(), "ErrBox", VclWindowPeerAttribute.OK, resources.resErrSaveTemplate);
//e.printStackTrace();
}
-
+
if (bSaveSuccess) {
try {
topicsControl.saveTopics(agenda);
@@ -500,23 +500,23 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
catch (Exception ex) {
ex.printStackTrace();
}
-
+
agendaTemplate.finish( topicsControl.getTopicsData());
- try {
- XStorable xStoreable = (XStorable) UnoRuntime.queryInterface(XStorable.class, agendaTemplate.document);
+ try {
+ XStorable xStoreable = UnoRuntime.queryInterface(XStorable.class, agendaTemplate.document);
xStoreable.store();
}
catch (Exception ex) {
SystemDialog.showMessageBox(xMSF, "ErrBox", VclWindowPeerAttribute.OK, resources.resErrSaveTemplate);
ex.printStackTrace();
}
-
+
//xWindow.setVisible(false);
//running = false;
agendaTemplate.xTextDocument.unlockControllers();
//closeDocument();
//removeTerminateListener();
-
+
PropertyValue loadValues[] = new PropertyValue[2];
loadValues[0] = new PropertyValue();
loadValues[0].Name = "AsTemplate";
@@ -528,8 +528,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
loadValues[1] = new PropertyValue();
loadValues[1].Name = "InteractionHandler";
try {
- XInteractionHandler xIH = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler"));
- loadValues[1].Value = xIH;
+ loadValues[1].Value = UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler"));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -537,7 +536,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
//Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), agenda.cp_TemplatePath, "_default", new PropertyValue[0]);
Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), sPath, "_default", new PropertyValue[0]);
xTextDocument = (com.sun.star.text.XTextDocument) oDoc;
- XMultiServiceFactory xDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
+ XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
ViewHandler myViewHandler = new ViewHandler(xDocMSF, xTextDocument);
try {
myViewHandler.setViewSetting("ZoomType", new Short(com.sun.star.view.DocumentZoomType.OPTIMAL));
@@ -553,31 +552,31 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
running = false;
return true;
}
-
+
private void closeDocument() {
try {
- //xComponent.dispose();
- XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, agendaTemplate.xFrame);
+ //xComponent.dispose();
+ XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, agendaTemplate.xFrame);
xCloseable.close(false);
} catch (CloseVetoException e) {
e.printStackTrace();
}
}
-
+
/* ********************
* Sub Classes
- * ********************
+ * ********************
*/
-
+
/**
* this class is used to redraw an item's table when
* the user clicks one of the checkboxes in step 3 or 4.
*/
private class RedrawListener implements DataAware.Listener {
-
+
private String itemName;
-
+
public RedrawListener(String itemName_) {
itemName = itemName_;
}
@@ -591,7 +590,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
agendaTemplate.xTextDocument.unlockControllers();
}
}
-
-
+
+
}
-
+
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.java b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.java
index 21730c9aa040..ff6b38b50ce8 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.java
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -25,19 +25,19 @@
*
************************************************************************/
-package com.sun.star.wizards.agenda;
-
+package com.sun.star.wizards.agenda;
+
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.wizards.common.Resource;
public class AgendaWizardDialogResources extends Resource {
-
+
final static String UNIT_NAME = "dbwizres";
final static String MODULE_NAME = "dbw";
final static int RID_AGENDAWIZARDDIALOG_START = 5000;
final static int RID_COMMON_START = 500;
-
-
+
+
String resAgendaWizardDialog_title;
String resoptMakeChanges_value;
String reslblTemplateName_value;
@@ -74,31 +74,31 @@ public class AgendaWizardDialogResources extends Resource {
String reschkBring_value;
String reschkNotes_value;
String reslblHelp3_value;
-
+
String reslblDate_value;
String reslblHelpPg6_value;
String reslblPageDesign_value;
-
+
String resDefaultFilename;
String resDefaultTitle;
-
+
String resErrSaveTemplate;
-
+
String resPlaceHolderTitle;
String resPlaceHolderDate;
String resPlaceHolderTime;
String resPlaceHolderLocation;
String resPlaceHolderHint;
-
+
String resStep1;
String resStep2;
String resStep3;
String resStep4;
String resStep5;
String resStep6;
-
+
String resErrOpenTemplate;
-
+
String itemMeetingType;
String itemRead;
String itemBring;
@@ -110,25 +110,25 @@ public class AgendaWizardDialogResources extends Resource {
String itemAttendees;
String itemObservers;
String itemResource;
-
+
String resButtonInsert;
String resButtonRemove;
String resButtonUp;
String resButtonDown;
-
-
-
-
- // *** common resources ***
-
+
+
+
+
+ // *** common resources ***
+
String resFileExists;
-
+
public AgendaWizardDialogResources(XMultiServiceFactory xmsf) {
super(xmsf,UNIT_NAME,MODULE_NAME);
-
+
/**
- * Delete the String, uncomment the getResText method
- *
+ * Delete the String, uncomment the getResText method
+ *
*/
resAgendaWizardDialog_title = getResText(RID_AGENDAWIZARDDIALOG_START + 1);
resoptMakeChanges_value = getResText(RID_AGENDAWIZARDDIALOG_START + 2);
@@ -172,27 +172,27 @@ public AgendaWizardDialogResources(XMultiServiceFactory xmsf) {
resDefaultFilename = getResText(RID_AGENDAWIZARDDIALOG_START + 41);
resDefaultFilename = resDefaultFilename.substring(0,resDefaultFilename.length()-4) + ".ott";
-
+
resDefaultTitle = getResText(RID_AGENDAWIZARDDIALOG_START + 42);
-
+
resErrSaveTemplate = getResText(RID_AGENDAWIZARDDIALOG_START + 43);
-
+
resPlaceHolderTitle = getResText(RID_AGENDAWIZARDDIALOG_START + 44);
resPlaceHolderDate = getResText(RID_AGENDAWIZARDDIALOG_START + 45);
resPlaceHolderTime = getResText(RID_AGENDAWIZARDDIALOG_START + 46);
resPlaceHolderLocation = getResText(RID_AGENDAWIZARDDIALOG_START + 47);
resPlaceHolderHint = getResText(RID_AGENDAWIZARDDIALOG_START + 48);
-
-
+
+
resStep1 = getResText(RID_AGENDAWIZARDDIALOG_START + 50);
resStep2 = getResText(RID_AGENDAWIZARDDIALOG_START + 51);
resStep3 = getResText(RID_AGENDAWIZARDDIALOG_START + 52);
resStep4 = getResText(RID_AGENDAWIZARDDIALOG_START + 53);
resStep5 = getResText(RID_AGENDAWIZARDDIALOG_START + 54);
resStep6 = getResText(RID_AGENDAWIZARDDIALOG_START + 55);
-
+
resErrOpenTemplate = getResText(RID_AGENDAWIZARDDIALOG_START + 56);
-
+
itemMeetingType = getResText(RID_AGENDAWIZARDDIALOG_START + 57);
itemBring = getResText(RID_AGENDAWIZARDDIALOG_START + 58);
itemRead = getResText(RID_AGENDAWIZARDDIALOG_START + 59);
@@ -205,17 +205,17 @@ public AgendaWizardDialogResources(XMultiServiceFactory xmsf) {
itemTimekeeper = getResText(RID_AGENDAWIZARDDIALOG_START + 65);
itemObservers = getResText(RID_AGENDAWIZARDDIALOG_START + 66);
itemResource = getResText(RID_AGENDAWIZARDDIALOG_START + 67);
-
+
resButtonInsert = getResText(RID_AGENDAWIZARDDIALOG_START + 68);
resButtonRemove = getResText(RID_AGENDAWIZARDDIALOG_START + 69);
resButtonUp = getResText(RID_AGENDAWIZARDDIALOG_START + 70);
resButtonDown = getResText(RID_AGENDAWIZARDDIALOG_START + 71);
-
+
/*
* Common resources
*/
-
+
resFileExists = getResText(RID_COMMON_START + 19);
-
+
}
}
diff --git a/wizards/com/sun/star/wizards/agenda/CGAgenda.java b/wizards/com/sun/star/wizards/agenda/CGAgenda.java
index b7dc1cc37c00..08897fb45ab7 100644
--- a/wizards/com/sun/star/wizards/agenda/CGAgenda.java
+++ b/wizards/com/sun/star/wizards/agenda/CGAgenda.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,6 +28,7 @@ package com.sun.star.wizards.agenda;
import com.sun.star.wizards.common.ConfigGroup;
import com.sun.star.wizards.common.ConfigSet;
+import com.sun.star.wizards.common.PropertyNames;
/**
* CGAgenda means Configuration Group Agenda.
@@ -43,13 +44,13 @@ public class CGAgenda extends ConfigGroup
/** step 1 - include minutes*/
public boolean cp_IncludeMinutes;
/** step 2 - title */
- public String cp_Title = "";
+ public String cp_Title = PropertyNames.EMPTY_STRING;
/** step 2 - date */
public String cp_Date;
/** step 2 - time */
public String cp_Time;
/** step 2 - location */
- public String cp_Location = "";
+ public String cp_Location = PropertyNames.EMPTY_STRING;
/** step 3 - show meeting type */
public boolean cp_ShowMeetingType;
/** step 3 - show read */
diff --git a/wizards/com/sun/star/wizards/agenda/CGTopic.java b/wizards/com/sun/star/wizards/agenda/CGTopic.java
index 74b818205b9f..e35e82672202 100644
--- a/wizards/com/sun/star/wizards/agenda/CGTopic.java
+++ b/wizards/com/sun/star/wizards/agenda/CGTopic.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,16 +30,17 @@ package com.sun.star.wizards.agenda;
import com.sun.star.beans.PropertyValue;
import com.sun.star.wizards.common.ConfigGroup;
import com.sun.star.wizards.common.Indexable;
+import com.sun.star.wizards.common.PropertyNames;
/**
* CGTopic means: Configuration Group Topic.
* This object encapsulates a configuration group with topic information.
* Since the topics gui conftrol uses its own data model, there is
- * also code here to convert from the data model to CGTopic object (the constructor)
+ * also code here to convert from the data model to CGTopic object (the constructor)
* and vice versa (setDataToRow method - used when loading the last session...)
*/
public class CGTopic extends ConfigGroup implements Indexable {
-
+
/** sort order */
public int cp_Index;
/** topic name */
@@ -48,9 +49,9 @@ public class CGTopic extends ConfigGroup implements Indexable {
public String cp_Responsible;
/** time */
public String cp_Time;
-
+
public CGTopic() {}
-
+
/**
* create a new CGTopic object with data from the given row.
* the row object is a PropertyValue array, as used
@@ -65,23 +66,23 @@ public class CGTopic extends ConfigGroup implements Indexable {
cp_Responsible = (String)pv[2].Value;
cp_Time = (String)pv[3].Value;
}
-
+
/**
* copies the data in this CGTopic object
* to the given row.
- * @param row the row object (PropertyValue array) to
+ * @param row the row object (PropertyValue array) to
* copy the data to.
*/
public void setDataToRow(Object row) {
PropertyValue[] pv = (PropertyValue[])row;
- pv[0].Value = "" + cp_Index + ".";
+ pv[0].Value = PropertyNames.EMPTY_STRING + cp_Index + ".";
pv[1].Value = cp_Topic;
pv[2].Value = cp_Responsible;
pv[3].Value = cp_Time;
}
-
+
public int getIndex() {
return cp_Index;
}
-
+
}
diff --git a/wizards/com/sun/star/wizards/agenda/CallWizard.java b/wizards/com/sun/star/wizards/agenda/CallWizard.java
index 3dc8dcd8ef91..4d6d1134b255 100644
--- a/wizards/com/sun/star/wizards/agenda/CallWizard.java
+++ b/wizards/com/sun/star/wizards/agenda/CallWizard.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,6 +37,7 @@ import com.sun.star.registry.XRegistryKey;
import com.sun.star.task.XJob;
import com.sun.star.task.XJobExecutor;
import com.sun.star.uno.Type;
+import com.sun.star.wizards.common.PropertyNames;
/**
* This class capsulates the class, that implements the minimal component, a factory for
@@ -50,7 +51,7 @@ public class CallWizard {
/**
* Gives a factory for creating the service. This method is called by the
* <code>JavaLoader</code>
- *
+ *
* <p></p>
*
* @param stringImplementationName The implementation name of the component.
@@ -96,11 +97,11 @@ public class CallWizard {
* Execute Wizard
*
* @param str only valid parameter is 'start' at the moment.
- */
-
+ */
+
public void trigger(String str) {
try {
- if (str.equalsIgnoreCase("start")) {
+ if (str.equalsIgnoreCase(PropertyNames.START)) {
AgendaWizardDialogImpl aw = new AgendaWizardDialogImpl(xmultiservicefactory);
if (!AgendaWizardDialogImpl.running) {
aw.startWizard();
@@ -135,7 +136,7 @@ public class CallWizard {
* will be passed to the caller.
*/
public void initialize(Object[] object) throws com.sun.star.uno.Exception {
-
+
}
/**
@@ -184,7 +185,7 @@ public class CallWizard {
};
try {
- byteReturn = ("" + this.hashCode()).getBytes();
+ byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes();
} catch (Exception exception) {
System.err.println(exception);
}
diff --git a/wizards/com/sun/star/wizards/agenda/TemplateConsts.java b/wizards/com/sun/star/wizards/agenda/TemplateConsts.java
index 44ce6a1e0f0e..5a6f3b59f821 100644
--- a/wizards/com/sun/star/wizards/agenda/TemplateConsts.java
+++ b/wizards/com/sun/star/wizards/agenda/TemplateConsts.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,7 +48,7 @@ public interface TemplateConsts
*/
public final static String SECTION_TOPICS = "AGENDA_TOPICS";
/**
- * the name of the parent minutes section.
+ * the name of the parent minutes section.
*/
public final static String SECTION_MINUTES_ALL = "MINUTES_ALL";
/**
@@ -58,9 +58,9 @@ public interface TemplateConsts
public final static String SECTION_MINUTES = "MINUTES"; //public final static String AGENDA_ITEM = "AGENDA_ITEM";
/**
* taged headings and names.
- * These will be searched in item tables (in the template) and will be
+ * These will be searched in item tables (in the template) and will be
* replaced with resource strings.
- *
+ *
* headings...
*/
public final static String FILLIN_MEETING_TYPE = "<meeting-type>";
@@ -80,7 +80,7 @@ public interface TemplateConsts
/**
* Styles (paragraph styles) used for agenda items.
* headings styles
- *
+ *
*/
public final static String STYLE_MEETING_TYPE = "MeetingType";
public final static String STYLE_BRING = "Bring";
@@ -97,9 +97,9 @@ public interface TemplateConsts
public final static String STYLE_OBSERVERS = "Observers";
public final static String STYLE_RESOURCE_PERSONS = "ResourcePersons";
/**
- * Styles (paragraph styles) used for the <b>text</b> of agenda items
+ * Styles (paragraph styles) used for the <b>text</b> of agenda items
* The agenda wizard creates fill-in fields with the given styles...)
- *
+ *
* headings fields styles
*/
public final static String STYLE_MEETING_TYPE_TEXT = "MeetingTypeText";
diff --git a/wizards/com/sun/star/wizards/agenda/TopicsControl.java b/wizards/com/sun/star/wizards/agenda/TopicsControl.java
index 0e3678139378..9fa136396804 100644
--- a/wizards/com/sun/star/wizards/agenda/TopicsControl.java
+++ b/wizards/com/sun/star/wizards/agenda/TopicsControl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,13 +55,13 @@ import com.sun.star.wizards.ui.event.MethodInvocation;
* @author rpiterman
* This class implements the UI functionality of the topics scroller control.
* <br/>
- * During developement, there has been a few changes which were not *fully* done -
+ * During developement, there has been a few changes which were not *fully* done -
* mainly in converting the topics and time boxes from combobox and time box to normal textboxes,
- * so in the code they might be referenced as combobox or timebox. This should be
+ * so in the code they might be referenced as combobox or timebox. This should be
* rather understood as topicstextbox and timetextbox.
* <br/>
* <br/>
- * Important behaiviour of this control is that there is always a
+ * Important behaiviour of this control is that there is always a
* blank row at the end, in which the user can enter data.<br/>
* Once the row is not blank (thus, the user entered data...),
* a new blank row is added.<br/>
@@ -71,7 +71,7 @@ import com.sun.star.wizards.ui.event.MethodInvocation;
* The contorl shows 5 rows at a time.<br/>
* If, for example, only 2 rows exist (from which the 2ed one is empty...)
* then the other three rows, which do not exist in the data model, are disabled.
- * <br/>
+ * <br/>
* The following other functionality is implemented:
* <br/>
* 0. synchroniting data between controls, data model and live preview.
@@ -80,7 +80,7 @@ import com.sun.star.wizards.ui.event.MethodInvocation;
* 3. Removing rows and adding new rows.<br/>
* 4. Moving rows up and down. <br/>
* <br/>
- * This control relays on the ControlScroller control which uses the following
+ * This control relays on the ControlScroller control which uses the following
* Data model:<br/>
* 1. It uses a vector, whos members are arrays of PropertyValue.<br/>
* 2. Each array represents a row.<br/>
@@ -88,10 +88,10 @@ import com.sun.star.wizards.ui.event.MethodInvocation;
* 3. Each property Value represents a value for a single control with the following rules:<br/>
* 3. a. the Value of the property is used for as value of the controls (usually text).<br/>
* 3. b. the Name of the property is used to map values to UI controls in the following manner:<br/>
- * 3. b. 1. only the Name of the first X Rows is regarded, where X is the number of visible rows
+ * 3. b. 1. only the Name of the first X Rows is regarded, where X is the number of visible rows
* (in the agenda wizard this would be 5, since 5 topic rows are visible on the dialog).<br/>
- * 3. b. 2. The Names of the first X (or 5...) rows are the names of the UI Controls to
- * hold values. When the control scroller scrolls, it looks at the first 5 rows and uses
+ * 3. b. 2. The Names of the first X (or 5...) rows are the names of the UI Controls to
+ * hold values. When the control scroller scrolls, it looks at the first 5 rows and uses
* the names specified there to map the current values to the specified controls.
* <br/>
* This data model makes the following limitations on the implementation:
@@ -103,26 +103,26 @@ import com.sun.star.wizards.ui.event.MethodInvocation;
* <br/>
* To save the topics in the registry a ConfigSet of objects of type CGTopic is
* being used.
- * This one is not synchronized "live", since it is unnecessary... instead, it is
+ * This one is not synchronized "live", since it is unnecessary... instead, it is
* synchronized on call, before the settings should be saved.
*/
public class TopicsControl extends ControlScroller implements XFocusListener
{
/**
- * The name prefix of the number (label) controls
+ * The name prefix of the number (label) controls
*/
public static final String LABEL = "lblTopicCnt_";
/**
- * The name prefix of the topic (text) controls
+ * The name prefix of the topic (text) controls
*/
public static final String TOPIC = "txtTopicTopic_";
/**
- * The name prefix of the responsible (text) controls
+ * The name prefix of the responsible (text) controls
*/
public static final String RESP = "cbTopicResp_";
/**
- * The name prefix of the time (text) controls
+ * The name prefix of the time (text) controls
*/
public static final String TIME = "txtTopicTime_";
Object lastFocusControl;
@@ -190,7 +190,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
*/
static void addKeyListener(Object control, XKeyListener listener)
{
- XWindow xlastControl = (XWindow) UnoRuntime.queryInterface(XWindow.class,
+ XWindow xlastControl = UnoRuntime.queryInterface(XWindow.class,
control);
xlastControl.addKeyListener(listener);
}
@@ -200,7 +200,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
*/
static void addFocusListener(Object control, XFocusListener listener)
{
- XWindow xlastControl = (XWindow) UnoRuntime.queryInterface(XWindow.class,
+ XWindow xlastControl = UnoRuntime.queryInterface(XWindow.class,
control);
xlastControl.addFocusListener(listener);
}
@@ -231,10 +231,10 @@ public class TopicsControl extends ControlScroller implements XFocusListener
insertRowAtEnd();
}
- /**
- * Insert a blank (empty) row
+ /**
+ * Insert a blank (empty) row
* as last row of the control.
- * The control has always a blank row at the
+ * The control has always a blank row at the
* end, which enables the user to enter data...
*/
protected void insertRowAtEnd()
@@ -269,7 +269,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
/**
* overrides the parent class method to also enable the
* row whenever data is written to it.
- * @param guiRow
+ * @param guiRow
*/
protected void fillupControls(int guiRow)
{
@@ -304,19 +304,19 @@ public class TopicsControl extends ControlScroller implements XFocusListener
}
/**
- * in order to use the "move up", "down" "insert" and "remove" buttons,
+ * in order to use the "move up", "downPropertyNames.SPACEinsert" and "remove" buttons,
* we track the last control the gained focus, in order to know which
* row should be handled.
- * @param fe
+ * @param fe
*/
public void focusGained(FocusEvent fe)
{
- XControl xc = (XControl) UnoRuntime.queryInterface(XControl.class, fe.Source);
+ XControl xc = UnoRuntime.queryInterface(XControl.class, fe.Source);
focusGained(xc);
}
/**
- * Sometimes I set the focus programatically to a control
+ * Sometimes I set the focus programatically to a control
* (for example when moving a row up or down, the focus should move
* with it).
* In such cases, no VCL event is being triggered so it must
@@ -357,7 +357,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
/**
* compolsary implementation of FocusListener.
- * @param fe
+ * @param fe
*/
public void focusLost(FocusEvent fe)
{
@@ -365,7 +365,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
/**
* compolsary implementation of FocusListener.
- * @param o
+ * @param o
*/
public void disposing(EventObject o)
{
@@ -389,7 +389,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
rowUp(lastFocusRow - nscrollvalue, lastFocusControl);
}
- /**
+ /**
* move the current row down.
*/
public void rowDown()
@@ -463,9 +463,9 @@ public class TopicsControl extends ControlScroller implements XFocusListener
// after rotating all the properties from this row on,
// we clear the row, so it is practically a new one...
PropertyValue[] pv1 = (PropertyValue[]) scrollfields.get(lastFocusRow);
- pv1[1].Value = "";
- pv1[2].Value = "";
- pv1[3].Value = "";
+ pv1[1].Value = PropertyNames.EMPTY_STRING;
+ pv1[2].Value = PropertyNames.EMPTY_STRING;
+ pv1[3].Value = PropertyNames.EMPTY_STRING;
// update the preview document.
updateDocumentRow(lastFocusRow);
@@ -481,16 +481,16 @@ public class TopicsControl extends ControlScroller implements XFocusListener
* The index is important because it is used in the
* Name member of the PropertyValue objects.
* To know why see general class documentation above (data model explanation).
- * @param i the index of the new row
+ * @param i the index of the new row
* @return
*/
private PropertyValue[] newRow(int i)
{
PropertyValue[] pv = new PropertyValue[4];
- pv[0] = Properties.createProperty(LABEL + i, "" + (i + 1) + ".");
- pv[1] = Properties.createProperty(TOPIC + i, "");
- pv[2] = Properties.createProperty(RESP + i, "");
- pv[3] = Properties.createProperty(TIME + i, "");
+ pv[0] = Properties.createProperty(LABEL + i, PropertyNames.EMPTY_STRING + (i + 1) + ".");
+ pv[1] = Properties.createProperty(TOPIC + i, PropertyNames.EMPTY_STRING);
+ pv[2] = Properties.createProperty(RESP + i, PropertyNames.EMPTY_STRING);
+ pv[3] = Properties.createProperty(TIME + i, PropertyNames.EMPTY_STRING);
return pv;
}
@@ -498,8 +498,8 @@ public class TopicsControl extends ControlScroller implements XFocusListener
* Implementation of ControlScroller
* This is a UI method which inserts a new row to the control.
* It uses the child-class ControlRow. (see below).
- * @param _index
- * @param npos
+ * @param _index
+ * @param npos
* @see ControlRow
*/
protected void insertControlGroup(int _index, int npos)
@@ -511,10 +511,10 @@ public class TopicsControl extends ControlScroller implements XFocusListener
/**
* Implementation of ControlScroller
- * This is a UI method which makes a row visibele.
+ * This is a UI method which makes a row visibele.
* As far as I know it is never called.
- * @param _index
- * @param _bIsVisible
+ * @param _index
+ * @param _bIsVisible
* @see ControlRow
*/
protected void setControlGroupVisible(int _index, boolean _bIsVisible)
@@ -536,9 +536,9 @@ public class TopicsControl extends ControlScroller implements XFocusListener
PropertyValue[] data = getTopicData(row);
// now - is this row empty?
- return data[1].Value.equals("") &&
- data[2].Value.equals("") &&
- data[3].Value.equals("");
+ return data[1].Value.equals(PropertyNames.EMPTY_STRING) &&
+ data[2].Value.equals(PropertyNames.EMPTY_STRING) &&
+ data[3].Value.equals(PropertyNames.EMPTY_STRING);
}
/**
@@ -547,7 +547,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
private Object[] oldData;
/**
- * update the preview document and
+ * update the preview document and
* remove/insert rows if needed.
* @param guiRow
* @param column
@@ -654,7 +654,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
}
/**
- * If the user presses tab on the last control, and
+ * If the user presses tab on the last control, and
* there *are* more rows in the model, scroll down.
* @param event
*/
@@ -675,7 +675,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
}
/**
- * If the user presses shift-tab on the first control, and
+ * If the user presses shift-tab on the first control, and
* there *are* more rows in the model, scroll up.
* @param event
*/
@@ -698,18 +698,18 @@ public class TopicsControl extends ControlScroller implements XFocusListener
*/
private void focus(Object textControl)
{
- ((XWindow) UnoRuntime.queryInterface(XWindow.class, textControl)).setFocus();
- XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, textControl);
+ UnoRuntime.queryInterface(XWindow.class, textControl).setFocus();
+ XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, textControl);
String text = xTextComponent.getText();
xTextComponent.setSelection(new Selection(0, text.length()));
- XControl xc = (XControl) UnoRuntime.queryInterface(XControl.class, textControl);
+ XControl xc = UnoRuntime.queryInterface(XControl.class, textControl);
focusGained(xc);
}
/**
* moves the given row one row down.
* @param guiRow the gui index of the row to move.
- * @param control the control to gain focus after moving.
+ * @param control the control to gain focus after moving.
*/
synchronized void rowDown(int guiRow, Object control)
{
@@ -853,9 +853,9 @@ public class TopicsControl extends ControlScroller implements XFocusListener
insertRowAtEnd();
/*
* if we did not change the last row but
- * we did change the one before - check if we
- * have two empty rows at the end.
- * If so, delete the last one...
+ * we did change the one before - check if we
+ * have two empty rows at the end.
+ * If so, delete the last one...
*/
}
else if ((row1 + nscrollvalue) + (row2 + nscrollvalue) == (scrollfields.size() * 2 - 5))
@@ -876,7 +876,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
*/
private Selection getSelection(Object control)
{
- return ((XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, control)).getSelection();
+ return UnoRuntime.queryInterface(XTextComponent.class, control).getSelection();
}
/**
@@ -897,8 +897,8 @@ public class TopicsControl extends ControlScroller implements XFocusListener
{
ControlRow cr = (ControlRow) ControlGroupVector.get(guiRow);
Object control = getControl(cr, eventSource);
- ((XWindow) UnoRuntime.queryInterface(XWindow.class, control)).setFocus();
- ((XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, control)).setSelection(s);
+ UnoRuntime.queryInterface(XWindow.class, control).setFocus();
+ UnoRuntime.queryInterface(XTextComponent.class, control).setSelection(s);
}
/**
@@ -1029,7 +1029,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
/**
* needed to make this data poblic.
- * @return the List containing the topics data.
+ * @return the List containing the topics data.
*/
public List getTopicsData()
{
@@ -1038,11 +1038,11 @@ public class TopicsControl extends ControlScroller implements XFocusListener
/**
* A static member used for the child-class ControlRow (GUI Constant)
*/
- private static Integer I_12 = new Integer(12);
+ private static Integer I_12 = 12;
/**
* A static member used for the child-class ControlRow (GUI Constant)
*/
- private static Integer I_8 = new Integer(8);
+ private static Integer I_8 = 8;
/**
* A static member used for the child-class ControlRow (GUI Constant)
*/
@@ -1059,7 +1059,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
};
/**
- *
+ *
* @author rp143992
* A class represting a single GUI row.
* Note that the instance methods of this class
@@ -1070,7 +1070,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
{
/**
- * the number (label) control
+ * the number (label) control
*/
Object label;
/**
@@ -1173,28 +1173,28 @@ public class TopicsControl extends ControlScroller implements XFocusListener
LABEL_PROPS,
new Object[]
{
- I_8, "" + (i + 1) + ".", new Integer(x + 4), new Integer(y + 2), IStep, new Short((short) tabindex), new Integer(10)
+ I_8, PropertyNames.EMPTY_STRING + (i + 1) + ".", new Integer(x + 4), new Integer(y + 2), IStep, new Short((short) tabindex), 10
});
textbox = dialog.insertTextField(TOPIC + i, "topicTextChanged", this,
TEXT_PROPS,
new Object[]
{
- I_12, HelpIds.getHelpIdString(curHelpIndex + i * 3 + 1), new Integer(x + 15), y_, IStep, new Short((short) (tabindex + 1)), new Integer(84)
+ I_12, HelpIds.getHelpIdString(curHelpIndex + i * 3 + 1), new Integer(x + 15), y_, IStep, new Short((short) (tabindex + 1)), 84
});
combobox = dialog.insertTextField(RESP + i, "responsibleTextChanged", this,
TEXT_PROPS,
new Object[]
{
- I_12, HelpIds.getHelpIdString(curHelpIndex + i * 3 + 2), new Integer(x + 103), y_, IStep, new Short((short) (tabindex + 2)), new Integer(68)
+ I_12, HelpIds.getHelpIdString(curHelpIndex + i * 3 + 2), new Integer(x + 103), y_, IStep, new Short((short) (tabindex + 2)), 68
});
timebox = dialog.insertTextField(TIME + i, "timeTextChanged", this,
TEXT_PROPS,
new Object[]
{
- I_12, HelpIds.getHelpIdString(curHelpIndex + i * 3 + 3), new Integer(x + 175), y_, IStep, new Short((short) (tabindex + 3)), new Integer(20)
+ I_12, HelpIds.getHelpIdString(curHelpIndex + i * 3 + 3), new Integer(x + 175), y_, IStep, new Short((short) (tabindex + 3)), 20
});
setEnabled(false);
@@ -1233,7 +1233,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
/**
* Impelementation of XKeyListener.
* Optionally performs the one of the following:
- * cursor up, or down, row up or down
+ * cursor up, or down, row up or down
*/
public void keyPressed(KeyEvent event)
{
@@ -1259,7 +1259,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
/**
* returns the column number of the given control.
* The given control must belong to this row or
- * an IllegalArgumentException will accure.
+ * an IllegalArgumentException will accure.
* @param control
* @return an int columnd number of the given control (0 to 3).
*/
diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.java b/wizards/com/sun/star/wizards/common/ConfigGroup.java
index 1b260132a5f4..56a4c0c632a2 100644
--- a/wizards/com/sun/star/wizards/common/ConfigGroup.java
+++ b/wizards/com/sun/star/wizards/common/ConfigGroup.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -80,8 +80,8 @@ public class ConfigGroup implements ConfigNode
/**
* convert the primitive type value of the
- * given Field object to the corresponding
- * Java Object value.
+ * given Field object to the corresponding
+ * Java Object value.
* @param field
* @return the value of the field as a Object.
* @throws IllegalAccessException
diff --git a/wizards/com/sun/star/wizards/common/ConfigNode.java b/wizards/com/sun/star/wizards/common/ConfigNode.java
index 23c0f9c5ba81..f6d9e2533c2b 100644
--- a/wizards/com/sun/star/wizards/common/ConfigNode.java
+++ b/wizards/com/sun/star/wizards/common/ConfigNode.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -27,8 +27,8 @@
package com.sun.star.wizards.common;
/**
- * This Interface specifies a method of an object which is
- * capable of reading adn writing its data out of the
+ * This Interface specifies a method of an object which is
+ * capable of reading adn writing its data out of the
* OO Configuration. <br/>
* There are 2 direct implementations: ConfigGroup and ConfigSet.
* The root is the first Java Object in the configuration hirarchie.
@@ -39,7 +39,7 @@ public interface ConfigNode
/**
* reads the object data out of the configuration.
- * @param configurationView is a ::com::sun::star::configuration::HierarchyElement
+ * @param configurationView is a ::com::sun::star::configuration::HierarchyElement
* which represents the node corresponding to the Object.
* @param param a free parameter. Since the intension of this interface is
* to be used in a tree like way, reading objects and subobjects and so on,
diff --git a/wizards/com/sun/star/wizards/common/ConfigSet.java b/wizards/com/sun/star/wizards/common/ConfigSet.java
index 216f91b5e430..84f589a7177a 100644
--- a/wizards/com/sun/star/wizards/common/ConfigSet.java
+++ b/wizards/com/sun/star/wizards/common/ConfigSet.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -90,11 +90,11 @@ public class ConfigSet implements ConfigNode, XMLProvider, ListModel
public void add(int i, Object o)
{
int name = i;
- while (getElement("" + name) != null)
+ while (getElement(PropertyNames.EMPTY_STRING + name) != null)
{
name++;
}
- childrenMap.put("" + name, o);
+ childrenMap.put(PropertyNames.EMPTY_STRING + name, o);
childrenList.add(i, o);
fireListDataListenerIntervalAdded(i, i);
@@ -399,7 +399,7 @@ public class ConfigSet implements ConfigNode, XMLProvider, ListModel
/**
* Set members might include a property
* which orders them.
- * This method reindexes the given member to be
+ * This method reindexes the given member to be
* the index number 0
* Do not forget to call commit() after calling this method.
* @param confView
diff --git a/wizards/com/sun/star/wizards/common/Configuration.java b/wizards/com/sun/star/wizards/common/Configuration.java
index 04dd385ddf60..fa8ba02fef20 100644
--- a/wizards/com/sun/star/wizards/common/Configuration.java
+++ b/wizards/com/sun/star/wizards/common/Configuration.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,8 +44,8 @@ import com.sun.star.util.XChangesBatch;
* For the get methods, two parameters must be given: name and parent, where name is the
* name of the property, parent is a HierarchyElement (::com::sun::star::configuration::HierarchyElement)<br/>
* The get and set methods support hieryrchical property names like "options/gridX". <br/>
- * NOTE: not yet supported, but sometime later,
- * If you will ommit the "parent" parameter, then the "name" parameter must be in hierarchy form from
+ * NOTE: not yet supported, but sometime later,
+ * If you will ommit the "parent" parameter, then the "name" parameter must be in hierarchy form from
* the root of the registry.
* @author rpiterman
*/
@@ -97,7 +97,7 @@ public abstract class Configuration
Object o = getNode(name, parent);
if (AnyConverter.isVoid(o))
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
return (String) o;
}
@@ -114,7 +114,7 @@ public abstract class Configuration
public static Object getNode(String name, Object parent) throws Exception
{
- return ((XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, parent)).getByName(name);
+ return UnoRuntime.queryInterface(XNameAccess.class, parent).getByName(name);
}
public static void set(int value, String name, Object parent) throws Exception
@@ -134,7 +134,7 @@ public abstract class Configuration
public static void set(boolean value, String name, Object parent) throws Exception
{
- if (value == true)
+ if (value)
{
set(Boolean.TRUE, name, parent);
}
@@ -146,7 +146,7 @@ public abstract class Configuration
public static void set(Object value, String name, Object parent) throws com.sun.star.lang.IllegalArgumentException, PropertyVetoException, UnknownPropertyException, WrappedTargetException
{
- ((XHierarchicalPropertySet) UnoRuntime.queryInterface(XHierarchicalPropertySet.class, parent)).setHierarchicalPropertyValue(name, value);
+ UnoRuntime.queryInterface(XHierarchicalPropertySet.class, parent).setHierarchicalPropertyValue(name, value);
}
/** Creates a new instance of RegistryEntry
@@ -157,7 +157,7 @@ public abstract class Configuration
*/
public static Object getConfigurationNode(String name, Object parent) throws Exception
{
- return ((XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, parent)).getByName(name);
+ return UnoRuntime.queryInterface(XNameAccess.class, parent).getByName(name);
}
public static Object getConfigurationRoot(XMultiServiceFactory xmsf, String sPath, boolean updateable) throws com.sun.star.uno.Exception
@@ -165,7 +165,7 @@ public abstract class Configuration
Object oConfigProvider;
oConfigProvider = xmsf.createInstance("com.sun.star.configuration.ConfigurationProvider");
- XMultiServiceFactory confMsf = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oConfigProvider);
+ XMultiServiceFactory confMsf = UnoRuntime.queryInterface(XMultiServiceFactory.class, oConfigProvider);
final String sView = updateable ? "com.sun.star.configuration.ConfigurationUpdateAccess" : "com.sun.star.configuration.ConfigurationAccess";
@@ -192,7 +192,7 @@ public abstract class Configuration
public static String[] getChildrenNames(Object configView)
{
- XNameAccess nameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, configView);
+ XNameAccess nameAccess = UnoRuntime.queryInterface(XNameAccess.class, configView);
return nameAccess.getElementNames();
}
@@ -201,8 +201,7 @@ public abstract class Configuration
try
{
Object oProdNameAccess = getConfigurationRoot(xMSF, "org.openoffice.Setup/Product", false);
- String ProductName = (String) Helper.getUnoObjectbyName(oProdNameAccess, "ooName");
- return ProductName;
+ return (String) Helper.getUnoObjectbyName(oProdNameAccess, "ooName");
}
catch (Exception exception)
{
@@ -213,7 +212,7 @@ public abstract class Configuration
public static String getOfficeLocaleString(XMultiServiceFactory xMSF)
{
- String sLocale = "";
+ String sLocale = PropertyNames.EMPTY_STRING;
try
{
Locale aLocLocale = new Locale();
@@ -247,8 +246,7 @@ public abstract class Configuration
try
{
Object oMasterKey = getConfigurationRoot(xMSF, "org.openoffice.Setup/L10N/", false);
- String sLinguistic = (String) Helper.getUnoObjectbyName(oMasterKey, "ooLocale");
- return sLinguistic;
+ return (String) Helper.getUnoObjectbyName(oMasterKey, "ooLocale");
}
catch (Exception exception)
{
@@ -273,11 +271,11 @@ public abstract class Configuration
public static Object addConfigNode(Object configView, String name) throws com.sun.star.lang.WrappedTargetException, ElementExistException, NoSuchElementException, com.sun.star.uno.Exception
{
- XNameContainer xNameContainer = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, configView);
+ XNameContainer xNameContainer = UnoRuntime.queryInterface(XNameContainer.class, configView);
if (xNameContainer == null)
{
- XNameReplace xNameReplace = (XNameReplace) UnoRuntime.queryInterface(XNameReplace.class, configView);
+ XNameReplace xNameReplace = UnoRuntime.queryInterface(XNameReplace.class, configView);
return xNameReplace.getByName(name);
}
else
@@ -287,7 +285,7 @@ public abstract class Configuration
xNameContainer.removeByName(name);*/
// create a new detached set element (instance of DataSourceDescription)
- XSingleServiceFactory xElementFactory = (XSingleServiceFactory) UnoRuntime.queryInterface(XSingleServiceFactory.class, configView);
+ XSingleServiceFactory xElementFactory = UnoRuntime.queryInterface(XSingleServiceFactory.class, configView);
// the new element is the result !
Object newNode = xElementFactory.createInstance();
@@ -300,7 +298,7 @@ public abstract class Configuration
public static void removeNode(Object configView, String name) throws NoSuchElementException, WrappedTargetException
{
- XNameContainer xNameContainer = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, configView);
+ XNameContainer xNameContainer = UnoRuntime.queryInterface(XNameContainer.class, configView);
if (xNameContainer.hasByName(name))
{
@@ -310,7 +308,7 @@ public abstract class Configuration
public static void commit(Object configView) throws WrappedTargetException
{
- XChangesBatch xUpdateControl = (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class, configView);
+ XChangesBatch xUpdateControl = UnoRuntime.queryInterface(XChangesBatch.class, configView);
xUpdateControl.commitChanges();
}
@@ -319,7 +317,7 @@ public abstract class Configuration
Object view = Configuration.getConfigurationRoot(xmsf, path, true);
addConfigNode(path, name);
node.writeConfiguration(view, param);
- XChangesBatch xUpdateControl = (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class, view);
+ XChangesBatch xUpdateControl = UnoRuntime.queryInterface(XChangesBatch.class, view);
xUpdateControl.commitChanges();
}
@@ -327,7 +325,7 @@ public abstract class Configuration
{
Object view = Configuration.getConfigurationRoot(xmsf, path, true);
removeNode(view, name);
- XChangesBatch xUpdateControl = (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class, view);
+ XChangesBatch xUpdateControl = UnoRuntime.queryInterface(XChangesBatch.class, view);
xUpdateControl.commitChanges();
}
@@ -371,8 +369,7 @@ public abstract class Configuration
{
String[] snames = _xNameAccess.getElementNames();
Object oNode = _xNameAccess.getByName(snames[_index]);
- XNameAccess xNameAccessNode = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oNode);
- return xNameAccessNode;
+ return UnoRuntime.queryInterface(XNameAccess.class, oNode);
}
catch (Exception e)
{
@@ -387,7 +384,7 @@ public abstract class Configuration
{
if (_xNameAccessNode.hasByName(_SubNodeName))
{
- return (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, _xNameAccessNode.getByName(_SubNodeName));
+ return UnoRuntime.queryInterface(XNameAccess.class, _xNameAccessNode.getByName(_SubNodeName));
}
}
catch (Exception e)
@@ -415,7 +412,7 @@ public abstract class Configuration
String curdisplayname = (String) Helper.getUnoPropertyValue(_xNameAccessNode.getByName(snames[i]), _nodename);
if (curdisplayname.equals(_displayname))
{
- return (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, _xNameAccessNode.getByName(snames[i]));
+ return UnoRuntime.queryInterface(XNameAccess.class, _xNameAccessNode.getByName(snames[i]));
}
}
}
@@ -444,7 +441,7 @@ public abstract class Configuration
if (curdisplayname.equals(_displayname))
{
- return (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, _xNameAccessNode.getByName(snames[i]));
+ return UnoRuntime.queryInterface(XNameAccess.class, _xNameAccessNode.getByName(snames[i]));
}
}
}
diff --git a/wizards/com/sun/star/wizards/common/DebugHelper.java b/wizards/com/sun/star/wizards/common/DebugHelper.java
index b560fb643a40..cb70ce050591 100644
--- a/wizards/com/sun/star/wizards/common/DebugHelper.java
+++ b/wizards/com/sun/star/wizards/common/DebugHelper.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/common/DebugHelper.py b/wizards/com/sun/star/wizards/common/DebugHelper.py
index 92c3503bce86..75016033a533 100644
--- a/wizards/com/sun/star/wizards/common/DebugHelper.py
+++ b/wizards/com/sun/star/wizards/common/DebugHelper.py
@@ -7,3 +7,4 @@ class DebugHelper(object):
@classmethod
def writeInfo(self, msg):
raise NotImplementedError
+
diff --git a/wizards/com/sun/star/wizards/common/Desktop.java b/wizards/com/sun/star/wizards/common/Desktop.java
index 8902696c37b4..6e3d95cbe5ea 100644
--- a/wizards/com/sun/star/wizards/common/Desktop.java
+++ b/wizards/com/sun/star/wizards/common/Desktop.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -76,7 +76,7 @@ public class Desktop
try
{
xInterface = (com.sun.star.uno.XInterface) xMSF.createInstance("com.sun.star.frame.Desktop");
- xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, xInterface);
+ xDesktop = UnoRuntime.queryInterface(XDesktop.class, xInterface);
}
catch (Exception exception)
{
@@ -93,27 +93,26 @@ public class Desktop
public static XFrame getActiveFrame(XMultiServiceFactory xMSF)
{
XDesktop xDesktop = getDesktop(xMSF);
- XFramesSupplier xFrameSuppl = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, xDesktop);
- XFrame xFrame = xFrameSuppl.getActiveFrame();
- return xFrame;
+ XFramesSupplier xFrameSuppl = UnoRuntime.queryInterface(XFramesSupplier.class, xDesktop);
+ return xFrameSuppl.getActiveFrame();
}
public static XComponent getActiveComponent(XMultiServiceFactory _xMSF)
{
XFrame xFrame = getActiveFrame(_xMSF);
- return (XComponent) UnoRuntime.queryInterface(XComponent.class, xFrame.getController().getModel());
+ return UnoRuntime.queryInterface(XComponent.class, xFrame.getController().getModel());
}
public static XTextDocument getActiveTextDocument(XMultiServiceFactory _xMSF)
{
XComponent xComponent = getActiveComponent(_xMSF);
- return (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xComponent);
+ return UnoRuntime.queryInterface(XTextDocument.class, xComponent);
}
public static XSpreadsheetDocument getActiveSpreadsheetDocument(XMultiServiceFactory _xMSF)
{
XComponent xComponent = getActiveComponent(_xMSF);
- return (XSpreadsheetDocument) UnoRuntime.queryInterface(XSpreadsheetDocument.class, xComponent);
+ return UnoRuntime.queryInterface(XSpreadsheetDocument.class, xComponent);
}
public static XDispatch getDispatcher(XMultiServiceFactory xMSF, XFrame xFrame, String _stargetframe, com.sun.star.util.URL oURL)
@@ -122,9 +121,8 @@ public class Desktop
{
com.sun.star.util.URL[] oURLArray = new com.sun.star.util.URL[1];
oURLArray[0] = oURL;
- XDispatchProvider xDispatchProvider = (XDispatchProvider) UnoRuntime.queryInterface(XDispatchProvider.class, xFrame);
- XDispatch xDispatch = xDispatchProvider.queryDispatch(oURLArray[0], _stargetframe, FrameSearchFlag.ALL); // "_self"
- return xDispatch;
+ XDispatchProvider xDispatchProvider = UnoRuntime.queryInterface(XDispatchProvider.class, xFrame);
+ return xDispatchProvider.queryDispatch(oURLArray[0], _stargetframe, FrameSearchFlag.ALL); // "_self"
}
catch (Exception e)
{
@@ -138,7 +136,7 @@ public class Desktop
try
{
Object oTransformer = xMSF.createInstance("com.sun.star.util.URLTransformer");
- XURLTransformer xTransformer = (XURLTransformer) UnoRuntime.queryInterface(XURLTransformer.class, oTransformer);
+ XURLTransformer xTransformer = UnoRuntime.queryInterface(XURLTransformer.class, oTransformer);
com.sun.star.util.URL[] oURL = new com.sun.star.util.URL[1];
oURL[0] = new com.sun.star.util.URL();
oURL[0].Complete = _sURL;
@@ -161,7 +159,7 @@ public class Desktop
public static void dispatchURL(XMultiServiceFactory xMSF, String sURL, XFrame xFrame)
{
- dispatchURL(xMSF, sURL, xFrame, "");
+ dispatchURL(xMSF, sURL, xFrame, PropertyNames.EMPTY_STRING);
}
public static void dispatchURL(XDispatch _xDispatch, com.sun.star.util.URL oURL)
@@ -182,20 +180,19 @@ public class Desktop
XMultiComponentFactory componentFactory = getMultiComponentFactory();
Object xUrlResolver = componentFactory.createInstanceWithContext( "com.sun.star.bridge.UnoUrlResolver", null );
XUnoUrlResolver urlResolver = UnoRuntime.queryInterface(XUnoUrlResolver.class, xUrlResolver);
- XMultiServiceFactory orb = UnoRuntime.queryInterface(XMultiServiceFactory.class, urlResolver.resolve( connectStr ) );
- return orb;
+ return UnoRuntime.queryInterface(XMultiServiceFactory.class, urlResolver.resolve( connectStr ) );
}
public static String getIncrementSuffix(XNameAccess xElementContainer, String ElementName)
{
boolean bElementexists = true;
int i = 1;
- String sIncSuffix = "";
+ String sIncSuffix = PropertyNames.EMPTY_STRING;
String BaseName = ElementName;
- while (bElementexists == true)
+ while (bElementexists)
{
bElementexists = xElementContainer.hasByName(ElementName);
- if (bElementexists == true)
+ if (bElementexists)
{
i += 1;
ElementName = BaseName + Integer.toString(i);
@@ -212,12 +209,12 @@ public class Desktop
{
boolean bElementexists = true;
int i = 1;
- String sIncSuffix = "";
+ String sIncSuffix = PropertyNames.EMPTY_STRING;
String BaseName = ElementName;
- while (bElementexists == true)
+ while (bElementexists)
{
bElementexists = xElementContainer.hasByHierarchicalName(ElementName);
- if (bElementexists == true)
+ if (bElementexists)
{
i += 1;
ElementName = BaseName + Integer.toString(i);
@@ -235,10 +232,9 @@ public class Desktop
try
{
int nStartFlags = com.sun.star.i18n.KParseTokens.ANY_LETTER_OR_NUMBER + com.sun.star.i18n.KParseTokens.ASC_UNDERSCORE;
- int nContFlags = nStartFlags;
Object ocharservice = _xMSF.createInstance("com.sun.star.i18n.CharacterClassification");
- XCharacterClassification xCharacterClassification = (XCharacterClassification) UnoRuntime.queryInterface(XCharacterClassification.class, ocharservice);
- ParseResult aResult = xCharacterClassification.parsePredefinedToken(KParseType.IDENTNAME, _sString, 0, _aLocale, nStartFlags, "", nContFlags, " ");
+ XCharacterClassification xCharacterClassification = UnoRuntime.queryInterface(XCharacterClassification.class, ocharservice);
+ ParseResult aResult = xCharacterClassification.parsePredefinedToken(KParseType.IDENTNAME, _sString, 0, _aLocale, nStartFlags, PropertyNames.EMPTY_STRING, nStartFlags, PropertyNames.SPACE);
return aResult.EndPos;
}
catch (Exception e)
@@ -258,7 +254,7 @@ public class Desktop
if (i < snewname.length())
{
String sspecialchar = snewname.substring(i, i + 1);
- snewname = JavaTools.replaceSubString(snewname, "", sspecialchar);
+ snewname = JavaTools.replaceSubString(snewname, PropertyNames.EMPTY_STRING, sspecialchar);
}
}
return snewname;
@@ -266,7 +262,7 @@ public class Desktop
/**
* Checks if the passed Element Name already exists in the ElementContainer. If yes it appends a
- * suffix to make it unique
+ * suffix to make it unique
* @param xElementContainer
* @param sElementName
* @return a unique Name ready to be added to the container.
@@ -279,7 +275,7 @@ public class Desktop
/**
* Checks if the passed Element Name already exists in the ElementContainer. If yes it appends a
- * suffix to make it unique
+ * suffix to make it unique
* @param xElementContainer
* @param sElementName
* @return a unique Name ready to be added to the container.
@@ -295,7 +291,7 @@ public class Desktop
* suffix to make it unique
* @param _slist
* @param _sElementName
- * @param _sSuffixSeparator
+ * @param _sSuffixSeparator
* @return a unique Name not being in the passed list.
*/
public static String getUniqueName(String[] _slist, String _sElementName, String _sSuffixSeparator)
@@ -311,7 +307,7 @@ public class Desktop
{
return _sElementName;
}
- while (bElementexists == true)
+ while (bElementexists)
{
for (int i = 0; i < _slist.length; i++)
{
@@ -322,7 +318,7 @@ public class Desktop
}
scompname = _sElementName + _sSuffixSeparator + a++;
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
/**
@@ -342,8 +338,8 @@ public class Desktop
aNodePath[0] = new PropertyValue();
aNodePath[0].Name = "nodepath";
aNodePath[0].Value = KeyName;
- XMultiServiceFactory xMSFConfig = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oConfigProvider);
- if (bForUpdate == true)
+ XMultiServiceFactory xMSFConfig = UnoRuntime.queryInterface(XMultiServiceFactory.class, oConfigProvider);
+ if (bForUpdate)
{
return (XInterface) xMSFConfig.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", aNodePath);
}
@@ -362,7 +358,7 @@ public class Desktop
/**
* @deprecated used to retrieve the most common paths used in the office application
* @author bc93774
- *
+ *
*/
public class OfficePathRetriever
{
@@ -377,9 +373,9 @@ public class Desktop
try
{
TemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard");
- UserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", "");
+ UserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", PropertyNames.EMPTY_STRING);
BitmapPath = FileAccess.combinePaths(xMSF, TemplatePath, "/../wizard/bitmap");
- WorkPath = FileAccess.getOfficePath(xMSF, "Work", "", "");
+ WorkPath = FileAccess.getOfficePath(xMSF, "Work", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING);
}
catch (NoValidPathException nopathexception)
{
@@ -391,52 +387,48 @@ public class Desktop
{
try
{
- String sTemplatePath = FileAccess.getOfficePath(_xMSF, "Template", "share", "/wizard");
- return sTemplatePath;
+ return FileAccess.getOfficePath(_xMSF, "Template", "share", "/wizard");
}
catch (NoValidPathException nopathexception)
{
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
public static String getUserTemplatePath(XMultiServiceFactory _xMSF)
{
try
{
- String sUserTemplatePath = FileAccess.getOfficePath(_xMSF, "Template", "user", "");
- return sUserTemplatePath;
+ return FileAccess.getOfficePath(_xMSF, "Template", "user", PropertyNames.EMPTY_STRING);
}
catch (NoValidPathException nopathexception)
{
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
public static String getBitmapPath(XMultiServiceFactory _xMSF)
{
try
{
- String sBitmapPath = FileAccess.combinePaths(_xMSF, getTemplatePath(_xMSF), "/../wizard/bitmap");
- return sBitmapPath;
+ return FileAccess.combinePaths(_xMSF, getTemplatePath(_xMSF), "/../wizard/bitmap");
}
catch (NoValidPathException nopathexception)
{
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
public static String getWorkPath(XMultiServiceFactory _xMSF)
{
try
{
- String sWorkPath = FileAccess.getOfficePath(_xMSF, "Work", "", "");
- return sWorkPath;
+ return FileAccess.getOfficePath(_xMSF, "Work", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING);
}
catch (NoValidPathException nopathexception)
{
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
public static XStringSubstitution createStringSubstitution(XMultiServiceFactory xMSF)
@@ -452,7 +444,7 @@ public class Desktop
}
if (xPathSubst != null)
{
- return (XStringSubstitution) UnoRuntime.queryInterface(XStringSubstitution.class, xPathSubst);
+ return UnoRuntime.queryInterface(XStringSubstitution.class, xPathSubst);
}
else
{
@@ -467,10 +459,10 @@ public class Desktop
* 1. Check if the given desktop argument has a componentWindow.
* If it is null, the myFrame argument is taken.
* 2. Go up the tree of frames and search a frame with a component window.
- * 3. Get from the desktop all the components, and give the first one
+ * 3. Get from the desktop all the components, and give the first one
* which has a frame.
* @param xMSF
- * @param myFrame
+ * @param myFrame
* @param desktop
* @return
* @throws NoSuchElementException
@@ -495,7 +487,7 @@ public class Desktop
{
Object comp = ((Any) e.nextElement()).getObject();
- XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, comp);
+ XModel xModel = UnoRuntime.queryInterface(XModel.class, comp);
XFrame xFrame = xModel.getCurrentController().getFrame();
if (xFrame != null && xFrame.getComponentWindow() != null)
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.java b/wizards/com/sun/star/wizards/common/FileAccess.java
index 6278d7e71a97..6a27616e3fcd 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.java
+++ b/wizards/com/sun/star/wizards/common/FileAccess.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,6 +33,7 @@ import com.sun.star.util.XMacroExpander;
// import com.sun.star.wizards.common.NoValidPathException;
import java.io.File;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Vector;
import com.sun.star.awt.VclWindowPeerAttribute;
@@ -51,10 +52,10 @@ import com.sun.star.document.XDocumentProperties;
/**
* This class delivers static convenience methods
* to use with ucb SimpleFileAccess service.
- * You can also instanciate the class, to encapsulate
+ * You can also instanciate the class, to encapsulate
* some functionality of SimpleFileAccess. The instance
* keeps a reference to an XSimpleFileAccess and an
- * XFileIdentifierConverter, saves the permanent
+ * XFileIdentifierConverter, saves the permanent
* overhead of quering for those interfaces, and delivers
* conveneince methods for using them.
* These Convenince methods include mainly Exception-handling.
@@ -63,7 +64,7 @@ public class FileAccess
{
/**
- *
+ *
* @param xMSF
* @param sPath
* @param sAddPath
@@ -74,24 +75,23 @@ public class FileAccess
String ResultPath = getOfficePath(xMSF, sPath, xSimpleFileAccess);
// As there are several conventions about the look of Url (e.g. with " " or with "%20") you cannot make a
// simple String comparison to find out, if a path is already in "ResultPath"
- String[] PathList = JavaTools.ArrayoutofString(ResultPath, ";");
+ String[] PathList = JavaTools.ArrayoutofString(ResultPath, PropertyNames.SEMI_COLON);
int MaxIndex = PathList.length - 1;
String CompCurPath;
// sAddPath.replace(null, (char) 47);
- String CompAddPath = JavaTools.replaceSubString(sAddPath, "", "/");
+ String CompAddPath = JavaTools.replaceSubString(sAddPath, PropertyNames.EMPTY_STRING, "/");
String CurPath;
for (int i = 0; i <= MaxIndex; i++)
{
CurPath = JavaTools.convertfromURLNotation(PathList[i]);
- CompCurPath = JavaTools.replaceSubString(CurPath, "", "/");
+ CompCurPath = JavaTools.replaceSubString(CurPath, PropertyNames.EMPTY_STRING, "/");
if (CompCurPath.equals(CompAddPath))
{
return;
}
}
- ResultPath += ";" + sAddPath;
- return;
- }
+ ResultPath += PropertyNames.SEMI_COLON + sAddPath;
+ }
public static String deleteLastSlashfromUrl(String _sPath)
{
@@ -117,7 +117,7 @@ public class FileAccess
{
try
{
- String ResultPath = "";
+ String ResultPath = PropertyNames.EMPTY_STRING;
XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.util.PathSettings");
ResultPath = com.sun.star.uno.AnyConverter.toString(Helper.getUnoPropertyValue(xInterface, sPath));
ResultPath = deleteLastSlashfromUrl(ResultPath);
@@ -126,7 +126,7 @@ public class FileAccess
catch (Exception exception)
{
exception.printStackTrace(System.out);
- return "";
+ return PropertyNames.EMPTY_STRING;
}
}
@@ -135,7 +135,7 @@ public class FileAccess
* chapter 6.2.7
* @param xMSF
* @param sPath
- * @param sType use "share" or "user". Set to "" if not needed eg for the WorkPath;
+ * @param sType use "share" or "user". Set to PropertyNames.EMPTY_STRING if not needed eg for the WorkPath;
* In the return Officepath a possible slash at the end is cut off
* @param sSearchDir
* @return
@@ -145,9 +145,9 @@ public class FileAccess
{
//This method currently only works with sPath="Template"
- String ResultPath = "";
+ String ResultPath = PropertyNames.EMPTY_STRING;
- String Template_writable = "";
+ String Template_writable = PropertyNames.EMPTY_STRING;
String[] Template_internal;
String[] Template_user;
@@ -155,11 +155,11 @@ public class FileAccess
try
{
XInterface xPathInterface = (XInterface) xMSF.createInstance("com.sun.star.util.PathSettings");
- XPropertySet xPropertySet = (XPropertySet) com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, xPathInterface);
- String WritePath = "";
+ XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xPathInterface);
+ String WritePath = PropertyNames.EMPTY_STRING;
String[] ReadPaths = null;
XInterface xUcbInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
- XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface);
+ XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface);
Template_writable = (String) xPropertySet.getPropertyValue(sPath + "_writable");
Template_internal = (String[]) xPropertySet.getPropertyValue(sPath + "_internal");
@@ -204,11 +204,11 @@ public class FileAccess
catch (Exception exception)
{
exception.printStackTrace(System.out);
- ResultPath = "";
+ ResultPath = PropertyNames.EMPTY_STRING;
}
- if (bexists == false)
+ if (!bexists)
{
- throw new NoValidPathException(xMSF, "");
+ throw new NoValidPathException(xMSF, PropertyNames.EMPTY_STRING);
}
return ResultPath;
}
@@ -217,9 +217,9 @@ public class FileAccess
{
//This method currently only works with sPath="Template"
- // String ResultPath = "";
+ // String ResultPath = PropertyNames.EMPTY_STRING;
ArrayList<String> aPathList = new ArrayList<String>();
- String Template_writable = "";
+ String Template_writable = PropertyNames.EMPTY_STRING;
String[] Template_internal;
String[] Template_user;
@@ -229,8 +229,8 @@ public class FileAccess
try
{
XInterface xPathInterface = (XInterface) xMSF.createInstance("com.sun.star.util.PathSettings");
- XPropertySet xPropertySet = (XPropertySet) com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, xPathInterface);
- // String WritePath = "";
+ XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xPathInterface);
+ // String WritePath = PropertyNames.EMPTY_STRING;
// XInterface xUcbInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
// XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface);
@@ -255,10 +255,7 @@ public class FileAccess
aPathList.add(sPath);
}
- for (int i = 0; i < Template_user.length; i++)
- {
- aPathList.add(Template_user[i]);
- }
+ aPathList.addAll(Arrays.asList(Template_user));
aPathList.add(Template_writable);
// WritePath = Template_writable;
@@ -288,11 +285,11 @@ public class FileAccess
catch (Exception exception)
{
exception.printStackTrace(System.out);
- // ResultPath = "";
+ // ResultPath = PropertyNames.EMPTY_STRING;
}
// if (bexists == false)
// {
-// throw new NoValidPathException(xMSF, "");
+// throw new NoValidPathException(xMSF, PropertyNames.EMPTY_STRING);
// }
// return ResultPath;
return aPathList;
@@ -323,7 +320,7 @@ public class FileAccess
String sPath = _sPath + "/" + aLocaleAll.toString();
XInterface xInterface = (XInterface) _xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
- XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface);
+ XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface);
if (xSimpleFileAccess.exists(sPath))
{
return sPath;
@@ -374,7 +371,7 @@ public class FileAccess
/*
public static String getOfficePath(XMultiServiceFactory xMSF, String sPath, String sType) throws NoValidPathException {
- String ResultPath = "";
+ String ResultPath = PropertyNames.EMPTY_STRING;
Object oPathSettings;
int iPathCount;
String[] PathList;
@@ -383,10 +380,10 @@ public class FileAccess
XInterface xUcbInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface);
ResultPath = getOfficePath(xMSF, sPath, xSimpleFileAccess);
- PathList = JavaTools.ArrayoutofString(ResultPath, ";");
- if (!sType.equals("")) {
- ResultPath = "";
- String CurPath = "";
+ PathList = JavaTools.ArrayoutofString(ResultPath, PropertyNames.SEMI_COLON);
+ if (!sType.equals(PropertyNames.EMPTY_STRING)) {
+ ResultPath = PropertyNames.EMPTY_STRING;
+ String CurPath = PropertyNames.EMPTY_STRING;
String EndString = "/" + sType;
int EndLength = EndString.length();
sType = "/" + sType + "/";
@@ -403,11 +400,11 @@ public class FileAccess
}
} else
ResultPath = PathList[0];
- if (ResultPath.equals("") == false)
+ if (ResultPath.equals(PropertyNames.EMPTY_STRING) == false)
bexists = xSimpleFileAccess.exists(ResultPath);
} catch (Exception exception) {
exception.printStackTrace(System.out);
- ResultPath = "";
+ ResultPath = PropertyNames.EMPTY_STRING;
}
if (bexists == false)
throw new NoValidPathException(xMSF);
@@ -439,7 +436,7 @@ public class FileAccess
try
{
XInterface xUcbInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
- XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface);
+ XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface);
bExists = xSimpleFileAccess.exists(_sPath);
}
catch (Exception exception)
@@ -452,46 +449,43 @@ public class FileAccess
public static String combinePaths(XMultiServiceFactory xMSF, String _sFirstPath, String _sSecondPath) throws NoValidPathException
{
boolean bexists = false;
- String ReturnPath = "";
+ String ReturnPath = PropertyNames.EMPTY_STRING;
try
{
XInterface xUcbInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
- XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface);
+ XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface);
ReturnPath = _sFirstPath + _sSecondPath;
bexists = xSimpleFileAccess.exists(ReturnPath);
}
catch (Exception exception)
{
exception.printStackTrace(System.out);
- return "";
+ return PropertyNames.EMPTY_STRING;
}
- if (bexists == false)
+ if (!bexists)
{
- throw new NoValidPathException(xMSF, "");
+ throw new NoValidPathException(xMSF, PropertyNames.EMPTY_STRING);
}
return ReturnPath;
}
public static boolean createSubDirectory(XMultiServiceFactory xMSF, XSimpleFileAccess xSimpleFileAccess, String Path)
{
- String sNoDirCreation = "";
+ String sNoDirCreation = PropertyNames.EMPTY_STRING;
try
{
Resource oResource = new Resource(xMSF, "ImportWizard", "imp");
- if (oResource != null)
+ sNoDirCreation = oResource.getResText(1050);
+ String sMsgDirNotThere = oResource.getResText(1051);
+ String sQueryForNewCreation = oResource.getResText(1052);
+ String OSPath = JavaTools.convertfromURLNotation(Path);
+ String sQueryMessage = JavaTools.replaceSubString(sMsgDirNotThere, OSPath, "%1");
+ sQueryMessage = sQueryMessage + (char) 13 + sQueryForNewCreation;
+ int icreate = SystemDialog.showMessageBox(xMSF, "QueryBox", VclWindowPeerAttribute.YES_NO, sQueryMessage);
+ if (icreate == 2)
{
- sNoDirCreation = oResource.getResText(1050);
- String sMsgDirNotThere = oResource.getResText(1051);
- String sQueryForNewCreation = oResource.getResText(1052);
- String OSPath = JavaTools.convertfromURLNotation(Path);
- String sQueryMessage = JavaTools.replaceSubString(sMsgDirNotThere, OSPath, "%1");
- sQueryMessage = sQueryMessage + (char) 13 + sQueryForNewCreation;
- int icreate = SystemDialog.showMessageBox(xMSF, "QueryBox", VclWindowPeerAttribute.YES_NO, sQueryMessage);
- if (icreate == 2)
- {
- xSimpleFileAccess.createFolder(Path);
- return true;
- }
+ xSimpleFileAccess.createFolder(Path);
+ return true;
}
return false;
}
@@ -516,7 +510,7 @@ public class FileAccess
try
{
String SubDir;
- String SubDirPath = "";
+ String SubDirPath = PropertyNames.EMPTY_STRING;
int SubLen;
int NewLen;
int RestLen;
@@ -525,7 +519,7 @@ public class FileAccess
String LowerCasePath;
String NewPath = Path;
XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
- XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface);
+ XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface);
if (baskbeforeOverwrite)
{
if (xSimpleFileAccess.exists(Path))
@@ -563,14 +557,13 @@ public class FileAccess
if (bexists)
{
LowerCasePath = NewPath.toLowerCase();
- bexists = (((LowerCasePath.equals("file:///")) || (LowerCasePath.equals("file://")) || (LowerCasePath.equals("file:/")) || (LowerCasePath.equals("file:"))) == false);
+ bexists = (!((LowerCasePath.equals("file:///")) || (LowerCasePath.equals("file://")) || (LowerCasePath.equals("file:/")) || (LowerCasePath.equals("file:"))));
}
if (bexists)
{
- if (bSubDirexists == false)
+ if (!bSubDirexists)
{
- boolean bSubDiriscreated = createSubDirectory(xMSF, xSimpleFileAccess, SubDirPath);
- return bSubDiriscreated;
+ return createSubDirectory(xMSF, xSimpleFileAccess, SubDirPath);
}
return true;
}
@@ -598,32 +591,32 @@ public class FileAccess
* @param xMSF
* @param FilterName the prefix of the filename. a "-" is added to the prefix !
* @param FolderName the folder (URL) to look for files...
- * @return an array with two array members. The first one, with document titles,
+ * @return an array with two array members. The first one, with document titles,
* the second with the corresponding URLs.
* @deprecated please use the getFolderTitles() with ArrayList
*/
public static String[][] getFolderTitles(com.sun.star.lang.XMultiServiceFactory xMSF, String FilterName, String FolderName)
{
- String[][] LocLayoutFiles = new String[2][]; //{"",""}{""};
+ String[][] LocLayoutFiles = new String[2][]; //{PropertyNames.EMPTY_STRING,PropertyNames.EMPTY_STRING}{PropertyNames.EMPTY_STRING};
try
{
java.util.Vector<String> TitleVector = null;
java.util.Vector<String> NameVector = null;
XInterface xDocInterface = (XInterface) xMSF.createInstance("com.sun.star.document.DocumentProperties");
- XDocumentProperties xDocProps = (XDocumentProperties) UnoRuntime.queryInterface(XDocumentProperties.class, xDocInterface);
+ XDocumentProperties xDocProps = UnoRuntime.queryInterface(XDocumentProperties.class, xDocInterface);
XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
- com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = (com.sun.star.ucb.XSimpleFileAccess) UnoRuntime.queryInterface(com.sun.star.ucb.XSimpleFileAccess.class, xInterface);
+ com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface);
String[] nameList = xSimpleFileAccess.getFolderContents(FolderName, false);
TitleVector = new java.util.Vector<String>(/*nameList.length*/);
NameVector = new java.util.Vector<String>(nameList.length);
- FilterName = FilterName == null || FilterName.equals("") ? null : FilterName + "-";
+ FilterName = FilterName == null || FilterName.equals(PropertyNames.EMPTY_STRING) ? null : FilterName + "-";
- String fileName = "";
+ String fileName = PropertyNames.EMPTY_STRING;
PropertyValue[] noArgs = { };
for (int i = 0; i < nameList.length; i++)
{
@@ -676,11 +669,11 @@ public class FileAccess
public static String getPathFromList(XMultiServiceFactory xMSF, ArrayList _aList, String _sFile)
{
- String sFoundFile = "";
+ String sFoundFile = PropertyNames.EMPTY_STRING;
try
{
XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
- com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = (com.sun.star.ucb.XSimpleFileAccess) UnoRuntime.queryInterface(com.sun.star.ucb.XSimpleFileAccess.class, xInterface);
+ com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface);
for (int i = 0; i < _aList.size(); i++)
{
@@ -699,7 +692,7 @@ public class FileAccess
}
/**
- *
+ *
* @param xMSF
* @param _sStartFilterName
* @param FolderNames
@@ -709,16 +702,16 @@ public class FileAccess
public static String[][] getFolderTitles(com.sun.star.lang.XMultiServiceFactory xMSF, String _sStartFilterName, ArrayList FolderNames)
throws NoValidPathException
{
- return getFolderTitles(xMSF, _sStartFilterName, FolderNames, "");
+ return getFolderTitles(xMSF, _sStartFilterName, FolderNames, PropertyNames.EMPTY_STRING);
}
private static String getTitle(XMultiServiceFactory xMSF, String _sFile)
{
- String sTitle = "";
+ String sTitle = PropertyNames.EMPTY_STRING;
try
{
XInterface xDocInterface = (XInterface) xMSF.createInstance("com.sun.star.document.DocumentProperties");
- XDocumentProperties xDocProps = (XDocumentProperties) UnoRuntime.queryInterface(XDocumentProperties.class, xDocInterface);
+ XDocumentProperties xDocProps = UnoRuntime.queryInterface(XDocumentProperties.class, xDocInterface);
PropertyValue[] noArgs = { };
xDocProps.loadFromMedium(_sFile, noArgs);
sTitle = xDocProps.getTitle();
@@ -732,7 +725,7 @@ public class FileAccess
public static String[][] getFolderTitles(com.sun.star.lang.XMultiServiceFactory xMSF, String _sStartFilterName, ArrayList FolderName, String _sEndFilterName)
throws NoValidPathException
{
- String[][] LocLayoutFiles = new String[2][]; //{"",""}{""};
+ String[][] LocLayoutFiles = new String[2][]; //{PropertyNames.EMPTY_STRING,PropertyNames.EMPTY_STRING}{PropertyNames.EMPTY_STRING};
if (FolderName.size() == 0)
{
throw new NoValidPathException(null, "Path not given.");
@@ -744,7 +737,7 @@ public class FileAccess
try
{
XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
- xSimpleFileAccess = (com.sun.star.ucb.XSimpleFileAccess) UnoRuntime.queryInterface(com.sun.star.ucb.XSimpleFileAccess.class, xInterface);
+ xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface);
}
catch (com.sun.star.uno.Exception e)
{
@@ -759,9 +752,9 @@ public class FileAccess
try
{
String[] nameList = xSimpleFileAccess.getFolderContents(sFolderName, false);
- _sStartFilterName = _sStartFilterName == null || _sStartFilterName.equals("") ? null : _sStartFilterName + "-";
+ _sStartFilterName = _sStartFilterName == null || _sStartFilterName.equals(PropertyNames.EMPTY_STRING) ? null : _sStartFilterName + "-";
- String fileName = "";
+ String fileName = PropertyNames.EMPTY_STRING;
for (int i = 0; i < nameList.length; i++)
{
fileName = getFilename(nameList[i]);
@@ -769,13 +762,13 @@ public class FileAccess
if (_sStartFilterName == null || fileName.startsWith(_sStartFilterName))
{
- if (_sEndFilterName.equals(""))
+ if (_sEndFilterName.equals(PropertyNames.EMPTY_STRING))
{
sTitle = getTitle(xMSF, nameList[i]);
}
else if (fileName.endsWith(_sEndFilterName))
{
- fileName = fileName.replaceAll(_sEndFilterName + "$", "");
+ fileName = fileName.replaceAll(_sEndFilterName + "$", PropertyNames.EMPTY_STRING);
sTitle = fileName;
}
else
@@ -818,31 +811,28 @@ public class FileAccess
{
//get a simple file access...
Object fa = xmsf.createInstance("com.sun.star.ucb.SimpleFileAccess");
- fileAccess = (XSimpleFileAccess2) UnoRuntime.queryInterface(XSimpleFileAccess2.class, fa);
+ fileAccess = UnoRuntime.queryInterface(XSimpleFileAccess2.class, fa);
//get the file identifier converter
Object fcv = xmsf.createInstance("com.sun.star.ucb.FileContentProvider");
- filenameConverter = (XFileIdentifierConverter) UnoRuntime.queryInterface(XFileIdentifierConverter.class, fcv);
+ filenameConverter = UnoRuntime.queryInterface(XFileIdentifierConverter.class, fcv);
}
public String getURL(String parentPath, String childPath)
{
String parent = filenameConverter.getSystemPathFromFileURL(parentPath);
File f = new File(parent, childPath);
- String r = filenameConverter.getFileURLFromSystemPath(parentPath, f.getAbsolutePath());
- return r;
+ return filenameConverter.getFileURLFromSystemPath(parentPath, f.getAbsolutePath());
}
public String getURL(String path)
{
File f = new File(path);
- String r = filenameConverter.getFileURLFromSystemPath(
- path, f.getAbsolutePath());
- return r;
+ return filenameConverter.getFileURLFromSystemPath(path, f.getAbsolutePath());
}
public String getPath(String parentURL, String childURL)
{
- return filenameConverter.getSystemPathFromFileURL(parentURL + (((childURL == null || childURL.equals("")) ? "" : "/" + childURL)));
+ return filenameConverter.getSystemPathFromFileURL(parentURL + (((childURL == null || childURL.equals(PropertyNames.EMPTY_STRING)) ? PropertyNames.EMPTY_STRING : "/" + childURL)));
}
/**
@@ -855,7 +845,7 @@ public class FileAccess
int p = filename.indexOf(".");
if (p == -1)
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
else
{
@@ -1004,7 +994,7 @@ public class FileAccess
/**
* @author rpiterman
- * @param path
+ * @param path
* @param pathSeparator
* @return
*/
@@ -1018,8 +1008,7 @@ public class FileAccess
{
String filename = getFilename(path, pathSeparator);
String sExtension = getExtension(filename);
- String basename = filename.substring(0, filename.length() - (sExtension.length() + 1));
- return basename;
+ return filename.substring(0, filename.length() - (sExtension.length() + 1));
}
/**
@@ -1061,8 +1050,8 @@ public class FileAccess
}
/**
- *
- * @param url
+ *
+ * @param url
* @return the parent dir of the given url.
* if the path points to file, gives the directory in which the file is.
*/
@@ -1083,7 +1072,7 @@ public class FileAccess
public String createNewDir(String parentDir, String name)
{
- String s = getNewFile(parentDir, name, "");
+ String s = getNewFile(parentDir, name, PropertyNames.EMPTY_STRING);
if (mkdir(s))
{
return s;
@@ -1102,8 +1091,7 @@ public class FileAccess
do
{
String filename = filename(name, extension, i++);
- String u = getURL(parentDir, filename);
- url = u;
+ url = getURL(parentDir, filename);
}
while (exists(url, true));
@@ -1112,7 +1100,7 @@ public class FileAccess
private static String filename(String name, String ext, int i)
{
- return name + (i == 0 ? "" : String.valueOf(i)) + (ext.equals("") ? "" : "." + ext);
+ return name + (i == 0 ? PropertyNames.EMPTY_STRING : String.valueOf(i)) + (ext.equals(PropertyNames.EMPTY_STRING) ? PropertyNames.EMPTY_STRING : "." + ext);
}
public int getSize(String url)
@@ -1129,7 +1117,7 @@ public class FileAccess
public static String connectURLs(String urlFolder, String urlFilename)
{
- return urlFolder + (urlFolder.endsWith("/") ? "" : "/") +
+ return urlFolder + (urlFolder.endsWith("/") ? PropertyNames.EMPTY_STRING : "/") +
(urlFilename.startsWith("/") ? urlFilename.substring(1) : urlFilename);
}
@@ -1140,13 +1128,13 @@ public class FileAccess
{
Vector<String> oDataVector = new Vector<String>();
Object oSimpleFileAccess = _xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
- XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, oSimpleFileAccess);
+ XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, oSimpleFileAccess);
if (xSimpleFileAccess.exists(_filepath))
{
XInputStream xInputStream = xSimpleFileAccess.openFileRead(_filepath);
Object oTextInputStream = _xMSF.createInstance("com.sun.star.io.TextInputStream");
- XTextInputStream xTextInputStream = (XTextInputStream) UnoRuntime.queryInterface(XTextInputStream.class, oTextInputStream);
- XActiveDataSink xActiveDataSink = (XActiveDataSink) UnoRuntime.queryInterface(XActiveDataSink.class, oTextInputStream);
+ XTextInputStream xTextInputStream = UnoRuntime.queryInterface(XTextInputStream.class, oTextInputStream);
+ XActiveDataSink xActiveDataSink = UnoRuntime.queryInterface(XActiveDataSink.class, oTextInputStream);
xActiveDataSink.setInputStream(xInputStream);
while (!xTextInputStream.isEOF())
{
@@ -1166,7 +1154,7 @@ public class FileAccess
}
/**
- * shortens a filename to a user displayable representation.
+ * shortens a filename to a user displayable representation.
* @param path
* @param maxLength
* @return
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py
index e5306e37f75b..384582b71899 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.py
+++ b/wizards/com/sun/star/wizards/common/FileAccess.py
@@ -768,3 +768,4 @@ class FileAccess(object):
return s1 + "..." + s2
else:
return path
+
diff --git a/wizards/com/sun/star/wizards/common/HelpIds.java b/wizards/com/sun/star/wizards/common/HelpIds.java
index ad8faa2b2d42..12af48a29585 100644
--- a/wizards/com/sun/star/wizards/common/HelpIds.java
+++ b/wizards/com/sun/star/wizards/common/HelpIds.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,7 +38,7 @@ public class HelpIds
"HID:WIZARDS_HID0_CANCEL", // HID:34205
"HID:WIZARDS_HID0_STATUS_DIALOG", // HID:34206
"HID:WIZARDS_HID1_LST_SESSIONS", // HID:34207
- "",
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID1_BTN_DEL_SES", // HID:34209
"HID:WIZARDS_HID2_LST_DOCS", // HID:34210
"HID:WIZARDS_HID2_BTN_ADD_DOC", // HID:34211
@@ -81,13 +81,13 @@ public class HelpIds
"HID:WIZARDS_HID5_BTN_BACKGND", // HID:34248
"HID:WIZARDS_HID5_BTN_ICONS", // HID:34249
"HID:WIZARDS_HID6_TXT_SITE_TITLE", // HID:34250
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID6_TXT_SITE_DESC", // HID:34253
- "",
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID6_DATE_SITE_CREATED", // HID:34255
"HID:WIZARDS_HID6_DATE_SITE_UPDATED", // HID:34256
- "",
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID6_TXT_SITE_EMAIL", // HID:34258
"HID:WIZARDS_HID6_TXT_SITE_COPYRIGHT", // HID:34259
"HID:WIZARDS_HID7_BTN_PREVIEW", // HID:34260
@@ -102,24 +102,24 @@ public class HelpIds
"HID:WIZARDS_HID7_BTN_FTP", // HID:34269
"HID:WIZARDS_HID7_CHK_SAVE", // HID:34270
"HID:WIZARDS_HID7_TXT_SAVE", // HID:34271
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_BG", // HID:34290
"HID:WIZARDS_HID_BG_BTN_OTHER", // HID:34291
"HID:WIZARDS_HID_BG_BTN_NONE", // HID:34292
@@ -143,23 +143,23 @@ public class HelpIds
"HID:WIZARDS_HID_BG_BTN_IMG14", // HID:34300
"HID:WIZARDS_HID_BG_BTN_IMG15", // HID:34311
"HID:WIZARDS_HID_BG_BTN_IMG16", // HID:34312
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGREPORT_DIALOG", // HID:34320
- "",
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGREPORT_0_CMDPREV", // HID:34322
"HID:WIZARDS_HID_DLGREPORT_0_CMDNEXT", // HID:34323
"HID:WIZARDS_HID_DLGREPORT_0_CMDFINISH", // HID:34324
"HID:WIZARDS_HID_DLGREPORT_0_CMDCANCEL", // HID:34325
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGREPORT_1_LBTABLES", // HID:34330
"HID:WIZARDS_HID_DLGREPORT_1_FIELDSAVAILABLE", // HID:34331
"HID:WIZARDS_HID_DLGREPORT_1_CMDMOVESELECTED", // HID:34332
@@ -169,7 +169,7 @@ public class HelpIds
"HID:WIZARDS_HID_DLGREPORT_1_FIELDSSELECTED", // HID:34336
"HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEUP", // HID:34337
"HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEDOWN", // HID:34338
- "",
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGREPORT_2_GROUPING", // HID:34340
"HID:WIZARDS_HID_DLGREPORT_2_CMDGROUP", // HID:34341
"HID:WIZARDS_HID_DLGREPORT_2_CMDUNGROUP", // HID:34342
@@ -188,18 +188,18 @@ public class HelpIds
"HID:WIZARDS_HID_DLGREPORT_3_SORT4", // HID:34355
"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND4", // HID:34356
"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND4", // HID:34357
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGREPORT_4_TITLE", // HID:34362
"HID:WIZARDS_HID_DLGREPORT_4_DATALAYOUT", // HID:34363
"HID:WIZARDS_HID_DLGREPORT_4_PAGELAYOUT", // HID:34364
"HID:WIZARDS_HID_DLGREPORT_4_LANDSCAPE", // HID:34365
"HID:WIZARDS_HID_DLGREPORT_4_PORTRAIT", // HID:34366
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGREPORT_5_OPTDYNTEMPLATE", // HID:34370
"HID:WIZARDS_HID_DLGREPORT_5_OPTSTATDOCUMENT", // HID:34371
"HID:WIZARDS_HID_DLGREPORT_5_TXTTEMPLATEPATH", // HID:34372
@@ -209,8 +209,8 @@ public class HelpIds
"HID:WIZARDS_HID_DLGREPORT_5_TXTDOCUMENTPATH", // HID:34376
"HID:WIZARDS_HID_DLGREPORT_5_CMDDOCUMENTPATH", // HID:34377
"HID:WIZARDS_HID_DLGREPORT_5_CHKLINKTODB", // HID:34378
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_1", // HID:34381
"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_2", // HID:34382
"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_3", // HID:34383
@@ -218,29 +218,29 @@ public class HelpIds
"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_5", // HID:34385
"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_6", // HID:34386
"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_7", // HID:34387
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGFORM_DIALOG", // HID:34400
- "",
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGFORM_CMDPREV", // HID:34402
"HID:WIZARDS_HID_DLGFORM_CMDNEXT", // HID:34403
"HID:WIZARDS_HID_DLGFORM_CMDFINISH", // HID:34404
"HID:WIZARDS_HID_DLGFORM_CMDCANCEL", // HID:34405
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGFORM_MASTER_LBTABLES", // HID:34411
"HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSAVAILABLE", // HID:34412
"HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVESELECTED", // HID:34413
@@ -250,17 +250,17 @@ public class HelpIds
"HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSSELECTED", // HID:34417
"HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEUP", // HID:34418
"HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEDOWN", // HID:34419
- "",
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGFORM_CHKCREATESUBFORM", // HID:34421
"HID:WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION", // HID:34422
"HID:WIZARDS_HID_DLGFORM_OPTSELECTMANUALLY", // HID:34423
"HID:WIZARDS_HID_DLGFORM_lstRELATIONS", // HID:34424
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGFORM_SUB_LBTABLES", // HID:34431
"HID:WIZARDS_HID_DLGFORM_SUB_FIELDSAVAILABLE", // HID:34432
"HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVESELECTED", // HID:34433
@@ -270,7 +270,7 @@ public class HelpIds
"HID:WIZARDS_HID_DLGFORM_SUB_FIELDSSELECTED", // HID:34437
"HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEUP", // HID:34438
"HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEDOWN", // HID:34439
- "",
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK1", // HID:34441
"HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK1", // HID:34442
"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK2", // HID:34443
@@ -279,8 +279,8 @@ public class HelpIds
"HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK3", // HID:34446
"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK4", // HID:34447
"HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK4", // HID:34448
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGFORM_CMDALIGNLEFT", // HID:34451
"HID:WIZARDS_HID_DLGFORM_CMDALIGNRIGHT", // HID:34452
"HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED", // HID:34453
@@ -296,40 +296,40 @@ public class HelpIds
"HID:WIZARDS_HID_DLGFORM_CHKNOMODIFICATION", // HID:34463
"HID:WIZARDS_HID_DLGFORM_CHKNODELETION", // HID:34464
"HID:WIZARDS_HID_DLGFORM_CHKNOADDITION", // HID:34465
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGFORM_LSTSTYLES", // HID:34471
"HID:WIZARDS_HID_DLGFORM_CMDNOBORDER", // HID:34472
"HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", // HID:34473
"HID:WIZARDS_HID_DLGFORM_CMDSIMPLEBORDER", // HID:34474
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGFORM_TXTPATH", // HID:34481
"HID:WIZARDS_HID_DLGFORM_OPTWORKWITHFORM", // HID:34482
"HID:WIZARDS_HID_DLGFORM_OPTMODIFYFORM", // HID:34483
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGNEWSLTR_DIALOG", // HID:34500
"HID:WIZARDS_HID_DLGNEWSLTR_OPTSTANDARDLAYOUT", // HID:34501
"HID:WIZARDS_HID_DLGNEWSLTR_OPTPARTYLAYOUT", // HID:34502
@@ -337,19 +337,19 @@ public class HelpIds
"HID:WIZARDS_HID_DLGNEWSLTR_OPTSINGLESIDED", // HID:34504
"HID:WIZARDS_HID_DLGNEWSLTR_OPTDOUBLESIDED", // HID:34505
"HID:WIZARDS_HID_DLGNEWSLTR_CMDGOON", // HID:34506
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGDEPOT_DIALOG_SELLBUY", // HID:34520
"HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SELLBUY", // HID:34521
"HID:WIZARDS_HID_DLGDEPOT_0_TXTQUANTITY", // HID:34522
@@ -381,25 +381,25 @@ public class HelpIds
"HID:WIZARDS_HID_DLGDEPOT_LSTMARKETS", // HID:34548
"HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_HISTORY", // HID:34549
"HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_HISTORY", // HID:34550
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGIMPORT_DIALOG", // HID:34570
"HID:WIZARDS_HID_DLGIMPORT_0_CMDHELP", // HID:34571
"HID:WIZARDS_HID_DLGIMPORT_0_CMDCANCEL", // HID:34572
@@ -424,7 +424,7 @@ public class HelpIds
"HID:WIZARDS_HID_DLGIMPORT_2_LBEXPORTDOCUMENTPATH", // HID:34591
"HID:WIZARDS_HID_DLGIMPORT_2_EDEXPORTDOCUMENTPATH", // HID:34592
"HID:WIZARDS_HID_DLGIMPORT_2_CMDEXPORTPATHSELECT", // HID:34593
- "",
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGIMPORT_3_TBSUMMARY", // HID:34595
"HID:WIZARDS_HID_DLGIMPORT_0_CHKWRITER", // HID:34596
"HID:WIZARDS_HID_DLGIMPORT_0_CHKCALC", // HID:34597
@@ -432,34 +432,34 @@ public class HelpIds
"HID:WIZARDS_HID_DLGIMPORT_0_CHKMATHGLOBAL", // HID:34599
"HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT2", // HID:34600
"HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT2", // HID:34601
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGCORRESPONDENCE_DIALOG", // HID:34630
"HID:WIZARDS_HID_DLGCORRESPONDENCE_CANCEL", // HID:34631
"HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA1", // HID:34632
@@ -468,28 +468,28 @@ public class HelpIds
"HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER1", // HID:34635
"HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER2", // HID:34636
"HID:WIZARDS_HID_DLGCORRESPONDENCE_LETTEROKAY", // HID:34637
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGSTYLES_DIALOG", // HID:34650
"HID:WIZARDS_HID_DLGSTYLES_LISTBOX", // HID:34651
"HID:WIZARDS_HID_DLGSTYLES_CANCEL", // HID:34652
"HID:WIZARDS_HID_DLGSTYLES_OKAY", // HID:34653
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGCONVERT_DIALOG", // HID:34660
"HID:WIZARDS_HID_DLGCONVERT_CHECKBOX1", // HID:34661
"HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON1", // HID:34662
@@ -511,25 +511,25 @@ public class HelpIds
"HID:WIZARDS_HID_DLGCONVERT_CBTARGETOPEN", // HID:34678
"HID:WIZARDS_HID_DLGCONVERT_CHKPROTECT", // HID:34679
"HID:WIZARDS_HID_DLGCONVERT_CHKTEXTDOCUMENTS", // HID:34680
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGPASSWORD_CMDGOON", // HID:34690
"HID:WIZARDS_HID_DLGPASSWORD_CMDCANCEL", // HID:34691
"HID:WIZARDS_HID_DLGPASSWORD_CMDHELP", // HID:34692
"HID:WIZARDS_HID_DLGPASSWORD_TXTPASSWORD", // HID:34693
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGHOLIDAYCAL_DIALOG", // HID:34700
"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_PREVIEW", // HID:34701
"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPYEAR", // HID:34702
@@ -604,39 +604,39 @@ public class HelpIds
"HID:WIZARDS_HID_LTRWIZ_OPTMAKECHANGES", // HID:40814
"HID:WIZARDS_HID_LTRWIZ_TXTPATH", // HID:40815
"HID:WIZARDS_HID_LTRWIZ_CMDPATH", // HID:40816
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_LTRWIZARD", // HID:40820
"HID:WIZARDS_HID_LTRWIZARD_HELP", // HID:40821
"HID:WIZARDS_HID_LTRWIZARD_BACK", // HID:40822
"HID:WIZARDS_HID_LTRWIZARD_NEXT", // HID:40823
"HID:WIZARDS_HID_LTRWIZARD_CREATE", // HID:40824
"HID:WIZARDS_HID_LTRWIZARD_CANCEL", // HID:40825
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_QUERYWIZARD_LSTTABLES", // HID:40850
"HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDS", // HID:40851
"HID:WIZARDS_HID_QUERYWIZARD_CMDMOVESELECTED", // HID:40852
@@ -646,12 +646,12 @@ public class HelpIds
"HID:WIZARDS_HID_QUERYWIZARD_LSTSELFIELDS", // HID:40856
"HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEUP", // HID:40857
"HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEDOWN", // HID:40858
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_QUERYWIZARD_SORT1", // HID:40865
"HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND1", // HID:40866
"HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND1", // HID:40867
@@ -664,7 +664,7 @@ public class HelpIds
"HID:WIZARDS_HID_QUERYWIZARD_SORT4", // HID:40874
"HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND4", // HID:40875
"HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND4", // HID:40876
- "",
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHALL", // HID:40878
"HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHANY", // HID:40879
"HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_1", // HID:40880
@@ -676,12 +676,12 @@ public class HelpIds
"HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_3", // HID:40886
"HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_3", // HID:40887
"HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_3", // HID:40888
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATEDETAILQUERY", // HID:40895
"HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATESUMMARYQUERY", // HID:40896
"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_1", // HID:40897
@@ -696,20 +696,20 @@ public class HelpIds
"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_5", // HID:40906
"HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEPLUS", // HID:40907
"HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEMINUS", // HID:40908
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDS", // HID:40915
"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVESELECTED", // HID:40916
"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERREMOVESELECTED", // HID:40917
"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERSELFIELDS", // HID:40918
"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEUP", // HID:40919
"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEDOWN", // HID:40920
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHALL", // HID:40923
"HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHANY", // HID:40924
"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_1", // HID:40925
@@ -721,12 +721,12 @@ public class HelpIds
"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_3", // HID:40931
"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_3", // HID:40932
"HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_3", // HID:40933
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_1", // HID:40940
"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_2", // HID:40941
"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_3", // HID:40942
@@ -734,61 +734,61 @@ public class HelpIds
"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_5", // HID:40944
"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_6", // HID:40945
"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_7", // HID:40946
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_QUERYWIZARD_TXTQUERYTITLE", // HID:40955
"HID:WIZARDS_HID_QUERYWIZARD_OPTDISPLAYQUERY", // HID:40956
"HID:WIZARDS_HID_QUERYWIZARD_OPTMODIFYQUERY", // HID:40957
"HID:WIZARDS_HID_QUERYWIZARD_TXTSUMMARY", // HID:40958
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_QUERYWIZARD", // HID:40970
- "",
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_QUERYWIZARD_BACK", // HID:40972
"HID:WIZARDS_HID_QUERYWIZARD_NEXT", // HID:40973
"HID:WIZARDS_HID_QUERYWIZARD_CREATE", // HID:40974
"HID:WIZARDS_HID_QUERYWIZARD_CANCEL", // HID:40975
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_IS", // HID:41000
- "",
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_IS_BTN_NONE", // HID:41002
"HID:WIZARDS_HID_IS_BTN_OK", // HID:41003
"HID:WIZARDS_HID_IS_BTN_CANCEL", // HID:41004
@@ -824,9 +824,9 @@ public class HelpIds
"HID:WIZARDS_HID_IS_BTN_IMG30", // HID:41034
"HID:WIZARDS_HID_IS_BTN_IMG31", // HID:41035
"HID:WIZARDS_HID_IS_BTN_IMG32", // HID:41036
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_FTP", // HID:41040
"HID:WIZARDS_HID_FTP_SERVER", // HID:41041
"HID:WIZARDS_HID_FTP_USERNAME", // HID:41042
@@ -836,8 +836,8 @@ public class HelpIds
"HID:WIZARDS_HID_FTP_BTN_PATH", // HID:41046
"HID:WIZARDS_HID_FTP_OK", // HID:41047
"HID:WIZARDS_HID_FTP_CANCEL", // HID:41048
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_AGWIZ", // HID:41051
"HID:WIZARDS_HID_AGWIZ_HELP", // HID:41052
"HID:WIZARDS_HID_AGWIZ_NEXT", // HID:41053
@@ -886,27 +886,27 @@ public class HelpIds
"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_5", // HID:41096
"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_5", // HID:41097
"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_5", // HID:41098
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_FAXWIZ_OPTBUSINESSFAX", // HID:41120
"HID:WIZARDS_HID_FAXWIZ_LSTBUSINESSSTYLE", // HID:41121
"HID:WIZARDS_HID_FAXWIZ_OPTPRIVATEFAX", // HID:41122
@@ -942,53 +942,53 @@ public class HelpIds
"HID:WIZARDS_HID_IMAGECONTROL2", // HID:41152
"HID:WIZARDS_HID_FAXWIZ_TXTPATH", // HID:41153
"HID:WIZARDS_HID_FAXWIZ_CMDPATH", // HID:41154
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_FAXWIZARD", // HID:41180
"HID:WIZARDS_HID_FAXWIZARD_HELP", // HID:41181
"HID:WIZARDS_HID_FAXWIZARD_BACK", // HID:41182
"HID:WIZARDS_HID_FAXWIZARD_NEXT", // HID:41183
"HID:WIZARDS_HID_FAXWIZARD_CREATE", // HID:41184
"HID:WIZARDS_HID_FAXWIZARD_CANCEL", // HID:41185
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGTABLE_DIALOG", // HID:41200
- "",
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGTABLE_CMDPREV", // HID:41202
"HID:WIZARDS_HID_DLGTABLE_CMDNEXT", // HID:41203
"HID:WIZARDS_HID_DLGTABLE_CMDFINISH", // HID:41204
@@ -1004,9 +1004,9 @@ public class HelpIds
"HID:WIZARDS_HID_DLGTABLE_FIELDSSELECTED", // HID:41214
"HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP", // HID:41215
"HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN", // HID:41216
- "",
- "",
- "",
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
+ PropertyNames.EMPTY_STRING,
"HID:WIZARDS_HID_DLGTABLE_LB_SELFIELDNAMES", // HID:41220
"HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDUP", // HID:41221
"HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDDOWN", // HID:41222
@@ -1032,7 +1032,7 @@ public class HelpIds
"HID:WIZARDS_HID_DLGTABLE_OPT_WORKWITHTABLE", // HID:41242
"HID:WIZARDS_HID_DLGTABLE_OPT_STARTFORMWIZARD", // HID:41243
"HID:WIZARDS_HID_DLGTABLE_LST_CATALOG", // HID:41244
- "HID:WIZARDS_HID_DLGTABLE_LST_SCHEMA" // HID:41245
+ "HID:WIZARDS_HID_DLGTABLE_LST_SCHEMA" // HID:41245
};
public static String getHelpIdString( int nHelpId )
@@ -1042,6 +1042,6 @@ public class HelpIds
else if ( nHelpId >= 40769 && nHelpId <= 41245 )
return array2[ nHelpId - 40769 ];
else
- return new String();
+ return "";
}
}
diff --git a/wizards/com/sun/star/wizards/common/Helper.java b/wizards/com/sun/star/wizards/common/Helper.java
index 0df16b360de0..3d05eafd97c9 100644
--- a/wizards/com/sun/star/wizards/common/Helper.java
+++ b/wizards/com/sun/star/wizards/common/Helper.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,15 +58,14 @@ public class Helper
oCal.set(DateValue.Year, DateValue.Month, DateValue.Day);
java.util.Date dTime = oCal.getTime();
long lTime = dTime.getTime();
- long lDate = lTime / (3600 * 24000);
- return lDate;
+ return lTime / (3600 * 24000);
}
public static void setUnoPropertyValue(Object oUnoObject, String PropertyName, Object PropertyValue)
{
try
{
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oUnoObject);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oUnoObject);
if (xPSet.getPropertySetInfo().hasPropertyByName(PropertyName))
{
xPSet.setPropertyValue(PropertyName, PropertyValue);
@@ -87,8 +86,8 @@ public class Helper
{
try
{
- com.sun.star.container.XNameAccess xName = (com.sun.star.container.XNameAccess) UnoRuntime.queryInterface(com.sun.star.container.XNameAccess.class, oUnoObject);
- if (xName.hasByName(ElementName) == true)
+ com.sun.star.container.XNameAccess xName = UnoRuntime.queryInterface(com.sun.star.container.XNameAccess.class, oUnoObject);
+ if (xName.hasByName(ElementName))
{
return xName.getByName(ElementName);
}
@@ -126,7 +125,7 @@ public class Helper
{
if (oUnoObject != null)
{
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oUnoObject);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oUnoObject);
Object oObject = xPSet.getPropertyValue(PropertyName);
if (AnyConverter.isVoid(oObject))
{
@@ -202,10 +201,9 @@ public class Helper
{
if (oUnoObject != null)
{
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oUnoObject);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oUnoObject);
// Property[] aProps = xPSet.getPropertySetInfo().getProperties();
- Object oObject = xPSet.getPropertyValue(PropertyName);
- return oObject;
+ return xPSet.getPropertyValue(PropertyName);
}
}
catch (Exception exception)
@@ -221,7 +219,7 @@ public class Helper
{
if (oUnoObject != null)
{
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oUnoObject);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oUnoObject);
Object oObject = xPSet.getPropertyValue(PropertyName);
if (AnyConverter.isArray(oObject))
{
@@ -242,11 +240,10 @@ public class Helper
{
if (oUnoObject != null)
{
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oUnoObject);
- if (xPSet.getPropertySetInfo().hasPropertyByName(PropertyName) == true)
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oUnoObject);
+ if (xPSet.getPropertySetInfo().hasPropertyByName(PropertyName))
{
- Object oObject = xPSet.getPropertyValue(PropertyName);
- return oObject;
+ return xPSet.getPropertyValue(PropertyName);
}
}
return null;
@@ -262,7 +259,7 @@ public class Helper
{
try
{
- com.sun.star.beans.XMultiPropertySet xMultiPSetLst = (com.sun.star.beans.XMultiPropertySet) UnoRuntime.queryInterface(com.sun.star.beans.XMultiPropertySet.class, oUnoObject);
+ com.sun.star.beans.XMultiPropertySet xMultiPSetLst = UnoRuntime.queryInterface(com.sun.star.beans.XMultiPropertySet.class, oUnoObject);
if (xMultiPSetLst != null)
{
xMultiPSetLst.setPropertyValues(PropertyNames, PropertyValues);
@@ -322,7 +319,7 @@ public class Helper
public DateUtils(XMultiServiceFactory xmsf, Object document) throws Exception
{
- XMultiServiceFactory docMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, document);
+ XMultiServiceFactory docMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, document);
Object defaults = docMSF.createInstance("com.sun.star.text.Defaults");
Locale l = (Locale) Helper.getUnoStructValue(defaults, "CharLocale");
@@ -332,7 +329,7 @@ public class Helper
calendar = Calendar.getInstance(jl);
- formatSupplier = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, document);
+ formatSupplier = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, document);
Object formatSettings = formatSupplier.getNumberFormatSettings();
com.sun.star.util.Date date = (com.sun.star.util.Date) Helper.getUnoPropertyValue(formatSettings, "NullDate");
@@ -379,9 +376,7 @@ public class Helper
* docNullTime and date1 are in millis, but
* I need a day...
*/
- double daysDiff = (date1 - docNullTime) / DAY_IN_MILLIS + 1;
-
- return daysDiff;
+ return (date1 - docNullTime) / DAY_IN_MILLIS + 1;
}
public double getDocumentDateAsDouble(DateTime date)
@@ -400,9 +395,7 @@ public class Helper
* docNullTime and date1 are in millis, but
* I need a day...
*/
- double daysDiff = (date1 - docNullTime) / DAY_IN_MILLIS + 1;
-
- return daysDiff;
+ return (date1 - docNullTime) / DAY_IN_MILLIS + 1;
}
@@ -425,20 +418,16 @@ public class Helper
public static XComponentContext getComponentContext(XMultiServiceFactory _xMSF)
{
// Get the path to the extension and try to add the path to the class loader
- final XPropertySet xProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _xMSF);
+ final XPropertySet xProps = UnoRuntime.queryInterface(XPropertySet.class, _xMSF);
final PropertySetHelper aHelper = new PropertySetHelper(xProps);
final Object aDefaultContext = aHelper.getPropertyValueAsObject("DefaultContext");
- final XComponentContext xComponentContext = (XComponentContext) UnoRuntime.queryInterface(XComponentContext.class, aDefaultContext);
- return xComponentContext;
+ return UnoRuntime.queryInterface(XComponentContext.class, aDefaultContext);
}
public static XMacroExpander getMacroExpander(XMultiServiceFactory _xMSF)
{
final XComponentContext xComponentContext = getComponentContext(_xMSF);
final Object aSingleton = xComponentContext.getValueByName("/singletons/com.sun.star.util.theMacroExpander");
- XMacroExpander xExpander = (XMacroExpander) UnoRuntime.queryInterface(XMacroExpander.class, aSingleton);
- // String[][] aStrListList = xProvider.getExtensionList();
-// final String sLocation = xProvider.getPackageLocation("com.sun.reportdesigner");
- return xExpander;
+ return UnoRuntime.queryInterface(XMacroExpander.class, aSingleton);
}
}
diff --git a/wizards/com/sun/star/wizards/common/IRenderer.java b/wizards/com/sun/star/wizards/common/IRenderer.java
index 1aa73eaa599b..f781bc845b49 100644
--- a/wizards/com/sun/star/wizards/common/IRenderer.java
+++ b/wizards/com/sun/star/wizards/common/IRenderer.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,7 +31,7 @@ package com.sun.star.wizards.common;
* A General interface which gives a string
* that represents the rendered argument object.
* Can be used to reference resources, internationalizartion
- * a.s.o
+ * a.s.o
*/
public interface IRenderer
{
diff --git a/wizards/com/sun/star/wizards/common/Indexable.java b/wizards/com/sun/star/wizards/common/Indexable.java
index d95640f1ec70..b5a5d53cfe61 100644
--- a/wizards/com/sun/star/wizards/common/Indexable.java
+++ b/wizards/com/sun/star/wizards/common/Indexable.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/common/InvalidQueryException.java b/wizards/com/sun/star/wizards/common/InvalidQueryException.java
index 325f6fdc3760..f36aba00f8f2 100644
--- a/wizards/com/sun/star/wizards/common/InvalidQueryException.java
+++ b/wizards/com/sun/star/wizards/common/InvalidQueryException.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/common/JavaTools.java b/wizards/com/sun/star/wizards/common/JavaTools.java
index 836b2a7ea242..69c7eb784c6d 100644
--- a/wizards/com/sun/star/wizards/common/JavaTools.java
+++ b/wizards/com/sun/star/wizards/common/JavaTools.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,7 +52,7 @@ public class JavaTools
/*
public static void main(String args[])
{
- String sPath = "";
+ String sPath = PropertyNames.EMPTY_STRING;
DateTime oDateTime = null;
long n;
String ConnectStr = "uno:socket,host=localhost,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.NamingService"; //localhost ;Lo-1.Germany.sun.com; 10.16.65.155
@@ -79,10 +79,7 @@ public class JavaTools
if (FirstArray != null)
{
String[] SecondArray = new String[FirstArray.length];
- for (int i = 0; i < FirstArray.length; i++)
- {
- SecondArray[i] = FirstArray[i];
- }
+ System.arraycopy(FirstArray, 0, SecondArray, 0, FirstArray.length);
return SecondArray;
}
else
@@ -135,7 +132,7 @@ public class JavaTools
/**converts a list of Integer values included in an Integer vector to a list of int values
*
- *
+ *
* @param _aIntegerVector
* @return
*/
@@ -160,8 +157,8 @@ public class JavaTools
}
/**converts a list of Boolean values included in a Boolean vector to a list of boolean values
- *
- *
+ *
+ *
* @param _aBooleanVector
* @return
*/
@@ -200,7 +197,7 @@ public class JavaTools
public static String getlongestArrayItem(String[] StringArray)
{
- String sLongestItem = "";
+ String sLongestItem = PropertyNames.EMPTY_STRING;
int FieldCount = StringArray.length;
int iOldLength = 0;
int iCurLength = 0;
@@ -218,17 +215,17 @@ public class JavaTools
public static String ArraytoString(String[] LocArray)
{
- String ResultString = "";
+ StringBuilder ResultString = new StringBuilder(PropertyNames.EMPTY_STRING);
int iLen = LocArray.length;
for (int i = 0; i < iLen; i++)
{
- ResultString += LocArray[i];
+ ResultString.append(LocArray[i]);
if (i < iLen - 1)
{
- ResultString += ";";
+ ResultString.append(PropertyNames.SEMI_COLON);
}
}
- return ResultString;
+ return ResultString.toString();
}
/**
@@ -377,7 +374,7 @@ public class JavaTools
public static String[] ArrayoutofString(String MainString, String Token)
{
String[] StringArray;
- if (MainString.equals("") == false)
+ if (!MainString.equals(PropertyNames.EMPTY_STRING))
{
Vector StringVector = new Vector();
String LocString = null;
@@ -443,17 +440,17 @@ public class JavaTools
{
String sFilename = getFilenameOutOfPath(sPath);
String[] FilenameList = ArrayoutofString(sFilename, ".");
- String FileDescription = "";
+ StringBuilder FileDescription = new StringBuilder(PropertyNames.EMPTY_STRING);
for (int i = 0; i < FilenameList.length - 1; i++)
{
- FileDescription += FilenameList[i];
+ FileDescription.append(FilenameList[i]);
}
- return FileDescription;
+ return FileDescription.toString();
}
public static String convertfromURLNotation(String _sURLPath)
{
- String sPath = "";
+ String sPath = PropertyNames.EMPTY_STRING;
try
{
URL oJavaURL = new URL(_sURLPath);
@@ -523,8 +520,8 @@ public class JavaTools
{
retvector.add(baselist[i]);
// else
- // here you could call the method of a defined interface to notify the calling method
- // }
+ // here you could call the method of a defined interface to notify the calling method
+ // }
}
}
retarray = new String[retvector.size()];
@@ -548,7 +545,7 @@ public class JavaTools
{
retvector.add(baselist[i]);
// else
- // here you could call the method of a defined interface to notify the calling method
+ // here you could call the method of a defined interface to notify the calling method
}
}
retarray = new String[retvector.size()][2];
@@ -565,44 +562,38 @@ public class JavaTools
public static PropertyValue[][] removeOutdatedFields(PropertyValue[][] baselist, String[] _complist)
{
- PropertyValue[][] retarray = new PropertyValue[][]
- {
- };
if ((baselist != null) && (_complist != null))
{
- Vector firstdimvector = new Vector();
- int b = 0;
+ ArrayList<PropertyValue[]> firstdimvector = new ArrayList<PropertyValue[]>();
for (int n = 0; n < baselist.length; n++)
{
- Vector secdimvector = new Vector();
- PropertyValue[] internalArray;
- int a = 0;
+ ArrayList<PropertyValue> secdimvector = new ArrayList<PropertyValue>();
for (int m = 0; m < baselist[n].length; m++)
{
if (FieldInList(_complist, baselist[n][m].Name) > -1)
{
secdimvector.add(baselist[n][m]);
- a++;
}
}
- if (a > 0)
+ if (!secdimvector.isEmpty())
{
- internalArray = new PropertyValue[a];
+ PropertyValue[] internalArray = new PropertyValue[secdimvector.size()];
secdimvector.toArray(internalArray);
firstdimvector.add(internalArray);
- b++;
}
}
- retarray = new PropertyValue[b][];
- firstdimvector.toArray(retarray);
+ PropertyValue[][] retarray = new PropertyValue[firstdimvector.size()][];
+ return firstdimvector.toArray(retarray);
}
- return (retarray);
+ return new PropertyValue[][]
+ {
+ };
}
/**
* searches a multidimensional array for duplicate fields. According to the following example
* SlaveFieldName1 ;SlaveFieldName2; SlaveFieldName3
- * MasterFieldName1;MasterFieldName2;MasterFieldName3
+ * MasterFieldName1;MasterFieldName2;MasterFieldName3
* The entries SlaveFieldNameX and MasterFieldNameX are grouped together and then the created groups are compared
* If a group is duplicate the entry of the second group is returned.
* @param _scomplist
@@ -621,7 +612,7 @@ public class JavaTools
{
if (n == 0)
{
- sDescList[m] = new String();
+ sDescList[m] = "";
}
sDescList[m] += _scomplist[n][m];
}
@@ -762,16 +753,16 @@ public class JavaTools
{
if (sSecondString != null)
{
- bissame = sSecondString.equals("");
+ bissame = sSecondString.equals(PropertyNames.EMPTY_STRING);
}
else
{
- bissame = (sSecondString == null);
+ bissame = true;
}
}
else
{
- if (sFirstString.equals(""))
+ if (sFirstString.equals(PropertyNames.EMPTY_STRING))
{
bissame = (sSecondString == null);
}
diff --git a/wizards/com/sun/star/wizards/common/NamedValueCollection.java b/wizards/com/sun/star/wizards/common/NamedValueCollection.java
index f8f2cd05224a..ebafcbd31e41 100644
--- a/wizards/com/sun/star/wizards/common/NamedValueCollection.java
+++ b/wizards/com/sun/star/wizards/common/NamedValueCollection.java
@@ -38,7 +38,7 @@ public class NamedValueCollection
}
@SuppressWarnings("unchecked")
- public final < T extends Object > T getOrDefault( final String i_key, final T i_default )
+ public final < T > T getOrDefault( final String i_key, final T i_default )
{
if ( m_values.containsKey( i_key ) )
{
diff --git a/wizards/com/sun/star/wizards/common/NoValidPathException.java b/wizards/com/sun/star/wizards/common/NoValidPathException.java
index f4975d2fff0c..cdbe0065bb7f 100644
--- a/wizards/com/sun/star/wizards/common/NoValidPathException.java
+++ b/wizards/com/sun/star/wizards/common/NoValidPathException.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.java b/wizards/com/sun/star/wizards/common/NumberFormatter.java
index ccfbee303f98..9c0feb5644a3 100644
--- a/wizards/com/sun/star/wizards/common/NumberFormatter.java
+++ b/wizards/com/sun/star/wizards/common/NumberFormatter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,53 +51,53 @@ public class NumberFormatter
public int iTextFormatKey = -1;
public int iTimeFormatKey = -1;
public int iLogicalFormatKey = -1;
- public long lDateCorrection;
+ public long lDateCorrection;
public XNumberFormatter xNumberFormatter;
public XNumberFormats xNumberFormats;
public XNumberFormatTypes xNumberFormatTypes;
public XPropertySet xNumberFormatSettings;
private boolean bNullDateCorrectionIsDefined = false;
- private Locale aLocale;
-
-
+ private Locale aLocale;
+
+
public NumberFormatter(XMultiServiceFactory _xMSF, XNumberFormatsSupplier _xNumberFormatsSupplier, Locale _aLocale) throws Exception
{
aLocale = _aLocale;
Object oNumberFormatter = _xMSF.createInstance("com.sun.star.util.NumberFormatter");
xNumberFormats = _xNumberFormatsSupplier.getNumberFormats();
xNumberFormatSettings = _xNumberFormatsSupplier.getNumberFormatSettings();
- xNumberFormatter = (XNumberFormatter) UnoRuntime.queryInterface(XNumberFormatter.class, oNumberFormatter);
- xNumberFormatter.attachNumberFormatsSupplier(_xNumberFormatsSupplier);
- xNumberFormatTypes = (XNumberFormatTypes) UnoRuntime.queryInterface(XNumberFormatTypes.class, xNumberFormats);
-
+ xNumberFormatter = UnoRuntime.queryInterface(XNumberFormatter.class, oNumberFormatter);
+ xNumberFormatter.attachNumberFormatsSupplier(_xNumberFormatsSupplier);
+ xNumberFormatTypes = UnoRuntime.queryInterface(XNumberFormatTypes.class, xNumberFormats);
+
}
-
+
public NumberFormatter(XNumberFormatsSupplier _xNumberFormatsSupplier, Locale _aLocale) throws Exception
{
aLocale = _aLocale;
xNumberFormats = _xNumberFormatsSupplier.getNumberFormats();
xNumberFormatSettings = _xNumberFormatsSupplier.getNumberFormatSettings();
- xNumberFormatTypes = (XNumberFormatTypes) UnoRuntime.queryInterface(XNumberFormatTypes.class, xNumberFormats);
+ xNumberFormatTypes = UnoRuntime.queryInterface(XNumberFormatTypes.class, xNumberFormats);
}
-
+
/**
* @param _xMSF
* @param _xNumberFormatsSupplier
* @return
* @throws Exception
* @deprecated
- *
+ *
*/
public static XNumberFormatter createNumberFormatter(XMultiServiceFactory _xMSF, XNumberFormatsSupplier _xNumberFormatsSupplier) throws Exception
{
Object oNumberFormatter = _xMSF.createInstance("com.sun.star.util.NumberFormatter");
- XNumberFormatter xNumberFormatter = (XNumberFormatter) UnoRuntime.queryInterface(XNumberFormatter.class, oNumberFormatter);
- xNumberFormatter.attachNumberFormatsSupplier(_xNumberFormatsSupplier);
+ XNumberFormatter xNumberFormatter = UnoRuntime.queryInterface(XNumberFormatter.class, oNumberFormatter);
+ xNumberFormatter.attachNumberFormatsSupplier(_xNumberFormatsSupplier);
return xNumberFormatter;
}
-
-
+
+
/**
* gives a key to pass to a NumberFormat object. <br/>
* example: <br/>
@@ -110,22 +110,22 @@ public class NumberFormatter
* @param numberFormatsSupplier
* @param type - a constant out of i18n.NumberFormatIndex enumeration.
* @return a key to use with a util.NumberFormat instance.
- *
+ *
*/
- public static int getNumberFormatterKey( Object numberFormatsSupplier, short type)
+ public static int getNumberFormatterKey( Object numberFormatsSupplier, short type)
{
- Object numberFormatTypes = ((XNumberFormatsSupplier)UnoRuntime.queryInterface(XNumberFormatsSupplier.class,numberFormatsSupplier)).getNumberFormats();
+ Object numberFormatTypes = UnoRuntime.queryInterface(XNumberFormatsSupplier.class,numberFormatsSupplier).getNumberFormats();
Locale l = new Locale();
- return ((XNumberFormatTypes)UnoRuntime.queryInterface(XNumberFormatTypes.class,numberFormatTypes)).getFormatIndex(type, l);
+ return UnoRuntime.queryInterface(XNumberFormatTypes.class,numberFormatTypes).getFormatIndex(type, l);
}
-
-
+
+
public String convertNumberToString(int _nkey, double _dblValue)
{
return xNumberFormatter.convertNumberToString(_nkey, _dblValue);
}
-
-
+
+
public static String convertNumberToString(XNumberFormatter _xNumberFormatter, int _nkey, double _dblValue)
{
return _xNumberFormatter.convertNumberToString(_nkey, _dblValue);
@@ -137,19 +137,19 @@ public class NumberFormatter
return xNumberFormatter.convertStringToNumber(_nkey, _sString);
}
-
+
/**
* @param dateCorrection The lDateCorrection to set.
*/
- public void setNullDateCorrection(long dateCorrection)
+ public void setNullDateCorrection(long dateCorrection)
{
lDateCorrection = dateCorrection;
- }
-
-
+ }
+
+
public int defineNumberFormat(String _FormatString)
{
- try
+ try
{
int NewFormatKey = xNumberFormats.queryKey(_FormatString, aLocale, true);
if (NewFormatKey == -1)
@@ -165,13 +165,13 @@ public class NumberFormatter
}
}
-
+
/**
- * returns a numberformat for a FormatString.
+ * returns a numberformat for a FormatString.
* @param _FormatString
- * @param _aLocale
+ * @param _aLocale
* @return
- */
+ */
public int defineNumberFormat(String _FormatString, Locale _aLocale)
{
try
@@ -189,8 +189,8 @@ public class NumberFormatter
return -1;
}
}
-
-
+
+
public void setNumberFormat(XInterface _xFormatObject, int _FormatKey, NumberFormatter _oNumberFormatter)
{
@@ -200,7 +200,7 @@ public class NumberFormatter
String FormatString = AnyConverter.toString(Helper.getUnoPropertyValue(xNumberFormat, "FormatString"));
Locale oLocale = (Locale) Helper.getUnoPropertyValue(xNumberFormat, "Locale");
int NewFormatKey = defineNumberFormat(FormatString, oLocale);
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _xFormatObject);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, _xFormatObject);
xPSet.setPropertyValue("FormatsSupplier", _oNumberFormatter.xNumberFormatter.getNumberFormatsSupplier());
if (xPSet.getPropertySetInfo().hasPropertyByName("NumberFormat"))
{
@@ -243,7 +243,7 @@ public class NumberFormatter
}
}
-
+
public int setBooleanReportDisplayNumberFormat()
{
String FormatString = "[=1]" + '"' + (char)9745 + '"' + ";[=0]" + '"' + (char)58480 + '"' + ";0";
@@ -258,12 +258,12 @@ public class NumberFormatter
catch (Exception e)
{ //MalformedNumberFormat
e.printStackTrace();
- iLogicalFormatKey = xNumberFormatTypes.getStandardFormat(NumberFormat.LOGICAL, aLocale);
+ iLogicalFormatKey = xNumberFormatTypes.getStandardFormat(NumberFormat.LOGICAL, aLocale);
}
return iLogicalFormatKey;
- }
-
-
+ }
+
+
/**
* @return Returns the iDateFormatKey.
*/
@@ -271,7 +271,7 @@ public class NumberFormatter
{
if (iDateFormatKey == -1)
{
- iDateFormatKey = xNumberFormatTypes.getStandardFormat(NumberFormat.DATE, aLocale);
+ iDateFormatKey = xNumberFormatTypes.getStandardFormat(NumberFormat.DATE, aLocale);
}
return iDateFormatKey;
}
@@ -283,7 +283,7 @@ public class NumberFormatter
if (iDateTimeFormatKey == -1)
{
iDateTimeFormatKey = xNumberFormatTypes.getStandardFormat(NumberFormat.DATETIME, aLocale);
- }
+ }
return iDateTimeFormatKey;
}
/**
@@ -294,7 +294,7 @@ public class NumberFormatter
if (iLogicalFormatKey == -1)
{
iLogicalFormatKey = xNumberFormatTypes.getStandardFormat(NumberFormat.LOGICAL, aLocale);
- }
+ }
return iLogicalFormatKey;
}
/**
@@ -316,7 +316,7 @@ public class NumberFormatter
if (iTextFormatKey == -1)
{
iTextFormatKey = xNumberFormatTypes.getStandardFormat(NumberFormat.TEXT, aLocale);
- }
+ }
return iTextFormatKey;
}
/**
@@ -327,7 +327,7 @@ public class NumberFormatter
if (iTimeFormatKey == -1)
{
iTimeFormatKey = xNumberFormatTypes.getStandardFormat(NumberFormat.TIME, aLocale);
- }
+ }
return iTimeFormatKey;
- }
+ }
}
diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java
index 109affffd5ef..b00151f4a2c0 100644
--- a/wizards/com/sun/star/wizards/common/NumericalHelper.java
+++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,9 +36,9 @@ import com.sun.star.uno.TypeClass;
* Optional or named parameters in SO are of the Object type in Java.
* These objects must be converted to the right simple value type.
* Unfortunately, StarBasic does not know the original desired type,
- * and a value that should be a "Float" is delivered as "Byte". This class
+ * and a value that should be a "Float" is delivered as "Byte". This class
* handles the conversions of these types.<br>
- * This class does not log warnings (or throws Exceptions) when the precision
+ * This class does not log warnings (or throws Exceptions) when the precision
* of a value is lost.
*/
public class NumericalHelper
@@ -93,7 +93,7 @@ public class NumericalHelper
/**
* get a byte value from the object
- * @param aValue
+ * @param aValue
* @return a byte
* @throws com.sun.star.lang.IllegalArgumentException if the object cannot be converted
*/
@@ -151,7 +151,7 @@ public class NumericalHelper
/**
* get a char value from the object
- * @param aValue
+ * @param aValue
* @return a char
* @throws com.sun.star.lang.IllegalArgumentException if the object cannot be converted
*/
@@ -216,7 +216,7 @@ public class NumericalHelper
/**
* get a short value from the object
- * @param aValue
+ * @param aValue
* @return a short
* @throws com.sun.star.lang.IllegalArgumentException if the object cannot be converted
*/
@@ -340,7 +340,7 @@ public class NumericalHelper
/**
@param _aValue a object this can contain anything
@return true, if the parameter aValue is type of real numbers
-
+
see also http://en.wikipedia.org/wiki/Mathematics
*/
public static boolean isRealNumber(Object _aValue)
@@ -351,7 +351,7 @@ public class NumericalHelper
/**
@param aValue a object this can contain anything
* @return true, if the value is type of any integer values. double / float are not(!) integer values
- * @throws com.sun.star.lang.IllegalArgumentException
+ * @throws com.sun.star.lang.IllegalArgumentException
*/
public static boolean isInteger(Object aValue) throws com.sun.star.lang.IllegalArgumentException
{
@@ -411,41 +411,41 @@ public class NumericalHelper
// return toInt(_aValue);
// }
// catch(com.sun.star.lang.IllegalArgumentException e) {
-// DebugHelper.exception(BasicErrorCode.SbERR_CONVERSION, "");
+// 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, "");
-// return "";
+// 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, "");
+// 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, "");
+// DebugHelper.exception(BasicErrorCode.SbERR_BAD_ARGUMENT, PropertyNames.EMPTY_STRING);
// return false;
// }
// }
@@ -461,20 +461,20 @@ public class NumericalHelper
// return false;
// }
// else{
-// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, "");
+// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, PropertyNames.EMPTY_STRING);
// return false;
// }
// }catch (java.lang.Exception e){
-// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, "");
+// 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))){
@@ -489,17 +489,17 @@ public class NumericalHelper
// return false;
// }
// else{
-// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, "");
+// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, PropertyNames.EMPTY_STRING);
// return false;
// }
// }
// }catch (java.lang.Exception e){
-// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, "");
+// DebugHelper.exception(BasicErrorCode.SbERR_OUT_OF_RANGE, PropertyNames.EMPTY_STRING);
// return false;
// }}
/**
* get an int value from the object
- * @param aValue
+ * @param aValue
* @return an int
* @throws com.sun.star.lang.IllegalArgumentException if the object cannot be converted
*/
@@ -555,7 +555,7 @@ public class NumericalHelper
/**
* get a long value from the object
- * @param aValue
+ * @param aValue
* @return a long
* @throws com.sun.star.lang.IllegalArgumentException if the object cannot be converted
*/
@@ -611,7 +611,7 @@ public class NumericalHelper
/**
* get a float value from the object
- * @param aValue
+ * @param aValue
* @return a float
* @throws com.sun.star.lang.IllegalArgumentException if the object cannot be converted
*/
@@ -667,7 +667,7 @@ public class NumericalHelper
/**
* get a double value from the object
- * @param aValue
+ * @param aValue
* @return a double
* @throws com.sun.star.lang.IllegalArgumentException if the object cannot be converted
*/
@@ -723,7 +723,7 @@ public class NumericalHelper
/**
* get a String value from the object
- * @param aValue
+ * @param aValue
* @return a String
* @throws com.sun.star.lang.IllegalArgumentException if the object cannot be converted
*/
@@ -735,31 +735,31 @@ public class NumericalHelper
switch (aTypeObject.iType)
{
case BYTE_TYPE:
- retValue = ((Byte) aTypeObject.aValue).toString();
+ retValue = aTypeObject.aValue.toString();
break;
case CHAR_TYPE:
- retValue = ((Character) aTypeObject.aValue).toString();
+ retValue = aTypeObject.aValue.toString();
break;
case SHORT_TYPE:
- retValue = ((Short) aTypeObject.aValue).toString();
+ retValue = aTypeObject.aValue.toString();
break;
case INT_TYPE:
- retValue = ((Integer) aTypeObject.aValue).toString();
+ retValue = aTypeObject.aValue.toString();
break;
case LONG_TYPE:
- retValue = ((Long) aTypeObject.aValue).toString();
+ retValue = aTypeObject.aValue.toString();
break;
case FLOAT_TYPE:
- retValue = ((Float) aTypeObject.aValue).toString();
+ retValue = aTypeObject.aValue.toString();
break;
case DOUBLE_TYPE:
- retValue = ((Double) aTypeObject.aValue).toString();
+ retValue = aTypeObject.aValue.toString();
break;
case STRING_TYPE:
retValue = (String) aTypeObject.aValue;
break;
case BOOLEAN_TYPE:
- retValue = ((Boolean) aTypeObject.aValue).toString();
+ retValue = aTypeObject.aValue.toString();
break;
case ARRAY_TYPE:
retValue = new String(toByteArray((aValue)));
@@ -773,7 +773,7 @@ public class NumericalHelper
/**
* get a boolean value from the object
- * @param aValue
+ * @param aValue
* @return a boolean
* @throws com.sun.star.lang.IllegalArgumentException if the object cannot be converted
*/
@@ -831,7 +831,7 @@ public class NumericalHelper
* get an int array from an object
* @param anArrayValue a value that is constructed into an array
* @return an integer array
- * @throws com.sun.star.lang.IllegalArgumentException
+ * @throws com.sun.star.lang.IllegalArgumentException
*/
public static int[] toIntArray(Object anArrayValue)
throws com.sun.star.lang.IllegalArgumentException
@@ -865,7 +865,7 @@ public class NumericalHelper
* get an byte array from an object
* @param anArrayValue a value that is constructed into an array
* @return a byte array
- * @throws com.sun.star.lang.IllegalArgumentException
+ * @throws com.sun.star.lang.IllegalArgumentException
*/
public static byte[] toByteArray(Object anArrayValue)
throws com.sun.star.lang.IllegalArgumentException
@@ -899,7 +899,7 @@ public class NumericalHelper
* get a short array from an object
* @param anArrayValue a value that is constructed into an array
* @return a short array
- * @throws com.sun.star.lang.IllegalArgumentException
+ * @throws com.sun.star.lang.IllegalArgumentException
*/
public static short[] toShortArray(Object anArrayValue)
throws com.sun.star.lang.IllegalArgumentException
@@ -933,7 +933,7 @@ public class NumericalHelper
* get a string array from an object
* @param anArrayValue a value that is constructed into an array
* @return a short array
- * @throws com.sun.star.lang.IllegalArgumentException
+ * @throws com.sun.star.lang.IllegalArgumentException
*/
public static String[] toStringArray(Object anArrayValue)
throws com.sun.star.lang.IllegalArgumentException
@@ -968,7 +968,7 @@ public class NumericalHelper
* @param _aValue a value that is constructed into an int
* @param _ndefaultValue the value that is returned, if conversion fails, or if 'aValue' is null
* @return an int value
- * @throws java.lang.Exception
+ * @throws java.lang.Exception
*/
public static int toInt(Object _aValue, int _ndefaultValue) throws Exception
{
@@ -983,13 +983,13 @@ public class NumericalHelper
}
else
{
- DebugHelper.exception(1/* BasicErrorCode.SbERR_CONVERSION*/, "");
+ DebugHelper.exception(1/* BasicErrorCode.SbERR_CONVERSION*/, PropertyNames.EMPTY_STRING);
}
}
}
catch (com.sun.star.uno.Exception e)
{
- DebugHelper.exception(1 /*BasicErrorCode.SbERR_METHOD_FAILED*/, "");
+ DebugHelper.exception(1 /*BasicErrorCode.SbERR_METHOD_FAILED*/, PropertyNames.EMPTY_STRING);
}
return nreturn;
}
@@ -1169,7 +1169,7 @@ public class NumericalHelper
// 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
@@ -1285,7 +1285,7 @@ public class NumericalHelper
/**
* get the simple int type
* @param typeObject
- * @return
+ * @return
* @throws com.sun.star.lang.IllegalArgumentException
*/
static int getInt(TypeObject typeObject)
@@ -1301,7 +1301,7 @@ public class NumericalHelper
/**
* get the simple float type
- * @throws com.sun.star.lang.IllegalArgumentException
+ * @throws com.sun.star.lang.IllegalArgumentException
*/
static float getFloat(TypeObject typeObject)
throws com.sun.star.lang.IllegalArgumentException
@@ -1496,7 +1496,7 @@ public class NumericalHelper
// public static boolean isObjectNumericRepresentation(Object _oValue, NumberFormatter _oNumberFormatter, XPropertySet _xPropertySet) throws com.sun.star.script.BasicErrorException{
// try{
-// int nNumberFormat = AnyConverter.toInt(_xPropertySet.getPropertyValue("NumberFormat"));
+// int nNumberFormat = AnyConverter.toInt(_xPropertySet.getPropertyValue("NumberFormat"));
// if (AnyConverter.isString(_oValue)){
// String sCellContent = AnyConverter.toString(_oValue);
// try{
@@ -1511,9 +1511,9 @@ public class NumericalHelper
// }
// }
// catch (com.sun.star.uno.Exception e){
-// DebugHelper.exception(1 /*BasicErrorCode.SbERR_METHOD_FAILED*/, "");
+// DebugHelper.exception(1 /*BasicErrorCode.SbERR_METHOD_FAILED*/, PropertyNames.EMPTY_STRING);
// return false;
-// }}
+// }}
/**
* Helper class for roman numbering
*/
@@ -1554,11 +1554,11 @@ public class NumericalHelper
{
if (n > MAX_NUMBER || n < MIN_NUMBER)
{
- DebugHelper.exception(1 /*BasicErrorCode.SbERR_OUT_OF_RANGE*/, "");
+ 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,
+ * 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 seperately with regard to the
* special cases 4 and 9.
@@ -1619,7 +1619,6 @@ public class NumericalHelper
public static double roundDouble(double _dblvalue, int _ndecimals)
{
double dblfactor = java.lang.Math.pow(10.0, (double) _ndecimals);
- double dblretvalue = ((double) ((int) (_dblvalue * dblfactor))) / dblfactor;
- return dblretvalue;
+ return ((double) ((int) (_dblvalue * dblfactor))) / dblfactor;
}
}
diff --git a/wizards/com/sun/star/wizards/common/Properties.java b/wizards/com/sun/star/wizards/common/Properties.java
index 6b4155d15adf..6f0a963c21a2 100644
--- a/wizards/com/sun/star/wizards/common/Properties.java
+++ b/wizards/com/sun/star/wizards/common/Properties.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/common/PropertyNames.java b/wizards/com/sun/star/wizards/common/PropertyNames.java
index 791f1da3a2fe..e0ac9659e671 100644
--- a/wizards/com/sun/star/wizards/common/PropertyNames.java
+++ b/wizards/com/sun/star/wizards/common/PropertyNames.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,4 +46,23 @@ public class PropertyNames
public static String PROPERTY_TABINDEX = "TabIndex";
public static String PROPERTY_STATE = "State";
public static String PROPERTY_IMAGEURL = "ImageURL";
+ public static String PROPERTY_TITLE = "Title";
+ public static String PROPERTY_BORDER = "Border";
+ public static String PROPERTY_MOVEABLE = "Moveable";
+ public static String PROPERTY_CLOSEABLE = "Closeable";
+ public static String PROPERTY_ALIGN = "Align";
+ public static String COMMAND = "Command";
+ public static String COMMAND_TYPE = "CommandType";
+ public static String SELECTED_ITEMS = "SelectedItems";
+ public static String URL = "URL";
+ public static String ACTIVE_CONNECTION = "ActiveConnection";
+ public static String ASC = "ASC";
+ public static String SEMI_COLON = ";";
+ public static String EMPTY_STRING = "";
+ public static String START = "start";
+ public static String ORIENTATION = "Orientation";
+ public static String READ_ONLY = "ReadOnly";
+ public static String SPACE = " ";
+ public static String STRING_ITEM_LIST = "StringItemList";
+ public static String FONT_DESCRIPTOR = "FontDescriptor";
}
diff --git a/wizards/com/sun/star/wizards/common/PropertyNames.py b/wizards/com/sun/star/wizards/common/PropertyNames.py
index 27ddc8610960..c1dde18522f3 100644
--- a/wizards/com/sun/star/wizards/common/PropertyNames.py
+++ b/wizards/com/sun/star/wizards/common/PropertyNames.py
@@ -12,3 +12,4 @@ class PropertyNames:
PROPERTY_TABINDEX = "TabIndex"
PROPERTY_STATE = "State"
PROPERTY_IMAGEURL = "ImageURL"
+
diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.java b/wizards/com/sun/star/wizards/common/PropertySetHelper.java
index aec166a5c1c5..3f8409bbdab8 100644
--- a/wizards/com/sun/star/wizards/common/PropertySetHelper.java
+++ b/wizards/com/sun/star/wizards/common/PropertySetHelper.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,7 +49,7 @@ public class PropertySetHelper
{
return;
}
- m_xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _aObj);
+ m_xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, _aObj);
}
private HashMap<String, Object> getHashMap()
@@ -79,10 +79,10 @@ public class PropertySetHelper
}
/**
- set a property,
+ set a property,
@param _sName name of the property to set
@param _aValue property value as object
- * @throws java.lang.Exception
+ * @throws java.lang.Exception
*/
public void setPropertyValue(String _sName, Object _aValue) throws java.lang.Exception
{
@@ -371,11 +371,11 @@ public class PropertySetHelper
*/
public void showProperties()
{
- String sName = "";
+ String sName = PropertyNames.EMPTY_STRING;
if (m_xPropertySet != null)
{
- XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, m_xPropertySet);
+ XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, m_xPropertySet);
if (xServiceInfo != null)
{
sName = xServiceInfo.getImplementationName();
diff --git a/wizards/com/sun/star/wizards/common/Resource.java b/wizards/com/sun/star/wizards/common/Resource.java
index c7eb3e483db7..7d9365b35dbb 100644
--- a/wizards/com/sun/star/wizards/common/Resource.java
+++ b/wizards/com/sun/star/wizards/common/Resource.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.java b/wizards/com/sun/star/wizards/common/SystemDialog.java
index ac3a38c9cf7d..389590d6525d 100644
--- a/wizards/com/sun/star/wizards/common/SystemDialog.java
+++ b/wizards/com/sun/star/wizards/common/SystemDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -66,14 +66,14 @@ public class SystemDialog
try
{
this.xMSF = xMSF;
- systemDialog = (XInterface) xMSF.createInstance(ServiceName);
- xFilePicker = (XFilePicker) UnoRuntime.queryInterface(XFilePicker.class, systemDialog);
- xFolderPicker = (XFolderPicker) UnoRuntime.queryInterface(XFolderPicker.class, systemDialog);
- xFilterManager = (XFilterManager) UnoRuntime.queryInterface(XFilterManager.class, systemDialog);
- xInitialize = (XInitialization) UnoRuntime.queryInterface(XInitialization.class, systemDialog);
- xExecutable = (XExecutableDialog) UnoRuntime.queryInterface(XExecutableDialog.class, systemDialog);
- xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, systemDialog);
- xFilePickerControlAccess = (XFilePickerControlAccess) UnoRuntime.queryInterface(XFilePickerControlAccess.class, systemDialog);
+ systemDialog = xMSF.createInstance(ServiceName);
+ xFilePicker = UnoRuntime.queryInterface(XFilePicker.class, systemDialog);
+ xFolderPicker = UnoRuntime.queryInterface(XFolderPicker.class, systemDialog);
+ xFilterManager = UnoRuntime.queryInterface(XFilterManager.class, systemDialog);
+ xInitialize = UnoRuntime.queryInterface(XInitialization.class, systemDialog);
+ xExecutable = UnoRuntime.queryInterface(XExecutableDialog.class, systemDialog);
+ xComponent = UnoRuntime.queryInterface(XComponent.class, systemDialog);
+ xFilePickerControlAccess = UnoRuntime.queryInterface(XFilePickerControlAccess.class, systemDialog);
xStringSubstitution = createStringSubstitution(xMSF);
Short[] listAny = new Short[]
{
@@ -114,12 +114,7 @@ public class SystemDialog
{
try
{
- //System.out.println("SystemDialog.subst:");
- //System.out.println(path);
- String s = xStringSubstitution.substituteVariables(path, false);
- //System.out.println(s);
- return s;
-
+ return xStringSubstitution.substituteVariables(path, false);
}
catch (Exception ex)
{
@@ -146,10 +141,10 @@ public class SystemDialog
}
/**
- *
+ *
* @param displayDir
* @param defaultName
- * given url to a local path.
+ * given url to a local path.
* @return
*/
public String callStoreDialog(String displayDir, String defaultName)
@@ -157,7 +152,7 @@ public class SystemDialog
sStorePath = null;
try
{
- xFilePickerControlAccess.setValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_AUTOEXTENSION, (short) 0, new Boolean(true));
+ xFilePickerControlAccess.setValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_AUTOEXTENSION, (short) 0, Boolean.TRUE);
xFilePicker.setDefaultName(defaultName);
xFilePicker.setDisplayDirectory(subst(displayDir));
if (execute(xExecutable))
@@ -333,11 +328,11 @@ public class SystemDialog
*/
/**
* @param windowServiceName one of the following strings:
- * "ErrorBox", "WarningBox", "MessBox", "InfoBox", "QueryBox".
- * There are other values possible, look
- * under src/toolkit/source/awt/vcltoolkit.cxx
+ * "ErrorBox", "WarningBox", "MessBox", "InfoBox", "QueryBox".
+ * There are other values possible, look
+ * under src/toolkit/source/awt/vcltoolkit.cxx
* @param windowAttribute see com.sun.star.awt.VclWindowPeerAttribute
- * @return 0 = cancel, 1 = ok, 2 = yes, 3 = no(I'm not sure here)
+ * @return 0 = cancel, 1 = ok, 2 = yes, 3 = no(I'm not sure here)
* other values check for yourself ;-)
*/
public static int showMessageBox(XMultiServiceFactory xMSF, String windowServiceName, int windowAttribute, String MessageText)
@@ -351,7 +346,7 @@ public class SystemDialog
return 0;
}
XFrame xFrame = Desktop.getActiveFrame(xMSF);
- XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow());
+ XWindowPeer xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow());
return showMessageBox(xMSF, xWindowPeer, windowServiceName, windowAttribute, MessageText);
}
catch (Exception exception)
@@ -382,15 +377,15 @@ public class SystemDialog
try
{
XInterface xAWTToolkit = (XInterface) xMSF.createInstance("com.sun.star.awt.Toolkit");
- XToolkit xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class, xAWTToolkit);
+ XToolkit xToolkit = UnoRuntime.queryInterface(XToolkit.class, xAWTToolkit);
com.sun.star.awt.WindowDescriptor oDescriptor = new com.sun.star.awt.WindowDescriptor();
oDescriptor.WindowServiceName = windowServiceName;
oDescriptor.Parent = peer;
oDescriptor.Type = com.sun.star.awt.WindowClass.MODALTOP;
oDescriptor.WindowAttributes = windowAttribute;
XWindowPeer xMsgPeer = xToolkit.createWindow(oDescriptor);
- XMessageBox xMsgbox = (XMessageBox) UnoRuntime.queryInterface(XMessageBox.class, xMsgPeer);
- XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xMsgbox);
+ XMessageBox xMsgbox = UnoRuntime.queryInterface(XMessageBox.class, xMsgPeer);
+ XComponent xComponent = UnoRuntime.queryInterface(XComponent.class, xMsgbox);
xMsgbox.setMessageText(MessageText);
iMessage = xMsgbox.execute();
xComponent.dispose();
@@ -417,7 +412,7 @@ public class SystemDialog
}
if (xPathSubst != null)
{
- return (XStringSubstitution) UnoRuntime.queryInterface(
+ return UnoRuntime.queryInterface(
XStringSubstitution.class, xPathSubst);
}
else
diff --git a/wizards/com/sun/star/wizards/common/TerminateWizardException.java b/wizards/com/sun/star/wizards/common/TerminateWizardException.java
index 124d98f9ff31..f71a47b27fda 100644
--- a/wizards/com/sun/star/wizards/common/TerminateWizardException.java
+++ b/wizards/com/sun/star/wizards/common/TerminateWizardException.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/common/UCB.java b/wizards/com/sun/star/wizards/common/UCB.java
index cb7ff9e815d7..20ad77383f06 100644
--- a/wizards/com/sun/star/wizards/common/UCB.java
+++ b/wizards/com/sun/star/wizards/common/UCB.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,18 +50,18 @@ public class UCB
private Object ucb;
private FileAccess fa;
-
+
public UCB(XMultiServiceFactory xmsf) throws Exception
{
String[] keys = new String[2];
keys[ 0 ] = "Local";
keys[ 1 ] = "Office";
- ucb = xmsf.createInstanceWithArguments(
+ ucb = xmsf.createInstanceWithArguments(
"com.sun.star.ucb.UniversalContentBroker", keys );
fa = new FileAccess(xmsf);
}
-
- public void deleteDirContent(String dir)
+
+ public void deleteDirContent(String dir)
throws Exception
{
if (!fa.exists(dir,true))
@@ -74,18 +74,18 @@ public class UCB
delete(FileAccess.connectURLs(dir ,(String)l.get(i)));
}
}
-
+
public void delete(String filename) throws Exception
{
//System.out.println("UCB.delete(" + filename);
executeCommand( getContent(filename),"delete",Boolean.TRUE);
}
-
+
public void copy(String sourceDir, String targetDir) throws Exception
{
copy(sourceDir,targetDir,(Verifier)null);
}
-
+
public void copy(String sourceDir, String targetDir, Verifier verifier) throws Exception
{
List files = listFiles(sourceDir,verifier);
@@ -93,9 +93,9 @@ public class UCB
{
copy(sourceDir, (String)files.get(i), targetDir);
}
-
+
}
-
+
public void copy(String sourceDir, String filename, String targetDir, String targetName) throws Exception
{
if (!fa.exists(targetDir,true))
@@ -105,7 +105,7 @@ public class UCB
//System.out.println("UCB.copy(" + sourceDir + ", " + filename + ", " + targetDir+ ", " + targetName);
executeCommand(ucb, "globalTransfer", copyArg(sourceDir,filename, targetDir,targetName));
}
-
+
/**
* @deprecated
* @param sourceDir
@@ -115,11 +115,11 @@ public class UCB
*/
public void copy(String sourceDir, String filename, String targetDir) throws Exception
{
- copy(sourceDir,filename, targetDir, "");
+ copy(sourceDir,filename, targetDir, PropertyNames.EMPTY_STRING);
}
/**
- * target name can be "", in which case the name stays lige the source name
+ * target name can be PropertyNames.EMPTY_STRING, in which case the name stays lige the source name
* @param sourceDir
* @param sourceFilename
* @param targetDir
@@ -128,7 +128,7 @@ public class UCB
*/
public GlobalTransferCommandArgument copyArg(String sourceDir, String sourceFilename, String targetDir, String targetFilename)
{
-
+
GlobalTransferCommandArgument aArg = new GlobalTransferCommandArgument();
aArg.Operation = TransferCommandOperation.COPY;
aArg.SourceURL = fa.getURL(sourceDir,sourceFilename);
@@ -138,12 +138,12 @@ public class UCB
aArg.NameClash = NameClash.OVERWRITE;
return aArg;
}
-
+
public Object executeCommand(Object xContent, String aCommandName, Object aArgument)
- throws com.sun.star.ucb.CommandAbortedException,
- com.sun.star.uno.Exception
+ throws com.sun.star.ucb.CommandAbortedException,
+ com.sun.star.uno.Exception
{
- XCommandProcessor xCmdProcessor = (XCommandProcessor)UnoRuntime.queryInterface(
+ XCommandProcessor xCmdProcessor = UnoRuntime.queryInterface(
XCommandProcessor.class, xContent);
Command aCommand = new Command();
aCommand.Name = aCommandName;
@@ -157,30 +157,30 @@ public class UCB
Object xContent = getContent(path);
OpenCommandArgument2 aArg = new OpenCommandArgument2();
- aArg.Mode = OpenMode.ALL;
- aArg.Priority = 32768;
+ aArg.Mode = OpenMode.ALL;
+ aArg.Priority = 32768;
// Fill info for the properties wanted.
aArg.Properties = new Property[] {new Property()};
-
- aArg.Properties[0].Name = "Title";
+
+ aArg.Properties[0].Name = PropertyNames.PROPERTY_TITLE;
aArg.Properties[0].Handle = -1;
-
+
XDynamicResultSet xSet;
- xSet = (XDynamicResultSet)UnoRuntime.queryInterface(
+ xSet = UnoRuntime.queryInterface(
XDynamicResultSet.class,executeCommand(xContent, "open", aArg));
XResultSet xResultSet = xSet.getStaticResultSet();
-
+
List files = new Vector();
if (xResultSet.first())
{
// obtain XContentAccess interface for child content access and XRow for properties
- XContentAccess xContentAccess = (XContentAccess)UnoRuntime.queryInterface(
+ XContentAccess xContentAccess = UnoRuntime.queryInterface(
XContentAccess.class, xResultSet);
- XRow xRow = (XRow)UnoRuntime.queryInterface(XRow.class, xResultSet);
+ XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet);
do
{
// Obtain URL of child.
@@ -189,19 +189,19 @@ public class UCB
String aTitle = xRow.getString(1);
if (aTitle.length() == 0 && xRow.wasNull())
{
- ; //ignore
+ //ignore
}
- else
+ else
{
files.add(aTitle);
}
}
while (xResultSet.next()); // next child
}
-
+
if (verifier != null)
{
- for (int i = 0; i<files.size(); i++)
+ for (int i = 0; i<files.size(); i++)
{
if (!verifier.verify(files.get(i)))
{
@@ -209,20 +209,20 @@ public class UCB
}
}
}
-
+
return files;
}
-
- public Object getContentProperty(Object content, String propName, Class type)
- throws Exception
+
+ public Object getContentProperty(Object content, String propName, Class type)
+ throws Exception
{
Property[] pv = new Property[1];
pv[0] = new Property();
pv[0].Name = propName;
pv[0].Handle = -1;
-
+
Object row = executeCommand(content,"getPropertyValues",pv);
- XRow xrow = (XRow)UnoRuntime.queryInterface(XRow.class,row);
+ XRow xrow = UnoRuntime.queryInterface(XRow.class,row);
if (type.equals(String.class))
{
return xrow.getString(1);
@@ -243,21 +243,21 @@ public class UCB
{
return null;
}
-
+
}
-
+
public Object getContent(String path) throws Exception
{
//System.out.println("Getting Content for : " + path);
- XContentIdentifier id = ((XContentIdentifierFactory) UnoRuntime.queryInterface(XContentIdentifierFactory.class, ucb)).createContentIdentifier(path);
-
- return ((XContentProvider)UnoRuntime.queryInterface(
- XContentProvider.class,ucb)).queryContent(id);
+ XContentIdentifier id = UnoRuntime.queryInterface(XContentIdentifierFactory.class, ucb).createContentIdentifier(path);
+
+ return UnoRuntime.queryInterface(
+ XContentProvider.class,ucb).queryContent(id);
}
-
+
public static interface Verifier
{
- public boolean verify(Object object);
+ public boolean verify(Object object);
}
}
diff --git a/wizards/com/sun/star/wizards/common/XMLHelper.java b/wizards/com/sun/star/wizards/common/XMLHelper.java
index 326ba03fbeea..05033cd8bd6b 100644
--- a/wizards/com/sun/star/wizards/common/XMLHelper.java
+++ b/wizards/com/sun/star/wizards/common/XMLHelper.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,7 +52,7 @@ public class XMLHelper
Element e = doc.createElement(name);
for (int i = 0; i < attNames.length; i++)
{
- if (attValues[i] != null && (!attValues[i].equals("")))
+ if (attValues[i] != null && (!attValues[i].equals(PropertyNames.EMPTY_STRING)))
{
e.setAttribute(attNames[i], attValues[i]);
}
diff --git a/wizards/com/sun/star/wizards/common/XMLProvider.java b/wizards/com/sun/star/wizards/common/XMLProvider.java
index f5c2fd662d31..bfe8efea31e8 100644
--- a/wizards/com/sun/star/wizards/common/XMLProvider.java
+++ b/wizards/com/sun/star/wizards/common/XMLProvider.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/common/prova.py b/wizards/com/sun/star/wizards/common/prova.py
index 3e4db04faddd..1219ba9aff7b 100644
--- a/wizards/com/sun/star/wizards/common/prova.py
+++ b/wizards/com/sun/star/wizards/common/prova.py
@@ -4,3 +4,4 @@ class prova:
def Imprimir(self):
print PropertyNames.PROPERTY_STEP
+
diff --git a/wizards/com/sun/star/wizards/db/BlindtextCreator.java b/wizards/com/sun/star/wizards/db/BlindtextCreator.java
index b52381def054..eca87812867b 100644
--- a/wizards/com/sun/star/wizards/db/BlindtextCreator.java
+++ b/wizards/com/sun/star/wizards/db/BlindtextCreator.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -27,6 +27,7 @@
package com.sun.star.wizards.db;
import com.sun.star.wizards.common.JavaTools;
+import com.sun.star.wizards.common.PropertyNames;
/**
*
@@ -40,7 +41,7 @@ public class BlindtextCreator
public static String adjustBlindTextlength(String FieldTitle, int FieldWidth, boolean bIsCurLandscape, boolean bIsGroupTable, String[] _RecordFieldNames)
{
- String BlindTextString = "";
+ String BlindTextString = PropertyNames.EMPTY_STRING;
if (bIsGroupTable)
{
return getBlindTextString(FieldTitle, FieldWidth, FieldWidth);
@@ -66,11 +67,10 @@ public class BlindtextCreator
public static String getBlindTextString(String FieldTitle, int FieldWidth, int MaxWidth)
{
- String[] BlindTextArray = JavaTools.ArrayoutofString(BlindText, " ");
+ String[] BlindTextArray = JavaTools.ArrayoutofString(BlindText, PropertyNames.SPACE);
String PartBlindText = BlindTextArray[0];
String NewPartBlindText;
int MaxHeaderWidth;
- int iWidth = FieldWidth;
int Titlelength = (int) 1.1 * FieldTitle.length(); // We assume that the TableHeading is bold
if (Titlelength > PartBlindText.length())
@@ -88,7 +88,7 @@ public class BlindtextCreator
int i = 1;
do
{
- NewPartBlindText = PartBlindText + " " + BlindTextArray[i];
+ NewPartBlindText = PartBlindText + PropertyNames.SPACE + BlindTextArray[i];
if (NewPartBlindText.length() < MaxWidth)
{
PartBlindText = NewPartBlindText;
@@ -101,7 +101,7 @@ public class BlindtextCreator
private static int getMaxFieldCount(boolean bIsCurLandscape)
{
- if (bIsCurLandscape == true)
+ if (bIsCurLandscape)
{
return 5;
}
diff --git a/wizards/com/sun/star/wizards/db/ColumnPropertySet.java b/wizards/com/sun/star/wizards/db/ColumnPropertySet.java
index a3ff8c12b712..a9f926bcbc85 100644
--- a/wizards/com/sun/star/wizards/db/ColumnPropertySet.java
+++ b/wizards/com/sun/star/wizards/db/ColumnPropertySet.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,7 +40,7 @@ public class ColumnPropertySet
TypeInspector oTypeInspector;
public XPropertySet xPropertySet;
private int nType;
- private String sTypeName = "";
+ private String sTypeName = PropertyNames.EMPTY_STRING;
public ColumnPropertySet(TypeInspector _oTypeInspector, XPropertySet _xPropertySet)
{
@@ -80,7 +80,7 @@ public class ColumnPropertySet
}
if ((nType == DataType.VARCHAR) && (precision == null || precision.intValue() == 0))
{
- precision = new Integer(50);
+ precision = 50;
}
if (precision != null)
{
@@ -149,7 +149,7 @@ public class ColumnPropertySet
private void setType(int _nType, String _sTypeName, Integer precision)
{
- if (_sTypeName.equals(""))
+ if (_sTypeName.equals(PropertyNames.EMPTY_STRING))
{
sTypeName = oTypeInspector.getDefaultTypeName(nType, precision);
}
@@ -174,7 +174,7 @@ public class ColumnPropertySet
else if (_spropname.equals(PropertyNames.PROPERTY_NAME))
{
String sName = (String) _oValue;
- if (!sName.equals(""))
+ if (!sName.equals(PropertyNames.EMPTY_STRING))
{
xPropertySet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName);
}
diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java
index ad54020e8645..8e2d08709c2f 100644
--- a/wizards/com/sun/star/wizards/db/CommandMetaData.java
+++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -24,7 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
package com.sun.star.wizards.db;
import com.sun.star.lang.XMultiServiceFactory;
@@ -39,468 +38,454 @@ import com.sun.star.lang.Locale;
import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XIndexAccess;
import com.sun.star.container.XNameAccess;
-import com.sun.star.embed.EntryInitModes;
import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.common.JavaTools;
import com.sun.star.wizards.common.NumberFormatter;
+import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.common.Resource;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
-import java.util.Vector;
public class CommandMetaData extends DBMetaData
{
+
public Map FieldTitleSet = new HashMap();
- public String[] m_aAllFieldNames = new String[]{};
- public FieldColumn[] FieldColumns = new FieldColumn[]{};
- public String[] GroupFieldNames = new String[] {};
- private String[][] SortFieldNames = new String[][] {};
- private String[] RecordFieldNames = new String[] {};
- public String[][] AggregateFieldNames = new String[][] {};
- public String[] NumericFieldNames = new String[] {};
+ public String[] m_aAllFieldNames = new String[]
+ {
+ };
+ public FieldColumn[] FieldColumns = new FieldColumn[]
+ {
+ };
+ public String[] GroupFieldNames = new String[]
+ {
+ };
+ private String[][] SortFieldNames = new String[][]
+ {
+ };
+ private String[] RecordFieldNames = new String[]
+ {
+ };
+ public String[][] AggregateFieldNames = new String[][]
+ {
+ };
+ public String[] NumericFieldNames = new String[]
+ {
+ };
public String[] NonAggregateFieldNames;
private int CommandType;
private String Command;
boolean bCatalogAtStart = true;
- String sCatalogSep = "";
- String sIdentifierQuote = "";
+ String sCatalogSep = PropertyNames.EMPTY_STRING;
+ String sIdentifierQuote = PropertyNames.EMPTY_STRING;
boolean bCommandComposerAttributesalreadyRetrieved = false;
-
-
private XIndexAccess xIndexKeys;
public CommandMetaData(XMultiServiceFactory xMSF, Locale _aLocale, NumberFormatter oNumberFormatter)
- {
- super(xMSF, _aLocale, oNumberFormatter);
- }
+ {
+ super(xMSF, _aLocale, oNumberFormatter);
+ }
public CommandMetaData(XMultiServiceFactory xMSF)
- {
- super(xMSF);
- }
-
+ {
+ super(xMSF);
+ }
public void initializeFieldColumns(boolean _bgetDefaultValue, String _CommandName, String[] _FieldNames)
+ {
+ this.setCommandName(_CommandName);
+ FieldColumns = new FieldColumn[_FieldNames.length];
+ for (int i = 0; i < _FieldNames.length; i++)
{
- this.setCommandName(_CommandName);
- FieldColumns = new FieldColumn[_FieldNames.length];
- for (int i = 0; i < _FieldNames.length; i++)
- {
- FieldColumns[i] = new FieldColumn(this, _FieldNames[i], this.getCommandName(), false);
+ FieldColumns[i] = new FieldColumn(this, _FieldNames[i], this.getCommandName(), false);
// if (_bgetDefaultValue)
// {
// FieldColumns[i].getDefaultValue();
// }
- }
}
-
+ }
public void initializeFieldColumns(String[] _FieldNames, XNameAccess _xColumns)
+ {
+ FieldColumns = new FieldColumn[_FieldNames.length];
+ for (int i = 0; i < _FieldNames.length; i++)
{
- FieldColumns = new FieldColumn[_FieldNames.length];
- for (int i = 0; i < _FieldNames.length; i++)
- {
- FieldColumns[i] = new FieldColumn(this,_xColumns, _FieldNames[i] );
- }
+ FieldColumns[i] = new FieldColumn(this, _xColumns, _FieldNames[i]);
}
-
+ }
public void initializeFieldColumns(String[] _FieldNames, String _CommandName)
+ {
+ this.setCommandName(_CommandName);
+ FieldColumns = new FieldColumn[_FieldNames.length];
+ for (int i = 0; i < _FieldNames.length; i++)
{
- this.setCommandName(_CommandName);
- FieldColumns = new FieldColumn[_FieldNames.length];
- for (int i = 0; i < _FieldNames.length; i++)
+ FieldColumns[i] = new FieldColumn(this, _FieldNames[i], _CommandName, false);
+ if (FieldTitleSet != null && FieldTitleSet.containsKey(_FieldNames[i]))
{
- FieldColumns[i] = new FieldColumn(this, _FieldNames[i], _CommandName, false);
- if (FieldTitleSet != null)
+ FieldColumns[i].setFieldTitle((String) FieldTitleSet.get(_FieldNames[i]));
+ if (FieldColumns[i].getFieldTitle() == null)
{
- if (FieldTitleSet.containsKey(_FieldNames[i]))
- {
- FieldColumns[i].setFieldTitle( (String) FieldTitleSet.get(_FieldNames[i]) );
- if (FieldColumns[i].getFieldTitle() == null)
- {
- FieldColumns[i].setFieldTitle( _FieldNames[i] );
- FieldTitleSet.put(_FieldNames[i], _FieldNames[i]);
- }
- }
+ FieldColumns[i].setFieldTitle(_FieldNames[i]);
+ FieldTitleSet.put(_FieldNames[i], _FieldNames[i]);
}
}
}
+ }
public Map getFieldTitleSet()
- {
- return FieldTitleSet;
- }
-
+ {
+ return FieldTitleSet;
+ }
public XPropertySet getColumnObjectByFieldName(String _FieldName, boolean _bgetByDisplayName)
+ {
+ try
{
- try
+ FieldColumn CurFieldColumn = null;
+ if (_bgetByDisplayName)
{
- FieldColumn CurFieldColumn = null;
- if (_bgetByDisplayName)
- {
- CurFieldColumn = this.getFieldColumnByDisplayName(_FieldName);
- }
- else
- {
- CurFieldColumn = this.getFieldColumnByFieldName(_FieldName);
- }
- String CurCommandName = CurFieldColumn.getCommandName();
- CommandObject oCommand = getTableByName(CurCommandName);
- Object oColumn = oCommand.getColumns().getByName(CurFieldColumn.getFieldName());
- XPropertySet xColumn = UnoRuntime.queryInterface( XPropertySet.class, oColumn );
- return xColumn;
+ CurFieldColumn = this.getFieldColumnByDisplayName(_FieldName);
}
- catch (Exception exception)
+ else
{
- exception.printStackTrace(System.out);
- return null;
+ CurFieldColumn = this.getFieldColumnByFieldName(_FieldName);
}
+ String CurCommandName = CurFieldColumn.getCommandName();
+ CommandObject oCommand = getTableByName(CurCommandName);
+ Object oColumn = oCommand.getColumns().getByName(CurFieldColumn.getFieldName());
+ return UnoRuntime.queryInterface(XPropertySet.class, oColumn);
}
-
+ catch (Exception exception)
+ {
+ exception.printStackTrace(System.out);
+ return null;
+ }
+ }
// @SuppressWarnings("unchecked")
public void prependSortFieldNames(String[] _fieldnames)
+ {
+ ArrayList aSortFields = new ArrayList();
+ for (int i = 0; i < _fieldnames.length; i++)
{
- Vector aSortFields = new Vector();
- for (int i = 0; i < _fieldnames.length; i++)
+ String[] sSortFieldName = new String[2];
+ sSortFieldName[0] = _fieldnames[i];
+ int index = JavaTools.FieldInTable(SortFieldNames, _fieldnames[i]);
+ if (index > -1)
{
- String[] sSortFieldName = new String[2];
- sSortFieldName[0] = _fieldnames[i];
- int index = JavaTools.FieldInTable(SortFieldNames, _fieldnames[i]);
- if (index > -1)
-
- {
- sSortFieldName[1] = SortFieldNames[index][1];
- }
- else
-
- {
- sSortFieldName[1] = "ASC";
- }
- aSortFields.add(sSortFieldName);
+ sSortFieldName[1] = SortFieldNames[index][1];
}
- for (int i = 0; i < SortFieldNames.length; i++)
+ else
{
- if (JavaTools.FieldInList(_fieldnames, SortFieldNames[i][0]) == -1)
- {
- aSortFields.add(SortFieldNames[i]);
- }
+ sSortFieldName[1] = PropertyNames.ASC;
}
- SortFieldNames = new String[aSortFields.size()][2];
- aSortFields.toArray(SortFieldNames);
+ aSortFields.add(sSortFieldName);
}
-
- public String[][] getSortFieldNames()
+ for (int i = 0; i < SortFieldNames.length; i++)
{
- return SortFieldNames;
+ if (JavaTools.FieldInList(_fieldnames, SortFieldNames[i][0]) == -1)
+ {
+ aSortFields.add(SortFieldNames[i]);
+ }
}
+ SortFieldNames = new String[aSortFields.size()][2];
+ aSortFields.toArray(SortFieldNames);
+ }
+
+ public String[][] getSortFieldNames()
+ {
+ return SortFieldNames;
+ }
+
public void setSortFieldNames(String[][] aNewListList)
- {
- SortFieldNames = aNewListList;
- }
+ {
+ SortFieldNames = aNewListList;
+ }
public FieldColumn getFieldColumn(String _FieldName, String _CommandName)
+ {
+ for (int i = 0; i < FieldColumns.length; i++)
{
- if (FieldColumns.length > 0)
+ if (FieldColumns[i].getFieldName().equals(_FieldName) && FieldColumns[i].getCommandName().equals(_CommandName))
{
- for (int i = 0; i < FieldColumns.length; i++)
- {
- if (FieldColumns[i].getFieldName().equals(_FieldName))
-
- {
- if (FieldColumns[i].getCommandName().equals(_CommandName))
- {
- return FieldColumns[i];
- }
- }
- }
+ return FieldColumns[i];
}
- return null;
}
-
-
+ return null;
+ }
public FieldColumn getFieldColumnByFieldName(String _FieldName)
+ {
+ for (int i = 0; i < FieldColumns.length; i++)
{
- for (int i = 0; i < FieldColumns.length; i++)
+ String sFieldName = FieldColumns[i].getFieldName();
+ if (sFieldName.equals(_FieldName))
+ {
+ return FieldColumns[i];
+ }
+ if (_FieldName.indexOf('.') == -1)
{
- String sFieldName = FieldColumns[i].getFieldName();
- if (sFieldName.equals(_FieldName))
+ String sCompound = Command + "." + _FieldName;
+ if (sFieldName.equals(sCompound))
{
return FieldColumns[i];
}
- if (_FieldName.indexOf('.') == -1)
- {
- String sCompound = Command + "." + _FieldName;
- if (sFieldName.equals(sCompound))
- {
- return FieldColumns[i];
- }
- }
}
- throw new com.sun.star.uno.RuntimeException();
}
-
+ throw new com.sun.star.uno.RuntimeException();
+ }
public FieldColumn getFieldColumnByDisplayName(String _DisplayName)
+ {
+ String identifierQuote = getIdentifierQuote();
+ for (int i = 0; i < FieldColumns.length; i++)
{
- for (int i = 0; i < FieldColumns.length; i++)
+ String sDisplayName = FieldColumns[i].getDisplayFieldName();
+ if (sDisplayName.equals(_DisplayName))
+ {
+ return FieldColumns[i];
+ }
+ if (_DisplayName.indexOf('.') == -1)
{
- String sDisplayName = FieldColumns[i].getDisplayFieldName();
- if (sDisplayName.equals(_DisplayName))
+ String sCompound = Command + "." + _DisplayName;
+ if (sDisplayName.equals(sCompound))
{
return FieldColumns[i];
}
- if (_DisplayName.indexOf('.') == -1)
- {
- String sCompound = Command + "." + _DisplayName;
- if (sDisplayName.equals(sCompound))
- {
- return FieldColumns[i];
- }
- }
}
- throw new com.sun.star.uno.RuntimeException();
+ String quotedName = new StringBuilder(CommandName.quoteName(FieldColumns[i].getCommandName(), identifierQuote)).append('.').append(CommandName.quoteName(FieldColumns[i].getFieldName(), identifierQuote)).toString();
+ if (quotedName.equals(_DisplayName))
+ {
+ return FieldColumns[i];
+ }
}
-
+ throw new com.sun.star.uno.RuntimeException();
+ }
public FieldColumn getFieldColumnByTitle(String _FieldTitle)
+ {
+ for (int i = 0; i < FieldColumns.length; i++)
{
- for (int i = 0; i < FieldColumns.length; i++)
+ if (FieldColumns[i].getFieldTitle().equals(_FieldTitle))
{
- if (FieldColumns[i].getFieldTitle().equals(_FieldTitle))
- {
- return FieldColumns[i];
- }
+ return FieldColumns[i];
}
- // throw new com.sun.star.uno.RuntimeException();
- // LLA: Group works with fields direct
- for (int i = 0; i < FieldColumns.length; i++)
+ }
+ // throw new com.sun.star.uno.RuntimeException();
+ // LLA: Group works with fields direct
+ for (int i = 0; i < FieldColumns.length; i++)
+ {
+ if (FieldColumns[i].getFieldName().equals(_FieldTitle))
{
- if (FieldColumns[i].getFieldName().equals(_FieldTitle))
- {
- return FieldColumns[i];
- }
+ return FieldColumns[i];
}
- throw new com.sun.star.uno.RuntimeException();
}
-
+ throw new com.sun.star.uno.RuntimeException();
+ }
public boolean getFieldNamesOfCommand(String _commandname, int _commandtype, boolean _bAppendMode)
+ {
+ try
{
- try
+ // Object oField;
+ java.util.ArrayList<String> ResultFieldNames = new java.util.ArrayList<String>(10);
+ String[] FieldNames;
+ CommandObject oCommand = this.getCommandByName(_commandname, _commandtype);
+ FieldNames = oCommand.getColumns().getElementNames();
+ if (FieldNames.length > 0)
{
- // Object oField;
- java.util.Vector<String> ResultFieldNames = new java.util.Vector<String>(10);
- String[] FieldNames;
- CommandObject oCommand = this.getCommandByName(_commandname, _commandtype);
- FieldNames = oCommand.getColumns().getElementNames();
- if (FieldNames.length > 0)
+ for (int n = 0; n < FieldNames.length; n++)
{
- for (int n = 0; n < FieldNames.length; n++)
+ final String sFieldName = FieldNames[n];
+ Object oField = oCommand.getColumns().getByName(sFieldName);
+ int iType = AnyConverter.toInt(Helper.getUnoPropertyValue(oField, "Type"));
+ // BinaryFieldTypes are not included in the WidthList
+ if (JavaTools.FieldInIntTable(WidthList, iType) >= 0)
{
- final String sFieldName = FieldNames[n];
- Object oField = oCommand.getColumns().getByName(sFieldName);
- int iType = AnyConverter.toInt(Helper.getUnoPropertyValue(oField, "Type"));
- // BinaryFieldTypes are not included in the WidthList
- if (JavaTools.FieldInIntTable(WidthList, iType) >= 0)
- {
// if (_bAppendMode)
// ResultFieldNames.addElement(_commandname + "." + FieldNames[n]);
// else
- ResultFieldNames.addElement(sFieldName);
- }
- else if (JavaTools.FieldInIntTable(BinaryTypes, iType) >= 0)
- {
- ResultFieldNames.addElement(sFieldName);
- }
+ ResultFieldNames.add(sFieldName);
+ }
+ else if (JavaTools.FieldInIntTable(BinaryTypes, iType) >= 0)
+ {
+ ResultFieldNames.add(sFieldName);
}
- // FieldNames = new String[FieldNames.length];
- // FieldTypes = new int[FieldNames.length];
- m_aAllFieldNames = new String[ResultFieldNames.size()];
- ResultFieldNames.copyInto(m_aAllFieldNames);
- return true;
}
+ // FieldNames = new String[FieldNames.length];
+ // FieldTypes = new int[FieldNames.length];
+ m_aAllFieldNames = new String[ResultFieldNames.size()];
+ m_aAllFieldNames = ResultFieldNames.toArray(m_aAllFieldNames);
+ return true;
}
- catch (Exception exception)
- {
- exception.printStackTrace(System.out);
- }
- Resource oResource = new Resource(xMSF, "Database", "dbw");
- String sMsgNoFieldsFromCommand = oResource.getResText(RID_DB_COMMON + 45);
- sMsgNoFieldsFromCommand = JavaTools.replaceSubString(sMsgNoFieldsFromCommand, _commandname, "%NAME");
- showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sMsgNoFieldsFromCommand);
- return false;
}
-
-
-
-
-
+ catch (Exception exception)
+ {
+ exception.printStackTrace(System.out);
+ }
+ Resource oResource = new Resource(xMSF, "Database", "dbw");
+ String sMsgNoFieldsFromCommand = oResource.getResText(RID_DB_COMMON + 45);
+ sMsgNoFieldsFromCommand = JavaTools.replaceSubString(sMsgNoFieldsFromCommand, _commandname, "%NAME");
+ showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sMsgNoFieldsFromCommand);
+ return false;
+ }
public String[] getOrderableColumns(String[] _fieldnames)
+ {
+ ArrayList<String> aOrderableColumns = new ArrayList<String>();
+ for (int i = 0; i < _fieldnames.length; i++)
{
- Vector<String> aOrderableColumns = new Vector<String>();
- int ncount = 0;
- for (int i = 0; i < _fieldnames.length; i++)
+ FieldColumn ofieldcolumn = getFieldColumnByFieldName(_fieldnames[i]);
+ if (getDBDataTypeInspector().isColumnOrderable(ofieldcolumn.getXColumnPropertySet()))
{
- FieldColumn ofieldcolumn = getFieldColumnByFieldName(_fieldnames[i]);
- if (getDBDataTypeInspector().isColumnOrderable(ofieldcolumn.getXColumnPropertySet()))
- {
- aOrderableColumns.addElement(_fieldnames[i]);
- ncount++;
- }
+ aOrderableColumns.add(_fieldnames[i]);
}
- String[] sretfieldnames = new String[ncount];
- aOrderableColumns.toArray(sretfieldnames);
- return sretfieldnames;
}
-
+ String[] sretfieldnames = new String[aOrderableColumns.size()];
+ return aOrderableColumns.toArray(sretfieldnames);
+ }
/**
* @return Returns the command.
*/
public String getCommandName()
- {
- return Command;
- }
+ {
+ return Command;
+ }
+
/**
* @param _command The command to set.
*/
public void setCommandName(String _command)
- {
- Command = _command;
- }
+ {
+ Command = _command;
+ }
/**
* @return Returns the commandType.
*/
public int getCommandType()
- {
- return CommandType;
- }
+ {
+ return CommandType;
+ }
/**
* @param _commandType The commandType to set.
*/
public void setCommandType(int _commandType)
- {
- CommandType = _commandType;
- }
-
+ {
+ CommandType = _commandType;
+ }
public boolean isnumeric(FieldColumn _oFieldColumn)
+ {
+ try
{
- try
+ CommandObject oTable = super.getTableByName(_oFieldColumn.getCommandName());
+ Object oField = oTable.getColumns().getByName(_oFieldColumn.getFieldName());
+ int iType = AnyConverter.toInt(Helper.getUnoPropertyValue(oField, "Type"));
+ int ifound = java.util.Arrays.binarySearch(NumericTypes, iType);
+ if ((ifound < NumericTypes.length) && (ifound > 0))
{
- CommandObject oTable = super.getTableByName(_oFieldColumn.getCommandName());
- Object oField = oTable.getColumns().getByName(_oFieldColumn.getFieldName());
- int iType = AnyConverter.toInt(Helper.getUnoPropertyValue(oField, "Type"));
- int ifound = java.util.Arrays.binarySearch(NumericTypes, iType);
- if ((ifound < NumericTypes.length) && (ifound > 0))
- {
- return (NumericTypes[ifound] == iType);
- }
- else
- {
- return false;
- }
+ return (NumericTypes[ifound] == iType);
}
- catch (Exception exception)
+ else
{
- exception.printStackTrace(System.out);
return false;
}
}
+ catch (Exception exception)
+ {
+ exception.printStackTrace(System.out);
+ return false;
+ }
+ }
public String[] setNumericFields()
+ {
+ try
{
- try
+ ArrayList<String> numericfieldsvector = new java.util.ArrayList<String>();
+ for (int i = 0; i < FieldColumns.length; i++)
{
- Vector<String> numericfieldsvector = new java.util.Vector<String>();
- for (int i = 0; i < FieldColumns.length; i++)
+ if (isnumeric(FieldColumns[i]))
{
- if (isnumeric(FieldColumns[i]))
- {
- numericfieldsvector.addElement(FieldColumns[i].getDisplayFieldName());
- }
+ numericfieldsvector.add(FieldColumns[i].getDisplayFieldName());
}
- NumericFieldNames = new String[numericfieldsvector.size()];
- numericfieldsvector.toArray(NumericFieldNames);
- return NumericFieldNames;
- }
- catch (Exception exception)
- {
- exception.printStackTrace(System.out);
- return new String[]{};
}
+ NumericFieldNames = new String[numericfieldsvector.size()];
+ numericfieldsvector.toArray(NumericFieldNames);
+ return NumericFieldNames;
}
+ catch (Exception exception)
+ {
+ exception.printStackTrace(System.out);
+ return new String[]
+ {
+ };
+ }
+ }
public String[] getFieldNames(String[] _sDisplayFieldNames, String _sCommandName)
+ {
+ ArrayList<String> sFieldNamesVector = new java.util.ArrayList<String>();
+ for (int i = 0; i < FieldColumns.length; i++)
{
- Vector<String> sFieldNamesVector = new java.util.Vector<String>();
- for (int i = 0; i < FieldColumns.length; i++)
+ if (_sCommandName.equals(FieldColumns[i].getCommandName()) && JavaTools.FieldInList(_sDisplayFieldNames, FieldColumns[i].getDisplayFieldName()) > -1)
{
- if (_sCommandName.equals(FieldColumns[i].getCommandName()))
- {
- if (JavaTools.FieldInList(_sDisplayFieldNames, FieldColumns[i].getDisplayFieldName()) > -1)
- {
- sFieldNamesVector.addElement(FieldColumns[i].getFieldName());
- }
- }
+ sFieldNamesVector.add(FieldColumns[i].getFieldName());
}
- String[] sFieldNames = new String[sFieldNamesVector.size()];
- sFieldNamesVector.toArray(sFieldNames);
- return sFieldNames;
}
-
-
+ String[] sFieldNames = new String[sFieldNamesVector.size()];
+ sFieldNamesVector.toArray(sFieldNames);
+ return sFieldNames;
+ }
public String[] getFieldNames()
+ {
+ String[] sFieldNames = new String[FieldColumns.length];
+ for (int i = 0; i < FieldColumns.length; i++)
{
- String[] sFieldNames = new String[FieldColumns.length];
- for (int i = 0; i < FieldColumns.length; i++)
- {
- sFieldNames[i] = FieldColumns[i].getFieldName();
- }
- return sFieldNames;
+ sFieldNames[i] = FieldColumns[i].getFieldName();
}
+ return sFieldNames;
+ }
public String[] getDisplayFieldNames()
+ {
+ String[] sDisplayFieldNames = new String[FieldColumns.length];
+ for (int i = 0; i < FieldColumns.length; i++)
{
- String[] sDisplayFieldNames = new String[FieldColumns.length];
- for (int i = 0; i < FieldColumns.length; i++)
- {
- sDisplayFieldNames[i] = FieldColumns[i].getDisplayFieldName();
- }
- return sDisplayFieldNames;
+ sDisplayFieldNames[i] = FieldColumns[i].getDisplayFieldName();
}
-
+ return sDisplayFieldNames;
+ }
public String[] setNonAggregateFieldNames()
+ {
+ try
{
- try
+ ArrayList<String> nonaggregatefieldsvector = new java.util.ArrayList<String>();
+ for (int i = 0; i < FieldColumns.length; i++)
{
- Vector<String> nonaggregatefieldsvector = new java.util.Vector<String>();
- for (int i = 0; i < FieldColumns.length; i++)
+ if (JavaTools.FieldInTable(AggregateFieldNames, FieldColumns[i].getDisplayFieldName()) == -1)
{
- if (JavaTools.FieldInTable(AggregateFieldNames, FieldColumns[i].getDisplayFieldName()) == -1)
- {
- nonaggregatefieldsvector.addElement(FieldColumns[i].getDisplayFieldName());
- }
+ nonaggregatefieldsvector.add(FieldColumns[i].getDisplayFieldName());
}
- NonAggregateFieldNames = new String[nonaggregatefieldsvector.size()];
- nonaggregatefieldsvector.toArray(NonAggregateFieldNames);
- return NonAggregateFieldNames;
- }
- catch (Exception exception)
- {
- exception.printStackTrace(System.out);
- return new String[]{};
}
+ NonAggregateFieldNames = new String[nonaggregatefieldsvector.size()];
+ nonaggregatefieldsvector.toArray(NonAggregateFieldNames);
+ return NonAggregateFieldNames;
}
+ catch (Exception exception)
+ {
+ exception.printStackTrace(System.out);
+ return new String[]
+ {
+ };
+ }
+ }
/**
* the fieldnames passed over are not necessarily the ones that are defined in the class
@@ -508,265 +493,246 @@ public class CommandMetaData extends DBMetaData
* @return
*/
public boolean hasNumericalFields(String[] _DisplayFieldNames)
-
+ {
+ if (_DisplayFieldNames != null && _DisplayFieldNames.length > 0)
{
- if (_DisplayFieldNames != null)
+ for (int i = 0; i < _DisplayFieldNames.length; i++)
{
- if (_DisplayFieldNames.length > 0)
+ if (isnumeric(getFieldColumnByDisplayName(_DisplayFieldNames[i])))
{
- for (int i = 0; i < _DisplayFieldNames.length; i++)
- {
- if (isnumeric(getFieldColumnByDisplayName(_DisplayFieldNames[i])))
- {
- return true;
- }
- }
+ return true;
}
}
- return false;
}
+ return false;
+ }
public String getFieldTitle(String FieldName)
+ {
+ String FieldTitle = FieldName;
+ if (this.FieldTitleSet != null)
{
- String FieldTitle = FieldName;
- if (this.FieldTitleSet != null)
+ FieldTitle = (String) this.FieldTitleSet.get(FieldName); //FieldTitles[TitleIndex];
+ if (FieldTitle == null)
{
- FieldTitle = (String) this.FieldTitleSet.get(FieldName); //FieldTitles[TitleIndex];
- if (FieldTitle == null)
- {
- return FieldName;
- }
+ return FieldName;
}
- return FieldTitle;
}
-
+ return FieldTitle;
+ }
public void setFieldTitles(String[] sFieldTitles)
+ {
+ int nFieldColLength = FieldColumns.length;
+ for (int i = 0; i < sFieldTitles.length; i++)
{
- int nFieldColLength = FieldColumns.length;
- for (int i = 0; i < sFieldTitles.length; i++)
+ if (i < nFieldColLength)
{
- if (i < nFieldColLength)
- {
- FieldColumns[i].setFieldTitle(sFieldTitles[i]);
- }
-
+ FieldColumns[i].setFieldTitle(sFieldTitles[i]);
}
- }
+ }
+ }
public String[] getFieldTitles()
+ {
+ String[] sFieldTitles = new String[FieldColumns.length];
+ for (int i = 0; i < FieldColumns.length; i++)
{
- String[] sFieldTitles = new String[FieldColumns.length];
- for (int i = 0; i < FieldColumns.length; i++)
- {
- sFieldTitles[i] = FieldColumns[i].getFieldTitle();
- }
- return sFieldTitles;
+ sFieldTitles[i] = FieldColumns[i].getFieldTitle();
}
-
+ return sFieldTitles;
+ }
public void setGroupFieldNames(String[] GroupFieldNames)
- {
- this.GroupFieldNames = GroupFieldNames;
- }
-
+ {
+ this.GroupFieldNames = GroupFieldNames;
+ }
public String[] getGroupFieldNames()
- {
- return GroupFieldNames;
- }
+ {
+ return GroupFieldNames;
+ }
public void createRecordFieldNames()
- {
- String CurFieldName;
- int GroupFieldCount;
- int TotFieldCount = FieldColumns.length;
- // int SortFieldCount = SortFieldNames[0].length;
- GroupFieldCount = JavaTools.getArraylength(GroupFieldNames);
- RecordFieldNames = new String[TotFieldCount - GroupFieldCount];
+ {
+ String CurFieldName;
+ int GroupFieldCount;
+ int TotFieldCount = FieldColumns.length;
+ // int SortFieldCount = SortFieldNames[0].length;
+ GroupFieldCount = JavaTools.getArraylength(GroupFieldNames);
+ RecordFieldNames = new String[TotFieldCount - GroupFieldCount];
- int a = 0;
- for (int i = 0; i < TotFieldCount; i++)
+ int a = 0;
+ for (int i = 0; i < TotFieldCount; i++)
+ {
+ CurFieldName = FieldColumns[i].getFieldName();
+ if (JavaTools.FieldInList(GroupFieldNames, CurFieldName) < 0)
{
- CurFieldName = FieldColumns[i].getFieldName();
- if (JavaTools.FieldInList(GroupFieldNames, CurFieldName) < 0)
- {
- RecordFieldNames[a] = CurFieldName;
- // a += 1;
- ++a;
- }
+ RecordFieldNames[a] = CurFieldName;
+ // a += 1;
+ ++a;
}
}
- public void setRecordFieldNames(String [] _aNewList)
- {
- RecordFieldNames = _aNewList;
- }
- public String[] getRecordFieldNames()
- {
- return RecordFieldNames;
- }
- public String getRecordFieldName(int i)
- {
- return RecordFieldNames[i];
- }
+ }
+
+ public void setRecordFieldNames(String[] _aNewList)
+ {
+ RecordFieldNames = _aNewList;
+ }
+
+ public String[] getRecordFieldNames()
+ {
+ return RecordFieldNames;
+ }
+
+ public String getRecordFieldName(int i)
+ {
+ return RecordFieldNames[i];
+ }
/**@deprecated use 'RelationController' class instead
- *
+ *
* @param _stablename
* @param _ncommandtype
* @return
*/
public String[] getReferencedTables(String _stablename, int _ncommandtype)
+ {
+ String[] sTotReferencedTables = new String[]
{
- String[] sTotReferencedTables = new String[]{};
- try
+ };
+ try
+ {
+ if (_ncommandtype == com.sun.star.sdb.CommandType.TABLE && xDBMetaData.supportsIntegrityEnhancementFacility())
{
- if (_ncommandtype == com.sun.star.sdb.CommandType.TABLE)
+ java.util.ArrayList<String> TableVector = new java.util.ArrayList<String>();
+ Object oTable = getTableNamesAsNameAccess().getByName(_stablename);
+ XKeysSupplier xKeysSupplier = UnoRuntime.queryInterface(XKeysSupplier.class, oTable);
+ xIndexKeys = xKeysSupplier.getKeys();
+ for (int i = 0; i < xIndexKeys.getCount(); i++)
{
- if (xDBMetaData.supportsIntegrityEnhancementFacility())
+ XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xIndexKeys.getByIndex(i));
+ int curtype = AnyConverter.toInt(xPropertySet.getPropertyValue("Type"));
+ if (curtype == KeyType.FOREIGN)
{
- java.util.Vector<String> TableVector = new java.util.Vector<String>();
- Object oTable = getTableNamesAsNameAccess().getByName(_stablename);
- XKeysSupplier xKeysSupplier = UnoRuntime.queryInterface( XKeysSupplier.class, oTable );
- xIndexKeys = xKeysSupplier.getKeys();
- for (int i = 0; i < xIndexKeys.getCount(); i++)
- {
- XPropertySet xPropertySet = UnoRuntime.queryInterface( XPropertySet.class, xIndexKeys.getByIndex( i ) );
- 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))
- {
- TableVector.addElement(sreftablename);
- }
- }
- }
- if (TableVector.size() > 0)
+ // getImportedKeys (RelationController.cxx /source/ui/relationdesign) /Zeile 475
+ String sreftablename = AnyConverter.toString(xPropertySet.getPropertyValue("ReferencedTable"));
+ if (getTableNamesAsNameAccess().hasByName(sreftablename))
{
- sTotReferencedTables = new String[TableVector.size()];
- TableVector.copyInto(sTotReferencedTables);
+ TableVector.add(sreftablename);
}
}
}
+ if (TableVector.size() > 0)
+ {
+ sTotReferencedTables = new String[TableVector.size()];
+ TableVector.toArray(sTotReferencedTables);
+ }
}
- catch (Exception e)
- {
- e.printStackTrace(System.out);
- }
- return sTotReferencedTables;
}
+ catch (Exception e)
+ {
+ e.printStackTrace(System.out);
+ }
+ return sTotReferencedTables;
+ }
/**@deprecated use 'RelationController' class instead
- *
+ *
* @param _sreferencedtablename
* @return
*/
public String[][] getKeyColumns(String _sreferencedtablename)
+ {
+ String[][] skeycolumnnames = null;
+ try
{
- String[][] skeycolumnnames = null;
- try
+ for (int i = 0; i < xIndexKeys.getCount(); i++)
{
- for (int i = 0; i < xIndexKeys.getCount(); i++)
+ XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xIndexKeys.getByIndex(i));
+ int curtype = AnyConverter.toInt(xPropertySet.getPropertyValue("Type"));
+ if (curtype == KeyType.FOREIGN)
{
- XPropertySet xPropertySet = UnoRuntime.queryInterface( XPropertySet.class, xIndexKeys.getByIndex( i ) );
- int curtype = AnyConverter.toInt(xPropertySet.getPropertyValue("Type"));
- if (curtype == KeyType.FOREIGN)
+ String scurreftablename = AnyConverter.toString(xPropertySet.getPropertyValue("ReferencedTable"));
+ if (getTableNamesAsNameAccess().hasByName(scurreftablename))
{
- String scurreftablename = AnyConverter.toString(xPropertySet.getPropertyValue("ReferencedTable"));
- if (getTableNamesAsNameAccess().hasByName(scurreftablename))
+ if (scurreftablename.equals(_sreferencedtablename))
{
- if (scurreftablename.equals(_sreferencedtablename))
+ XColumnsSupplier xColumnsSupplier = UnoRuntime.queryInterface(XColumnsSupplier.class, xPropertySet);
+ String[] smastercolnames = xColumnsSupplier.getColumns().getElementNames();
+ skeycolumnnames = new String[2][smastercolnames.length];
+ skeycolumnnames[0] = smastercolnames;
+ skeycolumnnames[1] = new String[smastercolnames.length];
+ for (int n = 0; n < smastercolnames.length; n++)
{
- XColumnsSupplier xColumnsSupplier = UnoRuntime.queryInterface( XColumnsSupplier.class, xPropertySet );
- String[] smastercolnames = xColumnsSupplier.getColumns().getElementNames();
- skeycolumnnames = new String[2][smastercolnames.length];
- skeycolumnnames[0] = smastercolnames;
- skeycolumnnames[1] = new String[smastercolnames.length];
- for (int n = 0; n < smastercolnames.length; n++)
- {
- XPropertySet xcolPropertySet = UnoRuntime.queryInterface( XPropertySet.class, xColumnsSupplier.getColumns().getByName( smastercolnames[n] ) );
- skeycolumnnames[1][n] = AnyConverter.toString(xcolPropertySet.getPropertyValue("RelatedColumn"));
- }
- return skeycolumnnames;
+ XPropertySet xcolPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xColumnsSupplier.getColumns().getByName(smastercolnames[n]));
+ skeycolumnnames[1][n] = AnyConverter.toString(xcolPropertySet.getPropertyValue("RelatedColumn"));
}
+ return skeycolumnnames;
}
}
}
}
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return skeycolumnnames;
}
-
-
- public void openFormDocument(boolean _bReadOnly)
+ catch (Exception e)
{
- try
- {
- Object oEmbeddedFactory = super.xMSF.createInstance("com.sun.star.embed.OOoEmbeddedObjectFactory");
- int iEntryInitMode = EntryInitModes.DEFAULT_INIT; //TRUNCATE_INIT???
- }
- catch (Exception e)
- {
- e.printStackTrace(System.out);
- }
+ e.printStackTrace();
}
+ return skeycolumnnames;
+ }
+ public void openFormDocument(boolean _bReadOnly)
+ {
+ }
public void setCommandComposingAttributes()
+ {
+ try
{
- try
- {
- boolean bCatalogAtStart2 = xDBMetaData.isCatalogAtStart();
- sCatalogSep = xDBMetaData.getCatalogSeparator();
- sIdentifierQuote = xDBMetaData.getIdentifierQuoteString();
- bCommandComposerAttributesalreadyRetrieved = true;
- }
- catch (SQLException e)
- {
- e.printStackTrace(System.out);
- }
+ sCatalogSep = xDBMetaData.getCatalogSeparator();
+ sIdentifierQuote = xDBMetaData.getIdentifierQuoteString();
+ bCommandComposerAttributesalreadyRetrieved = true;
}
-
+ catch (SQLException e)
+ {
+ e.printStackTrace(System.out);
+ }
+ }
/**
* @return Returns the bCatalogAtStart.
*/
public boolean isCatalogAtStart()
+ {
+ if (!bCommandComposerAttributesalreadyRetrieved)
{
- if (!bCommandComposerAttributesalreadyRetrieved)
- {
- setCommandComposingAttributes();
- }
- return bCatalogAtStart;
+ setCommandComposingAttributes();
}
+ return bCatalogAtStart;
+ }
/**
* @return Returns the sCatalogSep.
*/
public String getCatalogSeparator()
+ {
+ if (!bCommandComposerAttributesalreadyRetrieved)
{
- if (!bCommandComposerAttributesalreadyRetrieved)
- {
- setCommandComposingAttributes();
- }
- return sCatalogSep;
+ setCommandComposingAttributes();
}
+ return sCatalogSep;
+ }
/**
* @return Returns the sIdentifierQuote.
*/
public String getIdentifierQuote()
+ {
+ if (!bCommandComposerAttributesalreadyRetrieved)
{
- if (!bCommandComposerAttributesalreadyRetrieved)
- {
- setCommandComposingAttributes();
- }
- return sIdentifierQuote;
+ setCommandComposingAttributes();
}
+ return sIdentifierQuote;
+ }
}
diff --git a/wizards/com/sun/star/wizards/db/CommandName.java b/wizards/com/sun/star/wizards/db/CommandName.java
index aa8a4f9c7ea9..09b4eec28c8b 100644
--- a/wizards/com/sun/star/wizards/db/CommandName.java
+++ b/wizards/com/sun/star/wizards/db/CommandName.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,17 +29,18 @@ package com.sun.star.wizards.db;
import com.sun.star.sdbc.SQLException;
import com.sun.star.uno.Exception;
import com.sun.star.wizards.common.JavaTools;
+import com.sun.star.wizards.common.PropertyNames;
public class CommandName
{
protected CommandMetaData oCommandMetaData;
- protected String CatalogName = "";
- protected String SchemaName = "";
- protected String TableName = "";
- protected String DisplayName = "";
- protected String ComposedName = "";
- protected String AliasName = "";
+ protected String CatalogName = PropertyNames.EMPTY_STRING;
+ protected String SchemaName = PropertyNames.EMPTY_STRING;
+ protected String TableName = PropertyNames.EMPTY_STRING;
+ protected String DisplayName = PropertyNames.EMPTY_STRING;
+ protected String ComposedName = PropertyNames.EMPTY_STRING;
+ protected String AliasName = PropertyNames.EMPTY_STRING;
protected boolean bCatalogAtStart;
protected String sCatalogSep;
protected String sIdentifierQuote;
@@ -59,21 +60,21 @@ public class CommandName
oCommandMetaData = _CommandMetaData;
if ((_CatalogName != null) && (oCommandMetaData.xDBMetaData.supportsCatalogsInTableDefinitions()))
{
- if (!_CatalogName.equals(""))
+ if (!_CatalogName.equals(PropertyNames.EMPTY_STRING))
{
CatalogName = _CatalogName;
}
}
if ((_SchemaName != null) && (oCommandMetaData.xDBMetaData.supportsSchemasInTableDefinitions()))
{
- if (!_SchemaName.equals(""))
+ if (!_SchemaName.equals(PropertyNames.EMPTY_STRING))
{
SchemaName = _SchemaName;
}
}
if (_TableName != null)
{
- if (!_TableName.equals(""))
+ if (!_TableName.equals(PropertyNames.EMPTY_STRING))
{
TableName = _TableName;
}
@@ -94,12 +95,12 @@ public class CommandName
{
this.DisplayName = _DisplayName;
int iIndex;
- if (oCommandMetaData.xDBMetaData.supportsCatalogsInDataManipulation() == true)
+ if (oCommandMetaData.xDBMetaData.supportsCatalogsInDataManipulation())
{ // ...dann Catalog mit in TableName
iIndex = _DisplayName.indexOf(sCatalogSep);
if (iIndex >= 0)
{
- if (bCatalogAtStart == true)
+ if (bCatalogAtStart)
{
CatalogName = _DisplayName.substring(0, iIndex);
_DisplayName = _DisplayName.substring(iIndex + 1, _DisplayName.length());
@@ -111,13 +112,13 @@ public class CommandName
}
}
}
- if (oCommandMetaData.xDBMetaData.supportsSchemasInDataManipulation() == true)
+ if (oCommandMetaData.xDBMetaData.supportsSchemasInDataManipulation())
{
String[] NameList;
NameList = new String[0];
NameList = JavaTools.ArrayoutofString(_DisplayName, ".");
SchemaName = NameList[0];
- TableName = NameList[1]; // TODO Was ist mit diesem Fall: CatalogSep = "." und CatalogName = ""
+ TableName = NameList[1]; // TODO Was ist mit diesem Fall: CatalogSep = "." und CatalogName = PropertyNames.EMPTY_STRING
}
else
{
@@ -138,9 +139,9 @@ public class CommandName
{
if (CatalogName != null)
{
- if (!CatalogName.equals(""))
+ if (!CatalogName.equals(PropertyNames.EMPTY_STRING))
{
- if (bCatalogAtStart == true)
+ if (bCatalogAtStart)
{
ComposedName = quoteName(CatalogName) + sCatalogSep;
}
@@ -148,12 +149,12 @@ public class CommandName
}
if (SchemaName != null)
{
- if (!SchemaName.equals(""))
+ if (!SchemaName.equals(PropertyNames.EMPTY_STRING))
{
ComposedName += quoteName(SchemaName) + ".";
}
}
- if (ComposedName.equals(""))
+ if (ComposedName.equals(PropertyNames.EMPTY_STRING))
{
ComposedName = quoteName(TableName);
}
@@ -161,9 +162,9 @@ public class CommandName
{
ComposedName += quoteName(TableName);
}
- if ((bCatalogAtStart == false) && (CatalogName != null))
+ if ((!bCatalogAtStart) && (CatalogName != null))
{
- if (!CatalogName.equals(""))
+ if (!CatalogName.equals(PropertyNames.EMPTY_STRING))
{
ComposedName += sCatalogSep + quoteName(CatalogName);
}
@@ -203,11 +204,9 @@ public class CommandName
{
if (sName == null)
{
- sName = "";
+ sName = PropertyNames.EMPTY_STRING;
}
- String ReturnQuote = "";
- ReturnQuote = _sIdentifierQuote + sName + _sIdentifierQuote;
- return ReturnQuote;
+ return new StringBuilder(_sIdentifierQuote).append(sName).append(_sIdentifierQuote).toString();
}
public void setAliasName(String _AliasName)
diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java
index 5a151937d73f..620e5e7d44f7 100644
--- a/wizards/com/sun/star/wizards/db/DBMetaData.java
+++ b/wizards/com/sun/star/wizards/db/DBMetaData.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -142,7 +142,6 @@ public class DBMetaData
private int iMaxColumnsInSelect;
private int iMaxColumnsInGroupBy;
- private int iMaxColumnsInTable;
private int iMaxColumnNameLength = -1;
private int iMaxTableNameLength = -1;
private boolean bPasswordIsRequired;
@@ -187,7 +186,7 @@ public class DBMetaData
}
catch (Exception e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
}
}
return oNumberFormatter;
@@ -215,9 +214,9 @@ public class DBMetaData
xNameAccess = UnoRuntime.queryInterface( XNameAccess.class, xDatabaseContext );
DataSourceNames = xNameAccess.getElementNames();
}
- catch (Exception exception)
+ catch (Exception e)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
}
}
@@ -326,9 +325,9 @@ public class DBMetaData
// TODO: Performance leak getColumns() take very long.
xColumns = UnoRuntime.queryInterface( XNameAccess.class, xCommandCols.getColumns() );
}
- catch (Exception exception)
+ catch (Exception e)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
}
}
public XNameAccess getColumns()
@@ -357,7 +356,7 @@ public class DBMetaData
}
catch (Exception e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
}
return bHasEscapeProcessing;
}
@@ -372,8 +371,7 @@ public class DBMetaData
public XNameAccess getTableNamesAsNameAccess()
{
XTablesSupplier xDBTables = UnoRuntime.queryInterface( XTablesSupplier.class, DBConnection );
- XNameAccess xTableNames = xDBTables.getTables();
- return xTableNames;
+ return xDBTables.getTables();
}
public String[] getQueryNames()
@@ -425,7 +423,7 @@ public class DBMetaData
// NumericTypes are all types where aggregate functions can be performed on.
// Similarly to a major competitor date/time/timmestamp fields are not included
-
+
}
public boolean isBinaryDataType(int _itype)
@@ -453,7 +451,7 @@ public class DBMetaData
}
catch (SQLException e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
return - 1;
}
}
@@ -488,7 +486,7 @@ public class DBMetaData
public int getMaxColumnsInTable() throws SQLException
{
- iMaxColumnsInTable = xDBMetaData.getMaxColumnsInTable();
+ int iMaxColumnsInTable = xDBMetaData.getMaxColumnsInTable();
if (iMaxColumnsInTable == 0)
{
iMaxColumnsInTable = DBMetaData.NOLIMIT;
@@ -507,7 +505,7 @@ public class DBMetaData
}
catch (SQLException e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
}
}
@@ -530,7 +528,7 @@ public class DBMetaData
}
catch (Exception e)
{
- e.printStackTrace();
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
}
return isSQL92CheckEnabled;
}
@@ -579,9 +577,9 @@ public class DBMetaData
xModel = xDocu.getDatabaseDocument();
}
}
- catch (Exception exception)
+ catch (Exception e)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
}
}
@@ -596,9 +594,9 @@ public class DBMetaData
try
{
XConnection xConnection = null;
- if (Properties.hasPropertyValue(curproperties, "ActiveConnection"))
+ if (Properties.hasPropertyValue(curproperties, PropertyNames.ACTIVE_CONNECTION))
{
- xConnection = UnoRuntime.queryInterface( XConnection.class, Properties.getPropertyValue( curproperties, "ActiveConnection" ) );
+ xConnection = UnoRuntime.queryInterface( XConnection.class, Properties.getPropertyValue( curproperties, PropertyNames.ACTIVE_CONNECTION ) );
if (xConnection != null)
{
com.sun.star.container.XChild child = UnoRuntime.queryInterface( com.sun.star.container.XChild.class, xConnection );
@@ -645,23 +643,18 @@ public class DBMetaData
String sDataSourceName = AnyConverter.toString(Properties.getPropertyValue(curproperties, "DatabaseLocation"));
return getConnection(sDataSourceName);
}
- else if (xConnection != null)
- {
- bdisposeConnection = false;
- return getConnection(xConnection);
- }
}
catch (IllegalArgumentException e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
}
catch (UnknownPropertyException e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
}
catch (WrappedTargetException e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
}
return false;
@@ -684,7 +677,7 @@ public class DBMetaData
}
catch (Exception e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
return false;
}
}
@@ -701,9 +694,9 @@ public class DBMetaData
xConnectionComponent.dispose();
}
getDataSourceInterfaces();
- if (bPasswordIsRequired == false)
+ if (!bPasswordIsRequired)
{
- DBConnection = _dataSource.getConnection("", "");
+ DBConnection = _dataSource.getConnection(PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING);
bgetConnection = true;
}
else
@@ -717,7 +710,7 @@ public class DBMetaData
{
DBConnection = xCompleted2.connectWithCompletion( xInteractionHandler );
bgetConnection = DBConnection != null;
- if (bgetConnection == false)
+ if (!bgetConnection)
{
bExitLoop = true;
}
@@ -731,9 +724,9 @@ public class DBMetaData
bgetConnection = false;
}
}
- while (bExitLoop == false);
+ while (!bExitLoop);
}
- if (bgetConnection == false)
+ if (!bgetConnection)
{
String sMsgConnectionImpossible = oResource.getResText(RID_DB_COMMON + 35);
showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sMsgConnectionImpossible);
@@ -746,11 +739,11 @@ public class DBMetaData
}
return bgetConnection;
}
- catch (Exception exception)
+ catch (Exception e)
{
String sMsgConnectionImpossible = oResource.getResText(RID_DB_COMMON + 35);
showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sMsgConnectionImpossible);
- exception.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
return false;
}
}
@@ -767,7 +760,7 @@ public class DBMetaData
}
catch (SQLException e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
return 0;
}
}
@@ -784,7 +777,7 @@ public class DBMetaData
}
catch (SQLException e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
return 0;
}
}
@@ -816,7 +809,7 @@ public class DBMetaData
}
catch (SQLException e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
return false;
}
}
@@ -852,7 +845,7 @@ public class DBMetaData
XPropertySet xPSet = UnoRuntime.queryInterface( XPropertySet.class, oQuery );
String s = _oSQLQueryComposer.m_xQueryAnalyzer.getQuery();
- xPSet.setPropertyValue("Command", s);
+ xPSet.setPropertyValue(PropertyNames.COMMAND, s);
XNameContainer xNameCont = UnoRuntime.queryInterface( XNameContainer.class, xQueryDefs );
m_connectionTools.getObjectNames().checkNameForCreate(com.sun.star.sdb.CommandType.QUERY, _QueryName);
@@ -877,13 +870,13 @@ public class DBMetaData
}
exception.printStackTrace(System.out);
}
- catch (SQLException exception)
+ catch (SQLException e)
{
- callSQLErrorMessageDialog(exception, null);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
}
- catch (Exception exception)
+ catch (Exception e)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
}
return false;
}
@@ -900,15 +893,13 @@ public class DBMetaData
{
XReportDocumentsSupplier xReportDocumentSuppl = UnoRuntime.queryInterface( XReportDocumentsSupplier.class, this.xModel );
xReportDocumentSuppl.getReportDocuments();
- XHierarchicalNameAccess xReportHier = UnoRuntime.queryInterface( XHierarchicalNameAccess.class, xReportDocumentSuppl.getReportDocuments() );
- return xReportHier;
+ return UnoRuntime.queryInterface( XHierarchicalNameAccess.class, xReportDocumentSuppl.getReportDocuments() );
}
public XHierarchicalNameAccess getFormDocuments()
{
XFormDocumentsSupplier xFormDocumentSuppl = UnoRuntime.queryInterface( XFormDocumentsSupplier.class, xModel );
- XHierarchicalNameAccess xFormHier = UnoRuntime.queryInterface( XHierarchicalNameAccess.class, xFormDocumentSuppl.getFormDocuments() );
- return xFormHier;
+ return UnoRuntime.queryInterface( XHierarchicalNameAccess.class, xFormDocumentSuppl.getFormDocuments() );
}
public boolean hasFormDocumentByName(String _sFormName)
@@ -934,7 +925,7 @@ public class DBMetaData
* adds the passed document as a report or a form to the database. Afterwards the document is deleted.
* the document may not be open
* @param _xComponent
- * @param _xDocNameAccess
+ * @param _xDocNameAccess
* @param _bcreateTemplate describes the type of the document: "form" or "report"
*/
public void addDatabaseDocument(XComponent _xComponent, XHierarchicalNameAccess _xDocNameAccess, boolean i_createTemplate)
@@ -949,7 +940,7 @@ public class DBMetaData
NamedValueCollection creationArgs = new NamedValueCollection();
creationArgs.put( PropertyNames.PROPERTY_NAME, basename );
- creationArgs.put( "URL", documentURL );
+ creationArgs.put( PropertyNames.URL, documentURL );
creationArgs.put( "AsTemplate", i_createTemplate );
XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface( XMultiServiceFactory.class, _xDocNameAccess );
Object oDBDocument = xDocMSF.createInstanceWithArguments( "com.sun.star.sdb.DocumentDefinition", creationArgs.getPropertyValues() );
@@ -962,7 +953,7 @@ public class DBMetaData
}
catch (Exception e)
{
- e.printStackTrace();
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
}
}
@@ -992,7 +983,7 @@ public class DBMetaData
}
catch (SQLException e)
{
- e.printStackTrace();
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
}
return sColValues;
}
@@ -1006,7 +997,7 @@ public class DBMetaData
}
catch (SQLException e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
return null;
}
}
@@ -1020,7 +1011,7 @@ public class DBMetaData
}
catch (SQLException e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
return null;
}
}
@@ -1041,7 +1032,7 @@ public class DBMetaData
}
catch (Exception e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
return false;
}
}
diff --git a/wizards/com/sun/star/wizards/db/FieldColumn.java b/wizards/com/sun/star/wizards/db/FieldColumn.java
index 041aab5f5300..ebedd22d281a 100644
--- a/wizards/com/sun/star/wizards/db/FieldColumn.java
+++ b/wizards/com/sun/star/wizards/db/FieldColumn.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -142,8 +142,7 @@ public class FieldColumn
*/
private String getOnlyFieldName(String _DisplayFieldName, String _CommandName)
{
- final String sName = _DisplayFieldName.substring(_CommandName.length() + 1, _DisplayFieldName.length());
- return sName;
+ return _DisplayFieldName.substring(_CommandName.length() + 1, _DisplayFieldName.length());
}
public static String composeDisplayFieldName(String _sCommandName, String _sFieldName)
@@ -155,12 +154,12 @@ public class FieldColumn
{
try
{
- m_xColPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _xColumns.getByName(m_sFieldName));
+ m_xColPropertySet = UnoRuntime.queryInterface(XPropertySet.class, _xColumns.getByName(m_sFieldName));
ColIndex = JavaTools.FieldInList(_xColumns.getElementNames(), m_sFieldName) + 1;
m_nFieldType = AnyConverter.toInt(m_xColPropertySet.getPropertyValue("Type"));
getTyperelatedFieldData();
- if (bFormatKeysInitialized == false)
+ if (!bFormatKeysInitialized)
{
final NumberFormatter aNumberFormatter = oCommandMetaData.getNumberFormatter();
@@ -393,67 +392,67 @@ public class FieldColumn
{
case DataType.BIT: // == -7;
case DataType.BOOLEAN:
- DefaultValue = (Object) Integer.valueOf("1");
+ DefaultValue = Integer.valueOf("1");
break;
case DataType.TINYINT: // == -6;
- DefaultValue = (Object) Integer.valueOf("98");
+ DefaultValue = Integer.valueOf("98");
break;
case DataType.SMALLINT: // == 5;
- DefaultValue = (Object) Integer.valueOf("987");
+ DefaultValue = Integer.valueOf("987");
break;
case DataType.INTEGER: // == 4;
- DefaultValue = (Object) Integer.valueOf("9876");
+ DefaultValue = Integer.valueOf("9876");
break;
case DataType.BIGINT: // == -5;
- DefaultValue = (Object) Integer.valueOf("98765");
+ DefaultValue = Integer.valueOf("98765");
break;
case DataType.CHAR: // == 1;
- DefaultValue = (Object) String.valueOf('x');
+ DefaultValue = String.valueOf('x');
break;
case DataType.VARCHAR: // == 12;
- DefaultValue = (Object) BlindtextCreator.getBlindTextString(FieldTitle, FieldWidth, FieldWidth);
+ DefaultValue = BlindtextCreator.getBlindTextString(FieldTitle, FieldWidth, FieldWidth);
break;
case DataType.LONGVARCHAR: // == -1;
- DefaultValue = (Object) BlindtextCreator.getBlindTextString(FieldTitle, FieldWidth, FieldWidth);
+ DefaultValue = BlindtextCreator.getBlindTextString(FieldTitle, FieldWidth, FieldWidth);
break;
case DataType.NUMERIC: // == 2;
- DefaultValue = (Object) Double.valueOf("9876.5");
+ DefaultValue = Double.valueOf("9876.5");
break;
case DataType.DECIMAL: // == 3; [mit Nachkommastellen]
- DefaultValue = (Object) Double.valueOf("9876.5");
+ DefaultValue = Double.valueOf("9876.5");
break;
case DataType.FLOAT: // == 6;
- DefaultValue = (Object) Double.valueOf("9876.5");
+ DefaultValue = Double.valueOf("9876.5");
break;
case DataType.REAL: // == 7;
- DefaultValue = (Object) Double.valueOf("9876.5");
+ DefaultValue = Double.valueOf("9876.5");
break;
case DataType.DOUBLE: // == 8;
- DefaultValue = (Object) Double.valueOf("9876.54");
+ DefaultValue = Double.valueOf("9876.54");
break;
case DataType.DATE: // == 91;
- DefaultValue = (Object) Double.valueOf("42510");
+ DefaultValue = Double.valueOf("42510");
break;
case DataType.TIME: // == 92;
- DefaultValue = (Object) Double.valueOf("10");
+ DefaultValue = Double.valueOf("10");
break;
case DataType.TIMESTAMP: // == 93;
- DefaultValue = (Object) Double.valueOf("5454110");
+ DefaultValue = Double.valueOf("5454110");
break;
default:
diff --git a/wizards/com/sun/star/wizards/db/QueryMetaData.java b/wizards/com/sun/star/wizards/db/QueryMetaData.java
index bad14c2faa20..3c18338df370 100644
--- a/wizards/com/sun/star/wizards/db/QueryMetaData.java
+++ b/wizards/com/sun/star/wizards/db/QueryMetaData.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -92,18 +92,19 @@ 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 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)
{
- Vector oToBeAddedFieldColumns = new Vector();
+ ArrayList<FieldColumn> oToBeAddedFieldColumns = new ArrayList<FieldColumn>();
for (int i = 0; i < _FieldNames.length; i++)
{
FieldColumn oFieldColumn = getFieldColumn(_FieldNames[i], _sCommandName);
@@ -119,7 +120,7 @@ public class QueryMetaData extends CommandMetaData
System.arraycopy(FieldColumns, 0, LocFieldColumns, 0, nOldFieldCount);
for (int i = 0; i < oToBeAddedFieldColumns.size(); i++)
{
- LocFieldColumns[nOldFieldCount + i] = (FieldColumn) oToBeAddedFieldColumns.elementAt(i);
+ LocFieldColumns[nOldFieldCount + i] = oToBeAddedFieldColumns.get(i);
}
FieldColumns = LocFieldColumns;
}
@@ -138,7 +139,7 @@ public class QueryMetaData extends CommandMetaData
public void removeSeveralFieldColumnsByDisplayFieldName(String[] _DisplayFieldNames)
{
- Vector oRemainingFieldColumns = new Vector();
+ ArrayList<FieldColumn> oRemainingFieldColumns = new ArrayList<FieldColumn>();
int a = 0;
for (int n = 0; n < FieldColumns.length; n++)
{
@@ -161,13 +162,10 @@ public class QueryMetaData extends CommandMetaData
FieldColumn[] LocFieldColumns = new FieldColumn[FieldColumns.length - 1];
for (int i = 0; i < FieldColumns.length; i++)
{
- if (!FieldColumns[i].getFieldName().equals(_sFieldName))
+ if (!FieldColumns[i].getFieldName().equals(_sFieldName) && !FieldColumns[i].getCommandName().equals(_sCommandName))
{
- if (!FieldColumns[i].getCommandName().equals(_sCommandName))
- {
- LocFieldColumns[a] = FieldColumns[i];
- a++;
- }
+ LocFieldColumns[a] = FieldColumns[i];
+ a++;
}
}
FieldColumns = LocFieldColumns;
@@ -177,7 +175,7 @@ public class QueryMetaData extends CommandMetaData
public String[] getIncludedCommandNames()
{
// FieldColumn CurQueryField;
- Vector CommandNamesV = new Vector(1);
+ ArrayList<String> CommandNamesV = new ArrayList<String>(1);
// String CurCommandName;
for (int i = 0; i < FieldColumns.length; i++)
{
@@ -185,7 +183,7 @@ public class QueryMetaData extends CommandMetaData
final String CurCommandName = CurQueryField.getCommandName();
if (!CommandNamesV.contains(CurCommandName))
{
- CommandNamesV.addElement(CurCommandName);
+ CommandNamesV.add(CurCommandName);
}
}
String[] sIncludedCommandNames = new String[CommandNamesV.size()];
@@ -195,10 +193,10 @@ public class QueryMetaData extends CommandMetaData
public static String[] getIncludedCommandNames(String[] _FieldNames)
{
- Vector CommandNames = new Vector(1);
+ ArrayList<String> CommandNames = new ArrayList<String>(1);
for (int i = 0; i < _FieldNames.length; i++)
{
- String CurCommandName = "";
+ String CurCommandName = PropertyNames.EMPTY_STRING;
String[] MetaList = JavaTools.ArrayoutofString(_FieldNames[i], ".");
if (MetaList.length > 1)
{
@@ -208,7 +206,7 @@ public class QueryMetaData extends CommandMetaData
}
if (!CommandNames.contains(CurCommandName))
{
- CommandNames.addElement(CurCommandName);
+ CommandNames.add(CurCommandName);
}
}
}
@@ -257,7 +255,7 @@ public class QueryMetaData extends CommandMetaData
public String[] getUniqueAggregateFieldNames()
{
- Vector UniqueAggregateFieldVector = new Vector(0);
+ ArrayList<String> UniqueAggregateFieldVector = new ArrayList<String>();
for (int i = 0; i < AggregateFieldNames.length; i++)
{
if (!UniqueAggregateFieldVector.contains(AggregateFieldNames[i][0]))
@@ -291,10 +289,13 @@ public class QueryMetaData extends CommandMetaData
}
return iAggregate;
}
+
public SQLQueryComposer getSQLQueryComposer()
{
- if ( oSQLQueryComposer == null )
+ if (oSQLQueryComposer == null)
+ {
oSQLQueryComposer = new SQLQueryComposer(this);
+ }
return oSQLQueryComposer;
}
}
diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java b/wizards/com/sun/star/wizards/db/RecordParser.java
index 6c8ddb5b2c36..cf9c5c1fb957 100644
--- a/wizards/com/sun/star/wizards/db/RecordParser.java
+++ b/wizards/com/sun/star/wizards/db/RecordParser.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,6 +44,7 @@ import com.sun.star.wizards.common.JavaTools;
import com.sun.star.wizards.common.NumberFormatter;
import com.sun.star.sdbc.XResultSet;
import com.sun.star.task.XInteractionHandler;
+import com.sun.star.wizards.common.PropertyNames;
public class RecordParser extends QueryMetaData
{
@@ -78,11 +79,11 @@ public class RecordParser extends QueryMetaData
try
{
xRowSet = (XInterface) xMSF.createInstance("com.sun.star.sdb.RowSet");
- xRowSetColumnsSupplier = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, xRowSet);
- xRowSetComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xRowSet);
- xExecute = (com.sun.star.sdb.XCompletedExecution) UnoRuntime.queryInterface(com.sun.star.sdb.XCompletedExecution.class, xRowSet);
+ xRowSetColumnsSupplier = UnoRuntime.queryInterface(XColumnsSupplier.class, xRowSet);
+ xRowSetComponent = UnoRuntime.queryInterface(XComponent.class, xRowSet);
+ xExecute = UnoRuntime.queryInterface(XCompletedExecution.class, xRowSet);
XInterface oInteraction = (XInterface) xMSF.createInstance("com.sun.star.task.InteractionHandler");
- xInteraction = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, oInteraction);
+ xInteraction = UnoRuntime.queryInterface(XInteractionHandler.class, oInteraction);
}
catch (Exception exception)
{
@@ -217,14 +218,14 @@ public class RecordParser extends QueryMetaData
try
{
Helper.setUnoPropertyValue(xRowSet, "DataSourceName", DataSourceName);
- Helper.setUnoPropertyValue(xRowSet, "ActiveConnection", DBConnection);
- Helper.setUnoPropertyValue(xRowSet, "Command", Command);
- Helper.setUnoPropertyValue(xRowSet, "CommandType", new Integer(_nCommandType)); // CommandType
+ Helper.setUnoPropertyValue(xRowSet, PropertyNames.ACTIVE_CONNECTION, DBConnection);
+ Helper.setUnoPropertyValue(xRowSet, PropertyNames.COMMAND, Command);
+ Helper.setUnoPropertyValue(xRowSet, PropertyNames.COMMAND_TYPE, new Integer(_nCommandType)); // CommandType
xExecute.executeWithCompletion(xInteraction);
- com.sun.star.sdb.XResultSetAccess xResultAccess = (com.sun.star.sdb.XResultSetAccess) UnoRuntime.queryInterface(com.sun.star.sdb.XResultSetAccess.class, xRowSet);
+ com.sun.star.sdb.XResultSetAccess xResultAccess = UnoRuntime.queryInterface(com.sun.star.sdb.XResultSetAccess.class, xRowSet);
ResultSet = xResultAccess.createResultSet();
- xResultSetRow = (com.sun.star.sdbc.XRow) UnoRuntime.queryInterface(com.sun.star.sdbc.XRow.class, ResultSet);
- XColumnsSupplier xDBCols = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, ResultSet);
+ xResultSetRow = UnoRuntime.queryInterface(com.sun.star.sdbc.XRow.class, ResultSet);
+ XColumnsSupplier xDBCols = UnoRuntime.queryInterface(XColumnsSupplier.class, ResultSet);
xColumns = xDBCols.getColumns();
setCommandType(_nCommandType);
return true;
@@ -240,7 +241,7 @@ public class RecordParser extends QueryMetaData
{
try
{
- if (binitializeDBColumns == true)
+ if (binitializeDBColumns)
{
initializeFieldColumns(_sFieldNames, xColumns);
}
diff --git a/wizards/com/sun/star/wizards/db/RelationController.java b/wizards/com/sun/star/wizards/db/RelationController.java
index acf47581d3e2..283176658629 100644
--- a/wizards/com/sun/star/wizards/db/RelationController.java
+++ b/wizards/com/sun/star/wizards/db/RelationController.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,6 +33,7 @@ import com.sun.star.sdbc.XResultSet;
import com.sun.star.sdbc.XRow;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.wizards.common.JavaTools;
+import com.sun.star.wizards.common.PropertyNames;
/**
* @author bc93774
@@ -72,7 +73,7 @@ public class RelationController extends CommandName
String[] sTableNames = super.getCommandMetaData().getTableNames();
Vector aReferencedTableVector = new Vector();
XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getExportedKeys((getCatalogName(this)), getSchemaName(), getTableName());
- XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, xResultSet);
+ XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet);
while (xResultSet.next())
{
String sForeignCatalog = xRow.getString(FKTABLE_CAT);
@@ -94,7 +95,7 @@ public class RelationController extends CommandName
private Object getCatalogName(CommandName _oCommandName)
{
String sLocCatalog = _oCommandName.getCatalogName();
- if (sLocCatalog.equals(""))
+ if (sLocCatalog.equals(PropertyNames.EMPTY_STRING))
{
return null;
}
@@ -113,7 +114,7 @@ public class RelationController extends CommandName
{
CommandName oLocCommandName = new CommandName(super.getCommandMetaData(), _sreferencedtablename);
XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getImportedKeys(getCatalogName(oLocCommandName), oLocCommandName.getSchemaName(), oLocCommandName.getTableName());
- XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, xResultSet);
+ XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet);
boolean bleaveLoop = false;
Vector aMasterFieldNamesVector = new Vector();
Vector aSlaveFieldNamesVector = new Vector();
@@ -140,7 +141,7 @@ public class RelationController extends CommandName
{
aSlaveFieldNamesVector.add(sForeignColumnName);
aMasterFieldNamesVector.add(sPrimaryColumnName);
- bleaveLoop = true; //Only one relation may exist between two tables...
+ bleaveLoop = true; //Only one relation may exist between two tables...
}
}
diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
index 461a256ce1c3..398468f6d4b2 100644
--- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
+++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,7 +26,6 @@
************************************************************************/
package com.sun.star.wizards.db;
-import java.util.Vector;
// import com.sun.star.lang.IllegalArgumentException;
// import com.sun.star.lang.WrappedTargetException;
@@ -34,10 +33,9 @@ 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.container.XNameAccess;
import com.sun.star.sdbcx.XColumnsSupplier;
// import com.sun.star.sdb.XColumn;
-import com.sun.star.sdb.XSQLQueryComposerFactory;
import com.sun.star.sdb.XSingleSelectQueryComposer;
import com.sun.star.sdb.XSingleSelectQueryAnalyzer;
import com.sun.star.ui.dialogs.XExecutableDialog;
@@ -50,6 +48,7 @@ import com.sun.star.awt.XWindow;
import com.sun.star.sdb.SQLFilterOperator;
import com.sun.star.wizards.common.*;
+import java.util.ArrayList;
public class SQLQueryComposer
{
@@ -60,7 +59,7 @@ public class SQLQueryComposer
// String m_sSelectClause;
// String m_sFromClause;
public XSingleSelectQueryAnalyzer m_xQueryAnalyzer;
- Vector composedCommandNames = new Vector(1);
+ ArrayList<CommandName> composedCommandNames = new ArrayList<CommandName>(1);
private XSingleSelectQueryComposer m_queryComposer;
XMultiServiceFactory xMSF;
boolean bincludeGrouping = true;
@@ -70,13 +69,10 @@ public class SQLQueryComposer
try
{
this.CurDBMetaData = _CurDBMetaData;
- xMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, CurDBMetaData.DBConnection);
+ xMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, CurDBMetaData.DBConnection);
final Object oQueryComposer = xMSF.createInstance("com.sun.star.sdb.SingleSelectQueryComposer");
- m_xQueryAnalyzer = (XSingleSelectQueryAnalyzer) UnoRuntime.queryInterface(XSingleSelectQueryAnalyzer.class, oQueryComposer);
- m_queryComposer = (XSingleSelectQueryComposer) UnoRuntime.queryInterface(XSingleSelectQueryComposer.class, m_xQueryAnalyzer);
- XSQLQueryComposerFactory xSQLComposerFactory;
- xSQLComposerFactory = (XSQLQueryComposerFactory) UnoRuntime.queryInterface(XSQLQueryComposerFactory.class, CurDBMetaData.DBConnection);
- // /* XSQLQueryComposer */ xSQLQueryComposer = xSQLComposerFactory.createQueryComposer();
+ m_xQueryAnalyzer = UnoRuntime.queryInterface(XSingleSelectQueryAnalyzer.class, oQueryComposer);
+ m_queryComposer = UnoRuntime.queryInterface(XSingleSelectQueryComposer.class, m_xQueryAnalyzer);
}
catch (Exception exception)
{
@@ -86,21 +82,8 @@ public class SQLQueryComposer
private boolean addtoSelectClause(String DisplayFieldName) throws SQLException
{
- if (bincludeGrouping)
- {
- if (CurDBMetaData.xDBMetaData.supportsGroupByUnrelated())
- {
- if (CurDBMetaData.GroupFieldNames != null)
- {
- if (JavaTools.FieldInList(CurDBMetaData.GroupFieldNames, DisplayFieldName) > -1)
- {
- return false;
- }
- }
- }
+ return !(bincludeGrouping && CurDBMetaData.xDBMetaData.supportsGroupByUnrelated() && CurDBMetaData.GroupFieldNames != null && JavaTools.FieldInList(CurDBMetaData.GroupFieldNames, DisplayFieldName) > -1);
}
- return true;
- }
public String getSelectClause(boolean _baddAliasFieldNames) throws SQLException
{
@@ -182,7 +165,7 @@ public class SQLQueryComposer
{
try
{
- XPropertySet xColumnPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xColumnIndexAccess.getByIndex(i));
+ XPropertySet xColumnPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xColumnIndexAccess.getByIndex(i));
String sName = (String) xColumnPropertySet.getPropertyValue(PropertyNames.PROPERTY_NAME);
if (JavaTools.FieldInTable(CurDBMetaData.getSortFieldNames(), sName) == -1)
{
@@ -234,7 +217,6 @@ public class SQLQueryComposer
}
// just for debug!
sOrder = m_queryComposer.getOrder();
- int dummy = 0;
}
public void appendGroupByColumns(boolean _baddAliasFieldNames) throws SQLException
@@ -244,7 +226,6 @@ public class SQLQueryComposer
XPropertySet xColumn = CurDBMetaData.getColumnObjectByFieldName(CurDBMetaData.GroupFieldNames[i], _baddAliasFieldNames);
m_queryComposer.appendGroupByColumn(xColumn);
}
- String s = m_xQueryAnalyzer.getQuery();
}
public void setDBMetaData(QueryMetaData _oDBMetaData)
@@ -254,11 +235,16 @@ public class SQLQueryComposer
private PropertyValue[][] replaceConditionsByAlias(PropertyValue _filterconditions[][])
{
+ XColumnsSupplier columnSup = UnoRuntime.queryInterface(XColumnsSupplier.class, m_xQueryAnalyzer);
+ XNameAccess columns = columnSup.getColumns();
for (int n = 0; n < _filterconditions.length; n++)
{
for (int m = 0; m < _filterconditions[n].length; m++)
{
- _filterconditions[n][m].Name = getComposedAliasFieldName(_filterconditions[n][m].Name);
+ // _filterconditions[n][m].Name = getComposedAliasFieldName(_filterconditions[n][m].Name);
+ final String aliasName = getComposedAliasFieldName(_filterconditions[n][m].Name);
+ if ( columns.hasByName(aliasName))
+ _filterconditions[n][m].Name = aliasName;
}
}
return _filterconditions;
@@ -269,19 +255,19 @@ public class SQLQueryComposer
return m_xQueryAnalyzer.getQuery();
}
- public String getFromClause()
+ public StringBuilder getFromClause()
{
- String sFromClause = "FROM";
+ StringBuilder sFromClause = new StringBuilder("FROM");
composedCommandNames.clear();
String[] sCommandNames = CurDBMetaData.getIncludedCommandNames();
for (int i = 0; i < sCommandNames.length; i++)
{
CommandName curCommandName = new CommandName(CurDBMetaData, sCommandNames[i]); //(setComposedCommandName)
curCommandName.setAliasName(getuniqueAliasName(curCommandName.getTableName()));
- sFromClause += " " + curCommandName.getComposedName() + " " + quoteName(curCommandName.getAliasName());
+ sFromClause.append(" ").append(curCommandName.getComposedName()).append(" ").append(quoteName(curCommandName.getAliasName()));
if (i < sCommandNames.length - 1)
{
- sFromClause += ", ";
+ sFromClause.append(", ");
}
// fill composedCommandNames
composedCommandNames.add(curCommandName);
@@ -291,30 +277,26 @@ public class SQLQueryComposer
public boolean setQueryCommand(XWindow _xParentWindow, boolean _bincludeGrouping, boolean _baddAliasFieldNames)
{
- return setQueryCommand(_xParentWindow,_bincludeGrouping, _baddAliasFieldNames,true);
+ return setQueryCommand(_xParentWindow, _bincludeGrouping, _baddAliasFieldNames, true);
}
+
public boolean setQueryCommand(XWindow _xParentWindow, boolean _bincludeGrouping, boolean _baddAliasFieldNames, boolean addQuery)
{
try
{
- String s;
bincludeGrouping = _bincludeGrouping;
- if ( addQuery )
+ if (addQuery)
{
- String sFromClause = getFromClause();
+ StringBuilder fromClause = getFromClause();
String sSelectClause = getSelectClause(_baddAliasFieldNames);
- String queryclause = sSelectClause + " " + sFromClause;
- m_xQueryAnalyzer.setQuery(queryclause);
- if (CurDBMetaData.getFilterConditions() != null)
+ StringBuilder queryclause = new StringBuilder(sSelectClause).append(" ").append(fromClause);
+ m_xQueryAnalyzer.setQuery(queryclause.toString());
+ if (CurDBMetaData.getFilterConditions() != null && CurDBMetaData.getFilterConditions().length > 0)
{
- if (CurDBMetaData.getFilterConditions().length > 0)
- {
- CurDBMetaData.setFilterConditions(replaceConditionsByAlias(CurDBMetaData.getFilterConditions()));
- m_queryComposer.setStructuredFilter(CurDBMetaData.getFilterConditions());
- }
+ CurDBMetaData.setFilterConditions(replaceConditionsByAlias(CurDBMetaData.getFilterConditions()));
+ m_queryComposer.setStructuredFilter(CurDBMetaData.getFilterConditions());
}
}
- s = m_xQueryAnalyzer.getQuery();
if (_bincludeGrouping)
{
appendGroupByColumns(_baddAliasFieldNames);
@@ -325,7 +307,6 @@ public class SQLQueryComposer
}
appendSortingcriteria(_baddAliasFieldNames);
- s = m_xQueryAnalyzer.getQuery();
return true;
}
catch (Exception exception)
@@ -340,8 +321,10 @@ public class SQLQueryComposer
{
FieldColumn CurFieldColumn = CurDBMetaData.getFieldColumnByDisplayName(_fieldname);
CommandName curComposedCommandName = getComposedCommandByDisplayName(CurFieldColumn.getCommandName());
- if ( curComposedCommandName == null )
+ if (curComposedCommandName == null)
+ {
return _fieldname;
+ }
String curAliasName = curComposedCommandName.getAliasName();
return quoteName(curAliasName) + "." + quoteName(CurFieldColumn.getFieldName());
}
@@ -350,13 +333,11 @@ public class SQLQueryComposer
{
if (composedCommandNames != null)
{
- CommandName curComposedName;
- for (int i = 0; i < composedCommandNames.size(); i++)
+ for (CommandName commandName : composedCommandNames)
{
- curComposedName = (CommandName) composedCommandNames.elementAt(i);
- if (curComposedName.getAliasName().equals(_AliasName))
+ if (commandName.getAliasName().equals(_AliasName))
{
- return curComposedName;
+ return commandName;
}
}
}
@@ -367,13 +348,11 @@ public class SQLQueryComposer
{
if (composedCommandNames != null)
{
- CommandName curComposedName;
- for (int i = 0; i < composedCommandNames.size(); i++)
+ for (CommandName commandName : composedCommandNames)
{
- curComposedName = (CommandName) composedCommandNames.elementAt(i);
- if (curComposedName.getDisplayName().equals(_DisplayName))
+ if (commandName.getDisplayName().equals(_DisplayName))
{
- return curComposedName;
+ return commandName;
}
}
}
@@ -386,7 +365,7 @@ public class SQLQueryComposer
String AliasName = "";
boolean bAliasNameexists = true;
String locAliasName = _TableName;
- while (bAliasNameexists == true)
+ while (bAliasNameexists)
{
bAliasNameexists = (getComposedCommandByAliasName(locAliasName) != null);
if (bAliasNameexists)
@@ -412,15 +391,15 @@ public class SQLQueryComposer
try
{
Object oErrorDialog = CurDBMetaData.xMSF.createInstance("com.sun.star.sdb.ErrorMessageDialog");
- XInitialization xInitialize = (XInitialization) UnoRuntime.queryInterface(XInitialization.class, oErrorDialog);
- XExecutableDialog xExecute = (XExecutableDialog) UnoRuntime.queryInterface(XExecutableDialog.class, oErrorDialog);
+ XInitialization xInitialize = UnoRuntime.queryInterface(XInitialization.class, oErrorDialog);
+ XExecutableDialog xExecute = UnoRuntime.queryInterface(XExecutableDialog.class, oErrorDialog);
PropertyValue[] rDispatchArguments = new PropertyValue[3];
- rDispatchArguments[0] = Properties.createProperty("Title", Configuration.getProductName(CurDBMetaData.xMSF) + " Base");
+ rDispatchArguments[0] = Properties.createProperty(PropertyNames.PROPERTY_TITLE, Configuration.getProductName(CurDBMetaData.xMSF) + " Base");
rDispatchArguments[1] = Properties.createProperty("ParentWindow", _xParentWindow);
rDispatchArguments[2] = Properties.createProperty("SQLException", _exception);
xInitialize.initialize(rDispatchArguments);
xExecute.execute();
- //TODO dispose???
+ //TODO dispose???
}
catch (Exception typeexception)
{
@@ -443,38 +422,40 @@ public class SQLQueryComposer
public PropertyValue[][] getNormalizedStructuredFilter()
{
final PropertyValue[][] structuredFilter = m_queryComposer.getStructuredFilter();
- for ( int i=0; i<structuredFilter.length; ++i )
+ for (int i = 0; i < structuredFilter.length; ++i)
{
- for ( int j=0; j<structuredFilter[i].length; ++j )
+ for (int j = 0; j < structuredFilter[i].length; ++j)
{
- if ( !( structuredFilter[i][j].Value instanceof String ) )
+ if (!(structuredFilter[i][j].Value instanceof String))
+ {
continue;
- final StringBuffer textualValue = new StringBuffer( (String)structuredFilter[i][j].Value );
- switch ( structuredFilter[i][j].Handle )
+ }
+ final StringBuffer textualValue = new StringBuffer((String) structuredFilter[i][j].Value);
+ switch (structuredFilter[i][j].Handle)
{
- case SQLFilterOperator.EQUAL:
- break;
- case SQLFilterOperator.NOT_EQUAL:
- case SQLFilterOperator.LESS_EQUAL:
- case SQLFilterOperator.GREATER_EQUAL:
- textualValue.delete( 0, 2 );
- break;
- case SQLFilterOperator.LESS:
- case SQLFilterOperator.GREATER:
- textualValue.delete( 0, 1 );
- break;
- case SQLFilterOperator.NOT_LIKE:
- textualValue.delete( 0, 8 );
- break;
- case SQLFilterOperator.LIKE:
- textualValue.delete( 0, 4 );
- break;
- case SQLFilterOperator.SQLNULL:
- textualValue.delete( 0, 7 );
- break;
- case SQLFilterOperator.NOT_SQLNULL:
- textualValue.delete( 0, 11 );
- break;
+ case SQLFilterOperator.EQUAL:
+ break;
+ case SQLFilterOperator.NOT_EQUAL:
+ case SQLFilterOperator.LESS_EQUAL:
+ case SQLFilterOperator.GREATER_EQUAL:
+ textualValue.delete(0, 2);
+ break;
+ case SQLFilterOperator.LESS:
+ case SQLFilterOperator.GREATER:
+ textualValue.delete(0, 1);
+ break;
+ case SQLFilterOperator.NOT_LIKE:
+ textualValue.delete(0, 8);
+ break;
+ case SQLFilterOperator.LIKE:
+ textualValue.delete(0, 4);
+ break;
+ case SQLFilterOperator.SQLNULL:
+ textualValue.delete(0, 7);
+ break;
+ case SQLFilterOperator.NOT_SQLNULL:
+ textualValue.delete(0, 11);
+ break;
}
structuredFilter[i][j].Value = textualValue.toString().trim();
}
diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java b/wizards/com/sun/star/wizards/db/TableDescriptor.java
index c7f728648467..0f462ee3d783 100644
--- a/wizards/com/sun/star/wizards/db/TableDescriptor.java
+++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -81,8 +81,8 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
private XColumnsSupplier xKeyColumnSupplier;
private XPropertySet xKey;
private boolean bIDFieldisInserted = false;
- private String IDFieldName = "";
- private String sColumnAlreadyExistsMessage = "";
+ private String IDFieldName = PropertyNames.EMPTY_STRING;
+ private String sColumnAlreadyExistsMessage = PropertyNames.EMPTY_STRING;
// private WizardDialog oUnoDialog;
private XWindow xWindow;
@@ -156,16 +156,16 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
{
try
{
- XKeysSupplier xKeySupplier = (XKeysSupplier) UnoRuntime.queryInterface(XKeysSupplier.class, xPropTableDataDescriptor);
+ XKeysSupplier xKeySupplier = UnoRuntime.queryInterface(XKeysSupplier.class, xPropTableDataDescriptor);
xIndexAccessKeys = xKeySupplier.getKeys();
- XDataDescriptorFactory xKeyFac = (XDataDescriptorFactory) UnoRuntime.queryInterface(XDataDescriptorFactory.class, xIndexAccessKeys);
- xKeyDrop = (XDrop) UnoRuntime.queryInterface(XDrop.class, xIndexAccessKeys);
- xKeyAppend = (XAppend) UnoRuntime.queryInterface(XAppend.class, xKeyFac);
+ XDataDescriptorFactory xKeyFac = UnoRuntime.queryInterface(XDataDescriptorFactory.class, xIndexAccessKeys);
+ xKeyDrop = UnoRuntime.queryInterface(XDrop.class, xIndexAccessKeys);
+ xKeyAppend = UnoRuntime.queryInterface(XAppend.class, xKeyFac);
xKey = xKeyFac.createDataDescriptor();
xKey.setPropertyValue("Type", new Integer(KeyType.PRIMARY));
- xKeyColumnSupplier = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, xKey);
- XDataDescriptorFactory xKeyColFac = (XDataDescriptorFactory) UnoRuntime.queryInterface(XDataDescriptorFactory.class, xKeyColumnSupplier.getColumns());
- xKeyColAppend = (XAppend) UnoRuntime.queryInterface(XAppend.class, xKeyColFac);
+ xKeyColumnSupplier = UnoRuntime.queryInterface(XColumnsSupplier.class, xKey);
+ XDataDescriptorFactory xKeyColFac = UnoRuntime.queryInterface(XDataDescriptorFactory.class, xKeyColumnSupplier.getColumns());
+ xKeyColAppend = UnoRuntime.queryInterface(XAppend.class, xKeyColFac);
removePrimaryKeys();
for (int i = 0; i < _fieldnames.length; i++)
{
@@ -190,7 +190,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
if (xColPropertySet.getPropertySetInfo().hasPropertyByName("IsAutoIncrement"))
{
xColPropertySet.setPropertyValue("Type", new Integer(nDataType));
- xColPropertySet.setPropertyValue("IsAutoIncrement", new Boolean(_bAutoincrementation));
+ xColPropertySet.setPropertyValue("IsAutoIncrement", Boolean.valueOf(_bAutoincrementation));
}
}
}
@@ -222,7 +222,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
{
try
{
- String sColumnName = (String) AnyConverter.toString(_xToBeAppendedPropertySet.getPropertyValue(PropertyNames.PROPERTY_NAME));
+ String sColumnName = AnyConverter.toString(_xToBeAppendedPropertySet.getPropertyValue(PropertyNames.PROPERTY_NAME));
if (_xColumns.hasByName(sColumnName))
{
String sMessage = JavaTools.replaceSubString(sColumnAlreadyExistsMessage, sColumnName, "%FIELDNAME");
@@ -251,13 +251,13 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
boolean breturn = true;
try
{
- XAppend xAppendColumns = (XAppend) UnoRuntime.queryInterface(XAppend.class, xNameAccessColumns);
+ XAppend xAppendColumns = UnoRuntime.queryInterface(XAppend.class, xNameAccessColumns);
for (int i = 0; i < columncontainer.size(); i++)
{
XPropertySet xColPropertySet = getByIndex(i);
if (!isColunnNameDuplicate(xNameAccessColumns, xColPropertySet))
{
- xAppendColumns.appendByDescriptor(xColPropertySet); //xColPropertySet.setPropertyValue("Type", new Integer(32423))
+ xAppendColumns.appendByDescriptor(xColPropertySet); //xColPropertySet.setPropertyValue("Type", 32423)
}
else
{
@@ -269,7 +269,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
assignTableProperty(PropertyNames.PROPERTY_NAME, _tablename);
assignTableProperty("CatalogName", _catalogname);
assignTableProperty("SchemaName", _schemaname);
- xTableContainer = (XContainer) UnoRuntime.queryInterface(XContainer.class, getTableNamesAsNameAccess());
+ xTableContainer = UnoRuntime.queryInterface(XContainer.class, getTableNamesAsNameAccess());
xTableContainer.addContainerListener(this);
if (keycolumncontainer.size() > 0)
{
@@ -319,7 +319,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
{
try
{
- xPropTableDataDescriptor.setPropertyValue(PropertyNames.PROPERTY_NAME, "");
+ xPropTableDataDescriptor.setPropertyValue(PropertyNames.PROPERTY_NAME, PropertyNames.EMPTY_STRING);
if ((xKeyDrop != null) && (xIndexAccessKeys != null))
{
int icount = xIndexAccessKeys.getCount();
@@ -331,7 +331,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
}
}
}
- XDrop xColumnDrop = (XDrop) UnoRuntime.queryInterface(XDrop.class, xNameAccessColumns);
+ XDrop xColumnDrop = UnoRuntime.queryInterface(XDrop.class, xNameAccessColumns);
for (int i = xNameAccessColumns.getElementNames().length - 1; i >= 0; i--)
{
xColumnDrop.dropByIndex(i);
@@ -374,7 +374,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
{
if (_svalue != null)
{
- if (!_svalue.equals(""))
+ if (!_svalue.equals(PropertyNames.EMPTY_STRING))
{
try
{
@@ -604,7 +604,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
if (hasByName(_snewname))
{
Object oColumn = getByName(_snewname);
- XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oColumn);
+ XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, oColumn);
Property[] aColProperties = xPropertySet.getPropertySetInfo().getProperties();
for (int i = 0; i < aColProperties.length; i++)
{
@@ -664,7 +664,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
{
if (!hasByName(_columnname))
{
- if (_columnname.equals(""))
+ if (_columnname.equals(PropertyNames.EMPTY_STRING))
{
return false;
}
@@ -694,7 +694,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
try
{
XPropertySet xColPropertySet = xColumnDataDescriptorFactory.createDataDescriptor();
- IDFieldName = Desktop.getUniqueName(getColumnNames(), _columnname, "");
+ IDFieldName = Desktop.getUniqueName(getColumnNames(), _columnname, PropertyNames.EMPTY_STRING);
xColPropertySet.setPropertyValue(PropertyNames.PROPERTY_NAME, IDFieldName);
int nDataType = oTypeInspector.convertDataType(com.sun.star.sdbc.DataType.INTEGER);
@@ -777,7 +777,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
{
try
{
- XPropertySet xTablePropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, arg0.Element);
+ XPropertySet xTablePropertySet = UnoRuntime.queryInterface(XPropertySet.class, arg0.Element);
String stablename = AnyConverter.toString(xTablePropertySet.getPropertyValue(PropertyNames.PROPERTY_NAME));
String sschemaname = AnyConverter.toString(xPropTableDataDescriptor.getPropertyValue("SchemaName"));
String scatalogname = AnyConverter.toString(xPropTableDataDescriptor.getPropertyValue("CatalogName"));
@@ -858,5 +858,5 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
}
return bhastoinsert;
}
-}
-
+}
+
diff --git a/wizards/com/sun/star/wizards/db/TypeInspector.java b/wizards/com/sun/star/wizards/db/TypeInspector.java
index 1f22801fd8c5..ae8db5905476 100644
--- a/wizards/com/sun/star/wizards/db/TypeInspector.java
+++ b/wizards/com/sun/star/wizards/db/TypeInspector.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,6 +38,7 @@ import com.sun.star.sdbc.XRow;
import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.wizards.common.JavaTools;
+import com.sun.star.wizards.common.PropertyNames;
public class TypeInspector
{
@@ -87,15 +88,15 @@ public class TypeInspector
Vector<Integer> aSearchableVector = new Vector<Integer>();
// Integer[] aIntegerDataTypes = null;
// XResultSet xResultSet = xDBMetaDagetTypeInfo();
- XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, xResultSet);
+ XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet);
while (xResultSet.next())
{
- aTypeNameVector.addElement(new String(xRow.getString(1)));
+ aTypeNameVector.addElement(xRow.getString(1));
aTypeVector.addElement(new Integer(xRow.getShort(2)));
aPrecisionVector.addElement(new Integer(xRow.getInt(3)));
aNullableVector.addElement(new Integer(xRow.getShort(7)));
aSearchableVector.addElement(new Integer(xRow.getShort(9)));
- aAutoIncrementVector.addElement(new Boolean(xRow.getBoolean(12)));
+ aAutoIncrementVector.addElement(Boolean.valueOf(xRow.getBoolean(12)));
aMinScaleVector.addElement(new Integer(xRow.getShort(14)));
aMaxScaleVector.addElement(new Integer(xRow.getShort(15)));
@@ -153,12 +154,11 @@ public class TypeInspector
{
return ColumnValue.NO_NULLS;
}
- int nNullable = _nNullable;
- if (nNullable == ColumnValue.NULLABLE)
+ if (_nNullable == ColumnValue.NULLABLE)
{
return nNullableInfos[i]; //probably nullability is not allowed
}
- return nNullable;
+ return _nNullable;
}
public int getNullability(XPropertySet _xColPropertySet)
@@ -230,25 +230,19 @@ public class TypeInspector
int i = JavaTools.FieldInIntTable(nDataTypeInfos, nDataType, startindex);
startindex = i + 1;
bleaveloop = (i < 0);
- if (!bleaveloop)
+ if (!bleaveloop && sTypeName.equals(sDataTypeNames[i]))
{
- if (sTypeName.equals(sDataTypeNames[i]))
+ if (_bCheckNumericAttributes)
{
- if (_bCheckNumericAttributes)
- {
- if (nPrecision <= nPrecisionInfos[i])
- {
- if ((nScale >= nMinScaleInfos[i]) && (nScale <= nMinScaleInfos[i]))
- {
- return i;
- }
- }
- }
- else
+ if (nPrecision <= nPrecisionInfos[i] && (nScale >= nMinScaleInfos[i]) && (nScale <= nMinScaleInfos[i]) )
{
return i;
}
}
+ else
+ {
+ return i;
+ }
}
}
}
@@ -284,7 +278,7 @@ public class TypeInspector
*/
public String getDefaultTypeName(int _curDataType, Integer precision)
{
- String ret = "";
+ String ret = PropertyNames.EMPTY_STRING;
for (int i = 0; i < nDataTypeInfos.length; i++)
{
if (nDataTypeInfos[i] == _curDataType)
@@ -419,21 +413,21 @@ public class TypeInspector
return (getAutoIncrementIndex(_xColPropertySet) != INVALID);
}
- /** finds the first available DataType that can be used as a primary key in a table.
+ /** finds the first available DataType that can be used as a primary key in a table.
* @return The first datatype that also supports Autoincrmentation is taken according to the following list:
*1) INTEGER
*2) FLOAT
*3) REAL
*4) DOUBLE
*5) NUMERIC
- *6) DECIMAL *
- * If no appropriate datatype is found ther first available numeric type after DataType.INTEGER
+ *6) DECIMAL *
+ * If no appropriate datatype is found ther first available numeric type after DataType.INTEGER
* according to the 'convertDataType' method is returned
*/
- /**TODO the fallback order is the same as implemented in the method 'convertDataType'.
+ /**TODO the fallback order is the same as implemented in the method 'convertDataType'.
* It's not very elegant to have the same intelligence
* on several spots in the class!!
- *
+ *
*/
public TypeInfo findAutomaticPrimaryKeyType()
{
diff --git a/wizards/com/sun/star/wizards/document/Control.java b/wizards/com/sun/star/wizards/document/Control.java
index 96485cdf84ce..24d486ce0ee3 100644
--- a/wizards/com/sun/star/wizards/document/Control.java
+++ b/wizards/com/sun/star/wizards/document/Control.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -131,7 +131,7 @@ public class Control extends Shape
{
if (xFormName != null)
{
- XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xFormName);
+ XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, xFormName);
String sControlName = Desktop.getUniqueName(xNameAccess, getControlName(_fieldname));
xPropertySet.setPropertyValue(PropertyNames.PROPERTY_NAME, sControlName);
xFormName.insertByName(sControlName, xControlModel);
@@ -145,7 +145,7 @@ public class Control extends Shape
public String getControlName(String _fieldname)
{
- String controlname = "";
+ String controlname = PropertyNames.EMPTY_STRING;
switch (getControlType())
{
case FormHandler.SOLABEL:
@@ -273,14 +273,14 @@ public class Control extends Shape
}
}
- /** the peer should be retrieved every time before it is used because it
+ /** the peer should be retrieved every time before it is used because it
* might be disposed otherwise
- *
+ *
* @return
*/
public XLayoutConstrains getPeer()
{
- return (XLayoutConstrains) UnoRuntime.queryInterface(XLayoutConstrains.class, xControl.getPeer());
+ return UnoRuntime.queryInterface(XLayoutConstrains.class, xControl.getPeer());
}
public Size getPeerSize()
@@ -314,13 +314,13 @@ public class Control extends Shape
}
else if (getControlType() == FormHandler.SODATECONTROL)
{
- xPropertySet.setPropertyValue("Date", new Integer(4711)); //TODO find a better date
+ xPropertySet.setPropertyValue("Date", 4711); //TODO find a better date
aPreferredSize = getPeer().getPreferredSize();
xPropertySet.setPropertyValue("Date", com.sun.star.uno.Any.VOID);
}
else if (getControlType() == FormHandler.SOTIMECONTROL)
{
- xPropertySet.setPropertyValue("Time", new Integer(47114)); //TODO find a better time
+ xPropertySet.setPropertyValue("Time", 47114); //TODO find a better time
aPreferredSize = getPeer().getPreferredSize();
xPropertySet.setPropertyValue("Time", com.sun.star.uno.Any.VOID);
}
@@ -338,7 +338,7 @@ public class Control extends Shape
}
xPropertySet.setPropertyValue("Text", stext);
aPreferredSize = getPeer().getPreferredSize();
- xPropertySet.setPropertyValue("Text", "");
+ xPropertySet.setPropertyValue("Text", PropertyNames.EMPTY_STRING);
}
return aPreferredSize;
}
diff --git a/wizards/com/sun/star/wizards/document/DatabaseControl.java b/wizards/com/sun/star/wizards/document/DatabaseControl.java
index 67a85c436f6f..3033ad1ce429 100644
--- a/wizards/com/sun/star/wizards/document/DatabaseControl.java
+++ b/wizards/com/sun/star/wizards/document/DatabaseControl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -90,10 +90,10 @@ public class DatabaseControl extends Control
{
bHidden = true;
}
- xPropColumn.setPropertyValue("Hidden", new Boolean(bHidden));
+ xPropColumn.setPropertyValue("Hidden", Boolean.valueOf(bHidden));
xPropColumn.setPropertyValue("DataField", sFieldName);
xPropColumn.setPropertyValue(PropertyNames.PROPERTY_LABEL, _columntitle);
- xPropColumn.setPropertyValue(PropertyNames.PROPERTY_WIDTH, new Integer(0)); // Width of column is adjusted to Columname
+ xPropColumn.setPropertyValue(PropertyNames.PROPERTY_WIDTH, 0); // Width of column is adjusted to Columname
XPropertySetInfo xPSI = xPropColumn.getPropertySetInfo();
if ( xPSI.hasPropertyByName( "MouseWheelBehavior" ) )
@@ -152,7 +152,7 @@ public class DatabaseControl extends Control
return FormHandler.oControlData[i].GridColumnName;
}
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
public int getControlHeight()
@@ -160,16 +160,14 @@ public class DatabaseControl extends Control
if (getControlType() == FormHandler.SOIMAGECONTROL)
{
// return oFormHandler.getImageControlHeight();
- final int nMemofieldheight = oFormHandler.getControlReferenceHeight() * 4;
- return nMemofieldheight;
+ return oFormHandler.getControlReferenceHeight() * 4;
}
else
{
if (getFieldType() == DataType.LONGVARCHAR)
{
// Helper.setUnoPropertyValue(xControlModel, PropertyNames.PROPERTY_MULTILINE, Boolean.TRUE);
- final int nMemofieldheight = oFormHandler.getControlReferenceHeight() * 4;
- return nMemofieldheight;
+ return oFormHandler.getControlReferenceHeight() * 4;
}
else if (getControlType() == FormHandler.SOCHECKBOX)
{
diff --git a/wizards/com/sun/star/wizards/document/FormHandler.java b/wizards/com/sun/star/wizards/document/FormHandler.java
index 17dece81a03e..ed22e305b996 100644
--- a/wizards/com/sun/star/wizards/document/FormHandler.java
+++ b/wizards/com/sun/star/wizards/document/FormHandler.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,9 +59,17 @@ import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.container.XNamed;
+import java.util.logging.Level;
+import java.util.logging.Logger;
public class FormHandler
{
+ private static final String CHECKBOX = "CheckBox";
+ private static final String DATEFIELD = "DateField";
+ private static final String FORMATTEDFIELD = "FormattedField";
+ private static final String IMAGECONTROL = "ImageControl";
+ private static final String TEXTFIELD = "TextField";
+ private static final String TIMEFIELD = "TimeField";
public XFormsSupplier xFormsSupplier;
public XMultiServiceFactory xMSFDoc;
@@ -108,12 +116,12 @@ public class FormHandler
public FormHandler(XMultiServiceFactory _xMSF, XTextDocument xTextDocument)
{
this.xMSF = _xMSF;
- xDrawPageSupplier = (XDrawPageSupplier) UnoRuntime.queryInterface(XDrawPageSupplier.class, xTextDocument);
+ xDrawPageSupplier = UnoRuntime.queryInterface(XDrawPageSupplier.class, xTextDocument);
xDrawPage = xDrawPageSupplier.getDrawPage();
- xFormsSupplier = (XFormsSupplier) UnoRuntime.queryInterface(XFormsSupplier.class, xDrawPage);
- xShapeGrouper = (XShapeGrouper) UnoRuntime.queryInterface(XShapeGrouper.class, xDrawPage);
- xControlAccess = (XControlAccess) UnoRuntime.queryInterface(XControlAccess.class, xTextDocument.getCurrentController());
- xMSFDoc = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
+ xFormsSupplier = UnoRuntime.queryInterface(XFormsSupplier.class, xDrawPage);
+ xShapeGrouper = UnoRuntime.queryInterface(XShapeGrouper.class, xDrawPage);
+ xControlAccess = UnoRuntime.queryInterface(XControlAccess.class, xTextDocument.getCurrentController());
+ xMSFDoc = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
sModelServices[SOLABEL] = "com.sun.star.form.component.FixedText";
sModelServices[SOTEXTBOX] = "com.sun.star.form.component.TextField";
sModelServices[SOCHECKBOX] = "com.sun.star.form.component.CheckBox";
@@ -124,30 +132,30 @@ public class FormHandler
sModelServices[SOIMAGECONTROL] = "com.sun.star.form.component.DatabaseImageControl";
oControlData = new ControlData[22];
- oControlData[0] = createControlData(DataType.BIT, SOCHECKBOX, "CheckBox", "CheckBox", false);
- oControlData[1] = createControlData(DataType.BOOLEAN, SOCHECKBOX, "CheckBox", "CheckBox", false);
- oControlData[2] = createControlData(DataType.TINYINT, SONUMERICCONTROL, "FormattedField", "FormattedField", false);
- oControlData[3] = createControlData(DataType.SMALLINT, SONUMERICCONTROL, "FormattedField", "FormattedField", false);
- oControlData[4] = createControlData(DataType.INTEGER, SONUMERICCONTROL, "FormattedField", "FormattedField", false);
- oControlData[5] = createControlData(DataType.BIGINT, SONUMERICCONTROL, "FormattedField", "FormattedField", false);
- oControlData[6] = createControlData(DataType.FLOAT, SONUMERICCONTROL, "FormattedField", "FormattedField", false);
- oControlData[7] = createControlData(DataType.REAL, SONUMERICCONTROL, "FormattedField", "FormattedField", false);
- oControlData[8] = createControlData(DataType.DOUBLE, SONUMERICCONTROL, "FormattedField", "FormattedField", false);
- oControlData[9] = createControlData(DataType.NUMERIC, SONUMERICCONTROL, "FormattedField", "FormattedField", false);
- oControlData[10] = createControlData(DataType.DECIMAL, SONUMERICCONTROL, "FormattedField", "FormattedField", false);
- oControlData[11] = createControlData(DataType.CHAR, SOTEXTBOX, "TextField", "TextField", false);
- oControlData[12] = createControlData(DataType.VARCHAR, SOTEXTBOX, "TextField", "TextField", true);
- oControlData[13] = createControlData(DataType.LONGVARCHAR, SOTEXTBOX, "TextField", "TextField", true);
- 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);
+ oControlData[0] = createControlData(DataType.BIT, SOCHECKBOX, CHECKBOX, CHECKBOX, false);
+ oControlData[1] = createControlData(DataType.BOOLEAN, SOCHECKBOX, CHECKBOX, CHECKBOX, false);
+ oControlData[2] = createControlData(DataType.TINYINT, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false);
+ oControlData[3] = createControlData(DataType.SMALLINT, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false);
+ oControlData[4] = createControlData(DataType.INTEGER, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false);
+ oControlData[5] = createControlData(DataType.BIGINT, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false);
+ oControlData[6] = createControlData(DataType.FLOAT, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false);
+ oControlData[7] = createControlData(DataType.REAL, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false);
+ oControlData[8] = createControlData(DataType.DOUBLE, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false);
+ oControlData[9] = createControlData(DataType.NUMERIC, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false);
+ oControlData[10] = createControlData(DataType.DECIMAL, SONUMERICCONTROL, FORMATTEDFIELD, FORMATTEDFIELD, false);
+ oControlData[11] = createControlData(DataType.CHAR, SOTEXTBOX, TEXTFIELD, TEXTFIELD, false);
+ oControlData[12] = createControlData(DataType.VARCHAR, SOTEXTBOX, TEXTFIELD, TEXTFIELD, true);
+ oControlData[13] = createControlData(DataType.LONGVARCHAR, SOTEXTBOX, TEXTFIELD, TEXTFIELD, true);
+ 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);
- oControlData[20] = createControlData(DataType.BLOB, SOIMAGECONTROL, "ImageControl", "TextField", false);
+ 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);
+ oControlData[20] = createControlData(DataType.BLOB, SOIMAGECONTROL, IMAGECONTROL, TEXTFIELD, false);
- oControlData[21] = createControlData(DataType.OTHER, SOIMAGECONTROL, "ImageControl", "TextField", false);
+ oControlData[21] = createControlData(DataType.OTHER, SOIMAGECONTROL, IMAGECONTROL, TEXTFIELD, false);
}
public int getControlType(int _fieldtype)
@@ -156,8 +164,7 @@ public class FormHandler
{
if (oControlData[i].DataType == _fieldtype)
{
- final int nType = oControlData[i].ControlType;
- return nType;
+ return oControlData[i].ControlType;
}
}
return -1;
@@ -184,7 +191,7 @@ public class FormHandler
public void initializeBasicControlValues()
{
Control oLabelControl = new Control(this, SOLABEL, new Point(), new Size());
- XDevice xDevice = (XDevice) UnoRuntime.queryInterface(XDevice.class, oLabelControl.xWindowPeer);
+ XDevice xDevice = UnoRuntime.queryInterface(XDevice.class, oLabelControl.xWindowPeer);
iXPixelFactor = (int) (100000 / xDevice.getInfo().PixelPerMeterX);
iYPixelFactor = (int) (100000 / xDevice.getInfo().PixelPerMeterY);
@@ -209,8 +216,7 @@ public class FormHandler
public XNameContainer getDocumentForms()
{
- XNameContainer xNamedForms = xFormsSupplier.getForms();
- return xNamedForms;
+ return xFormsSupplier.getForms();
}
public String getValueofHiddenControl(XNameAccess xNamedForm, String ControlName, String sMsg) throws com.sun.star.wizards.document.FormHandler.UnknownHiddenControlException
@@ -219,8 +225,7 @@ public class FormHandler
{
if (xNamedForm.hasByName(ControlName))
{
- String ControlValue = AnyConverter.toString(com.sun.star.wizards.common.Helper.getUnoPropertyValue(xNamedForm.getByName(ControlName), "HiddenValue"));
- return ControlValue;
+ return AnyConverter.toString(com.sun.star.wizards.common.Helper.getUnoPropertyValue(xNamedForm.getByName(ControlName), "HiddenValue"));
}
else
{
@@ -238,7 +243,7 @@ public class FormHandler
try
{
XInterface xHiddenControl;
- if (xNameAccess.hasByName(ControlName) == true)
+ if (xNameAccess.hasByName(ControlName))
{
xHiddenControl = (XInterface) AnyConverter.toObject(new Type(XInterface.class), xNameAccess.getByName(ControlName));
}
@@ -249,9 +254,9 @@ public class FormHandler
}
Helper.setUnoPropertyValue(xHiddenControl, "HiddenValue", ControlValue);
}
- catch (Exception exception)
+ catch (Exception ex)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, ex);
}
}
@@ -260,7 +265,7 @@ public class FormHandler
public UnknownHiddenControlException(XNameAccess xNamedForm, String ControlName, String sMsgHiddenControlisMissing)
{
- XNamed xNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class, xNamedForm);
+ XNamed xNamed = UnoRuntime.queryInterface(XNamed.class, xNamedForm);
String FormName = xNamed.getName();
sMsgHiddenControlisMissing = JavaTools.replaceSubString(sMsgHiddenControlisMissing, FormName, "<REPORTFORM>");
sMsgHiddenControlisMissing = JavaTools.replaceSubString(sMsgHiddenControlisMissing, ControlName, "<CONTROLNAME>");
@@ -271,7 +276,7 @@ public class FormHandler
public boolean hasFormByName(String _FormName)
{
xNamedFormContainer = getDocumentForms();
- xNamedForms = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xNamedFormContainer);
+ xNamedForms = UnoRuntime.queryInterface(XNameAccess.class, xNamedFormContainer);
return xNamedForms.hasByName(_FormName);
}
@@ -285,9 +290,9 @@ public class FormHandler
xNamedFormContainer.removeByName(_FormName);
}
}
- catch (com.sun.star.uno.Exception exception)
+ catch (com.sun.star.uno.Exception ex)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, ex);
}
}
@@ -299,14 +304,14 @@ public class FormHandler
{
if (belongsToForm(xDrawPage.getByIndex(i), _FormName))
{
- XShape xShape = (XShape) UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i));
+ XShape xShape = UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i));
xDrawPage.remove(xShape);
}
}
}
catch (Exception e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e);
}
}
@@ -318,26 +323,26 @@ public class FormHandler
}
catch ( WrappedTargetException e )
{
- e.printStackTrace( System.err );
+ Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e);
}
catch( final NoSuchElementException e )
{
- e.printStackTrace( System.err );
+ Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e);
}
}
public boolean belongsToForm(Object _oDrawPageElement, String _FormName)
{
- XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, _oDrawPageElement);
+ XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, _oDrawPageElement);
if (xServiceInfo.supportsService("com.sun.star.drawing.ControlShape"))
{
- XControlShape xControlShape = (XControlShape) UnoRuntime.queryInterface(XControlShape.class, _oDrawPageElement);
+ XControlShape xControlShape = UnoRuntime.queryInterface(XControlShape.class, _oDrawPageElement);
XControlModel xControlModel = xControlShape.getControl();
- xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, xControlShape.getControl());
+ xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, xControlShape.getControl());
if (xServiceInfo.supportsService("com.sun.star.form.FormComponent"))
{
- XChild xChild = (XChild) UnoRuntime.queryInterface(XChild.class, xControlModel);
- XNamed xNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class, xChild.getParent());
+ XChild xChild = UnoRuntime.queryInterface(XChild.class, xControlModel);
+ XNamed xNamed = UnoRuntime.queryInterface(XNamed.class, xChild.getParent());
String sName = xNamed.getName();
return _FormName.equals(sName);
}
@@ -355,7 +360,7 @@ public class FormHandler
oDBForm = xMSFDoc.createInstance("com.sun.star.form.component.Form");
_xNamedFormContainer.insertByName(_FormName, oDBForm);
XNameContainer xNamedForm;
- xNamedForm = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, oDBForm);
+ xNamedForm = UnoRuntime.queryInterface(XNameContainer.class, oDBForm);
return xNamedForm;
}
else
@@ -363,9 +368,9 @@ public class FormHandler
return getFormByName(_FormName);
}
}
- catch (com.sun.star.uno.Exception exception)
+ catch (com.sun.star.uno.Exception e)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e);
return null;
}
}
@@ -388,12 +393,12 @@ public class FormHandler
if (xNamedForms.hasByName(_sname))
{
Object oDBForm = AnyConverter.toObject(new Type(XInterface.class), Helper.getUnoObjectbyName(xNamedForms, _sname));
- xNamedForm = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, oDBForm);
+ xNamedForm = UnoRuntime.queryInterface(XNameContainer.class, oDBForm);
}
}
catch (IllegalArgumentException e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e);
}
return xNamedForm;
}
@@ -484,13 +489,13 @@ public class FormHandler
{
for (int i = 0; i < this.xDrawPage.getCount(); i++)
{
- XShape xShape = (XShape) UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i));
+ XShape xShape = UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i));
xShape.setPosition(new Point(this.iXNirwanaPos, this.iYNirwanaPos));
}
}
catch (Exception e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e);
}
}
@@ -498,7 +503,7 @@ public class FormHandler
{
for (int i = this.xDrawPage.getCount(); i > -1; i--)
{
- XShape xShape = (XShape) UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i));
+ XShape xShape = UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i));
removeShape(xShape);
}
}
@@ -510,7 +515,7 @@ public class FormHandler
public void removeShape(XShape _xShape)
{
xDrawPage.remove(_xShape);
- XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, _xShape);
+ XComponent xComponent = UnoRuntime.queryInterface(XComponent.class, _xShape);
xComponent.dispose();
}
// Destroy all Shapes in Nirwana
@@ -518,7 +523,7 @@ public class FormHandler
{
for (int i = this.xDrawPage.getCount(); i > -1; i--)
{
- XShape xShape = (XShape) UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i));
+ XShape xShape = UnoRuntime.queryInterface(XShape.class, xDrawPage.getByIndex(i));
if (xShape.getPosition().Y < this.iYNirwanaPos)
{
xDrawPage.remove(xShape);
@@ -531,14 +536,14 @@ public class FormHandler
try
{
Object oGroupShape = _xMSF.createInstance("com.sun.star.drawing.ShapeCollection");
- XShapes xShapes = (XShapes) UnoRuntime.queryInterface(XShapes.class, oGroupShape);
+ XShapes xShapes = UnoRuntime.queryInterface(XShapes.class, oGroupShape);
xShapes.add(_xLabelShape);
xShapes.add(_xControlShape);
return this.xShapeGrouper.group(xShapes);
}
catch (Exception e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e);
return null;
}
}
@@ -583,12 +588,12 @@ public class FormHandler
{
try
{
- XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, this.xMSFDoc.createInstance("com.sun.star.text.DocumentSettings"));
- xPropertySet.setPropertyValue("DoNotCaptureDrawObjsOnPage", new Boolean(!_bCaptureObjects));
+ XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, this.xMSFDoc.createInstance("com.sun.star.text.DocumentSettings"));
+ xPropertySet.setPropertyValue("DoNotCaptureDrawObjsOnPage", Boolean.valueOf(!_bCaptureObjects));
}
- catch (Exception ex)
+ catch (Exception e)
{
- ex.printStackTrace(System.out);
+ Logger.getLogger(FormHandler.class.getName()).log(Level.SEVERE, null, e);
}
}
}
diff --git a/wizards/com/sun/star/wizards/document/GridControl.java b/wizards/com/sun/star/wizards/document/GridControl.java
index ef13d5c12a66..663f44cdc541 100644
--- a/wizards/com/sun/star/wizards/document/GridControl.java
+++ b/wizards/com/sun/star/wizards/document/GridControl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -76,7 +76,7 @@ public class GridControl extends Shape
FieldColumn curfieldcolumn = fieldcolumns[i];
if (curfieldcolumn.getFieldType() == DataType.TIMESTAMP)
{
- TimeStampControl oControl = new TimeStampControl(new Resource(_xMSF, "", "dbw"), this, curfieldcolumn);
+ TimeStampControl oControl = new TimeStampControl(new Resource(_xMSF, PropertyNames.EMPTY_STRING, "dbw"), this, curfieldcolumn);
}
else
{
diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.java b/wizards/com/sun/star/wizards/document/OfficeDocument.java
index ea132453bb30..f80bdde324ba 100644
--- a/wizards/com/sun/star/wizards/document/OfficeDocument.java
+++ b/wizards/com/sun/star/wizards/document/OfficeDocument.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -81,13 +81,13 @@ public class OfficeDocument
{
try
{
- XEventsSupplier xEventsSuppl = (XEventsSupplier) UnoRuntime.queryInterface(XEventsSupplier.class, xComponent);
+ XEventsSupplier xEventsSuppl = UnoRuntime.queryInterface(XEventsSupplier.class, xComponent);
PropertyValue[] oEventProperties = new PropertyValue[2];
oEventProperties[0] = new PropertyValue();
oEventProperties[0].Name = "EventType";
oEventProperties[0].Value = EventType; // "Service", "StarBasic"
oEventProperties[1] = new PropertyValue();
- oEventProperties[1].Name = "Script"; //"URL";
+ oEventProperties[1].Name = "Script"; //PropertyNames.URL;
oEventProperties[1].Value = EventURL;
xEventsSuppl.getEvents().replaceByName(EventName, oEventProperties);
}
@@ -103,8 +103,8 @@ public class OfficeDocument
{
if (xComponent != null)
{
- XModifiable xModified = (XModifiable) UnoRuntime.queryInterface(XModifiable.class, xComponent);
- XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, xComponent);
+ XModifiable xModified = UnoRuntime.queryInterface(XModifiable.class, xComponent);
+ XModel xModel = UnoRuntime.queryInterface(XModel.class, xComponent);
XFrame xFrame = xModel.getCurrentController().getFrame();
if (xModified.isModified())
{
@@ -124,14 +124,14 @@ public class OfficeDocument
* @param desktop
* @param frame
* @param sDocumentType e.g. swriter, scalc, ( simpress, scalc : not tested)
- * @return the document Component (implements XComponent) object ( XTextDocument, or XSpreadsheedDocument )
+ * @return the document Component (implements XComponent) object ( XTextDocument, or XSpreadsheedDocument )
*/
public static Object createNewDocument(XFrame frame, String sDocumentType, boolean preview, boolean readonly)
{
PropertyValue[] loadValues = new PropertyValue[2];
loadValues[0] = new PropertyValue();
- loadValues[0].Name = "ReadOnly";
+ loadValues[0].Name = PropertyNames.READ_ONLY;
loadValues[0].Value = readonly ? Boolean.TRUE : Boolean.FALSE;
loadValues[1] = new PropertyValue();
loadValues[1].Name = "Preview";
@@ -144,18 +144,18 @@ public class OfficeDocument
try
{
- xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, frame);
- /*if (frame.getName() == null || frame.getName().equals(""));
+ xComponentLoader = UnoRuntime.queryInterface(XComponentLoader.class, frame);
+ /*if (frame.getName() == null || frame.getName().equals(PropertyNames.EMPTY_STRING));
frame.setName("T" + System.currentTimeMillis());*/
XComponent xComponent = xComponentLoader.loadComponentFromURL(sURL, "_self", 0, loadValues);
- if (sDocumentType == "swriter")
+ if (sDocumentType.equals("swriter"))
{
- oDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xComponent);
+ oDocument = UnoRuntime.queryInterface(XTextDocument.class, xComponent);
}
- else if (sDocumentType == "scalc")
+ else if (sDocumentType.equals("scalc"))
{
- oDocument = (XSpreadsheetDocument) UnoRuntime.queryInterface(XSpreadsheetDocument.class, xComponent);
+ oDocument = UnoRuntime.queryInterface(XSpreadsheetDocument.class, xComponent);
//TODO:
// else if (sDocumentType == "simpress")
// else if (sDocumentType == "sdraw")
@@ -182,14 +182,14 @@ public class OfficeDocument
}
else
{
- XFrame xF = (XFrame) UnoRuntime.queryInterface(XFrame.class, Desktop.getDesktop(xMSF));
+ XFrame xF = UnoRuntime.queryInterface(XFrame.class, Desktop.getDesktop(xMSF));
xFrame = xF.findFrame(FrameName, 0);
if (listener != null)
{
- XFramesSupplier xFS = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, xF);
+ XFramesSupplier xFS = UnoRuntime.queryInterface(XFramesSupplier.class, xF);
XFrames xFF = xFS.getFrames();
xFF.remove(xFrame);
- XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, xF);
+ XDesktop xDesktop = UnoRuntime.queryInterface(XDesktop.class, xF);
xDesktop.addTerminateListener(listener);
}
}
@@ -201,7 +201,7 @@ public class OfficeDocument
XToolkit xToolkit = null;
try
{
- xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class, xMSF.createInstance("com.sun.star.awt.Toolkit"));
+ xToolkit = UnoRuntime.queryInterface(XToolkit.class, xMSF.createInstance("com.sun.star.awt.Toolkit"));
}
catch (Exception e)
{
@@ -226,14 +226,14 @@ public class OfficeDocument
XWindowPeer xPeer = null;
try
{
- xPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xToolkit.createWindow(aDescriptor));
+ xPeer = UnoRuntime.queryInterface(XWindowPeer.class, xToolkit.createWindow(aDescriptor));
}
catch (IllegalArgumentException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
- XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xPeer);
+ XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, xPeer);
//define some further properties of the frame window
//if it's needed .-)
@@ -243,7 +243,7 @@ public class OfficeDocument
XFrame xFrame = null;
try
{
- xFrame = (XFrame) UnoRuntime.queryInterface(XFrame.class, xMSF.createInstance("com.sun.star.frame.Frame"));
+ xFrame = UnoRuntime.queryInterface(XFrame.class, xMSF.createInstance("com.sun.star.frame.Frame"));
}
catch (Exception e)
{
@@ -273,13 +273,13 @@ public class OfficeDocument
//XInterface xInterface = null;
try
{
- xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, xInterface);
+ xComponentLoader = UnoRuntime.queryInterface(XComponentLoader.class, xInterface);
com.sun.star.lang.XComponent xComponent = xComponentLoader.loadComponentFromURL(sURL, sFrame, 0, xValues);
- XServiceInfo xComponentService = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, xComponent);
+ XServiceInfo xComponentService = UnoRuntime.queryInterface(XServiceInfo.class, xComponent);
if (xComponentService.supportsService("com.sun.star.text.TextDocument"))
{
- oDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xComponent); //TODO: write if clauses for Calc, Impress and Draw
+ oDocument = UnoRuntime.queryInterface(XTextDocument.class, xComponent); //TODO: write if clauses for Calc, Impress and Draw
}
}
catch (Exception exception)
@@ -293,7 +293,7 @@ public class OfficeDocument
{
try
{
- XStorable xStoreable = (XStorable) UnoRuntime.queryInterface(XStorable.class, xComponent);
+ XStorable xStoreable = UnoRuntime.queryInterface(XStorable.class, xComponent);
PropertyValue[] oStoreProperties;
if (FilterName.length() > 0)
{
@@ -303,13 +303,13 @@ public class OfficeDocument
oStoreProperties[0].Value = FilterName;
oStoreProperties[1] = new PropertyValue();
oStoreProperties[1].Name = "InteractionHandler";
- oStoreProperties[1].Value = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler"));
+ oStoreProperties[1].Value = UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler"));
}
else
{
oStoreProperties = new PropertyValue[0];
}
- if (bStoreToUrl == true)
+ if (bStoreToUrl)
{
xStoreable.storeToURL(StorePath, oStoreProperties);
}
@@ -330,11 +330,11 @@ public class OfficeDocument
public static boolean close(XComponent xComponent)
{
boolean bState = false;
- XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, xComponent);
+ XModel xModel = UnoRuntime.queryInterface(XModel.class, xComponent);
if (xModel != null)
{
- XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, xModel);
+ XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, xModel);
if (xCloseable != null)
{
@@ -351,7 +351,7 @@ public class OfficeDocument
}
else
{
- XComponent xDisposeable = (XComponent) UnoRuntime.queryInterface(XComponent.class, xModel);
+ XComponent xDisposeable = UnoRuntime.queryInterface(XComponent.class, xModel);
xDisposeable.dispose();
bState = true;
}
@@ -369,9 +369,9 @@ public class OfficeDocument
int colcount = datalist[0].length;
if (colcount > 0)
{
- XCellRange xCellRange = (XCellRange) UnoRuntime.queryInterface(XCellRange.class, oTable);
+ XCellRange xCellRange = UnoRuntime.queryInterface(XCellRange.class, oTable);
XCellRange xNewRange = xCellRange.getCellRangeByPosition(xpos, ypos, (colcount + xpos) - 1, (rowcount + ypos) - 1);
- XCellRangeData xDataArray = (XCellRangeData) UnoRuntime.queryInterface(XCellRangeData.class, xNewRange);
+ XCellRangeData xDataArray = UnoRuntime.queryInterface(XCellRangeData.class, xNewRange);
xDataArray.setDataArray(datalist);
}
}
@@ -389,13 +389,13 @@ public class OfficeDocument
PropertyValue[][] mediaDescr = new PropertyValue[1][1];
mediaDescr[0][0] = new PropertyValue();
- mediaDescr[0][0].Name = "URL";
+ mediaDescr[0][0].Name = PropertyNames.URL;
mediaDescr[0][0].Value = url;
- String type = ((XTypeDetection) UnoRuntime.queryInterface(XTypeDetection.class, typeDetect)).queryTypeByDescriptor(mediaDescr, true);
+ String type = UnoRuntime.queryInterface(XTypeDetection.class, typeDetect).queryTypeByDescriptor(mediaDescr, true);
- XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, typeDetect);
- if (type.equals(""))
+ XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, typeDetect);
+ if (type.equals(PropertyNames.EMPTY_STRING))
{
return null;
}
@@ -409,7 +409,7 @@ public class OfficeDocument
throws Exception
{
Object typeDetect = xmsf.createInstance("com.sun.star.document.TypeDetection");
- XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, typeDetect);
+ XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, typeDetect);
return (PropertyValue[]) xNameAccess.getByName(type);
}
@@ -421,13 +421,13 @@ public class OfficeDocument
*/
public static int getSlideCount(Object model)
{
- XDrawPagesSupplier xDrawPagesSupplier = (XDrawPagesSupplier) UnoRuntime.queryInterface(XDrawPagesSupplier.class, model);
+ XDrawPagesSupplier xDrawPagesSupplier = UnoRuntime.queryInterface(XDrawPagesSupplier.class, model);
return xDrawPagesSupplier.getDrawPages().getCount();
}
public static XDocumentProperties getDocumentProperties(Object document)
{
- XDocumentPropertiesSupplier xDocumentPropertiesSupplier = (XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, document);
+ XDocumentPropertiesSupplier xDocumentPropertiesSupplier = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, document);
return xDocumentPropertiesSupplier.getDocumentProperties();
}
diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py
index 0c10856e1383..f053baebe703 100644
--- a/wizards/com/sun/star/wizards/document/OfficeDocument.py
+++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py
@@ -290,3 +290,4 @@ class OfficeDocument(object):
def setWindowPeer(self, windowPeer):
self.xWindowPeer = windowPeer
+
diff --git a/wizards/com/sun/star/wizards/document/Shape.java b/wizards/com/sun/star/wizards/document/Shape.java
index b2ef1a27e662..d5677fa2d366 100644
--- a/wizards/com/sun/star/wizards/document/Shape.java
+++ b/wizards/com/sun/star/wizards/document/Shape.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -73,8 +73,8 @@ public class Shape
this.aSize = _aSize;
this.oFormHandler = _oFormHandler;
Object oShape = oFormHandler.xMSF.createInstance(_sServiceName);
- xShapes = (XShapes) UnoRuntime.queryInterface(XShapes.class, oShape);
- xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, oShape);
+ xShapes = UnoRuntime.queryInterface(XShapes.class, oShape);
+ xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, oShape);
}
catch (Exception e)
{
@@ -92,7 +92,7 @@ public class Shape
{
xMSF = oFormHandler.xMSFDoc;
Object oShape = xMSF.createInstance(sServiceName);
- xShape = (XShape) UnoRuntime.queryInterface(XShape.class, oShape);
+ xShape = UnoRuntime.queryInterface(XShape.class, oShape);
xShape.setPosition(aPoint);
if (aSize != null)
{
@@ -103,8 +103,8 @@ public class Shape
xShape.setSize(new Size(1000, 100));
}
Helper.setUnoPropertyValue(xShape, "AnchorType", TextContentAnchorType.AT_PARAGRAPH);
- xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, xShape);
- xControlShape = (XControlShape) UnoRuntime.queryInterface(XControlShape.class, xShape);
+ xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, xShape);
+ xControlShape = UnoRuntime.queryInterface(XControlShape.class, xShape);
}
catch (Exception e)
diff --git a/wizards/com/sun/star/wizards/document/TimeStampControl.java b/wizards/com/sun/star/wizards/document/TimeStampControl.java
index fb5c328aef23..a012b4109015 100644
--- a/wizards/com/sun/star/wizards/document/TimeStampControl.java
+++ b/wizards/com/sun/star/wizards/document/TimeStampControl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,7 +46,7 @@ public class TimeStampControl extends DatabaseControl
DatabaseControl oDateControl;
DatabaseControl oTimeControl;
-// XShape xGroupShape;
+// XShape xGroupShape;
Resource oResource;
private String sDateAppendix; // = GetResText(RID_FORM + 4)
private String sTimeAppendix; // = GetResText(RID_FORM + 5)
@@ -75,7 +75,7 @@ public class TimeStampControl extends DatabaseControl
xShapes.add(oDateControl.xShape);
xShapes.add(oTimeControl.xShape);
xShapeGroup = _oFormHandler.xShapeGrouper.group(xShapes);
- xShapeGroup = (XShape) UnoRuntime.queryInterface(XShape.class, xShapeGroup);
+ xShapeGroup = UnoRuntime.queryInterface(XShape.class, xShapeGroup);
nreldatewidth = 1.0 / ((double) getSize().Width / (double) nDateWidth);
nreltimewidth = 1.0 - nreldatewidth;
}
@@ -87,9 +87,8 @@ public class TimeStampControl extends DatabaseControl
if (_i < xShapes.getCount())
{
Object oControl = xShapes.getByIndex(_i);
- XControlShape xControlShape = (XControlShape) UnoRuntime.queryInterface(XControlShape.class, oControl);
- XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlShape.getControl());
- return xPropertySet;
+ XControlShape xControlShape = UnoRuntime.queryInterface(XControlShape.class, oControl);
+ return UnoRuntime.queryInterface(XPropertySet.class, xControlShape.getControl());
}
}
catch (Exception e)
@@ -105,8 +104,8 @@ public class TimeStampControl extends DatabaseControl
oResource = _oResource;
sDateAppendix = oResource.getResText(UIConsts.RID_FORM + 88);
sTimeAppendix = oResource.getResText(UIConsts.RID_FORM + 89);
- oDateControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.DATE, _curfieldcolumn.getFieldTitle() + " " + sDateAppendix);
- oTimeControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.TIME, _curfieldcolumn.getFieldTitle() + " " + sTimeAppendix);
+ oDateControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.DATE, _curfieldcolumn.getFieldTitle() + PropertyNames.SPACE + sDateAppendix);
+ oTimeControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.TIME, _curfieldcolumn.getFieldTitle() + PropertyNames.SPACE + sTimeAppendix);
}
public void setPropertyValue(String _sPropertyName, Object _aPropertyValue) throws Exception
diff --git a/wizards/com/sun/star/wizards/fax/CGFax.java b/wizards/com/sun/star/wizards/fax/CGFax.java
index 067c4dce09f1..301a792796df 100644
--- a/wizards/com/sun/star/wizards/fax/CGFax.java
+++ b/wizards/com/sun/star/wizards/fax/CGFax.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/fax/CGFaxWizard.java b/wizards/com/sun/star/wizards/fax/CGFaxWizard.java
index 232d4ee8c163..9daf3ded5a5c 100644
--- a/wizards/com/sun/star/wizards/fax/CGFaxWizard.java
+++ b/wizards/com/sun/star/wizards/fax/CGFaxWizard.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/fax/CGFaxWizard.py b/wizards/com/sun/star/wizards/fax/CGFaxWizard.py
index cf7326d00f3b..a6729e4a5486 100644
--- a/wizards/com/sun/star/wizards/fax/CGFaxWizard.py
+++ b/wizards/com/sun/star/wizards/fax/CGFaxWizard.py
@@ -7,3 +7,4 @@ class CGFaxWizard(ConfigGroup):
self.cp_FaxType = int()
self.cp_BusinessFax = CGFax()
self.cp_PrivateFax = CGFax()
+
diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.java b/wizards/com/sun/star/wizards/fax/CallWizard.java
index 69e061f95918..d92a9c44a4cc 100644
--- a/wizards/com/sun/star/wizards/fax/CallWizard.java
+++ b/wizards/com/sun/star/wizards/fax/CallWizard.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,6 +38,7 @@ import com.sun.star.registry.XRegistryKey;
import com.sun.star.task.XJob;
import com.sun.star.task.XJobExecutor;
import com.sun.star.uno.Type;
+import com.sun.star.wizards.common.PropertyNames;
/**
* This class capsulates the class, that implements the minimal component, a factory for
@@ -52,7 +53,7 @@ public class CallWizard
/**
* Gives a factory for creating the service. This method is called by the
* <code>JavaLoader</code>
- *
+ *
* <p></p>
*
* @param stringImplementationName The implementation name of the component.
@@ -105,7 +106,7 @@ public class CallWizard
*/
public void trigger(String str)
{
- if (str.equalsIgnoreCase("start"))
+ if (str.equalsIgnoreCase(PropertyNames.START))
{
FaxWizardDialogImpl lw = new FaxWizardDialogImpl(xmultiservicefactory);
if (!FaxWizardDialogImpl.running)
@@ -189,7 +190,7 @@ public class CallWizard
try
{
- byteReturn = ("" + this.hashCode()).getBytes();
+ byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes();
}
catch (Exception exception)
{
diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.py b/wizards/com/sun/star/wizards/fax/CallWizard.py
index d38c0886e968..21414507e6c6 100644
--- a/wizards/com/sun/star/wizards/fax/CallWizard.py
+++ b/wizards/com/sun/star/wizards/fax/CallWizard.py
@@ -153,3 +153,4 @@ class CallWizard(object):
traceback.print_exc()
return (typeReturn)
+
diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.java b/wizards/com/sun/star/wizards/fax/FaxDocument.java
index 7cb8178d3264..68e731bf596e 100644
--- a/wizards/com/sun/star/wizards/fax/FaxDocument.java
+++ b/wizards/com/sun/star/wizards/fax/FaxDocument.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,8 +56,7 @@ public class FaxDocument extends TextDocument
public XWindowPeer getWindowPeer()
{
- XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xTextDocument);
- return xWindowPeer;
+ return UnoRuntime.queryInterface(XWindowPeer.class, xTextDocument);
}
public void switchElement(String sElement, boolean bState)
@@ -66,7 +65,7 @@ public class FaxDocument extends TextDocument
{
TextSectionHandler mySectionHandler = new TextSectionHandler(xMSF, xTextDocument);
Object oSection = mySectionHandler.xTextSectionsSupplier.getTextSections().getByName(sElement);
- Helper.setUnoPropertyValue(oSection, "IsVisible", new Boolean(bState));
+ Helper.setUnoPropertyValue(oSection, "IsVisible", Boolean.valueOf(bState));
}
catch (Exception exception)
@@ -88,20 +87,20 @@ public class FaxDocument extends TextDocument
xTextDocument.lockControllers();
try
{
- XStyleFamiliesSupplier xStyleFamiliesSupplier = (XStyleFamiliesSupplier) com.sun.star.uno.UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
+ XStyleFamiliesSupplier xStyleFamiliesSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
com.sun.star.container.XNameAccess xNameAccess = null;
xNameAccess = xStyleFamiliesSupplier.getStyleFamilies();
com.sun.star.container.XNameContainer xPageStyleCollection = null;
- xPageStyleCollection = (com.sun.star.container.XNameContainer) UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles"));
+ xPageStyleCollection = UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles"));
XText xFooterText;
- XStyle xPageStyle = (XStyle) UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName(sPageStyle));
+ XStyle xPageStyle = UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName(sPageStyle));
if (bState)
{
- Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", new Boolean(true));
- xFooterText = (XText) UnoRuntime.queryInterface(XText.class, Helper.getUnoPropertyValue(xPageStyle, "FooterText"));
+ Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", Boolean.TRUE);
+ xFooterText = UnoRuntime.queryInterface(XText.class, Helper.getUnoPropertyValue(xPageStyle, "FooterText"));
xFooterText.setString(sText);
if (bPageNumber)
{
@@ -109,10 +108,10 @@ public class FaxDocument extends TextDocument
XTextCursor myCursor = xFooterText.createTextCursor();
myCursor.gotoEnd(false);
xFooterText.insertControlCharacter(myCursor, ControlCharacter.PARAGRAPH_BREAK, false);
- XPropertySet xCursorPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, myCursor);
+ XPropertySet xCursorPSet = UnoRuntime.queryInterface(XPropertySet.class, myCursor);
xCursorPSet.setPropertyValue("ParaAdjust", ParagraphAdjust.CENTER);
- XTextField xPageNumberField = (XTextField) UnoRuntime.queryInterface(XTextField.class, xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber"));
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xPageNumberField);
+ XTextField xPageNumberField = UnoRuntime.queryInterface(XTextField.class, xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber"));
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xPageNumberField);
xPSet.setPropertyValue("SubType", PageNumberType.CURRENT);
xPSet.setPropertyValue("NumberingType", new Short(NumberingType.ARABIC));
xFooterText.insertTextContent(xFooterText.getEnd(), xPageNumberField, false);
@@ -120,7 +119,7 @@ public class FaxDocument extends TextDocument
}
else
{
- Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", new Boolean(false));
+ Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", Boolean.FALSE);
}
xTextDocument.unlockControllers();
}
@@ -153,7 +152,7 @@ public class FaxDocument extends TextDocument
}
else
{
- myFieldHandler.changeUserFieldContent(sFieldName, "");
+ myFieldHandler.changeUserFieldContent(sFieldName, PropertyNames.EMPTY_STRING);
}
}
@@ -179,7 +178,7 @@ public class FaxDocument extends TextDocument
public void killEmptyUserFields()
{
TextFieldHandler myFieldHandler = new TextFieldHandler(xMSF, xTextDocument);
- myFieldHandler.removeUserFieldByContent("");
+ myFieldHandler.removeUserFieldByContent(PropertyNames.EMPTY_STRING);
}
public void killEmptyFrames()
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java
index fc095af0d337..bd9407c22df2 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -112,11 +112,11 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
Helper.setUnoPropertyValues(xDialogModel,
new String[]
{
- "Closeable", PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_CLOSEABLE, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_MOVEABLE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- Boolean.TRUE, new Integer(210), Boolean.TRUE, new Integer(104), new Integer(52), INTEGERS[1], new Short((short) 1), resources.resFaxWizardDialog_title, new Integer(310)
+ Boolean.TRUE, 210, Boolean.TRUE, 104, 52, INTEGERS[1], new Short((short) 1), resources.resFaxWizardDialog_title, 310
});
@@ -138,7 +138,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], OPTBUSINESSFAX_HID, resources.resoptBusinessFax_value, new Integer(97), new Integer(28), INTEGERS[1], new Short((short) 1), new Integer(184)
+ INTEGERS[8], OPTBUSINESSFAX_HID, resources.resoptBusinessFax_value, 97, 28, INTEGERS[1], new Short((short) 1), 184
});
lstBusinessStyle = insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED,
new String[]
@@ -147,7 +147,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, LSTBUSINESSSTYLE_HID, new Integer(180), INTEGER_40, INTEGERS[1], new Short((short) 3), new Integer(74)
+ Boolean.TRUE, INTEGER_12, LSTBUSINESSSTYLE_HID, 180, INTEGER_40, INTEGERS[1], new Short((short) 3), 74
});
optPrivateFax = insertRadioButton("optPrivateFax", OPTPRIVATEFAX_ITEM_CHANGED,
new String[]
@@ -156,7 +156,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], OPTPRIVATEFAX_HID, resources.resoptPrivateFax_value, new Integer(97), new Integer(81), INTEGERS[1], new Short((short) 2), new Integer(184)
+ INTEGERS[8], OPTPRIVATEFAX_HID, resources.resoptPrivateFax_value, 97, 81, INTEGERS[1], new Short((short) 2), 184
});
lstPrivateStyle = insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED,
new String[]
@@ -165,7 +165,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, LSTPRIVATESTYLE_HID, new Integer(180), new Integer(95), INTEGERS[1], new Short((short) 4), new Integer(74)
+ Boolean.TRUE, INTEGER_12, LSTPRIVATESTYLE_HID, 180, 95, INTEGERS[1], new Short((short) 4), 74
});
lblBusinessStyle = insertLabel("lblBusinessStyle",
new String[]
@@ -174,16 +174,16 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], resources.reslblBusinessStyle_value, new Integer(110), new Integer(42), INTEGERS[1], new Short((short) 32), new Integer(60)
+ INTEGERS[8], resources.reslblBusinessStyle_value, 110, 42, INTEGERS[1], new Short((short) 32), 60
});
lblTitle1 = insertLabel("lblTitle1",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- fontDescriptor5, INTEGER_16, resources.reslblTitle1_value, Boolean.TRUE, new Integer(91), INTEGERS[8], INTEGERS[1], new Short((short) 37), new Integer(212)
+ fontDescriptor5, INTEGER_16, resources.reslblTitle1_value, Boolean.TRUE, 91, INTEGERS[8], INTEGERS[1], new Short((short) 37), 212
});
lblPrivateStyle = insertLabel("lblPrivateStyle",
new String[]
@@ -192,7 +192,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], resources.reslblPrivateStyle_value, new Integer(110), new Integer(95), INTEGERS[1], new Short((short) 50), new Integer(60)
+ INTEGERS[8], resources.reslblPrivateStyle_value, 110, 95, INTEGERS[1], new Short((short) 50), 60
});
lblIntroduction = insertLabel("lblIntroduction",
new String[]
@@ -201,12 +201,12 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- new Integer(39), resources.reslblIntroduction_value, Boolean.TRUE, new Integer(104), new Integer(145), INTEGERS[1], new Short((short) 55), new Integer(199)
+ 39, resources.reslblIntroduction_value, Boolean.TRUE, 104, 145, INTEGERS[1], new Short((short) 55), 199
});
ImageControl3 = insertInfoImage(92, 145, 1);
-// ImageControl3 = insertImage("ImageControl3",
-// new String[] {"Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH},
-// new Object[] { new Short((short)0),INTEGERS[10],"private:resource/dbu/image/19205",new Integer(92),new Integer(145),Boolean.FALSE,INTEGERS[1],new Short((short)56),INTEGERS[10]}
+// ImageControl3 = insertImage("ImageControl3",
+// new String[] {PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH},
+// new Object[] { new Short((short)0),INTEGERS[10],"private:resource/dbu/image/19205",92,145,Boolean.FALSE,INTEGERS[1],new Short((short)56),INTEGERS[10]}
// );
}
@@ -219,7 +219,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], CHKUSELOGO_HID, resources.reschkUseLogo_value, new Integer(97), new Integer(28), new Short((short) 0), INTEGERS[2], new Short((short) 5), new Integer(212)
+ INTEGERS[8], CHKUSELOGO_HID, resources.reschkUseLogo_value, 97, 28, new Short((short) 0), INTEGERS[2], new Short((short) 5), 212
});
chkUseDate = insertCheckBox("chkUseDate", CHKUSEDATE_ITEM_CHANGED,
new String[]
@@ -228,7 +228,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], CHKUSEDATE_HID, resources.reschkUseDate_value, new Integer(97), new Integer(43), new Short((short) 0), INTEGERS[2], new Short((short) 6), new Integer(212)
+ INTEGERS[8], CHKUSEDATE_HID, resources.reschkUseDate_value, 97, 43, new Short((short) 0), INTEGERS[2], new Short((short) 6), 212
});
chkUseCommunicationType = insertCheckBox("chkUseCommunicationType", CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED,
new String[]
@@ -237,7 +237,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], CHKUSECOMMUNICATIONTYPE_HID, resources.reschkUseCommunicationType_value, new Integer(97), new Integer(57), new Short((short) 0), INTEGERS[2], new Short((short) 7), new Integer(100)
+ INTEGERS[8], CHKUSECOMMUNICATIONTYPE_HID, resources.reschkUseCommunicationType_value, 97, 57, new Short((short) 0), INTEGERS[2], new Short((short) 7), 100
});
lstCommunicationType = insertComboBox("lstCommunicationType", LSTCOMMUNICATIONTYPE_ACTION_PERFORMED, LSTCOMMUNICATIONTYPE_ITEM_CHANGED, LSTCOMMUNICATIONTYPE_TEXT_CHANGED,
new String[]
@@ -246,7 +246,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, LSTCOMMUNICATIONTYPE_HID, new Integer(105), new Integer(68), INTEGERS[2], new Short((short) 8), new Integer(174)
+ Boolean.TRUE, INTEGER_12, LSTCOMMUNICATIONTYPE_HID, 105, 68, INTEGERS[2], new Short((short) 8), 174
});
chkUseSubject = insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED,
new String[]
@@ -255,7 +255,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], CHKUSESUBJECT_HID, resources.reschkUseSubject_value, new Integer(97), new Integer(87), new Short((short) 0), INTEGERS[2], new Short((short) 9), new Integer(212)
+ INTEGERS[8], CHKUSESUBJECT_HID, resources.reschkUseSubject_value, 97, 87, new Short((short) 0), INTEGERS[2], new Short((short) 9), 212
});
chkUseSalutation = insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED,
new String[]
@@ -264,7 +264,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], CHKUSESALUTATION_HID, resources.reschkUseSalutation_value, new Integer(97), new Integer(102), new Short((short) 0), INTEGERS[2], new Short((short) 10), new Integer(100)
+ INTEGERS[8], CHKUSESALUTATION_HID, resources.reschkUseSalutation_value, 97, 102, new Short((short) 0), INTEGERS[2], new Short((short) 10), 100
});
lstSalutation = insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED,
new String[]
@@ -273,7 +273,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, LSTSALUTATION_HID, new Integer(105), new Integer(113), INTEGERS[2], new Short((short) 11), new Integer(174)
+ Boolean.TRUE, INTEGER_12, LSTSALUTATION_HID, 105, 113, INTEGERS[2], new Short((short) 11), 174
});
chkUseGreeting = insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED,
new String[]
@@ -282,7 +282,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], CHKUSEGREETING_HID, resources.reschkUseGreeting_value, new Integer(97), new Integer(132), new Short((short) 0), INTEGERS[2], new Short((short) 12), new Integer(100)
+ INTEGERS[8], CHKUSEGREETING_HID, resources.reschkUseGreeting_value, 97, 132, new Short((short) 0), INTEGERS[2], new Short((short) 12), 100
});
lstGreeting = insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED,
new String[]
@@ -291,7 +291,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, LSTGREETING_HID, new Integer(105), new Integer(143), INTEGERS[2], new Short((short) 13), new Integer(174)
+ Boolean.TRUE, INTEGER_12, LSTGREETING_HID, 105, 143, INTEGERS[2], new Short((short) 13), 174
});
chkUseFooter = insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED,
new String[]
@@ -300,16 +300,16 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], CHKUSEFOOTER_HID, resources.reschkUseFooter_value, new Integer(97), new Integer(163), new Short((short) 0), INTEGERS[2], new Short((short) 14), new Integer(212)
+ INTEGERS[8], CHKUSEFOOTER_HID, resources.reschkUseFooter_value, 97, 163, new Short((short) 0), INTEGERS[2], new Short((short) 14), 212
});
lblTitle3 = insertLabel("lblTitle3",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- fontDescriptor5, INTEGER_16, resources.reslblTitle3_value, Boolean.TRUE, new Integer(91), INTEGERS[8], INTEGERS[2], new Short((short) 59), new Integer(212)
+ fontDescriptor5, INTEGER_16, resources.reslblTitle3_value, Boolean.TRUE, 91, INTEGERS[8], INTEGERS[2], new Short((short) 59), 212
});
}
@@ -322,7 +322,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], OPTSENDERPLACEHOLDER_HID, resources.resoptSenderPlaceholder_value, new Integer(104), new Integer(42), INTEGERS[3], new Short((short) 15), new Integer(149)
+ INTEGERS[8], OPTSENDERPLACEHOLDER_HID, resources.resoptSenderPlaceholder_value, 104, 42, INTEGERS[3], new Short((short) 15), 149
});
optSenderDefine = insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED,
new String[]
@@ -331,7 +331,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], OPTSENDERDEFINE_HID, resources.resoptSenderDefine_value, new Integer(104), new Integer(54), INTEGERS[3], new Short((short) 16), new Integer(149)
+ INTEGERS[8], OPTSENDERDEFINE_HID, resources.resoptSenderDefine_value, 104, 54, INTEGERS[3], new Short((short) 16), 149
});
txtSenderName = insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED,
new String[]
@@ -340,7 +340,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGER_12, TXTSENDERNAME_HID, new Integer(182), new Integer(67), INTEGERS[3], new Short((short) 17), new Integer(119)
+ INTEGER_12, TXTSENDERNAME_HID, 182, 67, INTEGERS[3], new Short((short) 17), 119
});
txtSenderStreet = insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED,
new String[]
@@ -349,7 +349,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGER_12, TXTSENDERSTREET_HID, new Integer(182), new Integer(81), INTEGERS[3], new Short((short) 18), new Integer(119)
+ INTEGER_12, TXTSENDERSTREET_HID, 182, 81, INTEGERS[3], new Short((short) 18), 119
});
txtSenderPostCode = insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED,
new String[]
@@ -358,7 +358,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGER_12, TXTSENDERPOSTCODE_HID, new Integer(182), new Integer(95), INTEGERS[3], new Short((short) 19), new Integer(25)
+ INTEGER_12, TXTSENDERPOSTCODE_HID, 182, 95, INTEGERS[3], new Short((short) 19), 25
});
txtSenderState = insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED,
new String[]
@@ -367,7 +367,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGER_12, TXTSENDERSTATE_HID, new Integer(211), new Integer(95), INTEGERS[3], new Short((short) 20), new Integer(21)
+ INTEGER_12, TXTSENDERSTATE_HID, 211, 95, INTEGERS[3], new Short((short) 20), 21
});
txtSenderCity = insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED,
new String[]
@@ -376,7 +376,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGER_12, TXTSENDERCITY_HID, new Integer(236), new Integer(95), INTEGERS[3], new Short((short) 21), new Integer(65)
+ INTEGER_12, TXTSENDERCITY_HID, 236, 95, INTEGERS[3], new Short((short) 21), 65
});
txtSenderFax = insertTextField("txtSenderFax", TXTSENDERFAX_TEXT_CHANGED,
new String[]
@@ -385,7 +385,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGER_12, TXTSENDERFAX_HID, new Integer(182), new Integer(109), INTEGERS[3], new Short((short) 22), new Integer(119)
+ INTEGER_12, TXTSENDERFAX_HID, 182, 109, INTEGERS[3], new Short((short) 22), 119
});
optReceiverPlaceholder = insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED,
new String[]
@@ -394,7 +394,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], OPTRECEIVERPLACEHOLDER_HID, resources.resoptReceiverPlaceholder_value, new Integer(104), new Integer(148), INTEGERS[3], new Short((short) 23), new Integer(200)
+ INTEGERS[8], OPTRECEIVERPLACEHOLDER_HID, resources.resoptReceiverPlaceholder_value, 104, 148, INTEGERS[3], new Short((short) 23), 200
});
optReceiverDatabase = insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED,
new String[]
@@ -403,7 +403,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], OPTRECEIVERDATABASE_HID, resources.resoptReceiverDatabase_value, new Integer(104), new Integer(160), INTEGERS[3], new Short((short) 24), new Integer(200)
+ INTEGERS[8], OPTRECEIVERDATABASE_HID, resources.resoptReceiverDatabase_value, 104, 160, INTEGERS[3], new Short((short) 24), 200
});
lblSenderAddress = insertLabel("lblSenderAddress",
new String[]
@@ -412,7 +412,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], resources.reslblSenderAddress_value, new Integer(97), new Integer(28), INTEGERS[3], new Short((short) 46), new Integer(136)
+ INTEGERS[8], resources.reslblSenderAddress_value, 97, 28, INTEGERS[3], new Short((short) 46), 136
});
FixedLine2 = insertFixedLine("FixedLine2",
new String[]
@@ -421,7 +421,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[5], new Integer(90), new Integer(126), INTEGERS[3], new Short((short) 51), new Integer(212)
+ INTEGERS[5], 90, 126, INTEGERS[3], new Short((short) 51), 212
});
lblSenderName = insertLabel("lblSenderName",
new String[]
@@ -430,7 +430,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], resources.reslblSenderName_value, new Integer(113), new Integer(69), INTEGERS[3], new Short((short) 52), new Integer(68)
+ INTEGERS[8], resources.reslblSenderName_value, 113, 69, INTEGERS[3], new Short((short) 52), 68
});
lblSenderStreet = insertLabel("lblSenderStreet",
new String[]
@@ -439,7 +439,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], resources.reslblSenderStreet_value, new Integer(113), new Integer(82), INTEGERS[3], new Short((short) 53), new Integer(68)
+ INTEGERS[8], resources.reslblSenderStreet_value, 113, 82, INTEGERS[3], new Short((short) 53), 68
});
lblPostCodeCity = insertLabel("lblPostCodeCity",
new String[]
@@ -448,16 +448,16 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], resources.reslblPostCodeCity_value, new Integer(113), new Integer(97), INTEGERS[3], new Short((short) 54), new Integer(68)
+ INTEGERS[8], resources.reslblPostCodeCity_value, 113, 97, INTEGERS[3], new Short((short) 54), 68
});
lblTitle4 = insertLabel("lblTitle4",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- fontDescriptor5, INTEGER_16, resources.reslblTitle4_value, Boolean.TRUE, new Integer(91), INTEGERS[8], INTEGERS[3], new Short((short) 60), new Integer(212)
+ fontDescriptor5, INTEGER_16, resources.reslblTitle4_value, Boolean.TRUE, 91, INTEGERS[8], INTEGERS[3], new Short((short) 60), 212
});
Label1 = insertLabel("lblSenderFax",
new String[]
@@ -466,7 +466,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], resources.resLabel1_value, new Integer(113), new Integer(111), INTEGERS[3], new Short((short) 68), new Integer(68)
+ INTEGERS[8], resources.resLabel1_value, 113, 111, INTEGERS[3], new Short((short) 68), 68
});
Label2 = insertLabel("Label2",
new String[]
@@ -475,7 +475,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], resources.resLabel2_value, new Integer(97), new Integer(137), INTEGERS[3], new Short((short) 69), new Integer(136)
+ INTEGERS[8], resources.resLabel2_value, 97, 137, INTEGERS[3], new Short((short) 69), 136
});
}
@@ -488,7 +488,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- new Integer(47), TXTFOOTER_HID, Boolean.TRUE, new Integer(97), INTEGER_40, INTEGERS[4], new Short((short) 25), new Integer(203)
+ 47, TXTFOOTER_HID, Boolean.TRUE, 97, INTEGER_40, INTEGERS[4], new Short((short) 25), 203
});
chkFooterNextPages = insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED,
new String[]
@@ -497,7 +497,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], CHKFOOTERNEXTPAGES_HID, resources.reschkFooterNextPages_value, new Integer(97), new Integer(92), new Short((short) 0), INTEGERS[4], new Short((short) 26), new Integer(202)
+ INTEGERS[8], CHKFOOTERNEXTPAGES_HID, resources.reschkFooterNextPages_value, 97, 92, new Short((short) 0), INTEGERS[4], new Short((short) 26), 202
});
chkFooterPageNumbers = insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED,
new String[]
@@ -506,25 +506,25 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], CHKFOOTERPAGENUMBERS_HID, resources.reschkFooterPageNumbers_value, new Integer(97), new Integer(106), new Short((short) 0), INTEGERS[4], new Short((short) 27), new Integer(201)
+ INTEGERS[8], CHKFOOTERPAGENUMBERS_HID, resources.reschkFooterPageNumbers_value, 97, 106, new Short((short) 0), INTEGERS[4], new Short((short) 27), 201
});
lblFooter = insertLabel("lblFooter",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, 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[]
{
- fontDescriptor4, INTEGERS[8], resources.reslblFooter_value, new Integer(97), new Integer(28), INTEGERS[4], new Short((short) 33), new Integer(116)
+ fontDescriptor4, INTEGERS[8], resources.reslblFooter_value, 97, 28, INTEGERS[4], new Short((short) 33), 116
});
lblTitle5 = insertLabel("lblTitle5",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- fontDescriptor5, INTEGER_16, resources.reslblTitle5_value, Boolean.TRUE, new Integer(91), INTEGERS[8], INTEGERS[4], new Short((short) 61), new Integer(212)
+ fontDescriptor5, INTEGER_16, resources.reslblTitle5_value, Boolean.TRUE, 91, INTEGERS[8], INTEGERS[4], new Short((short) 61), 212
});
}
@@ -537,12 +537,12 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGER_12, TXTTEMPLATENAME_HID, new Integer(202), new Integer(56), INTEGERS[5], new Short((short) 28), resources.restxtTemplateName_value, new Integer(100)
+ INTEGER_12, TXTTEMPLATENAME_HID, 202, 56, INTEGERS[5], new Short((short) 28), resources.restxtTemplateName_value, 100
});
/*
fileTemplatePath = insertFileControl("fileTemplatePath", FILETEMPLATEPATH_TEXT_CHANGED,
new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH},
- new Object[] { INTEGER_12,FILETEMPLATEPATH_HID,new Integer(172),new Integer(74),INTEGERS[5],new Short((short)29),new Integer(130)}
+ new Object[] { INTEGER_12,FILETEMPLATEPATH_HID,172,74,INTEGERS[5],new Short((short)29),130}
);
*/
optCreateFax = insertRadioButton("optCreateFax", OPTCREATEFAX_ITEM_CHANGED,
@@ -552,7 +552,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], OPTCREATEFAX_HID, resources.resoptCreateFax_value, new Integer(104), new Integer(111), INTEGERS[5], new Short((short) 30), new Integer(198)
+ INTEGERS[8], OPTCREATEFAX_HID, resources.resoptCreateFax_value, 104, 111, INTEGERS[5], new Short((short) 30), 198
});
optMakeChanges = insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED,
new String[]
@@ -561,7 +561,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], OPTMAKECHANGES_HID, resources.resoptMakeChanges_value, new Integer(104), new Integer(123), INTEGERS[5], new Short((short) 31), new Integer(198)
+ INTEGERS[8], OPTMAKECHANGES_HID, resources.resoptMakeChanges_value, 104, 123, INTEGERS[5], new Short((short) 31), 198
});
lblFinalExplanation1 = insertLabel("lblFinalExplanation1",
new String[]
@@ -570,7 +570,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- new Integer(28), resources.reslblFinalExplanation1_value, Boolean.TRUE, new Integer(97), new Integer(28), INTEGERS[5], new Short((short) 34), new Integer(205)
+ 28, resources.reslblFinalExplanation1_value, Boolean.TRUE, 97, 28, INTEGERS[5], new Short((short) 34), 205
});
lblProceed = insertLabel("lblProceed",
new String[]
@@ -579,7 +579,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], resources.reslblProceed_value, new Integer(97), new Integer(100), INTEGERS[5], new Short((short) 35), new Integer(204)
+ INTEGERS[8], resources.reslblProceed_value, 97, 100, INTEGERS[5], new Short((short) 35), 204
});
lblFinalExplanation2 = insertLabel("lblFinalExplanation2",
new String[]
@@ -588,16 +588,16 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- new Integer(33), resources.reslblFinalExplanation2_value, Boolean.TRUE, new Integer(104), new Integer(145), INTEGERS[5], new Short((short) 36), new Integer(199)
+ 33, resources.reslblFinalExplanation2_value, Boolean.TRUE, 104, 145, INTEGERS[5], new Short((short) 36), 199
});
ImageControl2 = insertImage("ImageControl2",
new String[]
{
- "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Short((short) 0), INTEGERS[10], "private:resource/dbu/image/19205", new Integer(92), new Integer(145), Boolean.FALSE, INTEGERS[5], new Short((short) 47), INTEGERS[10]
+ new Short((short) 0), INTEGERS[10], "private:resource/dbu/image/19205", 92, 145, Boolean.FALSE, INTEGERS[5], new Short((short) 47), INTEGERS[10]
});
lblTemplateName = insertLabel("lblTemplateName",
new String[]
@@ -606,22 +606,22 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD
},
new Object[]
{
- INTEGERS[8], resources.reslblTemplateName_value, new Integer(97), new Integer(58), INTEGERS[5], new Short((short) 57), new Integer(101)
+ INTEGERS[8], resources.reslblTemplateName_value, 97, 58, INTEGERS[5], new Short((short) 57), 101
});
/*
- lblTemplatePath = insertLabel("lblTemplatePath",
+ lblTemplatePath = insertLabel("lblTemplatePath",
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[] { INTEGERS[8],resources.reslblTemplatePath_value,new Integer(97),new Integer(77),INTEGERS[5],new Short((short)58),new Integer(71)}
+ new Object[] { INTEGERS[8],resources.reslblTemplatePath_value,97,77,INTEGERS[5],new Short((short)58),71}
);
*/
lblTitle6 = insertLabel("lblTitle6",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- fontDescriptor5, INTEGER_16, resources.reslblTitle6_value, Boolean.TRUE, new Integer(91), INTEGERS[8], INTEGERS[5], new Short((short) 62), new Integer(212)
+ fontDescriptor5, INTEGER_16, resources.reslblTitle6_value, Boolean.TRUE, 91, INTEGERS[8], INTEGERS[5], new Short((short) 62), 212
});
}
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.java
index a3c5c8e488dd..c82695b253d5 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.java
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -77,7 +77,7 @@ public interface FaxWizardDialogConst
* Help IDs
* ====================================
*/
- public final static int HID = 41119; //TODO enter first hid here
+ public final static int HID = 41119; //TODO enter first hid here
public static final int HIDMAIN = 41180;
public final String OPTBUSINESSFAX_HID = HelpIds.getHelpIdString(HID + 1);
public final String LSTBUSINESSSTYLE_HID = HelpIds.getHelpIdString(HID + 2);
@@ -113,4 +113,4 @@ public interface FaxWizardDialogConst
public final String OPTMAKECHANGES_HID = HelpIds.getHelpIdString(HID + 32);
public final String IMAGECONTROL2_HID = HelpIds.getHelpIdString(HID + 33);
}
-
+
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
index 8ee9f0472c57..05cdd075ffee 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -162,13 +162,13 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
//update the dialog UI according to the loaded Configuration
updateUI();
- if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(""))
+ if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING))
{
myPathSelection.initializePath();
}
XWindow xContainerWindow = myFaxDoc.xFrame.getContainerWindow();
- XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow);
+ XWindowPeer xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow);
createWindowPeer(xWindowPeer);
//add the Roadmap to the dialog:
@@ -198,8 +198,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
removeTerminateListener();
exception.printStackTrace(System.out);
running = false;
- return;
- }
+ }
}
public void cancelWizard()
@@ -217,7 +216,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
//myFaxDoc.xTextDocument.lockControllers();
FileAccess fileAccess = new FileAccess(xMSF);
sPath = myPathSelection.getSelectedPath();
- if (sPath.equals(""))
+ if (sPath.equals(PropertyNames.EMPTY_STRING))
{
myPathSelection.triggerPathPicker();
sPath = myPathSelection.getSelectedPath();
@@ -250,7 +249,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
if (bSaveSuccess)
{
saveConfiguration();
- XInteractionHandler xIH = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler"));
+ XInteractionHandler xIH = UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler"));
PropertyValue loadValues[] = new PropertyValue[4];
loadValues[0] = new PropertyValue();
loadValues[0].Name = "AsTemplate";
@@ -275,7 +274,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
}
Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), sPath, "_default", loadValues);
XTextDocument xTextDocument = (com.sun.star.text.XTextDocument) oDoc;
- XMultiServiceFactory xDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
+ XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
ViewHandler myViewHandler = new ViewHandler(xDocMSF, xTextDocument);
myViewHandler.setViewSetting("ZoomType", new Short(com.sun.star.view.DocumentZoomType.OPTIMAL));
}
@@ -300,8 +299,8 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
{
try
{
- //xComponent.dispose();
- XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, myFaxDoc.xFrame);
+ //xComponent.dispose();
+ XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, myFaxDoc.xFrame);
xCloseable.close(false);
}
catch (CloseVetoException e)
@@ -352,11 +351,11 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
try
{
Object oGS = xMSF.createInstance("com.sun.star.graphic.GraphicProvider");
- XGraphicProvider xGraphicProvider = (XGraphicProvider) UnoRuntime.queryInterface(XGraphicProvider.class, oGS);
+ XGraphicProvider xGraphicProvider = UnoRuntime.queryInterface(XGraphicProvider.class, oGS);
PropertyValue GraphicValues[] = new PropertyValue[1];
GraphicValues[0] = new PropertyValue();
- GraphicValues[0].Name = "URL";
+ GraphicValues[0].Name = PropertyNames.URL;
GraphicValues[0].Value = "private:resource/svx/imagelist/18000/18022";
XGraphic xGraphic = xGraphicProvider.queryGraphic(GraphicValues);
@@ -380,7 +379,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
try
{
sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard");
- sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", "");
+ sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", PropertyNames.EMPTY_STRING);
sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap");
}
catch (NoValidPathException e)
@@ -395,19 +394,19 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
{
String sFaxSubPath = "/wizard/fax";
sFaxPath = FileAccess.combinePaths(xMSF, sTemplatePath, sFaxSubPath);
- sWorkPath = FileAccess.getOfficePath(xMSF, "Work", "", "");
+ sWorkPath = FileAccess.getOfficePath(xMSF, "Work", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING);
BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", sFaxPath);
PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", sFaxPath);
- setControlProperty("lstBusinessStyle", "StringItemList", BusinessFiles[0]);
- setControlProperty("lstPrivateStyle", "StringItemList", PrivateFiles[0]);
+ setControlProperty("lstBusinessStyle", PropertyNames.STRING_ITEM_LIST, BusinessFiles[0]);
+ setControlProperty("lstPrivateStyle", PropertyNames.STRING_ITEM_LIST, PrivateFiles[0]);
- setControlProperty("lstBusinessStyle", "SelectedItems", new short[]
+ setControlProperty("lstBusinessStyle", PropertyNames.SELECTED_ITEMS, new short[]
{
0
});
- setControlProperty("lstPrivateStyle", "SelectedItems", new short[]
+ setControlProperty("lstPrivateStyle", PropertyNames.SELECTED_ITEMS, new short[]
{
0
});
@@ -424,42 +423,42 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
public void initializeElements()
{
- setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, new Boolean(myFaxDoc.hasElement("Company Logo")));
- setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, new Boolean(myFaxDoc.hasElement("Subject Line")));
- setControlProperty("chkUseDate", PropertyNames.PROPERTY_ENABLED, new Boolean(myFaxDoc.hasElement("Date")));
+ setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myFaxDoc.hasElement("Company Logo")));
+ setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myFaxDoc.hasElement("Subject Line")));
+ setControlProperty("chkUseDate", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myFaxDoc.hasElement("Date")));
myFaxDoc.updateDateFields();
}
public void initializeSalutation()
{
- setControlProperty("lstSalutation", "StringItemList", resources.SalutationLabels);
+ setControlProperty("lstSalutation", PropertyNames.STRING_ITEM_LIST, resources.SalutationLabels);
}
public void initializeGreeting()
{
- setControlProperty("lstGreeting", "StringItemList", resources.GreetingLabels);
+ setControlProperty("lstGreeting", PropertyNames.STRING_ITEM_LIST, resources.GreetingLabels);
}
public void initializeCommunication()
{
- setControlProperty("lstCommunicationType", "StringItemList", resources.CommunicationLabels);
+ setControlProperty("lstCommunicationType", PropertyNames.STRING_ITEM_LIST, resources.CommunicationLabels);
}
private void setDefaultForGreetingAndSalutationAndCommunication()
{
XTextComponent xTextComponent;
- xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
- if (xTextComponent.getText().equals(""))
+ xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
+ if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING))
{
xTextComponent.setText(resources.SalutationLabels[0]);
}
- xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
- if (xTextComponent.getText().equals(""))
+ xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
+ if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING))
{
xTextComponent.setText(resources.GreetingLabels[0]);
}
- xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType);
- if (xTextComponent.getText().equals(""))
+ xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType);
+ if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING))
{
xTextComponent.setText(resources.CommunicationLabels[0]);
}
@@ -590,7 +589,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
public void txtTemplateNameTextChanged()
{
- XDocumentPropertiesSupplier xDocPropsSuppl = (XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
+ XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
XDocumentProperties xDocProps = xDocPropsSuppl.getDocumentProperties();
String TitleName = txtTemplateName.getText();
xDocProps.setTitle(TitleName);
@@ -686,7 +685,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
TextFieldHandler myFieldHandler = new TextFieldHandler(myFaxDoc.xMSF, xTextDocument);
myFieldHandler.changeUserFieldContent("Fax", txtSenderFax.getText());
}
- //switch Elements on/off -------------------------------------------------------
+ //switch Elements on/off -------------------------------------------------------
public void setElements()
{
//UI relevant:
@@ -767,9 +766,9 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
myFaxDoc.switchFooter("Standard", bFooterPossible, (chkFooterPageNumbers.getState() != 0), txtFooter.getText());
}
- //enable/disable roadmap item for footer page
+ //enable/disable roadmap item for footer page
XInterface BPaperItem = getRoadmapItemByID(RM_FOOTER);
- Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, new Boolean(bFooterPossible));
+ Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bFooterPossible));
}
catch (Exception exception)
@@ -795,14 +794,14 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
public void chkUseSalutationItemChanged()
{
- XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
+ XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
myFaxDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0));
- setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseSalutation.getState() != 0));
+ setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseSalutation.getState() != 0));
}
public void lstSalutationItemChanged()
{
- XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
+ XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
myFaxDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0));
}
@@ -812,14 +811,14 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
public void chkUseCommunicationItemChanged()
{
- XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType);
+ XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType);
myFaxDoc.switchUserField("CommunicationType", xTextComponent.getText(), (chkUseCommunicationType.getState() != 0));
- setControlProperty("lstCommunicationType", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseCommunicationType.getState() != 0));
+ setControlProperty("lstCommunicationType", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseCommunicationType.getState() != 0));
}
public void lstCommunicationItemChanged()
{
- XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType);
+ XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType);
myFaxDoc.switchUserField("CommunicationType", xTextComponent.getText(), (chkUseCommunicationType.getState() != 0));
}
@@ -829,14 +828,14 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
public void chkUseGreetingItemChanged()
{
- XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
+ XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
myFaxDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0));
- setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseGreeting.getState() != 0));
+ setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseGreeting.getState() != 0));
}
public void lstGreetingItemChanged()
{
- XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
+ XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
myFaxDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0));
}
@@ -846,7 +845,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
private void setPossibleFooter(boolean bState)
{
- setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
+ setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
if (!bState)
{
chkUseFooter.setState((short) 0);
@@ -870,4 +869,4 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
-
+
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java
index 0043d25590d8..d25c3cddb97b 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -93,7 +93,7 @@ public class FaxWizardDialogResources extends Resource
super(xmsf, UNIT_NAME, MODULE_NAME);
/**
* Delete the String, uncomment the getResText method
- *
+ *
*/
resFaxWizardDialog_title = getResText(RID_FAXWIZARDDIALOG_START + 1);
resLabel9_value = getResText(RID_FAXWIZARDDIALOG_START + 2);
diff --git a/wizards/com/sun/star/wizards/form/CallFormWizard.java b/wizards/com/sun/star/wizards/form/CallFormWizard.java
index 0538eb5fa1b3..f350f54cb7df 100644
--- a/wizards/com/sun/star/wizards/form/CallFormWizard.java
+++ b/wizards/com/sun/star/wizards/form/CallFormWizard.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,6 +29,7 @@ package com.sun.star.wizards.form;
import com.sun.star.beans.PropertyValue;
import com.sun.star.uno.Type;
import com.sun.star.wizards.common.Properties;
+import com.sun.star.wizards.common.PropertyNames;
/** This class capsulates the class, that implements the minimal component, a
* factory for creating the service (<CODE>__getServiceFactory</CODE>).
@@ -81,7 +82,7 @@ public class CallFormWizard
{
try
{
- if (sEvent.compareTo("start") == 0)
+ if (sEvent.compareTo(PropertyNames.START) == 0)
{
FormWizard CurFormWizard = new FormWizard( m_serviceFactory, m_wizardContext );
CurFormWizard.startFormWizard();
@@ -159,7 +160,7 @@ public class CallFormWizard
try
{
- byteReturn = new String("" + this.hashCode()).getBytes();
+ byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes();
}
catch (Exception exception)
{
diff --git a/wizards/com/sun/star/wizards/form/DataEntrySetter.java b/wizards/com/sun/star/wizards/form/DataEntrySetter.java
index ae042fa7de76..3d24a60d3617 100644
--- a/wizards/com/sun/star/wizards/form/DataEntrySetter.java
+++ b/wizards/com/sun/star/wizards/form/DataEntrySetter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,7 +52,7 @@ public class DataEntrySetter
this.CurUnoDialog = _CurUnoDialog;
curtabindex = (short) (FormWizard.SODATA_PAGE * 100);
Integer IDataStep = new Integer(FormWizard.SODATA_PAGE);
- String sNewDataOnly = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 44); //
+ String sNewDataOnly = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 44); //
String sDisplayAllData = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 46); //
String sNoModification = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 47); // AllowUpdates
String sNoDeletion = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 48); // AllowDeletes
@@ -66,7 +66,7 @@ public class DataEntrySetter
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTNEWDATAONLY", sNewDataOnly, new Integer(98), new Integer(25), IDataStep, new Short(curtabindex++), new Integer(195)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTNEWDATAONLY", sNewDataOnly, 98, 25, IDataStep, new Short(curtabindex++), 195
});
optDisplayAllData = CurUnoDialog.insertRadioButton("optDisplayAllData", "toggleCheckBoxes", this,
@@ -76,7 +76,7 @@ public class DataEntrySetter
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTDISPLAYALLDATA", sDisplayAllData, new Integer(98), new Integer(50), new Short((short) 1), IDataStep, new Short(curtabindex++), new Integer(197)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTDISPLAYALLDATA", sDisplayAllData, 98, 50, new Short((short) 1), IDataStep, new Short(curtabindex++), 197
});
chknomodification = CurUnoDialog.insertCheckBox("chknomodification", null,
new String[]
@@ -85,7 +85,7 @@ public class DataEntrySetter
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_CHKNOMODIFICATION", sNoModification, new Integer(108), new Integer(62), new Short((short) 0), IDataStep, new Short(curtabindex++), new Integer(189)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_CHKNOMODIFICATION", sNoModification, 108, 62, new Short((short) 0), IDataStep, new Short(curtabindex++), 189
});
chknodeletion = CurUnoDialog.insertCheckBox("chknodeletion", null,
new String[]
@@ -94,7 +94,7 @@ public class DataEntrySetter
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_CHKNODELETION", sNoDeletion, new Integer(108), new Integer(74), new Short((short) 0), IDataStep, new Short(curtabindex++), new Integer(189)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_CHKNODELETION", sNoDeletion, 108, 74, new Short((short) 0), IDataStep, new Short(curtabindex++), 189
});
chknoaddition = CurUnoDialog.insertCheckBox("chknoaddition", null,
new String[]
@@ -103,7 +103,7 @@ public class DataEntrySetter
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_CHKNOADDITION", sNoAddition, new Integer(108), new Integer(86), new Short((short) 0), IDataStep, new Short(curtabindex++), new Integer(191)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_CHKNOADDITION", sNoAddition, 108, 86, new Short((short) 0), IDataStep, new Short(curtabindex++), 191
});
CurUnoDialog.insertLabel("lbldontdisplayExistingData",
new String[]
@@ -112,7 +112,7 @@ public class DataEntrySetter
},
new Object[]
{
- new Integer(8), sdontdisplayExistingData, new Integer(108), new Integer(33), IDataStep, new Short(curtabindex++), new Integer(134)
+ 8, sdontdisplayExistingData, 108, 33, IDataStep, new Short(curtabindex++), 134
});
}
@@ -125,14 +125,14 @@ public class DataEntrySetter
boolean bAllowUpdates = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknomodification), PropertyNames.PROPERTY_STATE)).shortValue()) != 1;
boolean bAllowDeletes = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknodeletion), PropertyNames.PROPERTY_STATE)).shortValue()) != 1;
boolean bAllowInserts = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknoaddition), PropertyNames.PROPERTY_STATE)).shortValue()) != 1;
- retProperties[0] = Properties.createProperty("AllowUpdates", new Boolean(bAllowUpdates));
- retProperties[1] = Properties.createProperty("AllowDeletes", new Boolean(bAllowDeletes));
- retProperties[2] = Properties.createProperty("AllowInserts", new Boolean(bAllowInserts));
+ retProperties[0] = Properties.createProperty("AllowUpdates", Boolean.valueOf(bAllowUpdates));
+ retProperties[1] = Properties.createProperty("AllowDeletes", Boolean.valueOf(bAllowDeletes));
+ retProperties[2] = Properties.createProperty("AllowInserts", Boolean.valueOf(bAllowInserts));
}
else
{
retProperties = new PropertyValue[1];
- retProperties[0] = Properties.createProperty("IgnoreResult", new Boolean(true));
+ retProperties[0] = Properties.createProperty("IgnoreResult", Boolean.TRUE);
}
return retProperties;
@@ -141,8 +141,8 @@ public class DataEntrySetter
public void toggleCheckBoxes()
{
boolean bdisplayalldata = optDisplayAllData.getState();
- Helper.setUnoPropertyValue(UnoDialog.getModel(chknomodification), PropertyNames.PROPERTY_ENABLED, new Boolean(bdisplayalldata));
- Helper.setUnoPropertyValue(UnoDialog.getModel(chknodeletion), PropertyNames.PROPERTY_ENABLED, new Boolean(bdisplayalldata));
- Helper.setUnoPropertyValue(UnoDialog.getModel(chknoaddition), PropertyNames.PROPERTY_ENABLED, new Boolean(bdisplayalldata));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(chknomodification), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdisplayalldata));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(chknodeletion), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdisplayalldata));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(chknoaddition), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdisplayalldata));
}
}
diff --git a/wizards/com/sun/star/wizards/form/FieldLinker.java b/wizards/com/sun/star/wizards/form/FieldLinker.java
index b0fecf192bb8..52ee0140548d 100644
--- a/wizards/com/sun/star/wizards/form/FieldLinker.java
+++ b/wizards/com/sun/star/wizards/form/FieldLinker.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,18 +48,9 @@ public class FieldLinker extends DBLimitedFieldSelection
private XFixedText[] lblMasterFields;
private XListBox[] lstSlaveFields;
private XListBox[] lstMasterFields;
- private final int SOMASTERINDEX = 1;
- private final int SOSLAVEINDEX = 0;
- private int SOFIRSTLINKLST = 0;
- private int SOSECLINKLST = 1;
- private int SOTHIRDLINKLST = 2;
- private int SOFOURTHLINKLST = 3;
private int[] SOLINKLST = null;
private String[] sSlaveListHeader;
private String[] sMasterListHeader; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40);
- private String sSlaveHidString;
- private String sMasterHidString;
- private Integer IListBoxPosX;
public FieldLinker(WizardDialog _CurUnoDialog, int iStep, int iCompPosX, int iCompPosY, int iCompWidth, int _firsthelpid)
{
@@ -76,31 +67,31 @@ public class FieldLinker extends DBLimitedFieldSelection
lblMasterFields = new XFixedText[rowcount];
lstSlaveFields = new XListBox[rowcount];
lstMasterFields = new XListBox[rowcount];
- SOFIRSTLINKLST = 0;
- SOSECLINKLST = 1;
- SOTHIRDLINKLST = 2;
- SOFOURTHLINKLST = 3;
- IListBoxPosX = new Integer(iCompPosX + 6);
- sSlaveListHeader = CurUnoDialog.m_oResource.getResArray(UIConsts.RID_FORM + 20, 4); //new String[rowcount];""; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40);
- sMasterListHeader = CurUnoDialog.m_oResource.getResArray(UIConsts.RID_FORM + 24, 4);// new String[rowcount];""; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40);
+ int SOFIRSTLINKLST = 0;
+ int SOSECLINKLST = 1;
+ int SOTHIRDLINKLST = 2;
+ int SOFOURTHLINKLST = 3;
+ Integer IListBoxPosX = new Integer(iCompPosX + 6);
+ sSlaveListHeader = CurUnoDialog.m_oResource.getResArray(UIConsts.RID_FORM + 20, 4); //new String[rowcount];PropertyNames.EMPTY_STRING; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40);
+ sMasterListHeader = CurUnoDialog.m_oResource.getResArray(UIConsts.RID_FORM + 24, 4);// new String[rowcount];PropertyNames.EMPTY_STRING; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40);
SOLINKLST = new int[]
{
- SOFIRSTLINKLST, SOSECLINKLST, SOTHIRDLINKLST, SOFOURTHLINKLST
+ SOFIRSTLINKLST, SOSECLINKLST, SOTHIRDLINKLST, SOFOURTHLINKLST
};
}
- sSlaveHidString = HelpIds.getHelpIdString(FirstHelpIndex + (i * 2));
- sMasterHidString = HelpIds.getHelpIdString(FirstHelpIndex + (i * 2) + 1);
+ String sSlaveHidString = HelpIds.getHelpIdString(FirstHelpIndex + (i * 2));
+ String sMasterHidString = HelpIds.getHelpIdString(FirstHelpIndex + (i * 2) + 1);
boolean bDoEnable = (i < 2);
- lblSlaveFields[i] = CurUnoDialog.insertLabel("lblSlaveFieldLink" + new Integer(i + 1).toString(),
+ lblSlaveFields[i] = CurUnoDialog.insertLabel("lblSlaveFieldLink" + Integer.toString(i + 1),
new String[]
{
PropertyNames.PROPERTY_ENABLED, 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[]
{
- new Boolean(bDoEnable), new Integer(8), sSlaveListHeader[i], new Integer(97), new Integer(iCurPosY), IStep, new Short(curtabindex++), new Integer(97)
+ Boolean.valueOf(bDoEnable), 8, sSlaveListHeader[i], 97, new Integer(iCurPosY), IStep, new Short(curtabindex++), 97
});
- lstSlaveFields[i] = CurUnoDialog.insertListBox("lstSlaveFieldLink" + new Integer(i + 1).toString(), SOLINKLST[i], null, new ItemListenerImpl(),
+ lstSlaveFields[i] = CurUnoDialog.insertListBox("lstSlaveFieldLink" + (i + 1), SOLINKLST[i], null, new ItemListenerImpl(),
new String[]
{
"Dropdown",
@@ -117,28 +108,28 @@ public class FieldLinker extends DBLimitedFieldSelection
new Object[]
{
Boolean.TRUE,
- new Boolean(bDoEnable),
+ Boolean.valueOf(bDoEnable),
UIConsts.INTEGER_12,
- sSlaveHidString,
+ sSlaveHidString,
Short.valueOf(UnoDialog.getListBoxLineCount()),
- new Integer(97),
+ 97,
new Integer(iCurPosY + 10),
IStep,
new Short(curtabindex++),
- new Integer(97)
+ 97
});
- lblMasterFields[i] = CurUnoDialog.insertLabel("lblMasterFieldLink" + new Integer(i + 1).toString(),
+ lblMasterFields[i] = CurUnoDialog.insertLabel("lblMasterFieldLink" + Integer.toString(i + 1),
new String[]
{
PropertyNames.PROPERTY_ENABLED, 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[]
{
- new Boolean(bDoEnable), new Integer(8), sMasterListHeader[i], new Integer(206), new Integer(iCurPosY), IStep, new Short(curtabindex++), new Integer(97)
+ Boolean.valueOf(bDoEnable), 8, sMasterListHeader[i], 206, new Integer(iCurPosY), IStep, new Short(curtabindex++), 97
});
- lstMasterFields[i] = CurUnoDialog.insertListBox("lstMasterFieldLink" + new Integer(i + 1).toString(), SOLINKLST[i], null, new ItemListenerImpl(),
+ lstMasterFields[i] = CurUnoDialog.insertListBox("lstMasterFieldLink" + Integer.toString(i + 1), SOLINKLST[i], null, new ItemListenerImpl(),
new String[]
{
"Dropdown",
@@ -155,15 +146,15 @@ public class FieldLinker extends DBLimitedFieldSelection
new Object[]
{
Boolean.TRUE,
- new Boolean(bDoEnable),
+ Boolean.valueOf(bDoEnable),
UIConsts.INTEGER_12,
- sMasterHidString,
+ sMasterHidString,
Short.valueOf(UnoDialog.getListBoxLineCount()),
- new Integer(206),
+ 206,
new Integer(iCurPosY + 10),
IStep,
new Short(curtabindex++),
- new Integer(97)
+ 97
});
iCurPosY = iCurPosY + 38;
}
@@ -206,14 +197,14 @@ public class FieldLinker extends DBLimitedFieldSelection
{
if (i < rowcount)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(lblSlaveFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable));
- Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable));
- Helper.setUnoPropertyValue(UnoDialog.getModel(lblMasterFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable));
- Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable));
- if (bDoEnable == false)
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lblSlaveFields[i]), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[i]), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lblMasterFields[i]), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[i]), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable));
+ if (!bDoEnable)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[i]), "SelectedItems", new short[] { 0 });
- Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[i]), "SelectedItems", new short[] { 0 });
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[i]), PropertyNames.SELECTED_ITEMS, new short[] { 0 });
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[i]), PropertyNames.SELECTED_ITEMS, new short[] { 0 });
}
}
}
@@ -225,11 +216,11 @@ public class FieldLinker extends DBLimitedFieldSelection
if ((iNextMasterItemPos != 0) && (iNextSlaveItemPos != 0))
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[curindex]), "SelectedItems", new short[] {iNextMasterItemPos });
- Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[curindex]), "SelectedItems", new short[] {iNextSlaveItemPos});
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[curindex]), PropertyNames.SELECTED_ITEMS, new short[] {iNextMasterItemPos });
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[curindex]), PropertyNames.SELECTED_ITEMS, new short[] {iNextSlaveItemPos});
- Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[curindex + 1]), "SelectedItems", new short[] { 0 });
- Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[curindex + 1]), "SelectedItems", new short[] { 0 });
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[curindex + 1]), PropertyNames.SELECTED_ITEMS, new short[] { 0 });
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[curindex + 1]), PropertyNames.SELECTED_ITEMS, new short[] { 0 });
toggleControlRow(curindex, true);
}
}
@@ -238,7 +229,9 @@ public class FieldLinker extends DBLimitedFieldSelection
{
// short[] MasterSelList = null;
// short[] SlaveSelList = null;
+ int SOMASTERINDEX = 1;
String[] MasterLinkNames = JavaTools.ArrayOutOfMultiDimArray(_LinkFieldNames, SOMASTERINDEX);
+ int SOSLAVEINDEX = 0;
String[] SlaveLinkNames = JavaTools.ArrayOutOfMultiDimArray(_LinkFieldNames, SOSLAVEINDEX);
String[] ViewMasterFieldNames = addNoneFieldItemToList(_AllMasterFieldNames); // add '-undefiened-'
String[] ViewSlaveFieldNames = addNoneFieldItemToList(_AllSlaveFieldNames);
@@ -265,7 +258,7 @@ public class FieldLinker extends DBLimitedFieldSelection
/**
* @return the LinkFieldnames of the joins. When no LinkFieldNames were selected the returned Array is empty.
* When Joins were assigned duplicate a null value is returned
- *
+ *
*/
public String[][] getLinkFieldNames()
{
@@ -290,7 +283,7 @@ public class FieldLinker extends DBLimitedFieldSelection
return null;
}
return LinkFieldNames;
-
+
}
public void enable(boolean _bdoenable)
diff --git a/wizards/com/sun/star/wizards/form/Finalizer.java b/wizards/com/sun/star/wizards/form/Finalizer.java
index c5f12728e527..a197679d5006 100644
--- a/wizards/com/sun/star/wizards/form/Finalizer.java
+++ b/wizards/com/sun/star/wizards/form/Finalizer.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -64,7 +64,7 @@ public class Finalizer
},
new Object[]
{
- UIConsts.INTEGERS[8], slblFormName, new Integer(97), new Integer(25), UIConsts.INTEGERS[8], new Short(curtabindex++), new Integer(111)
+ UIConsts.INTEGERS[8], slblFormName, 97, 25, UIConsts.INTEGERS[8], new Short(curtabindex++), 111
});
txtFormName = CurUnoDialog.insertTextField("txtFormName", "toggleFinishButton", this,
new String[]
@@ -73,7 +73,7 @@ public class Finalizer
},
new Object[]
{
- UIConsts.INTEGER_12, "HID:WIZARDS_HID_DLGFORM_TXTPATH", new Integer(97), new Integer(35), UIConsts.INTEGERS[8], new Short((short) 82), "", new Integer(185)
+ UIConsts.INTEGER_12, "HID:WIZARDS_HID_DLGFORM_TXTPATH", 97, 35, UIConsts.INTEGERS[8], new Short((short) 82), PropertyNames.EMPTY_STRING, 185
});
CurUnoDialog.insertLabel("lblProceed",
new String[]
@@ -82,7 +82,7 @@ public class Finalizer
},
new Object[]
{
- UIConsts.INTEGERS[8], slblProceed, new Integer(97), new Integer(62), UIConsts.INTEGERS[8], new Short(curtabindex++), new Integer(185)
+ UIConsts.INTEGERS[8], slblProceed, 97, 62, UIConsts.INTEGERS[8], new Short(curtabindex++), 185
});
CurUnoDialog.insertRadioButton("optWorkWithForm", null,
new String[]
@@ -91,7 +91,7 @@ public class Finalizer
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTWORKWITHFORM", sWorkWithForm, new Integer(101), new Integer(77), new Short((short) 1), UIConsts.INTEGERS[8], new Short(curtabindex++), new Integer(107)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTWORKWITHFORM", sWorkWithForm, 101, 77, new Short((short) 1), UIConsts.INTEGERS[8], new Short(curtabindex++), 107
});
optModifyForm = CurUnoDialog.insertRadioButton("optModifyForm", null,
new String[]
@@ -100,7 +100,7 @@ public class Finalizer
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTMODIFYFORM", sModifyForm, new Integer(101), new Integer(89), UIConsts.INTEGERS[8], new Short(curtabindex++), new Integer(107)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTMODIFYFORM", sModifyForm, 101, 89, UIConsts.INTEGERS[8], new Short(curtabindex++), 107
});
}
@@ -128,7 +128,7 @@ public class Finalizer
public boolean getOpenForEditing()
{
- return optModifyForm.getState() ? true : false;
+ return optModifyForm.getState();
}
public boolean finish()
diff --git a/wizards/com/sun/star/wizards/form/FormConfiguration.java b/wizards/com/sun/star/wizards/form/FormConfiguration.java
index 9c18ab47d79d..921ac7b09163 100644
--- a/wizards/com/sun/star/wizards/form/FormConfiguration.java
+++ b/wizards/com/sun/star/wizards/form/FormConfiguration.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -83,7 +83,7 @@ public class FormConfiguration
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_CHKCREATESUBFORM", sSelectManually, new Integer(97), new Integer(26), ISubFormStep, new Short(curtabindex++), new Integer(160)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_CHKCREATESUBFORM", sSelectManually, 97, 26, ISubFormStep, new Short(curtabindex++), 160
});
optOnExistingRelation = CurUnoDialog.insertRadioButton("optOnExistingRelation", STOGGLESTEPS, this,
new String[]
@@ -92,7 +92,7 @@ public class FormConfiguration
},
new Object[]
{
- Boolean.FALSE, UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION", sOnExistingRelation, new Integer(107), new Integer(43), ISubFormStep, new Short(curtabindex++), new Integer(160)
+ Boolean.FALSE, UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION", sOnExistingRelation, 107, 43, ISubFormStep, new Short(curtabindex++), 160
});
optSelectManually = CurUnoDialog.insertRadioButton("optSelectManually", STOGGLESTEPS, this,
new String[]
@@ -101,7 +101,7 @@ public class FormConfiguration
},
new Object[]
{
- Boolean.FALSE, UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTSELECTMANUALLY", sOnManualRelation, new Integer(107), new Integer(99), new Short((short) 1), ISubFormStep, new Short(curtabindex++), new Integer(160)
+ Boolean.FALSE, UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTSELECTMANUALLY", sOnManualRelation, 107, 99, new Short((short) 1), ISubFormStep, new Short(curtabindex++), 160
});
lblRelations = CurUnoDialog.insertLabel("lblSelectRelation",
new String[]
@@ -110,7 +110,7 @@ public class FormConfiguration
},
new Object[]
{
- Boolean.FALSE, new Integer(19), sSelectRelation, Boolean.TRUE, new Integer(119), new Integer(56), ISubFormStep, new Short(curtabindex++), new Integer(80)
+ Boolean.FALSE, 19, sSelectRelation, Boolean.TRUE, 119, 56, ISubFormStep, new Short(curtabindex++), 80
});
lstRelations = CurUnoDialog.insertListBox("lstrelations", SONEXISTINGRELATIONSELECTION, SONEXISTINGRELATIONSELECTION, this,
new String[]
@@ -119,7 +119,7 @@ public class FormConfiguration
},
new Object[]
{
- Boolean.FALSE, new Integer(37), "HID:WIZARDS_HID_DLGFORM_lstRELATIONS", new Integer(201), new Integer(55), ISubFormStep, new Short(curtabindex++), new Integer(103)
+ Boolean.FALSE, 37, "HID:WIZARDS_HID_DLGFORM_lstRELATIONS", 201, 55, ISubFormStep, new Short(curtabindex++), 103
});
lblSubFormDescription = CurUnoDialog.insertLabel("lblSubFormDescription",
new String[]
@@ -128,7 +128,7 @@ public class FormConfiguration
},
new Object[]
{
- new Integer(59), sSubFormDescription, Boolean.TRUE, new Integer(110), new Integer(120), ISubFormStep, new Short(curtabindex++), new Integer(190)
+ 59, sSubFormDescription, Boolean.TRUE, 110, 120, ISubFormStep, new Short(curtabindex++), 190
});
CurUnoDialog.insertInfoImage(97, 120, ISubFormStep.intValue());
}
@@ -151,8 +151,8 @@ public class FormConfiguration
public void toggleSubFormMode()
{
boolean bdoEnable = (this.chkcreateSubForm.getState() == 1);
- Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable && bsupportsRelations));
- Helper.setUnoPropertyValue(UnoDialog.getModel(optSelectManually), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoEnable && bsupportsRelations));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(optSelectManually), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoEnable));
toggleSteps();
}
@@ -161,10 +161,10 @@ public class FormConfiguration
oRelationController = _oRelationController;
sreferencedTables = oRelationController.getExportedKeys();
bsupportsRelations = (sreferencedTables.length > 0);
- Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), "StringItemList", sreferencedTables);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), PropertyNames.STRING_ITEM_LIST, sreferencedTables);
this.CurSubFormFieldSelection = _CurSubFormFieldSelection;
toggleRelationsListbox();
- Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, new Boolean(bsupportsRelations && (chkcreateSubForm.getState() == 1)));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bsupportsRelations && (chkcreateSubForm.getState() == 1)));
}
public void toggleSteps()
@@ -195,7 +195,7 @@ public class FormConfiguration
{
if (areexistingRelationsdefined())
{
- short[] iselected = (short[]) Helper.getUnoArrayPropertyValue(UnoDialog.getModel(lstRelations), "SelectedItems");
+ short[] iselected = (short[]) Helper.getUnoArrayPropertyValue(UnoDialog.getModel(lstRelations), PropertyNames.SELECTED_ITEMS);
if (iselected != null)
{
if (iselected.length > 0)
@@ -204,7 +204,7 @@ public class FormConfiguration
}
}
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
public void onexistingRelationSelection()
@@ -231,8 +231,8 @@ public class FormConfiguration
private void toggleRelationsListbox()
{
boolean bdoenable = bsupportsRelations && this.optOnExistingRelation.getState() && (chkcreateSubForm.getState() == 1);
- Helper.setUnoPropertyValue(UnoDialog.getModel(lblRelations), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable));
- Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lblRelations), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoenable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoenable));
}
public boolean hasSubForm()
diff --git a/wizards/com/sun/star/wizards/form/FormControlArranger.java b/wizards/com/sun/star/wizards/form/FormControlArranger.java
index f5478525eab1..4646b05897d2 100644
--- a/wizards/com/sun/star/wizards/form/FormControlArranger.java
+++ b/wizards/com/sun/star/wizards/form/FormControlArranger.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,14 +47,13 @@ import com.sun.star.wizards.document.TimeStampControl;
public class FormControlArranger
{
+ public static final String LABELCONTROL = "LabelControl";
protected DatabaseControl[] DBControlList = null;
-
private XNameContainer xFormName;
private XMultiServiceFactory xMSF;
private Control[] LabelControlList = null;
private XStatusIndicator xProgressBar;
private FieldColumn[] FieldColumns;
- private DatabaseControl curDBControl;
// Control curLabelControl;
private int icurArrangement;
private boolean bIsFirstRun;
@@ -68,23 +67,23 @@ public class FormControlArranger
private static final double CMAXREDUCTION = 0.7;
private FormHandler oFormHandler;
private int iReduceWidth;
- private int nXTCPos;
- private int nYTCPos;
- private int nXDBPos;
- private int nYDBPos;
- private int nTCHeight;
- private int nTCWidth;
- private int nDBHeight;
- private int nDBWidth;
- private int nMaxTCWidth;
+ private int m_currentLabelPosX;
+ private int m_currentLabelPosY;
+ private int m_currentControlPosX;
+ private int m_currentControlPosY;
+ private int m_LabelHeight;
+ private int m_LabelWidth;
+ private int m_dbControlHeight;
+ private int m_dbControlWidth;
+ private int m_MaxLabelWidth;
private int nFormWidth;
private int nFormHeight;
- private int nMaxRowY;
+ private int m_currentMaxRowHeight;
private int nSecMaxRowY;
- private int nMaxColRightX;
+ private int m_maxPostionX;
private int a;
private int StartA;
- private int nMaxDBYPos = 0; //the maximum YPosition of a DBControl in the form
+ private int m_controlMaxPosY = 0; //the maximum YPosition of a DBControl in the form
private Short NBorderType = new Short((short) 1); //3-D Border
public FormControlArranger(FormHandler _oFormHandler, XNameContainer _xFormName, CommandMetaData oDBMetaData, XStatusIndicator _xProgressBar, Point _StartPoint, Size _FormSize)
@@ -101,15 +100,14 @@ public class FormControlArranger
setFormSize(_FormSize);
}
// Note: on all Controls except for the checkbox the Label has to be set
- // a bit under the DBControl because its Height is also smaller
+ // a bit under the DBControl because its Height is also smaller
+
private int getLabelDiffHeight(int _index)
{
- if (curDBControl != null)
+ final DatabaseControl curDBControl = DBControlList[_index];
+ if (curDBControl != null && curDBControl.getControlType() == FormHandler.SOCHECKBOX)
{
- if (curDBControl.getControlType() == FormHandler.SOCHECKBOX)
- {
- return getCheckBoxDiffHeight(_index);
- }
+ return getCheckBoxDiffHeight(_index);
}
return oFormHandler.getBasicLabelDiffHeight();
}
@@ -126,20 +124,17 @@ public class FormControlArranger
private int getCheckBoxDiffHeight(int LastIndex)
{
- if ((LastIndex < DBControlList.length))
+ if (LastIndex < DBControlList.length && DBControlList[LastIndex].getControlType() == FormHandler.SOCHECKBOX)
{
- if (DBControlList[LastIndex].getControlType() == FormHandler.SOCHECKBOX)
- {
- return (int) ((oFormHandler.getControlReferenceHeight() - DBControlList[LastIndex].getControlHeight()) / 2);
- }
+ return (oFormHandler.getControlReferenceHeight() - DBControlList[LastIndex].getControlHeight()) / 2;
}
return 0;
}
- private boolean isReducable(int _index)
+ private boolean isReducable(int _index, int i_labelWidth, int i_dbControlWidth)
{
boolean bisreducable = false;
- int ntype = this.FieldColumns[_index].getFieldType();
+ int ntype = FieldColumns[_index].getFieldType();
switch (ntype)
{
case DataType.TINYINT:
@@ -178,7 +173,7 @@ public class FormControlArranger
default:
bisreducable = true;
}
- if (nTCWidth > 0.9 * CMAXREDUCTION * nDBWidth)
+ if (bisreducable && i_labelWidth > 0.9 * CMAXREDUCTION * i_dbControlWidth)
{
bisreducable = false;
}
@@ -187,62 +182,54 @@ public class FormControlArranger
private int getControlGroupWidth()
{
- if (nDBWidth > nTCWidth)
+ if (m_dbControlWidth > m_LabelWidth)
{
- return nDBWidth;
+ return m_dbControlWidth;
}
else
{
- return nTCWidth;
+ return m_LabelWidth;
}
}
private void checkJustifiedPosition(int a)
{
int nBaseWidth = nFormWidth + cXOffset;
- int nLeftDist = nMaxColRightX - nBaseWidth;
- int nRightDist = nBaseWidth - (DBControlList[a].getPosition().X - this.cHoriDistance);
+ int nLeftDist = m_maxPostionX - nBaseWidth;
+ int nRightDist = nBaseWidth - (DBControlList[a].getPosition().X - cHoriDistance);
if (nLeftDist < 0.5 * nRightDist)
{
// Fieldwidths in the line can be made smaller..
adjustLineWidth(StartA, a, nLeftDist, -1);
- nYTCPos = nMaxRowY + cVertDistance;
- nYDBPos = nYTCPos + nTCHeight;
-// if ((nYDBPos + nDBHeight) > nMaxDBYPos)
-// nMaxDBYPos = nYDBPos + nDBHeight;
- nXTCPos = cXOffset;
- nXDBPos = cXOffset;
+ m_currentLabelPosY = m_currentMaxRowHeight + cVertDistance;
+ m_currentControlPosY = m_currentLabelPosY + m_LabelHeight;
+ m_currentLabelPosX = cXOffset;
+ m_currentControlPosX = cXOffset;
bIsFirstRun = true;
StartA = a + 1;
}
else
{
// FieldWidths in the line can be made wider...
- if (nYDBPos + nDBHeight == nMaxRowY)
+ if (m_currentControlPosY + m_dbControlHeight == m_currentMaxRowHeight)
{
// The last Control was the highest in the row
- nYTCPos = nSecMaxRowY + cVertDistance;
+ m_currentLabelPosY = nSecMaxRowY;
}
else
{
- nYTCPos = nMaxRowY + cVertDistance;
+ m_currentLabelPosY = m_currentMaxRowHeight;
}
- nYDBPos = nYTCPos + nTCHeight;
- nXDBPos = cXOffset;
- nXTCPos = cXOffset;
- this.LabelControlList[a].setPosition(new Point(cXOffset, nYTCPos));
- this.DBControlList[a].setPosition(new Point(cXOffset, nYDBPos));
+ m_currentLabelPosY += cVertDistance;
+ m_currentControlPosY = m_currentLabelPosY + m_LabelHeight;
+ m_currentControlPosX = cXOffset;
+ m_currentLabelPosX = cXOffset;
+ LabelControlList[a].setPosition(new Point(cXOffset, m_currentLabelPosY));
+ DBControlList[a].setPosition(new Point(cXOffset, m_currentControlPosY));
bIsFirstRun = true;
- if (nDBWidth > nTCWidth)
- {
- checkOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, true);
- }
- else
- {
- checkOuterPoints(nXDBPos, nTCWidth, nYDBPos, nDBHeight, true);
- }
- nXTCPos = nMaxColRightX + cHoriDistance;
- nXDBPos = nXTCPos;
+ checkOuterPoints(m_currentControlPosX, m_dbControlWidth > m_LabelWidth ? m_dbControlWidth : m_LabelWidth, m_currentControlPosY, m_dbControlHeight, true);
+ m_currentLabelPosX = m_maxPostionX + cHoriDistance;
+ m_currentControlPosX = m_currentLabelPosX;
adjustLineWidth(StartA, a - 1, nRightDist, 1);
StartA = a;
}
@@ -265,7 +252,7 @@ public class FormControlArranger
}
/**
- *
+ *
* @param StartIndex
* @param EndIndex
* @param nDist
@@ -278,42 +265,44 @@ public class FormControlArranger
for (int i = StartIndex; i <= EndIndex; i++)
{
int nControlBaseWidth = 0;
- curDBControl = this.DBControlList[i];
- Control curLabelControl = this.LabelControlList[i];
+ DatabaseControl dbControl = DBControlList[i];
+ Control curLabelControl = LabelControlList[i];
if (i != StartIndex)
{
curLabelControl.setPosition(new Point(iLocTCPosX, curLabelControl.getPosition().Y));
- curDBControl.setPosition(new Point(iLocTCPosX, curLabelControl.getPosition().Y + nTCHeight));
+ dbControl.setPosition(new Point(iLocTCPosX, curLabelControl.getPosition().Y + m_LabelHeight));
}
- if (((curLabelControl.getSize().Width > curDBControl.getSize().Width)) && (WidthFactor > 0))
+ final Size labelSize = curLabelControl.getSize();
+ Size controlSize = dbControl.getSize();
+ if (((labelSize.Width > controlSize.Width)) && (WidthFactor > 0))
{
- nControlBaseWidth = curLabelControl.getSize().Width;
+ nControlBaseWidth = labelSize.Width;
}
else
{
- nControlBaseWidth = curDBControl.getSize().Width;
+ nControlBaseWidth = controlSize.Width;
}
if (FieldColumns[i].getFieldType() == DataType.TIMESTAMP)
{
- TimeStampControl oDBTimeStampControl = (TimeStampControl) curDBControl;
+ TimeStampControl oDBTimeStampControl = (TimeStampControl) dbControl;
nControlBaseWidth = oDBTimeStampControl.getSize().Width;
- if (this.isReducable(i) || WidthFactor > 0)
- {
- oDBTimeStampControl.setSize(new Size(nControlBaseWidth + WidthFactor * CorrWidth, oDBTimeStampControl.getSize().Height));
- }
}
- else
+ if (WidthFactor > 0 || isReducable(i, labelSize.Width, controlSize.Width))
{
- if (this.isReducable(i) || WidthFactor > 0)
- {
- curDBControl.setSize(new Size(nControlBaseWidth + WidthFactor * CorrWidth, curDBControl.getSize().Height));
- }
+ controlSize.Width = nControlBaseWidth + WidthFactor * CorrWidth;
+ dbControl.setSize(controlSize);
+ controlSize = dbControl.getSize();
}
- iLocTCPosX = curDBControl.getPosition().X + curDBControl.getSize().Width + cHoriDistance;
- if (curLabelControl.getSize().Width > curDBControl.getSize().Width)
+
+ if (labelSize.Width > controlSize.Width)
{
- iLocTCPosX = curLabelControl.getPosition().X + curLabelControl.getSize().Width + cHoriDistance;
+ iLocTCPosX += labelSize.Width;
}
+ else
+ {
+ iLocTCPosX += controlSize.Width;
+ }
+ iLocTCPosX += cHoriDistance;
}
if (WidthFactor > 0)
{
@@ -325,43 +314,38 @@ public class FormControlArranger
}
}
- private void checkOuterPoints(int nXPos, int nWidth, int nYPos, int nHeight, boolean bIsDBField)
+ private void checkOuterPoints(int i_nXPos, int i_nWidth, int i_nYPos, int i_nHeight, boolean i_bIsDBField)
{
- int nColRightX;
- if (icurArrangement == FormWizard.SOTOPJUSTIFIED)
+ if (icurArrangement == FormWizard.IN_BLOCK_TOP && i_bIsDBField)
{
- if (bIsDBField)
+ // Only at DBControls you can measure the Value of nMaxRowY
+ if (bIsFirstRun)
{
- // Only at DBControls you can measure the Value of nMaxRowY
- if (bIsFirstRun)
- {
- nMaxRowY = nYPos + nHeight;
- nSecMaxRowY = nMaxRowY;
- }
- else
+ m_currentMaxRowHeight = i_nYPos + i_nHeight;
+ nSecMaxRowY = m_currentMaxRowHeight;
+ }
+ else
+ {
+ int nRowY = i_nYPos + i_nHeight;
+ if (nRowY >= m_currentMaxRowHeight)
{
- int nRowY = nYPos + nHeight;
- if (nRowY >= nMaxRowY)
- {
- int nOldMaxRowY = nMaxRowY;
- nSecMaxRowY = nOldMaxRowY;
- nMaxRowY = nRowY;
- }
+ nSecMaxRowY = m_currentMaxRowHeight;
+ m_currentMaxRowHeight = nRowY;
}
}
}
// Find the outer right point
if (bIsFirstRun)
{
- nMaxColRightX = nXPos + nWidth;
+ m_maxPostionX = i_nXPos + i_nWidth;
bIsFirstRun = false;
}
else
{
- nColRightX = nXPos + nWidth;
- if (nColRightX > nMaxColRightX)
+ int nColRightX = i_nXPos + i_nWidth;
+ if (nColRightX > m_maxPostionX)
{
- nMaxColRightX = nColRightX;
+ m_maxPostionX = nColRightX;
}
}
}
@@ -370,16 +354,16 @@ public class FormControlArranger
{
try
{
- this.NBorderType = _NBorderType;
- this.setStartPoint(_aStartPoint);
+ NBorderType = _NBorderType;
+ setStartPoint(_aStartPoint);
icurArrangement = _icurArrangement;
initializePosSizes();
initializeControlColumn(-1);
bIsVeryFirstRun = true;
- nMaxRowY = 0;
+ m_currentMaxRowHeight = 0;
nSecMaxRowY = 0;
- this.nMaxColRightX = 0;
- xProgressBar.start("", FieldColumns.length);
+ m_maxPostionX = 0;
+ xProgressBar.start(PropertyNames.EMPTY_STRING, FieldColumns.length);
for (int i = 0; i < FieldColumns.length; i++)
{
try
@@ -387,13 +371,12 @@ public class FormControlArranger
insertLabel(i, _iAlign);
insertDBControl(i);
bIsVeryFirstRun = false;
- DBControlList[i].setPropertyValue("LabelControl", LabelControlList[i].xPropertySet);
+ DBControlList[i].setPropertyValue(LABELCONTROL, LabelControlList[i].xPropertySet);
resetPosSizes(i);
xProgressBar.setValue(i + 1);
}
catch (RuntimeException e)
{
- int dummy = 0;
}
}
xProgressBar.end();
@@ -426,19 +409,19 @@ public class FormControlArranger
private void resetPosSizes(int LastIndex)
{
- int nYRefPos = nYDBPos;
+ int nYRefPos = m_currentControlPosY;
switch (icurArrangement)
{
- case FormWizard.SOCOLUMNARLEFT:
- nYDBPos = nYDBPos + nDBHeight + cVertDistance + getCheckBoxDiffHeight(LastIndex);
- nYRefPos = nYDBPos;
- if ((nYDBPos > cYOffset + nFormHeight) || (LastIndex == (FieldColumns.length - 1)))
+ case FormWizard.COLUMNAR_LEFT:
+ m_currentControlPosY = m_currentControlPosY + m_dbControlHeight + cVertDistance + getCheckBoxDiffHeight(LastIndex);
+ nYRefPos = m_currentControlPosY;
+ if ((m_currentControlPosY > cYOffset + nFormHeight) || (LastIndex == (FieldColumns.length - 1)))
{
repositionColumnarLeftControls(LastIndex);
- nXTCPos = nMaxColRightX + 2 * cHoriDistance;
- nXDBPos = nXTCPos + this.cLabelGap + nMaxTCWidth;
- nYDBPos = cYOffset;
- nYRefPos = nYDBPos;
+ m_currentLabelPosX = m_maxPostionX + 2 * cHoriDistance;
+ m_currentControlPosX = m_currentLabelPosX + cLabelGap + m_MaxLabelWidth;
+ m_currentControlPosY = cYOffset;
+ nYRefPos = m_currentControlPosY;
initializeControlColumn(LastIndex);
}
else
@@ -447,59 +430,63 @@ public class FormControlArranger
/* a += 1;*/
++a;
}
- nYTCPos = nYDBPos + this.getLabelDiffHeight(LastIndex);
- if ((nYRefPos + nDBHeight) > nMaxDBYPos)
+ m_currentLabelPosY = m_currentControlPosY + getLabelDiffHeight(LastIndex);
+ if ((nYRefPos + m_dbControlHeight) > m_controlMaxPosY)
{
- nMaxDBYPos = nYRefPos + nDBHeight;
+ m_controlMaxPosY = nYRefPos + m_dbControlHeight;
}
break;
- case FormWizard.SOCOLUMNARTOP:
- nYTCPos = nYDBPos + nDBHeight + cVertDistance + getCheckBoxDiffHeight(LastIndex);
- ;
- if ((nYTCPos > cYOffset + nFormHeight) || (LastIndex == (FieldColumns.length - 1)))
+ case FormWizard.COLUMNAR_TOP:
+ m_currentLabelPosY = m_currentControlPosY + m_dbControlHeight + cVertDistance + getCheckBoxDiffHeight(LastIndex);
+
+ if ((m_currentLabelPosY > cYOffset + nFormHeight) || (LastIndex == (FieldColumns.length - 1)))
{
- nXDBPos = nMaxColRightX + cHoriDistance;
- nXTCPos = nXDBPos;
- nYRefPos = nYDBPos;
- nYDBPos = cYOffset + nTCHeight + cVertDistance;
- nYTCPos = cYOffset;
+ m_currentControlPosX = m_maxPostionX + cHoriDistance;
+ m_currentLabelPosX = m_currentControlPosX;
+ nYRefPos = m_currentControlPosY;
+ m_currentControlPosY = cYOffset + m_LabelHeight + cVertDistance;
+ m_currentLabelPosY = cYOffset;
initializeControlColumn(LastIndex);
}
else
{
- a = a + 1;
+ ++a;
}
- if ((nYRefPos + nDBHeight + cVertDistance) > nMaxDBYPos)
+ if ((nYRefPos + m_dbControlHeight + cVertDistance) > m_controlMaxPosY)
{
- nMaxDBYPos = nYRefPos + nDBHeight + cVertDistance;
+ m_controlMaxPosY = nYRefPos + m_dbControlHeight + cVertDistance;
}
break;
- case FormWizard.SOTOPJUSTIFIED:
- if (this.isReducable(a))
+ case FormWizard.IN_BLOCK_TOP:
+ if (isReducable(a, m_LabelWidth, m_dbControlWidth))
{
- iReduceWidth = iReduceWidth + 1;
+ ++iReduceWidth;
}
- if (nMaxColRightX > cXOffset + nFormWidth)
+ //if (m_maxPostionX > (nFormWidth-cXOffset-cXOffset)) // cXOffset + nFormWidth
+ if (m_maxPostionX > cXOffset + nFormWidth)
{
- int nOldYTCPos = nYTCPos;
checkJustifiedPosition(a);
- nYRefPos = nYDBPos;
+ nYRefPos = m_currentControlPosY;
}
else
{
- nXTCPos = nMaxColRightX + cHoriDistance;
+ m_currentLabelPosX = m_maxPostionX + cHoriDistance;
+ }
+ if (a == FieldColumns.length - 1)
+ {
+ checkJustifiedPosition(a);
+ nYRefPos = m_currentControlPosY;
}
- a = a + 1;
- if ((nYRefPos + nDBHeight) > nMaxDBYPos)
+ m_currentControlPosX = m_currentLabelPosX;
+ ++a;
+ if ((nYRefPos + m_dbControlHeight) > m_controlMaxPosY)
{
- nMaxDBYPos = nYRefPos + nDBHeight;
+ m_controlMaxPosY = nYRefPos + m_dbControlHeight;
}
break;
}
-// if ((nYRefPos + nDBHeight) > nMaxDBYPos)
-// nMaxDBYPos = nYRefPos + nDBHeight;
}
private void repositionColumnarLeftControls(int LastIndex)
@@ -509,42 +496,41 @@ public class FormControlArranger
{
if (i == StartA)
{
- nXTCPos = LabelControlList[i].getPosition().X;
- nXDBPos = nXTCPos + nMaxTCWidth + cHoriDistance;
+ m_currentLabelPosX = LabelControlList[i].getPosition().X;
+ m_currentControlPosX = m_currentLabelPosX + m_MaxLabelWidth + cHoriDistance;
}
- LabelControlList[i].setSize(new Size(nMaxTCWidth, nTCHeight));
- resetDBShape(DBControlList[i], nXDBPos);
- checkOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, true);
+ LabelControlList[i].setSize(new Size(m_MaxLabelWidth, m_LabelHeight));
+ resetDBShape(DBControlList[i], m_currentControlPosX);
+ checkOuterPoints(m_currentControlPosX, m_dbControlWidth, m_currentControlPosY, m_dbControlHeight, true);
}
}
private void resetDBShape(Shape _curDBControl, int iXPos)
{
- int nYDBPos = _curDBControl.getPosition().Y;
- nDBWidth = _curDBControl.getSize().Width;
- nDBHeight = _curDBControl.getSize().Height;
- _curDBControl.setPosition(new Point(iXPos, nYDBPos));
+ m_dbControlWidth = _curDBControl.getSize().Width;
+ m_dbControlHeight = _curDBControl.getSize().Height;
+ _curDBControl.setPosition(new Point(iXPos, _curDBControl.getPosition().Y));
}
private void initializePosSizes()
{
- this.nMaxDBYPos = 0;
- nXTCPos = cXOffset;
- nTCWidth = 2000;
- nDBWidth = 2000;
- nDBHeight = oFormHandler.getControlReferenceHeight();
- nTCHeight = oFormHandler.getLabelHeight();
+ m_controlMaxPosY = 0;
+ m_currentLabelPosX = cXOffset;
+ m_LabelWidth = 2000;
+ m_dbControlWidth = 2000;
+ m_dbControlHeight = oFormHandler.getControlReferenceHeight();
+ m_LabelHeight = oFormHandler.getLabelHeight();
iReduceWidth = 0;
- if (icurArrangement == FormWizard.SOCOLUMNARLEFT)
+ if (icurArrangement == FormWizard.COLUMNAR_LEFT)
{
- nYTCPos = cYOffset + this.getLabelDiffHeight(0);
- nXDBPos = cXOffset + 3050;
- nYDBPos = cYOffset;
+ m_currentLabelPosY = cYOffset + getLabelDiffHeight(0);
+ m_currentControlPosX = cXOffset + 3050;
+ m_currentControlPosY = cYOffset;
}
else
{
- nXDBPos = cXOffset;
- nYTCPos = cYOffset;
+ m_currentControlPosX = cXOffset;
+ m_currentLabelPosY = cYOffset;
}
}
@@ -552,65 +538,65 @@ public class FormControlArranger
{
try
{
+ Point aPoint = new Point(m_currentLabelPosX, m_currentLabelPosY);
+ Size aSize = new Size(m_LabelWidth, m_LabelHeight);
if (bControlsareCreated)
{
- LabelControlList[i].setPosition(new Point(nXTCPos, nYTCPos));
- if (icurArrangement != FormWizard.SOCOLUMNARLEFT)
+ LabelControlList[i].setPosition(aPoint);
+ if (icurArrangement != FormWizard.COLUMNAR_LEFT)
{
- nTCWidth = LabelControlList[i].getPreferredWidth(FieldColumns[i].getFieldTitle());
- LabelControlList[i].setSize(new Size(nTCWidth, nTCHeight));
+ m_LabelWidth = LabelControlList[i].getPreferredWidth(FieldColumns[i].getFieldTitle());
+ aSize.Width = m_LabelWidth;
+ LabelControlList[i].setSize(aSize);
}
else
{
- nTCWidth = LabelControlList[i].getSize().Width;
+ m_LabelWidth = LabelControlList[i].getSize().Width;
}
}
else
{
- Point aPoint = new Point(nXTCPos, nYTCPos);
- Size aSize = new Size(nTCWidth, nTCHeight);
final String sFieldName = FieldColumns[i].getFieldName();
- this.LabelControlList[i] = new Control(oFormHandler, xFormName, FormHandler.SOLABEL, sFieldName, aPoint, aSize);
- if (bIsVeryFirstRun)
+ LabelControlList[i] = new Control(oFormHandler, xFormName, FormHandler.SOLABEL, sFieldName, aPoint, aSize);
+ if (bIsVeryFirstRun && icurArrangement == FormWizard.COLUMNAR_TOP)
{
- if (icurArrangement == FormWizard.SOCOLUMNARTOP)
- {
- nYDBPos = nYTCPos + nTCHeight;
- }
- }
- String sTitle = FieldColumns[i].getFieldTitle();
- nTCWidth = LabelControlList[i].getPreferredWidth(sTitle);
+ m_currentControlPosY = m_currentLabelPosY + m_LabelHeight;
}
+ final String sTitle = FieldColumns[i].getFieldTitle();
+ m_LabelWidth = LabelControlList[i].getPreferredWidth(sTitle);
+ aSize.Width = m_LabelWidth;
+ LabelControlList[i].setSize(aSize);
+ }
Control curLabelControl = LabelControlList[i];
- if (icurArrangement == FormWizard.SOCOLUMNARLEFT)
+ if (icurArrangement == FormWizard.COLUMNAR_LEFT)
{
// Note This If Sequence must be called before retrieving the outer Points
if (bIsFirstRun)
{
- nMaxTCWidth = nTCWidth;
+ m_MaxLabelWidth = m_LabelWidth;
bIsFirstRun = false;
}
- else if (nTCWidth > nMaxTCWidth)
+ else if (m_LabelWidth > m_MaxLabelWidth)
{
- nMaxTCWidth = nTCWidth;
+ m_MaxLabelWidth = m_LabelWidth;
}
}
- checkOuterPoints(nXTCPos, nTCWidth, nYTCPos, nTCHeight, false);
- if ((icurArrangement == FormWizard.SOCOLUMNARTOP) || (icurArrangement == FormWizard.SOTOPJUSTIFIED))
+ checkOuterPoints(m_currentLabelPosX, m_LabelWidth, m_currentLabelPosY, m_LabelHeight, false);
+ if ((icurArrangement == FormWizard.COLUMNAR_TOP) || (icurArrangement == FormWizard.IN_BLOCK_TOP))
{
- nXDBPos = nXTCPos;
- nYDBPos = nYTCPos + nTCHeight;
- curLabelControl.xPropertySet.setPropertyValue("Align", new Short((short) com.sun.star.awt.TextAlign.LEFT));
+ m_currentControlPosX = m_currentLabelPosX;
+ m_currentControlPosY = m_currentLabelPosY + m_LabelHeight;
+ curLabelControl.xPropertySet.setPropertyValue(PropertyNames.PROPERTY_ALIGN, new Short((short) com.sun.star.awt.TextAlign.LEFT));
}
else
{
- curLabelControl.xPropertySet.setPropertyValue("Align", new Short((short) _iAlign));
+ curLabelControl.xPropertySet.setPropertyValue(PropertyNames.PROPERTY_ALIGN, new Short((short) _iAlign));
}
if (!bControlsareCreated)
{
- curLabelControl.setSize(new Size(nTCWidth, nTCHeight));
+ curLabelControl.setSize(new Size(m_LabelWidth, m_LabelHeight));
}
-// if (CurHelpText != ""){
+// if (CurHelpText != PropertyNames.EMPTY_STRING){
// oModel.HelpText = CurHelptext;
// }
}
@@ -627,7 +613,7 @@ public class FormControlArranger
String sFieldName = FieldColumns[i].getFieldName();
int nFieldType = FieldColumns[i].getFieldType();
- Point aPoint = new Point(nXDBPos, nYDBPos);
+ Point aPoint = new Point(m_currentControlPosX, m_currentControlPosY);
if (bControlsareCreated)
{
DBControlList[i].setPosition(aPoint);
@@ -644,29 +630,30 @@ public class FormControlArranger
if (DBControlList[i].getControlType() == FormHandler.SOCHECKBOX)
{
// Checkboxes have no Label near by
- DBControlList[i].setPropertyValue(PropertyNames.PROPERTY_LABEL, "");
+ DBControlList[i].setPropertyValue(PropertyNames.PROPERTY_LABEL, PropertyNames.EMPTY_STRING);
}
}
}
DatabaseControl aDBControl = DBControlList[i];
- nDBHeight = aDBControl.getControlHeight();
- nDBWidth = aDBControl.getControlWidth();
+ m_dbControlHeight = aDBControl.getControlHeight();
+ m_dbControlWidth = aDBControl.getControlWidth();
if (nFieldType != DataType.TIMESTAMP)
{
- aDBControl.setSize(new Size(nDBWidth, nDBHeight));
+ aDBControl.setSize(new Size(m_dbControlWidth, m_dbControlHeight));
}
if (aDBControl.getControlType() == FormHandler.SOCHECKBOX)
{
- nYDBPos = nYDBPos + /*(int)*/ ((oFormHandler.getControlReferenceHeight() - nDBHeight) / 2);
- aPoint = new Point(nXDBPos, nYDBPos);
+ m_currentControlPosY = m_currentControlPosY + /*(int)*/ ((oFormHandler.getControlReferenceHeight() - m_dbControlHeight) / 2);
+ aPoint = new Point(m_currentControlPosX, m_currentControlPosY);
aDBControl.setPosition(aPoint);
}
if (nFieldType == DataType.LONGVARCHAR) /* memo */
+
{
Helper.setUnoPropertyValue(LabelControlList[i], PropertyNames.PROPERTY_MULTILINE, Boolean.TRUE);
}
- checkOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, true);
- aDBControl.setPropertyValue("Border", NBorderType);
+ checkOuterPoints(m_currentControlPosX, m_dbControlWidth, m_currentControlPosY, m_dbControlHeight, true);
+ aDBControl.setPropertyValue(PropertyNames.PROPERTY_BORDER, NBorderType);
}
catch (Exception e)
{
@@ -688,12 +675,12 @@ public class FormControlArranger
public int getFormHeight()
{
- return nMaxDBYPos - this.cYOffset;
+ return m_controlMaxPosY - cYOffset;
}
public int getEntryPointY()
{
- if (this.icurArrangement == FormWizard.SOCOLUMNARTOP)
+ if (icurArrangement == FormWizard.COLUMNAR_TOP)
{
Control curLabelControl2 = LabelControlList[0];
return curLabelControl2.getPosition().Y;
@@ -707,8 +694,8 @@ public class FormControlArranger
public void setStartPoint(Point _aPoint)
{
- this.cXOffset = _aPoint.X;
- this.cYOffset = _aPoint.Y;
+ cXOffset = _aPoint.X;
+ cYOffset = _aPoint.Y;
}
public void adjustYPositions(int _diffY)
@@ -717,10 +704,10 @@ public class FormControlArranger
{
Point aPoint = DBControlList[i].getPosition();
DBControlList[i].setPosition(new Point(aPoint.X, aPoint.Y - _diffY));
- aPoint = this.LabelControlList[i].getPosition();
+ aPoint = LabelControlList[i].getPosition();
LabelControlList[i].setPosition(new Point(aPoint.X, aPoint.Y - _diffY));
}
- nMaxDBYPos = -_diffY;
+ m_controlMaxPosY = -_diffY;
cYOffset = -_diffY;
}
diff --git a/wizards/com/sun/star/wizards/form/FormDocument.java b/wizards/com/sun/star/wizards/form/FormDocument.java
index 0070fed3ada1..83e48f15c5bd 100644
--- a/wizards/com/sun/star/wizards/form/FormDocument.java
+++ b/wizards/com/sun/star/wizards/form/FormDocument.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -152,7 +152,7 @@ public class FormDocument extends TextDocument
{
if (oControlForms.size() == 0)
{
- final ControlForm aMainControlForm = new ControlForm(this, SOMAINFORM, aMainFormPoint, getMainFormSize(FormWizard.SOGRID));
+ final ControlForm aMainControlForm = new ControlForm(this, SOMAINFORM, aMainFormPoint, getMainFormSize(FormWizard.AS_GRID));
oControlForms.addElement(aMainControlForm);
}
else
@@ -213,7 +213,7 @@ public class FormDocument extends TextDocument
int nMainFormHeight = nFormHeight;
if (bhasSubForm)
{
- if (_curArrangement == FormWizard.SOGRID)
+ if (_curArrangement == FormWizard.AS_GRID)
{
nMainFormHeight = (int) ((double) (nFormHeight - SOFORMGAP) / 2);
}
@@ -223,8 +223,7 @@ public class FormDocument extends TextDocument
nMainFormHeight = (int) (((double) getMainFieldCount() / (double) nTotalFieldCount) * ((double) (nFormHeight - SOFORMGAP) / 2));
}
}
- Size aMainFormSize = new Size(nFormWidth, nMainFormHeight);
- return aMainFormSize;
+ return new Size(nFormWidth, nMainFormHeight);
}
private Size getSubFormSize()
@@ -233,8 +232,7 @@ public class FormDocument extends TextDocument
// int nSubFormFieldCount = this.oSubFormDBMetaData.FieldNames.length;
// int totfieldcount = oMainFormDBMetaData.FieldNames.length + nSubFormFieldCount;
int nMainFormHeight = ((ControlForm) oControlForms.get(0)).getActualFormHeight();
- Size aSubFormSize = new Size(nFormWidth, nFormHeight - nMainFormHeight - SOFORMGAP);
- return aSubFormSize;
+ return new Size(nFormWidth, nFormHeight - nMainFormHeight - SOFORMGAP);
}
private Point getSubFormPoint()
@@ -248,7 +246,7 @@ public class FormDocument extends TextDocument
{
ControlForm oMainControlForm = (ControlForm) oControlForms.get(0);
oMainControlForm.setFormSize(getMainFormSize(oMainControlForm.curArrangement));
- if (oMainControlForm.curArrangement == FormWizard.SOGRID)
+ if (oMainControlForm.curArrangement == FormWizard.AS_GRID)
{
oMainControlForm.oGridControl.setSize(oMainControlForm.getFormSize());
}
@@ -265,8 +263,8 @@ public class FormDocument extends TextDocument
{
ControlForm oMainControlForm = (ControlForm) oControlForms.get(0);
ControlForm oSubControlForm = (ControlForm) oControlForms.get(1);
- oSubControlForm.setFormSize(new Size(nFormWidth, (int) nFormHeight - oMainControlForm.getFormSize().Height));
- if (oSubControlForm.curArrangement == FormWizard.SOGRID)
+ oSubControlForm.setFormSize(new Size(nFormWidth, nFormHeight - oMainControlForm.getFormSize().Height));
+ if (oSubControlForm.curArrangement == FormWizard.AS_GRID)
{
Point aPoint = oSubControlForm.oGridControl.getPosition();
int idiffheight = oSubControlForm.getEntryPointY() - oMainControlForm.getActualFormHeight() - oMainControlForm.aStartPoint.Y - SOFORMGAP;
@@ -316,7 +314,7 @@ public class FormDocument extends TextDocument
ControlForm oSubControlForm = getControlFormByName(SOSUBFORM);
oSubControlForm.setFormProperties(aFormProperties, oSubFormDBMetaData);
String sRefTableName = _curFormConfiguration.getreferencedTableName();
- if (sRefTableName.equals(""))
+ if (sRefTableName.equals(PropertyNames.EMPTY_STRING))
{
LinkFieldNames = _curFieldLinker.getLinkFieldNames();
}
@@ -378,7 +376,7 @@ public class FormDocument extends TextDocument
{
xFormContainer = oFormHandler.insertFormbyName(_sname);
}
- xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xFormContainer);
+ xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xFormContainer);
if (_sname.equals(SOMAINFORM))
{
oDBMetaData = oFormDocument.oMainFormDBMetaData;
@@ -406,13 +404,13 @@ public class FormDocument extends TextDocument
}
else
{
- if (curArrangement == FormWizard.SOGRID)
+ if (curArrangement == FormWizard.AS_GRID)
{
oFormHandler.moveShapesToNirwana(getLabelControls());
oFormHandler.moveShapesToNirwana(getDatabaseControls());
}
}
- if (curArrangement == FormWizard.SOGRID)
+ if (curArrangement == FormWizard.AS_GRID)
{
insertGridControl(_NBorderType);
badaptControlStyles = true;
@@ -485,7 +483,7 @@ public class FormDocument extends TextDocument
private int getActualFormHeight()
{
- if (curArrangement == FormWizard.SOGRID)
+ if (curArrangement == FormWizard.AS_GRID)
{
return oGridControl.xShape.getSize().Height;
}
@@ -497,7 +495,7 @@ public class FormDocument extends TextDocument
private int getEntryPointY()
{
- if (curArrangement == FormWizard.SOGRID)
+ if (curArrangement == FormWizard.AS_GRID)
{
return oGridControl.xShape.getPosition().Y;
}
@@ -512,8 +510,8 @@ public class FormDocument extends TextDocument
try
{
xPropertySet.setPropertyValue("DataSourceName", getDataSourceName());
- xPropertySet.setPropertyValue("Command", _oDBMetaData.getCommandName());
- xPropertySet.setPropertyValue("CommandType", new Integer(_oDBMetaData.getCommandType()));
+ xPropertySet.setPropertyValue(PropertyNames.COMMAND, _oDBMetaData.getCommandName());
+ xPropertySet.setPropertyValue(PropertyNames.COMMAND_TYPE, new Integer(_oDBMetaData.getCommandType()));
for (int i = 0; i < _aPropertySetList.length; i++)
{
xPropertySet.setPropertyValue(_aPropertySetList[i].Name, _aPropertySetList[i].Value);
@@ -551,16 +549,16 @@ public class FormDocument extends TextDocument
{
try
{
- curArrangement = FormWizard.SOGRID;
+ curArrangement = FormWizard.AS_GRID;
if (Name.equals(SOMAINFORM))
{
- oGridControl = new GridControl(xMSF, Name + "_Grid", oFormHandler, xFormContainer, oDBMetaData.FieldColumns, aStartPoint, getMainFormSize(FormWizard.SOGRID));
+ oGridControl = new GridControl(xMSF, Name + "_Grid", oFormHandler, xFormContainer, oDBMetaData.FieldColumns, aStartPoint, getMainFormSize(FormWizard.AS_GRID));
}
else
{
oGridControl = new GridControl(xMSF, Name + "_Grid", oFormHandler, xFormContainer, oDBMetaData.FieldColumns, aStartPoint, getSubFormSize());
}
- oGridControl.xPropertySet.setPropertyValue("Border", _NBorderType);
+ oGridControl.xPropertySet.setPropertyValue(PropertyNames.PROPERTY_BORDER, _NBorderType);
}
catch (Exception e)
{
@@ -576,7 +574,7 @@ public class FormDocument extends TextDocument
{
for (int i = 0; i < getLabelControls().length; i++)
{
- if (curArrangement == FormWizard.SOGRID)
+ if (curArrangement == FormWizard.AS_GRID)
{
if ((oLabelControls[i] != null) && (oDBControls[i] != null))
{
diff --git a/wizards/com/sun/star/wizards/form/FormWizard.java b/wizards/com/sun/star/wizards/form/FormWizard.java
index f75f3e1b84ab..d898066be1a3 100644
--- a/wizards/com/sun/star/wizards/form/FormWizard.java
+++ b/wizards/com/sun/star/wizards/form/FormWizard.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,8 +56,8 @@ public class FormWizard extends DatabaseObjectWizard
private Finalizer curFinalizer;
private static String slblFields;
private static String slblSelFields;
- private String sShowBinaryFields = "";
- private String serrFormNameexists = "";
+ private String sShowBinaryFields = PropertyNames.EMPTY_STRING;
+ private String serrFormNameexists = PropertyNames.EMPTY_STRING;
public static final int SOMAIN_PAGE = 1;
public static final int SOSUBFORM_PAGE = 2;
public static final int SOSUBFORMFIELDS_PAGE = 3;
@@ -66,30 +66,30 @@ public class FormWizard extends DatabaseObjectWizard
public static final int SODATA_PAGE = 6;
public static final int SOSTYLE_PAGE = 7;
public static final int SOSTORE_PAGE = 8;
- public static final int SOCOLUMNARLEFT = 1;
- public static final int SOCOLUMNARTOP = 2;
- public static final int SOGRID = 3;
- public static final int SOTOPJUSTIFIED = 4;
+ public static final int COLUMNAR_LEFT = 1;
+ public static final int COLUMNAR_TOP = 2;
+ public static final int AS_GRID = 3;
+ public static final int IN_BLOCK_TOP = 4;
private String slblTables;
private boolean m_openForEditing;
private boolean m_success = false;
private String FormName;
- public FormWizard( XMultiServiceFactory i_servicFactory, final PropertyValue[] i_wizardContext )
+ public FormWizard(XMultiServiceFactory i_servicFactory, final PropertyValue[] i_wizardContext)
{
- super( i_servicFactory, 34400, i_wizardContext );
+ super(i_servicFactory, 34400, i_wizardContext);
super.addResourceHandler("FormWizard", "dbw");
Helper.setUnoPropertyValues(xDialogModel,
new String[]
{
- PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_MOVEABLE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Integer(210), Boolean.TRUE, "DialogForm", new Integer(102), new Integer(41), new Integer(1), new Short((short) 0), m_oResource.getResText(UIConsts.RID_FORM), new Integer(310)
+ 210, Boolean.TRUE, "DialogForm", 102, 41, 1, new Short((short) 0), m_oResource.getResText(UIConsts.RID_FORM), 310
});
drawNaviBar();
- if (getFormResources() == true)
+ if (getFormResources())
{
setRightPaneHeaders(m_oResource, UIConsts.RID_FORM + 90, 8);
}
@@ -117,7 +117,7 @@ public class FormWizard extends DatabaseObjectWizard
RelationController oRelationController = new RelationController(curFormDocument.oMainFormDBMetaData, sCommandName);
curFormConfiguration.initialize(curSubFormFieldSelection, oRelationController);
}
- break;
+ break;
case SOSUBFORMFIELDS_PAGE:
{
String sPreSelectedTableName = curFormConfiguration.getreferencedTableName();
@@ -133,14 +133,14 @@ public class FormWizard extends DatabaseObjectWizard
curSubFormFieldSelection.preselectCommand(sPreSelectedTableName, bReadOnly);
}
}
- break;
+ break;
case SOFIELDLINKER_PAGE:
{
final String[] aMainFieldNames = curFormDocument.oMainFormDBMetaData.getFieldNames();
final String[] aSubFieldNames = curFormDocument.oSubFormDBMetaData.getFieldNames();
curFieldLinker.initialize(aMainFieldNames, aSubFieldNames, curFormDocument.LinkFieldNames);
}
- break;
+ break;
case SOCONTROL_PAGE:
curControlArranger.enableSubFormImageList(curFormConfiguration.hasSubForm());
break;
@@ -153,7 +153,7 @@ public class FormWizard extends DatabaseObjectWizard
String sTableName = this.curDBCommandFieldSelection.getSelectedCommandName();
this.curFinalizer.initialize(sTableName, curFormDocument);
}
- break;
+ break;
default:
break;
}
@@ -186,9 +186,10 @@ public class FormWizard extends DatabaseObjectWizard
curFormDocument.LinkFieldNames = JavaTools.removeOutdatedFields(curFormDocument.LinkFieldNames, aMainFieldNames, 1);
}
catch (java.lang.Exception e)
- {}
+ {
+ }
}
- break;
+ break;
case SOSUBFORM_PAGE:
break;
case SOSUBFORMFIELDS_PAGE:
@@ -203,9 +204,10 @@ public class FormWizard extends DatabaseObjectWizard
curFormDocument.LinkFieldNames = JavaTools.removeOutdatedFields(curFormDocument.LinkFieldNames, aSubFieldNames, 0);
}
catch (java.lang.Exception e)
- {}
+ {
+ }
}
- break;
+ break;
case SOFIELDLINKER_PAGE:
curFormDocument.LinkFieldNames = curFieldLinker.getLinkFieldNames();
break;
@@ -235,7 +237,7 @@ public class FormWizard extends DatabaseObjectWizard
},
new Object[]
{
- new Integer(28), sShowBinaryFields, Boolean.TRUE, new Integer(95), new Integer(154), new Integer(SOMAIN_PAGE), new Integer(210)
+ 28, sShowBinaryFields, Boolean.TRUE, 95, 154, new Integer(SOMAIN_PAGE), 210
});
curFormConfiguration = new FormConfiguration(this);
@@ -250,7 +252,7 @@ public class FormWizard extends DatabaseObjectWizard
},
new Object[]
{
- new Integer(28), sShowBinaryFields, Boolean.TRUE, new Integer(95), new Integer(154), new Integer(SOSUBFORMFIELDS_PAGE), new Integer(210)
+ 28, sShowBinaryFields, Boolean.TRUE, 95, 154, new Integer(SOSUBFORMFIELDS_PAGE), 210
});
curFormDocument.xProgressBar.setValue(40);
@@ -337,24 +339,24 @@ public class FormWizard extends DatabaseObjectWizard
try
{
curFormDocument = new FormDocument(xMSF);
- if ( curFormDocument.oMainFormDBMetaData.getConnection( m_wizardContext ) )
+ if (curFormDocument.oMainFormDBMetaData.getConnection(m_wizardContext))
{
curFormDocument.oSubFormDBMetaData.getConnection(new PropertyValue[]
{
- Properties.createProperty("ActiveConnection", curFormDocument.oMainFormDBMetaData.DBConnection)
+ Properties.createProperty(PropertyNames.ACTIVE_CONNECTION, curFormDocument.oMainFormDBMetaData.DBConnection)
});
curFormDocument.xProgressBar.setValue(20);
buildSteps();
- this.curDBCommandFieldSelection.preselectCommand( m_wizardContext, false );
+ this.curDBCommandFieldSelection.preselectCommand(m_wizardContext, false);
XWindowPeer xWindowPeer2 = createWindowPeer(curFormDocument.xWindowPeer);
- curFormDocument.oMainFormDBMetaData.setWindowPeer( xWindowPeer2 );
+ curFormDocument.oMainFormDBMetaData.setWindowPeer(xWindowPeer2);
insertFormRelatedSteps();
short dialogReturn = executeDialog(curFormDocument.xFrame);
xComponent.dispose();
- if ( ( dialogReturn == 0 ) && m_success )
+ if ((dialogReturn == 0) && m_success)
{
- curFormDocument.oMainFormDBMetaData.addFormDocument( curFormDocument.xComponent );
- loadSubComponent( DatabaseObject.FORM, FormName, m_openForEditing );
+ curFormDocument.oMainFormDBMetaData.addFormDocument(curFormDocument.xComponent);
+ loadSubComponent(DatabaseObject.FORM, FormName, m_openForEditing);
}
}
}
@@ -396,7 +398,7 @@ public class FormWizard extends DatabaseObjectWizard
ID = 1;
if (sIncSuffix != null)
{
- if ((!sIncSuffix.equals("")) && (!sIncSuffix.equals("_")))
+ if ((!sIncSuffix.equals(PropertyNames.EMPTY_STRING)) && (!sIncSuffix.equals("_")))
{
String sID = JavaTools.ArrayoutofString(sIncSuffix, "_")[1];
ID = Integer.parseInt(sID);
@@ -432,6 +434,7 @@ public class FormWizard extends DatabaseObjectWizard
}
}
// @Override
+
public void moveItemDown(String item)
{
}
@@ -458,7 +461,7 @@ public class FormWizard extends DatabaseObjectWizard
curDBCommandFieldSelection.setModified(true);
boolean benable = curDBCommandFieldSelection.getSelectedFieldNames().length > 0;
enablefromStep(SOSUBFORM_PAGE, benable);
- setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, new Boolean(benable));
+ setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benable));
if (benable)
{
if (curFormConfiguration.hasSubForm())
@@ -471,12 +474,7 @@ public class FormWizard extends DatabaseObjectWizard
setStepEnabled(SOFIELDLINKER_PAGE, false);
}
}
- setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, new Boolean(benable));
+ setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benable));
}
}
}
-
-
-
-
-
diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java
index 5098a1ffbb74..1dedca3b636d 100644
--- a/wizards/com/sun/star/wizards/form/StyleApplier.java
+++ b/wizards/com/sun/star/wizards/form/StyleApplier.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -116,17 +116,17 @@ public class StyleApplier
},
new Object[]
{
- UIConsts.INTEGERS[8], sPageStyles, new Integer(92), new Integer(25), IStyleStep, new Short(curtabindex++), new Integer(90)
+ UIConsts.INTEGERS[8], sPageStyles, 92, 25, IStyleStep, new Short(curtabindex++), 90
});
lstStyles = CurUnoDialog.insertListBox("lstStyles", null, SCHANGELAYOUT, this,
new String[]
{
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "SelectedItems", PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.SELECTED_ITEMS, PropertyNames.PROPERTY_STEP, PropertyNames.STRING_ITEM_LIST, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Integer(143), "HID:WIZARDS_HID_DLGFORM_LSTSTYLES", new Integer(92), new Integer(35), SelLayoutPos, IStyleStep, this.StyleNames, new Short(curtabindex++), new Integer(90)
+ 143, "HID:WIZARDS_HID_DLGFORM_LSTSTYLES", 92, 35, SelLayoutPos, IStyleStep, this.StyleNames, new Short(curtabindex++), 90
});
optNoBorder = CurUnoDialog.insertRadioButton("otpNoBorder", SCHANGEBORDERTYPE, this,
@@ -136,7 +136,7 @@ public class StyleApplier
},
new Object[]
{
- UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMDNOBORDER", sNoBorder, new Integer(196), new Integer(39), IStyleStep, new Short(curtabindex++), "0", new Integer(93)
+ UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMDNOBORDER", sNoBorder, 196, 39, IStyleStep, new Short(curtabindex++), "0", 93
});
opt3DLook = CurUnoDialog.insertRadioButton("otp3DLook", SCHANGEBORDERTYPE, this,
@@ -146,7 +146,7 @@ public class StyleApplier
},
new Object[]
{
- UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", s3DLook, new Integer(196), new Integer(53), new Short((short) 1), IStyleStep, new Short(curtabindex++), "1", new Integer(93)
+ UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", s3DLook, 196, 53, new Short((short) 1), IStyleStep, new Short(curtabindex++), "1", 93
});
optFlat = CurUnoDialog.insertRadioButton("otpFlat", SCHANGEBORDERTYPE, this,
@@ -156,7 +156,7 @@ public class StyleApplier
},
new Object[]
{
- UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMDSIMPLEBORDER", sFlat, new Integer(196), new Integer(67), IStyleStep, new Short(curtabindex++), "2", new Integer(93)
+ UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMDSIMPLEBORDER", sFlat, 196, 67, IStyleStep, new Short(curtabindex++), "2", 93
});
CurUnoDialog.insertFixedLine("lnFieldBorder",
@@ -166,7 +166,7 @@ public class StyleApplier
},
new Object[]
{
- UIConsts.INTEGERS[8], sFieldBorder, new Integer(192), new Integer(25), IStyleStep, new Short(curtabindex++), new Integer(98)
+ UIConsts.INTEGERS[8], sFieldBorder, 192, 25, IStyleStep, new Short(curtabindex++), 98
});
// }
// catch (Exception e)
@@ -177,7 +177,7 @@ public class StyleApplier
/* public void initialize(short _iStyleindex){
if (_iStyleindex < lstStyles.getItemCount()){
- Helper.setUnoPropertyValue(UnoDialog.getModel(lstStyles), "SelectedItems", new short[]{_iStyleindex});
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lstStyles), PropertyNames.SELECTED_ITEMS, new short[]{_iStyleindex});
applyStyle(true, false);
}
}
@@ -187,7 +187,7 @@ public class StyleApplier
try
{
Object oRootNode = Configuration.getConfigurationRoot(xMSF, "org.openoffice.Office.FormWizard/FormWizard/Styles", false);
- XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oRootNode);
+ XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, oRootNode);
StyleNodeNames = xNameAccess.getElementNames();
StyleNames = new String[StyleNodeNames.length];
FileNames = new String[StyleNodeNames.length];
@@ -208,7 +208,7 @@ public class StyleApplier
{
try
{
- short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(lstStyles), "SelectedItems"));
+ short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(lstStyles), PropertyNames.SELECTED_ITEMS));
if (SelFields != null)
{
return SelFields[0];
@@ -281,10 +281,10 @@ public class StyleApplier
for (int m = 0; m < curFormDocument.oControlForms.size(); m++)
{
FormDocument.ControlForm curControlForm = ((FormDocument.ControlForm) curFormDocument.oControlForms.get(m));
- if (curControlForm.getArrangemode() == FormWizard.SOGRID)
+ if (curControlForm.getArrangemode() == FormWizard.AS_GRID)
{
GridControl oGridControl = curControlForm.getGridControl();
- oGridControl.xPropertySet.setPropertyValue("Border", IBorderValue);
+ oGridControl.xPropertySet.setPropertyValue(PropertyNames.PROPERTY_BORDER, IBorderValue);
}
else
{
@@ -297,17 +297,17 @@ public class StyleApplier
for (int i = 0; i < 2; i++)
{
XPropertySet xPropertySet = oTimeStampControl.getControlofGroupShapeByIndex(i);
- if (xPropertySet.getPropertySetInfo().hasPropertyByName("Border"))
+ if (xPropertySet.getPropertySetInfo().hasPropertyByName(PropertyNames.PROPERTY_BORDER))
{
- xPropertySet.setPropertyValue("Border", IBorderValue);
+ xPropertySet.setPropertyValue(PropertyNames.PROPERTY_BORDER, IBorderValue);
}
}
}
else
{
- if (DBControls[n].xPropertySet.getPropertySetInfo().hasPropertyByName("Border"))
+ if (DBControls[n].xPropertySet.getPropertySetInfo().hasPropertyByName(PropertyNames.PROPERTY_BORDER))
{
- DBControls[n].xPropertySet.setPropertyValue("Border", IBorderValue);
+ DBControls[n].xPropertySet.setPropertyValue(PropertyNames.PROPERTY_BORDER, IBorderValue);
}
}
}
@@ -331,7 +331,7 @@ public class StyleApplier
int index = JavaTools.FieldInList(_sDataList, _sHeader);
if (index > -1)
{
- String sPropName = "";
+ String sPropName = PropertyNames.EMPTY_STRING;
int iStyleColor;
while (((sPropName.indexOf("}") < 0) && (index < _sDataList.length - 1)))
{
@@ -345,8 +345,8 @@ public class StyleApplier
sPropValue = sPropValue.trim();
if (sPropValue.indexOf("#") > 0)
{
- sPropValue = JavaTools.replaceSubString(sPropValue, "", ";");
- sPropValue = JavaTools.replaceSubString(sPropValue, "", " ");
+ sPropValue = JavaTools.replaceSubString(sPropValue, PropertyNames.EMPTY_STRING, PropertyNames.SEMI_COLON);
+ sPropValue = JavaTools.replaceSubString(sPropValue, PropertyNames.EMPTY_STRING, PropertyNames.SPACE);
return Integer.decode(sPropValue).intValue();
}
}
@@ -367,7 +367,7 @@ public class StyleApplier
try
{
// TODO: check different languages in header layouts
- aStylePaths = FileAccess.getOfficePaths(getMSF(), "Config", "", "");
+ aStylePaths = FileAccess.getOfficePaths(getMSF(), "Config", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING);
FileAccess.combinePaths(getMSF(), aStylePaths, "/wizard/form/styles");
String[][] LayoutFiles = FileAccess.getFolderTitles(getMSF(), null, aStylePaths, ".css");
@@ -384,10 +384,10 @@ public class StyleApplier
private String getStylePath()
{
// TODO: umstellen auf mehrere Pfade
- String StylesPath = "";
+ String StylesPath = PropertyNames.EMPTY_STRING;
try
{
- StylesPath = FileAccess.getOfficePath(xMSF, "Config", "", "");
+ StylesPath = FileAccess.getOfficePath(xMSF, "Config", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING);
StylesPath = FileAccess.combinePaths(xMSF, StylesPath, "/wizard/form/styles");
}
catch (NoValidPathException e)
@@ -439,7 +439,7 @@ public class StyleApplier
for (int m = 0; m < curFormDocument.oControlForms.size(); m++)
{
FormDocument.ControlForm curControlForm = ((FormDocument.ControlForm) curFormDocument.oControlForms.get(m));
- if (curControlForm.getArrangemode() == FormWizard.SOGRID)
+ if (curControlForm.getArrangemode() == FormWizard.AS_GRID)
{
if (_iStyleColors[SOLABELTEXTCOLOR] > -1)
{
diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java b/wizards/com/sun/star/wizards/form/UIControlArranger.java
index d4cd1ccc7cb6..a99f36c7f507 100644
--- a/wizards/com/sun/star/wizards/form/UIControlArranger.java
+++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -83,7 +83,7 @@ public class UIControlArranger
},
new Object[]
{
- UIConsts.INTEGERS[8], sLabelPlacment, new Integer(97), new Integer(25), IControlStep, new Short(curtabindex++), new Integer(207)
+ UIConsts.INTEGERS[8], sLabelPlacment, 97, 25, IControlStep, new Short(curtabindex++), 207
});
// Radio Button "Align Left"
optAlignLeft = CurUnoDialog.insertRadioButton("optAlignLeft", SOALIGNMETHOD, this,
@@ -93,7 +93,7 @@ public class UIControlArranger
},
new Object[]
{
- UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMDALIGNLEFT", sAlignLeft, new Integer(107), new Integer(38), new Short((short) 1), IControlStep, new Short(curtabindex++), new Integer(171)
+ UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMDALIGNLEFT", sAlignLeft, 107, 38, new Short((short) 1), IControlStep, new Short(curtabindex++), 171
});
// Radio Button "Align Right"
optAlignRight = CurUnoDialog.insertRadioButton("optAlignRight", SOALIGNMETHOD, this,
@@ -103,7 +103,7 @@ public class UIControlArranger
},
new Object[]
{
- UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMDALIGNRIGHT", sAlignRight, Boolean.TRUE, new Integer(107), new Integer(50), IControlStep, new Short(curtabindex++), new Integer(171)
+ UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMDALIGNRIGHT", sAlignRight, Boolean.TRUE, 107, 50, IControlStep, new Short(curtabindex++), 171
});
@@ -119,7 +119,7 @@ public class UIControlArranger
// },
// new Object[]
// {
-// UIConsts.INTEGERS[8], sArrangementHeader[0], new Integer(97), new Integer(60), IControlStep, new Short(curtabindex++), new Integer(207)
+// UIConsts.INTEGERS[8], sArrangementHeader[0], 97, 60, IControlStep, new Short(curtabindex++), 207
// });
//
// boolean bEnabled = true;
@@ -142,14 +142,14 @@ public class UIControlArranger
// new Object[]
// {
// Boolean.valueOf(bEnabled),
-// new Integer(14),
+// 14,
///* TODO: WRONG!*/ "HID:WIZARDS_HID_DLGFORM_CMDALIGNRIGHT",
// "1",
// new Integer(nXPos + nBtnWidth),
// new Integer(nYPos),
// IControlStep,
// new Short(curtabindex++),
-// new Integer(16)
+// 16
// });
DefaultListModel imageModel = new DefaultListModel();
@@ -191,7 +191,7 @@ public class UIControlArranger
{
if (listItem == null)
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
return HelpTexts[((Integer) listItem).intValue()];
@@ -201,21 +201,12 @@ public class UIControlArranger
public void enableSubFormImageList(boolean _bdoEnable)
{
m_aArrangeList[1].m_aButtonList.setenabled(_bdoEnable);
- CurUnoDialog.setControlProperty("lnLabelPlacment_2", PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoEnable));
+ CurUnoDialog.setControlProperty("lnLabelPlacment_2", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoEnable));
}
public short getAlignValue()
{
- Short IAlignValue = null;
- if (optAlignLeft.getState())
- {
- IAlignValue = new Short((short) 0);
- }
- else
- {
- IAlignValue = new Short((short) 2);
- }
- return IAlignValue.shortValue();
+ return optAlignLeft.getState() ? (short)0 : (short)2;
}
public void alignLabelControls()
@@ -226,12 +217,12 @@ public class UIControlArranger
for (int m = 0; m < curFormDocument.oControlForms.size(); m++)
{
FormDocument.ControlForm curControlForm = (FormDocument.ControlForm) curFormDocument.oControlForms.get(m);
- if (curControlForm.getArrangemode() == FormWizard.SOCOLUMNARLEFT)
+ if (curControlForm.getArrangemode() == FormWizard.COLUMNAR_LEFT)
{
Control[] LabelControls = curControlForm.getLabelControls();
for (int n = 0; n < LabelControls.length; n++)
{
- LabelControls[n].xPropertySet.setPropertyValue("Align", new Short(iAlignValue));
+ LabelControls[n].xPropertySet.setPropertyValue(PropertyNames.PROPERTY_ALIGN, new Short(iAlignValue));
}
}
}
@@ -244,9 +235,9 @@ public class UIControlArranger
private void enableAlignControlGroup(boolean _bEnableAlignControlGroup)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(flnLabelPlacement), PropertyNames.PROPERTY_ENABLED, new Boolean(_bEnableAlignControlGroup));
- Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), PropertyNames.PROPERTY_ENABLED, new Boolean(_bEnableAlignControlGroup));
- Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignRight), PropertyNames.PROPERTY_ENABLED, new Boolean(_bEnableAlignControlGroup));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(flnLabelPlacement), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bEnableAlignControlGroup));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bEnableAlignControlGroup));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignRight), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bEnableAlignControlGroup));
}
// private class ArrangeImageList implements XItemListener
@@ -267,7 +258,7 @@ public class UIControlArranger
// },
// new Object[]
// {
-// UIConsts.INTEGERS[8], _sArrangementHeader, new Integer(97), YPos, IControlStep, new Short(curtabindex++), new Integer(207)
+// UIConsts.INTEGERS[8], _sArrangementHeader, 97, YPos, IControlStep, new Short(curtabindex++), 207
// });
//
// int nypos = SOBASEIMAGEYPOSITION + 12 + _formindex * SOIMAGELISTHEIGHT;
@@ -396,11 +387,11 @@ public class UIControlArranger
{
UIConsts.INTEGERS[8],
_sArrangementHeader,
- new Integer(97),
+ 97,
YPos,
IControlStep,
new Short(curtabindex++),
- new Integer(207)
+ 207
});
int nypos = SOBASEIMAGEYPOSITION + 12 - 5 + _formindex * SOIMAGELISTHEIGHT;
@@ -421,7 +412,7 @@ public class UIControlArranger
m_aButtonList.setListModel(model);
m_aButtonList.create(CurUnoDialog);
- m_aButtonList.setSelected(FormWizard.SOGRID - 1);
+ m_aButtonList.setSelected(FormWizard.AS_GRID - 1);
m_aButtonList.addItemListener(this);
}
@@ -450,13 +441,13 @@ public class UIControlArranger
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));
+ bEnableAlignControlGroup = ((nSelected0 == FormWizard.COLUMNAR_LEFT) ||
+ (nSelected1 == FormWizard.COLUMNAR_LEFT));
}
else
{
final int nSelected0 = (m_aArrangeList[0].m_aButtonList.getSelected() + 1);
- bEnableAlignControlGroup = (nSelected0 == FormWizard.SOCOLUMNARLEFT);
+ bEnableAlignControlGroup = (nSelected0 == FormWizard.COLUMNAR_LEFT);
}
enableAlignControlGroup(bEnableAlignControlGroup);
final Short nBorderType = CurUnoDialog.getBorderType();
diff --git a/wizards/com/sun/star/wizards/letter/CGLetter.java b/wizards/com/sun/star/wizards/letter/CGLetter.java
index 986d43bac5bb..28b72b38d7e8 100644
--- a/wizards/com/sun/star/wizards/letter/CGLetter.java
+++ b/wizards/com/sun/star/wizards/letter/CGLetter.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/letter/CGLetterWizard.java b/wizards/com/sun/star/wizards/letter/CGLetterWizard.java
index 0a6cfd90ab42..9cb9a25bdc0b 100644
--- a/wizards/com/sun/star/wizards/letter/CGLetterWizard.java
+++ b/wizards/com/sun/star/wizards/letter/CGLetterWizard.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.java b/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.java
index 7c8b28bc93ed..be7ab49346bb 100644
--- a/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.java
+++ b/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/letter/CallWizard.java b/wizards/com/sun/star/wizards/letter/CallWizard.java
index ff993c61e506..b006c9ebcc86 100644
--- a/wizards/com/sun/star/wizards/letter/CallWizard.java
+++ b/wizards/com/sun/star/wizards/letter/CallWizard.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,6 +38,7 @@ import com.sun.star.registry.XRegistryKey;
import com.sun.star.task.XJob;
import com.sun.star.task.XJobExecutor;
import com.sun.star.uno.Type;
+import com.sun.star.wizards.common.PropertyNames;
/**
* This class capsulates the class, that implements the minimal component, a factory for
@@ -52,7 +53,7 @@ public class CallWizard
/**
* Gives a factory for creating the service. This method is called by the
* <code>JavaLoader</code>
- *
+ *
* <p></p>
*
* @param stringImplementationName The implementation name of the component.
@@ -105,7 +106,7 @@ public class CallWizard
*/
public void trigger(String str)
{
- if (str.equalsIgnoreCase("start"))
+ if (str.equalsIgnoreCase(PropertyNames.START))
{
LetterWizardDialogImpl lw = new LetterWizardDialogImpl(xmultiservicefactory);
if (!LetterWizardDialogImpl.running)
@@ -189,7 +190,7 @@ public class CallWizard
try
{
- byteReturn = ("" + this.hashCode()).getBytes();
+ byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes();
}
catch (Exception exception)
{
diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.java b/wizards/com/sun/star/wizards/letter/LetterDocument.java
index b7b260e69e85..12da2ed0062a 100644
--- a/wizards/com/sun/star/wizards/letter/LetterDocument.java
+++ b/wizards/com/sun/star/wizards/letter/LetterDocument.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -61,9 +61,8 @@ public class LetterDocument extends TextDocument
public XWindowPeer getWindowPeer()
{
- XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xTextDocument);
- return xWindowPeer;
- }
+ return UnoRuntime.queryInterface(XWindowPeer.class, xTextDocument);
+}
public void switchElement(String sElement, boolean bState)
{
@@ -71,7 +70,7 @@ public class LetterDocument extends TextDocument
{
TextSectionHandler mySectionHandler = new TextSectionHandler(xMSF, xTextDocument);
Object oSection = mySectionHandler.xTextSectionsSupplier.getTextSections().getByName(sElement);
- Helper.setUnoPropertyValue(oSection, "IsVisible", new Boolean(bState));
+ Helper.setUnoPropertyValue(oSection, "IsVisible", Boolean.valueOf(bState));
}
catch (Exception exception)
@@ -93,20 +92,20 @@ public class LetterDocument extends TextDocument
try
{
xTextDocument.lockControllers();
- XStyleFamiliesSupplier xStyleFamiliesSupplier = (XStyleFamiliesSupplier) com.sun.star.uno.UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
+ XStyleFamiliesSupplier xStyleFamiliesSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
com.sun.star.container.XNameAccess xNameAccess = null;
xNameAccess = xStyleFamiliesSupplier.getStyleFamilies();
com.sun.star.container.XNameContainer xPageStyleCollection = null;
- xPageStyleCollection = (com.sun.star.container.XNameContainer) UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles"));
+ xPageStyleCollection = UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles"));
XText xFooterText;
- XStyle xPageStyle = (XStyle) UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName(sPageStyle));
+ XStyle xPageStyle = UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName(sPageStyle));
if (bState)
{
- Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", new Boolean(true));
- xFooterText = (XText) UnoRuntime.queryInterface(XText.class, Helper.getUnoPropertyValue(xPageStyle, "FooterText"));
+ Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", Boolean.TRUE);
+ xFooterText = UnoRuntime.queryInterface(XText.class, Helper.getUnoPropertyValue(xPageStyle, "FooterText"));
xFooterText.setString(sText);
if (bPageNumber)
{
@@ -114,10 +113,10 @@ public class LetterDocument extends TextDocument
XTextCursor myCursor = xFooterText.createTextCursor();
myCursor.gotoEnd(false);
xFooterText.insertControlCharacter(myCursor, ControlCharacter.PARAGRAPH_BREAK, false);
- XPropertySet xCursorPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, myCursor);
+ XPropertySet xCursorPSet = UnoRuntime.queryInterface(XPropertySet.class, myCursor);
xCursorPSet.setPropertyValue("ParaAdjust", ParagraphAdjust.CENTER);
- XTextField xPageNumberField = (XTextField) UnoRuntime.queryInterface(XTextField.class, xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber"));
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xPageNumberField);
+ XTextField xPageNumberField = UnoRuntime.queryInterface(XTextField.class, xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber"));
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xPageNumberField);
xPSet.setPropertyValue("SubType", PageNumberType.CURRENT);
xPSet.setPropertyValue("NumberingType", new Short(NumberingType.ARABIC));
xFooterText.insertTextContent(xFooterText.getEnd(), xPageNumberField, false);
@@ -125,7 +124,7 @@ public class LetterDocument extends TextDocument
}
else
{
- Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", new Boolean(false));
+ Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", Boolean.FALSE);
}
xTextDocument.unlockControllers();
}
@@ -158,7 +157,7 @@ public class LetterDocument extends TextDocument
}
else
{
- myFieldHandler.changeUserFieldContent(sFieldName, "");
+ myFieldHandler.changeUserFieldContent(sFieldName, PropertyNames.EMPTY_STRING);
}
}
@@ -183,7 +182,7 @@ public class LetterDocument extends TextDocument
public void killEmptyUserFields()
{
TextFieldHandler myFieldHandler = new TextFieldHandler(xMSF, xTextDocument);
- myFieldHandler.removeUserFieldByContent("");
+ myFieldHandler.removeUserFieldByContent(PropertyNames.EMPTY_STRING);
}
public void killEmptyFrames()
@@ -259,8 +258,8 @@ public class LetterDocument extends TextDocument
try
{
- xFrame = (XTextFrame) UnoRuntime.queryInterface(XTextFrame.class, xMSFDoc.createInstance("com.sun.star.text.TextFrame"));
- xShape = (XShape) UnoRuntime.queryInterface(XShape.class, xFrame);
+ xFrame = UnoRuntime.queryInterface(XTextFrame.class, xMSFDoc.createInstance("com.sun.star.text.TextFrame"));
+ xShape = UnoRuntime.queryInterface(XShape.class, xFrame);
setFramePosition();
Helper.setUnoPropertyValue(xShape, "AnchorType", TextContentAnchorType.AT_PAGE);
@@ -268,7 +267,7 @@ public class LetterDocument extends TextDocument
Helper.setUnoPropertyValue(xFrame, "TextWrap", WrapTextMode.THROUGHT);
Helper.setUnoPropertyValue(xFrame, "Opaque", Boolean.TRUE);
- Helper.setUnoPropertyValue(xFrame, "BackColor", new Integer(15790320));
+ Helper.setUnoPropertyValue(xFrame, "BackColor", 15790320);
BorderLine myBorder = new BorderLine();
myBorder.OuterLineWidth = 0;
@@ -276,7 +275,7 @@ public class LetterDocument extends TextDocument
Helper.setUnoPropertyValue(xFrame, "RightBorder", myBorder);
Helper.setUnoPropertyValue(xFrame, "TopBorder", myBorder);
Helper.setUnoPropertyValue(xFrame, "BottomBorder", myBorder);
- Helper.setUnoPropertyValue(xFrame, "Print", new Boolean(false));
+ Helper.setUnoPropertyValue(xFrame, "Print", Boolean.FALSE);
XTextCursor xTextCursor = xTextDocument.getText().createTextCursor();
xTextCursor.gotoEnd(true);
@@ -285,10 +284,10 @@ public class LetterDocument extends TextDocument
XText xFrameText = xFrame.getText();
XTextCursor xFrameCursor = xFrameText.createTextCursor();
- XPropertySet xCursorProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xFrameCursor);
+ XPropertySet xCursorProps = UnoRuntime.queryInterface(XPropertySet.class, xFrameCursor);
xCursorProps.setPropertyValue("CharWeight", new Float(com.sun.star.awt.FontWeight.BOLD));
- xCursorProps.setPropertyValue("CharColor", new Integer(16777215));
- xCursorProps.setPropertyValue("CharFontName", new String("Albany"));
+ xCursorProps.setPropertyValue("CharColor", 16777215);
+ xCursorProps.setPropertyValue("CharFontName", "Albany");
xCursorProps.setPropertyValue("CharHeight", new Float(18));
xFrameText.insertString(xFrameCursor, FrameText, false);
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java
index 619227d9f3ba..b1047046e152 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -143,11 +143,11 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
Helper.setUnoPropertyValues(xDialogModel,
new String[]
{
- "Closeable", PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_CLOSEABLE, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_MOVEABLE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- Boolean.TRUE, new Integer(210), Boolean.TRUE, "LetterWizardDialog", new Integer(104), new Integer(52), INTEGERS[1], new Short((short) 1), resources.resLetterWizardDialog_title, new Integer(310)
+ Boolean.TRUE, 210, Boolean.TRUE, "LetterWizardDialog", 104, 52, INTEGERS[1], new Short((short) 1), resources.resLetterWizardDialog_title, 310
});
@@ -169,7 +169,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 1), resources.resoptBusinessLetter_value, "optBusinessLetter", new Integer(97), new Integer(28), INTEGERS[1], new Short((short) 1), new Integer(184)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 1), resources.resoptBusinessLetter_value, "optBusinessLetter", 97, 28, INTEGERS[1], new Short((short) 1), 184
});
optPrivOfficialLetter = insertRadioButton("optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED,
new String[]
@@ -178,7 +178,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 2), resources.resoptPrivOfficialLetter_value, "optPrivOfficialLetter", new Integer(97), new Integer(74), INTEGERS[1], new Short((short) 2), new Integer(184)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 2), resources.resoptPrivOfficialLetter_value, "optPrivOfficialLetter", 97, 74, INTEGERS[1], new Short((short) 2), 184
});
optPrivateLetter = insertRadioButton("optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED,
new String[]
@@ -187,7 +187,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 3), resources.resoptPrivateLetter_value, "optPrivateLetter", new Integer(97), new Integer(106), INTEGERS[1], new Short((short) 3), new Integer(184)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 3), resources.resoptPrivateLetter_value, "optPrivateLetter", 97, 106, INTEGERS[1], new Short((short) 3), 184
});
lstBusinessStyle = insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED,
new String[]
@@ -196,7 +196,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 4), "lstBusinessStyle", new Integer(180), INTEGER_40, INTEGERS[1], new Short((short) 4), new Integer(74)
+ Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 4), "lstBusinessStyle", 180, INTEGER_40, INTEGERS[1], new Short((short) 4), 74
});
chkBusinessPaper = insertCheckBox("chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED,
new String[]
@@ -205,7 +205,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 5), resources.reschkBusinessPaper_value, "chkBusinessPaper", new Integer(110), new Integer(56), new Short((short) 0), INTEGERS[1], new Short((short) 5), new Integer(168)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 5), resources.reschkBusinessPaper_value, "chkBusinessPaper", 110, 56, new Short((short) 0), INTEGERS[1], new Short((short) 5), 168
});
lstPrivOfficialStyle = insertListBox("lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, LSTPRIVOFFICIALSTYLE_ITEM_CHANGED,
new String[]
@@ -214,7 +214,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 6), "lstPrivOfficialStyle", new Integer(180), new Integer(86), INTEGERS[1], new Short((short) 6), new Integer(74)
+ Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 6), "lstPrivOfficialStyle", 180, 86, INTEGERS[1], new Short((short) 6), 74
});
lstPrivateStyle = insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED,
new String[]
@@ -223,7 +223,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 7), "lstPrivateStyle", new Integer(180), new Integer(118), INTEGERS[1], new Short((short) 7), new Integer(74)
+ Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 7), "lstPrivateStyle", 180, 118, INTEGERS[1], new Short((short) 7), 74
});
lblBusinessStyle = insertLabel("lblBusinessStyle",
new String[]
@@ -232,7 +232,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblBusinessStyle_value, "lblBusinessStyle", new Integer(110), new Integer(42), INTEGERS[1], new Short((short) 48), new Integer(60)
+ INTEGERS[8], resources.reslblBusinessStyle_value, "lblBusinessStyle", 110, 42, INTEGERS[1], new Short((short) 48), 60
});
lblPrivOfficialStyle = insertLabel("lblPrivOfficialStyle",
new String[]
@@ -241,16 +241,16 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblPrivOfficialStyle_value, "lblPrivOfficialStyle", new Integer(110), new Integer(88), INTEGERS[1], new Short((short) 49), new Integer(60)
+ INTEGERS[8], resources.reslblPrivOfficialStyle_value, "lblPrivOfficialStyle", 110, 88, INTEGERS[1], new Short((short) 49), 60
});
lblTitle1 = insertLabel("lblTitle1",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- fontDescriptor6, INTEGER_16, resources.reslblTitle1_value, Boolean.TRUE, "lblTitle1", new Integer(91), INTEGERS[8], INTEGERS[1], new Short((short) 55), new Integer(212)
+ fontDescriptor6, INTEGER_16, resources.reslblTitle1_value, Boolean.TRUE, "lblTitle1", 91, INTEGERS[8], INTEGERS[1], new Short((short) 55), 212
});
lblPrivateStyle = insertLabel("lblPrivateStyle",
new String[]
@@ -259,7 +259,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblPrivateStyle_value, "lblPrivateStyle", new Integer(110), new Integer(120), INTEGERS[1], new Short((short) 74), new Integer(60)
+ INTEGERS[8], resources.reslblPrivateStyle_value, "lblPrivateStyle", 110, 120, INTEGERS[1], new Short((short) 74), 60
});
lblIntroduction = insertLabel("lblIntroduction",
new String[]
@@ -268,13 +268,13 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- new Integer(39), resources.reslblIntroduction_value, Boolean.TRUE, "lblIntroduction", new Integer(104), new Integer(145), INTEGERS[1], new Short((short) 80), new Integer(199)
+ 39, resources.reslblIntroduction_value, Boolean.TRUE, "lblIntroduction", 104, 145, INTEGERS[1], new Short((short) 80), 199
});
ImageControl3 = insertInfoImage(92, 145, 1);
-// ImageControl3 = insertImage("ImageControl3",
-// new String[] {"Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH},
-// new Object[] { new Short((short)0), INTEGERS[10],"private:resource/dbu/image/19205","ImageControl3",new Integer(92),new Integer(145),Boolean.FALSE,INTEGERS[1],new Short((short)81),INTEGERS[10]}
+// ImageControl3 = insertImage("ImageControl3",
+// new String[] {PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH},
+// new Object[] { new Short((short)0), INTEGERS[10],"private:resource/dbu/image/19205","ImageControl3",92,145,Boolean.FALSE,INTEGERS[1],new Short((short)81),INTEGERS[10]}
// );
}
@@ -287,7 +287,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 8), resources.reschkPaperCompanyLogo_value, "chkPaperCompanyLogo", new Integer(97), new Integer(28), new Short((short) 0), INTEGERS[2], new Short((short) 8), new Integer(68)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 8), resources.reschkPaperCompanyLogo_value, "chkPaperCompanyLogo", 97, 28, new Short((short) 0), INTEGERS[2], new Short((short) 8), 68
});
numLogoHeight = insertNumericField("numLogoHeight", NUMLOGOHEIGHT_TEXT_CHANGED,
new String[]
@@ -296,7 +296,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID + 9), "numLogoHeight", new Integer(138), INTEGER_40, Boolean.TRUE, INTEGERS[2], Boolean.TRUE, new Short((short) 9), INTEGERS[3], new Integer(30)
+ INTEGER_12, HelpIds.getHelpIdString(HID + 9), "numLogoHeight", 138, INTEGER_40, Boolean.TRUE, INTEGERS[2], Boolean.TRUE, new Short((short) 9), INTEGERS[3], 30
});
numLogoX = insertNumericField("numLogoX", NUMLOGOX_TEXT_CHANGED,
new String[]
@@ -305,7 +305,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID + 10), "numLogoX", new Integer(266), INTEGER_40, Boolean.TRUE, INTEGERS[2], new Short((short) 10), INTEGERS[0], new Integer(30)
+ INTEGER_12, HelpIds.getHelpIdString(HID + 10), "numLogoX", 266, INTEGER_40, Boolean.TRUE, INTEGERS[2], new Short((short) 10), INTEGERS[0], 30
});
numLogoWidth = insertNumericField("numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED,
new String[]
@@ -314,7 +314,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID + 11), "numLogoWidth", new Integer(138), new Integer(56), Boolean.TRUE, INTEGERS[2], new Short((short) 11), new Double(3.8), new Integer(30)
+ INTEGER_12, HelpIds.getHelpIdString(HID + 11), "numLogoWidth", 138, 56, Boolean.TRUE, INTEGERS[2], new Short((short) 11), new Double(3.8), 30
});
numLogoY = insertNumericField("numLogoY", NUMLOGOY_TEXT_CHANGED,
new String[]
@@ -323,7 +323,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID + 12), "numLogoY", new Integer(266), new Integer(56), Boolean.TRUE, INTEGERS[2], new Short((short) 12), new Double(-3.4), new Integer(30)
+ INTEGER_12, HelpIds.getHelpIdString(HID + 12), "numLogoY", 266, 56, Boolean.TRUE, INTEGERS[2], new Short((short) 12), new Double(-3.4), 30
});
chkPaperCompanyAddress = insertCheckBox("chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED,
new String[]
@@ -332,7 +332,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 13), resources.reschkPaperCompanyAddress_value, "chkPaperCompanyAddress", new Integer(98), new Integer(84), new Short((short) 0), INTEGERS[2], new Short((short) 13), new Integer(68)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 13), resources.reschkPaperCompanyAddress_value, "chkPaperCompanyAddress", 98, 84, new Short((short) 0), INTEGERS[2], new Short((short) 13), 68
});
numAddressHeight = insertNumericField("numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED,
new String[]
@@ -341,7 +341,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID + 14), "numAddressHeight", new Integer(138), new Integer(96), Boolean.TRUE, INTEGERS[2], Boolean.TRUE, new Short((short) 14), INTEGERS[3], new Integer(30)
+ INTEGER_12, HelpIds.getHelpIdString(HID + 14), "numAddressHeight", 138, 96, Boolean.TRUE, INTEGERS[2], Boolean.TRUE, new Short((short) 14), INTEGERS[3], 30
});
numAddressX = insertNumericField("numAddressX", NUMADDRESSX_TEXT_CHANGED,
new String[]
@@ -350,7 +350,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID + 15), "numAddressX", new Integer(266), new Integer(96), Boolean.TRUE, INTEGERS[2], new Short((short) 15), new Double(3.8), new Integer(30)
+ INTEGER_12, HelpIds.getHelpIdString(HID + 15), "numAddressX", 266, 96, Boolean.TRUE, INTEGERS[2], new Short((short) 15), new Double(3.8), 30
});
numAddressWidth = insertNumericField("numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED,
new String[]
@@ -359,7 +359,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID + 16), "numAddressWidth", new Integer(138), new Integer(112), Boolean.TRUE, INTEGERS[2], new Short((short) 16), new Double(13.8), new Integer(30)
+ INTEGER_12, HelpIds.getHelpIdString(HID + 16), "numAddressWidth", 138, 112, Boolean.TRUE, INTEGERS[2], new Short((short) 16), new Double(13.8), 30
});
numAddressY = insertNumericField("numAddressY", NUMADDRESSY_TEXT_CHANGED,
new String[]
@@ -368,7 +368,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID + 17), "numAddressY", new Integer(266), new Integer(112), Boolean.TRUE, INTEGERS[2], new Short((short) 17), new Double(-3.4), new Integer(30)
+ INTEGER_12, HelpIds.getHelpIdString(HID + 17), "numAddressY", 266, 112, Boolean.TRUE, INTEGERS[2], new Short((short) 17), new Double(-3.4), 30
});
chkCompanyReceiver = insertCheckBox("chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED,
new String[]
@@ -377,7 +377,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 18), resources.reschkCompanyReceiver_value, "chkCompanyReceiver", new Integer(103), new Integer(131), new Short((short) 0), INTEGERS[2], new Short((short) 18), new Integer(185)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 18), resources.reschkCompanyReceiver_value, "chkCompanyReceiver", 103, 131, new Short((short) 0), INTEGERS[2], new Short((short) 18), 185
});
chkPaperFooter = insertCheckBox("chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED,
new String[]
@@ -386,7 +386,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 19), resources.reschkPaperFooter_value, "chkPaperFooter", new Integer(97), new Integer(158), new Short((short) 0), INTEGERS[2], new Short((short) 19), new Integer(68)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 19), resources.reschkPaperFooter_value, "chkPaperFooter", 97, 158, new Short((short) 0), INTEGERS[2], new Short((short) 19), 68
});
numFooterHeight = insertNumericField("numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED,
new String[]
@@ -395,7 +395,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID + 20), "numFooterHeight", new Integer(236), new Integer(156), Boolean.TRUE, INTEGERS[2], new Short((short) 20), INTEGERS[5], new Integer(30)
+ INTEGER_12, HelpIds.getHelpIdString(HID + 20), "numFooterHeight", 236, 156, Boolean.TRUE, INTEGERS[2], new Short((short) 20), INTEGERS[5], 30
});
lblLogoHeight = insertLabel("lblLogoHeight",
new String[]
@@ -404,7 +404,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblLogoHeight_value, "lblLogoHeight", new Integer(103), new Integer(42), INTEGERS[2], new Short((short) 68), new Integer(32)
+ INTEGERS[8], resources.reslblLogoHeight_value, "lblLogoHeight", 103, 42, INTEGERS[2], new Short((short) 68), 32
});
lblLogoWidth = insertLabel("lblLogoWidth",
new String[]
@@ -413,7 +413,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblLogoWidth_value, "lblLogoWidth", new Integer(103), new Integer(58), INTEGERS[2], new Short((short) 69), new Integer(32)
+ INTEGERS[8], resources.reslblLogoWidth_value, "lblLogoWidth", 103, 58, INTEGERS[2], new Short((short) 69), 32
});
FixedLine5 = insertFixedLine("FixedLine5",
new String[]
@@ -422,7 +422,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[2], "FixedLine5", new Integer(90), new Integer(78), INTEGERS[2], new Short((short) 70), new Integer(215)
+ INTEGERS[2], "FixedLine5", 90, 78, INTEGERS[2], new Short((short) 70), 215
});
FixedLine6 = insertFixedLine("FixedLine6",
new String[]
@@ -431,7 +431,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[2], "FixedLine6", new Integer(90), new Integer(150), INTEGERS[2], new Short((short) 71), new Integer(215)
+ INTEGERS[2], "FixedLine6", 90, 150, INTEGERS[2], new Short((short) 71), 215
});
lblFooterHeight = insertLabel("lblFooterHeight",
new String[]
@@ -440,7 +440,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblFooterHeight_value, "lblFooterHeight", new Integer(200), new Integer(158), INTEGERS[2], new Short((short) 72), new Integer(32)
+ INTEGERS[8], resources.reslblFooterHeight_value, "lblFooterHeight", 200, 158, INTEGERS[2], new Short((short) 72), 32
});
lblLogoX = insertLabel("lblLogoX",
new String[]
@@ -449,7 +449,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblLogoX_value, "lblLogoX", new Integer(170), new Integer(42), INTEGERS[2], new Short((short) 84), new Integer(94)
+ INTEGERS[8], resources.reslblLogoX_value, "lblLogoX", 170, 42, INTEGERS[2], new Short((short) 84), 94
});
lblLogoY = insertLabel("lblLogoY",
new String[]
@@ -458,7 +458,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblLogoY_value, "lblLogoY", new Integer(170), new Integer(58), INTEGERS[2], new Short((short) 85), new Integer(94)
+ INTEGERS[8], resources.reslblLogoY_value, "lblLogoY", 170, 58, INTEGERS[2], new Short((short) 85), 94
});
lblAddressHeight = insertLabel("lblAddressHeight",
new String[]
@@ -467,7 +467,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblAddressHeight_value, "lblAddressHeight", new Integer(103), new Integer(98), INTEGERS[2], new Short((short) 86), new Integer(32)
+ INTEGERS[8], resources.reslblAddressHeight_value, "lblAddressHeight", 103, 98, INTEGERS[2], new Short((short) 86), 32
});
lblAddressWidth = insertLabel("lblAddressWidth",
new String[]
@@ -476,7 +476,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblAddressWidth_value, "lblAddressWidth", new Integer(103), new Integer(114), INTEGERS[2], new Short((short) 87), new Integer(32)
+ INTEGERS[8], resources.reslblAddressWidth_value, "lblAddressWidth", 103, 114, INTEGERS[2], new Short((short) 87), 32
});
lblAddressX = insertLabel("lblAddressX",
new String[]
@@ -485,7 +485,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblAddressX_value, "lblAddressX", new Integer(170), new Integer(98), INTEGERS[2], new Short((short) 88), new Integer(94)
+ INTEGERS[8], resources.reslblAddressX_value, "lblAddressX", 170, 98, INTEGERS[2], new Short((short) 88), 94
});
lblAddressY = insertLabel("lblAddressY",
new String[]
@@ -494,16 +494,16 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblAddressY_value, "lblAddressY", new Integer(170), new Integer(114), INTEGERS[2], new Short((short) 89), new Integer(94)
+ INTEGERS[8], resources.reslblAddressY_value, "lblAddressY", 170, 114, INTEGERS[2], new Short((short) 89), 94
});
lblTitle2 = insertLabel("lblTitle2",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- fontDescriptor6, INTEGER_16, resources.reslblTitle2_value, Boolean.TRUE, "lblTitle2", new Integer(91), INTEGERS[8], INTEGERS[2], new Short((short) 91), new Integer(212)
+ fontDescriptor6, INTEGER_16, resources.reslblTitle2_value, Boolean.TRUE, "lblTitle2", 91, INTEGERS[8], INTEGERS[2], new Short((short) 91), 212
});
}
@@ -516,7 +516,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 21), "lstLetterNorm", new Integer(210), new Integer(34), INTEGERS[3], new Short((short) 21), new Integer(74)
+ Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 21), "lstLetterNorm", 210, 34, INTEGERS[3], new Short((short) 21), 74
});
chkUseLogo = insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED,
new String[]
@@ -525,7 +525,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 22), resources.reschkUseLogo_value, "chkUseLogo", new Integer(97), new Integer(54), new Short((short) 0), INTEGERS[3], new Short((short) 22), new Integer(212)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 22), resources.reschkUseLogo_value, "chkUseLogo", 97, 54, new Short((short) 0), INTEGERS[3], new Short((short) 22), 212
});
chkUseAddressReceiver = insertCheckBox("chkUseAddressReceiver", CHKUSEADDRESSRECEIVER_ITEM_CHANGED,
new String[]
@@ -534,7 +534,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 23), resources.reschkUseAddressReceiver_value, "chkUseAddressReceiver", new Integer(97), new Integer(69), new Short((short) 0), INTEGERS[3], new Short((short) 23), new Integer(212)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 23), resources.reschkUseAddressReceiver_value, "chkUseAddressReceiver", 97, 69, new Short((short) 0), INTEGERS[3], new Short((short) 23), 212
});
chkUseSigns = insertCheckBox("chkUseSigns", CHKUSESIGNS_ITEM_CHANGED,
new String[]
@@ -543,7 +543,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 24), resources.reschkUseSigns_value, "chkUseSigns", new Integer(97), new Integer(82), new Short((short) 0), INTEGERS[3], new Short((short) 24), new Integer(212)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 24), resources.reschkUseSigns_value, "chkUseSigns", 97, 82, new Short((short) 0), INTEGERS[3], new Short((short) 24), 212
});
chkUseSubject = insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED,
new String[]
@@ -552,7 +552,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 25), resources.reschkUseSubject_value, "chkUseSubject", new Integer(97), new Integer(98), new Short((short) 0), INTEGERS[3], new Short((short) 25), new Integer(212)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 25), resources.reschkUseSubject_value, "chkUseSubject", 97, 98, new Short((short) 0), INTEGERS[3], new Short((short) 25), 212
});
chkUseSalutation = insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED,
new String[]
@@ -561,7 +561,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 26), resources.reschkUseSalutation_value, "chkUseSalutation", new Integer(97), new Integer(113), new Short((short) 0), INTEGERS[3], new Short((short) 26), new Integer(66)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 26), resources.reschkUseSalutation_value, "chkUseSalutation", 97, 113, new Short((short) 0), INTEGERS[3], new Short((short) 26), 66
});
lstSalutation = insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED,
new String[]
@@ -570,7 +570,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 27), "lstSalutation", new Integer(210), new Integer(110), INTEGERS[3], new Short((short) 27), new Integer(74)
+ Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 27), "lstSalutation", 210, 110, INTEGERS[3], new Short((short) 27), 74
});
chkUseBendMarks = insertCheckBox("chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED,
new String[]
@@ -579,7 +579,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 28), resources.reschkUseBendMarks_value, "chkUseBendMarks", new Integer(97), new Integer(127), new Short((short) 0), INTEGERS[3], new Short((short) 28), new Integer(212)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 28), resources.reschkUseBendMarks_value, "chkUseBendMarks", 97, 127, new Short((short) 0), INTEGERS[3], new Short((short) 28), 212
});
chkUseGreeting = insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED,
new String[]
@@ -588,7 +588,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 29), resources.reschkUseGreeting_value, "chkUseGreeting", new Integer(97), new Integer(142), new Short((short) 0), INTEGERS[3], new Short((short) 29), new Integer(66)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 29), resources.reschkUseGreeting_value, "chkUseGreeting", 97, 142, new Short((short) 0), INTEGERS[3], new Short((short) 29), 66
});
lstGreeting = insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED,
new String[]
@@ -597,7 +597,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 30), "lstGreeting", new Integer(210), new Integer(141), INTEGERS[3], new Short((short) 30), new Integer(74)
+ Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 30), "lstGreeting", 210, 141, INTEGERS[3], new Short((short) 30), 74
});
chkUseFooter = insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED,
new String[]
@@ -606,7 +606,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 31), resources.reschkUseFooter_value, "chkUseFooter", new Integer(97), new Integer(158), new Short((short) 0), INTEGERS[3], new Short((short) 31), new Integer(212)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 31), resources.reschkUseFooter_value, "chkUseFooter", 97, 158, new Short((short) 0), INTEGERS[3], new Short((short) 31), 212
});
lblLetterNorm = insertLabel("lblLetterNorm",
new String[]
@@ -615,16 +615,16 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_16, resources.reslblLetterNorm_value, Boolean.TRUE, "lblLetterNorm", new Integer(97), new Integer(28), INTEGERS[3], new Short((short) 50), new Integer(109)
+ INTEGER_16, resources.reslblLetterNorm_value, Boolean.TRUE, "lblLetterNorm", 97, 28, INTEGERS[3], new Short((short) 50), 109
});
lblTitle3 = insertLabel("lblTitle3",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- fontDescriptor6, INTEGER_16, resources.reslblTitle3_value, Boolean.TRUE, "lblTitle3", new Integer(91), INTEGERS[8], INTEGERS[3], new Short((short) 90), new Integer(212)
+ fontDescriptor6, INTEGER_16, resources.reslblTitle3_value, Boolean.TRUE, "lblTitle3", 91, INTEGERS[8], INTEGERS[3], new Short((short) 90), 212
});
}
@@ -637,7 +637,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 32), resources.resoptSenderPlaceholder_value, "optSenderPlaceholder", new Integer(104), new Integer(42), INTEGERS[4], new Short((short) 32), new Integer(149)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 32), resources.resoptSenderPlaceholder_value, "optSenderPlaceholder", 104, 42, INTEGERS[4], new Short((short) 32), 149
});
optSenderDefine = insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED,
new String[]
@@ -646,7 +646,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 33), resources.resoptSenderDefine_value, "optSenderDefine", new Integer(104), new Integer(54), INTEGERS[4], new Short((short) 33), new Integer(149)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 33), resources.resoptSenderDefine_value, "optSenderDefine", 104, 54, INTEGERS[4], new Short((short) 33), 149
});
txtSenderName = insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED,
new String[]
@@ -655,7 +655,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID + 34), "txtSenderName", new Integer(182), new Integer(67), INTEGERS[4], new Short((short) 34), new Integer(119)
+ INTEGER_12, HelpIds.getHelpIdString(HID + 34), "txtSenderName", 182, 67, INTEGERS[4], new Short((short) 34), 119
});
txtSenderStreet = insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED,
new String[]
@@ -664,7 +664,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID + 35), "txtSenderStreet", new Integer(182), new Integer(81), INTEGERS[4], new Short((short) 35), new Integer(119)
+ INTEGER_12, HelpIds.getHelpIdString(HID + 35), "txtSenderStreet", 182, 81, INTEGERS[4], new Short((short) 35), 119
});
txtSenderPostCode = insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED,
new String[]
@@ -673,7 +673,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID + 36), "txtSenderPostCode", new Integer(182), new Integer(95), INTEGERS[4], new Short((short) 36), new Integer(25)
+ INTEGER_12, HelpIds.getHelpIdString(HID + 36), "txtSenderPostCode", 182, 95, INTEGERS[4], new Short((short) 36), 25
});
txtSenderState = insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED,
new String[]
@@ -682,7 +682,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID + 37), "txtSenderState", new Integer(211), new Integer(95), INTEGERS[4], new Short((short) 37), new Integer(21)
+ INTEGER_12, HelpIds.getHelpIdString(HID + 37), "txtSenderState", 211, 95, INTEGERS[4], new Short((short) 37), 21
});
txtSenderCity = insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED,
new String[]
@@ -691,7 +691,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID + 38), "txtSenderCity", new Integer(236), new Integer(95), INTEGERS[4], new Short((short) 38), new Integer(65)
+ INTEGER_12, HelpIds.getHelpIdString(HID + 38), "txtSenderCity", 236, 95, INTEGERS[4], new Short((short) 38), 65
});
optReceiverPlaceholder = insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED,
new String[]
@@ -700,7 +700,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 39), resources.resoptReceiverPlaceholder_value, "optReceiverPlaceholder", new Integer(104), new Integer(145), INTEGERS[4], new Short((short) 39), new Integer(200)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 39), resources.resoptReceiverPlaceholder_value, "optReceiverPlaceholder", 104, 145, INTEGERS[4], new Short((short) 39), 200
});
optReceiverDatabase = insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED,
new String[]
@@ -709,7 +709,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 40), resources.resoptReceiverDatabase_value, "optReceiverDatabase", new Integer(104), new Integer(157), INTEGERS[4], new Short((short) 40), new Integer(200)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 40), resources.resoptReceiverDatabase_value, "optReceiverDatabase", 104, 157, INTEGERS[4], new Short((short) 40), 200
});
lblSenderAddress = insertLabel("lblSenderAddress",
new String[]
@@ -718,7 +718,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblSenderAddress_value, "lblSenderAddress", new Integer(97), new Integer(28), INTEGERS[4], new Short((short) 64), new Integer(136)
+ INTEGERS[8], resources.reslblSenderAddress_value, "lblSenderAddress", 97, 28, INTEGERS[4], new Short((short) 64), 136
});
FixedLine2 = insertFixedLine("FixedLine2",
new String[]
@@ -727,7 +727,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[5], "FixedLine2", new Integer(90), new Integer(126), INTEGERS[4], new Short((short) 75), new Integer(212)
+ INTEGERS[5], "FixedLine2", 90, 126, INTEGERS[4], new Short((short) 75), 212
});
lblReceiverAddress = insertLabel("lblReceiverAddress",
new String[]
@@ -736,7 +736,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblReceiverAddress_value, "lblReceiverAddress", new Integer(97), new Integer(134), INTEGERS[4], new Short((short) 76), new Integer(136)
+ INTEGERS[8], resources.reslblReceiverAddress_value, "lblReceiverAddress", 97, 134, INTEGERS[4], new Short((short) 76), 136
});
lblSenderName = insertLabel("lblSenderName",
new String[]
@@ -745,7 +745,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblSenderName_value, "lblSenderName", new Integer(113), new Integer(69), INTEGERS[4], new Short((short) 77), new Integer(68)
+ INTEGERS[8], resources.reslblSenderName_value, "lblSenderName", 113, 69, INTEGERS[4], new Short((short) 77), 68
});
lblSenderStreet = insertLabel("lblSenderStreet",
new String[]
@@ -754,7 +754,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblSenderStreet_value, "lblSenderStreet", new Integer(113), new Integer(82), INTEGERS[4], new Short((short) 78), new Integer(68)
+ INTEGERS[8], resources.reslblSenderStreet_value, "lblSenderStreet", 113, 82, INTEGERS[4], new Short((short) 78), 68
});
lblPostCodeCity = insertLabel("lblPostCodeCity",
new String[]
@@ -763,16 +763,16 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblPostCodeCity_value, "lblPostCodeCity", new Integer(113), new Integer(97), INTEGERS[4], new Short((short) 79), new Integer(68)
+ INTEGERS[8], resources.reslblPostCodeCity_value, "lblPostCodeCity", 113, 97, INTEGERS[4], new Short((short) 79), 68
});
lblTitle4 = insertLabel("lblTitle4",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- fontDescriptor6, INTEGER_16, resources.reslblTitle4_value, Boolean.TRUE, "lblTitle4", new Integer(91), INTEGERS[8], INTEGERS[4], new Short((short) 92), new Integer(212)
+ fontDescriptor6, INTEGER_16, resources.reslblTitle4_value, Boolean.TRUE, "lblTitle4", 91, INTEGERS[8], INTEGERS[4], new Short((short) 92), 212
});
}
@@ -785,7 +785,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- new Integer(47), HelpIds.getHelpIdString(HID + 41), Boolean.TRUE, "txtFooter", new Integer(97), INTEGER_40, INTEGERS[5], new Short((short) 41), new Integer(203)
+ 47, HelpIds.getHelpIdString(HID + 41), Boolean.TRUE, "txtFooter", 97, INTEGER_40, INTEGERS[5], new Short((short) 41), 203
});
chkFooterNextPages = insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED,
new String[]
@@ -794,7 +794,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 42), resources.reschkFooterNextPages_value, "chkFooterNextPages", new Integer(97), new Integer(92), new Short((short) 0), INTEGERS[5], new Short((short) 42), new Integer(202)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 42), resources.reschkFooterNextPages_value, "chkFooterNextPages", 97, 92, new Short((short) 0), INTEGERS[5], new Short((short) 42), 202
});
chkFooterPageNumbers = insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED,
new String[]
@@ -803,25 +803,25 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 43), resources.reschkFooterPageNumbers_value, "chkFooterPageNumbers", new Integer(97), new Integer(106), new Short((short) 0), INTEGERS[5], new Short((short) 43), new Integer(201)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 43), resources.reschkFooterPageNumbers_value, "chkFooterPageNumbers", 97, 106, new Short((short) 0), INTEGERS[5], new Short((short) 43), 201
});
lblFooter = insertLabel("lblFooter",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- fontDescriptor5, INTEGERS[8], resources.reslblFooter_value, "lblFooter", new Integer(97), new Integer(28), INTEGERS[5], new Short((short) 52), new Integer(116)
+ fontDescriptor5, INTEGERS[8], resources.reslblFooter_value, "lblFooter", 97, 28, INTEGERS[5], new Short((short) 52), 116
});
lblTitle5 = insertLabel("lblTitle5",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- fontDescriptor6, INTEGER_16, resources.reslblTitle5_value, Boolean.TRUE, "lblTitle5", new Integer(91), INTEGERS[8], INTEGERS[5], new Short((short) 93), new Integer(212)
+ fontDescriptor6, INTEGER_16, resources.reslblTitle5_value, Boolean.TRUE, "lblTitle5", 91, INTEGERS[8], INTEGERS[5], new Short((short) 93), 212
});
}
@@ -834,7 +834,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID + 44), "txtTemplateName", new Integer(202), new Integer(56), INTEGERS[6], new Short((short) 44), resources.restxtTemplateName_value, new Integer(100)
+ INTEGER_12, HelpIds.getHelpIdString(HID + 44), "txtTemplateName", 202, 56, INTEGERS[6], new Short((short) 44), resources.restxtTemplateName_value, 100
});
optCreateLetter = insertRadioButton("optCreateLetter", OPTCREATELETTER_ITEM_CHANGED,
new String[]
@@ -843,7 +843,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 45), resources.resoptCreateLetter_value, "optCreateLetter", new Integer(104), new Integer(111), INTEGERS[6], new Short((short) 50), new Integer(198)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 45), resources.resoptCreateLetter_value, "optCreateLetter", 104, 111, INTEGERS[6], new Short((short) 50), 198
});
optMakeChanges = insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED,
new String[]
@@ -852,7 +852,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID + 46), resources.resoptMakeChanges_value, "optMakeChanges", new Integer(104), new Integer(123), INTEGERS[6], new Short((short) 51), new Integer(198)
+ INTEGERS[8], HelpIds.getHelpIdString(HID + 46), resources.resoptMakeChanges_value, "optMakeChanges", 104, 123, INTEGERS[6], new Short((short) 51), 198
});
lblFinalExplanation1 = insertLabel("lblFinalExplanation1",
new String[]
@@ -861,7 +861,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- new Integer(26), resources.reslblFinalExplanation1_value, Boolean.TRUE, "lblFinalExplanation1", new Integer(97), new Integer(28), INTEGERS[6], new Short((short) 52), new Integer(205)
+ 26, resources.reslblFinalExplanation1_value, Boolean.TRUE, "lblFinalExplanation1", 97, 28, INTEGERS[6], new Short((short) 52), 205
});
lblProceed = insertLabel("lblProceed",
new String[]
@@ -870,7 +870,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblProceed_value, "lblProceed", new Integer(97), new Integer(100), INTEGERS[6], new Short((short) 53), new Integer(204)
+ INTEGERS[8], resources.reslblProceed_value, "lblProceed", 97, 100, INTEGERS[6], new Short((short) 53), 204
});
lblFinalExplanation2 = insertLabel("lblFinalExplanation2",
new String[]
@@ -879,16 +879,16 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- new Integer(33), resources.reslblFinalExplanation2_value, Boolean.TRUE, "lblFinalExplanation2", new Integer(104), new Integer(145), INTEGERS[6], new Short((short) 54), new Integer(199)
+ 33, resources.reslblFinalExplanation2_value, Boolean.TRUE, "lblFinalExplanation2", 104, 145, INTEGERS[6], new Short((short) 54), 199
});
ImageControl2 = insertImage("ImageControl2",
new String[]
{
- "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Short((short) 0), INTEGERS[10], "private:resource/dbu/image/19205", "ImageControl2", new Integer(92), new Integer(145), Boolean.FALSE, INTEGERS[6], new Short((short) 66), INTEGERS[10]
+ new Short((short) 0), INTEGERS[10], "private:resource/dbu/image/19205", "ImageControl2", 92, 145, Boolean.FALSE, INTEGERS[6], new Short((short) 66), INTEGERS[10]
});
lblTemplateName = insertLabel("lblTemplateName",
new String[]
@@ -897,16 +897,16 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW
},
new Object[]
{
- INTEGERS[8], resources.reslblTemplateName_value, "lblTemplateName", new Integer(97), new Integer(58), INTEGERS[6], new Short((short) 82), new Integer(101)
+ INTEGERS[8], resources.reslblTemplateName_value, "lblTemplateName", 97, 58, INTEGERS[6], new Short((short) 82), 101
});
lblTitle6 = insertLabel("lblTitle6",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- fontDescriptor6, INTEGER_16, resources.reslblTitle6_value, Boolean.TRUE, "lblTitle6", new Integer(91), INTEGERS[8], INTEGERS[6], new Short((short) 94), new Integer(212)
+ fontDescriptor6, INTEGER_16, resources.reslblTitle6_value, Boolean.TRUE, "lblTitle6", 91, INTEGERS[8], INTEGERS[6], new Short((short) 94), 212
});
}
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.java
index b94ac6f0c0ac..15ddf29c3f88 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogEvents.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogEvents.java
index 0a6407dbde1d..02bebe1cfca3 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogEvents.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogEvents.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
index 482e4a82c07d..736233c7dfd8 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -177,27 +177,27 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
myConfig.cp_PrivateLetter.cp_Norm = oL;
initializeTemplates(xMSF);
- if (myConfig.cp_BusinessLetter.cp_Greeting.equals(""))
+ if (myConfig.cp_BusinessLetter.cp_Greeting.equals(PropertyNames.EMPTY_STRING))
{
myConfig.cp_BusinessLetter.cp_Greeting = resources.GreetingLabels[0];
}
- if (myConfig.cp_BusinessLetter.cp_Salutation.equals(""))
+ if (myConfig.cp_BusinessLetter.cp_Salutation.equals(PropertyNames.EMPTY_STRING))
{
myConfig.cp_BusinessLetter.cp_Salutation = resources.SalutationLabels[0];
}
- if (myConfig.cp_PrivateOfficialLetter.cp_Greeting.equals(""))
+ if (myConfig.cp_PrivateOfficialLetter.cp_Greeting.equals(PropertyNames.EMPTY_STRING))
{
myConfig.cp_PrivateOfficialLetter.cp_Greeting = resources.GreetingLabels[1];
}
- if (myConfig.cp_PrivateOfficialLetter.cp_Salutation.equals(""))
+ if (myConfig.cp_PrivateOfficialLetter.cp_Salutation.equals(PropertyNames.EMPTY_STRING))
{
myConfig.cp_PrivateOfficialLetter.cp_Salutation = resources.SalutationLabels[1];
}
- if (myConfig.cp_PrivateLetter.cp_Greeting.equals(""))
+ if (myConfig.cp_PrivateLetter.cp_Greeting.equals(PropertyNames.EMPTY_STRING))
{
myConfig.cp_PrivateLetter.cp_Greeting = resources.GreetingLabels[2];
}
- if (myConfig.cp_PrivateLetter.cp_Salutation.equals(""))
+ if (myConfig.cp_PrivateLetter.cp_Salutation.equals(PropertyNames.EMPTY_STRING))
{
myConfig.cp_PrivateLetter.cp_Salutation = resources.SalutationLabels[2];
}
@@ -205,13 +205,13 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
//update the dialog UI according to the loaded Configuration
updateUI();
- if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(""))
+ if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING))
{
myPathSelection.initializePath();
}
XWindow xContainerWindow = myLetterDoc.xFrame.getContainerWindow();
- XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow);
+ XWindowPeer xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow);
createWindowPeer(xWindowPeer);
//add the Roadmap to the dialog:
@@ -240,8 +240,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
removeTerminateListener();
exception.printStackTrace(System.out);
running = false;
- return;
- }
+ }
}
public void cancelWizard()
@@ -258,7 +257,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
//myLetterDoc.xTextDocument.lockControllers();
FileAccess fileAccess = new FileAccess(xMSF);
sPath = myPathSelection.getSelectedPath();
- if (sPath.equals(""))
+ if (sPath.equals(PropertyNames.EMPTY_STRING))
{
myPathSelection.triggerPathPicker();
sPath = myPathSelection.getSelectedPath();
@@ -311,7 +310,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
if (bSaveSuccess)
{
saveConfiguration();
- XInteractionHandler xIH = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler"));
+ XInteractionHandler xIH = UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler"));
PropertyValue loadValues[] = new PropertyValue[4];
loadValues[0] = new PropertyValue();
loadValues[0].Name = "AsTemplate";
@@ -335,7 +334,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
}
Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), sPath, "_default", loadValues);
XTextDocument xTextDocument = (com.sun.star.text.XTextDocument) oDoc;
- XMultiServiceFactory xDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
+ XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
ViewHandler myViewHandler = new ViewHandler(xDocMSF, xTextDocument);
myViewHandler.setViewSetting("ZoomType", new Short(com.sun.star.view.DocumentZoomType.OPTIMAL));
}
@@ -360,8 +359,8 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
{
try
{
- //xComponent.dispose();
- XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, myLetterDoc.xFrame);
+ //xComponent.dispose();
+ XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, myLetterDoc.xFrame);
xCloseable.close(false);
}
catch (CloseVetoException e)
@@ -383,7 +382,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
lstBusinessStyleItemChanged();
enableSenderReceiver();
setPossibleFooter(true);
- if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(""))
+ if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING))
{
myPathSelection.initializePath();
}
@@ -403,7 +402,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
disableBusinessPaper();
enableSenderReceiver();
setPossibleFooter(true);
- if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(""))
+ if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING))
{
myPathSelection.initializePath();
}
@@ -423,7 +422,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
disableBusinessPaper();
disableSenderReceiver();
setPossibleFooter(false);
- if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(""))
+ if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING))
{
myPathSelection.initializePath();
}
@@ -687,7 +686,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
//Height of the Company Address in the Receiver Field
int iReceiverHeight = (int) (0.5 * 1000);
- BusCompanyAddressReceiver = myLetterDoc.new BusinessPaperObject(" ", iFrameWidth, iReceiverHeight, iFrameX, (iFrameY - iReceiverHeight));
+ BusCompanyAddressReceiver = myLetterDoc.new BusinessPaperObject(PropertyNames.SPACE, iFrameWidth, iReceiverHeight, iFrameX, (iFrameY - iReceiverHeight));
setPossibleAddressReceiver(false);
}
@@ -734,7 +733,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
{
numFooterHeight.setValue(0.1);
}
- BusFooter = myLetterDoc.new BusinessPaperObject("Footer", (int) myLetterDoc.DocSize.Width, (int) (numFooterHeight.getValue() * 1000), (int) 0, (int) (myLetterDoc.DocSize.Height - (numFooterHeight.getValue() * 1000)));
+ BusFooter = myLetterDoc.new BusinessPaperObject("Footer", myLetterDoc.DocSize.Width, (int) (numFooterHeight.getValue() * 1000), 0, (int) (myLetterDoc.DocSize.Height - (numFooterHeight.getValue() * 1000)));
this.setControlProperty("numFooterHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
this.setControlProperty("lblFooterHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
setPossibleFooter(false);
@@ -751,7 +750,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
}
}
- //switch Elements on/off -------------------------------------------------------
+ //switch Elements on/off -------------------------------------------------------
public void chkUseLogoItemChanged()
{
try
@@ -825,9 +824,9 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
myLetterDoc.switchFooter("Standard", bFooterPossible, (chkFooterPageNumbers.getState() != 0), txtFooter.getText());
}
- //enable/disable roadmap item for footer page
+ //enable/disable roadmap item for footer page
XInterface BPaperItem = getRoadmapItemByID(RM_FOOTER);
- Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, new Boolean(bFooterPossible));
+ Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bFooterPossible));
}
catch (Exception exception)
@@ -848,7 +847,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
private void setPossibleFooter(boolean bState)
{
- setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
+ setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
chkUseFooterItemChanged();
}
@@ -856,7 +855,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
{
if (myLetterDoc.hasElement("Sender Address Repeated"))
{
- setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
+ setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
chkUseAddressReceiverItemChanged();
}
}
@@ -865,7 +864,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
{
if (myLetterDoc.hasElement("Company Logo"))
{
- setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
+ setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
chkUseLogoItemChanged();
}
}
@@ -907,7 +906,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
public void txtTemplateNameTextChanged()
{
- XDocumentPropertiesSupplier xDocPropsSuppl = (XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
+ XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
XDocumentProperties xDocProps = xDocPropsSuppl.getDocumentProperties();
String TitleName = txtTemplateName.getText();
xDocProps.setTitle(TitleName);
@@ -915,14 +914,14 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
public void chkUseSalutationItemChanged()
{
- XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
+ XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
myLetterDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0));
- setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseSalutation.getState() != 0));
+ setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseSalutation.getState() != 0));
}
public void lstSalutationItemChanged()
{
- XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
+ XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
myLetterDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0));
}
@@ -932,21 +931,21 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
public void chkUseGreetingItemChanged()
{
- XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
+ XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
myLetterDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0));
- setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseGreeting.getState() != 0));
+ setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseGreeting.getState() != 0));
}
private void setDefaultForGreetingAndSalutation()
{
XTextComponent xTextComponent;
- xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
- if (xTextComponent.getText().equals(""))
+ xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
+ if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING))
{
xTextComponent.setText(resources.SalutationLabels[0]);
}
- xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
- if (xTextComponent.getText().equals(""))
+ xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
+ if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING))
{
xTextComponent.setText(resources.GreetingLabels[0]);
}
@@ -954,7 +953,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
public void lstGreetingItemChanged()
{
- XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
+ XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
myLetterDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0));
}
@@ -1009,20 +1008,20 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
private void setPossibleSenderData(boolean bState)
{
- setControlProperty("optSenderDefine", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
- setControlProperty("optSenderPlaceholder", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
- setControlProperty("lblSenderAddress", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
+ setControlProperty("optSenderDefine", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
+ setControlProperty("optSenderPlaceholder", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
+ setControlProperty("lblSenderAddress", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
if (!bState)
{
- setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
- setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
- setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
- setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
- setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
- setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
- setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
- setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
- setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, new Boolean(bState));
+ setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
+ setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
+ setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
+ setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
+ setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
+ setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
+ setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
+ setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
+ setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
}
}
@@ -1080,7 +1079,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
public void lstLetterNormItemChanged()
{
- //when the norm changes, the correct template needs to be reloaded
+ //when the norm changes, the correct template needs to be reloaded
sCurrentNorm = Norms[getCurrentLetter().cp_Norm];
initializeTemplates(xMSF);
if (optBusinessLetter.getState())
@@ -1099,12 +1098,12 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
public void initializeSalutation()
{
- setControlProperty("lstSalutation", "StringItemList", resources.SalutationLabels);
+ setControlProperty("lstSalutation", PropertyNames.STRING_ITEM_LIST, resources.SalutationLabels);
}
public void initializeGreeting()
{
- setControlProperty("lstGreeting", "StringItemList", resources.GreetingLabels);
+ setControlProperty("lstGreeting", PropertyNames.STRING_ITEM_LIST, resources.GreetingLabels);
}
public void initializeNorms()
@@ -1114,11 +1113,11 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
String[] allLocales = lc.getIDs();
Object[] nameList =
{
- "", ""
+ PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING
};
String[] nameList2 =
{
- "", ""
+ PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING
};
Vector allPaths = new Vector();
String sLetterSubPath = "/wizard/letter/";
@@ -1127,7 +1126,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
{
sTemplatePath = FileAccess.deleteLastSlashfromUrl(sTemplatePath);
String[] PathParts = sTemplatePath.split("/");
- String nuString = "";
+ String nuString = PropertyNames.EMPTY_STRING;
String sMainPath;
for (int i = 0; i < (PathParts.length - 1); i++)
{
@@ -1140,7 +1139,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
sLetterPath = sMainPath + sLetterSubPath;
XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
- com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = (com.sun.star.ucb.XSimpleFileAccess) UnoRuntime.queryInterface(com.sun.star.ucb.XSimpleFileAccess.class, xInterface);
+ com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(com.sun.star.ucb.XSimpleFileAccess.class, xInterface);
nameList2 = xSimpleFileAccess.getFolderContents(sLetterPath, true);
for (int i = 0; i < nameList2.length; i++)
{
@@ -1170,8 +1169,8 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
String[] LanguageLabels;
boolean found = false;
- String cIsoCode = "";
- String MSID = "";
+ String cIsoCode = PropertyNames.EMPTY_STRING;
+ String MSID = PropertyNames.EMPTY_STRING;
int z = 0;
for (int i = 0; i < nameList.length; i++)
{
@@ -1179,7 +1178,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
cIsoCode = FileAccess.getFilename((String) nameList[i]);
for (int t = 0; t < allLocales.length; t++)
{
- String[] aLang = allLocales[t].split(";");
+ String[] aLang = allLocales[t].split(PropertyNames.SEMI_COLON);
if (cIsoCode.equalsIgnoreCase(aLang[1]))
{
MSID = aLang[2];
@@ -1191,7 +1190,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
{
for (int t = 0; t < allLocales.length; t++)
{
- String[] aLang = allLocales[t].split(";");
+ String[] aLang = allLocales[t].split(PropertyNames.SEMI_COLON);
if (cIsoCode.equalsIgnoreCase(aLang[1].substring(0, 2)))
{
MSID = aLang[2];
@@ -1204,7 +1203,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
if (found)
{
NormsVector.add(cIsoCode);
- NormsPathVector.add((String) nameList[i]);
+ NormsPathVector.add(nameList[i]);
LanguageLabelsVector.add(lc.getLanguageString(MSID));
}
}
@@ -1219,7 +1218,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
LanguageLabels = new String[LanguageLabelsVector.size()];
LanguageLabelsVector.toArray(LanguageLabels);
- setControlProperty("lstLetterNorm", "StringItemList", LanguageLabels);
+ setControlProperty("lstLetterNorm", PropertyNames.STRING_ITEM_LIST, LanguageLabels);
}
private CGLetter getCurrentLetter()
@@ -1242,7 +1241,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
try
{
sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard");
- sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", "");
+ sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", PropertyNames.EMPTY_STRING);
sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap");
}
catch (NoValidPathException e)
@@ -1263,19 +1262,19 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
OfficialFiles = FileAccess.getFolderTitles(xMSF, "off", sLetterPath);
PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", sLetterPath);
- setControlProperty("lstBusinessStyle", "StringItemList", BusinessFiles[0]);
- setControlProperty("lstPrivOfficialStyle", "StringItemList", OfficialFiles[0]);
- setControlProperty("lstPrivateStyle", "StringItemList", PrivateFiles[0]);
+ setControlProperty("lstBusinessStyle", PropertyNames.STRING_ITEM_LIST, BusinessFiles[0]);
+ setControlProperty("lstPrivOfficialStyle", PropertyNames.STRING_ITEM_LIST, OfficialFiles[0]);
+ setControlProperty("lstPrivateStyle", PropertyNames.STRING_ITEM_LIST, PrivateFiles[0]);
- setControlProperty("lstBusinessStyle", "SelectedItems", new short[]
+ setControlProperty("lstBusinessStyle", PropertyNames.SELECTED_ITEMS, new short[]
{
0
});
- setControlProperty("lstPrivOfficialStyle", "SelectedItems", new short[]
+ setControlProperty("lstPrivOfficialStyle", PropertyNames.SELECTED_ITEMS, new short[]
{
0
});
- setControlProperty("lstPrivateStyle", "SelectedItems", new short[]
+ setControlProperty("lstPrivateStyle", PropertyNames.SELECTED_ITEMS, new short[]
{
0
});
@@ -1289,11 +1288,11 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
public void initializeElements()
{
- setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Company Logo")));
- setControlProperty("chkUseBendMarks", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Bend Marks")));
- setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Sender Address Repeated")));
- setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Subject Line")));
- setControlProperty("chkUseSigns", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Letter Signs")));
+ setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Company Logo")));
+ setControlProperty("chkUseBendMarks", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Bend Marks")));
+ setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Sender Address Repeated")));
+ setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Subject Line")));
+ setControlProperty("chkUseSigns", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Letter Signs")));
myLetterDoc.updateDateFields();
}
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java
index 01731d989ebc..dc652bc02781 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/letter/LocaleCodes.java b/wizards/com/sun/star/wizards/letter/LocaleCodes.java
index e9849812d01a..244f1786f4fa 100644
--- a/wizards/com/sun/star/wizards/letter/LocaleCodes.java
+++ b/wizards/com/sun/star/wizards/letter/LocaleCodes.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/query/CallQueryWizard.java b/wizards/com/sun/star/wizards/query/CallQueryWizard.java
index fe18fd13f6d0..bd631fc0afa6 100644
--- a/wizards/com/sun/star/wizards/query/CallQueryWizard.java
+++ b/wizards/com/sun/star/wizards/query/CallQueryWizard.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,10 +28,10 @@ package com.sun.star.wizards.query;
import com.sun.star.beans.PropertyAttribute;
import com.sun.star.beans.PropertyValue;
-import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.Type;
import com.sun.star.wizards.common.Properties;
+import com.sun.star.wizards.common.PropertyNames;
/** This class capsulates the class, that implements the minimal component, a
* factory for creating the service (<CODE>__getServiceFactory</CODE>).
@@ -82,15 +82,15 @@ public class CallQueryWizard
{
super();
m_serviceFactory = i_serviceFactory;
- registerProperty( "Command", (short)( PropertyAttribute.READONLY | PropertyAttribute.MAYBEVOID ) );
- registerProperty( "CommandType", PropertyAttribute.READONLY );
+ registerProperty( PropertyNames.COMMAND, (short)( PropertyAttribute.READONLY | PropertyAttribute.MAYBEVOID ) );
+ registerProperty( PropertyNames.COMMAND_TYPE, PropertyAttribute.READONLY );
}
public void trigger(String sEvent)
{
try
{
- if (sEvent.compareTo("start") == 0)
+ if (sEvent.compareTo(PropertyNames.START) == 0)
{
QueryWizard CurQueryWizard = new QueryWizard( m_serviceFactory, m_wizardContext );
Command = CurQueryWizard.startQueryWizard();
@@ -160,6 +160,7 @@ public class CallQueryWizard
* whole combination of objects.
* @return Array of bytes, in order to distinguish between two sets.
*/
+ @Override
public byte[] getImplementationId()
{
byte[] byteReturn =
@@ -168,7 +169,7 @@ public class CallQueryWizard
try
{
- byteReturn = new String("" + this.hashCode()).getBytes();
+ byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes();
}
catch (Exception exception)
{
@@ -191,6 +192,7 @@ public class CallQueryWizard
* @return Sequence of all types (usually interface types) provided by the
* service.
*/
+ @Override
public Type[] getTypes()
{
Type[] typeReturn =
diff --git a/wizards/com/sun/star/wizards/query/Finalizer.java b/wizards/com/sun/star/wizards/query/Finalizer.java
index 1b528a749f36..f9982bfd5e3c 100644
--- a/wizards/com/sun/star/wizards/query/Finalizer.java
+++ b/wizards/com/sun/star/wizards/query/Finalizer.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -71,7 +71,7 @@ public class Finalizer
},
new Object[]
{
- new Integer(8), reslblQueryTitle, new Integer(95), new Integer(27), new Integer(QueryWizard.SOSUMMARY_PAGE), new Short(curtabindex++), new Integer(52)
+ 8, reslblQueryTitle, 95, 27, new Integer(QueryWizard.SOSUMMARY_PAGE), new Short(curtabindex++), 52
});
m_aTxtTitle = m_queryWizard.insertTextField("txtQueryTitle", "changeTitle", this, new String[]
{
@@ -79,7 +79,7 @@ public class Finalizer
},
new Object[]
{
- new Integer(12), HelpIds.getHelpIdString(curHelpIndex++), new Integer(95), new Integer(37), new Integer(QueryWizard.SOSUMMARY_PAGE), new Short(curtabindex++), new Integer(90)
+ 12, HelpIds.getHelpIdString(curHelpIndex++), 95, 37, new Integer(QueryWizard.SOSUMMARY_PAGE), new Short(curtabindex++), 90
});
m_queryWizard.insertLabel("lblHowGoOn", new String[]
{
@@ -87,7 +87,7 @@ public class Finalizer
},
new Object[]
{
- new Integer(16), reslblHowGoOn, Boolean.TRUE, new Integer(192), new Integer(27), new Integer(QueryWizard.SOSUMMARY_PAGE), new Short(curtabindex++), new Integer(112)
+ 16, reslblHowGoOn, Boolean.TRUE, 192, 27, new Integer(QueryWizard.SOSUMMARY_PAGE), new Short(curtabindex++), 112
});
this.xRadioDisplayQuery = m_queryWizard.insertRadioButton("optDisplayQuery",
new String[]
@@ -96,7 +96,7 @@ public class Finalizer
},
new Object[]
{
- new Integer(9), HelpIds.getHelpIdString(curHelpIndex++), resoptDisplayQuery, new Integer(192), new Integer(46), new Short((short) 1), new Integer(QueryWizard.SOSUMMARY_PAGE), new Short(curtabindex++), new Integer(118)
+ 9, HelpIds.getHelpIdString(curHelpIndex++), resoptDisplayQuery, 192, 46, new Short((short) 1), new Integer(QueryWizard.SOSUMMARY_PAGE), new Short(curtabindex++), 118
});
m_queryWizard.insertRadioButton("optModifyQuery",
@@ -106,7 +106,7 @@ public class Finalizer
},
new Object[]
{
- new Integer(10), HelpIds.getHelpIdString(curHelpIndex++), resoptModifyQuery, new Integer(192), new Integer(56), new Integer(QueryWizard.SOSUMMARY_PAGE), new Short(curtabindex++), new Integer(118)
+ 10, HelpIds.getHelpIdString(curHelpIndex++), resoptModifyQuery, 192, 56, new Integer(QueryWizard.SOSUMMARY_PAGE), new Short(curtabindex++), 118
});
m_queryWizard.insertFixedLine("flnSummary", new String[]
{
@@ -114,15 +114,15 @@ public class Finalizer
},
new Object[]
{
- new Integer(10), resflnSummary, new Integer(95), new Integer(68), new Integer(8), new Short(curtabindex++), new Integer(209)
+ 10, resflnSummary, 95, 68, 8, new Short(curtabindex++), 209
});
m_queryWizard.insertTextField("txtSummary", 0, null, new String[]
{
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ReadOnly", PropertyNames.PROPERTY_STEP, "VScroll", PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.READ_ONLY, PropertyNames.PROPERTY_STEP, "VScroll", PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Integer(96), HelpIds.getHelpIdString(curHelpIndex++), Boolean.TRUE, new Integer(95), new Integer(80), Boolean.TRUE, new Integer(8), Boolean.TRUE, new Integer(209)
+ 96, HelpIds.getHelpIdString(curHelpIndex++), Boolean.TRUE, 95, 80, Boolean.TRUE, 8, Boolean.TRUE, 209
});
}
@@ -142,7 +142,7 @@ public class Finalizer
String sCurQueryName = AnyConverter.toString(Helper.getUnoPropertyValue(UnoDialog.getModel(m_aTxtTitle), "Text"));
if (sCurQueryName != null)
{
- if (sCurQueryName.equals(""))
+ if (sCurQueryName.equals(PropertyNames.EMPTY_STRING))
{
String[] sCommandNames = CurDBMetaData.getIncludedCommandNames();
sCurQueryName = resQuery + "_" + sCommandNames[0];
@@ -158,14 +158,13 @@ public class Finalizer
catch (com.sun.star.uno.Exception exception)
{
exception.printStackTrace(System.out);
- return "";
+ return PropertyNames.EMPTY_STRING;
}
}
private String getTitle()
{
- final String sTitle = (String) Helper.getUnoPropertyValue(UnoDialog.getModel(m_aTxtTitle), "Text");
- return sTitle;
+ return (String) Helper.getUnoPropertyValue(UnoDialog.getModel(m_aTxtTitle), "Text");
}
public String finish()
@@ -176,7 +175,7 @@ public class Finalizer
)
return queryName;
- return "";
+ return PropertyNames.EMPTY_STRING;
}
public final boolean displayQueryDesign()
diff --git a/wizards/com/sun/star/wizards/query/QuerySummary.java b/wizards/com/sun/star/wizards/query/QuerySummary.java
index f246ef327db8..e5f14c4abcf7 100644
--- a/wizards/com/sun/star/wizards/query/QuerySummary.java
+++ b/wizards/com/sun/star/wizards/query/QuerySummary.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,6 +29,7 @@ package com.sun.star.wizards.query;
import com.sun.star.beans.PropertyValue;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.wizards.common.JavaTools;
+import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.common.Resource;
import com.sun.star.wizards.db.FieldColumn;
import com.sun.star.wizards.db.QueryMetaData;
@@ -58,25 +59,16 @@ public class QuerySummary extends QueryMetaData
sReturnChar = String.valueOf((char) 13) + String.valueOf((char) 13);
}
- /* boolean bAssignAliases = xDBMetaData.supportsColumnAliasing();
- boolean bSupportsGroupByUnrelated = xDBMetaData.supportsGroupByUnrelated();
- boolean bSupportsOrderByUnrelated = xDBMetaData.supportsOrderByUnrelated();
- boolean bSupportsNumericFunctions = xDBMetaData.getNumericFunctions() != "";
- xDBMetaData.getMaxColumnsInGroupBy();
- xDBMetaData.getMaxColumnsInOrderBy();
- xDBMetaData.getMaxColumnsInSelect();
- xDBMetaData.getMaxCharLiteralLength(); // gef?hrlich, da h?chstwahrscheinlich nicht sauber in jedem Treiber implementiert!!!!!
- * */
public void setSummaryString()
{
try
{
- String sFieldNamesFraction = "";
- String sSortingFraction = "";
- String sFilterFraction = "";
- String sAggregateFraction = "";
- String sGroupByFraction = "";
- String sHavingFraction = "";
+ String sFieldNamesFraction = PropertyNames.EMPTY_STRING;
+ String sSortingFraction = PropertyNames.EMPTY_STRING;
+ String sFilterFraction = PropertyNames.EMPTY_STRING;
+ String sAggregateFraction = PropertyNames.EMPTY_STRING;
+ String sGroupByFraction = PropertyNames.EMPTY_STRING;
+ String sHavingFraction = PropertyNames.EMPTY_STRING;
sFieldNamesFraction = combineFieldNameFraction() + sReturnChar;
sSortingFraction = combinePartString(RID_QUERY + 51, getSortFieldNames(), RID_QUERY + 52, RID_QUERY + 93, new String[]
{
@@ -84,15 +76,15 @@ public class QuerySummary extends QueryMetaData
}) + 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;
+ // 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;
sHavingFraction = combineFilterNameFraction(getGroupByFilterConditions(), RID_QUERY + 59, RID_QUERY + 60);
}
- // TODO: remove the last return from the string
+ // TODO: remove the last return from the string
sSummary = sFieldNamesFraction + sSortingFraction + sFilterFraction + sAggregateFraction + sGroupByFraction + sHavingFraction;
- sSummary = JavaTools.replaceSubString(sSummary, "", "~");
+ sSummary = JavaTools.replaceSubString(sSummary, PropertyNames.EMPTY_STRING, "~");
}
catch (com.sun.star.uno.Exception exception)
{
@@ -107,41 +99,37 @@ public class QuerySummary extends QueryMetaData
private String combineFilterNameFraction(PropertyValue[][] _filterconditions, int _InitResID, int _AlternativeResID)
{
- if (_filterconditions != null)
+ if (_filterconditions != null && _filterconditions.length > 0)
{
- if (_filterconditions.length > 0)
+ String sconditions = PropertyNames.EMPTY_STRING;
+ String sStart = oResource.getResText(_InitResID);
+ String BaseString = oResource.getResText(RID_QUERY + 96);
+ if (_filterconditions.length == 1)
{
- String sconditions = "";
- String sStart = oResource.getResText(_InitResID);
- String BaseString = oResource.getResText(RID_QUERY + 96);
- if (_filterconditions.length == 1)
+ PropertyValue[] curfilterconditions = _filterconditions[0];
+ for (int i = 0; i < curfilterconditions.length; i++)
{
- PropertyValue[] curfilterconditions = _filterconditions[0];
- for (int i = 0; i < curfilterconditions.length; i++)
- {
- sconditions += FilterComponent.getDisplayCondition(BaseString, _filterconditions[0][i], this);
- sconditions = appendClauseSeparator(sconditions, " " + sAnd + " ", i, curfilterconditions.length);
- }
+ sconditions += FilterComponent.getDisplayCondition(BaseString, _filterconditions[0][i], this);
+ sconditions = appendClauseSeparator(sconditions, PropertyNames.SPACE + sAnd + PropertyNames.SPACE, i, curfilterconditions.length);
}
- else
- {
+ }
+ else
+ {
- for (int i = 0; i < _filterconditions.length; i++)
- {
- sconditions += FilterComponent.getDisplayCondition(BaseString, _filterconditions[i][0], this);
- sconditions = appendClauseSeparator(sconditions, " " + sOr + " ", i, _filterconditions.length);
- }
+ for (int i = 0; i < _filterconditions.length; i++)
+ {
+ sconditions += FilterComponent.getDisplayCondition(BaseString, _filterconditions[i][0], this);
+ sconditions = appendClauseSeparator(sconditions, PropertyNames.SPACE + sOr + PropertyNames.SPACE, i, _filterconditions.length);
}
- String sreturn = sStart + sconditions;
- return sreturn;
}
+ return sStart + sconditions;
}
return oResource.getResText(_AlternativeResID);
}
private String combineFieldNameFraction()
{
- String CurString = "";
+ String CurString = PropertyNames.EMPTY_STRING;
String sReturn = oResource.getResText(RID_QUERY + 50);
String BaseString = oResource.getResText(RID_QUERY + 92);
for (int i = 0; i < FieldColumns.length; i++)
@@ -172,15 +160,13 @@ public class QuerySummary extends QueryMetaData
}
return _basestring;
}
- // TODO: How can you merge the following two methods to a single one in a smarter way??
+ // TODO: How can you merge the following two methods to a single one in a smarter way??
+
public String combinePartString(int _InitResID, String[] _FieldNames, int _AlternativeResID)
{
- if (_FieldNames != null)
+ if (_FieldNames != null && _FieldNames.length > 0)
{
- if (_FieldNames.length > 0)
- {
- return ArrayFieldsToString(_InitResID, _FieldNames);
- }
+ return ArrayFieldsToString(_InitResID, _FieldNames);
}
return oResource.getResText(_AlternativeResID);
}
@@ -202,19 +188,16 @@ public class QuerySummary extends QueryMetaData
public String combinePartString(int _InitResID, String[][] _FieldNames, int _AlternativeResID, int _BaseStringID, String[] _ReplaceTags)
{
- if (_FieldNames != null)
+ if (_FieldNames != null && _FieldNames.length > 0)
{
- if (_FieldNames.length > 0)
- {
- return ArrayFieldsToString(_InitResID, _FieldNames, _BaseStringID, _ReplaceTags);
- }
+ return ArrayFieldsToString(_InitResID, _FieldNames, _BaseStringID, _ReplaceTags);
}
return oResource.getResText(_AlternativeResID);
}
public String ArrayFieldsToString(int _InitResID, String[][] _FieldNames, int _BaseStringID, String[] _ReplaceTags)
{
- String CurString = "";
+ String CurString = PropertyNames.EMPTY_STRING;
String sReturn = oResource.getResText(_InitResID);
int FieldCount = _FieldNames.length;
if (FieldCount > 0)
diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java
index bca4e1a6fa5f..2acf1ba1edab 100644
--- a/wizards/com/sun/star/wizards/query/QueryWizard.java
+++ b/wizards/com/sun/star/wizards/query/QueryWizard.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,6 +53,7 @@ import com.sun.star.wizards.ui.TitlesComponent;
public class QueryWizard extends DatabaseObjectWizard
{
+
public static final String SFILLUPFIELDSLISTBOX = "fillUpFieldsListbox";
private static final int SOFIELDSELECTION_PAGE = 1;
private static final int SOSORTING_PAGE = 2;
@@ -76,21 +77,23 @@ public class QueryWizard extends DatabaseObjectWizard
private String reslblFields;
private String reslblSelFields;
private String reslblTables;
- private String resQueryWizard;
private String reslblGroupBy;
private String resmsgNonNumericAsGroupBy;
private String m_createdQuery;
- public QueryWizard( XMultiServiceFactory xMSF, PropertyValue[] i_wizardContext )
+ public QueryWizard(XMultiServiceFactory xMSF, PropertyValue[] i_wizardContext)
{
- super( xMSF, 40970, i_wizardContext );
+ super(xMSF, 40970, i_wizardContext);
addResourceHandler("QueryWizard", "dbw");
m_DBMetaData = new QuerySummary(xMSF, m_oResource);
}
public static void main(String i_args[])
{
- final String settings[] = new String[] { null, null, null };
+ final String settings[] = new String[]
+ {
+ null, null, null
+ };
final int IDX_PIPE_NAME = 0;
final int IDX_LOCATION = 1;
final int IDX_DSN = 2;
@@ -98,28 +101,28 @@ public class QueryWizard extends DatabaseObjectWizard
// some simple parsing
boolean failure = false;
int settingsIndex = -1;
- for ( int i=0; i<i_args.length; ++i )
+ for (int i = 0; i < i_args.length; ++i)
{
- if ( settingsIndex >= 0 )
+ if (settingsIndex >= 0)
{
- settings[ settingsIndex ] = i_args[i];
+ settings[ settingsIndex] = i_args[i];
settingsIndex = -1;
continue;
}
- if ( i_args[i].equals( "--pipe-name" ) )
+ if (i_args[i].equals("--pipe-name"))
{
settingsIndex = IDX_PIPE_NAME;
continue;
}
- if ( i_args[i].equals( "--database-location" ) )
+ if (i_args[i].equals("--database-location"))
{
settingsIndex = IDX_LOCATION;
continue;
}
- if ( i_args[i].equals( "--data-source-name" ) )
+ if (i_args[i].equals("--data-source-name"))
{
settingsIndex = IDX_DSN;
continue;
@@ -128,18 +131,22 @@ public class QueryWizard extends DatabaseObjectWizard
failure = true;
}
- if ( settings[ IDX_PIPE_NAME ] == null )
+ if (settings[ IDX_PIPE_NAME] == null)
+ {
failure = true;
+ }
- if ( ( settings[ IDX_DSN ] == null ) && ( settings[ IDX_LOCATION ] == null ) )
+ if ((settings[ IDX_DSN] == null) && (settings[ IDX_LOCATION] == null))
+ {
failure = true;
+ }
- if ( failure )
+ if (failure)
{
- System.err.println( "supported arguments: " );
- System.err.println( " --pipe-name <name> : specifies the name of the pipe to connect to the running OOo instance" );
- System.err.println( " --database-location <url> : specifies the URL of the database document to work with" );
- System.err.println( " --data-source-name <name> : specifies the name of the data source to work with" );
+ System.err.println("supported arguments: ");
+ System.err.println(" --pipe-name <name> : specifies the name of the pipe to connect to the running OOo instance");
+ System.err.println(" --database-location <url> : specifies the URL of the database document to work with");
+ System.err.println(" --data-source-name <name> : specifies the name of the data source to work with");
return;
}
@@ -150,12 +157,16 @@ public class QueryWizard extends DatabaseObjectWizard
if (serviceFactory != null)
{
PropertyValue[] curproperties = new PropertyValue[1];
- if ( settings[ IDX_LOCATION ] != null )
- curproperties[0] = Properties.createProperty( "DatabaseLocation", settings[ IDX_LOCATION ] );
+ if (settings[ IDX_LOCATION] != null)
+ {
+ curproperties[0] = Properties.createProperty("DatabaseLocation", settings[ IDX_LOCATION]);
+ }
else
- curproperties[0] = Properties.createProperty( "DataSourceName", settings[ IDX_DSN ] );
+ {
+ curproperties[0] = Properties.createProperty("DataSourceName", settings[ IDX_DSN]);
+ }
- QueryWizard CurQueryWizard = new QueryWizard( serviceFactory, curproperties );
+ QueryWizard CurQueryWizard = new QueryWizard(serviceFactory, curproperties);
CurQueryWizard.startQueryWizard();
}
}
@@ -174,7 +185,7 @@ public class QueryWizard extends DatabaseObjectWizard
{
try
{
- if ( m_DBMetaData.getConnection( m_wizardContext ) )
+ if (m_DBMetaData.getConnection(m_wizardContext))
{
reslblFields = m_oResource.getResText(UIConsts.RID_QUERY + 4);
reslblFieldHeader = m_oResource.getResText(UIConsts.RID_QUERY + 19); //Fielnames in AliasComponent
@@ -182,27 +193,27 @@ public class QueryWizard extends DatabaseObjectWizard
reslblSelFields = m_oResource.getResText(UIConsts.RID_QUERY + 50);
reslblTables = m_oResource.getResText(UIConsts.RID_QUERY + 3);
reslblGroupBy = m_oResource.getResText(UIConsts.RID_QUERY + 18);
- resQueryWizard = m_oResource.getResText(UIConsts.RID_QUERY + 2);
+ String resQueryWizard = m_oResource.getResText(UIConsts.RID_QUERY + 2);
resmsgNonNumericAsGroupBy = m_oResource.getResText(UIConsts.RID_QUERY + 88);
Helper.setUnoPropertyValues(xDialogModel, new String[]
{
- PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_MOVEABLE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Integer(210), Boolean.TRUE, "DialogQuery", new Integer(102), new Integer(41), new Integer(1), new Short((short) 0), resQueryWizard, new Integer(310)
+ 210, Boolean.TRUE, "DialogQuery", 102, 41, 1, new Short((short) 0), resQueryWizard, 310
});
drawNaviBar();
setRightPaneHeaders(m_oResource, UIConsts.RID_QUERY + 70, 8);
this.setMaxStep(8);
buildSteps();
- this.m_DBCommandFieldSelectio.preselectCommand( m_wizardContext, false );
+ this.m_DBCommandFieldSelectio.preselectCommand(m_wizardContext, false);
- XWindowPeer windowPeer = UnoRuntime.queryInterface( XWindowPeer.class, m_frame.getContainerWindow() );
+ XWindowPeer windowPeer = UnoRuntime.queryInterface(XWindowPeer.class, m_frame.getContainerWindow());
createWindowPeer(windowPeer);
m_DBMetaData.setWindowPeer(this.xControl.getPeer());
insertQueryRelatedSteps();
- executeDialog( m_frame.getContainerWindow().getPosSize() );
+ executeDialog(m_frame.getContainerWindow().getPosSize());
}
}
catch (java.lang.Exception jexception)
@@ -237,7 +248,7 @@ public class QueryWizard extends DatabaseObjectWizard
switch (CurItemID)
{
case SOAGGREGATE_PAGE:
- if (_bEnabled == true)
+ if (_bEnabled)
{
bEnabled = ((m_DBMetaData.hasNumericalFields()) && (m_DBMetaData.xDBMetaData.supportsCoreSQLGrammar()));
}
@@ -247,7 +258,7 @@ public class QueryWizard extends DatabaseObjectWizard
break;
case SOGROUPFILTER_PAGE:
bEnabled = false;
- if (_bEnabled == true)
+ if (_bEnabled)
{
bEnabled = (m_DBMetaData.GroupByFilterConditions.length > 0);
}
@@ -310,8 +321,8 @@ public class QueryWizard extends DatabaseObjectWizard
try
{
m_DBCommandFieldSelectio = new CommandFieldSelection(
- this, m_DBMetaData, 120, reslblFields, reslblSelFields, reslblTables,
- m_DBMetaData.supportsQueriesInFrom(), 40850);
+ this, m_DBMetaData, 120, reslblFields, reslblSelFields, reslblTables,
+ m_DBMetaData.supportsQueriesInFrom(), 40850);
m_DBCommandFieldSelectio.setAppendMode(true);
m_DBCommandFieldSelectio.addFieldSelectionListener(new FieldSelectionListener());
m_sortingComponent = new SortingComponent(this, SOSORTING_PAGE, 95, 27, 210, 40865);
@@ -341,14 +352,13 @@ public class QueryWizard extends DatabaseObjectWizard
public boolean finishWizard()
{
int ncurStep = getCurrentStep();
- if ( ( ncurStep == SOSUMMARY_PAGE )
- || ( switchToStep( ncurStep, SOSUMMARY_PAGE ) )
- )
+ if ((ncurStep == SOSUMMARY_PAGE)
+ || (switchToStep(ncurStep, SOSUMMARY_PAGE)))
{
m_createdQuery = m_finalizer.finish();
- if ( m_createdQuery.length() > 0 )
+ if (m_createdQuery.length() > 0)
{
- loadSubComponent( CommandType.QUERY, m_createdQuery, m_finalizer.displayQueryDesign() );
+ loadSubComponent(CommandType.QUERY, m_createdQuery, m_finalizer.displayQueryDesign());
xDialog.endExecute();
return true;
}
@@ -490,7 +500,7 @@ public class QueryWizard extends DatabaseObjectWizard
ID = 1;
if (sIncSuffix != null)
{
- if ((!sIncSuffix.equals("")) && (!sIncSuffix.equals("_")))
+ if ((!sIncSuffix.equals(PropertyNames.EMPTY_STRING)) && (!sIncSuffix.equals("_")))
{
String sID = JavaTools.ArrayoutofString(sIncSuffix, "_")[1];
ID = Integer.parseInt(sID);
diff --git a/wizards/com/sun/star/wizards/report/CallReportWizard.java b/wizards/com/sun/star/wizards/report/CallReportWizard.java
index c66596e11c02..0ddedc8be5b0 100644
--- a/wizards/com/sun/star/wizards/report/CallReportWizard.java
+++ b/wizards/com/sun/star/wizards/report/CallReportWizard.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,11 +28,13 @@ package com.sun.star.wizards.report;
import com.sun.star.beans.PropertyValue;
import com.sun.star.uno.Type;
-import com.sun.star.uno.UnoRuntime;
import com.sun.star.text.XTextDocument;
import com.sun.star.wizards.common.Properties;
import com.sun.star.sdb.application.XDatabaseDocumentUI;
import com.sun.star.wizards.common.NamedValueCollection;
+import com.sun.star.wizards.common.PropertyNames;
+import java.util.logging.Level;
+import java.util.logging.Logger;
/** This class capsulates the class, that implements the minimal component, a
* factory for creating the service (<CODE>__getServiceFactory</CODE>).
@@ -114,9 +116,9 @@ public class CallReportWizard
{
try
{
- if (sEvent.compareTo("start") == 0)
+ if (sEvent.compareTo(PropertyNames.START) == 0)
{
- if (bWizardstartedalready != true)
+ if (!bWizardstartedalready)
{
ReportWizard CurReportWizard = new ReportWizard( xmultiservicefactory, m_wizardContext );
CurReportWizard.startReportWizard();
@@ -138,9 +140,9 @@ public class CallReportWizard
}
}
}
- catch (Exception exception)
+ catch (Exception e)
{
- System.err.println(exception);
+ Logger.getLogger(CallReportWizard.class.getName()).log(Level.SEVERE, null, e);
}
System.gc();
}
@@ -212,11 +214,11 @@ public class CallReportWizard
try
{
- byteReturn = new String("" + this.hashCode()).getBytes();
+ byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes();
}
- catch (Exception exception)
+ catch (Exception e)
{
- System.err.println(exception);
+ Logger.getLogger(CallReportWizard.class.getName()).log(Level.SEVERE, null, e);
}
return (byteReturn);
@@ -251,9 +253,9 @@ public class CallReportWizard
new Type(com.sun.star.lang.XInitialization.class)
};
}
- catch (Exception exception)
+ catch (Exception e)
{
- System.err.println(exception);
+ Logger.getLogger(CallReportWizard.class.getName()).log(Level.SEVERE, null, e);
}
return (typeReturn);
diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java
index ee60f3744000..9abf4a4ebf98 100644
--- a/wizards/com/sun/star/wizards/report/DBColumn.java
+++ b/wizards/com/sun/star/wizards/report/DBColumn.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -126,7 +126,7 @@ public class DBColumn
try
{
XCell xCell = CurRecordTable.xCellRange.getCellByPosition(_nColumn, 0);
- XTextRange xTextCell = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xCell);
+ XTextRange xTextCell = UnoRuntime.queryInterface(XTextRange.class, xCell);
String CompString = "Column";
XTextCursor xLocCellCursor = TextDocument.createTextCursor(xCell);
if (isNameCell(xLocCellCursor, CurDBField.getFieldName(), CompString) || (_bforce))
@@ -134,7 +134,7 @@ public class DBColumn
xNameCell = xCell;
xNameTextCell = xTextCell;
xValCell = CurRecordTable.xCellRange.getCellByPosition(_nColumn, 1);
- xValTextCell = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xValCell);
+ xValTextCell = UnoRuntime.queryInterface(XTextRange.class, xValCell);
xValCellCursor = TextDocument.createTextCursor(xValCell);
ValColumn = _nColumn;
return true;
@@ -190,7 +190,7 @@ public class DBColumn
for (int m = 0; m < xRows.getCount(); m++)
{
xCell = xCellRange.getCellByPosition(n, m);
- xTextCell = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xCell);
+ xTextCell = UnoRuntime.queryInterface(XTextRange.class, xCell);
String CompString = TableName.substring(4);
XTextCursor xLocCellCursor = TextDocument.createTextCursor(xCell);
if (isNameCell(xLocCellCursor, CurDBField.getFieldName(), CompString))
@@ -216,12 +216,12 @@ public class DBColumn
try
{
XNameAccess xAllTextTables = oTextTableHandler.xTextTablesSupplier.getTextTables();
- if (xAllTextTables.hasByName(TableName) == true)
+ if (xAllTextTables.hasByName(TableName))
{
Object oTextTable = xAllTextTables.getByName(TableName);
- xCellRange = (XCellRange) UnoRuntime.queryInterface(XCellRange.class, oTextTable);
- xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, oTextTable);
- xTableName = (XNamed) UnoRuntime.queryInterface(XNamed.class, oTextTable);
+ xCellRange = UnoRuntime.queryInterface(XCellRange.class, oTextTable);
+ xTextTable = UnoRuntime.queryInterface(XTextTable.class, oTextTable);
+ xTableName = UnoRuntime.queryInterface(XNamed.class, oTextTable);
xTableColumns = xTextTable.getColumns();
}
}
@@ -257,7 +257,7 @@ public class DBColumn
XTextCursor xTextCursor = TextDocument.createTextCursor(xNameCell);
xTextCursor.gotoStart(false);
xTextCursor.gotoEnd(true);
- xTextCursor.setString("");
+ xTextCursor.setString(PropertyNames.EMPTY_STRING);
oTextFieldHandler.insertUserField(xTextCursor, CurDBField.getFieldName(), CurDBField.getFieldTitle());
}
@@ -266,7 +266,7 @@ public class DBColumn
XTextCursor xTextCursor = TextDocument.createTextCursor(xCell);
xTextCursor.gotoStart(false);
xTextCursor.gotoEnd(true);
- xTextCursor.setString("");
+ xTextCursor.setString(PropertyNames.EMPTY_STRING);
oTextFieldHandler.insertUserField(xTextCursor, CurDBField.getFieldName(), CurDBField.getFieldTitle());
}
@@ -290,7 +290,7 @@ public class DBColumn
try
{
xValCell = xCellRange.getCellByPosition(ValColumn, ValRow);
- xValTextCell = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xValCell);
+ xValTextCell = UnoRuntime.queryInterface(XTextRange.class, xValCell);
modifyCellContent(CurGroupValue);
if (bAlignLeft)
{
@@ -361,7 +361,7 @@ public class DBColumn
try
{
Object CurGroupValue;
- if (bIsGroupColumn == false && CurDBField.isNumberFormat() == false)
+ if (!bIsGroupColumn && !CurDBField.isNumberFormat())
{
CurGroupValue = BlindtextCreator.adjustBlindTextlength(CurDBField.getFieldTitle(), CurDBField.getFieldWidth(), _bIsLandscape, bIsGroupColumn, CurDBMetaData.getRecordFieldNames());
}
@@ -381,7 +381,7 @@ public class DBColumn
{
CharFontName = "StarSymbol";
Helper.setUnoPropertyValue(xValCellCursor, "CharFontName", CharFontName);
- if (bIsGroupColumn == false)
+ if (!bIsGroupColumn)
{
Helper.setUnoPropertyValue(xValCellCursor, "ParaAdjust", new Integer(ParagraphAdjust.CENTER_value));
}
@@ -390,7 +390,7 @@ public class DBColumn
{
if (PropertyState == com.sun.star.beans.PropertyState.DEFAULT_VALUE)
{
- XPropertyState xPropState = (XPropertyState) UnoRuntime.queryInterface(XPropertyState.class, xValCellCursor);
+ XPropertyState xPropState = UnoRuntime.queryInterface(XPropertyState.class, xValCellCursor);
xPropState.setPropertyToDefault("CharFontName");
}
else
@@ -425,7 +425,7 @@ public class DBColumn
}
else
{
- xPropertyState = (XPropertyState) UnoRuntime.queryInterface(XPropertyState.class, xValCellCursor);
+ xPropertyState = UnoRuntime.queryInterface(XPropertyState.class, xValCellCursor);
PropertyState = xPropertyState.getPropertyState("CharFontName");
CharFontName = AnyConverter.toString(Helper.getUnoPropertyValue(xValCellCursor, "CharFontName"));
}
@@ -449,7 +449,7 @@ public class DBColumn
}
else
{
- XDependentTextField xDependent = (XDependentTextField) UnoRuntime.queryInterface(XDependentTextField.class, oTextField);
+ XDependentTextField xDependent = UnoRuntime.queryInterface(XDependentTextField.class, oTextField);
XPropertySet xMaster = xDependent.getTextFieldMaster();
String UserFieldName = (String) xMaster.getPropertyValue(PropertyNames.PROPERTY_NAME);
boolean bIsNameCell = false;
diff --git a/wizards/com/sun/star/wizards/report/Dataimport.java b/wizards/com/sun/star/wizards/report/Dataimport.java
index 2081b655ae7e..f8dd6feb7620 100644
--- a/wizards/com/sun/star/wizards/report/Dataimport.java
+++ b/wizards/com/sun/star/wizards/report/Dataimport.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,6 +34,8 @@ import com.sun.star.text.XTextDocument;
import com.sun.star.wizards.ui.*;
import com.sun.star.wizards.common.*;
import com.sun.star.uno.Exception;
+import java.util.logging.Level;
+import java.util.logging.Logger;
public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionListener
{ // extends ReportWizard
@@ -80,11 +82,11 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi
CurReportDocument.StopProcess();
}
-// public static void main(String args[])
+// public static void main(String args[])
// {
// String ConnectStr = "uno:socket,host=localhost,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.NamingService";
// XMultiServiceFactory xMSF = null;
-// try
+// try
// {
// xMSF = com.sun.star.wizards.common.Desktop.connect(ConnectStr);
// if (xMSF != null)
@@ -95,19 +97,19 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi
// curproperties[0] = Properties.createProperty("DatabaseLocation", "file:///C:/Documents and Settings/bc93774.EHAM02-DEV/My Documents/MyHSQL.odb");
//// curproperties[0] = Properties.createProperty("DatabaseLocation", "file:///C:/Documents and Settings/bc93774.EHAM02-DEV/My Documents/MyDocAssign.odb"); //baseLocation ); "DataSourceName", "db1");
//// curproperties[0] = Properties.createProperty("DataSourceName", "Bibliography");
-// curproperties[1] = Properties.createProperty("CommandType", new Integer(CommandType.TABLE));
-// curproperties[2] = Properties.createProperty("Command", "Table2");
+// curproperties[1] = Properties.createProperty(PropertyNames.COMMAND_TYPE, new Integer(CommandType.TABLE));
+// curproperties[2] = Properties.createProperty(PropertyNames.COMMAND, "Table2");
//
// Dataimport CurDataimport = new Dataimport(xMSF);
// TextDocument oTextDocument = new TextDocument(xMSF, true, null);
// CurDataimport.createReport(xMSF, oTextDocument.xTextDocument, curproperties);
//
// }
-// catch (Exception e)
+// catch (Exception e)
// {
// e.printStackTrace(System.out);
// }
-// catch (java.lang.Exception javaexception)
+// catch (java.lang.Exception javaexception)
// {
// javaexception.printStackTrace(System.out);
// }
@@ -119,11 +121,11 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi
Helper.setUnoPropertyValues(xDialogModel,
new String[]
{
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_STEP, "Title", PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Integer(84), new Integer(0), sProgressTitle, new Integer(180)
+ 84, 0, sProgressTitle, 180
});
com.sun.star.awt.FontDescriptor oFontDesc = new com.sun.star.awt.FontDescriptor();
oFontDesc.Weight = com.sun.star.awt.FontWeight.BOLD;
@@ -132,11 +134,11 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi
insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblProgressDBConnection",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- oFontDesc, new Integer(10), sProgressDBConnection, new Integer(6), new Integer(6), new Integer(0), new Integer(150)
+ oFontDesc, 10, sProgressDBConnection, 6, 6, 0, 150
});
insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblProgressDataImport",
@@ -146,7 +148,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi
},
new Object[]
{
- new Integer(10), sProgressDataImport, new Integer(6), new Integer(24), new Integer(0), new Integer(120)
+ 10, sProgressDataImport, 6, 24, 0, 120
});
}
else
@@ -154,11 +156,11 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi
insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblProgressDataImport",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- oFontDesc, new Integer(10), sProgressDataImport, new Integer(6), new Integer(24), new Integer(0), new Integer(120)
+ oFontDesc, 10, sProgressDataImport, 6, 24, 0, 120
});
}
insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblCurProgress",
@@ -168,7 +170,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi
},
new Object[]
{
- new Integer(10), "", new Integer(12), new Integer(42), new Integer(0), new Integer(120)
+ 10, PropertyNames.EMPTY_STRING, 12, 42, 0, 120
});
insertButton("cmdCancel", 10000, this,
@@ -178,22 +180,21 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi
},
new Object[]
{
- new Integer(14), HelpIds.getHelpIdString(34321), new Integer(74), new Integer(58), new Integer(0), new Short((short) 1), new Integer(40), sStop
+ 14, HelpIds.getHelpIdString(34321), 74, 58, 0, new Short((short) 1), 40, sStop
});
createWindowPeer(CurReportDocument.getWizardParent());
calculateDialogPosition(CurReportDocument.getFrame().getComponentWindow().getPosSize());
xWindow.setVisible(true);
super.xReschedule.reschedule();
- return;
- }
- catch (Exception exception)
+ }
+ catch (Exception e)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger(Dataimport.class.getName()).log(Level.SEVERE, null, e);
// return;
}
- catch (java.lang.Exception jexception)
+ catch (java.lang.Exception e)
{
- jexception.printStackTrace(System.out);
+ Logger.getLogger(Dataimport.class.getName()).log(Level.SEVERE, null, e);
// return;
}
}
diff --git a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java
index bab8a4bb240e..56d3d4d041cb 100644
--- a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java
+++ b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,8 +53,8 @@ public class GroupFieldHandler extends FieldSelection
this.oWizardDialog = _CurUnoDialog;
this.CurReportDocument = _CurReportDocument;
this.CurDBMetaData = CurReportDocument.getRecordParser();
- CurUnoDialog.setControlProperty("lstFields_2", "MultiSelection", new Boolean(false));
- CurUnoDialog.setControlProperty("lstSelFields_2", "MultiSelection", new Boolean(false));
+ CurUnoDialog.setControlProperty("lstFields_2", "MultiSelection", Boolean.FALSE);
+ CurUnoDialog.setControlProperty("lstSelFields_2", "MultiSelection", Boolean.FALSE);
addFieldSelectionListener(new FieldSelectionListener());
String sNote = ReportWizard.getBlindTextNote(_CurReportDocument, _CurUnoDialog.m_oResource);
CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblBlindTextNote_1",
@@ -64,7 +64,7 @@ public class GroupFieldHandler extends FieldSelection
},
new Object[]
{
- new Boolean(false), new Integer(18), sNote, new Boolean(true), new Integer(95), new Integer(158), new Integer(ReportWizard.SOGROUPPAGE), new Integer(209)
+ Boolean.FALSE, 18, sNote, Boolean.TRUE, 95, 158, new Integer(ReportWizard.SOGROUPPAGE), 209
});
}
catch (Exception exception)
@@ -113,7 +113,7 @@ public class GroupFieldHandler extends FieldSelection
{
emptyFieldsListBoxes();
GroupFieldVector.removeAllElements();
- CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, new Boolean(false));
+ CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
}
public void getGroupFieldNames(CommandMetaData CurDBMetaData)
@@ -162,7 +162,7 @@ public class GroupFieldHandler extends FieldSelection
int iSelCount = xSelectedFieldsListBox.getItemCount();
String[] CurGroupNames = xFieldsListBox.getItems();
CurReportDocument.liveupdate_addGroupNametoDocument(CurGroupNames, CurGroupTitle, GroupFieldVector, CurReportDocument.getReportPath(), iSelCount);
- CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, new Boolean(true));
+ CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
if (iSelCount >= MAXSELFIELDS)
{
toggleMoveButtons(false, false);
@@ -178,7 +178,7 @@ public class GroupFieldHandler extends FieldSelection
String[] NewSelList = xSelectedFieldsListBox.getItems();
CurReportDocument.liveupdate_removeGroupName(NewSelList, OldGroupTitle, GroupFieldVector);
String[] NewSelGroupNames = xSelectedFieldsListBox.getItems();
- CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, new Boolean(NewSelGroupNames.length == 0));
+ CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(NewSelGroupNames.length == 0));
// CurReportDocument.refreshGroupFields(xSelectedFieldsListBox.getItems());
}
diff --git a/wizards/com/sun/star/wizards/report/IReportBuilderLayouter.java b/wizards/com/sun/star/wizards/report/IReportBuilderLayouter.java
index 6422befd65f0..48be197b8a60 100755
--- a/wizards/com/sun/star/wizards/report/IReportBuilderLayouter.java
+++ b/wizards/com/sun/star/wizards/report/IReportBuilderLayouter.java
@@ -1,8 +1,8 @@
/*
* ***********************************************************************
- *
+ *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -96,13 +96,21 @@ public interface IReportBuilderLayouter
/**
* Insert the names of the groups, the group names are names out of the field names.
- *
+ *
* If a group name is given here, it will not shown in the fields/titles, but must be in the field string list.
* @param _aGroupFieldNames
*/
public void insertGroupNames(String[] _aGroupFieldNames);
/**
+ * Insert the names of the groups which should be used as sorting, the group names are names out of the field names.
+ *
+ * If a group name is given here, it will not shown in the fields/titles, but must be in the field string list.
+ * @param _aSortFieldNames
+ */
+ public void insertSortingNames(String[][] _aSortFieldNames);
+
+ /**
* This method redraws the whole layout with all it's content
*/
public void layout();
diff --git a/wizards/com/sun/star/wizards/report/IReportDefinitionReadAccess.java b/wizards/com/sun/star/wizards/report/IReportDefinitionReadAccess.java
index 59fd096fe363..1c71d5e34641 100755
--- a/wizards/com/sun/star/wizards/report/IReportDefinitionReadAccess.java
+++ b/wizards/com/sun/star/wizards/report/IReportDefinitionReadAccess.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/report/IReportDocument.java b/wizards/com/sun/star/wizards/report/IReportDocument.java
index 702a776f9c98..b15339573ece 100644
--- a/wizards/com/sun/star/wizards/report/IReportDocument.java
+++ b/wizards/com/sun/star/wizards/report/IReportDocument.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,7 +38,7 @@ import java.util.Vector;
/**
* New Interface which gives us the possibility to switch on the fly between the old
* Wizard and the new Sun Report Builder Wizard, which use the same UI.
- *
+ *
* @author ll93751
*/
public interface IReportDocument
@@ -53,7 +53,7 @@ public interface IReportDocument
// -------------------------------------------------------------------------
// Access Helper
- // -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
/**
* Gives access to the DB Values
* @return
@@ -69,7 +69,7 @@ public interface IReportDocument
public com.sun.star.awt.XWindowPeer getWizardParent();
/**
- *
+ *
* @return the Frame of the document Window or Report Builder Window
*/
public com.sun.star.frame.XFrame getFrame();
@@ -78,10 +78,10 @@ public interface IReportDocument
// -------------------------------------------------------------------------
// First step: After entering the table name, select fields
- // -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
/**
* Is called after first step, set Tablename and the fields, which should occur in the Report.
- * @param _aType
+ * @param _aType
* @param TableName
* @param FieldNames
*/
@@ -99,7 +99,7 @@ public interface IReportDocument
// -------------------------------------------------------------------------
// Second step: Label field titles
- // -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
/**
* Set new names for the titles
* @param sFieldTitles
@@ -117,7 +117,7 @@ public interface IReportDocument
public void liveupdate_changeUserFieldContent(final String FieldName, final String TitleName);
// -------------------------------------------------------------------------
// Third step: Grouping
- // -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
/* Grouping Page */
// Document should not hold the grouping information!
/**
@@ -148,7 +148,7 @@ public interface IReportDocument
public void setGrouping(String[] aGroupList);
// -------------------------------------------------------------------------
// Fourth step: Sorting
- // -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
/**
* Set the list how to sort
* @param aSort
@@ -156,7 +156,7 @@ public interface IReportDocument
public void setSorting(String[][] aSort);
// -------------------------------------------------------------------------
// Fivth step: Templates / Layout
- // -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
/* Template Page */
public void setPageOrientation(int nOrientation) throws com.sun.star.lang.IllegalArgumentException;
@@ -187,7 +187,7 @@ public interface IReportDocument
public void layout_setupRecordSection(String TemplateName);
// -------------------------------------------------------------------------
// finishing
- // -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// preview (update titlenames)
// addTextListener
/**
@@ -229,7 +229,7 @@ public interface IReportDocument
public void dispose();
// -------------------------------------------------------------------------
// Garbage dump
- // -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
/* DataImport */
// ???
// public void addTextSectionCopies();
@@ -262,7 +262,7 @@ public interface IReportDocument
/**
* check internal invariants
- * @throws a
+ * @throws a
*/
public void checkInvariants() throws java.lang.Exception;
}
diff --git a/wizards/com/sun/star/wizards/report/RecordTable.java b/wizards/com/sun/star/wizards/report/RecordTable.java
index b4af7f7fa94b..a75a649b8c92 100644
--- a/wizards/com/sun/star/wizards/report/RecordTable.java
+++ b/wizards/com/sun/star/wizards/report/RecordTable.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,21 +69,21 @@ public class RecordTable
{
oTable = xAllTextTables.getByName(ReportTextDocument.TBLRECORDSECTION);
}
- xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, oTable);
- xTableName = (XNamed) UnoRuntime.queryInterface(XNamed.class, xTextTable);
+ xTextTable = UnoRuntime.queryInterface(XTextTable.class, oTable);
+ xTableName = UnoRuntime.queryInterface(XNamed.class, xTextTable);
}
else
{
- XIndexAccess xTableIndex = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xAllTextTables);
+ XIndexAccess xTableIndex = UnoRuntime.queryInterface(XIndexAccess.class, xAllTextTables);
int n = xTableIndex.getCount() - 1;
Object x = xTableIndex.getByIndex(n);
- xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, x);
- xTableName = (XNamed) UnoRuntime.queryInterface(XNamed.class, xTextTable);
+ xTextTable = UnoRuntime.queryInterface(XTextTable.class, x);
+ xTableName = UnoRuntime.queryInterface(XNamed.class, xTextTable);
xTableName.setName(ReportTextDocument.TBLRECORDSECTION);
}
xTableRows = xTextTable.getRows();
xTableColumns = xTextTable.getColumns();
- xCellRange = (XCellRange) UnoRuntime.queryInterface(XCellRange.class, xTextTable);
+ xCellRange = UnoRuntime.queryInterface(XCellRange.class, xTextTable);
}
catch (Exception exception)
{
diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java
index 73a32f35c029..3034b518f645 100644
--- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java
+++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -94,7 +94,7 @@ public class ReportFinalizer
},
new Object[]
{
- new Integer(8), sReportTitle, new Integer(95), new Integer(27), new Integer(ReportWizard.SOSTOREPAGE), new Short(curtabindex++), new Integer(68)
+ 8, sReportTitle, 95, 27, new Integer(ReportWizard.SOSTOREPAGE), new Short(curtabindex++), 68
});
xTitleTextBox = CurUnoDialog.insertTextField("txtTitle", CHANGEREPORTTITLE_FUNCNAME, this,
@@ -104,7 +104,7 @@ public class ReportFinalizer
},
new Object[]
{
- new Integer(12), "HID:WIZARDS_HID_DLGREPORT_4_TITLE", new Integer(95), new Integer(37), new Integer(ReportWizard.SOSTOREPAGE), new Short(curtabindex++), new Integer(209)
+ 12, "HID:WIZARDS_HID_DLGREPORT_4_TITLE", 95, 37, new Integer(ReportWizard.SOSTOREPAGE), new Short(curtabindex++), 209
});
CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblChooseReportKind",
@@ -114,7 +114,7 @@ public class ReportFinalizer
},
new Object[]
{
- new Integer(8), slblChooseReportKind, new Integer(95), new Integer(57), new Integer(ReportWizard.SOSTOREPAGE), new Short(curtabindex++), new Integer(209)
+ 8, slblChooseReportKind, 95, 57, new Integer(ReportWizard.SOSTOREPAGE), new Short(curtabindex++), 209
});
CurUnoDialog.insertRadioButton("optCreateDocument", TOGGLESUBTEMPLATECONTROLS_FUNCNAME, this,
@@ -124,7 +124,7 @@ public class ReportFinalizer
},
new Object[]
{
- new Integer(10), "HID:WIZARDS_HID_DLGREPORT_5_OPTSTATDOCUMENT", sSaveAsDocument, new Integer(95), new Integer(69), new Short((short) 0), new Integer(ReportWizard.SOSTOREPAGE), new Short(curtabindex++), new Integer(138)
+ 10, "HID:WIZARDS_HID_DLGREPORT_5_OPTSTATDOCUMENT", sSaveAsDocument, 95, 69, new Short((short) 0), new Integer(ReportWizard.SOSTOREPAGE), new Short(curtabindex++), 138
});
CurUnoDialog.insertRadioButton("optCreateReportTemplate", TOGGLESUBTEMPLATECONTROLS_FUNCNAME, this,
@@ -134,7 +134,7 @@ public class ReportFinalizer
},
new Object[]
{
- new Integer(8), "HID:WIZARDS_HID_DLGREPORT_5_OPTDYNTEMPLATE", sSaveAsTemplate, new Integer(95), new Integer(81), new Short((short) 1), new Integer(ReportWizard.SOSTOREPAGE), new Short(curtabindex++), new Integer(209)
+ 8, "HID:WIZARDS_HID_DLGREPORT_5_OPTDYNTEMPLATE", sSaveAsTemplate, 95, 81, new Short((short) 1), new Integer(ReportWizard.SOSTOREPAGE), new Short(curtabindex++), 209
});
@@ -145,7 +145,7 @@ public class ReportFinalizer
},
new Object[]
{
- new Integer(8), slblHowProceed, new Integer(105), new Integer(93), new Integer(ReportWizard.SOSTOREPAGE), new Short(curtabindex++), new Integer(209)
+ 8, slblHowProceed, 105, 93, new Integer(ReportWizard.SOSTOREPAGE), new Short(curtabindex++), 209
});
@@ -156,7 +156,7 @@ public class ReportFinalizer
},
new Object[]
{
- new Integer(10), "HID:WIZARDS_HID_DLGREPORT_5_OPTEDITTEMPLATE", sEditTemplate, new Integer(111), new Integer(105), new Integer(6), new Short(curtabindex++), new Integer(138)
+ 10, "HID:WIZARDS_HID_DLGREPORT_5_OPTEDITTEMPLATE", sEditTemplate, 111, 105, 6, new Short(curtabindex++), 138
});
CurUnoDialog.insertRadioButton("optUseTemplate", TOGGLESUBTEMPLATECONTROLS_FUNCNAME, this,
@@ -166,7 +166,7 @@ public class ReportFinalizer
},
new Object[]
{
- new Integer(10), "HID:WIZARDS_HID_DLGREPORT_5_OPTUSETEMPLATE", sUseTemplate, new Integer(111), new Integer(115), new Short((short) 1), new Integer(ReportWizard.SOSTOREPAGE), new Short(curtabindex++), new Integer(138)
+ 10, "HID:WIZARDS_HID_DLGREPORT_5_OPTUSETEMPLATE", sUseTemplate, 111, 115, new Short((short) 1), new Integer(ReportWizard.SOSTOREPAGE), new Short(curtabindex++), 138
});
}
@@ -176,15 +176,15 @@ public class ReportFinalizer
*/
public void toggleSubTemplateControls()
{
- // String sStorePath = "";
+ // String sStorePath = PropertyNames.EMPTY_STRING;
Short iState = (Short) CurUnoDialog.getControlProperty("optCreateReportTemplate", PropertyNames.PROPERTY_STATE);
boolean bDoTemplateEnable = iState.shortValue() == 1;
- CurUnoDialog.setControlProperty("optEditTemplate", PropertyNames.PROPERTY_ENABLED, new Boolean(bDoTemplateEnable));
- CurUnoDialog.setControlProperty("optUseTemplate", PropertyNames.PROPERTY_ENABLED, new Boolean(bDoTemplateEnable));
- CurUnoDialog.setControlProperty("lblHowProceed", PropertyNames.PROPERTY_ENABLED, new Boolean(bDoTemplateEnable));
+ CurUnoDialog.setControlProperty("optEditTemplate", PropertyNames.PROPERTY_ENABLED, bDoTemplateEnable);
+ CurUnoDialog.setControlProperty("optUseTemplate", PropertyNames.PROPERTY_ENABLED, bDoTemplateEnable);
+ CurUnoDialog.setControlProperty("lblHowProceed", PropertyNames.PROPERTY_ENABLED, bDoTemplateEnable);
String sTitle = xTitleTextBox.getText();
- boolean bDoEnable = sTitle.equals("");
+ boolean bDoEnable = sTitle.equals(PropertyNames.EMPTY_STRING);
CurUnoDialog.enableFinishButton(!bDoEnable);
}
// private boolean fileexists(XMultiServiceFactory _xMSF, String _spath){
@@ -200,7 +200,7 @@ public class ReportFinalizer
{
String FirstCommandName = (_CurDBMetaData.getIncludedCommandNames())[0];
DefaultName = Desktop.getUniqueName(_CurDBMetaData.getReportDocuments(), FirstCommandName);
- if (DefaultName.equals(OldDefaultName) == false)
+ if (!DefaultName.equals(OldDefaultName))
{
OldDefaultName = DefaultName;
}
@@ -212,7 +212,7 @@ public class ReportFinalizer
if (CurUnoDialog != null)
{
String LocStoreName = xTitleTextBox.getText();
- if (!LocStoreName.equals(""))
+ if (!LocStoreName.equals(PropertyNames.EMPTY_STRING))
{
StoreName = LocStoreName;
}
@@ -227,14 +227,14 @@ public class ReportFinalizer
StoreName = getStoreName();
String StorePath;
XInterface xInterface = (XInterface) m_xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
- XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface);
+ XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface);
StorePath = FileAccess.getOfficePath(m_xMSF, "Temp", xSimpleFileAccess) + "/" + StoreName;
return StorePath;
}
catch (Exception e)
{
e.printStackTrace(System.out);
- return "";
+ return PropertyNames.EMPTY_STRING;
}
}
@@ -242,7 +242,7 @@ public class ReportFinalizer
{
final String TitleName = xTitleTextBox.getText();
CurReportDocument.liveupdate_updateReportTitle(TitleName);
- CurUnoDialog.enableFinishButton(!"".equals(TitleName));
+ CurUnoDialog.enableFinishButton(!PropertyNames.EMPTY_STRING.equals(TitleName));
}
public int getReportOpenMode()
diff --git a/wizards/com/sun/star/wizards/report/ReportImplementationHelper.java b/wizards/com/sun/star/wizards/report/ReportImplementationHelper.java
index a8d26d68cd41..a215bd98369d 100644
--- a/wizards/com/sun/star/wizards/report/ReportImplementationHelper.java
+++ b/wizards/com/sun/star/wizards/report/ReportImplementationHelper.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,9 +42,9 @@ public class ReportImplementationHelper
protected int m_nDefaultPageOrientation;
/**
- *
+ *
* @param _aMSF
- * @param _nOrientation
+ * @param _nOrientation
*/
public ReportImplementationHelper(XMultiServiceFactory _aMSF, int _nOrientation)
{
diff --git a/wizards/com/sun/star/wizards/report/ReportLayouter.java b/wizards/com/sun/star/wizards/report/ReportLayouter.java
index 16180f4df91c..c44f4af9b1eb 100644
--- a/wizards/com/sun/star/wizards/report/ReportLayouter.java
+++ b/wizards/com/sun/star/wizards/report/ReportLayouter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -96,7 +96,7 @@ public class ReportLayouter
},
new Object[]
{
- new Integer(8), slblDataStructure, new Integer(95), new Integer(27), new Integer(ReportWizard.SOTEMPLATEPAGE), new Short(curtabindex++), new Integer(99)
+ 8, slblDataStructure, 95, 27, new Integer(ReportWizard.SOTEMPLATEPAGE), new Short(curtabindex++), 99
});
short iSelPos = 0;
@@ -111,14 +111,14 @@ public class ReportLayouter
xContentListBox = CurUnoDialog.insertListBox("lstContent", SOCONTENTLST, new ActionListenerImpl(), new ItemListenerImpl(),
new String[]
{
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "SelectedItems", PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.SELECTED_ITEMS, PropertyNames.PROPERTY_STEP, PropertyNames.STRING_ITEM_LIST, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Integer(108), "HID:WIZARDS_HID_DLGREPORT_4_DATALAYOUT", new Integer(95), new Integer(37), new short[]
+ 108, "HID:WIZARDS_HID_DLGREPORT_4_DATALAYOUT", 95, 37, new short[]
{
iSelPos
- }, new Integer(ReportWizard.SOTEMPLATEPAGE), ContentFiles[0], new Short(curtabindex++), new Integer(99)
+ }, new Integer(ReportWizard.SOTEMPLATEPAGE), ContentFiles[0], new Short(curtabindex++), 99
});
CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblLayout",
@@ -128,7 +128,7 @@ public class ReportLayouter
},
new Object[]
{
- new Integer(8), slblPageLayout, new Integer(205), new Integer(27), new Integer(ReportWizard.SOTEMPLATEPAGE), new Short(curtabindex++), new Integer(99)
+ 8, slblPageLayout, 205, 27, new Integer(ReportWizard.SOTEMPLATEPAGE), new Short(curtabindex++), 99
});
short iSelLayoutPos = 0;
@@ -146,14 +146,14 @@ public class ReportLayouter
xLayoutListBox = CurUnoDialog.insertListBox("lstLayout", SOLAYOUTLST, new ActionListenerImpl(), new ItemListenerImpl(),
new String[]
{
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "SelectedItems", PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.SELECTED_ITEMS, PropertyNames.PROPERTY_STEP, PropertyNames.STRING_ITEM_LIST, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Integer(108), "HID:WIZARDS_HID_DLGREPORT_4_PAGELAYOUT", new Integer(205), new Integer(37), new short[]
+ 108, "HID:WIZARDS_HID_DLGREPORT_4_PAGELAYOUT", 205, 37, new short[]
{
iSelLayoutPos
- }, new Integer(ReportWizard.SOTEMPLATEPAGE), LayoutFiles[0], new Short(curtabindex++), new Integer(99)
+ }, new Integer(ReportWizard.SOTEMPLATEPAGE), LayoutFiles[0], new Short(curtabindex++), 99
});
iOldLayoutPos = (int) iSelPos;
CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblOrientation",
@@ -163,7 +163,7 @@ public class ReportLayouter
},
new Object[]
{
- new Integer(8), sOrientationHeader, new Integer(95), new Integer(148), new Integer(ReportWizard.SOTEMPLATEPAGE), new Short(curtabindex++), new Integer(74)
+ 8, sOrientationHeader, 95, 148, new Integer(ReportWizard.SOTEMPLATEPAGE), new Short(curtabindex++), 74
});
short m_nLandscapeState = CurReportDocument.getDefaultPageOrientation() == SOOPTLANDSCAPE ? (short) 1 : 0;
@@ -174,7 +174,7 @@ public class ReportLayouter
},
new Object[]
{
- new Integer(10), "HID:WIZARDS_HID_DLGREPORT_4_LANDSCAPE", sOrientHorizontal, new Integer(101), new Integer(158), new Short(m_nLandscapeState), new Integer(ReportWizard.SOTEMPLATEPAGE), new Short(curtabindex++), new Integer(60)
+ 10, "HID:WIZARDS_HID_DLGREPORT_4_LANDSCAPE", sOrientHorizontal, 101, 158, new Short(m_nLandscapeState), new Integer(ReportWizard.SOTEMPLATEPAGE), new Short(curtabindex++), 60
});
short m_nPortraitState = CurReportDocument.getDefaultPageOrientation() == SOOPTPORTRAIT ? (short) 1 : (short) 0;
@@ -185,17 +185,17 @@ public class ReportLayouter
},
new Object[]
{
- new Integer(10), "HID:WIZARDS_HID_DLGREPORT_4_PORTRAIT", sOrientVertical, new Integer(101), new Integer(171), new Short(m_nPortraitState), new Integer(ReportWizard.SOTEMPLATEPAGE), new Short(curtabindex++), new Integer(60)
+ 10, "HID:WIZARDS_HID_DLGREPORT_4_PORTRAIT", sOrientVertical, 101, 171, new Short(m_nPortraitState), new Integer(ReportWizard.SOTEMPLATEPAGE), new Short(curtabindex++), 60
});
aOrientationImage = CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlImageControlModel", "imgOrientation",
new String[]
{
- "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Short("0"), new Integer(23), new Integer(164), new Integer(158), new Boolean(false), new Integer(ReportWizard.SOTEMPLATEPAGE), new Integer(30)
+ new Short("0"), 23, 164, 158, Boolean.FALSE, new Integer(ReportWizard.SOTEMPLATEPAGE), 30
});
String sNote = ReportWizard.getBlindTextNote(CurReportDocument, CurUnoDialog.m_oResource);
@@ -206,7 +206,7 @@ public class ReportLayouter
},
new Object[]
{
- new Integer(34), sNote, new Boolean(true), new Integer(205), new Integer(148), new Integer(ReportWizard.SOTEMPLATEPAGE), new Integer(99)
+ 34, sNote, Boolean.TRUE, 205, 148, new Integer(ReportWizard.SOTEMPLATEPAGE), 99
});
if (m_nLandscapeState == 1)
{
@@ -227,7 +227,7 @@ public class ReportLayouter
{
// CurReportDocument.getDoc().xTextDocument.lockControllers();
CurReportDocument.layout_setupRecordSection(_defaultTemplatePath);
- if (CurUnoDialog.getControlProperty("txtTitle", "Text").equals(""))
+ if (CurUnoDialog.getControlProperty("txtTitle", "Text").equals(PropertyNames.EMPTY_STRING))
{
String[] sCommandNames = CurReportDocument.getRecordParser().getIncludedCommandNames();
CurUnoDialog.setControlProperty("txtTitle", "Text", sCommandNames[0]);
@@ -246,7 +246,7 @@ public class ReportLayouter
try
{
int iPos;
- Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(false));
+ Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
// LLA: should we lock controllers here?
// CurReportDocument.getDoc().xTextDocument.lockControllers();
int iKey = CurUnoDialog.getControlKey(EventObject.Source, CurUnoDialog.ControlList);
@@ -306,7 +306,7 @@ public class ReportLayouter
e.printStackTrace();
}
// CurReportDocument.getDoc().unlockallControllers();
- Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(true));
+ Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
}
public void disposing(EventObject eventObject)
@@ -325,17 +325,17 @@ public class ReportLayouter
{
try
{
- Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(false));
+ 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 == true) ? SOOPTLANDSCAPE : SOOPTPORTRAIT);
+ CurReportDocument.setPageOrientation((blandscape) ? SOOPTLANDSCAPE : SOOPTPORTRAIT);
}
catch (Exception exception)
{
exception.printStackTrace(System.out);
}
// CurReportDocument.getDoc().unlockallControllers();
- Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(true));
+ 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 3ab9e704b9b9..5cddecac701f 100644
--- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java
+++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,9 +53,16 @@ import com.sun.star.wizards.text.TextStyleHandler;
import com.sun.star.wizards.text.TextFieldHandler;
import com.sun.star.wizards.text.ViewHandler;
import com.sun.star.wizards.document.FormHandler;
+import java.util.logging.Level;
+import java.util.logging.Logger;
class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implements Comparator
{
+
+ private static final String ISLANDSCAPE = "IsLandscape";
+ 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;
@@ -102,7 +109,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
lateInit(oResource, _aRP);
}
- void lateInit(Resource oResource, RecordParser _aRecordParser)
+ private void lateInit(Resource oResource, RecordParser _aRecordParser)
{
oTextTableHandler = new TextTableHandler(xMSFDoc, xTextDocument);
oTextSectionHandler = new TextSectionHandler(xMSFDoc, xTextDocument);
@@ -146,12 +153,11 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
{
oTextSection = xTextSections.getByName(RECORDSECTION);
}
- boolean bLayoutMode = AnyConverter.toBoolean(Helper.getUnoPropertyValue(oTextSection, "IsVisible"));
- return bLayoutMode;
+ return AnyConverter.toBoolean(Helper.getUnoPropertyValue(oTextSection, ISVISIBLE));
}
- catch (Exception exception)
+ catch (Exception e)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e);
// In doubt we rather suggest this is LayoutMode...
return true;
}
@@ -172,7 +178,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
}
// xProgressBar.setValue(100);
oViewHandler.selectFirstPage(oTextTableHandler);
- // xProgressBar.end();
+ // xProgressBar.end();
}
public void swapLayoutTemplate(String LayoutTemplatePath/*, String BitmapPath*/)
@@ -181,39 +187,59 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
{
// xProgressBar.start("", 10);
this.LayoutTemplatePath = LayoutTemplatePath;
- boolean bOldIsCurLandscape = AnyConverter.toBoolean(Helper.getUnoPropertyValue(ReportPageStyle, "IsLandscape"));
+ 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();
+ // xProgressBar.end();
}
- catch (Exception exception)
+ catch (Exception e)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e);
}
}
public void createReportForm(String SOREPORTFORMNAME)
{
com.sun.star.container.XNameContainer xNamedForm = oFormHandler.insertFormbyName(SOREPORTFORMNAME);
- XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xNamedForm);
- oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "CommandType", new String(Integer.toString(CurDBMetaData.getCommandType())));
+ XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, xNamedForm);
+ oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, PropertyNames.COMMAND_TYPE, Integer.toString(CurDBMetaData.getCommandType()));
if (CurDBMetaData.getCommandType() == CommandType.QUERY)
{
- oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "QueryName", CurDBMetaData.getCommandName());
- // oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "Command", "");
- DBMetaData.CommandObject oCommand = CurDBMetaData.getQueryByName(CurDBMetaData.getCommandName());
- oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "Command", CurDBMetaData.Command);
+ oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, QUERYNAME, CurDBMetaData.getCommandName());
+ oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, PropertyNames.COMMAND, "");
+ //DBMetaData.CommandObject oCommand = CurDBMetaData.getQueryByName(CurDBMetaData.getCommandName());
+ //oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, COMMAND, CurDBMetaData.Command);
}
else
{
- oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "QueryName", "");
- oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "Command", CurDBMetaData.Command);
+ oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, QUERYNAME, "");
+ oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, PropertyNames.COMMAND, CurDBMetaData.Command);
}
oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "GroupFieldNames", JavaTools.ArraytoString(CurDBMetaData.GroupFieldNames));
oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "FieldNames", JavaTools.ArraytoString(CurDBMetaData.getFieldNames()));
+ String[][] sortFieldNames = CurDBMetaData.getSortFieldNames();
+ if (sortFieldNames != null && sortFieldNames.length > 0)
+ {
+ final String space = ",";
+ final String colon = ";";
+ StringBuilder orderBy = new StringBuilder();
+ for (String[] sortPair : sortFieldNames)
+ {
+ orderBy.append(sortPair[0]).append(space).append(sortPair[1]).append(colon);
+ }
+ if (orderBy.length() != 0)
+ {
+ orderBy.delete(orderBy.lastIndexOf(colon), orderBy.length());
+ }
+ oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "Sorting", orderBy.toString());
+ }
+ else
+ {
+ oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "Sorting", "");
+ }
oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "RecordFieldNames", JavaTools.ArraytoString(CurDBMetaData.getRecordFieldNames()));
}
@@ -230,9 +256,9 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
ReportPageStyle = Helper.getUnoObjectbyName(oPageStyleFamily, "Standard");
FirstPageStyle = Helper.getUnoObjectbyName(oPageStyleFamily, "First Page");
}
- catch (Exception exception)
+ catch (Exception e)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e);
}
}
@@ -242,15 +268,15 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
{
com.sun.star.awt.Size oNewSize;
getReportPageStyles();
- com.sun.star.awt.Size oLocSize = (com.sun.star.awt.Size) Helper.getUnoStructValue(ReportPageStyle, "Size");
- bIsCurLandscape = AnyConverter.toBoolean(Helper.getUnoPropertyValue(ReportPageStyle, "IsLandscape"));
+ com.sun.star.awt.Size oLocSize = (com.sun.star.awt.Size) Helper.getUnoStructValue(ReportPageStyle, SIZE);
+ bIsCurLandscape = AnyConverter.toBoolean(Helper.getUnoPropertyValue(ReportPageStyle, ISLANDSCAPE));
if (bIsCurLandscape != bNewLandscape)
{
oNewSize = new com.sun.star.awt.Size(oLocSize.Height, oLocSize.Width);
- Helper.setUnoPropertyValue(ReportPageStyle, "IsLandscape", new Boolean(bNewLandscape));
- Helper.setUnoPropertyValue(ReportPageStyle, "Size", oNewSize);
- Helper.setUnoPropertyValue(FirstPageStyle, "IsLandscape", new Boolean(bNewLandscape));
- Helper.setUnoPropertyValue(FirstPageStyle, "Size", oNewSize);
+ Helper.setUnoPropertyValue(ReportPageStyle, ISLANDSCAPE, bNewLandscape);
+ Helper.setUnoPropertyValue(ReportPageStyle, SIZE, oNewSize);
+ Helper.setUnoPropertyValue(FirstPageStyle, ISLANDSCAPE, bNewLandscape);
+ Helper.setUnoPropertyValue(FirstPageStyle, SIZE, oNewSize);
int iLeftMargin = AnyConverter.toInt(Helper.getUnoPropertyValue(ReportPageStyle, "LeftMargin"));
int iRightMargin = AnyConverter.toInt(Helper.getUnoPropertyValue(ReportPageStyle, "RightMargin"));
PageWidth = oNewSize.Width - iLeftMargin - iRightMargin;
@@ -260,9 +286,9 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
}
}
}
- catch (Exception exception)
+ catch (Exception e)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e);
}
}
@@ -290,22 +316,15 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
for (i = 0; i < GroupCount; i++)
{
CurDBColumn = new DBColumn(oTextTableHandler, CurDBMetaData, CurDBMetaData.GroupFieldNames[i], i, TBLGROUPSECTION + (i + 1));
- if (CurDBColumn == null)
- {
- return false;
- }
- else
- {
- CurDBColumn.formatValueCell();
- DBColumnsVector.set(i, CurDBColumn);
- replaceFieldValueInGroupTable(CurDBColumn, i);
- }
+ CurDBColumn.formatValueCell();
+ DBColumnsVector.set(i, CurDBColumn);
+ replaceFieldValueInGroupTable(CurDBColumn, i);
}
return true;
}
- catch (Exception exception)
+ catch (Exception e)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e);
return false;
}
}
@@ -352,6 +371,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
// {
// return (JavaTools.FieldInList(CurDBMetaData.GroupFieldNames, _FieldName) != -1);
// }
+
public void replaceFieldValueInRecordSection(int RecordCount)
{
int GroupCount = CurDBMetaData.GroupFieldNames.length;
@@ -367,7 +387,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
String TableName;
DBColumn OldDBColumn;
DBColumn CurDBColumn;
- XNameAccess xTableNames = oTextTableHandler.xTextTablesSupplier.getTextTables();
+ // XNameAccess xTableNames = oTextTableHandler.xTextTablesSupplier.getTextTables();
int GroupFieldCount = SelGroupNames.length;
for (int i = 0; i < GroupFieldCount; i++)
{
@@ -471,16 +491,8 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
oTextSectionHandler.insertTextSection(GROUPSECTION + GroupCount, sPath, GroupCount == 1);
CurDBColumn = new DBColumn(oTextTableHandler, CurDBMetaData, CurFieldColumn.getFieldName(), GroupCount - 1, TBLGROUPSECTION + (GroupCount));
CurDBColumn.formatValueCell();
- if (CurDBColumn != null)
- {
- DBColumnsVector.addElement(CurDBColumn);
- replaceFieldValueInGroupTable(CurDBColumn, GroupCount - 1);
- }
- else
- {
- String sMessage = JavaTools.replaceSubString(sMsgTableNotExisting, TBLGROUPSECTION + (GroupCount), "<TABLENAME>");
- CurDBMetaData.showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sMessage);
- }
+ DBColumnsVector.addElement(CurDBColumn);
+ replaceFieldValueInGroupTable(CurDBColumn, GroupCount - 1);
}
catch (Exception exception)
{
@@ -555,43 +567,35 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
}
CurDBColumn = new DBColumn(CurRecordTable, oTextTableHandler, CurDBMetaData, i - CurDBMetaData.GroupFieldNames.length);
}
- if (CurDBColumn != null)
+ if (CurDBColumn.xNameCell != null)
{
- if (CurDBColumn.xNameCell != null)
+ DBColumnsVector.addElement(CurDBColumn);
+ }
+ else
+ {
+ String DelFieldName;
+ if (i < CurDBMetaData.GroupFieldNames.length)
{
- DBColumnsVector.addElement(CurDBColumn);
+ DelFieldName = CurDBMetaData.GroupFieldNames[i];
+ CurDBMetaData.GroupFieldNames = JavaTools.removefromList(CurDBMetaData.GroupFieldNames, new String[]
+ {
+ DelFieldName
+ });
+ CurDBMetaData.GroupFieldColumns = removeFieldColumnByFieldName(DelFieldName, CurDBMetaData.GroupFieldColumns);
}
else
{
- String DelFieldName;
- if (i < CurDBMetaData.GroupFieldNames.length)
- {
- DelFieldName = CurDBMetaData.GroupFieldNames[i];
- CurDBMetaData.GroupFieldNames = JavaTools.removefromList(CurDBMetaData.GroupFieldNames, new String[]
- {
- DelFieldName
- });
- CurDBMetaData.GroupFieldColumns = removeFieldColumnByFieldName(DelFieldName, CurDBMetaData.GroupFieldColumns);
- }
- else
- {
- DelFieldName = CurDBMetaData.getRecordFieldName(i - CurDBMetaData.GroupFieldNames.length);
- String[] aNewList = JavaTools.removefromList(CurDBMetaData.getRecordFieldNames(), new String[]
- {
- DelFieldName
- });
- CurDBMetaData.setRecordFieldNames(aNewList);
- CurDBMetaData.RecordFieldColumns = removeFieldColumnByFieldName(DelFieldName, CurDBMetaData.RecordFieldColumns);
- CurDBMetaData.FieldColumns = removeFieldColumnByFieldName(DelFieldName, CurDBMetaData.FieldColumns);
+ DelFieldName = CurDBMetaData.getRecordFieldName(i - CurDBMetaData.GroupFieldNames.length);
+ String[] aNewList = JavaTools.removefromList(CurDBMetaData.getRecordFieldNames(), new String[]
+ {
+ DelFieldName
+ });
+ CurDBMetaData.setRecordFieldNames(aNewList);
+ CurDBMetaData.RecordFieldColumns = removeFieldColumnByFieldName(DelFieldName, CurDBMetaData.RecordFieldColumns);
+ CurDBMetaData.FieldColumns = removeFieldColumnByFieldName(DelFieldName, CurDBMetaData.FieldColumns);
- }
- i--;
}
- }
- else
- {
- String sMessage = JavaTools.replaceSubString(sMsgTableNotExisting, TBLGROUPSECTION + (CurDBMetaData.GroupFieldNames.length), "<TABLENAME>");
- CurDBMetaData.showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sMessage);
+ i--;
}
}
java.util.Arrays.sort(CurDBMetaData.RecordFieldColumns, this);
@@ -639,7 +643,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
{
try
{
- Vector aFieldColumns = new Vector();
+ ArrayList<FieldColumn> aFieldColumns = new ArrayList<FieldColumn>();
for (int i = 0; i < _FieldColumns.length; i++)
{
FieldColumn CurFieldColumn = _FieldColumns[i];
@@ -654,7 +658,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
}
catch (RuntimeException e)
{
- e.printStackTrace(System.out);
+ Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e);
return null;
}
}
@@ -668,7 +672,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
{
sInvisibleSectionNames[i] = GROUPSECTION + i;
}
- XNameAccess xNameAccessTextSections = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oTextSectionHandler.xTextSectionsSupplier.getTextSections());
+ XNameAccess xNameAccessTextSections = UnoRuntime.queryInterface(XNameAccess.class, oTextSectionHandler.xTextSectionsSupplier.getTextSections());
String[] sSectionNames = xNameAccessTextSections.getElementNames();
for (int i = 0; i < sSectionNames.length; i++)
{
@@ -695,7 +699,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
public void removeNonLayoutTextTables()
{
String[] sLayoutTableNames = getLayoutTextTableNames();
- XNameAccess xNameAccessTextTables = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables());
+ XNameAccess xNameAccessTextTables = UnoRuntime.queryInterface(XNameAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables());
String[] sTableNames = xNameAccessTextTables.getElementNames();
for (int i = 0; i < sTableNames.length; i++)
{
@@ -710,8 +714,8 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
public void removeLayoutTextTables()
{
String[] sLayoutTableNames = getLayoutTextTableNames();
- XNameAccess xNameAccessTextTables = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables());
- XRelativeTextContentRemove xRelativeTextContentRemove = (XRelativeTextContentRemove) UnoRuntime.queryInterface(XRelativeTextContentRemove.class, xText);
+ XNameAccess xNameAccessTextTables = UnoRuntime.queryInterface(XNameAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables());
+ XRelativeTextContentRemove xRelativeTextContentRemove = UnoRuntime.queryInterface(XRelativeTextContentRemove.class, xText);
String[] sTableNames = xNameAccessTextTables.getElementNames();
for (int i = 0; i < sTableNames.length; i++)
{
@@ -720,7 +724,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
{
if (!sTableName.equals(sLayoutTableNames[0]))
{
- XTextContent xTextContent = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, oTextTableHandler.getByName(sTableName));
+ XTextContent xTextContent = UnoRuntime.queryInterface(XTextContent.class, oTextTableHandler.getByName(sTableName));
boolean bleaveloop = false;
while (!bleaveloop)
{
@@ -728,7 +732,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
{
// xRelativeTextContentRemove.removeTextContentBefore(xTextContent);
xRelativeTextContentRemove.removeTextContentAfter(xTextContent);
- // IllegalArgumentException may be thrown when no paragraphbreak is there
+ // IllegalArgumentException may be thrown when no paragraphbreak is there
}
catch (IllegalArgumentException iexception)
{
@@ -751,17 +755,17 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
for (int i = 0; i < GroupFieldCount; i++)
{
oTextSection = xTextSections.getByName(GROUPSECTION + String.valueOf(i + 1));
- Helper.setUnoPropertyValue(oTextSection, "IsVisible", new Boolean(_IsVisible));
+ Helper.setUnoPropertyValue(oTextSection, ISVISIBLE, _IsVisible);
}
if (xTextSections.hasByName(RECORDSECTION))
{
oTextSection = xTextSections.getByName(RECORDSECTION);
- Helper.setUnoPropertyValue(oTextSection, "IsVisible", new Boolean(_IsVisible));
+ Helper.setUnoPropertyValue(oTextSection, ISVISIBLE, _IsVisible);
}
}
- catch (Exception exception)
+ catch (Exception e)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger(ReportTextDocument.class.getName()).log(Level.SEVERE, null, e);
}
}
diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
index ceecaf28ba4f..9e73038e14f6 100644
--- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
+++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,16 +30,12 @@ package com.sun.star.wizards.report;
import com.sun.star.awt.VclWindowPeerAttribute;
import com.sun.star.awt.XWindowPeer;
import com.sun.star.beans.PropertyValue;
-import com.sun.star.container.NoSuchElementException;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XNameContainer;
import com.sun.star.container.XNamed;
-import com.sun.star.frame.XController;
import com.sun.star.frame.XFrame;
-import com.sun.star.lang.IllegalArgumentException;
import com.sun.star.lang.XComponent;
import com.sun.star.sdb.CommandType;
-import com.sun.star.sdbc.SQLException;
import com.sun.star.table.XCellRange;
import com.sun.star.text.XTextContent;
import com.sun.star.text.XTextCursor;
@@ -57,9 +53,9 @@ import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.sdb.application.DatabaseObject;
import com.sun.star.sdb.application.XDatabaseDocumentUI;
+import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.common.SystemDialog;
import com.sun.star.wizards.db.DBMetaData;
-import com.sun.star.wizards.db.SQLQueryComposer;
import com.sun.star.wizards.document.OfficeDocument;
import com.sun.star.wizards.ui.UIConsts;
import java.util.ArrayList;
@@ -193,8 +189,8 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
Helper.setUnoPropertyValue(xTextSection, "LinkRegion", sLinkRegion);
if (CurDBColumn != null)
{
- boolean bIsGroupTable = (sLinkRegion.equals(ReportTextDocument.RECORDSECTION) != true);
- if (bIsGroupTable == true)
+ boolean bIsGroupTable = (!sLinkRegion.equals(ReportTextDocument.RECORDSECTION));
+ if (bIsGroupTable)
{
XTextTable xTextTable = getDoc().oTextTableHandler.getlastTextTable();
XCellRange xCellRange = UnoRuntime.queryInterface( XCellRange.class, xTextTable );
@@ -202,9 +198,9 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
}
}
}
- catch (Exception exception)
+ catch (Exception ex)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger( ReportTextImplementation.class.getName() ).log( Level.SEVERE, null, ex );
}
return xNamedTextSection;
}
@@ -228,40 +224,54 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
XNameContainer xNamedForms = getDoc().oFormHandler.getDocumentForms();
Object oDBForm = Helper.getUnoObjectbyName(xNamedForms, ReportWizard.SOREPORTFORMNAME);
boolean bgetConnection;
- String sQueryName = "";
+ String sQueryName = PropertyNames.EMPTY_STRING;
if (oDBForm != null)
{
String sMsg = sMsgHiddenControlMissing + (char) 13 + sMsgEndAutopilot;
XNameAccess xNamedForm = UnoRuntime.queryInterface( XNameAccess.class, oDBForm );
- getRecordParser().Command = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "Command", sMsg);
- String sCommandType = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "CommandType", sMsg);
+ getRecordParser().Command = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, PropertyNames.COMMAND, sMsg);
+ String sCommandType = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, PropertyNames.COMMAND_TYPE, sMsg);
String sGroupFieldNames = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "GroupFieldNames", sMsg);
String sFieldNames = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "FieldNames", sMsg);
+ final String sorting = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "Sorting", sMsg);
String sRecordFieldNames = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "RecordFieldNames", sMsg);
if (xNamedForm.hasByName("QueryName"))
{
sQueryName = getDoc().oFormHandler.getValueofHiddenControl(xNamedForm, "QueryName", sMsg);
}
- String[] sFieldNameList = JavaTools.ArrayoutofString(sFieldNames, ";");
- String[] sNewList = JavaTools.ArrayoutofString(sRecordFieldNames, ";");
+ String[] sFieldNameList = JavaTools.ArrayoutofString(sFieldNames, PropertyNames.SEMI_COLON);
+ String[] sNewList = JavaTools.ArrayoutofString(sRecordFieldNames, PropertyNames.SEMI_COLON);
+ if ( !PropertyNames.EMPTY_STRING.equals(sorting))
+ {
+ String[] sortList = JavaTools.ArrayoutofString(sorting, PropertyNames.SEMI_COLON);
+ ArrayList<String[]> aSortFields = new ArrayList<String[]>();
+ for (String sortEntry : sortList)
+ {
+ aSortFields.add(JavaTools.ArrayoutofString(sortEntry, ","));
+ }
+ String[][] sortFieldNames = new String[aSortFields.size()][2];
+ aSortFields.toArray(sortFieldNames);
+ getRecordParser().setSortFieldNames(sortFieldNames);
+ }
getRecordParser().setRecordFieldNames(sNewList);
- getRecordParser().GroupFieldNames = JavaTools.ArrayoutofString(sGroupFieldNames, ";");
+ getRecordParser().GroupFieldNames = JavaTools.ArrayoutofString(sGroupFieldNames, PropertyNames.SEMI_COLON);
getRecordParser().setCommandType(Integer.valueOf(sCommandType).intValue());
+
sMsgQueryCreationImpossible = JavaTools.replaceSubString(sMsgQueryCreationImpossible, getRecordParser().Command, "<STATEMENT>");
bgetConnection = getRecordParser().getConnection(_properties);
int nCommandType = com.sun.star.sdb.CommandType.COMMAND;
boolean bexecute = false;
if (bgetConnection)
{
-
- if ((getRecordParser().getCommandType() == CommandType.QUERY) && (getRecordParser().Command.equals("")))
+ if ((getRecordParser().getCommandType() == CommandType.QUERY) && (getRecordParser().Command.equals(PropertyNames.EMPTY_STRING)))
{
DBMetaData.CommandObject oCommand = getRecordParser().getQueryByName(sQueryName);
if (getRecordParser().hasEscapeProcessing(oCommand.getPropertySet()))
{
- getRecordParser().Command = (String) oCommand.getPropertySet().getPropertyValue("Command");
+ getRecordParser().Command = (String) oCommand.getPropertySet().getPropertyValue(PropertyNames.COMMAND);
getRecordParser().getSQLQueryComposer().m_xQueryAnalyzer.setQuery(getRecordParser().Command);
getRecordParser().getSQLQueryComposer().prependSortingCriteria();
+ getRecordParser().Command = getRecordParser().getSQLQueryComposer().getQuery();
}
else
{
@@ -293,13 +303,14 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
{
return false;
}
- catch (java.lang.Exception javaexception)
+ catch (java.lang.Exception ex)
{
- javaexception.printStackTrace(System.out);
+ Logger.getLogger( ReportTextImplementation.class.getName() ).log( Level.SEVERE, null, ex );
return false;
}
- catch (com.sun.star.wizards.document.FormHandler.UnknownHiddenControlException exception)
+ catch (com.sun.star.wizards.document.FormHandler.UnknownHiddenControlException ex)
{
+ Logger.getLogger( ReportTextImplementation.class.getName() ).log( Level.SEVERE, null, ex );
return false;
}
}
@@ -322,8 +333,6 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
Object CurGroupValue;
String CurGroupTableName;
// RecordParser CurDBMetaData = getRecordParser();
- com.sun.star.style.BreakType CorrBreakValue = null;
- String CorrPageDescName = "";
getDoc().oTextFieldHandler.fixDateFields(true);
getDoc().removeAllVisibleTextSections();
getDoc().removeNonLayoutTextTables();
@@ -338,7 +347,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
XTextCursor xTextCursor = ReportTextDocument.createTextCursor(getDoc().xTextDocument.getText());
xTextDocument.lockControllers();
- if (getRecordParser().ResultSet.next() == true)
+ if (getRecordParser().ResultSet.next())
{
replaceUserFields();
Helper.setUnoPropertyValue(xTextCursor, "PageDescName", "First Page");
@@ -352,18 +361,18 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
CurDBColumn = (DBColumn) getDoc().DBColumnsVector.elementAt(ColIndex);
addLinkedTextSection(xTextCursor, ReportTextDocument.GROUPSECTION + Integer.toString(ColIndex + 1), CurDBColumn, CurGroupValue); //COPYOF!!!!
}
- if (getRecordParser().getcurrentRecordData(DataVector) == true)
+ if (getRecordParser().getcurrentRecordData(DataVector))
{
// int RowIndex = 1;
m_bStopProcess = false;
- while ((getRecordParser().ResultSet.next() == true) && (m_bStopProcess == false))
+ while ((getRecordParser().ResultSet.next()) && (!m_bStopProcess))
{
// RowIndex += 1;
breset = false;
for (ColIndex = 0; ColIndex < GroupFieldCount; ColIndex++)
{
CurGroupValue = getRecordParser().getGroupColumnValue(ColIndex);
- if ((CurGroupValue.equals(OldGroupFieldValues[ColIndex]) == false) || (breset))
+ if ((!CurGroupValue.equals(OldGroupFieldValues[ColIndex])) || (breset))
{
breset = true;
insertDataToRecordTable(xTextCursor, DataVector, RecordFieldCount);
@@ -389,7 +398,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
for (ColIndex = 0; ColIndex < GroupFieldCount; ColIndex++)
{
CurDBColumn = (DBColumn) getDoc().DBColumnsVector.elementAt(ColIndex);
- Object oValue = "";
+ Object oValue = PropertyNames.EMPTY_STRING;
addLinkedTextSection(xTextCursor, ReportTextDocument.COPYOFGROUPSECTION + Integer.toString(ColIndex + 1), CurDBColumn, oValue);
}
addLinkedTextSection(xTextCursor, ReportTextDocument.COPYOFRECORDSECTION, null, null);
@@ -403,10 +412,11 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
}
getDoc().oTextSectionHandler.breakLinkofTextSections();
}
- catch (Exception exception)
+ catch (Exception ex)
{
+ Logger.getLogger( ReportTextImplementation.class.getName() ).log( Level.SEVERE, null, ex );
}
-// catch (java.lang.Exception javaexception)
+// catch (java.lang.Exception javaexception)
// {
// javaexception.printStackTrace(System.out);
// }
@@ -434,18 +444,18 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
}
DataVector.removeAllElements();
}
-// public void updateProgressDisplay(int iCounter)
+// public void updateProgressDisplay(int iCounter)
// {
-// try
+// try
// {
-// if (iCounter % 10 == 0)
+// if (iCounter % 10 == 0)
// {
// sProgressCurRecord = JavaTools.replaceSubString(sProgressBaseCurRecord, String.valueOf(iCounter), "<COUNT>");
// setControlProperty("lblCurProgress", PropertyNames.PROPERTY_LABEL, sProgressCurRecord);
// super.xReschedule.reschedule();
// }
-// }
-// catch (java.lang.Exception jexception)
+// }
+// catch (java.lang.Exception jexception)
// {
// jexception.printStackTrace(System.out);
// }
@@ -462,7 +472,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
xNameCellCursor = ReportTextDocument.createTextCursor(CurDBColumn.xNameCell);
xNameCellCursor.gotoStart(false);
FieldContent = getDoc().oTextFieldHandler.getUserFieldContent(xNameCellCursor);
- if (!FieldContent.equals(""))
+ if (!FieldContent.equals(PropertyNames.EMPTY_STRING))
{
xNameCellCursor.goRight((short) 1, true);
xNameCellCursor.setString(FieldContent);
@@ -629,6 +639,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
}
catch (Exception e)
{
+ Logger.getLogger( ReportTextImplementation.class.getName() ).log( Level.SEVERE, null, e );
}
}
return m_aReportPath;
@@ -646,7 +657,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
return sPath;
}
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
public String getLayoutPath()
@@ -661,7 +672,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
return sPath;
}
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
public int getDefaultPageOrientation()
diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java
index 46fe77fbee38..62cb10a1fad1 100644
--- a/wizards/com/sun/star/wizards/report/ReportWizard.java
+++ b/wizards/com/sun/star/wizards/report/ReportWizard.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -79,7 +79,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
private ReportLayouter CurReportLayouter;
private ReportFinalizer CurReportFinalizer;
private int nReportMode = ReportFinalizer.SOCREATEDOCUMENT;
- private String m_sReportName = "";
+ private String m_sReportName = PropertyNames.EMPTY_STRING;
protected static final String SOREPORTFORMNAME = "ReportSource";
private static final int SOMAINPAGE = 1;
private static final int SOTITLEPAGE = 2;
@@ -103,19 +103,19 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
{
super(i_serviceFactory, 34320, i_wizardContext);
super.addResourceHandler("Report Wizard", "dbw");
- if (getReportResources(false) == true)
+ if (getReportResources(false))
{
Helper.setUnoPropertyValues(xDialogModel,
new String[]
{
PropertyNames.PROPERTY_HEIGHT,
- "Moveable",
+ PropertyNames.PROPERTY_MOVEABLE,
PropertyNames.PROPERTY_NAME,
PropertyNames.PROPERTY_POSITION_X,
PropertyNames.PROPERTY_POSITION_Y,
PropertyNames.PROPERTY_STEP,
PropertyNames.PROPERTY_TABINDEX,
- "Title",
+ PropertyNames.PROPERTY_TITLE,
PropertyNames.PROPERTY_WIDTH
},
new Object[]
@@ -123,12 +123,12 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
Integer.valueOf(210),
Boolean.TRUE,
"DialogReport",
- new Integer(102),
- new Integer(41),
- new Integer(1),
+ 102,
+ 41,
+ 1,
new Short((short) 0),
sMsgWizardName,
- new Integer(310)
+ 310
});
drawNaviBar();
setRightPaneHeaders(this.WizardHeaderText);
@@ -245,7 +245,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
private void dialogFinish()
{
this.xComponent.dispose();
- if (bCloseDocument == true)
+ if (bCloseDocument)
{
m_reportDocument.dispose();
return;
@@ -272,10 +272,17 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
final SQLQueryComposer sqlQueryComposer = recordParser.getSQLQueryComposer();
if (this.CurDBCommandFieldSelection.getSelectedCommandType() == CommandType.TABLE)
{
- bQueryCreated = sqlQueryComposer.setQueryCommand(this.xWindow, false, false);
- m_reportDocument.setCommandType(CommandType.COMMAND);
- String sQuery = sqlQueryComposer.getQuery();
- m_reportDocument.setCommand(sQuery);
+ if (m_reportDocument instanceof ReportTextImplementation)
+ {
+ bQueryCreated = sqlQueryComposer.setQueryCommand(this.xWindow, false, false);
+ m_reportDocument.setCommandType(CommandType.COMMAND);
+ String sQuery = sqlQueryComposer.getQuery();
+ m_reportDocument.setCommand(sQuery);
+ }
+ else
+ {
+ bQueryCreated = true;
+ }
}
else
{
@@ -284,24 +291,25 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
String sQueryName = CurDBCommandFieldSelection.getSelectedCommandName();
DBMetaData.CommandObject oCommand = recordParser.getQueryByName(sQueryName);
bHasEscapeProcessing = recordParser.hasEscapeProcessing(oCommand.getPropertySet());
- String sCommand = (String) oCommand.getPropertySet().getPropertyValue("Command");
+ String sCommand = (String) oCommand.getPropertySet().getPropertyValue(PropertyNames.COMMAND);
if (bHasEscapeProcessing)
{
- // String sCommand = (String) oCommand.xPropertySet.getPropertyValue("Command");
- bQueryCreated = (!sCommand.equals(""));
- sqlQueryComposer.m_xQueryAnalyzer.setQuery(sCommand);
- sqlQueryComposer.prependSortingCriteria();
-// TODO: check with query
- m_reportDocument.setCommandType(CommandType.COMMAND);
- m_reportDocument.setCommand(sqlQueryComposer.getQuery());
- bQueryCreated = true;
+ // String sCommand = (String) oCommand.xPropertySet.getPropertyValue(PropertyNames.COMMAND);
+ bQueryCreated = (!sCommand.equals(PropertyNames.EMPTY_STRING));
+ if (m_reportDocument instanceof ReportTextImplementation)
+ {
+ sqlQueryComposer.m_xQueryAnalyzer.setQuery(sCommand);
+ sqlQueryComposer.prependSortingCriteria();
+ m_reportDocument.setCommandType(CommandType.COMMAND);
+ m_reportDocument.setCommand(sqlQueryComposer.getQuery());
+ }
}
else
{
m_reportDocument.setCommandType(CommandType.COMMAND);
m_reportDocument.setCommand(sCommand);
- bQueryCreated = true;
}
+ bQueryCreated = true;
}
catch (Exception e)
{
@@ -329,7 +337,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
},
new Object[]
{
- new Integer(16), sShowBinaryFields, new Integer(95), new Integer(162), new Integer(1), new Integer(210)
+ 16, sShowBinaryFields, 95, 162, 1, 210
});
}
// CurReportDocument.getDoc().xProgressBar.setValue(40);
@@ -398,12 +406,8 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
{
return false;
}
- if (e.hasMoreElements())
- {
- return true;
+ return e.hasMoreElements();
}
- return false;
- }
/**
* Return the path to the "com.sun.reportdesigner" extension
@@ -416,8 +420,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
final XComponentContext xComponentContext = Helper.getComponentContext(_xMSF);
final Object aSingleton = xComponentContext.getValueByName("/singletons/com.sun.star.deployment.PackageInformationProvider");
XPackageInformationProvider xProvider = UnoRuntime.queryInterface(XPackageInformationProvider.class, aSingleton);
- final String sLocation = xProvider.getPackageLocation("com.sun.reportdesigner");
- return sLocation;
+ return xProvider.getPackageLocation("com.sun.reportdesigner");
}
private static XLogger m_xLogger;
@@ -463,10 +466,8 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
{
XMultiServiceFactory.class
});
- m_reportDocument = (IReportDocument) aMethod.invoke(a, new Object[]
- {
- xMSF
- });
+ m_reportDocument = (IReportDocument) aMethod.invoke(a, xMSF
+ );
}
catch (Exception e)
{
@@ -569,7 +570,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
public boolean getReportResources(boolean bgetProgressResourcesOnly)
{
sMsgWizardName = super.m_oResource.getResText(UIConsts.RID_REPORT);
- if (bgetProgressResourcesOnly == false)
+ if (!bgetProgressResourcesOnly)
{
sShowBinaryFields = m_oResource.getResText(UIConsts.RID_REPORT + 60);
slblTables = m_oResource.getResText(UIConsts.RID_FORM + 6);
@@ -589,7 +590,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
public static String getBlindTextNote(Object _aDocument, Resource _oResource)
{
- String sBlindTextNote = "";
+ String sBlindTextNote = PropertyNames.EMPTY_STRING;
if (_aDocument instanceof ReportTextImplementation)
{
sBlindTextNote = _oResource.getResText(UIConsts.RID_REPORT + 75);
@@ -619,7 +620,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
bEnabled = true;
}
- Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled));
+ Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bEnabled));
}
}
catch (com.sun.star.uno.Exception exception)
@@ -631,8 +632,8 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
private void enableWizardSteps(String[] NewItems)
{
boolean bEnabled = NewItems.length > 0;
- setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled));
- setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled));
+ setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bEnabled));
+ setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bEnabled));
enableRoadmapItems(bEnabled); // Note: Performancewise this could be improved
}
@@ -698,7 +699,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
m_nID = 1;
if (sIncSuffix != null)
{
- if ((!sIncSuffix.equals("")) && (!sIncSuffix.equals("_")))
+ if ((!sIncSuffix.equals(PropertyNames.EMPTY_STRING)) && (!sIncSuffix.equals("_")))
{
String sID = JavaTools.ArrayoutofString(sIncSuffix, "_")[1];
m_nID = Integer.parseInt(sID);
@@ -717,7 +718,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
else
{
boolean bEnabled = (CurGroupFieldSelection.getSelectedFieldNames().length > 0);
- Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPPAGE), PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled));
+ Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPPAGE), PropertyNames.PROPERTY_ENABLED, bEnabled);
}
}
@@ -732,7 +733,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
else
{
boolean bEnabled = (CurGroupFieldSelection.getSelectedFieldNames().length > 0);
- Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPPAGE), PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled));
+ Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPPAGE), PropertyNames.PROPERTY_ENABLED, bEnabled);
}
}
@@ -761,7 +762,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
// long nTime = aDate.getTime();
// Long aLong = new Long(nTime);
// String aStr = aLong.toString();
-//
+//
// Date aNewDate = new Date(1202382900000L);
//// aNewDate.
// String aDateStr = aNewDate.toString();
diff --git a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java
index 6a90214696a5..9e40a0833f32 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,7 +33,6 @@ import com.sun.star.awt.XWindowPeer;
import com.sun.star.beans.PropertyValue;
import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XHierarchicalNameContainer;
-import com.sun.star.container.XNameContainer;
import com.sun.star.frame.XController;
import com.sun.star.frame.XDispatch;
import com.sun.star.frame.XDispatchProvider;
@@ -60,6 +59,7 @@ import java.util.Set;
import java.util.Vector;
import com.sun.star.wizards.common.FileAccess;
import com.sun.star.wizards.common.NamedValueCollection;
+import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.report.IReportBuilderLayouter;
import com.sun.star.wizards.report.IReportDefinitionReadAccess;
import com.sun.star.wizards.report.IReportDocument;
@@ -78,23 +78,24 @@ import java.util.logging.Logger;
public class ReportBuilderImplementation extends ReportImplementationHelper
implements IReportDocument, IReportDefinitionReadAccess
{
- private Resource m_resource;
- private XDatabaseDocumentUI m_documentUI;
+ private Resource m_resource;
+ private XDatabaseDocumentUI m_documentUI;
private static final int MAXIMUM_GROUPCOUNT = 4;
+ private String[] groupNames = null;
- private ReportBuilderImplementation( XMultiServiceFactory _serviceFactory )
+ private ReportBuilderImplementation(XMultiServiceFactory _serviceFactory)
{
// creates an access to the ReportBuilder Extension
super(_serviceFactory, ReportLayouter.SOOPTLANDSCAPE);
}
- public static IReportDocument create( XMultiServiceFactory i_serviceFactory )
+ public static IReportDocument create(XMultiServiceFactory i_serviceFactory)
{
- return new ReportBuilderImplementation( i_serviceFactory );
+ return new ReportBuilderImplementation(i_serviceFactory);
}
- public void initialize( final XDatabaseDocumentUI i_documentUI, final Resource i_resource )
+ public void initialize(final XDatabaseDocumentUI i_documentUI, final Resource i_resource)
{
m_documentUI = i_documentUI;
m_resource = i_resource;
@@ -106,12 +107,11 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
public XWindowPeer getWizardParent()
{
- final XWindowPeer aWindowPeer = UnoRuntime.queryInterface( XWindowPeer.class, getFrame().getComponentWindow() );
- return aWindowPeer;
+ return UnoRuntime.queryInterface(XWindowPeer.class, getFrame().getComponentWindow());
}
private XFrame m_xFrame = null;
// private ReportBuilderLayouter m_aReportBuilderLayouter = null;
- private String m_sReportBuilderLayoutName = "";
+ private String m_sReportBuilderLayoutName = PropertyNames.EMPTY_STRING;
/**
* Get access to the current ReportLayouter, which depends on the name.
@@ -120,8 +120,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
*/
private IReportBuilderLayouter getReportBuilderLayouter()
{
- final IReportBuilderLayouter aReportBuilderLayouter = (IReportBuilderLayouter) getLayoutMap().get(m_sReportBuilderLayoutName);
- return aReportBuilderLayouter;
+ return (IReportBuilderLayouter) getLayoutMap().get(m_sReportBuilderLayoutName);
}
private Object m_aReportDocument;
private XPropertySet m_documentDefinition;
@@ -139,15 +138,18 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
try
{
NamedValueCollection creationArgs = new NamedValueCollection();
- creationArgs.put( "DocumentServiceName", "com.sun.star.report.ReportDefinition" );
- creationArgs.put( "Mode", "remote" );
+ creationArgs.put("DocumentServiceName", "com.sun.star.report.ReportDefinition");
+ creationArgs.put("Mode", "remote");
- XComponent[] docDefinition = new XComponent[] { null };
+ XComponent[] docDefinition = new XComponent[]
+ {
+ null
+ };
XComponent reportDefinitionComp = m_documentUI.createComponentWithArguments(
- DatabaseObject.REPORT, creationArgs.getPropertyValues(), docDefinition );
+ DatabaseObject.REPORT, creationArgs.getPropertyValues(), docDefinition);
- m_documentDefinition = UnoRuntime.queryInterface( XPropertySet.class, docDefinition[0] );
- m_reportDocument = UnoRuntime.queryInterface( XReportDefinition.class, reportDefinitionComp );
+ m_documentDefinition = UnoRuntime.queryInterface(XPropertySet.class, docDefinition[0]);
+ m_reportDocument = UnoRuntime.queryInterface(XReportDefinition.class, reportDefinitionComp);
}
catch (com.sun.star.uno.Exception e)
{
@@ -164,8 +166,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
private XModeSelector getModeSelector()
{
final XController xController = getReportDefinition().getCurrentController();
- final XModeSelector xModeSelector = UnoRuntime.queryInterface( XModeSelector.class, xController );
- return xModeSelector;
+ return UnoRuntime.queryInterface(XModeSelector.class, xController);
}
private void switchOffAddFieldWindow()
@@ -209,11 +210,11 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
try
{
final XController xController = getReportDefinition().getCurrentController();
- final XDispatchProvider xDP = UnoRuntime.queryInterface( XDispatchProvider.class, xController );
+ final XDispatchProvider xDP = UnoRuntime.queryInterface(XDispatchProvider.class, xController);
// Create special service for parsing of given URL.
final Object aURLTransformer = getMSF().createInstance("com.sun.star.util.URLTransformer");
- final XURLTransformer xURLTransformer = UnoRuntime.queryInterface( com.sun.star.util.XURLTransformer.class, aURLTransformer );
+ final XURLTransformer xURLTransformer = UnoRuntime.queryInterface(com.sun.star.util.XURLTransformer.class, aURLTransformer);
com.sun.star.util.URL[] aURL = new com.sun.star.util.URL[1];
aURL[0] = new com.sun.star.util.URL();
@@ -273,14 +274,14 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
return;
}
- final XCommandProcessor xProcessor = UnoRuntime.queryInterface( XCommandProcessor.class, m_documentDefinition );
+ final XCommandProcessor xProcessor = UnoRuntime.queryInterface(XCommandProcessor.class, m_documentDefinition);
final com.sun.star.ucb.Command aCommand = new com.sun.star.ucb.Command();
aCommand.Name = "store";
xProcessor.execute(aCommand, xProcessor.createCommandIdentifier(), null);
final XHierarchicalNameContainer aNameContainer = UnoRuntime.queryInterface(XHierarchicalNameContainer.class, m_aReportDocument);
- aNameContainer.insertByHierarchicalName( Name, m_documentDefinition );
+ aNameContainer.insertByHierarchicalName(Name, m_documentDefinition);
}
public boolean liveupdate_addGroupNametoDocument(String[] GroupNames, String CurGroupTitle, Vector GroupFieldVector, ArrayList ReportPath, int iSelCount)
@@ -328,7 +329,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
/**
* Change the current Layouter by a new one with the given Name _sName.
- * If there exist no other layouter with the given name, nothing happens, the layouter will not change to
+ * If there exist no other layouter with the given name, nothing happens, the layouter will not change to
* an illegal one.
* @param _sName Name of the other layouter.
*/
@@ -366,19 +367,19 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
{
try
{
- if ( m_documentDefinition != null )
+ if (m_documentDefinition != null)
{
// set the document to "not modified", to ensure that it won't ask the user before closing
- XModifiable documentModify = UnoRuntime.queryInterface( XModifiable.class, m_reportDocument );
- documentModify.setModified( false );
+ XModifiable documentModify = UnoRuntime.queryInterface(XModifiable.class, m_reportDocument);
+ documentModify.setModified(false);
// actually close
- XSubDocument subComponent = UnoRuntime.queryInterface( XSubDocument.class, m_documentDefinition );
+ XSubDocument subComponent = UnoRuntime.queryInterface(XSubDocument.class, m_documentDefinition);
subComponent.close();
}
}
- catch ( Exception ex )
+ catch (Exception ex)
{
- Logger.getLogger( ReportBuilderImplementation.class.getName() ).log( Level.SEVERE, null, ex );
+ Logger.getLogger(ReportBuilderImplementation.class.getName()).log(Level.SEVERE, null, ex);
}
m_documentDefinition = null;
m_reportDocument = null;
@@ -407,15 +408,15 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
{
}
- private XComponent loadReport( final String i_reportName )
+ private XComponent loadReport(final String i_reportName)
{
try
{
- return m_documentUI.loadComponent( DatabaseObject.REPORT, i_reportName, false );
+ return m_documentUI.loadComponent(DatabaseObject.REPORT, i_reportName, false);
}
- catch ( Exception ex )
+ catch (Exception ex)
{
- Logger.getLogger( ReportBuilderImplementation.class.getName() ).log( Level.SEVERE, null, ex );
+ Logger.getLogger(ReportBuilderImplementation.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
}
@@ -428,19 +429,19 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
aCommand.Name = "open";
try
{
- final Object result = commandProcessor.execute( aCommand, commandProcessor.createCommandIdentifier(), null );
- return UnoRuntime.queryInterface( XComponent.class, result );
+ final Object result = commandProcessor.execute(aCommand, commandProcessor.createCommandIdentifier(), null);
+ return UnoRuntime.queryInterface(XComponent.class, result);
}
- catch ( Exception ex )
+ catch (Exception ex)
{
- Logger.getLogger( ReportBuilderImplementation.class.getName() ).log( Level.SEVERE, null, ex );
+ Logger.getLogger(ReportBuilderImplementation.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
}
- public void createAndOpenReportDocument( String i_name, boolean i_asTemplate, boolean i_openForEditing )
+ public void createAndOpenReportDocument(String i_name, boolean i_asTemplate, boolean i_openForEditing)
{
- if ( i_openForEditing )
+ if (i_openForEditing)
{
// we won't destroy the report builder window, also don't create a document
// Do we need to reopen the report builder with the known name?
@@ -449,13 +450,13 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
return;
}
- if ( i_asTemplate )
+ if (i_asTemplate)
{
// don't need the report definition anymore - the document it represents has already been stored
closeReportDefinition();
// open the report, again, this time not in design, but containing data
- loadReport( i_name );
+ loadReport(i_name);
}
else
{
@@ -466,8 +467,10 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
closeReportDefinition();
// store the generated report
- if ( getRecordParser().storeDatabaseDocumentToTempPath( document, i_name ) )
- getRecordParser().addReportDocument( document, false );
+ if (getRecordParser().storeDatabaseDocumentToTempPath(document, i_name))
+ {
+ getRecordParser().addReportDocument(document, false);
+ }
}
dispose();
@@ -509,10 +512,17 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
public void setSorting(String[][] _aSortFieldNames)
{
getRecordParser().setSortFieldNames(_aSortFieldNames);
+ if (groupNames != null)
+ {
+ getRecordParser().prependSortFieldNames(groupNames);
+ }
+ getReportBuilderLayouter().insertSortingNames(_aSortFieldNames);
+ getReportBuilderLayouter().layout();
}
public void setGrouping(String[] _aGroupFieldNames)
{
+ groupNames = _aGroupFieldNames;
getRecordParser().prependSortFieldNames(_aGroupFieldNames);
getReportBuilderLayouter().insertGroupNames(_aGroupFieldNames);
@@ -532,12 +542,12 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
try
{
// Check general availability of office paths
- m_aReportPath = FileAccess.getOfficePaths( getMSF(), "Template", "share", "/wizard" );
- FileAccess.combinePaths( getMSF(), m_aReportPath, "/wizard/report" );
+ m_aReportPath = FileAccess.getOfficePaths(getMSF(), "Template", "share", "/wizard");
+ FileAccess.combinePaths(getMSF(), m_aReportPath, "/wizard/report");
}
- catch ( NoValidPathException ex )
+ catch (NoValidPathException ex)
{
- Logger.getLogger( ReportBuilderImplementation.class.getName() ).log( Level.SEVERE, null, ex );
+ Logger.getLogger(ReportBuilderImplementation.class.getName()).log(Level.SEVERE, null, ex);
}
}
return m_aReportPath;
@@ -545,7 +555,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
public String getContentPath()
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
public int getDefaultPageOrientation()
@@ -573,8 +583,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
Object[] aParams = new Object[2];
aParams[0] = this;
aParams[1] = m_resource;
- final IReportBuilderLayouter aReportBuilderLayouter = (IReportBuilderLayouter) cTor.newInstance(aParams);
- return aReportBuilderLayouter;
+ return (IReportBuilderLayouter) cTor.newInstance(aParams);
}
catch (Exception e)
{
@@ -642,7 +651,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
String[] a = new String[getLayoutMap().size()];
String[] b = new String[getLayoutMap().size()];
- // run through the whole layoutmap and
+ // run through the whole layoutmap and
final Set aKeys = getLayoutMap().keySet();
final Iterator aKeyIterator = aKeys.iterator();
int i = 0;
@@ -727,7 +736,6 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
getReportDefinition().setCommandType(_nCommand);
}
-
public void checkInvariants() throws java.lang.Exception
{
final String sDefaultHeaderLayoutPath = getDefaultHeaderLayout();
@@ -737,12 +745,9 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
}
FileAccess aAccess = new FileAccess(getGlobalMSF());
- if (! aAccess.exists(sDefaultHeaderLayoutPath, true))
+ if (!aAccess.exists(sDefaultHeaderLayoutPath, true))
{
throw new java.io.IOException("default.otr");
}
}
-
}
-
-
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java
index ccb74ebf6f07..8bd706a32241 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,6 +28,7 @@
package com.sun.star.wizards.reportbuilder.layout;
import com.sun.star.awt.Rectangle;
+import com.sun.star.report.XGroup;
import com.sun.star.report.XSection;
import com.sun.star.wizards.common.Resource;
import com.sun.star.wizards.report.IReportDefinitionReadAccess;
@@ -52,8 +53,7 @@ public class ColumnarSingleColumn extends ReportBuilderLayouter
public String getLocalizedName()
{
- final String sLocalizedName = getResource().getResText(UIConsts.RID_REPORT + 81);
- return sLocalizedName;
+ return getResource().getResText(UIConsts.RID_REPORT + 81);
}
protected void insertDetailFields()
@@ -98,7 +98,7 @@ public class ColumnarSingleColumn extends ReportBuilderLayouter
doNotBreakInTable(xSection);
}
- protected void insertDetailFieldTitles()
+ protected void insertDetailFieldTitles(int lastGroupPostion)
{
// we won't extra field titles
}
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarThreeColumns.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarThreeColumns.java
index 2dc468fb09e7..288180921f5e 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarThreeColumns.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarThreeColumns.java
@@ -1,8 +1,8 @@
/*
* ***********************************************************************
- *
+ *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,8 +51,7 @@ public class ColumnarThreeColumns extends ColumnarTwoColumns
public String getLocalizedName()
{
- final String sLocalizedName = getResource().getResText(UIConsts.RID_REPORT + 83);
- return sLocalizedName;
+ return getResource().getResText(UIConsts.RID_REPORT + 83);
}
protected void insertDetailFields()
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java
index d79713524021..0060ca7f3b9f 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,6 +28,7 @@
package com.sun.star.wizards.reportbuilder.layout;
import com.sun.star.awt.Rectangle;
+import com.sun.star.report.XGroup;
import com.sun.star.report.XSection;
import com.sun.star.wizards.common.Resource;
import com.sun.star.wizards.report.IReportDefinitionReadAccess;
@@ -52,8 +53,7 @@ public class ColumnarTwoColumns extends ReportBuilderLayouter
public String getLocalizedName()
{
- final String sLocalizedName = getResource().getResText(UIConsts.RID_REPORT + 82);
- return sLocalizedName;
+ return getResource().getResText(UIConsts.RID_REPORT + 82);
}
protected void insertDetailFields()
@@ -130,7 +130,7 @@ public class ColumnarTwoColumns extends ReportBuilderLayouter
doNotBreakInTable(xSection);
}
- protected void insertDetailFieldTitles()
+ protected void insertDetailFieldTitles(int lastGroupPostion)
{
// we won't extra field titles
}
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java b/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java
index 55fdafe6c79a..e5c2089963a2 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java
@@ -1,8 +1,8 @@
/*
* ***********************************************************************
- *
+ *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,6 +41,7 @@ import com.sun.star.report.XReportDefinition;
import com.sun.star.report.XSection;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.wizards.common.Properties;
+import com.sun.star.wizards.common.PropertyNames;
/**
*
@@ -180,7 +181,7 @@ public class DesignTemplate
// is aObj a textfield
// m_aDetailLabel_FD
// m_aDetailTextField_FD
- XFixedText aFixedText = (XFixedText) UnoRuntime.queryInterface(XFixedText.class, aObj);
+ XFixedText aFixedText = UnoRuntime.queryInterface(XFixedText.class, aObj);
if (aFixedText != null &&
m_aDetailLabel == null)
{
@@ -188,7 +189,7 @@ public class DesignTemplate
}
else
{
- XFormattedField aFormattedField = (XFormattedField) UnoRuntime.queryInterface(XFormattedField.class, aObj);
+ XFormattedField aFormattedField = UnoRuntime.queryInterface(XFormattedField.class, aObj);
if (aFormattedField != null &&
m_aDetailTextField == null)
{
@@ -217,7 +218,7 @@ public class DesignTemplate
try
{
Object aGroup = xGroups.getByIndex(nGroup);
- XGroup xGroup = (XGroup) UnoRuntime.queryInterface(XGroup.class, aGroup);
+ XGroup xGroup = UnoRuntime.queryInterface(XGroup.class, aGroup);
XSection xGroupSection = xGroup.getHeader();
final int nCount = xGroupSection.getCount();
@@ -226,7 +227,7 @@ public class DesignTemplate
try
{
Object aObj = xGroupSection.getByIndex(i);
- XFixedText aFixedText = (XFixedText) UnoRuntime.queryInterface(XFixedText.class, aObj);
+ XFixedText aFixedText = UnoRuntime.queryInterface(XFixedText.class, aObj);
// is aObj a label
// is aObj a textfield
if (aFixedText != null &&
@@ -236,7 +237,7 @@ public class DesignTemplate
}
else
{
- XFormattedField aFormattedField = (XFormattedField) UnoRuntime.queryInterface(XFormattedField.class, aObj);
+ XFormattedField aFormattedField = UnoRuntime.queryInterface(XFormattedField.class, aObj);
if (aFormattedField != null &&
m_aGroupTextField[nGroup] == null)
{
@@ -282,7 +283,7 @@ public class DesignTemplate
/**
* create a new DesignTemplate by try to load a otr file from the given path.
* Internally we store the loaded ReportDefinition.
- *
+ *
* @param _xMSF
* @param _sPath
* @return
@@ -316,11 +317,11 @@ public class DesignTemplate
m_xGlobalMSF = _xMSF;
m_sFilename = _sPath;
final Object aObj = _xMSF.createInstance("com.sun.star.report.ReportDefinition");
- m_xReportDefinition = (XReportDefinition) UnoRuntime.queryInterface(XReportDefinition.class, aObj);
+ m_xReportDefinition = UnoRuntime.queryInterface(XReportDefinition.class, aObj);
PropertyValue[] aLoadProps = new PropertyValue[2];
- aLoadProps[0] = Properties.createProperty("URL", _sPath);
- aLoadProps[1] = Properties.createProperty("ReadOnly", Boolean.TRUE);
+ aLoadProps[0] = Properties.createProperty(PropertyNames.URL, _sPath);
+ aLoadProps[1] = Properties.createProperty(PropertyNames.READ_ONLY, Boolean.TRUE);
m_xReportDefinition.load(aLoadProps);
analyseReportDefinition();
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java
index 9fd891a446f2..fe1b2f6f27ee 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java
@@ -1,8 +1,8 @@
/*
* ***********************************************************************
- *
+ *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,6 +29,7 @@
package com.sun.star.wizards.reportbuilder.layout;
import com.sun.star.awt.Rectangle;
+import com.sun.star.report.XGroup;
import com.sun.star.report.XSection;
import com.sun.star.wizards.common.Resource;
import com.sun.star.wizards.report.IReportDefinitionReadAccess;
@@ -53,8 +54,7 @@ public class InBlocksLabelsAbove extends ColumnarTwoColumns
public String getLocalizedName()
{
- final String sLocalizedName = getResource().getResText(UIConsts.RID_REPORT + 85);
- return sLocalizedName;
+ return getResource().getResText(UIConsts.RID_REPORT + 85);
}
protected void insertDetailFields()
@@ -159,7 +159,7 @@ public class InBlocksLabelsAbove extends ColumnarTwoColumns
doNotBreakInTable(xSection);
}
- protected void insertDetailFieldTitles()
+ protected void insertDetailFieldTitles(int lastGroupPostion)
{
// we won't extra field titles
}
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java
index c03cf7cec909..2052c40cfb42 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java
@@ -1,8 +1,8 @@
/*
* ***********************************************************************
- *
+ *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,6 +29,7 @@
package com.sun.star.wizards.reportbuilder.layout;
import com.sun.star.awt.Rectangle;
+import com.sun.star.report.XGroup;
import com.sun.star.report.XSection;
import com.sun.star.wizards.common.Resource;
import com.sun.star.wizards.report.IReportDefinitionReadAccess;
@@ -53,8 +54,7 @@ public class InBlocksLabelsLeft extends ColumnarTwoColumns
public String getLocalizedName()
{
- final String sLocalizedName = getResource().getResText(UIConsts.RID_REPORT + 84);
- return sLocalizedName;
+ return getResource().getResText(UIConsts.RID_REPORT + 84);
}
protected void insertDetailFields()
@@ -126,7 +126,7 @@ public class InBlocksLabelsLeft extends ColumnarTwoColumns
doNotBreakInTable(xSection);
}
- protected void insertDetailFieldTitles()
+ protected void insertDetailFieldTitles(int lastGroupPostion)
{
// we won't extra field titles
}
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/LayoutConstants.java b/wizards/com/sun/star/wizards/reportbuilder/layout/LayoutConstants.java
index c31ce4b5f277..d5261c62dc33 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/LayoutConstants.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/LayoutConstants.java
@@ -2,7 +2,7 @@
* ***********************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java
index 0c2e5af3bd36..6fe96bb2fc94 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java
@@ -1,8 +1,7 @@
-/*
- ************************************************************************
+/************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -72,6 +71,8 @@ import com.sun.star.wizards.report.IReportDefinitionReadAccess;
import com.sun.star.wizards.ui.UIConsts;
import java.util.HashMap;
import java.util.Locale;
+import java.util.logging.Level;
+import java.util.logging.Logger;
/**
* This class is abstract and more like a helper for create different layouts for Report Builder Wizard.
@@ -83,6 +84,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
private IReportDefinitionReadAccess m_xReportDefinitionReadAccess;
private Resource m_aResource;
+ private String[][] m_aSortNames;
/**
* dispose the ReportBuilderLayouter
@@ -91,13 +93,13 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
{
closeDesignTemplate();
m_xReportDefinitionReadAccess = null;
- // m_xReportBuilderLayouter = null;
+ // m_xReportBuilderLayouter = null;
}
/**
* The Constructor is protected, this is a abstract class, use Tabular or other to create an instance.
* @param _xDefinitionAccess
- * @param _aResource
+ * @param _aResource
*/
protected ReportBuilderLayouter(IReportDefinitionReadAccess _xDefinitionAccess, Resource _aResource)
{
@@ -126,7 +128,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
/**
* Layout the complete report new, by all information we know until this time.
- *
+ *
* If there are some information less, it is no problem for this function, they will be leaved out.
* It is possible to call this function after every change, but be careful, could take a little bit longer.
*/
@@ -148,11 +150,11 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
insertPageFooter();
clearGroups();
- insertGroups();
+ int lastGroupPostion = insertGroups();
clearDetails();
// clearFieldTitles();
- insertDetailFieldTitles();
+ insertDetailFieldTitles(lastGroupPostion);
insertDetailFields();
}
catch (java.lang.ArrayIndexOutOfBoundsException e)
@@ -163,13 +165,13 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
{
throw e;
}
- catch (Exception e)
+ catch (Exception ex)
{
- // Exception not set. Not from interest here.
- int dummy = 0;
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex);
}
}
// -------------------------------------------------------------------------
+
/**
* Remove all Groups
*/
@@ -183,16 +185,17 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
{
xGroups.removeByIndex(0);
}
- catch (com.sun.star.uno.Exception e)
+ catch (com.sun.star.uno.Exception ex)
{
- // Exception not set. Not from interest here.
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
// -------------------------------------------------------------------------
+
/**
* Remove all fields
- * @param _xSectionToClear
+ * @param _xSectionToClear
*/
private void emptySection(XSection _xSectionToClear)
{
@@ -206,13 +209,12 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
try
{
final Object aObj = _xSectionToClear.getByIndex(0);
- final XShape aShape = (XShape) UnoRuntime.queryInterface(XShape.class, aObj);
+ final XShape aShape = UnoRuntime.queryInterface(XShape.class, aObj);
_xSectionToClear.remove(aShape);
}
- catch (com.sun.star.uno.Exception e)
+ catch (com.sun.star.uno.Exception ex)
{
- // Exception not set.
- int dummy = 0;
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex);
}
}
@@ -226,8 +228,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
// public void clearFieldTitles()
// {
// }
+
/**
- *
+ *
* @param _nGroupCount
* @return the left indent in 1/100mm
*/
@@ -291,7 +294,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
// get all Page Styles
final Object aPageStylesObj = xNameAccess.getByName(_sStyleName);
- final XNameAccess xContainer = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, aPageStylesObj);
+ final XNameAccess xContainer = UnoRuntime.queryInterface(XNameAccess.class, aPageStylesObj);
// step over all Page Styles, search the one which is in use
final String[] aElementNames = xContainer.getElementNames();
@@ -299,7 +302,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
{
final String sName = aElementNames[i];
final Object aObj = xContainer.getByName(sName);
- final XStyle xStyle = (XStyle) UnoRuntime.queryInterface(XStyle.class, aObj);
+ final XStyle xStyle = UnoRuntime.queryInterface(XStyle.class, aObj);
if (xStyle.isInUse())
{
aUsedStyle = xStyle;
@@ -307,10 +310,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
}
}
- catch (com.sun.star.uno.Exception e)
+ catch (com.sun.star.uno.Exception ex)
{
- // TODO: Exception not set.
- e.printStackTrace();
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex);
}
return aUsedStyle;
}
@@ -352,6 +354,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return m_nPageWidth;
}
// -------------------------------------------------------------------------
+
/**
* Stores the Group names. To insert/create a report with such group names, call layout()
* @param _aGroupNames
@@ -361,6 +364,11 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
m_aGroupNames = _aGroupNames;
}
+ public void insertSortingNames(String[][] _aSortFieldNames)
+ {
+ m_aSortNames = _aSortFieldNames;
+ }
+
protected void copyGroupProperties(int _nGroup)
{
if (getDesignTemplate() != null)
@@ -368,103 +376,111 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
try
{
final XGroups xForeignGroups = getDesignTemplate().getGroups();
- int nGroups = xForeignGroups.getCount();
- Object aForeignGroup = xForeignGroups.getByIndex(_nGroup);
- XGroup xForeignGroup = (XGroup) UnoRuntime.queryInterface(XGroup.class, aForeignGroup);
- XSection xForeignGroupSection = xForeignGroup.getHeader();
-
- if (xForeignGroupSection != null)
+ if (_nGroup < xForeignGroups.getCount())
{
- final XGroups xGroups = getReportDefinition().getGroups();
- Object aGroup = xGroups.getByIndex(_nGroup);
- XGroup xGroup = (XGroup) UnoRuntime.queryInterface(XGroup.class, aGroup);
- XSection xGroupSection = xGroup.getHeader();
+ XGroup xForeignGroup = UnoRuntime.queryInterface(XGroup.class, xForeignGroups.getByIndex(_nGroup));
+ XSection xForeignGroupSection = xForeignGroup.getHeader();
- // copy Properties
- copyProperties(xForeignGroupSection, xGroupSection);
+ if (xForeignGroupSection != null)
+ {
+ final XGroups xGroups = getReportDefinition().getGroups();
+ Object aGroup = xGroups.getByIndex(_nGroup);
+ XGroup xGroup = UnoRuntime.queryInterface(XGroup.class, aGroup);
+ XSection xGroupSection = xGroup.getHeader();
+
+ // copy Properties
+ copyProperties(xForeignGroupSection, xGroupSection);
+ }
}
}
- catch (Exception e)
+ catch (Exception ex)
{
- int dummy = 0;
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
// -------------------------------------------------------------------------
- protected void insertGroups()
- {
- if (m_aGroupNames == null)
- {
- return;
- }
+ protected int insertGroups()
+ {
final XGroups xGroups = getReportDefinition().getGroups();
- final int nLeftPageIndent = getLeftPageIndent();
- final int nLabelWidth = getMaxLabelWidth(); // 3000;
- final int nUsablePageWidth = getPageWidth() - getLeftPageIndent() - getRightPageIndent() - getLeftGroupIndent(getCountOfGroups());
- final int nFieldWidth = nUsablePageWidth - nLabelWidth;
-
- // after done with all groups, we need access to the last group, for set property 'KeepTogether' so we remember it.
- XGroup aLastGroup = null;
+ int lastGroupPosition = -1;
- for (int i = 0; i < m_aGroupNames.length; i++)
+ if (m_aGroupNames != null)
{
- final XGroup xGroup = xGroups.createGroup();
- aLastGroup = xGroup;
+ final int nLeftPageIndent = getLeftPageIndent();
+ final int nLabelWidth = getMaxLabelWidth(); // 3000;
+ final int nUsablePageWidth = getPageWidth() - getLeftPageIndent() - getRightPageIndent() - getLeftGroupIndent(getCountOfGroups());
+ final int nFieldWidth = nUsablePageWidth - nLabelWidth;
- // TODO: debug what the m_aGroupNames are, "field:[...]" or the "fieldname"
- xGroup.setExpression(m_aGroupNames[i]);
- xGroup.setHeaderOn(true);
- // we don't want any group footer (default off)
- // xGroup.setFooterOn(true);
+ XGroup aLastGroup = null;
+ // after done with all groups, we need access to the last group, for set property 'KeepTogether' so we remember it.
- try
+ for (int i = 0; i < m_aGroupNames.length; i++)
{
- // we need to append by hand
- // TODO: documentation is unclear here, that we have to insert by hand
- int nCount = xGroups.getCount();
- xGroups.insertByIndex(nCount, xGroup);
+ lastGroupPosition = i;
+ final XGroup xGroup = xGroups.createGroup();
+ aLastGroup = xGroup;
- final XSection xGroupSection = xGroup.getHeader();
- copyGroupProperties(nCount);
-
- Rectangle aRect = new Rectangle();
- aRect.X = nLeftPageIndent + getLeftGroupIndent(i);
- SectionObject aSO = getDesignTemplate().getGroupLabel(i);
- int nLabelHeight = 0;
-// if (aSO != null)
-// {
- nLabelHeight = aSO.getHeight(LayoutConstants.LabelHeight);
- aRect = insertLabel(xGroupSection, getTitleFromFieldName(m_aGroupNames[i]), aRect, nLabelWidth, aSO);
-// }
-// else
-// {
-// nLabelHeight = 500;
-// aRect = insertBoldLabel(xGroupSection, getTitleFromFieldName(m_aGroupNames[i]), aRect, nLabelWidth);
-// }
- final String sGroupName = convertToFieldName(m_aGroupNames[i]);
- aSO = getDesignTemplate().getGroupTextField(i);
- insertFormattedField(xGroupSection, sGroupName, aRect, nFieldWidth, aSO);
+ xGroup.setExpression(m_aGroupNames[i]);
+ xGroup.setHeaderOn(true);
- // draw a line under the label/formattedfield
- aRect.X = nLeftPageIndent + getLeftGroupIndent(i);
- aRect.Y = nLabelHeight;
- final int nLineWidth = getPageWidth() - getRightPageIndent() - aRect.X;
- final int nLineHeight = LayoutConstants.LineHeight;
- insertHorizontalLine(xGroupSection, aRect, nLineWidth, nLineHeight);
- xGroupSection.setHeight(nLabelHeight + nLineHeight);
+ try
+ {
+ int nCount = xGroups.getCount();
+ xGroups.insertByIndex(nCount, xGroup);
+ final XSection xGroupSection = xGroup.getHeader();
+ copyGroupProperties(nCount);
+
+ Rectangle aRect = new Rectangle();
+ aRect.X = nLeftPageIndent + getLeftGroupIndent(i);
+ SectionObject aSO = getDesignTemplate().getGroupLabel(i);
+ aRect = insertLabel(xGroupSection, getTitleFromFieldName(m_aGroupNames[i]), aRect, nLabelWidth, aSO);
+ final String sGroupName = convertToFieldName(m_aGroupNames[i]);
+ aSO = getDesignTemplate().getGroupTextField(i);
+ aRect = insertFormattedField(xGroupSection, sGroupName, aRect, nFieldWidth, aSO);
+ int height = aRect.Height;
+
+ // draw a line under the label/formattedfield
+ aRect.X = nLeftPageIndent + getLeftGroupIndent(i);
+ aRect.Y = aRect.Height;
+ final int nLineWidth = getPageWidth() - getRightPageIndent() - aRect.X;
+ final int nLineHeight = LayoutConstants.LineHeight;
+ insertHorizontalLine(xGroupSection, aRect, nLineWidth, nLineHeight);
+ xGroupSection.setHeight(height + nLineHeight);
+ }
+ catch (com.sun.star.uno.Exception ex)
+ {
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex);
+ }
}
- catch (com.sun.star.uno.Exception e)
+
+ // hold the inner group together
+ if (aLastGroup != null)
{
- // TODO: Exception not set.
+ doNotBreakInTable(aLastGroup);
}
}
-
- // hold the inner group together
- if (aLastGroup != null)
+ if (m_aSortNames != null)
{
- doNotBreakInTable(aLastGroup);
+ for (String[] sortFieldName : m_aSortNames)
+ {
+ try
+ {
+ final XGroup xGroup = xGroups.createGroup();
+ xGroup.setExpression(sortFieldName[0]);
+ xGroup.setSortAscending(PropertyNames.ASC.equals(sortFieldName[1]));
+ xGroup.setHeaderOn(false);
+ int nCount = xGroups.getCount();
+ xGroups.insertByIndex(nCount, xGroup);
+ }
+ catch (java.lang.Exception ex)
+ {
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ }
}
+ return lastGroupPosition;
}
// -------------------------------------------------------------------------
@@ -487,10 +503,10 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return m_aFieldTitleNames[i];
}
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
- protected int getTypeFromFieldName(String _sField)
+ protected int getTypeFromFieldName(String _sField)
{
for (int i = 0; i < m_aFieldNames.length; i++)
{
@@ -514,6 +530,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return false;
}
// -------------------------------------------------------------------------
+
/**
* Helper to get all field names without the names which are already in the group names
* @param _aList
@@ -542,7 +559,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
for (int i = 0; i < _aList.length; i++)
{
final String sField = _aList[i];
- if (listContains(m_aGroupNames, sField) == true)
+ if (listContains(m_aGroupNames, sField))
{
continue;
}
@@ -578,8 +595,10 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return getNamesWithoutGroupNames(m_aFieldNames, m_aFieldTitleNames);
}
// -------------------------------------------------------------------------
- abstract protected void insertDetailFieldTitles();
+
+ abstract protected void insertDetailFieldTitles(int lastGroupPostion);
// -------------------------------------------------------------------------
+
/**
* Give a list off all field names to insert the field names, call layout()
* @param _aFieldNames
@@ -627,12 +646,14 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
copyProperties(xForeignSection, xSection);
}
}
- catch (Exception e)
+ catch (Exception ex)
{
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
// -------------------------------------------------------------------------
+
protected Rectangle insertLabel(XSection _xSection, String _sLabel, Rectangle _aRect, int _nWidth, SectionObject _aSO)
{
if (_xSection != null)
@@ -640,7 +661,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
try
{
final Object aFixedText = getMSFofReportDefinition().createInstance("com.sun.star.report.FixedText");
- final XFixedText xFixedText = (XFixedText) UnoRuntime.queryInterface(XFixedText.class, aFixedText);
+ final XFixedText xFixedText = UnoRuntime.queryInterface(XFixedText.class, aFixedText);
int nHeight = LayoutConstants.LabelHeight; // default height of label is fixed.
@@ -678,15 +699,15 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
xFixedText.setHeight(nHeight);
_xSection.add(xFixedText);
}
- catch (com.sun.star.uno.Exception e)
+ catch (com.sun.star.uno.Exception ex)
{
- // TODO: Exception not set.
- int dummy = 0;
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex);
}
}
return _aRect;
}
// -------------------------------------------------------------------------
+
protected String convertToFieldName(String _sElementName)
{
final StringBuffer aDataField = new StringBuffer(32);
@@ -694,27 +715,28 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return aDataField.toString();
}
+
protected String convertFromFieldName(String _sName)
{
if (_sName.startsWith("field:["))
{
int nCloseBrace = _sName.lastIndexOf("]");
- final String sName = _sName.substring(7, nCloseBrace).trim();
- return sName;
+ return _sName.substring(7, nCloseBrace).trim();
}
return _sName;
}
// -------------------------------------------------------------------------
+
/**
* Insert a already formatted field name into a given section
- *
+ *
* Use 'convertToFieldName(dbfield)' to convert a dbfield name in the right.
- *
+ *
* @param _xSection in which section the formatted field will store
* @param _sFormattedfield as String a dbfield or an other function
* @param _aRect .X, .Y are the absolute position (1/100mm) where the formatted field will set
* @param _nWidth the width of the field in 1/100mm
- * @param _aSO
+ * @param _aSO
* @return a new Rectangle with the new Rect.X position, Rect.Y will not change.
*/
protected Rectangle insertFormattedField(XSection _xSection, String _sFormattedfield, Rectangle _aRect, int _nWidth, SectionObject _aSO)
@@ -732,9 +754,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
int nHeight = LayoutConstants.FormattedFieldHeight;
int nType = getTypeFromFieldName(convertFromFieldName(_sFormattedfield));
- if (nType == DataType.BINARY ||
- nType == DataType.VARBINARY ||
- nType == DataType.LONGVARBINARY)
+ if (nType == DataType.BINARY
+ || nType == DataType.VARBINARY
+ || nType == DataType.LONGVARBINARY)
{
aField = getMSFofReportDefinition().createInstance("com.sun.star.report.ImageControl");
nHeight = LayoutConstants.BinaryHeight;
@@ -744,20 +766,21 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
aField = getMSFofReportDefinition().createInstance("com.sun.star.report.FormattedField");
nHeight = LayoutConstants.FormattedFieldHeight;
if (nType == DataType.LONGVARCHAR) /* memo */
+
{
nHeight = LayoutConstants.MemoFieldHeight; // special case for memo
}
}
_aRect.Height = nHeight;
- final XReportControlModel xReportControlModel = (XReportControlModel) UnoRuntime.queryInterface(XReportControlModel.class, aField);
+ final XReportControlModel xReportControlModel = UnoRuntime.queryInterface(XReportControlModel.class, aField);
if (xReportControlModel != null)
{
// #i86907# not documented right in idl description.
xReportControlModel.setDataField(_sFormattedfield);
if (_aSO != null)
{
- // TODO: there seems to be some problems with copy all properties from the design template to the current design
+ // TODO: there seems to be some problems with copy all properties from the design template to the current design
final FontDescriptor aFD = _aSO.getFontDescriptor();
if (aFD != null)
{
@@ -772,12 +795,12 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
_aRect.X += _nWidth;
xReportControlModel.setHeight(nHeight);
- if (nType == DataType.BINARY ||
- nType == DataType.VARBINARY ||
- nType == DataType.LONGVARBINARY)
+ if (nType == DataType.BINARY
+ || nType == DataType.VARBINARY
+ || nType == DataType.LONGVARBINARY)
{
// aField = getMSFofReportDefinition().createInstance("com.sun.star.report.ImageControl");
- final XImageControl xImageControl = (XImageControl) UnoRuntime.queryInterface(XImageControl.class, xReportControlModel);
+ final XImageControl xImageControl = UnoRuntime.queryInterface(XImageControl.class, xReportControlModel);
if (xImageControl != null)
{
// xImageControl.setScaleImage(true);
@@ -795,19 +818,19 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
// xReportControlModel.???
// }
}
- catch (com.sun.star.beans.UnknownPropertyException e)
+ catch (com.sun.star.beans.UnknownPropertyException ex)
{
- // seems we not able to set ParaAdjust
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex);
}
}
// spezial case rpt:now() (default date format)
if (_sFormattedfield.equals("rpt:now()"))
{
- final XFormattedField xFormattedField = (XFormattedField) UnoRuntime.queryInterface(XFormattedField.class, xReportControlModel);
+ final XFormattedField xFormattedField = UnoRuntime.queryInterface(XFormattedField.class, xReportControlModel);
XNumberFormatsSupplier x = xFormattedField.getFormatsSupplier();
XNumberFormats xFormats = x.getNumberFormats();
- XNumberFormatTypes x3 = (XNumberFormatTypes) UnoRuntime.queryInterface(XNumberFormatTypes.class, xFormats);
+ XNumberFormatTypes x3 = UnoRuntime.queryInterface(XNumberFormatTypes.class, xFormats);
Locale.getDefault();
com.sun.star.lang.Locale aLocale = new com.sun.star.lang.Locale();
aLocale.Country = Locale.getDefault().getCountry();
@@ -819,10 +842,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
_xSection.add(xReportControlModel);
}
}
- catch (com.sun.star.uno.Exception e)
+ catch (com.sun.star.uno.Exception ex)
{
- // TODO: Exception not set.
- int dummy = 0;
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex);
}
}
return _aRect;
@@ -845,12 +867,12 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
{
if (m_xMSF == null)
{
- final XMultiServiceFactory xMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, getReportDefinition());
- m_xMSF = xMSF;
+ m_xMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, getReportDefinition());
}
return m_xMSF;
}
// -------------------------------------------------------------------------
+
protected Rectangle insertVerticalLine(XSection _xSection, Rectangle _aRect, int _nWidth, int _nHeight)
{
return insertLine(_xSection, _aRect, _nWidth, _nHeight, 1);
@@ -868,7 +890,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
try
{
final Object aFixedLine = getMSFofReportDefinition().createInstance("com.sun.star.report.FixedLine");
- final XFixedLine xFixedLine = (XFixedLine) UnoRuntime.queryInterface(XFixedLine.class, aFixedLine);
+ final XFixedLine xFixedLine = UnoRuntime.queryInterface(XFixedLine.class, aFixedLine);
xFixedLine.setOrientation(_nOrientation);
// TODO: line width is fixed
@@ -882,15 +904,15 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
xFixedLine.setHeight(_nHeight);
_xSection.add(xFixedLine);
}
- catch (com.sun.star.uno.Exception e)
+ catch (com.sun.star.uno.Exception ex)
{
- // TODO: Exception not set.
- int dummy = 0;
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex);
}
}
return _aRect;
}
// -------------------------------------------------------------------------
+
protected void clearReportHeader()
{
XSection xSection;
@@ -902,9 +924,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
emptySection(xSection);
}
}
- catch (com.sun.star.container.NoSuchElementException e)
+ catch (com.sun.star.container.NoSuchElementException ex)
{
- // Exception not set. Not really from interest.
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, ex);
}
}
@@ -930,6 +952,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
catch (Exception e)
{
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e);
}
}
else
@@ -953,7 +976,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
catch (com.sun.star.container.NoSuchElementException e)
{
- // Exception not set. Not really from interest.
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e);
}
}
@@ -979,6 +1002,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
catch (Exception e)
{
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e);
}
}
else
@@ -989,6 +1013,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
}
// -------------------------------------------------------------------------
+
protected void clearPageHeader()
{
XSection xSection;
@@ -1002,7 +1027,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
catch (com.sun.star.container.NoSuchElementException e)
{
- // Exception not set. Not really from interest.
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e);
}
}
@@ -1010,14 +1035,13 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
// {
// GregorianCalendar aCalendar = new GregorianCalendar();
// StringBuffer aBuf = new StringBuffer();
-//
+//
// Locale aLocale = new Locale("en","US");
// SimpleDateFormat aFormat = new SimpleDateFormat(_sFormat, aLocale);
// aBuf = aFormat.format(aCalendar.getTime(), aBuf, new FieldPosition(0) );
// // DebugHelper.writeInfo("Date: " + aBuf.toString());
// return aBuf.toString();
// }
-
// protected String getCurrentDate()
// {
// Calendar aCalendar = Calendar.getInstance();
@@ -1038,14 +1062,14 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
//// long nTime = aDate.getTime();
//// Long aLong = new Long(nTime);
//// String aStr = aLong.toString();
-////
+////
//// Date aNewDate = new Date(1202382900000L);
////// aNewDate.
//// String aDateStr = aNewDate.toString();
////// Datetime aNewTime = new Time(1202382900);
////// String aTimeStr = aNewTime.toString();
////
-//
+//
// }
protected void clearPageFooter()
{
@@ -1060,7 +1084,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
catch (com.sun.star.container.NoSuchElementException e)
{
- // Exception not set. Should not from interest here.
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e);
}
}
@@ -1094,7 +1118,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
/**
* Returns the width and height of a given string (_sText) in 1/100mm drawn in the given font descriptor.
* TODO: This function is a performance leak, we could store already calculated values in a map, to build a cache. Access should be much faster then.
- *
+ *
* @param _sText
* @param _aFont
* @return width of given text in 1/100mm
@@ -1108,49 +1132,49 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
// XControlContainer xControlContainer = (XControlContainer)UnoRuntime.queryInterface(XControlContainer.class, aControlContainer);
final Object aFixedTextModel = getGlobalMSF().createInstance("com.sun.star.awt.UnoControlFixedTextModel");
- final XControlModel xFixedTextModel = (XControlModel) UnoRuntime.queryInterface(XControlModel.class, aFixedTextModel);
+ final XControlModel xFixedTextModel = UnoRuntime.queryInterface(XControlModel.class, aFixedTextModel);
final PropertySetHelper aPropertySetHelper = new PropertySetHelper(xFixedTextModel);
// aPropertySetHelper.showProperties();
- aPropertySetHelper.setPropertyValueDontThrow("FontDescriptor", _aFont);
+ aPropertySetHelper.setPropertyValueDontThrow(PropertyNames.FONT_DESCRIPTOR, _aFont);
final Object aUnoCtrlFixedText = getGlobalMSF().createInstance("com.sun.star.awt.UnoControlFixedText");
// XServiceInfo xServiceInfo2 = (XServiceInfo)UnoRuntime.queryInterface(XServiceInfo.class, aUnoCtrlFixedText);
// String[] sServices2 = xServiceInfo2.getSupportedServiceNames();
- final XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, aUnoCtrlFixedText);
+ final XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, aUnoCtrlFixedText);
xWindow.setVisible(false);
- final XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, aUnoCtrlFixedText);
+ final XControl xControl = UnoRuntime.queryInterface(XControl.class, aUnoCtrlFixedText);
xControl.setModel(xFixedTextModel);
- final com.sun.star.awt.XFixedText xFixedText = (com.sun.star.awt.XFixedText) UnoRuntime.queryInterface(com.sun.star.awt.XFixedText.class, aUnoCtrlFixedText);
+ final com.sun.star.awt.XFixedText xFixedText = UnoRuntime.queryInterface(com.sun.star.awt.XFixedText.class, aUnoCtrlFixedText);
xFixedText.setText(_sText);
- final XLayoutConstrains xLayoutConstraints = (XLayoutConstrains) UnoRuntime.queryInterface(XLayoutConstrains.class, aUnoCtrlFixedText);
+ final XLayoutConstrains xLayoutConstraints = UnoRuntime.queryInterface(XLayoutConstrains.class, aUnoCtrlFixedText);
final Size aSizeInPixel = xLayoutConstraints.getPreferredSize();
- final XWindowPeer xPeerOfReportDefinition = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, getReportDefinition().getCurrentController().getFrame().getComponentWindow());
+ final XWindowPeer xPeerOfReportDefinition = UnoRuntime.queryInterface(XWindowPeer.class, getReportDefinition().getCurrentController().getFrame().getComponentWindow());
xControl.createPeer(null, xPeerOfReportDefinition);
final XWindowPeer x = xControl.getPeer();
- final XUnitConversion xConversion = (XUnitConversion) UnoRuntime.queryInterface(XUnitConversion.class, x);
+ final XUnitConversion xConversion = UnoRuntime.queryInterface(XUnitConversion.class, x);
aSizeMM_100TH = xConversion.convertSizeToLogic(aSizeInPixel, com.sun.star.util.MeasureUnit.MM_100TH);
// xToolkit.createScreenCompatibleDevice(_nWidth, _nWidth).
// XWindow x = getReportDefinition().getCurrentController().getFrame().getContainerWindow();
// Object aObj = _xSection.getParent();
// we don't need the created objects any longer
- final XComponent xFixedTextDeleter = (XComponent) UnoRuntime.queryInterface(XComponent.class, xFixedText);
+ final XComponent xFixedTextDeleter = UnoRuntime.queryInterface(XComponent.class, xFixedText);
xFixedTextDeleter.dispose();
- final XComponent xFixedTextModelDeleter = (XComponent) UnoRuntime.queryInterface(XComponent.class, aFixedTextModel);
+ final XComponent xFixedTextModelDeleter = UnoRuntime.queryInterface(XComponent.class, aFixedTextModel);
xFixedTextModelDeleter.dispose();
}
catch (Exception e)
{
- // TODO: Exception not set.
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e);
}
return aSizeMM_100TH;
}
@@ -1161,24 +1185,24 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
{
return m_sTableName;
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
protected String getUserNameFromConfiguration()
{
- String sFirstName = "";
- String sLastName = "";
+ String sFirstName = PropertyNames.EMPTY_STRING;
+ String sLastName = PropertyNames.EMPTY_STRING;
try
{
Object oProdNameAccess = Configuration.getConfigurationRoot(getGlobalMSF(), "org.openoffice.UserProfile/Data", false);
sFirstName = (String) Helper.getUnoObjectbyName(oProdNameAccess, "givenname");
sLastName = (String) Helper.getUnoObjectbyName(oProdNameAccess, "sn");
}
- catch (Exception exception)
+ catch (Exception e)
{
- exception.printStackTrace(System.out);
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e);
}
- return sFirstName + " " + sLastName;
+ return sFirstName + PropertyNames.SPACE + sLastName;
}
/**
@@ -1188,8 +1212,8 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
*/
private void copyProperties(Object _aFrom, Object _aTo)
{
- XPropertySet xFrom = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _aFrom);
- XPropertySet xTo = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _aTo);
+ XPropertySet xFrom = UnoRuntime.queryInterface(XPropertySet.class, _aFrom);
+ XPropertySet xTo = UnoRuntime.queryInterface(XPropertySet.class, _aTo);
XPropertySetInfo xForeignPropInfo = xFrom.getPropertySetInfo();
@@ -1210,6 +1234,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
catch (Exception e)
{
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e);
}
}
}
@@ -1230,7 +1255,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
while (xEnum.hasMoreElements())
{
Object aEnumObj = xEnum.nextElement();
- XReportComponent aComponent = (XReportComponent) UnoRuntime.queryInterface(XReportComponent.class, aEnumObj);
+ XReportComponent aComponent = UnoRuntime.queryInterface(XReportComponent.class, aEnumObj);
// XCloneable aClone = (XCloneable)UnoRuntime.queryInterface(XCloneable.class, aEnumObj);
if (aComponent != null)
@@ -1238,14 +1263,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
Object aClone = aComponent.createClone();
if (aClone != null)
{
- String sName = aComponent.getName();
- com.sun.star.awt.Point aPosition = aComponent.getPosition();
- Size aSize = aComponent.getSize();
-
- XShape aShape = (XShape) UnoRuntime.queryInterface(XShape.class, aClone);
- String sShapeType = aShape.getShapeType();
- com.sun.star.awt.Point aShapePoint = aShape.getPosition();
- Size aShapeSize = aShape.getSize();
+ XShape aShape = UnoRuntime.queryInterface(XShape.class, aClone);
// normally 'createClone' will create a real clone of the component,
// but there seems some problems, we have to controll.
@@ -1260,9 +1278,10 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
catch (Exception e)
{
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e);
}
- // String sName = xForeignSection.getName();
- // int dummy = 0;
+ // String sName = xForeignSection.getName();
+ // int dummy = 0;
}
protected void insertPageHeader()
@@ -1287,9 +1306,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
catch (Exception e)
{
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e);
+ }
}
- return;
- }
else
{
// we won't a page header
@@ -1364,7 +1383,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
catch (com.sun.star.uno.Exception e)
{
- // TODO: Exception not set.
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e);
}
}
}
@@ -1390,6 +1409,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
catch (Exception e)
{
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e);
}
}
else
@@ -1423,8 +1443,8 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
final String sSurroundDoubleQuotes = "\"" + sPageOf + "\"";
final String sPageNumber = sSurroundDoubleQuotes.replaceAll("#page#", "\" & PageNumber() & \"");
final String sPageCount = sPageNumber.replaceAll("#count#", "\" & PageCount() & \"");
- final String sNoLastUnusedQuotes = sPageCount.replaceAll(" & \\\"\\\"", "");
- final String sNoFirstUnusedQuotes = sNoLastUnusedQuotes.replaceAll("\\\"\\\" & ", "");
+ final String sNoLastUnusedQuotes = sPageCount.replaceAll(" & \\\"\\\"", PropertyNames.EMPTY_STRING);
+ final String sNoFirstUnusedQuotes = sNoLastUnusedQuotes.replaceAll("\\\"\\\" & ", PropertyNames.EMPTY_STRING);
final int nUsablePageWidth = getPageWidth() - getLeftPageIndent() - getRightPageIndent();
@@ -1445,17 +1465,16 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
aRect.Y += nLineHeight;
aRect.Y += LayoutConstants.LabelHeight;
- final int nWidth = nUsablePageWidth;
aRect.X = getLeftPageIndent();
- aRect = insertFormattedField(xSection, "rpt:" + sNoFirstUnusedQuotes, aRect, nWidth, null, (short) com.sun.star.awt.TextAlign.CENTER);
+ aRect = insertFormattedField(xSection, "rpt:" + sNoFirstUnusedQuotes, aRect, nUsablePageWidth, null, (short) com.sun.star.awt.TextAlign.CENTER);
aRect.Y += LayoutConstants.FormattedFieldHeight + LayoutConstants.LineHeight;
xSection.setHeight(aRect.Y);
}
catch (Exception e)
{
- // TODO: Exception not set.
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e);
}
}
}
@@ -1574,7 +1593,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
if (m_aFixedTextHelper == null)
{
final Object aFixedText = getMSFofReportDefinition().createInstance("com.sun.star.report.FixedText");
- m_aFixedTextHelper = (XFixedText) UnoRuntime.queryInterface(XFixedText.class, aFixedText);
+ m_aFixedTextHelper = UnoRuntime.queryInterface(XFixedText.class, aFixedText);
}
m_aFixedTextHelper.setLabel(_sLabel);
@@ -1595,7 +1614,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
catch (com.sun.star.uno.Exception e)
{
- // TODO: Exception not set.
+ Logger.getLogger(ReportBuilderLayouter.class.getName()).log(Level.SEVERE, null, e);
}
}
return nWidth;
@@ -1623,7 +1642,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
String sDefaultHeaderLayout = m_xReportDefinitionReadAccess.getDefaultHeaderLayout();
loadAndSetBackgroundTemplate(sDefaultHeaderLayout);
- // copy all functions from the design template to the current report definition
+ // copy all functions from the design template to the current report definition
// XFunctions xOtherFunctions = m_xDesignTemplate.getReportDefinition().getFunctions();
// final int nFunctionCount = xOtherFunctions.getCount();
// for (int i=0;i<nFunctionCount;i++)
@@ -1648,7 +1667,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
// {
// ex.printStackTrace();
// }
-//
+//
// }
}
@@ -1678,8 +1697,8 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
closeDesignTemplate();
String sName = FileAccess.getFilename(LayoutTemplatePath);
- if (sName.toLowerCase().equals("default.otr_") ||
- LayoutTemplatePath.equals("DefaultLayoutOfHeaders"))
+ if (sName.toLowerCase().equals("default.otr_")
+ || LayoutTemplatePath.equals("DefaultLayoutOfHeaders"))
{
// this is the default layout, we don't want to have a layout for this.
}
@@ -1690,4 +1709,3 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
}
}
-
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionEmptyObject.java b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionEmptyObject.java
index 8df754795e63..198f76b6720e 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionEmptyObject.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionEmptyObject.java
@@ -1,8 +1,8 @@
/*
* ***********************************************************************
- *
+ *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,8 +44,7 @@ public class SectionEmptyObject extends SectionObject
public static SectionObject create()
{
- SectionEmptyObject a = new SectionEmptyObject();
- return a;
+ return new SectionEmptyObject();
}
public FontDescriptor getFontDescriptor()
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java
index ae3766fd3391..874e165088d6 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java
@@ -1,8 +1,8 @@
/*
* ***********************************************************************
- *
+ *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,8 +48,7 @@ public class SectionLabel extends SectionObject
public static SectionObject create(XFixedText _aFixedText)
{
- final SectionLabel a = new SectionLabel(_aFixedText);
- return a;
+ return new SectionLabel(_aFixedText);
}
/**
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionObject.java b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionObject.java
index 797ac097f915..58a9cc94b746 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionObject.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionObject.java
@@ -1,8 +1,8 @@
/*
* ***********************************************************************
- *
+ *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -65,14 +65,12 @@ abstract public class SectionObject
public int getHeight(int _nDefault)
{
- final int nHeight = getPropertySetHelper().getPropertyValueAsInteger(PropertyNames.PROPERTY_HEIGHT, _nDefault);
- return nHeight;
+ return getPropertySetHelper().getPropertyValueAsInteger(PropertyNames.PROPERTY_HEIGHT, _nDefault);
}
public float getCharWeight(float _nDefault)
{
- final float fCharWeight = (float) getPropertySetHelper().getPropertyValueAsDouble("CharWeight", _nDefault);
- return fCharWeight;
+ return(float) getPropertySetHelper().getPropertyValueAsDouble("CharWeight", _nDefault);
}
public void setFontToBold()
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionTextField.java b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionTextField.java
index 2a11fcd56f04..f3e99c1e384d 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionTextField.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionTextField.java
@@ -1,8 +1,8 @@
/*
* ***********************************************************************
- *
+ *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,8 +46,7 @@ public class SectionTextField extends SectionObject
public static SectionObject create(XFormattedField _aFormattedField)
{
- SectionTextField a = new SectionTextField(_aFormattedField);
- return a;
+ return new SectionTextField(_aFormattedField);
}
public FontDescriptor getFontDescriptor()
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/Tabular.java b/wizards/com/sun/star/wizards/reportbuilder/layout/Tabular.java
index 0fe168b28263..e01d1d3389c4 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/Tabular.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/Tabular.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,8 +55,7 @@ public class Tabular extends ReportBuilderLayouter
public String getLocalizedName()
{
- String sLocalizedName = getResource().getResText(UIConsts.RID_REPORT + 80);
- return sLocalizedName;
+ return getResource().getResText(UIConsts.RID_REPORT + 80);
}
protected void insertDetailFields()
@@ -92,60 +91,59 @@ public class Tabular extends ReportBuilderLayouter
xSection.setHeight(nHeight);
}
- protected void insertDetailFieldTitles()
+ protected void insertDetailFieldTitles(int lastGroupPostion)
{
final String[] aFieldTitleNames = getFieldTitleNames();
- if (aFieldTitleNames == null)
+ if (aFieldTitleNames == null || aFieldTitleNames.length == 0)
{
return;
}
- if (aFieldTitleNames.length == 0)
- {
- return;
- }
- final int nGroups = getReportDefinition().getGroups().getCount();
try
{
- XSection xSection = null;
SectionObject aSO = null;
- if (nGroups == 0)
+ final XGroups xGroups = getReportDefinition().getGroups();
+ final XGroup xGroup;
+ if (lastGroupPostion == -1)
{
// Spezial case, there is no Group.
- final XGroups xGroups = getReportDefinition().getGroups();
- final XGroup xGroup = xGroups.createGroup();
+ xGroup = xGroups.createGroup();
xGroup.setHeaderOn(true);
xGroups.insertByIndex(xGroups.getCount(), xGroup);
- xSection = xGroup.getHeader();
copyGroupProperties(0);
aSO = getDesignTemplate().getDetailLabel();
aSO.setFontToBold();
}
else
{
- final XGroups xGroups = getReportDefinition().getGroups();
// we insert the titles in the last group
- final Object aGroup = xGroups.getByIndex(nGroups - 1);
- final XGroup xGroup = (XGroup) UnoRuntime.queryInterface(XGroup.class, aGroup);
- xSection = xGroup.getHeader();
+ xGroup = UnoRuntime.queryInterface(XGroup.class, xGroups.getByIndex(lastGroupPostion));
// We don't need to copy the GroupProperties, because this is done in the insertGroup() member function
// copyGroupProperties(0);
- aSO = getDesignTemplate().getGroupLabel(nGroups - 1);
+ aSO = getDesignTemplate().getGroupLabel(lastGroupPostion);
}
+ XSection xSection = xGroup.getHeader();
Rectangle aRect = new Rectangle();
-// TODO: getCountOfGroups() == nGroups???
aRect.X = getLeftPageIndent() + getLeftGroupIndent(getCountOfGroups());
- // TODO: group line is fix
- aRect.Y = aSO.getHeight(LayoutConstants.LabelHeight) + LayoutConstants.LineHeight; // group height + a little empty line
+ if (lastGroupPostion == -1)
+ {
+ xSection.setHeight(0); // group height + a little empty line)
+ aRect.Y = 0;
+ }
+ else
+ {
+ aRect.Y = xSection.getHeight() + LayoutConstants.LineHeight;
+ }
+
final int nWidth = calculateFieldWidth(getLeftGroupIndent(getCountOfGroups()), aFieldTitleNames.length);
for (int i = 0; i < aFieldTitleNames.length; i++)
{
aRect = insertLabel(xSection, aFieldTitleNames[i], aRect, nWidth, aSO);
}
- xSection.setHeight(aSO.getHeight(LayoutConstants.LabelHeight) + LayoutConstants.LineHeight + aSO.getHeight(LayoutConstants.LabelHeight));
+ xSection.setHeight(xSection.getHeight() + aSO.getHeight(LayoutConstants.LabelHeight));
}
catch (com.sun.star.uno.Exception e)
{
diff --git a/wizards/com/sun/star/wizards/table/CGCategory.java b/wizards/com/sun/star/wizards/table/CGCategory.java
index ea74b33f09ad..4046578fd308 100644
--- a/wizards/com/sun/star/wizards/table/CGCategory.java
+++ b/wizards/com/sun/star/wizards/table/CGCategory.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -60,7 +60,7 @@ public class CGCategory
{
try
{
- oconfigView = Configuration.getConfigurationRoot(xMSF, CGROOTPATH, false); //business/Tables
+ oconfigView = Configuration.getConfigurationRoot(xMSF, CGROOTPATH, false); //business/Tables
xNameAccessCurBusinessNode = Configuration.getChildNodebyName(
UnoRuntime.queryInterface(XNameAccess.class, oconfigView),
category);
@@ -75,9 +75,8 @@ public class CGCategory
{
try
{
- xNameAccessTablesNode = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xNameAccessCurBusinessNode.getByName("Tables"));
- String[] sTableNames = Configuration.getNodeDisplayNames(xNameAccessTablesNode);
- return sTableNames;
+ xNameAccessTablesNode = UnoRuntime.queryInterface(XNameAccess.class, xNameAccessCurBusinessNode.getByName("Tables"));
+ return Configuration.getNodeDisplayNames(xNameAccessTablesNode);
}
catch (Exception e)
{
diff --git a/wizards/com/sun/star/wizards/table/CGTable.java b/wizards/com/sun/star/wizards/table/CGTable.java
index b3e509b5b0c1..0835d7a39d23 100644
--- a/wizards/com/sun/star/wizards/table/CGTable.java
+++ b/wizards/com/sun/star/wizards/table/CGTable.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/table/CallTableWizard.java b/wizards/com/sun/star/wizards/table/CallTableWizard.java
index af685eadf343..e55431116b21 100644
--- a/wizards/com/sun/star/wizards/table/CallTableWizard.java
+++ b/wizards/com/sun/star/wizards/table/CallTableWizard.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,6 +30,7 @@ import com.sun.star.beans.PropertyAttribute;
import com.sun.star.beans.PropertyValue;
import com.sun.star.uno.Type;
import com.sun.star.wizards.common.Properties;
+import com.sun.star.wizards.common.PropertyNames;
/** This class capsulates the class, that implements the minimal component, a
* factory for creating the service (<CODE>__getServiceFactory</CODE>).
@@ -80,15 +81,15 @@ public class CallTableWizard
{
super();
m_serviceFactory = i_serviceFactory;
- registerProperty( "Command", (short)( PropertyAttribute.READONLY | PropertyAttribute.MAYBEVOID ) );
- registerProperty( "CommandType", PropertyAttribute.READONLY );
+ registerProperty( PropertyNames.COMMAND, (short)( PropertyAttribute.READONLY | PropertyAttribute.MAYBEVOID ) );
+ registerProperty( PropertyNames.COMMAND_TYPE, PropertyAttribute.READONLY );
}
public void trigger( String sEvent )
{
try
{
- if ( sEvent.compareTo("start") == 0 )
+ if ( sEvent.compareTo(PropertyNames.START) == 0 )
{
TableWizard CurTableWizard = new TableWizard( m_serviceFactory, m_wizardContext );
Command = CurTableWizard.startTableWizard();
@@ -166,7 +167,7 @@ public class CallTableWizard
try
{
- byteReturn = new String("" + this.hashCode()).getBytes();
+ byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes();
}
catch (Exception exception)
{
diff --git a/wizards/com/sun/star/wizards/table/FieldDescription.java b/wizards/com/sun/star/wizards/table/FieldDescription.java
index f816b03e8f8c..22767b862a2c 100644
--- a/wizards/com/sun/star/wizards/table/FieldDescription.java
+++ b/wizards/com/sun/star/wizards/table/FieldDescription.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,7 +40,7 @@ import com.sun.star.wizards.common.PropertyNames;
public class FieldDescription
{
- private String tablename = "";
+ private String tablename = PropertyNames.EMPTY_STRING;
// String fieldname;
private String keyname;
private XNameAccess xNameAccessTableNode;
@@ -132,30 +132,30 @@ public class FieldDescription
{
try
{
- xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _xNameAccessFieldNode);
-// Integer Index = (Integer) xPropertySet.getPropertyValue("Index");
+ xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, _xNameAccessFieldNode);
+// Integer Index = (Integer) xPropertySet.getPropertyValue("Index");
if (propertyexists(PropertyNames.PROPERTY_NAME))
{
aPropertyValues.addElement(Properties.createProperty(PropertyNames.PROPERTY_NAME, Name));
}
if (propertyexists("Type"))
{
- aPropertyValues.addElement(Properties.createProperty("Type", (Integer) xPropertySet.getPropertyValue("Type")));
+ aPropertyValues.addElement(Properties.createProperty("Type", xPropertySet.getPropertyValue("Type")));
}
if (propertyexists("Scale"))
{
- aPropertyValues.addElement(Properties.createProperty("Scale", (Integer) xPropertySet.getPropertyValue("Scale")));
-// Scale =
+ aPropertyValues.addElement(Properties.createProperty("Scale", xPropertySet.getPropertyValue("Scale")));
+// Scale =
}
if (propertyexists("Precision"))
{
- aPropertyValues.addElement(Properties.createProperty("Precision", (Integer) xPropertySet.getPropertyValue("Precision")));
-// Precision = (Integer) xPropertySet.getPropertyValue("Precision");
+ aPropertyValues.addElement(Properties.createProperty("Precision", xPropertySet.getPropertyValue("Precision")));
+// Precision = (Integer) xPropertySet.getPropertyValue("Precision");
}
if (propertyexists("DefaultValue"))
{
- aPropertyValues.addElement(Properties.createProperty("DefaultValue", (Boolean) xPropertySet.getPropertyValue("DefaultValue")));// DefaultValue = (Boolean) xPropertySet.getPropertyValue("DefaultValue");
- //Type = new Integer(4); // TODO wo ist der Fehler?(Integer) xPropertySet.getPropertyValue("Type");
+ aPropertyValues.addElement(Properties.createProperty("DefaultValue", xPropertySet.getPropertyValue("DefaultValue")));// DefaultValue = (Boolean) xPropertySet.getPropertyValue("DefaultValue");
+ //Type = 4; // TODO wo ist der Fehler?(Integer) xPropertySet.getPropertyValue("Type");
}
}
catch (Exception e)
diff --git a/wizards/com/sun/star/wizards/table/FieldFormatter.java b/wizards/com/sun/star/wizards/table/FieldFormatter.java
index 43349d71376f..945f03f1ca6a 100644
--- a/wizards/com/sun/star/wizards/table/FieldFormatter.java
+++ b/wizards/com/sun/star/wizards/table/FieldFormatter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -84,7 +84,7 @@ public class FieldFormatter implements XItemListener
},
new Object[]
{
- UIConsts.INTEGERS[8], sFieldNames, new Integer(91), new Integer(27), IFieldFormatStep, new Short(curtabindex++), new Integer(90)
+ UIConsts.INTEGERS[8], sFieldNames, 91, 27, IFieldFormatStep, new Short(curtabindex++), 90
});
try
@@ -96,7 +96,7 @@ public class FieldFormatter implements XItemListener
},
new Object[]
{
- new Integer(133), "HID:WIZARDS_HID_DLGTABLE_LB_SELFIELDNAMES", new Integer(92), new Integer(37), IFieldFormatStep, new Short(curtabindex++), new Integer(62)
+ 133, "HID:WIZARDS_HID_DLGTABLE_LB_SELFIELDNAMES", 92, 37, IFieldFormatStep, new Short(curtabindex++), 62
});
}
catch (Exception e)
@@ -110,21 +110,21 @@ public class FieldFormatter implements XItemListener
btnShiftUp = CurUnoDialog.insertButton("btnShiftUp", "shiftFieldNameUp", this,
new String[]
{
- PropertyNames.PROPERTY_ENABLED, "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_ENABLED, PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- Boolean.FALSE, oFontDesc, new Integer(14), "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDUP", String.valueOf((char) 8743), new Integer(158), new Integer(139), IFieldFormatStep, new Short(curtabindex++), new Integer(14)
+ Boolean.FALSE, oFontDesc, 14, "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDUP", String.valueOf((char) 8743), 158, 139, IFieldFormatStep, new Short(curtabindex++), 14
});
btnShiftDown = CurUnoDialog.insertButton("btnShiftDown", "shiftFieldNameDown", this,
new String[]
{
- PropertyNames.PROPERTY_ENABLED, "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_ENABLED, PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- Boolean.FALSE, oFontDesc, new Integer(14), "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDDOWN", String.valueOf((char) 8744), new Integer(158), new Integer(156), IFieldFormatStep, new Short(curtabindex++), new Integer(14)
+ Boolean.FALSE, oFontDesc, 14, "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDDOWN", String.valueOf((char) 8744), 158, 156, IFieldFormatStep, new Short(curtabindex++), 14
});
oFontDesc = new FontDescriptor();
oFontDesc.Weight = com.sun.star.awt.FontWeight.BOLD;
@@ -132,31 +132,31 @@ public class FieldFormatter implements XItemListener
btnminus = CurUnoDialog.insertButton("btnminus", "removeFieldName", this,
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- oFontDesc, new Integer(14), "HID:WIZARDS_HID_DLGTABLE_CMDMINUS", "-", new Integer(118), new Integer(175), IFieldFormatStep, new Short(curtabindex++), new Integer(14)
+ oFontDesc, 14, "HID:WIZARDS_HID_DLGTABLE_CMDMINUS", "-", 118, 175, IFieldFormatStep, new Short(curtabindex++), 14
});
btnplus = CurUnoDialog.insertButton("btnplus", "addFieldName", this,
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- oFontDesc, new Integer(14), "HID:WIZARDS_HID_DLGTABLE_CMDPLUS", "+", new Integer(137), new Integer(175), IFieldFormatStep, new Short(curtabindex++), new Integer(14)
+ oFontDesc, 14, "HID:WIZARDS_HID_DLGTABLE_CMDPLUS", "+", 137, 175, IFieldFormatStep, new Short(curtabindex++), 14
});
CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "ColDescriptorHeader",
new String[]
{
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.ORIENTATION, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Integer(8), sfieldinfo, new Integer(0), new Integer(158), new Integer(27), IFieldFormatStep, new Short(curtabindex++), new Integer(165)
+ 8, sfieldinfo, 0, 158, 27, IFieldFormatStep, new Short(curtabindex++), 165
});
@@ -167,7 +167,7 @@ public class FieldFormatter implements XItemListener
},
new Object[]
{
- UIConsts.INTEGERS[8], sFieldName, new Integer(158), new Integer(39), IFieldFormatStep, new Short(curtabindex++), new Integer(94)
+ UIConsts.INTEGERS[8], sFieldName, 158, 39, IFieldFormatStep, new Short(curtabindex++), 94
});
txtfieldname = CurUnoDialog.insertTextField("txtfieldname", MODIFYFIELDNAME, this,
@@ -177,7 +177,7 @@ public class FieldFormatter implements XItemListener
},
new Object[]
{
- UIConsts.INTEGER_12, "HID:WIZARDS_HID_DLGTABLE_COLNAME", new Integer(274), new Integer(37), IFieldFormatStep, new Short(curtabindex++), "", new Integer(50)
+ UIConsts.INTEGER_12, "HID:WIZARDS_HID_DLGTABLE_COLNAME", 274, 37, IFieldFormatStep, new Short(curtabindex++), PropertyNames.EMPTY_STRING, 50
});
txtfieldname.addTextListener(CurUnoDialog);
CurUnoDialog.getPeerConfiguration().setAccessibleName(btnplus, sbtnplushelptext);
@@ -195,10 +195,10 @@ public class FieldFormatter implements XItemListener
}, // PropertyNames.PROPERTY_HELPURL
new Object[]
{
- new Integer(85), new Integer(158), new Integer(49), IFieldFormatStep, new Short(curtabindex++), new Integer(166), new Integer(50)
+ 85, 158, 49, IFieldFormatStep, new Short(curtabindex++), 166, 50
}); //, "HID:WIZARDS_HID_DLGTABLE_COLMODIFIER"
curTableDescriptor = _curTableDescriptor;
- Helper.setUnoPropertyValue(oColumnDescriptorModel, "ActiveConnection", _curTableDescriptor.DBConnection);
+ Helper.setUnoPropertyValue(oColumnDescriptorModel, PropertyNames.ACTIVE_CONNECTION, _curTableDescriptor.DBConnection);
txtfieldname.setMaxTextLen((short) this.curTableDescriptor.getMaxColumnNameLength());
}
else
@@ -210,8 +210,8 @@ public class FieldFormatter implements XItemListener
CurUnoDialog.repaintDialogStep();
}
}
- Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList", _fieldnames);
- Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[]
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST, _fieldnames);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS, new short[]
{
0
});
@@ -224,7 +224,7 @@ public class FieldFormatter implements XItemListener
{
boolean benableShiftUpButton = false;
boolean benableShiftDownButton = false;
- boolean bfieldnameisselected = Helper.getUnoArrayPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems") != null;
+ boolean bfieldnameisselected = Helper.getUnoArrayPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS) != null;
int ilistcount = /* xlstFieldNames.getItemCount();*/ UnoDialog.getListBoxItemCount(xlstFieldNames);
boolean blistispopulated = (ilistcount > 0);
if (bfieldnameisselected)
@@ -233,20 +233,20 @@ public class FieldFormatter implements XItemListener
benableShiftUpButton = (iselpos != 0);
benableShiftDownButton = (iselpos != ilistcount - 1);
}
- Helper.setUnoPropertyValue(UnoDialog.getModel(btnShiftUp), PropertyNames.PROPERTY_ENABLED, new Boolean(benableShiftUpButton));
- Helper.setUnoPropertyValue(UnoDialog.getModel(btnShiftDown), PropertyNames.PROPERTY_ENABLED, new Boolean(benableShiftDownButton));
- Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, new Boolean(blistispopulated));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(btnShiftUp), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benableShiftUpButton));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(btnShiftDown), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benableShiftDownButton));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(blistispopulated));
CurUnoDialog.setcompleted(TableWizard.SOFIELDSFORMATPAGE, blistispopulated);
}
public void addFieldName()
{
- String snewfieldname = Desktop.getUniqueName(xlstFieldNames.getItems(), suntitled, "");
+ String snewfieldname = Desktop.getUniqueName(xlstFieldNames.getItems(), suntitled, PropertyNames.EMPTY_STRING);
short icount = xlstFieldNames.getItemCount();
if (CurUnoDialog.verifyfieldcount(icount))
{
xlstFieldNames.addItem(snewfieldname, icount);
- Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[]
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS, new short[]
{
icount
});
@@ -262,7 +262,7 @@ public class FieldFormatter implements XItemListener
public void removeFieldName()
{
- String[] fieldnames = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList");
+ String[] fieldnames = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST);
short ipos = UnoDialog.getSelectedItemPos(xlstFieldNames);
String fieldname = fieldnames[ipos];
xlstFieldNames.removeItems(ipos, (short) 1);
@@ -270,7 +270,7 @@ public class FieldFormatter implements XItemListener
int ilistcount = /* xlstFieldNames.getItemCount();*/ UnoDialog.getListBoxItemCount(xlstFieldNames);
if ((ipos) < ilistcount)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[]
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS, new short[]
{
ipos
});
@@ -280,14 +280,14 @@ public class FieldFormatter implements XItemListener
if (ilistcount > -1)
{
ipos = (short) ((short) ilistcount - (short) 1);
- Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[]
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS, new short[]
{
ipos
});
}
}
curTableDescriptor.dropColumnbyName(fieldname);
- fieldnames = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList");
+ fieldnames = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST);
boolean benable = ((ipos > -1) && (ipos < fieldnames.length));
if (benable)
{
@@ -297,11 +297,11 @@ public class FieldFormatter implements XItemListener
}
else
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(txtfieldname), "Text", "");
- Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, new Boolean(benable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(txtfieldname), "Text", PropertyNames.EMPTY_STRING);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benable));
CurUnoDialog.setcompleted(TableWizard.SOFIELDSFORMATPAGE, benable);
}
- Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, new Boolean(benable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benable));
CurUnoDialog.setControlVisible("oColumnDescriptor", benable);
CurUnoDialog.repaintDialogStep();
}
@@ -323,8 +323,8 @@ public class FieldFormatter implements XItemListener
String[] fieldnames = xlstFieldNames.getItems();
short ipos = xlstFieldNames.getSelectedItemPos();
fieldnames[ipos] = newfieldname;
- Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList", fieldnames);
- Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[]
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST, fieldnames);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS, new short[]
{
ipos
});
@@ -336,10 +336,10 @@ public class FieldFormatter implements XItemListener
{
short ipos = xlstFieldNames.getSelectedItemPos();
String[] snewlist = shiftArrayItem(xlstFieldNames.getItems(), ipos, -1);
- Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList", snewlist);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST, snewlist);
if ((ipos - 1) > -1)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[]
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS, new short[]
{
(short) (ipos - 1)
});
@@ -352,10 +352,10 @@ public class FieldFormatter implements XItemListener
{
short ipos = xlstFieldNames.getSelectedItemPos();
String[] snewlist = shiftArrayItem(xlstFieldNames.getItems(), ipos, 1);
- Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList", snewlist);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST, snewlist);
if ((ipos + 1) < xlstFieldNames.getItemCount())
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "SelectedItems", new short[]
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.SELECTED_ITEMS, new short[]
{
(short) (ipos + 1)
});
@@ -379,7 +379,7 @@ public class FieldFormatter implements XItemListener
public boolean updateColumnofColumnDescriptor()
{
Object oColumn = Helper.getUnoPropertyValue(oColumnDescriptorModel, "Column");
- XPropertySet xColPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oColumn);
+ XPropertySet xColPropertySet = UnoRuntime.queryInterface(XPropertySet.class, oColumn);
if (xColPropertySet != null)
{
curTableDescriptor.modifyColumn(txtfieldname.getText(), xColPropertySet);
@@ -401,8 +401,7 @@ public class FieldFormatter implements XItemListener
public XPropertySet clonePropertySet(XPropertySet _xPropertySet)
{
- XPropertySet xlocpropertyset = null;
- return xlocpropertyset;
+ return null;
}
public void itemStateChanged(ItemEvent arg0)
@@ -415,13 +414,13 @@ public class FieldFormatter implements XItemListener
public boolean iscompleted()
{
- String[] sfieldnames = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList");
+ String[] sfieldnames = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST);
return sfieldnames.length > 0;
}
public String[] getFieldNames()
{
- return (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), "StringItemList");
+ return (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), PropertyNames.STRING_ITEM_LIST);
}
/* (non-Javadoc)
diff --git a/wizards/com/sun/star/wizards/table/Finalizer.java b/wizards/com/sun/star/wizards/table/Finalizer.java
index 340dd5d2dc7b..73fb06ef4843 100644
--- a/wizards/com/sun/star/wizards/table/Finalizer.java
+++ b/wizards/com/sun/star/wizards/table/Finalizer.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -83,7 +83,7 @@ public class Finalizer
},
new Object[]
{
- UIConsts.INTEGERS[8], slblTableName, new Integer(97), new Integer(25), IFINALSTEP, new Integer(220)
+ UIConsts.INTEGERS[8], slblTableName, 97, 25, IFINALSTEP, 220
});
txtTableName = CurUnoDialog.insertTextField("txtTableName", SETCOMPLETIONFLAG, this,
new String[]
@@ -92,7 +92,7 @@ public class Finalizer
},
new Object[]
{
- UIConsts.INTEGER_12, "HID:WIZARDS_HID_DLGTABLE_TXT_NAME", new Integer(97), new Integer(35), IFINALSTEP, new Short(curtabindex++), "", new Integer(223)
+ UIConsts.INTEGER_12, "HID:WIZARDS_HID_DLGTABLE_TXT_NAME", 97, 35, IFINALSTEP, new Short(curtabindex++), PropertyNames.EMPTY_STRING, 223
});
txtTableName.addTextListener(CurUnoDialog);
txtTableName.setMaxTextLen((short) this.curtabledescriptor.getMaxTableNameLength());
@@ -103,7 +103,7 @@ public class Finalizer
if (sCatalogNames.length > 0)
{
bsupportsCatalogs = true;
- String sCatalog = "";
+ String sCatalog = PropertyNames.EMPTY_STRING;
try
{
sCatalog = curtabledescriptor.DBConnection.getCatalog();
@@ -119,7 +119,7 @@ public class Finalizer
},
new Object[]
{
- new Integer(8), slblCatalog, new Integer(nListBoxPosX), new Integer(52), IFINALSTEP, new Short(curtabindex++), new Integer(120)
+ 8, slblCatalog, new Integer(nListBoxPosX), 52, IFINALSTEP, new Short(curtabindex++), 120
});
try
@@ -127,18 +127,18 @@ public class Finalizer
xCatalogListBox = CurUnoDialog.insertListBox("lstCatalog", null, null,
new String[]
{
- "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.STRING_ITEM_LIST, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- Boolean.TRUE, new Integer(12), "HID:WIZARDS_HID_DLGTABLE_LST_CATALOG", new Short(UnoDialog.getListBoxLineCount()), new Integer(nListBoxPosX), new Integer(62), IFINALSTEP, sCatalogNames, new Short(curtabindex++), new Integer(80)
+ Boolean.TRUE, 12, "HID:WIZARDS_HID_DLGTABLE_LST_CATALOG", new Short(UnoDialog.getListBoxLineCount()), new Integer(nListBoxPosX), 62, IFINALSTEP, sCatalogNames, new Short(curtabindex++), 80
});
int isel = JavaTools.FieldInList(sCatalogNames, sCatalog);
if (isel < 0)
{
isel = 0;
}
- CurUnoDialog.setControlProperty("lstCatalog", "SelectedItems", new short[]
+ CurUnoDialog.setControlProperty("lstCatalog", PropertyNames.SELECTED_ITEMS, new short[]
{
(short) isel
});
@@ -158,7 +158,7 @@ public class Finalizer
if (sSchemaNames.length > 0)
{
bsupportsSchemata = true;
- String sSchema = "";
+ String sSchema = PropertyNames.EMPTY_STRING;
try
{
sSchema = (String) curtabledescriptor.getDataSourcePropertySet().getPropertyValue("User");
@@ -174,7 +174,7 @@ public class Finalizer
},
new Object[]
{
- new Integer(8), slblSchema, new Integer(nListBoxPosX), new Integer(52), IFINALSTEP, new Short(curtabindex++), new Integer(80)
+ 8, slblSchema, new Integer(nListBoxPosX), 52, IFINALSTEP, new Short(curtabindex++), 80
});
try
@@ -182,18 +182,18 @@ public class Finalizer
xSchemaListBox = CurUnoDialog.insertListBox("lstSchema", null, null,
new String[]
{
- "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.STRING_ITEM_LIST, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- Boolean.TRUE, new Integer(12), "HID:WIZARDS_HID_DLGTABLE_LST_SCHEMA", new Short(UnoDialog.getListBoxLineCount()), new Integer(nListBoxPosX), new Integer(62), IFINALSTEP, sSchemaNames, new Short(curtabindex++), new Integer(80)
+ Boolean.TRUE, 12, "HID:WIZARDS_HID_DLGTABLE_LST_SCHEMA", new Short(UnoDialog.getListBoxLineCount()), new Integer(nListBoxPosX), 62, IFINALSTEP, sSchemaNames, new Short(curtabindex++), 80
});
int isel = JavaTools.FieldInList(sSchemaNames, sSchema);
if (isel < 0)
{
isel = 0;
}
- CurUnoDialog.setControlProperty("lstSchema", "SelectedItems", new short[]
+ CurUnoDialog.setControlProperty("lstSchema", PropertyNames.SELECTED_ITEMS, new short[]
{
(short) isel
});
@@ -214,7 +214,7 @@ public class Finalizer
},
new Object[]
{
- new Integer(16), sCongratulations, Boolean.TRUE, new Integer(97), new Integer(62), IFINALSTEP, new Short(curtabindex++), new Integer(226)
+ 16, sCongratulations, Boolean.TRUE, 97, 62, IFINALSTEP, new Short(curtabindex++), 226
});
}
else
@@ -228,7 +228,7 @@ public class Finalizer
},
new Object[]
{
- UIConsts.INTEGERS[8], slblProceed, new Integer(97), new Integer(82 + ndiffPosY), IFINALSTEP, new Short(curtabindex++), new Integer(227)
+ UIConsts.INTEGERS[8], slblProceed, 97, new Integer(82 + ndiffPosY), IFINALSTEP, new Short(curtabindex++), 227
});
optWorkWithTable = CurUnoDialog.insertRadioButton("optWorkWithTable", null,
new String[]
@@ -237,7 +237,7 @@ public class Finalizer
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPT_WORKWITHTABLE", sWorkWithTable, new Integer(101), new Integer(97 + ndiffPosY), new Short((short) 1), IFINALSTEP, new Short(curtabindex++), new Integer(177)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPT_WORKWITHTABLE", sWorkWithTable, 101, new Integer(97 + ndiffPosY), new Short((short) 1), IFINALSTEP, new Short(curtabindex++), 177
});
optModifyTable = CurUnoDialog.insertRadioButton("optModifyTable", null,
new String[]
@@ -246,7 +246,7 @@ public class Finalizer
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPT_MODIFYTABLE", sModifyTable, new Integer(101), new Integer(109 + ndiffPosY), IFINALSTEP, new Short(curtabindex++), new Integer(177)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPT_MODIFYTABLE", sModifyTable, 101, new Integer(109 + ndiffPosY), IFINALSTEP, new Short(curtabindex++), 177
});
optStartFormWizard = CurUnoDialog.insertRadioButton("optStartFormWizard", null,
new String[]
@@ -255,7 +255,7 @@ public class Finalizer
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPT_STARTFORMWIZARD", sStartFormWizard, new Integer(101), new Integer(121 + ndiffPosY), IFINALSTEP, new Short(curtabindex++), new Integer(177)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPT_STARTFORMWIZARD", sStartFormWizard, 101, new Integer(121 + ndiffPosY), IFINALSTEP, new Short(curtabindex++), 177
});
}
catch (SQLException e)
@@ -302,7 +302,7 @@ public class Finalizer
public void setTableName(String _tablename)
{
- if (txtTableName.getText().equals(""))
+ if (txtTableName.getText().equals(PropertyNames.EMPTY_STRING))
{
String ssuffix = Desktop.getIncrementSuffix(curtabledescriptor.getTableNamesAsNameAccess(), getComposedTableName(_tablename));
txtTableName.setText(_tablename + ssuffix);
@@ -317,7 +317,7 @@ public class Finalizer
public String getTableName(String _firsttablename)
{
- if (txtTableName.getText().equals(""))
+ if (txtTableName.getText().equals(PropertyNames.EMPTY_STRING))
{
setTableName(_firsttablename);
}
@@ -332,7 +332,7 @@ public class Finalizer
}
else
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
}
@@ -344,7 +344,7 @@ public class Finalizer
}
else
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
}
diff --git a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
index a4a896752dd2..5f5cd93a0949 100644
--- a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
+++ b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -90,7 +90,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
},
new Object[]
{
- new Integer(40), sExplanations, Boolean.TRUE, new Integer(91), new Integer(27), IPRIMEKEYSTEP, new Short(curtabindex++), new Integer(233)
+ 40, sExplanations, Boolean.TRUE, 91, 27, IPRIMEKEYSTEP, new Short(curtabindex++), 233
});
chkcreatePrimaryKey = CurUnoDialog.insertCheckBox("chkcreatePrimaryKey", SPRIMEKEYMODE, this,
@@ -100,7 +100,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_CHK_USEPRIMEKEY", screatePrimaryKey, new Integer(97), new Integer(70), new Short((short) 1), IPRIMEKEYSTEP, new Short(curtabindex++), new Integer(160)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_CHK_USEPRIMEKEY", screatePrimaryKey, 97, 70, new Short((short) 1), IPRIMEKEYSTEP, new Short(curtabindex++), 160
});
optAddAutomatically = CurUnoDialog.insertRadioButton("optAddAutomatically", SPRIMEKEYMODE, this,
@@ -110,7 +110,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPT_PK_AUTOMATIC", sAddAutomatically, new Integer(106), new Integer(82), new Short((short) 1), IPRIMEKEYSTEP, new Short(curtabindex++), new Integer(200)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPT_PK_AUTOMATIC", sAddAutomatically, 106, 82, new Short((short) 1), IPRIMEKEYSTEP, new Short(curtabindex++), 200
});
optUseExisting = CurUnoDialog.insertRadioButton("optUseExisting", SPRIMEKEYMODE, this,
@@ -120,7 +120,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
}, //94
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPT_PK_SINGLE", sUseExisting, new Integer(106), new Integer(104), IPRIMEKEYSTEP, new Short(curtabindex++), new Integer(200)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPT_PK_SINGLE", sUseExisting, 106, 104, IPRIMEKEYSTEP, new Short(curtabindex++), 200
});
optUseSeveral = CurUnoDialog.insertRadioButton("optUseSeveral", SPRIMEKEYMODE, this,
@@ -130,7 +130,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPT_PK_SEVERAL", sUseSeveral, new Integer(106), new Integer(132), IPRIMEKEYSTEP, new Short(curtabindex++), new Integer(200)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPT_PK_SEVERAL", sUseSeveral, 106, 132, IPRIMEKEYSTEP, new Short(curtabindex++), 200
});
chkApplyAutoValueAutomatic = CurUnoDialog.insertCheckBox("chkApplyAutoValueAutomatic", SPRIMEKEYMODE, this,
@@ -140,7 +140,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
}, //107
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE_AUTOMATIC", sApplyAutoValue, new Integer(116), new Integer(92), IPRIMEKEYSTEP, new Short(curtabindex++), new Integer(68)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE_AUTOMATIC", sApplyAutoValue, 116, 92, IPRIMEKEYSTEP, new Short(curtabindex++), 68
});
lblPrimeFieldName = CurUnoDialog.insertLabel("lblPrimeFieldName",
@@ -150,7 +150,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
},
new Object[]
{
- Boolean.FALSE, UIConsts.INTEGERS[8], slblPrimeFieldName, new Integer(116), new Integer(117), IPRIMEKEYSTEP, new Short(curtabindex++), new Integer(46)
+ Boolean.FALSE, UIConsts.INTEGERS[8], slblPrimeFieldName, 116, 117, IPRIMEKEYSTEP, new Short(curtabindex++), 46
});
lstSinglePrimeKey = CurUnoDialog.insertListBox("lstSinglePrimeKey", "onPrimeKeySelected", null, this,
@@ -171,14 +171,14 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
{
Boolean.TRUE,
Boolean.FALSE,
- new Integer(12),
+ 12,
"HID:WIZARDS_HID_DLGTABLE_LB_PK_FIELDNAME",
Short.valueOf(UnoDialog.getListBoxLineCount()),
- new Integer(162),
- new Integer(115),
+ 162,
+ 115,
IPRIMEKEYSTEP,
new Short(curtabindex++),
- new Integer(80)
+ 80
});
chkApplyAutoValueExisting = CurUnoDialog.insertCheckBox("chkApplyAutoValueExisting", SPRIMEKEYMODE, this,
@@ -188,7 +188,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
}, //107
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE", sApplyAutoValue, new Integer(248), new Integer(117), IPRIMEKEYSTEP, new Short(curtabindex++), new Integer(66)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE", sApplyAutoValue, 248, 117, IPRIMEKEYSTEP, new Short(curtabindex++), 66
});
curPrimaryKeySelection = new FieldSelection(CurUnoDialog, IPRIMEKEYSTEP.intValue(), 116, 142, 208, 47, slblAvailableFields, slblSelPrimaryFields, 41234, false);
curPrimaryKeySelection.addFieldSelectionListener(this);
@@ -210,7 +210,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
}
}
String selfield = lstSinglePrimeKey.getSelectedItem();
- Helper.setUnoPropertyValue(UnoDialog.getModel(lstSinglePrimeKey), "StringItemList", fieldnames);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lstSinglePrimeKey), PropertyNames.STRING_ITEM_LIST, fieldnames);
if (selfield != null)
{
if (JavaTools.FieldInList(fieldnames, selfield) > -1)
@@ -260,16 +260,16 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
public void togglePrimeKeyFields()
{
boolean bdoEnable = (this.chkcreatePrimaryKey.getState() == 1);
- Helper.setUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable));
- Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueAutomatic), PropertyNames.PROPERTY_ENABLED, new Boolean(bAutoPrimaryKeysupportsAutoIncrmentation && bdoEnable));
- Helper.setUnoPropertyValue(UnoDialog.getModel(optUseExisting), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable));
- Helper.setUnoPropertyValue(UnoDialog.getModel(optUseSeveral), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoEnable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueAutomatic), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bAutoPrimaryKeysupportsAutoIncrmentation && bdoEnable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(optUseExisting), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoEnable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(optUseSeveral), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoEnable));
//toggle subcontrols of the radiobuttons...
toggleAutomaticAutoValueCheckBox();
boolean benableSinglePrimekeyControls = bdoEnable && optUseExisting.getState();
toggleSinglePrimeKeyFields(benableSinglePrimekeyControls);
boolean benableSeveralPrimekeyControls = bdoEnable && optUseSeveral.getState();
- curPrimaryKeySelection.toggleListboxControls(new Boolean(benableSeveralPrimekeyControls));
+ curPrimaryKeySelection.toggleListboxControls(Boolean.valueOf(benableSeveralPrimekeyControls));
// toggle the following steps of the dialog...
if (!bdoEnable)
{
@@ -354,7 +354,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
String selfieldname = lstSinglePrimeKey.getSelectedItem();
boolean bdoenable = isAutoIncrementatable(selfieldname);
CurUnoDialog.setcompleted(TableWizard.SOPRIMARYKEYPAGE, lstSinglePrimeKey.getSelectedItemPos() != -1);
- Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoenable));
XPropertySet xColPropertySet = curTableDescriptor.getByName(selfieldname);
boolean bIsAutoIncremented = ((Boolean) xColPropertySet.getPropertyValue("IsAutoIncrement")).booleanValue();
if (bIsAutoIncremented)
@@ -378,7 +378,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
{
boolean bisAutomaticMode = AnyConverter.toBoolean(Helper.getUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), PropertyNames.PROPERTY_ENABLED));
boolean bdoenable = bAutoPrimaryKeysupportsAutoIncrmentation && optAddAutomatically.getState() && bisAutomaticMode;
- Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueAutomatic), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueAutomatic), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoenable));
}
catch (IllegalArgumentException e)
{
@@ -388,17 +388,17 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
private void toggleSinglePrimeKeyFields(boolean _bdoenable)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(lblPrimeFieldName), PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable));
- Helper.setUnoPropertyValue(UnoDialog.getModel(lstSinglePrimeKey), PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable));
- Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lblPrimeFieldName), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoenable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(lstSinglePrimeKey), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoenable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoenable));
boolean bdoenableAutoValueCheckBox = (isAutoIncrementatable(lstSinglePrimeKey.getSelectedItem()) && _bdoenable);
- Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenableAutoValueCheckBox));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoenableAutoValueCheckBox));
}
private void toggleSeveralPrimeKeyFields()
{
boolean bdoEnable = (this.optUseSeveral.getState());
- curPrimaryKeySelection.toggleListboxControls(new Boolean(bdoEnable));
+ curPrimaryKeySelection.toggleListboxControls(Boolean.valueOf(bdoEnable));
}
public String[] getPrimaryKeyFields(TableDescriptor _curtabledescriptor)
diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java b/wizards/com/sun/star/wizards/table/ScenarioSelector.java
index 9ad0506064bb..a600d2c1ec29 100644
--- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java
+++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,6 +26,7 @@
************************************************************************/
package com.sun.star.wizards.table;
+import java.util.ArrayList;
import java.util.Vector;
import com.sun.star.awt.ItemEvent;
@@ -59,7 +60,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
{
final static int PRIVATE = 0;
final static int BUSINESS = 1;
-
+
private XFixedText lblExplanation;
private XFixedText lblCategories;
private XRadioButton optBusiness;
@@ -104,7 +105,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
},
new Object[]
{
- new Integer(32), sExplanation, Boolean.TRUE, new Integer(91), new Integer(27), IMAINSTEP, new Short(pretabindex++), new Integer(233)
+ 32, sExplanation, Boolean.TRUE, 91, 27, IMAINSTEP, new Short(pretabindex++), 233
});
lblCategories = CurUnoDialog.insertLabel("lblCategories",
@@ -114,7 +115,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
},
new Object[]
{
- new Integer(8), sCategories, new Integer(91), new Integer(60), IMAINSTEP, new Short(pretabindex++), new Integer(100)
+ 8, sCategories, 91, 60, IMAINSTEP, new Short(pretabindex++), 100
});
optBusiness = CurTableWizardUnoDialog.insertRadioButton("optBusiness", SELECTCATEGORY, this,
@@ -124,7 +125,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPTBUSINESS", sBusiness, new Integer(98), new Integer(70), new Short((short) 1), IMAINSTEP, new Short(pretabindex++), new Integer(78)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPTBUSINESS", sBusiness, 98, 70, new Short((short) 1), IMAINSTEP, new Short(pretabindex++), 78
});
optPrivate = CurTableWizardUnoDialog.insertRadioButton("optPrivate", SELECTCATEGORY, this,
@@ -134,7 +135,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
},
new Object[]
{
- UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPTPRIVATE", sPrivate, new Integer(182), new Integer(70), IMAINSTEP, new Short(pretabindex++), new Integer(90)
+ UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPTPRIVATE", sPrivate, 182, 70, IMAINSTEP, new Short(pretabindex++), 90
});
CurUnoDialog.insertLabel("lblTableNames",
@@ -144,7 +145,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
},
new Object[]
{
- new Integer(8), sTableNames, new Integer(91), new Integer(82), IMAINSTEP, new Short(pretabindex++), new Integer(80)
+ 8, sTableNames, 91, 82, IMAINSTEP, new Short(pretabindex++), 80
});
try
@@ -156,7 +157,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
},
new Object[]
{
- Boolean.TRUE, new Integer(12), "HID:WIZARDS_HID_DLGTABLE_LBTABLES", new Short(UnoDialog.getListBoxLineCount()), new Integer(91), new Integer(92), IMAINSTEP, new Short(pretabindex++), getListboxWidth()
+ Boolean.TRUE, 12, "HID:WIZARDS_HID_DLGTABLE_LBTABLES", new Short(UnoDialog.getListBoxLineCount()), 91, 92, IMAINSTEP, new Short(pretabindex++), getListboxWidth()
});
}
catch (Exception e)
@@ -196,7 +197,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
public void initializeTable(int _iTable)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "SelectedItems", new short[]
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS, new short[]
{
(short) _iTable
});
@@ -207,8 +208,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
public String[] getSelectedFieldNames()
{
String[] displayfieldnames = super.getSelectedFieldNames();
- Vector<String> afieldnameVector = new Vector<String>();
- int a = 0;
+ ArrayList<String> afieldnameVector = new ArrayList<String>();
for (int i = 0; i < displayfieldnames.length; i++)
{
try
@@ -216,8 +216,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
FieldDescription ofielddescription = (FieldDescription) CurTableWizardUnoDialog.fielditems.get(displayfieldnames[i]);
if (ofielddescription != null)
{
- afieldnameVector.addElement(ofielddescription.getName());
- a++;
+ afieldnameVector.add(ofielddescription.getName());
}
}
catch (RuntimeException e)
@@ -225,9 +224,8 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
e.printStackTrace(System.out);
}
}
- String[] fieldnames = new String[a];
- afieldnameVector.toArray(fieldnames);
- return fieldnames;
+ String[] fieldnames = new String[afieldnameVector.size()];
+ return afieldnameVector.toArray(fieldnames);
}
public boolean iscompleted()
@@ -266,7 +264,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
{
for (int i = 0; i < CurTableWizardUnoDialog.fielditems.size(); i++)
{
- String stablename = "";
+ String stablename = PropertyNames.EMPTY_STRING;
try
{
FieldDescription ofielddescription = (FieldDescription) CurTableWizardUnoDialog.fielditems.get(fieldnames[i]);
@@ -276,7 +274,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
{
e.printStackTrace(System.out);
}
- if (!stablename.equals(""))
+ if (!stablename.equals(PropertyNames.EMPTY_STRING))
{
return stablename;
}
@@ -330,7 +328,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
{
int selindex = JavaTools.FieldInList(NewItems, SelItems[i]);
super.xSelectedFieldsListBox.removeItems((short) selindex, (short) 1);
- /**TODO In this context the items should be better placed at their original position.
+ /**TODO In this context the items should be better placed at their original position.
* but how is this position retrieved?
*/
super.xFieldsListBox.addItem(SelItems[i], xFieldsListBox.getItemCount());
@@ -347,7 +345,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
if (iduplicate != -1)
{
XNameAccess xNameAccessFieldNode;
- String sdisplayname = Desktop.getUniqueName(NewItems, NewItems[iduplicate], "");
+ String sdisplayname = Desktop.getUniqueName(NewItems, NewItems[iduplicate], PropertyNames.EMPTY_STRING);
FieldDescription curfielddescription = new FieldDescription(xMSF, aLocale, this, sdisplayname, NewItems[iduplicate], imaxcolumnchars);
CurTableWizardUnoDialog.fielditems.put(sdisplayname, curfielddescription);
NewItems[iduplicate] = sdisplayname;
diff --git a/wizards/com/sun/star/wizards/table/TableWizard.java b/wizards/com/sun/star/wizards/table/TableWizard.java
index ebcb28ca48b1..bc7f469074d7 100644
--- a/wizards/com/sun/star/wizards/table/TableWizard.java
+++ b/wizards/com/sun/star/wizards/table/TableWizard.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,7 +53,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener,
ScenarioSelector curScenarioSelector;
FieldFormatter curFieldFormatter;
PrimaryKeyHandler curPrimaryKeyHandler;
- String sMsgWizardName = "";
+ String sMsgWizardName = PropertyNames.EMPTY_STRING;
public Hashtable fielditems;
int wizardmode;
String tablename;
@@ -66,7 +66,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener,
public static final int SOFIELDSFORMATPAGE = 2;
public static final int SOPRIMARYKEYPAGE = 3;
public static final int SOFINALPAGE = 4;
- private String sMsgColumnAlreadyExists = "";
+ private String sMsgColumnAlreadyExists = PropertyNames.EMPTY_STRING;
String WizardHeaderText[] = new String[8];
private String m_tableName;
@@ -79,16 +79,16 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener,
Helper.setUnoPropertyValues(xDialogModel,
new String[]
{
- PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_MOVEABLE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Integer(218), Boolean.TRUE, "DialogTable", new Integer(102), new Integer(41), new Integer(1), new Short((short) 0), sTitle, new Integer(330)
+ 218, Boolean.TRUE, "DialogTable", 102, 41, 1, new Short((short) 0), sTitle, 330
});
drawNaviBar();
fielditems = new Hashtable();
//TODO if reportResouces cannot be gotten dispose officedocument
- if (getTableResources() == true)
+ if (getTableResources())
{
setRightPaneHeaders(m_oResource, UIConsts.RID_TABLE + 8, 4);
}
@@ -325,15 +325,15 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener,
Object oFormWizard = this.xMSF.createInstance("com.sun.star.wizards.form.CallFormWizard");
NamedValueCollection wizardContext = new NamedValueCollection();
- wizardContext.put( "ActiveConnection", curTableDescriptor.DBConnection );
+ wizardContext.put( PropertyNames.ACTIVE_CONNECTION, curTableDescriptor.DBConnection );
wizardContext.put( "DataSource", curTableDescriptor.getDataSource() );
- wizardContext.put( "CommandType", CommandType.TABLE );
- wizardContext.put( "Command", scomposedtablename );
+ wizardContext.put( PropertyNames.COMMAND_TYPE, CommandType.TABLE );
+ wizardContext.put( PropertyNames.COMMAND, scomposedtablename );
wizardContext.put( "DocumentUI", m_docUI );
XInitialization xInitialization = UnoRuntime.queryInterface( XInitialization.class, oFormWizard );
xInitialization.initialize( wizardContext.getPropertyValues() );
XJobExecutor xJobExecutor = UnoRuntime.queryInterface( XJobExecutor.class, oFormWizard );
- xJobExecutor.trigger("start");
+ xJobExecutor.trigger(PropertyNames.START);
}
catch (Exception e)
{
@@ -387,7 +387,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener,
{
jexception.printStackTrace(System.out);
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
public boolean getTableResources()
diff --git a/wizards/com/sun/star/wizards/text/TextDocument.java b/wizards/com/sun/star/wizards/text/TextDocument.java
index 4fe2e9f0d710..ae37a7225ee4 100644
--- a/wizards/com/sun/star/wizards/text/TextDocument.java
+++ b/wizards/com/sun/star/wizards/text/TextDocument.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -74,6 +74,7 @@ import com.sun.star.wizards.common.Desktop;
import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.common.JavaTools;
import com.sun.star.wizards.common.Helper.DateUtils;
+import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.document.OfficeDocument;
public class TextDocument
@@ -111,7 +112,7 @@ public class TextDocument
xFrame = OfficeDocument.createNewFrame(xMSF, listener);
xTextDocument = loadAsPreview(_sPreviewURL, true);
- xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xTextDocument);
+ xComponent = UnoRuntime.queryInterface(XComponent.class, xTextDocument);
if (bShowStatusIndicator)
{
@@ -126,10 +127,10 @@ public class TextDocument
this.xMSF = xMSF;
XDesktop xDesktop = Desktop.getDesktop(xMSF);
- XFramesSupplier xFrameSupplier = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, xDesktop);
+ XFramesSupplier xFrameSupplier = UnoRuntime.queryInterface(XFramesSupplier.class, xDesktop);
xFrame = xFrameSupplier.getActiveFrame();
- xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xFrame.getController().getModel());
- xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xComponent);
+ xComponent = UnoRuntime.queryInterface(XComponent.class, xFrame.getController().getModel());
+ xTextDocument = UnoRuntime.queryInterface(XTextDocument.class, xComponent);
if (bShowStatusIndicator)
{
@@ -152,7 +153,7 @@ public class TextDocument
{
m_identifier = _identifier;
}
- };
+ }
// creates an instance of TextDocument containing a blank text document
public TextDocument(XMultiServiceFactory xMSF, ModuleIdentifier _moduleIdentifier, boolean bShowStatusIndicator)
@@ -162,19 +163,19 @@ public class TextDocument
try
{
// create the empty document, and set its module identifier
- xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class,
+ xTextDocument = UnoRuntime.queryInterface(XTextDocument.class,
xMSF.createInstance("com.sun.star.text.TextDocument"));
- XLoadable xLoadable = (XLoadable) UnoRuntime.queryInterface(XLoadable.class, xTextDocument);
+ XLoadable xLoadable = UnoRuntime.queryInterface(XLoadable.class, xTextDocument);
xLoadable.initNew();
- XModule xModule = (XModule) UnoRuntime.queryInterface(XModule.class,
+ XModule xModule = UnoRuntime.queryInterface(XModule.class,
xTextDocument);
xModule.setIdentifier(_moduleIdentifier.getIdentifier());
// load the document into a blank frame
XDesktop xDesktop = Desktop.getDesktop(xMSF);
- XComponentLoader xLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, xDesktop);
+ XComponentLoader xLoader = UnoRuntime.queryInterface(XComponentLoader.class, xDesktop);
PropertyValue[] loadArgs = new PropertyValue[]
{
new PropertyValue("Model", -1, xTextDocument, com.sun.star.beans.PropertyState.DIRECT_VALUE)
@@ -183,7 +184,7 @@ public class TextDocument
// remember some things for later usage
xFrame = xTextDocument.getCurrentController().getFrame();
- xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xTextDocument);
+ xComponent = UnoRuntime.queryInterface(XComponent.class, xTextDocument);
}
catch (Exception e)
{
@@ -203,21 +204,21 @@ public class TextDocument
{
this.xMSF = xMSF;
xFrame = _textDocument.getCurrentController().getFrame();
- xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, _textDocument);
- xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xComponent);
+ xComponent = UnoRuntime.queryInterface(XComponent.class, _textDocument);
+ xTextDocument = UnoRuntime.queryInterface(XTextDocument.class, xComponent);
//PosSize = xFrame.getComponentWindow().getPosSize();
if (bshowStatusIndicator)
{
- XStatusIndicatorFactory xStatusIndicatorFactory = (XStatusIndicatorFactory) UnoRuntime.queryInterface(XStatusIndicatorFactory.class, xFrame);
+ XStatusIndicatorFactory xStatusIndicatorFactory = UnoRuntime.queryInterface(XStatusIndicatorFactory.class, xFrame);
xProgressBar = xStatusIndicatorFactory.createStatusIndicator();
- xProgressBar.start("", 100);
+ xProgressBar.start(PropertyNames.EMPTY_STRING, 100);
xProgressBar.setValue(5);
}
- xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow());
- xMSFDoc = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
- xNumberFormatsSupplier = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument);
+ xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow());
+ xMSFDoc = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
+ xNumberFormatsSupplier = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument);
- XDocumentPropertiesSupplier xDocPropsSuppl = (XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
+ XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
m_xDocProps = xDocPropsSuppl.getDocumentProperties();
CharLocale = (Locale) Helper.getUnoStructValue((Object) xComponent, "CharLocale");
xText = xTextDocument.getText();
@@ -225,21 +226,21 @@ public class TextDocument
private void init()
{
- xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow());
- xMSFDoc = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
- xNumberFormatsSupplier = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument);
- XDocumentPropertiesSupplier xDocPropsSuppl = (XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
+ xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow());
+ xMSFDoc = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
+ xNumberFormatsSupplier = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument);
+ XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
m_xDocProps = xDocPropsSuppl.getDocumentProperties();
CharLocale = (Locale) Helper.getUnoStructValue((Object) xComponent, "CharLocale");
- xStorable = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+ xStorable = UnoRuntime.queryInterface(XStorable.class, xTextDocument);
xText = xTextDocument.getText();
}
private void showStatusIndicator()
{
- XStatusIndicatorFactory xStatusIndicatorFactory = (XStatusIndicatorFactory) UnoRuntime.queryInterface(XStatusIndicatorFactory.class, xFrame);
+ XStatusIndicatorFactory xStatusIndicatorFactory = UnoRuntime.queryInterface(XStatusIndicatorFactory.class, xFrame);
xProgressBar = xStatusIndicatorFactory.createStatusIndicator();
- xProgressBar.start("", 100);
+ xProgressBar.start(PropertyNames.EMPTY_STRING, 100);
xProgressBar.setValue(5);
}
@@ -248,7 +249,7 @@ public class TextDocument
PropertyValue loadValues[] = new PropertyValue[3];
// open document in the Preview mode
loadValues[0] = new PropertyValue();
- loadValues[0].Name = "ReadOnly";
+ loadValues[0].Name = PropertyNames.READ_ONLY;
loadValues[0].Value = Boolean.TRUE;
loadValues[1] = new PropertyValue();
loadValues[1].Name = "AsTemplate";
@@ -262,7 +263,7 @@ public class TextDocument
{
try
{
- XModifiable xModi = (XModifiable) UnoRuntime.queryInterface(XModifiable.class, xTextDocument);
+ XModifiable xModi = UnoRuntime.queryInterface(XModifiable.class, xTextDocument);
xModi.setModified(false);
}
catch (PropertyVetoException e1)
@@ -273,7 +274,7 @@ public class TextDocument
Object oDoc = OfficeDocument.load(xFrame, sDefaultTemplate, "_self", loadValues);
xTextDocument = (com.sun.star.text.XTextDocument) oDoc;
DocSize = getPageSize();
- xMSFDoc = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
+ xMSFDoc = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
ViewHandler myViewHandler = new ViewHandler(xMSFDoc, xTextDocument);
try
@@ -296,12 +297,12 @@ public class TextDocument
{
try
{
- XStyleFamiliesSupplier xStyleFamiliesSupplier = (XStyleFamiliesSupplier) com.sun.star.uno.UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
+ XStyleFamiliesSupplier xStyleFamiliesSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
com.sun.star.container.XNameAccess xNameAccess = null;
xNameAccess = xStyleFamiliesSupplier.getStyleFamilies();
com.sun.star.container.XNameContainer xPageStyleCollection = null;
- xPageStyleCollection = (com.sun.star.container.XNameContainer) UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles"));
- XStyle xPageStyle = (XStyle) UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName("First Page"));
+ xPageStyleCollection = UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles"));
+ XStyle xPageStyle = UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName("First Page"));
return (Size) Helper.getUnoPropertyValue(xPageStyle, "Size");
}
@@ -321,23 +322,22 @@ public class TextDocument
xFrame = OfficeDocument.createNewFrame(xMSF, listener);
Object oDoc = OfficeDocument.load(xFrame, URL, "_self", xArgs);
xTextDocument = (XTextDocument) oDoc;
- xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xTextDocument);
+ xComponent = UnoRuntime.queryInterface(XComponent.class, xTextDocument);
XWindow xWindow = xFrame.getComponentWindow();
- xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow());
- xMSFDoc = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
- xNumberFormatsSupplier = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument);
+ xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xFrame.getComponentWindow());
+ xMSFDoc = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
+ xNumberFormatsSupplier = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument);
- XDocumentPropertiesSupplier xDocPropsSuppl = (XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
+ XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
m_xDocProps = xDocPropsSuppl.getDocumentProperties();
CharLocale = (Locale) Helper.getUnoStructValue((Object) xComponent, "CharLocale");
}
public static XTextCursor createTextCursor(Object oCursorContainer)
{
- XSimpleText xText = (XSimpleText) UnoRuntime.queryInterface(XSimpleText.class, oCursorContainer);
- XTextCursor xTextCursor = xText.createTextCursor();
- return xTextCursor;
+ XSimpleText xText = UnoRuntime.queryInterface(XSimpleText.class, oCursorContainer);
+ return xText.createTextCursor();
}
// Todo: This method is unsecure because the last index is not necessarily the last section
@@ -356,7 +356,7 @@ public class TextDocument
xTextCursor.gotoStart(false);
com.sun.star.wizards.common.Helper.setUnoPropertyValue(xTextCursor, "PageDescName", "First Page");
xTextCursor.setString(ScaleString);
- XTextViewCursorSupplier xViewCursor = (XTextViewCursorSupplier) UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xTextDocument.getCurrentController());
+ XTextViewCursorSupplier xViewCursor = UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xTextDocument.getCurrentController());
XTextViewCursor xTextViewCursor = xViewCursor.getViewCursor();
xTextViewCursor.gotoStart(false);
int iFirstPos = xTextViewCursor.getPosition().X;
@@ -365,14 +365,14 @@ public class TextDocument
iScale = (iLastPos - iFirstPos) / iScaleLen;
xTextCursor.gotoStart(false);
xTextCursor.gotoEnd(true);
- xTextCursor.setString("");
+ xTextCursor.setString(PropertyNames.EMPTY_STRING);
unlockallControllers();
return iScale;
}
public void unlockallControllers()
{
- while (xTextDocument.hasControllersLocked() == true)
+ while (xTextDocument.hasControllersLocked())
{
xTextDocument.unlockControllers();
}
@@ -380,7 +380,7 @@ public class TextDocument
public void refresh()
{
- XRefreshable xRefreshable = (XRefreshable) UnoRuntime.queryInterface(XRefreshable.class, xTextDocument);
+ XRefreshable xRefreshable = UnoRuntime.queryInterface(XRefreshable.class, xTextDocument);
xRefreshable.refresh();
}
@@ -396,10 +396,10 @@ public class TextDocument
try
{
Object uD = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.UserProfile/Data", false);
- XNameAccess xNA = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, uD);
+ XNameAccess xNA = UnoRuntime.queryInterface(XNameAccess.class, uD);
Object gn = xNA.getByName("givenname");
Object sn = xNA.getByName("sn");
- String fullname = (String) gn + " " + (String) sn;
+ String fullname = gn + PropertyNames.SPACE + sn;
Calendar cal = new GregorianCalendar();
int year = cal.get(Calendar.YEAR);
@@ -413,12 +413,12 @@ public class TextDocument
int ff = du.getFormat(NumberFormatIndex.DATE_SYS_DDMMYY);
String myDate = du.format(ff, currentDate);
- XDocumentPropertiesSupplier xDocPropsSuppl = (XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
+ XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
XDocumentProperties xDocProps2 = xDocPropsSuppl.getDocumentProperties();
xDocProps2.setAuthor(fullname);
xDocProps2.setModifiedBy(fullname);
String description = xDocProps2.getDescription();
- description = description + " " + TemplateDescription;
+ description = description + PropertyNames.SPACE + TemplateDescription;
description = JavaTools.replaceSubString(description, WizardName, "<wizard_name>");
description = JavaTools.replaceSubString(description, myDate, "<current_date>");
xDocProps2.setDescription(description);
@@ -449,7 +449,7 @@ public class TextDocument
{
try
{
- XTextContent xTextContent = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, oTextContent);
+ XTextContent xTextContent = UnoRuntime.queryInterface(XTextContent.class, oTextContent);
xText.removeTextContent(xTextContent);
return true;
}
@@ -469,11 +469,11 @@ public class TextDocument
*/
public static int getPageCount(Object model)
{
- XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, model);
+ XModel xModel = UnoRuntime.queryInterface(XModel.class, model);
XController xController = xModel.getCurrentController();
- XTextViewCursorSupplier xTextVCS = (XTextViewCursorSupplier) UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xController);
+ XTextViewCursorSupplier xTextVCS = UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xController);
XTextViewCursor xTextVC = xTextVCS.getViewCursor();
- XPageCursor xPC = (XPageCursor) UnoRuntime.queryInterface(XPageCursor.class, xTextVC);
+ XPageCursor xPC = UnoRuntime.queryInterface(XPageCursor.class, xTextVC);
xPC.jumpToLastPage();
return xPC.getPage();
}
diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.java b/wizards/com/sun/star/wizards/text/TextFieldHandler.java
index e25227516058..7fe088f7f4a6 100644
--- a/wizards/com/sun/star/wizards/text/TextFieldHandler.java
+++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -60,17 +60,17 @@ public class TextFieldHandler
/**
* Creates a new instance of TextFieldHandler
* @param xMSF
- * @param xTextDocument
+ * @param xTextDocument
*/
public TextFieldHandler(XMultiServiceFactory xMSF, XTextDocument xTextDocument)
{
this.xMSFDoc = xMSF;
- xTextFieldsSupplier = (XTextFieldsSupplier) UnoRuntime.queryInterface(XTextFieldsSupplier.class, xTextDocument);
+ xTextFieldsSupplier = UnoRuntime.queryInterface(XTextFieldsSupplier.class, xTextDocument);
}
public void refreshTextFields()
{
- XRefreshable xUp = (XRefreshable) UnoRuntime.queryInterface(XRefreshable.class, xTextFieldsSupplier.getTextFields());
+ XRefreshable xUp = UnoRuntime.queryInterface(XRefreshable.class, xTextFieldsSupplier.getTextFields());
xUp.refresh();
}
@@ -82,21 +82,20 @@ public class TextFieldHandler
Object oTextField = Helper.getUnoPropertyValue(xTextRange, "TextField");
if (com.sun.star.uno.AnyConverter.isVoid(oTextField))
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
else
{
- XDependentTextField xDependent = (XDependentTextField) UnoRuntime.queryInterface(XDependentTextField.class, oTextField);
+ XDependentTextField xDependent = UnoRuntime.queryInterface(XDependentTextField.class, oTextField);
XPropertySet xMaster = xDependent.getTextFieldMaster();
- String UserFieldContent = (String) xMaster.getPropertyValue("Content");
- return UserFieldContent;
+ return (String) xMaster.getPropertyValue("Content");
}
}
catch (com.sun.star.uno.Exception exception)
{
exception.printStackTrace(System.out);
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
public void insertUserField(XTextCursor xTextCursor, String FieldName, String FieldTitle)
@@ -104,12 +103,12 @@ public class TextFieldHandler
try
{
XInterface xField = (XInterface) xMSFDoc.createInstance("com.sun.star.text.TextField.User");
- XDependentTextField xDepField = (XDependentTextField) UnoRuntime.queryInterface(XDependentTextField.class, xField);
- XTextContent xFieldContent = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xField);
+ XDependentTextField xDepField = UnoRuntime.queryInterface(XDependentTextField.class, xField);
+ XTextContent xFieldContent = UnoRuntime.queryInterface(XTextContent.class, xField);
if (xTextFieldsSupplier.getTextFieldMasters().hasByName("com.sun.star.text.FieldMaster.User." + FieldName))
{
Object oMaster = xTextFieldsSupplier.getTextFieldMasters().getByName("com.sun.star.text.FieldMaster.User." + FieldName);
- XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, oMaster);
+ XComponent xComponent = UnoRuntime.queryInterface(XComponent.class, oMaster);
xComponent.dispose();
}
XPropertySet xPSet = createUserField(FieldName, FieldTitle);
@@ -138,7 +137,7 @@ public class TextFieldHandler
public XPropertySet createUserField(String FieldName, String FieldTitle) throws com.sun.star.uno.Exception
{
Object oMaster = xMSFDoc.createInstance("com.sun.star.text.FieldMaster.User");
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oMaster);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oMaster);
xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, FieldName);
xPSet.setPropertyValue("Content", FieldTitle);
@@ -160,7 +159,7 @@ public class TextFieldHandler
while (xEnum.hasMoreElements())
{
Object oTextField = xEnum.nextElement();
- XDependentTextField xDependent = (XDependentTextField) UnoRuntime.queryInterface(XDependentTextField.class, oTextField);
+ XDependentTextField xDependent = UnoRuntime.queryInterface(XDependentTextField.class, oTextField);
XPropertySet xPropertySet = xDependent.getTextFieldMaster();
if (xPropertySet.getPropertySetInfo().hasPropertyByName(_PropertyName))
{
@@ -235,16 +234,16 @@ public class TextFieldHandler
while (xEnum.hasMoreElements())
{
Object oTextField = xEnum.nextElement();
- XServiceInfo xSI = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, oTextField);
+ XServiceInfo xSI = UnoRuntime.queryInterface(XServiceInfo.class, oTextField);
if (xSI.supportsService("com.sun.star.text.TextField.ExtendedUser"))
{
- XUpdatable xUp = (XUpdatable) UnoRuntime.queryInterface(XUpdatable.class, oTextField);
+ XUpdatable xUp = UnoRuntime.queryInterface(XUpdatable.class, oTextField);
xUp.update();
}
if (xSI.supportsService("com.sun.star.text.TextField.User"))
{
- XUpdatable xUp = (XUpdatable) UnoRuntime.queryInterface(XUpdatable.class, oTextField);
+ XUpdatable xUp = UnoRuntime.queryInterface(XUpdatable.class, oTextField);
xUp.update();
}
}
@@ -270,11 +269,11 @@ public class TextFieldHandler
while (xEnum.hasMoreElements())
{
Object oTextField = xEnum.nextElement();
- XServiceInfo xSI = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, oTextField);
+ XServiceInfo xSI = UnoRuntime.queryInterface(XServiceInfo.class, oTextField);
if (xSI.supportsService("com.sun.star.text.TextField.DateTime"))
{
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oTextField);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oTextField);
xPSet.setPropertyValue("IsFixed", Boolean.FALSE);
xPSet.setPropertyValue("DateTimeValue", dt);
}
@@ -294,11 +293,11 @@ public class TextFieldHandler
while (xEnum.hasMoreElements())
{
Object oTextField = xEnum.nextElement();
- XServiceInfo xSI = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, oTextField);
+ XServiceInfo xSI = UnoRuntime.queryInterface(XServiceInfo.class, oTextField);
if (xSI.supportsService("com.sun.star.text.TextField.DateTime"))
{
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oTextField);
- xPSet.setPropertyValue("IsFixed", new Boolean(_bSetFixed));
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oTextField);
+ xPSet.setPropertyValue("IsFixed", Boolean.valueOf(_bSetFixed));
}
}
}
diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.py b/wizards/com/sun/star/wizards/text/TextFieldHandler.py
index b757263c11ba..97d578dd24e9 100644
--- a/wizards/com/sun/star/wizards/text/TextFieldHandler.py
+++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.py
@@ -187,3 +187,4 @@ class TextFieldHandler(object):
self.refreshTextFields()
except Exception, e:
traceback.print_exc()
+
diff --git a/wizards/com/sun/star/wizards/text/TextFrameHandler.java b/wizards/com/sun/star/wizards/text/TextFrameHandler.java
index 562444a1ad84..9369801a384e 100644
--- a/wizards/com/sun/star/wizards/text/TextFrameHandler.java
+++ b/wizards/com/sun/star/wizards/text/TextFrameHandler.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,12 +39,11 @@ public class TextFrameHandler
public static XTextFrame getFrameByName(String sFrameName, XTextDocument xTD) throws NoSuchElementException, WrappedTargetException
{
- XTextFramesSupplier xFrameSupplier = (XTextFramesSupplier) UnoRuntime.queryInterface(XTextFramesSupplier.class, xTD);
+ XTextFramesSupplier xFrameSupplier = UnoRuntime.queryInterface(XTextFramesSupplier.class, xTD);
if (xFrameSupplier.getTextFrames().hasByName(sFrameName))
{
Object oTextFrame = xFrameSupplier.getTextFrames().getByName(sFrameName);
- XTextFrame xTextFrame = (XTextFrame) UnoRuntime.queryInterface(XTextFrame.class, oTextFrame);
- return xTextFrame;
+ return UnoRuntime.queryInterface(XTextFrame.class, oTextFrame);
}
return null;
}
diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.java b/wizards/com/sun/star/wizards/text/TextSectionHandler.java
index 42fd75879c3c..cdb930cebaf9 100644
--- a/wizards/com/sun/star/wizards/text/TextSectionHandler.java
+++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,6 +43,7 @@ import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.Exception;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.wizards.common.Helper;
+import com.sun.star.wizards.common.PropertyNames;
public class TextSectionHandler
{
@@ -58,7 +59,7 @@ public class TextSectionHandler
this.xMSFDoc = xMSF;
this.xTextDocument = xTextDocument;
xText = xTextDocument.getText();
- xTextSectionsSupplier = (XTextSectionsSupplier) UnoRuntime.queryInterface(XTextSectionsSupplier.class, xTextDocument);
+ xTextSectionsSupplier = UnoRuntime.queryInterface(XTextSectionsSupplier.class, xTextDocument);
}
public void removeTextSectionbyName(String SectionName)
@@ -66,7 +67,7 @@ public class TextSectionHandler
try
{
XNameAccess xAllTextSections = xTextSectionsSupplier.getTextSections();
- if (xAllTextSections.hasByName(SectionName) == true)
+ if (xAllTextSections.hasByName(SectionName))
{
Object oTextSection = xTextSectionsSupplier.getTextSections().getByName(SectionName);
removeTextSection(oTextSection);
@@ -88,7 +89,7 @@ public class TextSectionHandler
{
try
{
- XIndexAccess xAllTextSections = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections());
+ XIndexAccess xAllTextSections = UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections());
Object oTextSection = xAllTextSections.getByIndex(xAllTextSections.getCount() - 1);
removeTextSection(oTextSection);
}
@@ -102,7 +103,7 @@ public class TextSectionHandler
{
try
{
- XTextContent xTextContentTextSection = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, _oTextSection);
+ XTextContent xTextContentTextSection = UnoRuntime.queryInterface(XTextContent.class, _oTextSection);
xText.removeTextContent(xTextContentTextSection);
}
catch (Exception exception)
@@ -115,12 +116,12 @@ public class TextSectionHandler
{
try
{
- XIndexAccess xAllTextSections = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections());
+ XIndexAccess xAllTextSections = UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections());
int TextSectionCount = xAllTextSections.getCount();
for (int i = TextSectionCount - 1; i >= 0; i--)
{
- XTextContent xTextContentTextSection = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xAllTextSections.getByIndex(i));
- XPropertySet xTextSectionPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextContentTextSection);
+ XTextContent xTextContentTextSection = UnoRuntime.queryInterface(XTextContent.class, xAllTextSections.getByIndex(i));
+ XPropertySet xTextSectionPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xTextContentTextSection);
boolean bRemoveTextSection = (!AnyConverter.toBoolean(xTextSectionPropertySet.getPropertyValue("IsVisible")));
if (bRemoveTextSection)
{
@@ -138,12 +139,12 @@ public class TextSectionHandler
{
try
{
- XIndexAccess xAllTextSections = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections());
+ XIndexAccess xAllTextSections = UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections());
int TextSectionCount = xAllTextSections.getCount();
for (int i = TextSectionCount - 1; i >= 0; i--)
{
- XTextContent xTextContentTextSection = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xAllTextSections.getByIndex(i));
- XPropertySet xTextSectionPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextContentTextSection);
+ XTextContent xTextContentTextSection = UnoRuntime.queryInterface(XTextContent.class, xAllTextSections.getByIndex(i));
+ XPropertySet xTextSectionPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xTextContentTextSection);
xText.removeTextContent(xTextContentTextSection);
}
}
@@ -158,10 +159,10 @@ public class TextSectionHandler
try
{
Object oTextSection;
- XIndexAccess xAllTextSections = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections());
+ XIndexAccess xAllTextSections = UnoRuntime.queryInterface(XIndexAccess.class, xTextSectionsSupplier.getTextSections());
int iSectionCount = xAllTextSections.getCount();
SectionFileLink oSectionLink = new SectionFileLink();
- oSectionLink.FileURL = "";
+ oSectionLink.FileURL = PropertyNames.EMPTY_STRING;
for (int i = 0; i < iSectionCount; i++)
{
oTextSection = xAllTextSections.getByIndex(i);
@@ -170,7 +171,7 @@ public class TextSectionHandler
"FileLink", "LinkRegion"
}, new Object[]
{
- oSectionLink, ""
+ oSectionLink, PropertyNames.EMPTY_STRING
});
}
}
@@ -183,13 +184,13 @@ public class TextSectionHandler
public void breakLinkOfTextSection(Object oTextSection)
{
SectionFileLink oSectionLink = new SectionFileLink();
- oSectionLink.FileURL = "";
+ oSectionLink.FileURL = PropertyNames.EMPTY_STRING;
Helper.setUnoPropertyValues(oTextSection, new String[]
{
"FileLink", "LinkRegion"
}, new Object[]
{
- oSectionLink, ""
+ oSectionLink, PropertyNames.EMPTY_STRING
});
}
@@ -217,7 +218,7 @@ public class TextSectionHandler
{
oSectionLink, SectionName
});
- XNamed xSectionName = (XNamed) UnoRuntime.queryInterface(XNamed.class, oTextSection);
+ XNamed xSectionName = UnoRuntime.queryInterface(XNamed.class, oTextSection);
String NewSectionName = xSectionName.getName();
if (NewSectionName.compareTo(SectionName) != 0)
{
@@ -233,7 +234,7 @@ public class TextSectionHandler
{
XTextCursor xTextCursor = xText.createTextCursor();
xText.insertControlCharacter(xTextCursor, ControlCharacter.PARAGRAPH_BREAK, false);
- // Helper.setUnoPropertyValue(xTextCursor, "PageDescName", "First Page");
+ // Helper.setUnoPropertyValue(xTextCursor, "PageDescName", "First Page");
xTextCursor.collapseToEnd();
}
XTextCursor xSecondTextCursor = xText.createTextCursor();
@@ -251,14 +252,14 @@ public class TextSectionHandler
try
{
Object xTextSection;
- if (xTextSectionsSupplier.getTextSections().hasByName(sectionName) == true)
+ if (xTextSectionsSupplier.getTextSections().hasByName(sectionName))
{
xTextSection = xTextSectionsSupplier.getTextSections().getByName(sectionName);
}
else
{
xTextSection = xMSFDoc.createInstance("com.sun.star.text.TextSection");
- XTextContent xTextContentSection = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xTextSection);
+ XTextContent xTextContentSection = UnoRuntime.queryInterface(XTextContent.class, xTextSection);
position.getText().insertTextContent(position, xTextContentSection, false);
}
linkSectiontoTemplate(xTextSection, templateName, sectionName);
diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.py b/wizards/com/sun/star/wizards/text/TextSectionHandler.py
index 79dfdf11447e..67eee12e2d51 100644
--- a/wizards/com/sun/star/wizards/text/TextSectionHandler.py
+++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.py
@@ -130,3 +130,4 @@ class TextSectionHandler(object):
linkSectiontoTemplate(xTextSection, templateName, sectionName)
except Exception, exception:
traceback.print_exc()
+
diff --git a/wizards/com/sun/star/wizards/text/TextStyleHandler.java b/wizards/com/sun/star/wizards/text/TextStyleHandler.java
index e6c952e65785..2ef3cd3451f4 100644
--- a/wizards/com/sun/star/wizards/text/TextStyleHandler.java
+++ b/wizards/com/sun/star/wizards/text/TextStyleHandler.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,6 +36,7 @@ import com.sun.star.text.XTextDocument;
import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.Exception;
import com.sun.star.uno.UnoRuntime;
+import com.sun.star.wizards.common.PropertyNames;
public class TextStyleHandler
{
@@ -49,21 +50,21 @@ public class TextStyleHandler
{
this.xMSFDoc = xMSF;
this.xTextDocument = xTextDocument;
- xStyleFamiliesSupplier = (XStyleFamiliesSupplier) UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
+ xStyleFamiliesSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
}
public void loadStyleTemplates(String sTemplateUrl, String OptionString)
{
try
{
- XStyleLoader xStyleLoader = (XStyleLoader) UnoRuntime.queryInterface(XStyleLoader.class, xStyleFamiliesSupplier.getStyleFamilies());
+ XStyleLoader xStyleLoader = UnoRuntime.queryInterface(XStyleLoader.class, xStyleFamiliesSupplier.getStyleFamilies());
com.sun.star.beans.PropertyValue[] StyleOptions = xStyleLoader.getStyleLoaderOptions();
- String CurOptionName = "";
+ String CurOptionName = PropertyNames.EMPTY_STRING;
int PropCount = StyleOptions.length;
for (int i = 0; i < PropCount; i++)
{
CurOptionName = StyleOptions[i].Name;
- StyleOptions[i].Value = new Boolean((CurOptionName.compareTo(OptionString) == 0) || (CurOptionName.compareTo("OverwriteStyles") == 0));
+ StyleOptions[i].Value = Boolean.valueOf((CurOptionName.compareTo(OptionString) == 0) || (CurOptionName.compareTo("OverwriteStyles") == 0));
}
xStyleLoader.loadStylesFromURL(sTemplateUrl, StyleOptions);
}
@@ -79,10 +80,10 @@ public class TextStyleHandler
{
XPropertySet xPropertySet = null;
Object oStyleFamily = xStyleFamiliesSupplier.getStyleFamilies().getByName(sStyleFamily);
- XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oStyleFamily);
+ XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, oStyleFamily);
if (xNameAccess.hasByName(sStyleName))
{
- xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xNameAccess.getByName(sStyleName));
+ xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xNameAccess.getByName(sStyleName));
}
return xPropertySet;
}
@@ -97,7 +98,7 @@ public class TextStyleHandler
{
try
{
- _xPropPageStyle.setPropertyValue("IsLandscape", new Boolean(_bIsLandscape));
+ _xPropPageStyle.setPropertyValue("IsLandscape", Boolean.valueOf(_bIsLandscape));
Size aPageSize = (Size) AnyConverter.toObject(Size.class, _xPropPageStyle.getPropertyValue("Size"));
int nPageWidth = aPageSize.Width;
int nPageHeight = aPageSize.Height;
diff --git a/wizards/com/sun/star/wizards/text/TextTableHandler.java b/wizards/com/sun/star/wizards/text/TextTableHandler.java
index d3646a7cfa37..1085a25f12c6 100644
--- a/wizards/com/sun/star/wizards/text/TextTableHandler.java
+++ b/wizards/com/sun/star/wizards/text/TextTableHandler.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,9 +69,9 @@ public class TextTableHandler
this.xMSFDoc = xMSF;
this.xTextDocument = xTextDocument;
xText = xTextDocument.getText();
- xTextTablesSupplier = (XTextTablesSupplier) UnoRuntime.queryInterface(XTextTablesSupplier.class, xTextDocument);
- xSimpleText = (XSimpleText) UnoRuntime.queryInterface(XSimpleText.class, xTextDocument.getText());
- XNumberFormatsSupplier xNumberFormatsSupplier = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument);
+ xTextTablesSupplier = UnoRuntime.queryInterface(XTextTablesSupplier.class, xTextDocument);
+ xSimpleText = UnoRuntime.queryInterface(XSimpleText.class, xTextDocument.getText());
+ XNumberFormatsSupplier xNumberFormatsSupplier = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument);
aCharLocale = (Locale) Helper.getUnoStructValue((Object) xTextDocument, "CharLocale");
oNumberFormatter = new NumberFormatter(xNumberFormatsSupplier, aCharLocale);
}
@@ -95,7 +95,7 @@ public class TextTableHandler
if (xAllTextTables.hasByName(_sTableName))
{
Object oTable = xAllTextTables.getByName(_sTableName);
- xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, oTable);
+ xTextTable = UnoRuntime.queryInterface(XTextTable.class, oTable);
}
}
catch (Exception exception)
@@ -109,11 +109,10 @@ public class TextTableHandler
{
try
{
- XIndexAccess xAllTextTables = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xTextTablesSupplier.getTextTables());
+ XIndexAccess xAllTextTables = UnoRuntime.queryInterface(XIndexAccess.class, xTextTablesSupplier.getTextTables());
int MaxIndex = xAllTextTables.getCount() - 1;
Object oTable = xAllTextTables.getByIndex(MaxIndex);
- XTextTable xTextTable = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, oTable);
- return xTextTable;
+ return UnoRuntime.queryInterface(XTextTable.class, oTable);
}
catch (Exception exception)
{
@@ -127,7 +126,7 @@ public class TextTableHandler
try
{
com.sun.star.uno.XInterface xTextTable = (XInterface) xMSFDoc.createInstance("com.sun.star.text.TextTable");
- XTextContent xTextContentTable = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xTextTable);
+ XTextContent xTextContentTable = UnoRuntime.queryInterface(XTextContent.class, xTextTable);
if (xTextCursor == null)
{
xTextCursor = xTextDocument.getText().createTextCursor();
@@ -145,7 +144,7 @@ public class TextTableHandler
{
try
{
- XIndexAccess xAllTextTables = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xTextTablesSupplier.getTextTables());
+ XIndexAccess xAllTextTables = UnoRuntime.queryInterface(XIndexAccess.class, xTextTablesSupplier.getTextTables());
int TextTableCount = xAllTextTables.getCount();
for (int i = TextTableCount - 1; i >= 0; i--)
{
@@ -162,7 +161,7 @@ public class TextTableHandler
{
try
{
- XIndexAccess xAllTextTables = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xTextTablesSupplier.getTextTables());
+ XIndexAccess xAllTextTables = UnoRuntime.queryInterface(XIndexAccess.class, xTextTablesSupplier.getTextTables());
Object oTextTable = xAllTextTables.getByIndex(xAllTextTables.getCount() - 1);
removeTextTable(oTextTable);
}
@@ -176,7 +175,7 @@ public class TextTableHandler
{
try
{
- XTextContent xTextContentTable = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, oTextTable);
+ XTextContent xTextContentTable = UnoRuntime.queryInterface(XTextContent.class, oTextTable);
xTextDocument.getText().removeTextContent(xTextContentTable);
}
catch (Exception exception)
@@ -190,7 +189,7 @@ public class TextTableHandler
try
{
XNameAccess xAllTextTables = xTextTablesSupplier.getTextTables();
- if (xAllTextTables.hasByName(TableName) == true)
+ if (xAllTextTables.hasByName(TableName))
{
removeTextTable(xAllTextTables.getByName(TableName));
}
@@ -209,7 +208,7 @@ public class TextTableHandler
if (xTextTableNames.hasByName(OldTableName))
{
Object oTextTable = xTextTableNames.getByName(OldTableName);
- XNamed xTextTableName = (XNamed) UnoRuntime.queryInterface(XNamed.class, oTextTable);
+ XNamed xTextTableName = UnoRuntime.queryInterface(XNamed.class, oTextTable);
xTextTableName.setName(NewTableName);
}
}
@@ -236,10 +235,10 @@ public class TextTableHandler
{
XFrame xFrame = this.xTextDocument.getCurrentController().getFrame();
int ColCount = xTextTable.getColumns().getCount();
- XCellRange xCellRange = (XCellRange) UnoRuntime.queryInterface(XCellRange.class, xTextTable);
+ XCellRange xCellRange = UnoRuntime.queryInterface(XCellRange.class, xTextTable);
XCellRange xLocCellRange = xCellRange.getCellRangeByPosition(0, 0, ColCount - 1, 1);
short iHoriOrient = AnyConverter.toShort(Helper.getUnoPropertyValue(xTextTable, "HoriOrient"));
- XSelectionSupplier xSelection = (XSelectionSupplier) UnoRuntime.queryInterface(XSelectionSupplier.class, xTextDocument.getCurrentController());
+ XSelectionSupplier xSelection = UnoRuntime.queryInterface(XSelectionSupplier.class, xTextDocument.getCurrentController());
xSelection.select(xLocCellRange);
Desktop.dispatchURL(_xMSF, ".Uno:DistributeColumns", xFrame);
Desktop.dispatchURL(_xMSF, ".Uno:SetOptimalColumnWidth", xFrame);
diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.java b/wizards/com/sun/star/wizards/text/ViewHandler.java
index e29ad10cfbb1..b900db859519 100644
--- a/wizards/com/sun/star/wizards/text/ViewHandler.java
+++ b/wizards/com/sun/star/wizards/text/ViewHandler.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,26 +59,26 @@ public class ViewHandler
{
this.xMSFDoc = xMSF;
this.xTextDocument = xTextDocument;
- xTextViewCursorSupplier = (XTextViewCursorSupplier) UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xTextDocument.getCurrentController());
- xViewSettingsSupplier = (XViewSettingsSupplier) UnoRuntime.queryInterface(XViewSettingsSupplier.class, xTextDocument.getCurrentController());
- xStyleFamiliesSupplier = (XStyleFamiliesSupplier) UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
+ xTextViewCursorSupplier = UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xTextDocument.getCurrentController());
+ xViewSettingsSupplier = UnoRuntime.queryInterface(XViewSettingsSupplier.class, xTextDocument.getCurrentController());
+ xStyleFamiliesSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
}
public void selectFirstPage(TextTableHandler oTextTableHandler)
{
try
{
- XPageCursor xPageCursor = (XPageCursor) UnoRuntime.queryInterface(XPageCursor.class, xTextViewCursorSupplier.getViewCursor());
- XTextCursor xViewTextCursor = (XTextCursor) UnoRuntime.queryInterface(XTextCursor.class, xPageCursor);
+ XPageCursor xPageCursor = UnoRuntime.queryInterface(XPageCursor.class, xTextViewCursorSupplier.getViewCursor());
+ XTextCursor xViewTextCursor = UnoRuntime.queryInterface(XTextCursor.class, xPageCursor);
xPageCursor.jumpToFirstPage();
xPageCursor.jumpToStartOfPage();
Helper.setUnoPropertyValue(xPageCursor, "PageDescName", "First Page");
Object oPageStyles = xStyleFamiliesSupplier.getStyleFamilies().getByName("PageStyles");
- XNameAccess xName = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oPageStyles);
+ XNameAccess xName = UnoRuntime.queryInterface(XNameAccess.class, oPageStyles);
Object oPageStyle = xName.getByName("First Page");
- XIndexAccess xAllTextTables = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables());
- XTextContent xTextTable = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xAllTextTables.getByIndex(0));
- XTextRange xRange = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xTextTable.getAnchor().getText());
+ XIndexAccess xAllTextTables = UnoRuntime.queryInterface(XIndexAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables());
+ 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");
diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java
index 69583f14c8bd..ee6f302fa25f 100644
--- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java
+++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,6 +26,7 @@
************************************************************************/
package com.sun.star.wizards.ui;
+import java.util.ArrayList;
import java.util.Vector;
import com.sun.star.wizards.common.*;
import com.sun.star.wizards.db.*;
@@ -44,7 +45,6 @@ public class AggregateComponent extends ControlScroller
{
"SUM", "AVG", "MIN", "MAX"
};
- ;
QueryMetaData CurDBMetaData;
XButton optDetailQuery;
XButton optSummaryQuery;
@@ -79,7 +79,6 @@ public class AggregateComponent extends ControlScroller
{
curHelpID = _firstHelpID;
this.CurDBMetaData = _CurDBMetaData;
- ;
Count = 1;
optDetailQuery = CurUnoDialog.insertRadioButton("optDetailQuery", 0, new ActionListenerImpl(),
new String[]
@@ -88,7 +87,7 @@ public class AggregateComponent extends ControlScroller
},
new Object[]
{
- new Integer(8), HelpIds.getHelpIdString(curHelpID), soptDetailQuery, new Integer(_iPosX), new Integer(iCompPosY - 42), new Short((short) 1), IStep, new Short(curtabindex++), new Integer(iCompWidth)
+ 8, HelpIds.getHelpIdString(curHelpID), soptDetailQuery, new Integer(_iPosX), new Integer(iCompPosY - 42), new Short((short) 1), IStep, new Short(curtabindex++), new Integer(iCompWidth)
});
optSummaryQuery = CurUnoDialog.insertRadioButton("optSummaryQuery", 0, new ActionListenerImpl(),
@@ -98,7 +97,7 @@ public class AggregateComponent extends ControlScroller
},
new Object[]
{
- new Integer(16), HelpIds.getHelpIdString(curHelpID + 1), soptSummaryQuery, Boolean.TRUE, new Integer(_iPosX), new Integer(iCompPosY - 32), IStep, new Short(curtabindex++), new Integer(iCompWidth)
+ 16, HelpIds.getHelpIdString(curHelpID + 1), soptSummaryQuery, Boolean.TRUE, new Integer(_iPosX), new Integer(iCompPosY - 32), IStep, new Short(curtabindex++), new Integer(iCompWidth)
});
CurUnoDialog.insertLabel("lblAggregate",
new String[]
@@ -107,7 +106,7 @@ public class AggregateComponent extends ControlScroller
},
new Object[]
{
- new Integer(8), slblAggregate, new Integer(iCompPosX + 5), new Integer(iCompPosY - 10), IStep, new Short(curtabindex++), new Integer(90)
+ 8, slblAggregate, new Integer(iCompPosX + 5), new Integer(iCompPosY - 10), IStep, new Short(curtabindex++), 90
});
CurUnoDialog.insertLabel("lblFieldnames",
new String[]
@@ -116,7 +115,7 @@ public class AggregateComponent extends ControlScroller
},
new Object[]
{
- new Integer(8), slblFieldNames, new Integer(iCompPosX + 101), new Integer(iCompPosY - 10), IStep, new Short(curtabindex++), new Integer(90)
+ 8, slblFieldNames, new Integer(iCompPosX + 101), new Integer(iCompPosY - 10), IStep, new Short(curtabindex++), 90
});
this.setTotalFieldCount(1);
FontDescriptor oFontDescriptor = new FontDescriptor();
@@ -127,20 +126,20 @@ public class AggregateComponent extends ControlScroller
CurUnoDialog.insertButton("btnplus", SOADDROW, new ActionListenerImpl(),
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- oFontDescriptor, new Integer(14), HelpIds.getHelpIdString(lastHelpIndex + 1), "+", new Integer(_iPosX + iCompWidth - 36), new Integer(iButtonPosY), IStep, new Short((curtabindex++)), new Integer(16)
+ oFontDescriptor, 14, HelpIds.getHelpIdString(lastHelpIndex + 1), "+", new Integer(_iPosX + iCompWidth - 36), new Integer(iButtonPosY), IStep, new Short((curtabindex++)), 16
});
CurUnoDialog.insertButton("btnminus", SOREMOVEROW, new ActionListenerImpl(),
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- oFontDescriptor, new Integer(14), HelpIds.getHelpIdString(lastHelpIndex + 2), "-", new Integer(_iPosX + iCompWidth - 16), new Integer(iButtonPosY), IStep, new Short(curtabindex++), new Integer(16)
+ oFontDescriptor, 14, HelpIds.getHelpIdString(lastHelpIndex + 2), "-", new Integer(_iPosX + iCompWidth - 16), new Integer(iButtonPosY), IStep, new Short(curtabindex++), 16
});
CurDBMetaData.Type = getQueryType();
}
@@ -280,14 +279,14 @@ public class AggregateComponent extends ControlScroller
ControlRow curcontrolrow = null;
boolean biscomplete = true;
CurDBMetaData.Type = getQueryType();
- CurUnoDialog.setControlProperty("btnminus", PropertyNames.PROPERTY_ENABLED, new Boolean((super.getTotalFieldCount() > 0) && (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY)));
+ CurUnoDialog.setControlProperty("btnminus", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf((super.getTotalFieldCount() > 0) && (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY)));
int fieldcount = super.getCurFieldCount();
if (fieldcount > 0)
{
curcontrolrow = (ControlRow) ControlRowVector.elementAt(super.getCurFieldCount() - 1);
biscomplete = curcontrolrow.isComplete();
}
- CurUnoDialog.setControlProperty("btnplus", PropertyNames.PROPERTY_ENABLED, new Boolean(biscomplete && (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY)));
+ CurUnoDialog.setControlProperty("btnplus", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(biscomplete && (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY)));
togglefollowingDialogSteps();
}
@@ -295,8 +294,8 @@ public class AggregateComponent extends ControlScroller
{
CurDBMetaData.Type = getQueryType();
boolean benableComponent = isAggregateComponentEnabled();
- CurUnoDialog.setControlProperty("lblAggregate", PropertyNames.PROPERTY_ENABLED, new Boolean(benableComponent));
- CurUnoDialog.setControlProperty("lblFieldnames", PropertyNames.PROPERTY_ENABLED, new Boolean(benableComponent));
+ CurUnoDialog.setControlProperty("lblAggregate", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benableComponent));
+ CurUnoDialog.setControlProperty("lblFieldnames", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(benableComponent));
toggleButtons();
super.toggleComponent(benableComponent);
super.toggleControls(benableComponent);
@@ -356,7 +355,7 @@ public class AggregateComponent extends ControlScroller
ControlRow oControlRow = (ControlRow) ControlRowVector.elementAt(i);
// if (i == _index)
// oControlRow.settovoid();
-// else
+// else
oControlRow.setVisible(false);
}
}
@@ -370,11 +369,10 @@ public class AggregateComponent extends ControlScroller
CurDBMetaData.Type = getQueryType();
if (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY)
{
- Vector aggregatevector = new Vector();
+ ArrayList<String[]> aggregatevector = new ArrayList<String[]>();
PropertyValue[][] aggregatelist = this.getScrollFieldValues();
PropertyValue[] currowproperties;
PropertyValue curaggregateproperty;
- int a = 0;
if (CurDBMetaData.AggregateFieldNames != null)
{
for (int i = 0; i < aggregatelist.length; i++)
@@ -390,12 +388,11 @@ public class AggregateComponent extends ControlScroller
curaggregatename[0] = CurDBMetaData.NumericFieldNames[iselfield[0]];
curaggregatename[1] = this.sFunctionOperators[iselfunction[0]];
aggregatevector.add(curaggregatename);
- a++;
}
}
}
}
- CurDBMetaData.AggregateFieldNames = new String[a][2];
+ CurDBMetaData.AggregateFieldNames = new String[aggregatevector.size()][2];
aggregatevector.toArray(CurDBMetaData.AggregateFieldNames);
}
@@ -407,7 +404,7 @@ public class AggregateComponent extends ControlScroller
String sDisplayFunction = sFunctions[index];
sDuplicateAggregateFunction = JavaTools.replaceSubString(sDuplicateAggregateFunction, sDisplayFunction, "<FUNCTION>");
CurUnoDialog.showMessageBox("WarningBox", VclWindowPeerAttribute.OK, sDuplicateAggregateFunction);
- CurUnoDialog.vetoableChange(new java.beans.PropertyChangeEvent(CurUnoDialog, "Steps", new Integer(1), new Integer(2)));
+ CurUnoDialog.vetoableChange(new java.beans.PropertyChangeEvent(CurUnoDialog, "Steps", 1, 2));
return new String[][]
{
};
@@ -528,11 +525,11 @@ public class AggregateComponent extends ControlScroller
xFunctionListBox = CurUnoDialog.insertListBox(getFunctionControlName(index), 1, null, new ItemListenerImpl(),
new String[]
{
- "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.STRING_ITEM_LIST, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- Boolean.TRUE, new Integer(12), HelpIds.getHelpIdString(_curHelpID++), new Integer(iCompPosX + 4), new Integer(ypos), UIConsts.INVISIBLESTEP, sFunctions, new Short(curtabindex++), new Integer(88)
+ Boolean.TRUE, 12, HelpIds.getHelpIdString(_curHelpID++), new Integer(iCompPosX + 4), new Integer(ypos), UIConsts.INVISIBLESTEP, sFunctions, new Short(curtabindex++), 88
});
xFieldListBox = CurUnoDialog.insertListBox(getFieldsControlName(index), 1, null, new ItemListenerImpl(),
@@ -542,7 +539,7 @@ public class AggregateComponent extends ControlScroller
},
new Object[]
{
- Boolean.TRUE, new Integer(12), HelpIds.getHelpIdString(_curHelpID++), new Integer(iCompPosX + 98), new Integer(ypos), UIConsts.INVISIBLESTEP, new Short(curtabindex++), new Integer(86)
+ Boolean.TRUE, 12, HelpIds.getHelpIdString(_curHelpID++), new Integer(iCompPosX + 98), new Integer(ypos), UIConsts.INVISIBLESTEP, new Short(curtabindex++), 86
});
lastHelpIndex = _curHelpID - 1;
}
@@ -570,13 +567,13 @@ public class AggregateComponent extends ControlScroller
private void insertFieldNames()
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(xFieldListBox), "StringItemList", CurDBMetaData.NumericFieldNames);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xFieldListBox), PropertyNames.STRING_ITEM_LIST, CurDBMetaData.NumericFieldNames);
}
private boolean isComplete()
{
- boolean bfieldnameisselected = (Helper.getUnoArrayPropertyValue(UnoDialog.getModel(xFieldListBox), "SelectedItems") != null);
- boolean bfunctionisselected = (Helper.getUnoArrayPropertyValue(UnoDialog.getModel(xFunctionListBox), "SelectedItems") != null);
+ boolean bfieldnameisselected = (Helper.getUnoArrayPropertyValue(UnoDialog.getModel(xFieldListBox), PropertyNames.SELECTED_ITEMS) != null);
+ boolean bfunctionisselected = (Helper.getUnoArrayPropertyValue(UnoDialog.getModel(xFunctionListBox), PropertyNames.SELECTED_ITEMS) != null);
return (bfieldnameisselected && bfunctionisselected);
}
diff --git a/wizards/com/sun/star/wizards/ui/ButtonList.java b/wizards/com/sun/star/wizards/ui/ButtonList.java
index 41062757f0cf..1d2351aec989 100644
--- a/wizards/com/sun/star/wizards/ui/ButtonList.java
+++ b/wizards/com/sun/star/wizards/ui/ButtonList.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -94,7 +94,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
{
m_aControlName = _sName;
}
-
+
/** Setter for property m_aButtonSize.
* @param imageSize New value of property m_aButtonSize.
*/
@@ -135,7 +135,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
new Object[]
{
Integer.valueOf(imageTextHeight),
- "",
+ PropertyNames.EMPTY_STRING,
"(1)",
Integer.valueOf(nXPos),
Integer.valueOf(nYPos),
@@ -190,7 +190,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
lblCounter = dialog.insertLabel(m_aControlName + "_lblCounter", pNames1, new Object[]
{
Integer.valueOf(LINE_HEIGHT),
- "",
+ PropertyNames.EMPTY_STRING,
Integer.valueOf(pos.Width + btnSize.intValue() + 1),
Integer.valueOf(pos.Height + (m_aButtonSize.Height + gap.Height) * rows + gap.Height + imageTextHeight + ((btnSize.intValue() - LINE_HEIGHT) / 2)),
step,
@@ -199,7 +199,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
Integer.valueOf(cols * (m_aButtonSize.Width + gap.Width) + gap.Width - 2 * btnSize.intValue() - 1)
});
- Helper.setUnoPropertyValue(getModel(lblCounter), "Align", new Short((short) 1));
+ Helper.setUnoPropertyValue(getModel(lblCounter), PropertyNames.PROPERTY_ALIGN, new Short((short) 1));
Helper.setUnoPropertyValue(getModel(btnBack), PropertyNames.PROPERTY_LABEL, "<");
Helper.setUnoPropertyValue(getModel(btnNext), PropertyNames.PROPERTY_LABEL, ">");
@@ -219,7 +219,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
for (int c = 0; c < cols; c++)
{
XButton aButton = createButton(dialog, r, c);
- XControl aControl = (XControl)UnoRuntime.queryInterface(XControl.class, aButton);
+ XControl aControl = UnoRuntime.queryInterface(XControl.class, aButton);
m_aButtons[r * cols + c] = aControl;
}
}
@@ -238,7 +238,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
XButton aButton = dialog.insertImageButton(sButtonName, this,
new String[]
{
- /* "Border", */
+ /* PropertyNames.PROPERTY_BORDER, */
/* "BackgroundColor", */
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
@@ -269,7 +269,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
m_aButtonWidth
});
- XWindow win = (XWindow) UnoRuntime.queryInterface(XWindow.class, aButton);
+ XWindow win = UnoRuntime.queryInterface(XWindow.class, aButton);
win.setEnable(true);
win.setVisible(true);
return aButton;
@@ -277,14 +277,12 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
private int getButtonPosX(int _col)
{
- final int nXPos = pos.Width + _col * (m_aButtonSize.Width + gap.Width) + gap.Width;
- return nXPos;
+ return pos.Width + _col * (m_aButtonSize.Width + gap.Width) + gap.Width;
}
private int getButtonPosY(int _row)
{
- final int nYPos = pos.Height + _row * (m_aButtonSize.Height + gap.Height) + gap.Height;
- return nYPos;
+ return pos.Height + _row * (m_aButtonSize.Height + gap.Height) + gap.Height;
}
private void refreshImages()
@@ -308,7 +306,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
{
if (oResources.length == 1)
{
- Helper.setUnoPropertyValue(m_aButtons[i].getModel(), PropertyNames.PROPERTY_IMAGEURL, (String) oResources[0]);
+ Helper.setUnoPropertyValue(m_aButtons[i].getModel(), PropertyNames.PROPERTY_IMAGEURL, oResources[0]);
}
else if (oResources.length == 2)
{
@@ -350,12 +348,12 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
private transient java.util.ArrayList<XItemListener> m_aItemListenerList;
private void setVisible(Object control, boolean visible)
{
- final XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, control);
+ final XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, control);
xWindow.setVisible(visible);
}
/**
- *
+ *
* @param i
* @return the Object in the list model corresponding to the given image index.
*/
@@ -373,7 +371,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
}
/**
- *
+ *
* @param i
* @return the index in the listModel for the given image index.
*/
@@ -452,7 +450,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
*/
private void fireItemSelected()
{
-// java.awt.event.ItemEvent event = new java.awt.event.ItemEvent(this, 0,
+// java.awt.event.ItemEvent event = new java.awt.event.ItemEvent(this, 0,
// getSelectedObject(), java.awt.event.ItemEvent.SELECTED);
java.util.ArrayList list;
synchronized(this)
@@ -675,7 +673,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
private void refreshImageText()
{
Object item = m_nCurrentSelection >= 0 ? getListModel().getElementAt(m_nCurrentSelection) : null;
- final String sText = " " + renderer.render(item);
+ final String sText = PropertyNames.SPACE + renderer.render(item);
Helper.setUnoPropertyValue(getModel(lblImageText), PropertyNames.PROPERTY_LABEL, sText);
}
@@ -719,8 +717,8 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
private void enableButtons()
{
- enable(btnNext, new Boolean(pageStart + rows * cols < listModel.getSize()));
- enable(btnBack, new Boolean(pageStart > 0));
+ enable(btnNext, Boolean.valueOf(pageStart + rows * cols < listModel.getSize()));
+ enable(btnBack, Boolean.valueOf(pageStart > 0));
}
private void enable(Object control, Boolean enable)
@@ -730,12 +728,12 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
private Object getModel(Object control)
{
- return ((XControl) UnoRuntime.queryInterface(XControl.class, control)).getModel();
+ return UnoRuntime.queryInterface(XControl.class, control).getModel();
}
private void setBorder(Object control, Short border)
{
- Helper.setUnoPropertyValue(getModel(control), "Border", border);
+ Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_BORDER, border);
//XWindowPeer peer = ((XControl)UnoRuntime.queryInterface(XControl.class,control)).getPeer();
//peer.invalidate(InvalidateStyle.CHILDREN);
}
@@ -756,9 +754,9 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
{
/**
- *
+ *
* @param listItem
- * @return two resource ids for an image referenced in the imaglist resourcefile of the
+ * @return two resource ids for an image referenced in the imaglist resourcefile of the
* wizards project; The second one of them is designed to be used for High Contrast Mode.
*/
public Object[] getImageUrls(Object listItem);
@@ -770,7 +768,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
// @Override
public String render(Object counter)
{
- return "" + ((Counter) counter).start + ".." + ((Counter) counter).end + "/" + ((Counter) counter).max;
+ return PropertyNames.EMPTY_STRING + ((Counter) counter).start + ".." + ((Counter) counter).end + "/" + ((Counter) counter).max;
}
}
@@ -891,9 +889,9 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
}
// check which Button is pressed.
- String sControlName = aHelper.getPropertyValueAsString(PropertyNames.PROPERTY_NAME, "");
+ String sControlName = aHelper.getPropertyValueAsString(PropertyNames.PROPERTY_NAME, PropertyNames.EMPTY_STRING);
final String sButton = sControlName.substring(7 + m_aControlName.length());
- int nButton = new Integer(sButton).intValue();
+ int nButton = Integer.parseInt(sButton);
// int image = getImageFromEvent(event);
int index = getIndexFor(nButton);
diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
index 5a2457a18d76..1024a343e559 100644
--- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
+++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -63,7 +63,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
public void itemStateChanged(com.sun.star.awt.ItemEvent EventObject)
{
- short[] SelItems = (short[]) CurUnoDialog.getControlProperty(sTableListBoxName, "SelectedItems");
+ short[] SelItems = (short[]) CurUnoDialog.getControlProperty(sTableListBoxName, PropertyNames.SELECTED_ITEMS);
if (SelItems.length > 0)
{
iOldSelPos = m_iSelPos;
@@ -142,7 +142,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
},
new Object[]
{
- Boolean.FALSE, new Integer(8), _reslblTables, new Integer(95), new Integer(27), IStep, new Short((short) 3), LabelWidth
+ Boolean.FALSE, 8, _reslblTables, 95, 27, IStep, new Short((short) 3), LabelWidth
});
// DropDown Listbox TableNames
xTableListBox = CurUnoDialog.insertListBox(sTableListBoxName, 0, null, new ItemListenerImpl(),
@@ -152,7 +152,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
},
new Object[]
{
- Boolean.TRUE, Boolean.FALSE, new Integer(12), HelpIds.getHelpIdString(super.FirstHelpIndex - 1), new Short(UnoDialog.getListBoxLineCount()), new Integer(95), new Integer(37), IStep, new Short((short) 4), getListboxWidth()
+ 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();
@@ -187,7 +187,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
}
else
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
}
@@ -205,7 +205,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
private short getselectedItemPos()
{
- short[] iSelPoses = ((short[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), "SelectedItems"));
+ short[] iSelPoses = ((short[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS));
if (iSelPoses.length > 0)
{
return iSelPoses[0];
@@ -214,7 +214,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
{
if (this.bpreselectCommand)
{
- String[] sItemList = ((String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), "StringItemList"));
+ String[] sItemList = ((String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.STRING_ITEM_LIST));
if (sItemList.length > 0)
{
return (short) 0;
@@ -229,10 +229,10 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
try
{
boolean binitialize = false;
- String curCommandName = "";
+ 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, "StringItemList");
+ // String[] sLocList = (String[]) CurUnoDialog.getControlProperty(sTableListBoxName, PropertyNames.STRING_ITEM_LIST);
final String sSelectedTableName = xTableListBox.getItem(iSelPos);
if (!bgetQueries)
{
@@ -245,14 +245,14 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
if (sSelectedTableName.startsWith(sTablePrefix))
{
CurDBMetaData.setCommandType(CommandType.TABLE);
- curCommandName = JavaTools.replaceSubString(sSelectedTableName, "", sTablePrefix);
+ curCommandName = JavaTools.replaceSubString(sSelectedTableName, PropertyNames.EMPTY_STRING, sTablePrefix);
CurDBMetaData.setTableByName(curCommandName);
binitialize = CurDBMetaData.getFieldNamesOfCommand(curCommandName, CommandType.TABLE, AppendMode);
}
else
{
CurDBMetaData.setCommandType(CommandType.QUERY);
- curCommandName = JavaTools.replaceSubString(sSelectedTableName, "", sQueryPrefix);
+ curCommandName = JavaTools.replaceSubString(sSelectedTableName, PropertyNames.EMPTY_STRING, sQueryPrefix);
CurDBMetaData.setQueryByName(curCommandName);
binitialize = CurDBMetaData.getFieldNamesOfCommand(curCommandName, CommandType.QUERY, AppendMode);
}
@@ -278,7 +278,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
}
/** returns the selected entry index in the commandListbox
- *
+ *
* @return
* @throws com.sun.star.wizards.common.TerminateWizardException
*/
@@ -304,7 +304,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
ContentList = setPrefixinArray(ContentList, sTablePrefix, 0, CurDBMetaData.getTableNames().length);
}
java.util.Arrays.sort(ContentList, this);
- Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "StringItemList", ContentList);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.STRING_ITEM_LIST, ContentList);
short iSelPos = getselectedItemPos();
if (bpreselectCommand)
{
@@ -320,9 +320,9 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
else
{
emptyFieldsListBoxes();
- iSelArray = new short[] { (short) iSelPos };
+ iSelArray = new short[] {iSelPos};
}
- Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "SelectedItems", iSelArray);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS, iSelArray);
toggleCommandListBox(true);
if (bgetFields)
{
@@ -366,8 +366,8 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
public void toggleCommandListBox(boolean _bdoenable)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable));
- Helper.setUnoPropertyValue(UnoDialog.getModel(xlblTable), PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoenable));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xlblTable), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoenable));
}
public String getSelectedCommandName()
@@ -404,10 +404,10 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
{
try
{
- if (Properties.hasPropertyValue(_aPropertyValue, "CommandType"))
+ if (Properties.hasPropertyValue(_aPropertyValue, PropertyNames.COMMAND_TYPE))
{
- int nCommandType = AnyConverter.toInt(Properties.getPropertyValue(_aPropertyValue, "CommandType"));
- String sCommand = AnyConverter.toString(Properties.getPropertyValue(_aPropertyValue, "Command"));
+ int nCommandType = AnyConverter.toInt(Properties.getPropertyValue(_aPropertyValue, PropertyNames.COMMAND_TYPE));
+ String sCommand = AnyConverter.toString(Properties.getPropertyValue(_aPropertyValue, PropertyNames.COMMAND));
if (sCommand != null)
{
preselectCommand(sCommand, nCommandType, _bReadOnly);
@@ -424,12 +424,12 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
{
if (_selitem.length() > 0)
{
- String[] sitems = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), "StringItemList");
+ String[] sitems = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.STRING_ITEM_LIST);
String sPrefix = getCommandPrefix(_nCommandType);
short iselpos = (short) JavaTools.FieldInList(sitems, sPrefix + _selitem);
if (iselpos > -1)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "SelectedItems", new short[]
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS, new short[]
{
iselpos
});
@@ -438,13 +438,13 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
}
else
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "SelectedItems", new short[]
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS, new short[]
{
});
}
if (_bReadOnly)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "ReadOnly", new Boolean(_selitem.length() > 0));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.READ_ONLY, Boolean.valueOf(_selitem.length() > 0));
}
}
@@ -452,22 +452,22 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
{
if (_selitem.length() > 0)
{
- String[] sitems = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), "StringItemList");
+ String[] sitems = (String[]) Helper.getUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.STRING_ITEM_LIST);
short iselpos = (short) JavaTools.FieldInList(sitems, getTablePrefix() + _selitem);
if (iselpos > -1)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "SelectedItems", new short[] { iselpos });
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS, new short[] { iselpos });
}
this.fillUpFieldsListbox();
}
else
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "SelectedItems", new short[] {} );
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS, new short[] {} );
this.fillUpFieldsListbox();
}
if (_bReadOnly)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "ReadOnly", new Boolean(_selitem.length() > 0));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.READ_ONLY, Boolean.valueOf(_selitem.length() > 0));
}
toggleListboxButtons((short)-1,(short)-1);
}
diff --git a/wizards/com/sun/star/wizards/ui/ControlScroller.java b/wizards/com/sun/star/wizards/ui/ControlScroller.java
index b2a736fcfb0a..c9aeee627247 100644
--- a/wizards/com/sun/star/wizards/ui/ControlScroller.java
+++ b/wizards/com/sun/star/wizards/ui/ControlScroller.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,8 +26,6 @@
************************************************************************/
package com.sun.star.wizards.ui;
-import com.sun.star.awt.XScrollBar;
-import com.sun.star.awt.AdjustmentEvent;
import com.sun.star.beans.*;
import com.sun.star.awt.*;
import com.sun.star.lang.XMultiServiceFactory;
@@ -118,7 +116,7 @@ public abstract class ControlScroller
oImgControl = CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlImageControlModel", "imgBackground" + sIncSuffix,
new String[]
{
- "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
@@ -130,11 +128,11 @@ public abstract class ControlScroller
new AdjustmentListenerImpl(),
new String[]
{
- "Border", PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.ORIENTATION, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Short((short) 0), new Boolean(true), new Integer(ScrollHeight), HelpIds.getHelpIdString(curHelpIndex), new Integer(ScrollBarOrientation.VERTICAL), new Integer(iCompPosX + iCompWidth - iScrollBarWidth - 1), new Integer(iCompPosY + 1), IStep, new Integer(iScrollBarWidth)
+ new Short((short) 0), Boolean.TRUE, new Integer(ScrollHeight), HelpIds.getHelpIdString(curHelpIndex), new Integer(ScrollBarOrientation.VERTICAL), new Integer(iCompPosX + iCompWidth - iScrollBarWidth - 1), new Integer(iCompPosY + 1), IStep, new Integer(iScrollBarWidth)
});
scrollfields = new Vector();
int ypos = iStartPosY + SORELFIRSTPOSY;
@@ -158,7 +156,7 @@ public abstract class ControlScroller
protected void setScrollBarOrientationHorizontal()
{
- Helper.setUnoPropertyValue(xScrollBar, "Orientation", new Integer(ScrollBarOrientation.HORIZONTAL));
+ Helper.setUnoPropertyValue(xScrollBar, PropertyNames.ORIENTATION, new Integer(ScrollBarOrientation.HORIZONTAL));
}
/**
@@ -173,7 +171,7 @@ public abstract class ControlScroller
ntotfieldcount = _ntotfieldcount;
setCurFieldCount();
nscrollvalue = 0;
- Helper.setUnoPropertyValue(UnoDialog.getModel(xScrollBar), new String("ScrollValue"), new Integer(nscrollvalue));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xScrollBar), "ScrollValue", new Integer(nscrollvalue));
if (ntotfieldcount > nblockincrement)
{
Helper.setUnoPropertyValues(UnoDialog.getModel(xScrollBar), new String[]
@@ -245,7 +243,7 @@ public abstract class ControlScroller
{
if (_nscrollvalue >= 0)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(xScrollBar), new String("ScrollValue"), new Integer(_nscrollvalue));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xScrollBar), "ScrollValue", new Integer(_nscrollvalue));
scrollControls();
}
}
@@ -301,7 +299,7 @@ public abstract class ControlScroller
protected void toggleComponent(boolean _bdoenable)
{
boolean bdoenable = _bdoenable && (ntotfieldcount > nblockincrement);
- CurUnoDialog.setControlProperty("TitleScrollBar" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable));
+ CurUnoDialog.setControlProperty("TitleScrollBar" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoenable));
}
protected void toggleControls(boolean _bdoenable)
@@ -312,7 +310,7 @@ public abstract class ControlScroller
for (int m = 0; m < curproperties.length; m++)
{
PropertyValue curproperty = curproperties[m];
- CurUnoDialog.setControlProperty(curproperty.Name, PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable));
+ CurUnoDialog.setControlProperty(curproperty.Name, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoenable));
}
}
@@ -326,7 +324,7 @@ public abstract class ControlScroller
protected void setLineIncrementation(int _nlineincrement)
{
this.nlineincrement = _nlineincrement;
- Helper.setUnoPropertyValue(UnoDialog.getModel(xScrollBar), new String("LineIncrement"), new Integer(nlineincrement));
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xScrollBar), "LineIncrement", new Integer(nlineincrement));
}
@@ -343,7 +341,7 @@ public abstract class ControlScroller
PropertyNames.PROPERTY_ENABLED, "BlockIncrement", "ScrollValueMax"
}, new Object[]
{
- new Boolean(ntotfieldcount > nblockincrement), new Integer(nblockincrement), new Integer(ntotfieldcount - nblockincrement)
+ Boolean.valueOf(ntotfieldcount > nblockincrement), new Integer(nblockincrement), new Integer(ntotfieldcount - nblockincrement)
});
}
@@ -390,19 +388,17 @@ public abstract class ControlScroller
* the control in guiRow and column
* @param guiRow 0 based row index
* @param column 0 based column index
- * @return the propertyValue object corresponding to
+ * @return the propertyValue object corresponding to
* this control.
*/
protected PropertyValue fieldInfo(int guiRow, int column)
{
if (guiRow + nscrollvalue < scrollfields.size())
{
- PropertyValue pv = fieldInfo(
+ return fieldInfo(
((PropertyValue[]) scrollfields.elementAt(guiRow + nscrollvalue))[column],
((PropertyValue[]) scrollfields.elementAt(guiRow))[column]);
//System.out.println("getting field info for : " + guiRow + "/" + column + ":" + pv.Value + "(" + pv.Name + ")" );
-
- return pv;
}
else
{
@@ -453,7 +449,7 @@ public abstract class ControlScroller
{
Object oControlModel = UnoDialog.getModel(CurUnoDialog.xDlgContainer.getControl(controlname));
String propertyname = UnoDialog.getDisplayProperty(oControlModel);
- if (propertyname != "")
+ if (!propertyname.equals(PropertyNames.EMPTY_STRING))
{
CurUnoDialog.setControlProperty(controlname, propertyname, newvalue);
}
@@ -463,7 +459,7 @@ public abstract class ControlScroller
{
Object oControlModel = UnoDialog.getModel(CurUnoDialog.xDlgContainer.getControl(controlname));
String propertyname = UnoDialog.getDisplayProperty(oControlModel);
- if (propertyname != "")
+ if (!propertyname.equals(PropertyNames.EMPTY_STRING))
{
return CurUnoDialog.getControlProperty(controlname, propertyname);
}
@@ -497,7 +493,7 @@ public abstract class ControlScroller
protected abstract void initializeScrollFields();
- /** inserts a group of controls into the component. The group may either be a row or a column of controls
+ /** inserts a group of controls into the component. The group may either be a row or a column of controls
* The controls should be put on Step 99 (means made invisible at first). All the controlrows that are needed are than
* made visible automatically when calling "initialize(_fieldcount)"
* @author bc93774
diff --git a/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java b/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java
index 341ab73828c5..da07b87022b1 100644
--- a/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java
+++ b/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,6 +30,7 @@ import com.sun.star.awt.XListBox;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.common.JavaTools;
+import com.sun.star.wizards.common.PropertyNames;
/**
* @author Administrator
@@ -90,7 +91,7 @@ public abstract class DBLimitedFieldSelection
protected void moveupSelectedItems(int CurIndex, boolean bDoEnable)
{
// short iNextItemPos;
- if ((bDoEnable == false) && (MAXSELINDEX > CurIndex))
+ if ((!bDoEnable) && (MAXSELINDEX > CurIndex))
{
for (int i = CurIndex; i < MAXSELINDEX; i++)
{
@@ -112,17 +113,14 @@ public abstract class DBLimitedFieldSelection
int FieldCount = _FieldNames.length;
String[] ViewFieldNames = new String[FieldCount + 1];
ViewFieldNames[0] = sNoField;
- for (int i = 0; i < FieldCount; i++)
- {
- ViewFieldNames[i + 1] = _FieldNames[i];
- }
+ System.arraycopy(_FieldNames, 0, ViewFieldNames, 1, FieldCount);
return ViewFieldNames;
}
protected void initializeListBox(XListBox xListBox, String[] _AllFieldNames, String[] _SelFieldNames, int curindex)
{
short[] SelList = null;
- Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), "StringItemList", _AllFieldNames);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), PropertyNames.STRING_ITEM_LIST, _AllFieldNames);
if (_SelFieldNames != null)
{
if (curindex < _SelFieldNames.length)
@@ -136,22 +134,22 @@ public abstract class DBLimitedFieldSelection
{
SelList = new short[] { (short) (0) };
}
- Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), "SelectedItems", SelList);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), PropertyNames.SELECTED_ITEMS, SelList);
return;
}
}
SelList = new short[] { (short) (0) };
- Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), "SelectedItems", SelList);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), PropertyNames.SELECTED_ITEMS, SelList);
}
protected void initializeListBox(XListBox xListBox, String[] _AllFieldNames, String _SelFieldName)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), "StringItemList", _AllFieldNames);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), PropertyNames.STRING_ITEM_LIST, _AllFieldNames);
short[] SelList = null;
int index = JavaTools.FieldInList(_AllFieldNames, _SelFieldName);
SelList = new short[] { (short) (index) };
- Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), "SelectedItems", SelList);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(xListBox), PropertyNames.SELECTED_ITEMS, SelList);
}
}
diff --git a/wizards/com/sun/star/wizards/ui/DocumentPreview.java b/wizards/com/sun/star/wizards/ui/DocumentPreview.java
index 173fae87f01b..71ddbca5064a 100644
--- a/wizards/com/sun/star/wizards/ui/DocumentPreview.java
+++ b/wizards/com/sun/star/wizards/ui/DocumentPreview.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,6 +37,7 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.util.CloseVetoException;
import com.sun.star.util.XCloseable;
import com.sun.star.wizards.common.Properties;
+import com.sun.star.wizards.common.PropertyNames;
/**
* @author rpiterman
@@ -67,7 +68,7 @@ public class DocumentPreview
/*********************************************************************
main
-
+
- create new frame with window inside
- load a component as preview into this frame
*/
@@ -75,7 +76,7 @@ public class DocumentPreview
{
//((XWindow)UnoRuntime.queryInterface(XWindow.class,control)).addPaintListener(this);
- xControl = (XControl) UnoRuntime.queryInterface(XControl.class, control);
+ xControl = UnoRuntime.queryInterface(XControl.class, control);
//register this object as a listener, to close the frame when disposing.
//((XComponent) UnoRuntime.queryInterface(XComponent.class, control)).addEventListener(this);
@@ -98,7 +99,7 @@ public class DocumentPreview
protected XComponent setDocument(String url, PropertyValue[] lArgs) throws com.sun.star.lang.IllegalArgumentException, IOException, CloseVetoException
{
loadArgs = lArgs;
- XComponentLoader xCompLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, xFrame);
+ XComponentLoader xCompLoader = UnoRuntime.queryInterface(XComponentLoader.class, xFrame);
xFrame.activate();
return xComponent = xCompLoader.loadComponentFromURL(url, "_self", 0, loadArgs);
}
@@ -115,7 +116,7 @@ public class DocumentPreview
{
if (xFrame != null)
{
- ((XCloseable) UnoRuntime.queryInterface(XCloseable.class, xFrame)).close(false);
+ UnoRuntime.queryInterface(XCloseable.class, xFrame).close(false);
}
}
@@ -126,7 +127,7 @@ public class DocumentPreview
case PREVIEW_MODE:
return setDocument(url, new String[]
{
- "Preview", "ReadOnly"
+ "Preview", PropertyNames.READ_ONLY
}, new Object[]
{
Boolean.TRUE, Boolean.TRUE
@@ -138,7 +139,7 @@ public class DocumentPreview
/*********************************************************************
create a new frame with a new container window inside,
which isnt part of the global frame tree.
-
+
Attention:
a) This frame wont be destroyed by the office. It must be closed by you!
Do so - please call XCloseable::close().
@@ -148,11 +149,11 @@ public class DocumentPreview
public void createPreviewFrame(XMultiServiceFactory xmsf, XControl xControl) throws com.sun.star.uno.Exception, com.sun.star.lang.IllegalArgumentException
{
XWindowPeer controlPeer = xControl.getPeer();
- XWindow controlWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xControl);
+ XWindow controlWindow = UnoRuntime.queryInterface(XWindow.class, xControl);
Rectangle r = controlWindow.getPosSize();
Object toolkit = xmsf.createInstance("com.sun.star.awt.Toolkit");
- XToolkit xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class, toolkit);
+ XToolkit xToolkit = UnoRuntime.queryInterface(XToolkit.class, toolkit);
WindowDescriptor aDescriptor = new WindowDescriptor();
aDescriptor.Type = WindowClass.SIMPLE;
@@ -163,9 +164,9 @@ public class DocumentPreview
aDescriptor.WindowAttributes = VclWindowPeerAttribute.CLIPCHILDREN | WindowAttribute.SHOW;
XWindowPeer xPeer = xToolkit.createWindow(aDescriptor);
- xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xPeer);
+ xWindow = UnoRuntime.queryInterface(XWindow.class, xPeer);
Object frame = xmsf.createInstance("com.sun.star.frame.Frame");
- xFrame = (XFrame) UnoRuntime.queryInterface(XFrame.class, frame);
+ xFrame = UnoRuntime.queryInterface(XFrame.class, frame);
// XFrame xF = (XFrame) UnoRuntime.queryInterface(XFrame.class, Desktop.getDesktop(xmsf));
// xFrame = xF.findFrame("_blank", 0);
xFrame.initialize(xWindow);
diff --git a/wizards/com/sun/star/wizards/ui/FieldSelection.java b/wizards/com/sun/star/wizards/ui/FieldSelection.java
index 6ec242243adb..16020420ad91 100644
--- a/wizards/com/sun/star/wizards/ui/FieldSelection.java
+++ b/wizards/com/sun/star/wizards/ui/FieldSelection.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -210,7 +210,7 @@ public class FieldSelection
SelListBoxPosX = new Integer(cmdShiftButtonPosX.intValue() + cmdButtonWidth + cmdButtonHoriDist);
IStep = new Integer(_iStep);
- if (bshowFourButtons == true)
+ if (bshowFourButtons)
{
ShiftButtonCount = 4;
}
@@ -230,7 +230,7 @@ public class FieldSelection
},
new Object[]
{
- new Integer(8), slblFields, new Integer(CompPosX), new Integer(CompPosY), IStep, new Short(curtabindex), new Integer(109)
+ 8, slblFields, new Integer(CompPosX), new Integer(CompPosY), IStep, new Short(curtabindex), 109
});
// Listbox 'Available fields'
@@ -251,10 +251,10 @@ public class FieldSelection
},
new Object[]
{
- Boolean.FALSE, new Integer(14), HelpIds.getHelpIdString(_FirstHelpIndex + 1), ">", cmdShiftButtonPosX, ShiftButtonPosY[a++], IStep, new Short(curtabindex++), CmdButtonWidth
+ Boolean.FALSE, 14, HelpIds.getHelpIdString(_FirstHelpIndex + 1), ">", cmdShiftButtonPosX, ShiftButtonPosY[a++], IStep, new Short(curtabindex++), CmdButtonWidth
});
- if (bshowFourButtons == true)
+ if (bshowFourButtons)
{
btnmoveall = CurUnoDialog.insertButton("cmdMoveAll" + sIncSuffix, SOCMDMOVEALL, new ActionListenerImpl(),
new String[]
@@ -263,7 +263,7 @@ public class FieldSelection
},
new Object[]
{
- new Integer(14), HelpIds.getHelpIdString(_FirstHelpIndex + 2), ">>", cmdShiftButtonPosX, ShiftButtonPosY[a++], IStep, new Short(curtabindex++), CmdButtonWidth
+ 14, HelpIds.getHelpIdString(_FirstHelpIndex + 2), ">>", cmdShiftButtonPosX, ShiftButtonPosY[a++], IStep, new Short(curtabindex++), CmdButtonWidth
});
}
Object btnremoveselected = CurUnoDialog.insertButton("cmdRemoveSelected" + sIncSuffix, SOCMDREMOVESEL, new ActionListenerImpl(),
@@ -273,10 +273,10 @@ public class FieldSelection
},
new Object[]
{
- Boolean.FALSE, new Integer(14), HelpIds.getHelpIdString(_FirstHelpIndex + 3), "<", cmdShiftButtonPosX, ShiftButtonPosY[a++], IStep, new Short(curtabindex++), CmdButtonWidth
+ Boolean.FALSE, 14, HelpIds.getHelpIdString(_FirstHelpIndex + 3), "<", cmdShiftButtonPosX, ShiftButtonPosY[a++], IStep, new Short(curtabindex++), CmdButtonWidth
});
- if (bshowFourButtons == true)
+ if (bshowFourButtons)
{
btnremoveall = CurUnoDialog.insertButton("cmdRemoveAll" + sIncSuffix, SOCMDREMOVEALL, new ActionListenerImpl(),
new String[]
@@ -285,7 +285,7 @@ public class FieldSelection
},
new Object[]
{
- new Integer(14), HelpIds.getHelpIdString(_FirstHelpIndex + 4), "<<", cmdShiftButtonPosX, ShiftButtonPosY[a++], IStep, new Short(curtabindex++), CmdButtonWidth
+ 14, HelpIds.getHelpIdString(_FirstHelpIndex + 4), "<<", cmdShiftButtonPosX, ShiftButtonPosY[a++], IStep, new Short(curtabindex++), CmdButtonWidth
});
}
@@ -300,7 +300,7 @@ public class FieldSelection
},
new Object[]
{
- new Integer(8), slblSelFields, SelListBoxPosX, new Integer(CompPosY), IStep, new Short(curtabindex++), ListBoxWidth
+ 8, slblSelFields, SelListBoxPosX, new Integer(CompPosY), IStep, new Short(curtabindex++), ListBoxWidth
});
// ListBox 'Fields in the form'
@@ -317,27 +317,27 @@ public class FieldSelection
Object btnmoveup = CurUnoDialog.insertButton("cmdMoveUp" + sIncSuffix, SOCMDMOVEUP, new ActionListenerImpl(),
new String[]
{
- PropertyNames.PROPERTY_ENABLED, "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_ENABLED, PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- Boolean.FALSE, oFontDesc, new Integer(14), HelpIds.getHelpIdString(_FirstHelpIndex + 6), String.valueOf((char) 8743), cmdMoveButtonPosX, MoveButtonPosY[0], IStep, new Short(curtabindex++), CmdButtonWidth
+ Boolean.FALSE, oFontDesc, 14, HelpIds.getHelpIdString(_FirstHelpIndex + 6), String.valueOf((char) 8743), cmdMoveButtonPosX, MoveButtonPosY[0], IStep, new Short(curtabindex++), CmdButtonWidth
});
Object btnmovedown = CurUnoDialog.insertButton("cmdMoveDown" + sIncSuffix, SOCMDMOVEDOWN, new ActionListenerImpl(),
new String[]
{
- PropertyNames.PROPERTY_ENABLED, "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_ENABLED, PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- Boolean.FALSE, oFontDesc, new Integer(14), HelpIds.getHelpIdString(_FirstHelpIndex + 7), String.valueOf((char) 8744), cmdMoveButtonPosX, MoveButtonPosY[1], IStep, new Short(curtabindex++), CmdButtonWidth
+ Boolean.FALSE, oFontDesc, 14, HelpIds.getHelpIdString(_FirstHelpIndex + 7), String.valueOf((char) 8744), cmdMoveButtonPosX, MoveButtonPosY[1], IStep, new Short(curtabindex++), CmdButtonWidth
});
CurUnoDialog.getPeerConfiguration().setAccessibleName(btnmoveselected, AccessTextMoveSelected);
CurUnoDialog.getPeerConfiguration().setAccessibleName(btnremoveselected, AccessTextRemoveSelected);
- CurUnoDialog.getPeerConfiguration().setAccessibleName(xFieldsListBox, JavaTools.replaceSubString(slblFields, "", "~"));
- CurUnoDialog.getPeerConfiguration().setAccessibleName(xSelectedFieldsListBox, JavaTools.replaceSubString(slblSelFields, "", "~"));
+ CurUnoDialog.getPeerConfiguration().setAccessibleName(xFieldsListBox, JavaTools.replaceSubString(slblFields, PropertyNames.EMPTY_STRING, "~"));
+ CurUnoDialog.getPeerConfiguration().setAccessibleName(xSelectedFieldsListBox, JavaTools.replaceSubString(slblSelFields, PropertyNames.EMPTY_STRING, "~"));
if (btnmoveall != null)
{
CurUnoDialog.getPeerConfiguration().setAccessibleName(btnmoveall, AccessTextMoveAll);
@@ -402,7 +402,7 @@ public class FieldSelection
String NeighborItem = NewItemList[iSelIndex + iNeighbor];
NewItemList[iSelIndex + iNeighbor] = CurItem;
NewItemList[iSelIndex] = NeighborItem;
- CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, "StringItemList", NewItemList);
+ CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, PropertyNames.STRING_ITEM_LIST, NewItemList);
xSelectedFieldsListBox.selectItem(CurItem, true);
if (xFieldSelection != null)
{
@@ -427,7 +427,7 @@ public class FieldSelection
CurUnoDialog.setControlProperty("lstFields" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, BDoEnable);
CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, BDoEnable);
- if (BDoEnable.booleanValue() == true)
+ if (BDoEnable.booleanValue())
{
toggleListboxButtons((short) - 1, (short) - 1);
}
@@ -466,11 +466,11 @@ public class FieldSelection
bmoveUpenabled = ((iSelIndices[0] > 0) && (iSelIndices.length == 1));
bmoveDownenabled = (((iSelIndices[SelListBoxSelLength - 1]) < (short) (SelectCount - 1)) && (iSelIndices.length == 1));
}
- CurUnoDialog.setControlProperty("cmdRemoveAll" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(SelectCount >= 1));
- CurUnoDialog.setControlProperty("cmdRemoveSelected" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(bSelectSelected));
+ CurUnoDialog.setControlProperty("cmdRemoveAll" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(SelectCount >= 1));
+ CurUnoDialog.setControlProperty("cmdRemoveSelected" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bSelectSelected));
toggleMoveButtons((FieldCount >= 1), bIsFieldSelected);
- CurUnoDialog.setControlProperty("cmdMoveUp" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(bmoveUpenabled));
- CurUnoDialog.setControlProperty("cmdMoveDown" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(bmoveDownenabled));
+ CurUnoDialog.setControlProperty("cmdMoveUp" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bmoveUpenabled));
+ CurUnoDialog.setControlProperty("cmdMoveDown" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bmoveDownenabled));
}
catch (Exception exception)
{
@@ -482,8 +482,8 @@ public class FieldSelection
{
boolean btoggleMoveAll = (((xFieldsListBox.getItemCount() + xSelectedFieldsListBox.getItemCount()) < maxfieldcount) && (_btoggleMoveAll));
boolean btoggleMoveSelected = (((xFieldsListBox.getSelectedItems().length + xSelectedFieldsListBox.getItemCount()) < maxfieldcount) && (_btoggleMoveSelected));
- CurUnoDialog.setControlProperty("cmdMoveAll" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(btoggleMoveAll));
- CurUnoDialog.setControlProperty("cmdMoveSelected" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(btoggleMoveSelected));
+ CurUnoDialog.setControlProperty("cmdMoveAll" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(btoggleMoveAll));
+ CurUnoDialog.setControlProperty("cmdMoveSelected" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(btoggleMoveSelected));
}
public void setMultipleMode(boolean _bisMultiple)
@@ -497,10 +497,10 @@ public class FieldSelection
try
{
toggleListboxControls(Boolean.FALSE);
- CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, "StringItemList", new String[]
+ CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, PropertyNames.STRING_ITEM_LIST, new String[]
{
});
- CurUnoDialog.setControlProperty("lstFields" + sIncSuffix, "StringItemList", new String[]
+ CurUnoDialog.setControlProperty("lstFields" + sIncSuffix, PropertyNames.STRING_ITEM_LIST, new String[]
{
});
}
@@ -670,14 +670,14 @@ public class FieldSelection
public String[] getSelectedFieldNames()
{
- return (String[]) CurUnoDialog.getControlProperty("lstSelFields" + sIncSuffix, "StringItemList");
+ return (String[]) CurUnoDialog.getControlProperty("lstSelFields" + sIncSuffix, PropertyNames.STRING_ITEM_LIST);
}
public void setSelectedFieldNames(String[] _sfieldnames)
{
- CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, "StringItemList", _sfieldnames);
+ CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, PropertyNames.STRING_ITEM_LIST, _sfieldnames);
String[] sleftboxfieldnames = JavaTools.removefromList(xFieldsListBox.getItems(), _sfieldnames);
- CurUnoDialog.setControlProperty("lstFields" + sIncSuffix, "StringItemList", sleftboxfieldnames);
+ CurUnoDialog.setControlProperty("lstFields" + sIncSuffix, PropertyNames.STRING_ITEM_LIST, sleftboxfieldnames);
}
public void setModified(boolean _bModified)
@@ -692,6 +692,6 @@ public class FieldSelection
public void changeSelectedFieldNames(String[] _sfieldnames)
{
- CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, "StringItemList", _sfieldnames);
+ CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, PropertyNames.STRING_ITEM_LIST, _sfieldnames);
}
}
diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java
index 8dfc12e21fb3..315ef6b8e5c7 100644
--- a/wizards/com/sun/star/wizards/ui/FilterComponent.java
+++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -112,6 +112,7 @@ public class FilterComponent
final int SO_THIRDBOOLFIELDNAME = 256 + 3;
final int SO_FOURTHBOOLFIELDNAME = 256 + 4;
int SO_BOOLEANLIST[] =
+
{
SO_FIRSTBOOLFIELDNAME, SO_SECONDBOOLFIELDNAME, SO_THIRDBOOLFIELDNAME, SO_FOURTHBOOLFIELDNAME
@@ -127,7 +128,7 @@ public class FilterComponent
public void itemStateChanged(com.sun.star.awt.ItemEvent EventObject)
{
int iKey = CurUnoDialog.getControlKey(EventObject.Source, CurUnoDialog.ControlList);
- String sControlName = "";
+ String sControlName = PropertyNames.EMPTY_STRING;
switch (iKey)
{
case SO_FIRSTFIELDNAME:
@@ -136,7 +137,7 @@ public class FilterComponent
case SO_FOURTHFIELDNAME:
sControlName = getControlName(EventObject.Source);
String sControlNameSuffix = sIncSuffix + "_" + getIndexNumber(sControlName);
- XListBox xCurFieldListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, CurUnoDialog.xDlgContainer.getControl(sControlName));
+ XListBox xCurFieldListBox = UnoRuntime.queryInterface(XListBox.class, CurUnoDialog.xDlgContainer.getControl(sControlName));
String CurDisplayFieldName = xCurFieldListBox.getSelectedItem();
FieldColumn CurFieldColumn = new FieldColumn(oQueryMetaData, CurDisplayFieldName);
@@ -197,8 +198,7 @@ public class FilterComponent
public static String getIndexNumber(String _sStr)
{
- String sLastNumber = _sStr.substring(_sStr.length() - 1, _sStr.length());
- return sLastNumber;
+ return _sStr.substring(_sStr.length() - 1, _sStr.length());
}
/**
@@ -222,16 +222,15 @@ public class FilterComponent
{
try
{
- XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, _oSourceevent);
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControl.getModel());
- final String sName = AnyConverter.toString(xPSet.getPropertyValue(PropertyNames.PROPERTY_NAME));
- return sName;
+ XControl xControl = UnoRuntime.queryInterface(XControl.class, _oSourceevent);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xControl.getModel());
+ return AnyConverter.toString(xPSet.getPropertyValue(PropertyNames.PROPERTY_NAME));
}
catch (Exception e)
{
e.printStackTrace(System.out);
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
public PropertyValue[][] getFilterConditions()
@@ -245,20 +244,19 @@ public class FilterComponent
try
{
final String serviceName = "com.sun.star.beans.PropertyBag";
- final XPropertyContainer column = (XPropertyContainer) UnoRuntime.queryInterface(XPropertyContainer.class, oQueryMetaData.xMSF.createInstance(serviceName));
+ final XPropertyContainer column = UnoRuntime.queryInterface(XPropertyContainer.class, oQueryMetaData.xMSF.createInstance(serviceName));
column.addProperty("Type", PropertyAttribute.BOUND, DataType.VARCHAR);
- column.addProperty(PropertyNames.PROPERTY_NAME, PropertyAttribute.BOUND, "");
+ column.addProperty(PropertyNames.PROPERTY_NAME, PropertyAttribute.BOUND, PropertyNames.EMPTY_STRING);
column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), null);
final XPropertySet columnSet = UnoRuntime.queryInterface(XPropertySet.class, column);
if (composer.getQuery().length() == 0)
{
- final String fromClause = composer.getFromClause();
StringBuilder sql = new StringBuilder();
sql.append(composer.getSelectClause(true));
sql.append(' ');
- sql.append(fromClause);
+ sql.append(composer.getFromClause());
composer.getQueryComposer().setElementaryQuery(sql.toString());
}
composer.getQueryComposer().setStructuredFilter(new PropertyValue[][]
@@ -267,39 +265,36 @@ public class FilterComponent
for (int i = 0; i < RowCount; i++)
{
ControlRow currentControlRow = oControlRows[i];
- if (currentControlRow.isEnabled())
+ if (currentControlRow.isEnabled() && currentControlRow.isConditionComplete())
{
- if (currentControlRow.isConditionComplete())
+ String sFieldName = currentControlRow.getSelectedFieldName();
+ int nOperator = (int) currentControlRow.getSelectedOperator();
+ FieldColumn aFieldColumn = oQueryMetaData.getFieldColumnByDisplayName(sFieldName);
+ columnSet.setPropertyValue(PropertyNames.PROPERTY_NAME, aFieldColumn.getFieldName());
+ columnSet.setPropertyValue("Type", aFieldColumn.getXColumnPropertySet().getPropertyValue("Type"));
+ Object value = currentControlRow.getValue();
+ switch (aFieldColumn.getFieldType())
{
- String sFieldName = currentControlRow.getSelectedFieldName();
- int nOperator = (int) currentControlRow.getSelectedOperator();
- FieldColumn aFieldColumn = oQueryMetaData.getFieldColumnByDisplayName(sFieldName);
- columnSet.setPropertyValue(PropertyNames.PROPERTY_NAME, aFieldColumn.getFieldName());
- columnSet.setPropertyValue("Type", aFieldColumn.getXColumnPropertySet().getPropertyValue("Type"));
- Object value = currentControlRow.getValue();
- switch (aFieldColumn.getFieldType())
- {
- case DataType.TIMESTAMP:
- case DataType.DATE:
- value = ((Double) value) - oQueryMetaData.getNullDateCorrection();
- break;
- }
- column.removeProperty("Value");
- final short operator = currentControlRow.getSelectedOperator();
- if ((operator == SQLFilterOperator.SQLNULL)
- || (operator == SQLFilterOperator.NOT_SQLNULL)
- || AnyConverter.isVoid(value))
- {
- column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), new String());
- value = new Any(new Type(TypeClass.VOID), null);
- }
- else
- {
- column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), value);
- }
- columnSet.setPropertyValue("Value", value);
- composer.getQueryComposer().appendFilterByColumn(columnSet, getfilterstate() == this.SOI_MATCHALL, nOperator);
+ case DataType.TIMESTAMP:
+ case DataType.DATE:
+ value = ((Double) value) - oQueryMetaData.getNullDateCorrection();
+ break;
+ }
+ column.removeProperty("Value");
+ final short operator = currentControlRow.getSelectedOperator();
+ if ((operator == SQLFilterOperator.SQLNULL)
+ || (operator == SQLFilterOperator.NOT_SQLNULL)
+ || AnyConverter.isVoid(value))
+ {
+ column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), "");
+ value = new Any(new Type(TypeClass.VOID), null);
+ }
+ else
+ {
+ column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), value);
}
+ columnSet.setPropertyValue("Value", value);
+ composer.getQueryComposer().appendFilterByColumn(columnSet, getfilterstate() == this.SOI_MATCHALL, nOperator);
}
}
filterconditions = composer.getNormalizedStructuredFilter();
@@ -342,9 +337,9 @@ public class FilterComponent
FieldName = _filtercondition.Name;
}
String sreturn = JavaTools.replaceSubString(_BaseString, FieldName, "<FIELDNAME>");
- String soperator = sLogicOperators[_filtercondition.Handle-1];
+ String soperator = sLogicOperators[_filtercondition.Handle - 1];
sreturn = JavaTools.replaceSubString(sreturn, soperator, "<LOGICOPERATOR>");
- String sDisplayValue = "";
+ String sDisplayValue = PropertyNames.EMPTY_STRING;
if ((_filtercondition.Handle != SQLFilterOperator.SQLNULL)
&& (_filtercondition.Handle != SQLFilterOperator.NOT_SQLNULL)
&& !AnyConverter.isVoid(_filtercondition.Value))
@@ -358,14 +353,14 @@ public class FilterComponent
{
e.printStackTrace(System.out);
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
private int getfilterstate()
{
boolean bisany = true;
int ifilterstate = SOI_MATCHALL;
- bisany = (this.optMatchAny.getState()) == true;
+ bisany = (this.optMatchAny.getState());
if (bisany)
{
ifilterstate = SOI_MATCHANY;
@@ -399,7 +394,7 @@ public class FilterComponent
* @param iWidth
* @param FilterCount
* @param _oQueryMetaData
- * @param _firstHelpID
+ * @param _firstHelpID
*/
public FilterComponent(WizardDialog CurUnoDialog, XMultiServiceFactory _xMSF, int iStep, int iPosX, int iPosY, int iWidth, int FilterCount, QueryMetaData _oQueryMetaData, int _firstHelpID)
{
@@ -536,8 +531,8 @@ public class FilterComponent
}
// -------------------------------------------------------------------------
- //
- //
+ //
+ //
// -------------------------------------------------------------------------
final class ControlRow
{
@@ -566,7 +561,7 @@ public class FilterComponent
m_bEnabled = _bEnabled;
// Label Field
- ControlElements[0] = (XInterface) CurUnoDialog.insertLabel("lblFieldNames" + sCompSuffix,
+ ControlElements[0] = CurUnoDialog.insertLabel("lblFieldNames" + sCompSuffix,
new String[]
{
PropertyNames.PROPERTY_ENABLED,
@@ -591,7 +586,7 @@ public class FilterComponent
});
// Label Operator
- ControlElements[1] = (XInterface) CurUnoDialog.insertLabel("lblOperators" + sCompSuffix,
+ ControlElements[1] = CurUnoDialog.insertLabel("lblOperators" + sCompSuffix,
new String[]
{
PropertyNames.PROPERTY_ENABLED,
@@ -616,7 +611,7 @@ public class FilterComponent
});
// Label Value
- ControlElements[2] = (XInterface) CurUnoDialog.insertLabel("lblValue" + sCompSuffix,
+ ControlElements[2] = CurUnoDialog.insertLabel("lblValue" + sCompSuffix,
new String[]
{
PropertyNames.PROPERTY_ENABLED,
@@ -641,7 +636,7 @@ public class FilterComponent
});
// Listbox Fields
- ControlElements[SOLSTFIELDNAME] = (XInterface) CurUnoDialog.insertListBox("lstFieldName" + sCompSuffix, SO_FIELDNAMELIST[Index], null, new ItemListenerImpl(),
+ ControlElements[SOLSTFIELDNAME] = CurUnoDialog.insertListBox("lstFieldName" + sCompSuffix, SO_FIELDNAMELIST[Index], null, new ItemListenerImpl(),
new String[]
{
PropertyNames.PROPERTY_ENABLED,
@@ -670,7 +665,7 @@ public class FilterComponent
});
// Listbox Operators
- ControlElements[SOLSTOPERATOR] = (XInterface) CurUnoDialog.insertListBox("lstOperator" + sCompSuffix, SO_CONDITIONLIST[Index], null, new ItemListenerImpl(),
+ ControlElements[SOLSTOPERATOR] = CurUnoDialog.insertListBox("lstOperator" + sCompSuffix, SO_CONDITIONLIST[Index], null, new ItemListenerImpl(),
new String[]
{
PropertyNames.PROPERTY_ENABLED,
@@ -681,7 +676,7 @@ public class FilterComponent
PropertyNames.PROPERTY_POSITION_X,
PropertyNames.PROPERTY_POSITION_Y,
PropertyNames.PROPERTY_STEP,
- "StringItemList",
+ PropertyNames.STRING_ITEM_LIST,
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH
},
@@ -699,7 +694,7 @@ public class FilterComponent
Short.valueOf(curtabindex++),
Integer.valueOf(nOperatorWidth)
});
- ControlElements[SOTXTVALUE] = (XInterface) CurUnoDialog.insertFormattedField("txtValue" + sCompSuffix, SO_TEXTFIELDLIST[Index], new TextListenerImpl(),
+ ControlElements[SOTXTVALUE] = CurUnoDialog.insertFormattedField("txtValue" + sCompSuffix, SO_TEXTFIELDLIST[Index], new TextListenerImpl(),
new String[]
{
PropertyNames.PROPERTY_ENABLED,
@@ -731,17 +726,17 @@ public class FilterComponent
/**
* @returns true if the current condition is complete, all needed fields are filled with values.
- * So we can enable the next.
+ * So we can enable the next.
*/
boolean isConditionComplete()
{
try
{
- short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTFIELDNAME]), "SelectedItems"));
+ short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTFIELDNAME]), PropertyNames.SELECTED_ITEMS));
if (SelFields.length > 0)
{
int nSelOperator = getSelectedOperator();
- // short[] SelOperator = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), "SelectedItems"));
+ // short[] SelOperator = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), PropertyNames.SELECTED_ITEMS));
if (nSelOperator == com.sun.star.sdb.SQLFilterOperator.SQLNULL
|| /* is null */ nSelOperator == com.sun.star.sdb.SQLFilterOperator.NOT_SQLNULL) /* is not null */
@@ -764,7 +759,7 @@ public class FilterComponent
if (!AnyConverter.isVoid(oValue))
{
String sValue = (String.valueOf(oValue));
- return (!sValue.equals(""));
+ return (!sValue.equals(PropertyNames.EMPTY_STRING));
}
}
}
@@ -781,9 +776,9 @@ public class FilterComponent
{
try
{
- XListBox xFieldsListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, ControlElements[SOLSTFIELDNAME]);
+ XListBox xFieldsListBox = UnoRuntime.queryInterface(XListBox.class, ControlElements[SOLSTFIELDNAME]);
xFieldsListBox.selectItem(_filtercondition.Name, true);
- XListBox xOperatorListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, ControlElements[SOLSTOPERATOR]);
+ XListBox xOperatorListBox = UnoRuntime.queryInterface(XListBox.class, ControlElements[SOLSTOPERATOR]);
xOperatorListBox.selectItemPos((short) (_filtercondition.Handle - 1), true);
if (AnyConverter.isString(_filtercondition.Value))
@@ -791,8 +786,8 @@ public class FilterComponent
String sValue = AnyConverter.toString(_filtercondition.Value);
if (sValue.indexOf("{D '") > -1)
{
- sValue = JavaTools.replaceSubString(sValue, "", "{D '");
- sValue = JavaTools.replaceSubString(sValue, "", "' }");
+ sValue = JavaTools.replaceSubString(sValue, PropertyNames.EMPTY_STRING, "{D '");
+ sValue = JavaTools.replaceSubString(sValue, PropertyNames.EMPTY_STRING, "' }");
try
{
oQueryMetaData.getNumberFormatter().convertStringToNumber(iDateFormat, sValue);
@@ -804,8 +799,8 @@ public class FilterComponent
}
else if (sValue.indexOf("{T '") > -1)
{
- sValue = JavaTools.replaceSubString(sValue, "", "{T '");
- sValue = JavaTools.replaceSubString(sValue, "", "' }");
+ sValue = JavaTools.replaceSubString(sValue, PropertyNames.EMPTY_STRING, "{T '");
+ sValue = JavaTools.replaceSubString(sValue, PropertyNames.EMPTY_STRING, "' }");
try
{
oQueryMetaData.getNumberFormatter().convertStringToNumber(iTimeFormat, sValue);
@@ -839,7 +834,7 @@ public class FilterComponent
protected void setFieldNames(String[] _FieldNames)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTFIELDNAME]), "StringItemList", _FieldNames);
+ Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTFIELDNAME]), PropertyNames.STRING_ITEM_LIST, _FieldNames);
FieldNames = _FieldNames;
}
@@ -870,7 +865,7 @@ public class FilterComponent
};
try
{
- iselected = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), "SelectedItems"));
+ iselected = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), PropertyNames.SELECTED_ITEMS));
}
catch (Exception e)
{
@@ -878,7 +873,7 @@ public class FilterComponent
}
if ((iselected.length) == 0)
{
- Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), "SelectedItems", new short[]
+ Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), PropertyNames.SELECTED_ITEMS, new short[]
{
0
});
@@ -894,7 +889,7 @@ public class FilterComponent
{
try
{
- short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTFIELDNAME]), "SelectedItems"));
+ short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTFIELDNAME]), PropertyNames.SELECTED_ITEMS));
return FieldNames[SelFields[0]];
}
catch (Exception exception)
@@ -910,7 +905,7 @@ public class FilterComponent
{
try
{
- short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), "SelectedItems"));
+ short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), PropertyNames.SELECTED_ITEMS));
switch (SelFields[0])
{
case 0:
diff --git a/wizards/com/sun/star/wizards/ui/ImageList.java b/wizards/com/sun/star/wizards/ui/ImageList.java
index 9d42aa45599e..6c31d989b785 100644
--- a/wizards/com/sun/star/wizards/ui/ImageList.java
+++ b/wizards/com/sun/star/wizards/ui/ImageList.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -97,7 +97,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
public IRenderer counterRenderer = new SimpleCounterRenderer();
private Object dialogModel;
private ImageKeyListener imageKeyListener;
- private static final Integer BACKGROUND_COLOR = new Integer(16777216); //new Integer(SystemColor.window.getRGB() + 16777216);
+ private static final Integer BACKGROUND_COLOR = 16777216; //new Integer(SystemColor.window.getRGB() + 16777216);
private final static Short HIDE_PAGE = new Short((short) 99);
private final static Integer TRANSPARENT = new Integer(-1);
private final static int LINE_HEIGHT = 8; //private MethodInvocation METHOD_MOUSE_ENTER_IMAGE;
@@ -163,7 +163,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
new String[]
{
"BackgroundColor",
- "Border",
+ PropertyNames.PROPERTY_BORDER,
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_POSITION_X,
PropertyNames.PROPERTY_POSITION_Y,
@@ -192,7 +192,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
//XWindow win = (XWindow)UnoRuntime.queryInterface(XWindow.class,lblContainer);
/*dialog.xWindow.addWindowListener(uiEventListener);
String dName = (String)Helper.getUnoPropertyValue(dialog.xDialogModel,PropertyNames.PROPERTY_NAME);
-
+
uiEventListener.add(dName,EventNames.EVENT_WINDOW_SHOWN,"disableContainerMouseEvents",this);
*/
int selectionWidth = rowSelect ?
@@ -202,7 +202,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
grbxSelectedImage = dialog.insertLabel(name + "_grbxSelected", new String[]
{
"BackgroundColor",
- "Border",
+ PropertyNames.PROPERTY_BORDER,
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_POSITION_X,
PropertyNames.PROPERTY_POSITION_Y,
@@ -215,14 +215,14 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
new Short((short) 1),
new Integer(imageSize.Height + (selectionGap.Height * 2)),
//height
- new Integer(0), //posx
- new Integer(0), //posy
+ 0, //posx
+ 0, //posy
step,
Boolean.TRUE,
new Integer(selectionWidth)
});
- XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, grbxSelectedImage);
+ XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, grbxSelectedImage);
xWindow.addMouseListener(new OMouseListener());
final String[] pNames1 = new String[]
@@ -240,7 +240,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
lblImageText = dialog.insertLabel(name + "_imageText", pNames1, new Object[]
{
new Integer(imageTextHeight),
- "",
+ PropertyNames.EMPTY_STRING,
new Integer(pos.Width + 1),
new Integer(pos.Height + (imageSize.Height + gap.Height) * rows + gap.Height),
step,
@@ -252,7 +252,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
if (showButtons)
{
- final Integer btnSize = new Integer(14);
+ final Integer btnSize = 14;
btnBack = dialog.insertButton(name + "_btnBack", "prevPage", this, pNames1, new Object[]
{
@@ -281,7 +281,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
lblCounter = dialog.insertLabel(name + "_lblCounter", pNames1, new Object[]
{
new Integer(LINE_HEIGHT),
- "",
+ PropertyNames.EMPTY_STRING,
new Integer(pos.Width + btnSize.intValue() + 1),
new Integer(pos.Height + (imageSize.Height + gap.Height) * rows + gap.Height + imageTextHeight + ((btnSize.intValue() - LINE_HEIGHT) / 2)),
step,
@@ -290,7 +290,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
new Integer(cols * (imageSize.Width + gap.Width) + gap.Width - 2 * btnSize.intValue() - 1)
});
- Helper.setUnoPropertyValue(getModel(lblCounter), "Align", new Short((short) 1));
+ Helper.setUnoPropertyValue(getModel(lblCounter), PropertyNames.PROPERTY_ALIGN, new Short((short) 1));
Helper.setUnoPropertyValue(getModel(btnBack), PropertyNames.PROPERTY_LABEL, "<");
Helper.setUnoPropertyValue(getModel(btnNext), PropertyNames.PROPERTY_LABEL, ">");
@@ -331,7 +331,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
private Integer m_imageHeight, m_imageWidth;
private final static String[] IMAGE_PROPS = new String[]
{
- "Border",
+ PropertyNames.PROPERTY_BORDER,
"BackgroundColor",
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
@@ -366,7 +366,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
m_imageWidth
});
- XWindow win = (XWindow) UnoRuntime.queryInterface(XWindow.class, image);
+ XWindow win = UnoRuntime.queryInterface(XWindow.class, image);
win.addMouseListener(uiEventListener);
win.addKeyListener(imageKeyListener);
//uiEventListener.add(imageName,EventNames.EVENT_MOUSE_ENTERED,METHOD_MOUSE_ENTER_IMAGE);
@@ -408,7 +408,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
{
if (oResources.length == 1)
{
- Helper.setUnoPropertyValue(m_aImages[i].getModel(), PropertyNames.PROPERTY_IMAGEURL, (String) oResources[0]);
+ Helper.setUnoPropertyValue(m_aImages[i].getModel(), PropertyNames.PROPERTY_IMAGEURL, oResources[0]);
}
else if (oResources.length == 2)
{
@@ -500,11 +500,11 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
private void setVisible(Object control, boolean visible)
{
- ((XWindow) UnoRuntime.queryInterface(XWindow.class, control)).setVisible(visible);
+ UnoRuntime.queryInterface(XWindow.class, control).setVisible(visible);
}
/**
- *
+ *
* @param i
* @return the Object in the list model corresponding to the given image index.
*/
@@ -522,7 +522,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
}
/**
- *
+ *
* @param i
* @return the index in the listModel for the given image index.
*/
@@ -600,7 +600,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
*/
private void fireItemSelected()
{
-// java.awt.event.ItemEvent event = new java.awt.event.ItemEvent(this, 0,
+// java.awt.event.ItemEvent event = new java.awt.event.ItemEvent(this, 0,
// getSelectedObject(), java.awt.event.ItemEvent.SELECTED);
java.util.ArrayList list;
synchronized(this)
@@ -818,7 +818,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
private void refreshImageText()
{
Object item = selected >= 0 ? getListModel().getElementAt(selected) : null;
- Helper.setUnoPropertyValue(getModel(lblImageText), PropertyNames.PROPERTY_LABEL, " " + renderer.render(item));
+ Helper.setUnoPropertyValue(getModel(lblImageText), PropertyNames.PROPERTY_LABEL, PropertyNames.SPACE + renderer.render(item));
}
/**
@@ -861,8 +861,8 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
private void enableButtons()
{
- enable(btnNext, new Boolean(pageStart + rows * cols < listModel.getSize()));
- enable(btnBack, new Boolean(pageStart > 0));
+ enable(btnNext, Boolean.valueOf(pageStart + rows * cols < listModel.getSize()));
+ enable(btnBack, Boolean.valueOf(pageStart > 0));
}
private void enable(Object control, Boolean enable)
@@ -872,7 +872,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
private Object getModel(Object control)
{
- return ((XControl) UnoRuntime.queryInterface(XControl.class, control)).getModel();
+ return UnoRuntime.queryInterface(XControl.class, control).getModel();
}
/*
@@ -880,21 +880,21 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
System.out.println("mouse enter");
int i = getImageFromEvent(event);
//TODO what is when the image does not display an image?
- if (getIndexFor(i) != selected)
+ if (getIndexFor(i) != selected)
setBorder(m_aImages[i],imageBorderMO);
}
-
+
public void mouseExitImage(Object event) {
//System.out.println("mouse exit");
int i = getImageFromEvent(event);
//TODO what is when the image does not display an image?
- if (getIndexFor(i) != selected)
+ if (getIndexFor(i) != selected)
setBorder(m_aImages[i],imageBorder);
}
*/
private void setBorder(Object control, Short border)
{
- Helper.setUnoPropertyValue(getModel(control), "Border", border);
+ Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_BORDER, border);
//XWindowPeer peer = ((XControl)UnoRuntime.queryInterface(XControl.class,control)).getPeer();
//peer.invalidate(InvalidateStyle.CHILDREN);
}
@@ -932,9 +932,9 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
{
/**
- *
+ *
* @param listItem
- * @return two resource ids for an image referenced in the imaglist resourcefile of the
+ * @return two resource ids for an image referenced in the imaglist resourcefile of the
* wizards project; The second one of them is designed to be used for High Contrast Mode.
*/
public Object[] getImageUrls(Object listItem);
@@ -945,7 +945,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
public String render(Object counter)
{
- return "" + ((Counter) counter).start + ".." + ((Counter) counter).end + "/" + ((Counter) counter).max;
+ return PropertyNames.EMPTY_STRING + ((Counter) counter).start + ".." + ((Counter) counter).end + "/" + ((Counter) counter).max;
}
}
@@ -1081,7 +1081,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
{
Helper.setUnoPropertyValue(m_aImages[image].getModel(), "Tabstop",
Boolean.TRUE);
- XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, m_aImages[image]);
+ XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, m_aImages[image]);
xWindow.setFocus();
}
diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.java b/wizards/com/sun/star/wizards/ui/PathSelection.java
index 6b50127017e1..e630aeee2181 100755
--- a/wizards/com/sun/star/wizards/ui/PathSelection.java
+++ b/wizards/com/sun/star/wizards/ui/PathSelection.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,9 +41,9 @@ public class PathSelection
XMultiServiceFactory xMSF;
int iDialogType;
int iTransferMode;
- public String sDefaultDirectory = "";
- public String sDefaultName = "";
- public String sDefaultFilter = "";
+ public String sDefaultDirectory = PropertyNames.EMPTY_STRING;
+ public String sDefaultName = PropertyNames.EMPTY_STRING;
+ public String sDefaultFilter = PropertyNames.EMPTY_STRING;
public boolean usedPathPicker = false;
public XPathSelectionListener xAction;
public XTextComponent xSaveTextBox;
@@ -81,7 +81,7 @@ public class PathSelection
PropertyNames.PROPERTY_ENABLED, 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[]
{
- new Boolean(Enabled), new Integer(8), LabelText, new Integer(XPos), new Integer(YPos), new Integer(DialogStep), new Short(CurTabIndex), new Integer(Width)
+ Boolean.valueOf(Enabled), 8, LabelText, new Integer(XPos), new Integer(YPos), new Integer(DialogStep), new Short(CurTabIndex), new Integer(Width)
});
xSaveTextBox = CurUnoDialog.insertTextField("txtSavePath", "callXPathSelectionListener", this, new String[]
@@ -89,16 +89,16 @@ public class PathSelection
PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
}, new Object[]
{
- new Boolean(Enabled), new Integer(12), TxtHelpURL, new Integer(XPos), new Integer(YPos + 10), new Integer(DialogStep), new Short((short) (CurTabIndex + 1)), new Integer(Width - 26)
+ Boolean.valueOf(Enabled), 12, TxtHelpURL, new Integer(XPos), new Integer(YPos + 10), new Integer(DialogStep), new Short((short) (CurTabIndex + 1)), new Integer(Width - 26)
});
- //CurUnoDialog.setControlProperty("txtSavePath", "ReadOnly", Boolean.TRUE);
+ //CurUnoDialog.setControlProperty("txtSavePath", PropertyNames.READ_ONLY, Boolean.TRUE);
CurUnoDialog.setControlProperty("txtSavePath", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
CurUnoDialog.insertButton("cmdSelectPath", "triggerPathPicker", this, new String[]
{
PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
}, new Object[]
{
- new Boolean(Enabled), new Integer(14), BtnHelpURL, "...", new Integer(XPos + Width - 16), new Integer(YPos + 9), new Integer(DialogStep), new Short((short) (CurTabIndex + 2)), new Integer(16)
+ Boolean.valueOf(Enabled), 14, BtnHelpURL, "...", new Integer(XPos + Width - 16), new Integer(YPos + 9), new Integer(DialogStep), new Short((short) (CurTabIndex + 2)), 16
});
}
diff --git a/wizards/com/sun/star/wizards/ui/PeerConfig.java b/wizards/com/sun/star/wizards/ui/PeerConfig.java
index 19617b593bd6..7ff63231946f 100644
--- a/wizards/com/sun/star/wizards/ui/PeerConfig.java
+++ b/wizards/com/sun/star/wizards/ui/PeerConfig.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -115,7 +115,7 @@ public class PeerConfig implements XWindowListener
for (int i = 0; i < this.m_aPeerTasks.size(); i++)
{
PeerTask aPeerTask = (PeerTask) m_aPeerTasks.elementAt(i);
- XVclWindowPeer xVclWindowPeer = (XVclWindowPeer) UnoRuntime.queryInterface(XVclWindowPeer.class, aPeerTask.xControl.getPeer());
+ XVclWindowPeer xVclWindowPeer = UnoRuntime.queryInterface(XVclWindowPeer.class, aPeerTask.xControl.getPeer());
for (int n = 0; n < aPeerTask.propnames.length; n++)
{
xVclWindowPeer.setProperty(aPeerTask.propnames[n], aPeerTask.propvalues[n]);
@@ -129,7 +129,7 @@ public class PeerConfig implements XWindowListener
for (int i = 0; i < this.aImageUrlTasks.size(); i++)
{
ImageUrlTask aImageUrlTask = (ImageUrlTask) aImageUrlTasks.elementAt(i);
- String sImageUrl = "";
+ String sImageUrl = PropertyNames.EMPTY_STRING;
if (AnyConverter.isInt(aImageUrlTask.oResource))
{
sImageUrl = oUnoDialog.getWizardImageUrl(((Integer) aImageUrlTask.oResource).intValue(), ((Integer) aImageUrlTask.oHCResource).intValue());
@@ -138,7 +138,7 @@ public class PeerConfig implements XWindowListener
{
sImageUrl = oUnoDialog.getImageUrl(((String) aImageUrlTask.oResource), ((String) aImageUrlTask.oHCResource));
}
- if (!sImageUrl.equals(""))
+ if (!sImageUrl.equals(PropertyNames.EMPTY_STRING))
{
Helper.setUnoPropertyValue(aImageUrlTask.oModel, PropertyNames.PROPERTY_IMAGEURL, sImageUrl);
}
@@ -161,13 +161,13 @@ public class PeerConfig implements XWindowListener
}
/**
- *
+ *
* @param oAPIControl an API control that the interface XControl can be derived from
- * @param _saccessname
+ * @param _saccessname
*/
public void setAccessibleName(Object oAPIControl, String _saccessname)
{
- XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, oAPIControl);
+ XControl xControl = UnoRuntime.queryInterface(XControl.class, oAPIControl);
setPeerProperties(xControl, new String[]
{
"AccessibleName"
@@ -189,14 +189,14 @@ public class PeerConfig implements XWindowListener
}
/**
- *
+ *
* @param oAPIControl an API control that the interface XControl can be derived from
- * @param _propnames
- * @param _propvalues
+ * @param _propnames
+ * @param _propvalues
*/
public void setPeerProperties(Object oAPIControl, String[] _propnames, Object[] _propvalues)
{
- XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, oAPIControl);
+ XControl xControl = UnoRuntime.queryInterface(XControl.class, oAPIControl);
setPeerProperties(xControl, _propnames, _propvalues);
}
@@ -222,7 +222,7 @@ public class PeerConfig implements XWindowListener
/**
* Assigns an image to the property 'ImageUrl' of a dialog control. The image id must be assigned in a resource file
* within the wizards project
- * wizards project
+ * wizards project
* @param _ocontrolmodel
* @param _nResId
* @param _nhcResId
@@ -234,7 +234,7 @@ public class PeerConfig implements XWindowListener
}
/**
- * Assigns an image to the property 'ImageUrl' of a dialog control. The image ids that the Resource urls point to
+ * Assigns an image to the property 'ImageUrl' of a dialog control. The image ids that the Resource urls point to
* may be assigned in a Resource file outside the wizards project
* @param _ocontrolmodel
* @param _sResourceUrl
@@ -249,10 +249,10 @@ public class PeerConfig implements XWindowListener
/**
* Assigns an image to the property 'ImageUrl' of a dialog control. The image id must be assigned in a resource file
* within the wizards project
- * wizards project
+ * wizards project
* @param _ocontrolmodel
* @param _oResource
- * @param _oHCResource
+ * @param _oHCResource
*/
public void setImageUrl(Object _ocontrolmodel, Object _oResource, Object _oHCResource)
{
diff --git a/wizards/com/sun/star/wizards/ui/SortingComponent.java b/wizards/com/sun/star/wizards/ui/SortingComponent.java
index 3b57ca3f670a..48ac44bc167f 100644
--- a/wizards/com/sun/star/wizards/ui/SortingComponent.java
+++ b/wizards/com/sun/star/wizards/ui/SortingComponent.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -61,10 +61,10 @@ public class SortingComponent
public void itemStateChanged(ItemEvent EventObject)
{
- Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(false));
+ Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
int ikey = CurUnoDialog.getControlKey(EventObject.Source, CurUnoDialog.ControlList);
enableNextSortListBox(ikey);
- Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(true));
+ Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
}
public void disposing(com.sun.star.lang.EventObject eventObject)
@@ -97,21 +97,21 @@ public class SortingComponent
for (int i = 0; i < 4; i++)
{
bDoEnable = (i < 2);
- CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lblSort" + new Integer(i + 1).toString(), new String[]
+ CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lblSort" + Integer.toString(i + 1), new String[]
{
- PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.ORIENTATION, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
}, new Object[]
{
- new Boolean(bDoEnable), new Integer(8), sSortHeader[i], new Integer(0), ICompPosX, new Integer(iCurPosY), IStep, new Short(curtabindex++), ICompWidth
+ Boolean.valueOf(bDoEnable), 8, sSortHeader[i], 0, ICompPosX, new Integer(iCurPosY), IStep, new Short(curtabindex++), ICompWidth
});
HIDString = HelpIds.getHelpIdString(FirstHelpIndex);
- xSortListBox[i] = CurUnoDialog.insertListBox("lstSort" + new Integer(i + 1).toString(), SOSORTLST[i], null, new ItemListenerImpl(), new String[]
+ xSortListBox[i] = CurUnoDialog.insertListBox("lstSort" + Integer.toString(i + 1), SOSORTLST[i], null, new ItemListenerImpl(), new String[]
{
"Dropdown", PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
}, new Object[]
{
- new Boolean(true), new Boolean(bDoEnable), new Integer(12), HIDString, new Short(UnoDialog.getListBoxLineCount()), "lstSort" + new Integer(i + 1), IListBoxPosX, new Integer(iCurPosY + 14), IStep, new Short(curtabindex++), IListBoxWidth
+ true, bDoEnable, 12, HIDString, new Short(UnoDialog.getListBoxLineCount()), "lstSort" + new Integer(i + 1), IListBoxPosX, new Integer(iCurPosY + 14), IStep, new Short(curtabindex++), IListBoxWidth
}); //new Short((short) (17+i*4))
HIDString = HelpIds.getHelpIdString(FirstHelpIndex + 1);
@@ -120,7 +120,7 @@ public class SortingComponent
PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH
}, new Object[]
{
- new Boolean(bDoEnable), new Integer(10), HIDString, sSortAscend[i], IOptButtonPosX, new Integer(iCurPosY + 10), new Short((short) 1), IStep, new Short(curtabindex++), new String("ASC"), IOptButtonWidth
+ bDoEnable, 10, HIDString, sSortAscend[i], IOptButtonPosX, new Integer(iCurPosY + 10), new Short((short) 1), IStep, new Short(curtabindex++), PropertyNames.ASC, IOptButtonWidth
}); //, new Short((short) (18+i*4))
HIDString = HelpIds.getHelpIdString(FirstHelpIndex + 2);
@@ -129,8 +129,8 @@ public class SortingComponent
PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH
}, new Object[]
{
- new Boolean(bDoEnable), new Integer(10), HIDString, sSortDescend[i], IOptButtonPosX, new Integer(iCurPosY + 24), new Short((short) 0), IStep, new Short(curtabindex++), new String("DESC"), IOptButtonWidth
- }); //, new Short((short) (19+i*4))
+ bDoEnable, 10, HIDString, sSortDescend[i], IOptButtonPosX, new Integer(iCurPosY + 24), new Short((short) 0), IStep, new Short(curtabindex++), "DESC", IOptButtonWidth
+ }); //, new Short((short) (19+i*4))
iCurPosY = iCurPosY + 36;
FirstHelpIndex += 3;
}
@@ -165,10 +165,7 @@ public class SortingComponent
int FieldCount = _FieldNames.length;
String[] ViewFieldNames = new String[FieldCount + 1];
ViewFieldNames[0] = sNoSorting;
- for (int i = 0; i < FieldCount; i++)
- {
- ViewFieldNames[i + 1] = _FieldNames[i];
- }
+ System.arraycopy(_FieldNames, 0, ViewFieldNames, 1, FieldCount);
short[] SelList = null;
for (int i = 0; i < 4; i++)
{
@@ -186,8 +183,8 @@ public class SortingComponent
(short) 0
};
}
- CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 1).toString(), "StringItemList", ViewFieldNames);
- CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 1).toString(), "SelectedItems", SelList);
+ CurUnoDialog.setControlProperty("lstSort" + Integer.toString(i + 1), PropertyNames.STRING_ITEM_LIST, ViewFieldNames);
+ CurUnoDialog.setControlProperty("lstSort" + Integer.toString(i + 1), PropertyNames.SELECTED_ITEMS, SelList);
toggleSortListBox(i, (i <= _SortFieldNames.length));
}
}
@@ -205,17 +202,17 @@ public class SortingComponent
}
/**
- * sets the controls of a Sorting criterion to readonly or not.
+ * sets the controls of a Sorting criterion to readonly or not.
* @param _index index of the Sorting criterion
- * @param _breadonly
+ * @param _breadonly
*/
public void setReadOnly(int _index, boolean _breadonly)
{
- CurUnoDialog.setControlProperty("lstSort" + new Integer(_index + 1).toString(), "ReadOnly", new Boolean(_breadonly));
+ CurUnoDialog.setControlProperty("lstSort" + Integer.toString(_index + 1), PropertyNames.READ_ONLY, Boolean.valueOf(_breadonly));
}
/**
- *
+ *
* @param _index the first Sorting criterion in which 'ReadOnly is set to 'false'
* @param _bcomplete
*/
@@ -261,12 +258,12 @@ public class SortingComponent
ArrayList<String> SortDescriptions = new ArrayList<String>();
for (int i = 0; i <= MaxSortIndex; i++)
{
- if (!((Boolean) CurUnoDialog.getControlProperty("lstSort" + (i + 1), "ReadOnly")))
+ if (!((Boolean) CurUnoDialog.getControlProperty("lstSort" + (i + 1), PropertyNames.READ_ONLY)))
{
CurFieldName = xSortListBox[i].getSelectedItem();
SortDescriptions.add(CurFieldName);
- iCurState = ((Short) CurUnoDialog.getControlProperty("optAscend" + new Integer(i + 1).toString(), PropertyNames.PROPERTY_STATE)).shortValue();
- SortFieldNames.add(new String[]{CurFieldName,iCurState == 1 ? "ASC" :"DESC" });
+ iCurState = ((Short) CurUnoDialog.getControlProperty("optAscend" + Integer.toString(i + 1), PropertyNames.PROPERTY_STATE)).shortValue();
+ SortFieldNames.add(new String[]{CurFieldName,iCurState == 1 ? PropertyNames.ASC :"DESC" });
}
}
// When searching for a duplicate entry we can neglect wether the entries are to be sorted ascending or descending
@@ -276,7 +273,7 @@ public class SortingComponent
{
String sLocSortCriteriaisduplicate = JavaTools.replaceSubString(sSortCriteriaisduplicate, SortFieldNames.get(iduplicate)[0], "<FIELDNAME>");
CurUnoDialog.showMessageBox("WarningBox", VclWindowPeerAttribute.OK, sLocSortCriteriaisduplicate);
- CurUnoDialog.vetoableChange(new PropertyChangeEvent(CurUnoDialog, "Steps", new Integer(1), new Integer(2)));
+ CurUnoDialog.vetoableChange(new PropertyChangeEvent(CurUnoDialog, "Steps", 1, 2));
CurUnoDialog.setFocus("lstSort" + (iduplicate + 1));
return new String[][]
{
@@ -303,7 +300,7 @@ public class SortingComponent
toggleSortListBox(i, (false));
if (i < MaxSortIndex)
{
- CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 2).toString(), "SelectedItems", new short[]
+ CurUnoDialog.setControlProperty("lstSort" + Integer.toString(i + 2), PropertyNames.SELECTED_ITEMS, new short[]
{
0
});
@@ -319,22 +316,22 @@ public class SortingComponent
private void moveupSortItems(int CurIndex, boolean bDoEnable)
{
short iNextItemPos;
- if ((bDoEnable == false) && (MAXSORTCRITERIAINDEX > CurIndex))
+ if ((!bDoEnable) && (MAXSORTCRITERIAINDEX > CurIndex))
{
for (int i = CurIndex; i < MAXSORTCRITERIAINDEX; i++)
{
iNextItemPos = xSortListBox[i + 1].getSelectedItemPos();
if (iNextItemPos != 0)
{
- CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 1).toString(), "SelectedItems", new short[]
+ CurUnoDialog.setControlProperty("lstSort" + Integer.toString(i + 1), PropertyNames.SELECTED_ITEMS, new short[]
{
iNextItemPos
});
- CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 2).toString(), "SelectedItems", new short[]
+ CurUnoDialog.setControlProperty("lstSort" + Integer.toString(i + 2), PropertyNames.SELECTED_ITEMS, new short[]
{
});
toggleSortListBox(i, true);
- CurUnoDialog.setControlProperty("lstSort" + new Integer(i + 2).toString(), "SelectedItems", new short[]
+ CurUnoDialog.setControlProperty("lstSort" + Integer.toString(i + 2), PropertyNames.SELECTED_ITEMS, new short[]
{
0
});
@@ -357,13 +354,13 @@ public class SortingComponent
{
if (CurIndex < xSortListBox.length)
{
- CurUnoDialog.setControlProperty("lblSort" + new Integer(CurIndex + 1).toString(), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable));
- CurUnoDialog.setControlProperty("lstSort" + new Integer(CurIndex + 1).toString(), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable));
- CurUnoDialog.setControlProperty("optAscend" + new Integer(CurIndex + 1).toString(), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable));
- CurUnoDialog.setControlProperty("optDescend" + new Integer(CurIndex + 1).toString(), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable));
- if (bDoEnable == false)
+ CurUnoDialog.setControlProperty("lblSort" + Integer.toString(CurIndex + 1), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable));
+ CurUnoDialog.setControlProperty("lstSort" + Integer.toString(CurIndex + 1), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable));
+ CurUnoDialog.setControlProperty("optAscend" + Integer.toString(CurIndex + 1), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable));
+ CurUnoDialog.setControlProperty("optDescend" + Integer.toString(CurIndex + 1), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bDoEnable));
+ if (!bDoEnable)
{
- CurUnoDialog.setControlProperty("lstSort" + new Integer(CurIndex + 1).toString(), "SelectedItems", new short[]
+ CurUnoDialog.setControlProperty("lstSort" + Integer.toString(CurIndex + 1), PropertyNames.SELECTED_ITEMS, new short[]
{
0
});
diff --git a/wizards/com/sun/star/wizards/ui/TitlesComponent.java b/wizards/com/sun/star/wizards/ui/TitlesComponent.java
index ef9a568d2e01..43cf658432a2 100644
--- a/wizards/com/sun/star/wizards/ui/TitlesComponent.java
+++ b/wizards/com/sun/star/wizards/ui/TitlesComponent.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,14 +55,14 @@ public class TitlesComponent extends ControlScroller
PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
}, new Object[]
{
- new Integer(8), _slblColumnNames, new Integer(iLabelPosX), new Integer(iCompPosY - 10), IStep, new Integer(60)
+ 8, _slblColumnNames, new Integer(iLabelPosX), new Integer(iCompPosY - 10), IStep, 60
});
CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblColumnTitles", new String[]
{
PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
}, new Object[]
{
- new Integer(8), _slblColumnTitles, new Integer(90), new Integer(iCompPosY - 10), IStep, new Integer(152)
+ 8, _slblColumnTitles, 90, new Integer(iCompPosY - 10), IStep, 152
});
}
@@ -111,7 +111,7 @@ public class TitlesComponent extends ControlScroller
},
new Object[]
{
- new Integer(16), new Boolean(true), new Integer(iLabelPosX), new Integer(_iCompPosY + 1), UIConsts.INVISIBLESTEP, new Short(curtabindex++), new Integer(30)
+ 16, Boolean.TRUE, new Integer(iLabelPosX), new Integer(_iCompPosY + 1), UIConsts.INVISIBLESTEP, new Short(curtabindex++), 30
});
xTextComponent = CurUnoDialog.insertTextField(stextfieldname, 0, null,
@@ -121,7 +121,7 @@ public class TitlesComponent extends ControlScroller
},
new Object[]
{
- new Integer(12), HelpIds.getHelpIdString(curHelpIndex++), new Integer(iLabelPosX + 30), new Integer(_iCompPosY), UIConsts.INVISIBLESTEP, new Short(curtabindex++), new Integer(iCompWidth - 90 - 20)
+ 12, HelpIds.getHelpIdString(curHelpIndex++), new Integer(iLabelPosX + 30), new Integer(_iCompPosY), UIConsts.INVISIBLESTEP, new Short(curtabindex++), new Integer(iCompWidth - 90 - 20)
});
}
}
diff --git a/wizards/com/sun/star/wizards/ui/UIConsts.java b/wizards/com/sun/star/wizards/ui/UIConsts.java
index 3115413035b6..9b1c547dbd9e 100644
--- a/wizards/com/sun/star/wizards/ui/UIConsts.java
+++ b/wizards/com/sun/star/wizards/ui/UIConsts.java
@@ -19,7 +19,7 @@ public interface UIConsts
public static final int RID_IMG_REPORT = 1000;
public static final int RID_IMG_FORM = 1100;
public static final int RID_IMG_WEB = 1200;
- public static final Integer INVISIBLESTEP = new Integer(99);
+ public static final Integer INVISIBLESTEP = 99;
public static final String INFOIMAGEURL = "private:resource/dbu/image/19205";
public static final String INFOIMAGEURL_HC = "private:resource/dbu/image/19230";
/**
@@ -27,12 +27,12 @@ public interface UIConsts
* high tabindex because on every step their taborder must appear at the end
*/
public static final short SOFIRSTWIZARDNAVITABINDEX = 30000;
- public static final Integer INTEGER_8 = new Integer(8);
- public static final Integer INTEGER_12 = new Integer(12);
- public static final Integer INTEGER_14 = new Integer(14);
- public static final Integer INTEGER_16 = new Integer(16);
- public static final Integer INTEGER_40 = new Integer(40);
- public static final Integer INTEGER_50 = new Integer(50);
+ public static final Integer INTEGER_8 = 8;
+ public static final Integer INTEGER_12 = 12;
+ public static final Integer INTEGER_14 = 14;
+ public static final Integer INTEGER_16 = 16;
+ public static final Integer INTEGER_40 = 40;
+ public static final Integer INTEGER_50 = 50;
/**Steps of the QueryWizard
*
*/
@@ -46,7 +46,7 @@ public interface UIConsts
public static final int SOSUMMARYPAGE = 8;
public static final Integer[] INTEGERS = new Integer[]
{
- new Integer(0), new Integer(1), new Integer(2), new Integer(3), new Integer(4), new Integer(5), new Integer(6), new Integer(7), new Integer(8), new Integer(9), new Integer(10)
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
};
class CONTROLTYPE
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java
index e372a843a56a..a7cc021545ae 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog.java
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -82,19 +82,19 @@ public class UnoDialog implements EventNames
this.xMSF = xMSF;
ControlList = new Hashtable();
xDialogModel = (XInterface) xMSF.createInstance("com.sun.star.awt.UnoControlDialogModel");
- XMultiPropertySet xMultiPSetDlg = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, xDialogModel);
+ XMultiPropertySet xMultiPSetDlg = UnoRuntime.queryInterface(XMultiPropertySet.class, xDialogModel);
xMultiPSetDlg.setPropertyValues(PropertyNames, PropertyValues);
- MSFDialogModel = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xDialogModel);
+ MSFDialogModel = UnoRuntime.queryInterface(XMultiServiceFactory.class, xDialogModel);
xUnoDialog = (XInterface) xMSF.createInstance("com.sun.star.awt.UnoControlDialog");
- xControl = (XControl) UnoRuntime.queryInterface(XControl.class, xUnoDialog);
- XControlModel xControlModel = (XControlModel) UnoRuntime.queryInterface(XControlModel.class, xDialogModel);
+ xControl = UnoRuntime.queryInterface(XControl.class, xUnoDialog);
+ XControlModel xControlModel = UnoRuntime.queryInterface(XControlModel.class, xDialogModel);
xControl.setModel(xControlModel);
- xPSetDlg = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xDialogModel);
- xDlgContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, xUnoDialog);
- xDlgNames = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, xDialogModel);
+ xPSetDlg = UnoRuntime.queryInterface(XPropertySet.class, xDialogModel);
+ xDlgContainer = UnoRuntime.queryInterface(XControlContainer.class, xUnoDialog);
+ xDlgNames = UnoRuntime.queryInterface(XNameContainer.class, xDialogModel);
// xDlgNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xDialogModel);
- xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xUnoDialog);
- xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xUnoDialog);
+ xComponent = UnoRuntime.queryInterface(XComponent.class, xUnoDialog);
+ xWindow = UnoRuntime.queryInterface(XWindow.class, xUnoDialog);
// setPeerConfiguration(); // LLA: will be done, if really used!
}
@@ -107,9 +107,9 @@ public class UnoDialog implements EventNames
public int getControlKey(Object EventObject, Hashtable ControlList)
{
int iKey;
- XControl xContrl = (XControl) UnoRuntime.queryInterface(XControl.class, EventObject);
+ XControl xContrl = UnoRuntime.queryInterface(XControl.class, EventObject);
XControlModel xControlModel = xContrl.getModel();
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlModel);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xControlModel);
try
{
String sName = (String) xPSet.getPropertyValue(PropertyNames.PROPERTY_NAME);
@@ -142,7 +142,7 @@ public class UnoDialog implements EventNames
{
if (m_xDlgNameAccess == null)
{
- m_xDlgNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xDialogModel);
+ m_xDlgNameAccess = UnoRuntime.queryInterface(XNameAccess.class, xDialogModel);
}
return m_xDlgNameAccess;
}
@@ -152,12 +152,12 @@ public class UnoDialog implements EventNames
{
if (PropertyValue != null)
{
- if (getDlgNameAccess().hasByName(ControlName) == false)
+ if (!getDlgNameAccess().hasByName(ControlName))
{
return;
}
Object xControlModel = getDlgNameAccess().getByName(ControlName);
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlModel);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xControlModel);
if (AnyConverter.isArray(PropertyValue))
{
com.sun.star.uno.Type seqType = new com.sun.star.uno.Type(PropertyValue.getClass());
@@ -187,12 +187,12 @@ public class UnoDialog implements EventNames
{
if (PropertyValues != null)
{
- if (getDlgNameAccess().hasByName(ControlName) == false)
+ if (!getDlgNameAccess().hasByName(ControlName))
{
return;
}
Object xControlModel = getDlgNameAccess().getByName(ControlName);
- XMultiPropertySet xMultiPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, xControlModel);
+ XMultiPropertySet xMultiPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, xControlModel);
xMultiPSet.setPropertyValues(PropertyNames, PropertyValues);
}
}
@@ -207,12 +207,8 @@ public class UnoDialog implements EventNames
try
{
Object xControlModel = getDlgNameAccess().getByName(ControlName);
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlModel);
- Object oPropValue = xPSet.getPropertyValue(PropertyName);
- // if (AnyConverter.isArray(oPropValue))
- // return Helper.getArrayValue(oPropValue);
- // else
- return oPropValue;
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xControlModel);
+ return xPSet.getPropertyValue(PropertyName);
}
catch (com.sun.star.uno.Exception exception)
{ // com.sun.star.container.NoSuchElementException, com.sun.star.beans.UnknownPropertyException,
@@ -226,7 +222,7 @@ public class UnoDialog implements EventNames
try
{
Object xControlModel = getDlgNameAccess().getByName(ControlName);
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlModel);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xControlModel);
Property[] allProps = xPSet.getPropertySetInfo().getProperties();
for (int i = 0; i < allProps.length; i++)
{
@@ -243,20 +239,19 @@ public class UnoDialog implements EventNames
public double getMAPConversionFactor(String ControlName)
{
XControl xControl2 = xDlgContainer.getControl(ControlName);
- XView xView = (XView) UnoRuntime.queryInterface(XView.class, xControl2);
+ XView xView = UnoRuntime.queryInterface(XView.class, xControl2);
Size aSize = xView.getSize();
double dblMAPWidth = (double) (((Integer) Helper.getUnoPropertyValue(xControl2.getModel(), PropertyNames.PROPERTY_WIDTH)).intValue());
- double dblFactor = (((double) (aSize.Width)) / dblMAPWidth);
- return dblFactor;
+ return (((double) (aSize.Width)) / dblMAPWidth);
}
public Size getpreferredLabelSize(String LabelName, String sLabel)
{
XControl xControl2 = xDlgContainer.getControl(LabelName);
- XFixedText xFixedText = (XFixedText) UnoRuntime.queryInterface(XFixedText.class, xControl2);
+ XFixedText xFixedText = UnoRuntime.queryInterface(XFixedText.class, xControl2);
String OldText = xFixedText.getText();
xFixedText.setText(sLabel);
- XLayoutConstrains xLayoutConstrains = (XLayoutConstrains) UnoRuntime.queryInterface(XLayoutConstrains.class, xControl2);
+ XLayoutConstrains xLayoutConstrains = UnoRuntime.queryInterface(XLayoutConstrains.class, xControl2);
Size aSize = xLayoutConstrains.getPreferredSize();
xFixedText.setText(OldText);
return aSize;
@@ -277,19 +272,19 @@ public class UnoDialog implements EventNames
// This function may look ugly, but this is the only way to check the count
// of values in the model,which is always right.
// the control is only a view and could be right or not.
- final String[] fieldnames = (String[]) Helper.getUnoPropertyValue(getModel(_xListBox), "StringItemList");
+ final String[] fieldnames = (String[]) Helper.getUnoPropertyValue(getModel(_xListBox), PropertyNames.STRING_ITEM_LIST);
return fieldnames.length;
}
public static short getSelectedItemPos(XListBox _xListBox)
{
- short ipos[] = (short[]) Helper.getUnoPropertyValue(getModel(_xListBox), "SelectedItems");
+ short ipos[] = (short[]) Helper.getUnoPropertyValue(getModel(_xListBox), PropertyNames.SELECTED_ITEMS);
return ipos[0];
}
public static boolean isListBoxSelected(XListBox _xListBox)
{
- short ipos[] = (short[]) Helper.getUnoPropertyValue(getModel(_xListBox), "SelectedItems");
+ short ipos[] = (short[]) Helper.getUnoPropertyValue(getModel(_xListBox), PropertyNames.SELECTED_ITEMS);
return ipos.length > 0;
}
@@ -307,10 +302,10 @@ public class UnoDialog implements EventNames
try
{
Object oFixedText = insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", sName, sPropNames, oPropValues);
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oFixedText);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oFixedText);
xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName);
- Object oLabel = xDlgContainer.getControl(new String(sName));
- return (XFixedText) UnoRuntime.queryInterface(XFixedText.class, oLabel);
+ Object oLabel = xDlgContainer.getControl(sName);
+ return UnoRuntime.queryInterface(XFixedText.class, oLabel);
}
catch (java.lang.Exception ex)
{
@@ -334,10 +329,10 @@ public class UnoDialog implements EventNames
public XButton insertButton(String sName, int iControlKey, XActionListener xActionListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception
{
Object oButtonModel = insertControlModel("com.sun.star.awt.UnoControlButtonModel", sName, sProperties, sValues);
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oButtonModel);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oButtonModel);
xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName);
- Object objectButton = xDlgContainer.getControl(new String(sName));
- XButton xButton = (XButton) UnoRuntime.queryInterface(XButton.class, objectButton);
+ Object objectButton = xDlgContainer.getControl(sName);
+ XButton xButton = UnoRuntime.queryInterface(XButton.class, objectButton);
if (xActionListener != null)
{
xButton.addActionListener(xActionListener);
@@ -353,10 +348,10 @@ public class UnoDialog implements EventNames
public void insertCheckBox(String sName, int iControlKey, XItemListener xItemListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception
{
Object oButtonModel = insertControlModel("com.sun.star.awt.UnoControlCheckBoxModel", sName, sProperties, sValues);
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oButtonModel);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oButtonModel);
xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName);
- Object objectCheckBox = xDlgContainer.getControl(new String(sName));
- XCheckBox xCheckBox = (XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, objectCheckBox);
+ Object objectCheckBox = xDlgContainer.getControl(sName);
+ XCheckBox xCheckBox = UnoRuntime.queryInterface(XCheckBox.class, objectCheckBox);
if (xItemListener != null)
{
xCheckBox.addItemListener(xItemListener);
@@ -371,10 +366,10 @@ public class UnoDialog implements EventNames
public void insertNumericField(String sName, int iControlKey, XTextListener xTextListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception
{
Object oNumericFieldModel = insertControlModel("com.sun.star.awt.UnoControlNumericFieldModel", sName, sProperties, sValues);
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oNumericFieldModel);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oNumericFieldModel);
xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName);
- Object objectNumericField = xDlgContainer.getControl(new String(sName));
- XTextComponent xNumericField = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, objectNumericField);
+ Object objectNumericField = xDlgContainer.getControl(sName);
+ XTextComponent xNumericField = UnoRuntime.queryInterface(XTextComponent.class, objectNumericField);
if (xTextListener != null)
{
xNumericField.addTextListener(xTextListener);
@@ -391,10 +386,10 @@ public class UnoDialog implements EventNames
try
{
Object oScrollModel = insertControlModel("com.sun.star.awt.UnoControlScrollBarModel", sName, sProperties, sValues);
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oScrollModel);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oScrollModel);
xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName);
- Object oScrollBar = xDlgContainer.getControl(new String(sName));
- XScrollBar xScrollBar = (XScrollBar) UnoRuntime.queryInterface(XScrollBar.class, oScrollBar);
+ Object oScrollBar = xDlgContainer.getControl(sName);
+ XScrollBar xScrollBar = UnoRuntime.queryInterface(XScrollBar.class, oScrollBar);
if (xAdjustmentListener != null)
{
xScrollBar.addAdjustmentListener(xAdjustmentListener);
@@ -415,14 +410,12 @@ public class UnoDialog implements EventNames
public XTextComponent insertTextField(String sName, int iControlKey, XTextListener xTextListener, String[] sProperties, Object[] sValues)
{
- XTextComponent xTextBox = insertEditField("com.sun.star.awt.UnoControlEditModel", sName, iControlKey, xTextListener, sProperties, sValues);
- return xTextBox;
+ return insertEditField("com.sun.star.awt.UnoControlEditModel", sName, iControlKey, xTextListener, sProperties, sValues);
}
public XTextComponent insertFormattedField(String sName, int iControlKey, XTextListener xTextListener, String[] sProperties, Object[] sValues)
{
- XTextComponent xTextBox = insertEditField("com.sun.star.awt.UnoControlFormattedFieldModel", sName, iControlKey, xTextListener, sProperties, sValues);
- return xTextBox;
+ return insertEditField("com.sun.star.awt.UnoControlFormattedFieldModel", sName, iControlKey, xTextListener, sProperties, sValues);
}
public XTextComponent insertEditField(String ServiceName, String sName, int iControlKey, XTextListener xTextListener, String[] sProperties, Object[] sValues)
@@ -430,10 +423,10 @@ public class UnoDialog implements EventNames
try
{
XInterface xTextModel = insertControlModel(ServiceName, sName, sProperties, sValues);
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextModel);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xTextModel);
xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName);
- XControl xTextField = xDlgContainer.getControl(new String(sName));
- XTextComponent xTextBox = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, xTextField);
+ XControl xTextField = xDlgContainer.getControl(sName);
+ XTextComponent xTextBox = UnoRuntime.queryInterface(XTextComponent.class, xTextField);
if (xTextListener != null)
{
xTextBox.addTextListener(xTextListener);
@@ -452,10 +445,10 @@ public class UnoDialog implements EventNames
public XListBox insertListBox(String sName, int iControlKey, XActionListener xActionListener, XItemListener xItemListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception
{
XInterface xListBoxModel = insertControlModel("com.sun.star.awt.UnoControlListBoxModel", sName, sProperties, sValues);
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xListBoxModel);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xListBoxModel);
xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName);
- XControl xControlListBox = xDlgContainer.getControl(new String(sName));
- XListBox xListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, xControlListBox);
+ XControl xControlListBox = xDlgContainer.getControl(sName);
+ XListBox xListBox = UnoRuntime.queryInterface(XListBox.class, xControlListBox);
if (xItemListener != null)
{
xListBox.addItemListener(xItemListener);
@@ -472,17 +465,17 @@ public class UnoDialog implements EventNames
public XComboBox insertComboBox(String sName, int iControlKey, XActionListener xActionListener, XTextListener xTextListener, XItemListener xItemListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception
{
XInterface xComboBoxModel = insertControlModel("com.sun.star.awt.UnoControlComboBoxModel", sName, sProperties, sValues);
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xComboBoxModel);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xComboBoxModel);
xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName);
- XControl xControlComboBox = xDlgContainer.getControl(new String(sName));
- XComboBox xComboBox = (XComboBox) UnoRuntime.queryInterface(XComboBox.class, xControlComboBox);
+ XControl xControlComboBox = xDlgContainer.getControl(sName);
+ XComboBox xComboBox = UnoRuntime.queryInterface(XComboBox.class, xControlComboBox);
if (xItemListener != null)
{
xComboBox.addItemListener(xItemListener);
}
if (xTextListener != null)
{
- XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, xComboBox);
+ XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, xComboBox);
xTextComponent.addTextListener(xTextListener);
}
if (xActionListener != null)
@@ -517,7 +510,7 @@ public class UnoDialog implements EventNames
try
{
XRadioButton xRadioButton = insertRadioButton(sName, iControlKey, sProperties, sValues);
- XButton xButton = (com.sun.star.awt.XButton) UnoRuntime.queryInterface(XButton.class, xRadioButton);
+ XButton xButton = UnoRuntime.queryInterface(XButton.class, xRadioButton);
if (xActionListener != null)
{
xButton.addActionListener(xActionListener);
@@ -544,11 +537,10 @@ public class UnoDialog implements EventNames
try
{
XInterface oRadioButtonModel = insertControlModel("com.sun.star.awt.UnoControlRadioButtonModel", sName, sProperties, sValues);
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRadioButtonModel);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oRadioButtonModel);
xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName);
- XControl xControlRadioButton = xDlgContainer.getControl(new String(sName));
- XRadioButton xRadioButton = (XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, xControlRadioButton);
- return xRadioButton;
+ XControl xControlRadioButton = xDlgContainer.getControl(sName);
+ return UnoRuntime.queryInterface(XRadioButton.class, xControlRadioButton);
}
catch (com.sun.star.uno.Exception exception)
{
@@ -619,7 +611,7 @@ public class UnoDialog implements EventNames
try
{
int ncurstep = AnyConverter.toInt(Helper.getUnoPropertyValue(this.xDialogModel, PropertyNames.PROPERTY_STEP));
- Helper.setUnoPropertyValue(xDialogModel, PropertyNames.PROPERTY_STEP, new Integer(99));
+ Helper.setUnoPropertyValue(xDialogModel, PropertyNames.PROPERTY_STEP, 99);
Helper.setUnoPropertyValue(xDialogModel, PropertyNames.PROPERTY_STEP, new Integer(ncurstep));
}
catch (com.sun.star.uno.Exception exception)
@@ -647,7 +639,7 @@ public class UnoDialog implements EventNames
public void setFocus(String ControlName)
{
Object oFocusControl = xDlgContainer.getControl(ControlName);
- XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, oFocusControl);
+ XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, oFocusControl);
xWindow.setFocus();
}
@@ -697,11 +689,11 @@ public class UnoDialog implements EventNames
public static void deselectListBox(XInterface _xBasisListBox)
{
Object oListBoxModel = getModel(_xBasisListBox);
- Object sList = Helper.getUnoPropertyValue(oListBoxModel, "StringItemList");
- Helper.setUnoPropertyValue(oListBoxModel, "StringItemList", new String[]
+ Object sList = Helper.getUnoPropertyValue(oListBoxModel, PropertyNames.STRING_ITEM_LIST);
+ Helper.setUnoPropertyValue(oListBoxModel, PropertyNames.STRING_ITEM_LIST, new String[]
{
});
- Helper.setUnoPropertyValue(oListBoxModel, "StringItemList", sList);
+ Helper.setUnoPropertyValue(oListBoxModel, PropertyNames.STRING_ITEM_LIST, sList);
}
public void calculateDialogPosition(Rectangle FramePosSize)
@@ -735,10 +727,10 @@ public class UnoDialog implements EventNames
{
createWindowPeer();
}
- xVclWindowPeer = (XVclWindowPeer) UnoRuntime.queryInterface(XVclWindowPeer.class, xWindowPeer);
+ xVclWindowPeer = UnoRuntime.queryInterface(XVclWindowPeer.class, xWindowPeer);
// xVclWindowPeer.setProperty("AutoMnemonics", new Boolean(true));
- this.BisHighContrastModeActivated = new Boolean(this.isHighContrastModeActivated());
- xDialog = (XDialog) UnoRuntime.queryInterface(XDialog.class, xUnoDialog);
+ this.BisHighContrastModeActivated = Boolean.valueOf(this.isHighContrastModeActivated());
+ xDialog = UnoRuntime.queryInterface(XDialog.class, xUnoDialog);
return xDialog.execute();
}
@@ -749,8 +741,8 @@ public class UnoDialog implements EventNames
{
createWindowPeer();
}
- XVclWindowPeer xVclWindowPeer = (XVclWindowPeer) UnoRuntime.queryInterface(XVclWindowPeer.class, xWindowPeer);
- xDialog = (XDialog) UnoRuntime.queryInterface(XDialog.class, xUnoDialog);
+ XVclWindowPeer xVclWindowPeer = UnoRuntime.queryInterface(XVclWindowPeer.class, xWindowPeer);
+ xDialog = UnoRuntime.queryInterface(XDialog.class, xUnoDialog);
this.xWindow.setVisible(true);
}
@@ -774,7 +766,7 @@ public class UnoDialog implements EventNames
*/
public short executeDialog(XInterface xComponent) throws com.sun.star.uno.Exception
{
- XFrame frame = (XFrame) UnoRuntime.queryInterface(XFrame.class, xComponent);
+ XFrame frame = UnoRuntime.queryInterface(XFrame.class, xComponent);
if (frame != null)
{
XWindow w = frame.getComponentWindow();
@@ -801,17 +793,17 @@ public class UnoDialog implements EventNames
public void setAutoMnemonic(String ControlName, boolean bValue)
{
Object oControl = xDlgContainer.getControl(ControlName);
- xControl = (XControl) UnoRuntime.queryInterface(XControl.class, oControl);
+ xControl = UnoRuntime.queryInterface(XControl.class, oControl);
XWindowPeer xWindowPeer = xControl.getPeer();
- XVclWindowPeer xVclWindowPeer = (XVclWindowPeer) UnoRuntime.queryInterface(XVclWindowPeer.class, xControl.getPeer());
- xVclWindowPeer.setProperty("AutoMnemonics", new Boolean(bValue));
+ XVclWindowPeer xVclWindowPeer = UnoRuntime.queryInterface(XVclWindowPeer.class, xControl.getPeer());
+ xVclWindowPeer.setProperty("AutoMnemonics", Boolean.valueOf(bValue));
}
public void modifyFontWeight(String ControlName, float FontWeight)
{
FontDescriptor oFontDesc = new FontDescriptor();
oFontDesc.Weight = FontWeight;
- setControlProperty(ControlName, "FontDescriptor", oFontDesc);
+ setControlProperty(ControlName, PropertyNames.FONT_DESCRIPTOR, oFontDesc);
}
/**
@@ -828,10 +820,10 @@ public class UnoDialog implements EventNames
Object tk = xMSF.createInstance("com.sun.star.awt.Toolkit");
if (parentPeer == null)
{
- parentPeer = ((XToolkit) UnoRuntime.queryInterface(XToolkit.class, tk)).getDesktopWindow();
+ parentPeer = UnoRuntime.queryInterface(XToolkit.class, tk).getDesktopWindow();
}
- XToolkit xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class, tk);
- xReschedule = (XReschedule) UnoRuntime.queryInterface(XReschedule.class, xToolkit);
+ XToolkit xToolkit = UnoRuntime.queryInterface(XToolkit.class, tk);
+ xReschedule = UnoRuntime.queryInterface(XReschedule.class, xToolkit);
// TEUER!
xControl.createPeer(xToolkit, parentPeer);
xWindowPeer = xControl.getPeer();
@@ -855,7 +847,7 @@ public class UnoDialog implements EventNames
public void deletefirstListboxEntry(String ListBoxName, String DelEntryName)
{
XControl xListControl = xDlgContainer.getControl(ListBoxName);
- XListBox xListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, xListControl);
+ XListBox xListBox = UnoRuntime.queryInterface(XListBox.class, xListControl);
String FirstItem = xListBox.getItem((short) 0);
if (FirstItem.equals(DelEntryName))
{
@@ -863,7 +855,7 @@ public class UnoDialog implements EventNames
xListBox.removeItems((short) 0, (short) 1);
if (SelPos > 0)
{
- setControlProperty(ListBoxName, "SelectedItems", new short[SelPos]);
+ setControlProperty(ListBoxName, PropertyNames.SELECTED_ITEMS, new short[SelPos]);
xListBox.selectItemPos((short) (SelPos - 1), true);
}
}
@@ -872,17 +864,16 @@ public class UnoDialog implements EventNames
public void setPeerProperty(String ControlName, String PropertyName, Object PropertyValue)
{
Object oControl = xDlgContainer.getControl(ControlName);
- XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, oControl);
+ XControl xControl = UnoRuntime.queryInterface(XControl.class, oControl);
XWindowPeer xControlPeer = xControl.getPeer();
- XVclWindowPeer xVclWindowPeer = (XVclWindowPeer) UnoRuntime.queryInterface(XVclWindowPeer.class, xControlPeer);
+ XVclWindowPeer xVclWindowPeer = UnoRuntime.queryInterface(XVclWindowPeer.class, xControlPeer);
xVclWindowPeer.setProperty(PropertyName, PropertyValue);
}
public static Object getModel(Object control)
{
- XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, control);
- XControlModel xModel = xControl.getModel();
- return xModel;
+ XControl xControl = UnoRuntime.queryInterface(XControl.class, control);
+ return xControl.getModel();
}
public static void setEnabled(Object control, boolean enabled)
@@ -902,7 +893,7 @@ public class UnoDialog implements EventNames
*/
public static int getControlModelType(Object oControlModel)
{
- XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, oControlModel);
+ XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, oControlModel);
if (xServiceInfo.supportsService("com.sun.star.awt.UnoControlFixedTextModel"))
{
return UIConsts.CONTROLTYPE.FIXEDTEXT;
@@ -988,7 +979,7 @@ public class UnoDialog implements EventNames
*/
public static String getDisplayProperty(Object oControlModel)
{
- XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, oControlModel);
+ XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, oControlModel);
int itype = getControlModelType(oControlModel);
return getDisplayProperty(itype);
}
@@ -1000,7 +991,7 @@ public class UnoDialog implements EventNames
*/
public static String getDisplayProperty(int itype)
{
- // String propertyname = "";
+ // String propertyname = PropertyNames.EMPTY_STRING;
switch (itype)
{
case UIConsts.CONTROLTYPE.FIXEDTEXT:
@@ -1036,9 +1027,9 @@ public class UnoDialog implements EventNames
case UIConsts.CONTROLTYPE.PATTERNFIELD:
return "Text";
case UIConsts.CONTROLTYPE.LISTBOX:
- return "SelectedItems";
+ return PropertyNames.SELECTED_ITEMS;
default:
- return "";
+ return PropertyNames.EMPTY_STRING;
}
}
@@ -1075,7 +1066,7 @@ public class UnoDialog implements EventNames
int nBlue = getBlueColorShare(nUIColor);
int nLuminance = ((nBlue * 28 + nGreen * 151 + nRed * 77) / 256);
boolean bisactivated = (nLuminance <= 25);
- BisHighContrastModeActivated = new Boolean(bisactivated);
+ BisHighContrastModeActivated = Boolean.valueOf(bisactivated);
return bisactivated;
}
else
@@ -1091,9 +1082,9 @@ public class UnoDialog implements EventNames
public static int getRedColorShare(int _nColor)
{
- int nRed = (int) _nColor / 65536;
+ int nRed = _nColor / 65536;
int nRedModulo = _nColor % 65536;
- int nGreen = (int) (nRedModulo / 256);
+ int nGreen = nRedModulo / 256;
int nGreenModulo = (nRedModulo % 256);
int nBlue = nGreenModulo;
return nRed;
@@ -1101,17 +1092,17 @@ public class UnoDialog implements EventNames
public static int getGreenColorShare(int _nColor)
{
- int nRed = (int) _nColor / 65536;
+ int nRed = _nColor / 65536;
int nRedModulo = _nColor % 65536;
- int nGreen = (int) (nRedModulo / 256);
+ int nGreen = nRedModulo / 256;
return nGreen;
}
public static int getBlueColorShare(int _nColor)
{
- int nRed = (int) _nColor / 65536;
+ int nRed = _nColor / 65536;
int nRedModulo = _nColor % 65536;
- int nGreen = (int) (nRedModulo / 256);
+ int nGreen = nRedModulo / 256;
int nGreenModulo = (nRedModulo % 256);
int nBlue = nGreenModulo;
return nBlue;
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java b/wizards/com/sun/star/wizards/ui/UnoDialog2.java
index 0769e1d23b38..9f3a4027e56f 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -134,7 +134,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames
}
if (textChanged != null)
{
- XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, xComboBox);
+ XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, xComboBox);
xTextComponent.addTextListener((XTextListener) guiEventListener);
guiEventListener.add(sName, EVENT_TEXT_CHANGED, textChanged, eventTarget);
}
@@ -186,7 +186,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames
public XControl insertTitledBox(String sName, String[] sPropNames, Object[] oPropValues)
{
Object oTitledBox = insertControlModel2("com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues);
- return (XControl) UnoRuntime.queryInterface(XControl.class, oTitledBox);
+ return UnoRuntime.queryInterface(XControl.class, oTitledBox);
}
public XTextComponent insertTextField(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues)
@@ -209,11 +209,11 @@ public class UnoDialog2 extends UnoDialog implements EventNames
XControl xImgControl = insertImage(Desktop.getUniqueName(getDlgNameAccess(), "imgHint"),
new String[]
{
- "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Short((short) 0), new Integer(10), UIConsts.INFOIMAGEURL, new Integer(_posx), new Integer(_posy), Boolean.FALSE, new Integer(_iStep), new Integer(10)
+ new Short((short) 0), 10, UIConsts.INFOIMAGEURL, new Integer(_posx), new Integer(_posy), Boolean.FALSE, new Integer(_iStep), 10
});
super.getPeerConfiguration().setImageUrl(getModel(xImgControl), UIConsts.INFOIMAGEURL, UIConsts.INFOIMAGEURL_HC);
return xImgControl;
@@ -307,25 +307,25 @@ public class UnoDialog2 extends UnoDialog implements EventNames
public XControl insertFixedLine(String sName, String[] sPropNames, Object[] oPropValues)
{
Object oLine = insertControlModel2("com.sun.star.awt.UnoControlFixedLineModel", sName, sPropNames, oPropValues);
- return (XControl) UnoRuntime.queryInterface(XControl.class, oLine);
+ return UnoRuntime.queryInterface(XControl.class, oLine);
}
public XScrollBar insertScrollBar(String sName, String[] sPropNames, Object[] oPropValues)
{
Object oScrollBar = insertControlModel2("com.sun.star.awt.UnoControlScrollBarModel", sName, sPropNames, oPropValues);
- return (XScrollBar) UnoRuntime.queryInterface(XScrollBar.class, oScrollBar);
+ return UnoRuntime.queryInterface(XScrollBar.class, oScrollBar);
}
public XProgressBar insertProgressBar(String sName, String[] sPropNames, Object[] oPropValues)
{
Object oProgressBar = insertControlModel2("com.sun.star.awt.UnoControlProgressBarModel", sName, sPropNames, oPropValues);
- return (XProgressBar) UnoRuntime.queryInterface(XProgressBar.class, oProgressBar);
+ return UnoRuntime.queryInterface(XProgressBar.class, oProgressBar);
}
public XControl insertGroupBox(String sName, String[] sPropNames, Object[] oPropValues)
{
Object oGroupBox = insertControlModel2("com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues);
- return (XControl) UnoRuntime.queryInterface(XControl.class, oGroupBox);
+ return UnoRuntime.queryInterface(XControl.class, oGroupBox);
}
public Object insertControlModel2(String serviceName, String componentName, String[] sPropNames, Object[] oPropValues)
@@ -347,8 +347,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames
{
ex.printStackTrace();
}
- final Object aObj = xDlgContainer.getControl(componentName);
- return aObj;
+ return xDlgContainer.getControl(componentName);
}
private void setControlPropertiesDebug(Object model, String[] names, Object[] values)
@@ -369,13 +368,12 @@ public class UnoDialog2 extends UnoDialog implements EventNames
public String translateURL(String relativeURL)
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
public static Object getControlModel(Object unoControl)
{
- Object obj = ((XControl) UnoRuntime.queryInterface(XControl.class, unoControl)).getModel();
- return obj;
+ return UnoRuntime.queryInterface(XControl.class, unoControl).getModel();
}
public int showMessageBox(String windowServiceName, int windowAttribute, String MessageText)
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java
index c03ceb2dc257..84fce075b81b 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.java
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -109,7 +109,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
{
try
{
- XTopWindow top = (XTopWindow) UnoRuntime.queryInterface(XTopWindow.class, xWindow);
+ XTopWindow top = UnoRuntime.queryInterface(XTopWindow.class, xWindow);
if (top != null)
{
top.toFront();
@@ -178,12 +178,12 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
public void setRoadmapInteractive(boolean _bInteractive)
{
- Helper.setUnoPropertyValue(oRoadmap, "Activated", new Boolean(_bInteractive));
+ Helper.setUnoPropertyValue(oRoadmap, "Activated", Boolean.valueOf(_bInteractive));
}
public void setRoadmapComplete(boolean bComplete)
{
- Helper.setUnoPropertyValue(oRoadmap, "Complete", new Boolean(bComplete));
+ Helper.setUnoPropertyValue(oRoadmap, "Complete", Boolean.valueOf(bComplete));
}
public boolean isRoadmapComplete()
@@ -247,25 +247,25 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
new Object[]
{
new Integer(iDialogHeight - 26),
- new Integer(0),
- new Integer(0),
- new Integer(0),
+ 0,
+ 0,
+ 0,
new Short((short)0),
Boolean.TRUE,
- new Integer(85)
+ 85
});
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRoadmap);
+ XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oRoadmap);
xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, "rdmNavi");
- xSSFRoadmap = (XSingleServiceFactory) UnoRuntime.queryInterface(XSingleServiceFactory.class, oRoadmap);
- xIndexContRoadmap = (XIndexContainer) UnoRuntime.queryInterface(XIndexContainer.class, oRoadmap);
+ 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);
xRoadmapControl = this.xDlgContainer.getControl("rdmNavi");
- xRoadmapBroadcaster = (XItemEventBroadcaster) UnoRuntime.queryInterface(XItemEventBroadcaster.class, xRoadmapControl);
+ xRoadmapBroadcaster = UnoRuntime.queryInterface(XItemEventBroadcaster.class, xRoadmapControl);
xRoadmapBroadcaster.addItemListener((XItemListener) getGuiEventListener());
// xRoadmapControl = this.xDlgContainer.getControl("rdmNavi");
@@ -310,11 +310,10 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
{
Object oRoadmapItem = xSSFRoadmap.createInstance();
Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_LABEL, _sLabel);
- Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_ENABLED, new Boolean(_bEnabled));
+ Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bEnabled));
Helper.setUnoPropertyValue(oRoadmapItem, "ID", new Integer(_CurItemID));
xIndexContRoadmap.insertByIndex(Index, oRoadmapItem);
- int NextIndex = Index + 1;
- return NextIndex;
+ return Index + 1;
}
catch (com.sun.star.uno.Exception exception)
{
@@ -436,7 +435,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
*/
/**
- *
+ *
* @param _ndialogpage
* @param ooldValue
* @param onewValue
@@ -454,7 +453,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
Integer IButtonWidth = new Integer(iButtonWidth);
int iButtonHeight = 14;
Integer IButtonHeight = new Integer(iButtonHeight);
- Integer ICurStep = new Integer(0);
+ Integer ICurStep = 0;
int iDialogHeight = ((Integer) Helper.getUnoPropertyValue(this.xDialogModel, PropertyNames.PROPERTY_HEIGHT)).intValue();
int iDialogWidth = ((Integer) Helper.getUnoPropertyValue(this.xDialogModel, PropertyNames.PROPERTY_WIDTH)).intValue();
int iHelpPosX = 8;
@@ -467,21 +466,21 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnNaviSep",
new String[]
{
- PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_HEIGHT, PropertyNames.ORIENTATION, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Integer(1), new Integer(0), new Integer(0), new Integer(iDialogHeight - 26), ICurStep, new Integer(iDialogWidth)
+ 1, 0, 0, new Integer(iDialogHeight - 26), ICurStep, new Integer(iDialogWidth)
});
insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnRoadSep",
new String[]
{
- PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_HEIGHT, PropertyNames.ORIENTATION, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Integer(iBtnPosY - 6), new Integer(1), new Integer(85), new Integer(0), ICurStep, new Integer(1)
+ new Integer(iBtnPosY - 6), 1, 85, 0, ICurStep, 1
});
String[] propNames = new String[]
@@ -496,30 +495,30 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
},
new Object[]
{
- new Boolean(true), IButtonHeight, oWizardResource.getResText(UIConsts.RID_COMMON + 15), new Integer(iHelpPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.HELP_value), ICurStep, new Short(curtabindex++), IButtonWidth
+ true, IButtonHeight, oWizardResource.getResText(UIConsts.RID_COMMON + 15), new Integer(iHelpPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.HELP_value), ICurStep, new Short(curtabindex++), IButtonWidth
});
insertButton("btnWizardBack", BACK_ACTION_PERFORMED, propNames,
new Object[]
{
- new Boolean(false), IButtonHeight, HelpIds.getHelpIdString(hid + 2), oWizardResource.getResText(UIConsts.RID_COMMON + 13), new Integer(iBackPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth
+ false, IButtonHeight, HelpIds.getHelpIdString(hid + 2), oWizardResource.getResText(UIConsts.RID_COMMON + 13), new Integer(iBackPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth
});
insertButton("btnWizardNext", NEXT_ACTION_PERFORMED, propNames,
new Object[]
{
- new Boolean(true), IButtonHeight, HelpIds.getHelpIdString(hid + 3), oWizardResource.getResText(UIConsts.RID_COMMON + 14), new Integer(iNextPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth
+ true, IButtonHeight, HelpIds.getHelpIdString(hid + 3), oWizardResource.getResText(UIConsts.RID_COMMON + 14), new Integer(iNextPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth
});
insertButton("btnWizardFinish", FINISH_ACTION_PERFORMED, propNames,
new Object[]
{
- new Boolean(true), IButtonHeight, HelpIds.getHelpIdString(hid + 4), oWizardResource.getResText(UIConsts.RID_COMMON + 12), new Integer(iFinishPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth
+ true, IButtonHeight, HelpIds.getHelpIdString(hid + 4), oWizardResource.getResText(UIConsts.RID_COMMON + 12), new Integer(iFinishPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth
});
insertButton("btnWizardCancel", CANCEL_ACTION_PERFORMED, propNames,
new Object[]
{
- new Boolean(true), IButtonHeight, HelpIds.getHelpIdString(hid + 5), oWizardResource.getResText(UIConsts.RID_COMMON + 11), new Integer(iCancelPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth
+ true, IButtonHeight, HelpIds.getHelpIdString(hid + 5), oWizardResource.getResText(UIConsts.RID_COMMON + 11), new Integer(iCancelPosX), new Integer(iBtnPosY), new Short((short) PushButtonType.STANDARD_value), ICurStep, new Short(curtabindex++), IButtonWidth
});
setControlProperty("btnWizardNext", "DefaultButton", Boolean.TRUE);
@@ -588,7 +587,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
XInterface xRoadmapItem = getRoadmapItemByID(_nStep);
if (xRoadmapItem != null)
{
- Helper.setUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled));
+ Helper.setUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bEnabled));
}
}
@@ -747,11 +746,11 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
insertLabel("lblQueryTitle" + String.valueOf(i),
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- oFontDesc, new Integer(16), sRightPaneHeaders[i], Boolean.TRUE, new Integer(91), new Integer(8), new Integer(i + 1), new Short((short) 12), new Integer(212)
+ oFontDesc, 16, sRightPaneHeaders[i], Boolean.TRUE, 91, 8, new Integer(i + 1), new Short((short) 12), 212
});
}
}
diff --git a/wizards/com/sun/star/wizards/ui/XCommandSelectionListener.java b/wizards/com/sun/star/wizards/ui/XCommandSelectionListener.java
index 24fbd10eb9dd..73a7c7a87048 100644
--- a/wizards/com/sun/star/wizards/ui/XCommandSelectionListener.java
+++ b/wizards/com/sun/star/wizards/ui/XCommandSelectionListener.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/ui/XCompletion.java b/wizards/com/sun/star/wizards/ui/XCompletion.java
index 545345731e39..a3f2416826c1 100644
--- a/wizards/com/sun/star/wizards/ui/XCompletion.java
+++ b/wizards/com/sun/star/wizards/ui/XCompletion.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/ui/XFieldSelectionListener.java b/wizards/com/sun/star/wizards/ui/XFieldSelectionListener.java
index b47ad2363709..28916f1b89a8 100644
--- a/wizards/com/sun/star/wizards/ui/XFieldSelectionListener.java
+++ b/wizards/com/sun/star/wizards/ui/XFieldSelectionListener.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/ui/XPathSelectionListener.java b/wizards/com/sun/star/wizards/ui/XPathSelectionListener.java
index 5c76c092a46f..4b582127bb2f 100755
--- a/wizards/com/sun/star/wizards/ui/XPathSelectionListener.java
+++ b/wizards/com/sun/star/wizards/ui/XPathSelectionListener.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java
index bbe9cee2eb86..fd8ce47572b0 100644
--- a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java
+++ b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -128,7 +128,7 @@ public class AbstractListener
*/
public static String getEventSourceName(EventObject eventObject)
{
- XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, eventObject.Source);
+ XControl xControl = UnoRuntime.queryInterface(XControl.class, eventObject.Source);
return (String) Helper.getUnoPropertyValue(xControl.getModel(), PropertyNames.PROPERTY_NAME, String.class);
}
}
diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.java b/wizards/com/sun/star/wizards/ui/event/CommonListener.java
index 18f33af2cef8..0899d3117af6 100644
--- a/wizards/com/sun/star/wizards/ui/event/CommonListener.java
+++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.java b/wizards/com/sun/star/wizards/ui/event/DataAware.java
index 62eaaf657447..be7260da7719 100644
--- a/wizards/com/sun/star/wizards/ui/event/DataAware.java
+++ b/wizards/com/sun/star/wizards/ui/event/DataAware.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -45,7 +45,7 @@ import com.sun.star.wizards.common.PropertyNames;
* in child classes, the updateData() will be binded to UI event calls.
* <br><br>
* This class holds references to a Data Object and a Value object.
- * The Value object "knows" how to get and set a value from the
+ * The Value object "knows" how to get and set a value from the
* Data Object.
*/
public abstract class DataAware {
@@ -61,7 +61,7 @@ public abstract class DataAware {
* from/to the data object.
*/
protected Value value;
-
+
/**
* creates a DataAware object for the given data object and Value object.
* @param dataObject_
@@ -90,7 +90,7 @@ public abstract class DataAware {
*/
public void setDataObject(Object obj, boolean updateUI) {
- if (obj != null && !value.isAssignable(obj.getClass()))
+ if (obj != null && !value.isAssignable(obj.getClass()))
throw new ClassCastException("can not cast new DataObject to original Class");
dataObject = obj;
@@ -113,14 +113,14 @@ public abstract class DataAware {
/**
* gets the current value from the data obejct.
- * this method delegates the job to
+ * this method delegates the job to
* the value object.
* @return the current value of the data object.
*/
protected Object getFromData() {
return value.get(getDataObject());
}
-
+
/**
* sets the given value to the UI control
* @param newValue the value to set to the ui control.
@@ -222,10 +222,10 @@ public abstract class DataAware {
for (Iterator i = dataAwares.iterator(); i.hasNext();)
((DataAware) i.next()).setDataObject(dataObject, updateUI);
}
-
+
/**
* Value objects read and write a value from and
- * to an object. Typically using reflection and JavaBeans properties
+ * to an object. Typically using reflection and JavaBeans properties
* or directly using memeber reflection API.
* DataAware delegates the handling of the DataObject
* to a Value object.
@@ -255,7 +255,7 @@ public abstract class DataAware {
*/
public boolean isAssignable(Class type);
}
-
+
/**
* implementation of Value, handling JavaBeans properties through
* reflection.
@@ -283,7 +283,7 @@ public abstract class DataAware {
getMethod = createGetMethod(propertyName, propertyOwner);
setMethod = createSetMethod(propertyName, propertyOwner, getMethod.getReturnType());
}
-
+
/**
* called from the constructor, and creates a get method reflection object
* for the given property and object.
@@ -307,7 +307,7 @@ public abstract class DataAware {
}
return m;
}
-
+
/* (non-Javadoc)
* @see com.sun.star.wizards.ui.event.DataAware.Value#get(java.lang.Object)
*/
@@ -320,16 +320,16 @@ public abstract class DataAware {
ex2.printStackTrace();
} catch (NullPointerException npe) {
if (getMethod.getReturnType().equals(String.class))
- return "";
+ return PropertyNames.EMPTY_STRING;
if (getMethod.getReturnType().equals(Short.class))
return new Short((short) 0);
if (getMethod.getReturnType().equals(Integer.class))
- return new Integer(0);
+ return 0;
if (getMethod.getReturnType().equals(short[].class))
return new short[0];
}
return null;
-
+
}
protected Method createSetMethod(String propName, Object obj, Class paramClass) {
@@ -347,7 +347,7 @@ public abstract class DataAware {
*/
public void set(Object value, Object target) {
try {
- setMethod.invoke(target, new Object[] {value});
+ setMethod.invoke(target, value);
} catch (IllegalAccessException ex1) {
ex1.printStackTrace();
} catch (InvocationTargetException ex2) {
diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java
index 119b2b6e1e51..7431e43a2a10 100644
--- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java
+++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,12 +31,12 @@ import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.uno.Any;
/**
- * This class is a factory for Value objects for different types of
- * memebers.
- * Other than some Value implementations classes this class contains static
+ * This class is a factory for Value objects for different types of
+ * memebers.
+ * Other than some Value implementations classes this class contains static
* type conversion methods and factory methods.
- *
- * @see com.sun.star.wizards.ui.event.DataAware.Value
+ *
+ * @see com.sun.star.wizards.ui.event.DataAware.Value
*/
public class DataAwareFields
{
@@ -47,7 +47,7 @@ public class DataAwareFields
/**
* returns a Value Object which sets and gets values
* and converting them to other types, according to the "value" argument.
- *
+ *
* @param owner
* @param fieldname
* @param value
@@ -312,11 +312,11 @@ public class DataAwareFields
if (convertTo.equals(Boolean.class))
{
- return (s != null && !s.equals("") && s.equals("true")) ? Boolean.TRUE : Boolean.FALSE;
+ return (s != null && !s.equals(PropertyNames.EMPTY_STRING) && s.equals("true")) ? Boolean.TRUE : Boolean.FALSE;
}
else if (convertTo.equals(Integer.class))
{
- if (s == null || s.equals(""))
+ if (s == null || s.equals(PropertyNames.EMPTY_STRING))
{
return Any.VOID;
}
@@ -327,7 +327,7 @@ public class DataAwareFields
}
else if (convertTo.equals(Double.class))
{
- if (s == null || s.equals(""))
+ if (s == null || s.equals(PropertyNames.EMPTY_STRING))
{
return Any.VOID;
}
@@ -352,7 +352,7 @@ public class DataAwareFields
{
try
{
- field.set(target, value == null || (value.equals(Any.VOID)) ? "" : value.toString());
+ field.set(target, value == null || (value.equals(Any.VOID)) ? PropertyNames.EMPTY_STRING : value.toString());
}
catch (IllegalAccessException ex)
{
@@ -380,7 +380,7 @@ public class DataAwareFields
{
if (field.getType().equals(String.class))
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
if (field.getType().equals(Short.class))
{
@@ -388,7 +388,7 @@ public class DataAwareFields
}
if (field.getType().equals(Integer.class))
{
- return new Integer(0);
+ return 0;
}
if (field.getType().equals(short[].class))
{
@@ -460,7 +460,7 @@ public class DataAwareFields
}
else if (value instanceof String)
{
- return ((String) value).equals(TRUE);
+ return value.equals(TRUE);
}
else if (value instanceof short[])
{
diff --git a/wizards/com/sun/star/wizards/ui/event/EventNames.java b/wizards/com/sun/star/wizards/ui/event/EventNames.java
index 50aa32dc57aa..ee1a0ace9cdd 100644
--- a/wizards/com/sun/star/wizards/ui/event/EventNames.java
+++ b/wizards/com/sun/star/wizards/ui/event/EventNames.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java b/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java
index b2dc75f22f48..9e3eda9261ff 100644
--- a/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java
+++ b/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,6 +34,7 @@ import com.sun.star.awt.XComboBox;
import com.sun.star.awt.XListBox;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.wizards.common.Helper;
+import com.sun.star.wizards.common.PropertyNames;
/**
* @author rpiterman
@@ -52,7 +53,7 @@ public class ListModelBinder implements ListDataListener
{
if (item == null)
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
else
{
@@ -63,7 +64,7 @@ public class ListModelBinder implements ListDataListener
public ListModelBinder(Object unoListBox, ListModel listModel_)
{
- unoList = (XListBox) UnoRuntime.queryInterface(XListBox.class, unoListBox);
+ unoList = UnoRuntime.queryInterface(XListBox.class, unoListBox);
unoListModel = UnoDataAware.getModel(unoListBox);
setListModel(listModel_);
}
@@ -99,7 +100,7 @@ public class ListModelBinder implements ListDataListener
protected void remove(short i1, short i2)
{
- unoList.removeItems((short) i1, (short) (i2 - i1 + 1));
+ unoList.removeItems(i1, (short) (i2 - i1 + 1));
}
protected void insert(short i)
@@ -119,12 +120,12 @@ public class ListModelBinder implements ListDataListener
protected short[] getSelectedItems()
{
- return (short[]) Helper.getUnoPropertyValue(unoListModel, "SelectedItems");
+ return (short[]) Helper.getUnoPropertyValue(unoListModel, PropertyNames.SELECTED_ITEMS);
}
protected void setSelectedItems(short[] selected)
{
- Helper.setUnoPropertyValue(unoListModel, "SelectedItems", selected);
+ Helper.setUnoPropertyValue(unoListModel, PropertyNames.SELECTED_ITEMS, selected);
}
/* (non-Javadoc)
@@ -138,7 +139,7 @@ public class ListModelBinder implements ListDataListener
insert(i);
/*int insertedItems = lde.getIndex1() - lde.getIndex0() + 1;
-
+
for (int i = 0; i<selected.length; i++)
if (selected[i].intValue() >= lde.getIndex0())
selected[i] = new Short((short)(selected[i].shortValue() + insertedItems));
@@ -161,12 +162,12 @@ public class ListModelBinder implements ListDataListener
if (s>=lde.getIndex0() && s<==lde.getIndex1()) {
selected[i] = null;
removed++;
+ }
}
- }
-
+
Short[] newSelected = (removed > 0 ? new Short[selected.length - removed] : selected;
if (removed>0)
-
+
if (selected[i].intValue() >= lde.getIndex0())
*/
}
@@ -179,8 +180,8 @@ public class ListModelBinder implements ListDataListener
public static void fillList(Object list, Object[] items, Renderer renderer)
{
- XListBox xlist = (XListBox) UnoRuntime.queryInterface(XListBox.class, list);
- Helper.setUnoPropertyValue(UnoDataAware.getModel(list), "StringItemList", new String[]
+ XListBox xlist = UnoRuntime.queryInterface(XListBox.class, list);
+ Helper.setUnoPropertyValue(UnoDataAware.getModel(list), PropertyNames.STRING_ITEM_LIST, new String[]
{
});
for (short i = 0; i < items.length; i++)
@@ -194,8 +195,8 @@ public class ListModelBinder implements ListDataListener
public static void fillComboBox(Object list, Object[] items, Renderer renderer)
{
- XComboBox xComboBox = (XComboBox) UnoRuntime.queryInterface(XComboBox.class, list);
- Helper.setUnoPropertyValue(UnoDataAware.getModel(list), "StringItemList", new String[]
+ XComboBox xComboBox = UnoRuntime.queryInterface(XComboBox.class, list);
+ Helper.setUnoPropertyValue(UnoDataAware.getModel(list), PropertyNames.STRING_ITEM_LIST, new String[]
{
});
for (short i = 0; i < items.length; i++)
diff --git a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java
index 86c50b13ce02..adea073ef3e6 100644
--- a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java
+++ b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,11 +28,10 @@ package com.sun.star.wizards.ui.event;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import com.sun.star.wizards.common.PropertyNames;
/**
* Encapsulate a Method invocation.
- * In the constructor one defines a method, a target object and an optional
+ * In the constructor one defines a method, a target object and an optional
* Parameter.
* Then one calls "invoke", with or without a parameter. <br/>
* Limitations: I do not check anything myself. If the param is not ok, from the
@@ -81,16 +80,14 @@ public class MethodInvocation
}
/**
- * Returns the result of calling the method on the object, or null, if no result.
+ * Returns the result of calling the method on the object, or null, if no result.
*/
public Object invoke(Object param) throws IllegalAccessException, InvocationTargetException
{
if (mWithParam)
{
- return mMethod.invoke(mObject, new Object[]
- {
- (Object) param
- });
+ return mMethod.invoke(mObject, (Object) param
+ );
}
else
{
diff --git a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java
index 7dddea572503..72968c91b440 100644
--- a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java
+++ b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,7 +47,7 @@ public class RadioDataAware extends DataAware
radioButtons = new XRadioButton[radioButs.length];
for (int i = 0; i < radioButs.length; i++)
{
- radioButtons[i] = (XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, radioButs[i]);
+ radioButtons[i] = UnoRuntime.queryInterface(XRadioButton.class, radioButs[i]);
}
}
@@ -89,7 +89,7 @@ public class RadioDataAware extends DataAware
{
final RadioDataAware da = new RadioDataAware(data,
field
- ? DataAwareFields.getFieldValueFor(data, dataProp, new Integer(0))
+ ? DataAwareFields.getFieldValueFor(data, dataProp, 0)
: new DataAware.PropertyValue(dataProp, data), buttons);
XItemListener xil = UnoDataAware.itemListener(da, listener);
for (int i = 0; i < da.radioButtons.length; i++)
diff --git a/wizards/com/sun/star/wizards/ui/event/SimpleDataAware.java b/wizards/com/sun/star/wizards/ui/event/SimpleDataAware.java
index 8a9c2200d76d..8df7059f6a58 100644
--- a/wizards/com/sun/star/wizards/ui/event/SimpleDataAware.java
+++ b/wizards/com/sun/star/wizards/ui/event/SimpleDataAware.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,10 +69,10 @@ public class SimpleDataAware extends DataAware
return (Boolean)value;
else if (value.getClass().isArray())
return ((short[])value).length != 0 ? Boolean.TRUE : Boolean.FALSE;
- else if (value.equals("")) return Boolean.FALSE;
+ else if (value.equals(PropertyNames.EMPTY_STRING)) return Boolean.FALSE;
else return Boolean.TRUE;
}
-
+
public void disableControls(Object[] controls) {
disableObjects = controls;
}
diff --git a/wizards/com/sun/star/wizards/ui/event/Task.java b/wizards/com/sun/star/wizards/ui/event/Task.java
index 16feacd5e1fa..1d67ecb956c6 100644
--- a/wizards/com/sun/star/wizards/ui/event/Task.java
+++ b/wizards/com/sun/star/wizards/ui/event/Task.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/ui/event/TaskEvent.java b/wizards/com/sun/star/wizards/ui/event/TaskEvent.java
index 1c54cfea2fa6..af840c3b4bb4 100644
--- a/wizards/com/sun/star/wizards/ui/event/TaskEvent.java
+++ b/wizards/com/sun/star/wizards/ui/event/TaskEvent.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/ui/event/TaskListener.java b/wizards/com/sun/star/wizards/ui/event/TaskListener.java
index 114747c30776..cfbc16c9c845 100644
--- a/wizards/com/sun/star/wizards/ui/event/TaskListener.java
+++ b/wizards/com/sun/star/wizards/ui/event/TaskListener.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java
index b8024fb4f9c9..4f8ba8a45040 100644
--- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java
+++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,10 +37,10 @@ import com.sun.star.wizards.common.PropertyNames;
*
* This class suppoprts imple cases where a UI control can
* be directly synchronized with a data property.
- * Such controls are: the different text controls
- * (synchronizing the "Text" , "Value", "Date", "Time" property),
+ * Such controls are: the different text controls
+ * (synchronizing the "Text" , "Value", "Date", "Time" property),
* Checkbox controls, Dropdown listbox controls (synchronizing the
- * SelectedItems[] property.
+ * SelectedItems[] property.
* For those controls, static convenience methods are offered, to simplify use.
*/
public class UnoDataAware extends DataAware
@@ -126,7 +126,7 @@ public class UnoDataAware extends DataAware
{
return ((short[]) value).length != 0 ? Boolean.TRUE : Boolean.FALSE;
}
- else if (value.equals(""))
+ else if (value.equals(PropertyNames.EMPTY_STRING))
{
return Boolean.FALSE;
}
@@ -152,7 +152,7 @@ public class UnoDataAware extends DataAware
private static UnoDataAware attachTextControl(Object data, String prop, Object unoText, final Listener listener, String unoProperty, boolean field, Object value)
{
- XTextComponent text = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, unoText);
+ XTextComponent text = UnoRuntime.queryInterface(XTextComponent.class, unoText);
final UnoDataAware uda = new UnoDataAware(data,
field
? DataAwareFields.getFieldValueFor(data, prop, value)
@@ -179,17 +179,17 @@ public class UnoDataAware extends DataAware
public static UnoDataAware attachEditControl(Object data, String prop, Object unoControl, Listener listener, boolean field)
{
- return attachTextControl(data, prop, unoControl, listener, "Text", field, "");
+ return attachTextControl(data, prop, unoControl, listener, "Text", field, PropertyNames.EMPTY_STRING);
}
public static UnoDataAware attachDateControl(Object data, String prop, Object unoControl, Listener listener, boolean field)
{
- return attachTextControl(data, prop, unoControl, listener, "Date", field, new Integer(0));
+ return attachTextControl(data, prop, unoControl, listener, "Date", field, 0);
}
public static UnoDataAware attachTimeControl(Object data, String prop, Object unoControl, Listener listener, boolean field)
{
- return attachTextControl(data, prop, unoControl, listener, "Time", field, new Integer(0));
+ return attachTextControl(data, prop, unoControl, listener, "Time", field, 0);
}
public static UnoDataAware attachNumericControl(Object data, String prop, Object unoControl, Listener listener, boolean field)
@@ -199,7 +199,7 @@ public class UnoDataAware extends DataAware
public static UnoDataAware attachCheckBox(Object data, String prop, Object checkBox, final Listener listener, boolean field)
{
- XCheckBox xcheckBox = ((XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, checkBox));
+ XCheckBox xcheckBox = UnoRuntime.queryInterface(XCheckBox.class, checkBox);
final UnoDataAware uda = new UnoDataAware(data,
field
? DataAwareFields.getFieldValueFor(data, prop, new Short((short) 0))
@@ -232,26 +232,26 @@ public class UnoDataAware extends DataAware
public static UnoDataAware attachLabel(Object data, String prop, Object label, final Listener listener, boolean field)
{
return new UnoDataAware(data,
- field ? DataAwareFields.getFieldValueFor(data, prop, "")
+ field ? DataAwareFields.getFieldValueFor(data, prop, PropertyNames.EMPTY_STRING)
: new DataAware.PropertyValue(prop, data),
label, PropertyNames.PROPERTY_LABEL);
}
public static UnoDataAware attachListBox(Object data, String prop, Object listBox, final Listener listener, boolean field)
{
- XListBox xListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, listBox);
+ XListBox xListBox = UnoRuntime.queryInterface(XListBox.class, listBox);
final UnoDataAware uda = new UnoDataAware(data,
field
? DataAwareFields.getFieldValueFor(data, prop, new short[0])
: new DataAware.PropertyValue(prop, data),
- listBox, "SelectedItems");
+ listBox, PropertyNames.SELECTED_ITEMS);
xListBox.addItemListener(itemListener(uda, listener));
return uda;
}
public static Object getModel(Object control)
{
- return ((XControl) UnoRuntime.queryInterface(XControl.class, control)).getModel();
+ return UnoRuntime.queryInterface(XControl.class, control).getModel();
}
public static void setEnabled(Object control, boolean enabled)
diff --git a/wizards/com/sun/star/wizards/web/AbstractErrorHandler.java b/wizards/com/sun/star/wizards/web/AbstractErrorHandler.java
index 6a6c5a0c220f..b6a4855673f6 100644
--- a/wizards/com/sun/star/wizards/web/AbstractErrorHandler.java
+++ b/wizards/com/sun/star/wizards/web/AbstractErrorHandler.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,8 +34,8 @@ import com.sun.star.wizards.common.SystemDialog;
/**
* An abstract implementation of ErrorHandler, which
* uses a renderer method geMessageFor(Exception, Object, int, int)
- * (in this class still abstract...)
- * to render the errors, and displays
+ * (in this class still abstract...)
+ * to render the errors, and displays
* error messeges.
*/
public abstract class AbstractErrorHandler implements ErrorHandler
@@ -100,7 +100,7 @@ public abstract class AbstractErrorHandler implements ErrorHandler
/**
* display a message
* @deprecated
- * @param xmsf
+ * @param xmsf
* @param message the message to display
* @param errorType an int constant from the ErrorHandler interface.
* @return
@@ -159,7 +159,7 @@ public abstract class AbstractErrorHandler implements ErrorHandler
/**
* @param errorType
- * @return the Uno attributes for each error type.
+ * @return the Uno attributes for each error type.
*/
private static int getAttributeFor(int errorType)
{
@@ -227,7 +227,7 @@ public abstract class AbstractErrorHandler implements ErrorHandler
* @param ex the exception
* @param arg a free argument
* @param ix a free argument
- * @param type the error type (from the int constants
+ * @param type the error type (from the int constants
* in ErrorHandler interface)
* @return a Strings which will be displayed in the message box,
* and which describes the error, and the needed action from the user.
diff --git a/wizards/com/sun/star/wizards/web/BackgroundsDialog.java b/wizards/com/sun/star/wizards/web/BackgroundsDialog.java
index 70c40fbc6072..56c4876117c2 100644
--- a/wizards/com/sun/star/wizards/web/BackgroundsDialog.java
+++ b/wizards/com/sun/star/wizards/web/BackgroundsDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,6 +33,7 @@ import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.wizards.common.ConfigSet;
import com.sun.star.wizards.common.Configuration;
import com.sun.star.wizards.common.FileAccess;
+import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.common.SystemDialog;
import com.sun.star.wizards.ui.ImageList;
import com.sun.star.wizards.web.data.CGImage;
@@ -88,7 +89,7 @@ public class BackgroundsDialog extends ImageListDialog
/**
* trigered when the user clicks the "other" button.
- * opens a "file open" dialog, adds the selected
+ * opens a "file open" dialog, adds the selected
* image to the list and to the web wizard configuration,
* and then jumps to the new image, selecting it in the list.
* @see add(String)
@@ -106,7 +107,7 @@ public class BackgroundsDialog extends ImageListDialog
}
/**
- * adds the given image to the image list (to the model)
+ * adds the given image to the image list (to the model)
* and to the web wizard configuration.
* @param s
* @return
@@ -127,7 +128,7 @@ public class BackgroundsDialog extends ImageListDialog
{
Object configView = Configuration.getConfigurationRoot(xMSF, FileAccess.connectURLs(WebWizardConst.CONFIG_PATH, "BackgroundImages"), true);
int i = Configuration.getChildrenNames(configView).length + 1;
- Object o = Configuration.addConfigNode(configView, "" + i);
+ Object o = Configuration.addConfigNode(configView, PropertyNames.EMPTY_STRING + i);
Configuration.set(s, "Href", o);
Configuration.commit(configView);
}
@@ -141,9 +142,9 @@ public class BackgroundsDialog extends ImageListDialog
}
/**
- * an ImageList Imagerenderer implemtation.
+ * an ImageList Imagerenderer implemtation.
* The image URL is the object given from the list model.
- * the image name, got from the "render" method is
+ * the image name, got from the "render" method is
* the filename portion of the url.
* @author rpiterman
*
@@ -172,18 +173,18 @@ public class BackgroundsDialog extends ImageListDialog
public String render(Object object)
{
- return object == null ? "" : FileAccess.getPathFilename(fileAccess.getPath((String) object, null));
+ return object == null ? PropertyNames.EMPTY_STRING : FileAccess.getPathFilename(fileAccess.getPath((String) object, null));
}
}
/**
- * This is a list model for the image list of the
+ * This is a list model for the image list of the
* backgrounds dialog.
* It takes the Backgrounds config set as an argument,
* and "parses" it to a list of files:
* It goes through each image in the set, and checks it:
* if it is a directory it lists all image files in this directory.
- * if it is a file, it adds the file to the list.
+ * if it is a file, it adds the file to the list.
* @author rpiterman
*/
private class Model extends DefaultListModel
@@ -272,8 +273,8 @@ public class BackgroundsDialog extends ImageListDialog
/**
* adds the given image url to the list.
- * if and only if it ends with jpg, jpeg or gif
- * (case insensitive)
+ * if and only if it ends with jpg, jpeg or gif
+ * (case insensitive)
* @param filename image url.
*/
private void add(String filename)
diff --git a/wizards/com/sun/star/wizards/web/CallWizard.java b/wizards/com/sun/star/wizards/web/CallWizard.java
index 4fab3ea43bf9..c8bb41012437 100644
--- a/wizards/com/sun/star/wizards/web/CallWizard.java
+++ b/wizards/com/sun/star/wizards/web/CallWizard.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,6 +38,7 @@ import com.sun.star.task.XJob;
import com.sun.star.task.XJobExecutor;
import com.sun.star.uno.Type;
import com.sun.star.wizards.common.Desktop;
+import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.common.Resource;
/**
@@ -53,7 +54,7 @@ public class CallWizard
/**
* Gives a factory for creating the service. This method is called by the
* <code>JavaLoader</code>
- *
+ *
* <p></p>
*
* @param stringImplementationName The implementation name of the component.
@@ -107,7 +108,7 @@ public class CallWizard
*/
public void trigger(String str)
{
- if (str.equalsIgnoreCase("start"))
+ if (str.equalsIgnoreCase(PropertyNames.START))
{
if (webWizard == null)
{
@@ -226,7 +227,7 @@ public class CallWizard
try
{
- byteReturn = ("" + this.hashCode()).getBytes();
+ byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes();
}
catch (Exception exception)
{
@@ -284,7 +285,7 @@ public class CallWizard
{
XMultiServiceFactory xmsf = Desktop.connect(ConnectStr);
CallWizard.WizardImplementation ww = new CallWizard.WizardImplementation(xmsf);
- ww.trigger("start");
+ ww.trigger(PropertyNames.START);
}
catch (Exception exception)
diff --git a/wizards/com/sun/star/wizards/web/ErrorHandler.java b/wizards/com/sun/star/wizards/web/ErrorHandler.java
index f330532a3058..aa9495e5cde0 100644
--- a/wizards/com/sun/star/wizards/web/ErrorHandler.java
+++ b/wizards/com/sun/star/wizards/web/ErrorHandler.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,7 +52,7 @@ public interface ErrorHandler
public static int DEF_YES = VclWindowPeerAttribute.DEF_YES;
public static int DEF_NO = VclWindowPeerAttribute.DEF_NO;
/**
- * Error type for fatal errors which should abort application
+ * Error type for fatal errors which should abort application
* execution. Should actually never be used :-)
*/
public static final int ERROR_FATAL = 0;
@@ -101,7 +101,7 @@ public interface ErrorHandler
*/
public static final int ERROR_WARNING = 8;
/**
- * An error type which just tells the user something
+ * An error type which just tells the user something
* ( like "you look tired! you should take a bath! and so on)
*/
public static final int ERROR_MESSAGE = 9;
diff --git a/wizards/com/sun/star/wizards/web/ExtensionVerifier.java b/wizards/com/sun/star/wizards/web/ExtensionVerifier.java
index 8bc036131b70..2b7158b5ad31 100644
--- a/wizards/com/sun/star/wizards/web/ExtensionVerifier.java
+++ b/wizards/com/sun/star/wizards/web/ExtensionVerifier.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,7 +50,7 @@ public class ExtensionVerifier implements UCB.Verifier
/**
* @return true if the given object is
* a String which does not end with the
- * given extension.
+ * given extension.
*/
public boolean verify(Object object)
{
diff --git a/wizards/com/sun/star/wizards/web/FTPDialog.java b/wizards/com/sun/star/wizards/web/FTPDialog.java
index f958d9016833..4a6b86f85be3 100644
--- a/wizards/com/sun/star/wizards/web/FTPDialog.java
+++ b/wizards/com/sun/star/wizards/web/FTPDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,7 +58,7 @@ import com.sun.star.wizards.common.HelpIds;
/**
* This is the FTP Dialog. <br/>
- * The Dialog enables the user:
+ * The Dialog enables the user:
* (*) entering FTP server and user information.
* (*) testing the connection.
* (*) choosing a directory on the server.
@@ -77,7 +77,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
/**
* A Constant used for the setLabel(int) method to change the
- * status-display. "unknown" is the status when the user first
+ * status-display. "unknown" is the status when the user first
* opens the dialog, or changes the servername/username/password.
*/
private final static int STATUS_UNKONWN = 0;
@@ -125,7 +125,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
*/
private final static String ICON_UNKNOWN = "ftpunknown.gif";
/**
- * The icon url for an icon representing the "connecting" state.
+ * The icon url for an icon representing the "connecting" state.
*/
private final static String ICON_CONNECTING = "ftpconnecting.gif"; //GUI Components as Class members.
//Fixed Line
@@ -153,16 +153,16 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
//Resources Object
private FTPDialogResources resources;
private List dataAware = new Vector();
- public String username = "";
- public String password = "";
+ public String username = PropertyNames.EMPTY_STRING;
+ public String password = PropertyNames.EMPTY_STRING;
/**
* The ftp host name
*/
- public String host = "";
+ public String host = PropertyNames.EMPTY_STRING;
/**
* The ftp directory.
*/
- private String dir = "";
+ private String dir = PropertyNames.EMPTY_STRING;
/**
* the ftp publish object which contains the
* data for this dialog.
@@ -180,7 +180,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
* @param xmsf
* @param p the publishert object that contains the data
* for this dialog
- * @throws Exception
+ * @throws Exception
*/
public FTPDialog(XMultiServiceFactory xmsf, CGPublish p) throws Exception
{
@@ -198,11 +198,11 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
Helper.setUnoPropertyValues(xDialogModel,
new String[]
{
- "Closeable", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Title", PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_CLOSEABLE, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MOVEABLE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- Boolean.TRUE, new Integer(160), HelpIds.getHelpIdString(HID_FTP), Boolean.TRUE, "FTPDialog", new Integer(167), new Integer(82), resources.resFTPDialog_title, new Integer(222)
+ Boolean.TRUE, 160, HelpIds.getHelpIdString(HID_FTP), Boolean.TRUE, "FTPDialog", 167, 82, resources.resFTPDialog_title, 222
});
//add controls to dialog
@@ -235,13 +235,13 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
PROPNAMES_LABEL,
new Object[]
{
- INTEGERS[8], resources.resln1_value, "ln1", INTEGERS[6], INTEGERS[6], new Short((short) 0), new Integer(210)
+ INTEGERS[8], resources.resln1_value, "ln1", INTEGERS[6], INTEGERS[6], new Short((short) 0), 210
});
lblFTPAddress = insertLabel("lblFTPAddress",
PROPNAMES_LABEL,
new Object[]
{
- INTEGERS[8], resources.reslblFTPAddress_value, "lblFTPAddress", INTEGER_12, new Integer(20), new Short((short) 1), new Integer(95)
+ INTEGERS[8], resources.reslblFTPAddress_value, "lblFTPAddress", INTEGER_12, 20, new Short((short) 1), 95
});
txtHost = insertTextField("txtHost", "disconnect",
new String[]
@@ -250,13 +250,13 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID_FTP_SERVER), "txtIP", new Integer(110), new Integer(18), new Short((short) 2), new Integer(106)
+ INTEGER_12, HelpIds.getHelpIdString(HID_FTP_SERVER), "txtIP", 110, 18, new Short((short) 2), 106
});
lblUsername = insertLabel("lblUsername",
PROPNAMES_LABEL,
new Object[]
{
- INTEGERS[8], resources.reslblUsername_value, "lblUsername", INTEGER_12, new Integer(36), new Short((short) 3), new Integer(85)
+ INTEGERS[8], resources.reslblUsername_value, "lblUsername", INTEGER_12, 36, new Short((short) 3), 85
});
txtUsername = insertTextField("txtUsername", "disconnect",
new String[]
@@ -265,13 +265,13 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
},
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID_FTP_USERNAME), "txtUsername", new Integer(110), new Integer(34), new Short((short) 4), new Integer(106)
+ INTEGER_12, HelpIds.getHelpIdString(HID_FTP_USERNAME), "txtUsername", 110, 34, new Short((short) 4), 106
});
lblPassword = insertLabel("lblPassword",
PROPNAMES_LABEL,
new Object[]
{
- INTEGERS[8], resources.reslblPassword_value, "lblPassword", INTEGER_12, new Integer(52), new Short((short) 5), new Integer(85)
+ INTEGERS[8], resources.reslblPassword_value, "lblPassword", INTEGER_12, 52, new Short((short) 5), 85
});
txtPassword = insertTextField("txtPassword", "disconnect",
new String[]
@@ -280,43 +280,43 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
},
new Object[]
{
- new Short((short) 42), INTEGER_12, HelpIds.getHelpIdString(HID_FTP_PASS), "txtPassword", new Integer(110), new Integer(50), new Short((short) 6), new Integer(106)
+ new Short((short) 42), INTEGER_12, HelpIds.getHelpIdString(HID_FTP_PASS), "txtPassword", 110, 50, new Short((short) 6), 106
});
ln2 = insertFixedLine("ln2",
PROPNAMES_LABEL,
new Object[]
{
- INTEGERS[8], resources.resln2_value, "ln2", INTEGERS[6], new Integer(68), new Short((short) 7), new Integer(210)
+ INTEGERS[8], resources.resln2_value, "ln2", INTEGERS[6], 68, new Short((short) 7), 210
});
btnTestConnection = insertButton("btnConnect", "connect",
PROPNAMES_BUTTON,
new Object[]
{
- INTEGER_14, HelpIds.getHelpIdString(HID_FTP_TEST), resources.resbtnConnect_value, "btnConnect", INTEGER_12, new Integer(80), new Short((short) 8), INTEGER_50
+ INTEGER_14, HelpIds.getHelpIdString(HID_FTP_TEST), resources.resbtnConnect_value, "btnConnect", INTEGER_12, 80, new Short((short) 8), INTEGER_50
});
imgStatus = insertImage("imgStatus",
new String[]
{
- "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", "Tabstop", PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", "Tabstop", PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Short((short) 0), INTEGER_14, new Integer(68), new Integer(80), Boolean.FALSE, Boolean.FALSE, INTEGER_14
+ new Short((short) 0), INTEGER_14, 68, 80, Boolean.FALSE, Boolean.FALSE, INTEGER_14
});
lblStatus = insertLabel("lblStatus",
PROPNAMES_LABEL,
new Object[]
{
- INTEGERS[8], resources.resFTPDisconnected, "lblStatus", new Integer(86), new Integer(82), new Short((short) 9), new Integer(99)
+ INTEGERS[8], resources.resFTPDisconnected, "lblStatus", 86, 82, new Short((short) 9), 99
});
ln3 = insertFixedLine("ln3",
PROPNAMES_LABEL,
new Object[]
{
- INTEGERS[8], resources.resln3_value, "ln3", INTEGERS[6], new Integer(100), new Short((short) 10), new Integer(210)
+ INTEGERS[8], resources.resln3_value, "ln3", INTEGERS[6], 100, new Short((short) 10), 210
});
txtDir = insertTextField("txtDir",
@@ -326,34 +326,34 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
},
new Object[]
{
- new Boolean(false), INTEGER_12, HelpIds.getHelpIdString(HID_FTP_TXT_PATH), "txtDir", INTEGER_12, new Integer(113), new Short((short) 11), resources.restxtDir_value, new Integer(184)
+ Boolean.FALSE, INTEGER_12, HelpIds.getHelpIdString(HID_FTP_TXT_PATH), "txtDir", INTEGER_12, 113, new Short((short) 11), resources.restxtDir_value, 184
});
btnDir = insertButton("btnDir", "chooseDirectory",
PROPNAMES_BUTTON,
new Object[]
{
- INTEGER_14, HelpIds.getHelpIdString(HID_FTP_BTN_PATH), resources.resbtnDir_value, "btnDir", new Integer(199), new Integer(112), new Short((short) 12), INTEGER_16
+ INTEGER_14, HelpIds.getHelpIdString(HID_FTP_BTN_PATH), resources.resbtnDir_value, "btnDir", 199, 112, new Short((short) 12), INTEGER_16
});
btnOK = insertButton("btnOK", null,
PROPNAMES_BUTTON2,
new Object[]
{
- INTEGER_14, HelpIds.getHelpIdString(HID_FTP_OK), resources.resbtnOK_value, "btnOK", new Integer(165), new Integer(142), new Short((short) PushButtonType.OK_value), new Short((short) 13), INTEGER_50
+ INTEGER_14, HelpIds.getHelpIdString(HID_FTP_OK), resources.resbtnOK_value, "btnOK", 165, 142, new Short((short) PushButtonType.OK_value), new Short((short) 13), INTEGER_50
});
btnCancel = insertButton("btnCancel",
null, PROPNAMES_BUTTON2,
new Object[]
{
- INTEGER_14, HelpIds.getHelpIdString(HID_FTP_CANCEL), resources.resbtnCancel_value, "btnCancel", new Integer(113), new Integer(142), new Short((short) PushButtonType.CANCEL_value), new Short((short) 14), INTEGER_50
+ INTEGER_14, HelpIds.getHelpIdString(HID_FTP_CANCEL), resources.resbtnCancel_value, "btnCancel", 113, 142, new Short((short) PushButtonType.CANCEL_value), new Short((short) 14), INTEGER_50
});
btnHelp = insertButton("btnHelp", null,
PROPNAMES_BUTTON2,
new Object[]
{
- INTEGER_14, "", resources.resbtnHelp_value, "btnHelp", new Integer(57), new Integer(142), new Short((short) PushButtonType.HELP_value), new Short((short) 15), INTEGER_50
+ INTEGER_14, PropertyNames.EMPTY_STRING, resources.resbtnHelp_value, "btnHelp", 57, 142, new Short((short) PushButtonType.HELP_value), new Short((short) 15), INTEGER_50
});
}
@@ -379,8 +379,8 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
public short execute(UnoDialog parent) throws Exception
{
host = extractHost(publish.cp_URL);
- username = publish.cp_Username == null ? "" : publish.cp_Username;
- password = publish.password == null ? "" : publish.password;
+ username = publish.cp_Username == null ? PropertyNames.EMPTY_STRING : publish.cp_Username;
+ password = publish.password == null ? PropertyNames.EMPTY_STRING : publish.password;
dir = extractDir(publish.cp_URL);
setLabel(STATUS_UNKONWN);
@@ -410,8 +410,8 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
}
/**
- * extract the hostname out of the url used by the
- * publisher. This url does not include the username:password string.
+ * extract the hostname out of the url used by the
+ * publisher. This url does not include the username:password string.
* @param ftpUrl
* @return
*/
@@ -419,7 +419,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
{
if (ftpUrl == null || ftpUrl.length() < 6)
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
String url = ftpUrl.substring(6);
int i = url.indexOf("/");
@@ -469,11 +469,11 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
/**
* @param s
- * @return true if the string is null or "".
+ * @return true if the string is null or PropertyNames.EMPTY_STRING.
*/
private final boolean isEmpty(String s)
{
- return (s == null) || (s.equals(""));
+ return (s == null) || (s.equals(PropertyNames.EMPTY_STRING));
}
/**
@@ -573,7 +573,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
* I get a ucb content.
* I list the files in this content.
* I call the ucb "open" command.
- * I get the "Title" property of this content.
+ * I get the PropertyNames.PROPERTY_TITLE property of this content.
* @param acountUrl
* @throws Exception
*/
@@ -592,7 +592,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
ucb.executeCommand(content, "open", aArg);
//get the title property of the content.
- Object obj = ucb.getContentProperty(content, "Title", String.class);
+ Object obj = ucb.getContentProperty(content, PropertyNames.PROPERTY_TITLE, String.class);
}
@@ -618,7 +618,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
/**
* changes the status label to disconnected status, and
* disables the ok and choose-dir buttons.
- * This method is called also when the hostname, username
+ * This method is called also when the hostname, username
* and passwordtext fields change.
*/
public void disconnect()
@@ -695,7 +695,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
}
/**
- * changes the text of the status label and
+ * changes the text of the status label and
* (TODO) the status image.
* @param label
* @param color
@@ -708,14 +708,11 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
private String imageUrl(String s)
{
- String t = imagesDirectory + s;
- //System.out.println(t);
- return t;
-
+ return imagesDirectory + s;
}
/**
- * called when the user clicks
+ * called when the user clicks
* the choose-dir button. ("...")
* Opens the pickFolder dialog.
* checks if the returned folder is an ftp folder.
@@ -724,7 +721,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
public void chooseDirectory()
{
SystemDialog sd = SystemDialog.createOfficeFolderDialog(xMSF);
- String newUrl = sd.callFolderDialog(resources.resFTPDirectory, "", getFullUrl());
+ String newUrl = sd.callFolderDialog(resources.resFTPDirectory, PropertyNames.EMPTY_STRING, getFullUrl());
if (newUrl != null)
{
/* if the user chose a local directory,
diff --git a/wizards/com/sun/star/wizards/web/FTPDialogResources.java b/wizards/com/sun/star/wizards/web/FTPDialogResources.java
index b9a5fe7548d6..83b12084a6bf 100644
--- a/wizards/com/sun/star/wizards/web/FTPDialogResources.java
+++ b/wizards/com/sun/star/wizards/web/FTPDialogResources.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -65,8 +65,8 @@ public class FTPDialogResources extends Resource
super(xmsf, UNIT_NAME, MODULE_NAME);
/**
- * Delete the String, uncomment the getResText method
- *
+ * Delete the String, uncomment the getResText method
+ *
*/
resFTPDialog_title = getResText(RID_FTPDIALOG_START + 0);
reslblUsername_value = getResText(RID_FTPDIALOG_START + 1);
diff --git a/wizards/com/sun/star/wizards/web/IconsDialog.java b/wizards/com/sun/star/wizards/web/IconsDialog.java
index 6228180a75f4..6dd81289f322 100644
--- a/wizards/com/sun/star/wizards/web/IconsDialog.java
+++ b/wizards/com/sun/star/wizards/web/IconsDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,6 +32,7 @@ import com.sun.star.awt.Size;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.wizards.common.ConfigSet;
import com.sun.star.wizards.common.FileAccess;
+import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.ui.ImageList;
import com.sun.star.wizards.web.data.CGIconSet;
@@ -41,7 +42,7 @@ import com.sun.star.wizards.web.data.CGIconSet;
* This class simulates a model, though it does not functions really as one,
* since it does not cast events.
* It also implements the ImageList.ImageRenderer interface, to handle
- * its own objects.
+ * its own objects.
*/
public class IconsDialog extends ImageListDialog implements ImageList.IImageRenderer, ListModel
{
@@ -79,7 +80,7 @@ public class IconsDialog extends ImageListDialog implements ImageList.IImageRend
resources.resCounter
});
- htmlexpDirectory = FileAccess.getOfficePath(xmsf, "Gallery", "share", "");
+ htmlexpDirectory = FileAccess.getOfficePath(xmsf, "Gallery", "share", PropertyNames.EMPTY_STRING);
set = set_;
objects = new Integer[set.getSize() * icons.length];
for (int i = 0; i < objects.length; i++)
@@ -174,7 +175,7 @@ public class IconsDialog extends ImageListDialog implements ImageList.IImageRend
{
if (object == null)
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
int i = ((Number) object).intValue();
int iset = getIconsetNum(i);
diff --git a/wizards/com/sun/star/wizards/web/ImageListDialog.java b/wizards/com/sun/star/wizards/web/ImageListDialog.java
index df4f4142f858..be1cc6c7668a 100644
--- a/wizards/com/sun/star/wizards/web/ImageListDialog.java
+++ b/wizards/com/sun/star/wizards/web/ImageListDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,7 +47,7 @@ import com.sun.star.wizards.ui.ImageList.Counter;
* The model and the renderer are
* still abstract in this class.
* To use the class one should extend it,
- * in the constructor then set the imageList
+ * in the constructor then set the imageList
* properties (member name il) like image size, grid size,
* model renderer aso, and then call "build".
* This class uses a counter renderer which
@@ -60,9 +60,9 @@ import com.sun.star.wizards.ui.ImageList.Counter;
* so dialogs which do not need those, should set the corresponding
* members showDeselectButton and/or showOtherButton to false.
* <br/>
- * the consturctor should recieve, among others, an Array of String resources - see
+ * the consturctor should recieve, among others, an Array of String resources - see
* constructor documentation for details.
- *
+ *
* @author rpiterman
*/
public abstract class ImageListDialog extends UnoDialog2 implements UIConsts
@@ -96,12 +96,12 @@ public abstract class ImageListDialog extends UnoDialog2 implements UIConsts
private int hid;
/**
- *
+ *
* @param xmsf
* @param resources_ a string array with the following strings :
* dialog title, label text, ok, cancel, help, deselect, other.
- * <br/> if "deselect" and "other" are not displayed,
- * the array can also be shorter. but if "other" is displayed
+ * <br/> if "deselect" and "other" are not displayed,
+ * the array can also be shorter. but if "other" is displayed
* and "deselect" not, both must be there :-(
*/
public ImageListDialog(
@@ -118,7 +118,7 @@ public abstract class ImageListDialog extends UnoDialog2 implements UIConsts
* adds the controls to the dialog, depending on
* the size of the image list.
* This method should be called by subclasses after setting
- * the il ImageList member properties
+ * the il ImageList member properties
*/
protected void build()
{
@@ -133,11 +133,11 @@ public abstract class ImageListDialog extends UnoDialog2 implements UIConsts
Helper.setUnoPropertyValues(xDialogModel,
new String[]
{
- "Closeable", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, "Title", PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_CLOSEABLE, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MOVEABLE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- Boolean.TRUE, new Integer(dialogHeight), HelpIds.getHelpIdString(hid), Boolean.TRUE, "imgDialog", new Integer(59), new Integer(24), INTEGERS[1], resources[RES_TITLE], new Integer(dialogWidth)
+ Boolean.TRUE, new Integer(dialogHeight), HelpIds.getHelpIdString(hid), Boolean.TRUE, "imgDialog", 59, 24, INTEGERS[1], resources[RES_TITLE], new Integer(dialogWidth)
});
//Set member- FontDescriptors...
fontDescriptor1.Weight = 150;
@@ -153,19 +153,19 @@ public abstract class ImageListDialog extends UnoDialog2 implements UIConsts
PROPNAMES,
new Object[]
{
- Boolean.TRUE, INTEGER_14, HelpIds.getHelpIdString(hid + 3), resources[RES_OK], "btnOK", iButtonsX, new Integer(22), new Short((short) com.sun.star.awt.PushButtonType.OK_value), new Short((short) 7), INTEGER_50
+ Boolean.TRUE, INTEGER_14, HelpIds.getHelpIdString(hid + 3), resources[RES_OK], "btnOK", iButtonsX, 22, new Short((short) com.sun.star.awt.PushButtonType.OK_value), new Short((short) 7), INTEGER_50
});
btnCancel = insertButton("btnCancel", null,
PROPNAMES,
new Object[]
{
- Boolean.FALSE, INTEGER_14, HelpIds.getHelpIdString(hid + 4), resources[RES_CANCEL], "btnCancel", iButtonsX, new Integer(41), new Short((short) com.sun.star.awt.PushButtonType.CANCEL_value), new Short((short) 8), INTEGER_50
+ Boolean.FALSE, INTEGER_14, HelpIds.getHelpIdString(hid + 4), resources[RES_CANCEL], "btnCancel", iButtonsX, 41, new Short((short) com.sun.star.awt.PushButtonType.CANCEL_value), new Short((short) 8), INTEGER_50
});
btnHelp = insertButton("btnHelp", null,
PROPNAMES,
new Object[]
{
- Boolean.FALSE, INTEGER_14, "", resources[RES_HELP], "CommandButton3", iButtonsX, new Integer(71), new Short((short) com.sun.star.awt.PushButtonType.HELP_value), new Short((short) 9), INTEGER_50
+ Boolean.FALSE, INTEGER_14, PropertyNames.EMPTY_STRING, resources[RES_HELP], "CommandButton3", iButtonsX, 71, new Short((short) com.sun.star.awt.PushButtonType.HELP_value), new Short((short) 9), INTEGER_50
});
if (showOtherButton)
@@ -200,19 +200,19 @@ public abstract class ImageListDialog extends UnoDialog2 implements UIConsts
il.tabIndex = 1;
il.create(this);
- /*lblContainer = insertLabel("lblContainer",
+ /*lblContainer = insertLabel("lblContainer",
new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH},
- new Object[] { new Integer(176),"lblContainer",new Integer(6),new Integer(17),new Short((short)5),new Integer(214)}
+ new Object[] { 176,"lblContainer",6,17,new Short((short)5),214}
);*/
lblTitle = insertLabel("lblTitle",
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- fontDescriptor1, INTEGERS[8], resources[RES_LABEL], "lblTitle", INTEGERS[6], INTEGERS[6], INTEGERS[1], new Short((short) 4), new Integer(216)
+ fontDescriptor1, INTEGERS[8], resources[RES_LABEL], "lblTitle", INTEGERS[6], INTEGERS[6], INTEGERS[1], new Short((short) 4), 216
});
}
@@ -275,9 +275,9 @@ public abstract class ImageListDialog extends UnoDialog2 implements UIConsts
public String render(Object counter)
{
- String s = JavaTools.replaceSubString(template, "" + ((Counter) counter).start, START);
- s = JavaTools.replaceSubString(s, "" + ((Counter) counter).end, END);
- s = JavaTools.replaceSubString(s, "" + ((Counter) counter).max, TOTAL);
+ String s = JavaTools.replaceSubString(template, PropertyNames.EMPTY_STRING + ((Counter) counter).start, START);
+ s = JavaTools.replaceSubString(s, PropertyNames.EMPTY_STRING + ((Counter) counter).end, END);
+ s = JavaTools.replaceSubString(s, PropertyNames.EMPTY_STRING + ((Counter) counter).max, TOTAL);
return s;
}
}
diff --git a/wizards/com/sun/star/wizards/web/LogTaskListener.java b/wizards/com/sun/star/wizards/web/LogTaskListener.java
index e384e12737cb..2a2f41b33a0e 100644
--- a/wizards/com/sun/star/wizards/web/LogTaskListener.java
+++ b/wizards/com/sun/star/wizards/web/LogTaskListener.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,6 +28,7 @@
package com.sun.star.wizards.web;
+import com.sun.star.wizards.common.PropertyNames;
import java.io.PrintStream;
import com.sun.star.wizards.ui.event.TaskEvent;
@@ -91,7 +92,7 @@ public class LogTaskListener implements TaskListener, ErrorHandler
*/
public boolean error(Exception ex, Object arg, int ix, int i)
{
- System.out.println("" + arg + "//" + ix + "//Exception: " + ex.getLocalizedMessage());
+ System.out.println(PropertyNames.EMPTY_STRING + arg + "//" + ix + "//Exception: " + ex.getLocalizedMessage());
ex.printStackTrace();
return true;
}
diff --git a/wizards/com/sun/star/wizards/web/Process.java b/wizards/com/sun/star/wizards/web/Process.java
index d1ae8e23763e..0fcdef929aee 100644
--- a/wizards/com/sun/star/wizards/web/Process.java
+++ b/wizards/com/sun/star/wizards/web/Process.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,6 +43,7 @@ import org.w3c.dom.Document;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.wizards.common.ConfigSet;
import com.sun.star.wizards.common.FileAccess;
+import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.common.UCB;
import com.sun.star.wizards.ui.event.Task;
import com.sun.star.wizards.web.data.CGContent;
@@ -76,7 +77,7 @@ import com.sun.star.wizards.web.export.Exporter;
* all preparations are done in WWD_Events.finishWizard methods.
* <br/>
* <br/>
- *
+ *
* note on error handling: <br/>
* on "catch" clauses I tries to decide whether the
* exception is fatal or not. For fatal exception an error message
@@ -84,7 +85,7 @@ import com.sun.star.wizards.web.export.Exporter;
* and a false is returned.
* In less-fatal errors, the errorHandler "should decide" which means,
* the user is given the option to "OK" or to "Cancel" and depending
- * on that interaction I cary on.
+ * on that interaction I cary on.
*/
public class Process implements WebWizardConst, ProcessErrors
{
@@ -105,8 +106,8 @@ public class Process implements WebWizardConst, ProcessErrors
private UCB ucb;
public Task myTask;
/**
- * This is a cache for exporters, so I do not need to
- * instanciate the same exporter more than once.
+ * This is a cache for exporters, so I do not need to
+ * instanciate the same exporter more than once.
*/
private Map exporters = new Hashtable(3);
private boolean result;
@@ -131,7 +132,7 @@ public class Process implements WebWizardConst, ProcessErrors
/**
* @return to how many destinations should the
- * generated site be published.
+ * generated site be published.
*/
private int countPublish()
{
@@ -163,13 +164,12 @@ public class Process implements WebWizardConst, ProcessErrors
{
}
int publish = countPublish();
- int taskSteps =
+ return
TASKS_IN_PREPARE +
TASKS_IN_EXPORT + docs * TASKS_PER_DOC +
TASKS_IN_GENERATE + xsl * TASKS_PER_XSL +
TASKS_IN_PUBLISH + publish * TASKS_PER_PUBLISH +
TASKS_IN_FINISHUP;
- return taskSteps;
}
/**
@@ -203,7 +203,7 @@ public class Process implements WebWizardConst, ProcessErrors
if (!result)
{
- myTask.fail(); //this is a bug protection.
+ myTask.fail(); //this is a bug protection.
}
while (myTask.getStatus() < myTask.getMax())
{
@@ -240,8 +240,7 @@ public class Process implements WebWizardConst, ProcessErrors
{
try
{
- String s = FileAccess.getOfficePath(xmsf, "Temp", "", "");
- return s;
+ return FileAccess.getOfficePath(xmsf, "Temp", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING);
}
catch (Exception e)
{
@@ -273,13 +272,13 @@ public class Process implements WebWizardConst, ProcessErrors
// * @return true if should continue
// */
// private boolean cleanup(String dir) {
-//
+//
// boolean success = true;
//
// if (dir != null && fileAccess.exists(dir,false)) {
//
// String[] files = fileAccess.listFiles(dir,true);
-//
+//
// for (int i = 0; i < files.length; i++) {
// if (fileAccess.isDirectory(files[i]))
// success = success && cleanup(files[i]);
@@ -291,7 +290,7 @@ public class Process implements WebWizardConst, ProcessErrors
// return success && fileAccess.delete(dir);
// }
/**
- * This method is used to copy style files to a target
+ * This method is used to copy style files to a target
* Directory: css and background.
* Note that this method is static since it is
* also used when displaying a "preview"
@@ -308,7 +307,7 @@ public class Process implements WebWizardConst, ProcessErrors
//2. background image
String background = settings.cp_DefaultSession.cp_Design.cp_BackgroundImage;
- if (background != null && !background.equals(""))
+ if (background != null && !background.equals(PropertyNames.EMPTY_STRING))
{
sourceDir = FileAccess.getParentDir(background);
filename = background.substring(sourceDir.length());
@@ -319,7 +318,7 @@ public class Process implements WebWizardConst, ProcessErrors
}
/**
- * Copy "static" files (which are always the same,
+ * Copy "static" files (which are always the same,
* thus not user-input-dependant) to a target directory.
* Note that this method is static since it is
* also used when displaying a "preview"
@@ -354,7 +353,7 @@ public class Process implements WebWizardConst, ProcessErrors
catch (Exception ex)
{
//error in copying media
- error(ex, "", ERROR_PUBLISH_MEDIA, ErrorHandler.ERROR_PROCESS_FATAL);
+ error(ex, PropertyNames.EMPTY_STRING, ERROR_PUBLISH_MEDIA, ErrorHandler.ERROR_PROCESS_FATAL);
return false;
}
@@ -427,7 +426,7 @@ public class Process implements WebWizardConst, ProcessErrors
try
{
/*
- * here I create the DOM of the TOC to pass to the XSL
+ * here I create the DOM of the TOC to pass to the XSL
*/
Document doc = (Document) settings.cp_DefaultSession.createDOM();
generate(xmsf, layout, doc, fileAccess, targetDir, task);
@@ -435,11 +434,11 @@ public class Process implements WebWizardConst, ProcessErrors
}
catch (Exception ex)
{
- error(ex, "", ERROR_GENERATE_XSLT, ErrorHandler.ERROR_PROCESS_FATAL);
+ error(ex, PropertyNames.EMPTY_STRING, ERROR_GENERATE_XSLT, ErrorHandler.ERROR_PROCESS_FATAL);
return false;
}
- /* copy files which are not xsl from layout directory to
+ /* copy files which are not xsl from layout directory to
* website root.
*/
try
@@ -507,7 +506,7 @@ public class Process implements WebWizardConst, ProcessErrors
throws Exception
{
/*
- * a map that contains xsl templates. the keys are the xsl file names.
+ * a map that contains xsl templates. the keys are the xsl file names.
*/
Map templates = layout.getTemplates(xmsf);
@@ -519,7 +518,7 @@ public class Process implements WebWizardConst, ProcessErrors
for (Iterator i = templates.keySet().iterator(); i.hasNext();)
{
- String key = "";
+ String key = PropertyNames.EMPTY_STRING;
key = (String) i.next();
@@ -565,7 +564,7 @@ public class Process implements WebWizardConst, ProcessErrors
* In the present situation, where we only use a "flat" list of
* documents, instead of the original plan to use a tree,
* the recursion is not implemented.
- * @param content the content ( directory-like, contains documents)
+ * @param content the content ( directory-like, contains documents)
* @param dir (target directory for exporting this content.
* @param task
* @return true if should continue
@@ -586,7 +585,7 @@ public class Process implements WebWizardConst, ProcessErrors
* faileure here is fatal.
*/
contentDir = fileAccess.createNewDir(dir, content.cp_Name);
- if (contentDir == null || contentDir.equals(""))
+ if (contentDir == null || contentDir.equals(PropertyNames.EMPTY_STRING))
{
throw new IOException("Directory " + dir + " could not be created.");
}
@@ -626,7 +625,7 @@ public class Process implements WebWizardConst, ProcessErrors
}
catch (SecurityException sx)
{
- // nonfatal
+ // nonfatal
if (!error(sx, item, ERROR_EXPORT_SECURITY, ErrorHandler.ERROR_NORMAL_IGNORE))
{
return false;
@@ -674,7 +673,7 @@ public class Process implements WebWizardConst, ProcessErrors
error(ex, doc, ERROR_DOC_VALIDATE, ErrorHandler.ERROR_PROCESS_FATAL);
return false;
}
- //get the exporter specified for this document
+ //get the exporter specified for this document
}
CGExporter exporter = (CGExporter) settings.cp_Exporters.getElement(doc.cp_Exporter);
@@ -683,21 +682,21 @@ public class Process implements WebWizardConst, ProcessErrors
{
/*
- * here I calculate the destination filename.
- * I take the original filename (docFilename), substract the extension, (docExt) -> (fn)
+ * here I calculate the destination filename.
+ * I take the original filename (docFilename), substract the extension, (docExt) -> (fn)
* and find an available filename which starts with
* this filename, but with the new extension. (destExt)
*/
String docFilename = FileAccess.getFilename(doc.cp_URL);
String docExt = FileAccess.getExtension(docFilename);
- String fn = doc.localFilename.substring(0, doc.localFilename.length() - docExt.length() - 1); //filename without extension
+ String fn = doc.localFilename.substring(0, doc.localFilename.length() - docExt.length() - 1); //filename without extension
/*
* the copyExporter does not change
* the extension of the target...
*/
- String destExt = (exporter.cp_Extension.equals("")
+ String destExt = (exporter.cp_Extension.equals(PropertyNames.EMPTY_STRING)
? FileAccess.getExtension(docFilename)
: exporter.cp_Extension);
@@ -711,7 +710,7 @@ public class Process implements WebWizardConst, ProcessErrors
}
/*
- * if two files with the same name
+ * if two files with the same name
* need to be exported ? So here
* i get a new filename, so I do not
* overwrite files...
@@ -734,9 +733,9 @@ public class Process implements WebWizardConst, ProcessErrors
task.advance(true);
}
/*
- * getExporter(..) throws
+ * getExporter(..) throws
* IllegalAccessException, InstantiationException, ClassNotFoundException
- * export() throws Exception
+ * export() throws Exception
*/
catch (Exception ex)
{
@@ -762,7 +761,7 @@ public class Process implements WebWizardConst, ProcessErrors
/**
* submit an error.
- * @param ex the exception
+ * @param ex the exception
* @param arg1 error argument
* @param arg2 error argument 2
* @param errType error type
@@ -789,7 +788,7 @@ public class Process implements WebWizardConst, ProcessErrors
}
/**
- * creates an instance of the exporter class
+ * creates an instance of the exporter class
* as specified by the
* exporter object.
* @param export specifies the exporter to be created
@@ -811,7 +810,7 @@ public class Process implements WebWizardConst, ProcessErrors
/**
* searches the an exporter for the given CGExporter object
* in the cache.
- * If its not there, creates it, stores it in the cache and
+ * If its not there, creates it, stores it in the cache and
* returns it.
* @param export specifies the needed exporter.
* @return an Exporter instance
diff --git a/wizards/com/sun/star/wizards/web/ProcessErrorHandler.java b/wizards/com/sun/star/wizards/web/ProcessErrorHandler.java
index 96106986515c..75f08ed9068c 100644
--- a/wizards/com/sun/star/wizards/web/ProcessErrorHandler.java
+++ b/wizards/com/sun/star/wizards/web/ProcessErrorHandler.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/ProcessErrors.java b/wizards/com/sun/star/wizards/web/ProcessErrors.java
index ca6da968654f..e3fb9f627080 100644
--- a/wizards/com/sun/star/wizards/web/ProcessErrors.java
+++ b/wizards/com/sun/star/wizards/web/ProcessErrors.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/ProcessStatusRenderer.java b/wizards/com/sun/star/wizards/web/ProcessStatusRenderer.java
index 3fa3726f2e8f..4cbfde68194c 100644
--- a/wizards/com/sun/star/wizards/web/ProcessStatusRenderer.java
+++ b/wizards/com/sun/star/wizards/web/ProcessStatusRenderer.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,7 +34,7 @@ import com.sun.star.wizards.common.IRenderer;
/**
* @author rpiterman
* recieves status calls from the status dialog which
- * apears when the user clicks "create".
+ * apears when the user clicks "create".
* allocates strings from the resources to
* display the current task status.
* (renders the state to resource strings)
diff --git a/wizards/com/sun/star/wizards/web/StatusDialog.java b/wizards/com/sun/star/wizards/web/StatusDialog.java
index c765e2410312..63a67b78585c 100644
--- a/wizards/com/sun/star/wizards/web/StatusDialog.java
+++ b/wizards/com/sun/star/wizards/web/StatusDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -84,11 +84,11 @@ public class StatusDialog extends UnoDialog2 implements TaskListener
Helper.setUnoPropertyValues(xDialogModel,
new String[]
{
- "Closeable", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, "Title", PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_CLOSEABLE, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MOVEABLE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- Boolean.FALSE, new Integer(6 + 25 + (b ? 27 : 7)), hid, Boolean.TRUE, "StatusDialog", new Integer(102), new Integer(52), new Integer(0), res[0], new Integer(width)
+ Boolean.FALSE, new Integer(6 + 25 + (b ? 27 : 7)), hid, Boolean.TRUE, "StatusDialog", 102, 52, 0, res[0], new Integer(width)
});
short tabstop = 1;
@@ -100,7 +100,7 @@ public class StatusDialog extends UnoDialog2 implements TaskListener
},
new Object[]
{
- new Integer(8), taskName, new Integer(6), new Integer(6), new Short(tabstop++), new Integer(width * 2 / 3)
+ 8, taskName, 6, 6, new Short(tabstop++), new Integer(width * 2 / 3)
});
lblCounter = insertLabel("lblCounter",
new String[]
@@ -109,7 +109,7 @@ public class StatusDialog extends UnoDialog2 implements TaskListener
},
new Object[]
{
- new Integer(8), "", new Integer(width * 2 / 3), new Integer(6), new Short(tabstop++), new Integer(width / 3 - 4)
+ 8, PropertyNames.EMPTY_STRING, new Integer(width * 2 / 3), 6, new Short(tabstop++), new Integer(width / 3 - 4)
});
progressBar = insertProgressBar("progress",
new String[]
@@ -118,7 +118,7 @@ public class StatusDialog extends UnoDialog2 implements TaskListener
},
new Object[]
{
- new Integer(10), new Integer(6), new Integer(16), new Short(tabstop++), new Integer(width - 12)
+ 10, 6, 16, new Short(tabstop++), new Integer(width - 12)
});
@@ -131,7 +131,7 @@ public class StatusDialog extends UnoDialog2 implements TaskListener
},
new Object[]
{
- new Integer(14), res[1], new Integer(width / 2 - 20), new Integer(6 + 25 + 7), new Short(tabstop++), new Integer(40)
+ 14, res[1], new Integer(width / 2 - 20), new Integer(6 + 25 + 7), new Short(tabstop++), 40
});
}
@@ -223,7 +223,7 @@ public class StatusDialog extends UnoDialog2 implements TaskListener
}
/**
- * changes the displayed text.
+ * changes the displayed text.
* A renderer is used to render
* the task's subtask name to a resource string.
*/
@@ -245,7 +245,7 @@ public class StatusDialog extends UnoDialog2 implements TaskListener
try
{
this.parent = parent_;
- Helper.setUnoPropertyValue(this.xDialogModel, "Title", title);
+ Helper.setUnoPropertyValue(this.xDialogModel, PropertyNames.PROPERTY_TITLE, title);
try
{
//TODO change this to another execute dialog method.
@@ -297,7 +297,7 @@ public class StatusDialog extends UnoDialog2 implements TaskListener
/**
* sets a method to be invoced when the
- *
+ *
*/
public void setFinishedMethod(MethodInvocation mi)
{
diff --git a/wizards/com/sun/star/wizards/web/StylePreview.java b/wizards/com/sun/star/wizards/web/StylePreview.java
index 93507929d84b..f078121e6586 100644
--- a/wizards/com/sun/star/wizards/web/StylePreview.java
+++ b/wizards/com/sun/star/wizards/web/StylePreview.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,14 +28,15 @@ package com.sun.star.wizards.web;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.wizards.common.FileAccess;
+import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.web.data.CGStyle;
/**
* @author rpiterman
- * the style preview, which is a OOo Document Preview in
+ * the style preview, which is a OOo Document Preview in
* an Image Control.
* This class copies the files needed for this
- * preview from the web wizard work directory
+ * preview from the web wizard work directory
* to a given temporary directory, and updates them
* on request, according to the current style/background selection
* of the user.
@@ -48,7 +49,7 @@ public class StylePreview
* the destination html url.
*/
public String htmlFilename;
- /**
+ /**
* the destination css url
*/
private String cssFilename;
@@ -67,7 +68,7 @@ public class StylePreview
/**
* copies the html file to the temp directory, and calculates the
- * destination names of the background and css files.
+ * destination names of the background and css files.
* @param wwRoot is the root directory of the web wizard files (
* usually [oo]/share/template/[lang]/wizard/web
*/
@@ -98,7 +99,7 @@ public class StylePreview
String css = FileAccess.connectURLs(wwRoot, "styles/" + style.cp_CssHref);
- if (background == null || background.equals(""))
+ if (background == null || background.equals(PropertyNames.EMPTY_STRING))
{
//delete the background image
if (fileAccess.exists(backgroundFilename, false))
@@ -113,7 +114,7 @@ public class StylePreview
//copy the background image to the temp directory.
fileAccess.copy(background, backgroundFilename);
}
- //copy the actual css to the temp directory
+ //copy the actual css to the temp directory
fileAccess.copy(css, cssFilename);
}
@@ -137,7 +138,7 @@ public class StylePreview
*/
private String createTempDir(XMultiServiceFactory xmsf) throws Exception
{
- String tempPath = FileAccess.getOfficePath(xmsf, "Temp", "", "");
+ String tempPath = FileAccess.getOfficePath(xmsf, "Temp", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING);
String s = fileAccess.createNewDir(tempPath, "wwiz");
fileAccess.createNewDir(s, "images");
return s;
diff --git a/wizards/com/sun/star/wizards/web/TOCPreview.java b/wizards/com/sun/star/wizards/web/TOCPreview.java
index 1fb70a11d4b5..f16bbf20f85c 100644
--- a/wizards/com/sun/star/wizards/web/TOCPreview.java
+++ b/wizards/com/sun/star/wizards/web/TOCPreview.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,6 +35,7 @@ import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.util.URL;
import com.sun.star.wizards.common.Desktop;
import com.sun.star.wizards.common.FileAccess;
+import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.common.UCB;
import com.sun.star.wizards.ui.event.Task;
import com.sun.star.wizards.web.data.CGLayout;
@@ -44,12 +45,12 @@ import com.sun.star.wizards.web.data.CGSettings;
* @author rpiterman
* This class both copies necessary files to
* a temporary directory, generates a temporary TOC page,
- * and opens the generated html document in a web browser,
+ * and opens the generated html document in a web browser,
* by default "index.html" (unchangeable).
* <br/>
- * Since the files are both static and dynamic (some are always the same,
- * while other change according to user choices)
- * I divide this tasks to two: all necessary
+ * Since the files are both static and dynamic (some are always the same,
+ * while other change according to user choices)
+ * I divide this tasks to two: all necessary
* static files, which should not regularily update are copied upon
* instanciation.
* The TOC is generated in refresh(...);
@@ -69,9 +70,9 @@ public class TOCPreview
/**
* @param xmsf_
- * @param settings web wizard settings
- * @param res resources
- * @param tempDir_ destination
+ * @param settings web wizard settings
+ * @param res resources
+ * @param tempDir_ destination
* @throws Exception
*/
public TOCPreview(XMultiServiceFactory xmsf_, CGSettings settings, WebWizardDialogResources res, String tempDir_, XFrame _xFrame)
@@ -101,16 +102,16 @@ public class TOCPreview
{
Document doc = (Document) settings.cp_DefaultSession.createDOM();
CGLayout layout = settings.cp_DefaultSession.getLayout();
- Task task = new Task("", "", 10000);
+ Task task = new Task(PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, 10000);
Process.generate(xmsf, layout, doc, fileAccess, tempDir, task);
Process.copyLayoutFiles(ucb, fileAccess, settings, layout, tempDir);
- xDispatch.dispatch(openHyperlink, loadArgs); //Dispatch.dispatch(openHyperlink, loadArgs);
+ xDispatch.dispatch(openHyperlink, loadArgs); //Dispatch.dispatch(openHyperlink, loadArgs);
}
private PropertyValue[] loadArgs(String url)
{
PropertyValue pv = new PropertyValue();
- pv.Name = "URL";
+ pv.Name = PropertyNames.URL;
pv.Value = url;
return new PropertyValue[]
{
diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.java b/wizards/com/sun/star/wizards/web/WWD_Events.java
index 26f518c4e6c8..e89ad2634876 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Events.java
+++ b/wizards/com/sun/star/wizards/web/WWD_Events.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,7 +59,7 @@ import com.sun.star.wizards.web.data.CGSessionName;
* not much application-logic here - just plain
* methods which react to events.
* The only exception are the finish methods with the save
- * session methods.
+ * session methods.
*/
public abstract class WWD_Events extends WWD_Startup
{
@@ -67,10 +67,10 @@ public abstract class WWD_Events extends WWD_Startup
private static final short[] EMPTY_SHORT_ARRAY = new short[0];
/**
* Tracks the current loaded session.
- * If "" - it means the current session is the default one (empty)
+ * If PropertyNames.EMPTY_STRING - it means the current session is the default one (empty)
* If a session is loaded, this will be the name of the loaded session.
*/
- protected String currentSession = "";
+ protected String currentSession = PropertyNames.EMPTY_STRING;
/**
* He - my constructor !
@@ -81,11 +81,11 @@ public abstract class WWD_Events extends WWD_Startup
{
super(xmsf);
Create c = new Create();
- XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, chkFTP);
+ XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, chkFTP);
xWindow.addKeyListener(c);
- xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, chkLocalDir);
+ xWindow = UnoRuntime.queryInterface(XWindow.class, chkLocalDir);
xWindow.addKeyListener(c);
- xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, chkZip);
+ xWindow = UnoRuntime.queryInterface(XWindow.class, chkZip);
xWindow.addKeyListener(c);
}
@@ -106,11 +106,11 @@ public abstract class WWD_Events extends WWD_Startup
{
if ((old == 1))
{
- String sessionToLoad = "";
- short[] s = (short[]) Helper.getUnoPropertyValue(getModel(lstLoadSettings), "SelectedItems");
+ String sessionToLoad = PropertyNames.EMPTY_STRING;
+ short[] s = (short[]) Helper.getUnoPropertyValue(getModel(lstLoadSettings), PropertyNames.SELECTED_ITEMS);
if (s.length == 0 || s[0] == 0)
{
- sessionToLoad = "";
+ sessionToLoad = PropertyNames.EMPTY_STRING;
}
else
{
@@ -126,7 +126,7 @@ public abstract class WWD_Events extends WWD_Startup
}
}
- /* *********************************
+ /* *********************************
* STEP 1
*/
/**
@@ -135,7 +135,7 @@ public abstract class WWD_Events extends WWD_Startup
*/
public void sessionSelected()
{
- short[] s = (short[]) Helper.getUnoPropertyValue(getModel(lstLoadSettings), "SelectedItems");
+ short[] s = (short[]) Helper.getUnoPropertyValue(getModel(lstLoadSettings), PropertyNames.SELECTED_ITEMS);
setEnabled(btnDelSession, s.length > 0 && s[0] > 0);
}
@@ -148,18 +148,18 @@ public abstract class WWD_Events extends WWD_Startup
{
final StatusDialog sd = getStatusDialog();
- final Task task = new Task("LoadDocs", "", 10);
+ final Task task = new Task("LoadDocs", PropertyNames.EMPTY_STRING, 10);
sd.execute(this, task, resources.resLoadingSession);
task.start();
setSelectedDoc(EMPTY_SHORT_ARRAY);
- Helper.setUnoPropertyValue(getModel(lstDocuments), "SelectedItems", EMPTY_SHORT_ARRAY);
- Helper.setUnoPropertyValue(getModel(lstDocuments), "StringItemList", EMPTY_STRING_ARRAY);
+ Helper.setUnoPropertyValue(getModel(lstDocuments), PropertyNames.SELECTED_ITEMS, EMPTY_SHORT_ARRAY);
+ Helper.setUnoPropertyValue(getModel(lstDocuments), PropertyNames.STRING_ITEM_LIST, EMPTY_STRING_ARRAY);
Object view = null;
- if (sessionToLoad.equals(""))
+ if (sessionToLoad.equals(PropertyNames.EMPTY_STRING))
{
view = Configuration.getConfigurationRoot(xMSF, CONFIG_PATH + "/DefaultSession", false);
}
@@ -175,7 +175,7 @@ public abstract class WWD_Events extends WWD_Startup
task.setMax(session.cp_Content.cp_Documents.getSize() * 5 + 7);
task.advance(true);
- if (sessionToLoad.equals(""))
+ if (sessionToLoad.equals(PropertyNames.EMPTY_STRING))
{
setSaveSessionName(session);
}
@@ -212,7 +212,7 @@ public abstract class WWD_Events extends WWD_Startup
*/
public void delSession()
{
- short[] selected = (short[]) Helper.getUnoPropertyValue(getModel(lstLoadSettings), "SelectedItems");
+ short[] selected = (short[]) Helper.getUnoPropertyValue(getModel(lstLoadSettings), PropertyNames.SELECTED_ITEMS);
if (selected.length == 0)
{
return;
@@ -239,7 +239,7 @@ public abstract class WWD_Events extends WWD_Startup
{
(short) 0
};
- // We try to select the same item index again, if possible
+ // We try to select the same item index again, if possible
if (settings.cp_SavedSessions.getSize() > selected[0])
{
nextSelected[0] = selected[0];
@@ -254,7 +254,7 @@ public abstract class WWD_Events extends WWD_Startup
{
Helper.setUnoPropertyValue(getModel(btnDelSession), PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); // select...
}
- Helper.setUnoPropertyValue(getModel(lstLoadSettings), "SelectedItems", nextSelected);
+ Helper.setUnoPropertyValue(getModel(lstLoadSettings), PropertyNames.SELECTED_ITEMS, nextSelected);
//ListModelBinder.fillComboBox(cbSaveSettings, settings.savedSessions.items(), null);
@@ -292,7 +292,7 @@ public abstract class WWD_Events extends WWD_Startup
* when the user clicks another document
* in the listbox, this method is called,
* and couses the display in
- * the textboxes title,description, author and export format
+ * the textboxes title,description, author and export format
* to change
*/
public void setSelectedDoc(short[] s)
@@ -303,14 +303,14 @@ public abstract class WWD_Events extends WWD_Startup
if (doc == null)
{
fillExportList(EMPTY_STRING_ARRAY);
- //I try to avoid refreshing the export list if
+ //I try to avoid refreshing the export list if
//the same type of document is chosen.
}
else if (oldDoc == null || (!oldDoc.appType.equals(doc.appType)))
{
fillExportList(settings.getExporters(doc.appType));
}
- else; // do nothing
+
selectedDoc = s;
@@ -332,7 +332,7 @@ public abstract class WWD_Events extends WWD_Startup
{
return;
}
- final Task task = new Task("", "", files.length * 5);
+ final Task task = new Task(PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, files.length * 5);
/*
* If more than a certain number
@@ -349,8 +349,8 @@ public abstract class WWD_Events extends WWD_Startup
task.removeTaskListener(sd);
}
/*
- * When adding a single document, do not use a
- * status dialog...
+ * When adding a single document, do not use a
+ * status dialog...
*/
else
{
@@ -455,7 +455,7 @@ public abstract class WWD_Events extends WWD_Startup
{
if (background == null)
{
- background = "";
+ background = PropertyNames.EMPTY_STRING;
}
settings.cp_DefaultSession.cp_Design.cp_BackgroundImage = (String) background;
refreshStylePreview();
@@ -526,7 +526,7 @@ public abstract class WWD_Events extends WWD_Startup
}
/**
- * updates the ui of a certain publisher
+ * updates the ui of a certain publisher
* (the text box url)
* @param number
*/
@@ -543,7 +543,7 @@ public abstract class WWD_Events extends WWD_Startup
*/
public void setPublishLocalDir()
{
- String dir = showFolderDialog("Local destination directory", "", settings.cp_DefaultSession.cp_OutDirectory);
+ String dir = showFolderDialog("Local destination directory", PropertyNames.EMPTY_STRING, settings.cp_DefaultSession.cp_OutDirectory);
//if ok was pressed...
setPublishUrl(LOCAL_PUBLISHER, dir, 0);
@@ -633,7 +633,7 @@ public abstract class WWD_Events extends WWD_Startup
if (p.cp_Publish)
{
String path = getFileAccess().getPath(p.url, null);
- // target exists?
+ // target exists?
if (getFileAccess().exists(p.url, false))
{
//if its a directory
@@ -661,7 +661,7 @@ public abstract class WWD_Events extends WWD_Startup
}
}
else
- {//not a directory, but still exists
+ {//not a directory, but still exists
String message = JavaTools.replaceSubString(resources.resLocalTargetExistsAsfile,
path, "%FILENAME");
AbstractErrorHandler.showMessage(xMSF, xControl.getPeer(), message, ErrorHandler.ERROR_PROCESS_FATAL);
@@ -713,7 +713,7 @@ public abstract class WWD_Events extends WWD_Startup
{
String path = getFileAccess().getPath(p.cp_URL, null);
- // target exists?
+ // target exists?
if (getFileAccess().exists(p.cp_URL, false))
{
//if its a directory
@@ -726,7 +726,7 @@ public abstract class WWD_Events extends WWD_Startup
return false;
}
else
- {//not a directory, but still exists ( a file...)
+ {//not a directory, but still exists ( a file...)
if (!p.overwriteApproved)
{
String message = JavaTools.replaceSubString(resources.resZipTargetExists,
@@ -751,7 +751,7 @@ public abstract class WWD_Events extends WWD_Startup
String path = getFileAccess().getPath(p.cp_URL, null);
- // target exists?
+ // target exists?
if (getFileAccess().exists(p.url, false))
{
//if its a directory
@@ -898,15 +898,15 @@ public abstract class WWD_Events extends WWD_Startup
}
else
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
}
/**
- * this method will be called when the Status Dialog
- * is hidden.
+ * this method will be called when the Status Dialog
+ * is hidden.
* It checks if the "Process" was successfull, and if so,
- * it closes the wizard dialog.
+ * it closes the wizard dialog.
*/
public void finishWizardFinished()
{
@@ -951,7 +951,7 @@ public abstract class WWD_Events extends WWD_Startup
* @param exitOnCreate_ should the wizard close after
* a successfull create.
* Default is true,
- * I have a hidden feature which enables false here
+ * I have a hidden feature which enables false here
*/
public void finishWizard(boolean exitOnCreate_)
{
@@ -965,7 +965,7 @@ public abstract class WWD_Events extends WWD_Startup
*/
final CGPublish p = getPublisher(FTP_PUBLISHER);
// if ftp is checked, and no proxies are set, and password is empty...
- if (p.cp_Publish && (!proxies) && (p.password == null || p.password.equals("")))
+ if (p.cp_Publish && (!proxies) && (p.password == null || p.password.equals(PropertyNames.EMPTY_STRING)))
{
if (showFTPDialog(p))
{
@@ -984,7 +984,7 @@ public abstract class WWD_Events extends WWD_Startup
* this method is only called
* if ftp-password was eather set, or
* the user entered one in the FTP Dialog which
- * popped up when clicking "Create".
+ * popped up when clicking "Create".
*
*/
private void finishWizard2()
@@ -1036,7 +1036,7 @@ public abstract class WWD_Events extends WWD_Startup
}
else
{
- settings.cp_LastSavedSession = "";
+ settings.cp_LastSavedSession = PropertyNames.EMPTY_STRING;
}
try
{
@@ -1053,7 +1053,7 @@ public abstract class WWD_Events extends WWD_Startup
/*
* again, if proxies are on, I disable ftp before the creation process
- * starts.
+ * starts.
*/
if (proxies)
{
@@ -1135,7 +1135,7 @@ public abstract class WWD_Events extends WWD_Startup
}
/**
- * is called on the WindowHidden event,
+ * is called on the WindowHidden event,
* deletes the temporary directory.
*/
public void cleanup()
@@ -1204,7 +1204,7 @@ public abstract class WWD_Events extends WWD_Startup
//if (xCloseable != null)
// xCloseable.close(false);
- XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, myFrame);
+ XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, myFrame);
if (xCloseable != null)
{
xCloseable.close(false);
@@ -1241,13 +1241,13 @@ public abstract class WWD_Events extends WWD_Startup
// where the documents are added to in the list (offset)
int offset = (getSelectedDoc().length > 0 ? selectedDoc[0] + 1 : getDocsCount());
- /* if the user chose one file, the list starts at 0,
+ /* if the user chose one file, the list starts at 0,
* if he chose more than one, the first entry is a directory name,
* all the others are filenames.
*/
int start = (files.length > 1 ? 1 : 0);
/*
- * Number of documents failed to validate.
+ * Number of documents failed to validate.
*/
int failed = 0;
@@ -1301,6 +1301,6 @@ public abstract class WWD_Events extends WWD_Startup
task.advance(false);
}
}
- };
+ }
}
diff --git a/wizards/com/sun/star/wizards/web/WWD_General.java b/wizards/com/sun/star/wizards/web/WWD_General.java
index fd716e1b9c06..2c9e40f03362 100644
--- a/wizards/com/sun/star/wizards/web/WWD_General.java
+++ b/wizards/com/sun/star/wizards/web/WWD_General.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -64,7 +64,7 @@ public abstract class WWD_General extends WebWizardDialog
StatusDialog statusDialog = new StatusDialog(xMSF, StatusDialog.STANDARD_WIDTH, resources.resLoadingSession, false, new String[]
{
- resources.prodName, "", "", "", "", ""
+ resources.prodName, PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING
}, HelpIds.getHelpIdString(HID0_STATUS_DIALOG));
try
{
@@ -88,7 +88,7 @@ public abstract class WWD_General extends WebWizardDialog
}
/*
- * File Dialog methods
+ * File Dialog methods
*/
protected SystemDialog getDocAddDialog()
{
@@ -100,7 +100,7 @@ public abstract class WWD_General extends WebWizardDialog
docAddDialog.addFilter(
JavaTools.replaceSubString(f.cp_Name, resources.prodName, "%PRODNAME"), f.cp_Filter, i == 0);
}
- //docAddDialog.addFilter(resources.resSODocs, "*.oxt;*.sxw;*.sxc;*.sxd;*.sxi;*.sdw;*.sdc;*.sdd;*.sdi;*.sda;*.sdp" ,true);
+ //docAddDialog.addFilter(resources.resSODocs, "*.oxt;*.sxw;*.sxc;*.sxd;*.sxi;*.sdw;*.sdc;*.sdd;*.sdi;*.sda;*.sdp" ,true);
//docAddDialog.addFilter(resources.resMSDocs, "*.doc;*.xls;*.ppt;*.pps",false);
//docAddDialog.addFilter(resources.resImages, "*.jpg;*.gif;*.png;*.bmp;*.tiff;*.jpeg;*.jpe",false);
//docAddDialog.addFilter(resources.resAllFiles,"*.*",false);
@@ -161,7 +161,7 @@ public abstract class WWD_General extends WebWizardDialog
}
/**
- * returns the document specified
+ * returns the document specified
* by the given short array.
* @param s
* @return
@@ -201,8 +201,8 @@ public abstract class WWD_General extends WebWizardDialog
}
/**
- * returns a publisher object for the given name
- * @param name one of the WebWizardConst constants : FTP
+ * returns a publisher object for the given name
+ * @param name one of the WebWizardConst constants : FTP
* @return
*/
protected CGPublish getPublisher(String name)
@@ -255,7 +255,7 @@ public abstract class WWD_General extends WebWizardDialog
{
return;
/*
- * disbale steps 3-7
+ * disbale steps 3-7
*/
}
for (int i = 3; i < 8; i++)
@@ -263,7 +263,7 @@ public abstract class WWD_General extends WebWizardDialog
setStepEnabled(i, enabled, true);
/* in this place i just disable the finish button.
* later, in the checkPublish, which is only performed if
- * this one is true, it will be enabled (if the check
+ * this one is true, it will be enabled (if the check
* is positive)
*/
}
@@ -302,7 +302,7 @@ public abstract class WWD_General extends WebWizardDialog
public boolean checkSaveSession()
{
return (!isSaveSession() ||
- !getSessionSaveName().equals(""));
+ !getSessionSaveName().equals(PropertyNames.EMPTY_STRING));
}
@@ -317,7 +317,7 @@ public abstract class WWD_General extends WebWizardDialog
if (p.cp_Publish)
{
String url = (String) Helper.getUnoPropertyValue(getModel(text), property);
- if ((url == null) || (url.equals("")))
+ if ((url == null) || (url.equals(PropertyNames.EMPTY_STRING)))
{
throw new IllegalArgumentException();
}
@@ -333,9 +333,9 @@ public abstract class WWD_General extends WebWizardDialog
}
/**
- *
+ *
* @return false either if publishing input is wrong or there
- * are no publishing targets chosen. returns true when at least
+ * are no publishing targets chosen. returns true when at least
* one target is chosen, *and* all
* which are chosen are legal.
* If proxies are on, ftp publisher is ignored.
@@ -354,7 +354,7 @@ public abstract class WWD_General extends WebWizardDialog
/**
* This method checks if the publishing
- * input is ok, and enables and disables
+ * input is ok, and enables and disables
* the 'create' button.
* public because it is called from
* an event listener object.
@@ -376,8 +376,8 @@ public abstract class WWD_General extends WebWizardDialog
}
/**
- * substitutes path variables with the corresponding values.
- * @param path a path, which might contain OOo path variables.
+ * substitutes path variables with the corresponding values.
+ * @param path a path, which might contain OOo path variables.
* @return the path, after substituing path variables.
*/
protected String substitute(String path)
diff --git a/wizards/com/sun/star/wizards/web/WWD_Startup.java b/wizards/com/sun/star/wizards/web/WWD_Startup.java
index 2a250c84c266..e36051cf43a6 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Startup.java
+++ b/wizards/com/sun/star/wizards/web/WWD_Startup.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -254,7 +254,7 @@ public abstract class WWD_Startup extends WWD_General
this.buildStep7(proxies, exclamationURL);
buildStepX();
- this.xMSF = xMSF;
+ this.xMSF = xmsf;
XDesktop xDesktop = Desktop.getDesktop(xMSF);
myFrame = OfficeDocument.createNewFrame(xMSF, this);
Object doc = OfficeDocument.createNewDocument(myFrame, "swriter", false, true);
@@ -265,7 +265,7 @@ public abstract class WWD_Startup extends WWD_General
ilLayouts.setListModel(settings.cp_Layouts);
ilLayouts.create(this);
- checkContent(settings.cp_DefaultSession.cp_Content, new Task("", "", 99999), this.xControl);
+ checkContent(settings.cp_DefaultSession.cp_Content, new Task(PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, 99999), this.xControl);
//saved sessions, styles, combobox save session.
// also set the chosen saved session...
@@ -388,7 +388,7 @@ public abstract class WWD_Startup extends WWD_General
private XFrame getFrame(Object model)
{
- XModel xmodel = (XModel) UnoRuntime.queryInterface(XModel.class, model);
+ XModel xmodel = UnoRuntime.queryInterface(XModel.class, model);
return xmodel.getCurrentController().getFrame();
}
@@ -412,7 +412,7 @@ public abstract class WWD_Startup extends WWD_General
//XWindow xContainerWindow = myFrame.getContainerWindow();
XWindow xContainerWindow = myFrame.getComponentWindow();
- XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow);
+ XWindowPeer xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow);
createWindowPeer(xWindowPeer);
@@ -548,7 +548,7 @@ public abstract class WWD_Startup extends WWD_General
protected void selectSession()
{
int selectedSession = 0;
- if (settings.cp_LastSavedSession != null && !settings.cp_LastSavedSession.equals(""))
+ if (settings.cp_LastSavedSession != null && !settings.cp_LastSavedSession.equals(PropertyNames.EMPTY_STRING))
{
Object ses = settings.cp_SavedSessions.getElement(settings.cp_LastSavedSession);
@@ -557,7 +557,7 @@ public abstract class WWD_Startup extends WWD_General
selectedSession = settings.cp_SavedSessions.getIndexOf(ses);
}
}
- Helper.setUnoPropertyValue(getModel(lstLoadSettings), "SelectedItems", new short[]
+ Helper.setUnoPropertyValue(getModel(lstLoadSettings), PropertyNames.SELECTED_ITEMS, new short[]
{
(short) selectedSession
});
@@ -595,7 +595,7 @@ public abstract class WWD_Startup extends WWD_General
//page 2 : document properties
- docListDA = (UnoDataAware) UnoDataAware.attachListBox(this, "SelectedDoc", lstDocuments, null, false);
+ docListDA = UnoDataAware.attachListBox(this, "SelectedDoc", lstDocuments, null, false);
docListDA.disableControls(new Object[]
{
/*btnDocDown, btnDocUp, */
@@ -682,8 +682,8 @@ public abstract class WWD_Startup extends WWD_General
});
pubAware.add(uda);
pubAware.add(
- isLabel ? UnoDataAware.attachLabel(p, "URL", textbox, checkPublish, false)
- : UnoDataAware.attachEditControl(p, "URL", textbox, checkPublish, false));
+ isLabel ? UnoDataAware.attachLabel(p, PropertyNames.URL, textbox, checkPublish, false)
+ : UnoDataAware.attachEditControl(p, PropertyNames.URL, textbox, checkPublish, false));
}
@@ -806,7 +806,7 @@ public abstract class WWD_Startup extends WWD_General
catch (FileNotFoundException ex)
{
- int relocate = SystemDialog.showMessageBox(xMSF, xC.getPeer(), "WarningBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, getFileAccess().getPath(doc.cp_URL, "") + "\n\n" + resources.resSpecifyNewFileLocation);
+ int relocate = SystemDialog.showMessageBox(xMSF, xC.getPeer(), "WarningBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, getFileAccess().getPath(doc.cp_URL, PropertyNames.EMPTY_STRING) + "\n\n" + resources.resSpecifyNewFileLocation);
if (relocate == 2)
{
@@ -831,7 +831,7 @@ public abstract class WWD_Startup extends WWD_General
//file is a directory
AbstractErrorHandler.showMessage(xMSF, xControl.getPeer(),
JavaTools.replaceSubString(resources.resErrIsDirectory,
- getFileAccess().getPath(doc.cp_URL, ""),
+ getFileAccess().getPath(doc.cp_URL, PropertyNames.EMPTY_STRING),
"%FILENAME"),
ErrorHandler.ERROR_PROCESS_FATAL);
return false;
@@ -842,7 +842,7 @@ public abstract class WWD_Startup extends WWD_General
exp.printStackTrace();
AbstractErrorHandler.showMessage(xMSF, xControl.getPeer(),
JavaTools.replaceSubString(resources.resErrDocValidate,
- getFileAccess().getPath(doc.cp_URL, ""),
+ getFileAccess().getPath(doc.cp_URL, PropertyNames.EMPTY_STRING),
"%FILENAME"), ErrorHandler.ERROR_PROCESS_FATAL);
return false;
}
@@ -907,7 +907,7 @@ public abstract class WWD_Startup extends WWD_General
void updateBackgroundText()
{
String bg = settings.cp_DefaultSession.cp_Design.cp_BackgroundImage;
- if (bg == null || bg.equals(""))
+ if (bg == null || bg.equals(PropertyNames.EMPTY_STRING))
{
bg = resources.resBackgroundNone;
}
@@ -922,7 +922,7 @@ public abstract class WWD_Startup extends WWD_General
{
String iconset = settings.cp_DefaultSession.cp_Design.cp_IconSet;
String iconsetName;
- if (iconset == null || iconset.equals(""))
+ if (iconset == null || iconset.equals(PropertyNames.EMPTY_STRING))
{
iconsetName = resources.resIconsetNone;
}
diff --git a/wizards/com/sun/star/wizards/web/WWHID.java b/wizards/com/sun/star/wizards/web/WWHID.java
index 6d9a4882fcb9..8baa37243078 100644
--- a/wizards/com/sun/star/wizards/web/WWHID.java
+++ b/wizards/com/sun/star/wizards/web/WWHID.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/WebWizard.java b/wizards/com/sun/star/wizards/web/WebWizard.java
index 87ea5217b11e..81d6db638013 100644
--- a/wizards/com/sun/star/wizards/web/WebWizard.java
+++ b/wizards/com/sun/star/wizards/web/WebWizard.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/WebWizardConst.java b/wizards/com/sun/star/wizards/web/WebWizardConst.java
index 7ef17f134458..4846eabcdee9 100644
--- a/wizards/com/sun/star/wizards/web/WebWizardConst.java
+++ b/wizards/com/sun/star/wizards/web/WebWizardConst.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/WebWizardDialog.java b/wizards/com/sun/star/wizards/web/WebWizardDialog.java
index e9d1d2fd7a87..ffd494846646 100644
--- a/wizards/com/sun/star/wizards/web/WebWizardDialog.java
+++ b/wizards/com/sun/star/wizards/web/WebWizardDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -92,8 +92,8 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
//Image Control
XControl ImageControl6;
XFixedText Label3;
- //titled box
- XControl FrameControl1;
+ //titled box
+ XControl FrameControl1;
//Image Control
XControl ImageControl2;
//Image Control
@@ -196,16 +196,16 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
};
private static String[] PROPNAMES_TXT_2 = new String[]
{
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ReadOnly", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.READ_ONLY, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
};
private static String[] PROPNAMES_TITLE = new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
};
- private static Integer INTEGER_91 = new Integer(91);
- private static Integer INTEGER_97 = new Integer(97);
- private static Integer INTEGER_103 = new Integer(103);
- private static Integer INTEGER_169 = new Integer(169); //Resources Object
+ private static Integer INTEGER_91 = 91;
+ private static Integer INTEGER_97 = 97;
+ private static Integer INTEGER_103 = 103;
+ private static Integer INTEGER_169 = 169; //Resources Object
WebWizardDialogResources resources;
public WebWizardDialog(XMultiServiceFactory xmsf)
@@ -219,11 +219,11 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
Helper.setUnoPropertyValues(xDialogModel,
new String[]
{
- "Closeable", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_CLOSEABLE, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MOVEABLE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- Boolean.TRUE, new Integer(210), HelpIds.getHelpIdString(HID0_WEBWIZARD), Boolean.TRUE, "WebWizardDialog", new Integer(102), new Integer(52), INTEGERS[1], new Short((short) 6), resources.resWebWizardDialog_title, new Integer(330)
+ Boolean.TRUE, 210, HelpIds.getHelpIdString(HID0_WEBWIZARD), Boolean.TRUE, "WebWizardDialog", 102, 52, INTEGERS[1], new Short((short) 6), resources.resWebWizardDialog_title, 330
});
//Set member- FontDescriptors...
@@ -254,7 +254,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
PROPNAMES_TITLE,
new Object[]
{
- fontDescriptor4, INTEGER_16, resources.reslbIntroTitle_value, Boolean.TRUE, "lbIntroTitle", new Integer(91), INTEGERS[8], INTEGERS[1], new Short(tabIndex++), new Integer(232)
+ fontDescriptor4, INTEGER_16, resources.reslbIntroTitle_value, Boolean.TRUE, "lbIntroTitle", 91, INTEGERS[8], INTEGERS[1], new Short(tabIndex++), 232
});
lblIntroduction = insertLabel("lblIntroduction",
new String[]
@@ -263,14 +263,14 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
},
new Object[]
{
- new Integer(119), resources.reslblIntroduction_value, Boolean.TRUE, "lblIntroduction", new Integer(97), new Integer(28), INTEGERS[1], new Short(tabIndex++), new Integer(226)
+ 119, resources.reslblIntroduction_value, Boolean.TRUE, "lblIntroduction", 97, 28, INTEGERS[1], new Short(tabIndex++), 226
});
lnLoadSettings = insertFixedLine("lnLoadSettings",
PROPNAMES_TXT,
new Object[]
{
- INTEGERS[2], "", "lnLoadSettings", new Integer(91), new Integer(147), INTEGERS[1], new Short(tabIndex++), new Integer(234)
+ INTEGERS[2], PropertyNames.EMPTY_STRING, "lnLoadSettings", 91, 147, INTEGERS[1], new Short(tabIndex++), 234
});
lblLoadSettings = insertLabel("lblLoadSettings",
new String[]
@@ -279,7 +279,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
},
new Object[]
{
- INTEGERS[8], resources.reslblLoadSettings_value, Boolean.TRUE, "lblLoadSettings", new Integer(97), new Integer(153), INTEGERS[1], new Short(tabIndex++), new Integer(226)
+ INTEGERS[8], resources.reslblLoadSettings_value, Boolean.TRUE, "lblLoadSettings", 97, 153, INTEGERS[1], new Short(tabIndex++), 226
});
lstLoadSettings = insertListBox("lstLoadSettings", null, LSTLOADSETTINGS_ITEM_CHANGED,
new String[]
@@ -288,7 +288,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID1_LST_SESSIONS), new Short((short) 14), "lstLoadSettings", new Integer(97), new Integer(165), INTEGERS[1], new Short(tabIndex++), new Integer(173)
+ Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID1_LST_SESSIONS), new Short((short) 14), "lstLoadSettings", 97, 165, INTEGERS[1], new Short(tabIndex++), 173
});
btnDelSession = insertButton("btnDelSession", BTNDELSESSION_ACTION_PERFORMED,
new String[]
@@ -297,7 +297,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
},
new Object[]
{
- Boolean.FALSE, INTEGER_14, HelpIds.getHelpIdString(HID1_BTN_DEL_SES), new Short(com.sun.star.awt.ImageAlign.LEFT), resources.resbtnDelSession_value, "btnDelSession", new Integer(274), new Integer(164), INTEGERS[1], new Short(tabIndex++), INTEGER_50
+ Boolean.FALSE, INTEGER_14, HelpIds.getHelpIdString(HID1_BTN_DEL_SES), new Short(com.sun.star.awt.ImageAlign.LEFT), resources.resbtnDelSession_value, "btnDelSession", 274, 164, INTEGERS[1], new Short(tabIndex++), INTEGER_50
});
}
@@ -309,13 +309,13 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
PROPNAMES_TITLE,
new Object[]
{
- fontDescriptor4, INTEGER_16, resources.reslblContentTitle_value, Boolean.TRUE, "lblContentTitle", new Integer(91), INTEGERS[8], INTEGERS[2], new Short(tabIndex++), new Integer(232)
+ fontDescriptor4, INTEGER_16, resources.reslblContentTitle_value, Boolean.TRUE, "lblContentTitle", 91, INTEGERS[8], INTEGERS[2], new Short(tabIndex++), 232
});
lblSiteContent = insertLabel("lblSiteContent",
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblSiteContent_value, "lblSiteContent", new Integer(97), new Integer(28), INTEGERS[2], new Short(tabIndex++), new Integer(105)
+ INTEGERS[8], resources.reslblSiteContent_value, "lblSiteContent", 97, 28, INTEGERS[2], new Short(tabIndex++), 105
});
lstDocuments = insertListBox("lstDocuments", null, null,
new String[]
@@ -324,44 +324,44 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
},
new Object[]
{
- new Integer(123), HelpIds.getHelpIdString(HID2_LST_DOCS), new Short((short) 9), "lstDocuments", new Integer(97), new Integer(38), INTEGERS[2], new Short(tabIndex++), new Integer(103)
+ 123, HelpIds.getHelpIdString(HID2_LST_DOCS), new Short((short) 9), "lstDocuments", 97, 38, INTEGERS[2], new Short(tabIndex++), 103
});
btnAddDoc = insertButton("btnAddDoc", BTNADDDOC_ACTION_PERFORMED,
PROPNAMES_BUTTON,
new Object[]
{
- INTEGER_14, HelpIds.getHelpIdString(HID2_BTN_ADD_DOC), resources.resbtnAddDoc_value, "btnAddDoc", new Integer(97), new Integer(165), INTEGERS[2], new Short(tabIndex++), INTEGER_50
+ INTEGER_14, HelpIds.getHelpIdString(HID2_BTN_ADD_DOC), resources.resbtnAddDoc_value, "btnAddDoc", 97, 165, INTEGERS[2], new Short(tabIndex++), INTEGER_50
});
btnRemoveDoc = insertButton("btnRemoveDoc", BTNREMOVEDOC_ACTION_PERFORMED,
PROPNAMES_BUTTON,
new Object[]
{
- INTEGER_14, HelpIds.getHelpIdString(HID2_BTN_REM_DOC), resources.resbtnRemoveDoc_value, "btnRemoveDoc", new Integer(150), new Integer(165), INTEGERS[2], new Short(tabIndex++), INTEGER_50
+ INTEGER_14, HelpIds.getHelpIdString(HID2_BTN_REM_DOC), resources.resbtnRemoveDoc_value, "btnRemoveDoc", 150, 165, INTEGERS[2], new Short(tabIndex++), INTEGER_50
});
btnDocUp = insertButton("btnDocUp", BTNDOCUP_ACTION_PERFORMED,
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- fontDescriptor7, INTEGER_14, HelpIds.getHelpIdString(HID2_BTN_DOC_UP), resources.resbtnDocUp_value, "btnDocUp", new Integer(205), new Integer(87), INTEGERS[2], new Short(tabIndex++), new Integer(18)
+ fontDescriptor7, INTEGER_14, HelpIds.getHelpIdString(HID2_BTN_DOC_UP), resources.resbtnDocUp_value, "btnDocUp", 205, 87, INTEGERS[2], new Short(tabIndex++), 18
});
btnDocDown = insertButton("btnDocDown", BTNDOCDOWN_ACTION_PERFORMED,
new String[]
{
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- fontDescriptor7, INTEGER_14, HelpIds.getHelpIdString(HID2_BTN_DOC_DOWN), resources.resbtnDocDown_value, "btnDocDown", new Integer(205), new Integer(105), INTEGERS[2], new Short(tabIndex++), new Integer(18)
+ fontDescriptor7, INTEGER_14, HelpIds.getHelpIdString(HID2_BTN_DOC_DOWN), resources.resbtnDocDown_value, "btnDocDown", 205, 105, INTEGERS[2], new Short(tabIndex++), 18
});
lblDocExportFormat = insertLabel("lblDocExportFormat",
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblDocExportFormat_value, "lblDocExportFormat", new Integer(235), new Integer(28), INTEGERS[2], new Short(tabIndex++), new Integer(89)
+ INTEGERS[8], resources.reslblDocExportFormat_value, "lblDocExportFormat", 235, 28, INTEGERS[2], new Short(tabIndex++), 89
});
lstDocTargetType = insertListBox("lstDocTargetType", null, null,
new String[]
@@ -370,7 +370,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID2_LST_DOC_EXPORT), new Short((short) 14), "lstDocTargetType", new Integer(235), new Integer(38), INTEGERS[2], new Short(tabIndex++), new Integer(89)
+ Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID2_LST_DOC_EXPORT), new Short((short) 14), "lstDocTargetType", 235, 38, INTEGERS[2], new Short(tabIndex++), 89
});
@@ -380,25 +380,25 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslnDocsInfo_value, "lnDocsInfo", new Integer(235), new Integer(66), INTEGERS[2], new Short(tabIndex++), new Integer(90)
+ INTEGERS[8], resources.reslnDocsInfo_value, "lnDocsInfo", 235, 66, INTEGERS[2], new Short(tabIndex++), 90
});
lblDocTitle = insertLabel("lblDocTitle",
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblDocTitle_value, "lblDocTitle", new Integer(235), new Integer(78), INTEGERS[2], new Short(tabIndex++), new Integer(89)
+ INTEGERS[8], resources.reslblDocTitle_value, "lblDocTitle", 235, 78, INTEGERS[2], new Short(tabIndex++), 89
});
txtDocTitle = insertTextField("txtDocTitle", null,
PROPNAMES_TXT,
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID2_TXT_DOC_TITLE), "txtDocTitle", new Integer(235), new Integer(88), INTEGERS[2], new Short(tabIndex++), new Integer(89)
+ INTEGER_12, HelpIds.getHelpIdString(HID2_TXT_DOC_TITLE), "txtDocTitle", 235, 88, INTEGERS[2], new Short(tabIndex++), 89
});
lblDocInfo = insertLabel("lblDocInfo",
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblDocInfo_value, "lblDocInfo", new Integer(235), new Integer(103), INTEGERS[2], new Short(tabIndex++), new Integer(89)
+ INTEGERS[8], resources.reslblDocInfo_value, "lblDocInfo", 235, 103, INTEGERS[2], new Short(tabIndex++), 89
});
txtDocInfo = insertTextField("txtDocInfo", null,
new String[]
@@ -407,19 +407,19 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
},
new Object[]
{
- INTEGER_40, HelpIds.getHelpIdString(HID2_TXT_DOC_DESC), Boolean.TRUE, "txtDocInfo", new Integer(235), new Integer(113), INTEGERS[2], new Short(tabIndex++), new Integer(89)
+ INTEGER_40, HelpIds.getHelpIdString(HID2_TXT_DOC_DESC), Boolean.TRUE, "txtDocInfo", 235, 113, INTEGERS[2], new Short(tabIndex++), 89
});
lblDocAuthor = insertLabel("lblDocAuthor",
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblDocAuthor_value, "lblDocAuthor", new Integer(235), new Integer(155), INTEGERS[2], new Short(tabIndex++), new Integer(89)
+ INTEGERS[8], resources.reslblDocAuthor_value, "lblDocAuthor", 235, 155, INTEGERS[2], new Short(tabIndex++), 89
});
txtDocAuthor = insertTextField("txtDocAuthor", null,
PROPNAMES_TXT,
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID2_TXT_DOC_AUTHOR), "txtDocAuthor", new Integer(235), new Integer(165), INTEGERS[2], new Short(tabIndex++), new Integer(89)
+ INTEGER_12, HelpIds.getHelpIdString(HID2_TXT_DOC_AUTHOR), "txtDocAuthor", 235, 165, INTEGERS[2], new Short(tabIndex++), 89
});
}
@@ -429,13 +429,13 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
PROPNAMES_TITLE,
new Object[]
{
- fontDescriptor4, INTEGER_16, resources.reslblLayoutTitle_value, Boolean.TRUE, "lblLayoutTitle", new Integer(91), INTEGERS[8], INTEGERS[3], new Short((short) 29), new Integer(232)
+ fontDescriptor4, INTEGER_16, resources.reslblLayoutTitle_value, Boolean.TRUE, "lblLayoutTitle", 91, INTEGERS[8], INTEGERS[3], new Short((short) 29), 232
});
lblLayouts = insertLabel("lblLayouts",
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblLayouts_value, "lblLayouts", new Integer(97), new Integer(28), INTEGERS[3], new Short((short) 30), new Integer(206)
+ INTEGERS[8], resources.reslblLayouts_value, "lblLayouts", 97, 28, INTEGERS[3], new Short((short) 30), 206
});
}
@@ -446,7 +446,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
PROPNAMES_TITLE,
new Object[]
{
- fontDescriptor4, INTEGER_16, resources.reslblLayout2Title_value, Boolean.TRUE, "lblLayout2Title", new Integer(91), INTEGERS[8], INTEGERS[4], new Short((short) 33), new Integer(232)
+ fontDescriptor4, INTEGER_16, resources.reslblLayout2Title_value, Boolean.TRUE, "lblLayout2Title", 91, INTEGERS[8], INTEGERS[4], new Short((short) 33), 232
});
lnDisplay = insertLabel("lblDisplay",
new String[]
@@ -455,86 +455,86 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
},
new Object[]
{
- INTEGER_16, resources.reslblDisplay_value, Boolean.TRUE, "lblDisplay", new Integer(97), new Integer(28), INTEGERS[4], new Short((short) 34), new Integer(226)
+ INTEGER_16, resources.reslblDisplay_value, Boolean.TRUE, "lblDisplay", 97, 28, INTEGERS[4], new Short((short) 34), 226
});
chkDocFilename = insertCheckBox("chkDocFilename", null,
PROPNAMES_CHKBOX,
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_FILENAME), resources.reschkDocFilename_value, "chkDocFilename", new Integer(103), new Integer(50), new Short((short) 0), INTEGERS[4], new Short((short) 35), new Integer(99)
+ INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_FILENAME), resources.reschkDocFilename_value, "chkDocFilename", 103, 50, new Short((short) 0), INTEGERS[4], new Short((short) 35), 99
});
chbDocDesc = insertCheckBox("chbDocDesc", null,
PROPNAMES_CHKBOX,
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_DESCRIPTION), resources.reschbDocDesc_value, "chbDocDesc", new Integer(103), new Integer(60), new Short((short) 0), INTEGERS[4], new Short((short) 36), new Integer(99)
+ INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_DESCRIPTION), resources.reschbDocDesc_value, "chbDocDesc", 103, 60, new Short((short) 0), INTEGERS[4], new Short((short) 36), 99
});
chbDocAuthor = insertCheckBox("chbDocAuthor", null,
PROPNAMES_CHKBOX,
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_AUTHOR), resources.reschbDocAuthor_value, "chbDocAuthor", new Integer(103), new Integer(70), new Short((short) 0), INTEGERS[4], new Short((short) 37), new Integer(99)
+ INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_AUTHOR), resources.reschbDocAuthor_value, "chbDocAuthor", 103, 70, new Short((short) 0), INTEGERS[4], new Short((short) 37), 99
});
chkDocCreated = insertCheckBox("chkDocCreated", null,
PROPNAMES_CHKBOX,
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_CR_DATE), resources.reschkDocCreated_value, "chkDocCreated", new Integer(103), new Integer(80), new Short((short) 0), INTEGERS[4], new Short((short) 38), new Integer(99)
+ INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_CR_DATE), resources.reschkDocCreated_value, "chkDocCreated", 103, 80, new Short((short) 0), INTEGERS[4], new Short((short) 38), 99
});
chkDocChanged = insertCheckBox("chkDocChanged", null,
PROPNAMES_CHKBOX,
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_UP_DATE), resources.reschkDocChanged_value, "chkDocChanged", new Integer(103), new Integer(90), new Short((short) 0), INTEGERS[4], new Short((short) 39), new Integer(99)
+ INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_UP_DATE), resources.reschkDocChanged_value, "chkDocChanged", 103, 90, new Short((short) 0), INTEGERS[4], new Short((short) 39), 99
});
chkDocFormat = insertCheckBox("chkDocFormat", null,
PROPNAMES_CHKBOX,
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_FORMAT), resources.reschkDocFormat_value, "chkDocFormat", new Integer(200), new Integer(50), new Short((short) 0), INTEGERS[4], new Short((short) 40), new Integer(110)
+ INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_FORMAT), resources.reschkDocFormat_value, "chkDocFormat", 200, 50, new Short((short) 0), INTEGERS[4], new Short((short) 40), 110
});
chkDocFormatIcon = insertCheckBox("chkDocFormatIcon", null,
PROPNAMES_CHKBOX,
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_F_ICON), resources.reschkDocFormatIcon_value, "chkDocFormatIcon", new Integer(200), new Integer(60), new Short((short) 0), INTEGERS[4], new Short((short) 41), new Integer(110)
+ INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_F_ICON), resources.reschkDocFormatIcon_value, "chkDocFormatIcon", 200, 60, new Short((short) 0), INTEGERS[4], new Short((short) 41), 110
});
chkDocPages = insertCheckBox("chkDocPages", null,
PROPNAMES_CHKBOX,
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_PAGES), resources.reschkDocPages_value, "chkDocPages", new Integer(200), new Integer(70), new Short((short) 0), INTEGERS[4], new Short((short) 42), new Integer(110)
+ INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_PAGES), resources.reschkDocPages_value, "chkDocPages", 200, 70, new Short((short) 0), INTEGERS[4], new Short((short) 42), 110
});
chkDocSize = insertCheckBox("chkDocSize", null,
PROPNAMES_CHKBOX,
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_SIZE), resources.reschkDocSize_value, "chkDocSize", new Integer(200), new Integer(80), new Short((short) 0), INTEGERS[4], new Short((short) 43), new Integer(110)
+ INTEGERS[8], HelpIds.getHelpIdString(HID4_CHK_DISPLAY_SIZE), resources.reschkDocSize_value, "chkDocSize", 200, 80, new Short((short) 0), INTEGERS[4], new Short((short) 43), 110
});
lblOptimizeFor = insertLabel("lblOptimizeFor",
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblOptimizeFor_value, "lblOptimizeFor", new Integer(97), new Integer(113), INTEGERS[4], new Short((short) 44), new Integer(226)
+ INTEGERS[8], resources.reslblOptimizeFor_value, "lblOptimizeFor", 97, 113, INTEGERS[4], new Short((short) 44), 226
});
optOptimize640x480 = insertRadioButton("optOptimize640x480", null,
PROPNAMES_BUTTON,
new Object[]
{
- INTEGERS[10], HelpIds.getHelpIdString(HID4_GRP_OPTIMAIZE_640), resources.resoptOptimize640x480_value, "optOptimize640x480", new Integer(103), new Integer(133), INTEGERS[4], new Short((short) 45), new Integer(44)
+ INTEGERS[10], HelpIds.getHelpIdString(HID4_GRP_OPTIMAIZE_640), resources.resoptOptimize640x480_value, "optOptimize640x480", 103, 133, INTEGERS[4], new Short((short) 45), 44
});
optOptimize800x600 = insertRadioButton("optOptimize800x600", null,
PROPNAMES_BUTTON,
new Object[]
{
- INTEGERS[10], HelpIds.getHelpIdString(HID4_GRP_OPTIMAIZE_800), resources.resoptOptimize800x600_value, "optOptimize800x600", new Integer(103), new Integer(146), INTEGERS[4], new Short((short) 46), new Integer(44)
+ INTEGERS[10], HelpIds.getHelpIdString(HID4_GRP_OPTIMAIZE_800), resources.resoptOptimize800x600_value, "optOptimize800x600", 103, 146, INTEGERS[4], new Short((short) 46), 44
});
optOptimize1024x768 = insertRadioButton("optOptimize1024x768", null,
PROPNAMES_BUTTON,
new Object[]
{
- INTEGERS[10], HelpIds.getHelpIdString(HID4_GRP_OPTIMAIZE_1024), resources.resoptOptimize1024x768_value, "optOptimize1024x768", new Integer(103), new Integer(158), INTEGERS[4], new Short((short) 47), new Integer(44)
+ INTEGERS[10], HelpIds.getHelpIdString(HID4_GRP_OPTIMAIZE_1024), resources.resoptOptimize1024x768_value, "optOptimize1024x768", 103, 158, INTEGERS[4], new Short((short) 47), 44
});
}
@@ -544,13 +544,13 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
lblStyleTitle = insertLabel("lblStyleTitle", PROPNAMES_TITLE,
new Object[]
{
- fontDescriptor4, INTEGER_16, resources.reslblStyleTitle_value, Boolean.TRUE, "lblStyleTitle", new Integer(91), INTEGERS[8], INTEGERS[5], new Short((short) 50), new Integer(232)
+ fontDescriptor4, INTEGER_16, resources.reslblStyleTitle_value, Boolean.TRUE, "lblStyleTitle", 91, INTEGERS[8], INTEGERS[5], new Short((short) 50), 232
});
lblStyle = insertLabel("lblStyle", PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblStyle_value, "lblStyle", new Integer(97), new Integer(28), INTEGERS[5], new Short((short) 51), new Integer(80)
+ INTEGERS[8], resources.reslblStyle_value, "lblStyle", 97, 28, INTEGERS[5], new Short((short) 51), 80
});
lstStyles = insertListBox("lstStyles", null, LSTSTYLES_ITEM_CHANGED,
new String[]
@@ -559,48 +559,48 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID5_LST_STYLES), new Short((short) 14), "lstStyles", new Integer(179), new Integer(26), INTEGERS[5], new Short((short) 52), new Integer(145)
+ Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID5_LST_STYLES), new Short((short) 14), "lstStyles", 179, 26, INTEGERS[5], new Short((short) 52), 145
});
insertLabel("lblBackground", PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblBackground, "lblBackground", new Integer(97), new Integer(46), INTEGERS[5], new Short((short) 51), new Integer(70)
+ INTEGERS[8], resources.reslblBackground, "lblBackground", 97, 46, INTEGERS[5], new Short((short) 51), 70
});
txtBackground = insertLabel("txtBackground",
new String[]
{
- "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Short((short) 1), INTEGER_12, resources.resBackgroundNone, "txtBackground", new Integer(179), new Integer(44), INTEGERS[5], new Short((short) 52), new Integer(90)
+ new Short((short) 1), INTEGER_12, resources.resBackgroundNone, "txtBackground", 179, 44, INTEGERS[5], new Short((short) 52), 90
});
btnBackgrounds = insertButton("btnBackgrounds", BTNBACKGROUNDS_ACTION_PERFORMED, PROPNAMES_BUTTON,
new Object[]
{
- INTEGER_14, HelpIds.getHelpIdString(HID5_BTN_BACKGND), resources.resBtnChooseBackground, "btnBackgrounds", new Integer(274), new Integer(43), INTEGERS[5], new Short((short) 53), INTEGER_50
+ INTEGER_14, HelpIds.getHelpIdString(HID5_BTN_BACKGND), resources.resBtnChooseBackground, "btnBackgrounds", 274, 43, INTEGERS[5], new Short((short) 53), INTEGER_50
});
insertLabel("lblIconset", PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblIconset, "lblIconset", new Integer(97), new Integer(64), INTEGERS[5], new Short((short) 51), new Integer(70)
+ INTEGERS[8], resources.reslblIconset, "lblIconset", 97, 64, INTEGERS[5], new Short((short) 51), 70
});
txtIconset = insertLabel("txtIconset",
new String[]
{
- "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Short((short) 1), INTEGER_12, resources.resIconsetNone, "txtIconset", new Integer(179), new Integer(62), INTEGERS[5], new Short((short) 52), new Integer(90)
+ new Short((short) 1), INTEGER_12, resources.resIconsetNone, "txtIconset", 179, 62, INTEGERS[5], new Short((short) 52), 90
});
btnIconSets = insertButton("btnIconSets", BTNICONSETS_ACTION_PERFORMED,
PROPNAMES_BUTTON,
new Object[]
{
- INTEGER_14, HelpIds.getHelpIdString(HID5_BTN_ICONS), resources.resBtnChooseIconset, "btnIconSets", new Integer(274), new Integer(61), INTEGERS[5], new Short((short) 54), INTEGER_50
+ INTEGER_14, HelpIds.getHelpIdString(HID5_BTN_ICONS), resources.resBtnChooseIconset, "btnIconSets", 274, 61, INTEGERS[5], new Short((short) 54), INTEGER_50
});
insertLabel("lblIconsetInfo",
new String[]
@@ -609,7 +609,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
},
new Object[]
{
- INTEGER_16, resources.reslblIconSetInfo, Boolean.TRUE, "lblIconsetInfo", new Integer(179), new Integer(78), INTEGERS[5], new Short((short) 51), new Integer(145)
+ INTEGER_16, resources.reslblIconSetInfo, Boolean.TRUE, "lblIconsetInfo", 179, 78, INTEGERS[5], new Short((short) 51), 145
});
@@ -620,7 +620,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
},
new Object[]
{
- new Integer(0), Boolean.FALSE, new Integer(78), "", "imgPreview", new Integer(91), new Integer(100), Boolean.FALSE, INTEGERS[5], new Short((short) 55), new Integer(232)
+ 0, Boolean.FALSE, 78, PropertyNames.EMPTY_STRING, "imgPreview", 91, 100, Boolean.FALSE, INTEGERS[5], new Short((short) 55), 232
});
}
@@ -632,19 +632,19 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
PROPNAMES_TITLE,
new Object[]
{
- fontDescriptor4, INTEGERS[8], resources.reslblTitleGeneralPage_value, Boolean.TRUE, "lblTitleGeneralPage", new Integer(90), INTEGERS[9], INTEGERS[6], new Short(tabIndex++), new Integer(232)
+ fontDescriptor4, INTEGERS[8], resources.reslblTitleGeneralPage_value, Boolean.TRUE, "lblTitleGeneralPage", 90, INTEGERS[9], INTEGERS[6], new Short(tabIndex++), 232
});
lblSiteTitle = insertLabel("lblSiteTitle",
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblSiteTitle_value, "lblSiteTitle", new Integer(97), new Integer(28), INTEGERS[6], new Short(tabIndex++), new Integer(80)
+ INTEGERS[8], resources.reslblSiteTitle_value, "lblSiteTitle", 97, 28, INTEGERS[6], new Short(tabIndex++), 80
});
txtSiteTitle = insertTextField("txtSiteTitle", null,
PROPNAMES_TXT,
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID6_TXT_SITE_TITLE), "txtSiteTitle", new Integer(179), new Integer(26), INTEGERS[6], new Short(tabIndex++), new Integer(145)
+ INTEGER_12, HelpIds.getHelpIdString(HID6_TXT_SITE_TITLE), "txtSiteTitle", 179, 26, INTEGERS[6], new Short(tabIndex++), 145
});
@@ -652,7 +652,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[9], resources.reslblMetaData, "FixedLineMetaData", new Integer(97), new Integer(56), INTEGERS[6], new Short(tabIndex++), new Integer(228)
+ INTEGERS[9], resources.reslblMetaData, "FixedLineMetaData", 97, 56, INTEGERS[6], new Short(tabIndex++), 228
});
@@ -660,35 +660,35 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblSiteDesc_value, "lblSiteDesc", new Integer(103), new Integer(72), INTEGERS[6], new Short(tabIndex++), new Integer(80)
+ INTEGERS[8], resources.reslblSiteDesc_value, "lblSiteDesc", 103, 72, INTEGERS[6], new Short(tabIndex++), 80
});
txtSiteDesc = insertTextField("txtSiteDesc", null,
PROPNAMES_TXT,
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID6_TXT_SITE_DESC), "txtSiteDesc", new Integer(179), new Integer(70), INTEGERS[6], new Short(tabIndex++), new Integer(145)
+ INTEGER_12, HelpIds.getHelpIdString(HID6_TXT_SITE_DESC), "txtSiteDesc", 179, 70, INTEGERS[6], new Short(tabIndex++), 145
});
lblEmail = insertLabel("lblEmail", PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblEmail_value, "lblEmail", new Integer(103), new Integer(90), INTEGERS[6], new Short(tabIndex++), new Integer(80)
+ INTEGERS[8], resources.reslblEmail_value, "lblEmail", 103, 90, INTEGERS[6], new Short(tabIndex++), 80
});
txtEmail = insertTextField("txtEmail", null, PROPNAMES_TXT,
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID6_TXT_SITE_EMAIL), "txtEmail", new Integer(179), new Integer(87), INTEGERS[6], new Short(tabIndex++), new Integer(145)
+ INTEGER_12, HelpIds.getHelpIdString(HID6_TXT_SITE_EMAIL), "txtEmail", 179, 87, INTEGERS[6], new Short(tabIndex++), 145
});
lblCopyright = insertLabel("lblCopyright", PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblCopyright_value, "lblCopyright", new Integer(103), new Integer(108), INTEGERS[6], new Short(tabIndex++), new Integer(80)
+ INTEGERS[8], resources.reslblCopyright_value, "lblCopyright", 103, 108, INTEGERS[6], new Short(tabIndex++), 80
});
txtCopyright = insertTextField("txtCopyright", null, PROPNAMES_TXT,
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID6_TXT_SITE_COPYRIGHT), "txtCopyright", new Integer(179), new Integer(106), INTEGERS[6], new Short(tabIndex++), new Integer(145)
+ INTEGER_12, HelpIds.getHelpIdString(HID6_TXT_SITE_COPYRIGHT), "txtCopyright", 179, 106, INTEGERS[6], new Short(tabIndex++), 145
});
@@ -696,7 +696,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblSiteCreated_value, "lblSiteCreated", new Integer(103), new Integer(126), INTEGERS[6], new Short(tabIndex++), new Integer(80)
+ INTEGERS[8], resources.reslblSiteCreated_value, "lblSiteCreated", 103, 126, INTEGERS[6], new Short(tabIndex++), 80
});
dateSiteCreated = insertDateField("dateSiteCreated", null,
new String[]
@@ -705,13 +705,13 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID6_DATE_SITE_CREATED), "dateSiteCreated", new Integer(179), new Integer(124), INTEGERS[6], new Short(tabIndex++), new Integer(49)
+ Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID6_DATE_SITE_CREATED), "dateSiteCreated", 179, 124, INTEGERS[6], new Short(tabIndex++), 49
});
lblSiteUpdated = insertLabel("lblSiteUpdated",
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblSiteUpdated_value, "lblSiteUpdated", new Integer(103), new Integer(144), INTEGERS[6], new Short(tabIndex++), new Integer(80)
+ INTEGERS[8], resources.reslblSiteUpdated_value, "lblSiteUpdated", 103, 144, INTEGERS[6], new Short(tabIndex++), 80
});
dateSiteUpdate = insertDateField("dateSiteUpdate", null,
@@ -721,7 +721,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
},
new Object[]
{
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID6_DATE_SITE_UPDATED), "dateSiteUpdate", new Integer(179), new Integer(142), INTEGERS[6], new Short(tabIndex++), new Integer(49)
+ Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID6_DATE_SITE_UPDATED), "dateSiteUpdate", 179, 142, INTEGERS[6], new Short(tabIndex++), 49
});
@@ -736,92 +736,92 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
PROPNAMES_TITLE,
new Object[]
{
- fontDescriptor4, INTEGER_16, resources.reslblTitlePublish_value, Boolean.TRUE, "lblTitlePublish", new Integer(91), INTEGERS[8], INTEGERS[7], new Short(tabIndex++), new Integer(232)
+ fontDescriptor4, INTEGER_16, resources.reslblTitlePublish_value, Boolean.TRUE, "lblTitlePublish", 91, INTEGERS[8], INTEGERS[7], new Short(tabIndex++), 232
});
FixedLine1 = insertFixedLine("FixedLine1",
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[9], resources.resFixedLine1_value, "FixedLine1", new Integer(97), new Integer(28), INTEGERS[7], new Short(tabIndex++), new Integer(228)
+ INTEGERS[9], resources.resFixedLine1_value, "FixedLine1", 97, 28, INTEGERS[7], new Short(tabIndex++), 228
});
btnPreview = insertButton("btnPreview", BTNPREVIEW_ACTION_PERFORMED,
PROPNAMES_BUTTON,
new Object[]
{
- INTEGER_14, HelpIds.getHelpIdString(HID7_BTN_PREVIEW), resources.resbtnPreview_value, "btnPreview", new Integer(103), new Integer(40), INTEGERS[7], new Short(tabIndex++), INTEGER_50
+ INTEGER_14, HelpIds.getHelpIdString(HID7_BTN_PREVIEW), resources.resbtnPreview_value, "btnPreview", 103, 40, INTEGERS[7], new Short(tabIndex++), INTEGER_50
});
lblCreateSite = insertFixedLine("lblCreateSite",
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[9], resources.reslblCreateSite_value, "lblCreateSite", new Integer(97), new Integer(56), INTEGERS[7], new Short(tabIndex++), new Integer(228)
+ INTEGERS[9], resources.reslblCreateSite_value, "lblCreateSite", 97, 56, INTEGERS[7], new Short(tabIndex++), 228
});
chkLocalDir = insertCheckBox("chkLocalDir", CHKLOCALDIR_ITEM_CHANGED,
PROPNAMES_CHKBOX,
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID7_CHK_PUBLISH_LOCAL), resources.reschkLocalDir_value, "chkLocalDir", new Integer(103), new Integer(68), new Short((short) 0), INTEGERS[7], new Short(tabIndex++), new Integer(215)
+ INTEGERS[8], HelpIds.getHelpIdString(HID7_CHK_PUBLISH_LOCAL), resources.reschkLocalDir_value, "chkLocalDir", 103, 68, new Short((short) 0), INTEGERS[7], new Short(tabIndex++), 215
});
txtLocalDir = insertTextField("txtLocalDir", null,
PROPNAMES_TXT,
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID7_TXT_LOCAL), "txtLocalDir", new Integer(113), new Integer(78), INTEGERS[7], new Short(tabIndex++), new Integer(190)
+ INTEGER_12, HelpIds.getHelpIdString(HID7_TXT_LOCAL), "txtLocalDir", 113, 78, INTEGERS[7], new Short(tabIndex++), 190
});
btnLocalDir = insertButton("btnLocalDir", BTNLOCALDIR_ACTION_PERFORMED,
PROPNAMES_BUTTON,
new Object[]
{
- INTEGER_14, HelpIds.getHelpIdString(HID7_BTN_LOCAL), resources.resbtnLocalDir_value, "btnLocalDir", new Integer(308), new Integer(77), INTEGERS[7], new Short(tabIndex++), INTEGER_16
+ INTEGER_14, HelpIds.getHelpIdString(HID7_BTN_LOCAL), resources.resbtnLocalDir_value, "btnLocalDir", 308, 77, INTEGERS[7], new Short(tabIndex++), INTEGER_16
});
chkZip = insertCheckBox("chkZip", null,
PROPNAMES_CHKBOX,
new Object[]
{
- INTEGERS[9], HelpIds.getHelpIdString(HID7_CHK_PUBLISH_ZIP), resources.reschkZip_value, "chkZip", new Integer(103), new Integer(96), new Short((short) 0), INTEGERS[7], new Short(tabIndex++), new Integer(215)
+ INTEGERS[9], HelpIds.getHelpIdString(HID7_CHK_PUBLISH_ZIP), resources.reschkZip_value, "chkZip", 103, 96, new Short((short) 0), INTEGERS[7], new Short(tabIndex++), 215
});
txtZip = insertTextField("txtZip", null,
PROPNAMES_TXT,
new Object[]
{
- INTEGER_12, HelpIds.getHelpIdString(HID7_TXT_ZIP), "txtZip", new Integer(113), new Integer(108), INTEGERS[7], new Short(tabIndex++), new Integer(190)
+ INTEGER_12, HelpIds.getHelpIdString(HID7_TXT_ZIP), "txtZip", 113, 108, INTEGERS[7], new Short(tabIndex++), 190
});
btnZip = insertButton("btnZip", BTNZIP_ACTION_PERFORMED,
PROPNAMES_BUTTON,
new Object[]
{
- INTEGER_14, HelpIds.getHelpIdString(HID7_BTN_ZIP), resources.resbtnZip_value, "btnZip", new Integer(308), new Integer(107), INTEGERS[7], new Short(tabIndex++), INTEGER_16
+ INTEGER_14, HelpIds.getHelpIdString(HID7_BTN_ZIP), resources.resbtnZip_value, "btnZip", 308, 107, INTEGERS[7], new Short(tabIndex++), INTEGER_16
});
chkFTP = insertCheckBox("chkFTP", null,
PROPNAMES_CHKBOX,
new Object[]
{
- INTEGERS[8], HelpIds.getHelpIdString(HID7_CHK_PUBLISH_FTP), resources.reschkFTP_value, "chkFTP", new Integer(103), new Integer(124), new Short((short) 0), INTEGERS[7], new Short(tabIndex++), new Integer(215)
+ INTEGERS[8], HelpIds.getHelpIdString(HID7_CHK_PUBLISH_FTP), resources.reschkFTP_value, "chkFTP", 103, 124, new Short((short) 0), INTEGERS[7], new Short(tabIndex++), 215
});
- Integer FTP_STEP = disableFTP ? new Integer(99) : INTEGERS[7];
+ Integer FTP_STEP = disableFTP ? 99 : INTEGERS[7];
lblFTP = insertLabel("lblFTP",
new String[]
{
- "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Short((short) 1), INTEGER_12, "txtFTP", new Integer(113), new Integer(134), FTP_STEP, new Short(tabIndex++), new Integer(156)
+ new Short((short) 1), INTEGER_12, "txtFTP", 113, 134, FTP_STEP, new Short(tabIndex++), 156
});
btnFTP = insertButton("btnFTP", BTNFTP_ACTION_PERFORMED,
PROPNAMES_BUTTON,
new Object[]
{
- INTEGER_14, HelpIds.getHelpIdString(HID7_BTN_FTP), resources.resbtnFTP_value, "btnFTP", new Integer(274), new Integer(133), FTP_STEP, new Short(tabIndex++), INTEGER_50
+ INTEGER_14, HelpIds.getHelpIdString(HID7_BTN_FTP), resources.resbtnFTP_value, "btnFTP", 274, 133, FTP_STEP, new Short(tabIndex++), INTEGER_50
});
if (disableFTP)
@@ -830,11 +830,11 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
insertImage("imgFTPDisabled",
new String[]
{
- "BackgroundColor", "Border", PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
+ "BackgroundColor", PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
},
new Object[]
{
- new Integer(-1), new Short((short) 0), Boolean.FALSE, new Integer(10), exclamationURL, "imgFTPDisabled", new Integer(115), new Integer(135), Boolean.FALSE, INTEGERS[7], new Short(tabIndex++), new Integer(8)
+ new Integer(-1), new Short((short) 0), Boolean.FALSE, 10, exclamationURL, "imgFTPDisabled", 115, 135, Boolean.FALSE, INTEGERS[7], new Short(tabIndex++), 8
});
insertLabel("lblFTPDisabled",
new String[]
@@ -843,9 +843,9 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
},
new Object[]
{
- new Integer(-1), INTEGER_8, resources.reslblFTPDisabled, Boolean.TRUE, "lblFTPDisabled", new Integer(125), new Integer(136), INTEGERS[7], new Short(tabIndex++), new Integer(226)
+ new Integer(-1), INTEGER_8, resources.reslblFTPDisabled, Boolean.TRUE, "lblFTPDisabled", 125, 136, INTEGERS[7], new Short(tabIndex++), 226
});
- //FTP_STEP = new Integer(99);
+ //FTP_STEP = 99;
}
//else
@@ -853,19 +853,19 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
PROPNAMES_TXT,
new Object[]
{
- INTEGERS[2], "", "lnSaveSetting", new Integer(97), new Integer(151), INTEGERS[7], new Short(tabIndex++), new Integer(228)
+ INTEGERS[2], PropertyNames.EMPTY_STRING, "lnSaveSetting", 97, 151, INTEGERS[7], new Short(tabIndex++), 228
});
chkSaveSettings = insertCheckBox("chkSaveSettings", CHKSAVESETTINGS_ITEM_CHANGED,
PROPNAMES_CHKBOX,
new Object[]
{
- INTEGERS[9], HelpIds.getHelpIdString(HID7_CHK_SAVE), resources.reschkSaveSettings_value, "chkSaveSettings", new Integer(97), new Integer(157), new Short((short) 1), INTEGERS[7], new Short(tabIndex++), new Integer(215)
+ INTEGERS[9], HelpIds.getHelpIdString(HID7_CHK_SAVE), resources.reschkSaveSettings_value, "chkSaveSettings", 97, 157, new Short((short) 1), INTEGERS[7], new Short(tabIndex++), 215
});
lblSaveSettings = insertLabel("lblSaveSettings",
PROPNAMES_LBL,
new Object[]
{
- INTEGERS[8], resources.reslblSaveSettings_value, "lblSaveSettings", new Integer(107), new Integer(169), INTEGERS[7], new Short(tabIndex++), new Integer(45)
+ INTEGERS[8], resources.reslblSaveSettings_value, "lblSaveSettings", 107, 169, INTEGERS[7], new Short(tabIndex++), 45
});
cbSaveSettings = insertComboBox("txtSaveSettings", TXTSAVESETTINGS_TEXT_CHANGED, TXTSAVESETTINGS_TEXT_CHANGED, TXTSAVESETTINGS_TEXT_CHANGED,
new String[]
@@ -874,7 +874,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
},
new Object[]
{
- Boolean.TRUE, Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID7_TXT_SAVE), new Short((short) 14), "txtSaveSettings", new Integer(179), new Integer(167), INTEGERS[7], new Short(tabIndex++), new Integer(145)
+ Boolean.TRUE, Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID7_TXT_SAVE), new Short((short) 14), "txtSaveSettings", 179, 167, INTEGERS[7], new Short(tabIndex++), 145
});
}
@@ -899,17 +899,17 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
ilLayouts.helpURL = HID3_IL_LAYOUTS_IMG1;
/*for (int i = 0; i<8; i++)
- imgIconsPrev[i] = insertImage("imgIconPrev" + i,
- new String[] { "BackgroundColor","Border",PropertyNames.PROPERTY_HEIGHT,PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, "Tabstop", PropertyNames.PROPERTY_WIDTH},
- new Object[] { new Integer(-1), new Short((short)0),new Integer(14),"file:///c:/bludisk.gif", new Integer(97 + i * 20 + 7 ),new Integer(147),Boolean.FALSE,INTEGERS[5],Boolean.FALSE,new Integer(14)});
+ imgIconsPrev[i] = insertImage("imgIconPrev" + i,
+ new String[] { "BackgroundColor",PropertyNames.PROPERTY_BORDER,PropertyNames.PROPERTY_HEIGHT,PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, "Tabstop", PropertyNames.PROPERTY_WIDTH},
+ new Object[] { new Integer(-1), new Short((short)0),14,"file:///c:/bludisk.gif", new Integer(97 + i * 20 + 7 ),147,Boolean.FALSE,INTEGERS[5],Boolean.FALSE,14});
*/
}
/**
- * renders the images and titles of
+ * renders the images and titles of
* the layouts
* @author rpiterman
-
+
*/
private class LayoutRenderer implements ImageList.IImageRenderer
{
@@ -926,7 +926,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC
public String render(Object listItem)
{
- return listItem == null ? "" : ((CGLayout) listItem).cp_Name;
+ return listItem == null ? PropertyNames.EMPTY_STRING : ((CGLayout) listItem).cp_Name;
}
}
}
diff --git a/wizards/com/sun/star/wizards/web/WebWizardDialogResources.java b/wizards/com/sun/star/wizards/web/WebWizardDialogResources.java
index c4a4f0cf58cd..6019cbe71ac6 100644
--- a/wizards/com/sun/star/wizards/web/WebWizardDialogResources.java
+++ b/wizards/com/sun/star/wizards/web/WebWizardDialogResources.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -189,8 +189,8 @@ public class WebWizardDialogResources
{
oResource = _oResource;
/**
- * Delete the String, uncomment the getResText method
- *
+ * Delete the String, uncomment the getResText method
+ *
*/
resWebWizardDialog_title = oResource.getResText(RID_WEBWIZARDDIALOG_START + 1);
reslblIntroduction_value = oResource.getResText(RID_WEBWIZARDDIALOG_START + 2);
diff --git a/wizards/com/sun/star/wizards/web/data/CGArgument.java b/wizards/com/sun/star/wizards/web/data/CGArgument.java
index 2ae2c70ce69c..dc21e21e0812 100644
--- a/wizards/com/sun/star/wizards/web/data/CGArgument.java
+++ b/wizards/com/sun/star/wizards/web/data/CGArgument.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/data/CGContent.java b/wizards/com/sun/star/wizards/web/data/CGContent.java
index 9bf32f26ff48..4607e269b83f 100644
--- a/wizards/com/sun/star/wizards/web/data/CGContent.java
+++ b/wizards/com/sun/star/wizards/web/data/CGContent.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/data/CGDesign.java b/wizards/com/sun/star/wizards/web/data/CGDesign.java
index 00c1ea10b949..c4e58c1f3b63 100644
--- a/wizards/com/sun/star/wizards/web/data/CGDesign.java
+++ b/wizards/com/sun/star/wizards/web/data/CGDesign.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -72,7 +72,7 @@ public class CGDesign extends ConfigGroup implements XMLProvider
public void setStyle(short[] newStyle)
{
- Object o = ((CGStyle) ((CGSettings) root).cp_Styles.getElementAt(newStyle[0]));
+ Object o = ((CGSettings) root).cp_Styles.getElementAt(newStyle[0]);
cp_Style = (String) ((CGSettings) root).cp_Styles.getKey(o);
}
diff --git a/wizards/com/sun/star/wizards/web/data/CGDocument.java b/wizards/com/sun/star/wizards/web/data/CGDocument.java
index 765e49d1f6ee..1eed6844ae64 100644
--- a/wizards/com/sun/star/wizards/web/data/CGDocument.java
+++ b/wizards/com/sun/star/wizards/web/data/CGDocument.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -72,20 +72,20 @@ public class CGDocument extends ConfigSetItem implements XMLProvider
public static final int PAGE_TYPE_UNKNOWN = 0;
public static final int PAGE_TYPE_PAGE = 1;
public static final int PAGE_TYPE_SLIDE = 2;
- public String cp_Title = "";
- public String cp_Description = "";
+ public String cp_Title = PropertyNames.EMPTY_STRING;
+ public String cp_Description = PropertyNames.EMPTY_STRING;
public String cp_URL;
- public String cp_Author = "";
+ public String cp_Author = PropertyNames.EMPTY_STRING;
public String cp_Exporter;
/**
* the destination filename to which this
* document will be exported to.
*/
- public String localFilename = "";
- public String urlFilename = "";
- public String title = "";
- public String description = "";
- public String author = "";
+ public String localFilename = PropertyNames.EMPTY_STRING;
+ public String urlFilename = PropertyNames.EMPTY_STRING;
+ public String title = PropertyNames.EMPTY_STRING;
+ public String description = PropertyNames.EMPTY_STRING;
+ public String author = PropertyNames.EMPTY_STRING;
public DateTime createDate;
public DateTime updateDate;
public int sizeBytes = -1;
@@ -93,7 +93,7 @@ public class CGDocument extends ConfigSetItem implements XMLProvider
/**
* The contents subdirectory name in which the document is in.
* This subdirectory will be created in the content's "docs"
- * subdirectory.
+ * subdirectory.
*/
public String dirName;
/**
@@ -124,7 +124,7 @@ public class CGDocument extends ConfigSetItem implements XMLProvider
cp_URL = getSettings().getFileAccess(xmsf).getURL(url);
if (task == null)
{
- task = new Task("", "", 5);
+ task = new Task(PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, 5);
}
validate(xmsf, task);
}
@@ -159,7 +159,7 @@ public class CGDocument extends ConfigSetItem implements XMLProvider
task.advance(true); //2
- String path = getSettings().getFileAccess(xmsf).getPath(cp_URL, "");
+ String path = getSettings().getFileAccess(xmsf).getPath(cp_URL, PropertyNames.EMPTY_STRING);
localFilename = FileAccess.getFilename(path, File.separator);
/* if the type is a star office convertable document
@@ -177,11 +177,11 @@ public class CGDocument extends ConfigSetItem implements XMLProvider
props[0] = Properties.createProperty("Hidden", Boolean.TRUE);
props[1] = Properties.createProperty("MacroExecutionMode", new Short(MacroExecMode.NEVER_EXECUTE));
props[2] = Properties.createProperty("UpdateDocMode", new Short(UpdateDocMode.NO_UPDATE));
- XComponent component = ((XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop)).loadComponentFromURL(cp_URL, "_default", 0, props);
- xProps = ((XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, component)).getDocumentProperties();
+ XComponent component = UnoRuntime.queryInterface(XComponentLoader.class, desktop).loadComponentFromURL(cp_URL, "_default", 0, props);
+ xProps = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, component).getDocumentProperties();
}
- task.advance(true); //4
+ task.advance(true); //4
//now use the object to read some document properties.
if (xProps != null)
@@ -202,23 +202,23 @@ public class CGDocument extends ConfigSetItem implements XMLProvider
valid = true;
- if (cp_Title.equals(""))
+ if (cp_Title.equals(PropertyNames.EMPTY_STRING))
{
cp_Title = title;
}
- if (cp_Title.equals(""))
+ if (cp_Title.equals(PropertyNames.EMPTY_STRING))
{
cp_Title = localFilename;
}
- if (cp_Description.equals(""))
+ if (cp_Description.equals(PropertyNames.EMPTY_STRING))
{
cp_Description = description;
}
- if (cp_Author.equals(""))
+ if (cp_Author.equals(PropertyNames.EMPTY_STRING))
{
cp_Author = author;
}
- if (cp_Exporter == null || cp_Exporter.equals(""))
+ if (cp_Exporter == null || cp_Exporter.equals(PropertyNames.EMPTY_STRING))
{
cp_Exporter = (String) getSettings().cp_Exporters.getKey(
getSettings().getExporters(appType)[0]);
@@ -237,30 +237,30 @@ public class CGDocument extends ConfigSetItem implements XMLProvider
}
String media = (mediaDesc == null)
- ? "" : (String) Properties.getPropertyValue(mediaDescriptor, PropertyNames.PROPERTY_NAME);
+ ? PropertyNames.EMPTY_STRING : (String) Properties.getPropertyValue(mediaDescriptor, PropertyNames.PROPERTY_NAME);
appType = getDocType(media);
//System.out.println(appType);
isSOOpenable =
- (appType == TypeDetection.WRITER_DOC || appType == TypeDetection.CALC_DOC || appType == TypeDetection.IMPRESS_DOC || appType == TypeDetection.DRAW_DOC) || appType == TypeDetection.HTML_DOC;
+ (appType.equals(TypeDetection.WRITER_DOC) || appType.equals(TypeDetection.CALC_DOC) || appType.equals(TypeDetection.IMPRESS_DOC) || appType.equals(TypeDetection.DRAW_DOC)) || appType.equals(TypeDetection.HTML_DOC);
// String[] parts = media.split("_"); // line removed because of compatibility to JDK13
String[] parts = JavaTools.ArrayoutofString(media, "_");
- isSODocument = parts.length < 2 ? false : isSOOpenable && (parts[1].startsWith("Star"));
+ isSODocument = parts.length >= 2 && isSOOpenable && (parts[1].startsWith("Star"));
}
/**
* @param media is the media description string returned by an UNO TypeDetection object.
* @return one of the constants in the interface TypeDetection.
- *
+ *
*/
private String getDocType(String media)
{
- if (media.equals(""))
+ if (media.equals(PropertyNames.EMPTY_STRING))
{
return TypeDetection.NO_TYPE;
}
@@ -317,16 +317,16 @@ public class CGDocument extends ConfigSetItem implements XMLProvider
},
new String[]
{
- d.cp_DisplayTitle ? cp_Title : "",
- d.cp_DisplayDescription ? cp_Description : "",
- d.cp_DisplayAuthor ? cp_Author : "",
- d.cp_DisplayFileFormat ? getTargetTypeName(exp) : "",
- d.cp_DisplayFilename ? localFilename : "",
- d.cp_DisplayCreateDate ? createDate() : "",
- d.cp_DisplayUpdateDate ? updateDate() : "",
- d.cp_DisplayPages && (pages > -1) ? "" + pages() : "", //TODO when do i calculate pages?
- d.cp_DisplaySize ? sizeKB() : "",//TODO when do i calculate size?
- d.cp_DisplayFormatIcon ? getIcon(exp) : "",
+ d.cp_DisplayTitle ? cp_Title : PropertyNames.EMPTY_STRING,
+ d.cp_DisplayDescription ? cp_Description : PropertyNames.EMPTY_STRING,
+ d.cp_DisplayAuthor ? cp_Author : PropertyNames.EMPTY_STRING,
+ d.cp_DisplayFileFormat ? getTargetTypeName(exp) : PropertyNames.EMPTY_STRING,
+ d.cp_DisplayFilename ? localFilename : PropertyNames.EMPTY_STRING,
+ d.cp_DisplayCreateDate ? createDate() : PropertyNames.EMPTY_STRING,
+ d.cp_DisplayUpdateDate ? updateDate() : PropertyNames.EMPTY_STRING,
+ d.cp_DisplayPages && (pages > -1) ? PropertyNames.EMPTY_STRING + pages() : PropertyNames.EMPTY_STRING, //TODO when do i calculate pages?
+ d.cp_DisplaySize ? sizeKB() : PropertyNames.EMPTY_STRING,//TODO when do i calculate size?
+ d.cp_DisplayFormatIcon ? getIcon(exp) : PropertyNames.EMPTY_STRING,
dirName, urlFilename
});
}
@@ -335,7 +335,7 @@ public class CGDocument extends ConfigSetItem implements XMLProvider
{
if (this.updateDate == null)
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
return getSettings().formatter.formatCreated(this.updateDate);
}
@@ -344,7 +344,7 @@ public class CGDocument extends ConfigSetItem implements XMLProvider
{
if (this.createDate == null)
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
return getSettings().formatter.formatCreated(this.createDate);
}
@@ -353,7 +353,7 @@ public class CGDocument extends ConfigSetItem implements XMLProvider
{
if (sizeBytes == -1)
{
- return "";
+ return PropertyNames.EMPTY_STRING;
}
else
{
@@ -363,8 +363,8 @@ public class CGDocument extends ConfigSetItem implements XMLProvider
private String pages()
{
- return pages == -1 ? ""
- : JavaTools.replaceSubString(pagesTemplate(), "" + pages, "%NUMBER");
+ return pages == -1 ? PropertyNames.EMPTY_STRING
+ : JavaTools.replaceSubString(pagesTemplate(), PropertyNames.EMPTY_STRING + pages, "%NUMBER");
}
private String pagesTemplate()
@@ -373,26 +373,26 @@ public class CGDocument extends ConfigSetItem implements XMLProvider
switch (pagesType)
{
case PAGE_TYPE_UNKNOWN:
- return "";
+ return PropertyNames.EMPTY_STRING;
case PAGE_TYPE_PAGE:
return getSettings().resources[CGSettings.RESOURCE_PAGES_TEMPLATE];
case PAGE_TYPE_SLIDE:
return getSettings().resources[CGSettings.RESOURCE_SLIDES_TEMPLATE];
default:
- return "";
+ return PropertyNames.EMPTY_STRING;
}
}
private String getTargetTypeName(CGExporter exp)
{
- return (exp.targetTypeName.equals(""))
+ return (exp.targetTypeName.equals(PropertyNames.EMPTY_STRING))
? (String) Properties.getPropertyValue(mediaDescriptor, "UIName")
: exp.targetTypeName;
}
private String getIcon(CGExporter exporter)
{
- return exporter.cp_Icon.equals("") ? getIcon(this.appType) : exporter.cp_Icon;
+ return exporter.cp_Icon.equals(PropertyNames.EMPTY_STRING) ? getIcon(this.appType) : exporter.cp_Icon;
}
private String getIcon(String appType)
diff --git a/wizards/com/sun/star/wizards/web/data/CGExporter.java b/wizards/com/sun/star/wizards/web/data/CGExporter.java
index c23073fbed01..c5c2d1ac248a 100644
--- a/wizards/com/sun/star/wizards/web/data/CGExporter.java
+++ b/wizards/com/sun/star/wizards/web/data/CGExporter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -27,6 +27,7 @@
package com.sun.star.wizards.web.data;
import com.sun.star.wizards.common.ConfigSet;
+import com.sun.star.wizards.common.PropertyNames;
public class CGExporter extends ConfigSetItem
{
@@ -42,7 +43,7 @@ public class CGExporter extends ConfigSetItem
public String cp_TargetType;
public boolean cp_Binary;
public int cp_PageType;
- public String targetTypeName = "";
+ public String targetTypeName = PropertyNames.EMPTY_STRING;
public ConfigSet cp_Arguments = new ConfigSet(CGArgument.class);
public String toString()
@@ -52,6 +53,6 @@ public class CGExporter extends ConfigSetItem
public boolean supports(String mime)
{
- return (cp_SupportedMimeTypes.equals("") || cp_SupportedMimeTypes.indexOf(mime) > -1);
+ return (cp_SupportedMimeTypes.equals(PropertyNames.EMPTY_STRING) || cp_SupportedMimeTypes.indexOf(mime) > -1);
}
}
diff --git a/wizards/com/sun/star/wizards/web/data/CGFilter.java b/wizards/com/sun/star/wizards/web/data/CGFilter.java
index dc4f41df746b..3c93437f0f25 100644
--- a/wizards/com/sun/star/wizards/web/data/CGFilter.java
+++ b/wizards/com/sun/star/wizards/web/data/CGFilter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,6 +30,6 @@ public class CGFilter extends ConfigSetItem
{
public String cp_Name;
- //public boolean cp_Readonly;
+ //public boolean cp_Readonly;
public String cp_Filter;
}
diff --git a/wizards/com/sun/star/wizards/web/data/CGGeneralInfo.java b/wizards/com/sun/star/wizards/web/data/CGGeneralInfo.java
index c12d4c92f535..b3b80ea48c4d 100644
--- a/wizards/com/sun/star/wizards/web/data/CGGeneralInfo.java
+++ b/wizards/com/sun/star/wizards/web/data/CGGeneralInfo.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/data/CGIconSet.java b/wizards/com/sun/star/wizards/web/data/CGIconSet.java
index 197c6c3e44b5..c09936e3ea48 100644
--- a/wizards/com/sun/star/wizards/web/data/CGIconSet.java
+++ b/wizards/com/sun/star/wizards/web/data/CGIconSet.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/data/CGImage.java b/wizards/com/sun/star/wizards/web/data/CGImage.java
index e6d459bf48d5..d9e2e520b6ec 100644
--- a/wizards/com/sun/star/wizards/web/data/CGImage.java
+++ b/wizards/com/sun/star/wizards/web/data/CGImage.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/data/CGLayout.java b/wizards/com/sun/star/wizards/web/data/CGLayout.java
index 9d9557c1615a..18443014c902 100644
--- a/wizards/com/sun/star/wizards/web/data/CGLayout.java
+++ b/wizards/com/sun/star/wizards/web/data/CGLayout.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/data/CGPublish.java b/wizards/com/sun/star/wizards/web/data/CGPublish.java
index 1a3746a3873d..ee43328dce7d 100644
--- a/wizards/com/sun/star/wizards/web/data/CGPublish.java
+++ b/wizards/com/sun/star/wizards/web/data/CGPublish.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -27,6 +27,7 @@
package com.sun.star.wizards.web.data;
import com.sun.star.wizards.common.ConfigGroup;
+import com.sun.star.wizards.common.PropertyNames;
/**
*
@@ -82,13 +83,13 @@ public class CGPublish extends ConfigGroup
catch (Exception e)
{
e.printStackTrace();
- return "";
+ return PropertyNames.EMPTY_STRING;
}
}
private String ftpURL()
{
return "ftp://" + cp_Username +
- ((password != null && password.length() > 0) ? ":" + password : "") + "@" + cp_URL.substring(7);
+ ((password != null && password.length() > 0) ? ":" + password : PropertyNames.EMPTY_STRING) + "@" + cp_URL.substring(7);
}
}
diff --git a/wizards/com/sun/star/wizards/web/data/CGSession.java b/wizards/com/sun/star/wizards/web/data/CGSession.java
index 3acd570b7878..98d362cc6a31 100644
--- a/wizards/com/sun/star/wizards/web/data/CGSession.java
+++ b/wizards/com/sun/star/wizards/web/data/CGSession.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/data/CGSessionName.java b/wizards/com/sun/star/wizards/web/data/CGSessionName.java
index 77cde79a8ca2..d9957c93c0a4 100644
--- a/wizards/com/sun/star/wizards/web/data/CGSessionName.java
+++ b/wizards/com/sun/star/wizards/web/data/CGSessionName.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/data/CGSettings.java b/wizards/com/sun/star/wizards/web/data/CGSettings.java
index ecc538b9fa83..c52b4cf9cdd8 100644
--- a/wizards/com/sun/star/wizards/web/data/CGSettings.java
+++ b/wizards/com/sun/star/wizards/web/data/CGSettings.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -83,8 +83,8 @@ public class CGSettings extends ConfigGroup
xmsf = xmsf_;
try
{
- soTemplateDir = FileAccess.getOfficePath(xmsf, "Config", "", "");
- soGalleryDir = FileAccess.getOfficePath(xmsf, "Gallery", "share", "");
+ soTemplateDir = FileAccess.getOfficePath(xmsf, "Config", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING);
+ soGalleryDir = FileAccess.getOfficePath(xmsf, "Gallery", "share", PropertyNames.EMPTY_STRING);
root = this;
formatter = new Formatter(xmsf, document);
resources = resources_;
@@ -124,7 +124,7 @@ public class CGSettings extends ConfigGroup
}
}
}
- return (CGExporter[]) v.toArray(EMPTY_ARRAY_1);
+ return (CGExporter[]) v.toArray(new CGExporter[v.size()]);
}
/**
@@ -141,7 +141,7 @@ public class CGSettings extends ConfigGroup
private void calcExportersTargetTypeNames(XMultiServiceFactory xmsf) throws Exception
{
Object typeDetect = xmsf.createInstance("com.sun.star.document.TypeDetection");
- XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, typeDetect);
+ XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, typeDetect);
for (int i = 0; i < cp_Exporters.getSize(); i++)
{
calcExporterTargetTypeName(xNameAccess, (CGExporter) cp_Exporters.getElementAt(i));
@@ -152,7 +152,7 @@ public class CGSettings extends ConfigGroup
throws NoSuchElementException,
WrappedTargetException
{
- if (!exporter.cp_TargetType.equals(""))
+ if (!exporter.cp_TargetType.equals(PropertyNames.EMPTY_STRING))
{
exporter.targetTypeName =
(String) Properties.getPropertyValue(
diff --git a/wizards/com/sun/star/wizards/web/data/CGStyle.java b/wizards/com/sun/star/wizards/web/data/CGStyle.java
index e6258d8c5fe1..9f1852fbaf26 100644
--- a/wizards/com/sun/star/wizards/web/data/CGStyle.java
+++ b/wizards/com/sun/star/wizards/web/data/CGStyle.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,11 +26,13 @@
************************************************************************/
package com.sun.star.wizards.web.data;
+import com.sun.star.wizards.common.PropertyNames;
+
public class CGStyle extends ConfigSetItem
{
public String cp_Name;
- //public boolean cp_Readonly;
+ //public boolean cp_Readonly;
public String cp_CssHref;
public String cp_BackgroundImage;
public String cp_IconSet;
@@ -42,7 +44,7 @@ public class CGStyle extends ConfigSetItem
public String getBackgroundUrl()
{
- if (cp_BackgroundImage == null || cp_BackgroundImage.equals(""))
+ if (cp_BackgroundImage == null || cp_BackgroundImage.equals(PropertyNames.EMPTY_STRING))
{
return null;
}
diff --git a/wizards/com/sun/star/wizards/web/data/ConfigSetItem.java b/wizards/com/sun/star/wizards/web/data/ConfigSetItem.java
index 06c11a06178e..d4c147dc86c1 100644
--- a/wizards/com/sun/star/wizards/web/data/ConfigSetItem.java
+++ b/wizards/com/sun/star/wizards/web/data/ConfigSetItem.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/data/TypeDetection.java b/wizards/com/sun/star/wizards/web/data/TypeDetection.java
index d6998ac74814..9f832361765f 100644
--- a/wizards/com/sun/star/wizards/web/data/TypeDetection.java
+++ b/wizards/com/sun/star/wizards/web/data/TypeDetection.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,19 +41,19 @@ public class TypeDetection
{
/**
- * a document which will open in writer.
+ * a document which will open in writer.
*/
public final static String WRITER_DOC = "writer";
/**
- * a document which will open in calc.
+ * a document which will open in calc.
*/
public final static String CALC_DOC = "calc";
/**
- * a document which will open in impress.
+ * a document which will open in impress.
*/
public final static String IMPRESS_DOC = "impress";
/**
- * a document which will open in draw.
+ * a document which will open in draw.
*/
public final static String DRAW_DOC = "draw";
/**
diff --git a/wizards/com/sun/star/wizards/web/export/AbstractExporter.java b/wizards/com/sun/star/wizards/web/export/AbstractExporter.java
index 97b1109add01..5382957c059a 100644
--- a/wizards/com/sun/star/wizards/web/export/AbstractExporter.java
+++ b/wizards/com/sun/star/wizards/web/export/AbstractExporter.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -73,7 +73,7 @@ public abstract class AbstractExporter implements Exporter
{
props.put("FilterData", filterData);
}
- XStorable xs = ((XStorable) UnoRuntime.queryInterface(XStorable.class, officeDocument));
+ XStorable xs = UnoRuntime.queryInterface(XStorable.class, officeDocument);
PropertyValue[] o = props.getProperties();
xs.storeToURL(targetUrl, o);
}
@@ -110,7 +110,7 @@ public abstract class AbstractExporter implements Exporter
props.put("Hidden", Boolean.TRUE);
props.put("MacroExecutionMode", new Short(MacroExecMode.NEVER_EXECUTE));
props.put("UpdateDocMode", new Short(UpdateDocMode.NO_UPDATE));
- document = ((XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop)).loadComponentFromURL(doc.cp_URL, "_blank", 0, props.getProperties());
+ document = UnoRuntime.queryInterface(XComponentLoader.class, desktop).loadComponentFromURL(doc.cp_URL, "_blank", 0, props.getProperties());
}
catch (com.sun.star.lang.IllegalArgumentException iaex)
{
@@ -134,7 +134,7 @@ public abstract class AbstractExporter implements Exporter
(XComponent) UnoRuntime.queryInterface(XComponent.class, doc));*/
try
{
- XCloseable xc = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, doc);
+ XCloseable xc = UnoRuntime.queryInterface(XCloseable.class, doc);
xc.close(false);
}
catch (Exception ex)
diff --git a/wizards/com/sun/star/wizards/web/export/ConfiguredExporter.java b/wizards/com/sun/star/wizards/web/export/ConfiguredExporter.java
index fcc2d21f57d8..fb7590c875a8 100644
--- a/wizards/com/sun/star/wizards/web/export/ConfiguredExporter.java
+++ b/wizards/com/sun/star/wizards/web/export/ConfiguredExporter.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/export/CopyExporter.java b/wizards/com/sun/star/wizards/web/export/CopyExporter.java
index c2d5501d91d0..4d89dffac956 100644
--- a/wizards/com/sun/star/wizards/web/export/CopyExporter.java
+++ b/wizards/com/sun/star/wizards/web/export/CopyExporter.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/export/Exporter.java b/wizards/com/sun/star/wizards/web/export/Exporter.java
index 90f145cf1241..43ef9275db4b 100644
--- a/wizards/com/sun/star/wizards/web/export/Exporter.java
+++ b/wizards/com/sun/star/wizards/web/export/Exporter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,12 +47,12 @@ public interface Exporter
* of a binary format.
* always use source.urlFilename as destination filename.
* @param source is a CGDocument object.
- * @param target contains the URL of a directory to which the
+ * @param target contains the URL of a directory to which the
* file should be exported to.
* @param xmsf this is a basic multiServiceFactory.
- * @param task - a task monitoring object. This should advance
+ * @param task - a task monitoring object. This should advance
* (call task.advacne(true) ) 3 times, while exporting.
- *
+ *
*/
public boolean export(CGDocument source, String targetDirectory, XMultiServiceFactory xmsf, Task task) throws IOException;
diff --git a/wizards/com/sun/star/wizards/web/export/FilterExporter.java b/wizards/com/sun/star/wizards/web/export/FilterExporter.java
index 8ff666d5ec87..58516d59e588 100644
--- a/wizards/com/sun/star/wizards/web/export/FilterExporter.java
+++ b/wizards/com/sun/star/wizards/web/export/FilterExporter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.java b/wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.java
index 698bf7f44c53..9fa0816482ce 100644
--- a/wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.java
+++ b/wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,9 +42,9 @@ import com.sun.star.wizards.web.data.CGSession;
public class ImpressHTMLExporter extends ConfiguredExporter
{
- private static final Integer SMALL_IMAGE = new Integer(512);
- private static final Integer MEDIUM_IMAGE = new Integer(640);
- private static final Integer LARGE_IMAGE = new Integer(800);
+ private static final Integer SMALL_IMAGE = 512;
+ private static final Integer MEDIUM_IMAGE = 640;
+ private static final Integer LARGE_IMAGE = 800;
public boolean export(CGDocument source, String targetDirectory, XMultiServiceFactory xmsf, Task task) throws IOException
{
diff --git a/wizards/com/sun/star/wizards/web/status/ErrorLog.java b/wizards/com/sun/star/wizards/web/status/ErrorLog.java
index a0448858c259..1a5a7ec117de 100644
--- a/wizards/com/sun/star/wizards/web/status/ErrorLog.java
+++ b/wizards/com/sun/star/wizards/web/status/ErrorLog.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/status/ErrorReporter.java b/wizards/com/sun/star/wizards/web/status/ErrorReporter.java
index 8f5eff93113c..d5c5c7bd6de6 100644
--- a/wizards/com/sun/star/wizards/web/status/ErrorReporter.java
+++ b/wizards/com/sun/star/wizards/web/status/ErrorReporter.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/status/LogTaskListener.java b/wizards/com/sun/star/wizards/web/status/LogTaskListener.java
index 00ef6b2af3b4..35fae959e2f4 100644
--- a/wizards/com/sun/star/wizards/web/status/LogTaskListener.java
+++ b/wizards/com/sun/star/wizards/web/status/LogTaskListener.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/status/Task.java b/wizards/com/sun/star/wizards/web/status/Task.java
index ca01f9562889..52c22026b46a 100644
--- a/wizards/com/sun/star/wizards/web/status/Task.java
+++ b/wizards/com/sun/star/wizards/web/status/Task.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/status/TaskEvent.java b/wizards/com/sun/star/wizards/web/status/TaskEvent.java
index 1f86e6aa18f0..a4b9d61f5d5e 100644
--- a/wizards/com/sun/star/wizards/web/status/TaskEvent.java
+++ b/wizards/com/sun/star/wizards/web/status/TaskEvent.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/com/sun/star/wizards/web/status/TaskListener.java b/wizards/com/sun/star/wizards/web/status/TaskListener.java
index 25d89e9d111b..ac510251b84e 100644
--- a/wizards/com/sun/star/wizards/web/status/TaskListener.java
+++ b/wizards/com/sun/star/wizards/web/status/TaskListener.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/prj/build.lst b/wizards/prj/build.lst
index 0b8b1e0fc21f..09c8333baa47 100644
--- a/wizards/prj/build.lst
+++ b/wizards/prj/build.lst
@@ -1,4 +1,4 @@
-wz wizards : TRANSLATIONS:translations rsc javaunohelper unoil LIBXSLT:libxslt NULL
+wz wizards : TRANSLATIONS:translations DESKTOP:rsc javaunohelper unoil LIBXSLT:libxslt NULL
wz wizards\util nmake - all wz_util NULL
wz wizards\source\config nmake - all wz_config NULL
wz wizards\source\configshare nmake - all wz_configshare NULL
diff --git a/wizards/prj/d.lst b/wizards/prj/d.lst
index f8ab876ba1c1..4b00b6ed5b45 100644
--- a/wizards/prj/d.lst
+++ b/wizards/prj/d.lst
@@ -1,23 +1,23 @@
-mkdir: %COMMON_DEST%\bin%_EXT%\hid
-mkdir: %_DEST%\pck%_EXT%
-..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid
-..\%__SRC%\bin\*.zip %_DEST%\pck%_EXT%\*.zip
- ..\%__SRC%\bin\wzi*.res %_DEST%\bin%_EXT%\wzi*.res
-..\%__SRC%\bin\dbw*.res %_DEST%\bin%_EXT%\dbw*.res
-..\%__SRC%\bin\tpl*.res %_DEST%\bin%_EXT%\tpl*.res
-..\%__SRC%\bin\imp*.res %_DEST%\bin%_EXT%\imp*.res
-..\%__SRC%\bin\wwz*.res %_DEST%\bin%_EXT%\wwz*.res
-..\%__SRC%\bin\eur*.res %_DEST%\bin%_EXT%\eur*.res
-..\%__SRC%\bin\cal*.res %_DEST%\bin%_EXT%\cal*.res
-..\%__SRC%\bin\com*.res %_DEST%\bin%_EXT%\com*.res
-REM ..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
+mkdir: %COMMON_DEST%\bin\hid
+mkdir: %_DEST%\pck
+..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin\hid\*.hid
+..\%__SRC%\bin\*.zip %_DEST%\pck\*.zip
+ ..\%__SRC%\bin\wzi*.res %_DEST%\bin\wzi*.res
+..\%__SRC%\bin\dbw*.res %_DEST%\bin\dbw*.res
+..\%__SRC%\bin\tpl*.res %_DEST%\bin\tpl*.res
+..\%__SRC%\bin\imp*.res %_DEST%\bin\imp*.res
+..\%__SRC%\bin\wwz*.res %_DEST%\bin\wwz*.res
+..\%__SRC%\bin\eur*.res %_DEST%\bin\eur*.res
+..\%__SRC%\bin\cal*.res %_DEST%\bin\cal*.res
+..\%__SRC%\bin\com*.res %_DEST%\bin\com*.res
+REM ..\%__SRC%\bin\*.res %_DEST%\bin\*.res
-..\%__SRC%\class\*.jar %_DEST%\bin%_EXT%\*.jar
-..\%__SRC%\misc\agenda.component %_DEST%\xml%_EXT%\agenda.component
-..\%__SRC%\misc\fax.component %_DEST%\xml%_EXT%\fax.component
-..\%__SRC%\misc\form.component %_DEST%\xml%_EXT%\form.component
-..\%__SRC%\misc\letter.component %_DEST%\xml%_EXT%\letter.component
-..\%__SRC%\misc\query.component %_DEST%\xml%_EXT%\query.component
-..\%__SRC%\misc\report.component %_DEST%\xml%_EXT%\report.component
-..\%__SRC%\misc\table.component %_DEST%\xml%_EXT%\table.component
-..\%__SRC%\misc\web.component %_DEST%\xml%_EXT%\web.component
+..\%__SRC%\class\*.jar %_DEST%\bin\*.jar
+..\%__SRC%\misc\agenda.component %_DEST%\xml\agenda.component
+..\%__SRC%\misc\fax.component %_DEST%\xml\fax.component
+..\%__SRC%\misc\form.component %_DEST%\xml\form.component
+..\%__SRC%\misc\letter.component %_DEST%\xml\letter.component
+..\%__SRC%\misc\query.component %_DEST%\xml\query.component
+..\%__SRC%\misc\report.component %_DEST%\xml\report.component
+..\%__SRC%\misc\table.component %_DEST%\xml\table.component
+..\%__SRC%\misc\web.component %_DEST%\xml\web.component
diff --git a/wizards/source/euro/euro.src b/wizards/source/euro/euro.src
index 257632f8bbb4..86fd356ed175 100644
--- a/wizards/source/euro/euro.src
+++ b/wizards/source/euro/euro.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/source/formwizard/dbwizres.src b/wizards/source/formwizard/dbwizres.src
index c04d77b9fcdd..160bb08d90db 100644
--- a/wizards/source/formwizard/dbwizres.src
+++ b/wizards/source/formwizard/dbwizres.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -25,34 +25,34 @@
*
************************************************************************/// common
-#define RID_COMMON_START 500
-#define RID_DB_COMMON_START 1000
+#define RID_COMMON_START 500
+#define RID_DB_COMMON_START 1000
// db wizards
-#define RID_DB_FORM_WIZARD_START 2200
-#define RID_DB_QUERY_WIZARD_START 2300
-#define RID_DB_REPORT_WIZARD_START 2400
-#define RID_DB_TABLE_WIZARD_START 2500
+#define RID_DB_FORM_WIZARD_START 2200
+#define RID_DB_QUERY_WIZARD_START 2300
+#define RID_DB_REPORT_WIZARD_START 2400
+#define RID_DB_TABLE_WIZARD_START 2500
-#define RID_LETTERWIZARDDIALOG_START 3000
-#define RID_LETTERWIZARDGREETING_START 3080
-#define RID_LETTERWIZARDSALUTATION_START 3090
-#define RID_LETTERWIZARDROADMAP_START 3100
-#define RID_LETTERWIZARDLANGUAGE_START 3110
+#define RID_LETTERWIZARDDIALOG_START 3000
+#define RID_LETTERWIZARDGREETING_START 3080
+#define RID_LETTERWIZARDSALUTATION_START 3090
+#define RID_LETTERWIZARDROADMAP_START 3100
+#define RID_LETTERWIZARDLANGUAGE_START 3110
-#define RID_FAXWIZARDDIALOG_START 3200
-#define RID_FAXWIZARDCOMMUNICATION_START 3270
-#define RID_FAXWIZARDGREETING_START 3280
-#define RID_FAXWIZARDSALUTATION_START 3290
-#define RID_FAXWIZARDROADMAP_START 3300
+#define RID_FAXWIZARDDIALOG_START 3200
+#define RID_FAXWIZARDCOMMUNICATION_START 3270
+#define RID_FAXWIZARDGREETING_START 3280
+#define RID_FAXWIZARDSALUTATION_START 3290
+#define RID_FAXWIZARDROADMAP_START 3300
// web wizard
-#define RID_WEBWIZARDDIALOG_START 4000
-#define RID_WEBWIZARDDIALOG_FTP 4200
+#define RID_WEBWIZARDDIALOG_START 4000
+#define RID_WEBWIZARDDIALOG_FTP 4200
// agenda wizard
@@ -1748,9 +1748,9 @@ String RID_DB_TABLE_WIZARD_START + 51
// ============================================================================
-// ============================ ======================
-// ====================== LETTER WIZARD RESOURCES ================
-// ============================ ======================
+// ============================ ======================
+// ====================== LETTER WIZARD RESOURCES ================
+// ============================ ======================
// ============================================================================
@@ -2110,9 +2110,9 @@ String RID_LETTERWIZARDROADMAP_START + 6
// ============================================================================
-// ============================ ======================
-// ====================== FAX WIZARD RESOURCES ================
-// ============================ ======================
+// ============================ ======================
+// ====================== FAX WIZARD RESOURCES ================
+// ============================ ======================
// ============================================================================
@@ -2406,9 +2406,9 @@ String RID_FAXWIZARDROADMAP_START + 5
// ============================================================================
-// ============================ ======================
-// ====================== WEB WIZARD RESOURCES ================
-// ============================ ======================
+// ============================ ======================
+// ====================== WEB WIZARD RESOURCES ================
+// ============================ ======================
// ============================================================================
@@ -3063,7 +3063,7 @@ String RID_WEBWIZARDDIALOG_START +152
// ============================================================================
-// ================= WEB WIZARD FTP DIALOG RESOURCES =============
+// ================= WEB WIZARD FTP DIALOG RESOURCES =============
// ============================================================================
@@ -3166,9 +3166,9 @@ String RID_WEBWIZARDDIALOG_FTP +18
// ============================================================================
-// ============================ ======================
-// ====================== AGENDA WIZARD RESOURCES ================
-// ============================ ======================
+// ============================ ======================
+// ====================== AGENDA WIZARD RESOURCES ================
+// ============================ ======================
// ============================================================================
String RID_AGENDAWIZARDDIALOG_START +1
diff --git a/wizards/source/imagelists/imagelists.src b/wizards/source/imagelists/imagelists.src
index aaab54be232c..ceb14497bf36 100644
--- a/wizards/source/imagelists/imagelists.src
+++ b/wizards/source/imagelists/imagelists.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -24,95 +24,95 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#define REPORTWIZARD_BASE 1000
-#define FORMWIZARD_BASE 1100
-#define WEBWIZARD_BASE 1200
+#define REPORTWIZARD_BASE 1000
+#define FORMWIZARD_BASE 1100
+#define WEBWIZARD_BASE 1200
-#define IMG_REPORT_ORIENTATION_PORTRAIT REPORTWIZARD_BASE + 0
+#define IMG_REPORT_ORIENTATION_PORTRAIT REPORTWIZARD_BASE + 0
Image IMG_REPORT_ORIENTATION_PORTRAIT
{
ImageBitmap = Bitmap { File = "portrait_32.png"; };
};
-#define IMG_REPORT_ORIENTATION_LANDSCAPE REPORTWIZARD_BASE + 2
+#define IMG_REPORT_ORIENTATION_LANDSCAPE REPORTWIZARD_BASE + 2
Image IMG_REPORT_ORIENTATION_LANDSCAPE
{
ImageBitmap = Bitmap { File = "landscape_32.png"; };
};
-#define IMG_FORM_ARRANGELISTSIDE FORMWIZARD_BASE + 0
+#define IMG_FORM_ARRANGELISTSIDE FORMWIZARD_BASE + 0
Image IMG_FORM_ARRANGELISTSIDE
{
ImageBitmap = Bitmap { File = "formarrangelistside_42.png"; };
};
-#define IMG_FORM_ARRANGELISTTOP FORMWIZARD_BASE + 2
+#define IMG_FORM_ARRANGELISTTOP FORMWIZARD_BASE + 2
Image IMG_FORM_ARRANGELISTTOP
{
ImageBitmap = Bitmap { File = "formarrangelisttop_42.png"; };
};
-#define IMG_FORM_ARRANGETABLE FORMWIZARD_BASE + 4
+#define IMG_FORM_ARRANGETABLE FORMWIZARD_BASE + 4
Image IMG_FORM_ARRANGETABLE
{
ImageBitmap = Bitmap { File = "formarrangetable_42.png"; };
};
-#define IMG_FORM_ARRANGEFREE FORMWIZARD_BASE + 6
+#define IMG_FORM_ARRANGEFREE FORMWIZARD_BASE + 6
Image IMG_FORM_ARRANGEFREE
{
ImageBitmap = Bitmap { File = "formarrangefree_42.png"; };
};
-#define IMG_WEB_LAYOUT_TABLE3 WEBWIZARD_BASE + 0
+#define IMG_WEB_LAYOUT_TABLE3 WEBWIZARD_BASE + 0
Image IMG_WEB_LAYOUT_TABLE3
{
ImageBitmap = Bitmap { File = "table_3.png"; };
};
-#define IMG_WEB_LAYOUT_TABLE2 WEBWIZARD_BASE + 2
+#define IMG_WEB_LAYOUT_TABLE2 WEBWIZARD_BASE + 2
Image IMG_WEB_LAYOUT_TABLE2
{
ImageBitmap = Bitmap { File = "table_2.png"; };
};
-#define IMG_WEB_LAYOUT_SIMPLE WEBWIZARD_BASE + 4
+#define IMG_WEB_LAYOUT_SIMPLE WEBWIZARD_BASE + 4
Image IMG_WEB_LAYOUT_SIMPLE
{
ImageBitmap = Bitmap { File = "simple.png"; };
};
-#define IMG_WEB_LAYOUT_DIAGONAL WEBWIZARD_BASE + 6
+#define IMG_WEB_LAYOUT_DIAGONAL WEBWIZARD_BASE + 6
Image IMG_WEB_LAYOUT_DIAGONAL
{
ImageBitmap = Bitmap { File = "diagonal.png"; };
};
-#define IMG_WEB_LAYOUT_ZIGZAG WEBWIZARD_BASE + 8
+#define IMG_WEB_LAYOUT_ZIGZAG WEBWIZARD_BASE + 8
Image IMG_WEB_LAYOUT_ZIGZAG
{
ImageBitmap = Bitmap { File = "zigzag.png"; };
};
-#define IMG_WEB_LAYOUT_FRAMELEFT WEBWIZARD_BASE + 10
+#define IMG_WEB_LAYOUT_FRAMELEFT WEBWIZARD_BASE + 10
Image IMG_WEB_LAYOUT_FRAMELEFT
{
ImageBitmap = Bitmap { File = "frame_left.png"; };
};
-#define IMG_WEB_LAYOUT_FRAMERIGHT WEBWIZARD_BASE + 12
+#define IMG_WEB_LAYOUT_FRAMERIGHT WEBWIZARD_BASE + 12
Image IMG_WEB_LAYOUT_FRAMERIGHT
{
ImageBitmap = Bitmap { File = "frame_right.png"; };
};
-#define IMG_WEB_LAYOUT_FRAMETOP WEBWIZARD_BASE + 14
+#define IMG_WEB_LAYOUT_FRAMETOP WEBWIZARD_BASE + 14
Image IMG_WEB_LAYOUT_FRAMETOP
{
ImageBitmap = Bitmap { File = "frame_top.png"; };
};
-#define IMG_WEB_LAYOUT_FRAMEBOTTOM WEBWIZARD_BASE + 16
+#define IMG_WEB_LAYOUT_FRAMEBOTTOM WEBWIZARD_BASE + 16
Image IMG_WEB_LAYOUT_FRAMEBOTTOM
{
ImageBitmap = Bitmap { File = "frame_bottom.png"; };
diff --git a/wizards/source/importwizard/FilesModul.xba b/wizards/source/importwizard/FilesModul.xba
index cb999252b24c..e35e0b3a3ba9 100644
--- a/wizards/source/importwizard/FilesModul.xba
+++ b/wizards/source/importwizard/FilesModul.xba
@@ -41,6 +41,7 @@ Dim NewContentList() as String
Dim XMLTemplateContentString as String
Dim ApplIndex as Integer
Dim bAssignFileName as Boolean
+Dim bInterruptSearch as Boolean
bInterruptSearch = False
For i = 0 To MaxCollectIndex
SearchDir = PathCollection(i,0)
diff --git a/wizards/source/importwizard/importwi.src b/wizards/source/importwizard/importwi.src
index daddcc284642..d8cc204889a2 100644
--- a/wizards/source/importwizard/importwi.src
+++ b/wizards/source/importwizard/importwi.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -23,11 +23,11 @@
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
- ************************************************************************/#define sHelpButton 1000
-#define sCancelButton 1001
-#define sBackButton 1002
-#define sNextButton 1003
-#define sBeginButton 1004
+ ************************************************************************/#define sHelpButton 1000
+#define sCancelButton 1001
+#define sBackButton 1002
+#define sNextButton 1003
+#define sBeginButton 1004
#define sCloseButton 1005
#define sWelcometextLabel1 1006
#define sWelcometextLabel2 1007
@@ -45,9 +45,9 @@
#define sTextImportLabel 1033
#define sTextExportLabel 1034
#define sGroupnameDefault 1036
-#define sProgressDesc1 1039
-#define sProgressOneDoc 1040
-#define sProgressMoreDocs 1041
+#define sProgressDesc1 1039
+#define sProgressOneDoc 1040
+#define sProgressMoreDocs 1041
#define sProgressMoreTemplates 1042
#define sNoDirCreation 1050
#define sMsgDirNotThere 1051
@@ -67,8 +67,8 @@
#define sPathErrorStarDoc_1_ 1065
#define sPathErrorStarDoc_2_ 1066
#define sPathErrorStarDoc_3_ 1067
-#define sOverwriteallFiles 1070
-#define sreeditMacro 1071
+#define sOverwriteallFiles 1070
+#define sreeditMacro 1071
#define scouldNotsaveDocument 1072
#define scouldNotopenDocument 1073
#define sPathDialogMessage 1080
@@ -95,7 +95,7 @@
#define sCreateLogfile 2032
#define sLogfileHelpText 2033
#define sLogfileSummary 2034
-#define sshowLogfile 2035
+#define sshowLogfile 2035
#define sSumInclusiveSubDir 3000
#define sSumSaveDokumente 3001
diff --git a/wizards/source/schedule/schedule.src b/wizards/source/schedule/schedule.src
index beabe83cf2a4..3116f0f41131 100644
--- a/wizards/source/schedule/schedule.src
+++ b/wizards/source/schedule/schedule.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -24,53 +24,53 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/// Dialog labels start at 1000
-#define dlgCalTitle 1000
-#define dlgCalTitleBack 1001
-#define dlgCalTitleOwnData 1002
-#define dlgSchdlTitle 1003
-#define dlgOK 1004
-#define dlgCancel 1005
-#define dlgCalFrameOption 1006
-#define dlgCalOptionYear 1007
-#define dlgCalOptionMonth 1008
-#define dlgSchdlDescription 1009
-#define dlgSchdlCountry 1010
-#define dlgTime 1011
-#define dlgYear 1012
-#define dlgCalMonth 1013
-#define dlgSpecificBankholidays 1014
-#define dlgCalOwnData 1015
-#define dlgCalInsert 1016
-#define dlgCalDelete 1017
-#define dlgCalNewEvent 1018
-#define dlgCalEvent 1019
-#define dlgCalEventOnce 1020
-#define dlgCalEventDay 1021
-#define dlgCalEventMonth 1022
-#define dlgCalEventYear 1023
+#define dlgCalTitle 1000
+#define dlgCalTitleBack 1001
+#define dlgCalTitleOwnData 1002
+#define dlgSchdlTitle 1003
+#define dlgOK 1004
+#define dlgCancel 1005
+#define dlgCalFrameOption 1006
+#define dlgCalOptionYear 1007
+#define dlgCalOptionMonth 1008
+#define dlgSchdlDescription 1009
+#define dlgSchdlCountry 1010
+#define dlgTime 1011
+#define dlgYear 1012
+#define dlgCalMonth 1013
+#define dlgSpecificBankholidays 1014
+#define dlgCalOwnData 1015
+#define dlgCalInsert 1016
+#define dlgCalDelete 1017
+#define dlgCalNewEvent 1018
+#define dlgCalEvent 1019
+#define dlgCalEventOnce 1020
+#define dlgCalEventDay 1021
+#define dlgCalEventMonth 1022
+#define dlgCalEventYear 1023
// Bitmap file is 1099
-#define dlgBitmapFile 1099
+#define dlgBitmapFile 1099
// Names of states start at 1100
-#define dlgState 1100
+#define dlgState 1100
// Months start at 1200
-#define dlgMonth 1200
+#define dlgMonth 1200
// Messages start at 1300
-#define msgCalErrorTitle 1300
-#define msgCalError 1301
-#define msgCalRemoveTitle 1302
-#define msgCalRemove 1303
+#define msgCalErrorTitle 1300
+#define msgCalError 1301
+#define msgCalRemoveTitle 1302
+#define msgCalRemove 1303
// Styles start at 1400
-#define stlWorkday 1400
-#define stlWeekend 1401
+#define stlWorkday 1400
+#define stlWeekend 1401
// Sheet names start at 1410
-#define nameCalYear 1410
-#define nameCalMonth 1411
+#define nameCalYear 1410
+#define nameCalMonth 1411
#define sProgress 1500
diff --git a/wizards/source/template/template.src b/wizards/source/template/template.src
index 61e57f5cc053..a063a3c30f9a 100644
--- a/wizards/source/template/template.src
+++ b/wizards/source/template/template.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -23,16 +23,16 @@
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
- ************************************************************************/#define SAMPLES 1000
-#define STYLES 1100
-#define AgendaDlgName 1200
-#define AgendaDlgNoCancel 1201
-#define AgendaDlgFrame 1202
-#define AgendaDlgButton1 1203
-#define AgendaDlgButton2 1204
-#define CorrespondenceNoTextmark 1300
-#define CorrespondenceMsgError 1302
-#define CorrespondenceDialog 1303
+ ************************************************************************/#define SAMPLES 1000
+#define STYLES 1100
+#define AgendaDlgName 1200
+#define AgendaDlgNoCancel 1201
+#define AgendaDlgFrame 1202
+#define AgendaDlgButton1 1203
+#define AgendaDlgButton2 1204
+#define CorrespondenceNoTextmark 1300
+#define CorrespondenceMsgError 1302
+#define CorrespondenceDialog 1303
#define CorrespondenceFields 1350
#define TextField 1400
#define Newsletter 1450
diff --git a/wizards/source/webwizard/webwizar.src b/wizards/source/webwizard/webwizar.src
index 19d77d89f4a9..b7bb7dd3b1d2 100644
--- a/wizards/source/webwizard/webwizar.src
+++ b/wizards/source/webwizard/webwizar.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/wizards/util/helpids.h b/wizards/util/helpids.h
index 8b40214ceda6..c0376f962557 100644
--- a/wizards/util/helpids.h
+++ b/wizards/util/helpids.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,11 +29,11 @@
//40768 - 42767
/*
- * web wizard : 34200 - 34319
- * report wizard : 34320 - 34399
+ * web wizard : 34200 - 34319
+ * report wizard : 34320 - 34399
* others to be listed...
*
- * web wizard (cont.) : 41000 - 41050
+ * web wizard (cont.) : 41000 - 41050
* agenda wizard : 41051 - 41099
*/
@@ -253,7 +253,7 @@
#define HID_DLGFORM_CHKCREATESUBFORM "WIZARDS_HID_DLGFORM_CHKCREATESUBFORM"
#define HID_DLGFORM_OPTONEXISTINGRELATION "WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION"
#define HID_DLGFORM_OPTSELECTMANUALLY "WIZARDS_HID_DLGFORM_OPTSELECTMANUALLY"
-#define HID_DLGFORM_lstRELATIONS "WIZARDS_HID_DLGFORM_lstRELATIONS"
+#define HID_DLGFORM_lstRELATIONS "WIZARDS_HID_DLGFORM_lstRELATIONS"
#define HID_DLGFORM_SUB_LBTABLES "WIZARDS_HID_DLGFORM_SUB_LBTABLES"
@@ -405,7 +405,7 @@
#define HID_DLGCONVERT_OPTIONBUTTON2 "WIZARDS_HID_DLGCONVERT_OPTIONBUTTON2"
#define HID_DLGCONVERT_OPTIONBUTTON3 "WIZARDS_HID_DLGCONVERT_OPTIONBUTTON3"
#define HID_DLGCONVERT_OPTIONBUTTON4 "WIZARDS_HID_DLGCONVERT_OPTIONBUTTON4"
-#define HID_DLGCONVERT_LISTBOX1 "WIZARDS_HID_DLGCONVERT_LISTBOX1"
+#define HID_DLGCONVERT_LISTBOX1 "WIZARDS_HID_DLGCONVERT_LISTBOX1"
#define HID_DLGCONVERT_OBFILE "WIZARDS_HID_DLGCONVERT_OBFILE"
#define HID_DLGCONVERT_OBDIR "WIZARDS_HID_DLGCONVERT_OBDIR"
#define HID_DLGCONVERT_COMBOBOX1 "WIZARDS_HID_DLGCONVERT_COMBOBOX1"
diff --git a/wizards/util/hidother.src b/wizards/util/hidother.src
index 523dc0afdc6a..bf1953e06480 100644
--- a/wizards/util/hidother.src
+++ b/wizards/util/hidother.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,11 +30,11 @@
#include "helpids.h"
/*
- * web wizard : 34200 - 34319
- * report wizard : 34320 - 34399
+ * web wizard : 34200 - 34319
+ * report wizard : 34320 - 34399
* others to be listed...
*
- * web wizard (cont.) : 41000 - 41050
+ * web wizard (cont.) : 41000 - 41050
* agenda wizard : 41051 - 41099
*/
@@ -46,205 +46,205 @@
// ***************
//webwizardgeneralcontrols
-// #define HID0_WEBWIZARD 34200
+// #define HID0_WEBWIZARD 34200
hidspecial HID { HelpID = HID0_WEBWIZARD; } ;
-// #define HID0_HELP 34201
+// #define HID0_HELP 34201
hidspecial HID { HelpID = HID0_HELP; } ;
-// #define HID0_NEXT 34202
+// #define HID0_NEXT 34202
hidspecial HID { HelpID = HID0_NEXT; } ;
-// #define HID0_PREV 34203
+// #define HID0_PREV 34203
hidspecial HID { HelpID = HID0_PREV; } ;
-// #define HID0_CREATE 34204
+// #define HID0_CREATE 34204
hidspecial HID { HelpID = HID0_CREATE; } ;
-// #define HID0_CANCEL 34205
+// #define HID0_CANCEL 34205
hidspecial HID { HelpID = HID0_CANCEL; } ;
-// #define HID0_STATUS_DIALOG 34206
+// #define HID0_STATUS_DIALOG 34206
hidspecial HID { HelpID = HID0_STATUS_DIALOG; } ;
//step1
-// #define HID1_LST_SESSIONS 34207
+// #define HID1_LST_SESSIONS 34207
hidspecial HID { HelpID = HID1_LST_SESSIONS; } ;
-// #define HID1_BTN_DEL_SES 34209
+// #define HID1_BTN_DEL_SES 34209
hidspecial HID { HelpID = HID1_BTN_DEL_SES; } ;
//step2
-// #define HID2_LST_DOCS 34210
+// #define HID2_LST_DOCS 34210
hidspecial HID { HelpID = HID2_LST_DOCS; } ;
-// #define HID2_BTN_ADD_DOC 34211
+// #define HID2_BTN_ADD_DOC 34211
hidspecial HID { HelpID = HID2_BTN_ADD_DOC; } ;
-// #define HID2_BTN_REM_DOC 34212
+// #define HID2_BTN_REM_DOC 34212
hidspecial HID { HelpID = HID2_BTN_REM_DOC; } ;
-// #define HID2_BTN_DOC_UP 34213
+// #define HID2_BTN_DOC_UP 34213
hidspecial HID { HelpID = HID2_BTN_DOC_UP; } ;
-// #define HID2_BTN_DOC_DOWN 34214
+// #define HID2_BTN_DOC_DOWN 34214
hidspecial HID { HelpID = HID2_BTN_DOC_DOWN; } ;
-// #define HID2_TXT_DOC_TITLE 34215
+// #define HID2_TXT_DOC_TITLE 34215
hidspecial HID { HelpID = HID2_TXT_DOC_TITLE; } ;
-// #define HID2_TXT_DOC_DESC 34216
+// #define HID2_TXT_DOC_DESC 34216
hidspecial HID { HelpID = HID2_TXT_DOC_DESC; } ;
-// #define HID2_TXT_DOC_AUTHOR 34217
+// #define HID2_TXT_DOC_AUTHOR 34217
hidspecial HID { HelpID = HID2_TXT_DOC_AUTHOR; } ;
-// #define HID2_LST_DOC_EXPORT 34218
+// #define HID2_LST_DOC_EXPORT 34218
hidspecial HID { HelpID = HID2_LST_DOC_EXPORT; } ;
-// #define HID2_STATUS_ADD_DOCS 34219
+// #define HID2_STATUS_ADD_DOCS 34219
hidspecial HID { HelpID = HID2_STATUS_ADD_DOCS; } ;
//step3
-// #define HID3_IL_LAYOUTS_IMG1 34220
+// #define HID3_IL_LAYOUTS_IMG1 34220
hidspecial HID { HelpID = HID3_IL_LAYOUTS_IMG1; } ;
-// #define HID3_IL_LAYOUTS_IMG2 34221
+// #define HID3_IL_LAYOUTS_IMG2 34221
hidspecial HID { HelpID = HID3_IL_LAYOUTS_IMG2; } ;
-// #define HID3_IL_LAYOUTS_IMG3 34222
+// #define HID3_IL_LAYOUTS_IMG3 34222
hidspecial HID { HelpID = HID3_IL_LAYOUTS_IMG3; } ;
-// #define HID3_IL_LAYOUTS_IMG4 34223
+// #define HID3_IL_LAYOUTS_IMG4 34223
hidspecial HID { HelpID = HID3_IL_LAYOUTS_IMG4; } ;
-// #define HID3_IL_LAYOUTS_IMG5 34224
+// #define HID3_IL_LAYOUTS_IMG5 34224
hidspecial HID { HelpID = HID3_IL_LAYOUTS_IMG5; } ;
-// #define HID3_IL_LAYOUTS_IMG6 34225
+// #define HID3_IL_LAYOUTS_IMG6 34225
hidspecial HID { HelpID = HID3_IL_LAYOUTS_IMG6; } ;
-// #define HID3_IL_LAYOUTS_IMG7 34226
+// #define HID3_IL_LAYOUTS_IMG7 34226
hidspecial HID { HelpID = HID3_IL_LAYOUTS_IMG7; } ;
-// #define HID3_IL_LAYOUTS_IMG8 34227
+// #define HID3_IL_LAYOUTS_IMG8 34227
hidspecial HID { HelpID = HID3_IL_LAYOUTS_IMG8; } ;
-// #define HID3_IL_LAYOUTS_IMG9 34228
+// #define HID3_IL_LAYOUTS_IMG9 34228
hidspecial HID { HelpID = HID3_IL_LAYOUTS_IMG9; } ;
-// #define HID3_IL_LAYOUTS_IMG10 34229
+// #define HID3_IL_LAYOUTS_IMG10 34229
hidspecial HID { HelpID = HID3_IL_LAYOUTS_IMG10; } ;
-// #define HID3_IL_LAYOUTS_IMG11 34230
+// #define HID3_IL_LAYOUTS_IMG11 34230
hidspecial HID { HelpID = HID3_IL_LAYOUTS_IMG11; } ;
-// #define HID3_IL_LAYOUTS_IMG12 34231
+// #define HID3_IL_LAYOUTS_IMG12 34231
hidspecial HID { HelpID = HID3_IL_LAYOUTS_IMG12; } ;
-// #define HID3_IL_LAYOUTS_IMG13 34232
+// #define HID3_IL_LAYOUTS_IMG13 34232
hidspecial HID { HelpID = HID3_IL_LAYOUTS_IMG13; } ;
-// #define HID3_IL_LAYOUTS_IMG14 34233
+// #define HID3_IL_LAYOUTS_IMG14 34233
hidspecial HID { HelpID = HID3_IL_LAYOUTS_IMG14; } ;
-// #define HID3_IL_LAYOUTS_IMG15 34234
+// #define HID3_IL_LAYOUTS_IMG15 34234
hidspecial HID { HelpID = HID3_IL_LAYOUTS_IMG15; } ;
//step4
-// #define HID4_CHK_DISPLAY_FILENAME 34235
+// #define HID4_CHK_DISPLAY_FILENAME 34235
hidspecial HID { HelpID = HID4_CHK_DISPLAY_FILENAME; } ;
-// #define HID4_CHK_DISPLAY_DESCRIPTION 34236
+// #define HID4_CHK_DISPLAY_DESCRIPTION 34236
hidspecial HID { HelpID = HID4_CHK_DISPLAY_DESCRIPTION; } ;
-// #define HID4_CHK_DISPLAY_AUTHOR 34237
+// #define HID4_CHK_DISPLAY_AUTHOR 34237
hidspecial HID { HelpID = HID4_CHK_DISPLAY_AUTHOR; } ;
-// #define HID4_CHK_DISPLAY_CR_DATE 34238
+// #define HID4_CHK_DISPLAY_CR_DATE 34238
hidspecial HID { HelpID = HID4_CHK_DISPLAY_CR_DATE; } ;
-// #define HID4_CHK_DISPLAY_UP_DATE 34239
+// #define HID4_CHK_DISPLAY_UP_DATE 34239
hidspecial HID { HelpID = HID4_CHK_DISPLAY_UP_DATE; } ;
-// #define HID4_CHK_DISPLAY_FORMAT 34240
+// #define HID4_CHK_DISPLAY_FORMAT 34240
hidspecial HID { HelpID = HID4_CHK_DISPLAY_FORMAT; } ;
-// #define HID4_CHK_DISPLAY_F_ICON 34241
+// #define HID4_CHK_DISPLAY_F_ICON 34241
hidspecial HID { HelpID = HID4_CHK_DISPLAY_F_ICON; } ;
-// #define HID4_CHK_DISPLAY_PAGES 34242
+// #define HID4_CHK_DISPLAY_PAGES 34242
hidspecial HID { HelpID = HID4_CHK_DISPLAY_PAGES; } ;
-// #define HID4_CHK_DISPLAY_SIZE 34243
+// #define HID4_CHK_DISPLAY_SIZE 34243
hidspecial HID { HelpID = HID4_CHK_DISPLAY_SIZE; } ;
-// #define HID4_GRP_OPTIMAIZE_640 34244
+// #define HID4_GRP_OPTIMAIZE_640 34244
hidspecial HID { HelpID = HID4_GRP_OPTIMAIZE_640; } ;
-// #define HID4_GRP_OPTIMAIZE_800 34245
+// #define HID4_GRP_OPTIMAIZE_800 34245
hidspecial HID { HelpID = HID4_GRP_OPTIMAIZE_800; } ;
-// #define HID4_GRP_OPTIMAIZE_1024 34246
+// #define HID4_GRP_OPTIMAIZE_1024 34246
hidspecial HID { HelpID = HID4_GRP_OPTIMAIZE_1024; } ;
//step5
-// #define HID5_LST_STYLES 34247
+// #define HID5_LST_STYLES 34247
hidspecial HID { HelpID = HID5_LST_STYLES; } ;
-// #define HID5_BTN_BACKGND 34248
+// #define HID5_BTN_BACKGND 34248
hidspecial HID { HelpID = HID5_BTN_BACKGND; } ;
-// #define HID5_BTN_ICONS 34249
+// #define HID5_BTN_ICONS 34249
hidspecial HID { HelpID = HID5_BTN_ICONS; } ;
//step6
-// #define HID6_TXT_SITE_TITLE 34250
+// #define HID6_TXT_SITE_TITLE 34250
hidspecial HID { HelpID = HID6_TXT_SITE_TITLE; } ;
-// #define HID6_TXT_SITE_DESC 34253
+// #define HID6_TXT_SITE_DESC 34253
hidspecial HID { HelpID = HID6_TXT_SITE_DESC; } ;
-// #define HID6_DATE_SITE_CREATED 34255
+// #define HID6_DATE_SITE_CREATED 34255
hidspecial HID { HelpID = HID6_DATE_SITE_CREATED; } ;
-// #define HID6_DATE_SITE_UPDATED 34256
+// #define HID6_DATE_SITE_UPDATED 34256
hidspecial HID { HelpID = HID6_DATE_SITE_UPDATED; } ;
-// #define HID6_TXT_SITE_EMAIL 34258
+// #define HID6_TXT_SITE_EMAIL 34258
hidspecial HID { HelpID = HID6_TXT_SITE_EMAIL; } ;
-// #define HID6_TXT_SITE_COPYRIGHT 34259
+// #define HID6_TXT_SITE_COPYRIGHT 34259
hidspecial HID { HelpID = HID6_TXT_SITE_COPYRIGHT; } ;
//step7
-// #define HID7_BTN_PREVIEW 34260
+// #define HID7_BTN_PREVIEW 34260
hidspecial HID { HelpID = HID7_BTN_PREVIEW; } ;
-// #define HID7_CHK_PUBLISH_LOCAL 34261
+// #define HID7_CHK_PUBLISH_LOCAL 34261
hidspecial HID { HelpID = HID7_CHK_PUBLISH_LOCAL; } ;
-// #define HID7_TXT_LOCAL 34262
+// #define HID7_TXT_LOCAL 34262
hidspecial HID { HelpID = HID7_TXT_LOCAL; } ;
-// #define HID7_BTN_LOCAL 34263
+// #define HID7_BTN_LOCAL 34263
hidspecial HID { HelpID = HID7_BTN_LOCAL; } ;
-// #define HID7_CHK_PUBLISH_ZIP 34264
+// #define HID7_CHK_PUBLISH_ZIP 34264
hidspecial HID { HelpID = HID7_CHK_PUBLISH_ZIP; } ;
-// #define HID7_TXT_ZIP 34265
+// #define HID7_TXT_ZIP 34265
hidspecial HID { HelpID = HID7_TXT_ZIP; } ;
-// #define HID7_BTN_ZIP 34266
+// #define HID7_BTN_ZIP 34266
hidspecial HID { HelpID = HID7_BTN_ZIP; } ;
-// #define HID7_CHK_PUBLISH_FTP 34267
+// #define HID7_CHK_PUBLISH_FTP 34267
hidspecial HID { HelpID = HID7_CHK_PUBLISH_FTP; } ;
-// #define HID7_TXT_FTP 34268
+// #define HID7_TXT_FTP 34268
hidspecial HID { HelpID = HID7_TXT_FTP; } ;
-// #define HID7_BTN_FTP 34269
+// #define HID7_BTN_FTP 34269
hidspecial HID { HelpID = HID7_BTN_FTP; } ;
-// #define HID7_CHK_SAVE 34270
+// #define HID7_CHK_SAVE 34270
hidspecial HID { HelpID = HID7_CHK_SAVE; } ;
-// #define HID7_TXT_SAVE 34271
+// #define HID7_TXT_SAVE 34271
hidspecial HID { HelpID = HID7_TXT_SAVE; } ;
//web wizard backgrounds dialog
-// #define HID_BG 34290
+// #define HID_BG 34290
hidspecial HID { HelpID = HID_BG; } ;
-// #define HID_BG_BTN_OTHER 34291
+// #define HID_BG_BTN_OTHER 34291
hidspecial HID { HelpID = HID_BG_BTN_OTHER; } ;
-// #define HID_BG_BTN_NONE 34292
+// #define HID_BG_BTN_NONE 34292
hidspecial HID { HelpID = HID_BG_BTN_NONE; } ;
-// #define HID_BG_BTN_OK 34293
+// #define HID_BG_BTN_OK 34293
hidspecial HID { HelpID = HID_BG_BTN_OK; } ;
-// #define HID_BG_BTN_CANCEL 34294
+// #define HID_BG_BTN_CANCEL 34294
hidspecial HID { HelpID = HID_BG_BTN_CANCEL; } ;
-// #define HID_BG_BTN_BACK 34295
+// #define HID_BG_BTN_BACK 34295
hidspecial HID { HelpID = HID_BG_BTN_BACK; } ;
-// #define HID_BG_BTN_FW 34296
+// #define HID_BG_BTN_FW 34296
hidspecial HID { HelpID = HID_BG_BTN_FW; } ;
-// #define HID_BG_BTN_IMG1 34297
+// #define HID_BG_BTN_IMG1 34297
hidspecial HID { HelpID = HID_BG_BTN_IMG1; } ;
-// #define HID_BG_BTN_IMG2 34298
+// #define HID_BG_BTN_IMG2 34298
hidspecial HID { HelpID = HID_BG_BTN_IMG2; } ;
-// #define HID_BG_BTN_IMG3 34299
+// #define HID_BG_BTN_IMG3 34299
hidspecial HID { HelpID = HID_BG_BTN_IMG3; } ;
-// #define HID_BG_BTN_IMG4 34300
+// #define HID_BG_BTN_IMG4 34300
hidspecial HID { HelpID = HID_BG_BTN_IMG4; } ;
-// #define HID_BG_BTN_IMG5 34301
+// #define HID_BG_BTN_IMG5 34301
hidspecial HID { HelpID = HID_BG_BTN_IMG5; } ;
-// #define HID_BG_BTN_IMG6 34302
+// #define HID_BG_BTN_IMG6 34302
hidspecial HID { HelpID = HID_BG_BTN_IMG6; } ;
-// #define HID_BG_BTN_IMG7 34303
+// #define HID_BG_BTN_IMG7 34303
hidspecial HID { HelpID = HID_BG_BTN_IMG7; } ;
-// #define HID_BG_BTN_IMG8 34304
+// #define HID_BG_BTN_IMG8 34304
hidspecial HID { HelpID = HID_BG_BTN_IMG8; } ;
-// #define HID_BG_BTN_IMG9 34305
+// #define HID_BG_BTN_IMG9 34305
hidspecial HID { HelpID = HID_BG_BTN_IMG9; } ;
-// #define HID_BG_BTN_IMG10 34306
+// #define HID_BG_BTN_IMG10 34306
hidspecial HID { HelpID = HID_BG_BTN_IMG10; } ;
-// #define HID_BG_BTN_IMG11 34307
+// #define HID_BG_BTN_IMG11 34307
hidspecial HID { HelpID = HID_BG_BTN_IMG11; } ;
-// #define HID_BG_BTN_IMG12 34308
+// #define HID_BG_BTN_IMG12 34308
hidspecial HID { HelpID = HID_BG_BTN_IMG12; } ;
-// #define HID_BG_BTN_IMG13 34309
+// #define HID_BG_BTN_IMG13 34309
hidspecial HID { HelpID = HID_BG_BTN_IMG13; } ;
-// #define HID_BG_BTN_IMG14 34300
+// #define HID_BG_BTN_IMG14 34300
hidspecial HID { HelpID = HID_BG_BTN_IMG14; } ;
-// #define HID_BG_BTN_IMG15 34311
+// #define HID_BG_BTN_IMG15 34311
hidspecial HID { HelpID = HID_BG_BTN_IMG15; } ;
-// #define HID_BG_BTN_IMG16 34312
+// #define HID_BG_BTN_IMG16 34312
hidspecial HID { HelpID = HID_BG_BTN_IMG16; } ;
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -256,42 +256,42 @@ hidspecial HID { HelpID = HID_BG_BTN_IMG16; } ;
// REPORT WIZARD
// *************
-// #define HID_DLGREPORT_DIALOG 34320
+// #define HID_DLGREPORT_DIALOG 34320
hidspecial HID { HelpID = HID_DLGREPORT_DIALOG; };
-// #define HID_DLGREPORT_0_CMDPREV 34322
+// #define HID_DLGREPORT_0_CMDPREV 34322
hidspecial HID { HelpID = HID_DLGREPORT_0_CMDPREV; };
-// #define HID_DLGREPORT_0_CMDNEXT 34323
+// #define HID_DLGREPORT_0_CMDNEXT 34323
hidspecial HID { HelpID = HID_DLGREPORT_0_CMDNEXT; };
-// #define HID_DLGREPORT_0_CMDFINISH 34324
+// #define HID_DLGREPORT_0_CMDFINISH 34324
hidspecial HID { HelpID = HID_DLGREPORT_0_CMDFINISH; };
-// #define HID_DLGREPORT_0_CMDCANCEL 34325
+// #define HID_DLGREPORT_0_CMDCANCEL 34325
hidspecial HID { HelpID = HID_DLGREPORT_0_CMDCANCEL; };
-// #define HID_DLGREPORT_1_LBTABLES 34330
+// #define HID_DLGREPORT_1_LBTABLES 34330
hidspecial HID { HelpID = HID_DLGREPORT_1_LBTABLES; };
-// #define HID_DLGREPORT_1_FIELDSAVAILABLE 34331
+// #define HID_DLGREPORT_1_FIELDSAVAILABLE 34331
hidspecial HID { HelpID = HID_DLGREPORT_1_FIELDSAVAILABLE; };
// #define HID_DLGREPORT_1_CMDMOVESELECTED 34332
hidspecial HID { HelpID = HID_DLGREPORT_1_CMDMOVESELECTED; };
-// #define HID_DLGREPORT_1_CMDMOVEALL 34333
+// #define HID_DLGREPORT_1_CMDMOVEALL 34333
hidspecial HID { HelpID = HID_DLGREPORT_1_CMDMOVEALL; };
// #define HID_DLGREPORT_1_CMDREMOVESELECTED 34334
hidspecial HID { HelpID = HID_DLGREPORT_1_CMDREMOVESELECTED; };
// #define HID_DLGREPORT_1_CMDREMOVEALL 34335
hidspecial HID { HelpID = HID_DLGREPORT_1_CMDREMOVEALL; };
-// #define HID_DLGREPORT_1_FIELDSSELECTED 34336
+// #define HID_DLGREPORT_1_FIELDSSELECTED 34336
hidspecial HID { HelpID = HID_DLGREPORT_1_FIELDSSELECTED; };
-// #define HID_DLGREPORT_1_CMDMOVEUP 34337
+// #define HID_DLGREPORT_1_CMDMOVEUP 34337
hidspecial HID { HelpID = HID_DLGREPORT_1_CMDMOVEUP; };
// #define HID_DLGREPORT_1_CMDMOVEDOWN 34338
hidspecial HID { HelpID = HID_DLGREPORT_1_CMDMOVEDOWN; };
-// #define HID_DLGREPORT_2_GROUPING 34340
+// #define HID_DLGREPORT_2_GROUPING 34340
hidspecial HID { HelpID = HID_DLGREPORT_2_GROUPING; };
-// #define HID_DLGREPORT_2_CMDGROUP 34341
+// #define HID_DLGREPORT_2_CMDGROUP 34341
hidspecial HID { HelpID = HID_DLGREPORT_2_CMDGROUP; };
-// #define HID_DLGREPORT_2_CMDUNGROUP 34342
+// #define HID_DLGREPORT_2_CMDUNGROUP 34342
hidspecial HID { HelpID = HID_DLGREPORT_2_CMDUNGROUP; };
// #define HID_DLGREPORT_2_PREGROUPINGDEST 34343
hidspecial HID { HelpID = HID_DLGREPORT_2_PREGROUPINGDEST; };
@@ -301,40 +301,40 @@ hidspecial HID { HelpID = HID_DLGREPORT_2_CMDMOVEUPGROUP; };
hidspecial HID { HelpID = HID_DLGREPORT_2_CMDMOVEDOWNGROUP; };
-// #define HID_DLGREPORT_3_SORT1 34346
+// #define HID_DLGREPORT_3_SORT1 34346
hidspecial HID { HelpID = HID_DLGREPORT_3_SORT1; };
-// #define HID_DLGREPORT_3_OPTASCEND1 34347
+// #define HID_DLGREPORT_3_OPTASCEND1 34347
hidspecial HID { HelpID = HID_DLGREPORT_3_OPTASCEND1; };
-// #define HID_DLGREPORT_3_OPTDESCEND1 34348
+// #define HID_DLGREPORT_3_OPTDESCEND1 34348
hidspecial HID { HelpID = HID_DLGREPORT_3_OPTDESCEND1; };
-// #define HID_DLGREPORT_3_SORT2 34349
+// #define HID_DLGREPORT_3_SORT2 34349
hidspecial HID { HelpID = HID_DLGREPORT_3_SORT2; };
-// #define HID_DLGREPORT_3_OPTASCEND2 34350
+// #define HID_DLGREPORT_3_OPTASCEND2 34350
hidspecial HID { HelpID = HID_DLGREPORT_3_OPTASCEND2; };
-// #define HID_DLGREPORT_3_OPTDESCEND2 34351
+// #define HID_DLGREPORT_3_OPTDESCEND2 34351
hidspecial HID { HelpID = HID_DLGREPORT_3_OPTDESCEND2; };
-// #define HID_DLGREPORT_3_SORT3 34352
+// #define HID_DLGREPORT_3_SORT3 34352
hidspecial HID { HelpID = HID_DLGREPORT_3_SORT3; };
-// #define HID_DLGREPORT_3_OPTASCEND3 34353
+// #define HID_DLGREPORT_3_OPTASCEND3 34353
hidspecial HID { HelpID = HID_DLGREPORT_3_OPTASCEND3; };
-// #define HID_DLGREPORT_3_OPTDESCEND3 34354
+// #define HID_DLGREPORT_3_OPTDESCEND3 34354
hidspecial HID { HelpID = HID_DLGREPORT_3_OPTDESCEND3; };
-// #define HID_DLGREPORT_3_SORT4 34355
+// #define HID_DLGREPORT_3_SORT4 34355
hidspecial HID { HelpID = HID_DLGREPORT_3_SORT4; };
-// #define HID_DLGREPORT_3_OPTASCEND4 34356
+// #define HID_DLGREPORT_3_OPTASCEND4 34356
hidspecial HID { HelpID = HID_DLGREPORT_3_OPTASCEND4; };
-// #define HID_DLGREPORT_3_OPTDESCEND4 34357
+// #define HID_DLGREPORT_3_OPTDESCEND4 34357
hidspecial HID { HelpID = HID_DLGREPORT_3_OPTDESCEND4; };
-// #define HID_DLGREPORT_4_TITLE 34362
+// #define HID_DLGREPORT_4_TITLE 34362
hidspecial HID { HelpID = HID_DLGREPORT_4_TITLE; };
-// #define HID_DLGREPORT_4_DATALAYOUT 34363
+// #define HID_DLGREPORT_4_DATALAYOUT 34363
hidspecial HID { HelpID = HID_DLGREPORT_4_DATALAYOUT; };
-// #define HID_DLGREPORT_4_PAGELAYOUT 34364
+// #define HID_DLGREPORT_4_PAGELAYOUT 34364
hidspecial HID { HelpID = HID_DLGREPORT_4_PAGELAYOUT; };
-// #define HID_DLGREPORT_4_LANDSCAPE 34365
+// #define HID_DLGREPORT_4_LANDSCAPE 34365
hidspecial HID { HelpID = HID_DLGREPORT_4_LANDSCAPE; };
-// #define HID_DLGREPORT_4_PORTRAIT 34366
+// #define HID_DLGREPORT_4_PORTRAIT 34366
hidspecial HID { HelpID = HID_DLGREPORT_4_PORTRAIT; };
// #define HID_DLGREPORT_5_OPTDYNTEMPLATE 34370
@@ -402,19 +402,19 @@ hidspecial HID { HelpID = HID_DLGFORM_MASTER_CMDREMOVESELECTED; };
hidspecial HID { HelpID = HID_DLGFORM_MASTER_CMDREMOVEALL; };
// #define HID_DLGFORM_MASTER_FIELDSSELECTED 34417
hidspecial HID { HelpID = HID_DLGFORM_MASTER_FIELDSSELECTED; };
-// #define HID_DLGFORM_MASTER_CMDMOVEUP 34418
+// #define HID_DLGFORM_MASTER_CMDMOVEUP 34418
hidspecial HID { HelpID = HID_DLGFORM_MASTER_CMDMOVEUP; };
// #define HID_DLGFORM_MASTER_CMDMOVEDOWN 34419
hidspecial HID { HelpID = HID_DLGFORM_MASTER_CMDMOVEDOWN; };
-// #define HID_DLGFORM_CHKCREATESUBFORM 34421
+// #define HID_DLGFORM_CHKCREATESUBFORM 34421
hidspecial HID { HelpID = HID_DLGFORM_CHKCREATESUBFORM; };
-// #define HID_DLGFORM_OPTONEXISTINGRELATION 34422
+// #define HID_DLGFORM_OPTONEXISTINGRELATION 34422
hidspecial HID { HelpID = HID_DLGFORM_OPTONEXISTINGRELATION; };
-// #define HID_DLGFORM_OPTSELECTMANUALLY 34423
+// #define HID_DLGFORM_OPTSELECTMANUALLY 34423
hidspecial HID { HelpID = HID_DLGFORM_OPTSELECTMANUALLY; };
-// #define HID_DLGFORM_lstRELATIONS 34424
+// #define HID_DLGFORM_lstRELATIONS 34424
hidspecial HID { HelpID = HID_DLGFORM_lstRELATIONS; };
@@ -432,27 +432,27 @@ hidspecial HID { HelpID = HID_DLGFORM_SUB_CMDREMOVESELECTED; };
hidspecial HID { HelpID = HID_DLGFORM_SUB_CMDREMOVEALL; };
// #define HID_DLGFORM_SUB_FIELDSSELECTED 34437
hidspecial HID { HelpID = HID_DLGFORM_SUB_FIELDSSELECTED; };
-// #define HID_DLGFORM_SUB_CMDMOVEUP 34438
+// #define HID_DLGFORM_SUB_CMDMOVEUP 34438
hidspecial HID { HelpID = HID_DLGFORM_SUB_CMDMOVEUP; };
// #define HID_DLGFORM_SUB_CMDMOVEDOWN 34439
hidspecial HID { HelpID = HID_DLGFORM_SUB_CMDMOVEDOWN; };
-// #define HID_DLGFORM_LINKER_LSTSLAVELINK1 34441
+// #define HID_DLGFORM_LINKER_LSTSLAVELINK1 34441
hidspecial HID { HelpID = HID_DLGFORM_LINKER_LSTSLAVELINK1; };
-// #define HID_DLGFORM_LINKER_LSTMASTERLINK1 34442
+// #define HID_DLGFORM_LINKER_LSTMASTERLINK1 34442
hidspecial HID { HelpID = HID_DLGFORM_LINKER_LSTMASTERLINK1; };
-// #define HID_DLGFORM_LINKER_LSTSLAVELINK2 34443
+// #define HID_DLGFORM_LINKER_LSTSLAVELINK2 34443
hidspecial HID { HelpID = HID_DLGFORM_LINKER_LSTSLAVELINK2; };
-// #define HID_DLGFORM_LINKER_LSTMASTERLINK2 34444
+// #define HID_DLGFORM_LINKER_LSTMASTERLINK2 34444
hidspecial HID { HelpID = HID_DLGFORM_LINKER_LSTMASTERLINK2; };
-// #define HID_DLGFORM_LINKER_LSTSLAVELINK3 34445
+// #define HID_DLGFORM_LINKER_LSTSLAVELINK3 34445
hidspecial HID { HelpID = HID_DLGFORM_LINKER_LSTSLAVELINK3; };
-// #define HID_DLGFORM_LINKER_LSTMASTERLINK3 34446
+// #define HID_DLGFORM_LINKER_LSTMASTERLINK3 34446
hidspecial HID { HelpID = HID_DLGFORM_LINKER_LSTMASTERLINK3; };
-// #define HID_DLGFORM_LINKER_LSTSLAVELINK4 34447
+// #define HID_DLGFORM_LINKER_LSTSLAVELINK4 34447
hidspecial HID { HelpID = HID_DLGFORM_LINKER_LSTSLAVELINK4; };
-// #define HID_DLGFORM_LINKER_LSTMASTERLINK4 34448
+// #define HID_DLGFORM_LINKER_LSTMASTERLINK4 34448
hidspecial HID { HelpID = HID_DLGFORM_LINKER_LSTMASTERLINK4; };
// #define HID_DLGFORM_CMDALIGNLEFT 34451
@@ -491,20 +491,20 @@ hidspecial HID { HelpID = HID_DLGFORM_CHKNODELETION; };
hidspecial HID { HelpID = HID_DLGFORM_CHKNOADDITION; };
-// #define HID_DLGFORM_LSTSTYLES 34471
+// #define HID_DLGFORM_LSTSTYLES 34471
hidspecial HID { HelpID = HID_DLGFORM_LSTSTYLES; };
-// #define HID_DLGFORM_CMDNOBORDER 34472
+// #define HID_DLGFORM_CMDNOBORDER 34472
hidspecial HID { HelpID = HID_DLGFORM_CMDNOBORDER; };
-// #define HID_DLGFORM_CMD3DBORDER 34473
+// #define HID_DLGFORM_CMD3DBORDER 34473
hidspecial HID { HelpID = HID_DLGFORM_CMD3DBORDER; };
// #define HID_DLGFORM_CMDSIMPLEBORDER 34474
hidspecial HID { HelpID = HID_DLGFORM_CMDSIMPLEBORDER; };
-// #define HID_DLGFORM_TXTPATH 34481
+// #define HID_DLGFORM_TXTPATH 34481
hidspecial HID { HelpID = HID_DLGFORM_TXTPATH; };
// #define HID_DLGFORM_OPTWORKWITHFORM 34482
hidspecial HID { HelpID = HID_DLGFORM_OPTWORKWITHFORM; };
-// #define HID_DLGFORM_OPTMODIFYFORM 34483
+// #define HID_DLGFORM_OPTMODIFYFORM 34483
hidspecial HID { HelpID = HID_DLGFORM_OPTMODIFYFORM; };
@@ -896,138 +896,138 @@ hidspecial HID { HelpID = HID_LTRWIZARD_CREATE; };
// #define HID_LTRWIZARD_CANCEL 40825
hidspecial HID { HelpID = HID_LTRWIZARD_CANCEL; };
-// #define HID_QUERYWIZARD_LSTTABLES 40850
+// #define HID_QUERYWIZARD_LSTTABLES 40850
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTTABLES; };
-// #define HID_QUERYWIZARD_LSTFIELDS 40851
+// #define HID_QUERYWIZARD_LSTFIELDS 40851
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTFIELDS; };
-// #define HID_QUERYWIZARD_CMDMOVESELECTED 40852
+// #define HID_QUERYWIZARD_CMDMOVESELECTED 40852
hidspecial HID { HelpID = HID_QUERYWIZARD_CMDMOVESELECTED; };
-// #define HID_QUERYWIZARD_CMDMOVEALL 40853
+// #define HID_QUERYWIZARD_CMDMOVEALL 40853
hidspecial HID { HelpID = HID_QUERYWIZARD_CMDMOVEALL; };
// #define HID_QUERYWIZARD_CMDREMOVESELECTED 40854
hidspecial HID { HelpID = HID_QUERYWIZARD_CMDREMOVESELECTED; };
-// #define HID_QUERYWIZARD_CMDREMOVEALL 40855
+// #define HID_QUERYWIZARD_CMDREMOVEALL 40855
hidspecial HID { HelpID = HID_QUERYWIZARD_CMDREMOVEALL; };
-// #define HID_QUERYWIZARD_LSTSELFIELDS 40856
+// #define HID_QUERYWIZARD_LSTSELFIELDS 40856
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTSELFIELDS; };
-// #define HID_QUERYWIZARD_CMDMOVEUP 40857
+// #define HID_QUERYWIZARD_CMDMOVEUP 40857
hidspecial HID { HelpID = HID_QUERYWIZARD_CMDMOVEUP; };
-// #define HID_QUERYWIZARD_CMDMOVEDOWN 40858
+// #define HID_QUERYWIZARD_CMDMOVEDOWN 40858
hidspecial HID { HelpID = HID_QUERYWIZARD_CMDMOVEDOWN; };
-// #define HID_QUERYWIZARD_SORT1 40865
+// #define HID_QUERYWIZARD_SORT1 40865
hidspecial HID { HelpID = HID_QUERYWIZARD_SORT1; };
-// #define HID_QUERYWIZARD_OPTASCEND1 40866
+// #define HID_QUERYWIZARD_OPTASCEND1 40866
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTASCEND1; };
-// #define HID_QUERYWIZARD_OPTDESCEND1 40867
+// #define HID_QUERYWIZARD_OPTDESCEND1 40867
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTDESCEND1; };
-// #define HID_QUERYWIZARD_SORT2 40868
+// #define HID_QUERYWIZARD_SORT2 40868
hidspecial HID { HelpID = HID_QUERYWIZARD_SORT2; };
-// #define HID_QUERYWIZARD_OPTASCEND2 40869
+// #define HID_QUERYWIZARD_OPTASCEND2 40869
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTASCEND2; };
-// #define HID_QUERYWIZARD_OPTDESCEND2 40870
+// #define HID_QUERYWIZARD_OPTDESCEND2 40870
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTDESCEND2; };
-// #define HID_QUERYWIZARD_SORT3 40871
+// #define HID_QUERYWIZARD_SORT3 40871
hidspecial HID { HelpID = HID_QUERYWIZARD_SORT3; };
-// #define HID_QUERYWIZARD_OPTASCEND3 40872
+// #define HID_QUERYWIZARD_OPTASCEND3 40872
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTASCEND3; };
-// #define HID_QUERYWIZARD_OPTDESCEND3 40873
+// #define HID_QUERYWIZARD_OPTDESCEND3 40873
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTDESCEND3; };
-// #define HID_QUERYWIZARD_SORT4 40874
+// #define HID_QUERYWIZARD_SORT4 40874
hidspecial HID { HelpID = HID_QUERYWIZARD_SORT4; };
-// #define HID_QUERYWIZARD_OPTASCEND4 40875
+// #define HID_QUERYWIZARD_OPTASCEND4 40875
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTASCEND4; };
-// #define HID_QUERYWIZARD_OPTDESCEND4 40876
+// #define HID_QUERYWIZARD_OPTDESCEND4 40876
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTDESCEND4; };
-// #define HID_QUERYWIZARD_OPTMATCHALL 40878
+// #define HID_QUERYWIZARD_OPTMATCHALL 40878
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTMATCHALL; };
-// #define HID_QUERYWIZARD_OPTMATCHANY 40879
+// #define HID_QUERYWIZARD_OPTMATCHANY 40879
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTMATCHANY; };
-// #define HID_QUERYWIZARD_LSTFIELDNAME_1 40880
+// #define HID_QUERYWIZARD_LSTFIELDNAME_1 40880
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTFIELDNAME_1; };
-// #define HID_QUERYWIZARD_LSTOPERATOR_1 40881
+// #define HID_QUERYWIZARD_LSTOPERATOR_1 40881
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTOPERATOR_1; };
-// #define HID_QUERYWIZARD_TXTVALUE_1 40882
+// #define HID_QUERYWIZARD_TXTVALUE_1 40882
hidspecial HID { HelpID = HID_QUERYWIZARD_TXTVALUE_1; };
-// #define HID_QUERYWIZARD_LSTFIELDNAME_2 40883
+// #define HID_QUERYWIZARD_LSTFIELDNAME_2 40883
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTFIELDNAME_2; };
-// #define HID_QUERYWIZARD_LSTOPERATOR_2 40884
+// #define HID_QUERYWIZARD_LSTOPERATOR_2 40884
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTOPERATOR_2; };
-// #define HID_QUERYWIZARD_TXTVALUE_2 40885
+// #define HID_QUERYWIZARD_TXTVALUE_2 40885
hidspecial HID { HelpID = HID_QUERYWIZARD_TXTVALUE_2; };
-// #define HID_QUERYWIZARD_LSTFIELDNAME_3 40886
+// #define HID_QUERYWIZARD_LSTFIELDNAME_3 40886
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTFIELDNAME_3; };
-// #define HID_QUERYWIZARD_LSTOPERATOR_3 40887
+// #define HID_QUERYWIZARD_LSTOPERATOR_3 40887
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTOPERATOR_3; };
-// #define HID_QUERYWIZARD_TXTVALUE_3 40888
+// #define HID_QUERYWIZARD_TXTVALUE_3 40888
hidspecial HID { HelpID = HID_QUERYWIZARD_TXTVALUE_3; };
-// #define HID_QUERYWIZARD_OPTAGGREGATEDETAILQUERY 40895
+// #define HID_QUERYWIZARD_OPTAGGREGATEDETAILQUERY 40895
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTAGGREGATEDETAILQUERY; };
-// #define HID_QUERYWIZARD_OPTAGGREGATESUMMARYQUERY 40896
+// #define HID_QUERYWIZARD_OPTAGGREGATESUMMARYQUERY 40896
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTAGGREGATESUMMARYQUERY; };
-// #define HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_1 40897
+// #define HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_1 40897
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_1; };
-// #define HID_QUERYWIZARD_LSTAGGREGATEFIELDS_1 40898
+// #define HID_QUERYWIZARD_LSTAGGREGATEFIELDS_1 40898
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTAGGREGATEFIELDS_1; };
-// #define HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_2 40899
+// #define HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_2 40899
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_2; };
-// #define HID_QUERYWIZARD_LSTAGGREGATEFIELDS_2 40900
+// #define HID_QUERYWIZARD_LSTAGGREGATEFIELDS_2 40900
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTAGGREGATEFIELDS_2; };
-// #define HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_3 40901
+// #define HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_3 40901
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_3; };
-// #define HID_QUERYWIZARD_LSTAGGREGATEFIELDS_3 40902
+// #define HID_QUERYWIZARD_LSTAGGREGATEFIELDS_3 40902
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTAGGREGATEFIELDS_3; };
-// #define HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_4 40903
+// #define HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_4 40903
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_4; };
-// #define HID_QUERYWIZARD_LSTAGGREGATEFIELDS_4 40904
+// #define HID_QUERYWIZARD_LSTAGGREGATEFIELDS_4 40904
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTAGGREGATEFIELDS_4; };
-// #define HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_5 40905
+// #define HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_5 40905
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_5; };
-// #define HID_QUERYWIZARD_LSTAGGREGATEFIELDS_5 40906
+// #define HID_QUERYWIZARD_LSTAGGREGATEFIELDS_5 40906
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTAGGREGATEFIELDS_5; };
-// #define HID_QUERYWIZARD_BTNAGGREGATEPLUS 40907
+// #define HID_QUERYWIZARD_BTNAGGREGATEPLUS 40907
hidspecial HID { HelpID = HID_QUERYWIZARD_BTNAGGREGATEPLUS; };
-// #define HID_QUERYWIZARD_BTNAGGREGATEMINUS 40908
+// #define HID_QUERYWIZARD_BTNAGGREGATEMINUS 40908
hidspecial HID { HelpID = HID_QUERYWIZARD_BTNAGGREGATEMINUS; };
-// #define HID_QUERYWIZARD_LSTFILTERFIELDS 40915
+// #define HID_QUERYWIZARD_LSTFILTERFIELDS 40915
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTFILTERFIELDS; };
-// #define HID_QUERYWIZARD_CMDFILTERMOVESELECTED 40916
+// #define HID_QUERYWIZARD_CMDFILTERMOVESELECTED 40916
hidspecial HID { HelpID = HID_QUERYWIZARD_CMDFILTERMOVESELECTED; };
-// #define HID_QUERYWIZARD_CMDFILTERREMOVESELECTED 40917
+// #define HID_QUERYWIZARD_CMDFILTERREMOVESELECTED 40917
hidspecial HID { HelpID = HID_QUERYWIZARD_CMDFILTERREMOVESELECTED; };
-// #define HID_QUERYWIZARD_LSTFILTERSELFIELDS 40918
+// #define HID_QUERYWIZARD_LSTFILTERSELFIELDS 40918
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTFILTERSELFIELDS; };
-// #define HID_QUERYWIZARD_CMDFILTERMOVEUP 40919
+// #define HID_QUERYWIZARD_CMDFILTERMOVEUP 40919
hidspecial HID { HelpID = HID_QUERYWIZARD_CMDFILTERMOVEUP; };
-// #define HID_QUERYWIZARD_CMDFILTERMOVEDOWN 40920
+// #define HID_QUERYWIZARD_CMDFILTERMOVEDOWN 40920
hidspecial HID { HelpID = HID_QUERYWIZARD_CMDFILTERMOVEDOWN; };
-// #define HID_QUERYWIZARD_OPTGROUPMATCHALL 40923
+// #define HID_QUERYWIZARD_OPTGROUPMATCHALL 40923
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTGROUPMATCHALL; };
-// #define HID_QUERYWIZARD_OPTGROUPMATCHANY 40924
+// #define HID_QUERYWIZARD_OPTGROUPMATCHANY 40924
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTGROUPMATCHANY; };
-// #define HID_QUERYWIZARD_LSTFILTERFIELDNAME_1 40925
+// #define HID_QUERYWIZARD_LSTFILTERFIELDNAME_1 40925
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTFILTERFIELDNAME_1; };
-// #define HID_QUERYWIZARD_LSTFILTEROPERATOR_1 40926
+// #define HID_QUERYWIZARD_LSTFILTEROPERATOR_1 40926
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTFILTEROPERATOR_1; };
-// #define HID_QUERYWIZARD_TXTFILTERVALUE_1 40927
+// #define HID_QUERYWIZARD_TXTFILTERVALUE_1 40927
hidspecial HID { HelpID = HID_QUERYWIZARD_TXTFILTERVALUE_1; };
-// #define HID_QUERYWIZARD_LSTFILTERFIELDNAME_2 40928
+// #define HID_QUERYWIZARD_LSTFILTERFIELDNAME_2 40928
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTFILTERFIELDNAME_2; };
-// #define HID_QUERYWIZARD_LSTFILTEROPERATOR_2 40929
+// #define HID_QUERYWIZARD_LSTFILTEROPERATOR_2 40929
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTFILTEROPERATOR_2; };
-// #define HID_QUERYWIZARD_TXTFILTERVALUE_2 40930
+// #define HID_QUERYWIZARD_TXTFILTERVALUE_2 40930
hidspecial HID { HelpID = HID_QUERYWIZARD_TXTFILTERVALUE_2; };
-// #define HID_QUERYWIZARD_LSTFILTERFIELDNAME_3 40931
+// #define HID_QUERYWIZARD_LSTFILTERFIELDNAME_3 40931
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTFILTERFIELDNAME_3; };
-// #define HID_QUERYWIZARD_LSTFILTEROPERATOR_3 40932
+// #define HID_QUERYWIZARD_LSTFILTEROPERATOR_3 40932
hidspecial HID { HelpID = HID_QUERYWIZARD_LSTFILTEROPERATOR_3; };
-// #define HID_QUERYWIZARD_TXTFILTERVALUE_3 40933
+// #define HID_QUERYWIZARD_TXTFILTERVALUE_3 40933
hidspecial HID { HelpID = HID_QUERYWIZARD_TXTFILTERVALUE_3; };
// #define HID_QUERYWIZARD_TXTTITLE_1 40940
@@ -1045,122 +1045,122 @@ hidspecial HID { HelpID = HID_QUERYWIZARD_TXTTITLE_6; };
// #define HID_QUERYWIZARD_TXTTITLE_7 40946
hidspecial HID { HelpID = HID_QUERYWIZARD_TXTTITLE_7; };
-// #define HID_QUERYWIZARD_TXTQUERYTITLE 40955
+// #define HID_QUERYWIZARD_TXTQUERYTITLE 40955
hidspecial HID { HelpID = HID_QUERYWIZARD_TXTQUERYTITLE; };
-// #define HID_QUERYWIZARD_OPTDISPLAYQUERY 40956
+// #define HID_QUERYWIZARD_OPTDISPLAYQUERY 40956
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTDISPLAYQUERY; };
-// #define HID_QUERYWIZARD_OPTMODIFYQUERY 40957
+// #define HID_QUERYWIZARD_OPTMODIFYQUERY 40957
hidspecial HID { HelpID = HID_QUERYWIZARD_OPTMODIFYQUERY; };
-// #define HID_QUERYWIZARD_TXTSUMMARY 40958
+// #define HID_QUERYWIZARD_TXTSUMMARY 40958
hidspecial HID { HelpID = HID_QUERYWIZARD_TXTSUMMARY; };
-// #define HID_QUERYWIZARD 40970
+// #define HID_QUERYWIZARD 40970
hidspecial HID { HelpID = HID_QUERYWIZARD; };
-// #define HID_QUERYWIZARD_BACK 40972
+// #define HID_QUERYWIZARD_BACK 40972
hidspecial HID { HelpID = HID_QUERYWIZARD_BACK; };
-// #define HID_QUERYWIZARD_NEXT 40973
+// #define HID_QUERYWIZARD_NEXT 40973
hidspecial HID { HelpID = HID_QUERYWIZARD_NEXT; };
-// #define HID_QUERYWIZARD_CREATE 40974
+// #define HID_QUERYWIZARD_CREATE 40974
hidspecial HID { HelpID = HID_QUERYWIZARD_CREATE; };
-// #define HID_QUERYWIZARD_CANCEL 40975
+// #define HID_QUERYWIZARD_CANCEL 40975
hidspecial HID { HelpID = HID_QUERYWIZARD_CANCEL; };
// ++++++++++++++++++++++++++++++++++++++
// +++ Web Wizard : Continued from 34312
// ++++++++++++++++++++++++++++++++++++++
// web wizard iconssets dialog
-// #define HID_IS 41000
+// #define HID_IS 41000
hidspecial HID { HelpID = HID_IS; } ;
-// #define HID_IS_BTN_NONE 41002
+// #define HID_IS_BTN_NONE 41002
hidspecial HID { HelpID = HID_IS_BTN_NONE; } ;
-// #define HID_IS_BTN_OK 41003
+// #define HID_IS_BTN_OK 41003
hidspecial HID { HelpID = HID_IS_BTN_OK; } ;
// #define HID_IS_BTN_CANCEL 41004
hidspecial HID { HelpID = HID_IS_BTN_CANCEL; } ;
-// #define HID_IS_BTN_IMG1 41005
+// #define HID_IS_BTN_IMG1 41005
hidspecial HID { HelpID = HID_IS_BTN_IMG1; } ;
-// #define HID_IS_BTN_IMG2 41006
+// #define HID_IS_BTN_IMG2 41006
hidspecial HID { HelpID = HID_IS_BTN_IMG2; } ;
-// #define HID_IS_BTN_IMG3 41007
+// #define HID_IS_BTN_IMG3 41007
hidspecial HID { HelpID = HID_IS_BTN_IMG3; } ;
-// #define HID_IS_BTN_IMG4 41008
+// #define HID_IS_BTN_IMG4 41008
hidspecial HID { HelpID = HID_IS_BTN_IMG4; } ;
-// #define HID_IS_BTN_IMG5 41009
+// #define HID_IS_BTN_IMG5 41009
hidspecial HID { HelpID = HID_IS_BTN_IMG5; } ;
-// #define HID_IS_BTN_IMG6 41010
+// #define HID_IS_BTN_IMG6 41010
hidspecial HID { HelpID = HID_IS_BTN_IMG6; } ;
-// #define HID_IS_BTN_IMG7 41011
+// #define HID_IS_BTN_IMG7 41011
hidspecial HID { HelpID = HID_IS_BTN_IMG7; } ;
-// #define HID_IS_BTN_IMG8 41012
+// #define HID_IS_BTN_IMG8 41012
hidspecial HID { HelpID = HID_IS_BTN_IMG8; } ;
-// #define HID_IS_BTN_IMG9 41013
+// #define HID_IS_BTN_IMG9 41013
hidspecial HID { HelpID = HID_IS_BTN_IMG9; } ;
-// #define HID_IS_BTN_IMG10 41014
+// #define HID_IS_BTN_IMG10 41014
hidspecial HID { HelpID = HID_IS_BTN_IMG10; } ;
-// #define HID_IS_BTN_IMG11 41015
+// #define HID_IS_BTN_IMG11 41015
hidspecial HID { HelpID = HID_IS_BTN_IMG11; } ;
-// #define HID_IS_BTN_IMG12 41016
+// #define HID_IS_BTN_IMG12 41016
hidspecial HID { HelpID = HID_IS_BTN_IMG12; } ;
-// #define HID_IS_BTN_IMG13 41017
+// #define HID_IS_BTN_IMG13 41017
hidspecial HID { HelpID = HID_IS_BTN_IMG13; } ;
-// #define HID_IS_BTN_IMG14 41018
+// #define HID_IS_BTN_IMG14 41018
hidspecial HID { HelpID = HID_IS_BTN_IMG14; } ;
-// #define HID_IS_BTN_IMG15 41019
+// #define HID_IS_BTN_IMG15 41019
hidspecial HID { HelpID = HID_IS_BTN_IMG15; } ;
-// #define HID_IS_BTN_IMG16 41020
+// #define HID_IS_BTN_IMG16 41020
hidspecial HID { HelpID = HID_IS_BTN_IMG16; } ;
-// #define HID_IS_BTN_IMG17 41021
+// #define HID_IS_BTN_IMG17 41021
hidspecial HID { HelpID = HID_IS_BTN_IMG17; } ;
-// #define HID_IS_BTN_IMG18 41022
+// #define HID_IS_BTN_IMG18 41022
hidspecial HID { HelpID = HID_IS_BTN_IMG18; } ;
-// #define HID_IS_BTN_IMG19 41023
+// #define HID_IS_BTN_IMG19 41023
hidspecial HID { HelpID = HID_IS_BTN_IMG19; } ;
-// #define HID_IS_BTN_IMG20 41024
+// #define HID_IS_BTN_IMG20 41024
hidspecial HID { HelpID = HID_IS_BTN_IMG20; } ;
-// #define HID_IS_BTN_IMG21 41025
+// #define HID_IS_BTN_IMG21 41025
hidspecial HID { HelpID = HID_IS_BTN_IMG21; } ;
-// #define HID_IS_BTN_IMG22 41026
+// #define HID_IS_BTN_IMG22 41026
hidspecial HID { HelpID = HID_IS_BTN_IMG22; } ;
-// #define HID_IS_BTN_IMG23 41027
+// #define HID_IS_BTN_IMG23 41027
hidspecial HID { HelpID = HID_IS_BTN_IMG23; } ;
-// #define HID_IS_BTN_IMG24 41028
+// #define HID_IS_BTN_IMG24 41028
hidspecial HID { HelpID = HID_IS_BTN_IMG24; } ;
-// #define HID_IS_BTN_IMG25 41029
+// #define HID_IS_BTN_IMG25 41029
hidspecial HID { HelpID = HID_IS_BTN_IMG25; } ;
-// #define HID_IS_BTN_IMG26 41030
+// #define HID_IS_BTN_IMG26 41030
hidspecial HID { HelpID = HID_IS_BTN_IMG26; } ;
-// #define HID_IS_BTN_IMG27 41031
+// #define HID_IS_BTN_IMG27 41031
hidspecial HID { HelpID = HID_IS_BTN_IMG27; } ;
-// #define HID_IS_BTN_IMG28 41032
+// #define HID_IS_BTN_IMG28 41032
hidspecial HID { HelpID = HID_IS_BTN_IMG28; } ;
-// #define HID_IS_BTN_IMG29 41033
+// #define HID_IS_BTN_IMG29 41033
hidspecial HID { HelpID = HID_IS_BTN_IMG29; } ;
-// #define HID_IS_BTN_IMG30 41034
+// #define HID_IS_BTN_IMG30 41034
hidspecial HID { HelpID = HID_IS_BTN_IMG30; } ;
-// #define HID_IS_BTN_IMG31 41035
+// #define HID_IS_BTN_IMG31 41035
hidspecial HID { HelpID = HID_IS_BTN_IMG31; } ;
-// #define HID_IS_BTN_IMG32 41036
+// #define HID_IS_BTN_IMG32 41036
hidspecial HID { HelpID = HID_IS_BTN_IMG32; } ;
// web wizard ftp dialog
-// #define HID_FTP 41040
+// #define HID_FTP 41040
hidspecial HID { HelpID = HID_FTP; } ;
-// #define HID_FTP_SERVER 41041
+// #define HID_FTP_SERVER 41041
hidspecial HID { HelpID = HID_FTP_SERVER; } ;
-// #define HID_FTP_USERNAME 41042
+// #define HID_FTP_USERNAME 41042
hidspecial HID { HelpID = HID_FTP_USERNAME; } ;
-// #define HID_FTP_PASS 41043
+// #define HID_FTP_PASS 41043
hidspecial HID { HelpID = HID_FTP_PASS; } ;
-// #define HID_FTP_TEST 41044
+// #define HID_FTP_TEST 41044
hidspecial HID { HelpID = HID_FTP_TEST; } ;
-// #define HID_FTP_TXT_PATH 41045
+// #define HID_FTP_TXT_PATH 41045
hidspecial HID { HelpID = HID_FTP_TXT_PATH; } ;
-// #define HID_FTP_BTN_PATH 41046
+// #define HID_FTP_BTN_PATH 41046
hidspecial HID { HelpID = HID_FTP_BTN_PATH; } ;
-// #define HID_FTP_OK 41047
+// #define HID_FTP_OK 41047
hidspecial HID { HelpID = HID_FTP_OK; } ;
-// #define HID_FTP_CANCEL 41048
+// #define HID_FTP_CANCEL 41048
hidspecial HID { HelpID = HID_FTP_CANCEL; } ;
@@ -1172,217 +1172,217 @@ hidspecial HID { HelpID = HID_FTP_CANCEL; } ;
// step 0 - navibar
-// #define HID_AGWIZ 41051
+// #define HID_AGWIZ 41051
hidspecial HID { HelpID = HID_AGWIZ; } ;
-// #define HID_AGWIZ_HELP 41052
+// #define HID_AGWIZ_HELP 41052
hidspecial HID { HelpID = HID_AGWIZ_HELP; } ;
-// #define HID_AGWIZ_NEXT 41053
+// #define HID_AGWIZ_NEXT 41053
hidspecial HID { HelpID = HID_AGWIZ_NEXT; } ;
-// #define HID_AGWIZ_PREV 41054
+// #define HID_AGWIZ_PREV 41054
hidspecial HID { HelpID = HID_AGWIZ_PREV; } ;
-// #define HID_AGWIZ_CREATE 41055
+// #define HID_AGWIZ_CREATE 41055
hidspecial HID { HelpID = HID_AGWIZ_CREATE; } ;
-// #define HID_AGWIZ_CANCEL 41056
+// #define HID_AGWIZ_CANCEL 41056
hidspecial HID { HelpID = HID_AGWIZ_CANCEL; } ;
//step 1 - design
-// #define HID_AGWIZ_1_LIST_PAGEDESIGN 41057
+// #define HID_AGWIZ_1_LIST_PAGEDESIGN 41057
hidspecial HID { HelpID = HID_AGWIZ_1_LIST_PAGEDESIGN; } ;
-// #define HID_AGWIZ_1_CHK_MINUTES 41058
+// #define HID_AGWIZ_1_CHK_MINUTES 41058
hidspecial HID { HelpID = HID_AGWIZ_1_CHK_MINUTES; } ;
// step 2 - general attributes
-// #define HID_AGWIZ_2_TXT_TIME 41059
+// #define HID_AGWIZ_2_TXT_TIME 41059
hidspecial HID { HelpID = HID_AGWIZ_2_TXT_TIME; } ;
-// #define HID_AGWIZ_2_TXT_DATE 41060
+// #define HID_AGWIZ_2_TXT_DATE 41060
hidspecial HID { HelpID = HID_AGWIZ_2_TXT_DATE; } ;
-// #define HID_AGWIZ_2_TXT_TITLE 41061
+// #define HID_AGWIZ_2_TXT_TITLE 41061
hidspecial HID { HelpID = HID_AGWIZ_2_TXT_TITLE; } ;
-// #define HID_AGWIZ_2_TXT_LOCATION 41062
+// #define HID_AGWIZ_2_TXT_LOCATION 41062
hidspecial HID { HelpID = HID_AGWIZ_2_TXT_LOCATION; } ;
// step 3 - headings
-// #define HID_AGWIZ_3_CHK_MEETING_TYPE 41063
+// #define HID_AGWIZ_3_CHK_MEETING_TYPE 41063
hidspecial HID { HelpID = HID_AGWIZ_3_CHK_MEETING_TYPE; } ;
-// #define HID_AGWIZ_3_CHK_READ 41064
+// #define HID_AGWIZ_3_CHK_READ 41064
hidspecial HID { HelpID = HID_AGWIZ_3_CHK_READ; } ;
-// #define HID_AGWIZ_3_CHK_BRING 41065
+// #define HID_AGWIZ_3_CHK_BRING 41065
hidspecial HID { HelpID = HID_AGWIZ_3_CHK_BRING; } ;
-// #define HID_AGWIZ_3_CHK_NOTES 41066
+// #define HID_AGWIZ_3_CHK_NOTES 41066
hidspecial HID { HelpID = HID_AGWIZ_3_CHK_NOTES; } ;
// step 4 - names
-// #define HID_AGWIZ_4_CHK_CALLED_BY 41067
+// #define HID_AGWIZ_4_CHK_CALLED_BY 41067
hidspecial HID { HelpID = HID_AGWIZ_4_CHK_CALLED_BY; } ;
-// #define HID_AGWIZ_4_CHK_FACILITATOR 41068
+// #define HID_AGWIZ_4_CHK_FACILITATOR 41068
hidspecial HID { HelpID = HID_AGWIZ_4_CHK_FACILITATOR; } ;
-// #define HID_AGWIZ_4_CHK_NOTETAKER 41069
+// #define HID_AGWIZ_4_CHK_NOTETAKER 41069
hidspecial HID { HelpID = HID_AGWIZ_4_CHK_NOTETAKER; } ;
-// #define HID_AGWIZ_4_CHK_TIMEKEEPER 41070
+// #define HID_AGWIZ_4_CHK_TIMEKEEPER 41070
hidspecial HID { HelpID = HID_AGWIZ_4_CHK_TIMEKEEPER; } ;
-// #define HID_AGWIZ_4_CHK_ATTENDEES 41071
+// #define HID_AGWIZ_4_CHK_ATTENDEES 41071
hidspecial HID { HelpID = HID_AGWIZ_4_CHK_ATTENDEES; } ;
-// #define HID_AGWIZ_4_CHK_OBSERVERS 41072
+// #define HID_AGWIZ_4_CHK_OBSERVERS 41072
hidspecial HID { HelpID = HID_AGWIZ_4_CHK_OBSERVERS; } ;
-// #define HID_AGWIZ_4_CHK_RESOURCEPERSONS 41073
+// #define HID_AGWIZ_4_CHK_RESOURCEPERSONS 41073
hidspecial HID { HelpID = HID_AGWIZ_4_CHK_RESOURCEPERSONS; } ;
// step 5 - topics
-// #define HID_AGWIZ_6_TXT_TEMPLATENAME 41074
+// #define HID_AGWIZ_6_TXT_TEMPLATENAME 41074
hidspecial HID { HelpID = HID_AGWIZ_6_TXT_TEMPLATENAME; } ;
-// #define HID_AGWIZ_6_TXT_TEMPLATEPATH 41075
+// #define HID_AGWIZ_6_TXT_TEMPLATEPATH 41075
hidspecial HID { HelpID = HID_AGWIZ_6_TXT_TEMPLATEPATH; } ;
-// #define HID_AGWIZ_6_BTN_TEMPLATEPATH 41076
+// #define HID_AGWIZ_6_BTN_TEMPLATEPATH 41076
hidspecial HID { HelpID = HID_AGWIZ_6_BTN_TEMPLATEPATH; } ;
// step 6 - file info
-// #define HID_AGWIZ_6_OPT_CREATEAGENDA 41077
+// #define HID_AGWIZ_6_OPT_CREATEAGENDA 41077
hidspecial HID { HelpID = HID_AGWIZ_6_OPT_CREATEAGENDA; } ;
-// #define HID_AGWIZ_6_OPT_MAKECHANGES 41078
+// #define HID_AGWIZ_6_OPT_MAKECHANGES 41078
hidspecial HID { HelpID = HID_AGWIZ_6_OPT_MAKECHANGES; } ;
// - again step 5 - buttons
-// #define HID_AGWIZ_5_BTN_INSERT 41079
+// #define HID_AGWIZ_5_BTN_INSERT 41079
hidspecial HID { HelpID = HID_AGWIZ_5_BTN_INSERT; } ;
-// #define HID_AGWIZ_5_BTN_REMOVE 41080
+// #define HID_AGWIZ_5_BTN_REMOVE 41080
hidspecial HID { HelpID = HID_AGWIZ_5_BTN_REMOVE; } ;
-// #define HID_AGWIZ_5_BTN_UP 41081
+// #define HID_AGWIZ_5_BTN_UP 41081
hidspecial HID { HelpID = HID_AGWIZ_5_BTN_UP; } ;
-// #define HID_AGWIZ_5_BTN_DOWN 41082
+// #define HID_AGWIZ_5_BTN_DOWN 41082
hidspecial HID { HelpID = HID_AGWIZ_5_BTN_DOWN; } ;
// again step 5 - scroll control
-// #define HID_AGWIZ_5_SCROLL_BAR 41083
+// #define HID_AGWIZ_5_SCROLL_BAR 41083
hidspecial HID { HelpID = HID_AGWIZ_5_SCROLL_BAR; } ;
-// #define HID_AGWIZ_5_TXT_TOPIC_1 41084
+// #define HID_AGWIZ_5_TXT_TOPIC_1 41084
hidspecial HID { HelpID = HID_AGWIZ_5_TXT_TOPIC_1; } ;
-// #define HID_AGWIZ_5_TXT_RESPONSIBLE_1 41085
+// #define HID_AGWIZ_5_TXT_RESPONSIBLE_1 41085
hidspecial HID { HelpID = HID_AGWIZ_5_TXT_RESPONSIBLE_1; } ;
-// #define HID_AGWIZ_5_TXT_MINUTES_1 41086
+// #define HID_AGWIZ_5_TXT_MINUTES_1 41086
hidspecial HID { HelpID = HID_AGWIZ_5_TXT_MINUTES_1; } ;
-// #define HID_AGWIZ_5_TXT_TOPIC_2 41087
+// #define HID_AGWIZ_5_TXT_TOPIC_2 41087
hidspecial HID { HelpID = HID_AGWIZ_5_TXT_TOPIC_2; } ;
-// #define HID_AGWIZ_5_TXT_RESPONSIBLE_2 41088
+// #define HID_AGWIZ_5_TXT_RESPONSIBLE_2 41088
hidspecial HID { HelpID = HID_AGWIZ_5_TXT_RESPONSIBLE_2; } ;
-// #define HID_AGWIZ_5_TXT_MINUTES_2 41089
+// #define HID_AGWIZ_5_TXT_MINUTES_2 41089
hidspecial HID { HelpID = HID_AGWIZ_5_TXT_MINUTES_2; } ;
-// #define HID_AGWIZ_5_TXT_TOPIC_3 41090
+// #define HID_AGWIZ_5_TXT_TOPIC_3 41090
hidspecial HID { HelpID = HID_AGWIZ_5_TXT_TOPIC_3; } ;
-// #define HID_AGWIZ_5_TXT_RESPONSIBLE_3 41091
+// #define HID_AGWIZ_5_TXT_RESPONSIBLE_3 41091
hidspecial HID { HelpID = HID_AGWIZ_5_TXT_RESPONSIBLE_3; } ;
-// #define HID_AGWIZ_5_TXT_MINUTES_3 41092
+// #define HID_AGWIZ_5_TXT_MINUTES_3 41092
hidspecial HID { HelpID = HID_AGWIZ_5_TXT_MINUTES_3; } ;
-// #define HID_AGWIZ_5_TXT_TOPIC_4 41093
+// #define HID_AGWIZ_5_TXT_TOPIC_4 41093
hidspecial HID { HelpID = HID_AGWIZ_5_TXT_TOPIC_4; } ;
-// #define HID_AGWIZ_5_TXT_RESPONSIBLE_4 41094
+// #define HID_AGWIZ_5_TXT_RESPONSIBLE_4 41094
hidspecial HID { HelpID = HID_AGWIZ_5_TXT_RESPONSIBLE_4; } ;
-// #define HID_AGWIZ_5_TXT_MINUTES_4 41095
+// #define HID_AGWIZ_5_TXT_MINUTES_4 41095
hidspecial HID { HelpID = HID_AGWIZ_5_TXT_MINUTES_4; } ;
-// #define HID_AGWIZ_5_TXT_TOPIC_5 41096
+// #define HID_AGWIZ_5_TXT_TOPIC_5 41096
hidspecial HID { HelpID = HID_AGWIZ_5_TXT_TOPIC_5; } ;
-// #define HID_AGWIZ_5_TXT_RESPONSIBLE_5 41097
+// #define HID_AGWIZ_5_TXT_RESPONSIBLE_5 41097
hidspecial HID { HelpID = HID_AGWIZ_5_TXT_RESPONSIBLE_5; } ;
-// #define HID_AGWIZ_5_TXT_MINUTES_5 41098
+// #define HID_AGWIZ_5_TXT_MINUTES_5 41098
hidspecial HID { HelpID = HID_AGWIZ_5_TXT_MINUTES_5; } ;
//FaxWizard---------------------------
-// #define HID_FAXWIZ_OPTBUSINESSFAX 41120
+// #define HID_FAXWIZ_OPTBUSINESSFAX 41120
hidspecial HID { HelpID = HID_FAXWIZ_OPTBUSINESSFAX; };
-// #define HID_FAXWIZ_LSTBUSINESSSTYLE 41121
+// #define HID_FAXWIZ_LSTBUSINESSSTYLE 41121
hidspecial HID { HelpID = HID_FAXWIZ_LSTBUSINESSSTYLE; };
-// #define HID_FAXWIZ_OPTPRIVATEFAX 41122
+// #define HID_FAXWIZ_OPTPRIVATEFAX 41122
hidspecial HID { HelpID = HID_FAXWIZ_OPTPRIVATEFAX; };
-// #define HID_LSTPRIVATESTYLE 41123
+// #define HID_LSTPRIVATESTYLE 41123
hidspecial HID { HelpID = HID_LSTPRIVATESTYLE; };
-// #define HID_IMAGECONTROL3 41124
+// #define HID_IMAGECONTROL3 41124
hidspecial HID { HelpID = HID_IMAGECONTROL3; };
-// #define HID_CHKUSELOGO 41125
+// #define HID_CHKUSELOGO 41125
hidspecial HID { HelpID = HID_CHKUSELOGO; };
-// #define HID_CHKUSEDATE 41126
+// #define HID_CHKUSEDATE 41126
hidspecial HID { HelpID = HID_CHKUSEDATE; };
-// #define HID_CHKUSECOMMUNICATIONTYPE 41127
+// #define HID_CHKUSECOMMUNICATIONTYPE 41127
hidspecial HID { HelpID = HID_CHKUSECOMMUNICATIONTYPE; };
-// #define HID_LSTCOMMUNICATIONTYPE 41128
+// #define HID_LSTCOMMUNICATIONTYPE 41128
hidspecial HID { HelpID = HID_LSTCOMMUNICATIONTYPE; };
-// #define HID_CHKUSESUBJECT 41129
+// #define HID_CHKUSESUBJECT 41129
hidspecial HID { HelpID = HID_CHKUSESUBJECT; };
-// #define HID_CHKUSESALUTATION 41130
+// #define HID_CHKUSESALUTATION 41130
hidspecial HID { HelpID = HID_CHKUSESALUTATION; };
-// #define HID_LSTSALUTATION 41131
+// #define HID_LSTSALUTATION 41131
hidspecial HID { HelpID = HID_LSTSALUTATION; };
-// #define HID_CHKUSEGREETING 41132
+// #define HID_CHKUSEGREETING 41132
hidspecial HID { HelpID = HID_CHKUSEGREETING; };
-// #define HID_LSTGREETING 41133
+// #define HID_LSTGREETING 41133
hidspecial HID { HelpID = HID_LSTGREETING; };
-// #define HID_CHKUSEFOOTER 41134
+// #define HID_CHKUSEFOOTER 41134
hidspecial HID { HelpID = HID_CHKUSEFOOTER; };
-// #define HID_OPTSENDERPLACEHOLDER 41135
+// #define HID_OPTSENDERPLACEHOLDER 41135
hidspecial HID { HelpID = HID_OPTSENDERPLACEHOLDER; };
-// #define HID_OPTSENDERDEFINE 41136
+// #define HID_OPTSENDERDEFINE 41136
hidspecial HID { HelpID = HID_OPTSENDERDEFINE; };
-// #define HID_TXTSENDERNAME 41137
+// #define HID_TXTSENDERNAME 41137
hidspecial HID { HelpID = HID_TXTSENDERNAME; };
-// #define HID_TXTSENDERSTREET 41138
+// #define HID_TXTSENDERSTREET 41138
hidspecial HID { HelpID = HID_TXTSENDERSTREET; };
-// #define HID_TXTSENDERPOSTCODE 41139
+// #define HID_TXTSENDERPOSTCODE 41139
hidspecial HID { HelpID = HID_TXTSENDERPOSTCODE; };
-// #define HID_TXTSENDERSTATE 41140
+// #define HID_TXTSENDERSTATE 41140
hidspecial HID { HelpID = HID_TXTSENDERSTATE; };
-// #define HID_TXTSENDERCITY 41141
+// #define HID_TXTSENDERCITY 41141
hidspecial HID { HelpID = HID_TXTSENDERCITY; };
-// #define HID_TXTSENDERFAX 41142
+// #define HID_TXTSENDERFAX 41142
hidspecial HID { HelpID = HID_TXTSENDERFAX; };
-// #define HID_OPTRECEIVERPLACEHOLDER 41143
+// #define HID_OPTRECEIVERPLACEHOLDER 41143
hidspecial HID { HelpID = HID_OPTRECEIVERPLACEHOLDER; };
-// #define HID_OPTRECEIVERDATABASE 41144
+// #define HID_OPTRECEIVERDATABASE 41144
hidspecial HID { HelpID = HID_OPTRECEIVERDATABASE; };
-// #define HID_TXTFOOTER 41145
+// #define HID_TXTFOOTER 41145
hidspecial HID { HelpID = HID_TXTFOOTER; };
-// #define HID_CHKFOOTERNEXTPAGES 41146
+// #define HID_CHKFOOTERNEXTPAGES 41146
hidspecial HID { HelpID = HID_CHKFOOTERNEXTPAGES; };
-// #define HID_CHKFOOTERPAGENUMBERS 41147
+// #define HID_CHKFOOTERPAGENUMBERS 41147
hidspecial HID { HelpID = HID_CHKFOOTERPAGENUMBERS; };
-// #define HID_TXTTEMPLATENAME 41148
+// #define HID_TXTTEMPLATENAME 41148
hidspecial HID { HelpID = HID_TXTTEMPLATENAME; };
-// #define HID_FILETEMPLATEPATH 41149
+// #define HID_FILETEMPLATEPATH 41149
hidspecial HID { HelpID = HID_FILETEMPLATEPATH; };
-// #define HID_OPTCREATEFAX 41150
+// #define HID_OPTCREATEFAX 41150
hidspecial HID { HelpID = HID_OPTCREATEFAX; };
-// #define HID_OPTMAKECHANGES 41151
+// #define HID_OPTMAKECHANGES 41151
hidspecial HID { HelpID = HID_OPTMAKECHANGES; };
-// #define HID_IMAGECONTROL2 41152
+// #define HID_IMAGECONTROL2 41152
hidspecial HID { HelpID = HID_IMAGECONTROL2; };
-// #define HID_FAXWIZ_TXTPATH 41153
+// #define HID_FAXWIZ_TXTPATH 41153
hidspecial HID { HelpID = HID_FAXWIZ_TXTPATH; };
-// #define HID_FAXWIZ_CMDPATH 41154
+// #define HID_FAXWIZ_CMDPATH 41154
hidspecial HID { HelpID = HID_FAXWIZ_CMDPATH; };
-// #define HID_FAXWIZARD 41180
+// #define HID_FAXWIZARD 41180
hidspecial HID { HelpID = HID_FAXWIZARD; };
-// #define HID_FAXWIZARD_HELP 41181
+// #define HID_FAXWIZARD_HELP 41181
hidspecial HID { HelpID = HID_FAXWIZARD_HELP; };
-// #define HID_FAXWIZARD_BACK 41182
+// #define HID_FAXWIZARD_BACK 41182
hidspecial HID { HelpID = HID_FAXWIZARD_BACK; };
-// #define HID_FAXWIZARD_NEXT 41183
+// #define HID_FAXWIZARD_NEXT 41183
hidspecial HID { HelpID = HID_FAXWIZARD_NEXT; };
-// #define HID_FAXWIZARD_CREATE 41184
+// #define HID_FAXWIZARD_CREATE 41184
hidspecial HID { HelpID = HID_FAXWIZARD_CREATE; };
-// #define HID_FAXWIZARD_CANCEL 41185
+// #define HID_FAXWIZARD_CANCEL 41185
hidspecial HID { HelpID = HID_FAXWIZARD_CANCEL; };
@@ -1398,15 +1398,15 @@ hidspecial HID { HelpID = HID_DLGTABLE_DIALOG; };
hidspecial HID { HelpID = HID_DLGTABLE_CMDPREV; };
// #define HID_DLGTABLE_CMDNEXT 41203
hidspecial HID { HelpID = HID_DLGTABLE_CMDNEXT; };
-// #define HID_DLGTABLE_CMDFINISH 41204
+// #define HID_DLGTABLE_CMDFINISH 41204
hidspecial HID { HelpID = HID_DLGTABLE_CMDFINISH; };
// #define HID_DLGTABLE_CMDCANCEL 41205
hidspecial HID { HelpID = HID_DLGTABLE_CMDCANCEL; };
-// #define HID_DLGTABLE_OPTBUSINESS 41206
+// #define HID_DLGTABLE_OPTBUSINESS 41206
hidspecial HID { HelpID = HID_DLGTABLE_OPTBUSINESS; };
-// #define HID_DLGTABLE_OPTPRIVATE 41207
+// #define HID_DLGTABLE_OPTPRIVATE 41207
hidspecial HID { HelpID = HID_DLGTABLE_OPTPRIVATE; };
@@ -1437,31 +1437,31 @@ hidspecial HID { HelpID = HID_DLGTABLE_LB_SELFIELDNAMES; };
hidspecial HID { HelpID = HID_DLGTABLE_CMDMOVEFIELDUP; };
// #define HID_DLGTABLE_CMDMOVEFIELDDOWN 41222
hidspecial HID { HelpID = HID_DLGTABLE_CMDMOVEFIELDDOWN; };
-// #define HID_DLGTABLE_CMDMINUS 41223
+// #define HID_DLGTABLE_CMDMINUS 41223
hidspecial HID { HelpID = HID_DLGTABLE_CMDMINUS; };
-// #define HID_DLGTABLE_CMDPLUS 41224
+// #define HID_DLGTABLE_CMDPLUS 41224
hidspecial HID { HelpID = HID_DLGTABLE_CMDPLUS; };
-// #define HID_DLGTABLE_COLNAME 41225
+// #define HID_DLGTABLE_COLNAME 41225
hidspecial HID { HelpID = HID_DLGTABLE_COLNAME; };
-// #define HID_DLGTABLE_COLMODIFIER 41226
+// #define HID_DLGTABLE_COLMODIFIER 41226
hidspecial HID { HelpID = HID_DLGTABLE_COLMODIFIER; };
-// #define HID_DLGTABLE_CHK_USEPRIMEKEY 41227
+// #define HID_DLGTABLE_CHK_USEPRIMEKEY 41227
hidspecial HID { HelpID = HID_DLGTABLE_CHK_USEPRIMEKEY; };
-// #define HID_DLGTABLE_OPT_PK_AUTOMATIC 41228
+// #define HID_DLGTABLE_OPT_PK_AUTOMATIC 41228
hidspecial HID { HelpID = HID_DLGTABLE_OPT_PK_AUTOMATIC; };
// #define HID_DLGTABLE_CK_PK_AUTOVALUE_AUTOMATIC 41229
hidspecial HID { HelpID = HID_DLGTABLE_CK_PK_AUTOVALUE_AUTOMATIC; };
-// #define HID_DLGTABLE_OPT_PK_SINGLE 41230
+// #define HID_DLGTABLE_OPT_PK_SINGLE 41230
hidspecial HID { HelpID = HID_DLGTABLE_OPT_PK_SINGLE; };
// #define HID_DLGTABLE_LB_PK_FIELDNAME 41231
hidspecial HID { HelpID = HID_DLGTABLE_LB_PK_FIELDNAME; };
// #define HID_DLGTABLE_CK_PK_AUTOVALUE 41232
hidspecial HID { HelpID = HID_DLGTABLE_CK_PK_AUTOVALUE; };
-// #define HID_DLGTABLE_OPT_PK_SEVERAL 41233
+// #define HID_DLGTABLE_OPT_PK_SEVERAL 41233
hidspecial HID { HelpID = HID_DLGTABLE_OPT_PK_SEVERAL; };
// #define HID_DLGTABLE_FIELDS_PK_AVAILABLE 41234
hidspecial HID { HelpID = HID_DLGTABLE_FIELDS_PK_AVAILABLE; };
@@ -1480,17 +1480,17 @@ hidspecial HID { HelpID = HID_DLGTABLE_CMDMOVEDOWN_PK_SELECTED; };
-// #define HID_DLGTABLE_TXT_NAME 41240
+// #define HID_DLGTABLE_TXT_NAME 41240
hidspecial HID { HelpID = HID_DLGTABLE_TXT_NAME; };
-// #define HID_DLGTABLE_OPT_MODIFYTABLE 41241
+// #define HID_DLGTABLE_OPT_MODIFYTABLE 41241
hidspecial HID { HelpID = HID_DLGTABLE_OPT_MODIFYTABLE; };
-// #define HID_DLGTABLE_OPT_WORKWITHTABLE 41242
+// #define HID_DLGTABLE_OPT_WORKWITHTABLE 41242
hidspecial HID { HelpID = HID_DLGTABLE_OPT_WORKWITHTABLE; };
-// #define HID_DLGTABLE_OPT_STARTFORMWIZARD 41243
+// #define HID_DLGTABLE_OPT_STARTFORMWIZARD 41243
hidspecial HID { HelpID = HID_DLGTABLE_OPT_STARTFORMWIZARD; };
-// #define HID_DLGTABLE_LST_CATALOG 41244
+// #define HID_DLGTABLE_LST_CATALOG 41244
hidspecial HID { HelpID = HID_DLGTABLE_LST_CATALOG; };
-// #define HID_DLGTABLE_LST_SCHEMA 41245
+// #define HID_DLGTABLE_LST_SCHEMA 41245
hidspecial HID { HelpID = HID_DLGTABLE_LST_SCHEMA; };