From a1552a0ec3fcddd968db274ef41bc2452c50bed9 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Thu, 9 Oct 2014 10:47:42 +0200 Subject: [PATCH] Scripting: Remove org package Change-Id: If0b6ac87b5d53da43557dee5824e9413a260ba7c Signed-off-by: Stephan Bergmann --- scripting/java/manifest.mf | 26 - .../idesupport/CommandLineTools.java | 337 --- .../idesupport/ExtensionFinder.java | 81 - .../org/openoffice/idesupport/JavaFinder.java | 231 -- .../openoffice/idesupport/LocalOffice.java | 54 - .../openoffice/idesupport/MethodFinder.java | 26 - .../openoffice/idesupport/OfficeDocument.java | 106 - .../idesupport/OfficeInstallation.java | 85 - .../openoffice/idesupport/SVersionRCFile.java | 226 -- .../idesupport/filter/AllFilesFilter.java | 39 - .../idesupport/filter/BinaryOnlyFilter.java | 44 - .../idesupport/filter/ExceptParcelFilter.java | 45 - .../idesupport/filter/FileFilter.java | 23 - .../localoffice/LocalOfficeImpl.java | 131 - .../idesupport/ui/ConfigurePanel.java | 223 -- .../openoffice/idesupport/ui/MethodPanel.java | 164 -- .../openoffice/idesupport/ui/ScriptPanel.java | 199 -- .../java/org/openoffice/idesupport/ui/add.gif | Bin 103 -> 0 bytes .../openoffice/idesupport/xml/Manifest.java | 125 - .../idesupport/zip/ParcelZipper.java | 159 -- .../openoffice/netbeans/editor/JavaKit.java | 237 -- .../netbeans/editor/NetBeansSourceView.java | 197 -- .../org/openoffice/netbeans/editor/OOo.jcb | 5 - .../org/openoffice/netbeans/editor/OOo.jcs | 21 - .../netbeans/modules/office/Bundle.properties | 0 .../modules/office/Bundle_en_US.properties | 0 .../office/actions/BuildParcelAction.java | 60 - .../office/actions/CompileParcelAction.java | 35 - .../office/actions/ConfigureParcelAction.java | 61 - .../office/actions/DeployParcelAction.java | 238 -- .../office/actions/MountDocumentAction.java | 62 - .../office/actions/MountParcelAction.java | 61 - .../office/actions/OfficeDocumentCookie.java | 32 - .../office/actions/OfficeDocumentSupport.java | 133 -- .../modules/office/actions/ParcelCookie.java | 32 - .../ParcelDescriptorEditorSupport.java | 136 -- .../actions/ParcelDescriptorParserCookie.java | 32 - .../ParcelDescriptorParserSupport.java | 107 - .../office/actions/ParcelFolderCookie.java | 32 - .../office/actions/ParcelFolderSupport.java | 242 -- .../modules/office/actions/ParcelSupport.java | 175 -- .../office/filesystem/Bundle.properties | 61 - .../office/filesystem/Bundle_en_US.properties | 0 .../filesystem/OpenOfficeDocFileSystem.java | 1182 --------- .../OpenOfficeDocFileSystemBeanInfo.java | 110 - .../modules/office/loader/Bundle.properties | 30 - .../loader/OfficeDocumentDataLoader.java | 99 - .../OfficeDocumentDataLoaderBeanInfo.java | 63 - .../office/loader/OfficeDocumentDataNode.java | 113 - .../loader/OfficeDocumentDataObject.java | 50 - .../office/loader/ParcelContentsFolder.java | 129 - .../ParcelContentsFolderDataLoader.java | 70 - ...arcelContentsFolderDataLoaderBeanInfo.java | 65 - .../office/loader/ParcelDataLoader.java | 76 - .../loader/ParcelDataLoaderBeanInfo.java | 65 - .../modules/office/loader/ParcelDataNode.java | 103 - .../office/loader/ParcelDataObject.java | 67 - .../loader/ParcelDescriptorDataLoader.java | 73 - .../ParcelDescriptorDataLoaderBeanInfo.java | 65 - .../loader/ParcelDescriptorDataNode.java | 70 - .../loader/ParcelDescriptorDataObject.java | 75 - .../modules/office/loader/ParcelFolder.java | 290 --- .../office/loader/ParcelFolderDataLoader.java | 93 - .../ParcelFolderDataLoaderBeanInfo.java | 65 - .../office/nodes/OfficeDocumentChildren.java | 142 -- .../nodes/ParcelDescriptorChildren.java | 83 - .../modules/office/nodes/ScriptNode.java | 126 - .../modules/office/options/Bundle.properties | 31 - .../office/options/OfficeSettings.java | 119 - .../options/OfficeSettingsBeanInfo.java | 135 -- .../office/options/OfficeSettingsIcon.gif | Bin 145 -> 0 bytes .../office/options/OfficeSettingsIcon32.gif | Bin 253 -> 0 bytes .../modules/office/resources/AppStorage.html | 28 - .../office/resources/AppStorage.settings | 7 - .../office/resources/Bundle.properties | 41 - .../modules/office/resources/EmptyParcel.html | 28 - .../modules/office/resources/OfficeIcon.gif | Bin 588 -> 0 bytes .../modules/office/resources/OfficeIcon32.gif | Bin 759 -> 0 bytes .../office/resources/OfficeSettings.settings | 9 - .../resources/OpenOfficeDocFileSystem.html | 28 - .../OpenOfficeDocFileSystem.settings | 7 - .../resources/OpenOfficeDocFileSystemIcon.png | Bin 702 -> 0 bytes .../OpenOfficeDocFileSystemIcon32.png | Bin 1533 -> 0 bytes .../modules/office/resources/ParcelIcon.gif | Bin 576 -> 0 bytes .../office/resources/ScriptParcel.html | 28 - .../resources/ScriptParcelDescriptor.html | 28 - .../modules/office/resources/layer.xml | 115 - .../office/resources/mime-resolver.xml | 32 - .../office/resources/office-scripting.url | 1 - .../office/resources/templates/Empty.bsh_ | 42 - .../office/resources/templates/Empty.java_ | 45 - .../templates/EmptyParcelDescriptor.xml_ | 3 - .../resources/templates/HelloWorld.java_ | 59 - .../resources/templates/ParcelDescriptor.xml_ | 8 - .../modules/office/resources/webLink.gif | Bin 969 -> 0 bytes .../office/utils/FrameworkJarChecker.java | 128 - .../modules/office/utils/ManifestParser.java | 83 - .../modules/office/utils/NagDialog.java | 115 - .../modules/office/utils/OfficeModule.java | 60 - .../modules/office/utils/PackageRemover.java | 98 - .../modules/office/utils/ZipMounter.java | 81 - .../modules/office/wizard/Bundle.properties | 44 - .../office/wizard/Bundle_en_US.properties | 0 .../wizard/InstallationPathDescriptor.java | 63 - .../wizard/InstallationPathIterator.java | 150 -- .../office/wizard/JavaScriptIterator.java | 246 -- .../office/wizard/ParcelContentsIterator.java | 248 -- .../office/wizard/ParcelPropertiesPanel.java | 124 - .../wizard/ParcelPropertiesVisualPanel.form | 90 - .../wizard/ParcelPropertiesVisualPanel.java | 163 -- .../office/wizard/SelectPathPanel.java | 134 -- .../office/wizard/SelectPathVisualPanel.form | 98 - .../office/wizard/SelectPathVisualPanel.java | 196 -- scripting/workben/bindings/EditDebug.xdl | 53 - scripting/workben/bindings/EventsBinding.xdl | 78 - scripting/workben/bindings/HelpBinding.xdl | 47 - scripting/workben/bindings/KeyBinding.xdl | 76 - scripting/workben/bindings/MacroEditor.xdl | 27 - scripting/workben/bindings/MenuBinding.xdl | 82 - scripting/workben/bindings/ScriptBinding.xba | 2110 ----------------- scripting/workben/bindings/calckeybinding.xml | 111 - scripting/workben/bindings/calcmenubar.xml | 334 --- scripting/workben/bindings/drawkeybinding.xml | 75 - scripting/workben/bindings/drawmenubar.xml | 369 --- scripting/workben/bindings/eventbindings.xml | 21 - .../workben/bindings/impresskeybinding.xml | 79 - scripting/workben/bindings/impressmenubar.xml | 344 --- scripting/workben/bindings/manifest.xml | 31 - .../workben/bindings/writerkeybinding.xml | 118 - scripting/workben/bindings/writermenubar.xml | 298 --- scripting/workben/build.xml | 387 --- .../workben/data/ExampleSpreadSheetLatest.sxc | Bin 14635 -> 0 bytes .../data/doc_with_beanshell_scripts.sxw | Bin 7044 -> 0 bytes .../workben/data/doc_with_one_script.sxw | Bin 6286 -> 0 bytes .../workben/data/doc_with_two_scripts.sxw | Bin 6308 -> 0 bytes ...ipt.framework.protocolhandler.Dispatch.csv | 5 - ...tar.script.framework.provider.Function.csv | 1 - ...pt.framework.provider.FunctionProvider.csv | 1 - ...framework.runtime.ScriptRuntimeManager.csv | 2 - ...ar.script.framework.storage.ScriptInfo.csv | 8 - ...script.framework.storage.ScriptStorage.csv | 4 - ...framework.storage.ScriptStorageManager.csv | 6 - .../workben/data/script_in_class_file.sxw | Bin 6976 -> 0 bytes scripting/workben/data/script_in_jar_file.sxw | Bin 8081 -> 0 bytes scripting/workben/data/share_scripts.zip | Bin 2248 -> 0 bytes scripting/workben/data/testdata/Function.csv | 4 - .../data/testdata/FunctionProvider.csv | 1 - .../workben/data/testdata/ScriptInfo.csv | 8 - .../data/testdata/ScriptRuntimeManager.csv | 8 - .../workben/data/testdata/ScriptStorage.csv | 4 - .../data/testdata/ScriptStorageManager.csv | 18 - scripting/workben/data/user_scripts.zip | Bin 6890 -> 0 bytes .../data/xscriptcontext_test_document.sxw | Bin 6580 -> 0 bytes .../workben/ifc/scripting/ScriptingUtils.java | 106 - .../ifc/scripting/SecurityDialogUtil.java | 147 -- .../workben/ifc/scripting/_XFunction.java | 150 -- .../ifc/scripting/_XFunctionProvider.java | 81 - .../workben/ifc/scripting/_XScriptInfo.java | 308 --- .../ifc/scripting/_XScriptInfoAccess.java | 192 -- .../ifc/scripting/_XScriptInvocation.java | 212 -- .../ifc/scripting/_XScriptNameResolver.java | 167 -- .../ifc/scripting/_XScriptSecurity.java | 353 --- .../ifc/scripting/_XScriptStorageManager.java | 257 -- .../ifc/scripting/_XScriptStorageRefresh.java | 75 - scripting/workben/ifc/scripting/makefile.mk | 31 - scripting/workben/installer/Banner.java | 41 - .../installer/ExceptionTraceHelper.java | 49 - scripting/workben/installer/ExecCmd.java | 105 - scripting/workben/installer/FileUpdater.java | 183 -- scripting/workben/installer/Final.java | 136 -- scripting/workben/installer/IdeFinal.java | 121 - scripting/workben/installer/IdeUpdater.java | 113 - scripting/workben/installer/IdeVersion.java | 337 --- scripting/workben/installer/IdeWelcome.java | 79 - scripting/workben/installer/InstUtil.java | 326 --- .../workben/installer/InstallListener.java | 23 - .../workben/installer/InstallWizard.java | 350 --- .../workben/installer/InstallationEvent.java | 36 - scripting/workben/installer/LogStream.java | 62 - scripting/workben/installer/NavPanel.java | 128 - scripting/workben/installer/Navigation.java | 66 - .../workben/installer/ProtocolHandler.xcu | 27 - scripting/workben/installer/Register.java | 107 - .../workben/installer/Scripting.BeanShell.xcu | 28 - .../installer/Scripting.JavaScript.xcu | 28 - scripting/workben/installer/Scripting.xcs | 48 - scripting/workben/installer/Version.java | 350 --- scripting/workben/installer/Welcome.java | 84 - scripting/workben/installer/XmlUpdater.java | 389 --- scripting/workben/installer/ZipData.java | 114 - scripting/workben/installer/sidebar.jpg | Bin 8393 -> 0 bytes scripting/workben/makefile.mk | 26 - .../workben/mod/_scripting/Dispatch.java | 100 - .../workben/mod/_scripting/Function.java | 88 - .../mod/_scripting/FunctionProvider.java | 79 - .../workben/mod/_scripting/ScriptInfo.java | 108 - .../mod/_scripting/ScriptRuntimeManager.java | 61 - .../workben/mod/_scripting/ScriptStorage.java | 101 - .../mod/_scripting/ScriptStorageManager.java | 76 - .../mod/_scripting/TestDataLoader.java | 116 - scripting/workben/mod/_scripting/makefile.mk | 31 - 201 files changed, 21407 deletions(-) delete mode 100644 scripting/java/manifest.mf delete mode 100644 scripting/java/org/openoffice/idesupport/CommandLineTools.java delete mode 100644 scripting/java/org/openoffice/idesupport/ExtensionFinder.java delete mode 100644 scripting/java/org/openoffice/idesupport/JavaFinder.java delete mode 100644 scripting/java/org/openoffice/idesupport/LocalOffice.java delete mode 100644 scripting/java/org/openoffice/idesupport/MethodFinder.java delete mode 100644 scripting/java/org/openoffice/idesupport/OfficeDocument.java delete mode 100644 scripting/java/org/openoffice/idesupport/OfficeInstallation.java delete mode 100644 scripting/java/org/openoffice/idesupport/SVersionRCFile.java delete mode 100644 scripting/java/org/openoffice/idesupport/filter/AllFilesFilter.java delete mode 100644 scripting/java/org/openoffice/idesupport/filter/BinaryOnlyFilter.java delete mode 100644 scripting/java/org/openoffice/idesupport/filter/ExceptParcelFilter.java delete mode 100644 scripting/java/org/openoffice/idesupport/filter/FileFilter.java delete mode 100644 scripting/java/org/openoffice/idesupport/localoffice/LocalOfficeImpl.java delete mode 100644 scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java delete mode 100644 scripting/java/org/openoffice/idesupport/ui/MethodPanel.java delete mode 100644 scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java delete mode 100644 scripting/java/org/openoffice/idesupport/ui/add.gif delete mode 100644 scripting/java/org/openoffice/idesupport/xml/Manifest.java delete mode 100644 scripting/java/org/openoffice/idesupport/zip/ParcelZipper.java delete mode 100644 scripting/java/org/openoffice/netbeans/editor/JavaKit.java delete mode 100644 scripting/java/org/openoffice/netbeans/editor/NetBeansSourceView.java delete mode 100644 scripting/java/org/openoffice/netbeans/editor/OOo.jcb delete mode 100644 scripting/java/org/openoffice/netbeans/editor/OOo.jcs delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/Bundle.properties delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/Bundle_en_US.properties delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/actions/BuildParcelAction.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/actions/CompileParcelAction.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/actions/ConfigureParcelAction.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/actions/DeployParcelAction.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/actions/MountDocumentAction.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/actions/MountParcelAction.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/actions/OfficeDocumentCookie.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/actions/OfficeDocumentSupport.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelCookie.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorEditorSupport.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorParserCookie.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorParserSupport.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelFolderCookie.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelFolderSupport.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelSupport.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/filesystem/Bundle.properties delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/filesystem/Bundle_en_US.properties delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystemBeanInfo.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/Bundle.properties delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoaderBeanInfo.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataNode.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataObject.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolder.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolderDataLoader.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolderDataLoaderBeanInfo.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataLoader.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataLoaderBeanInfo.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataNode.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataObject.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataLoader.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataLoaderBeanInfo.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataNode.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataObject.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolder.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoader.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoaderBeanInfo.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/nodes/OfficeDocumentChildren.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/nodes/ParcelDescriptorChildren.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/nodes/ScriptNode.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/options/Bundle.properties delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettings.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettingsBeanInfo.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettingsIcon.gif delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettingsIcon32.gif delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/AppStorage.html delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/AppStorage.settings delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/Bundle.properties delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/EmptyParcel.html delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/OfficeIcon.gif delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/OfficeIcon32.gif delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/OfficeSettings.settings delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystem.html delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystem.settings delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystemIcon.png delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystemIcon32.png delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/ParcelIcon.gif delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/ScriptParcel.html delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/ScriptParcelDescriptor.html delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/layer.xml delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/mime-resolver.xml delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/office-scripting.url delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/templates/Empty.bsh_ delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/templates/Empty.java_ delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/templates/EmptyParcelDescriptor.xml_ delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/templates/HelloWorld.java_ delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/templates/ParcelDescriptor.xml_ delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/resources/webLink.gif delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/utils/FrameworkJarChecker.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/utils/ManifestParser.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/utils/NagDialog.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/utils/OfficeModule.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/utils/PackageRemover.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/utils/ZipMounter.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/wizard/Bundle.properties delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/wizard/Bundle_en_US.properties delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathDescriptor.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathIterator.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesPanel.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.form delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathPanel.java delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathVisualPanel.form delete mode 100644 scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathVisualPanel.java delete mode 100644 scripting/workben/bindings/EditDebug.xdl delete mode 100644 scripting/workben/bindings/EventsBinding.xdl delete mode 100644 scripting/workben/bindings/HelpBinding.xdl delete mode 100644 scripting/workben/bindings/KeyBinding.xdl delete mode 100644 scripting/workben/bindings/MacroEditor.xdl delete mode 100644 scripting/workben/bindings/MenuBinding.xdl delete mode 100644 scripting/workben/bindings/ScriptBinding.xba delete mode 100644 scripting/workben/bindings/calckeybinding.xml delete mode 100644 scripting/workben/bindings/calcmenubar.xml delete mode 100644 scripting/workben/bindings/drawkeybinding.xml delete mode 100644 scripting/workben/bindings/drawmenubar.xml delete mode 100644 scripting/workben/bindings/eventbindings.xml delete mode 100644 scripting/workben/bindings/impresskeybinding.xml delete mode 100644 scripting/workben/bindings/impressmenubar.xml delete mode 100644 scripting/workben/bindings/manifest.xml delete mode 100644 scripting/workben/bindings/writerkeybinding.xml delete mode 100644 scripting/workben/bindings/writermenubar.xml delete mode 100644 scripting/workben/build.xml delete mode 100644 scripting/workben/data/ExampleSpreadSheetLatest.sxc delete mode 100644 scripting/workben/data/doc_with_beanshell_scripts.sxw delete mode 100644 scripting/workben/data/doc_with_one_script.sxw delete mode 100644 scripting/workben/data/doc_with_two_scripts.sxw delete mode 100644 scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.protocolhandler.Dispatch.csv delete mode 100644 scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.provider.Function.csv delete mode 100644 scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.provider.FunctionProvider.csv delete mode 100644 scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager.csv delete mode 100644 scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.storage.ScriptInfo.csv delete mode 100644 scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.storage.ScriptStorage.csv delete mode 100644 scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.storage.ScriptStorageManager.csv delete mode 100644 scripting/workben/data/script_in_class_file.sxw delete mode 100644 scripting/workben/data/script_in_jar_file.sxw delete mode 100644 scripting/workben/data/share_scripts.zip delete mode 100644 scripting/workben/data/testdata/Function.csv delete mode 100644 scripting/workben/data/testdata/FunctionProvider.csv delete mode 100644 scripting/workben/data/testdata/ScriptInfo.csv delete mode 100644 scripting/workben/data/testdata/ScriptRuntimeManager.csv delete mode 100644 scripting/workben/data/testdata/ScriptStorage.csv delete mode 100644 scripting/workben/data/testdata/ScriptStorageManager.csv delete mode 100644 scripting/workben/data/user_scripts.zip delete mode 100644 scripting/workben/data/xscriptcontext_test_document.sxw delete mode 100644 scripting/workben/ifc/scripting/ScriptingUtils.java delete mode 100644 scripting/workben/ifc/scripting/SecurityDialogUtil.java delete mode 100644 scripting/workben/ifc/scripting/_XFunction.java delete mode 100644 scripting/workben/ifc/scripting/_XFunctionProvider.java delete mode 100644 scripting/workben/ifc/scripting/_XScriptInfo.java delete mode 100644 scripting/workben/ifc/scripting/_XScriptInfoAccess.java delete mode 100644 scripting/workben/ifc/scripting/_XScriptInvocation.java delete mode 100644 scripting/workben/ifc/scripting/_XScriptNameResolver.java delete mode 100644 scripting/workben/ifc/scripting/_XScriptSecurity.java delete mode 100644 scripting/workben/ifc/scripting/_XScriptStorageManager.java delete mode 100644 scripting/workben/ifc/scripting/_XScriptStorageRefresh.java delete mode 100644 scripting/workben/ifc/scripting/makefile.mk delete mode 100644 scripting/workben/installer/Banner.java delete mode 100644 scripting/workben/installer/ExceptionTraceHelper.java delete mode 100644 scripting/workben/installer/ExecCmd.java delete mode 100644 scripting/workben/installer/FileUpdater.java delete mode 100644 scripting/workben/installer/Final.java delete mode 100644 scripting/workben/installer/IdeFinal.java delete mode 100644 scripting/workben/installer/IdeUpdater.java delete mode 100644 scripting/workben/installer/IdeVersion.java delete mode 100644 scripting/workben/installer/IdeWelcome.java delete mode 100644 scripting/workben/installer/InstUtil.java delete mode 100644 scripting/workben/installer/InstallListener.java delete mode 100644 scripting/workben/installer/InstallWizard.java delete mode 100644 scripting/workben/installer/InstallationEvent.java delete mode 100644 scripting/workben/installer/LogStream.java delete mode 100644 scripting/workben/installer/NavPanel.java delete mode 100644 scripting/workben/installer/Navigation.java delete mode 100644 scripting/workben/installer/ProtocolHandler.xcu delete mode 100644 scripting/workben/installer/Register.java delete mode 100644 scripting/workben/installer/Scripting.BeanShell.xcu delete mode 100644 scripting/workben/installer/Scripting.JavaScript.xcu delete mode 100644 scripting/workben/installer/Scripting.xcs delete mode 100644 scripting/workben/installer/Version.java delete mode 100644 scripting/workben/installer/Welcome.java delete mode 100644 scripting/workben/installer/XmlUpdater.java delete mode 100644 scripting/workben/installer/ZipData.java delete mode 100644 scripting/workben/installer/sidebar.jpg delete mode 100644 scripting/workben/makefile.mk delete mode 100644 scripting/workben/mod/_scripting/Dispatch.java delete mode 100644 scripting/workben/mod/_scripting/Function.java delete mode 100644 scripting/workben/mod/_scripting/FunctionProvider.java delete mode 100644 scripting/workben/mod/_scripting/ScriptInfo.java delete mode 100644 scripting/workben/mod/_scripting/ScriptRuntimeManager.java delete mode 100644 scripting/workben/mod/_scripting/ScriptStorage.java delete mode 100644 scripting/workben/mod/_scripting/ScriptStorageManager.java delete mode 100644 scripting/workben/mod/_scripting/TestDataLoader.java delete mode 100644 scripting/workben/mod/_scripting/makefile.mk diff --git a/scripting/java/manifest.mf b/scripting/java/manifest.mf deleted file mode 100644 index ba14e301b3eb..000000000000 --- a/scripting/java/manifest.mf +++ /dev/null @@ -1,26 +0,0 @@ -Manifest-Version: 1.0 -OpenIDE-Module: org.openoffice.netbeans.modules.office/1 -OpenIDE-Module-Name: Office Support -OpenIDE-Module-Short-Description: Scripting Support for Office Documents -OpenIDE-Module-Localizing-Bundle: org/openoffice/netbeans/modules/office/Bundle.properties -OpenIDE-Module-Specification-Version: 0.2 -OpenIDE-Module-Implementation-Version: 0.2 -OpenIDE-Module-Install: org/openoffice/netbeans/modules/office/utils/OfficeModule.class -OpenIDE-Module-Layer: org/openoffice/netbeans/modules/office/resources/layer.xml - -Name: org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.class -OpenIDE-Module-Class: Loader - -Name: org/openoffice/netbeans/modules/office/loader/ParcelDataLoader.class -OpenIDE-Module-Class: Loader - -Name: org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataLoader.class -Install-Before: org.openide.loaders.XMLDataObject, org.netbeans.modules.xml.core.XMLDataObject -OpenIDE-Module-Class: Loader - -Name: org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoader.class -Install-Before: org.openoffice.netbeans.modules.office.loader.ParcelDescriptorDataLoader -OpenIDE-Module-Class: Loader - -Name: org/openoffice/netbeans/modules/office/loader/ParcelContentsFolderDataLoader.class -OpenIDE-Module-Class: Loader diff --git a/scripting/java/org/openoffice/idesupport/CommandLineTools.java b/scripting/java/org/openoffice/idesupport/CommandLineTools.java deleted file mode 100644 index 85995cdfac42..000000000000 --- a/scripting/java/org/openoffice/idesupport/CommandLineTools.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Hashtable; -import java.util.Enumeration; -import java.util.StringTokenizer; - -import com.sun.star.script.framework.container.ScriptEntry; -import com.sun.star.script.framework.container.ParcelDescriptor; - -import org.openoffice.idesupport.zip.ParcelZipper; -import org.openoffice.idesupport.filter.AllFilesFilter; -import com.sun.star.script.framework.container.XMLParserFactory; -import org.openoffice.idesupport.*; - -public class CommandLineTools { - private static final String PARCEL_XML_FILE = - ParcelZipper.PARCEL_DESCRIPTOR_XML; - - private static String officePath = null; - - public static void main(String[] args) { - CommandLineTools driver = new CommandLineTools(); - Command command = driver.parseArgs(args); - - // Get the URL for the Office DTD directory and pass it to the - // XMLParserFactory so that Office xml files can be parsed - if (officePath == null) { - try { - SVersionRCFile sv = SVersionRCFile.createInstance(); - - if (sv.getDefaultVersion() != null) { - officePath = sv.getDefaultVersion().getPath(); - } - } catch (IOException ioe) { - System.err.println("Error getting Office directory"); - } - } - - if (officePath == null) { - driver.fatalUsage("Error: Office Installation path not set"); - } - - File officeDir = new File(officePath); - - if (!officeDir.exists() || !officeDir.isDirectory()) { - driver.fatalUsage( - "Error: Office Installation path not valid: " + officePath); - } - - OfficeInstallation oi = new OfficeInstallation(officePath); - String url = oi.getURL("share/dtd/officedocument/1_0/"); - XMLParserFactory.setOfficeDTDURL(url); - - if (command == null) - driver.printUsage(); - else { - try { - command.execute(); - } catch (Exception e) { - driver.fatal("Error: " + e.getMessage()); - } - } - } - - private interface Command { - void execute() throws Exception; - } - - private void printUsage() { - System.out.println("java " + getClass().getName() + " -h " + - "prints this message"); - System.out.println("java " + getClass().getName() + - " [-o Path to Office Installation] " + - "-d - diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/webLink.gif b/scripting/java/org/openoffice/netbeans/modules/office/resources/webLink.gif deleted file mode 100644 index ae40f9af595f6f5ed8a8bc2167869c82c997dc71..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 969 zcmc&zOG}ku5PnLH1cP&g6G0a!j7USQK`?5Og_=b{5)v&6EhbV7Arhih2CWK2Dj2$l z-N;3C+_XzL(4y(G$T*7@{(#m+ixQ0tOvS}V>VHzf3$XWGJ3)N5wMXrj6Scry52#6H$fCV%l0T#q2G_knMX(UfR zb60n9N7Aw~b5l2QL#kj?%~f5+6)B3dVlL_;E}%xPI?SOCagdd&2}aRWNm=ZXnAn6S z7MGERvgT7WF+=(zEh|-1F-6*?3N}Se!~}FtQJgiXK@7CVJSdafjD!9uf)1&gU=&T2 z9HkBt6PwV)LME4O)_kIh43hpx%SuEA%$0Vjf=z`em?M*B0Mx~C22Hn&l6g=jw;2aD z(J&oSHNhyFo0LTzBqlbYktfP&wpsIm7h{n0M_N{b{5Ue#;@;UTPM9$lSIOBT=uExH zE?0{<@(6{)L@Gq*O$r?eTtM@4;FTC2Jrz_${||5TpT-qH9Xpac{|T&qhBwU{4!(ZW zTlwBPbZlgDxqBRVF*!BycyX+JZR_Fw=|g>$mZnn;?+5FhZEbt|c3xUDw{KhNYWd^B z+?UxSciUH%nwQsgov!`*_TyH^O!a=fYihrKIJ$9o{>kmprIzirGoN;q8gl*n6@6X6Mj!`=*nx?tHy)pmMzR?cXas NqqXZZ>sK{m&p(EUkFNj# diff --git a/scripting/java/org/openoffice/netbeans/modules/office/utils/FrameworkJarChecker.java b/scripting/java/org/openoffice/netbeans/modules/office/utils/FrameworkJarChecker.java deleted file mode 100644 index 9c6c33900383..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/utils/FrameworkJarChecker.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.utils; - -import java.io.File; -import java.io.IOException; -import java.beans.PropertyVetoException; - -import org.openide.filesystems.Repository; -import org.openide.filesystems.FileSystem; -import org.openide.filesystems.JarFileSystem; - -import org.openoffice.idesupport.SVersionRCFile; -import org.openoffice.netbeans.modules.office.options.OfficeSettings; - -public class FrameworkJarChecker { - - public static void mountDependencies() { - String unoilPath = SVersionRCFile.getPathForUnoil( - OfficeSettings.getDefault().getOfficeDirectory().getPath()); - - if (unoilPath == null) - return; - - File unoilFile = new File(unoilPath + File.separator + "unoil.jar"); - JarFileSystem jfs = new JarFileSystem(); - - try { - jfs.setJarFile(unoilFile); - } catch (IOException ioe) { - return; - } catch (PropertyVetoException pve) { - return; - } - - FileSystem result; - - try { - result = - Repository.getDefault().findFileSystem(jfs.getSystemName()); - } catch (Exception exp) { - result = null; - } finally { - jfs.removeNotify(); - } - - if (result == null) { - JarFileSystem newjfs = new JarFileSystem(); - - try { - newjfs.setJarFile(unoilFile); - } catch (IOException ioe) { - return; - } catch (PropertyVetoException pve) { - return; - } - - Repository.getDefault().addFileSystem(newjfs); - newjfs.setHidden(true); - } - } - - public static void unmountDependencies() { - String unoilPath = SVersionRCFile.getPathForUnoil( - OfficeSettings.getDefault().getOfficeDirectory().getPath()); - - if (unoilPath == null) - return; - - File unoilFile = new File(unoilPath + File.separator + "unoil.jar"); - JarFileSystem jfs = new JarFileSystem(); - - try { - jfs.setJarFile(unoilFile); - } catch (IOException ioe) { - return; - } catch (PropertyVetoException pve) { - return; - } - - FileSystem result; - - try { - result = - Repository.getDefault().findFileSystem(jfs.getSystemName()); - - if (result != null) - Repository.getDefault().removeFileSystem(result); - } catch (Exception exp) { - } - } - - private static void warnBeforeMount() { - OfficeSettings settings = OfficeSettings.getDefault(); - - if (!settings.getWarnBeforeMount()) - return; - - String message = "The Office Scripting Framework support jar file " + - "is not mounted, so Office scripts will not compile. NetBeans " + - "is going to mount this jar file automatically."; - - String prompt = "Show this message in future."; - - NagDialog warning = NagDialog.createInformationDialog( - message, prompt, true); - - if (!warning.getState()) { - settings.setWarnBeforeMount(false); - } - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/utils/ManifestParser.java b/scripting/java/org/openoffice/netbeans/modules/office/utils/ManifestParser.java deleted file mode 100644 index 67e6202c7789..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/utils/ManifestParser.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.utils; - -import java.io.InputStream; -import java.io.OutputStream; -import java.io.IOException; -import java.io.File; - -import org.w3c.dom.Document; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; - -import org.openide.xml.XMLUtil; - -import com.sun.star.script.framework.container.XMLParser; -import org.openoffice.netbeans.modules.office.options.OfficeSettings; -import org.openoffice.idesupport.OfficeInstallation; - -public class ManifestParser implements XMLParser { - - private static ManifestParser parser = null; - - private ManifestParser() { - } - - public static synchronized ManifestParser getManifestParser() { - if (parser == null) { - parser = new ManifestParser(); - } - - return parser; - } - - public Document parse(InputStream inputStream) { - InputSource is; - Document result = null; - - try { - OfficeInstallation oi = OfficeSettings.getDefault().getOfficeDirectory(); - String id = oi.getURL("share/dtd/officedocument/1_0/"); - - is = new InputSource(inputStream); - is.setSystemId(id); - - result = XMLUtil.parse(is, false, false, null, null); - } catch (IOException ioe) { - System.out.println("IO Error parsing stream."); - return null; - } catch (SAXParseException spe) { - System.out.println("Sax Error parsing stream: " + spe.getMessage()); - System.out.println("\tPublicId: " + spe.getPublicId()); - System.out.println("\tSystemId: " + spe.getSystemId()); - return null; - } catch (SAXException se) { - System.out.println("Sax Error parsing stream: " + se.getMessage()); - return null; - } - - return result; - } - - public void write(Document doc, OutputStream out) throws IOException { - XMLUtil.write(doc, out, ""); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/utils/NagDialog.java b/scripting/java/org/openoffice/netbeans/modules/office/utils/NagDialog.java deleted file mode 100644 index f6f9ee148e0e..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/utils/NagDialog.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.utils; - -import java.awt.BorderLayout; -import java.awt.Dimension; - -import javax.swing.JPanel; -import javax.swing.JOptionPane; -import javax.swing.JCheckBox; -import javax.swing.border.EmptyBorder; - -import org.openide.TopManager; -import org.openide.NotifyDescriptor; - -public class NagDialog { - - private NotifyDescriptor descriptor; - private JPanel panel; - private JCheckBox checkbox; - - private NagDialog(String message, String prompt, boolean initialState, - int type) { - initUI(message, prompt, initialState, type); - } - - public static NagDialog createInformationDialog( - String message, String prompt, boolean initialState) { - NagDialog result = new NagDialog( - message, prompt, initialState, JOptionPane.INFORMATION_MESSAGE); - - result.setDescriptor(new NotifyDescriptor.Message(result.getPanel(), - NotifyDescriptor.PLAIN_MESSAGE)); - - return result; - } - - public static NagDialog createConfirmationDialog( - String message, String prompt, boolean initialState) { - NagDialog result = new NagDialog( - message, prompt, initialState, JOptionPane.QUESTION_MESSAGE); - - result.setDescriptor(new NotifyDescriptor.Confirmation( - result.getPanel(), NotifyDescriptor.OK_CANCEL_OPTION, - NotifyDescriptor.PLAIN_MESSAGE)); - - return result; - } - - public boolean show() { - TopManager.getDefault().notify(descriptor); - - return (descriptor.getValue() == NotifyDescriptor.OK_OPTION); - } - - public boolean getState() { - return checkbox.isSelected(); - } - - private JPanel getPanel() { - return this.panel; - } - - private void setDescriptor(NotifyDescriptor descriptor) { - this.descriptor = descriptor; - } - - private void initUI(String message, String prompt, boolean initialState, - int type) { - - this.panel = new JPanel(); - JOptionPane optionPane = new JOptionPane(message, type, 0, null, - new Object[0], null) { - public int getMaxCharactersPerLineCount() { - return 100; - } - }; - optionPane.setUI(new javax.swing.plaf.basic.BasicOptionPaneUI() { - public Dimension getMinimumOptionPaneSize() { - if (minimumSize == null) { - return new Dimension(MinimumWidth, 50); - } - - return new Dimension(minimumSize.width, 50); - } - }); - optionPane.setWantsInput(false); - - JPanel checkPanel = new JPanel(); - checkbox = new JCheckBox(prompt, initialState); - checkPanel.setLayout(new BorderLayout()); - checkPanel.setBorder(new EmptyBorder(0, 20, 0, 0)); - checkPanel.add(checkbox, BorderLayout.WEST); - - this.panel.setLayout(new BorderLayout()); - this.panel.add(optionPane, BorderLayout.CENTER); - this.panel.add(checkPanel, BorderLayout.SOUTH); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/utils/OfficeModule.java b/scripting/java/org/openoffice/netbeans/modules/office/utils/OfficeModule.java deleted file mode 100644 index a4d917e2552b..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/utils/OfficeModule.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.utils; - -import org.openide.TopManager; -import org.openide.WizardDescriptor; -import org.openide.NotifyDescriptor; -import org.openide.modules.ModuleInstall; - -import com.sun.star.script.framework.container.XMLParserFactory; -import org.openoffice.idesupport.OfficeInstallation; -import org.openoffice.netbeans.modules.office.wizard.InstallationPathDescriptor; -import org.openoffice.netbeans.modules.office.options.OfficeSettings; - -public class OfficeModule extends ModuleInstall { - - private static final long serialVersionUID = -8499324854301243852L; - - public void installed() { - WizardDescriptor wiz = new InstallationPathDescriptor(); - TopManager.getDefault().createDialog(wiz).show(); - - if (wiz.getValue() == NotifyDescriptor.OK_OPTION) { - OfficeInstallation oi = (OfficeInstallation) - wiz.getProperty(InstallationPathDescriptor.PROP_INSTALLPATH); - - OfficeSettings settings = OfficeSettings.getDefault(); - settings.setOfficeDirectory(oi); - } - - FrameworkJarChecker.mountDependencies(); - XMLParserFactory.setParser(ManifestParser.getManifestParser()); - } - - public void restored() { - FrameworkJarChecker.mountDependencies(); - XMLParserFactory.setParser(ManifestParser.getManifestParser()); - } - - public boolean closing() { - FrameworkJarChecker.unmountDependencies(); - return true; - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/utils/PackageRemover.java b/scripting/java/org/openoffice/netbeans/modules/office/utils/PackageRemover.java deleted file mode 100644 index f79368f6f495..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/utils/PackageRemover.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.utils; - -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.IOException; - -import org.openoffice.idesupport.zip.ParcelZipper; - -public class PackageRemover { - private PackageRemover() { - } - - public static void removeDeclaration(File source) throws IOException { - File tmp = new File(source.getAbsolutePath() + ".tmp"); - - BufferedReader in = new BufferedReader(new FileReader(source)); - BufferedWriter out = new BufferedWriter(new FileWriter(tmp)); - - try { - String line; - - while ((line = in.readLine()) != null) { - if (line.startsWith("package")) { - String newDeclaration = evaluate(line); - - if (newDeclaration != null) { - out.write(newDeclaration, 0, newDeclaration.length()); - out.newLine(); - } - } else { - out.write(line, 0, line.length()); - out.newLine(); - } - } - } finally { - if (in != null) { - in.close(); - } - - if (out != null) { - out.close(); - } - } - - if (!source.delete()) { - tmp.delete(); - throw new IOException("Could not overwrite " + source); - } else { - tmp.renameTo(source); - } - } - - public static String evaluate(String line) { - - int idx = line.indexOf(ParcelZipper.CONTENTS_DIRNAME); - - if (idx == -1) - return line; - - idx = idx + ParcelZipper.CONTENTS_DIRNAME.length(); - - if (line.charAt(idx) == '.') - return "package " + line.substring(idx + 1);; - - return null; - } - - public static void main(String[] args) { - File source = new File(args[0]); - - try { - removeDeclaration(source); - } catch (IOException ioe) { - ioe.printStackTrace(); - } - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/utils/ZipMounter.java b/scripting/java/org/openoffice/netbeans/modules/office/utils/ZipMounter.java deleted file mode 100644 index 4163ea1ea99f..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/utils/ZipMounter.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.utils; - -import java.io.*; -import java.util.zip.*; -import java.beans.PropertyVetoException; - -import org.openide.filesystems.FileSystem; -import org.openide.filesystems.Repository; - -import org.openoffice.netbeans.modules.office.filesystem.OpenOfficeDocFileSystem; - -public class ZipMounter { - private static ZipMounter mounter = null; - - private ZipMounter() { - } - - public static synchronized ZipMounter getZipMounter() { - if (mounter == null) - mounter = new ZipMounter(); - - return mounter; - } - - public void mountZipFile(File zipfile) - throws IOException, PropertyVetoException { - if (zipfile != null) { - addDocumentToRepository(zipfile, true); - } - } - - private FileSystem addDocumentToRepository(File rootFile, boolean writeable) - throws IOException, PropertyVetoException { - Repository repo = Repository.getDefault(); - OpenOfficeDocFileSystem oofs; - oofs = (OpenOfficeDocFileSystem)getMountedDocument(rootFile); - - if (oofs != null) - repo.removeFileSystem(oofs); - - oofs = new OpenOfficeDocFileSystem(); - oofs.setDocument(rootFile); - repo.addFileSystem(oofs); - return oofs; - } - - /** @return FileSystem which has given jar file as its root or - * null if no such file system could be found in repository */ - private FileSystem getMountedDocument(File rootFile) { - if (rootFile == null) - return null; - - FileSystem oofs = null; - - try { - oofs = Repository.getDefault().findFileSystem( - OpenOfficeDocFileSystem.computeSystemName(rootFile)); - } catch (Exception exp) { - } - - return oofs; - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/Bundle.properties b/scripting/java/org/openoffice/netbeans/modules/office/wizard/Bundle.properties deleted file mode 100644 index 7474954ee059..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/Bundle.properties +++ /dev/null @@ -1,44 +0,0 @@ -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.apache.org/licenses/LICENSE-2.0 . -# -# Window System API -# x-no-translate - -# TopComponent -LBL_component_name= -#LBL_mode_name= -#LBL_workspace_name= - -# WizardDescriptor -# Dialog title: -TITLE_wizard=Select Path to OpenOffice.org Installation - -# WizardDescriptor.Iterator -# Label the sequence #. Appears at top of pane: -# e.g. "Panel Name (1 of 3)" -TITLE_x_of_y={0} of {1} -# Provide list of steps to show in left pane: -#LBL_step_1=Select First Thing -#LBL_step_2=Configure Details - -# WizardDescriptor.Panel -# Will appear in dialog title; see above -TITLE_ParcelPropertiesVisualPanel=Parcel Recipe Properties -TITLE_SelectPathVisualPanel=Path to OpenOffice.org - -# CallableSystemAction -LBL_Action=Run Action diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/Bundle_en_US.properties b/scripting/java/org/openoffice/netbeans/modules/office/wizard/Bundle_en_US.properties deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathDescriptor.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathDescriptor.java deleted file mode 100644 index f75873dade3f..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathDescriptor.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import java.awt.Dimension; -import java.awt.Toolkit; -import java.net.URL; -import java.net.MalformedURLException; - -import org.openide.TopManager; -import org.openide.WizardDescriptor; -import org.openide.util.NbBundle; - -/** A wizard descriptor. - */ -public class InstallationPathDescriptor extends WizardDescriptor { - - private final InstallationPathIterator iterator; - public static final String PROP_INSTALLPATH = "INSTALLPATH"; - - /** Make a descriptor suited to use InstallationPathIterator. - * Sets up various wizard properties to follow recommended - * style guidelines. - */ - public InstallationPathDescriptor() { - this(new InstallationPathIterator()); - } - private InstallationPathDescriptor(InstallationPathIterator iterator) { - super(iterator); - this.iterator = iterator; - // Set title for the dialog: - setTitle(NbBundle.getMessage(InstallationPathDescriptor.class, "TITLE_wizard")); - // Make the left pane appear: - putProperty("WizardPanel_autoWizardStyle", Boolean.TRUE); // NOI18N - // Make the left pane show list of steps etc.: - putProperty("WizardPanel_contentDisplayed", Boolean.TRUE); // NOI18N - } - - // Called when user moves forward or backward etc.: - protected void updateState() { - super.updateState(); - putProperty("WizardPanel_contentData", iterator.getSteps()); // NOI18N - putProperty("WizardPanel_contentSelectedIndex", - Integer.valueOf(iterator.getIndex())); // NOI18N - } - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathIterator.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathIterator.java deleted file mode 100644 index fafd40165978..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathIterator.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.HashSet; -import java.util.Iterator; -import java.util.NoSuchElementException; -import java.util.Set; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import org.openide.WizardDescriptor; -import org.openide.util.NbBundle; - -/** A wizard iterator (sequence of panels). - * Used to create a wizard. Create one or more - * panels from template as needed too. - */ -public class InstallationPathIterator implements WizardDescriptor.Iterator { - - // You should define what panels you want to use here: - - protected WizardDescriptor.Panel[] createPanels() { - return new WizardDescriptor.Panel[] { - new SelectPathPanel() - }; - } - - // And the list of step names: - - protected String[] createSteps() { - return new String[] { - "Select OpenOffice.org Installation" - }; - } - - // --- The rest probably does not need to be touched. --- - - // Keep track of the panels and selected panel: - - private transient int index = 0; - // Also package-accessible to descriptor: - protected final int getIndex() { - return index; - } - private transient WizardDescriptor.Panel[] panels = null; - protected final WizardDescriptor.Panel[] getPanels() { - if (panels == null) { - panels = createPanels(); - } - - return panels; - } - - // Also the list of steps in the left pane: - - private transient String[] steps = null; - // Also package-accessible to descriptor: - protected final String[] getSteps() { - if (steps == null) { - steps = createSteps(); - } - - return steps; - } - - // --- WizardDescriptor.Iterator METHODS: --- - // Note that this is very similar to WizardDescriptor.Iterator, but with a - // few more options for customization. If you e.g. want to make panels appear - // or disappear dynamically, go ahead. - - public String name() { - return NbBundle.getMessage(InstallationPathIterator.class, "TITLE_x_of_y", - Integer.valueOf(index + 1), Integer.valueOf(getPanels().length)); - } - - public boolean hasNext() { - return index < getPanels().length - 1; - } - public boolean hasPrevious() { - return index > 0; - } - public void nextPanel() { - if (!hasNext()) throw new NoSuchElementException(); - - index++; - } - public void previousPanel() { - if (!hasPrevious()) throw new NoSuchElementException(); - - index--; - } - public WizardDescriptor.Panel current() { - return getPanels()[index]; - } - - // If nothing unusual changes in the middle of the wizard, simply: - public final void addChangeListener(ChangeListener l) {} - public final void removeChangeListener(ChangeListener l) {} - // If something changes dynamically (besides moving between panels), - // e.g. the number of panels changes in response to user input, then - // uncomment the following and call when needed: - // fireChangeEvent(); - /* - private transient Set listeners = new HashSet(1); // Set - public final void addChangeListener(ChangeListener l) { - synchronized (listeners) { - listeners.add(l); - } - } - public final void removeChangeListener(ChangeListener l) { - synchronized (listeners) { - listeners.remove(l); - } - } - protected final void fireChangeEvent() { - Iterator it; - synchronized (listeners) { - it = new HashSet(listeners).iterator(); - } - ChangeEvent ev = new ChangeEvent(this); - while (it.hasNext()) { - ((ChangeListener)it.next()).stateChanged(ev); - } - } - private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - in.defaultReadObject(); - listeners = new HashSet(1); - } - */ - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java deleted file mode 100644 index dd602ce1131d..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import java.awt.Component; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.NoSuchElementException; -import java.util.Set; -import javax.swing.JComponent; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import org.openide.ErrorManager; -import org.openide.TopManager; -import org.openide.NotifyDescriptor; -import org.openide.WizardDescriptor; -import org.openide.cookies.OpenCookie; -import org.openide.cookies.SourceCookie; -import org.openide.loaders.*; -import org.openide.util.NbBundle; -import org.openide.filesystems.*; - -import org.openoffice.idesupport.zip.ParcelZipper; -import org.openoffice.netbeans.modules.office.loader.ParcelFolder; -import org.openoffice.netbeans.modules.office.filesystem.OpenOfficeDocFileSystem; -import org.openoffice.netbeans.modules.office.utils.PackageRemover; - -/** A template wizard iterator (sequence of panels). - * Used to fill in the second and subsequent panels in the New wizard. - * Associate this to a template inside a layer using the - * Sequence of Panels extra property. - * Create one or more panels from template as needed too. - */ -public class JavaScriptIterator implements TemplateWizard.Iterator { - - - // You should define what panels you want to use here: - - protected WizardDescriptor.Panel[] createPanels() { - return new WizardDescriptor.Panel[] { - // keep the default 2nd panel: - wiz.targetChooser(), - }; - } - - // And the list of step names: - - protected String[] createSteps() { - return new String[] { - null, - }; - } - - private DataFolder checkTarget(DataFolder folder) { - FileObject fo = folder.getPrimaryFile(); - - try { - FileSystem fs = fo.getFileSystem(); - - if (fs instanceof OpenOfficeDocFileSystem && fo.isRoot()) { - FileObject scripts = - fo.getFileObject(OpenOfficeDocFileSystem.SCRIPTS_ROOT); - - if (scripts == null) - scripts = - fo.createFolder(OpenOfficeDocFileSystem.SCRIPTS_ROOT); - - FileObject javafolder = scripts.getFileObject("java"); - - if (javafolder == null) - javafolder = scripts.createFolder("java"); - - DataFolder subfolder = new DataFolder(javafolder); - return subfolder; - } - } catch (IOException ioe) { - /* do nothing, we will just return the folder we were passed in */ - } - - return folder; - } - - public Set instantiate(TemplateWizard wiz) throws IOException { - String name = wiz.getTargetName(); - DataFolder targetFolder = wiz.getTargetFolder(); - targetFolder = checkTarget(targetFolder); - - DataObject template = wiz.getTemplate(); - DataObject result; - - if (name == null) { - // Default name. - result = template.createFromTemplate(targetFolder); - } else { - result = template.createFromTemplate(targetFolder, name); - } - - FileObject tmp = result.getPrimaryFile(); - - if (tmp.getExt().equals("java")) { - try { - PackageRemover.removeDeclaration(FileUtil.toFile(tmp)); - - // IssueZilla 11986 - rename the FileObject - // so the JavaNode is resynchronized - tmp.rename(tmp.lock(), tmp.getName(), tmp.getExt()); - } catch (IOException ioe) { - NotifyDescriptor d = new NotifyDescriptor.Message( - "Error removing package declaration from file: " + - tmp.getNameExt() + - ". You should manually remove this declaration " + - "before building the Parcel Recipe"); - TopManager.getDefault().notify(d); - } - } - - return Collections.singleton(result); - } - - // --- The rest probably does not need to be touched. --- - - private transient int index; - private transient WizardDescriptor.Panel[] panels; - private transient TemplateWizard wiz; - - // You can keep a reference to the TemplateWizard which can - // provide various kinds of useful information such as - // the currently selected target name. - // Also the panels will receive wiz as their "settings" object. - public void initialize(TemplateWizard wiz) { - this.wiz = wiz; - index = 0; - panels = createPanels(); - // Make sure list of steps is accurate. - String[] steps = createSteps(); - - for (int i = 0; i < panels.length; i++) { - Component c = panels[i].getComponent(); - - if (steps[i] == null) { - // Default step name to component name of panel. - // Mainly useful for getting the name of the target - // chooser to appear in the list of steps. - steps[i] = c.getName(); - } - - if (c instanceof JComponent) { // assume Swing components - JComponent jc = (JComponent)c; - // Step #. - jc.putClientProperty("WizardPanel_contentSelectedIndex", - Integer.valueOf(i)); // NOI18N - // Step name (actually the whole list for reference). - jc.putClientProperty("WizardPanel_contentData", steps); // NOI18N - } - } - } - public void uninitialize(TemplateWizard wiz) { - this.wiz = null; - panels = null; - } - - // --- WizardDescriptor.Iterator METHODS: --- - // Note that this is very similar to WizardDescriptor.Iterator, but with a - // few more options for customization. If you e.g. want to make panels appear - // or disappear dynamically, go ahead. - - public String name() { - return ""; - } - - public boolean hasNext() { - return index < panels.length - 1; - } - public boolean hasPrevious() { - return index > 0; - } - public void nextPanel() { - if (!hasNext()) throw new NoSuchElementException(); - - index++; - } - public void previousPanel() { - if (!hasPrevious()) throw new NoSuchElementException(); - - index--; - } - public WizardDescriptor.Panel current() { - return panels[index]; - } - - // If nothing unusual changes in the middle of the wizard, simply: - public final void addChangeListener(ChangeListener l) {} - public final void removeChangeListener(ChangeListener l) {} - // If something changes dynamically (besides moving between panels), - // e.g. the number of panels changes in response to user input, then - // uncomment the following and call when needed: - // fireChangeEvent(); - /* - private transient Set listeners = new HashSet(1); // Set - public final void addChangeListener(ChangeListener l) { - synchronized(listeners) { - listeners.add(l); - } - } - public final void removeChangeListener(ChangeListener l) { - synchronized(listeners) { - listeners.remove(l); - } - } - protected final void fireChangeEvent() { - Iterator it; - synchronized (listeners) { - it = new HashSet(listeners).iterator(); - } - ChangeEvent ev = new ChangeEvent(this); - while (it.hasNext()) { - ((ChangeListener)it.next()).stateChanged(ev); - } - } - private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - in.defaultReadObject(); - listeners = new HashSet(1); - } - */ - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java deleted file mode 100644 index 4135724d2010..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import java.awt.Component; -import java.io.File; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.NoSuchElementException; -import java.util.Set; -import javax.swing.JComponent; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import org.openide.TopManager; -import org.openide.NotifyDescriptor; -import org.openide.WizardDescriptor; -import org.openide.cookies.OpenCookie; -import org.openide.cookies.SourceCookie; -import org.openide.loaders.*; -import org.openide.util.NbBundle; -import org.openide.filesystems.*; - -import com.sun.star.script.framework.container.ParcelDescriptor; -import org.openoffice.idesupport.zip.ParcelZipper; -import org.openoffice.netbeans.modules.office.loader.ParcelFolder; -import org.openoffice.netbeans.modules.office.loader.ParcelContentsFolder; -import org.openoffice.netbeans.modules.office.filesystem.OpenOfficeDocFileSystem; - -/** A template wizard iterator (sequence of panels). - * Used to fill in the second and subsequent panels in the New wizard. - * Associate this to a template inside a layer using the - * Sequence of Panels extra property. - * Create one or more panels from template as needed too. - */ -public class ParcelContentsIterator implements TemplateWizard.Iterator { - - - // You should define what panels you want to use here: - - public static final String PROP_LANGUAGE = - ParcelFolder.LANGUAGE_ATTRIBUTE; - - protected WizardDescriptor.Panel[] createPanels() { - return new WizardDescriptor.Panel[] { - new ParcelPropertiesPanel(), - }; - } - - // And the list of step names: - - protected String[] createSteps() { - return new String[] { - // null, - "Parcel Properties", - }; - } - - private DataFolder checkTarget(DataFolder folder) { - FileObject fo = folder.getPrimaryFile(); - - try { - FileSystem fs = fo.getFileSystem(); - - if (fs instanceof OpenOfficeDocFileSystem && fo.isRoot()) { - FileObject scripts = - fo.getFileObject(OpenOfficeDocFileSystem.SCRIPTS_ROOT); - - if (scripts == null) - scripts = - fo.createFolder(OpenOfficeDocFileSystem.SCRIPTS_ROOT); - - FileObject javafolder = scripts.getFileObject("java"); - - if (javafolder == null) - javafolder = scripts.createFolder("java"); - - DataFolder subfolder = new DataFolder(javafolder); - return subfolder; - } - } catch (IOException ioe) { - /* do nothing, we will just return the folder we were passed in */ - } - - return folder; - } - - public Set instantiate(TemplateWizard wiz) throws IOException { - String name = wiz.getTargetName(); - DataFolder targetFolder = wiz.getTargetFolder(); - targetFolder = checkTarget(targetFolder); - - String language = (String)wiz.getProperty(PROP_LANGUAGE); - - DataObject template = wiz.getTemplate(); - DataObject result; - - if (name == null) { - // Default name. - result = template.createFromTemplate(targetFolder); - } else { - result = template.createFromTemplate(targetFolder, name); - } - - FileObject recipe = result.getPrimaryFile(); - - FileObject contents = - recipe.getFileObject(ParcelZipper.CONTENTS_DIRNAME); - - if (contents != null) { - File f = FileUtil.toFile(contents); - ParcelDescriptor pd = ParcelDescriptor.createParcelDescriptor(f); - pd.setLanguage(language); - pd.write(); - - DataFolder parent = DataFolder.findFolder(contents); - ParcelContentsFolder.createEmptyScript(parent, language); - } - - return Collections.singleton(result); - } - - // --- The rest probably does not need to be touched. --- - - private transient int index; - private transient WizardDescriptor.Panel[] panels; - private transient TemplateWizard wiz; - - // You can keep a reference to the TemplateWizard which can - // provide various kinds of useful information such as - // the currently selected target name. - // Also the panels will receive wiz as their "settings" object. - public void initialize(TemplateWizard wiz) { - this.wiz = wiz; - index = 0; - panels = createPanels(); - // Make sure list of steps is accurate. - String[] steps = createSteps(); - - for (int i = 0; i < panels.length; i++) { - Component c = panels[i].getComponent(); - - if (steps[i] == null) { - // Default step name to component name of panel. - // Mainly useful for getting the name of the target - // chooser to appear in the list of steps. - steps[i] = c.getName(); - } - - if (c instanceof JComponent) { // assume Swing components - JComponent jc = (JComponent)c; - // Step #. - jc.putClientProperty("WizardPanel_contentSelectedIndex", - Integer.valueOf(i)); // NOI18N - // Step name (actually the whole list for reference). - jc.putClientProperty("WizardPanel_contentData", steps); // NOI18N - } - } - } - public void uninitialize(TemplateWizard wiz) { - this.wiz = null; - panels = null; - } - - // --- WizardDescriptor.Iterator METHODS: --- - // Note that this is very similar to WizardDescriptor.Iterator, but with a - // few more options for customization. If you e.g. want to make panels appear - // or disappear dynamically, go ahead. - - public String name() { - return ""; - } - - public boolean hasNext() { - return index < panels.length - 1; - } - public boolean hasPrevious() { - return index > 0; - } - public void nextPanel() { - if (!hasNext()) throw new NoSuchElementException(); - - index++; - } - public void previousPanel() { - if (!hasPrevious()) throw new NoSuchElementException(); - - index--; - } - public WizardDescriptor.Panel current() { - return panels[index]; - } - - // If nothing unusual changes in the middle of the wizard, simply: - public final void addChangeListener(ChangeListener l) {} - public final void removeChangeListener(ChangeListener l) {} - // If something changes dynamically (besides moving between panels), - // e.g. the number of panels changes in response to user input, then - // uncomment the following and call when needed: - // fireChangeEvent(); - /* - private transient Set listeners = new HashSet(1); // Set - public final void addChangeListener(ChangeListener l) { - synchronized(listeners) { - listeners.add(l); - } - } - public final void removeChangeListener(ChangeListener l) { - synchronized(listeners) { - listeners.remove(l); - } - } - protected final void fireChangeEvent() { - Iterator it; - synchronized (listeners) { - it = new HashSet(listeners).iterator(); - } - ChangeEvent ev = new ChangeEvent(this); - while (it.hasNext()) { - ((ChangeListener)it.next()).stateChanged(ev); - } - } - private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - in.defaultReadObject(); - listeners = new HashSet(1); - } - */ - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesPanel.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesPanel.java deleted file mode 100644 index aaf3abd5a186..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesPanel.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import java.awt.Component; -import java.net.URL; -import java.net.MalformedURLException; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import org.openide.WizardDescriptor; -import org.openide.loaders.TemplateWizard; -import org.openide.util.HelpCtx; -import org.openide.util.NbBundle; - -/** A single panel descriptor for a wizard. - * You probably want to make a wizard iterator to hold it. - */ -public class ParcelPropertiesPanel implements WizardDescriptor.FinishPanel { - - /** The visual component that displays this panel. - * If you need to access the component from this class, - * just use getComponent(). - */ - private ParcelPropertiesVisualPanel component; - - // Get the visual component for the panel. In this template, the component - // is kept separate. This can be more efficient: if the wizard is created - // but never displayed, or not all panels are displayed, it is better to - // create only those which really need to be visible. - public Component getComponent() { - if (component == null) { - component = new ParcelPropertiesVisualPanel(this); - } - - return component; - } - - public HelpCtx getHelp() { - // Show no Help button for this panel: - return HelpCtx.DEFAULT_HELP; - // If you have context help: - // return new HelpCtx(ParcelPropertiesPanel.class); - } - - public boolean isValid() { - // If it is always OK to press Next or Finish, then: - return true; - // If it depends on some condition (form filled out...), then: - // return someCondition(); - // and when this condition changes (last form field filled in...) then: - // fireChangeEvent(); - // and uncomment the complicated stuff below. - } - - public final void addChangeListener(ChangeListener l) {} - public final void removeChangeListener(ChangeListener l) {} - /* - private final Set listeners = new HashSet(1); // Set - public final void addChangeListener(ChangeListener l) { - synchronized (listeners) { - listeners.add(l); - } - } - public final void removeChangeListener(ChangeListener l) { - synchronized (listeners) { - listeners.remove(l); - } - } - protected final void fireChangeEvent() { - Iterator it; - synchronized (listeners) { - it = new HashSet(listeners).iterator(); - } - ChangeEvent ev = new ChangeEvent(this); - while (it.hasNext()) { - ((ChangeListener)it.next()).stateChanged(ev); - } - } - */ - - public void setName(String name) { - this.name = name; - } - - public void setLanguage(String language) { - this.language = language; - } - - private String language = "Java"; - private String name = null; - - // You can use a settings object to keep track of state. - // Normally the settings object will be the WizardDescriptor, - // so you can use WizardDescriptor.getProperty & putProperty - // to store information entered by the user. - public void readSettings(Object settings) { - } - - public void storeSettings(Object settings) { - TemplateWizard wiz = (TemplateWizard)settings; - wiz.setTargetName(name); - wiz.putProperty(ParcelContentsIterator.PROP_LANGUAGE, language); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.form b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.form deleted file mode 100644 index 5c22ca6f2fe4..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.form +++ /dev/null @@ -1,90 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.java deleted file mode 100644 index bf10d713e4c7..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import org.openide.util.NbBundle; - -/** A single panel for a wizard - the GUI portion. - */ -public class ParcelPropertiesVisualPanel extends javax.swing.JPanel { - - /** The wizard panel descriptor associated with this GUI panel. - * If you need to fire state changes or something similar, you can - * use this handle to do so. - */ - private final ParcelPropertiesPanel panel; - - /** Create the wizard panel and set up some basic properties. */ - public ParcelPropertiesVisualPanel(ParcelPropertiesPanel panel) { - this.panel = panel; - initComponents(); - - languagesComboBox.addItem("Java"); - languagesComboBox.addItem("BeanShell"); - - // Provide a name in the title bar. - setName(NbBundle.getMessage(ParcelPropertiesVisualPanel.class, - "TITLE_ParcelPropertiesVisualPanel")); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - java.awt.GridBagConstraints gridBagConstraints; - - jLabel1 = new javax.swing.JLabel(); - recipeName = new javax.swing.JTextField(); - jLabel2 = new javax.swing.JLabel(); - languagesComboBox = new javax.swing.JComboBox(); - jPanel1 = new javax.swing.JPanel(); - - setLayout(new java.awt.GridBagLayout()); - - setPreferredSize(new java.awt.Dimension(500, 300)); - jLabel1.setText("Parcel Recipe Name"); - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 0; - gridBagConstraints.gridy = 0; - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; - gridBagConstraints.insets = new java.awt.Insets(12, 12, 11, 2); - add(jLabel1, gridBagConstraints); - - recipeName.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - recipeNameActionPerformed(evt); - } - }); - - recipeName.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - recipeNameFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - recipeNameFocusLost(evt); - } - }); - - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 1; - gridBagConstraints.gridy = 0; - gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; - gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; - gridBagConstraints.weightx = 1.0; - gridBagConstraints.insets = new java.awt.Insets(12, 0, 11, 11); - add(recipeName, gridBagConstraints); - - jLabel2.setText("Initial Script Language"); - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 0; - gridBagConstraints.gridy = 1; - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; - gridBagConstraints.insets = new java.awt.Insets(0, 12, 11, 12); - add(jLabel2, gridBagConstraints); - - languagesComboBox.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - languagesComboBoxActionPerformed(evt); - } - }); - - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 1; - gridBagConstraints.gridy = 1; - gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; - gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; - gridBagConstraints.insets = new java.awt.Insets(0, 0, 11, 11); - add(languagesComboBox, gridBagConstraints); - - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; - gridBagConstraints.weighty = 1.0; - add(jPanel1, gridBagConstraints); - - }//GEN-END:initComponents - - private void recipeNameFocusGained(java.awt.event.FocusEvent - evt) {//GEN-FIRST:event_recipeNameFocusGained - recipeName.selectAll(); - }//GEN-LAST:event_recipeNameFocusGained - - private void recipeNameFocusLost(java.awt.event.FocusEvent - evt) {//GEN-FIRST:event_recipeNameFocusLost - changeName(); - }//GEN-LAST:event_recipeNameFocusLost - - private void languagesComboBoxActionPerformed(java.awt.event.ActionEvent - evt) {//GEN-FIRST:event_languagesComboBoxActionPerformed - String language = (String)languagesComboBox.getSelectedItem(); - panel.setLanguage(language); - }//GEN-LAST:event_languagesComboBoxActionPerformed - - private void recipeNameActionPerformed(java.awt.event.ActionEvent - evt) {//GEN-FIRST:event_recipeNameActionPerformed - changeName(); - }//GEN-LAST:event_recipeNameActionPerformed - - private void changeName() { - String name = recipeName.getText().trim(); - - if (name.length() == 0) - name = null; - - panel.setName(name); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JTextField recipeName; - private javax.swing.JLabel jLabel2; - private javax.swing.JLabel jLabel1; - private javax.swing.JPanel jPanel1; - private javax.swing.JComboBox languagesComboBox; - // End of variables declaration//GEN-END:variables - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathPanel.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathPanel.java deleted file mode 100644 index dfa434d75a35..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathPanel.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import java.awt.Component; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import org.openide.WizardDescriptor; -import org.openide.util.HelpCtx; -import org.openide.util.NbBundle; - -import org.openoffice.netbeans.modules.office.options.OfficeSettings; -import org.openoffice.idesupport.OfficeInstallation; -import org.openoffice.idesupport.SVersionRCFile; - -/** A single panel descriptor for a wizard. - * You probably want to make a wizard iterator to hold it. - */ -public class SelectPathPanel implements - WizardDescriptor.Panel { /* .FinishPanel */ - - /** The visual component that displays this panel. - * If you need to access the component from this class, - * just use getComponent(). - */ - private SelectPathVisualPanel component; - private OfficeInstallation office; - - /** Create the wizard panel descriptor. */ - public SelectPathPanel() { - office = OfficeSettings.getDefault().getOfficeDirectory(); - - if (office == null) { - try { - office = SVersionRCFile.createInstance().getDefaultVersion(); - } catch (java.io.IOException ioe) {} - } - } - - // Get the visual component for the panel. In this template, the component - // is kept separate. This can be more efficient: if the wizard is created - // but never displayed, or not all panels are displayed, it is better to - // create only those which really need to be visible. - public Component getComponent() { - if (component == null) { - component = new SelectPathVisualPanel(this); - } - - return component; - } - - public HelpCtx getHelp() { - // Show no Help button for this panel: - return HelpCtx.DEFAULT_HELP; - // If you have context help: - // return new HelpCtx(SelectPathPanel.class); - } - - public boolean isValid() { - // If it is always OK to press Next or Finish, then: - return true; - // If it depends on some condition (form filled out...), then: - // return someCondition(); - // and when this condition changes (last form field filled in...) then: - // fireChangeEvent(); - // and uncomment the complicated stuff below. - } - - private final Set listeners = new HashSet(1); // Set - public final void addChangeListener(ChangeListener l) { - synchronized (listeners) { - listeners.add(l); - } - } - public final void removeChangeListener(ChangeListener l) { - synchronized (listeners) { - listeners.remove(l); - } - } - protected final void fireChangeEvent() { - Iterator it; - - synchronized (listeners) { - it = new HashSet(listeners).iterator(); - } - - ChangeEvent ev = new ChangeEvent(this); - - while (it.hasNext()) { - ((ChangeListener)it.next()).stateChanged(ev); - } - } - - public void setSelectedPath(OfficeInstallation oi) { - this.office = oi; - fireChangeEvent(); - } - - public OfficeInstallation getSelectedPath() { - return office; - } - - // You can use a settings object to keep track of state. - // Normally the settings object will be the WizardDescriptor, - // so you can use WizardDescriptor.getProperty & putProperty - // to store information entered by the user. - public void readSettings(Object settings) { - } - - public void storeSettings(Object settings) { - WizardDescriptor wiz = (WizardDescriptor)settings; - wiz.putProperty(InstallationPathDescriptor.PROP_INSTALLPATH, office); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathVisualPanel.form b/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathVisualPanel.form deleted file mode 100644 index eb742089ed19..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathVisualPanel.form +++ /dev/null @@ -1,98 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathVisualPanel.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathVisualPanel.java deleted file mode 100644 index ca26a25bc150..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathVisualPanel.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import java.util.Hashtable; -import java.util.Enumeration; -import java.io.File; -import java.io.IOException; -import javax.swing.JFileChooser; - -import org.openide.util.NbBundle; -import org.openoffice.idesupport.SVersionRCFile; -import org.openoffice.idesupport.OfficeInstallation; -import org.openoffice.netbeans.modules.office.options.OfficeSettings; - -/** A single panel for a wizard - the GUI portion. - */ -public class SelectPathVisualPanel extends javax.swing.JPanel { - - /** The wizard panel descriptor associated with this GUI panel. - * If you need to fire state changes or something similar, you can - * use this handle to do so. - */ - private final SelectPathPanel panel; - - /** Create the wizard panel and set up some basic properties. */ - public SelectPathVisualPanel(SelectPathPanel panel) { - this.panel = panel; - initComponents(); - OfficeInstallation orig = panel.getSelectedPath(); - - try { - Enumeration enumer = SVersionRCFile.createInstance().getVersions(); - - while (enumer.hasMoreElements()) { - OfficeInstallation oi = (OfficeInstallation)enumer.nextElement(); - installationsComboBox.addItem(oi); - } - } catch (IOException ioe) { - installationsComboBox.addItem(""); - } - - if (orig != null) { - installationsComboBox.setSelectedItem(orig); - installPath.setText(orig.getPath()); - } - - installationsComboBox.addActionListener( - new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - installationsComboBoxActionPerformed(evt); - } - } - ); - - // Provide a name in the title bar. - setName(NbBundle.getMessage(SelectPathVisualPanel.class, - "TITLE_SelectPathVisualPanel")); - } - - private void installationsComboBoxActionPerformed( - java.awt.event.ActionEvent evt) { - - OfficeInstallation oi = - (OfficeInstallation)installationsComboBox.getSelectedItem(); - - installPath.setText(oi.getPath()); - panel.setSelectedPath(oi); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - java.awt.GridBagConstraints gridBagConstraints; - - jLabel1 = new javax.swing.JLabel(); - installPath = new javax.swing.JTextField(); - jLabel2 = new javax.swing.JLabel(); - installationsComboBox = new javax.swing.JComboBox(); - jPanel1 = new javax.swing.JPanel(); - browseButton = new javax.swing.JButton(); - - setLayout(new java.awt.GridBagLayout()); - - setPreferredSize(new java.awt.Dimension(600, 300)); - jLabel1.setText("Installations Detected"); - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 0; - gridBagConstraints.gridy = 0; - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; - gridBagConstraints.insets = new java.awt.Insets(12, 12, 11, 2); - add(jLabel1, gridBagConstraints); - - installPath.setEditable(false); - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 1; - gridBagConstraints.gridy = 1; - gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; - gridBagConstraints.weightx = 1.0; - gridBagConstraints.insets = new java.awt.Insets(12, 0, 11, 11); - add(installPath, gridBagConstraints); - - jLabel2.setText("Installation Directory"); - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 0; - gridBagConstraints.gridy = 1; - gridBagConstraints.insets = new java.awt.Insets(12, 12, 11, 12); - add(jLabel2, gridBagConstraints); - - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 1; - gridBagConstraints.gridy = 0; - gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; - gridBagConstraints.insets = new java.awt.Insets(11, 0, 11, 11); - add(installationsComboBox, gridBagConstraints); - - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridy = 2; - gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; - gridBagConstraints.weighty = 1.0; - add(jPanel1, gridBagConstraints); - - browseButton.setText("Browse..."); - browseButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - browseButtonActionPerformed(evt); - } - }); - - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 2; - gridBagConstraints.gridy = 1; - gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; - add(browseButton, gridBagConstraints); - - }//GEN-END:initComponents - - private void browseButtonActionPerformed(java.awt.event.ActionEvent - evt) {//GEN-FIRST:event_browseButtonActionPerformed - // Add your handling code here: - File target = null; - - JFileChooser chooser = new JFileChooser(); - chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - int result = chooser.showDialog(null, null); - - if (result == JFileChooser.APPROVE_OPTION) { - target = chooser.getSelectedFile(); - - String path; - - try { - path = target.getCanonicalPath(); - } catch (IOException ioe) { - path = target.getAbsolutePath(); - } - - OfficeInstallation oi = new OfficeInstallation(path, path); - - if (oi.supportsFramework()) { - installPath.setText(path); - panel.setSelectedPath(oi); - } - } - - }//GEN-LAST:event_browseButtonActionPerformed - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JTextField installPath; - private javax.swing.JButton browseButton; - private javax.swing.JComboBox installationsComboBox; - private javax.swing.JLabel jLabel2; - private javax.swing.JLabel jLabel1; - private javax.swing.JPanel jPanel1; - // End of variables declaration//GEN-END:variables -} diff --git a/scripting/workben/bindings/EditDebug.xdl b/scripting/workben/bindings/EditDebug.xdl deleted file mode 100644 index 5a69935f7950..000000000000 --- a/scripting/workben/bindings/EditDebug.xdl +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/scripting/workben/bindings/EventsBinding.xdl b/scripting/workben/bindings/EventsBinding.xdl deleted file mode 100644 index 7b4a1b4b5d38..000000000000 --- a/scripting/workben/bindings/EventsBinding.xdl +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/scripting/workben/bindings/HelpBinding.xdl b/scripting/workben/bindings/HelpBinding.xdl deleted file mode 100644 index f2357e781560..000000000000 --- a/scripting/workben/bindings/HelpBinding.xdl +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/scripting/workben/bindings/KeyBinding.xdl b/scripting/workben/bindings/KeyBinding.xdl deleted file mode 100644 index 10aabc444eeb..000000000000 --- a/scripting/workben/bindings/KeyBinding.xdl +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/scripting/workben/bindings/MacroEditor.xdl b/scripting/workben/bindings/MacroEditor.xdl deleted file mode 100644 index 11285df66582..000000000000 --- a/scripting/workben/bindings/MacroEditor.xdl +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/scripting/workben/bindings/MenuBinding.xdl b/scripting/workben/bindings/MenuBinding.xdl deleted file mode 100644 index f68969e2eda1..000000000000 --- a/scripting/workben/bindings/MenuBinding.xdl +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/scripting/workben/bindings/ScriptBinding.xba b/scripting/workben/bindings/ScriptBinding.xba deleted file mode 100644 index f79ef2e5aef4..000000000000 --- a/scripting/workben/bindings/ScriptBinding.xba +++ /dev/null @@ -1,2110 +0,0 @@ - - - -REM ***** BASIC ***** - -REM ----- Global Variables ----- - -'bindingDialog can refer to either KeyBinding or MenuBinding dialog -private languages() as String -private extensions() as Object -private locations() as String -private filesysScripts() as String -private filesysCount as integer -private bindingDialog as object -private helpDialog as object -'Couldn't get redim to work, so scriptDisplayList is and array of arrays -'where the one and only array in scriptDisplayList is an array -'of com.sun.star.beans.PropertyValue, where Name = [logicalName][FunctionName] -'and value is ScriptStorage object -private scriptDisplayList(0) -private testArray() as String -'Array to store lines from the xml file -private xmlFile() as string -'Name of the xml file [writer/calc][menubar/keybindings].xml -private xmlFileName as string -'Number of lines in the xml file -private numberOfLines as integer - -'Parallel arrays to store all top-level menu names and line positions -private menuItems() as string -private menuItemLinePosition() as integer -'Counter for the number of top-level menus -private menuCount as integer - -'Parallel arrays to store all sub-menu names and line positions for a particular top-level menu -private subMenuItems() as string -private subMenuItemLinePosition() as integer -'Counter for the number of sub-menus -private subMenuCount as integer - -'Parallel arrays to store all script names and line positions -private scriptNames() as string -private scriptLinePosition() as integer -'Counter for the number of scripts -private scriptCount as integer - -'Array to store all combinations of key bindings -private allKeyBindings() as string - -'Array of Arrays -'KeyBindArrayOfArrays(0) contains array of "SHIFT + CONTROL + F Keys" data -'Similarly -'KeyBindArrayOfArrays(1) contains SHIFT + CONTROL + digits -'KeyBindArrayOfArrays(2) contains SHIFT + CONTROL + letters -'KeyBindArrayOfArrays(3) contains CONTROL + F keys -'KeyBindArrayOfArrays(4) contains CONTROL + digits -'KeyBindArrayOfArrays(5) contains CONTROL + letters -'KeyBindArrayOfArrays(6) contains SHIFT + F keys -private KeyBindArrayOfArrays(6) - -'Each PropertyValue represents a key, Name member contains the script (if a binding exists) -' the Value contains and integer -' 0 means no script bound -' 1 script is bound to an office function -' >1 line number of entry in xmlfile array -private keyAllocationMap(6,25) as new com.sun.star.beans.PropertyValue -'array to store key group descriptions -private AllKeyGroupsArray(6) as String - - -'Array of props to store all event bindings for the Applications -private allEventTypesApp( 14 ) as new com.sun.star.beans.PropertyValue -'Array of props to store all event bindings for the Document -private allEventTypesDoc( 14 ) as new com.sun.star.beans.PropertyValue -'Array of props to store all event types (Name) and textual description (Value) -private allEventTypes( 14 ) as new com.sun.star.beans.PropertyValue - - -private dialogName as String -REM ------ Storage Refresh Function ------ - - -sub RefreshUserScripts() -' TDB - change Menu bindings to allow user to refresh all, user, share or document script - RefreshAppScripts( "USER" ) -end sub - -sub RefreshAllScripts() - RefreshAppScripts( "USER" ) - RefreshAppScripts( "SHARE" ) - RefreshDocumentScripts -end sub - -sub RefreshAppScripts( appName as String ) - On Error Goto ErrorHandler - smgr = getProcessServiceManager() - context = smgr.getPropertyValue( "DefaultContext" ) - scriptstoragemgr = context.getValueByName( "/singletons/drafts.com.sun.star.script.framework.storage.theScriptStorageManager" ) - - scriptstoragemgr.refreshScriptStorage( appName ) - - Exit sub - - ErrorHandler: - reset - MsgBox ("Error: Unable to refresh Java (scripts)" + chr$(10) + chr$(10)+ "Detail: " & error$ + chr$(10) + chr$(10)+ "Action: Please restart Office",0,"Error" ) - -end sub - -sub RefreshDocumentScripts() - On Error Goto ErrorHandler - smgr = getProcessServiceManager() - context = smgr.getPropertyValue( "DefaultContext" ) - scriptstoragemgr = context.getValueByName( "/singletons/drafts.com.sun.star.script.framework.storage.theScriptStorageManager" ) - - oDocURL = ThisComponent.GetCurrentController.getModel.getURL - - On Error Goto ErrorHandlerDoc - scriptstoragemgr.refreshScriptStorage( oDocURL ) - - Exit sub - - ErrorHandlerDoc: - reset - ' Ignore document script errors as it will happen when refreshing an unsaved doc - Exit sub - - ErrorHandler: - reset - MsgBox ("Error: Unable to refresh Java (scripts)" + chr$(10) + chr$(10)+ "Detail: " & error$ + chr$(10) + chr$(10)+ "Action: Please restart Office",0,"Error" ) - -end sub - - -REM ----- Launch Functions ----- - -Sub createAndPopulateKeyArrays() - 'Create SHIFT + CONTROL + F keys array - 'Dim keyGroupProp as new com.sun.star.beans.PropertyValue - - Dim SCFKey( 11 ) - for FKey = 1 to 12 - SCFKey( FKey - 1 ) = "SHIFT + CONTROL + F" + FKey - next FKey - - KeyBindArrayOfArrays(0) = SCFKey() - - 'Create SHIFT + CONTROL + digits - Dim SCDKey( 9 ) - for Digit = 0 to 9 - SCDKey( Digit ) = "SHIFT + CONTROL + " + Digit - next Digit - KeyBindArrayOfArrays(1) = SCDKey() - - 'Create SHIFT + CONTROL + letters - - Dim SCLKey( 25 ) - for Alpha = 65 to 90 - SCLKey( Alpha - 65 ) = "SHIFT + CONTROL + " + chr$( Alpha ) - next Alpha - KeyBindArrayOfArrays(2) = SCLKey() - - 'Create CONTROL + F keys - Dim CFKey( 11 ) - for FKey = 1 to 12 - CFKey( Fkey - 1 ) = "CONTROL + F" + FKey - next FKey - KeyBindArrayOfArrays(3) = CFKey() - - 'Create CONTROL + digits - Dim CDKey( 9 ) - for Digit = 0 to 9 - CDKey( Digit ) = "CONTROL + " + Digit - next Digit - KeyBindArrayOfArrays(4) = CDKey() - - 'Create CONTROL + letters - Dim CLKey( 25 ) - for Alpha = 65 to 90 - CLKey( Alpha - 65 ) = "CONTROL + " + chr$( Alpha ) - next Alpha - KeyBindArrayOfArrays(5) = CLKey() - - 'Create SHIFT + F Keys - Dim SFKey( 11 ) - for FKey = 1 to 12 - SFKey( Fkey - 1 ) = "SHIFT + F" + FKey - next FKey - KeyBindArrayOfArrays(6) = SFKey() - -End Sub - -Sub updateMapWithDisabledKeys() - 'disable CONTROL + F1 & - keyAllocationMap( 3, 0 ).Value = 1 - keyAllocationMap( 3, 0 ).Name = "" - 'disable CONTROL + F4 & - keyAllocationMap( 3, 3 ).Value = 1 - keyAllocationMap( 3, 3 ).Name = "" - 'disable CONTROL + F6 - keyAllocationMap( 3, 5 ).Value = 1 - keyAllocationMap( 3, 5 ).Name = "" - - - 'disable SHIFT + F1 & - keyAllocationMap( 6, 0 ).Value = 1 - keyAllocationMap( 6, 0 ).Name = "" - 'disable SHIFT + F2 & - keyAllocationMap( 6, 1 ).Value = 1 - keyAllocationMap( 6, 1 ).Name = "" - 'disable SHIFT + F6 & - keyAllocationMap( 6, 5 ).Value = 1 - keyAllocationMap( 6, 5 ).Name = "" - -End Sub - -Sub initialiseFileExtensions() - ReDim extensions(ubound(languages())+1) as Object - oConfigProvider = CreateUnoService( "com.sun.star.configuration.ConfigurationProvider" ) - Dim configArgs(1) as new com.sun.star.beans.PropertyValue - configargs(0).Name = "nodepath" - configArgs(0).Value = "org.openoffice.Office.Scripting/ScriptRuntimes" - configargs(1).Name = "lazywrite" - configArgs(1).Value = false - oConfigAccess = oConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", configArgs()) - for index = 0 to ubound(languages()) - if(languages(index) <> "Java") then - xPropSet = oConfigAccess.getByName(languages(index)) - extns() = xPropSet.getPropertyValue("SupportedFileExtensions") - extensions(index) = extns() - endif - next index -end sub - -Sub ExecuteEditDebug() - - locations = Array ( "User", "Share", "Document", "Filesystem" ) - languages = Array ( "BeanShell", "JavaScript" ) - dialogName = "EditDebug" - initialiseFileExtensions() - bindingDialog = LoadDialog( "ScriptBindingLibrary", "EditDebug" ) - - PopulateLanguageCombo() - PopulateLocationCombo() - PopulateScriptList( languages(0), locations(0) ) - - bindingDialog.execute() -End Sub - -Sub ExecuteKeyBinding() - dialogName = "Key" - createAndPopulateKeyArrays() - updateMapWithDisabledKeys() - xmlFileName = GetDocumentType( "Key" ) - - if not (ReadXMLToArray( "Key" )) then - Exit Sub - endif - - bindingDialog = LoadDialog( "ScriptBindingLibrary", "KeyBinding" ) - PopulateKeyBindingList(0) - initialiseNavigationComboArrays() - PopulateLanguageCombo() - PopulateLocationCombo() - PopulateScriptList( languages(0), locations(0) ) - PopulateTopLevelKeyBindingList() - bindingDialog.execute() -end Sub - - -Sub initialiseNavigationComboArrays() - locations = Array ( "User", "Share", "Document", "Filesystem" ) - ReDim languages(0) as String - ReDim extensions(0) as Object - languages(0) = "Java" - REM extensions(0) = "" - - ' Setup languages array for all supported languages - oServiceManager = GetProcessServiceManager() - svrArray = oServiceManager.getAvailableServiceNames - - langCount = 1 - for index = 0 to ubound(svrArray) - iPos = inStr(svrArray(index), "ScriptProviderFor") - - if (iPos > 0) then - lang = Mid(svrArray(index), iPos + Len("ScriptProviderFor") - - if not (lang = "Java") then - 'Add to language vector - ReDim Preserve languages(langCount) as String - languages(langCount) = lang - langCount = langCount + 1 - endif - endif - next index - initialiseFileExtensions() -End Sub - - -Sub ExecuteEventBinding - dialogName = "Event" - createAllEventTypes() - createAllEventBindings() - - 'Populate application event bindings array (from config xml file) - if not (ReadXMLToArray( "Event" )) then - Exit Sub - endif - 'Populate document event bindings array (using Office API calls) - ReadEventsFromDoc() - - bindingDialog = LoadDialog( "ScriptBindingLibrary", "EventsBinding" ) - initialiseNavigationComboArrays() - PopulateLanguageCombo() - PopulateLocationCombo() - PopulateScriptList( languages(0), locations(0) ) - populateEventList( 0 ) - EventListListener() - bindingDialog.execute() -End Sub - -Sub ExecuteMenuBinding() - dialogName = "Menu" - xmlFileName = GetDocumentType( "Menu" ) - if not (ReadXMLToArray( "Menu" )) then - Exit Sub - endif - - bindingDialog = LoadDialog( "ScriptBindingLibrary", "MenuBinding" ) - initialiseNavigationComboArrays() - PopulateLanguageCombo() - PopulateLocationCombo() - PopulateScriptList( languages(0), locations(0) ) - PopulateMenuCombo() - PopulateSubMenuList( 1 ) - - subMenuList = bindingDialog.getControl("SubMenuList") - - subMenuList.selectItemPos( 0, true ) - - bindingDialog.execute() -end Sub - - -REM ----- Initialising functions ----- - - -function LoadDialog( libName as string, dialogName as string ) as object - dim library as object - dim libDialog as object - dim runtimeDialog as object - libContainer = DialogLibraries - libContainer.LoadLibrary( libName ) - library = libContainer.getByName( libname ) - libDialog = library.getByName( dialogName ) - runtimeDialog = CreateUnoDialog( libDialog ) - LoadDialog() = runtimeDialog - -end function - - -function GetDocumentType( bindingType as string ) as string - document = StarDesktop.ActiveFrame.Controller.Model - Dim errornumber As Integer - errornumber = 111 - Error errornumber - if document.SupportsService("com.sun.star.sheet.SpreadsheetDocument") then - if bindingType = "Key" then - GetDocumentType() = "calckeybinding.xml" - else - if bindingType = "Menu" then - GetDocumentType() = "calcmenubar.xml" - end if - end if - elseif document.SupportsService("com.sun.star.text.TextDocument") then - if bindingType = "Key" then - GetDocumentType() = "writerkeybinding.xml" - else - if bindingType = "Menu" then - GetDocumentType() = "writermenubar.xml" - end if - end if - elseif document.SupportsService("com.sun.star.presentation.PresentationDocument") then - if bindingType = "Key" then - GetDocumentType() = "impresskeybinding.xml" - else - if bindingType = "Menu" then - GetDocumentType() = "impressmenubar.xml" - end if - end if - elseif document.SupportsService("com.sun.star.presentation.PresentationDocument") then - if bindingType = "Key" then - GetDocumentType() = "impresskeybinding.xml" - else - if bindingType = "Menu" then - GetDocumentType() = "impressmenubar.xml" - end if - end if - elseif document.SupportsService("com.sun.star.drawing.DrawingDocument") then - if bindingType = "Key" then - GetDocumentType() = "drawkeybinding.xml" - else - if bindingType = "Menu" then - GetDocumentType() = "drawmenubar.xml" - end if - end if - else - MsgBox ("Error: Couldn't determine configuration file type" + chr$(10) + chr$(10) + "Action: Please reinstall Scripting Framework",0,"Error" ) - end if -end function - -function lastIndexOf( targetStr as String, substr as String ) as Integer - copyStr = targetStr - while instr(copyStr, substr) > 0 - pos = instr(copyStr, substr) - tpos = tpos + pos - copyStr = mid(copyStr, pos+1, len(copyStr)-pos ) - wend - lastIndexOf() = tpos -end function - -function getScriptURI( selectedScript as String ) as String - combo = bindingDialog.getControl( "LocationCombo" ) - location = combo.text - if ( location = "User" ) then - location = "user" - elseif ( location = "Share" ) then - location = "share" - elseif ( location = "Filesystem" ) then - location = "filesystem" - else - location = "document" - end if - - - - if ( location = "filesystem" ) then - REM need to build URI here - dcf - combo = bindingDialog.getControl( "LanguageCombo" ) - language = combo.text - url = selectedscript - pos = lastIndexOf( url, "/" ) - locationPath = mid( url, 1, pos) - url = mid( url, pos+1, len( url ) - pos ) - functionName = url - pos = lastIndexOf( url, "." ) - logicalName = mid( url, 1, pos - 1 ) - getScriptURI() = "script://" + logicalName + "?language=" _ - + language + "&amp;function=" + functionName _ - + "&amp;location=filesystem:" + locationPath - else - Dim scriptInfo as Object - scripts() = scriptDisplayList(0) - for n = LBOUND( scripts() ) to UBOUND( scripts() ) - - if ( scripts( n ).Name = selectedScript ) then - scriptInfo = scripts( n ).Value - exit for - end if - next n - getScriptURI() = "script://" + scriptInfo.getLogicalName + "?language=" _ - + scriptInfo.getLanguage() + "&amp;function=" + _ - scriptInfo.getFunctionName() + "&amp;location=" + location - end if - -end function - -function GetOfficePath() as string - REM Error check and prompt user to manually input Office Path - settings = CreateUnoService( "com.sun.star.frame.Settings" ) - path = settings.getByName( "PathSettings" ) - unformattedOfficePath = path.getPropertyValue( "UserPath" ) - - dim officePath as string - const removeFromEnd = "/user" - const removeFromEndWindows = "\user" - - REM If Solaris or Linux - if not ( instr( unformattedOfficePath, removeFromEnd ) = 0 ) then - endPosition = instr( unformattedOfficePath, removeFromEnd ) - officePath = mid( unformattedOfficePath, 1, endPosition ) - REM If Windows - else if not ( instr( unformattedOfficePath, removeFromEndWindows ) = 0 ) then - endPosition = instr( unformattedOfficePath, removeFromEndWindows ) - officePath = mid( unformattedOfficePath, 1, endPosition ) - while instr( officePath, "\" ) > 0 - backSlash = instr( officePath, "\" ) - startPath = mid( officePath, 1, backSlash - 1 ) - endPath = mid( officePath, backslash + 1, len( officePath ) - backSlash ) - officePath = startPath + "/" + endPath - wend - else - MsgBox ("Error: Office path not found" + chr$(10) + chr$(10) + "Action: Please reinstall Scripting Framework",0,"Error" ) - REM Prompt user - end if - end if - - GetOfficePath() = officePath -end function - - - -REM ----- File I/O functions ----- - - -function ReadXMLToArray( bindingType as string ) as boolean - On Error Goto ErrorHandler - if ( bindingType = "Event" ) then - xmlfilename = "eventbindings.xml" - endif - - simplefileaccess = CreateUnoService( "com.sun.star.ucb.SimpleFileAccess" ) - filestream = simplefileaccess.openFileRead( "file://" + GetOfficePath() + "user/config/soffice.cfg/" + xmlFileName ) - - textin = CreateUnoService( "com.sun.star.io.TextInputStream" ) - textin.setInputStream( filestream ) - - redim xmlFile( 400 ) as String - redim menuItems( 30 ) as String - redim menuItemLinePosition( 30 ) as Integer - redim scriptNames( 120 ) as string - redim scriptLinePosition( 120) as integer - - lineCount = 1 - menuCount = 1 - scriptCount = 1 - - do while not textin.isEOF() - xmlline = textin.readLine() - xmlFile( lineCount ) = xmlline - - const menuItemWhiteSpace = 2 - const menuXMLTag = "<menu:menu" - - if bindingType = "Menu" then - evaluateForMenu( xmlline, lineCount ) - elseif bindingType = "Key" then - processKeyXMLLine( lineCount, xmlline ) - elseif bindingType = "Event" then - evaluateForEvent( xmlline, lineCount ) - else - MsgBox ("Error: Couldn't determine file type" + chr$(10) + chr$(10) + "Action: Please reinstall Scripting Framework",0,"Error" ) - end if - lineCount = lineCount + 1 - loop - - 'Set global variable numberOfLines (lineCount is one too many at end of the loop) - numberOfLines = lineCount - 1 - 'Set global variable menuCount (it is one too many at end of the loop) - menuCount = menuCount - 1 - - filestream.closeInput() - ReadXMLToArray( ) = true - Exit function - - ErrorHandler: - reset - MsgBox ("Error: Unable to read Star Office configuration file - " + xmlFileName + chr$(10) + chr$(10) + "Action: Please reinstall Scripting Framework",0,"Error" ) - ReadXMLToArray( ) = false -end function - - - -sub evaluateForMenu( xmlline as string, lineCount as integer ) - const menuItemWhiteSpace = 2 - const menuXMLTag = "<menu:menu" - 'If the xml line is a top-level menu - if instr( xmlline, menuXMLTag ) = menuItemWhiteSpace then - menuLabel = ExtractLabelFromXMLLine( xmlline ) - menuItems( menuCount ) = menuLabel - menuItemLinePosition( menuCount ) = lineCount - menuCount = menuCount + 1 - end if -end sub - -sub evaluateForEvent( xmlline as string, lineCount as integer ) - dim eventName as String - 'if the xml line identifies a script or SB macro - dim scriptName as string - dim lineNumber as integer - if instr( xmlline, "event:language=" + chr$(34) + "Script" ) > 0 then - eventName = ExtractEventNameFromXMLLine( xmlline ) - scriptName = ExtractEventScriptFromXMLLine( xmlline ) - lineNumber = lineCount - elseif instr( xmlline, "event:language=" + chr$(34) + "StarBasic" ) > 0 then - eventName = ExtractEventNameFromXMLLine( xmlline ) - scriptName = "Allocated to Office function" - lineNumber = 1 - end if - - 'Need to sequence to find the corresponding index for the event type - for n = 0 to ubound( allEventTypesApp() ) - if ( eventName = allEventTypes( n ).Name ) then - allEventTypesApp( n ).Name = scriptName - allEventTypesApp( n ).Value = lineNumber - end if - next n -end sub - - -function isOKscriptProps( props() as Object, eventName as string ) as Boolean - On Error Goto ErrorHandler - props = ThisComponent.getEvents().getByName( eventName ) - test = ubound( props() ) - isOKscriptProps() = true - exit function - - ErrorHandler: - isOKscriptProps() = false -end function - -sub ReadEventsFromDoc() - On Error Goto ErrorHandler - - eventSupplier = ThisComponent - for n = 0 to ubound( allEventTypes() ) - Dim scriptProps() as Object - if (isOKscriptProps( scriptProps(), allEventTypes( n ).Name) ) then - if ( ubound( scriptProps ) > 0 ) then - if ( scriptProps(0).Value = "Script" ) then - 'Script binding - allEventTypesDoc(n).Name = scriptProps(1).Value - allEventTypesDoc(n).value = 2 - elseif( scriptProps(0).Value = "StarBasic" ) then - 'StarBasic macro - allEventTypesDoc(n).Name = "Allocated to Office function" - allEventTypesDoc(n).value = 1 - end if - end if - end if - next n - - exit sub - - ' eventProps is undefined if there are no event bindings in the doc - ErrorHandler: - reset -end sub - - -sub WriteEventsToDoc() - On Error Goto ErrorHandler - - eventSupplier = ThisComponent - for n = 0 to ubound( allEventTypes() ) - scriptName = allEventTypesDoc( n ).Name - eventName = allEventTypes( n ).Name - if( allEventTypesDoc( n ).Value > 1 ) then 'script - 'add to doc - AddEventToDocViaAPI( scriptName, eventName ) - elseif( allEventTypesDoc( n ).Value = 0 ) then 'blank (this will "remove" already blank entries) - 'remove from doc - RemoveEventFromDocViaAPI( eventName ) - endif - 'Otherwise it is a StarBasic binding - leave alone - next n - 'Mark document as modified ( should happen automatically as a result of calling the API ) - ThisComponent.CurrentController.getModel().setModified( True ) - exit sub - - ErrorHandler: - reset - msgbox( "Error calling UNO API for writing event bindings to the document" ) -end sub - - -sub RemoveEventFromDocViaAPI( event as string ) - dim document as object - dim dispatcher as object - dim parser as object - dim url as new com.sun.star.util.URL - - document = ThisComponent.CurrentController.Frame - parser = createUnoService("com.sun.star.util.URLTransformer") - dim args(0) as new com.sun.star.beans.PropertyValue - args(0).Name = "" - args(0).Value = event - - url.Complete = "script://_$ScriptFrmwrkHelper.removeEvent?" _ - + "language=Java&function=ScriptFrmwrkHelper.removeEvent" _ - + "&location=share" - - parser.parseStrict(url) - disp = document.queryDispatch(url,"",0) - disp.dispatch(url,args()) -end sub - - -sub AddEventToDocViaAPI( scriptName as string, eventName as string ) - dim properties( 1 ) as new com.sun.star.beans.PropertyValue - properties( 0 ).Name = "EventType" - properties( 0 ).Value = "Script" - properties( 1 ).Name = "Script" - properties( 1 ).Value = scriptName - - eventSupplier = ThisComponent - nameReplace = eventSupplier.getEvents() - nameReplace.replaceByName( eventName, properties() ) -end sub - - -' returns 0 for Fkey -' 1 for digit -' 2 for letter - -function getKeyTypeOffset( key as String ) as integer - length = Len( key ) - if ( length > 1 ) then - getKeyTypeOffset() = 0 - - elseif ( key >= "0" AND key <= "9" ) then - getKeyTypeOffset() = 1 - else - getKeyTypeOffset() = 2 - end if -end function - -function getKeyGroupIndex( key as String, offset as Integer ) as Integer - ' Keys we are interested in are A - Z, F2 - F12, 0 - 9 anything else should - ' ensure -1 is returned - cutKey = mid( key,2 ) - - if ( cutKey <> "" ) then - acode = asc ( mid( cutKey,1,1) ) - if ( acode > 57 ) then - getKeyGroupIndex() = -1 - exit function - end if - end if - - select case offset - case 0: - num = cint( cutKey ) - getKeyGroupIndex() = num - 1 - exit function - case 1: - num = asc( key ) - 48 - getKeyGroupIndex() = num - exit function - case 2: - num = asc( key ) - 65 - getKeyGroupIndex() = num - exit function - end select - getKeyGroupIndex() = -1 -end function - -Sub processKeyXMLLine( lineCount as Integer, xmlline as String ) - - if instr( xmlline, "<accel:item" ) > 0 then - shift = false - control = false - if instr( xmlline, "accel:shift="+chr$(34)+"true"+chr$(34) ) > 0 then - shift = true - end if - if instr( xmlFile( lineCount ), "accel:mod1="+chr$(34)+"true"+chr$(34) ) > 0 then - control = true - end if - offsetIntoArrayOfArrays = -1 'default unknown - if ( control AND shift ) then - offsetIntoArrayOfArrays = 0 - elseif ( control ) then - offsetIntoArrayOfArrays = 3 - elseif ( shift ) then - offsetIntoArrayOfArrays = 6 - endif - ' Calculate which of the 7 key group arrays we need to point to - key = ExtractKeyCodeFromXMLLine( xmlline ) - keyTypeOffset = getKeyTypeOffset( key ) - offsetIntoArrayOfArrays = offsetIntoArrayOfArrays + keyTypeOffset - - ' Calculate from the key the offset into key group array we need to point to - KeyGroupIndex = getKeyGroupIndex( key, keyTypeOffset ) - if ( offsetIntoArrayOfArrays = -1 ) then - 'Unknown key group, no processing necessary - Exit Sub - end if - if ( KeyGroupIndex > -1 ) then - - ' Determine if a script framework binding is present or not - if instr( xmlline, "script://" ) > 0 then - ' its one of ours so update its details - scriptName = ExtractScriptIdFromXMLLine( xmlline ) - - keyAllocationMap( offsetIntoArrayOfArrays, KeyGroupIndex ).Value = lineCount - keyAllocationMap( offsetIntoArrayOfArrays, KeyGroupIndex ).Name = scriptName - else - keyAllocationMap( offsetIntoArrayOfArrays, KeyGroupIndex ).Value = 1 - keyAllocationMap( offsetIntoArrayOfArrays, KeyGroupIndex ).Name = "" - - end if - end if - end if -End Sub - -Sub WriteXMLFromArray() - On Error Goto ErrorHandler - cfgFile = GetOfficePath() + "user/config/soffice.cfg/" + xmlFileName - updateCfgFile( cfgFile ) - 'if ( false ) then' config stuff not in build yet - if ( true ) then - updateConfig( xmlFileName ) - else - msgbox ("Office must be restarted before your changes will take effect."+ chr$(10)+"Also close the Office QuickStarter (Windows and Linux)", 48, "Assign Script (Java) To Menu" ) - endif - Exit Sub - - ErrorHandler: - reset - MsgBox ("Error: Unable to write to Star Office configuration file" + chr$(10) + "/" + GetOfficePath() + "user/config/soffice.cfg/" +xmlFileName + chr$(10) + chr$(10) + "Action: Please make sure you have write access to this file",0,"Error" ) -end Sub - - -Sub UpdateCfgFile ( fileName as String ) - dim ScriptProvider as Object - dim Script as Object - dim args(1) - dim displayDialogFlag as boolean - displayDialogFlag = false - args(0) = ThisComponent - args(1) = displayDialogFlag - - ScriptProvider = createUnoService("drafts.com.sun.star.script.framework.provider.MasterScriptProvider") - ScriptProvider.initialize( args() ) - Script = ScriptProvider.getScript("script://_$ScriptFrmwrkHelper.updateCfgFile?" _ - + "language=Java&function=ScriptFrmwrkHelper.updateCfgFile&location=share") - Dim inArgs(2) - Dim outArgs() - Dim outIndex() - dim localNumLines as integer - - inArgs(0) = xmlFile() - inArgs(1) = fileName - inArgs(2) = numberOfLines - Script.invoke( inArgs(), outIndex(), outArgs() ) -End Sub - -sub UpdateConfig( a$ ) - dim document as object - dim dispatcher as object - dim parser as object - dim disp as object - dim url as new com.sun.star.util.URL - document = ThisComponent.CurrentController.Frame - parser = createUnoService("com.sun.star.util.URLTransformer") - dim args1(0) as new com.sun.star.beans.PropertyValue - args1(0).Name = "StreamName" - args1(0).Value = a$ - url.Complete = ".uno:UpdateConfiguration" - parser.parseStrict(url) - disp = document.queryDispatch(url,"",0) - disp.dispatch(url,args1()) - -End Sub - - -sub AddNewEventBinding( scriptName as string, eventPosition as integer, isApp as boolean ) - event = allEventTypes( eventPosition ).Name - 'dim scriptProp as new com.sun.star.beans.PropertyValue - if isApp then - 'scriptProp.Name = scriptName - 'scriptProp.Value = numberOfLines - allEventTypesApp( eventPosition ).Name = scriptName - allEventTypesApp( eventPosition ).Value = numberOfLines - - newline = " <event:event event:name=" + chr$(34) + event + chr$(34) - newline = newline + " event:language=" + chr$(34) + "Script" + chr$(34) + " xlink:href=" + chr$(34) - newline = newline + scriptName + chr$(34) + " xlink:type=" + chr$(34) + "simple" + chr$(34) + "/>" - xmlFile( numberOfLines ) = newline - xmlFile( numberOfLines + 1 ) = "</event:events>" - numberOfLines = numberOfLines + 1 - else - 'scriptProp.Name = scriptName - 'scriptProp.Value = 2 - allEventTypesDoc( eventPosition ).Name = scriptName - allEventTypesDoc( eventPosition ).Value = 2 - end if -end sub - -REM ----- Array update functions ----- - - -sub AddNewMenuBinding( newScript as string, newMenuLabel as string, newLinePosition as integer ) - dim newXmlFile( 400 ) as string - dim newLineInserted as boolean - dim lineCounter as integer - lineCounter = 1 - - do while lineCounter <= numberOfLines - if not newLineInserted then - REM If the line number is the position at which to insert the new line - if lineCounter = newLinePosition then - if( instr( xmlFile( lineCounter ), "<menu:menupopup>" ) > 0 ) then - indent = GetMenuWhiteSpace( xmlFile( newLinePosition + 1 ) ) - newXmlFile( lineCounter ) = xmlFile( lineCounter ) - newXmlFile( lineCounter + 1 ) = ( indent + "<menu:menuitem menu:id="+chr$(34) + newScript + chr$(34)+" menu:helpid="+chr$(34)+"1929"+chr$(34)+" menu:label="+chr$(34)+ newMenuLabel + chr$(34)+"/>" ) - else - indent = GetMenuWhiteSpace( xmlFile( newLinePosition - 1 ) ) - newXmlFile( lineCounter ) = ( indent + "<menu:menuitem menu:id="+chr$(34) + newScript + chr$(34)+" menu:helpid="+chr$(34)+"1929"+chr$(34)+" menu:label="+chr$(34)+ newMenuLabel + chr$(34)+"/>" ) - newXmlFile( lineCounter + 1 ) = xmlFile( lineCounter ) - end if - REM added -1 for debug --> - ' indent = GetMenuWhiteSpace( xmlFile( newLinePosition ) ) - ' newXmlFile( lineCounter ) = ( indent + "<menu:menuitem menu:id="+chr$(34)+"script://" + newScript + chr$(34)+" menu:helpid="+chr$(34)+"1929"+chr$(34)+" menu:label="+chr$(34)+ newMenuLabel + chr$(34)+"/>" ) - ' newXmlFile( lineCounter + 1 ) = xmlFile( lineCounter ) - newLineInserted = true - else - newXmlFile( lineCounter ) = xmlFile( lineCounter ) - end if - else - REM if the new line has been inserted the read from one position behind - newXmlFile( lineCounter + 1 ) = xmlFile( lineCounter ) - end if - lineCounter = lineCounter + 1 - loop - - numberOfLines = numberOfLines + 1 - - REM read the new file into the global array - for n = 1 to numberOfLines - xmlFile( n ) = newXmlFile( n ) - next n - -end sub - - -sub AddNewKeyBinding( scriptName as string, shift as boolean, control as boolean, key as string ) - - dim keyCombo as string - newLine = " <accel:item accel:code="+chr$(34)+"KEY_" + key +chr$(34) - if shift then - keyCombo = "SHIFT + " - newLine = newLine + " accel:shift="+chr$(34)+"true"+chr$(34) - end if - if control then - keyCombo = keyCombo + "CONTROL + " - newLine = newLine + " accel:mod1="+chr$(34)+"true"+chr$(34) - end if - keyCombo = keyCombo + key - newLine = newLine + " xlink:href="+chr$(34)+ scriptName +chr$(34) +"/>" - - if ( control AND shift ) then - offsetIntoArrayOfArrays = 0 - elseif ( control ) then - offsetIntoArrayOfArrays = 3 - elseif ( shift ) then - offsetIntoArrayOfArrays = 6 - endif - - keyTypeOffset = getKeyTypeOffset( key ) - offsetIntoArrayOfArrays = offsetIntoArrayOfArrays + keyTypeOffset - ' Calculate from the key the offset into key group array we need to point to - KeyGroupIndex = getKeyGroupIndex( key, keyTypeOffset ) - - ' if key is already allocated to a script then just reallocate - if ( keyAllocationMap( offsetIntoArrayOfArrays, KeyGroupIndex ).Value > 1 ) then - - keyAllocationMap( offsetIntoArrayOfArrays, KeyGroupIndex ).Name = scriptName - 'replace line in xml file - xmlFile( keyAllocationMap( offsetIntoArrayOfArrays, KeyGroupIndex ).Value ) = newLine - else - ' this is a new binding, create a new line in xml file - for n = 1 to numberOfLines - if n = numberOfLines then - xmlFile( n ) = newLine - xmlFile( n + 1 ) = "</accel:acceleratorlist>" - exit for - else - xmlFile( n ) = xmlFile( n ) - end if - next n - - keyAllocationMap( offsetIntoArrayOfArrays, KeyGroupIndex ).Value = n - keyAllocationMap( offsetIntoArrayOfArrays, KeyGroupIndex ).Name = scriptName - numberOfLines = numberOfLines + 1 - endif - -end sub - - -Sub RemoveBinding( lineToRemove as Integer ) - xmlFile( lineToRemove ) = "" -end Sub - -REM Adds or removes the starting xml line positions for each top-level menu after the menu with the added script -sub UpdateTopLevelMenus( topLevelMenuPosition as integer, addLine as boolean ) - for n = topLevelMenuPosition to 8 - if addLine then - menuItemLinePosition( n ) = menuItemLinePosition( n ) + 1 - - end if - next n -end sub - - -REM Remove scriptNames and scriptLinePosition entries -sub RemoveScriptNameAndPosition( keyComboPosition ) - dim updatedScriptNames( 120 ) as string - dim updatedScriptLinePosition( 120 ) as integer - dim removedScript as boolean - removedScript = false - - for n = 1 to scriptCount - if not removedScript then - if not( n = keyComboPosition ) then - updatedScriptNames( n ) = scriptNames( n ) - else - removedScript = true - end if - else - updatedScriptNames( n - 1 ) = scriptNames( n ) - end if - next n - scriptCount = scriptCount - 1 - - for n = 1 to scriptCount - scriptNames( n ) = updatedScriptNames( n ) - next n -end sub - - - -REM ----- Populating Dialog Controls ----- - -Sub PopulateLanguageCombo() - langCombo = bindingDialog.getControl( "LanguageCombo" ) - langCombo.removeItems( 0, langCombo.getItemCount() ) - for n = LBOUND( languages() ) to UBOUND ( languages() ) - langCombo.addItem( languages( n ), n ) - next n - langCombo.setDropDownLineCount( n ) - langCombo.text = langCombo.getItem( 0 ) -End Sub - -Sub PopulateLocationCombo() - dim ScriptProvider as Object - dim args(1) - dim displayDialogFlag as boolean - displayDialogFlag = false - args(0) = ThisComponent - args(1) = displayDialogFlag - - ScriptProvider = createUnoService("drafts.com.sun.star.script.framework.provider.MasterScriptProvider") - ScriptProvider.initialize( args() ) - - locCombo = bindingDialog.getControl( "LocationCombo" ) - locCombo.removeItems( 0, locCombo.getItemCount() ) - for n = LBOUND( locations() ) to UBOUND ( locations() ) - locCombo.addItem( locations( n ), n ) - next n - locCombo.setDropDownLineCount( n ) - locCombo.text = locCombo.getItem( 0 ) -End Sub - -sub PopulateScriptList( lang as String, loc as String ) - Dim detailedView as boolean - detailedView = bindingDialog.Model.detail.state - scriptList = bindingDialog.getControl( "ScriptList" ) - scriptList.removeItems( 0, scriptList.getItemCount() ) - - smgr = getProcessServiceManager() - context = smgr.getPropertyValue( "DefaultContext" ) - scriptstoragemgr = context.getValueByName( "/singletons/drafts.com.sun.star.script.framework.storage.theScriptStorageManager" ) - scriptLocationURI = "USER" - if ( loc = "Share" ) then - scriptLocationURI = "SHARE" - elseif ( loc = "Document" )then - document = StarDesktop.ActiveFrame.Controller.Model - scriptLocationURI = document.getURL() - elseif ( loc = "Filesystem" ) then - REM populate the list from the filesysScripts list - if(lang = "Java" ) then - exit sub - endif - length = UBOUND( filesysScripts() ) - if(length = -1) then - exit sub - endif - for langIndex = lbound(languages()) to ubound(languages()) - if ( lang = languages(langIndex)) then - extns = extensions(langIndex) - exit for - endif - next langIndex - dim locnDisplayList( length ) as new com.sun.star.beans.PropertyValue - for index = lbound(filesysScripts()) to ubound(filesysScripts()) - scriptextn = filesysScripts( index ) - pos = lastIndexOf( scriptextn, "." ) - scriptextn = mid( scriptextn, pos + 1, len( scriptextn ) - pos ) - - for extnsIndex = lbound(extns()) to ubound(extns()) - extn = extns(extnsIndex) - if ( scriptextn = extn ) then - if ( detailedView ) then - locnDisplayList( index ).Name = filesysScripts( index ) - locnDisplayList( index ).Value = filesysScripts( index ) - else - REM replace name with simplified view - locnDisplayList( index ).Name = filesysScripts( index ) - locnDisplayList( index ).Value = filesysScripts( index ) - end if - scriptList.addItem( locnDisplayList( index ).Name, index ) - exit for - end if - next extnsIndex - next index - ScriptDisplayList(0) = locnDisplayList() - scriptList.selectItemPos( 0, true ) - - REM !!!!At this point we exit the sub!!!! - exit sub - - endif - - scriptStorageID = scriptstoragemgr.getScriptStorageID( scriptLocationURI ) - dim resultList() as Object - if ( scriptStorageID > -1 ) then - storage = scriptstoragemgr.getScriptStorage( scriptStorageID ) - implementations() = storage.getAllImplementations() - length = UBOUND( implementations() ) - reservedScriptTag = "_$" - if ( length > -1 ) then - dim tempDisplayList( length ) as new com.sun.star.beans.PropertyValue - for n = LBOUND( implementations() ) to UBOUND( implementations() ) - logicalName = implementations( n ).getLogicalName() - firstTwoChars = LEFT( logicalName, 2 ) - 'Only display scripts whose logicalnames don't begin with "_$" - if ( firstTwoChars <> reservedScriptTag ) then - if ( lang = implementations( n ).getLanguage() ) then - if ( detailedView ) then - tempDisplayList( n ).Name = logicalName _ - + " [" + implementations( n ).getFunctionName() + "]" - tempDisplayList( n ).Value = implementations( n ) - else - tempDisplayList( n ).Name = logicalName - tempDisplayList( n ).Value = implementations( n ) - endif - scriptList.addItem( tempDisplayList( n ).Name, n ) - endif - endif - next n - resultList = tempDisplayList() - endif - ScriptDisplayList(0) = resultList() - endif - scriptList.selectItemPos( 0, true ) - -end sub - -sub PopulateMenuCombo() - menuComboBox = bindingDialog.getControl( "MenuCombo" ) - menuComboBox.removeItems( 0, menuComboBox.getItemCount() ) - for n = 1 to menuCount - menuComboBox.addItem( menuItems( n ), n - 1 ) - next n - menuComboBox.setDropDownLineCount( 8 ) - menuComboBox.text = menuComboBox.getItem( 0 ) -end sub - - -sub PopulateSubMenuList( menuItemPosition as integer ) - redim subMenuItems( 100 ) as string - redim subMenuItemLinePosition( 100 ) as integer - dim lineNumber as integer - const menuItemWhiteSpace = 4 - const menuXMLTag = "<menu:menu" - subMenuCount = 1 - - REM xmlStartLine and xmlEndLine refer to the first and last lines - ' menuItemPosition of a top-level menu ( 1=File to 8=Help ) add one line - xmlStartLine = menuItemLinePosition( menuItemPosition ) + 1 - - REM If last menu item is chosen - if menuItemPosition = menuCount then - xmlEndLine = numberOfLines - else - REM Other wise get the line before the next top-level menu begins - xmlEndLine = menuItemLinePosition( menuItemPosition + 1 ) - 1 - end if - - for lineNumber = xmlStartLine to xmlEndLine - REM Insert all sub-menus and sub-popupmenus - if not( instr( xmlFile( lineNumber ), menuXMLTag ) = 0 ) and instr( xmlFile( lineNumber ), "menupopup") = 0 then - subMenuIndent = GetMenuWhiteSpace( xmlFile( lineNumber ) ) - if subMenuIndent = " " then - subMenuIndent = "" - else - subMenuIndent = subMenuIndent + subMenuIndent - end if - if not( instr( xmlFile( lineNumber ), "menuseparator" ) = 0 ) then - subMenuItems( subMenuCount ) = subMenuIndent + "----------------" - else - subMenuName = ExtractLabelFromXMLLine( xmlFile( lineNumber ) ) - REM Add script Name if there is one bound to menu item - if instr( xmlFile( lineNumber ), "script://" ) > 0 then - script = ExtractScriptIdFromXMLLine( xmlFile( lineNumber ) ) - subMenuItems( subMenuCount ) = ( subMenuIndent + subMenuName + " [" + script + "]" ) - else - subMenuItems( subMenuCount ) = subMenuIndent + subMenuName - end if - end if - subMenuItemLinePosition( subMenuCount ) = lineNumber - subMenuCount = subMenuCount + 1 - end if - next lineNumber - - subMenuList = bindingDialog.getControl( "SubMenuList" ) - - currentPosition = subMenuList.getSelectedItemPos() - - subMenuList.removeItems( 0, subMenuList.getItemCount() ) - 'If there are no sub-menus i.e. a dynamically generated menu like Format - 'if subMenuCount = 1 then - if menuItems( menuItemPosition ) = "Format" then - subMenuList.addItem( "Unable to Assign Scripts to this menu", 0 ) - else - for n = 1 to subMenuCount - 1 - subMenuList.addItem( subMenuItems( n ), n - 1 ) - next n - end if - - subMenuList.selectItemPos( currentPosition, true ) - - SubMenuListListener() - MenuLabelBoxListener() -end sub - - - -sub PopulateTopLevelKeyBindingList() - - allKeyGroupsArray(0) = "SHIFT + CONTROL + F keys" - allKeyGroupsArray(1) = "SHIFT + CONTROL + digits" ' CURRENTLY DISABLED - allKeyGroupsArray(2) = "SHIFT + CONTROL + letters" - allKeyGroupsArray(3) = "CONTROL + F keys" - allKeyGroupsArray(4) = "CONTROL + digits" - allKeyGroupsArray(5) = "CONTROL + letters" - allKeyGroupsArray(6) = "SHIFT + F keys" - - keyCombo = bindingDialog.getControl( "KeyCombo" ) - keyCombo.removeItems( 0, keyCombo.getItemCount() ) - pos = 0 - for n = LBOUND( allKeyGroupsArray() ) to UBOUND( allKeyGroupsArray() ) - ' SHIFT + CONTROL + digits group is disabled at the moment, so skip - ' it - if ( n <> 1 ) then - keyCombo.addItem( allKeyGroupsArray( n ), pos ) - pos = pos +1 - endif - next n - keyCombo.text = keyCombo.getItem( 0 ) -end sub - -sub PopulateKeyBindingList( keyGroupIndex as Integer ) - keyList = bindingDialog.getControl( "KeyList" ) - selectedPos = keyList.getSelectedItemPos() - keyList.removeItems( 0, keyList.getItemCount() ) - - ShortCutKeyArray() = KeyBindArrayOfArrays( keyGroupIndex ) - - Dim keyProp as new com.sun.star.beans.PropertyValue - for n = lbound( ShortCutKeyArray() ) to ubound( ShortCutKeyArray() ) - keyName = ShortCutKeyArray( n ) - if ( keyAllocationMap( keyGroupIndex, n ).Value = 1 ) then - keyName = keyName + " [Allocated to Office function]" - - elseif ( keyAllocationMap( keyGroupIndex, n ).Value > 1 ) then - keyName = keyName + " " + keyAllocationMap( keyGroupIndex, n ).Name - endif - keyList.addItem( keyName, n ) - next n - - if ( selectedPos <> -1 )then - keyList.selectItemPos( selectedPos, true ) - else - keyList.selectItemPos( 0, true ) - end if - KeyListListener() -end sub - -sub populateEventList( focusPosition as integer ) - allApps = bindingDialog.getControl( "AllAppsOption" ) - eventList = bindingDialog.getControl( "EventList" ) - eventList.removeItems( 0, eventList.getItemCount() ) - - dim isApp as boolean - if allApps.state = true then ' Application event - isApp = true - else - isApp = false - end if - - ' use allEventTypes() to fill list box - ' for each element compare with allEventTypesApp - dim scriptName as string - dim lineNumber as integer - for n = 0 to ubound( allEventTypes() ) - ' If the line number is 1 then SB macro - ' more than 1 it is the line number of the script - if isApp and n > 12 then - exit for - endif - if isApp then - lineNumber = allEventTypesApp( n ).Value - scriptName = allEventTypesApp( n ).Name - else - lineNumber = allEventTypesDoc( n ).Value - scriptName = allEventTypesDoc( n ).Name - end if - stringToAdd = "" - if ( lineNumber >= 1 ) then - stringToAdd = " [" + scriptName + "]" - end if - eventList.addItem( allEventTypes( n ).Value + " " + stringToAdd, n ) - next n - - eventList.selectItemPos( focusPosition, true ) -end sub - - - -sub CreateAllKeyBindings() - reDim allKeyBindings( 105 ) as string - keyBindingPosition = 1 - - for FKey = 2 to 12 - allKeyBindings( keyBindingPosition ) = "SHIFT + CONTROL + F" + FKey - keyBindingPosition = keyBindingPosition + 1 - next FKey - for Digit = 0 to 9 - allKeyBindings( keyBindingPosition ) = "SHIFT + CONTROL + " + Digit - keyBindingPosition = keyBindingPosition + 1 - next Digit - for Alpha = 65 to 90 - allKeyBindings( keyBindingPosition ) = "SHIFT + CONTROL + " + chr$( Alpha ) - keyBindingPosition = keyBindingPosition + 1 - next Alpha - - for FKey = 2 to 12 - allKeyBindings( keyBindingPosition ) = "CONTROL + F" + FKey - keyBindingPosition = keyBindingPosition + 1 - next FKey - for Digit = 0 to 9 - allKeyBindings( keyBindingPosition ) = "CONTROL + " + Digit - keyBindingPosition = keyBindingPosition + 1 - next Digit - for Alpha = 65 to 90 - allKeyBindings( keyBindingPosition ) = "CONTROL + " + chr$( Alpha ) - keyBindingPosition = keyBindingPosition + 1 - next Alpha - - for FKey = 2 to 12 - allKeyBindings( keyBindingPosition ) = "SHIFT + F" + FKey - keyBindingPosition = keyBindingPosition + 1 - next FKey -end sub - - -sub createAllEventTypes() - allEventTypes( 0 ).Name = "OnStartApp" - allEventTypes( 0 ).Value = "Start Application" - allEventTypes( 1 ).Name = "OnCloseApp" - allEventTypes( 1 ).Value = "Close Application" - allEventTypes( 2 ).Name = "OnNew" - allEventTypes( 2 ).Value = "Create Document" - allEventTypes( 3 ).Name = "OnLoad" - allEventTypes( 3 ).Value = "Open Document" - allEventTypes( 4 ).Name = "OnSaveAs" - allEventTypes( 4 ).Value = "Save Document As" - allEventTypes( 5 ).Name = "OnSaveAsDone" - allEventTypes( 5 ).Value = "Document has been saved as" - allEventTypes( 6 ).Name = "OnSave" - allEventTypes( 6 ).Value = "Save Document" - allEventTypes( 7 ).Name = "OnSaveDone" - allEventTypes( 7 ).Value = "Document has been saved" - allEventTypes( 8 ).Name = "OnPrepareUnload" - allEventTypes( 8 ).Value = "Close Document" - allEventTypes( 9 ).Name = "OnUnload" - allEventTypes( 9 ).Value = "Close Document" - allEventTypes( 10 ).Name = "OnFocus" - allEventTypes( 10 ).Value = "Activate document" - allEventTypes( 11 ).Name = "OnUnfocus" - allEventTypes( 11 ).Value = "DeActivate document" - allEventTypes( 12 ).Name = "OnPrint" - allEventTypes( 12 ).Value = "Print Document" - REM The following are document-only events - allEventTypes( 13 ).Name = "OnMailMerge" - allEventTypes( 13 ).Value = "Print form letters" - allEventTypes( 14 ).Name = "OnPageCountChange" - allEventTypes( 14 ).Value = "Changing the page count" -end sub - - -sub createAllEventBindings() - 'dim props as new com.sun.star.beans.PropertyValue - 'props.Name = "" 'Name = script name - 'props.Value = 0 'Value = 0 for empty, 1 for macro, linenumber for script - - ' Creates all types of event bindings for both Application and Document - ' Initially both arrays have no bindings allocated to the events - ' The value for Doc is only Script/macro name (no need for line number) - for n = 0 to ubound( allEventTypes() ) - allEventTypesApp( n ).Name = "" - allEventTypesApp( n ).Value = 0 - allEventTypesDoc( n ).Name = "" - allEventTypesDoc( n ).Value = 0 - next n -end sub - - -REM ----- Text Handling Functions ----- - - -function ExtractLabelFromXMLLine( XMLLine as string ) as string - labelStart = instr( XMLLine, "label="+chr$(34)) + 7 - labelEnd = instr( XMLLine, chr$(34)+">" ) - if labelEnd = 0 then - labelEnd = instr( XMLLine, chr$(34)+"/>" ) - end if - labelLength = labelEnd - labelStart - - menuLabelUnformatted = mid( XMLLine, labelStart, labelLength ) - tildePosition = instr( menuLabelUnformatted, "~" ) - select case tildePosition - case 0 - menuLabel = menuLabelUnformatted - case 1 - menuLabel = right( menuLabelUnformatted, labelLength - 1 ) - case else - menuLabelLeft = left( menuLabelUnformatted, tildePosition - 1 ) - menuLabelRight = right( menuLabelUnformatted, labelLength - tildePosition ) - menuLabel = menuLabelLeft + menuLabelRight - end select - - ExtractLabelFromXMLLine() = menuLabel -end function - - -function ExtractScriptIdFromXMLLine( XMLLine as string ) as string - idStart = instr( XMLLine, "script://") + 9 - if instr( XMLLine, chr$(34)+" menu:helpid=" ) = 0 then - idEnd = instr( XMLLIne, "?location=" ) - else - idEnd = instr( XMLLine, ""+chr$(34)+" menu:helpid=" ) - end if - idLength = idEnd - idStart - scriptId = mid( XMLLine, idStart, idLength ) - - ExtractScriptIdFromXMLLine() = scriptId -end function - -function ExtractEventScriptFromXMLLine( xmlline as string ) - if instr( xmlline, "script://" ) > 0 then - idStart = instr( xmlline, "script://") + 9 - idEnd = instr( xmlline, chr$(34)+" xlink:type=" ) - idLength = idEnd - idStart - scriptId = mid( xmlline, idStart, idLength ) - end if - ExtractEventScriptFromXMLLine() = scriptId -end function - - -function ExtractEventNameFromXMLLine( xmlline as string ) - idStart = instr( xmlline, "event:name=" + chr$(34) ) + 12 - idEnd = instr( xmlline, chr$(34)+" event:language" ) - idLength = idEnd - idStart - event = mid( xmlline, idStart, idLength ) - - ExtractEventNameFromXMLLine() = event -end function - -function ExtractKeyCodeFromXMLLine( XMLLine as string ) as string - keyStart = instr( XMLLine, "code="+chr$(34)+"KEY_") + 10 - keyCode = mid( XMLLine, keyStart, ( len( XMLLine ) - keyStart ) ) - keyEnd = instr( keyCode, chr$(34) ) - keyCode = mid( keyCode, 1, keyEnd - 1 ) - - ExtractKeyCodeFromXMLLine() = keyCode -end function - - -function GetMenuWhiteSpace( MenuXMLLine as string ) as string - whiteSpace = "" - numberOfSpaces = instr( MenuXMLLine, "<" ) - 1 - for i = 1 to numberOfSpaces - whiteSpace = whiteSpace + " " - next i - - GetMenuWhiteSpace() = whiteSpace -end function - -function IsAllocatedMenuItem( script as string ) as boolean - foundMenuItem = false - Allocated = false - count = 0 - do - count = count + 1 - if strcomp( script, subMenuItems( count ) ) = 0 then - foundMenuItem = true - end if - loop while not( foundMenuItem ) and count < subMenuCount - - linePosition = subMenuItemLinePosition( count ) - - if not( instr( xmlFile( linePosition ), "script://" ) = 0 ) then - Allocated = true - end if - - isAllocatedMenuItem() = Allocated -end Function - - -function HasShiftKey( keyCombo ) as boolean - if instr( keyCombo, "SHIFT" ) = 0 then - hasShift = false - else - hasShift = true - end if - - HasShiftKey = hasShift -end function - - -function HasControlKey( keyCombo ) as boolean - if instr( keyCombo, "CONTROL" ) = 0 then - hasControl = false - else - hasControl = true - end if - - HasControlKey = hasControl -end function - - -function ExtractKeyFromCombo( keyString as string ) as string - while not( instr( keyString, "+" ) = 0 ) - removeTo = instr( keyString, "+ " ) + 2 - keyString = mid( keyString, removeTo, ( len( keyString ) - removeTo ) + 1 ) - wend - ExtractKeyFromCombo() = keyString -end function - - - -REM ------ Event Handling Functions (Listeners) ------ - - -sub KeyListListener() - keyShortCutList = bindingDialog.getControl( "KeyList" ) - selectedShortCut = keyShortCutList.getSelectedItem() - combo = bindingDialog.getControl( "KeyCombo" ) - - menuScriptList = bindingDialog.getControl( "ScriptList" ) - selectedScript = menuScriptList.getSelectedItem() - - keyGroup = combo.text - dim keyGroupIndex as Integer - dim selectedKeyIndex as Integer - for n = lbound ( allKeyGroupsArray() ) to ubound ( allKeyGroupsArray() ) - if ( allKeyGroupsArray( n ) = keyGroup )then - keyGroupIndex = n - exit for - end if - next n - selectedKeyIndex = keyShortCutList.getSelectedItemPos() - - if keyAllocationMap( keyGroupIndex, selectedKeyIndex ).Value > 1 then - bindingDialog.Model.Delete.enabled = true - bindingDialog.Model.AddOn.enabled = true - if selectedScript <> "" then - bindingDialog.Model.NewButton.enabled = true - endif - - else - - if keyAllocationMap( keyGroupIndex, selectedKeyIndex ).Value = 1 then - bindingDialog.Model.Delete.enabled = false - bindingDialog.Model.AddOn.enabled = false - bindingDialog.Model.NewButton.enabled = false - else - bindingDialog.Model.Delete.enabled = false - bindingDialog.Model.AddOn.enabled = false - if selectedScript <> "" then - bindingDialog.Model.NewButton.enabled = true - end if - end if - end if -end sub - - -sub SubMenuListListener() - scriptList = bindingDialog.getControl( "ScriptList" ) - subMenuList = bindingDialog.getControl( "SubMenuList" ) - selectedMenuItem = subMenuList.getSelectedItem() - if IsAllocatedMenuItem( selectedMenuItem ) then - bindingDialog.Model.Delete.enabled = true - bindingDialog.Model.AddOn.enabled = true - else - bindingDialog.Model.Delete.enabled = false - bindingDialog.Model.AddOn.enabled = false - end if -end sub - -REM a keypress listener that in turn fires the MenuCL on a return key even only -sub fireMenuComboListernerOnRet( eventobj as object ) - if (eventobj.KeyCode = 1280 ) then - MenuComboListener() - endif -end sub - -'Populates the SubMenuList with the appropriate menu items from the Top-level menu selected from the combo box -sub MenuComboListener() - combo = bindingDialog.getControl( "MenuCombo" ) - newToplevelMenu = combo.text - counter = 0 - do - counter = counter + 1 - loop while not( newToplevelMenu = menuItems( counter ) ) - - PopulateSubMenuList( counter ) -end sub - -REM a keypress listener that in turn fires the LLCL on a return key even only -sub fireLangLocComboListernerOnRet( eventobj as object ) - if (eventobj.KeyCode = 1280 ) then - LangLocComboListener() - endif -end sub - -sub LangLocComboListener() - - combo = bindingDialog.getControl( "LanguageCombo" ) - language = combo.text - combo = bindingDialog.getControl( "LocationCombo" ) - location = combo.text - - PopulateScriptList( language,location ) - - 'Enable/disable Assign button - scriptList = bindingDialog.getControl( "ScriptList" ) - if not (dialogName = "EditDebug") then - if scriptList.getSelectedItem() = "" then - bindingDialog.Model.NewButton.enabled = false - end if - end if - - if ( location = "Filesystem" ) and ( language <> "Java" ) then - bindingDialog.Model.Browse.enabled = true - if not (dialogName = "EditDebug") then - bindingDialog.Model.fsonly.enabled = true - end if - else - bindingDialog.Model.Browse.enabled = false - if not (dialogName = "EditDebug") then - bindingDialog.Model.fsonly.enabled = false - end if - endif - - ' extra dialog dependent processing - if dialogName = "Menu" then - ' will set New button to false if no text in LabelBox - MenuLabelBoxListener() - elseif dialogName = "Key" then - ' will set Assigne button to false if appropriate - KeyListListener() - elseif dialogName = "Event" then - EventListListener() - end if - -end sub - -REM a keypress listener that in turn fires the KeyCL on a return key even only -sub fireKeyComboListernerOnRet( eventobj as object ) - if (eventobj.KeyCode = 1280 ) then - KeyComboListener() - endif -end sub - -'Populates the KeyList with the appropriate key combos from the Top-level key group selected from the combo box -sub KeyComboListener() - combo = bindingDialog.getControl( "KeyCombo" ) - keyGroup = combo.text - for n = lbound ( allKeyGroupsArray() ) to ubound ( allKeyGroupsArray() ) - if ( allKeyGroupsArray( n ) = keyGroup )then - keyGroupIndex = n - exit for - end if - next n - PopulateKeyBindingList( keyGroupIndex ) -end sub - - -sub MenuLabelBoxListener() - menuScriptList = bindingDialog.getControl( "ScriptList" ) - selectedScript = menuScriptList.getSelectedItem() - 'if the SubMenuList is from a dynamically created menu (e.g. Format) - 'or if the Menu Label text box is empty - subMenuList = bindingDialog.getControl( "SubMenuList" ) - firstItem = subMenuList.getItem( 0 ) - if bindingDialog.Model.MenuLabelBox.text = "" OR firstItem = "Unable to Assign Scripts to this menu" OR selectedScript = "" then - bindingDialog.Model.NewButton.enabled = false - else - bindingDialog.Model.NewButton.enabled = true - end if -end sub - -sub AppDocEventListener() - populateEventList( 0 ) - EventListListener() -end sub - - -sub EventListListener() - on error goto ErrorHandler - - eventList = bindingDialog.getControl( "EventList" ) - eventPos = eventList.getSelectedItemPos() - - allApps = bindingDialog.getControl( "AllAppsOption" ) - - menuScriptList = bindingDialog.getControl( "ScriptList" ) - selectedScript = menuScriptList.getSelectedItem() - - dim binding as integer - if allApps.state = true then - binding = allEventTypesApp( eventPos ).Value - else - binding = allEventTypesDoc( eventPos ).Value - endif - - if ( binding > 1 ) then - bindingDialog.Model.Delete.enabled = true - else - bindingDialog.Model.Delete.enabled = false - end if - - if ( binding = 1 ) then - ' staroffice binding, can't assign - bindingDialog.Model.NewButton.enabled = false - elseif ( selectedScript <> "" ) then - bindingDialog.Model.NewButton.enabled = true - end if - exit sub - - ErrorHandler: - reset - bindingDialog.Model.Delete.enabled = false - -end sub - - -REM ------ Event Handling Functions (Buttons) ------ - -function getFilePicker() as Object - REM file dialog - oFilePicker = CreateUnoService( "com.sun.star.ui.dialogs.FilePicker" ) - - combo = bindingDialog.getControl( "LanguageCombo" ) - language = combo.text - currentFilter = "" - - for langIndex = 0 to ubound(languages()) - if( languages(langIndex) <> "Java" ) then - filterName = languages(langIndex) + " (" - filterVal="" - extns = extensions(langIndex) - for extnIndex = lbound(extns()) to ubound(extns()) - filterName = filterName + "*." + extns(extnIndex) + "," - filterVal = filterVal + "*." + extns(extnIndex) + "," - next extnIndex - filterName = left(filterName, len(filterName) -1) + ")" - filterVal = left(filterVal, len(filterVal) -1) - if(instr(filterName,language) = 1 ) then - currentFilter = filterName - end if - oFilePicker.AppendFilter(filterName, filterVal) - end if - next langIndex - if(len(currentFilter) > 0 ) then - oFilePicker.SetCurrentFilter( currentFilter ) - end if - - If sFileURL = "" Then - oSettings = CreateUnoService( "com.sun.star.frame.Settings" ) - oPathSettings = oSettings.getByName( "PathSettings" ) - sFileURL = oPathSettings.getPropertyValue( "Work" ) - End If - - REM set display directory - oSimpleFileAccess = CreateUnoService( "com.sun.star.ucb.SimpleFileAccess" ) - - If oSimpleFileAccess.exists( sFileURL ) And oSimpleFileAccess.isFolder( sFileURL ) Then - oFilePicker.setDisplayDirectory( sFileURL ) - End If - getFilePicker() = oFilePicker -end function - -Sub DoBrowseAndEdit() - Dim oFilePicker As Object, oSimpleFileAccess As Object - Dim oSettings As Object, oPathSettings As Object - Dim sFileURL As String - Dim sFiles As Variant - - oFilePicker = getFilePicker() - REM execute file dialog - If oFilePicker.execute() Then - sFiles = oFilePicker.getFiles() - - sFileURL = sFiles(0) - oSimpleFileAccess = CreateUnoService( "com.sun.star.ucb.SimpleFileAccess" ) - If oSimpleFileAccess.exists( sFileURL ) Then - for langIndex = 0 to ubound(languages()) - If (instr(oFilePicker.GetCurrentFilter, languages(langIndex)) = 1 ) then - RunDebugger(languages(langIndex), sFileURL, "") - End If - next langIndex - End If - bindingDialog.endExecute() - End If -End Sub - -Sub RunDebugger(lang as String, uri as String, filename as String) - dim document as object - dim dispatcher as object - dim parser as object - dim url as new com.sun.star.util.URL - - document = ThisComponent.CurrentController.Frame - parser = createUnoService("com.sun.star.util.URLTransformer") - dim args(2) as new com.sun.star.beans.PropertyValue - args(0).Name = "language" - args(0).Value = lang - args(1).Name = "uri" - args(1).Value = uri - args(2).Name = "filename" - args(2).Value = filename - - url.Complete = "script://_$DebugRunner.Debug?" _ - + "language=Java&function=DebugRunner.go" _ - + "&location=share" - - parser.parseStrict(url) - disp = document.queryDispatch(url,"",0) - disp.dispatch(url, args()) -End Sub - -sub DoEdit() - Dim scriptInfo as Object - - menuScriptList = bindingDialog.getControl( "ScriptList" ) - selectedScript = menuScriptList.getSelectedItem() - - if not (selectedScript = "") then - scripts() = scriptDisplayList(0) - for n = LBOUND( scripts() ) to UBOUND( scripts() ) - if ( scripts( n ).Name = selectedScript ) then - scriptInfo = scripts( n ).Value - exit for - end if - next n - - RunDebugger(scriptInfo.getLanguage, scriptInfo.getParcelURI, scriptInfo.getFunctionName) - bindingDialog.endExecute() - end if -end sub - -sub MenuOKButton() - WriteXMLFromArray() - bindingDialog.endExecute() -end sub - - -sub MenuCancelButton() - bindingDialog.endExecute() -end sub - - -sub MenuHelpButton() - helpDialog = LoadDialog( "ScriptBindingLibrary", "HelpBinding" ) - helpDialog.execute() -end sub - - -sub MenuDeleteButton() - subMenuList = bindingDialog.getControl( "SubMenuList" ) - linePos = subMenuItemLinePosition( subMenuList.getSelectedItemPos() + 1 ) - - RemoveBinding( linePos ) - - REM Update the top-level menu's line positions - combo = bindingDialog.getControl( "MenuCombo" ) - newToplevelMenu = combo.text - counter = 0 - do - counter = counter + 1 - loop while not( newToplevelMenu = menuItems( counter ) ) - UpdateTopLevelMenus( counter + 1, false ) - - MenuComboListener() - - subMenuList.selectItemPos( subMenuList.getSelectedItemPos(), true ) -end sub - - -sub MenuNewButton() - menuScriptList = bindingDialog.getControl( "ScriptList" ) - selectedScript = menuScriptList.getSelectedItem() - scriptURI = getScriptURI( selectedScript ) - newMenuLabel = bindingDialog.Model.MenuLabelBox.text - - subMenuList = bindingDialog.getControl( "SubMenuList" ) - - REM Update the top-level menu's line positions - combo = bindingDialog.getControl( "MenuCombo" ) - newToplevelMenu = combo.text - counter = 0 - do - counter = counter + 1 - loop while not( newToplevelMenu = menuItems( counter ) ) - UpdateTopLevelMenus( counter + 1, true ) - - REM New line position is one ahead of the selected sub menu item - linePos = subMenuItemLinePosition( subMenuList.getSelectedItemPos() + 1 ) + 1 - - AddNewMenuBinding( scriptURI, newMenuLabel, linePos ) - - MenuComboListener() - subMenuList.selectItemPos( subMenuList.getSelectedItemPos() + 1, true ) - SubMenuListListener() -end sub - -sub BrowseButton() - Dim oFilePicker As Object, oSimpleFileAccess As Object - Dim oSettings As Object, oPathSettings As Object - Dim sFileURL As String - Dim sFiles As Variant - - oFilePicker = getFilePicker() - - REM execute file dialog - If oFilePicker.execute() Then - sFiles = oFilePicker.getFiles() - sFileURL = sFiles(0) - oSimpleFileAccess = CreateUnoService( "com.sun.star.ucb.SimpleFileAccess" ) - If oSimpleFileAccess.exists( sFileURL ) Then - REM add sFileURL to the list - ReDim preserve filesysScripts(filesysCount) as String - filesysScripts( filesysCount ) = sFileURL - filesysCount=filesysCount+1 - ' if user changed filter in file picker then populate - ' language with language associated with that in file picker - sFilter = oFilePicker.getCurrentFilter() - langCombo = bindingDialog.getControl( "LanguageCombo" ) - dim items() as String - items() = langCombo.getItems() - for index = lbound(items()) to ubound(items()) - iPos = inStr(sFilter," ") - Dim theLanguage as String - if( iPos > 0 ) then - theLanguage = Left( sFilter, iPos - 1) - if ( theLanguage = items( index ) ) then - langCombo.text = items( index ) - exit for - end if - end if - next index - End If - End If - LangLocComboListener() -End Sub - -sub KeyOKButton() - WriteXMLFromArray() - bindingDialog.endExecute() -end sub - - -sub KeyCancelButton() - bindingDialog.endExecute() -end sub - - -sub KeyHelpButton() - helpDialog = LoadDialog( "ScriptBindingLibrary", "HelpBinding" ) - helpDialog.execute() -end sub - - -sub KeyNewButton() - combo = bindingDialog.getControl( "KeyCombo" ) - keyGroup = combo.text - for n = lbound ( allKeyGroupsArray() ) to ubound ( allKeyGroupsArray() ) - if ( allKeyGroupsArray( n ) = keyGroup )then - keyGroupIndex = n - exit for - end if - next n - menuScriptList = bindingDialog.getControl( "ScriptList" ) - script = menuScriptList.getSelectedItem() - scriptURI = getScriptURI( script ) - - keyList = bindingDialog.getControl( "KeyList" ) - keyIndex = keyList.getSelectedItemPos() - ShortCutKeyArray() = KeyBindArrayOfArrays( keyGroupIndex ) - keyText = ShortCutKeyArray( keyIndex ) - - AddNewKeyBinding( scriptURI, HasShiftKey( keyText ), HasControlKey( keyText ), ExtractKeyFromCombo( keyText ) ) - - KeyComboListener() -end sub - - -sub KeyDeleteButton() - - keyShortCutList = bindingDialog.getControl( "KeyList" ) - selectedShortCut = keyShortCutList.getSelectedItem() - combo = bindingDialog.getControl( "KeyCombo" ) - - keyGroup = combo.text - dim keyGroupIndex as Integer - dim selectedKeyIndex as Integer - for n = lbound ( allKeyGroupsArray() ) to ubound ( allKeyGroupsArray() ) - if ( allKeyGroupsArray( n ) = keyGroup )then - keyGroupIndex = n - exit for - end if - next n - selectedKeyIndex = keyShortCutList.getSelectedItemPos() - linePosition = keyAllocationMap( keyGroupIndex, selectedKeyIndex ).Value - keyAllocationMap( keyGroupIndex, selectedKeyIndex ).Value = 0 - keyAllocationMap( keyGroupIndex, selectedKeyIndex ).Name = "" - RemoveBinding( linePosition ) - KeyComboListener() -end sub - - -sub EventNewButton() - eventScriptList = bindingDialog.getControl( "ScriptList" ) - selectedScript = eventScriptList.getSelectedItem() - scriptURI = getScriptURI( selectedScript ) - eventList = bindingDialog.getControl( "EventList" ) - eventPosition = eventList.getSelectedItemPos() - - allApps = bindingDialog.getControl( "AllAppsOption" ) - dim isApp as boolean - if allApps.state = true then 'Application - isApp = true - else 'Document - isApp = false - end if - AddNewEventBinding( scriptURI, eventPosition, isApp ) - - populateEventList( eventPosition ) - EventListListener() -end sub - - -sub EventDeleteButton() - eventList = bindingDialog.getControl( "EventList" ) - REM Check that combo is a script - eventPosition = eventList.getSelectedItemPos() - - allApps = bindingDialog.getControl( "AllAppsOption" ) - if allApps.state = true then 'Application - linePosition = allEventTypesApp( eventPosition ).Value - 'dim eventProp as new com.sun.star.beans.PropertyValue - 'eventProp.Name = "" - 'eventProp.Value = 0 - allEventTypesApp( eventPosition ).Name = "" - allEventTypesApp( eventPosition ).Value = 0 - RemoveBinding( linePosition ) - else 'Document - 'DeleteEvent( allEventTypes( eventPosition ) ) - allEventTypesDoc( eventPosition ).Name = "" - allEventTypesDoc( eventPosition ).Value = 0 - end if - - PopulateEventList( eventPosition ) - EventListListener() -end sub - - -sub EventOKButton - WriteEventsToDoc() - WriteXMLFromArray() - bindingDialog.endExecute() -end sub - - -sub HelpOKButton() - helpDialog.endExecute() -end sub - diff --git a/scripting/workben/bindings/calckeybinding.xml b/scripting/workben/bindings/calckeybinding.xml deleted file mode 100644 index 665b0a926447..000000000000 --- a/scripting/workben/bindings/calckeybinding.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/scripting/workben/bindings/calcmenubar.xml b/scripting/workben/bindings/calcmenubar.xml deleted file mode 100644 index e305e5300545..000000000000 --- a/scripting/workben/bindings/calcmenubar.xml +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scripting/workben/bindings/drawkeybinding.xml b/scripting/workben/bindings/drawkeybinding.xml deleted file mode 100644 index 034110583e25..000000000000 --- a/scripting/workben/bindings/drawkeybinding.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/scripting/workben/bindings/drawmenubar.xml b/scripting/workben/bindings/drawmenubar.xml deleted file mode 100644 index 4f0d1e9d0d93..000000000000 --- a/scripting/workben/bindings/drawmenubar.xml +++ /dev/null @@ -1,369 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scripting/workben/bindings/eventbindings.xml b/scripting/workben/bindings/eventbindings.xml deleted file mode 100644 index 96ce4eece869..000000000000 --- a/scripting/workben/bindings/eventbindings.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - diff --git a/scripting/workben/bindings/impresskeybinding.xml b/scripting/workben/bindings/impresskeybinding.xml deleted file mode 100644 index 0b88c1545820..000000000000 --- a/scripting/workben/bindings/impresskeybinding.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/scripting/workben/bindings/impressmenubar.xml b/scripting/workben/bindings/impressmenubar.xml deleted file mode 100644 index c0b3a4683853..000000000000 --- a/scripting/workben/bindings/impressmenubar.xml +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scripting/workben/bindings/manifest.xml b/scripting/workben/bindings/manifest.xml deleted file mode 100644 index 18138467ea07..000000000000 --- a/scripting/workben/bindings/manifest.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/scripting/workben/bindings/writerkeybinding.xml b/scripting/workben/bindings/writerkeybinding.xml deleted file mode 100644 index ee7996976f12..000000000000 --- a/scripting/workben/bindings/writerkeybinding.xml +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/scripting/workben/bindings/writermenubar.xml b/scripting/workben/bindings/writermenubar.xml deleted file mode 100644 index ef813de6bfc2..000000000000 --- a/scripting/workben/bindings/writermenubar.xml +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scripting/workben/build.xml b/scripting/workben/build.xml deleted file mode 100644 index 87f2c2f0839e..000000000000 --- a/scripting/workben/build.xml +++ /dev/null @@ -1,387 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scripting/workben/data/ExampleSpreadSheetLatest.sxc b/scripting/workben/data/ExampleSpreadSheetLatest.sxc deleted file mode 100644 index 7be6c0d4be05953bad617d671db3b6714498bdd4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14635 zcma)jV|XUWwsq`|ZQFJ_wr$(C?T(#vY}}R%Zl3qY-q>ti!!1On;%JG;qI= zGG2YIZ~1-8bA=ctzo6+Us!lxH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QT@(=PvKcP)#wZZqS3o zXa}yzlxDswhQhAQj)7ukS-SdO$7bU1mhgpSD-P6HcRxF9y1$1`9~P;1$0W9F`)hIb z-scRCR?`IDj6s_?mrTgfBb4D0H+rK7qUn8Db$Zis(Kk6`dK%qslrG(u(F688dtyX} z?zpBI9pa_T_FD}+Rbg>HUw+(|FvC3@?p5UTpwcqy83T|zo%B$O;iBKz#7rI(J>mcwUP6pk*Vu#1(4c6t!@_Fct`tj zKU)(e0jqhPAfw4`baV3!ZcPdVS_JAOS|vrh&uzB0@ie2AQ|m38^Y`Lvv*gA-Mmz1+ cn+|Zh{M)n7#+;Ff2HOt&MFQ#R=cm2>AKW$@xBvhE diff --git a/scripting/workben/data/doc_with_one_script.sxw b/scripting/workben/data/doc_with_one_script.sxw deleted file mode 100644 index 7445f4afca47d5960c0a450cb459eacb9c134a10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6286 zcmaKwby!qe7siL~7$gKiKmh>(X+a6;l8_WZWPpL8W=6U}TBIC$kP>N;kVd+ZPU%LF zR#L)m(0eaf-ydh@JoC){oxRt7*E;)MYDyTGw{{3SayVYT@hF_xSZHa7 z(GbDfzQE$2GcVxcrP_ZZBJb_q$NBCS0yXn?yh|D~LBR@_fXumvIP^J5&kp#!fRY=+ z5gV6R*s3HT(H(d0cW1Lse`eVJOn`oI+hssqC_(>%qktkG@#IBlZf6TFTa0Y6dG+3* zJNZyPKKCwbg|q5F85n0wA?6Oo+zyeo>VVLo)09Gt*NSszMs^D7k1+A=c|(4hl&SYv zE?T!5lsR$g7N&CE?G0se6bkfDL>WHo{%Yh9-`yyM;i%kZ^32}xn@F#Ni9F2CMBeg) zwSz0zhh(W!_;}8`w?x$}VV1dPH4KvIsB@Y0zN$FzL+nL==S(ZJ4K==YMpA*50cAUB zYM|+@EoCSt!)xZQaeYqwdN#rPNHokWe9a&}uFwpXzzVR3d=M6fQh@j1k^1tbt|(`b z3~wUu3llH&X1~@nAP-ZjpYOb?el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#I6e&Z#PR)3{nKWhr6ys1$X`tt2J`dpfdA#usb+sY h8=b{mA;VzKoRofn;9`D107hISfIf`0D^GZU{{x~LOL71J diff --git a/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.protocolhandler.Dispatch.csv b/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.protocolhandler.Dispatch.csv deleted file mode 100644 index 614260db95c3..000000000000 --- a/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.protocolhandler.Dispatch.csv +++ /dev/null @@ -1,5 +0,0 @@ -"Dispatch";"drafts::com::sun::star::frame::XDispatchProvider";"queryDispatch()" -"Dispatch";"drafts::com::sun::star::frame::XDispatchProvider";"queryDispatches()" -"Dispatch";"drafts::com::sun::star::frame::XDispatch";"dispatch()" -"Dispatch";"drafts::com::sun::star::frame::XDispatch";"addStatusListener()" -"Dispatch";"drafts::com::sun::star::frame::XDispatch";"removeStatusListener()" diff --git a/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.provider.Function.csv b/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.provider.Function.csv deleted file mode 100644 index 87327525908a..000000000000 --- a/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.provider.Function.csv +++ /dev/null @@ -1 +0,0 @@ -"Function";"drafts::com::sun::star::script::framework::provider::XFunction";"invoke()" diff --git a/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.provider.FunctionProvider.csv b/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.provider.FunctionProvider.csv deleted file mode 100644 index 0f1c41772cfb..000000000000 --- a/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.provider.FunctionProvider.csv +++ /dev/null @@ -1 +0,0 @@ -"FunctionProvider";"drafts::com::sun::star::script::framework::provider::XFunctionProvider";"getFunction()" diff --git a/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager.csv b/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager.csv deleted file mode 100644 index 0bff1a1a89b7..000000000000 --- a/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager.csv +++ /dev/null @@ -1,2 +0,0 @@ -"ScriptRuntimeManager";"drafts::com::sun::star::script::framework::runtime::XScriptNameResolver";"resolve()" -"ScriptRuntimeManager";"drafts::com::sun::star::script::framework::runtime::XScriptInvocation";"invoke()" diff --git a/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.storage.ScriptInfo.csv b/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.storage.ScriptInfo.csv deleted file mode 100644 index 79e8c91e19c1..000000000000 --- a/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.storage.ScriptInfo.csv +++ /dev/null @@ -1,8 +0,0 @@ -"ScriptInfo";"drafts::com::sun::star::script::framework::storage::XScriptInfo";"getLogicalName()" -"ScriptInfo";"drafts::com::sun::star::script::framework::storage::XScriptInfo";"getParcelURI()" -"ScriptInfo";"drafts::com::sun::star::script::framework::storage::XScriptInfo";"getLanguage()" -"ScriptInfo";"drafts::com::sun::star::script::framework::storage::XScriptInfo";"getFunctionName()" -"ScriptInfo";"drafts::com::sun::star::script::framework::storage::XScriptInfo";"getLanguageProperties()" -"ScriptInfo";"drafts::com::sun::star::script::framework::storage::XScriptInfo";"getFileSetNames()" -"ScriptInfo";"drafts::com::sun::star::script::framework::storage::XScriptInfo";"getFilesInFileSet()" -"ScriptInfo";"drafts::com::sun::star::script::framework::storage::XScriptInfo";"getDescription()" diff --git a/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.storage.ScriptStorage.csv b/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.storage.ScriptStorage.csv deleted file mode 100644 index 69628462fedb..000000000000 --- a/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.storage.ScriptStorage.csv +++ /dev/null @@ -1,4 +0,0 @@ -"ScriptStorage";"drafts::com::sun::star::script::framework::storage::XScriptInfoAccess";"getScriptLogicalNames()" -"ScriptStorage";"drafts::com::sun::star::script::framework::storage::XScriptInfoAccess";"getImplementations()" -"ScriptStorage";"drafts::com::sun::star::script::framework::storage::XScriptInfoAccess";"getAllImplementations()" -"ScriptStorage";"drafts::com::sun::star::script::framework::storage::XScriptStorageRefresh";"refresh()" diff --git a/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.storage.ScriptStorageManager.csv b/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.storage.ScriptStorageManager.csv deleted file mode 100644 index 6e255c869f67..000000000000 --- a/scripting/workben/data/objdsc/drafts.com.sun.star.script.framework.storage.ScriptStorageManager.csv +++ /dev/null @@ -1,6 +0,0 @@ -"ScriptStorageManager";"drafts::com::sun::star::script::framework::storage::XScriptStorageManager";"createScriptStorage()" -"ScriptStorageManager";"drafts::com::sun::star::script::framework::storage::XScriptStorageManager";"createScriptStorageWithURI()" -"ScriptStorageManager";"drafts::com::sun::star::script::framework::storage::XScriptStorageManager";"getScriptStorage()" -"ScriptStorageManager";"drafts::com::sun::star::script::framework::storage::XScriptStorageManager";"refreshScriptStorage()" -"ScriptStorageManager";"drafts::com::sun::star::script::framework::security::XScriptSecurity";"checkPermission()" -"ScriptStorageManager";"::com::sun::star::lang::XEventListener";"disposing()" diff --git a/scripting/workben/data/script_in_class_file.sxw b/scripting/workben/data/script_in_class_file.sxw deleted file mode 100644 index ddb44c14d2d363254b4606bbf860417b50aa6528..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6976 zcmaKx2Q*w;7sp5MVsw%ay^9`138E9Ci|EE6m%ccOP8dI>@B zjhFAeCwVV#X5F>!%(~|{=brt)`~3GFRYeq3Y{1nk%GHizA%k0p3UPjQU;;=0HkLLZ zmu%f9IU!!;M-rsVa7M z<5A8ULc%HipgU!#wj1O(&rYrh;o< zX^h~^T`P?Kxy$^n-YUa)qY6rnKQH&UCa)F-@kLXkAqBp=sKb%nDms$iC=*if0o=fzqcKeB~GTyvhMiI zgLteEo9l?V+C^og5`-}&ANK%d=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duSP9$ACU-;5i()=SBXH4?My+|9A+Ti9FG z**xyHYPmx^^O>#1qiiN7EnXA+__h8i5?O5+X*!|u>+c@?@-!5yJ~%rr(D2}H52#ri z_ryGdhiO4{infH_oZ{(>zTxb8h7BdqSYu7j`0TJqpI+Ijl$(roSa-Ob2GmkckMAxn z5drsX#Jyih_*8Ws${-hf0mv^bXA#yB!Id+Isz0yfxSgqVLPvBAXiSb2zCFv!U4HMw zn}of*6_r*W$O3+1a%ZlB@aoAe6NA?hFWZ$ebRZ$89U~G&b9@t_>~YxldKlMAEWDV) zxWj2O1Hv6-bJE{+Nhkn|Q!lqSms^tcu9q*5w2C=Y! z(ic~!e>d6Del*!NodJL!h~G8PuOoC3h@aZ&|3Ue=KYE?gfY`LIcT4{R@^fK-9ioJZ zxSPMq{Qp4wT>4!{*dSKz=R)uwnBV!e9~c0D0B|mGi4VB$-Vlr{_x5iK`?GJmK9&17 zt}%Xgale_?fat;9mKhU%CI>jDB!`JR7S-zvuqgntn6g te{s)_2oE888 diff --git a/scripting/workben/data/script_in_jar_file.sxw b/scripting/workben/data/script_in_jar_file.sxw deleted file mode 100644 index 93b10494d26649a4f41952fc5e2713c877cae849..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8081 zcmaKx1z42Z7KVrJln_u5>23rmLAnJgQDEpEq#Hy)By}jsA*4aNWhm+HZV-@08V2s5 z_gv9)&V6`(80MM%{`=qat-aU!mZ}00G7$g(KnFy++p}%x@)9y30szQp000(%7+?gl zbu_VcWOuc()_95mK$1q85V^iIT#*4!QoKnsqLm^hIq?H`V8oyB>QEk6v$6t5*lP(1 zr(V3hS1w~DWH3^!KDDqkH&*-|!4LzDmS{Q7Y?ds7p?7)x9Y&GSq#d1+z}g|T0hqCK zg+4HEna|xKA0aIr;@GGR3yiqV$;J9^xbq2qYc-XAO zhSs<;m-qR2G@G@AZ)hgkAf)fi&^e*+%VQ)Lr4Hi|CzmVX0cT@bkfX7z)wqqbhskTa zwH`s(l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mcf2$4oaPEFX;FY}}FKYd;oX;m;kTcs&O~!;Z?5bh? zI&s!We!Hn!PnSt#NQb$vQ{a|(+c8a~=5b4Tkzh+)@&eZd4UgKQG9DLmRrKBvoNdr^ z^`UO=YB1%UVVm-{n7s^6Z+eYrd+zP{LhvAV>jL`b6`JXnOOLt;F-1h$6H=qTT^a( zZ2T8<`wl~ZHzSicGp?$P7h0(aF#L4{F%cCTE2LrztzbYg0<%g(Ho_Xo2xtWdGzV0{ zp__wQwIQ2RjcyLKq5~QRicExIh|&YKih~)(z_6w909M0LDm)C&BFsfCl_2H<(;(2? yRA6Na3oo!|!H$HO3n`;;7>k*nk&SI)#bzvy)Qu7#tZYDcF|YyQOP~u+f_VVQ;9=tc diff --git a/scripting/workben/data/testdata/Function.csv b/scripting/workben/data/testdata/Function.csv deleted file mode 100644 index b924c86f4bd6..000000000000 --- a/scripting/workben/data/testdata/Function.csv +++ /dev/null @@ -1,4 +0,0 @@ -_invoke;description=Try to find and invoke a valid user level XFunction;logicalname=script://HighlightText.showForm;expected=success -_invoke;description=Try to invoke a valid beanshell XFunction that returns an Integer;logicalname=script://returns-Integer;returntype=java.lang.Integer;expected=success -_invoke;description=Try to invoke a valid beanshell XFunction that returns a String;logicalname=script://returns-String;returntype=java.lang.String;returnvalue=testing;expected=success -_invoke;description=Try to invoke a valid beanshell XFunction that returns a Frame;logicalname=script://returns-Frame;expected=com.sun.star.uno.RuntimeException diff --git a/scripting/workben/data/testdata/FunctionProvider.csv b/scripting/workben/data/testdata/FunctionProvider.csv deleted file mode 100644 index 88dcfae118e3..000000000000 --- a/scripting/workben/data/testdata/FunctionProvider.csv +++ /dev/null @@ -1 +0,0 @@ -_getFunction;description=Try to get a valid XFunction;logicalname=script://MemoryUtils.MemUsage;expected=XFunction.class diff --git a/scripting/workben/data/testdata/ScriptInfo.csv b/scripting/workben/data/testdata/ScriptInfo.csv deleted file mode 100644 index a5fab2ad5d16..000000000000 --- a/scripting/workben/data/testdata/ScriptInfo.csv +++ /dev/null @@ -1,8 +0,0 @@ -_getLogicalName;description=Try to get a logical name;expected=MemoryUtils.MemUsage -_getParcelURI;description=Try to get a parcel URI;expected=ExampleSpreadSheetLatest.sxc/Scripts/java/MemoryUsage -_getLanguage;description=Try to get language;expected=Java -_getFunctionName;description=Try to get a function name;expected=MemoryUsage.updateMemoryUsage -_getLanguageProperties;description=Try to get language properties;expected=MemUsage.jar -_getFileSetNames;description=Try to get fileset names;expected=delivered -_getFilesInFileSet;description=Try to get files in fileset;expected=google.jar -_getDescription;description=Try to get description;expected=Show JVM memory usage stats diff --git a/scripting/workben/data/testdata/ScriptRuntimeManager.csv b/scripting/workben/data/testdata/ScriptRuntimeManager.csv deleted file mode 100644 index b5d049b5f425..000000000000 --- a/scripting/workben/data/testdata/ScriptRuntimeManager.csv +++ /dev/null @@ -1,8 +0,0 @@ -_resolve;description=Try to resolve a valid document URI;location=script_in_class_file.sxw;logicalname=script://doc.jsuite.testMethod;expected=XScriptInfo.class -_resolve;description=Try to resolve a valid user URI;location=user;logicalname=script://user.jsuite.test;expected=XScriptInfo.class -_resolve;description=Try to resolve a valid share URI;location=share;logicalname=script://share.jsuite.test;expected=XScriptInfo.class -_resolve;description=Try to resolve an invalid URI;location=user;logicalname=scrpit://user.jsuite.test;expected=com.sun.star.lang.IllegalArgumentException -_resolve;description=Try to resolve a valid but non existent URI;location=user;logicalname=script://non.existent.test;expected=null -_invoke;description=Try to invoke a valid user level URI;location=user;context=null;logicalname=script://user.jsuite.test;expected=success -_invoke;description=Try to invoke a valid user level URI with a valid context;location=user;context=xscriptcontext_test_document.sxw;logicalname=script://xscriptcontext.jsuite.test;expected=success -_invoke;description=Try to invoke a valid user level script in a jar file;location=user;context=null;logicalname=script://jarscript.jsuite.test;expected=success diff --git a/scripting/workben/data/testdata/ScriptStorage.csv b/scripting/workben/data/testdata/ScriptStorage.csv deleted file mode 100644 index a5b4589e6f64..000000000000 --- a/scripting/workben/data/testdata/ScriptStorage.csv +++ /dev/null @@ -1,4 +0,0 @@ -_getScriptLogicalNames;description=Try to get logical names;expected=MemoryUtils.MemUsage -_getImplementations;description=Try to get a valid implementation;logicalname=script://MemoryUtils.MemUsage?location=document;expected=MemoryUtils.MemUsage -_getAllImplementations;description=Try to get all valid implementations;location=doc_with_beanshell_scripts.sxw;expected=returns-Integer,returns-String,returns-Frame -_refresh;description=Try calling refresh;expected=success diff --git a/scripting/workben/data/testdata/ScriptStorageManager.csv b/scripting/workben/data/testdata/ScriptStorageManager.csv deleted file mode 100644 index 9dc2a9b67bf2..000000000000 --- a/scripting/workben/data/testdata/ScriptStorageManager.csv +++ /dev/null @@ -1,18 +0,0 @@ -_createScriptStorage;description=Try to create a ScriptStorage;expected=success -_createScriptStorageWithURI;description=Try to create a document ScriptStorage;location=script_in_class_file.sxw;expected=XScriptInfoAccess.class -_getScriptStorage;description=Try to get application share ScriptStorage;location=share;expected=XScriptInfoAccess.class -_getScriptStorage;description=Try to get application user ScriptStorage;location=user;expected=XScriptInfoAccess.class -_refreshScriptStorage;description=Try to refresh non-existent ScriptStorage;location=non-existent;expected=success -_refreshScriptStorage;description=Try to refresh valid document ScriptStorage;location=script_in_class_file.sxw;expected=success -_checkPermission;description=Try to get permssion when run macro is set to never;location=check_perms_file1.sxw;runmacro=never;pathlist=false;confirm=false;warning=false;dialog=false;checkbox=false;buttonName=Run;checkpath=false;expected=com.sun.star.security.AccessControlException -_checkPermission;description=Try to get permssion when run macro is set to always, and no warning dialog;location=check_perms_file2.sxw;runmacro=always;pathlist=false;confirm=false;warning=false;dialog=false;checkbox=false;buttonName=Run;checkpath=false;expected=true -_checkPermission;description=Try to get permssion when run macro is set to always, warning dialog, and run button pressed;location=check_perms_file3.sxw;runmacro=always;pathlist=false;confirm=false;warning=true;dialog=true;checkbox=false;buttonName=Run;checkpath=false;expected=true -_checkPermission;description=Try to get permssion when run macro is set to always, warning dialog, and do not run button pressed;location=check_perms_file4.sxw;runmacro=always;pathlist=false;confirm=false;warning=true;dialog=true;checkbox=false;buttonName=Do Not Run;checkpath=false;expected=com.sun.star.security.AccessControlException -_checkPermission;description=Try to get permssion when run macro is set to according to path list, doc in path, no warning dialog, and no confirmation;location=check_perms_file5.sxw;runmacro=pathlist;pathlist=true;confirm=false;warning=false;dialog=false;checkbox=false;buttonName=Do Not Run;checkpath=false;expected=true -_checkPermission;description=Try to get permssion when run macro is set to according to path list, doc not in path, no warning dialog, and no confirmation;location=check_perms_file6.sxw;runmacro=pathlist;pathlist=false;confirm=false;warning=false;dialog=false;checkbox=false;buttonName=Do Not Run;checkpath=false;expected=com.sun.star.security.AccessControlException -_checkPermission;description=Try to get permssion when run macro is set to according to path list, doc in path, warning dialog, run button pressed;location=check_perms_file7.sxw;runmacro=pathlist;pathlist=true;confirm=false;warning=true;dialog=true;checkbox=false;buttonName=Run;checkpath=false;expected=true -_checkPermission;description=Try to get permssion when run macro is set to according to path list, doc in path, warning dialog, do not run button pressed;location=check_perms_file8.sxw;runmacro=pathlist;pathlist=true;confirm=false;warning=true;dialog=true;checkbox=false;buttonName=Do Not Run;checkpath=false;expected=com.sun.star.security.AccessControlException -_checkPermission;description=Try to get permssion when run macro is set to according to path list, doc not in path, warning dialog, confirm dialog, checkbox not checked, run button pressed;location=check_perms_file9.sxw;runmacro=pathlist;pathlist=false;confirm=true;warning=true;dialog=true;checkbox=false;buttonName=Run;checkpath=true;expected=true -_checkPermission;description=Try to get permssion when run macro is set to according to path list, doc not in path, warning dialog, confirm dialog, checkbox checked, run button pressed;location=check_perms_file10.sxw;runmacro=pathlist;pathlist=true;confirm=true;warning=true;dialog=true;checkbox=true;buttonName=Run;checkpath=true;expected=true -_checkPermission;description=Try to get permssion when run macro is set to according to path list, doc not in path, warning dialog, confirm dialog, checkbox not checked, do not run button pressed;location=check_perms_file11.sxw;runmacro=pathlist;pathlist=false;confirm=true;warning=true;dialog=true;checkbox=false;buttonName=Do Not Run;checkpath=true;expected=com.sun.star.security.AccessControlException -_checkPermission;description=Try to get permssion when run macro is set to according to path list, doc not in path, warning dialog, confirm dialog, checkbox checked, do not run button pressed;location=check_perms_file12.sxw;runmacro=pathlist;pathlist=false;confirm=true;warning=true;dialog=true;checkbox=true;buttonName=Do Not Run;checkpath=true;expected=com.sun.star.security.AccessControlException diff --git a/scripting/workben/data/user_scripts.zip b/scripting/workben/data/user_scripts.zip deleted file mode 100644 index f5eed7657365836f98d957a110cc0a0f3f8286af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6890 zcmeHLWmpv4)*To?rInBtkWx}f1x8Yk?i6I`?k;JhL%I==?r!NW0YSP2q*JB78Ie~o z-urxi?{kNT`f=7dXYY0P-fKw+1K|(>(2s(-Iqmm9e*Cx&zye5XnCqEZTF}eN+yDUE z4@Nl=!pAvfZQ%ftNzS(={#nXoVtHjL%B7|HU~BOC`k}D#zpMu;T3lIw>(}+VCZ<~F zAQAXuzky&vPJI3Q`Gdn8L9(y_z%UR1Ap9c;zmch>9i4_D*uvtUON~4Kyp)r)iu52C zCa18TG!HtJ1b-%GJ=JxTx!Y23@Mf*iq`hHg3ue#C(G6LmHB+|y99z9Vgy6n(dD6LU zOm+W`2GNFbFX!P#rOoE)@&3s*mxpqq$SGm`VqXAH}%kLQ=dSBu~qjDkQy$TQzcArM8@3B~=qpOL)_G zJD!4M(m_2a!c(f0XvfRfu6NC zsV(`gYW3sz$_@C{f||Z3W=MD28If0N*S{T9_lIY_TJO7CL^P{piHl{MzNwusS-dKoMfx8RpkhY)$`wwpVR#tdqn;j%F&MS9eQSZcjb z7H*Gxyse{vX@G9jwf`!Vo!71Ka4OtB zBRP*0NUBy7bU*4HIw#_ZmFo&OsYCcFV#!0L!9k;fyJP)SAw6VjcRor!-;_8Ec^e5w zLzH50gp;}c+y;Mzb<&^|K1gogGYFL;oIBUBH^gMIO^v3Gg{xC(l zv&U&0^u{HU5H5e6XiC)`tU^jy(x{U;I)F=~4!=gMuo#0t>u#(hfE-RClY@3$nQ7xo zFlNgaN?1=cIok*_{}Kl?al3fF*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pv3jvAHlBJ!oOYiC+^kKbdC!lA_P|pVmV*L>-%NDAM#>6hZd^8!2a&~ zT!wXn{}b$AC=S^H>H+->$a$iFcSJ4%0!?%~L|qMg*Z+OHzentEdtH^bm-l)A3G4s!YUe`tx0{{k z=Xbey5lCo$gpq#P?T2`TfI;io&t#ux<#*Y50S3)V@E^f0SPBu5|AP8=?t9(((-ALF re{lbAhrL?RFUL6ra-%D8{2rTP6Gg_kgr9E$-apN{qO$(a%egm diff --git a/scripting/workben/data/xscriptcontext_test_document.sxw b/scripting/workben/data/xscriptcontext_test_document.sxw deleted file mode 100644 index da6dafb0b8057194171bddef7cb501a9f5eb18e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6580 zcmb7J2UJs8*9{#)4Mha$0!jxdf&xnKMGz5DAVBC4AfZ>04hn`Qy$v0tNJom&kzS>D zq!*=1`-993s59TJe`O_k$;#d5-t+c8_nsY91vGS0004ju2y?dOSkdMqW zL$8Op**4GYn={An?5Wbn6_)>Q@5@|QGp?#>8_qR#slZ^lYaph)LoC{y#GnISPmuVA zP}l~|3QM(^No4!|$6eVsr@qo{f5k<;y6xPrCK&&e#DQO)mtf+mRbEFkHcOOriD}K= zp&RL70g!w5W~Gx#e>nteR4(d1+UyR#rAoixfa9cGl;?_5M@Dus@`uoS+jDw+l*yBy zFq}2+)GKjdeVCujdA~Q9$zH_YHy)uE)b(B8KDMht0?k3G)iB7;;Z(TC-cS|_HCR4!T^X&atN)z>h2fk7H2Kvw#l+c{yKYDEn7J++_nX&=mZ<29DI0u60H@ z31@iWdy$OCY0rGGt&cfOu6e!lN6p)jjh0Z0h+QdNWKU2eZJ`dP^ z!|zeFH8|dDp7ASjy2x}%O7qemR4)s`r$C43qC302*zW^u!*E@LAA-lL+893AD>igL zYn-4i6(&#NepD4FAK5t06xpx+UL`H=)J4i@piy)8(0S-9(M&A0PhDE$dR)n&6{EJ5 z=OGx2Lc4Wt?ZD@{m}U)U->E8+WZ0rR^QDjI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ne`)jsM^f_AyX@$KPwdF_^sADZR z1qjJ^q*_m#pM*)PbWyt53@(0pC*9RadAy$6vw{4=ZgBBHD>c>H#F0C*E*#ca&OjXA zrB<2kEtKNoI3`fg^@hKbEv0dNt)~txob{WdK(n<&@HqYVxIx!-nIt3UO@t5!$w*?r zY!A#rVhuq(+_EViF1cjoCX`q<6jXDopK%QiLu8N0XyG|GmxS8O3Dsk1&$n z<{fcclrOXzCnrv~QSBL~Ens|>YO=C(1D8o%g+m&>kMkcAv zJQ>qc-<9Cp0K*3`ZT94f8C9`f486G-?946bv$N}9i_g3jdypLZ4FoqH;=#m8;@P2llF5@ks0WSGazd@WY>vwPB zG6WD43Gug6@h=d+yAYQ%V}OLX@Fb8BXP(4GV*bsIxD1hS3F1$00*Q0xP5g@UyDM=S zXX00!-#iK=>{)+w0ehb3-`$D7V9yxDfi(C3TH%lB{Q~3SMh7O-y7-k zaOZ^G!v5dk{-v!(#yV@Oe~tBfYk4`A0`m6!KbLmiX#Ptg&)D{Jt9Ch>DK6lb#tjK` r{`bgVTD;)>&*!VlFo%Rlm`kUvpFl8>8~_0Dkq>fYyXZ%D_UZosJjBlg diff --git a/scripting/workben/ifc/scripting/ScriptingUtils.java b/scripting/workben/ifc/scripting/ScriptingUtils.java deleted file mode 100644 index 03ef3f5ca680..000000000000 --- a/scripting/workben/ifc/scripting/ScriptingUtils.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.scripting; - -import drafts.com.sun.star.script.framework.storage.XScriptStorageManager; - -import com.sun.star.uno.UnoRuntime; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.XInterface; -import com.sun.star.ucb.XSimpleFileAccess; -import com.sun.star.beans.XPropertySet; -import com.sun.star.uno.XComponentContext; - -public class ScriptingUtils { - private XScriptStorageManager storageManager; - private static ScriptingUtils utils; - - private ScriptingUtils() { - } - - public static synchronized ScriptingUtils getDefault() { - if (utils == null) - utils = new ScriptingUtils(); - - return utils; - } - - - - - - public Object getScriptStorage(XMultiServiceFactory xMSF, String location) { - int id = getStorageId(xMSF, location); - return storageManager.getScriptStorage(id); - } - - private int getStorageId(XMultiServiceFactory xMSF, String location) { - - if (location.equals("share")) - return 0; - - if (location.equals("user")) - return 1; - - XSimpleFileAccess access = null; - String uri = util.utils.getFullTestURL(location); - - if (storageManager == null) { - try { - XPropertySet xProp = UnoRuntime.queryInterface( - XPropertySet.class, xMSF); - - XComponentContext xContext = UnoRuntime.queryInterface(XComponentContext.class, - xProp.getPropertyValue("DefaultContext")); - - XInterface ifc = (XInterface) - xContext.getValueByName("/singletons/drafts.com.sun.star." + - "script.framework.storage.theScriptStorageManager"); - - storageManager = UnoRuntime.queryInterface(XScriptStorageManager.class, ifc); - } catch (Exception e) { - return -1; - } - } - - access = getXSimpleFileAccess(xMSF); - - if (access == null) - return -1; - - int id = storageManager.createScriptStorageWithURI(access, uri); - - return id; - } - - private XSimpleFileAccess getXSimpleFileAccess(XMultiServiceFactory xMSF) { - XSimpleFileAccess access = null; - - try { - Object fa = - xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - - access = UnoRuntime.queryInterface(XSimpleFileAccess.class, fa); - } catch (com.sun.star.uno.Exception e) { - return null; - } - - return access; - } -} diff --git a/scripting/workben/ifc/scripting/SecurityDialogUtil.java b/scripting/workben/ifc/scripting/SecurityDialogUtil.java deleted file mode 100644 index 349b70bfa24f..000000000000 --- a/scripting/workben/ifc/scripting/SecurityDialogUtil.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package ifc.scripting; - -import com.sun.star.awt.*; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; - -import com.sun.star.accessibility.*; -import com.sun.star.awt.XExtendedToolkit; - -// Jsuite classes -import util.AccessibilityTools; -/** -* Thread that pushes the buttons or checkbox -* on the message box that is on top. -*/ -public class SecurityDialogUtil extends Thread { - - private XMultiServiceFactory xMSF = null; - private String errorMsg; - private String btnName; - private boolean checkBox; - - /** - * Constructor. - */ - public SecurityDialogUtil(XMultiServiceFactory xMSF, String btnName, - boolean checkBox) { - this.xMSF = xMSF; - this.btnName = btnName; - this.checkBox = checkBox; - this.errorMsg = ""; - } - - /** - * Returns the error message that occurred while - * accessing and pressing the button. - * @return Error message. - */ - public String getErrorMessage() { - return errorMsg; - } - - - - /** - * Press the named button in the currently visible dialog box. - */ - @Override - public void run() { - // wait for the message box to appear - try { - Thread.sleep(4000) ; - } catch (InterruptedException e) { - System.err.println("While waiting :" + e.getMessage()) ; - } - - // access the message box - - XAccessibleContext xCon = null; - - try { - XInterface x = (XInterface) xMSF.createInstance( - "com.sun.star.awt.Toolkit") ; - XExtendedToolkit tk = - UnoRuntime.queryInterface( - XExtendedToolkit.class, x); - new AccessibilityTools(); - XWindow xWindow = UnoRuntime.queryInterface( - XWindow.class, tk.getActiveTopWindow()); - XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow); - xCon = xRoot.getAccessibleContext(); - } catch (Exception e) { - errorMsg = "Exception while using Accessibility\n" + - e.getMessage(); - return; - } - - // get the button - XInterface oObj = null; - - try { - int count = xCon.getAccessibleChildCount(); - - for (int i = 0; i < count; i++) { - XAccessible xAcc = xCon.getAccessibleChild(i); - String name = - xAcc.getAccessibleContext().getAccessibleName(); - - // check for button - if (name.equals(btnName) && (UnoRuntime.queryInterface( - XButton.class, xAcc) != null)) { - oObj = xAcc.getAccessibleContext(); - } - - // check for checkbox - if (checkBox && (UnoRuntime.queryInterface(XCheckBox.class, xAcc) != null)) { - // want to do this action now - // probably equates to toggle cb - XAccessibleAction xAction = - UnoRuntime.queryInterface( - XAccessibleAction.class, xAcc.getAccessibleContext()); - xAction.doAccessibleAction(0); - - // might be worth using oObj2 to double check the new state?? - } - } - - if (oObj == null) { - errorMsg = "No button has been found:\n" + - "No action is triggered."; - return; - } - - // press button - XAccessibleAction xAction = - UnoRuntime.queryInterface( - XAccessibleAction.class, oObj); - xAction.doAccessibleAction(0); - } catch (com.sun.star.lang.IndexOutOfBoundsException e) { - errorMsg = "Exception\n" + - e.getMessage(); - } - } - -} - - - - diff --git a/scripting/workben/ifc/scripting/_XFunction.java b/scripting/workben/ifc/scripting/_XFunction.java deleted file mode 100644 index 31c1742b2d8b..000000000000 --- a/scripting/workben/ifc/scripting/_XFunction.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.scripting; - -import drafts.com.sun.star.script.framework.provider.XFunction; -import drafts.com.sun.star.script.framework.provider.XFunctionProvider; - -import lib.MultiMethodTest; -import lib.StatusException; -import lib.Parameters; - -import java.util.Collection; -import java.util.Iterator; - -public class _XFunction extends MultiMethodTest { - - public XFunction oObj = null; - public XFunctionProvider oProvider = null; - - /** - * Retrieves object relation. - */ - @Override - public void before() throws StatusException { - log.println("getting provider"); - oProvider = (XFunctionProvider) tEnv.getObjRelation("provider"); - - if (oProvider == null) - log.println("it's null"); - else - log.println("it's not null"); - } - - public void _invoke() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_invoke"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - result &= runInvokeTest((Parameters)tests.next()); - } - } else { - result = false; - } - - tRes.tested("invoke()", result); - } - - private boolean runInvokeTest(Parameters testdata) { - String description = testdata.get("description"); - String logicalname = testdata.get("logicalname"); - - String expreturntype = testdata.get("returntype"); - String expreturnvalue = testdata.get("returnvalue"); - String gotreturntype = "null"; - String gotreturnvalue = "null"; - - String location = testdata.get("location"); - - String expected = testdata.get("expected"); - String output = ""; - boolean result = true; - - log.println(testdata.get("description")); - - try { - Object[] aParams = new Object[0]; - short[][] aOutParamIndex = new short[1][]; - aOutParamIndex[0] = new short[0]; - Object[][] aOutParam = new Object[1][]; - aOutParam[0] = new Object[0]; - - XFunction func = oProvider.getFunction(logicalname); - - if (func == null) { - log.println("Couldn't get XFunction for:" + logicalname); - return false; - } - - Object ret = func.invoke(aParams, aOutParamIndex, aOutParam); - - if (ret != null) { - gotreturntype = ret.getClass().getName(); - gotreturnvalue = ret.toString(); - } - - output = "success"; - } catch (com.sun.star.lang.IllegalArgumentException iae) { - log.println("Couldn't invoke script:" + iae); - output = "com.sun.star.lang.IllegalArgumentException"; - } catch (com.sun.star.script.CannotConvertException cce) { - log.println("Couldn't invoke script:" + cce); - output = "com.sun.star.script.CannotConvertException"; - } catch (com.sun.star.reflection.InvocationTargetException ite) { - log.println("Couldn't invoke script:" + ite); - output = "com.sun.star.reflection.InvocationTargetException"; - } catch (com.sun.star.uno.RuntimeException re) { - log.println("Couldn't invoke script:" + re); - output = "com.sun.star.uno.RuntimeException"; - } catch (java.lang.Exception e) { - log.println("Couldn't invoke script:" + e); - output = "java.lang.Exception"; - } - - if (expreturntype != null) { - log.println("expected return type: " + expreturntype + - ", got return type: " + gotreturntype); - - if (!gotreturntype.equals(expreturntype)) - result = false; - } - - if (expreturnvalue != null) { - log.println("expected return value: " + expreturnvalue + - ", got return value: " + gotreturnvalue); - - if (!gotreturnvalue.equals(expreturnvalue)) - result = false; - } - - log.println("expected: " + expected + ", output: " + output); - - if (!output.equals(expected)) - result = false; - - return result; - } -} diff --git a/scripting/workben/ifc/scripting/_XFunctionProvider.java b/scripting/workben/ifc/scripting/_XFunctionProvider.java deleted file mode 100644 index a8bfbca6b687..000000000000 --- a/scripting/workben/ifc/scripting/_XFunctionProvider.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.scripting; - -import drafts.com.sun.star.script.framework.provider.XFunctionProvider; -import drafts.com.sun.star.script.framework.provider.XFunction; - -import lib.MultiMethodTest; -import lib.StatusException; -import lib.Parameters; - -import java.util.Collection; -import java.util.Iterator; - -public class _XFunctionProvider extends MultiMethodTest { - - public XFunctionProvider oObj = null; - - /** - * Retrieves object relation. - */ - @Override - public void before() throws StatusException { - } - - public void _getFunction() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_getFunction"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - result &= runGetFunctionTest((Parameters)tests.next()); - } - } else { - result = false; - } - - tRes.tested("getFunction()", result); - } - - private boolean runGetFunctionTest(Parameters testdata) { - String description = testdata.get("description"); - String logicalname = testdata.get("logicalname"); - String expected = testdata.get("expected"); - String output = ""; - - log.println(testdata.get("description")); - - XFunction function = oObj.getFunction(logicalname); - - if (function == null) - output = "null"; - else - output = "XFunction.class"; - - log.println("expected: " + expected + ", output: " + output); - return (output.equals(expected)); - } -} diff --git a/scripting/workben/ifc/scripting/_XScriptInfo.java b/scripting/workben/ifc/scripting/_XScriptInfo.java deleted file mode 100644 index 8e1cff6bf5ea..000000000000 --- a/scripting/workben/ifc/scripting/_XScriptInfo.java +++ /dev/null @@ -1,308 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.scripting; - -import drafts.com.sun.star.script.framework.storage.XScriptInfo; - -import com.sun.star.beans.XPropertySet; - -import java.util.Collection; -import java.util.Iterator; - -import lib.Parameters; -import lib.MultiMethodTest; -import lib.StatusException; - -public class _XScriptInfo extends MultiMethodTest { - - public XScriptInfo oObj = null; - - /** - * Retrieves object relation. - */ - @Override - public void before() throws StatusException { - } - - public void _getLogicalName() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_getLogicalName"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - Parameters testdata = (Parameters)tests.next(); - String expected = testdata.get("expected"); - String output = ""; - - log.println(testdata.get("description")); - - output = oObj.getLogicalName(); - - log.println("expected: " + expected + ", output: " + output); - result &= output.equals(expected); - } - } else { - result = false; - } - - tRes.tested("getLogicalName()", result); - } - - public void _getParcelURI() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_getParcelURI"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - Parameters testdata = (Parameters)tests.next(); - String expected = testdata.get("expected"); - String output = ""; - - log.println(testdata.get("description")); - - output = oObj.getParcelURI(); - - log.println("expected: " + expected + ", output: " + output); - result &= output.endsWith(expected); - } - } else { - result = false; - } - - tRes.tested("getParcelURI()", result); - } - - public void _getLanguage() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_getLanguage"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - Parameters testdata = (Parameters)tests.next(); - String expected = testdata.get("expected"); - String output = ""; - - log.println(testdata.get("description")); - - output = oObj.getLanguage(); - - log.println("expected: " + expected + ", output: " + output); - result &= output.equals(expected); - } - } else { - result = false; - } - - tRes.tested("getLanguage()", result); - } - - public void _getFunctionName() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_getFunctionName"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - Parameters testdata = (Parameters)tests.next(); - String expected = testdata.get("expected"); - String output = ""; - - log.println(testdata.get("description")); - - output = oObj.getFunctionName(); - - log.println("expected: " + expected + ", output: " + output); - result &= output.equals(expected); - } - } else { - result = false; - } - - tRes.tested("getFunctionName()", result); - } - - public void _getLanguageProperties() { - - Collection c = - (Collection) tEnv.getObjRelation("_getLanguageProperties"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - Parameters testdata = (Parameters)tests.next(); - String expected = testdata.get("expected"); - String output = ""; - - log.println(testdata.get("description")); - - try { - XPropertySet langProps = oObj.getLanguageProperties(); - output = (String)langProps.getPropertyValue("classpath"); - - if (output == null) - output = "null"; - } catch (com.sun.star.uno.Exception e) { - log.println("caught UNO Exception:" + e); - output = "com.sun.star.uno.Exception"; - } - - log.println("expected: " + expected + ", output: " + output); - } - } - - tRes.tested("getLanguageProperties()", true); - } - - public void _getFileSetNames() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_getFileSetNames"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - Parameters testdata = (Parameters)tests.next(); - String expected = testdata.get("expected"); - String output = ""; - - log.println(testdata.get("description")); - - String[] fileSets = oObj.getFileSetNames(); - - if (fileSets == null) - output = "null"; - else if (fileSets.length != 1) - output = "WrongNumberOfFileSets"; - else - output = fileSets[0]; - - log.println("expected: " + expected + ", output: " + output); - result &= output.equals(expected); - } - } else { - result = false; - } - - tRes.tested("getFileSetNames()", result); - } - - public void _getFilesInFileSet() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_getFilesInFileSet"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - Parameters testdata = (Parameters)tests.next(); - String expected = testdata.get("expected"); - String output = ""; - - log.println(testdata.get("description")); - - String[] filesInFileSet = - oObj.getFilesInFileSet(oObj.getFileSetNames()[0]); - - if (filesInFileSet == null) - output = "null"; - else if (filesInFileSet.length != 1) - output = "WrongNumberOfFilesInFileSet"; - else - output = filesInFileSet[0]; - - log.println("expected: " + expected + ", output: " + output); - result &= output.equals(expected); - } - } else { - result = false; - } - - tRes.tested("getFilesInFileSet()", result); - } - - public void _getDescription() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_getDescription"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - Parameters testdata = (Parameters)tests.next(); - String expected = testdata.get("expected"); - String output = ""; - - log.println(testdata.get("description")); - - output = oObj.getDescription(); - - if (output == null) - output = "null"; - else if (output.length() == 0) - output = "empty"; - - log.println("expected: [" + expected + "], output: [" + - output + "]"); - result &= output.equals(expected); - } - } else { - result = false; - } - - tRes.tested("getDescription()", result); - } -} diff --git a/scripting/workben/ifc/scripting/_XScriptInfoAccess.java b/scripting/workben/ifc/scripting/_XScriptInfoAccess.java deleted file mode 100644 index bf2095635fdb..000000000000 --- a/scripting/workben/ifc/scripting/_XScriptInfoAccess.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.scripting; - -import drafts.com.sun.star.script.framework.storage.XScriptInfoAccess; -import drafts.com.sun.star.script.framework.storage.XScriptInfo; - -import com.sun.star.uno.UnoRuntime; -import lib.MultiMethodTest; -import lib.StatusException; -import lib.Parameters; - -import java.util.Collection; -import java.util.Iterator; - -public class _XScriptInfoAccess extends MultiMethodTest { - - public XScriptInfoAccess oObj = null; - - /** - * Retrieves object relation. - */ - @Override - public void before() throws StatusException { - } - - public void _getScriptLogicalNames() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_getScriptLogicalNames"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - result &= runGetScriptLogicalNamesTest((Parameters)tests.next()); - } - } else { - result = false; - } - - tRes.tested("getScriptLogicalNames()", result); - } - - private boolean runGetScriptLogicalNamesTest(Parameters testdata) { - String description = testdata.get("description"); - String expected = testdata.get("expected"); - String output = ""; - - log.println(testdata.get("description")); - - log.println("In _XScriptInfoAccess.getScriptLogicalNames()"); - String[] logicalNames = oObj.getScriptLogicalNames(); - - if (logicalNames == null) - output = "null"; - else if (logicalNames.length == 0) - output = "empty"; - else { - for (int i = 0; i < logicalNames.length; i++) { - if (logicalNames[i].equals(expected)) { - output = logicalNames[i]; - break; - } - } - } - - log.println("expected: " + expected + ", output: " + output); - return (output.equals(expected)); - } - - public void _getImplementations() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_getImplementations"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - result &= runGetImplementationsTest((Parameters)tests.next()); - } - } else { - result = false; - } - - tRes.tested("getImplementations()", result); - } - - private boolean runGetImplementationsTest(Parameters testdata) { - String description = testdata.get("description"); - String logicalname = testdata.get("logicalname"); - String expected = testdata.get("expected"); - String output = ""; - - log.println(testdata.get("description")); - - // performs a basic check to see if 1 match (XScriptInfo) is returned - // the XScriptInfo object is tested more completely in _XScriptInfo - // which is drive from ScriptInfo - - try { - XScriptInfo[] impls = oObj.getImplementations(logicalname); - - // should only be one match - if (impls == null) - output = "null"; - else if (impls.length == 0) - output = "empty"; - else - output = impls[0].getLogicalName(); - } catch (com.sun.star.uno.Exception e) { - log.println("Caught UNO Exception:" + e); - output = "com.sun.star.uno.Exception"; - } - - log.println("expected: " + expected + ", output: " + output); - return (output.equals(expected)); - } - - public void _getAllImplementations() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_getAllImplementations"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - result &= runGetAllImplementationsTest((Parameters)tests.next()); - } - } else { - result = false; - } - - tRes.tested("getAllImplementations()", result); - } - - private boolean runGetAllImplementationsTest(Parameters testdata) { - String description = testdata.get("description"); - String location = testdata.get("location"); - String expected = testdata.get("expected"); - String output = ""; - - log.println(testdata.get("description")); - - Object obj = ScriptingUtils.getDefault().getScriptStorage( - tParam.getMSF(), location); - - XScriptInfoAccess access = UnoRuntime.queryInterface(XScriptInfoAccess.class, - obj); - - XScriptInfo[] impls = access.getAllImplementations(); - - if (impls == null || impls.length == 0) { - output = "empty"; - } else { - for (int i = 0; i < impls.length - 1; i++) - output += impls[i].getLogicalName() + ","; - - output += impls[impls.length - 1].getLogicalName(); - } - - log.println("expected: " + expected + ", output: " + output); - return (output.equals(expected)); - } -} diff --git a/scripting/workben/ifc/scripting/_XScriptInvocation.java b/scripting/workben/ifc/scripting/_XScriptInvocation.java deleted file mode 100644 index 06c76e75ba06..000000000000 --- a/scripting/workben/ifc/scripting/_XScriptInvocation.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.scripting; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Collection; - -import drafts.com.sun.star.script.framework.runtime.XScriptInvocation; -import drafts.com.sun.star.script.framework.storage.XScriptStorageManager; - -import com.sun.star.ucb.XSimpleFileAccess; -import com.sun.star.beans.XPropertySet; -import com.sun.star.uno.XComponentContext; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import com.sun.star.frame.XModel; - -import lib.MultiMethodTest; -import lib.StatusException; -import lib.Parameters; -import util.SOfficeFactory; - -public class _XScriptInvocation extends MultiMethodTest { - - public XScriptInvocation oObj = null; - private XScriptStorageManager storageManager = null; - - /** - * Retrieves object relation. - */ - @Override - public void before() throws StatusException { - } - - @Override - public void after() throws StatusException { - } - - public void _invoke() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_invoke"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - result &= runInvokeTest((Parameters)tests.next()); - } - } else { - result = false; - } - - tRes.tested("invoke()", result); - } - - private boolean runInvokeTest(Parameters testdata) { - String description = testdata.get("description"); - String logicalname = testdata.get("logicalname"); - String context = testdata.get("context"); - String location = testdata.get("location"); - String expected = testdata.get("expected"); - String output = ""; - - int storageId = getStorageId(location); - - XModel ctx = null; - - if (!context.equals("null")) - ctx = loadDocument(context); - - HashMap map = new HashMap(); - map.put("SCRIPTING_DOC_STORAGE_ID", Integer.valueOf(storageId)); - map.put("SCRIPTING_DOC_URI", "hahaha"); - - if (ctx != null) - map.put("SCRIPTING_DOC_REF", ctx); - - Parameters params = new Parameters(map); - Object[] args = new Object[0]; - - Object[][] result = new Object[1][0]; - result[0] = new Object[0]; - - short[][] num = new short[1][0]; - num[0] = new short[0]; - - log.println(description + ": " + logicalname); - - try { - Object ret = oObj.invoke(logicalname, params, args, num, result); - log.println("return type is: " + ret.getClass().getName() + - ", value is: " + ret.toString()); - output = "success"; - } catch (com.sun.star.lang.IllegalArgumentException iae) { - log.println("Couldn't invoke script:" + iae); - output = "com.sun.star.lang.IllegalArgumentException"; - } catch (com.sun.star.script.CannotConvertException cce) { - log.println("Couldn't invoke script:" + cce); - output = "com.sun.star.script.CannotConvertException"; - } catch (com.sun.star.reflection.InvocationTargetException ite) { - log.println("Couldn't invoke script:" + ite); - output = "com.sun.star.reflection.InvocationTargetException"; - } catch (com.sun.star.uno.RuntimeException re) { - log.println("Couldn't invoke script:" + re); - output = "com.sun.star.uno.RuntimeException"; - } - - if (ctx != null) - ctx.dispose(); - - log.println("expected: " + expected + ", output: " + output); - return (output.equals(expected)); - } - - private int getStorageId(String location) { - - if (location.equals("share")) - return 0; - - if (location.equals("user")) - return 1; - - XSimpleFileAccess access = null; - String uri = util.utils.getFullTestURL(location); - - if (storageManager == null) { - try { - XPropertySet xProp = UnoRuntime.queryInterface( - XPropertySet.class, tParam.getMSF()); - - XComponentContext xContext = UnoRuntime.queryInterface(XComponentContext.class, - xProp.getPropertyValue("DefaultContext")); - - XInterface ifc = (XInterface) - xContext.getValueByName("/singletons/drafts.com.sun.star." + - "script.framework.storage.theScriptStorageManager"); - - storageManager = UnoRuntime.queryInterface(XScriptStorageManager.class, ifc); - } catch (Exception e) { - return -1; - } - } - - access = getXSimpleFileAccess(); - - if (access == null) - return -1; - - int id = storageManager.createScriptStorageWithURI(access, uri); - - return id; - } - - private XSimpleFileAccess getXSimpleFileAccess() { - XSimpleFileAccess access = null; - - try { - Object fa = tParam.getMSF().createInstance( - "com.sun.star.ucb.SimpleFileAccess"); - - access = UnoRuntime.queryInterface(XSimpleFileAccess.class, fa); - } catch (com.sun.star.uno.Exception e) { - return null; - } - - return access; - } - - private XModel loadDocument(String name) { - XModel model = null; - SOfficeFactory factory = SOfficeFactory.getFactory(tParam.getMSF()); - - String fullname = util.utils.getFullTestURL(name); - - try { - Object obj = factory.loadDocument(fullname); - model = UnoRuntime.queryInterface(XModel.class, obj); - } catch (com.sun.star.lang.IllegalArgumentException iae) { - return null; - } catch (Exception e) { - return null; - } - - try { - Thread.sleep(5000); - } catch (InterruptedException ie) { - } - - return model; - } -} diff --git a/scripting/workben/ifc/scripting/_XScriptNameResolver.java b/scripting/workben/ifc/scripting/_XScriptNameResolver.java deleted file mode 100644 index 851ed9c936e5..000000000000 --- a/scripting/workben/ifc/scripting/_XScriptNameResolver.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.scripting; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Collection; - -import drafts.com.sun.star.script.framework.runtime.XScriptNameResolver; -import drafts.com.sun.star.script.framework.storage.XScriptInfo; -import drafts.com.sun.star.script.framework.storage.XScriptStorageManager; - -import com.sun.star.ucb.XSimpleFileAccess; -import com.sun.star.beans.XPropertySet; -import com.sun.star.uno.XComponentContext; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; - -import lib.MultiMethodTest; -import lib.StatusException; -import lib.Parameters; - -public class _XScriptNameResolver extends MultiMethodTest { - - public XScriptNameResolver oObj = null; - private XScriptStorageManager storageManager = null; - - /** - * Retrieves object relation. - */ - @Override - public void before() throws StatusException { - } - - public void _resolve() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_resolve"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - result &= runResolveTest((Parameters)tests.next()); - } - } else { - result = false; - } - - tRes.tested("resolve()", result); - } - - private boolean runResolveTest(Parameters data) { - String description = data.get("description"); - String location = data.get("location"); - String logicalname = data.get("logicalname"); - String expected = data.get("expected"); - String output = ""; - - int storageId = getStorageId(location); - - log.println(description + ": " + logicalname); - - HashMap map = new HashMap(); - map.put("SCRIPTING_DOC_STORAGE_ID", Integer.valueOf(storageId)); - map.put("SCRIPTING_DOC_URI", util.utils.getFullTestURL(location)); - - Parameters params = new Parameters(map); - Object[] args = new Object[] {params}; - - try { - XInterface ifc = (XInterface) oObj.resolve(logicalname, args); - - if (ifc == null) - output = "null"; - else if (UnoRuntime.queryInterface(XScriptInfo.class, ifc) == null) - output = "null"; - else - output = "XScriptInfo.class"; - } catch (com.sun.star.lang.IllegalArgumentException iae) { - log.println("caught IllegalArgumentException: " + iae); - output = "com.sun.star.lang.IllegalArgumentException"; - } catch (com.sun.star.script.CannotConvertException cce) { - log.println("caught CannotConvertException: " + cce); - output = "com.sun.star.script.CannotConvertException"; - } catch (com.sun.star.uno.RuntimeException re) { - log.println("caught RuntimeException: " + re); - output = "com.sun.star.uno.RuntimeException"; - } - - log.println("expected: " + expected + ", output: " + output); - return (output.equals(expected)); - } - - private int getStorageId(String location) { - - if (location.equals("share")) - return 0; - - if (location.equals("user")) - return 1; - - XSimpleFileAccess access = null; - String uri = util.utils.getFullTestURL(location); - - if (storageManager == null) { - try { - XPropertySet xProp = UnoRuntime.queryInterface( - XPropertySet.class, tParam.getMSF()); - - XComponentContext xContext = UnoRuntime.queryInterface(XComponentContext.class, - xProp.getPropertyValue("DefaultContext")); - - XInterface ifc = (XInterface) - xContext.getValueByName("/singletons/drafts.com.sun.star." + - "script.framework.storage.theScriptStorageManager"); - - storageManager = UnoRuntime.queryInterface(XScriptStorageManager.class, ifc); - } catch (Exception e) { - return -1; - } - } - - access = getXSimpleFileAccess(); - - if (access == null) - return -1; - - int id = storageManager.createScriptStorageWithURI(access, uri); - - return id; - } - - private XSimpleFileAccess getXSimpleFileAccess() { - XSimpleFileAccess access = null; - - try { - Object fa = tParam.getMSF().createInstance( - "com.sun.star.ucb.SimpleFileAccess"); - - access = UnoRuntime.queryInterface(XSimpleFileAccess.class, fa); - } catch (com.sun.star.uno.Exception e) { - return null; - } - - return access; - } -} diff --git a/scripting/workben/ifc/scripting/_XScriptSecurity.java b/scripting/workben/ifc/scripting/_XScriptSecurity.java deleted file mode 100644 index f06d4288a6c4..000000000000 --- a/scripting/workben/ifc/scripting/_XScriptSecurity.java +++ /dev/null @@ -1,353 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.scripting; - -import java.util.Iterator; -import java.util.Collection; - -import drafts.com.sun.star.script.framework.security.XScriptSecurity; -import drafts.com.sun.star.script.framework.storage.XScriptStorageManager; - -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.ucb.XSimpleFileAccess; -import com.sun.star.beans.XPropertySet; -import com.sun.star.beans.PropertyValue; -import com.sun.star.uno.XComponentContext; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import com.sun.star.container.XNameReplace; -import com.sun.star.util.XChangesBatch; -import lib.MultiMethodTest; -import lib.StatusException; -import lib.Parameters; - -public class _XScriptSecurity extends MultiMethodTest { - - public XScriptSecurity oObj = null; - private XScriptStorageManager storageManager = null; - - /** - * Retrieves object relation. - */ - @Override - public void before() throws StatusException { - } - - @Override - public void after() throws StatusException { - } - - public void _checkPermission() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_checkPermission"); - - Iterator tests; - - if (c != null) { - tests = c.iterator(); - - while (tests.hasNext()) { - result &= runCheckPermissionTest((Parameters)tests.next()); - } - } else { - result = false; - } - - // set security to always without confirmation dialog and empty path - // list so other tests can run without dialog popping up - setSecurity(2, "false", "false", null); - - tRes.tested("checkPermission()", result); - } - - private boolean runCheckPermissionTest(Parameters testdata) { - // description of test - String description = testdata.get("description"); - - // document location - String location = testdata.get("location"); - - //security settings - String runmacro = testdata.get("runmacro"); - String confirm = testdata.get("confirm"); - String warning = testdata.get("warning"); - String pathlist = testdata.get("pathlist"); - - //do this test produce a dialog? - String dialog = testdata.get("dialog"); - //is checkbox to be ticked? - String checkBoxStr = testdata.get("checkbox"); - //name of button in dialog to press - String buttonName = testdata.get("buttonName"); - - //expected result - String expected = testdata.get("expected"); - //do we need to check the pathlist? - String checkpath = testdata.get("checkpath"); - - String output = null; - - log.println(description); - - // get the officeBasic setting - int officeBasic = 0; - - if (runmacro.equals("never")) { - officeBasic = 0; - } else if (runmacro.equals("pathlist")) { - officeBasic = 1; - } else if (runmacro.equals("always")) { - officeBasic = 2; - } - - // should pathlist include doc? - String secureURLs = null; - - if (pathlist.equals("true")) { - String uri = util.utils.getFullTestURL(location); - secureURLs = uri.substring(0, uri.lastIndexOf('/')); - } - - if (!setSecurity(officeBasic, confirm, warning, secureURLs)) { - log.println("failed to set security"); - return false; - } - - if (dialog.equals("true")) { - // is the checkbox to be ticked? - boolean checkBox = false; - - if (checkBoxStr.equals("true")) { - checkBox = true; - } - - new SecurityDialogUtil(tParam.getMSF(), buttonName, checkBox).start(); - } - - // need to set up dialog utils thread first - int storageId = getStorageId(location); - - try { - String uri = util.utils.getFullTestURL(location); - oObj.checkPermission(uri, "execute"); - output = "true"; - } catch (com.sun.star.security.AccessControlException ace) { - log.println("Couldn't invoke script:" + ace); - output = "com.sun.star.security.AccessControlException"; - } catch (com.sun.star.lang.IllegalArgumentException iae) { - log.println("Couldn't invoke script:" + iae); - output = "com.sun.star.lang.IllegalArgumentException"; - } catch (com.sun.star.uno.RuntimeException re) { - log.println("Couldn't invoke script:" + re); - output = "com.sun.star.uno.RuntimeException"; - } - - log.println("expected: " + expected + ", output: " + output); - - if (output.equals(expected)) { - if (checkpath.equals("true")) { - String setPath = getPathList(); - String expectedPath = "empty"; - - if (checkBoxStr.equals("true")) { - String uri = util.utils.getFullTestURL(location); - expectedPath = uri.substring(0, uri.lastIndexOf('/')); - } - - log.println("pathlist: expected: " + expectedPath + ", output: " + setPath); - return setPath.equals(expectedPath); - } - - return true; - } else - return false; - } - - private String getPathList() { - String result = ""; - - try { - Object oProv = tParam.getMSF().createInstance( - "com.sun.star.configuration.ConfigurationProvider"); - - XMultiServiceFactory xProv = UnoRuntime.queryInterface( - XMultiServiceFactory.class, oProv); - - //the path to the security settings in the registry - PropertyValue aPathArg = new PropertyValue(); - aPathArg.Name = "nodepath"; - aPathArg.Value = "org.openoffice.Office.Common/Security/Scripting"; - // we don't want to cache the write - PropertyValue aModeArg = new PropertyValue(); - aModeArg.Name = "lazywrite"; - aModeArg.Value = Boolean.FALSE; - - Object[] aArgs = new Object[2]; - aArgs[0] = aPathArg; - aArgs[1] = aModeArg; - Object oConfigUpdate = xProv.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", - aArgs); - XPropertySet xPropertySet = UnoRuntime.queryInterface( - XPropertySet.class, oConfigUpdate); - - String[] paths = (String[])xPropertySet.getPropertyValue("SecureURL"); - - if (paths == null || paths.length == 0) - result = "empty"; - else - result = paths[0]; - - } catch (Exception e) { - result = e.getClass().getName() + " getting list of secure URLs"; - } - - return result; - } - - private boolean setSecurity(int officeBasic, String confirm, - String warning, String secureURLs) { - boolean success = false; - - try { - Object oProv = tParam.getMSF().createInstance( - "com.sun.star.configuration.ConfigurationProvider"); - - XMultiServiceFactory xProv = UnoRuntime.queryInterface( - XMultiServiceFactory.class, oProv); - - //the path to the security settings in the registry - PropertyValue aPathArg = new PropertyValue(); - aPathArg.Name = "nodepath"; - aPathArg.Value = "org.openoffice.Office.Common/Security/Scripting"; - // we don't want to cache the write - PropertyValue aModeArg = new PropertyValue(); - aModeArg.Name = "lazywrite"; - aModeArg.Value = Boolean.FALSE; - - Object[] aArgs = new Object[2]; - aArgs[0] = aPathArg; - aArgs[1] = aModeArg; - Object oConfigUpdate = xProv.createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", - aArgs); - XNameReplace xNameReplace = UnoRuntime.queryInterface( - XNameReplace.class, oConfigUpdate); - XChangesBatch xChangesBatch = UnoRuntime.queryInterface( - XChangesBatch.class, oConfigUpdate); - - Object[] aSecureURLs; - - if (secureURLs == null) { - aSecureURLs = new Object[0]; - } else { - aSecureURLs = new Object[1]; - aSecureURLs[0] = secureURLs; - } - - log.println("setting SecureURL"); - xNameReplace.replaceByName("SecureURL", aSecureURLs); - - log.println("setting OfficeBasic"); - xNameReplace.replaceByName("OfficeBasic", Integer.valueOf(officeBasic)); - - Boolean bConfirm = null; - - if ((confirm != null) && (confirm.equals("true"))) { - bConfirm = Boolean.TRUE; - } else { - bConfirm = Boolean.FALSE; - } - - log.println("setting Confirmation"); - xNameReplace.replaceByName("Confirmation", bConfirm); - - Boolean bWarning = null; - - if ((warning != null) && (warning.equals("true"))) { - bWarning = Boolean.TRUE; - } else { - bWarning = Boolean.FALSE; - } - - log.println("setting Warning"); - xNameReplace.replaceByName("Warning", bWarning); - - // and now commit the changes - xChangesBatch.commitChanges(); - success = true; - } catch (Exception e) { - log.println("Error updating security settings: " + - e.getMessage()); - } - - return success; - } - - private int getStorageId(String location) { - - XSimpleFileAccess access = null; - String uri = util.utils.getFullTestURL(location); - - if (storageManager == null) { - try { - XPropertySet xProp = UnoRuntime.queryInterface( - XPropertySet.class, tParam.getMSF()); - - XComponentContext xContext = UnoRuntime.queryInterface(XComponentContext.class, - xProp.getPropertyValue("DefaultContext")); - - XInterface ifc = (XInterface) - xContext.getValueByName("/singletons/drafts.com.sun.star." + - "script.framework.storage.theScriptStorageManager"); - - storageManager = UnoRuntime.queryInterface(XScriptStorageManager.class, ifc); - } catch (Exception e) { - return -1; - } - } - - access = getXSimpleFileAccess(); - - if (access == null) - return -1; - - int id = storageManager.createScriptStorageWithURI(access, uri); - - return id; - } - - private XSimpleFileAccess getXSimpleFileAccess() { - XSimpleFileAccess access = null; - - try { - Object fa = tParam.getMSF().createInstance( - "com.sun.star.ucb.SimpleFileAccess"); - - access = UnoRuntime.queryInterface(XSimpleFileAccess.class, fa); - } catch (com.sun.star.uno.Exception e) { - return null; - } - - return access; - } - -} diff --git a/scripting/workben/ifc/scripting/_XScriptStorageManager.java b/scripting/workben/ifc/scripting/_XScriptStorageManager.java deleted file mode 100644 index 0e300317cb60..000000000000 --- a/scripting/workben/ifc/scripting/_XScriptStorageManager.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.scripting; - -import drafts.com.sun.star.script.framework.storage.XScriptStorageManager; -import drafts.com.sun.star.script.framework.storage.XScriptInfoAccess; - -import java.util.Iterator; -import java.util.Collection; - -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import com.sun.star.ucb.XSimpleFileAccess; -import lib.MultiMethodTest; -import lib.StatusException; -import lib.Parameters; - -public class _XScriptStorageManager extends MultiMethodTest { - - public XScriptStorageManager oObj = null; - - /** - * Retrieves object relation. - */ - @Override - public void before() throws StatusException { - } - - public void _createScriptStorage() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_createScriptStorage"); - - if (c == null) { - tRes.tested("createScriptStorage()", false); - return; - } - - Iterator tests = c.iterator(); - - while (tests.hasNext()) { - Parameters testdata = (Parameters)tests.next(); - String expected = testdata.get("expected"); - String output = ""; - - log.println(testdata.get("description")); - - XSimpleFileAccess access = getXSimpleFileAccess(); - - if (access == null) { - output = "Couldn't create XSimpleFileAccess"; - } else { - try { - int id = oObj.createScriptStorage(access); - output = "success"; - } catch (com.sun.star.uno.RuntimeException re) { - log.println("Exception from createScriptStorage: " + re); - output = "com.sun.star.uno.RuntimeException"; - } - } - - log.println("expected: " + expected + ", output: " + output); - result &= output.equals(expected); - } - - tRes.tested("createScriptStorage()", result); - } - - public void _createScriptStorageWithURI() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_createScriptStorageWithURI"); - - if (c == null) { - tRes.tested("createScriptStorageWithURI()", false); - return; - } - - Iterator tests = c.iterator(); - - while (tests.hasNext()) { - Parameters testdata = (Parameters)tests.next(); - String expected = testdata.get("expected"); - String location = testdata.get("location"); - String output = ""; - - log.println(testdata.get("description")); - - String uri = util.utils.getFullTestURL(location); - XSimpleFileAccess access = getXSimpleFileAccess(); - - try { - int id = oObj.createScriptStorageWithURI(access, uri); - - XInterface ifc = (XInterface)oObj.getScriptStorage(id); - - if (ifc == null) - output = "null"; - else { - Object info = UnoRuntime.queryInterface( - XScriptInfoAccess.class, ifc); - - if (info == null) - output = "null"; - else - output = "XScriptInfoAccess.class"; - } - } catch (com.sun.star.uno.RuntimeException re) { - log.println("Caught RuntimeException: " + re); - output = "com.sun.star.uno.RuntimeException"; - } - - log.println("expected: " + expected + ", output: " + output); - result &= output.equals(expected); - } - - tRes.tested("createScriptStorageWithURI()", result); - } - - public void _getScriptStorage() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_getScriptStorage"); - - if (c == null) { - tRes.tested("getScriptStorage()", false); - return; - } - - Iterator tests = c.iterator(); - - while (tests.hasNext()) { - Parameters testdata = (Parameters)tests.next(); - String expected = testdata.get("expected"); - String location = testdata.get("location"); - String output = ""; - - log.println(testdata.get("description")); - - try { - int storageid = getStorageId(location); - - XInterface ifc = (XInterface)oObj.getScriptStorage(storageid); - - if (ifc == null) - output = "null"; - else { - Object info = UnoRuntime.queryInterface( - XScriptInfoAccess.class, ifc); - - if (info == null) - output = "null"; - else - output = "XScriptInfoAccess.class"; - } - } catch (com.sun.star.uno.RuntimeException re) { - log.println("Caught RuntimeException: " + re); - output = "com.sun.star.uno.RuntimeException"; - } - - log.println("expected: " + expected + ", output: " + output); - result &= output.equals(expected); - } - - tRes.tested("getScriptStorage()", result); - } - - public void _refreshScriptStorage() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_refreshScriptStorage"); - - if (c == null) { - tRes.tested("refreshScriptStorage()", false); - return; - } - - Iterator tests = c.iterator(); - - while (tests.hasNext()) { - Parameters testdata = (Parameters)tests.next(); - String expected = testdata.get("expected"); - String location = testdata.get("location"); - String output = ""; - - log.println(testdata.get("description")); - - try { - String uri = util.utils.getFullTestURL(location); - log.println("calling refreshScriptStorage with URI: " + uri); - oObj.refreshScriptStorage(uri); - output = "success"; - } catch (com.sun.star.uno.RuntimeException re) { - log.println("Caught RuntimeException: " + re); - output = "com.sun.star.uno.RuntimeException"; - } - - log.println("expected: " + expected + ", output: " + output); - result &= output.equals(expected); - } - - tRes.tested("refreshScriptStorage()", result); - } - - private int getStorageId(String location) { - - if (location.equals("share")) - return 0; - - if (location.equals("user")) - return 1; - - String uri = util.utils.getFullTestURL(location); - - XSimpleFileAccess access = getXSimpleFileAccess(); - - if (access == null) - return -1; - - return oObj.createScriptStorageWithURI(access, uri); - } - - private XSimpleFileAccess getXSimpleFileAccess() { - XSimpleFileAccess access = null; - - try { - Object fa = tParam.getMSF().createInstance( - "com.sun.star.ucb.SimpleFileAccess"); - - access = UnoRuntime.queryInterface(XSimpleFileAccess.class, fa); - } catch (com.sun.star.uno.Exception e) { - return null; - } - - return access; - } -} diff --git a/scripting/workben/ifc/scripting/_XScriptStorageRefresh.java b/scripting/workben/ifc/scripting/_XScriptStorageRefresh.java deleted file mode 100644 index fb4bd7c0a316..000000000000 --- a/scripting/workben/ifc/scripting/_XScriptStorageRefresh.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.scripting; - -import drafts.com.sun.star.script.framework.storage.XScriptStorageRefresh; - -import java.util.Collection; -import java.util.Iterator; - -import lib.MultiMethodTest; -import lib.StatusException; -import lib.Parameters; - -public class _XScriptStorageRefresh extends MultiMethodTest { - - public XScriptStorageRefresh oObj = null; - - /** - * Retrieves object relation. - */ - @Override - public void before() throws StatusException { - } - - public void _refresh() { - boolean result = true; - - Collection c = - (Collection) tEnv.getObjRelation("_refresh"); - - if (c == null) { - tRes.tested("refresh()", false); - return; - } - - Iterator tests = c.iterator(); - - while (tests.hasNext()) { - Parameters testdata = (Parameters)tests.next(); - String expected = testdata.get("expected"); - String output = ""; - - log.println(testdata.get("description")); - - try { - oObj.refresh(); - output = "success"; - } catch (com.sun.star.uno.RuntimeException re) { - log.println("Caught RuntimeException: " + re); - output = "com.sun.star.uno.RuntimeException"; - } - - log.println("expected: " + expected + ", output: " + output); - result &= output.equals(expected); - } - - tRes.tested("refresh()", result); - } -} diff --git a/scripting/workben/ifc/scripting/makefile.mk b/scripting/workben/ifc/scripting/makefile.mk deleted file mode 100644 index 00a60eef73f3..000000000000 --- a/scripting/workben/ifc/scripting/makefile.mk +++ /dev/null @@ -1,31 +0,0 @@ -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.apache.org/licenses/LICENSE-2.0 . -# - -PRJ = ..$/..$/..$/.. -PRJNAME = testcase -TARGET = testcase - -# --- Settings ----------------------------------------------------- -.INCLUDE: settings.mk - -JARFILES = ridl.jar unoil.jar jurt.jar juh.jar $(CLASSPATH)$ -JAVAFILES = $(foreach,j,$(shell @ls | grep java) $j) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/scripting/workben/installer/Banner.java b/scripting/workben/installer/Banner.java deleted file mode 100644 index 79e28a7d5af8..000000000000 --- a/scripting/workben/installer/Banner.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -import java.awt.*; - -public class Banner extends Canvas { - Image img; - Banner() { - setBackground(Color.white); - img = Toolkit.getDefaultToolkit().createImage("sidebar.jpg"); - } - - @Override - public void paint(Graphics g) { - g.drawImage(img, 0, 0, Color.white, null); - g.dispose(); - } - - @Override - public Dimension getPreferredSize() { - return new Dimension(137, 358); - } - -} diff --git a/scripting/workben/installer/ExceptionTraceHelper.java b/scripting/workben/installer/ExceptionTraceHelper.java deleted file mode 100644 index ecde5e448072..000000000000 --- a/scripting/workben/installer/ExceptionTraceHelper.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; - -// class for propagating the exception stack traces across the Java/UNO bridge -public class ExceptionTraceHelper { - public static String getTrace(Exception e) { - ByteArrayOutputStream baos = null; - PrintStream ps = null; - String result = ""; - - try { - baos = new ByteArrayOutputStream(128); - ps = new PrintStream(baos); - e.printStackTrace(ps); - } finally { - try { - if (baos != null) { - baos.close(); - } - - if (ps != null) { - ps.close(); - } - } catch (Exception excp) { - } - } - - return result; - } -} diff --git a/scripting/workben/installer/ExecCmd.java b/scripting/workben/installer/ExecCmd.java deleted file mode 100644 index e52a63aefac0..000000000000 --- a/scripting/workben/installer/ExecCmd.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; -import java.io.*; -public class ExecCmd { - - public boolean exec(String cmd, String[] env) { - System.out.println("About to exectute " + cmd); - final Process p; - boolean result = false; - - try { - Runtime rt = Runtime.getRuntime(); - p = rt.exec(cmd, env); - new Thread(new Runnable() { - public void run() { - BufferedReader br_in = null; - - try { - br_in = new BufferedReader(new InputStreamReader(p.getInputStream())); - String buff = null; - - while ((buff = br_in.readLine()) != null) { - System.out.println("Process out :" + buff); - /*try - { - Thread.sleep(100); - } - catch(Exception e) {}*/ - } - - System.out.println("finished reading out"); - } catch (IOException ioe) { - System.out.println("Exception caught printing javac result"); - ioe.printStackTrace(); - } finally { - if (br_in != null) { - try { - br_in.close(); - } catch (Exception e) {} // nothing can be done - } - } - } - }).start(); - - new Thread(new Runnable() { - public void run() { - BufferedReader br_err = null; - - try { - br_err = new BufferedReader(new InputStreamReader(p.getErrorStream())); - String buff = null; - - while ((buff = br_err.readLine()) != null) { - System.out.println("Process err :" + buff); - } - - System.out.println("finished reading err"); - } catch (IOException ioe) { - System.out.println("Exception caught printing javac result"); - ioe.printStackTrace(); - } finally { - if (br_err != null) { - try { - br_err.close(); - } catch (Exception e) {} // nothing can be done - } - } - } - }).start(); - int exitcode = p.waitFor(); - - if (exitcode != 0) { - System.out.println("cmd [" + cmd + "] failed"); - result = false; - } else { - System.out.println("cmd [" + cmd + "] completed successfully"); - result = true; - } - } catch (Exception e) { - System.out.println("Exception"); - e.printStackTrace(); - } - - System.out.println("command complete"); - return result; - } -} - diff --git a/scripting/workben/installer/FileUpdater.java b/scripting/workben/installer/FileUpdater.java deleted file mode 100644 index 6ba73692ca99..000000000000 --- a/scripting/workben/installer/FileUpdater.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -import java.io.*; -import javax.swing.JLabel; - -public class FileUpdater { - - - - - public static boolean updateScriptXLC(String installPath, JLabel statusLabel) { - - File in_file = null; - File out_file = null; - FileWriter out = null; - int count = 0; - - try { - in_file = new File(installPath + File.separator + "user" + File.separator + - "basic" + File.separator + "script.xlc"); - - String[] xmlArray = new String[50]; - - try { - BufferedReader reader = new BufferedReader(new FileReader(in_file)); - count = -1; - - for (String s = reader.readLine(); s != null; - s = reader.readLine()) { // - count = count + 1; - xmlArray[count] = s; - } - - reader.close(); - } catch (IOException ioe) { - String message = "Error reading script.xlc, please view SFrameworkInstall.log."; - System.out.println(message); - ioe.printStackTrace(); - statusLabel.setText(message); - return false; - } - - in_file.delete(); - - out_file = new File(installPath + File.separator + "user" + File.separator + - "basic" + File.separator + "script.xlc"); - out_file.createNewFile(); - out = new FileWriter(out_file); - - //split the string into a string array with one line of xml in each element - for (int i = 0; i < count + 1; i++) { - out.write(xmlArray[i] + "\n"); - - if ((xmlArray[i].indexOf("\n"); - } else { - out.write(" \n"); - } - } - } - } catch (Exception e) { - String message = - "\nError updating script.xlc, please view SFrameworkInstall.log."; - System.out.println(message); - e.printStackTrace(); - statusLabel.setText(message); - return false; - } finally { - try { - out.close(); - } catch (Exception e) { - System.out.println("Update Script.xlc Failed, please view SFrameworkInstall.log."); - e.printStackTrace(); - System.err.println(e); - } - } - - return true; - }// updateScriptXLC - - - public static boolean updateDialogXLC(String installPath, JLabel statusLabel) { - File in_file = null; - File out_file = null; - FileWriter out = null; - int count = 0; - - try { - in_file = new File(installPath + File.separator + "user" + File.separator + - "basic" + File.separator + "dialog.xlc"); - - String[] xmlArray = new String[50]; - - try { - BufferedReader reader = new BufferedReader(new FileReader(in_file)); - count = -1; - - for (String s = reader.readLine(); s != null; s = reader.readLine()) { - count = count + 1; - xmlArray[count] = s; - } - - reader.close(); - } catch (IOException ioe) { - - String message = - "\nError reading dialog.xlc, please view SFrameworkInstall.log."; - System.out.println(message); - statusLabel.setText(message); - return false; - } - - in_file.delete(); - - out_file = new File(installPath + File.separator + "user" + File.separator + - "basic" + File.separator + "dialog.xlc"); - out_file.createNewFile(); - - out = new FileWriter(out_file); - - //split the string into a string array with one line of xml in each element - for (int i = 0; i < count + 1; i++) { - out.write(xmlArray[i] + "\n"); - - if ((xmlArray[i].indexOf("\n"); - } else { - out.write(" \n"); - } - } - } - } catch (Exception e) { - String message = - "\nError updating dialog.xlc, please view SFrameworkInstall.log."; - System.out.println(message); - e.printStackTrace(); - statusLabel.setText(message); - return false; - } finally { - try { - out.close(); - } catch (Exception e) { - System.out.println("Update dialog.xlc Failed, please view SFrameworkInstall.log."); - e.printStackTrace(); - System.err.println(e); - } - } - - return true; - }// updateScriptXLC - - -} diff --git a/scripting/workben/installer/Final.java b/scripting/workben/installer/Final.java deleted file mode 100644 index b951537e8e0c..000000000000 --- a/scripting/workben/installer/Final.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -import java.awt.event.*; -import java.util.*; -import javax.swing.*; - -public class Final extends javax.swing.JPanel implements ActionListener, - InstallListener { - - /** Creates new form Welcome */ - public Final(InstallWizard wizard) { - this.wizard = wizard; - setBackground(java.awt.Color.white); - xud = null; - initComponents(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - statusPanel = new javax.swing.JPanel(); - statusPanel.setBackground(java.awt.Color.white); - statusLine = new javax.swing.JLabel("Ready", javax.swing.JLabel.CENTER); - - setLayout(new java.awt.BorderLayout()); - - statusPanel.setLayout(new java.awt.BorderLayout()); - - statusLine.setText("Waiting to install. \n All Office processes must be terminated."); - statusPanel.add(statusLine, java.awt.BorderLayout.CENTER); - - add(statusPanel, java.awt.BorderLayout.CENTER); - nav = new NavPanel(wizard, true, true, true, InstallWizard.VERSIONS, ""); - nav.setNextListener(this); - nav.removeCancelListener(nav); - nav.setCancelListener(this); - nav.navNext.setText("Install"); - add(nav, java.awt.BorderLayout.SOUTH); - - - - }//GEN-END:initComponents - - @Override - public java.awt.Dimension getPreferredSize() { - return new java.awt.Dimension(InstallWizard.DEFWIDTH, InstallWizard.DEFHEIGHT); - } - - public void actionPerformed(ActionEvent e) { - // navNext is "Install" - if (e.getSource() == nav.navNext) { - JProgressBar progressBar = new JProgressBar(); - progressBar.setMaximum(10); - progressBar.setValue(0); - statusPanel.add(progressBar, java.awt.BorderLayout.SOUTH); - nav.enableNext(false); - nav.enableBack(false); - nav.enableCancel(false); - ArrayList locations = InstallWizard.getLocations(); - // Returned 1 - String path = null; - - for (int i = 0; i < locations.size(); i++) { - path = (String)locations.get(i); - xud = new XmlUpdater(path, statusLine, progressBar, - InstallWizard.bNetworkInstall, InstallWizard.bBindingsInstall); - xud.addInstallListener(this); - InstallWizard.setInstallStarted(true); - InstallWizard.setPatchedTypes(false); - InstallWizard.setPatchedJava(false); - InstallWizard.setPatchedRDB(false); - xud.start(); - } - } - - // set to "Exit" at end of installation process - if (e.getSource() == nav.navCancel) { - int answer = JOptionPane.showConfirmDialog(wizard, - "Are you sure you want to exit?"); - - if (answer == JOptionPane.YES_OPTION) { - wizard.exitForm(); - } else { - return; - } - } - }// actionPerformed - - - public void installationComplete(InstallationEvent ev) { - if (InstUtil.hasNetbeansInstallation()) { - nav.removeCancelListener(this); - nav.setCancelListener(nav); - nav.navCancel.setText("Finish"); - nav.enableIDE(true); - nav.enableCancel(true); - xud = null; - } else { - nav.removeCancelListener(this); - nav.setCancelListener(nav); - nav.navCancel.setText("Finish"); - nav.enableCancel(true); - xud = null; - } - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JPanel statusPanel; - private javax.swing.JLabel statusLine; - private InstallWizard wizard; - private NavPanel nav; - private XmlUpdater xud; - // End of variables declaration//GEN-END:variables - -} diff --git a/scripting/workben/installer/IdeFinal.java b/scripting/workben/installer/IdeFinal.java deleted file mode 100644 index 93159b7b4e2b..000000000000 --- a/scripting/workben/installer/IdeFinal.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -import java.awt.event.*; -import java.util.*; -import javax.swing.*; - -public class IdeFinal extends javax.swing.JPanel implements ActionListener, - InstallListener { - - /** Creates new form Welcome */ - public IdeFinal(InstallWizard wizard) { - this.wizard = wizard; - setBackground(java.awt.Color.white); - ideupdater = null; - initComponents(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - statusPanel = new javax.swing.JPanel(); - statusPanel.setBackground(java.awt.Color.white); - statusLine = new javax.swing.JLabel("Ready", javax.swing.JLabel.CENTER); - - setLayout(new java.awt.BorderLayout()); - - statusPanel.setLayout(new java.awt.BorderLayout()); - - statusLine.setText("Waiting to install IDE support."); - statusPanel.add(statusLine, java.awt.BorderLayout.CENTER); - - add(statusPanel, java.awt.BorderLayout.CENTER); - nav = new NavPanel(wizard, true, true, true, InstallWizard.IDEVERSIONS, ""); - nav.setNextListener(this); - nav.removeCancelListener(nav); - nav.setCancelListener(this); - nav.navNext.setText("Install"); - add(nav, java.awt.BorderLayout.SOUTH); - }//GEN-END:initComponents - - @Override - public java.awt.Dimension getPreferredSize() { - return new java.awt.Dimension(InstallWizard.DEFWIDTH, InstallWizard.DEFHEIGHT); - } - - public void actionPerformed(ActionEvent e) { - // navNext is "Install" - if (e.getSource() == nav.navNext) { - JProgressBar progressBar = new JProgressBar(); - progressBar.setMaximum(10); - progressBar.setValue(0); - statusPanel.add(progressBar, java.awt.BorderLayout.SOUTH); - nav.enableNext(false); - nav.enableBack(false); - nav.enableCancel(false); - ArrayList locations = InstallWizard.getLocations(); - // Returned 1 - String path = null; - - for (int i = 0; i < locations.size(); i++) { - path = (String)locations.get(i); - - ideupdater = new IdeUpdater(path, statusLine, progressBar); - ideupdater.addInstallListener(this); - InstallWizard.setInstallStarted(true); - ideupdater.start(); - } - } - - // set to "Exit" at end of installation process - if (e.getSource() == nav.navCancel) { - int answer = JOptionPane.showConfirmDialog(wizard, - "Are you sure you want to exit?"); - - if (answer == JOptionPane.YES_OPTION) { - wizard.exitForm(); - } else { - return; - } - } - }// actionPerformed - - - public void installationComplete(InstallationEvent ev) { - nav.removeCancelListener(this); - nav.setCancelListener(nav); - nav.navCancel.setText("Finish"); - nav.enableCancel(true); - ideupdater = null; - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JPanel statusPanel; - private javax.swing.JLabel statusLine; - private InstallWizard wizard; - private NavPanel nav; - private IdeUpdater ideupdater; - // End of variables declaration//GEN-END:variables - -} diff --git a/scripting/workben/installer/IdeUpdater.java b/scripting/workben/installer/IdeUpdater.java deleted file mode 100644 index b0ec0cd35cbf..000000000000 --- a/scripting/workben/installer/IdeUpdater.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -import java.io.*; -import java.util.*; -import javax.swing.*; - -/** - * The XmlUpdater pulls a META-INF/converter.xml - * file out of a jar file and parses it, providing access to this - * information in a Vector of ConverterInfo - * objects. - */ -public class IdeUpdater extends Thread { - - private String installPath; - - private JLabel statusLabel; - - private ArrayList listeners; - private Thread internalThread; - private boolean threadSuspended; - private JProgressBar progressBar; - - private boolean isNetbeansPath = false; - - - public IdeUpdater(String installPath, JLabel statusLabel, JProgressBar pBar) { - - if (!installPath.endsWith(File.separator)) - installPath += File.separator; - - File netbeansLauncher = new File(installPath + "bin"); - - if (netbeansLauncher.isDirectory()) { - isNetbeansPath = true; - installPath = installPath + "modules" + File.separator; - } - - System.out.println("IdeUpdater installPath is " + installPath + - " isNetbeansPath is " + isNetbeansPath); - this.installPath = installPath; - this.statusLabel = statusLabel; - listeners = new ArrayList(); - threadSuspended = false; - progressBar = pBar; - progressBar.setStringPainted(true); - }// XmlUpdater - - - @Override - public void run() { - - internalThread = Thread.currentThread(); - - progressBar.setString("Unzipping Required Files"); - ZipData zd = new ZipData(); - - // Adding IDE support - if (isNetbeansPath) { - if (!zd.extractEntry("ide/office.jar", installPath, statusLabel)) { - onInstallComplete(); - return; - } - } else { - if (!zd.extractEntry("ide/idesupport.jar", installPath, statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("ide/OfficeScripting.jar", installPath, statusLabel)) { - onInstallComplete(); - return; - } - } - - statusLabel.setText("Installation Complete"); - progressBar.setString("Installation Complete"); - progressBar.setValue(10); - onInstallComplete(); - - }// run - - - public void addInstallListener(InstallListener listener) { - listeners.add(listener); - }// addInstallListener - - - private void onInstallComplete() { - for (InstallListener l : listeners) { - l.installationComplete(null); - } - }// onInstallComplete - -}// XmlUpdater class diff --git a/scripting/workben/installer/IdeVersion.java b/scripting/workben/installer/IdeVersion.java deleted file mode 100644 index 3a7cc5a485a4..000000000000 --- a/scripting/workben/installer/IdeVersion.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -import java.awt.*; -import java.awt.event.*; -import java.util.*; - -import javax.swing.*; -import javax.swing.event.*; -import javax.swing.table.*; - -public class IdeVersion extends javax.swing.JPanel implements ActionListener, - TableModelListener { - - /** Creates new form Welcome */ - public IdeVersion(InstallWizard wizard) { - this.wizard = wizard; - setBackground(Color.white); - initComponents(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() { - Properties props = null; - JPanel versionPanel = new JPanel(); - setLayout(new BorderLayout()); - - - try { - Properties netbeansProps = InstUtil.getNetbeansLocation(); - Properties ideProps = new Properties(); - - if (netbeansProps != null) { - System.out.println("**** Found netbeans install"); - - for (int n = 0; n < netbeansProps.size(); n++) { - for (int v = 0; v < InstUtil.versions.length; v++) { - System.out.println("n: " + n + " v: " + v); - String key = InstUtil.versions[v]; - System.out.println("It got here1"); - String path = null; - - if ((path = netbeansProps.getProperty(key)) != null) { - ideProps.put(key, path); - } - } - } - } - - props = ideProps; - } catch (Exception e) { - System.err.println("Exception thrown in initComponents"); - } - - tableModel = new MyTableModelIDE(props, InstUtil.versions); - - if (tableModel.getRowCount() == 0) { - JOptionPane.showMessageDialog(this, "No compatible IDEs were found.", - "Invalid versions", JOptionPane.ERROR_MESSAGE); - } - - tableModel.addTableModelListener(this); - JTable tableVersions = new JTable(tableModel) { - @Override - public String getToolTipText(MouseEvent event) { - int col = columnAtPoint(event.getPoint()); - - if (col != 2) - return null; - - int row = rowAtPoint(event.getPoint()); - Object o = getValueAt(row, col); - - if (o == null) - return null; - - if (o.toString().equals("")) - return null; - - return o.toString(); - } - - @Override - public Point getToolTipLocation(MouseEvent event) { - int col = columnAtPoint(event.getPoint()); - - if (col != 2) - return null; - - int row = rowAtPoint(event.getPoint()); - Object o = getValueAt(row, col); - - if (o == null) - return null; - - if (o.toString().equals("")) - return null; - - Point pt = getCellRect(row, col, true).getLocation(); - pt.translate(-1, -2); - return pt; - } - }; - - JScrollPane scroll = new JScrollPane(tableVersions); - - tableVersions.setPreferredSize( - new Dimension(InstallWizard.DEFWIDTH, InstallWizard.DEFHEIGHT)); - - tableVersions.setRowSelectionAllowed(false); - tableVersions.setColumnSelectionAllowed(false); - tableVersions.setCellSelectionEnabled(false); - - initColumnSizes(tableVersions, tableModel); - versionPanel.add(scroll); - - JTextArea area = new - JTextArea("Please select IDEs below that you wish to add Scripting support to"); - area.setLineWrap(true); - area.setEditable(false); - add(area, BorderLayout.NORTH); - add(versionPanel, BorderLayout.CENTER); - nav = new NavPanel(wizard, true, false, true, InstallWizard.IDEWELCOME, - InstallWizard.IDEFINAL); - nav.setNextListener(this); - add(nav, BorderLayout.SOUTH); - - }// initComponents - - - @Override - public java.awt.Dimension getPreferredSize() { - return new java.awt.Dimension(320, 280); - } - - - public void actionPerformed(ActionEvent ev) { - InstallWizard.clearLocations(); - int len = tableModel.data.size(); - - for (int i = 0; i < len; i++) { - ArrayList list = tableModel.data.get(i); - - if (((Boolean)list.get(0)).booleanValue()) - InstallWizard.storeLocation((String)list.get(2)); - } - } - - - public void tableChanged(TableModelEvent e) { - if (tableModel.isAnySelected()) { - nav.enableNext(true); - } else { - nav.enableNext(false); - } - } - - private void initColumnSizes(JTable table, MyTableModelIDE model) { - TableColumn column = null; - Component comp = null; - int headerWidth = 0; - int cellWidth = 0; - int preferredWidth = 0; - int totalWidth = 0; - Object[] longValues = model.longValues; - - for (int i = 0; i < 3; i++) { - column = table.getColumnModel().getColumn(i); - - try { - comp = column.getHeaderRenderer(). - getTableCellRendererComponent( - null, column.getHeaderValue(), - false, false, 0, 0); - headerWidth = comp.getPreferredSize().width; - } catch (NullPointerException e) { - // System.err.println("Null pointer exception!"); - // System.err.println(" getHeaderRenderer returns null in 1.3."); - // System.err.println(" The replacement is getDefaultRenderer."); - } - - // need to replace spaces in String before getting preferred width - if (longValues[i] instanceof String) { - longValues[i] = ((String)longValues[i]).replace(' ', '_'); - } - - System.out.println("longValues: " + longValues[i]); - comp = table.getDefaultRenderer(model.getColumnClass(i)). - getTableCellRendererComponent( - table, longValues[i], - false, false, 0, i); - cellWidth = comp.getPreferredSize().width; - - preferredWidth = Math.max(headerWidth, cellWidth); - - if (false) { - System.out.println("Initializing width of column " - + i + ". " - + "preferredWidth = " + preferredWidth - + "; totalWidth = " + totalWidth - + "; leftWidth = " + (InstallWizard.DEFWIDTH - totalWidth)); - } - - //XXX: Before Swing 1.1 Beta 2, use setMinWidth instead. - if (i == 2) { - if (preferredWidth > InstallWizard.DEFWIDTH - totalWidth) - column.setPreferredWidth(InstallWizard.DEFWIDTH - totalWidth); - else - column.setPreferredWidth(preferredWidth); - } else { - column.setMinWidth(preferredWidth); - totalWidth += preferredWidth; - } - } - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private InstallWizard wizard; - private MyTableModelIDE tableModel; - private NavPanel nav; - // End of variables declaration//GEN-END:variables - -} - -class MyTableModelIDE extends AbstractTableModel { - ArrayList> data; - private String colNames[] = {"", "IDE Name", "IDE Location"}; - Object[] longValues = new Object[] {Boolean.TRUE, "Name", "Location"}; - - MyTableModelIDE(Properties properties, String [] validVersions) { - data = new ArrayList>(); - - int len = validVersions.length; - - for (int i = 0; i < len; i++) { - String key = validVersions[i]; - String path = null; - - if ((path = properties.getProperty(key)) != null) { - ArrayList row = new ArrayList(); - row.add(0, Boolean.FALSE); - - row.add(1, key); - - if (key.length() > ((String)longValues[1]).length()) { - longValues[1] = key; - } - - row.add(2, path); - - if (path.length() > ((String)longValues[2]).length()) { - longValues[2] = path; - } - - data.add(row); - } - } - }// MyTableModel - - public int getColumnCount() { - return 3; - } - - public int getRowCount() { - return data.size(); - } - - @Override - public String getColumnName(int col) { - return colNames[col]; - } - - public Object getValueAt(int row, int col) { - if (row < 0 || row > getRowCount() || - col < 0 || col > getColumnCount()) - return null; - - ArrayList aRow = data.get(row); - return aRow.get(col); - } - - @Override - public Class getColumnClass(int c) { - return getValueAt(0, c).getClass(); - } - - @Override - public boolean isCellEditable(int row, int col) { - return (col == 0); - } - - @Override - public void setValueAt(Object value, int row, int col) { - ArrayList aRow = data.get(row); - aRow.set(col, value); - fireTableCellUpdated(row, col); - } - - - - public boolean isAnySelected() { - Iterator iter = data.iterator(); - - while (iter.hasNext()) { - ArrayList row = (ArrayList)iter.next(); - - if (((Boolean)row.get(0)).booleanValue()) { - return true; - } - } - - return false; - } - -} - diff --git a/scripting/workben/installer/IdeWelcome.java b/scripting/workben/installer/IdeWelcome.java deleted file mode 100644 index c6852bbd639c..000000000000 --- a/scripting/workben/installer/IdeWelcome.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -import java.awt.event.*; - -public class IdeWelcome extends javax.swing.JPanel implements ActionListener { - - /** Creates new form Welcome */ - public IdeWelcome(InstallWizard wizard) { - this.wizard = wizard; - setBorder(new javax.swing.border.EtchedBorder( - javax.swing.border.EtchedBorder.RAISED)); - initComponents(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - welcomePanel = new javax.swing.JPanel(); - area = new javax.swing.JTextArea(); - - setLayout(new java.awt.BorderLayout()); - - welcomePanel.setLayout(new java.awt.BorderLayout()); - area.setEditable(false); - area.setLineWrap(true); - area.setText("\n Click Next to include Scripting Framework support for IDEs."); - area.append("\n Click Cancel exit the Installation process. \n"); - - if (InstUtil.hasNetbeansInstallation()) { - area.append("\n \tA version of Netbeans has been detected. \n"); - } - - welcomePanel.add(area, java.awt.BorderLayout.CENTER); - add(welcomePanel, java.awt.BorderLayout.CENTER); - NavPanel nav = new NavPanel(wizard, false, true, true, "", - InstallWizard.IDEVERSIONS); - nav.setNextListener(this); - add(nav, java.awt.BorderLayout.SOUTH); - - }//GEN-END:initComponents - - @Override - public java.awt.Dimension getPreferredSize() { - return new java.awt.Dimension(InstallWizard.DEFWIDTH, InstallWizard.DEFHEIGHT); - } - - public void actionPerformed(ActionEvent ev) { - //Perform next actions here... - } - - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JPanel welcomePanel; - private javax.swing.JTextArea area; - private InstallWizard wizard; - - // End of variables declaration//GEN-END:variables -} diff --git a/scripting/workben/installer/InstUtil.java b/scripting/workben/installer/InstUtil.java deleted file mode 100644 index 262ce6c01e6b..000000000000 --- a/scripting/workben/installer/InstUtil.java +++ /dev/null @@ -1,326 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -import java.net.URLDecoder; -import java.io.*; -import java.util.*; -import java.net.*; - -public class InstUtil { - - public static File buildSversionLocation() throws IOException { - File theFile = null; - StringBuffer str = new StringBuffer(); - str.append(System.getProperty("user.home")); - str.append(File.separator); - StringBuffer thePath = new StringBuffer(str.toString()); - - String os = System.getProperty("os.name"); - - if (os.indexOf("Windows") != -1) { - boolean bSVersionInHomeDir = new File(thePath.toString() + - "sversion.ini").exists(); - - if (!bSVersionInHomeDir) { - thePath.append("Application Data"); - thePath.append(File.separator); - } - - theFile = findVersionFile(new File(thePath.toString())); - } else if (os.indexOf("SunOS") != -1) { - thePath.append(".sversionrc"); - theFile = new File(thePath.toString()); - } else if (os.indexOf("Linux") != -1) { - thePath.append(".sversionrc"); - theFile = new File(thePath.toString()); - } - - if (theFile == null) { - throw new IOException("Could not locate the OpenOffice settings file.\nAre you sure StarOffice is installed on your system?"); - } - - if (!theFile.exists()) { - throw new IOException("Could not locate the OpenOffice settings file.\nAre you sure StarOffice is installed on your system?"); - } - - return theFile; - } - - - - public static boolean hasNetbeansInstallation() { - boolean result = false; - result = checkForSupportedVersion(getNetbeansLocation(), versions); - - if (!result) - System.out.println("No supported version of NetBeans found."); - - return result; - } - - private static boolean checkForSupportedVersion(Properties installs, - String[] supportedVersions) { - if (installs != null) { - for (int index = 0; index < supportedVersions.length; index++) { - String key = supportedVersions[ index ]; - - if (installs.getProperty(key) != null) { - // at least one supported version for netbeans present, so return; - return true; - } - - } - } - - return false; - } - - - - - - - public static Properties getNetbeansLocation() { - Properties results = new Properties(); - - StringBuffer str = new StringBuffer(); - str.append(System.getProperty("user.home")); - str.append(File.separator); - StringBuffer thePath = new StringBuffer(str.toString()); - - String os = System.getProperty("os.name"); - - if (os.indexOf("Windows") != -1) { - thePath.append(".netbeans"); - } else if (os.indexOf("SunOS") != -1) { - thePath.append(".netbeans"); - } else if (os.indexOf("Linux") != -1) { - thePath.append(".netbeans"); - } - - if (thePath.toString().indexOf(".netbeans") == -1) - return null; - else if (new File(thePath.append(File.separator + "3.4" + - File.separator).toString()).isDirectory()) { - - System.out.println("Found NetBeans 3.4 user directory: " + thePath); - File netbeansLogFile = new File(thePath.toString() + File.separator + "system" + - File.separator + "ide.log"); - - if (netbeansLogFile.exists()) { - String installPath = getNetbeansInstallation(netbeansLogFile); - File f = new File(installPath); - results.put("NetBeans 3.4", f.getPath() + File.separator); - System.out.println("NetBeans Installation directory: " + f.getPath()); - } else { - System.out.println("No NetBeans log file found"); - return null; - } - } else { - System.out.println("No NetBeans user directory found"); - return null; - } - - - return results; - } - - - - private static String getNetbeansInstallation(File logFile) { - String installPath = ""; - - try { - BufferedReader reader = new BufferedReader(new FileReader(logFile)); - - for (String s = reader.readLine(); s != null; s = reader.readLine()) { - if (s.indexOf("IDE Install") != -1) { - int pathStart = s.indexOf("=") + 2; - installPath = s.substring(pathStart, s.length()); - int pathEnd = installPath.indexOf(";"); - installPath = installPath.substring(0, pathEnd) + File.separator; - break; - } - } - - reader.close(); - } catch (IOException ioe) { - System.out.println("Error reading Netbeans location information"); - } - - return installPath; - } - - - private static File findVersionFile(File start) { - File versionFile = null; - - File files[] = start.listFiles(new VersionFilter()); - - if (files.length == 0) { - File dirs[] = start.listFiles(new DirFilter()); - - for (int i = 0; i < dirs.length; i++) { - versionFile = findVersionFile(dirs[i]); - - if (versionFile != null) { - break; - } - } - } else { - versionFile = files[0]; - } - - return versionFile; - } - - private static boolean verifySversionExists(File sversionFile) { - if (!sversionFile.exists()) - return false; - - return true; - } - - public static Properties getOfficeVersions(File sversionFile) throws - IOException { - BufferedReader reader = new BufferedReader(new FileReader(sversionFile)); - String sectionName = null; - Properties results = new Properties(); - - for (String s = reader.readLine(); s != null; s = reader.readLine()) { - if (s.length() == 0) - continue; - - if (s.charAt(0) == '[') { - sectionName = s.substring(1, s.length() - 1); - continue; - } - - if ((sectionName != null) && sectionName.equalsIgnoreCase("Versions")) { - int equals = s.indexOf("="); - String officeName = s.substring(0, equals); - - String instPath = s.substring(equals + 8, s.length()); - String [] parts = new String[2]; - parts[0] = officeName; - parts[1] = instPath + File.separator; - - if (parts.length == 2) { - try { - URL url = new URL("file://" + parts[1].trim()); - String opSys = System.getProperty("os.name"); - - if (opSys.indexOf("Windows") != -1) { - String windowsPath = URLDecoder.decode(url.getPath()); - boolean firstSlash = true; - - while (windowsPath.indexOf("/") != -1) { - int forwardSlashPos = windowsPath.indexOf("/"); - String firstPart = windowsPath.substring(0, forwardSlashPos); - String lastPart = windowsPath.substring(forwardSlashPos + 1, - windowsPath.length()); - - if (firstSlash) { - windowsPath = lastPart; - firstSlash = false; - } else { - windowsPath = firstPart + "\\" + lastPart; - } - } - - int lastSlash = windowsPath.lastIndexOf("\\"); - windowsPath = windowsPath.substring(0, lastSlash); - results.put(parts[0].trim(), windowsPath); - } else { - results.put(parts[0].trim(), URLDecoder.decode(url.getPath())); - } - } catch (MalformedURLException eSyntax) { - results.put(parts[0].trim(), parts[1].trim()); - System.err.println("GotHereException"); - } - } else { - System.out.println("not splitting on equals"); - } - } - } - - reader.close(); - return results; - } - - private static String getJavaVersion() { - return System.getProperty("java.version"); - } - - private static boolean isCorrectJavaVersion() { - if (System.getProperty("java.version").startsWith("1.4")) - return true; - - return false; - } - - public static void main(String args[]) { - InstUtil inst = new InstUtil(); - File f = null; - - try { - f = InstUtil.buildSversionLocation(); - } catch (IOException e) { - e.printStackTrace(); - System.out.println(e.getMessage()); - } - - if (!InstUtil.verifySversionExists(f)) { - System.err.println("Problem with sversion.ini"); - } - - try { - InstUtil.getOfficeVersions(f); - } catch (IOException e) { - e.printStackTrace(); - System.err.println(e); - } - - System.out.println(InstUtil.getJavaVersion()); - - if (!InstUtil.isCorrectJavaVersion()) { - System.err.println("Not correct Java Version"); - } - } - - public static final String [] versions = {"NetBeans 3.4", "jEdit 4.0.3", "jEdit 4.1pre5" }; -} - - - -class DirFilter implements java.io.FileFilter { - public boolean accept(File aFile) { - return aFile.isDirectory(); - } -} -class VersionFilter implements java.io.FileFilter { - public boolean accept(File aFile) { - if (aFile.getName().compareToIgnoreCase("sversion.ini") == 0) { - return true; - } - - return false; - } -} diff --git a/scripting/workben/installer/InstallListener.java b/scripting/workben/installer/InstallListener.java deleted file mode 100644 index 81a005668369..000000000000 --- a/scripting/workben/installer/InstallListener.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -public interface InstallListener { - void installationComplete(InstallationEvent e); -} diff --git a/scripting/workben/installer/InstallWizard.java b/scripting/workben/installer/InstallWizard.java deleted file mode 100644 index fc9d3bdf19da..000000000000 --- a/scripting/workben/installer/InstallWizard.java +++ /dev/null @@ -1,350 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -import javax.swing.*; -import java.awt.*; -import java.awt.event.*; -import java.util.*; -import java.net.*; -import java.io.*; - -public class InstallWizard extends javax.swing.JFrame implements - ActionListener { - /* - private static class ShutdownHook extends Thread { - public void run() - { - if (InstallWizard.isInstallStarted()) - { - // Check for and backup any config.xml files - // Check for and backup any StarBasic macro files - // Check for and backup ProtocolHandler - - if (!InstallWizard.isPatchedTypes()) - { - File backup = new File(InstUtil.getTmpDir(), "TypeDetection.xml"); - File destination = new File(InstallWizard.getTypesPath()); - InstUtil.copy(backup, destination); //Restore typedetection.xml - } - if (!InstallWizard.isPatchedJava()) - { - File backup = new File(InstUtil.getTmpDir(), "Java.xml"); - File destination = new File(InstallWizard.getJavaPath()); - InstUtil.copy(backup, destination); //Restore typedetection.xml - } - if (!InstallWizard.isPatchedRDB()) - { - File backup = new File(InstUtil.getTmpDir(), "applicat.rdb"); - File destination = new File(InstallWizard.getJavaPath()); - //InstUtil.copy(backup, destination); //Restore typedetection.xml - } - - System.out.println( "ShutdownHook" ); - } - - InstUtil.removeTmpDir(); - } - }// class ShutdownHook - - static { - Runtime rt=Runtime.getRuntime(); - rt.addShutdownHook(new ShutdownHook()); - } - */ - /** Creates new form InstallWizard */ - public InstallWizard() { - super("Office Scripting Framework Installer - Early Developer Release"); - - try { - System.out.print("All diagnostic output is being redirected to SFrameworkInstall.log\n"); - System.out.print("Location: " + System.getProperty("user.dir") + - File.separator + "SFrameworkInstall.log\n"); - - LogStream log = new LogStream("SFrameworkInstall.log"); - System.setErr(log); - - System.setOut(log); - } catch (FileNotFoundException fnfe) { - System.err.println("Office Scripting Framework Installer - Error: "); - System.err.println("Unable to create log file for installation."); - exitForm(); - } - - setBackground(new Color(0, 0, 0)); - locations = new ArrayList(); - Point center = new Point(400, 400); - int windowWidth = 200; - int windowHeight = 300; - setSize(windowWidth, windowHeight); - setBounds((center.x - windowWidth / 2) - 115, - (center.y - windowWidth / 2) - 100, windowWidth, windowHeight); - initComponents(); - setResizable(false); - } - - /** This method is called from within the constructor to - * initialize the form. - */ - private void initComponents() { - navigation = new javax.swing.JPanel(); - navBack = new javax.swing.JButton(); - navNext = new javax.swing.JButton(); - navCancel = new javax.swing.JButton(); - screens = new javax.swing.JPanel(); - - addWindowListener(new java.awt.event.WindowAdapter() { - @Override - public void windowClosing(java.awt.event.WindowEvent evt) { - exitForm(); - } - }); - - navigation.setLayout(new java.awt.GridBagLayout()); - java.awt.GridBagConstraints gridBagConstraints1; - - navBack.setText("<< Back"); - gridBagConstraints1 = new java.awt.GridBagConstraints(); - gridBagConstraints1.insets = new java.awt.Insets(1, 1, 1, 1); - - navNext.setText("Next >>"); - gridBagConstraints1 = new java.awt.GridBagConstraints(); - gridBagConstraints1.gridx = 2; - gridBagConstraints1.gridy = 0; - - navCancel.setText("Cancel"); - gridBagConstraints1 = new java.awt.GridBagConstraints(); - gridBagConstraints1.gridx = 6; - gridBagConstraints1.gridy = 0; - - getContentPane().add(navigation, java.awt.BorderLayout.SOUTH); - screens.setLayout(new java.awt.CardLayout()); - screens.add(WELCOME, new Welcome(this)); - version = new Version(this); - screens.add(VERSIONS, version); - _final = new Final(this); - screens.add(FINAL, _final); - - boolean hasIDEInstallation = (InstUtil.hasNetbeansInstallation()) ; - - if (hasIDEInstallation) { - idewelcome = new IdeWelcome(this); - screens.add(IDEWELCOME, idewelcome); - ideversion = new IdeVersion(this); - screens.add(IDEVERSIONS, ideversion); - idefinal = new IdeFinal(this); - screens.add(IDEFINAL, idefinal); - } - - getContentPane().add(screens, java.awt.BorderLayout.CENTER); - - navNext.addActionListener(this); - navNext.addActionListener(version); - navNext.addActionListener(_final); - - if (hasIDEInstallation) { - navNext.addActionListener(ideversion); - navNext.addActionListener(idefinal); - } - - navCancel.addActionListener(this); - navBack.addActionListener(this); - - - URL url = this.getClass().getResource("sidebar.jpg"); - JLabel sideBar = new JLabel(); - sideBar.setIcon(new ImageIcon(url)); - getContentPane().add(sideBar, java.awt.BorderLayout.WEST); - pack(); - }// initComponents - - /** Exit the Application */ - public void exitForm() { - System.exit(0); - } - - - public void actionPerformed(ActionEvent e) { - if (e.getSource() == navNext) { - ((CardLayout)screens.getLayout()).next(screens); - } - - if (e.getSource() == navCancel) { - exitForm(); - } - - if (e.getSource() == navBack) { - ((CardLayout)screens.getLayout()).previous(screens); - } - }// actionPerformed - - public static void storeLocation(String path) { - locations.add(path); - } - - public static ArrayList getLocations() { - return locations; - } - - public static void clearLocations() { - locations.clear(); - } - - public void show(String cardName) { - ((CardLayout)screens.getLayout()).show(screens, cardName); - } - - /** - * @param args the command line arguments - */ - public static void main(String args[]) { - String officePath = null; - String netbeansPath = null; - int i = 0; - - while (i < args.length) { - if (args[i].equals("-help")) { - printUsage(); - System.exit(0); - } - - if (args[i].equals("-office")) - officePath = args[++i]; - - if (args[i].equals("-netbeans")) - netbeansPath = args[++i]; - - if (args[i].equals("-net")) - bNetworkInstall = true; - - if (args[i].equals("-bindings")) - bBindingsInstall = true; - - i++; - } - - if (officePath == null && netbeansPath == null) - new InstallWizard().show(); - - JLabel label = new JLabel(); - JProgressBar progressbar = new JProgressBar(); - - try { - System.out.println("Log file is: " + - System.getProperty("user.dir") + - File.separator + "SFrameworkInstall.log"); - - LogStream log = new LogStream("SFrameworkInstall.log"); - System.setErr(log); - System.setOut(log); - } catch (FileNotFoundException fnfe) { - System.err.println("Error: Unable to create log file: " - + fnfe.getMessage()); - System.exit(-1); - } - - if (officePath != null) { - XmlUpdater xud = new XmlUpdater(officePath, label, progressbar, bNetworkInstall, - bBindingsInstall); - xud.run(); - } - - if (netbeansPath != null) { - IdeUpdater ideup = new IdeUpdater(netbeansPath, label, progressbar); - ideup.run(); - } - } - - private static void printUsage() { - System.err.println("java -jar SFrameworkInstall.jar"); - System.err.println("\t[-office locations = null; - - public static String VERSIONS = "VERSIONS"; - public static String WELCOME = "WELCOME"; - public static String FINAL = "FINAL"; - public static String IDEVERSIONS = "IDEVERSIONS"; - public static String IDEWELCOME = "IDEWELCOME"; - public static String IDEFINAL = "IDEFINAL"; - - public static int DEFWIDTH = 480; - public static int DEFHEIGHT = 240; - - private static String typesPath = null; - private static String javaPath = null; - - public static boolean bNetworkInstall = false; - public static boolean bBindingsInstall = false; - - private static boolean bPatchedTypes = false; - private static boolean bPatchedJava = false; - private static boolean bPatchedRDB = false; - private static boolean bInstallStarted = false; - -}// InstallWizard diff --git a/scripting/workben/installer/InstallationEvent.java b/scripting/workben/installer/InstallationEvent.java deleted file mode 100644 index 9d91f9bf4505..000000000000 --- a/scripting/workben/installer/InstallationEvent.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -public class InstallationEvent { - private Object source; - private String message; - InstallationEvent(Object source, String message) { - this.source = source; - this.message = message; - } - - public Object getSource() { - return source; - } - - public String getMessage() { - return message; - } -} diff --git a/scripting/workben/installer/LogStream.java b/scripting/workben/installer/LogStream.java deleted file mode 100644 index 27f33860d9d2..000000000000 --- a/scripting/workben/installer/LogStream.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; -import java.io.PrintStream; -import java.io.FileOutputStream; - -import java.util.Date; -import java.text.DateFormat; -import java.text.SimpleDateFormat; - - -public class LogStream extends PrintStream { - static final private DateFormat formatter = new - SimpleDateFormat("yyyy-MM-dd HH:mm:ss z: "); - - private String getTimeStamp() { - String timeStamp = formatter.format(new Date()); - return timeStamp; - } - public LogStream(String logFileName) throws java.io.FileNotFoundException { - super(new FileOutputStream(logFileName)); - } - @Override - public void println(String x) { - super.println(getTimeStamp() + x); - } - public static void main(String[] args) { - if (args.length > 0) { - try { - LogStream log = new LogStream(args[0]); - System.setErr(log); - System.setOut(log); - System.out.println("Test from logger from out"); - System.err.println("Test from logger from err"); - System.out.println("finised test from out"); - System.err.println("finised test from err"); - } catch (java.io.FileNotFoundException fe) { - System.err.println("Error creating logStream: " + fe); - fe.printStackTrace(); - } - } else { - System.err.println("specify log file java LogStream [logfile]"); - System.exit(1); - } - } -} diff --git a/scripting/workben/installer/NavPanel.java b/scripting/workben/installer/NavPanel.java deleted file mode 100644 index 89cfed25b1de..000000000000 --- a/scripting/workben/installer/NavPanel.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -import javax.swing.*; -import java.awt.*; -import java.awt.event.*; -public class NavPanel extends JPanel implements ActionListener { - - NavPanel(InstallWizard wizard, boolean bBack, boolean bNext, boolean bCancel, - String prev, String next) { - setBackground(Color.white); - setBorder(new javax.swing.border.EtchedBorder( - javax.swing.border.EtchedBorder.LOWERED)); - this.wizard = wizard; - this.next = next; - this.prev = prev; - navBack = new javax.swing.JButton("<< Back"); - navNext = new javax.swing.JButton("Next >>"); - navCancel = new javax.swing.JButton("Cancel"); - setLayout(new GridBagLayout()); - - gridBagConstraints1 = new java.awt.GridBagConstraints(); - gridBagConstraints1.insets = new java.awt.Insets(1, 1, 1, 1); - gridBagConstraints1.anchor = GridBagConstraints.WEST; - - gridBagConstraints2 = new java.awt.GridBagConstraints(); - gridBagConstraints2.gridx = 2; - gridBagConstraints2.gridy = 0; - - gridBagConstraints3 = new java.awt.GridBagConstraints(); - gridBagConstraints3.gridx = 6; - gridBagConstraints3.gridy = 0; - - navNext.setEnabled(bNext); - navBack.setEnabled(bBack); - navCancel.setEnabled(bCancel); - navNext.addActionListener(this); - navBack.addActionListener(this); - navCancel.addActionListener(this); - add(navBack, gridBagConstraints1); - add(navNext, gridBagConstraints2); - add(navCancel, gridBagConstraints3); - } - - public void enableNext(boolean bEnable) { - navNext.setEnabled(bEnable); - } - - public void enableBack(boolean bEnable) { - navBack.setEnabled(bEnable); - } - - public void enableCancel(boolean bEnable) { - navCancel.setEnabled(bEnable); - } - - public void enableIDE(boolean bEnable) { - ideDetected = bEnable; - } - - public void actionPerformed(ActionEvent ev) { - if ((ev.getSource() == navNext) && (next.length() != 0)) { - wizard.show(next); - } - - if ((ev.getSource() == navBack) && (prev.length() != 0)) { - wizard.show(prev); - } - - if (ev.getSource() == navCancel) { - if (ideDetected) { - wizard.show(InstallWizard.IDEWELCOME); - } else { - wizard.exitForm(); - } - - enableIDE(false); - } - } - - public void setNextListener(ActionListener listener) { - navNext.addActionListener(listener); - } - - public void setBackListener(ActionListener listener) { - navBack.addActionListener(listener); - } - - public void setCancelListener(ActionListener listener) { - navCancel.addActionListener(listener); - } - - - - - - public void removeCancelListener(ActionListener listener) { - navCancel.removeActionListener(listener); - } - - private JButton navBack; - public JButton navNext; - public JButton navCancel; - private GridBagConstraints gridBagConstraints1; - private GridBagConstraints gridBagConstraints2; - private GridBagConstraints gridBagConstraints3; - private InstallWizard wizard; - private String next; - private String prev; - private boolean ideDetected = false; -} diff --git a/scripting/workben/installer/Navigation.java b/scripting/workben/installer/Navigation.java deleted file mode 100644 index 82c63a35ad9b..000000000000 --- a/scripting/workben/installer/Navigation.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -public class Navigation extends javax.swing.JPanel { - - /** Creates new form Navigation */ - public Navigation() { - initComponents(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - navBack = new javax.swing.JButton(); - navNext = new javax.swing.JButton(); - navCancel = new javax.swing.JButton(); - - setLayout(new java.awt.GridBagLayout()); - java.awt.GridBagConstraints gridBagConstraints1; - - navBack.setText("<< Back"); - gridBagConstraints1 = new java.awt.GridBagConstraints(); - add(navBack, gridBagConstraints1); - - navNext.setText("Next >>"); - gridBagConstraints1 = new java.awt.GridBagConstraints(); - gridBagConstraints1.gridx = 2; - gridBagConstraints1.gridy = 0; - add(navNext, gridBagConstraints1); - - navCancel.setText("Cancel"); - gridBagConstraints1 = new java.awt.GridBagConstraints(); - gridBagConstraints1.gridx = 6; - gridBagConstraints1.gridy = 0; - add(navCancel, gridBagConstraints1); - - }//GEN-END:initComponents - - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JButton navBack; - private javax.swing.JButton navNext; - private javax.swing.JButton navCancel; - // End of variables declaration//GEN-END:variables - -} diff --git a/scripting/workben/installer/ProtocolHandler.xcu b/scripting/workben/installer/ProtocolHandler.xcu deleted file mode 100644 index fe55294f37da..000000000000 --- a/scripting/workben/installer/ProtocolHandler.xcu +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - script:* - - - - diff --git a/scripting/workben/installer/Register.java b/scripting/workben/installer/Register.java deleted file mode 100644 index afe95f5d1de6..000000000000 --- a/scripting/workben/installer/Register.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -import java.io.*; -import javax.swing.*; -public class Register { - - - public static boolean register(String path, JLabel statusLabel) { - String[] packages = {"ooscriptframe.zip", "bshruntime.zip", "jsruntime.zip"}; - - try { - boolean goodResult = false; - String env[] = new String[1]; - ExecCmd command = new ExecCmd(); - boolean isWindows = - (System.getProperty("os.name").indexOf("Windows") != -1); - - String progpath = path.concat("program" + File.separator); - - statusLabel.setText("Registering Scripting Framework..."); - - // pkgchk Scripting Framework Components - statusLabel.setText("Registering Scripting Framework Components..."); - System.out.println("Registering Scripting Framework Components..."); - - for (int i = 0; i < packages.length; i++) { - String cmd = ""; - - if (!isWindows) { - env[0] = "LD_LIBRARY_PATH=" + progpath; - - goodResult = command.exec("chmod a+x " + progpath + "pkgchk", null); - - if (goodResult) { - cmd = progpath + "pkgchk -s -f " + progpath + packages[i]; - - System.err.println(cmd); - goodResult = command.exec(cmd, env); - } - } else { - cmd = "\"" + progpath + "pkgchk.exe\" -s -f \"" + progpath + - packages[i] + "\""; - - System.err.println(cmd); - goodResult = command.exec(cmd, null); - - } - - if (!goodResult) { - System.err.println("\nPkgChk Failed"); - - if (!isWindows) - System.err.println("Command: " + cmd + "\n" + env[0]); - else - System.err.println("Command: \"" + cmd + "\""); - - statusLabel.setText( - "PkgChk Failed, please view SFrameworkInstall.log"); - - return false; - } - } - - // updating StarBasic libraries - statusLabel.setText("Updating StarBasic libraries..."); - - if (!FileUpdater.updateScriptXLC(path, statusLabel)) { - statusLabel.setText("Updating user/basic/script.xlc failed, please view SFrameworkInstall.log"); - return false; - } - - if (!FileUpdater.updateDialogXLC(path, statusLabel)) { - statusLabel.setText("Updating user/basic/dialog.xlc failed, please view SFrameworkInstall.log"); - return false; - } - - } catch (Exception e) { - String message = - "\nError installing scripting package, please view SFrameworkInstall.log."; - System.out.println(message); - e.printStackTrace(); - statusLabel.setText(message); - return false; - } - - return true; - }// register - -}//Register diff --git a/scripting/workben/installer/Scripting.BeanShell.xcu b/scripting/workben/installer/Scripting.BeanShell.xcu deleted file mode 100644 index fdcc5d6b8695..000000000000 --- a/scripting/workben/installer/Scripting.BeanShell.xcu +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - bsh - bsh - - - - diff --git a/scripting/workben/installer/Scripting.JavaScript.xcu b/scripting/workben/installer/Scripting.JavaScript.xcu deleted file mode 100644 index 1849dff273e1..000000000000 --- a/scripting/workben/installer/Scripting.JavaScript.xcu +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - js - js - - - - diff --git a/scripting/workben/installer/Scripting.xcs b/scripting/workben/installer/Scripting.xcs deleted file mode 100644 index 1daeab8e978d..000000000000 --- a/scripting/workben/installer/Scripting.xcs +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - DF - - Contains the various settings needed by the Scripting Framework and its runtimes. - - - - - - Specifies the runtimes available to the Scripting Framework. - - - - - Lists the file extensions that are recognized by this runtime. - - - - - - - - - Lists the registered Scripting Framework runtimes. - - - - diff --git a/scripting/workben/installer/Version.java b/scripting/workben/installer/Version.java deleted file mode 100644 index 8ede6c54527e..000000000000 --- a/scripting/workben/installer/Version.java +++ /dev/null @@ -1,350 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -import java.awt.*; -import java.awt.event.*; -import java.io.*; -import java.util.*; - -import javax.swing.*; -import javax.swing.event.*; -import javax.swing.table.*; - -public class Version extends javax.swing.JPanel implements ActionListener, - TableModelListener { - - /** Creates new form Welcome */ - public Version(InstallWizard wizard) { - this.wizard = wizard; - setBackground(Color.white); - initComponents(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() { - Properties props = null; - JPanel versionPanel = new JPanel(); - setLayout(new BorderLayout()); - - System.out.println("Initialising versions"); - - File fileVersions = null; - - try { - fileVersions = InstUtil.buildSversionLocation(); - } catch (IOException eFnF) { - System.err.println("Cannot find sversion.ini/.sversionrc"); - JOptionPane.showMessageDialog(this, eFnF.getMessage(), "File not Found", - JOptionPane.ERROR_MESSAGE); - wizard.exitForm(); - } - - try { - props = InstUtil.getOfficeVersions(fileVersions); - } catch (IOException eIO) { - //Message about no installed versions found - System.err.println("Failed to parse SVERSION"); - JOptionPane.showMessageDialog(this, - "There was a problem reading from the Office settings file.", "Parse Error", - JOptionPane.ERROR_MESSAGE); - wizard.exitForm(); - } - - tableModel = new MyTableModel(props); - - if (tableModel.getRowCount() == 0) { - JOptionPane.showMessageDialog(this, - "No compatible versions of Office were found.", "Invalid versions", - JOptionPane.ERROR_MESSAGE); - wizard.exitForm(); - } - - tableModel.addTableModelListener(this); - JTable tableVersions = new JTable(tableModel) { - @Override - public String getToolTipText(MouseEvent event) { - int col = columnAtPoint(event.getPoint()); - - if (col != 2) - return null; - - int row = rowAtPoint(event.getPoint()); - Object o = getValueAt(row, col); - - if (o == null) - return null; - - if (o.toString().equals("")) - return null; - - return o.toString(); - } - - @Override - public Point getToolTipLocation(MouseEvent event) { - int col = columnAtPoint(event.getPoint()); - - if (col != 2) - return null; - - int row = rowAtPoint(event.getPoint()); - Object o = getValueAt(row, col); - - if (o == null) - return null; - - if (o.toString().equals("")) - return null; - - Point pt = getCellRect(row, col, true).getLocation(); - pt.translate(-1, -2); - return pt; - } - }; - - JScrollPane scroll = new JScrollPane(tableVersions); - - tableVersions.setPreferredSize( - new Dimension(InstallWizard.DEFWIDTH, InstallWizard.DEFHEIGHT)); - - tableVersions.setRowSelectionAllowed(false); - tableVersions.setColumnSelectionAllowed(false); - tableVersions.setCellSelectionEnabled(false); - - initColumnSizes(tableVersions, tableModel); - versionPanel.add(scroll); - - JTextArea area = new - JTextArea("Please select the Office version you wish to Update"); - area.setLineWrap(true); - area.setEditable(false); - add(area, BorderLayout.NORTH); - add(versionPanel, BorderLayout.CENTER); - //nav = new NavPanel(wizard, true, false, true, InstallWizard.WELCOME, InstallWizard.FINAL); - nav = new NavPanel(wizard, true, false, true, InstallWizard.WELCOME, - InstallWizard.FINAL); - nav.setNextListener(this); - add(nav, BorderLayout.SOUTH); - - }// initComponents - - private void initColumnSizes(JTable table, MyTableModel model) { - TableColumn column = null; - Component comp = null; - int headerWidth = 0; - int cellWidth = 0; - int preferredWidth = 0; - int totalWidth = 0; - Object[] longValues = model.longValues; - - for (int i = 0; i < 3; i++) { - column = table.getColumnModel().getColumn(i); - - try { - comp = column.getHeaderRenderer(). - getTableCellRendererComponent( - null, column.getHeaderValue(), - false, false, 0, 0); - headerWidth = comp.getPreferredSize().width; - } catch (NullPointerException e) { - // System.err.println("Null pointer exception!"); - // System.err.println(" getHeaderRenderer returns null in 1.3."); - // System.err.println(" The replacement is getDefaultRenderer."); - } - - // need to replace spaces in String before getting preferred width - if (longValues[i] instanceof String) { - longValues[i] = ((String)longValues[i]).replace(' ', '_'); - } - - System.out.println("longValues: " + longValues[i]); - comp = table.getDefaultRenderer(model.getColumnClass(i)). - getTableCellRendererComponent( - table, longValues[i], - false, false, 0, i); - cellWidth = comp.getPreferredSize().width; - - preferredWidth = Math.max(headerWidth, cellWidth); - - if (false) { - System.out.println("Initializing width of column " - + i + ". " - + "preferredWidth = " + preferredWidth - + "; totalWidth = " + totalWidth - + "; leftWidth = " + (InstallWizard.DEFWIDTH - totalWidth)); - } - - //XXX: Before Swing 1.1 Beta 2, use setMinWidth instead. - if (i == 2) { - if (preferredWidth > InstallWizard.DEFWIDTH - totalWidth) - column.setPreferredWidth(InstallWizard.DEFWIDTH - totalWidth); - else - column.setPreferredWidth(preferredWidth); - } else { - column.setMinWidth(preferredWidth); - totalWidth += preferredWidth; - } - } - } - - @Override - public java.awt.Dimension getPreferredSize() { - return new java.awt.Dimension(320, 280); - } - - - public void actionPerformed(ActionEvent ev) { - InstallWizard.clearLocations(); - int len = tableModel.data.size(); - - for (int i = 0; i < len; i++) { - ArrayList list = tableModel.data.get(i); - - if (((Boolean)list.get(0)).booleanValue()) - InstallWizard.storeLocation((String)list.get(2)); - } - } - - - public void tableChanged(TableModelEvent e) { - if (tableModel.isAnySelected()) { - nav.enableNext(true); - } else { - nav.enableNext(false); - } - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private InstallWizard wizard; - private MyTableModel tableModel; - private NavPanel nav; - private static final String [] versions = {"StarOffice 6.1", "OpenOffice.org 1.1Beta", "OpenOffice.org 644", "OpenOffice.org 1.1"}; - // End of variables declaration//GEN-END:variables - -} - -class MyTableModel extends AbstractTableModel { - ArrayList> data; - private String colNames[] = {"", "Name", "Location"}; - Object[] longValues = new Object[] {Boolean.TRUE, "Name", "Location"}; - - MyTableModel(Properties properties) { - data = new ArrayList>(); - boolean isWindows = - (System.getProperty("os.name").indexOf("Windows") != -1); - - for (Enumeration e = properties.propertyNames(); e.hasMoreElements() ;) { - String key = (String)e.nextElement(); - String path = null; - - if (!(key.startsWith("#")) && - (path = properties.getProperty(key)) != null) { - String pkgChkPath = path + File.separator + "program" + File.separator; - - if (isWindows) { - pkgChkPath += "pkgchk.exe"; - } else { - pkgChkPath += "pkgchk"; - } - - File pkgChk = new File(pkgChkPath); - - if (pkgChk.exists()) { - ArrayList row = new ArrayList(); - row.add(0, Boolean.FALSE); - - row.add(1, key); - - if (key.length() > ((String)longValues[1]).length()) { - longValues[1] = key; - } - - row.add(2, path); - - if (path.length() > ((String)longValues[2]).length()) { - longValues[2] = path; - } - - data.add(row); - } - } - } - }// MyTableModel - - public int getColumnCount() { - return 3; - } - - public int getRowCount() { - return data.size(); - } - - @Override - public String getColumnName(int col) { - return colNames[col]; - } - - public Object getValueAt(int row, int col) { - if (row < 0 || row > getRowCount() || - col < 0 || col > getColumnCount()) - return null; - - ArrayList aRow = data.get(row); - return aRow.get(col); - } - - @Override - public Class getColumnClass(int c) { - return getValueAt(0, c).getClass(); - } - - @Override - public boolean isCellEditable(int row, int col) { - return (col == 0); - } - - @Override - public void setValueAt(Object value, int row, int col) { - ArrayList aRow = data.get(row); - aRow.set(col, value); - fireTableCellUpdated(row, col); - } - - - - public boolean isAnySelected() { - Iterator iter = data.iterator(); - - while (iter.hasNext()) { - ArrayList row = (ArrayList)iter.next(); - - if (((Boolean)row.get(0)).booleanValue()) { - return true; - } - } - - return false; - } - -} diff --git a/scripting/workben/installer/Welcome.java b/scripting/workben/installer/Welcome.java deleted file mode 100644 index c71a7af6b4fb..000000000000 --- a/scripting/workben/installer/Welcome.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -import java.awt.event.*; - -public class Welcome extends javax.swing.JPanel implements ActionListener { - - /** Creates new form Welcome */ - public Welcome(InstallWizard wizard) { - this.wizard = wizard; - setBorder(new javax.swing.border.EtchedBorder( - javax.swing.border.EtchedBorder.RAISED)); - initComponents(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - welcomePanel = new javax.swing.JPanel(); - area = new javax.swing.JTextArea(); - nextButtonEnable = true; - - setLayout(new java.awt.BorderLayout()); - - welcomePanel.setLayout(new java.awt.BorderLayout()); - area.setEditable(false); - area.setLineWrap(true); - - String message = "\n\tOffice Scripting Framework Version 0.3" + - "\n\n\n\tPlease ensure that you have exited from Office"; - - setUpWelcomePanel(message); - - }//GEN-END:initComponents - - private void setUpWelcomePanel(String message) { - area.setText(message); - welcomePanel.add(area, java.awt.BorderLayout.CENTER); - add(welcomePanel, java.awt.BorderLayout.CENTER); - NavPanel nav = new NavPanel(wizard, false, nextButtonEnable, true, "", - InstallWizard.VERSIONS); - nav.setNextListener(this); - add(nav, java.awt.BorderLayout.SOUTH); - } - - - @Override - public java.awt.Dimension getPreferredSize() { - return new java.awt.Dimension(InstallWizard.DEFWIDTH, InstallWizard.DEFHEIGHT); - } - - public void actionPerformed(ActionEvent ev) { - //Perform next actions here... - } - - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JPanel welcomePanel; - private javax.swing.JTextArea area; - private InstallWizard wizard; - private boolean nextButtonEnable = true; - - // End of variables declaration//GEN-END:variables -} diff --git a/scripting/workben/installer/XmlUpdater.java b/scripting/workben/installer/XmlUpdater.java deleted file mode 100644 index c7bd2ff6ac3a..000000000000 --- a/scripting/workben/installer/XmlUpdater.java +++ /dev/null @@ -1,389 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -import java.io.*; -import java.util.*; -import javax.swing.*; - -public class XmlUpdater extends Thread { - - private String installPath; - private boolean netInstall; - private boolean bindingsInstall; - - private JLabel statusLabel; - - private ArrayList listeners; - private Thread internalThread; - private boolean threadSuspended; - private JProgressBar progressBar; - - private final String[] bakFiles = { - "writermenubar.xml", - "writerkeybinding.xml", - "calcmenubar.xml", - "calckeybinding.xml", - "impressmenubar.xml", - "impresskeybinding.xml", - "drawmenubar.xml", - "drawkeybinding.xml", - "eventbindings.xml", - "META-INF" + File.separator + "manifest.xml" - }; - - private final String[] dirs = { - "java" + File.separator + "Highlight", - "java" + File.separator + "MemoryUsage", - "java" + File.separator + "ScriptFrmwrkHelper", - "java" + File.separator + "debugger", - "java" + File.separator + "debugger" + File.separator + "rhino", - "beanshell" + File.separator + "InteractiveBeanShell", - "beanshell" + File.separator + "Highlight", - "beanshell" + File.separator + "MemoryUsage", - "javascript" + File.separator + "ExportSheetsToHTML" - }; - - private final String[] names = { - "java/Highlight/HighlightUtil.java", - "java/Highlight/HighlightText.java", - "java/Highlight/Highlight.jar", - "java/Highlight/parcel-descriptor.xml", - "java/MemoryUsage/MemoryUsage.java", - "java/MemoryUsage/MemoryUsage.class", - "java/MemoryUsage/parcel-descriptor.xml", - "java/MemoryUsage/ExampleSpreadSheet.sxc", - "java/ScriptFrmwrkHelper/parcel-descriptor.xml", - "java/ScriptFrmwrkHelper/ScriptFrmwrkHelper.java", - "java/ScriptFrmwrkHelper/ScriptFrmwrkHelper.class", - "java/ScriptFrmwrkHelper/ScriptFrmwrkHelper.jar", - "java/debugger/debugger.jar", - "java/debugger/OOBeanShellDebugger.java", - "java/debugger/OOScriptDebugger.java", - "java/debugger/DebugRunner.java", - "java/debugger/OORhinoDebugger.java", - "java/debugger/parcel-descriptor.xml", - "java/debugger/rhino/Main.java", - "beanshell/InteractiveBeanShell/parcel-descriptor.xml", - "beanshell/InteractiveBeanShell/interactive.bsh", - "beanshell/Highlight/parcel-descriptor.xml", - "beanshell/Highlight/highlighter.bsh", - "beanshell/MemoryUsage/parcel-descriptor.xml", - "beanshell/MemoryUsage/memusage.bsh", - "javascript/ExportSheetsToHTML/parcel-descriptor.xml", - "javascript/ExportSheetsToHTML/exportsheetstohtml.js" - }; - - - public XmlUpdater(String installPath, JLabel statusLabel, JProgressBar pBar, - boolean netInstall, boolean bindingsInstall) { - this.installPath = installPath; - this.statusLabel = statusLabel; - this.netInstall = netInstall; - this.bindingsInstall = bindingsInstall; - listeners = new ArrayList(); - threadSuspended = false; - progressBar = pBar; - progressBar.setStringPainted(true); - }// XmlUpdater - - - - - - public void setResume() { - threadSuspended = false; - notify(); - }// setResume - - - @Override - public void run() { - - internalThread = Thread.currentThread(); - - String progpath = installPath; - progpath = progpath.concat(File.separator + "program" + File.separator); - - String starBasicPath = installPath; - starBasicPath = starBasicPath.concat(File.separator + "share" + File.separator + - "basic" + File.separator + "ScriptBindingLibrary" + File.separator); - - String regSchemaOfficePath = installPath; - regSchemaOfficePath = regSchemaOfficePath.concat(File.separator + "share" + - File.separator + "registry" + File.separator + "schema" + File.separator + "org" - + File.separator + "openoffice" + File.separator + "Office" + File.separator); - - progressBar.setString("Unzipping Required Files"); - ZipData zd = new ZipData(); - - - if ((!netInstall) || bindingsInstall) { - String configPath = installPath; - configPath = configPath.concat(File.separator + "user" + File.separator + - "config" + File.separator + "soffice.cfg" + File.separator); - String manifestPath = configPath + "META-INF" + File.separator; - - //Adding /user/config/soffice.cfg/ - File configDir = new File(configPath); - - if (!configDir.isDirectory()) { - if (!configDir.mkdir()) { - System.out.println("creating " + configDir + "directory failed"); - } else { - System.out.println(configDir + "directory created"); - } - } else - System.out.println("soffice.cfg exists"); - - File manifestDir = new File(manifestPath); - - if (!manifestDir.isDirectory()) { - if (!manifestDir.mkdir()) { - System.out.println("creating " + manifestPath + "directory failed"); - } else { - System.out.println(manifestPath + " directory created"); - } - } else - System.out.println(manifestPath + " exists"); - - // Backup the confguration files in - // /user/config/soffice.cfg/ - // If they already exist. - - for (int i = 0; i < bakFiles.length; i++) { - String pathNameBak = configPath + bakFiles[i]; - File origFile = new File(pathNameBak); - - if (origFile.exists()) { - System.out.println("Attempting to backup " + pathNameBak + " to " + pathNameBak - + ".bak"); - - if (! origFile.renameTo(new File(pathNameBak + ".bak"))) { - System.out.println("Failed to backup " + pathNameBak + " to " + pathNameBak + - ".bak"); - } - } - } - - // Adding Office configuration files - if (!zd.extractEntry("bindingdialog/writermenubar.xml", configPath, - statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/writerkeybinding.xml", configPath, - statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/calcmenubar.xml", configPath, - statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/calckeybinding.xml", configPath, - statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/impressmenubar.xml", configPath, - statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/impresskeybinding.xml", configPath, - statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/drawmenubar.xml", configPath, - statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/drawkeybinding.xml", configPath, - statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/eventbindings.xml", configPath, - statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/manifest.xml", manifestPath, statusLabel)) { - onInstallComplete(); - return; - } - } - - if (!bindingsInstall) { - // Adding new directories to Office - // Adding /user/basic/ScriptBindingLibrary/ - File scriptBindingLib = new File(starBasicPath); - - if (!scriptBindingLib.isDirectory()) { - if (!scriptBindingLib.mkdir()) { - System.out.println("ScriptBindingLibrary failed"); - } else { - System.out.println("ScriptBindingLibrary directory created"); - } - } else - System.out.println("ScriptBindingLibrary exists"); - - // Adding Scripting Framework and tools - if (!zd.extractEntry("sframework/ooscriptframe.zip", progpath, statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("sframework/bshruntime.zip", progpath, statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("sframework/jsruntime.zip", progpath, statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("schema/Scripting.xcs", regSchemaOfficePath, - statusLabel)) { - onInstallComplete(); - return; - } - - - - progressBar.setString("Registering Scripting Framework"); - progressBar.setValue(3); - - if (!Register.register(installPath + File.separator, statusLabel)) { - onInstallComplete(); - return; - } - - progressBar.setValue(5); - - String path = installPath + File.separator + - "share" + File.separator + "Scripts" + File.separator; - - for (int i = 0; i < dirs.length; i++) { - File dir = new File(path + dirs[i]); - - if (!dir.exists()) { - if (!dir.mkdirs()) { - System.err.println("Error making dir: " + - dir.getAbsolutePath()); - onInstallComplete(); - return; - } - } - } - - for (int i = 0; i < names.length; i++) { - String source = "/examples/" + names[i]; - String dest = path + names[i].replace('/', File.separatorChar); - - if (!zd.extractEntry(source, dest, statusLabel)) { - onInstallComplete(); - return; - } - } - - - // Adding binding dialog - if (!zd.extractEntry("bindingdialog/ScriptBinding.xba", starBasicPath, - statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/MenuBinding.xdl", starBasicPath, - statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/KeyBinding.xdl", starBasicPath, - statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/EventsBinding.xdl", starBasicPath, - statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/HelpBinding.xdl", starBasicPath, - statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/EditDebug.xdl", starBasicPath, - statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/dialog.xlb", starBasicPath, statusLabel)) { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("bindingdialog/script.xlb", starBasicPath, statusLabel)) { - onInstallComplete(); - return; - } - } - - - statusLabel.setText("Installation Complete"); - progressBar.setString("Installation Complete"); - progressBar.setValue(10); - onInstallComplete(); - - }// run - - - public void addInstallListener(InstallListener listener) { - listeners.add(listener); - }// addInstallListener - - - private void onInstallComplete() { - for (InstallListener l : listeners) { - l.installationComplete(null); - } - }// onInstallComplete - -}// XmlUpdater class diff --git a/scripting/workben/installer/ZipData.java b/scripting/workben/installer/ZipData.java deleted file mode 100644 index 6e5d513a16be..000000000000 --- a/scripting/workben/installer/ZipData.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package installer; - -import java.io.*; -import javax.swing.*; - -public class ZipData { - - public boolean extractEntry(String entry, String destination, - JLabel statusLabel) { - - OutputStream out = null; - InputStream in = null; - - System.out.println("Copying: " + entry); - System.out.println("To: " + destination); - - if (statusLabel != null) { - statusLabel.setText("Copying " + entry); - } - - String entryName; - - if (entry.lastIndexOf("/") != -1) { - entryName = entry.substring(entry.lastIndexOf("/") + 1); - } else { - entryName = entry; - } - - String destName; - - if (destination.lastIndexOf(File.separator) != -1) { - destName = destination.substring(destination - .lastIndexOf(File.separator) + 1); - } else { - destName = destination; - } - - if (!destName.equals(entryName)) - destination = destination.concat(entryName); - - System.out.println("Unzipping " + entry + " to " + destination); - - if (!entry.startsWith("/")) - entry = "/" + entry; - - in = this.getClass().getResourceAsStream(entry); - - if (in == null) { - System.err.println("File " + entry + " not found in jar file"); - - if (statusLabel != null) - statusLabel.setText("Failed extracting " + entry - + "see SFramework.log for more information"); - - return false; - } - - try { - out = new FileOutputStream(destination); - } catch (IOException ioe) { - System.err.println("Error opening " + destination + ": " - + ioe.getMessage()); - - if (statusLabel != null) - statusLabel.setText("Error opening" + destination - + "see SFramework.log for more information"); - - return false; - } - - try { - byte[] bytes = new byte[1024]; - int len; - - while ((len = in.read(bytes)) != -1) - out.write(bytes, 0, len); - } catch (IOException ioe) { - System.err.println("Error writing " + destination + ": " - + ioe.getMessage()); - - if (statusLabel != null) - statusLabel.setText("Failed writing " + destination - + "see SFramework.log for more information"); - - return false; - } finally { - try { - in.close(); - out.close(); - } catch (IOException ioe) { - } - } - - return true; - } -} diff --git a/scripting/workben/installer/sidebar.jpg b/scripting/workben/installer/sidebar.jpg deleted file mode 100644 index c2b366f74e76a9518603ac27d07c0e650a58e7cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8393 zcmeHL2T&B-w(TJ&5r!e>oCZk}BuEZ3#DO6vkt`rVB#0;=L6Dqtjzdy{i6}XVq#+7| zfRY3xqlE8$7r6h`yZ6_tdiCG`_3L+6_1>q?K5MVFx~pgEoK2j~0VHr`m@)tYfdG|X zCvbKOP%60FSbEr4GkH09*fSyRZJ1PG8ro;mfWmKO|I+ar$iD>e+v2kpfD{h|1@2*j zSO5%C5GE<;tQ}wgKmY~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_4B3-hTRk)Fj=#wrkI1EAaIW(ob8bKW~qT z6}oTi9lySWqG4FVc9>63GWWiwt)E5x#^&pjzf;k@kVWlbjBO9EYWTEI@rg3&MI&#r zSJhJMCDh;n7q1r4$LgJT?t!&i@B8?r=ycy{#wp8SB>ENYM2o7>ZT001^2+P^eK`Z3 zzdXEj@Di&t^g=%2g&&`@2t48h4!U#lMD_Q3M!+%QnSMf?sv~GY)n!L?0`KL1PdE&nCy_9pD)FLe}~{85xG z)yHFbGfUq)sAtU+HVmpD4cZNj+#jpVxxMoa4jpt=^2ZkW_fC(3OBlnxW*h-C9~i_k z?xgMT2iP1{DAo5Z1aCo`MM_@zJakj`N-mU4Tg>y0?hwCFMQqhO*ZLFb7{Q z69NEL3xM%L@pK(m~Q#UIWe?4=igqx@Q?O zRvFFN5V>CW(VZ&{`lD!*zy88_|QP!FBErutm!9 zdp22p`Ml`DS=4Tp*7t4feH21l=t+3pIf+yuk~k-P8-3o0_;;lkY3QNFgV@HT`Y0t* z_H5+L(!qlb>N{1aOv$=Oo%td3=Y$3CWd7a=S5{fE!Za&D^?ub0R%!^`2-{(?%$rzKq`>>=a ztdC8!vO^YKMGG%qV5n_IPorNpG=4fTD{>H=rhUxA`1YGHENWu<2r+!Qvh5N~JWa*6 z=Z19%dZL87bGS^rtAc;ebI-Yo-|J-DAx+)0^HXo=M!ov5)l1P+q(@ZW=#<3Iw{$mL z*BdqRtLk&xl8HHDC#yA$nCm=waNKH91A=R6CuWT%j(sy{z&|IWEv&%PDLzTn*(^LD z! 1) { - // convert all "\\" to "/", necessary for UCB - if (rootDocPath.indexOf("\\") > 0) { - rootDocPath = rootDocPath.replace('\\', '/'); - } - - System.out.println("After processing the path is " + rootDocPath); - // encode the ulr (for UCB) - String encodedPath = URLEncoder.encode(rootDocPath); - System.out.println("The encoded path is " + encodedPath); - docPath = "vnd.sun.star.pkg://" + encodedPath; - System.out.println("docPath path is " + docPath); - } - - } - - @Override - - public synchronized TestEnvironment createTestEnvironment( - TestParameters tParam, PrintWriter log) throws StatusException { - - log.println("creating test environment"); - - if (docPath == null) { - log.println("Testdata not set up, docPath is null"); - throw new StatusException( - "Can't create object environment, no test document available", - new Exception()) ; - } - - XInterface oObj = null; - XSimpleFileAccess access = null; - - try { - XMultiServiceFactory xMSF = tParam.getMSF(); - Object xInterface = - xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - access = UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface); - Object storageObj = xMSF.createInstanceWithArguments( - "drafts.com.sun.star.script.framework.storage.ScriptStorage", - new Object[] { access, Integer.valueOf(99), docPath }); - XScriptInfoAccess infoAccess = UnoRuntime.queryInterface( - XScriptInfoAccess.class, storageObj); - XScriptInfo[] infos = - infoAccess.getImplementations("script://MemoryUtils.MemUsage?location=document"); - oObj = infos[0]; - } catch (com.sun.star.uno.Exception e) { - throw new StatusException("Can't create object environment", e) ; - } - - TestEnvironment tEnv = new TestEnvironment(oObj) ; - TestDataLoader.setupData(tEnv, "ScriptInfo"); - - return tEnv ; - } - - @Override - - public synchronized void disposeTestEnvironment(TestEnvironment tEnv, - TestParameters tParam) { - } -} - - diff --git a/scripting/workben/mod/_scripting/ScriptRuntimeManager.java b/scripting/workben/mod/_scripting/ScriptRuntimeManager.java deleted file mode 100644 index 6051adb1ae70..000000000000 --- a/scripting/workben/mod/_scripting/ScriptRuntimeManager.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package mod._scripting; - -import com.sun.star.uno.XInterface; -import java.io.PrintWriter; -import lib.StatusException; -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -public class ScriptRuntimeManager extends TestCase { - - @Override - public void initialize(TestParameters tParam, PrintWriter log) { - } - - @Override - - public synchronized TestEnvironment createTestEnvironment( - TestParameters Param, PrintWriter log) throws StatusException { - - log.println("creating test environment"); - - XInterface oObj = null; - - try { - oObj = (XInterface) Param.getMSF().createInstance - ("drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager"); - } catch (com.sun.star.uno.Exception e) { - throw new StatusException("Can't create object environment", e) ; - } - - TestEnvironment tEnv = new TestEnvironment(oObj) ; - TestDataLoader.setupData(tEnv, "ScriptRuntimeManager"); - - return tEnv ; - } - - @Override - - public synchronized void disposeTestEnvironment(TestEnvironment tEnv, - TestParameters tParam) { - } -} diff --git a/scripting/workben/mod/_scripting/ScriptStorage.java b/scripting/workben/mod/_scripting/ScriptStorage.java deleted file mode 100644 index c09f24c083fd..000000000000 --- a/scripting/workben/mod/_scripting/ScriptStorage.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package mod._scripting; - -import com.sun.star.uno.XInterface; -import java.io.PrintWriter; -import lib.StatusException; -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import java.net.URLEncoder; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.ucb.XSimpleFileAccess; -import com.sun.star.uno.UnoRuntime; - -public class ScriptStorage extends TestCase { - - String docPath = null; - @Override - public void initialize(TestParameters tParam, PrintWriter log) { - // Get path to test documents - String rootDocPath = (String)tParam.get("TEST_DOCUMENT_PATH"); - System.out.println("TEST_DOCUMENT_PATH is " + rootDocPath); - rootDocPath = util.utils.getFullTestURL("ExampleSpreadSheetLatest.sxc"); - - if (rootDocPath != null && rootDocPath.length() > 1) { - // convert all "\\" to "/", necessary for UCB - if (rootDocPath.indexOf("\\") > 0) { - rootDocPath = rootDocPath.replace('\\', '/'); - } - - System.out.println("After processing the path is " + rootDocPath); - // encode the ulr (for UCB) - String encodedPath = URLEncoder.encode(rootDocPath); - System.out.println("The encoded path is " + encodedPath); - docPath = "vnd.sun.star.pkg://" + encodedPath; - System.out.println("docPath path is " + docPath); - } - - } - - @Override - - public synchronized TestEnvironment createTestEnvironment( - TestParameters tParam, PrintWriter log) throws StatusException { - - log.println("creating test environment"); - - if (docPath == null) { - log.println("Testdata not set up, docPath is null"); - throw new StatusException( - "Can't create object environment, no test document available", - new Exception()) ; - } - - XInterface oObj = null; - XSimpleFileAccess access = null; - - try { - XMultiServiceFactory xMSF = tParam.getMSF(); - Object xInterface = - xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - access = UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface); - oObj = (XInterface)xMSF.createInstanceWithArguments( - "drafts.com.sun.star.script.framework.storage.ScriptStorage", - new Object[] { access, Integer.valueOf(99), docPath }); - - } catch (com.sun.star.uno.Exception e) { - throw new StatusException("Can't create object environment", e) ; - } - - TestEnvironment tEnv = new TestEnvironment(oObj) ; - TestDataLoader.setupData(tEnv, "ScriptStorage"); - - return tEnv ; - } - - @Override - - public synchronized void disposeTestEnvironment(TestEnvironment tEnv, - TestParameters tParam) { - } -} - - diff --git a/scripting/workben/mod/_scripting/ScriptStorageManager.java b/scripting/workben/mod/_scripting/ScriptStorageManager.java deleted file mode 100644 index b18c613f59e8..000000000000 --- a/scripting/workben/mod/_scripting/ScriptStorageManager.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package mod._scripting; - -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.beans.XPropertySet; -import com.sun.star.uno.XInterface; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XComponentContext; -import java.io.PrintWriter; -import lib.StatusException; -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; - -public class ScriptStorageManager extends TestCase { - - @Override - public void initialize(TestParameters tParam, PrintWriter log) { - } - - @Override - - public synchronized TestEnvironment createTestEnvironment( - TestParameters Param, PrintWriter log) throws StatusException { - - XInterface oObj = null; - Object oInterface = null; - - try { - XMultiServiceFactory xMSF = Param.getMSF(); - XPropertySet xProp = UnoRuntime.queryInterface( - XPropertySet.class, xMSF); - // get context - XComponentContext xContext = UnoRuntime.queryInterface(XComponentContext.class, - xProp.getPropertyValue("DefaultContext")); - // get the script storage manager from context - oInterface = xContext.getValueByName("/singletons/" + - "drafts.com.sun.star.script.framework.storage.theScriptStorageManager"); - } catch (Exception e) { - log.println("ScriptStorageManager singleton service not available"); - e.printStackTrace(); - } - - oObj = (XInterface) oInterface; - - TestEnvironment tEnv = new TestEnvironment(oObj) ; - TestDataLoader.setupData(tEnv, "ScriptStorageManager"); - - return tEnv ; - } - - @Override - - public synchronized void disposeTestEnvironment(TestEnvironment tEnv, - TestParameters tParam) { - } -} - - diff --git a/scripting/workben/mod/_scripting/TestDataLoader.java b/scripting/workben/mod/_scripting/TestDataLoader.java deleted file mode 100644 index 6f8078656058..000000000000 --- a/scripting/workben/mod/_scripting/TestDataLoader.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package mod._scripting; - -import java.io.File; -import java.io.FileReader; -import java.io.BufferedReader; -import java.io.IOException; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.StringTokenizer; - -import lib.TestEnvironment; -import lib.Parameters; - -public class TestDataLoader { - - private TestDataLoader() { - } - - public static void setupData(TestEnvironment tEnv, String name) { - String filename = - util.utils.getFullTestDocName("testdata"); - File testdatadir = new File(filename); - File f = new File(testdatadir, name + ".csv"); - - if (!f.exists()) - return; - - - try { - BufferedReader in = new BufferedReader(new FileReader(f)); - - String s, previous, current; - ArrayList list = new ArrayList(11); - - if ((s = in.readLine()) != null) { - StringTokenizer st = new StringTokenizer(s, ";"); - - current = previous = st.nextToken(); - list.add(getParameters(st)); - } else { - in.close(); - return; - } - - while ((s = in.readLine()) != null) { - StringTokenizer st = new StringTokenizer(s, ";"); - - current = st.nextToken(); - - if (!current.equals(previous)) { - tEnv.addObjRelation(previous, list); - previous = current; - list = new ArrayList(11); - } - - list.add(getParameters(st)); - } - - tEnv.addObjRelation(previous, list); - in.close(); - } catch (IOException ioe) { - } - } - - private static Parameters getParameters(StringTokenizer st) { - String separator = "="; - HashMap map = new HashMap(5); - - while (st.hasMoreTokens()) { - String pair = st.nextToken(); - StringTokenizer tokens = new StringTokenizer(pair, separator); - - String name; - String value; - - if (tokens.countTokens() < 2) - continue; - - name = tokens.nextToken(); - - if (tokens.countTokens() == 1) - value = tokens.nextToken(); - else { - StringBuffer buf = new StringBuffer(tokens.nextToken()); - - while (tokens.hasMoreTokens()) - buf.append(separator).append(tokens.nextToken()); - - value = buf.toString(); - } - - map.put(name, value); - } - - return new Parameters(map); - } -} diff --git a/scripting/workben/mod/_scripting/makefile.mk b/scripting/workben/mod/_scripting/makefile.mk deleted file mode 100644 index 0519fc57a953..000000000000 --- a/scripting/workben/mod/_scripting/makefile.mk +++ /dev/null @@ -1,31 +0,0 @@ -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.apache.org/licenses/LICENSE-2.0 . -# - -PRJ = ..$/..$/..$/.. -PRJNAME = testcase -TARGET = testcase - -# --- Settings ----------------------------------------------------- -.INCLUDE: settings.mk - -JARFILES = ridl.jar unoil.jar jurt.jar juh.jar $(CLASSPATH) -JAVAFILES = $(foreach,j,$(shell @ls | grep java) $j) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk