diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-05 11:08:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-08 09:48:16 +0200 |
commit | 8d6cf7a147acde4e4a4f7600af25ed614b07f90d (patch) | |
tree | ae8f52bd74fb33459fe69eadbdb57271df86fd94 /scripting/workben | |
parent | 60fad3fabb26a50ea238bed2f046670c6e5678f7 (diff) |
java: remove dead methods
Change-Id: I9f2e705fd603a7c8832c0f0772bee9f395380a0d
Diffstat (limited to 'scripting/workben')
-rw-r--r-- | scripting/workben/ifc/scripting/_XScriptSecurity.java | 25 | ||||
-rw-r--r-- | scripting/workben/installer/Register.java | 42 | ||||
-rw-r--r-- | scripting/workben/installer/Welcome.java | 76 |
3 files changed, 0 insertions, 143 deletions
diff --git a/scripting/workben/ifc/scripting/_XScriptSecurity.java b/scripting/workben/ifc/scripting/_XScriptSecurity.java index 9fb261aa879e..03227ca56450 100644 --- a/scripting/workben/ifc/scripting/_XScriptSecurity.java +++ b/scripting/workben/ifc/scripting/_XScriptSecurity.java @@ -362,29 +362,4 @@ public class _XScriptSecurity extends MultiMethodTest { 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/installer/Register.java b/scripting/workben/installer/Register.java index 420ba61e177e..079f7522c61e 100644 --- a/scripting/workben/installer/Register.java +++ b/scripting/workben/installer/Register.java @@ -27,48 +27,6 @@ public class Register{ "drafts.com.sun.star.script.framework.theScriptRuntimeManager=drafts.com.sun.star.script.framework.ScriptRuntimeManager"}; - private static String quotedString ( String stringToQuote ) { - String doubleQuote = "\""; - String result = new String ( doubleQuote + stringToQuote + doubleQuote ); - return result; - } - private static boolean regSingletons( String path, String progPath, String opSys, JLabel statusLabel ) { - try{ - boolean goodResult = false; - String[] env = new String[1]; - String regCmd = null; - ExecCmd command = new ExecCmd(); - for ( int i=0; i<singletonDefParams.length; i++){ - if ( opSys.indexOf( "Windows" ) == -1 ){ - // Not windows - env[0] = "LD_LIBRARY_PATH=" + progPath; - command.exec( "chmod a+x " + progPath + "regsingleton", null ); - regCmd = progPath + "regsingleton " + path + "user" + File.separator + "uno_packages" + File.separator + "cache" + File.separator + "services.rdb " + singletonDefParams[i]; - goodResult = command.exec( regCmd, env ); - } - else { - // Windows - regCmd = quotedString( progPath + "regsingleton.exe" ) + " " + quotedString( path + "user" + File.separator + "uno_packages" + File.separator + "cache" + File.separator + "services.rdb" ) + " " + quotedString( singletonDefParams[i] ); - goodResult = command.exec( regCmd,null ); - } - if ( !goodResult ){ - System.out.println("Regsingleton cmd failed, cmd: " + regCmd ); - statusLabel.setText("Regsingleton ScriptRuntimeForJava 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; - - - } public static boolean register(String path, JLabel statusLabel) { String[] packages = {"ooscriptframe.zip", "bshruntime.zip", "jsruntime.zip"}; diff --git a/scripting/workben/installer/Welcome.java b/scripting/workben/installer/Welcome.java index b9f1bca1ab59..8c99ca1919c0 100644 --- a/scripting/workben/installer/Welcome.java +++ b/scripting/workben/installer/Welcome.java @@ -51,20 +51,6 @@ public class Welcome extends javax.swing.JPanel implements ActionListener { String message = "\n\tOffice Scripting Framework Version 0.3" + "\n\n\n\tPlease ensure that you have exited from Office"; - /* String userDir = (String) System.getProperty( "user.dir" ); - boolean isValid = validateCurrentUserDir(userDir); - if( !isValid ) { - nextButtonEnable = false; - message = "Please run Installer from the program directory in a valid Office installation"; - setUpWelcomePanel(message); - return; - } - - int programPosition = userDir.lastIndexOf("program"); - String offInstallPth = null; - offInstallPth = userDir.substring( 0, programPosition ); - - wizard.storeLocation(offInstallPth); */ setUpWelcomePanel(message); }//GEN-END:initComponents @@ -76,70 +62,8 @@ public class Welcome extends javax.swing.JPanel implements ActionListener { NavPanel nav = new NavPanel(wizard, false, nextButtonEnable, true, "", InstallWizard.VERSIONS); nav.setNextListener(this); add(nav, java.awt.BorderLayout.SOUTH); - - //Banner br = new Banner(); - //add(br, java.awt.BorderLayout.WEST); - } - - - private boolean validateCurrentUserDir(String userDir){ - - - - Properties props = null; - - 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(null); } - 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(null); - } - - - boolean versionMatch = false; - - for( int i = 0; i < versions.length; i++ ) { - String key = versions[i]; - String progPath = props.getProperty( key ); - if ( progPath != null ){ - progPath = progPath + File.separator + "program"; - - File tmpFile = new File(progPath + File.separator + "oostubversion.txt"); - try{ - tmpFile.createNewFile(); - - if( new File(userDir + File.separator + "oostubversion.txt").exists()) - { - versionMatch = true; - break; - } - } - catch( IOException e) - { - // Fail silently - } - tmpFile.delete(); - } - } - return versionMatch; - } - - public java.awt.Dimension getPreferredSize() { return new java.awt.Dimension(InstallWizard.DEFWIDTH, InstallWizard.DEFHEIGHT); |