diff options
author | Alexander Wilms <f.alexander.wilms@gmail.com> | 2014-02-25 20:05:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-26 08:37:40 -0600 |
commit | b0308236d26c4b97532abf40ffd443ebb464ed92 (patch) | |
tree | ddd71ffee2d11cfbe5612861978ee347f050b0dc /scripting/examples | |
parent | e6bd9d718d9962bbb88428a31173fa607f46d45c (diff) |
Remove visual noise from scripting
Change-Id: Id9f177a20d911ce1e041407aa556c9cf13f0efc8
Reviewed-on: https://gerrit.libreoffice.org/8305
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'scripting/examples')
3 files changed, 16 insertions, 16 deletions
diff --git a/scripting/examples/javascript/ExportSheetsToHTML/exportsheetstohtml.js b/scripting/examples/javascript/ExportSheetsToHTML/exportsheetstohtml.js index cc7a4cdf5c9b..37f9e5afb33f 100755 --- a/scripting/examples/javascript/ExportSheetsToHTML/exportsheetstohtml.js +++ b/scripting/examples/javascript/ExportSheetsToHTML/exportsheetstohtml.js @@ -39,15 +39,15 @@ oDoc = XSCRIPTCONTEXT.getDocument(); xSDoc = UnoRuntime.queryInterface(XSpreadsheetDocument, oDoc); //get the XModel interface from the document xModel = UnoRuntime.queryInterface(XModel,oDoc); -//get the XIndexAccess interface used to access each sheet +//get the XIndexAccess interface used to access each sheet xSheetsIndexAccess = UnoRuntime.queryInterface(XIndexAccess, xSDoc.getSheets()); //get the XStorable interface used to save the document xStorable = UnoRuntime.queryInterface(XStorable,xSDoc); -//get the XModifiable interface used to indicate if the document has been +//get the XModifiable interface used to indicate if the document has been //changed xModifiable = UnoRuntime.queryInterface(XModifiable,xSDoc); -//set up an array of PropertyValue objects used to save each sheet in the +//set up an array of PropertyValue objects used to save each sheet in the //document storeProps = new Array;//PropertyValue[1]; storeProps[0] = new PropertyValue(); @@ -68,7 +68,7 @@ for(var i=0;i<xSheetsIndexAccess.getCount();i++) for(var i=0;i<xSheetsIndexAccess.getCount();i++) { xPropSet = AnyConverter.toObject( new Type(XPropertySet), xSheetsIndexAccess.getByIndex(i)); - xPropSet.setPropertyValue("IsVisible", true); + xPropSet.setPropertyValue("IsVisible", true); } function setAllButOneHidden(xSheetsIndexAccess,vis) { @@ -85,4 +85,4 @@ function setAllButOneHidden(xSheetsIndexAccess,vis) { xPropSet.setPropertyValue("IsVisible", false); } } -} +} diff --git a/scripting/examples/javascript/Highlight/ButtonPressHandler.js b/scripting/examples/javascript/Highlight/ButtonPressHandler.js index 292993784689..e0fbde2400e6 100755 --- a/scripting/examples/javascript/Highlight/ButtonPressHandler.js +++ b/scripting/examples/javascript/Highlight/ButtonPressHandler.js @@ -56,7 +56,7 @@ if (pset.getPropertyValue("Label").equals("Exit")) // getContext() on the XControl interface xDialog = UnoRuntime.queryInterface( XDialog, control.getContext()); - + // Close the dialog xDialog.endExecute(); } @@ -78,7 +78,7 @@ else red = java.awt.Color.red.getRGB(); replaceable = - UnoRuntime.queryInterface(XReplaceable, XSCRIPTCONTEXT.getDocument()); + UnoRuntime.queryInterface(XReplaceable, XSCRIPTCONTEXT.getDocument()); descriptor = replaceable.createReplaceDescriptor(); @@ -110,9 +110,9 @@ else descriptor.setPropertyValue("SearchWords", new java.lang.Boolean(true)); // Replaces all instances of searchKey with new Text properties - // and gets the number of instances of the searchKey - descriptor.setSearchString(searchKey); - descriptor.setReplaceString(searchKey); + // and gets the number of instances of the searchKey + descriptor.setSearchString(searchKey); + descriptor.setReplaceString(searchKey); replaceable.replaceAll(descriptor); } catch (e) { diff --git a/scripting/examples/javascript/Highlight/ShowDialog.js b/scripting/examples/javascript/Highlight/ShowDialog.js index 0f3ccefb836b..d659d9622f6f 100755 --- a/scripting/examples/javascript/Highlight/ShowDialog.js +++ b/scripting/examples/javascript/Highlight/ShowDialog.js @@ -27,7 +27,7 @@ importClass(java.lang.System); function tryLoadingLibrary( xmcf, context, name ) { - try + try { obj = xmcf.createInstanceWithContext( "com.sun.star.script.Application" + name + "LibraryContainer", @@ -43,7 +43,7 @@ function tryLoadingLibrary( xmcf, context, name ) xme = AnyConverter.toObject(new Type(XMacroExpander), serviceObj); bootstrapName = "bootstraprc"; - if (System.getProperty("os.name").startsWith("Windows")) + if (System.getProperty("os.name").startsWith("Windows")) { bootstrapName = "bootstrap.ini"; } @@ -59,8 +59,8 @@ function tryLoadingLibrary( xmcf, context, name ) System.err.println("liblink created"); - } - catch (e) + } + catch (e) { System.err.println("Got an exception loading lib: " + e.getMessage()); return false; @@ -98,7 +98,7 @@ xDialogProvider = getDialogProvider(); if (xDialogProvider != null) { //try to create the Highlight dialog (found in the ScriptBinding library) - try + try { findDialog = xDialogProvider.createDialog("vnd.sun.star.script:" + "ScriptBindingLibrary.Highlight?location=application"); @@ -111,7 +111,7 @@ if (xDialogProvider != null) } else { - // try to create the Highlight dialog (found in the + // try to create the Highlight dialog (found in the // ScriptBindingLibrary) findDialog = xDialogProvider.createDialog("vnd.sun.star.script:" + "ScriptBindingLibrary.Highlight?location=application"); |