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>
This commit is contained in:
committed by
Caolán McNamara
parent
e6bd9d718d
commit
b0308236d2
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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) {
|
||||
|
@@ -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");
|
||||
|
Reference in New Issue
Block a user