-------------------------------------- 2008-05-18 ---------------------------------- - setupOOo.rex: - adds (ooRexx) code to determine home of OOo 2.x on Unix and Windows, if no path to OOo's home is supplied; please note this version does not (yet) deal with the current beta of OOo 3.x as it misses the new utility "unoinfo.exe", which supplies the OOo-installation related paths - for Windows the created un/installOOo.cmd now also contains commands to add/remove path entries to the appropriate HKCU (user) or HKLM (system) environment variables PATH and CLASSPATH, depending in which hive OOo got installed to; for this the new utility program 'orx2reg.rex' got created; before applying the changes (adding/removing paths) a backup-file is created documenting the values of the PATH and CLASSPATH environment variables of both hives -------------------------------------- 2008-03-04 ---------------------------------- - UNO.CLS: added public routine "UNO.resetRgfReflectUNO" which will create a new xContext and assign it to the "RgfReflectUNO" class; this allows to overcome situations in which the xContext gets invalidated by shut-down OOo instances, which would cause RgfReflectUNO to only return an empty string ("") instead of string renderings of the IDL definition -------------------------------------- 2008-01-01 ---------------------------------- - org.oorexx.uno.RgfReflectUNO: changed encoding for UNO_CONSTANTS to optionally supply the datatype also for each individual constant as there may be constant groups that use different datatypes (cf. ). The public static field "bSupplyDatatypeForEachConstant" (default=true) controls, whether this appending of constant datatypes takes place or not. -------------------------------------- 2007-09-21 ---------------------------------- - OOo 2.3 (September 2007): introduces some problems for scripting support, cf. [-> Please use the updated package with version OOo 2.3.1, which fixed the bug] - OOo 2.3 Installation Bug: unfortunately, OOo 2.3 has an installation bug, which causes the Java-based ScriptingFramework to not be available for Java extensions! As a result this will unfortunately cause the installation (running the generated OOo installation script named "installOOo.{cmd|sh}") of ooRexx becoming an integral part of OOo (for macro/scripting purposes) to fail! Workaround: - locate the file "OOo-InstallationHome/program/uno.ini" - load the file and locate the line that starts with "URE_INTERNAL_JAVA_CLASSPATH=" - if there is no entry right of it named " $ORIGIN/classes/ScriptFramework.jar", then supply it - close all instances of OOo (also the quickstarter) - Rerun "installOOo.{cmd|sh}" (This problem should go away again with later versions of OOo.) - ScriptingForooRexx-package: starting with OOo 2.3 a customized class loader is used by OOo, which breaks the current code; adjusted BSF itself and the OOo-scripting support code to be able to deal with this change; now also explicitly setting and restoring thread context class loaders for BSFManager invocations using OOo supplied class loaders - new beans registered with BSF: - script's (parcel) filename: entry 'OOo.fileName' in BSFRegistry - script's meta-data: entry 'OOo.ScriptMetaData' in BSFRegistry - Editor of the ScriptingForooRexx-package: - now will show the edited script in a sensible way, such that one can learn to which group ("user", "share", document) of scripts it belongs together with the library and the macro name - UNO.CLS: new public routines to return the two new pieces of script information - uno.getScriptFileName(): returns the parcel filename (a string) - uno.getScriptMetaData(): returns the MetaData UNO object - UNO_XINTERFACES.REX: - created new version to match OOo 2.3.0 (older versions would still work, using reflection on the fly, which would be slightly slower) - Tested on: - OOo 2.2.1 German: o.k. - OOo 2.3.0 English: o.k. -------------------------------------- 2007-07-07 ---------------------------------- - ScriptingForooRexx: - 'template.rex': corrected an error in the scalc section (now correctly retrieves the value of a cell) - org.oorexx.uno.RgfReflectUNO.java: - now correctly lists the correct primitive Java datatype for primitive UNO datatypes - properties: now indicates the fully qualified Java class names for wrapping primitive UNO datatypes - UNO_XINTERFACES.REX: - created new version to match OOo 2.2.1 (older versions would still work, using reflection on the fly, which would be slightly slower) - add_ooRexxPackage.rex: - changed logic altogether as OOo 2.2.1 introduced an incompatibility in driving the XPackageManager; now applies "unopkg" command line commands for installing and removing the ooRexx scripting package from OOo -------------------------------------- 2007-06-16 ---------------------------------- - ScriptingForooRexx: - changed 'template.rex' to be usable in the context of all OOo modules; will create and display text for 'sword' and 'scalc'; will display a popup message box listing the services of the OOo module else -------------------------------------- 2007-01-30 ---------------------------------- - UNO.CLS: - added routines uno.convertToUrl(filename) and uno.convertFromUrl(url), which should replace the same routines not led in by the string "UNO." (this is to make the programmer clear, from where the routine comes from; besides they got documented in the reference card already with the "uno." prefix -------------------------------------- 2007-01-20 ---------------------------------- - UNO.CLS: - changed UNO_ENUM enum object's MAKESTRING method to return as a required string value a string in the form: a[n] FULLY_QUALIFIED_IDL_NAME[ENUM_NAME=ENUM_VALUE] representing the full information, easily parseable by Rexx - changed the index' name for the default enum value got changed to "DEFAULT_ENUM_VALUE" - added method MAKESTRING to UNO_ENUM which will return a required string value listing all enum values in an easy parseable form -------------------------------------- 2007-01-19 ---------------------------------- - UNO.CLS: - changed class UNO_ENUM to return the Java objects representing the enum value, but at the same time allowing to get at their name and value supplying the methods "NAME" and "VALUE" -------------------------------------- 2007-01-14 ---------------------------------- - UNO.CLS: - renamed the public routine "uno.getInterfaceNames" to "uno.getCachedInterfaceNames" (it processes up the XInterface-cache); this way the routine should not be intermixed with the UNO_PROXY method named "uno.getInterfaceNames" (which uses UNO reflection to return the well known full interface class names) - "uno.connect()" now accepts a second optional argument, an "XCcomponentContext" in case it got established already - new reference card for OpenOffice/UNO ("refcardOOo.pdf") -------------------------------------- 2007-01-12 ---------------------------------- - UNO.CLS: - renamed UNO_PROXY-method "uno.getServiceNamesViaReflection" to "uno.getServiceNames" and "uno.getInterfaceNamesViaReflection" to "uno.getInterfaceNames" - added UNO_PROXY-method "uno.getInterfaceNames" -------------------------------------- 2007-01-06 ---------------------------------- - UNO.CLS: - added optional replacement string to ppd(), changed logic to use Java's "line.separator" and also the changestr()-BIF; - .uno now contains the platform dependent "line.separator", "file.separator" values from java.lang.System's properties - removed method attribute "bsfObject", renamed "bsfObject" to to "uno.bsfObject" (changed all occurrences), added getter method "uno.bsfObject" - UNO_DIRLIKE: changed attribute methods to make setters private, added new methods to retrieve a *copy* of "unoDirectory" and "unoNameQueue" for inspection - created a reference card for UNO.CLS -------------------------------------- 2006-09-03 ---------------------------------- - UNO.CLS: - new public routine "UNO.getInterfaceName(shortName)" returns blank delimited fully qualified Interface names matching the unqualified "shortName" -------------------------------------- 2006-07-24 ---------------------------------- - UNO.CLS: - made UNO_CONSTANTS.encode() a little bit more flexible (now an arbitrary mix of constant-field-names and decimal values) -------------------------------------- 2006-07-19 ---------------------------------- - UNO.CLS: - added/changed class UNO_DIRLIKE, UNO_ENUM and UNO_CONSTANTS, which can be treated as directories, if retrieving field-names or their numeric values; UNO_CONSTANTS has in addition the methods ENCODE(blank-delimited-field-names) returning the encoded decimal number; DECODE(decimal number) returning a blank-delimited-filed-names -------------------------------------- 2006-07-17 ---------------------------------- - UNO.CLS: - added UNO.WRAPARRAY which determines whether to wrap up a BSF_ARRAY object as an UNO_ARRAY_PROXY -------------------------------------- 2006-07-16 ---------------------------------- - UNO.CLS: - added UNO_ARRAY_PROXY class; the public routine UNO.CreateArray() which uses BSF.CreateArray(), but wraps it up as an UNO_ARRAY_PROXY (making sure that its elements are wrapped up as UNO_PROXY objects) -------------------------------------- 2006-07-12 ---------------------------------- - UNO.CLS: - uno.setCell() now allows letter-number-coordinates; added routine uno.getCell(xSheet, colNr0, rowNr0) or uno.getCell(xSheet, LetterNumber) returning a XCell object [you can use {g|s}etValue(), {g|s}etFormula(), getError() or getType() with it] -------------------------------------- 2006-07-10 ---------------------------------- - UNO.CLS: - changed "uno.getScriptContext()" and "uno.connect()" to now explicitly supply their XComponentContext to org.oorexx.uno.RgfReflectUNO, which will inhibit that class to use UNO bootstrapping (which would hang the scripting framework); activated fall-back code to use reflection at runtime to query correct interface class -------------------------------------- 2006-06-04 ---------------------------------- - UNO.CLS: fixed a bug in querying an interface object, if unqualified class name is used more than once -------------------------------------- 2006-02-03 ---------------------------------- - changed UNO.CLS to not use RgfReflectUNO as a means of last resort, as at the moment the Java scripting framework of OOo would hang (pertains to versions 1.1.x and 2.0.x); cf. - hint: to easily get at the UNO constant and enumeration values, just wrap up the respective Java class using the new BSF.CLS routine named "bsf.wrapStaticFields(stringJavaClassName)"; just send the names of the constants/enumeration values to the resulting directory object -------------------------------------- 2006-01-24 ---------------------------------- - changed ScriptingFrameword ooRexx support to show Rexx execution errors in a dialog window, considerably easying development of OOo macros -------------------------------------- 2006-01-24 ---------------------------------- - removed the UNO reflection support from the extension jar; created for it "oorexx-uno.jar", which will get copied to OOo/program/classes -------------------------------------- 2006-01-06 ---------------------------------- - removed the public routines pp() and iif(), as they now are made available via the required module "BSF.CLS" - added the public routines uno.getScriptContext() and uno.getScriptContextVersion(); the ooRexx macro "template.rex" adapted (note the change in getting access to the scriptContext compared to earlier beta-versions!): /* Hello World in ooRexx, cf. http://www.ooRexx.org, version: 2006-01-06 */ xScriptContext=uno.getScriptContext() -- get the xScriptContext object oDoc=xScriptContext~getDocument -- get the document service (an XModel object) -- oDesktop=xScriptContext~getDesktop -- get the desktop (an XDesktop object) -- oContext=xScriptContext~getComponentContext -- get the context(an XComponentContext object) xTextDoc=oDoc~XTextDocument -- get the XTextDocument interface from the document hello="Hello World (in ooRexx) " -- define text to add xTextDoc~getText~getEnd~setString(hello) -- add text at the end of the text document ::requires UNO.CLS -- load UNO support for OpenOffice.org -------------------------------------- 2006-01-04 ---------------------------------- - routine - uno.areSame(object1, object2) ... returns true if both objects refer to the same object (passthrough for UnoRuntime.areSame() - additional method for "UNO_PROXY" objects: - uno.isSameO(o) ... returns true if this UNO_PROXY object refers to the same object as the argument object "o" -------------------------------------- 2006-01-03 ---------------------------------- - module "OOO.CLS" was renamed to "UNO.CLS" to reflect that it generically supports the UNO (Universal Network Object) component model on which OOo is built; the definition of UNO objects is carried out in "UNOIDL" (UNO Interface Description Language) and is usually stored in a type repository that is available at runtime for reflection - routines - iif(test, if_true, if_false) ... VBasic like function: if "test" yields .true, then "if_true" is returned, otherwise "if_false" - pp(string) ... returns the string enquoted with square brackets - ppd(string) ... simple "pretty-print for debug": supply any of the UNOIDL blank delimited strings to dump them on stdout in a slightly better ledgible form (breaks the string on the blanks and indents them starting with the second line using a TAB character) - convertToUrl(string) ... converts the fully qualified path to its URL representation as expected by OOo (takes differences between Linux and Windows transparently into account) - convertFromUrl(string) ... converts the URL encoding of a file to a fully qualified path (takes differences between Linux and Windows transparently into account) - encodeURL(string) ... encodes a URL such that non-ASCII-characters are represented with their hex values (led in by percent sign) - decodeURL(string) ... decodes a URL which represents non-ASCII-characters as hex values (led in by percent sign) - uno.wrap(object) ... if possible, the object will be wrapped up as a "UNO_PROXY" which activates the special support for UNO objects (e.g. sending merely the name of an interface in order to get the interface object, etc.) - uno.loadClass(java_class_name[, short_name]) ... imports the UNO Java class "java_class_name" (as an UNO_PROXY) and stores it under the name "short_name" in the directory ".uno"; if "short_name is omitted then the unqualified class name (after the last dot) is used instead - uno.connect(url_string) ... allows connecting to a remote OOo by using the URL according to the OOo documentation; returns a reference to the remote object that you denoted in the "url_string" - uno.createDesktop([context]) ... creates and returns the reference to the OOo desktop object of the supplied "context" (could be any OOo server); if "context" is omitted, then the local OOo is used (ie. OOo installed on the machine the program runs on; no need to define ports explicitly) - uno.setCell(xSheet, x, y, value) ... simple utility routine: inserts "value" (number, text or formula) at the 0-based co-ordinates "x" and "y" in the spreadsheet-object "xSheet" - additional methods for "UNO_PROXY" objects: - uno.findInterfaceWithMember(name, [bReturnString [, howMany]]) ... returns the interface that contains a method or attribute by the given "name"; if "bReturnString" is .true (default), then the fully qualified UNOIDL string of the interface is returned, otherwise the interface object itself; "howMany" determines how many matches should be attempted, if a negative number, then all matching interfaces with all matching members are returned - uno.getDefinition ... returns a blank delimited string containing all UNOIDL members of the object - uno.getInterfaceNamesViaReflection ... returns a blank delimited string containing all interfaces defined in the repository (if available) for this object - uno.getProperties ... returns a blank delimited string denoting all properties of this object - uno.getServiceNamesViaReflection ... returns a blank delimited string containing all services defined in the repository (if available) for this object - uno.getTypeName ... returns a string denominating the type of the object - uno.getXTypeProviderTypeNames ... returns a blank delimited string containing all interfaces the object reports - uno.queryInterfaceName(name) ... returns a string denominating the fully qualified UNOIDL name of the interface for this object; "name" may be partially given - uno.queryInterfaceObjectByName(name) ... returns the interface object (or .nil if not available) of the interface that ends with "name" - uno.queryServiceName(name) ... returns a string denominating the fully qualified UNOIDL name of the service this object implements; "name" may be partially given - additional routines for analyzing OOo definitions, the first argument (named "o" below) can be OOO proxy objects or strings that fully qualify definition objects in the OOo type repository; as there functionality is exactly the same as the methods above, only the signatures are given: - uno.findInterfaceWithMember public(o, name[, bReturnString [, howMany]]) - uno.getDefinition(o) - uno.getInterfaceNamesViaReflection(o) - uno.getProperties(o) - uno.getServiceNamesViaReflection(o) - uno.getTypeName(o) - uno.getXTypeProviderTypeNames(o) - uno.queryInterfaceName(o, name) - uno.queryInterfaceObjectByName(o, name) - uno.queryServiceName(o, name) ---rgf