diff --git a/types/activex-libreoffice/activex-libreoffice-tests.ts b/types/activex-libreoffice/activex-libreoffice-tests.ts new file mode 100644 index 0000000000..bafe014f59 --- /dev/null +++ b/types/activex-libreoffice/activex-libreoffice-tests.ts @@ -0,0 +1,171 @@ +(() => { + // https://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Bridge/Automation_Bridge + + // This is a JScript example + // The service manager is always the starting point + // If there is no office running then an office is started up + const serviceManager = new ActiveXObject('com.sun.star.ServiceManager'); + + // Create the CoreReflection service that is later used to create structs + const coreReflection = serviceManager.createInstance("com.sun.star.reflection.CoreReflection"); + + // Create the Desktop + const desktop = serviceManager.defaultContext.getByName('/singleton/com.sun.star.frame.theDesktop'); + + // Open a new empty writer document + const args: any[] = []; + const document = desktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args); // as com.sun.star.text.TextDocument; + + // Create a text object + const text = document.Text; + + // Create a cursor object + const cursor = (text.createTextCursor() as any) as com.sun.star.text.TextCursor; + + // Inserting some Text + text.insertString(cursor, "The first line in the newly created text document.\n", false); + + // Inserting a second line + text.insertString(cursor, "Now we're in the second line", false); + + // Create instance of a text table with 4 columns and 4 rows + const table = document.createInstance("com.sun.star.text.TextTable"); + table.initialize(4, 4); + + // Insert the table + text.insertTextContent(cursor, table, false); + + // Get first row + const rows = table.Rows; + const row = rows.getByIndex(0) as com.sun.star.table.TableRow; + + // Set the table background color + ((table as any) as com.sun.star.beans.XPropertySet).setPropertyValue("BackTransparent", false); + ((table as any) as com.sun.star.beans.XPropertySet).setPropertyValue("BackColor", 13421823); + + // Set a different background color for the first row + row.setPropertyValue("BackTransparent", false); + row.setPropertyValue("BackColor", 6710932); + + // Fill the first table row + insertIntoCell("A1", "FirstColumn", table); // insertIntoCell is a helper function, see below + insertIntoCell("B1", "SecondColumn", table); + insertIntoCell("C1", "ThirdColumn", table); + insertIntoCell("D1", "SUM", table); + + table.getCellByName("A2").setValue(22.5); + table.getCellByName("B2").setValue(5615.3); + table.getCellByName("C2").setValue(-2315.7); + table.getCellByName("D2").setFormula("sum "); + + table.getCellByName("A3").setValue(21.5); + table.getCellByName("B3").setValue(615.3); + table.getCellByName("C3").setValue(- 315.7); + table.getCellByName("D3").setFormula("sum "); + + table.getCellByName("A4").setValue(121.5); + table.getCellByName("B4").setValue(-615.3); + table.getCellByName("C4").setValue(415.7); + table.getCellByName("D4").setFormula("sum "); + + // Change the CharColor and add a Shadow + cursor.setPropertyValue("CharColor", 255); + cursor.setPropertyValue("CharShadowed", true); + + // Create a paragraph break + // The second argument is a com::sun::star::text::ControlCharacter::PARAGRAPH_BREAK constant + text.insertControlCharacter(cursor, 0, false); + + // Inserting colored Text. + text.insertString(cursor, " This is a colored Text - blue with shadow\n", false); + + // Create a paragraph break ( ControlCharacter::PARAGRAPH_BREAK). + text.insertControlCharacter(cursor, 0, false); + + // Create a TextFrame. + const textFrame = document.createInstance("com.sun.star.text.TextFrame"); + + // Create a Size struct. + const size = createStruct("com.sun.star.awt.Size"); // helper function, see below + size.Width = 15000; + size.Height = 400; + textFrame.setSize(size); + + // TextContentAnchorType.AS_CHARACTER = 1 + textFrame.setPropertyValue("AnchorType", com.sun.star.text.TextContentAnchorType.AS_CHARACTER); + + // insert the frame + text.insertTextContent(cursor, textFrame, false); + + // Get the text object of the frame + const objFrameText = textFrame.Text; + + // Create a cursor object + const objFrameTextCursor = objFrameText.createTextCursor(); + + // Inserting some Text + objFrameText.insertString(objFrameTextCursor, "The first line in the newly created text frame.", false); + objFrameText.insertString(objFrameTextCursor, "\nWith this second line the height of the frame raises.", false); + + // Create a paragraph break + // The second argument is a com::sun::star::text::ControlCharacter::PARAGRAPH_BREAK constant + objFrameText.insertControlCharacter(cursor, 0, false); + + // Change the CharColor and add a Shadow + cursor.setPropertyValue("CharColor", 65536); + cursor.setPropertyValue("CharShadowed", false); + + // Insert another string + text.insertString(cursor, " That's all for now !!", false); + + function insertIntoCell(strCellName: string, strText: string, objTable: com.sun.star.text.TextTable) { + const objCellText = objTable.getCellByName(strCellName) as com.sun.star.table.Cell; + const objCellCursor = (objCellText.createTextCursor() as any) as com.sun.star.text.TextCursor; + objCellCursor.setPropertyValue("CharColor", 16777215); + objCellText.insertString(objCellCursor, strText, false); + } + + function createStruct(strTypeName: K): LibreOffice.StructNameMap[K] { + const classSize = coreReflection.forName(strTypeName); + const aStruct: [LibreOffice.StructNameMap[K]] = [] as any; + classSize.createObject(aStruct); + return aStruct[0]; + } +})(); + +(() => { + // This shows some specific features of the Automation bridge + + const serviceManager = new ActiveXObject('com.sun.star.ServiceManager'); + + // singleton access + const desktop = serviceManager.defaultContext.getByName('/singleton/com.sun.star.frame.theDesktop'); + + // defaultContext property implements XNameAccess + // sequence is returned as a safearray + const elementNames = new VBArray(serviceManager.defaultContext.getElementNames()).toArray().join('\n'); + WScript.Echo(elementNames); + + // get/set methods exposed as properties -- getText => Text, getViewData/setViewData => ViewData + const document = desktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, []); + const viewData = document.ViewData; + WScript.Echo(viewData.Count); + const text = document.Text; + WScript.Echo(text); +})(); + +(() => { + // Forces use of tuple type for out parameters + // Instantiating via reflection + const serviceManager = new ActiveXObject('com.sun.star.ServiceManager'); + const coreReflection = serviceManager.defaultContext.getByName('/singleton/com.sun.star.reflection.theCoreReflection'); + const classInfo = coreReflection.forName('com.sun.star.accessibility.Accessible'); + const accessible: [com.sun.star.accessibility.XAccessible] = [] as any; + classInfo.createObject(accessible); + accessible[0].acquire(); + + // Get a struct via Bridge_GetStruct + const size = serviceManager.Bridge_GetStruct('com.sun.star.awt.Size'); + size.Height = 110; + size.Width = 120; +})(); diff --git a/types/activex-libreoffice/index.d.ts b/types/activex-libreoffice/index.d.ts new file mode 100644 index 0000000000..be16c1441a --- /dev/null +++ b/types/activex-libreoffice/index.d.ts @@ -0,0 +1,105882 @@ +// Type definitions for LibreOffice 5.3 +// Project: https://api.libreoffice.org/ +// Definitions by: Zev Spitz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +declare class type { + private typekey: type; +} + +declare class sequence { + private typekey: sequence; +} + +declare class SafeArray { + private typekey: SafeArray; +} + +declare namespace com.sun.star { + namespace accessibility { + /** + * Every class has to support this service in order to be accessible. + * + * It provides the means to derive a {@link XAccessibleContext} object - which may but usually is not the same object as the object that supports the + * {@link XAccessible} interface - that provides the actual information that is needed to make it accessible. + * + * Service `Accessible` is just a wrapper for the interface `XAccessible` . See the interface's documentation for more information. + * @see XAccessible + * @since OOo 1.1.2 + */ + type Accessible = XAccessible; + + /** + * Indicates invalid or unavailable state information. + * + * This exception is thrown to indicate the an accessibility component has been queried for state information that it can not provide. Used by {@link + * XAccessibleContext.getLocale()} . + * @see XAccessibleContext.getLocale() + * @since OOo 1.1.2 + */ + type IllegalAccessibleComponentStateException = uno.Exception; + + type MSAAService = XMSAAService; + + /** + * Central service of the Accessibility API that gives access to various facets of an object's content. + * + * This service has to be implemented by every class that represents the actual accessibility information of another UNO service. It exposes two kinds of + * information: A tree structure in which all accessible objects are organized can be navigated in freely. It typically represents spatial relationship + * of one object containing a set of children like a dialog box contains a set of buttons. Additionally the {@link XAccessibleContext} interface of this + * service exposes methods that provide access to the actual object's content. This can be the object's role, name, description, and so on. + * @see XAccessibleContext + * @since OOo 1.1.2 + */ + interface AccessibleContext extends XAccessibleContext, XAccessibleEventBroadcaster { } + + /** + * this struct describes an accessible event, that is broadcasted from the {@link XAccessibleEventBroadcaster} and notified to {@link + * XAccessibleEventListener} . + * + * It is usually implemented by {@link AccessibleContext} . + * @since OOo 1.1.2 + */ + interface AccessibleEventObject extends lang.EventObject { + /** + * specifies the type of this event. + * + * For a list of possible events see {@link AccessibleEventId} . + */ + EventId: number; + + /** + * for events that specifies a value change, this is the new value. + * + * Depending on the {@link EventId} , this can be void. + */ + NewValue: any; + + /** + * for events that specifies a value change, this is the old value. + * + * Depending on the {@link EventId} , this can be void. + */ + OldValue: any; + } + + /** + * An {@link AccessibleRelation} object defines a one-to-many relation. + * + * The represented relation points from the implementing object to a set of target objects. + * @since OOo 1.1.2 + */ + interface AccessibleRelation { + /** + * Type of the relation. + * + * Its value has to be one of the constants defined by {@link AccessibleRelationType} . If that value is INVALID then the whole relation is regarded as + * invalid. The content of the TargetSet is then undefined. + * @see AccessibleRelationType + */ + RelationType: number; + + /** + * Set of objects that are the relation's targets. + * + * The content of this set is undefined if the relation's type is INVALID. The set must not contain references to one object more than once. + */ + TargetSet: SafeArray; + } + + /** + * This structure lets an event give access to a change of a table model. + * + * The data members of the {@link AccessibleTableModelChange} structure give access to the type and cell range of a change of a table model. See {@link + * AccessibleTableModelChangeType} for details of the change type. The range of the affected rows, columns, and/or cells can be obtained by accessing the + * other four data members. + * @since OOo 1.1.2 + */ + interface AccessibleTableModelChange { + /** + * The lowest index of a column that has changed. + * + * The first column that has been changed or contains modified cells. + */ + FirstColumn: number; + + /** + * The lowest index of a row that has changed. + * + * The first row that has been changed or that contains modified cells. + */ + FirstRow: number; + + /** + * The highest index of a column that has changed. + * + * The last column that has been changed or contains modified cells. + */ + LastColumn: number; + + /** + * The highest index of a row that has changed. + * + * The last row that has been changed or that contains modified cells. + */ + LastRow: number; + + /** + * The type of the event as defined in {@link AccessibleTableModelChangeType} . + * + * The model change either inserted or deleted one or more rows and/or columns or modified the content of a number of cells. See {@link + * AccessibleTableModelChangeType} for details of the type of the model change. + */ + Type: number; + } + + /** + * This structure describes a text segment that is embedded in a larger portion of text. It is used for example by the {@link XAccessibleText} interface + * to describe a text portion that was inserted into or deleted from an accessible text. + * + * The indices {@link TextSegment.SegmentStart} and {@link TextSegment.SegmentEnd} refer to the enclosing text. The {@link TextSegment.SegmentText} + * member contains the text between these two indices including the start index but not the end index. With it you can use this structure without having + * to access the {@link XAccessibleText} interface that represents the enclosing text. + * + * An empty text segment is expressed by {@link TextSegment.SegmentStart} and {@link TextSegment.SegmentEnd} set to the same value. While a value of -1 + * signals an error (like the request for a word after the last character of a text) all other values define the empty string at that position. + * + * The {@link SegmentText} member is a copy of the corresponding text segment of the enclosing text. Modifying this structure does not alter the + * enclosing text. + * @see XAccessibleText + * @since OOo 1.1.2 + */ + interface TextSegment { + /** Index of the character directly behind the last character of the text segment represented by this structure. The index refers to the enclosing text. */ + SegmentEnd: number; + + /** Index of the first character of the text segment represented by this structure. The index refers to the enclosing text. */ + SegmentStart: number; + + /** + * A copy of the text segment of the enclosing text delimited by the text indices {@link TextSegment.SegmentStart} and {@link TextSegment.SegmentEnd} . + * Modifying it does not alter the enclosing text. + */ + SegmentText: string; + } + + /** + * This interface has to be implemented by any class that wants to be accessible. + * + * It is used to provide access to the {@link XAccessibleContext} interface but allows at the same time that the interface is implemented by another + * class. + * + * The distinction between the interfaces {@link XAccessible} and {@link XAccessibleContext} makes it possible to split up the implementation of the + * class that is made accessible and the actual accessibility code into two (mostly) independent parts. The only necessary dependence is the {@link + * XAccessible.getAccessibleContext()} function that returns the accessible context. This one-way link has to be persistent in some sense: As long as + * there is at least one reference to a specific {@link XAccessibleContext} object the {@link XAccessible} object has to return the same context for + * every call to {@link XAccessible.getAccessibleContext()} . This is necessary to allow the use of object identity for comparing accessibility contexts + * for being equal. + * @see AccessibleContext + * @since OOo 1.1.2 + */ + interface XAccessible extends uno.XInterface { + /** + * Returns the {@link AccessibleContext} associated with this object. + * + * The idea to let this interface only return an {@link XAccessibleContext} instead of directly supporting its functions is to allow the separation of + * the implementation of the functions that make a class accessible from the implementation of that class. You may, of course, implement {@link + * XAccessible} and {@link XAccessibleContext} in one class. + * @returns A reference to the object that contains the actual accessibility information. + * @see AccessibleContext + */ + readonly AccessibleContext: XAccessibleContext; + + /** + * Returns the {@link AccessibleContext} associated with this object. + * + * The idea to let this interface only return an {@link XAccessibleContext} instead of directly supporting its functions is to allow the separation of + * the implementation of the functions that make a class accessible from the implementation of that class. You may, of course, implement {@link + * XAccessible} and {@link XAccessibleContext} in one class. + * @returns A reference to the object that contains the actual accessibility information. + * @see AccessibleContext + */ + getAccessibleContext(): XAccessibleContext; + } + + /** + * Implement this interface to give access to actions that can be executed for accessible objects. + * + * Every accessible object that can be manipulated beyond its methods exported over the accessibility API should support this interface to expose all + * actions that it can perform. Each action can be performed or be queried for a description or associated key bindings. + * @since OOo 1.1.2 + */ + interface XAccessibleAction extends uno.XInterface { + /** + * Returns the number of accessible actions available in this object. + * + * If there are more than one, the first one is considered the "default" action of the object. + * @returns The returned value of the number of actions is zero if there are no actions. + */ + readonly AccessibleActionCount: number; + + /** + * Perform the specified Action on the object. + * @param nIndex This index specifies the action to perform. If it lies outside the valid range `FALSE` is returned and no action is performed. + * @returns Returns `TRUE` if the action was successfully performed. If the action could not be performed successfully `FALSE` is returned. + * @throws IndexOutOfBoundsException If no action with the given index exists then an {@link com.sun.star.lang.IndexOutOfBoundsException} exception is thrown. + */ + doAccessibleAction(nIndex: number): boolean; + + /** + * Returns the number of accessible actions available in this object. + * + * If there are more than one, the first one is considered the "default" action of the object. + * @returns The returned value of the number of actions is zero if there are no actions. + */ + getAccessibleActionCount(): number; + + /** + * Returns a description of the specified action of the object. + * @param nIndex This index specifies the action of which to return a description. If it lies outside the valid range an empty string is returned. + * @returns The returned value is a localized string of the specified action. + * @throws IndexOutOfBoundsException If the given index lies not in the valid range then an {@link com.sun.star.lang.IndexOutOfBoundsException} exception is + */ + getAccessibleActionDescription(nIndex: number): string; + + /** + * Returns a key binding object, if there is one, associated with the specified action. Note that there can be several alternative key bindings for an + * action. See {@link XAccessibleKeyBinding} for more information about how key bindings are represented. + * @param nIndex This index specifies the action of which to return the key binding. + * @returns The returned object describes a set of key bindings associated with the specified action. + * @throws IndexOutOfBoundsException if the given index is not valid. + */ + getAccessibleActionKeyBinding(nIndex: number): XAccessibleKeyBinding; + } + + /** + * The {@link XAccessibleComponent} interface should be supported by any class that can be rendered on the screen. + * + * This interface provides the standard mechanism for an assistive technology to retrieve information concerning the graphical representation of an + * object. This interface combines methods from the Java interfaces `javax.accessibility.AccessibleComponent` and + * `javax.accessibility.AccessibleExtendedComponent` . + * + * Further information about the graphical appearance of an object can be expressed with the {@link XAccessibleExtendedComponent} interface. + * + * Coordinates used by the functions of this interface are specified in different coordinate systems. Their scale is the same and is equal to that of the + * screen coordinate system. In other words all coordinates are measured in pixel. They differ in their respective origin: The screen coordinate system + * has its origin in the upper left corner of the current screen. Used by the {@link getLocationOnScreen()} function.The origin of the parent coordinate + * system is the upper left corner of the parent's bounding box. With no parent the screen coordinate system is used instead. Used by the {@link + * getLocation()} function.The object coordinate system is relative to the upper left corner of an object's bounding box. It is relative to itself so to + * speak. Used by the {@link containsPoint()} and {@link getAccessibleAtPoint()} functions. + * + * Key bindings which are associated with an accessible component can be retrieved at the component's action. The reason for this is that key bindings + * are associated with actions and directly with a component. This distinction becomes important when there are more than one action. To get access to + * the key bindings you have to get the {@link XAccessibleAction} interface of a component, provided that it is supported, and use the + * XAccessibleAction::getAccessibleKeyBinding(). + * @see XAccessibleExtendedComponent + * @since OOo 1.1.2 + */ + interface XAccessibleComponent extends uno.XInterface { + /** + * Returns the background color of this object. + * @returns The returned color is the background color of this object or, if that is not supported, the default background color. + */ + readonly Background: util.Color; + + /** + * Returns the bounding box of this object. + * + * The returned bounding box has the form of a rectangle. Its coordinates are relative to the object's parent coordinate system. Note that the two + * methods {@link getLocation()} and {@link getSize()} return the same information. With method {@link getLocationOnScreen()} you can get the bound box + * position in screen coordinates. + * @returns The coordinates of the returned rectangle are relative to this object's parent or relative to the screen on which this object is rendered if it h + */ + readonly Bounds: awt.Rectangle; + + /** + * Tests whether the specified point lies within this object's bounds. + * + * The test point's coordinates are defined relative to the coordinate system of the object. That means that when the object is an opaque rectangle then + * both the points (0,0) and (with-1,height-1) would yield a `TRUE` value. + * @param Point Coordinates of the point to test. The origin of the coordinate system is the upper left corner of the object's bounding box as returned by + * @returns Returns `TRUE` if the point lies within or on the object's bounding box and `FALSE` otherwise. + */ + containsPoint(Point: awt.Point): boolean; + + /** + * Returns the foreground color of this object. + * @returns The returned color is the foreground color of this object or, if that is not supported, the default foreground color. + */ + readonly Foreground: util.Color; + + /** + * Returns the {@link Accessible} child that is rendered under the given point. + * + * The test point's coordinates are defined relative to the coordinate system of the object. That means that when the object is an opaque rectangle then + * both the points (0,0) and (with-1,height-1) would yield a `TRUE` value. + * @param Point Coordinates of the test point for which to find the {@link Accessible} child. The origin of the coordinate system is the upper left corner + * @returns If there is one child which is rendered so that its bounding box contains the test point then a reference to that object is returned. If there is + */ + getAccessibleAtPoint(Point: awt.Point): XAccessible; + + /** + * Returns the background color of this object. + * @returns The returned color is the background color of this object or, if that is not supported, the default background color. + */ + getBackground(): util.Color; + + /** + * Returns the bounding box of this object. + * + * The returned bounding box has the form of a rectangle. Its coordinates are relative to the object's parent coordinate system. Note that the two + * methods {@link getLocation()} and {@link getSize()} return the same information. With method {@link getLocationOnScreen()} you can get the bound box + * position in screen coordinates. + * @returns The coordinates of the returned rectangle are relative to this object's parent or relative to the screen on which this object is rendered if it h + */ + getBounds(): awt.Rectangle; + + /** + * Returns the foreground color of this object. + * @returns The returned color is the foreground color of this object or, if that is not supported, the default foreground color. + */ + getForeground(): util.Color; + + /** + * Returns the location of the upper left corner of the object's bounding box relative to the parent. + * + * The coordinates of the bounding box are given relative to the parent's coordinate system. + * @returns The coordinates of the returned position are relative to this object's parent or relative to the screen on which this object is rendered if it ha + */ + getLocation(): awt.Point; + + /** + * Returns the location of the upper left corner of the object's bounding box in screen coordinates. + * + * This method returns the same point as does the method {@link getLocation()} . The difference is that the coordinates are absolute screen coordinates + * of the screen to which the object is rendered instead of being relative to the object's parent. + * @returns The coordinates of the returned position are relative to the screen on which this object is rendered. If the object is not on any screen the retu + */ + getLocationOnScreen(): awt.Point; + + /** + * Returns the size of this object's bounding box. + * @returns The returned size is the size of this object or empty if it is not rendered on any screen. + */ + getSize(): awt.Size; + + /** + * Grabs the focus to this object. + * + * If this object can not accept the focus, i.e. isFocusTraversable() returns `FALSE` for this object then nothing happens. Otherwise the object will + * attempt to take the focus. Nothing happens if that fails, otherwise the object has the focus. This method is called `requestFocus` in the Java + * Accessibility API 1.4. + */ + grabFocus(): void; + + /** + * Returns the location of the upper left corner of the object's bounding box relative to the parent. + * + * The coordinates of the bounding box are given relative to the parent's coordinate system. + * @returns The coordinates of the returned position are relative to this object's parent or relative to the screen on which this object is rendered if it ha + */ + readonly Location: awt.Point; + + /** + * Returns the location of the upper left corner of the object's bounding box in screen coordinates. + * + * This method returns the same point as does the method {@link getLocation()} . The difference is that the coordinates are absolute screen coordinates + * of the screen to which the object is rendered instead of being relative to the object's parent. + * @returns The coordinates of the returned position are relative to the screen on which this object is rendered. If the object is not on any screen the retu + */ + readonly LocationOnScreen: awt.Point; + + /** + * Returns the size of this object's bounding box. + * @returns The returned size is the size of this object or empty if it is not rendered on any screen. + */ + readonly Size: awt.Size; + } + + /** + * Implement this interface for exposing various aspects of a class's content. + * + * This interface serves two purposes: On the one hand it gives access to the tree structure in which all accessible objects are organized. Each node in + * this tree supports this interface. On the other hand it gives access to objects that expose the represented content. That are role, state, name, + * description, and relations to other objects. Take an OK button of a dialog as an example. Its role is AccessibleRole::BUTTON, its name is "OK", and + * its description is something like "Accepts all changes made in the dialog". + * @since OOo 1.1.2 + */ + interface XAccessibleContext extends uno.XInterface { + /** + * Return the number of children. + * + * Returns the number of accessible children of the object. + * @returns The returned value is non-negative. + */ + readonly AccessibleChildCount: number; + + /** + * Returns the object's description. + * + * Returns the object's localized description. The description should complement the more generic descriptions given by an object's role and name. + * @returns The returned string is the object's localized description. + */ + readonly AccessibleDescription: string; + + /** + * Returns the index of this object in its accessible parent. + * + * If you call getAccessibeChild on the object's parent with the index returned by this function you get a reference to this object. + * @returns The returned index is zero based. + */ + readonly AccessibleIndexInParent: number; + + /** + * Return the object's localized name. + * + * See {@link XAccessibleContext.getAccessibleRole()} 's documentation for the relation between an object's name and role. Names should be unique, at + * least between children of the same parent, although the uniqueness is neither enforced nor used inside the API. + * @returns The returned string is the object's localized name. + */ + readonly AccessibleName: string; + + /** + * Returns the parent of this object. + * + * This function may be called for every node, including the root node, of the accessible tree. + * @returns The returned reference points to a valid object for all but the root node. If called for the root node an empty reference is returned. + */ + readonly AccessibleParent: XAccessible; + + /** + * Returns the set of relations defined for this object. + * + * The returned set of relations is a copy of this object's relation set: changing the returned object does not change this object's relations. + * + * There are two ways to represent an empty list of relations: Return an empty reference or return a valid object that contains an empty list. + * @returns The returned value is either an empty reference or a reference to a valid object that represents a copy of the objects list of relations. + */ + readonly AccessibleRelationSet: XAccessibleRelationSet; + + /** + * Returns the role of this object. + * + * The role is a generic description of an objects function. The relation between role and name is similar to the relation between class and object. + * @returns The returned value is a role defined in the enumeration {@link AccessibleRole} . + * @see AccessibleRole for a list of the available roles. + */ + readonly AccessibleRole: number; + + /** + * Returns the set of states that are currently active for this object. + * + * The returned state set is a copy: Changing the returned state set will not be reflected by changing the object's set of states. See the documentation + * of {@link XAccessibleStateSet} for a description of the individual states. + * @returns A reference to this object's state set or an empty reference if states are not supported. + * @see XAccessibleStateSet + */ + readonly AccessibleStateSet: XAccessibleStateSet; + + /** + * Returns the i-th child of this object. + * + * The order in which the children are enumerated is implementation dependent. + * @param i The index may have any value. If it is outside the range from 0 to n-1, with n being the number of children as returned by {@link XAccessibleCo + * @returns If the object has an i-th child the returned value is a reference to that child. Otherwise an empty reference is returned. + * @throws com::sun::star::lang::IndexOutOfBoundsException If no child with the given index exists then an {@link com.sun.star.lang.IndexOutOfBoundsExceptio + */ + getAccessibleChild(i: number): XAccessible; + + /** + * Return the number of children. + * + * Returns the number of accessible children of the object. + * @returns The returned value is non-negative. + */ + getAccessibleChildCount(): number; + + /** + * Returns the object's description. + * + * Returns the object's localized description. The description should complement the more generic descriptions given by an object's role and name. + * @returns The returned string is the object's localized description. + */ + getAccessibleDescription(): string; + + /** + * Returns the index of this object in its accessible parent. + * + * If you call getAccessibeChild on the object's parent with the index returned by this function you get a reference to this object. + * @returns The returned index is zero based. + */ + getAccessibleIndexInParent(): number; + + /** + * Return the object's localized name. + * + * See {@link XAccessibleContext.getAccessibleRole()} 's documentation for the relation between an object's name and role. Names should be unique, at + * least between children of the same parent, although the uniqueness is neither enforced nor used inside the API. + * @returns The returned string is the object's localized name. + */ + getAccessibleName(): string; + + /** + * Returns the parent of this object. + * + * This function may be called for every node, including the root node, of the accessible tree. + * @returns The returned reference points to a valid object for all but the root node. If called for the root node an empty reference is returned. + */ + getAccessibleParent(): XAccessible; + + /** + * Returns the set of relations defined for this object. + * + * The returned set of relations is a copy of this object's relation set: changing the returned object does not change this object's relations. + * + * There are two ways to represent an empty list of relations: Return an empty reference or return a valid object that contains an empty list. + * @returns The returned value is either an empty reference or a reference to a valid object that represents a copy of the objects list of relations. + */ + getAccessibleRelationSet(): XAccessibleRelationSet; + + /** + * Returns the role of this object. + * + * The role is a generic description of an objects function. The relation between role and name is similar to the relation between class and object. + * @returns The returned value is a role defined in the enumeration {@link AccessibleRole} . + * @see AccessibleRole for a list of the available roles. + */ + getAccessibleRole(): number; + + /** + * Returns the set of states that are currently active for this object. + * + * The returned state set is a copy: Changing the returned state set will not be reflected by changing the object's set of states. See the documentation + * of {@link XAccessibleStateSet} for a description of the individual states. + * @returns A reference to this object's state set or an empty reference if states are not supported. + * @see XAccessibleStateSet + */ + getAccessibleStateSet(): XAccessibleStateSet; + + /** + * Returns the locale of the component. + * + * This locale is used for example to determine the language to use for the name and description texts. + * @returns If this object does not have a locale, the locale of its parent is returned. If it does not have (yet) a parent it throws the exception {@link Il + * @throws IllegalAccessibleComponentStateException when this object does not (yet) have a parent. + */ + getLocale(): lang.Locale; + + /** + * Returns the locale of the component. + * + * This locale is used for example to determine the language to use for the name and description texts. + * @returns If this object does not have a locale, the locale of its parent is returned. If it does not have (yet) a parent it throws the exception {@link Il + * @throws IllegalAccessibleComponentStateException when this object does not (yet) have a parent. + */ + readonly Locale: lang.Locale; + } + + /** + * Implement this interface to give read and write access to a text representation. + * + * This interface is typically used in conjunction with the {@link XAccessibleText} interface and extents it about the ability to modify the text + * represented by that interface. + * @since OOo 1.1.2 + */ + interface XAccessibleEditableText extends XAccessibleText { + /** + * Copies the text range into the clipboard. + * + * The specified text between and including the two given indices is copied into the system clipboard and is deleted afterwards from the text represented + * by this object. This is equivalent to calling first {@link XAccessibleText.copyText()} and then {@link XAccessibleEditableText.deleteText()} with the + * given start and end indices. + * + * The text indices are interpreted like those in the {@link XAccessibleText.getTextRange()} method. + * @param nStartIndex Start index of the text to moved into the clipboard. The valid range is 0..length. + * @param nEndIndex End index of the text to moved into the clipboard. The valid range is 0..length. + * @returns Returns a flag that indicates whether the operation has been executed successfully. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the indices are invalid + */ + cutText(nStartIndex: number, nEndIndex: number): boolean; + + /** + * Deletes a range of text. + * + * The text between and including the two given indices is deleted from the text represented by this object. + * + * The text indices are interpreted like those in the {@link XAccessibleText.getTextRange()} method. + * @param nStartIndex Start index of the text to be deleted. The valid range is 0..length. + * @param nEndIndex End index of the text to be deleted. The valid range is 0..length. + * @returns Returns a flag that indicates whether the operation has been executed successfully. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the indices are invalid + */ + deleteText(nStartIndex: number, nEndIndex: number): boolean; + + /** + * Inserts text at the specified position. + * + * The specified string is inserted at the given index into the text represented by this object. + * @param sText Text that is inserted. + * @param nIndex Index at which to insert the text. The valid range is 0..length. + * @returns Returns a flag that indicates whether the operation has been executed successfully. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the indices are invalid + */ + insertText(sText: string, nIndex: number): boolean; + + /** + * Pastes text from the clipboard. + * + * The text in the system clipboard is pasted into the text represented by this object at the given index. This method is similar to the {@link + * XAccessibleEditableText.insertText()} method. If the index is not valid then the system clipboard text is not inserted. + * @param nIndex Index at which to insert the text from the system clipboard into the text represented by this object. The valid range is 0..length. + * @returns Returns a flag that indicates whether the operation has been executed successfully. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the index is invalid + */ + pasteText(nIndex: number): boolean; + + /** + * Replaces text. + * + * The text between the two given indices is replaced by the specified replacement string. This method is equivalent to calling first {@link + * XAccessibleEditableText.deleteText()} with the two indices and afterwards calling {@link XAccessibleEditableText.insertText()} with the replacement + * text and the start index. + * + * The text indices are interpreted like those in the {@link XAccessibleText.getTextRange()} method. + * @param nStartIndex Start index of the text to be replaced. The valid range is 0..length. + * @param nEndIndex Start index of the text to be replaced. The valid range is 0..length. + * @param sReplacement The Text that replaces the text between the given indices. + * @returns Returns a flag that indicates whether the operation has been executed successfully. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the indices are invalid + */ + replaceText(nStartIndex: number, nEndIndex: number, sReplacement: string): boolean; + + /** + * Replaces the attributes of a text range by the given set of attributes. + * + * Sets the attributes for the text between and including the two given indices to those given. The old attributes of this text portion are replaced by + * the new list of attributes. + * + * The text indices are interpreted like those in the {@link XAccessibleText.getTextRange()} method. + * @param nStartIndex Start index of the text whose attributes are modified. The valid range is 0..length. + * @param nEndIndex Start index of the text whose attributes are modified. The valid range is 0..length. + * @param aAttributeSet Set of attributes that replaces the old list of attributes of the specified text portion. + * @returns Returns a flag that indicates whether the operation has been executed successfully. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the indices are invalid + */ + setAttributes(nStartIndex: number, nEndIndex: number, aAttributeSet: LibreOffice.SeqEquiv): boolean; + + /** + * Replaces the whole text with the given text. + * + * The text content of this object is set to the given string. + * @param sText The new text that replaces the old text. + * @returns Returns a flag that indicates whether the operation has been executed successfully. + */ + setText(sText: string): boolean; + } + + /** + * makes it possible to register listeners which are called whenever an accessibility event (see {@link AccessibleEventObject} ) occurs. + * @see AccessibleEventObject + * @see XAccessibleEventListener + * @since OOo 1.1.2 + */ + interface XAccessibleEventBroadcaster extends uno.XInterface { + /** registers the given {@link XAccessibleEventListener} . */ + addAccessibleEventListener(xListener: XAccessibleEventListener): void; + + /** unregisters the given {@link XAccessibleEventListener} . */ + removeAccessibleEventListener(xListener: XAccessibleEventListener): void; + } + + /** + * makes it possible to register a component as a listener, which is called whenever an accessibility event occurs. + * @see XAccessibleEventBroadcaster + * @since OOo 1.1.2 + */ + interface XAccessibleEventListener extends lang.XEventListener { + /** is called whenever a accessible event (see {@link AccessibleEventObject} ) occurs. */ + notifyEvent(aEvent: AccessibleEventObject): void; + } + + interface XAccessibleExtendedAttributes extends uno.XInterface { + readonly ExtendedAttributes: any; + getExtendedAttributes(): any; + } + + /** + * The {@link XAccessibleExtendedComponent} interface contains additional methods to those of the {@link XAccessibleComponent} interface. These methods + * provide information that is used not as often. The division into two interfaces allows classes to support the more frequently used methods of the + * {@link XAccessibleComponent} interface and only support the {@link XAccessibleExtendedComponent} interface if that makes sense for the class. + * + * This interface provides extended access to retrieve information concerning the graphical representation of an object. This interface combines methods + * from the Java interfaces `javax.accessibility.AccessibleComponent` and `javax.accessibility.AccessibleExtendedComponent` . + * @since OOo 1.1.2 + */ + interface XAccessibleExtendedComponent extends XAccessibleComponent { + /** + * Returns the font of this object. + * @returns The returned reference to a font object is empty if a font is not supported by this object. + */ + readonly Font: awt.XFont; + + /** + * Returns the font of this object. + * @returns The returned reference to a font object is empty if a font is not supported by this object. + */ + getFont(): awt.XFont; + + /** + * Returns the titled border text. + * + * This method stems from the Java interface `AccessibleExtendedComponent` . + * @returns The returned value is the titled border text of the object or empty if that is not supported. + */ + getTitledBorderText(): string; + + /** + * Returns the tool tip text of this object. + * + * This method stems from the Java interface `AccessibleExtendedComponent` . + * @returns Returns the localized tool tip text of the object. If tool tips are not supported and empty string is returned. + */ + getToolTipText(): string; + + /** + * Returns the titled border text. + * + * This method stems from the Java interface `AccessibleExtendedComponent` . + * @returns The returned value is the titled border text of the object or empty if that is not supported. + */ + readonly TitledBorderText: string; + + /** + * Returns the tool tip text of this object. + * + * This method stems from the Java interface `AccessibleExtendedComponent` . + * @returns Returns the localized tool tip text of the object. If tool tips are not supported and empty string is returned. + */ + readonly ToolTipText: string; + } + + interface XAccessibleGetAccFlowTo extends uno.XInterface { + getAccFlowTo(aXShape: any, nType: number): SafeArray; + } + + interface XAccessibleGroupPosition extends uno.XInterface { + getGroupPosition(accoject: any): SafeArray; + getObjectLink(accoject: any): string; + } + + /** + * Implement this interface to represent a hyperlink or a group of hyperlinks. + * + * Single hyperlinks correspond to simple tags. Groups of hyperlinks are contained in client side image maps. Linked objects and anchors are + * implementation dependent. This interface inherits the {@link XAccessibleAction} interface. Especially that interface's + * XAccessibleAction::getActionCount() method is needed to obtain a maximum value for the indices passed to the {@link + * XAccessibleHyperlink.getAccessibleActionAnchor()} and {@link XAccessibleHyperlink.getAccessibleActionObject()} methods. + * + * Furthermore, the object that implements this interface has to be connected implicitly or explicitly with an object that implements the the {@link + * XAccessibleText} interface. The {@link XAccessibleHyperlink.getStartIndex()} and {@link XAccessibleHyperlink.getEndIndex()} methods return indices + * with respect to the text exposed by that interface. + * @since OOo 1.1.2 + */ + interface XAccessibleHyperlink extends XAccessibleAction { + /** + * Returns the index at which the textual representation of the hyperlink (group) ends. + * + * The returned value relates to the {@link XAccessibleText} interface that owns this hyperlink. + * @returns The index relates to the text exposed by the {@link XAccessibleText} interface. + */ + readonly EndIndex: number; + + /** + * Returns an object that represents the link anchor, as appropriate for that link. + * + * For an HTML link for example, this method would return the string enclosed by the <&a href> tag. + * @param nIndex This index identifies the anchor when, as in the case of an image map, there is more than one link represented by this object. The valid m + * @returns If the index is not valid then an exception is thrown. Otherwise it returns an implementation dependent value. + */ + getAccessibleActionAnchor(nIndex: number): any; + + /** + * Returns an object that represents the link anchor, as appropriate for that link. + * + * For an HTML link for example, this method would return the URL of the <&a href> tag. + * @param nIndex This index identifies the action object when, as in the case of an image map, there is more than one link represented by this object. The + * @returns If the index is not valid then an exception is thrown. Otherwise it returns an implementation dependent value. + */ + getAccessibleActionObject(nIndex: number): any; + + /** + * Returns the index at which the textual representation of the hyperlink (group) ends. + * + * The returned value relates to the {@link XAccessibleText} interface that owns this hyperlink. + * @returns The index relates to the text exposed by the {@link XAccessibleText} interface. + */ + getEndIndex(): number; + + /** + * Returns the index at which the textual representation of the hyperlink (group) starts. + * + * The returned value relates to the {@link XAccessibleText} interface that owns this hyperlink. + * @returns The index relates to the text exposed by the {@link XAccessibleHypertext} interface. + */ + getStartIndex(): number; + + /** + * Returns whether the document referenced by this links is still valid. + * + * This is a volatile state that may change without further warning like e.g. sending an appropriate event. + * @returns Returns `TRUE` if the referenced document is still valid and `FALSE` otherwise. + */ + isValid(): boolean; + + /** + * Returns the index at which the textual representation of the hyperlink (group) starts. + * + * The returned value relates to the {@link XAccessibleText} interface that owns this hyperlink. + * @returns The index relates to the text exposed by the {@link XAccessibleHypertext} interface. + */ + readonly StartIndex: number; + } + + /** + * Implement this interface to expose the hypertext structure of a document. + * + * The {@link XAccessibleHypertext} interface is the main interface to expose hyperlinks in a document, typically a text document, that are used to + * reference other (parts of) documents. For supporting the XAccessibleHypertext::getLinkIndex() method of this interface and other character related + * methods of the {@link XAccessibleHyperlink} interface, it is necessary to also support the {@link XAccessibleText} interface. + * @see XAccessibleHyperlink, XAccessibleText + * @since OOo 1.1.2 + */ + interface XAccessibleHypertext extends XAccessibleText { + /** + * Return the specified link. + * + * The returned {@link XAccessibleHyperlink} object encapsulates the hyperlink and provides several kinds of information describing it. + * @param nLinkIndex This index specifies the hyperlink to return. + * @returns If the given index is valid, i.e. lies in the interval from 0 to the number of links minus one, a reference to the specified hyperlink object is + */ + getHyperLink(nLinkIndex: number): XAccessibleHyperlink; + + /** + * Returns the number of links and link groups contained within this hypertext document. + * @returns The number of links and link groups within this hypertext document. Returns 0 if there is no link. + */ + getHyperLinkCount(): number; + + /** + * Returns the index of the hyperlink that is associated with this character index. + * + * In a HTML document this is the case when a tag spans (includes) the given character index. + * @param nCharIndex Index of the character for which to return the link index. If the {@link XAccessibleText} interface is used to represent the text cont + * @returns Returns the index of the hyperlink that is associated with this character index, or throws an exception if there is no hyperlink associated with + * @see XAccessibleText. + */ + getHyperLinkIndex(nCharIndex: number): number; + + /** + * Returns the number of links and link groups contained within this hypertext document. + * @returns The number of links and link groups within this hypertext document. Returns 0 if there is no link. + */ + readonly HyperLinkCount: number; + } + + /** + * Implement this interface to represent images and icons. + * + * This interface is used for a representation of images like icons of buttons. The corresponding interface of the Java Accessibility API is + * AccessibleIcon. This interface lets you retrieve an image's size and description. + * @since OOo 1.1.2 + */ + interface XAccessibleImage extends uno.XInterface { + /** + * Returns the localized description of the image. + * + * It depends on the usage of an image whether the description should express the image's function (e.g. for icons) or the actual content of the image + * (e.g. for image maps or non-iconic images embedded into a document.) + * @returns Returns a localized string that describes the image's function or content. + */ + readonly AccessibleImageDescription: string; + + /** + * Returns the height of the image. + * + * The height is returned in units specified by the parents coordinate system. + * @returns Returns the image's height with respect to the parent's coordinate system. + */ + readonly AccessibleImageHeight: number; + + /** + * Returns the width of the image. + * + * The width is returned in units specified by the parents coordinate system. + * @returns Returns the image's width with respect to the parent's coordinate system. + */ + readonly AccessibleImageWidth: number; + + /** + * Returns the localized description of the image. + * + * It depends on the usage of an image whether the description should express the image's function (e.g. for icons) or the actual content of the image + * (e.g. for image maps or non-iconic images embedded into a document.) + * @returns Returns a localized string that describes the image's function or content. + */ + getAccessibleImageDescription(): string; + + /** + * Returns the height of the image. + * + * The height is returned in units specified by the parents coordinate system. + * @returns Returns the image's height with respect to the parent's coordinate system. + */ + getAccessibleImageHeight(): number; + + /** + * Returns the width of the image. + * + * The width is returned in units specified by the parents coordinate system. + * @returns Returns the image's width with respect to the parent's coordinate system. + */ + getAccessibleImageWidth(): number; + } + + /** + * This interface can be used to represent any number of key bindings which then can be associated to a certain action. + * + * There can be zero, one, or more key bindings. Each key binding consists of a sequence of {@link com.sun.star.awt.KeyStroke} objects. The association + * of an action with a key binding is established by the {@link XAccessibleAction} interface returning an {@link XAccessibleKeyBinding} object. + * + * A key binding describes alternative ways how to invoke an action with pressing one or more keys after each other. Each individual sequence of key + * strokes + * @since OOo 1.1.2 + */ + interface XAccessibleKeyBinding extends uno.XInterface { + /** + * Return the number of available key bindings. + * @returns The returned value may be 0 to indicate that there are no key bindings or the positive number of the available key bindings. + */ + readonly AccessibleKeyBindingCount: number; + + /** + * The returned sequence of key strokes describes one method to invoke the associated action (the one from which you obtained the object at which you + * called this method) by pressing keys. The keys specified by each of the returned key strokes have to be pressed at the same time (the Control-key and + * the A-key for example). The keys of one key stroke have to be released before pressing those of the next. The order of the key strokes in the sequence + * define the order in which to press them. + * @param nIndex The index selects one of alternative key bindings. It has to non-negative and smaller then the number of key bindings as returned by the { + * @returns The returned sequence of key strokes specifies one way to invoke the associated action. The sequence may be empty (but should not be; better not + * @throws com::sun::star::lang::IndexOutOfBoundsException if the index is not valid. + */ + getAccessibleKeyBinding(nIndex: number): SafeArray; + + /** + * Return the number of available key bindings. + * @returns The returned value may be 0 to indicate that there are no key bindings or the positive number of the available key bindings. + */ + getAccessibleKeyBindingCount(): number; + } + + /** + * Implement this interface to give provide a mapping between text index and line numbers. + * + * This interface is typically used in conjunction with the {@link XAccessibleText} interface and extents it with a notion of line numbers + * @since OOo 3.0 + */ + interface XAccessibleMultiLineText extends XAccessibleText { + /** + * Returns the line number at the specified index. + * + * For a text object that is spread over multiple lines, this method provides a mapping from a text index to the corresponding line number. + * @param nIndex Index for which the line number should be returned. The valid range is 0..length. + * @returns Returns the line number of the specified text index. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the index is invalid. + */ + getLineNumberAtIndex(nIndex: number): number; + + /** + * Returns the number of the line in which the caret is located. + * + * The line number returned will most of the time be identical to calling {@link XAccessibleMultiLineText.getLineNumberAtIndex()} with the index returned + * by {@link XAccessibleText.getCaretPosition()} beside the following special case: + * + * Some text implementations place the caret at the end of the current line when the **End** key gets pressed. Since the index of this position is + * identical to the one of the first character of the following line, {@link XAccessibleMultiLineText.getLineNumberAtIndex()} will return the line + * following the current one in this case. + * @returns Returns the index of the line in which the caret is located or -1 if the paragraph does not have a valid caret position. + */ + getNumberOfLineWithCaret(): number; + + /** + * Returns the text of the specified line. + * + * Returns the substring of text that makes up the specified line number. + * + * The number of lines can be obtained by calling {@link XAccessibleMultiLineText.getLineNumberAtIndex()} with the index of the last character. In a + * loop, the last line has been reached when {@link TextSegment.SegmentEnd} of the returned value is equal to the index of the last character of the + * text. + * @param nLineNo The number of the line to return the substring from. The valid range is 0..getLineNumberAtIndex(getCharacterCount()). + * @returns Returns the requested text portion. This portion may be empty or invalid when no appropriate text portion is found. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the line number is invalid + */ + getTextAtLineNumber(nLineNo: number): TextSegment; + + /** + * Returns the text of the line in which the caret is located. + * + * The substring returned will most of the time be identical to calling {@link XAccessibleText.getTextAtIndex()} with the index returned by {@link + * XAccessibleText.getCaretPosition()} and type {@link AccessibleTextType.LINE} beside the following special case: + * + * Some text implementations place the caret at the end of the current line when the **End** key gets pressed. Since the index of this position is + * identical to the one of the first character of the following line, {@link XAccessibleMultiLineText.getLineNumberAtIndex()} will return the line + * following the current one in this case. + * @returns Returns the requested text portion. This portion may be empty or invalid if the paragraph object does not have a valid caret position. + */ + getTextAtLineWithCaret(): TextSegment; + + /** + * Returns the number of the line in which the caret is located. + * + * The line number returned will most of the time be identical to calling {@link XAccessibleMultiLineText.getLineNumberAtIndex()} with the index returned + * by {@link XAccessibleText.getCaretPosition()} beside the following special case: + * + * Some text implementations place the caret at the end of the current line when the **End** key gets pressed. Since the index of this position is + * identical to the one of the first character of the following line, {@link XAccessibleMultiLineText.getLineNumberAtIndex()} will return the line + * following the current one in this case. + * @returns Returns the index of the line in which the caret is located or -1 if the paragraph does not have a valid caret position. + */ + readonly NumberOfLineWithCaret: number; + + /** + * Returns the text of the line in which the caret is located. + * + * The substring returned will most of the time be identical to calling {@link XAccessibleText.getTextAtIndex()} with the index returned by {@link + * XAccessibleText.getCaretPosition()} and type {@link AccessibleTextType.LINE} beside the following special case: + * + * Some text implementations place the caret at the end of the current line when the **End** key gets pressed. Since the index of this position is + * identical to the one of the first character of the following line, {@link XAccessibleMultiLineText.getLineNumberAtIndex()} will return the line + * following the current one in this case. + * @returns Returns the requested text portion. This portion may be empty or invalid if the paragraph object does not have a valid caret position. + */ + readonly TextAtLineWithCaret: TextSegment; + } + + /** + * Implement this interface to give access to an object's set of relations. + * + * Such relation are modeled with the {@link AccessibleRelation} structure. This interface is used for representing sets of relations between {@link + * Accessible} objects. Most of the convenience methods of the corresponding AccessibleRelationSet interface of the Java Accessibility API have been + * removed from this interface in order to clean it up. These methods are add(), addAll(), clear(), and remove(). The other methods have been renamed to + * achieve a greater conformance with the other accessibility interfaces. + * @since OOo 1.1.2 + */ + interface XAccessibleRelationSet extends uno.XInterface { + /** + * Tests whether the relation set contains a relation matching the specified key. + * @param aRelationType The type of relation to look for in this set of relations. This has to be one of the constants of {@link AccessibleRelationType} . + * @returns Returns `TRUE` if there is a (at least one) relation of the given type and `FALSE` if there is no such relation in the set. + */ + containsRelation(aRelationType: number): boolean; + + /** + * Returns the relation of this relation set that is specified by the given index. + * @param nIndex This index specifies the relation to return. + * @returns For a valid index, i.e. inside the range 0 to the number of relations minus one, the returned value is the requested relation. If the index is in + */ + getRelation(nIndex: number): AccessibleRelation; + + /** + * Retrieve and return the relation with the given relation type. + * @param aRelationType The type of the relation to return. This has to be one of the constants of {@link AccessibleRelationType} . + * @returns If a relation with the given type could be found than (a copy of) this relation is returned. Otherwise a relation with the type INVALID is returned. + */ + getRelationByType(aRelationType: number): AccessibleRelation; + + /** + * Returns the number of relations in this relation set. + * @returns Returns the number of relations or zero if there are none. + */ + getRelationCount(): number; + + /** + * Returns the number of relations in this relation set. + * @returns Returns the number of relations or zero if there are none. + */ + readonly RelationCount: number; + } + + /** + * Implement this interface to represent a selection of accessible objects. + * + * This interface is the standard mechanism to obtain and modify the currently selected children. Every object that has children that can be selected + * should support this interface. + * + * The {@link XAccessibleSelection} interface has to be implemented in conjunction with the {@link XAccessibleContext} interface that provides the + * children on which the first operates. + * + * It depends on the class implementing this interface, whether it supports single or multi selection. + * @since OOo 1.1.2 + */ + interface XAccessibleSelection extends uno.XInterface { + /** Clears the selection, so that no children of the object are selected. */ + clearAccessibleSelection(): void; + + /** + * Removes the specified child from the set of this object's selected children. Note that not all applications support deselection: calls to this method + * may be silently ignored. + * @param nChildIndex This index refers to all children not just the selected ones. If the specified child is not selected or it can not be deselected for + * @throws com::sun::star::lang::IndexOutOfBoundsException if the given index does not lie in the valid range of 0 up to, but not including, the result of { + */ + deselectAccessibleChild(nChildIndex: number): void; + + /** + * Returns the specified selected {@link Accessible} child. + * @param nSelectedChildIndex This index refers only to the selected children, not to all the children of this object. Even if all children are selected, t + * @returns If the index is valid, i.e. not negative and lower than the number of selected children, then a valid reference to the corresponding {@link XAcce + * @throws com::sun::star::lang::IndexOutOfBoundsException if the given index does not lie in the valid range of 0 up to the result of XAccessibleRelationSe + */ + getSelectedAccessibleChild(nSelectedChildIndex: number): XAccessible; + + /** + * Returns the number of {@link Accessible} children that are currently selected. + * + * This number specifies the valid interval of indices that can be used as arguments for the methods XAccessibleSelection::getSelectedChild() and + * XAccessibleSelection::deselectSelectedChild(). + * @returns Returns the number of selected children of this object or 0 if no child is selected. + */ + getSelectedAccessibleChildCount(): number; + + /** + * Determines if the specified child of this object is selected. + * @param nChildIndex Index of the child for which to detect whether it is selected. This index refers to all the children of this object. + * @returns Returns `TRUE` if the specified child is selected and `FALSE` if it is not selected. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the given index does not lie in the valid range of 0 up to the result of {@link XAccessibleCon + */ + isAccessibleChildSelected(nChildIndex: number): boolean; + + /** + * Selects the specified {@link Accessible} child of the object. + * + * Depending on the implementing class the child is added to the current set a selected children (multi selection) or a previously selected child is + * deselected first (single selection). + * @param nChildIndex Index of the child which is to add to the selection. This index refers to all the children of this object. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the given index does not lie in the valid range of 0 up to the result of {@link XAccessibleCon + */ + selectAccessibleChild(nChildIndex: number): void; + + /** + * Select all children. + * + * Causes every child of the object to be selected if the object supports multiple selections. If multiple selection is not supported then the first + * child, if it exists, is selected and all other children are deselected. + */ + selectAllAccessibleChildren(): void; + + /** + * Returns the number of {@link Accessible} children that are currently selected. + * + * This number specifies the valid interval of indices that can be used as arguments for the methods XAccessibleSelection::getSelectedChild() and + * XAccessibleSelection::deselectSelectedChild(). + * @returns Returns the number of selected children of this object or 0 if no child is selected. + */ + readonly SelectedAccessibleChildCount: number; + } + + /** + * Implement this interface to represent a set of states. + * + * The interface {@link XAccessibleStateSet} represents a set of states of an accessible object. It can hold any combination of states defined by the + * constants collection {@link AccessibleStateType} . + * @since OOo 1.1.2 + */ + interface XAccessibleStateSet extends uno.XInterface { + /** + * Checks if the given state is a member of the state set of the called object. + * @param aState The state for which to check membership. This has to be one of the constants of {@link AccessibleStateType} . + * @returns Returns `TRUE` if the given state is a member of this object's state set and `FALSE` otherwise. + */ + contains(aState: number): boolean; + + /** + * Checks if all of the given states are in the state set of the called object. + * @param aStateSet This sequence of states is interpreted as set and every of its members, duplicates are ignored, is checked for membership in this objec + * @returns Returns `TRUE` if all states of the given state set are members of this object's state set. `FALSE` is returned if at least one of the states in + */ + containsAll(aStateSet: LibreOffice.SeqEquiv): boolean; + + /** + * Get all currently set states as a sequence of state ids. + * + * The purpose of this function is to reduce the communication between accessibility objects and AT. Without this function an AT-Tool had to call {@link + * contains()} for every state type. Now a single call is sufficient. + * @returns The returned sequence contains one entry for every currently set state. This entry is the id of that state. The order of the states in the sequen + */ + getStates(): SafeArray; + + /** + * Checks whether the current state set is empty. + * @returns Returns `TRUE` if there is no state in this state set and `FALSE` if there is at least one set state in it. + */ + isEmpty(): boolean; + + /** + * Get all currently set states as a sequence of state ids. + * + * The purpose of this function is to reduce the communication between accessibility objects and AT. Without this function an AT-Tool had to call {@link + * contains()} for every state type. Now a single call is sufficient. + * @returns The returned sequence contains one entry for every currently set state. This entry is the id of that state. The order of the states in the sequen + */ + readonly States: SafeArray; + } + + /** + * Implement this interface to give access to a two-dimensional table. + * + * The {@link XAccessibleTable} interface is used to represent two-dimensional tables. This interface combines the two interfaces + * `javax.accessibility.AccessibleTable` and `javax.accessibility.AccessibleExtendedTable` of the Java Accessibility API (version 1.4). + * + * All {@link XAccessible} objects that represent cells or cell-clusters of a table have to be at the same time children of the table. This is necessary + * to be able to convert row and column indices into child indices and vice versa with the methods {@link XAccessibleTable.getAccessibleIndex()} , {@link + * XAccessibleTable.getAccessibleRow()} , and {@link XAccessibleTable.getAccessibleColumn()} . + * + * The range of valid coordinates for this interface are implementation dependent. However, that range includes at least the intervals from the from the + * first row or column with the index 0 up to the last (but not including) used row or column as returned by {@link + * XAccessibleTable.getAccessibleRowCount()} and {@link XAccessibleTable.getAccessibleColumnCount()} . In case of the Calc the current range of valid + * indices for retrieving data include the maximal table size - 256 columns and 32000 rows - minus one. + * @since OOo 1.1.2 + */ + interface XAccessibleTable extends uno.XInterface { + /** + * Returns the caption for the table. + * @returns If the table has a caption then a reference to it is returned, else an empty reference is returned. + */ + readonly AccessibleCaption: XAccessible; + + /** + * Returns the number of used columns in the table. + * + * The implementation, however, may allow the access of columns beyond this number. + * @returns Returns the number of used columns in the table or 0 for an empty table. + */ + readonly AccessibleColumnCount: number; + + /** + * Returns the column headers as an {@link XAccessibleTable} object. + * + * Content and size of the returned table are implementation dependent. + * @returns Returns always a valid reference to an {@link XAccessibleTable} object. + */ + readonly AccessibleColumnHeaders: XAccessibleTable; + + /** + * Returns the number of used rows in the table. + * + * The implementation, however, may allow the access of columns beyond this number. + * @returns Returns the number of used rows in the table or 0 for an empty table. + */ + readonly AccessibleRowCount: number; + + /** + * Returns the row headers as an {@link XAccessibleTable} object. + * + * Content and size of the returned table are implementation dependent. + * @returns Returns always a valid reference to an {@link XAccessibleTable} object. + */ + readonly AccessibleRowHeaders: XAccessibleTable; + + /** + * Returns the summary description of the table. + * @returns Returns a reference to an implementation dependent {@link XAccessible} object representing the table's summary or an empty reference if the table + */ + readonly AccessibleSummary: XAccessible; + + /** + * Returns the caption for the table. + * @returns If the table has a caption then a reference to it is returned, else an empty reference is returned. + */ + getAccessibleCaption(): XAccessible; + + /** + * Returns the {@link XAccessible} object at the specified row and column in the table. + * + * This method has been renamed from the Java name `getAccessibleAt` to {@link XAccessibleTable.getAccessibleCellAt()} to avoid ambiguities with the + * XAccessibleComponent::getAccessibleAt() method when accessed, for instance, from StarBasic. + * @param nRow The row index for which to retrieve the cell. + * @param nColumn The column index for which to retrieve the cell. + * @returns If both row and column index are valid then the corresponding {@link XAccessible} object is returned that represents the requested cell regardles + * @throws com::sun::star::lang::IndexOutOfBoundsException if the specified column and/or row index is not valid, i.e. lies not inside the valid range of 0 + */ + getAccessibleCellAt(nRow: number, nColumn: number): XAccessible; + + /** + * Translate the given child index into the corresponding column index. + * @param nChildIndex Index of the child of the table for which to return the column index. + * @returns Returns the column index of the cell of the specified child or the index of the first column if the child spans multiple columns. + * @throws com::sun::star::lang::IndexOutOfBoundsException if nChildIndex addresses an invalid column. + */ + getAccessibleColumn(nChildIndex: number): number; + + /** + * Returns the number of used columns in the table. + * + * The implementation, however, may allow the access of columns beyond this number. + * @returns Returns the number of used columns in the table or 0 for an empty table. + */ + getAccessibleColumnCount(): number; + + /** + * Returns the description text of the specified column in the table. + * @param nColumn The index of the column for which to retrieve the description. + * @returns Returns the description text of the specified row in the table if such a description exists. Otherwise an empty string is returned. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the specified column index is not valid, i.e. lies not inside the valid range of 0 up to {@lin + */ + getAccessibleColumnDescription(nColumn: number): string; + + /** + * Returns the number of columns occupied by the {@link Accessible} at the specified row and column in the table. + * + * The result differs from 1 if the specified cell spans multiple columns. + * @param nRow Row index of the accessible for which to return the column extent. + * @param nColumn Column index of the accessible for which to return the column extent. + * @returns Returns the column extent of the specified. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the specified column index is not valid, i.e. lies not inside the valid range of 0 up to {@lin + */ + getAccessibleColumnExtentAt(nRow: number, nColumn: number): number; + + /** + * Returns the column headers as an {@link XAccessibleTable} object. + * + * Content and size of the returned table are implementation dependent. + * @returns Returns always a valid reference to an {@link XAccessibleTable} object. + */ + getAccessibleColumnHeaders(): XAccessibleTable; + + /** + * Returns the child index of the accessible object that spans the specified cell. + * + * This is the same index that would be returned by calling {@link XAccessibleContext.getAccessibleIndexInParent()} for that accessible object. + * @param nRow Row index of the accessible object for which to return the child index. + * @param nColumn Row index of the accessible object for which to return the child index. + * @returns Child index of the specified accessible object or -1 if one or both of the given indices is/are invalid. + */ + getAccessibleIndex(nRow: number, nColumn: number): number; + + /** + * Translate the given child index into the corresponding row index. + * @param nChildIndex Index of the child of the table for which to return the row index. + * @returns Returns the row index of the cell of the specified child or the index of the first row if the child spans multiple rows. + * @throws com::sun::star::lang::IndexOutOfBoundsException if nChildIndex addresses an invalid row. + */ + getAccessibleRow(nChildIndex: number): number; + + /** + * Returns the number of used rows in the table. + * + * The implementation, however, may allow the access of columns beyond this number. + * @returns Returns the number of used rows in the table or 0 for an empty table. + */ + getAccessibleRowCount(): number; + + /** + * Returns the description text of the specified row in the table. + * @param nRow The index of the row for which to retrieve the description. + * @returns Returns the description text of the specified row in the table if such a description exists. Otherwise an empty string is returned. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the specified row index is not valid, i.e. lies not inside the valid range of 0 up to {@link X + */ + getAccessibleRowDescription(nRow: number): string; + + /** + * Returns the number of rows occupied by the {@link Accessible} at the specified row and column in the table. + * + * The result differs from 1 if the specified cell spans multiple rows. + * @param nRow Row index of the accessible for which to return the column extent. + * @param nColumn Column index of the accessible for which to return the column extent. + * @returns Returns the row extent of the specified cell. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the specified row index is not valid, i.e. lies not inside the valid range of 0 up to {@link X + */ + getAccessibleRowExtentAt(nRow: number, nColumn: number): number; + + /** + * Returns the row headers as an {@link XAccessibleTable} object. + * + * Content and size of the returned table are implementation dependent. + * @returns Returns always a valid reference to an {@link XAccessibleTable} object. + */ + getAccessibleRowHeaders(): XAccessibleTable; + + /** + * Returns the summary description of the table. + * @returns Returns a reference to an implementation dependent {@link XAccessible} object representing the table's summary or an empty reference if the table + */ + getAccessibleSummary(): XAccessible; + + /** + * Returns a list of the indices of completely selected columns in a table. + * @returns The returned sequence contains indices of all completely selected columns in the table. This sequence is in ascending order. If no column is sele + */ + getSelectedAccessibleColumns(): SafeArray; + + /** + * Returns a list of the indices of completely selected rows in a table. + * @returns The returned sequence contains indices of all completely selected rows in the table. This sequence is in ascending order. If no row is selected t + */ + getSelectedAccessibleRows(): SafeArray; + + /** + * Returns a boolean value indicating whether the specified column is completely selected. + * @param nColumn Index of the column for which to determine whether it is selected. + * @returns Returns `TRUE` if the specified column is selected completely and `FALSE` otherwise. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the specified column index is not valid, i.e. lies not inside the valid range of 0 up to {@lin + */ + isAccessibleColumnSelected(nColumn: number): boolean; + + /** + * Returns a boolean value indicating whether the specified row is completely selected. + * @param nRow Index of the row for which to determine whether it is selected. + * @returns Returns `TRUE` if the specified row is selected completely and `FALSE` otherwise. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the specified row index is not valid, i.e. lies not inside the valid range of 0 up to {@link X + */ + isAccessibleRowSelected(nRow: number): boolean; + + /** + * Returns a boolean value indicating whether the accessible at the specified row and column is selected. + * @param nRow Row index of the cell for which to determine if the accessible object that spans that cell is selected. + * @param nColumn Column index of the cell for which to determine if the accessible object that spans that cell is selected. + * @returns Returns `TRUE` if the given row and column indices are valid and the specified accessible object is selected. Otherwise `FALSE` is returned. + */ + isAccessibleSelected(nRow: number, nColumn: number): boolean; + + /** + * Returns a list of the indices of completely selected columns in a table. + * @returns The returned sequence contains indices of all completely selected columns in the table. This sequence is in ascending order. If no column is sele + */ + readonly SelectedAccessibleColumns: SafeArray; + + /** + * Returns a list of the indices of completely selected rows in a table. + * @returns The returned sequence contains indices of all completely selected rows in the table. This sequence is in ascending order. If no row is selected t + */ + readonly SelectedAccessibleRows: SafeArray; + } + + interface XAccessibleTableSelection extends uno.XInterface { + selectColumn(column: number): boolean; + selectRow(row: number): boolean; + unselectColumn(column: number): boolean; + unselectRow(row: number): boolean; + } + + /** + * Implement this interface to give read-only access to a text. + * + * The {@link XAccessibleText} interface should be implemented by all UNO components that present textual information on the display like buttons, text + * entry fields, or text portions of the document window. The interface provides access to the text's content, attributes, and spatial location. However, + * text can not be modified with this interface. That is the task of the {@link XAccessibleEditableText} interface. + * + * The text length, i.e. the number of characters in the text, is returned by {@link XAccessibleText.getCharacterCount()} . All methods that operate on + * particular characters (e.g. XAccessibleText::getCharacterAt()) use character indices from 0 to length-1. All methods that operate on character + * positions (e.g. {@link XAccessibleText.getTextRange()} ) use indices from 0 to length. + * + * Please note that accessible text does not necessarily support selection. In this case it should behave as if there where no selection. An empty + * selection is used for example to express the current cursor position. + * @since OOo 1.1.2 + */ + interface XAccessibleText extends uno.XInterface { + /** + * Return the position of the caret. + * + * Returns the offset of the caret. The caret is often called text cursor. The caret is actually the position between two characters. Its position/offset + * is that of the character to the right of it. + * @returns The returned offset is relative to the text represented by this object. + */ + CaretPosition: number; + + /** + * Return the number of characters in the represented text. + * + * Returns the number of characters in the text represented by this object or, in other words, the text length. + * @returns Returns the number of characters of this object's text. A zero value indicates an empty text. + */ + readonly CharacterCount: number; + + /** + * Copy the specified text into the clipboard. + * + * Copy the specified text into the clipboard. The text that is copied is the same text that would have been selected by the {@link + * XAccessibleText.getTextRange()} method. + * + * The other clipboard related methods {@link XAccessibleEditableText.cutText()} and {@link XAccessibleEditableText.deleteText()} can be found in the + * {@link XAccessibleEditableText} because of their destructive nature. + * @param nStartIndex Start index of the text to copied into the clipboard. The valid range is 0..length. + * @param nEndIndex End index of the text to copied into the clipboard. The valid range is 0..length. + * @returns Returns `TRUE` if the specified text has been copied successfully into the clipboard. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the indices are invalid + */ + copyText(nStartIndex: number, nEndIndex: number): boolean; + + /** + * Return the position of the caret. + * + * Returns the offset of the caret. The caret is often called text cursor. The caret is actually the position between two characters. Its position/offset + * is that of the character to the right of it. + * @returns The returned offset is relative to the text represented by this object. + */ + getCaretPosition(): number; + + /** + * Return the character at the specified position. + * + * Returns the character at the given index. + * @param nIndex The index of the character to return. The valid range is 0..length-1. + * @returns the character at the index nIndex. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the index is invalid + */ + getCharacter(nIndex: number): string; + + /** + * Get the attribute set for the specified position. + * + * Returns a set of attributes that are associated for the character at the given index. To prevent the method from returning possibly large sets of + * attributes that the caller is not interested in the caller has to provide a list of attributes that he wants to be returned. + * @param nIndex The index of the character for which to return its attributes. The valid range is 0..length-1. + * @param aRequestedAttributes This string sequence defines the set of attributes that the caller is interested in. When there are attributes defined that + * @returns Returns the explicitly or implicitly (empty aRequestedAttributes argument) requested attributes of the specified character. Each attribute is rep + * @throws com::sun::star::lang::IndexOutOfBoundsException if the index is invalid + */ + getCharacterAttributes(nIndex: number, aRequestedAttributes: LibreOffice.SeqEquiv): SafeArray; + + /** + * Return the bounding box of the specified position. + * + * Returns the bounding box of the indexed character. + * + * The virtual character after the last character of the represented text, i.e. the one at position length is a special case. It represents the current + * input position and will therefore typically be queried by AT more often than other positions. Because it does not represent an existing character its + * bounding box is defined in relation to preceding characters. It should be roughly equivalent to the bounding box of some character when inserted at + * the end of the text. Its height typically being the maximal height of all the characters in the text or the height of the preceding character, its + * width being at least one pixel so that the bounding box is not degenerate. ; Note that the index "length" is not always valid. Whether it is or not + * is implementation dependent. It typically is when text is editable or otherwise when on the screen the caret can be placed behind the text. You can be + * sure that the index is valid after you have received a AccessibleEventId::CARET event for this index. + * @param nIndex Index of the character for which to return its bounding box. The valid range is 0..length. + * @returns The bounding box of the referenced character. The bounding box of the virtual character at position length has to have non-empty dimensions. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the index is invalid + */ + getCharacterBounds(nIndex: number): awt.Rectangle; + + /** + * Return the number of characters in the represented text. + * + * Returns the number of characters in the text represented by this object or, in other words, the text length. + * @returns Returns the number of characters of this object's text. A zero value indicates an empty text. + */ + getCharacterCount(): number; + + /** + * Return the text position for the specified screen position. + * + * Given a point in local coordinates, i.e. relative to the coordinate system of the object, return the zero-based index of the character under that + * point. The same functionality could be achieved by using the bounding boxes for each character as returned by {@link + * XAccessibleText.getCharacterBounds()} . The method {@link XAccessibleText.getIndexAtPoint()} , however, can be implemented in a more efficient way. + * @param aPoint The position for which to look up the index of the character that is rendered on to the display at that point. + * @returns Index of the character under the given point or -1 if the point is invalid or there is no character under the point. + */ + getIndexAtPoint(aPoint: awt.Point): number; + + /** + * Return the selected text. + * + * Returns the portion of the text that is selected. + * @returns The returned text is the selected portion of the object's text. If no text is selected when this method is called or when selection is not suppor + */ + getSelectedText(): string; + + /** + * Return the position of the end of the selection. + * + * Returns the index of the end of the selected text. + * @returns If there is no selection or selection is not supported the position of selection start and end will be the same undefined value. + */ + getSelectionEnd(): number; + + /** + * Return the position of the start of the selection. + * + * Returns the index of the start of the selected text. + * @returns If there is no selection or selection is not supported the position of selection start and end will be the same undefined value. + */ + getSelectionStart(): number; + + /** + * Return the whole text. + * + * Returns the complete text. This is equivalent to a call to {@link XAccessibleText.getTextRange()} with the arguments zero and `getCharacterCount()-1` + * . + * @returns Returns a string that contains the complete text. + */ + getText(): string; + + /** + * Get a text portion around the given position. + * + * Returns the substring of the specified text type that contains the character at the given index, if any. For example, given the text type {@link + * AccessibleTextType.WORD} , the word which contains the character at position nIndex is returned, or an empty string if no word is found at the that + * position. + * @param nIndex Index of the character whose containing text portion is to be returned. The valid range is 0..length. + * @param nTextType The type of the text portion to return. See {@link AccessibleTextType} for the complete list. + * @returns Returns the requested text portion. This portion may be empty or invalid when no appropriate text portion is found or text type is invalid. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the index is invalid + * @throws com::sun::star::lang::IllegalArgumentException if the given text type is not valid. + */ + getTextAtIndex(nIndex: number, nTextType: number): TextSegment; + + /** + * Get a text portion before the given position. + * + * Returns the substring of the specified text type that is located before the given character and does not include it. The result of this method should + * be same as a result for {@link XAccessibleText.getTextAtIndex()} with a suitably decreased index value. + * + * For example, if text type is {@link AccessibleTextType.WORD} , then the complete word that is closest to and located before nIndex is returned. + * + * If the index is valid, but no suitable word (or other text type) is found, an empty text segment is returned. + * @param nIndex Index of the character for which to return the text part before it. The index character will not be part of the returned string. The valid + * @param nTextType The type of the text portion to return. See {@link AccessibleTextType} for the complete list. + * @returns Returns the requested text portion. This portion may be empty or invalid when no appropriate text portion is found or text type is invalid. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the index is invalid. + * @throws com::sun::star::lang::IllegalArgumentException if the given text type is not valid. + */ + getTextBeforeIndex(nIndex: number, nTextType: number): TextSegment; + + /** + * Get a text portion behind the given position. + * + * Returns the substring of the specified text type that is located after the given character and does not include it. The result of this method should + * be same as a result for {@link XAccessibleText.getTextAtIndex()} with a suitably increased index value. + * + * For example, if text type is {@link AccessibleTextType.WORD} , then the complete word that is closest to and located behind nIndex is returned. + * + * If the index is valid, but no suitable word (or other text type) is found, an empty string is returned. + * @param nIndex Index of the character for which to return the text part after it. The index character will be part of the returned string. The valid rang + * @param nTextType The type of the text portion to return. See {@link AccessibleTextType} for the complete list. + * @returns Returns the requested text portion. This portion may be empty or invalid when no appropriate text portion is found or text type is invalid. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the index is invalid + * @throws com::sun::star::lang::IllegalArgumentException if the given text type is not valid. + */ + getTextBehindIndex(nIndex: number, nTextType: number): TextSegment; + + /** + * Return the specified text range. + * + * Returns the substring between the two given indices. + * + * The substring starts with the character at nStartIndex (inclusive) and up to the character at nEndIndex (exclusive), if nStartIndex is less or equal + * nEndIndex. If nEndIndex is lower than nStartIndex, the result is the same as a call with the two arguments being exchanged. + * + * The whole text can be requested by passing the indices zero and `getCharacterCount()` . If both indices have the same value, an empty string is + * returned. + * @param nStartIndex Index of the first character to include in the returned string. The valid range is 0..length. + * @param nEndIndex Index of the last character to exclude in the returned string. The valid range is 0..length. + * @returns Returns the substring starting with the character at nStartIndex (inclusive) and up to the character at nEndIndex (exclusive), if nStartIndex is + * @throws com::sun::star::lang::IndexOutOfBoundsException if the indices are invalid + */ + getTextRange(nStartIndex: number, nEndIndex: number): string; + + /** + * Return the selected text. + * + * Returns the portion of the text that is selected. + * @returns The returned text is the selected portion of the object's text. If no text is selected when this method is called or when selection is not suppor + */ + readonly SelectedText: string; + + /** + * Return the position of the end of the selection. + * + * Returns the index of the end of the selected text. + * @returns If there is no selection or selection is not supported the position of selection start and end will be the same undefined value. + */ + readonly SelectionEnd: number; + + /** + * Return the position of the start of the selection. + * + * Returns the index of the start of the selected text. + * @returns If there is no selection or selection is not supported the position of selection start and end will be the same undefined value. + */ + readonly SelectionStart: number; + + /** + * Set the position of the caret. + * + * The caret is often called text cursor. The caret is actually the position between two characters. Its position/offset is that of the character to the + * right of it. + * + * Setting the caret position may or may not alter the current selection. A change of the selection is notified to the accessibility event listeners with + * an AccessibleEventId::ACCESSIBLE_SELECTION_EVENT. + * + * When the new caret position differs from the old one (which, of course, is the standard case) this is notified to the accessibility event listeners + * with an AccessibleEventId::ACCESSIBLE_CARET_EVENT. + * @param nIndex The new index of the caret. This caret is actually placed to the left side of the character with that index. An index of 0 places the care + * @returns Returns `TRUE` if the caret has been moved and `FALSE` otherwise. A `TRUE` value does not necessarily mean that the caret has been positioned exa + * @throws com::sun::star::lang::IndexOutOfBoundsException if the index is not valid. + */ + setCaretPosition(nIndex: number): boolean; + + /** + * Set a new selection. + * + * Sets the selected text portion according to the given indices. The old selection is replaced by the new selection. + * + * The selection encompasses the same string of text that {@link XAccessibleText.getTextRange()} would have selected. See there for details. + * + * Setting the selection may or may not change the caret position. Typically the caret is moved to the position after the second argument. When the caret + * is moved this is notified to the accessibility event listeners with an AccessibleEventId::ACCESSIBLE_CARET_EVENT. + * @param nStartIndex The first character of the new selection. The valid range is 0..length. + * @param nEndIndex The position after the last character of the new selection. The valid range is 0..length. + * @returns Returns `TRUE` if the selection has been set successfully and `FALSE` otherwise or when selection is not supported. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the indices are invalid + */ + setSelection(nStartIndex: number, nEndIndex: number): boolean; + + /** + * Return the whole text. + * + * Returns the complete text. This is equivalent to a call to {@link XAccessibleText.getTextRange()} with the arguments zero and `getCharacterCount()-1` + * . + * @returns Returns a string that contains the complete text. + */ + readonly Text: string; + } + + /** + * Implement this interface to give access to the attributes of a text. + * @since OOo 2.0.4 + */ + interface XAccessibleTextAttributes { + /** + * Get the default attribute set for the text. + * + * Returns a set of all default paragraph and default character attributes that are associated for the text. To prevent the method from returning + * possibly large sets of attributes that the caller is not interested in the caller can provide a list of attributes that he wants to be returned. + * @param RequestedAttributes This string sequence defines the set of attributes that the caller is interested in. When there are requested attributes that + * @returns Returns the requested attributes of the text. Each attribute is represented by a {@link com.sun.star.beans.PropertyValue} object. + */ + getDefaultAttributes(RequestedAttributes: LibreOffice.SeqEquiv): SafeArray; + + /** + * Get the run attribute set for the specified position. + * + * Returns a set of character attributes that are associated for the character at the given index and are directly set or are set via a character style. + * To prevent the method from returning all of these attributes the caller can provide a list of attributes that he wants to be returned. + * @param Index The index of the character for which to return its attributes. The valid range is 0..length of text-1. + * @param RequestedAttributes This string sequence defines the set of attributes that the caller is interested in. When there are requested attributes that + * @returns Returns the requested attributes of the specified character. Each attribute is represented by a {@link com.sun.star.beans.PropertyValue} object. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the index is invalid + */ + getRunAttributes(Index: number, RequestedAttributes: LibreOffice.SeqEquiv): SafeArray; + } + + /** + * Implement this interface to expose the text markups of a text. + * + * The {@link XAccessibleTextMarkup} interface is the main interface to expose text markups in a text, typically of a text document, that are used to + * reference other (parts of) documents. For supporting the XAccessibleTextMarkup::getTextMarkupIndex() method of this interface and other character + * related methods of the {@link XAccessibleTextMarkup} interface, it is necessary to also support the {@link XAccessibleText} interface. + * @see XAccessibleText + * @since OOo 3.0 + */ + interface XAccessibleTextMarkup extends XAccessibleText { + /** + * Returns the text segment of the text markup of the given index and of the given text mark type + * + * Throws IndexOutOfBoundsException, if given index is out of valid range. + * + * Throws IllegalArgumentException, if given text markup type is out of valid range. + * @param TextMarkupIndex This index specifies the text markup to return. + * @param TextMarkupType This specifies the type of the text markup to be returned - see TextMarkupType. + * @returns If the given index is in range [0..getTextMarkupCount(TextMarkupType)-1], the text segment - see {@link TextSegment} - of the text markup of the + */ + getTextMarkup(TextMarkupIndex: number, TextMarkupType: number): TextSegment; + + /** + * returns a sequence of the text segments of the text markups at the given character index and of the given text markup type. + * + * Throws IndexOutOfBoundsException, if given character index is out of range [0..number of characters in the text). + * + * Throws IllegalArgumentException, if given text markup type is out of valid range. + * @param CharIndex This index specifies the character index in the text. + * @param TextMarkupType This specifies the type of the text markups to be returned - see TextMarkupType. + * @returns If character index is in range [0..number of characters in the text-1], a sequence of TextSegments of the text markups at given character index o + */ + getTextMarkupAtIndex(CharIndex: number, TextMarkupType: number): SafeArray; + + /** + * Returns the number of text markup of the given text markup type of a text. + * + * Throws IllegalArgumentException, if given text markup type is out of valid range. + * @param TextMarkupType This specifies the type of text markups, whose count should be returned - see TextMarkupType. + * @returns The number of text markup of the given text markup type. Returns 0 if there is no text markup. + */ + getTextMarkupCount(TextMarkupType: number): number; + } + + interface XAccessibleTextSelection extends uno.XInterface { + addSelection(selectionIndex: number, startOffset: number, endOffset: number): number; + getSelectedPortionCount(): number; + getSeletedPositionEnd(nSelectedPortionIndex: number): number; + getSeletedPositionStart(nSelectedPortionIndex: number): number; + removeSelection(selectionIndex: number): boolean; + scrollToPosition(aPoint: awt.Point, isLeftTop: boolean): boolean; + readonly SelectedPortionCount: number; + } + + /** + * Implement this interface to give access to a single numerical value. + * + * The {@link XAccessibleValue} interface represents a single numerical value and should be implemented by any class that supports numerical value like + * scroll bars and spin boxes. This interface lets you access the value and its upper and lower bounds. + * @since OOo 1.1.2 + */ + interface XAccessibleValue extends uno.XInterface { + /** + * Returns the value of this object as a number. + * + * The exact return type is implementation dependent. Typical types are long and double. + * @returns Returns the current value represented by this object. + */ + CurrentValue: any; + + /** + * Returns the value of this object as a number. + * + * The exact return type is implementation dependent. Typical types are long and double. + * @returns Returns the current value represented by this object. + */ + getCurrentValue(): any; + + /** + * Returns the maximal value that can be represented by this object. + * + * The type of the returned value is implementation dependent. It does not have to be the same type as that returned by getCurrentAccessibleValue(). + * @returns Returns the maximal value in an implementation dependent type. If this object has no upper bound then an empty object is returned. + */ + getMaximumValue(): any; + + /** + * Returns the minimal value that can be represented by this object. + * + * The type of the returned value is implementation dependent. It does not have to be the same type as that returned by getCurrentAccessibleValue(). + * @returns Returns the minimal value in an implementation dependent type. If this object has no upper bound then an empty object is returned. + */ + getMinimumValue(): any; + + /** + * Returns the maximal value that can be represented by this object. + * + * The type of the returned value is implementation dependent. It does not have to be the same type as that returned by getCurrentAccessibleValue(). + * @returns Returns the maximal value in an implementation dependent type. If this object has no upper bound then an empty object is returned. + */ + readonly MaximumValue: any; + + /** + * Returns the minimal value that can be represented by this object. + * + * The type of the returned value is implementation dependent. It does not have to be the same type as that returned by getCurrentAccessibleValue(). + * @returns Returns the minimal value in an implementation dependent type. If this object has no upper bound then an empty object is returned. + */ + readonly MinimumValue: any; + + /** + * Sets the value of this object to the given number. + * + * The argument is clipped to the valid interval whose upper and lower bounds are returned by the methods getMaximumAccessibleValue() and + * getMinimumAccessibleValue(), i.e. if it is lower than the minimum value the new value will be the minimum and if it is greater than the maximum then + * the new value will be the maximum. + * @param aNumber The new value represented by this object. The set of admissible types for this argument is implementation dependent. + * @returns Returns `TRUE` if the new value could successfully be set and `FALSE` otherwise. + */ + setCurrentValue(aNumber: any): boolean; + } + + /** The interface must be implemented for a server that can support MSAA com objects and send win32 accessible events */ + interface XMSAAService extends lang.XComponent { + /** + * Return com object pointer. + * @returns A reference to the object that contains the actual accessibility information. + * @see AccessibleContext + */ + getAccObjectPtr(hWnd: number, lParam: number, wParam: number): number; + handleWindowOpened(i: number): void; + } + + namespace AccessibleEventId { + const enum Constants { + ACTION_CHANGED = 3, + ACTIVE_DESCENDANT_CHANGED = 5, + ACTIVE_DESCENDANT_CHANGED_NOFOCUS = 34, + BOUNDRECT_CHANGED = 6, + CARET_CHANGED = 20, + CHILD = 7, + COLUMN_CHANGED = 40, + CONTENT_FLOWS_FROM_RELATION_CHANGED = 12, + CONTENT_FLOWS_TO_RELATION_CHANGED = 13, + CONTROLLED_BY_RELATION_CHANGED = 14, + CONTROLLER_FOR_RELATION_CHANGED = 15, + DESCRIPTION_CHANGED = 2, + HYPERTEXT_CHANGED = 24, + INVALIDATE_ALL_CHILDREN = 8, + LABEL_FOR_RELATION_CHANGED = 16, + LABELED_BY_RELATION_CHANGED = 17, + LISTBOX_ENTRY_COLLAPSED = 33, + LISTBOX_ENTRY_EXPANDED = 32, + MEMBER_OF_RELATION_CHANGED = 18, + NAME_CHANGED = 1, + PAGE_CHANGED = 38, + ROLE_CHANGED = 41, + SECTION_CHANGED = 39, + SELECTION_CHANGED = 9, + SELECTION_CHANGED_ADD = 35, + SELECTION_CHANGED_REMOVE = 36, + SELECTION_CHANGED_WITHIN = 37, + STATE_CHANGED = 4, + SUB_WINDOW_OF_RELATION_CHANGED = 19, + TABLE_CAPTION_CHANGED = 25, + TABLE_COLUMN_DESCRIPTION_CHANGED = 26, + TABLE_COLUMN_HEADER_CHANGED = 27, + TABLE_MODEL_CHANGED = 28, + TABLE_ROW_DESCRIPTION_CHANGED = 29, + TABLE_ROW_HEADER_CHANGED = 30, + TABLE_SUMMARY_CHANGED = 31, + TEXT_ATTRIBUTE_CHANGED = 23, + TEXT_CHANGED = 22, + TEXT_SELECTION_CHANGED = 21, + VALUE_CHANGED = 11, + VISIBLE_DATA_CHANGED = 10, + } + } + + namespace AccessibleRelationType { + const enum Constants { + CONTENT_FLOWS_FROM = 1, + CONTENT_FLOWS_TO = 2, + CONTROLLED_BY = 3, + CONTROLLER_FOR = 4, + DESCRIBED_BY = 10, + INVALID = 0, + LABEL_FOR = 5, + LABELED_BY = 6, + MEMBER_OF = 7, + NODE_CHILD_OF = 9, + SUB_WINDOW_OF = 8, + } + } + + namespace AccessibleRole { + const enum Constants { + ALERT = 1, + BUTTON_DROPDOWN = 68, + BUTTON_MENU = 69, + CANVAS = 3, + CAPTION = 70, + CHART = 71, + CHECK_BOX = 4, + CHECK_MENU_ITEM = 5, + COLOR_CHOOSER = 6, + COLUMN_HEADER = 2, + COMBO_BOX = 7, + COMMENT = 81, + COMMENT_END = 82, + DATE_EDITOR = 8, + DESKTOP_ICON = 9, + DESKTOP_PANE = 10, + DIALOG = 12, + DIRECTORY_PANE = 11, + DOCUMENT = 13, + DOCUMENT_PRESENTATION = 83, + DOCUMENT_SPREADSHEET = 84, + DOCUMENT_TEXT = 85, + EDIT_BAR = 72, + EMBEDDED_OBJECT = 14, + END_NOTE = 15, + FILE_CHOOSER = 16, + FILLER = 17, + FONT_CHOOSER = 18, + FOOTER = 19, + FOOTNOTE = 20, + FORM = 73, + FRAME = 21, + GLASS_PANE = 22, + GRAPHIC = 23, + GROUP_BOX = 24, + HEADER = 25, + HEADING = 26, + HYPER_LINK = 27, + ICON = 28, + IMAGE_MAP = 74, + INTERNAL_FRAME = 29, + LABEL = 30, + LAYERED_PANE = 31, + LIST = 32, + LIST_ITEM = 33, + MENU = 34, + MENU_BAR = 35, + MENU_ITEM = 36, + NOTE = 75, + OPTION_PANE = 37, + PAGE = 76, + PAGE_TAB = 38, + PAGE_TAB_LIST = 39, + PANEL = 40, + PARAGRAPH = 41, + PASSWORD_TEXT = 42, + POPUP_MENU = 43, + PROGRESS_BAR = 45, + PUSH_BUTTON = 44, + RADIO_BUTTON = 46, + RADIO_MENU_ITEM = 47, + ROOT_PANE = 49, + ROW_HEADER = 48, + RULER = 77, + SCROLL_BAR = 50, + SCROLL_PANE = 51, + SECTION = 78, + SEPARATOR = 53, + SHAPE = 52, + SLIDER = 54, + SPIN_BOX = 55, + SPLIT_PANE = 56, + STATUS_BAR = 57, + TABLE = 58, + TABLE_CELL = 59, + TEXT = 60, + TEXT_FRAME = 61, + TOGGLE_BUTTON = 62, + TOOL_BAR = 63, + TOOL_TIP = 64, + TREE = 65, + TREE_ITEM = 79, + TREE_TABLE = 80, + UNKNOWN = 0, + VIEW_PORT = 66, + WINDOW = 67, + } + } + + namespace AccessibleStateType { + const enum Constants { + ACTIVE = 1, + ARMED = 2, + BUSY = 3, + CHECKED = 4, + COLLAPSE = 34, + DEFAULT = 32, + DEFUNC = 5, + EDITABLE = 6, + ENABLED = 7, + EXPANDABLE = 8, + EXPANDED = 9, + FOCUSABLE = 10, + FOCUSED = 11, + HORIZONTAL = 12, + ICONIFIED = 13, + INDETERMINATE = 14, + INVALID = 0, + MANAGES_DESCENDANTS = 15, + MODAL = 16, + MOVEABLE = 31, + MULTI_LINE = 17, + MULTI_SELECTABLE = 18, + OFFSCREEN = 33, + OPAQUE = 19, + PRESSED = 20, + RESIZABLE = 21, + SELECTABLE = 22, + SELECTED = 23, + SENSITIVE = 24, + SHOWING = 25, + SINGLE_LINE = 26, + STALE = 27, + TRANSIENT = 28, + VERTICAL = 29, + VISIBLE = 30, + } + } + + namespace AccessibleTableModelChangeType { + const enum Constants { + DELETE = 2, + INSERT = 1, + UPDATE = 3, + } + } + + namespace AccessibleTextType { + const enum Constants { + ATTRIBUTE_RUN = 7, + CHARACTER = 1, + GLYPH = 6, + LINE = 5, + PARAGRAPH = 4, + SENTENCE = 3, + WORD = 2, + } + } + } + + namespace animations { + /** @since LibreOffice 4.1 */ + type AnimateColor = XAnimate; + + /** @since LibreOffice 4.1 */ + type AnimateMotion = XAnimationNode; + + /** @since LibreOffice 4.1 */ + type AnimateSet = XAnimate; + + /** @since LibreOffice 4.1 */ + type Audio = XAudio; + + /** @since LibreOffice 4.1 */ + type Command = XCommand; + + /** @since LibreOffice 4.1 */ + type IterateContainer = XTimeContainer; + + /** @since LibreOffice 4.1 */ + type ParallelTimeContainer = XParallelTimeContainer; + + /** @since LibreOffice 4.1 */ + type SequenceTimeContainer = XTimeContainer; + + /** + * Interface for animation by simply setting the value of the target attribute to a constant value. This interface provides a simple means of just + * setting the value of an attribute for a specified duration. + * + * When using {@link XAnimateSet} , the following members are ignored {@link XAnimate.Values}{@link XAnimate.KeyTimes}{@link XAnimate.CalcMode}{@link + * XAnimate.Accumulate}{@link XAnimate.Additive}{@link XAnimate.From}{@link XAnimate.By}{@link XAnimate.TimeFilter} + * @see http://www.w3.org/TR/smil20/animation.html#edef-set + */ + type XAnimateSet = XAnimate; + + const enum Timing { + /** specifies that a duration, end or start time is indefinite */ + INDEFINITE = 0, + /** specifies a simple duration as the intrinsic media duration. This is only valid for elements that define media. */ + MEDIA = 1, + } + + /** + * an event has a source that causes an event to be fired and a trigger that defines under which condition an event should be raised and an offset if the + * event should be raised a defined amount of time after the event is triggered. + */ + interface Event { + /** an optional offset in seconds or Timing::INDEFINITE. This is the timespan between the triggering of the event and actually raising the event */ + Offset: any; + + /** an option repeat value. If the {@link Trigger} is {@link EventTrigger} , this is the number of repeats after which the event is initially raised. */ + Repeat: number; + + /** this is the source for this event. */ + Source: any; + + /** this is the trigger that fires this event. */ + Trigger: number; + } + + /** + * Properties of an animated target. + * + * This struct collects all global attributes that apply to an animation target. An animation target is anything that is referenced from a given {@link + * XAnimationNode} tree as a target object. + */ + interface TargetProperties { + Properties: SafeArray; + Target: any; + } + + interface TimeFilterPair { + Progress: number; + Time: number; + } + + interface ValuePair { + First: any; + Second: any; + } + + /** + * Interface for generic animation. + * @see http://www.w3.org/TR/smil20/animation.html#edef-animate + */ + interface XAnimate extends XAnimationNode { + /** + * Controls whether or not the animation is cumulative. + * @see http://www.w3.org/TR/smil20/animation.html#adef-accumulate + */ + Accumulate: boolean; + + /** + * Controls whether or not the animation is additive. + * @see AnimationAdditiveMode + * @see http://www.w3.org/TR/smil20/animation.html#adef-additive + */ + Additive: number; + + /** + * Specifies the target attribute. + * @see http://www.w3.org/TR/smil20/animation.html#adef-attributeName + */ + AttributeName: string; + + /** + * Specifies a relative offset value for the animation. ; Must be a legal value of a domain for which addition to the attributeType domain is defined + * and which yields a value in the attributeType domain. Ignored if the values attribute is specified. Ignored if the {@link Values} attribute is + * specified. + * @see http://www.w3.org/TR/smil20/animation.html#adef-by + */ + By: any; + + /** + * Specifies the interpolation mode for the animation. ; If the target attribute does not support linear interpolation (e.g. for strings), or if the + * values attribute has only one value, the CalcMode attribute is ignored and discrete interpolation is used. + * @see AnimationCalcMode; + */ + CalcMode: number; + + /** + * if this string is set, its contents will be parsed as a formula. All values are used as a parameter for this formula and the computed result will be + * used. + */ + Formula: string; + + /** + * Specifies the starting value of the animation. ; Must be a legal value for the specified attribute. Ignored if the {@link Values} attribute is + * specified. + * @see http://www.w3.org/TR/smil20/animation.html#adef-from + */ + From: any; + KeyTimes: SafeArray; + + /** + * This attribute specifies an optional subitem from the target element that should be animated. ; A value of zero should always be the default and + * animate the complete target. ; See documentation of used animation engine for supported subitems. + */ + SubItem: number; + + /** This attribute specifies the target element to be animated. ; See documentation of used animation engine for supported targets. */ + Target: any; + + /** todo: timeFilter="0,0; 0.14,0.36; 0.43,0.73; 0.71,0.91; 1.0,1.0" ? */ + TimeFilter: SafeArray; + + /** + * Specifies the ending value of the animation. ; Must be a legal value for the specified attribute. Ignored if the {@link Values} attribute is + * specified. + * @see http://www.w3.org/TR/smil20/animation.html#adef-to + */ + To: any; + + /** + * A sequence of one or more values, each of which must be a legal value for the specified attribute. + * @see http://www.w3.org/TR/smil20/animation.html#adef-values + */ + Values: SafeArray; + + /** @see AnimationValueType */ + ValueType: number; + } + + /** + * Interface for animation by defining color changes over time. ; Only color value will be legal values for the following members {@link + * XAnimate.Values}{@link XAnimate.From}{@link XAnimate.To}{@link XAnimate.By} + * @see http://www.w3.org/TR/smil20/animation.html#edef-animateColor + */ + interface XAnimateColor extends XAnimate { + /** + * defines the color space which is used to perform the interpolation. ; + * @see AnimationColorSpace + */ + ColorInterpolation: number; + + /** + * defines the direction which is used to perform the interpolation inside the color space defined with {@link ColorInterpolation} . ; Values could be + * `TRUE` for clockwise and `FALSE` for counterclockwise. + * + * This attribute will be ignored for color spaces where this does not make any sense. + */ + Direction: boolean; + } + + /** + * Interface for animation by defining motion on a path. + * @see http://www.w3.org/TR/smil20/animation.html#edef-animateMotion + */ + interface XAnimateMotion extends XAnimate { + /** Specifies the origin of motion for the animation. The values and semantics of this attribute are dependent upon the used animation engine. */ + Origin: any; + + /** + * Specifies an optional path. ; If a path is used, the {@link From} , {@link To} and {@link By} members are ignored. The value type of the path depends + * on the used rendering system. Possible types maybe a svg:d path encoded in a string. + */ + Path: any; + } + + /** + * animates a transformation attribute on a target element, thereby allowing animations to control translation, scaling, rotation and/or skewing. + * + * The member XAnimate::Attributes contains a short from {@link AnimationTransformType} . + * + * Depending on the value in XAnimate::Attributes, the members {@link XAnimate.From} , {@link XAnimate.To} , {@link XAnimate.By} or {@link + * XAnimate.Values} contain the following + * + * {@link AnimationTransformType.TRANSLATE}; {@link ValuePair} of **tx** and **ty**{@link AnimationTransformType.SCALE}; {@link ValuePair} of **sx** and + * **sy**{@link AnimationTransformType.ROTATE}; Values for a rotation angle{@link AnimationTransformType.SKEWX}; Values for a skew-angle{@link + * AnimationTransformType.SKEWY}; Values for a skew-angle + * @see http://www.w3.org/TR/SVG/animate.html#AnimateTransformElement + */ + interface XAnimateTransform extends XAnimate { + /** @see AnimationTransformType */ + TransformType: number; + } + + /** + * makes it possible to register listeners, which are called whenever an animation event occurs. + * @since OOo 3.0 + */ + interface XAnimationListener extends lang.XEventListener { + /** + * This event is raised when the element local timeline begins to play. + * + * It will be raised each time the element begins the active duration (i.e. when it restarts, but not when it repeats). + * + * It may be raised both in the course of normal (i.e. scheduled or interactive) timeline play, as well as in the case that the element was begun with an + * interface method. + * @param Node The node that begins to play. + */ + beginEvent(Node: XAnimationNode): void; + + /** + * This event is raised at the active end of the element. + * + * Note that this event is not raised at the simple end of each repeat. + * + * This event may be raised both in the course of normal (i.e. scheduled or interactive) timeline play, as well as in the case that the element was ended + * with a DOM method. + * @param Node The node that stops playing. + */ + endEvent(Node: XAnimationNode): void; + + /** + * This event is raised when the element local timeline repeats. + * + * It will be raised each time the element repeats, after the first iteration. + * + * Associated with the repeat event is an integer that indicates which repeat iteration is beginning. + * @param Node The node that repeats. + * @param Repeat The value is a 0-based integer, but the repeat event is not raised for the first iteration and so the observed values will be >= 1. + */ + repeat(Node: XAnimationNode, Repeat: number): void; + } + + interface XAnimationNode extends container.XChild { + /** + * defines the acceleration for this element. ; Element time will accelerate from a rate of 0 at the beginning up to a run rate, over the course of the + * specified proportion of the simple duration. + * + * {@link Acceleration} is a value between 0 (no acceleration) and 1 (acceleration until end of the elements duration). + * @see http://www.w3.org/TR/smil20/smil-timemanip.html#adef-accelerate + */ + Acceleration: number; + + /** + * defines the auto reverse settings for this element. + * + * {@link AutoReverse} is `FALSE` if the animation is played normal.`TRUE` if the animation is played forwards and then backwards. This doubles the + * duration + * @see http://www.w3.org/TR/smil20/smil-timemanip.html#adef-autoReverse + */ + AutoReverse: boolean; + + /** + * a sequence of values that define the beginning of this element ; {@link Begin} is `double` describes the element begin as an offset in seconds from an + * implicit syncbase. The definition of the implicit syncbase depends upon the element's parent time container. The offset is measured in parent simple + * time.{@link Event} describes an event and an optional offset that determine the element begin. The element begin is defined relative to the time that + * the event is raised.Timing::INDEFINITE the begin of the element will be determined by an external event to the element.sequence a sequence of + * values described above if more than one begin value is defined for this element.`VOID` if no begin behavior is defined for this element. + * @see http://www.w3.org/TR/smil20/smil-timing.html#adef-begin + */ + Begin: any; + + /** + * defines the deceleration for this element. Element time will deceleration from a run rate to a rate of 0 at the ending, over the course of the + * specified proportion of the simple duration. + * + * {@link Decelerate} is a value between 0 (no deceleration) and 1 (deceleration from beginning of the elements duration). + * @see http://www.w3.org/TR/smil20/smil-timemanip.html#adef-decelerate + */ + Decelerate: number; + + /** + * defines the length of the simple duration. ; {@link Duration} is `double` specifies the length of the simple duration in seconds.Timing::INDEFINITE + * specifies the simple duration as indefinite.Timing::MEDIA specifies the simple duration as the intrinsic media duration. This is only valid for + * elements that define media.`VOID` the simple duration for the element is defined to be the implicit duration of the element. + * @see http://www.w3.org/TR/smil20/smil-timing.html#adef-dur + */ + Duration: any; + + /** + * a sequence of values that define the ending of this element ; {@link End} is `double` describes the element end as an offset in seconds from an + * implicit syncbase. The definition of the implicit syncbase depends upon the element's parent time container. The offset is measured in parent simple + * time.{@link Event} describes an event and an optional offset that determine the element end. The element end is defined relative to the time that the + * event is raised.Timing::INDEFINITE the end of the element will be determined by an external event to the element.sequence a sequence of values + * described above if more than one begin value is defined for this element.`VOID` if no end behavior is defined for this element. + * @see http://www.w3.org/TR/smil20/smil-timing.html#adef-end + */ + End: any; + + /** + * controls the implicit duration of time containers, as a function of the children. ; The EndSync attribute is only valid for par and excl time + * container elements, and media elements with timed children (e.g. animate or area elements). + * + * {@link EndSync} is either a `short` constant from EndSync, an interface reference to a child {@link XTimeContainer} or `VOID` . + * @see http://www.w3.org/TR/smil20/smil-timing.html#adef-endsync + */ + EndSync: any; + + /** + * the attribute that specify the behavior how an element should be extended beyond the active duration by freezing the final state of the element. ; + * {@link Fill} is a value from {@link AnimationFill} . + * @see Fill + * @see http://www.w3.org/TR/smil20/smil-timing.html#adef-fill + */ + Fill: number; + + /** + * the default value for the fill behavior for this element and all descendants. ; {@link FillDefault} is The values {@link AnimationFill.REMOVE} , + * {@link AnimationFill.FREEZE} , {@link AnimationFill.HOLD} , {@link AnimationFill.TRANSITION} and {@link AnimationFill.AUTO} specify that the element + * fill behavior is the respective value.The value {@link AnimationFill.INHERIT} specifies that the value of this attribute (and of the fill behavior) + * are inherited from the {@link FillDefault} value of the parent element. If there is no parent element, the value is {@link AnimationFill.AUTO} . + * @see Fill + * @see http://www.w3.org/TR/smil20/smil-timing.html#adef-fillDefault + */ + FillDefault: number; + + /** + * the number of iterations of the simple duration. ; {@link RepeatCount} is `double` this is a numeric value that specifies the number of iterations. It + * can include partial iterations expressed as fraction values. A fractional value describes a portion of the simple duration. Values must be greater + * than 0.Timing::INDEFINITE the element is defined to repeat indefinitely (subject to the constraints of the parent time container).`VOID` no repeat + * count is defined for this element. + * @see EndSync + * @see http://www.w3.org/TR/smil20/smil-timing.html#adef-repeatCount + */ + RepeatCount: any; + + /** + * the total duration for repeat. ; {@link RepeatDuration} is `double` specifies the duration in element active time to repeat the simple duration in + * seconds.Timing::INDEFINITE the element is defined to repeat indefinitely (subject to the constraints of the parent time container).`VOID` No repeat + * duration is defined for this element. + * @see http://www.w3.org/TR/smil20/smil-timing.html#adef-repeatDur + */ + RepeatDuration: any; + + /** + * defines the restart behavior of this element. ; {@link Restart} is a `short` value from {@link AnimationRestart} . + * @see AnimationRestart + * @see http://www.w3.org/TR/smil20/smil-timing.html#adef-restart + */ + Restart: number; + + /** + * defines the default restart behavior for this element and all descendants. + * @returns a value from Restart. + * @see AnimationRestart + * @see http://www.w3.org/TR/smil20/smil-timing.html#adef-restartDefault + */ + RestartDefault: number; + + /** + * a value from {@link AnimationNodeType} . + * @see http://www.w3.org/TR/smil20/smil-timing.html#adef-timeContainer + */ + Type: number; + UserData: SafeArray; + } + + interface XAnimationNodeSupplier { + readonly AnimationNode: XAnimationNode; + getAnimationNode(): XAnimationNode; + } + + interface XAudio extends XAnimationNode { + /** This attribute specifies the source element that contains the audio. */ + Source: any; + Volume: number; + } + + /** Execution of the {@link XCommand} animation node causes the slide show component to call back the application to perform the command. */ + interface XCommand extends XAnimationNode { + /** This identifies the application specific command. See documentation of used application for commands. */ + Command: number; + + /** + * The application specific parameter for this command. See documentation of used application for supported parameters for different commands and target + * combinations. + */ + Parameter: any; + + /** The application specific target. See documentation of used application for supported targets. */ + Target: any; + } + + /** + * An iterate container iterates over subitems of a given target object and animates them by subsequently executes the contained effects on them. ; This + * could be used to animate a target text word by word or letter by letter. + */ + interface XIterateContainer extends XTimeContainer { + /** the time interval in percentage of the containers running time before the next iterated content is animated. */ + IterateInterval: number; + + /** the type of iteration, this depends on the target. ; See documentation of used animation engine for supported iteration types. */ + IterateType: number; + + /** + * This attribute specifies an optional subitem from the target element that should be animated. ; A value of zero should always be the default and + * animate the complete target. ; See documentation of used animation engine for supported subitems. + */ + SubItem: number; + + /** a target that contains iterable contents, f.e. a paragraph. ; See documentation of used animation engine for supported targets. */ + Target: any; + } + + /** @since LibreOffice 4.1 */ + interface XParallelTimeContainer extends XTimeContainer, container.XEnumerationAccess { } + + /** + * Supported modules BasicInlineTimingEventTimingFillDefaultMultiArcTimingRepeatTiming ** The deprecated repeat is not supported. + * **RestartDefaultRestartTimingTimeContainerAttributes + * @see http://www.w3.org/TR/smil20/smil-timing.html + * @see http://www.w3.org/TR/smil20/smil-timing.html#Timing-TimingConcepts + */ + interface XTimeContainer extends XAnimationNode { + appendChild(newChild: XAnimationNode): XAnimationNode; + insertAfter(newChild: XAnimationNode, refChild: XAnimationNode): XAnimationNode; + insertBefore(newChild: XAnimationNode, refChild: XAnimationNode): XAnimationNode; + removeChild(oldChild: XAnimationNode): XAnimationNode; + replaceChild(newChild: XAnimationNode, oldChild: XAnimationNode): XAnimationNode; + } + + /** + * Base members {@link XAnimate.Values} , {@link XAnimate.From} , {@link XAnimate.To} and {@link XAnimate.By} can be used with `double` values that set + * the transition progress the specific amount of time. + * @see http://www.w3.org/TR/smil20/smil-transitions.html#edef-transitionFilter + */ + interface XTransitionFilter extends XAnimate { + /** + * This specifies the direction the transition will run. ; The legal values are `TRUE` for forward and `FALSE` for reverse. The default value is `TRUE` + * . Note that this does not impact the media being transitioned to, but only affects the geometry of the transition. Transitions which do not have a + * reverse interpretation should ignore the direction attribute and assume the default value of `TRUE` . + */ + Direction: boolean; + + /** + * If the value of the {@link Type} attribute is {@link TransitionType.FADE} and the value of the {@link Subtype} attribute is {@link + * TransitionSubType.FADETOCOLOR} or {@link TransitionSubType.FADEFROMCOLOR} , then this attribute specifies the starting or ending color of the fade. + * The default value is 0 (black). + */ + FadeColor: number; + + /** + * Indicates whether the transitionFilter's parent element will transition in or out. Legal values are `TRUE` indicating that the parent media will + * become more visible as the transition progress increases and `FALSE` indicating that the parent media will become less visible as the transition + * progress increases. + * + * The default value is `TRUE` . + */ + Mode: boolean; + + /** + * This is the subtype of the transition. ; This must be one of the transition subtypes appropriate for the specified {@link Type} as listed in {@link + * TransitionSubType} . {@link TransitionSubType.DEFAULT} is the default. + */ + Subtype: number; + + /** This is the type or family of transition. ; This attribute is required and must be one of the transition families listed in {@link TransitionType} . */ + Transition: number; + } + + namespace AnimationAdditiveMode { + const enum Constants { + BASE = 0, + MULTIPLY = 3, + NONE = 4, + REPLACE = 2, + SUM = 1, + } + } + + namespace AnimationCalcMode { + const enum Constants { + DISCRETE = 0, + LINEAR = 1, + PACED = 2, + SPLINE = 3, + } + } + + namespace AnimationColorSpace { + const enum Constants { + HSL = 1, + RGB = 0, + } + } + + namespace AnimationEndSync { + const enum Constants { + ALL = 2, + FIRST = 0, + LAST = 1, + MEDIA = 3, + } + } + + namespace AnimationFill { + const enum Constants { + AUTO = 5, + DEFAULT = 0, + FREEZE = 2, + HOLD = 3, + INHERIT = 0, + REMOVE = 1, + TRANSITION = 4, + } + } + + namespace AnimationNodeType { + const enum Constants { + ANIMATE = 4, + ANIMATECOLOR = 7, + ANIMATEMOTION = 6, + ANIMATETRANSFORM = 8, + AUDIO = 10, + COMMAND = 11, + CUSTOM = 0, + ITERATE = 3, + PAR = 1, + SEQ = 2, + SET = 5, + TRANSITIONFILTER = 9, + } + } + + namespace AnimationRestart { + const enum Constants { + ALWAYS = 1, + DEFAULT = 0, + INHERIT = 0, + NEVER = 3, + WHEN_NOT_ACTIVE = 2, + } + } + + namespace AnimationTransformType { + const enum Constants { + ROTATE = 2, + SCALE = 1, + SKEWX = 3, + SKEWY = 4, + TRANSLATE = 0, + } + } + + namespace AnimationValueType { + const enum Constants { + COLOR = 2, + NUMBER = 1, + STRING = 0, + } + } + + namespace EventTrigger { + const enum Constants { + BEGIN_EVENT = 3, + END_EVENT = 4, + NONE = 0, + ON_BEGIN = 1, + ON_CLICK = 5, + ON_DBL_CLICK = 6, + ON_END = 2, + ON_MOUSE_ENTER = 7, + ON_MOUSE_LEAVE = 8, + ON_NEXT = 9, + ON_PREV = 10, + ON_STOP_AUDIO = 11, + REPEAT = 12, + } + } + + namespace TransitionSubType { + const enum Constants { + ACROSS = 108, + BOTTOM = 52, + BOTTOMCENTER = 9, + BOTTOMLEFT = 6, + BOTTOMLEFTCLOCKWISE = 72, + BOTTOMLEFTCOUNTERCLOCKWISE = 76, + BOTTOMLEFTDIAGONAL = 68, + BOTTOMRIGHT = 5, + BOTTOMRIGHTCLOCKWISE = 71, + BOTTOMRIGHTCOUNTERCLOCKWISE = 75, + BOTTOMRIGHTDIAGONAL = 67, + CENTERRIGHT = 49, + CENTERTOP = 48, + CIRCLE = 27, + CLOCKWISEBOTTOM = 42, + CLOCKWISEBOTTOMRIGHT = 46, + CLOCKWISELEFT = 43, + CLOCKWISENINE = 36, + CLOCKWISERIGHT = 41, + CLOCKWISESIX = 35, + CLOCKWISETHREE = 34, + CLOCKWISETOP = 40, + CLOCKWISETOPLEFT = 44, + CLOCKWISETWELVE = 33, + COMBHORIZONTAL = 110, + COMBVERTICAL = 111, + CORNERSIN = 11, + CORNERSOUT = 12, + COUNTERCLOCKWISEBOTTOMLEFT = 45, + COUNTERCLOCKWISETOPRIGHT = 47, + CROSSFADE = 101, + DEFAULT = 0, + DIAGONALBOTTOMLEFT = 15, + DIAGONALBOTTOMLEFTOPPOSITE = 85, + DIAGONALTOPLEFT = 16, + DIAGONALTOPLEFTOPPOSITE = 86, + DIAMOND = 26, + DOUBLEBARNDOOR = 17, + DOUBLEDIAMOND = 18, + DOWN = 19, + EIGHTBLADE = 106, + FADEFROMCOLOR = 103, + FADEOVERCOLOR = 104, + FADETOCOLOR = 102, + FANINHORIZONTAL = 57, + FANINVERTICAL = 56, + FANOUTHORIZONTAL = 55, + FANOUTVERTICAL = 54, + FIVEPOINT = 29, + FOURBLADE = 39, + FOURBOXHORIZONTAL = 92, + FOURBOXVERTICAL = 91, + FOURPOINT = 28, + FROMBOTTOM = 100, + FROMBOTTOMLEFT = 118, + FROMBOTTOMRIGHT = 119, + FROMLEFT = 97, + FROMRIGHT = 99, + FROMTOP = 98, + FROMTOPLEFT = 116, + FROMTOPRIGHT = 117, + HEART = 31, + HORIZONTAL = 14, + HORIZONTALLEFT = 95, + HORIZONTALLEFTSAME = 81, + HORIZONTALRIGHT = 96, + HORIZONTALRIGHTSAME = 82, + HORIZONTALTOPLEFTOPPOSITE = 83, + HORIZONTALTOPRIGHTOPPOSITE = 84, + IN = 112, + KEYHOLE = 32, + LEFT = 20, + LEFTCENTER = 10, + LEFTTORIGHT = 1, + ONEBLADE = 107, + OPPOSITEHORIZONTAL = 61, + OPPOSITEVERTICAL = 60, + OUT = 113, + PARALLELDIAGONAL = 59, + PARALLELDIAGONALBOTTOMLEFT = 63, + PARALLELDIAGONALTOPLEFT = 62, + PARALLELVERTICAL = 58, + RECTANGLE = 25, + RIGHT = 22, + RIGHTCENTER = 8, + ROTATEIN = 114, + ROTATEOUT = 115, + SIXPOINT = 30, + THREEBLADE = 105, + TOP = 50, + TOPCENTER = 7, + TOPLEFT = 3, + TOPLEFTCLOCKWISE = 69, + TOPLEFTCOUNTERCLOCKWISE = 73, + TOPLEFTDIAGONAL = 65, + TOPLEFTHORIZONTAL = 64, + TOPLEFTVERTICAL = 109, + TOPRIGHT = 4, + TOPRIGHTCLOCKWISE = 70, + TOPRIGHTCOUNTERCLOCKWISE = 74, + TOPRIGHTDIAGONAL = 66, + TOPTOBOTTOM = 2, + TWOBLADEHORIZONTAL = 38, + TWOBLADEVERTICAL = 37, + TWOBOXBOTTOM = 88, + TWOBOXLEFT = 89, + TWOBOXRIGHT = 90, + TWOBOXTOP = 87, + UP = 21, + VERTICAL = 13, + VERTICALBOTTOMLEFTOPPOSITE = 80, + VERTICALBOTTOMSAME = 78, + VERTICALLEFT = 93, + VERTICALRIGHT = 94, + VERTICALTOPLEFTOPPOSITE = 79, + VERTICALTOPSAME = 77, + } + } + + namespace TransitionType { + const enum Constants { + ARROWHEADWIPE = 14, + BARNDOORWIPE = 4, + BARNVEEWIPE = 9, + BARNZIGZAGWIPE = 11, + BARWIPE = 1, + BLINDSWIPE = 41, + BOWTIEWIPE = 6, + BOXSNAKESWIPE = 33, + BOXWIPE = 2, + CHECKERBOARDWIPE = 39, + CLOCKWIPE = 22, + DIAGONALWIPE = 5, + DISSOLVE = 40, + DOUBLEFANWIPE = 26, + DOUBLESWEEPWIPE = 27, + ELLIPSEWIPE = 17, + EYEWIPE = 18, + FADE = 37, + FANWIPE = 25, + FOURBOXWIPE = 3, + HEXAGONWIPE = 16, + IRISWIPE = 12, + MISCDIAGONALWIPE = 7, + MISCSHAPEWIPE = 21, + PARALLELSNAKESWIPE = 32, + PENTAGONWIPE = 15, + PINWHEELWIPE = 23, + PUSHWIPE = 35, + RANDOM = 42, + RANDOMBARWIPE = 38, + ROUNDRECTWIPE = 19, + SALOONDOORWIPE = 28, + SINGLESWEEPWIPE = 24, + SLIDEWIPE = 36, + SNAKEWIPE = 30, + SPIRALWIPE = 31, + STARWIPE = 20, + TRIANGLEWIPE = 13, + VEEWIPE = 8, + WATERFALLWIPE = 34, + WINDSHIELDWIPE = 29, + ZIGZAGWIPE = 10, + ZOOM = 43, + } + } + } + + namespace auth { + /** + * indicates failure to authenticate using the specified security context. + * @since OOo 1.1.2 + */ + type AuthenticationFailedException = uno.Exception; + + /** + * indicates an invalid argument was passed to SSO API. + * @since OOo 1.1.2 + */ + type InvalidArgumentException = uno.Exception; + + /** + * indicates an attempt was made to use an invalid source or target context. + * @since OOo 1.1.2 + */ + type InvalidContextException = uno.Exception; + + /** + * indicates an attempt was made to use an invalid or non existent credential. + * @since OOo 1.1.2 + */ + type InvalidCredentialException = uno.Exception; + + /** + * indicates an invalid principal was specified. + * @since OOo 1.1.2 + */ + type InvalidPrincipalException = uno.Exception; + + /** + * indicates an underlying persistence implementation failure. + * @since OOo 1.1.2 + */ + type PersistenceFailureException = uno.Exception; + + /** + * represents a starting point for Single Sign-on interactions. + * + * The Single Sign-on ( SSO ) APIs provide UNO based access to underlying SSO implementations ( e.g. Kerberos ). The aim of the SSO APIs is to enable + * authentication ( possibly mutual ) between a client ( source or initiator ) and a network service ( target or acceptor ). This is achieved via. the + * creation and processing of security tokens sent between the two parties. The steps which should be followed to successfully use the SSO APIs are as + * follows: Create an {@link XSSOManagerFactory} instanceUse this factory to create/retrieve an {@link XSSOManager} instance.Depending on whether your + * code is acting as SSO source or target, you should use the {@link XSSOManager} instance to create an initiator security context, {@link + * XSSOInitiatorContext} or an acceptor security context, {@link XSSOAcceptorContext} respectively.On the initiator side, use the previously created + * context to process security tokens received from the acceptor side and to create security tokens to send to the acceptor side. On the acceptor side, + * use the previously created context to process security tokens received from the initiator side and to create security tokens to send to the initiator + * side. + * + * The interface supports the creation of {@link XSSOManager} instances which can subsequently be used to create security contexts. + * @since OOo 1.1.2 + */ + type SSOManagerFactory = XSSOManagerFactory; + + /** + * provided as a convenience for simple username/password based Single Sign-on implementations which don't provide some sort of authentication + * information repository. + * + * provides access to a cache which maps usernames to associated passwords. Individual cache entries may be persisted. + * @since OOo 1.1.2 + */ + type SSOPasswordCache = XSSOPasswordCache; + + /** + * indicates an operation unsupported by the implementation. + * @since OOo 1.1.2 + */ + type UnsupportedException = uno.Exception; + + /** + * represents an acceptor side security context. + * + * This context may be used to authenticate a Single Sign-on initiator based on a security token sent by the initiator and to generate a token to be sent + * back to the initiator so that it can authenticate the acceptor. + * @since OOo 1.1.2 + */ + interface XSSOAcceptorContext extends XSSOContext { + /** + * accepts/authenticates an SSO token sent from the context initiator side. + * + * {@link accept()} should be called only once. Subsequent calls produce undefined results. + * @param Token the SSO token sent by the initiator. + * @returns the sequence of bytes to be sent back to the initiator to allow authentication of the acceptor side, if mutual authentication is supported by the + */ + accept(Token: LibreOffice.SeqEquiv): SafeArray; + } + + /** + * Base SSO security context representation + * @since OOo 1.1.2 + */ + interface XSSOContext extends uno.XInterface { + /** + * retrieves the mechanism associated with the context. + * @returns the mechanism name + */ + getMechanism(): string; + + /** + * retrieves whether or not the context supports mutual authentication + * @returns `TRUE` if mutual authentication is supported, `FALSE` otherwise. + */ + getMutual(): boolean; + + /** + * retrieves the principal name of the source/initiator of the context. + * + * In the case of an acceptor side security context, the source principal name is available only after the initiator has been authenticated. + * @returns the source principal name + */ + getSource(): string; + + /** + * retrieves the principal name of the target/acceptor of the context. + * @returns the target principal name + */ + getTarget(): string; + + /** + * retrieves the mechanism associated with the context. + * @returns the mechanism name + */ + readonly Mechanism: string; + + /** + * retrieves whether or not the context supports mutual authentication + * @returns `TRUE` if mutual authentication is supported, `FALSE` otherwise. + */ + readonly Mutual: boolean; + + /** + * retrieves the principal name of the source/initiator of the context. + * + * In the case of an acceptor side security context, the source principal name is available only after the initiator has been authenticated. + * @returns the source principal name + */ + readonly Source: string; + + /** + * retrieves the principal name of the target/acceptor of the context. + * @returns the target principal name + */ + readonly Target: string; + } + + /** + * represents an initiator side security context. + * + * This context may be used to initialize authentication tokens to send to an acceptor and to authenticate any token sent back in response. + * @since OOo 1.1.2 + */ + interface XSSOInitiatorContext extends XSSOContext { + /** + * initializes an SSO Token to send to the acceptor side and authenticates an SSO Token returned by the acceptor if the context supports mutual + * authentication. + * + * init should be called only once for contexts which don't support mutual authentication and at most twice for contexts which do support mutual + * authentication. Additional calls produce undefined results. + * @param Token the SSO token received from the acceptor side in response to an authentication request. This token is ignored on the first call to init and + * @returns the sequence of bytes to be sent to the acceptor side as part of an authentication request. This sequence will be non zero length for the first c + */ + init(Token: LibreOffice.SeqEquiv): SafeArray; + } + + /** + * supports the creation of security contexts for both the initiator/source side and the acceptor/target side. + * @since OOo 1.1.2 + */ + interface XSSOManager extends uno.XInterface { + /** + * creates an acceptor side security context. + * @param TargetPrincipal the name of the acceptor side principal. + * @returns the newly created acceptor side context. + */ + createAcceptorContext(TargetPrincipal: string): XSSOAcceptorContext; + + /** + * creates an initiator side security context. + * @param SourcePrincipal the name of the initiator side principal for which the context will be created. + * @param TargetPrincipal the name of the target/acceptor side principal to which the source principal intends to authenticate. + * @param TargetHost the host name associated with the target principal. + * @returns the newly created initiator context. + */ + createInitiatorContext(SourcePrincipal: string, TargetPrincipal: string, TargetHost: string): XSSOInitiatorContext; + + /** + * retrieves the mechanism name of all security contexts created using this manager. + * @returns the mechanism name ( e.g. "KERBEROS" ) + */ + getMechanism(): string; + + /** + * retrieves the mechanism name of all security contexts created using this manager. + * @returns the mechanism name ( e.g. "KERBEROS" ) + */ + readonly Mechanism: string; + } + + /** + * Factory for creating an SSO Manager supporting the user's configured security mechanism + * @since OOo 1.1.2 + */ + interface XSSOManagerFactory extends uno.XInterface { + /** + * provides a {@link XSSOManager} to be used in subsequent security context creation. + * @returns the relevant {@link XSSOManager} instance + */ + getSSOManager(): XSSOManager; + + /** + * provides a {@link XSSOManager} to be used in subsequent security context creation. + * @returns the relevant {@link XSSOManager} instance + */ + readonly SSOManager: XSSOManager; + } + + /** + * supports password caching for security mechanisms which use passwords as credentials or as an input to credential creation but don't have an external + * method to cache these passwords. + * @since OOo 1.1.2 + */ + interface XSSOPasswordCache extends uno.XInterface { + /** + * adds a username/password combination to the cache. + * + * If an entry for the specified username already exists in the cache, it will be overwritten. + * @param UserName the user name to add + * @param Password the associated password + * @param Persist indicates whether or not the username/password combination should be persisted + */ + addPassword(UserName: string, Password: string, Persist: boolean): void; + + /** + * retrieves a password for a given user from the cache. + * + * Non persistent cache is searched first, followed by the persistent cache ( if it exists ). + * @param UserName the name of the user whose password should be retrieved + * @param Persist indicates whether or not the password is persistent + * @returns the required password + */ + getPassword(UserName: string, Persist: [boolean]): string; + + /** + * removes a password from the cache + * @param UserName the name of the user whose password should be removed. + * @param RemovePersist indicates whether or not the password should also be removed, if present, from persistent cache. + */ + removePassword(UserName: string, RemovePersist: boolean): void; + } + } + + namespace awt { + /** + * Accessible list box lists are used by list boxes as container for the list items. In addition of the simple container functionality of the {@link + * AccessibleList} service the {@link com.sun.star.accessibility.XAccessibleSelection} interface is supported. + * @since OOo 1.1.2 + */ + type AccessibleListBoxList = AccessibleList; + + /** + * An implementation which uses the message queue to call the callback implementation asynchronously. + * @see XRequestCallback + */ + type AsyncCallback = XRequestCallback; + + /** specifies a provider for container windows implementing the {@link com.sun.star.awt.XWindow} interface. */ + type ContainerWindowProvider = XContainerWindowProvider; + + /** specifies a provider for dialogs implementing the {@link com.sun.star.awt.XDialog} interface. */ + type DialogProvider2 = XDialogProvider2; + + /** + * describes a menu for top-level windows. + * + * A menu bar can only be used by top-level windows. They support the interface {@link com.sun.star.awt.XTopWindow} to set an menu bar object. + */ + type MenuBar = XMenuBar; + + /** @since LibreOffice 4.1 */ + type Pointer = XPointer; + + /** + * describes a popup menu which is a recursive container for commands + * + * A popup menu can be used as a standalone object to display a context menu. It's also possible to use a popup menu to integrate it into another menu. + */ + type PopupMenu = XPopupMenu; + + /** + * fired if a resource cannot be locked. + * + * It is an error if the exception occurs in a non-transacted task. A transacted task repeats later. + */ + type PrinterException = uno.Exception; + + /** + * mechanism to discover and manage printers + * @since LibreOffice 4.1 + */ + type PrinterServer = XPrinterServer; + + /** + * is a specialization of the {@link AnimatedImagesControlModel} . + * + * To show a progress which cannot be expressed as a percentage of execution, it displays animated images from a standard image set. + * + * Three image sets are provided, of size 16x16, 32x32, and 64x64 pixels. + */ + type SpinningProgressControlModel = AnimatedImagesControlModel; + + /** specifies a standard tab controller. */ + type TabController = XTabController; + + /** + * describes a toolkit that creates windows on a screen. + * + * The design of the interfaces for the toolkit implementation should be remote. This means that the calls to the interfaces of the toolkit should be + * one-way. Too many synchronous calls kill the remote performance. + */ + type Toolkit = XToolkit2; + + /** specifies a dialog control. */ + type UnoControlDialog = XUnoControlDialog; + + /** + * specifies a file control. + * + * A file control extends the {@link UnoControlEdit} with a file dialog. + */ + type UnoControlFileControl = UnoControlEdit; + + /** specifies a fixed line control. */ + type UnoControlFixedLine = UnoControl; + + /** specifies a group box control. */ + type UnoControlGroupBox = UnoControl; + + /** identifies a control model. */ + type XControlModel = uno.XInterface; + + /** + * specifies an object as a bitmap for which data is formatted for a specific output device. + * + * Drawing of this bitmap is only valid on a compatible device. + */ + type XDisplayBitmap = uno.XInterface; + + /** identifies a menu bar. */ + type XMenuBar = XMenu; + + /** + * is supported by buttons which can be toggled between a "pressed" and an "unpressed" state + * + * Changes in the toggle state are broadcasted to {@link XItemListener} instances. + */ + type XToggleButton = XItemEventBroadcaster; + + /** specifies the adjustment type. */ + const enum AdjustmentType { + /** adjustment is originated by dragging the thumb. */ + ADJUST_ABS = 2, + /** + * adjustment is originated by a line jump.

A line jump can, for example, be caused by a click on + * + * one of the pointer buttons.

+ */ + ADJUST_LINE = 0, + /** + * adjustment is originated by a page jump.

A page jump can, for example, be caused by a click in the + * + * background area of the scrollbar (neither one of the pointer + * + * buttons, nor the thumb).

+ */ + ADJUST_PAGE = 1, + } + + /** used to specify the slant of a font. */ + const enum FontSlant { + /** + * specifies a font with an unknown slant. + * + * specifies that the menu item type is unknown. + */ + DONTKNOW = 3, + /** specifies an italic font (slant designed into the font). */ + ITALIC = 2, + /** specifies a font without slant. */ + NONE = 0, + /** specifies an oblique font (slant not designed into the font). */ + OBLIQUE = 1, + /** specifies a reverse italic font (slant designed into the font). */ + REVERSE_ITALIC = 5, + /** specifies a reverse oblique font (slant not designed into the font). */ + REVERSE_OBLIQUE = 4, + } + + /** specify the style of color dispersion. */ + const enum GradientStyle { + /** specifies an axial gradient. */ + AXIAL = 1, + /** specifies an elliptical gradient. */ + ELLIPTICAL = 3, + /** specifies a linear gradient. */ + LINEAR = 0, + /** specifies a radial gradient. */ + RADIAL = 2, + /** specifies a gradient in the shape of a rectangle. */ + RECT = 5, + /** specifies a gradient in the shape of a square. */ + SQUARE = 4, + } + + /** specifies the type of a menu item, as returned by {@link com.sun.star.awt.XMenu.getItemType()} . */ + const enum MenuItemType { + /** + * specifies a font with an unknown slant. + * + * specifies that the menu item type is unknown. + */ + DONTKNOW = 0, + /** specifies that the menu item has an image. */ + IMAGE = 2, + /** specifies that the menu item is a separator. */ + SEPARATOR = 4, + /** specifies that the menu item has a text. */ + STRING = 1, + /** specifies that the menu item has a text **and** an image. */ + STRINGIMAGE = 3, + } + + /** + * specifies the type of a {@link XMessageBox} . + * @since LibreOffice 4.2 + */ + const enum MessageBoxType { + /** A message box to provide an error message to the user. */ + ERRORBOX = 3, + /** A message box to inform the user about a certain event */ + INFOBOX = 1, + /** A normal message box. */ + MESSAGEBOX = 0, + /** A message box to query information from the user. */ + QUERYBOX = 4, + /** A message to warn the user about a certain problem. */ + WARNINGBOX = 2, + } + + /** specifies the default actions of a button. */ + const enum PushButtonType { + /** acts like a cancel button. */ + CANCEL = 2, + /** acts like a help button. */ + HELP = 3, + /** acts like a OK button. */ + OK = 1, + /** acts like a standard push button. */ + STANDARD = 0, + } + + /** These values are used to specify the binary pixel-operation applied when pixels are written to the device. */ + const enum RasterOperation { + /** All bits which are affected by this operation are set to 1. */ + ALLBITS = 3, + /** All bits which are affected by this operation are inverted. */ + INVERT = 4, + /** sets all pixel as written in the output operation. */ + OVERPAINT = 0, + /** uses the pixel written as one and the current pixel as the other operator of an exclusive or-operation. */ + XOR = 1, + /** All bits which are affected by this operation are set to 0. */ + ZEROBITS = 2, + } + + /** specifies the class of a window. */ + const enum WindowClass { + /** is a container that may contain other components. It is not a top window. */ + CONTAINER = 2, + /** is a modal top level window on the desktop. It is also a container. */ + MODALTOP = 1, + /** is the simplest window. It can be a container. */ + SIMPLE = 3, + /** specifies a top level window on the desktop. It is also a container. */ + TOP = 0, + } + + /** + * specifies accessibility support for a button. + * @since OOo 1.1.2 + */ + interface AccessibleButton extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent, accessibility.XAccessibleText, accessibility.XAccessibleAction, accessibility.XAccessibleValue { } + + /** + * specifies accessibility support for a check box. + * @since OOo 1.1.2 + */ + interface AccessibleCheckBox extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent, accessibility.XAccessibleText, accessibility.XAccessibleAction, accessibility.XAccessibleValue { } + + /** + * specifies accessibility support for a combo box. + * @see com.sun.star.accessibility.AccessibleContext + * @see com.sun.star.accessibility.XAccessibleComponent + * @see com.sun.star.accessibility.XAccessibleExtendedComponent + * @since OOo 1.1.2 + */ + interface AccessibleComboBox extends accessibility.AccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleExtendedComponent { } + + /** + * specifies accessibility support for a dropdown combo box. + * @see com.sun.star.accessibility.AccessibleContext + * @see com.sun.star.accessibility.XAccessibleComponent + * @see com.sun.star.accessibility.XAccessibleExtendedComponent + * @see com.sun.star.accessibility.XAccessibleAction + * @since OOo 1.1.2 + */ + interface AccessibleDropDownComboBox extends accessibility.AccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleExtendedComponent, + accessibility.XAccessibleAction { } + + /** + * specifies accessibility support for a dropdown list box. + * @see com.sun.star.accessibility.AccessibleContext + * @see com.sun.star.accessibility.XAccessibleComponent + * @see com.sun.star.accessibility.XAccessibleExtendedComponent + * @see com.sun.star.accessibility.XAccessibleAction + * @since OOo 1.1.2 + */ + interface AccessibleDropDownListBox extends accessibility.AccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleExtendedComponent, + accessibility.XAccessibleAction { } + + /** + * specifies accessibility support for an edit. + * @since OOo 1.1.2 + */ + interface AccessibleEdit extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent, accessibility.XAccessibleText, accessibility.XAccessibleEditableText { } + + /** + * specifies accessibility support for a fixed text. + * @since OOo 1.1.2 + */ + interface AccessibleFixedText extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent, accessibility.XAccessibleText { } + + /** + * specifies accessibility support for an icon choice control. + * @see com.sun.star.accessibility.AccessibleContext + * @see com.sun.star.accessibility.XAccessibleComponent + * @since OOo 1.1.2 + */ + interface AccessibleIconChoiceControl extends accessibility.AccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleSelection { } + + /** + * specifies accessibility support for an icon choice control entry. + * @see com.sun.star.accessibility.AccessibleContext + * @see com.sun.star.accessibility.XAccessibleComponent + * @see com.sun.star.accessibility.XAccessibleText + * @since OOo 1.1.2 + */ + interface AccessibleIconChoiceControlEntry extends accessibility.AccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleText { } + + /** + * Accessible lists are used by combo boxes as container for the list items. + * @see com.sun.star.accessibility.AccessibleContext + * @see com.sun.star.accessibility.XAccessibleComponent + * @see com.sun.star.accessibility.XAccessibleExtendedComponent + * @see com.sun.star.accessibility.XAccessibleSelection + * @since OOo 1.1.2 + */ + interface AccessibleList extends accessibility.AccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleExtendedComponent, + accessibility.XAccessible, accessibility.XAccessibleSelection { } + + /** + * specifies accessibility support for a list box. + * @see com.sun.star.accessibility.AccessibleContext + * @see com.sun.star.accessibility.XAccessibleComponent + * @see com.sun.star.accessibility.XAccessibleExtendedComponent + * @since OOo 1.1.2 + */ + interface AccessibleListBox extends accessibility.AccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleExtendedComponent { } + + /** + * specifies accessibility support for a list item. + * @see com.sun.star.accessibility.AccessibleContext + * @see com.sun.star.accessibility.XAccessibleComponent + * @see com.sun.star.accessibility.XAccessibleText + * @since OOo 1.1.2 + */ + interface AccessibleListItem extends accessibility.AccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleText { } + + /** + * specifies accessibility support for a menu. + * @since OOo 1.1.2 + */ + interface AccessibleMenu extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent, accessibility.XAccessibleText, accessibility.XAccessibleAction, accessibility.XAccessibleValue, + accessibility.XAccessibleSelection { } + + /** + * specifies accessibility support for a menu bar. + * @since OOo 1.1.2 + */ + interface AccessibleMenuBar extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent, accessibility.XAccessibleSelection { } + + /** + * specifies accessibility support for a menu item. + * @since OOo 1.1.2 + */ + interface AccessibleMenuItem extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent, accessibility.XAccessibleText, accessibility.XAccessibleAction, accessibility.XAccessibleValue { } + + /** + * specifies accessibility support for a menu separator. + * @since OOo 1.1.2 + */ + interface AccessibleMenuSeparator extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent { } + + /** + * specifies accessibility support for a pop-up menu. + * @since OOo 1.1.2 + */ + interface AccessiblePopupMenu extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent, accessibility.XAccessibleSelection { } + + /** + * specifies accessibility support for a radio button. + * @since OOo 1.1.2 + */ + interface AccessibleRadioButton extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent, accessibility.XAccessibleText, accessibility.XAccessibleAction, accessibility.XAccessibleValue { } + + /** + * specifies accessibility support for a scroll bar. + * @since OOo 1.1.2 + */ + interface AccessibleScrollBar extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent, accessibility.XAccessibleAction, accessibility.XAccessibleValue { } + + /** + * specifies accessibility support for a status bar. + * @since OOo 1.1.2 + */ + interface AccessibleStatusBar extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent { } + + /** + * specifies accessibility support for a status bar item. + * @since OOo 1.1.2 + */ + interface AccessibleStatusBarItem extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent, accessibility.XAccessibleText { } + + /** + * specifies accessibility support for a tabbar. + * @since OOo 1.1.2 + */ + interface AccessibleTabBar extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent { } + + /** + * specifies accessibility support for a tabbar page. + * @since OOo 1.1.2 + */ + interface AccessibleTabBarPage extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent { } + + /** + * specifies accessibility support for a tabbar page list. + * @since OOo 1.1.2 + */ + interface AccessibleTabBarPageList extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent, accessibility.XAccessibleSelection { } + + /** + * specifies accessibility support for a tab control. + * @since OOo 1.1.2 + */ + interface AccessibleTabControl extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent, accessibility.XAccessibleSelection { } + + /** + * specifies accessibility support for a tab page. + * @since OOo 1.1.2 + */ + interface AccessibleTabPage extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent, accessibility.XAccessibleText { } + + /** + * Text fields are like edit fields as described by the {@link AccessibleEdit} service but without the ability to edit the text. + * @see com.sun.star.accessibility.AccessibleContext + * @see com.sun.star.accessibility.XAccessibleComponent + * @see com.sun.star.accessibility.XAccessibleExtendedComponent + * @see com.sun.star.accessibility.XAccessibleText + * @since OOo 1.1.2 + */ + interface AccessibleTextField extends accessibility.AccessibleContext, accessibility.XAccessibleText, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent { } + + /** + * specifies accessibility support for a tool box. + * @see com.sun.star.accessibility.AccessibleContext + * @see com.sun.star.accessibility.XAccessibleComponent + * @see com.sun.star.accessibility.XAccessibleExtendedComponent + * @since OOo 1.1.2 + */ + interface AccessibleToolBox extends accessibility.AccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleExtendedComponent { } + + /** + * specifies accessibility support for a tool box item. + * @see com.sun.star.accessibility.AccessibleContext + * @see com.sun.star.accessibility.XAccessibleComponent + * @see com.sun.star.accessibility.XAccessibleExtendedComponent + * @see com.sun.star.accessibility.XAccessibleAction + * @see com.sun.star.accessibility.XAccessibleText + * @see com.sun.star.accessibility.XAccessibleValue + * @since OOo 1.1.2 + */ + interface AccessibleToolBoxItem extends accessibility.AccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleExtendedComponent, + accessibility.XAccessibleAction, accessibility.XAccessibleText, accessibility.XAccessibleValue { } + + /** + * specifies accessibility support for a tree list box. + * @see com.sun.star.accessibility.AccessibleContext + * @see com.sun.star.accessibility.XAccessibleComponent + * @see com.sun.star.accessibility.XAccessibleSelection + * @since OOo 1.1.2 + */ + interface AccessibleTreeListBox extends accessibility.AccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleSelection { } + + /** + * specifies accessibility support for a treelistbox entry. + * @see com.sun.star.accessibility.AccessibleContext + * @see com.sun.star.accessibility.XAccessibleAction + * @see com.sun.star.accessibility.XAccessibleSelection + * @see com.sun.star.accessibility.XAccessibleText + * @since OOo 1.1.2 + */ + interface AccessibleTreeListBoxEntry extends accessibility.AccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleAction, + accessibility.XAccessibleSelection, accessibility.XAccessibleText { } + + /** + * specifies accessibility support for a window. + * @since OOo 1.1.2 + */ + interface AccessibleWindow extends accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent { } + + /** + * a semantic event which indicates that a component-defined action occurred. + * + * This high-level event is generated by a component (such as a Button) when the component-specific action occurs (such as being pressed). The event is + * passed to every {@link XActionListener} object that registered to receive such events using the component's `addActionListener` method. + * + * The object that implements the {@link XActionListener} interface gets this {@link ActionEvent} when the event occurs. The listener is therefore spared + * the details of processing individual mouse movements and mouse clicks, and can instead process a "meaningful" (semantic) event like "button pressed". + */ + interface ActionEvent extends lang.EventObject { + /** contains the command string associated with this action. */ + ActionCommand: string; + } + + /** adjustment event emitted by adjustable objects. */ + interface AdjustmentEvent extends lang.EventObject { + /** contains the type of the adjustment event. */ + Type: AdjustmentType; + + /** contains the current value in the adjustment event. */ + Value: number; + } + + /** + * is the default control used for an {@link AnimatedImagesControlModel} , displayed a series of images. + * @since OOo 3.4 + */ + interface AnimatedImagesControl extends UnoControl, XAnimation { } + + /** + * describes the model for a control displaying a series of images + * @since OOo 3.4 + */ + interface AnimatedImagesControlModel extends UnoControlModel, XAnimatedImages { } + + /** contains information about a device. */ + interface DeviceInfo { + /** contains the color-depth of the device. */ + BitsPerPixel: number; + + /** contains the inset from the bottom. */ + BottomInset: number; + + /** + * specifies special operations which are possible on the device. + * @see DeviceCapability + */ + Capabilities: number; + + /** contains the height of the device in pixels. */ + Height: number; + + /** contains the inset from the left. */ + LeftInset: number; + + /** contains the X-axis resolution of the device in pixel/meter. */ + PixelPerMeterX: number; + + /** contains the Y-axis resolution of the device in pixel/meter. */ + PixelPerMeterY: number; + + /** contains the inset from the right. */ + RightInset: number; + + /** contains the inset from the top. */ + TopInset: number; + + /** contains the width of the device in pixels. */ + Width: number; + } + + /** Specifies a provider for dialogs implementing the {@link com.sun.star.awt.XDialog} interface. */ + interface DialogProvider extends XDialogProvider { + createWithModel(Model: frame.XModel): void; + createWithModelAndScripting(Model: frame.XModel, InStream: io.XInputStream, DialogLib: container.XNameContainer, ScriptListener: script.XScriptListener): void; + } + + /** data returned by docking handler */ + interface DockingData { + /** specifies that the window should be floating (TRUE) or docked (FALSE) */ + bFloating: boolean; + + /** specifies the position and size where the window would be placed if the user releases the mouse */ + TrackingRectangle: Rectangle; + } + + /** specifies a docking event. */ + interface DockingEvent extends lang.EventObject { + /** + * specifies if the docking procedure is interactive which means that the user is currently dragging the window to a new position if this member is + * `FALSE` the window will be docked or undocked immediately using the returned tracking rectangle + */ + bInteractive: boolean; + + /** specifies if the layout should be adjusted immediately */ + bLiveMode: boolean; + + /** specifies the current mouse position in frame coordinates */ + MousePos: Point; + + /** specifies the current tracking rectangle */ + TrackingRectangle: Rectangle; + } + + /** specifies an end docking event. */ + interface EndDockingEvent extends lang.EventObject { + /** specifies that the docking procedure was canceled */ + bCancelled: boolean; + + /** specifies if the window is now floating `TRUE` or docked `FALSE` */ + bFloating: boolean; + + /** specifies the new bounding rectangle of the window */ + WindowRectangle: Rectangle; + } + + /** specifies an end pop-up mode event. */ + interface EndPopupModeEvent extends lang.EventObject { + /** + * specifies how the pop-up mode was ended `TRUE` means the window should be teared-off and positioned at FloatingPosition `FALSE` means the window was + * closed + */ + bTearoff: boolean; + + /** specifies the new position of the floating window in frame coordinates if bTearoff is `TRUE` */ + FloatingPosition: Point; + } + + /** + * specifies an event from the mouse. + * @see MouseEvent + * @since OOo 2.0 + */ + interface EnhancedMouseEvent extends MouseEvent { + /** contains the object on the location of the mouse. */ + Target: uno.XInterface; + } + + /** + * specifies a keyboard focus event. + * + * There are two levels of focus change events: permanent and temporary. Permanent focus change events occur when focus is directly moved from one + * component to another, such as through calls to requestFocus() or as the user uses the Tab key to traverse components. Temporary focus change events + * occur when focus is gained or lost for a component as the indirect result of another operation, such as window deactivation or a scrollbar drag. In + * this case, the original focus state will automatically be restored once that operation is finished, or for the case of window deactivation, when the + * window is reactivated. Both permanent and temporary focus events are delivered using the FOCUS_GAINED and FOCUS_LOST event ids; the levels may be + * distinguished in the event using the isTemporary() method. + */ + interface FocusEvent extends lang.EventObject { + /** + * specifies the reason for the focus change as an arithmetic-or combination of {@link FocusChangeReason} . + * @see FocusChangeReason + */ + FocusFlags: number; + + /** contains the window which gets the focus on a lose focus event. */ + NextFocus: uno.XInterface; + + /** specifies if this focus change event is a temporary change. */ + Temporary: boolean; + } + + /** + * describes the characteristics of a font. + * + * For example, this can be used to select a font. + */ + interface FontDescriptor { + /** + * specifies the character width. + * + * Depending on the specified width, a font that supports this width may be selected. + * + * The value is expressed as a percentage. + */ + CharacterWidth: number; + + /** + * specifies the character set which is supported by the font. + * + * Use one value out of the constant group {@link com.sun.star.awt.CharSet} . + */ + CharSet: number; + + /** + * specifies the general style of the font. + * + * Use one value out of the constant group {@link com.sun.star.awt.FontFamily} . + */ + Family: number; + + /** specifies the height of the font in the measure of the destination. */ + Height: number; + + /** For requesting, it specifies if there is a kerning table available. For selecting, it specifies if the kerning table is to be used. */ + Kerning: boolean; + + /** specifies the exact name of the font. */ + Name: string; + + /** + * specifies the rotation of the font. + * + * The unit of measure is degrees; 0 is the baseline. + */ + Orientation: number; + + /** + * specifies the pitch of the font. + * + * Use one value out of the constant group {@link com.sun.star.awt.FontPitch} . + */ + Pitch: number; + + /** specifies the slant of the font. */ + Slant: FontSlant; + + /** + * specifies the kind of strikeout. + * + * Use one value out of the constant group {@link com.sun.star.awt.FontStrikeout} . + */ + Strikeout: number; + + /** specifies the style name of the font. */ + StyleName: string; + + /** + * specifies the technology of the font representation. + * + * One or more values out of the constant group {@link com.sun.star.awt.FontType} can be combined by an arithmetical or-operation. + */ + Type: number; + + /** + * specifies the kind of underlining. + * + * Use one value out of the constant group {@link com.sun.star.awt.FontUnderline} . + */ + Underline: number; + + /** + * specifies the thickness of the line. + * + * Depending on the specified weight, a font that supports this thickness may be selected. + * + * The value is expressed as a percentage. + */ + Weight: number; + + /** specifies the width of the font in the measure of the destination. */ + Width: number; + + /** + * specifies if only words get underlined. + * + * `TRUE` means that only non-space characters get underlined, `FALSE` means that the spacing also gets underlined. + * + * This property is only valid if the property {@link com.sun.star.awt.FontDescriptor.Underline} is not {@link FontUnderline.NONE} . + */ + WordLineMode: boolean; + } + + /** + * Describes a gradient between two colors. Many aspects of the gradient are undefined, like the algorithm and color space to use to interpolate between + * the colors and what "intensity" means. + */ + interface Gradient { + /** angle of the gradient in 1/10 degree. */ + Angle: number; + + /** per cent of the total width where just the start color is used. */ + Border: number; + + /** specifies the color at the end point of the gradient. */ + EndColor: util.Color; + + /** specifies the intensity at the end point of the gradient. */ + EndIntensity: number; + + /** specifies the color at the start point of the gradient. */ + StartColor: util.Color; + + /** Specifies the intensity at the start point of the gradient. What that means is undefined. */ + StartIntensity: number; + + /** Specifies the number of steps of change color. What that means is undefined. */ + StepCount: number; + + /** specifies the style of the gradient. */ + Style: GradientStyle; + + /** + * Specifies the X-coordinate, where the gradient begins, whatever that means. Possibly means the **center** of the ELLIPTICAL, SQUARE and RECT style + * gradients? + */ + XOffset: number; + + /** Specifies the Y-coordinate, where the gradient begins. See previous field. */ + YOffset: number; + } + + /** + * the root event class for all component-level input events. + * + * Input events are delivered to listeners before they are processed normally by the source where they originated. + * @see WindowEvent + */ + interface InputEvent extends lang.EventObject { + /** + * contains the modifier keys which were pressed while the event occurred. + * + * Zero or more constants from the {@link com.sun.star.awt.KeyModifier} group. + */ + Modifiers: number; + } + + /** specifies an event occurred to an item of a menu, a list box etc. */ + interface ItemEvent extends lang.EventObject { + /** specifies which item is newly highlighted. */ + Highlighted: number; + + /** specifies the id of the item. */ + ItemId: number; + + /** specifies which item is newly selected. */ + Selected: number; + } + + /** is the event broadcasted by a XListItems implementation for changes in its item list. */ + interface ItemListEvent extends lang.EventObject { + /** + * the URL of the image of the item + * + * If the event being notified did not touch the image of an item, this member is empty. For instance, upon invocation of {@link XItemList.setItemText()} + * , only `ItemText` will be set, and `ItemImageURL` will be empty. + */ + ItemImageURL: com.sun.star.beans.Optional; + + /** + * specifies the position of the item which is affected by the event + * + * In case the event is not related to a single item, but to the complete list, the value of this member is undefined. + */ + ItemPosition: number; + + /** + * the text of the item. + * + * If the event being notified did not touch the text of an item, this member is empty. For instance, upon invocation of {@link XItemList.setItemImage()} + * , only `ItemImageURL` will be set, and `ItemText` will be empty. + */ + ItemText: com.sun.star.beans.Optional; + } + + /** + * specifies a key event. + * @see InputEvent + */ + interface KeyEvent extends InputEvent { + /** contains the Unicode character generated by this event or 0. */ + KeyChar: string; + + /** + * contains the integer code representing the key of the event. + * + * This is a constant from the constant group {@link Key} . + */ + KeyCode: number; + + /** + * contains the function type of the key event. + * + * This is a constant from the constant group {@link KeyFunction} . + */ + KeyFunc: number; + } + + /** + * Describes a key stroke for hotkeys etc. + * @since OOo 1.1.2 + */ + interface KeyStroke { + /** contains the Unicode character generated by this event or 0. */ + KeyChar: string; + + /** + * contains the integer code representing the key of the event. + * + * This is a constant from the constant group {@link com.sun.star.awt.Key} . + */ + KeyCode: number; + + /** + * contains the function type of the key event. + * + * This is a constant from the constant group {@link com.sun.star.awt.KeyFunction} . + */ + KeyFunc: number; + + /** + * contains the modifier keys which were pressed while the event occurred. + * + * Zero or more constants from the group {@link com.sun.star.awt.KeyModifier} . + */ + Modifiers: number; + } + + /** specifies a menu event. */ + interface MenuEvent extends lang.EventObject { + /** contains the item ID. */ + MenuId: number; + } + + /** + * specifies an event from the mouse. + * + * This event is also used for pop-up menu requests on objects. See {@link PopupTrigger} for details. + * @see XMouseListener + * @see XMouseMotionListener + * @see InputEvent + */ + interface MouseEvent extends InputEvent { + /** + * contains the pressed mouse buttons. + * + * Zero ore more constants from the {@link com.sun.star.awt.MouseButton} group. + */ + Buttons: number; + + /** contains the number of mouse clicks associated with event. */ + ClickCount: number; + + /** + * specifies if this event is a pop-up menu trigger event. + * + * If this member is `TRUE` , the event describes a request for a pop-up menu, also known as context menu, on an object. + * + * In this case, X and Y describe the position where the request was issued. If those members are `-1` , then the request was issued using the keyboard, + * by pressing the operating-system dependent key combination for this purpose. + * @see XMouseListener.mousePressed + */ + PopupTrigger: boolean; + + /** contains the x coordinate location of the mouse. */ + X: number; + + /** contains the y coordinate location of the mouse. */ + Y: number; + } + + /** + * specifies the paint event for a component. + * + * This event is a special type which is used to ensure that paint/update method calls are serialized along with the other events delivered from the + * event queue. + * @see WindowEvent + */ + interface PaintEvent extends lang.EventObject { + /** + * contains the number of paint events that follows this event if it is a multiple {@link PaintEvent} . You can collect the {@link PaintEvent} until + * Count is zero. + */ + Count: number; + + /** contains the rectangle area which needs to be repainted. */ + UpdateRect: Rectangle; + } + + /** specifies a 2-dimensional point using the Cartesian coordinate system. */ + interface Point { + /** specifies the x-coordinate. */ + X: number; + + /** specifies the y-coordinate. */ + Y: number; + } + + /** specifies a rectangular area by position and size. */ + interface Rectangle { + /** specifies the height. */ + Height: number; + + /** specifies the width. */ + Width: number; + + /** specifies the x-coordinate. */ + X: number; + + /** specifies the y-coordinate. */ + Y: number; + } + + interface RoadmapItem { + /** determines whether a control is enabled or disabled. */ + Enabled: boolean; + + /** + * The ID uniquely identifies the roadmap item. When the {@link RoadmapItem} is inserted into the Roadmap via "insertByIndex" the default value of the ID + * is the first available absolute digit that has not yet been assigned to other existing RoadmapItems. + */ + ID: number; + + /** + * When "Interactive" is true the {@link RoadmapItem} supports a certain "HyperLabel; functionality": Moving the mouse pointer over the {@link + * RoadmapItem} will change it to a Refhand and underline the Label for the time the mouse pointer resides over the {@link RoadmapItem} . Clicking with + * mouse pointer will then notify the Roadmap Container. The property Interactive" is readonly because it is adapted from the container of the {@link + * RoadmapItem} . + */ + Interactive: boolean; + + /** The Label of the {@link RoadmapItem} does not include its Prefix that is automatically set after the following algorithm: (Index + 1) + ". " + Label */ + Label: string; + } + + /** specifies a numerical range. */ + interface Selection { + /** specifies the upper limit of the range. */ + Max: number; + + /** specifies the lower limit of the range. */ + Min: number; + } + + /** describes the general metrics of a certain font. */ + interface SimpleFontMetric { + /** + * specifies the portion of a lower case character that rises above the height of the character "x" of the font. + * + * For example, the letters "b", "d", "h", "k" and "l" have an ascent unequal to 0. + * + * The ascent is measured in pixels, thus the font metric is device dependent. + */ + Ascent: number; + + /** + * specifies the portion of a letter falling below the baseline. + * + * For example, the letters "g", "p", and "y" have a descent unequal to 0. + * + * The descent is measured in pixels, thus the font metric is device dependent. + */ + Descent: number; + + /** specifies the code of the first printable character in the font. */ + FirstChar: string; + + /** specifies the code of the last printable character in the font. */ + LastChar: string; + + /** + * specifies the vertical space between lines of this font; it is also called internal line spacing. + * + * The leading is measured in pixels, thus the font metric is device dependent. + */ + Leading: number; + + /** + * specifies the slant of the characters (italic). + * + * The slant is measured in degrees from 0 to 359. + */ + Slant: number; + } + + /** specifies the 2-dimensional size of an area using width and height. */ + interface Size { + /** specifies the height. */ + Height: number; + + /** specifies the width. */ + Width: number; + } + + /** specifies a spin button event. */ + interface SpinEvent extends lang.EventObject { + /** This is a dummy field only. Please ignore. */ + dummy1: number; + } + + /** + * specifies a system dependent {@link XWindow} . + * + * This is the structure returned in the {@link XSystemDependentWindowPeer.getWindowHandle()} call, if the system type is + * com::sun::star::lang::SystemDependent::XWINDOW. + * @deprecated Deprecated + */ + interface SystemDependentXWindow { + /** The display pointer. */ + DisplayPointer: number; + + /** The {@link XWindow} handle if possible, otherwise 0. */ + WindowHandle: number; + } + + /** specifies a standard tab controller model. */ + interface TabControllerModel extends XTabControllerModel, io.XPersistObject { } + + /** specifies a text event. */ + interface TextEvent extends lang.EventObject { + /** This is a dummy field only. Please ignore. */ + dummy1: number; + } + + /** + * specifies an abstract control. + * + * All components which implement this service can be integrated in a windowing environment. This service describes the controller of the Smalltalk model + * view controller design. + * + * You must set a model and a stub to the {@link UnoControl} before using other methods. The implementation only allows the change of the graphics ( + * {@link XView} ) if the window is not visible. The change of the graphics in visible state should redirect the output to these graphics, but this + * behavior is implementation-specific. + * + * The change of data directly at the control may not affect the model data. To ensure this behavior, modify the data of the model. + */ + interface UnoControl extends lang.XComponent, XControl, XWindow, XView, accessibility.XAccessible { } + + /** specifies a button control. */ + interface UnoControlButton extends UnoControl, XButton, XLayoutConstrains { } + + /** specifies the standard model of an {@link UnoControlButton} . */ + interface UnoControlButtonModel extends UnoControlModel { + /** + * specifies the horizontal alignment of the text in the control. + * + * `; 0: left; 1: center; 2: right; ` + */ + Align: number; + + /** specifies the background color (RGB) of the control. */ + BackgroundColor: util.Color; + + /** specifies that the button is the default button on the document. */ + DefaultButton: boolean; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** + * specifies whether the button control should grab the focus when clicked. + * + * If set to `TRUE` (which is the default), the button control automatically grabs the focus when the user clicks onto it with the mouse. ; If set to + * `FALSE` , the focus is preserved when the user operates the button control with the mouse. + * @since OOo 2.0 + */ + FocusOnClick: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** + * specifies a graphic to be displayed at the button + * + * If this property is present, it interacts with the {@link ImageURL} in the following way: If {@link ImageURL} is set, {@link Graphic} will be reset to + * an object as loaded from the given image URL, or `NULL` if {@link ImageURL} does not point to a valid image file.If {@link Graphic} is set, {@link + * ImageURL} will be reset to an empty string. + * @since OOo 2.1 + */ + Graphic: graphic.XGraphic; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** specifies the alignment of the image inside the button as {@link ImageAlign} value. */ + ImageAlign: number; + + /** + * specifies the position of the image, if any, relative to the text, if any + * + * Valid values of this property are specified with {@link ImagePosition} . + * + * If this property is present, it supersedes the {@link ImageAlign} property - setting one of both properties sets the other one to the best possible + * match. + */ + ImagePosition: number; + + /** + * specifies an URL to an image to use for the button. + * @see Graphic + */ + ImageURL: string; + + /** specifies the label of the control. */ + Label: string; + + /** + * specifies that the text may be displayed on more than one line. + * @since OOo 2.0 + */ + MultiLine: boolean; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies the default action of the button as PushButtonType value. */ + PushButtonType: number; + + /** + * specifies whether the control should show repeating behavior. + * + * Normally, when you click a button with the mouse, you need to release the mouse button, and press it again. With this property set to `TRUE` , the + * button is repeatedly pressed while you hold down the mouse button. + * @since OOo 2.0 + */ + Repeat: boolean; + + /** + * specifies the mouse repeat delay, in milliseconds. + * + * When the user presses a mouse in a control area where this triggers an action (such as pressing the button), then usual control implementations allow + * to repeatedly trigger this action, without the need to release the mouse button and to press it again. The delay between two such triggers is + * specified with this property. + * @since OOo 2.0 + */ + RepeatDelay: number; + + /** + * specifies the state of the control. + * + * If {@link Toggle} property is set to `TRUE` , the pressed state is enabled and its pressed state can be obtained with this property. + * + * `; 0: not pressed; 1: pressed; 2: don't know; ` + * @see Toggle + */ + State: number; + + /** specifies that the control can be reached with the TAB key. */ + Tabstop: boolean; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** + * specifies whether the button should toggle on a single operation. + * + * If this property is set to `TRUE` , a single operation of the button control (pressing space while it is focused, or clicking onto it) toggles it + * between a **pressed** and a **not pressed** state. + * + * The default for this property is `FALSE` , which means the button behaves like a usual push button. + * @since OOo 2.0 + */ + Toggle: boolean; + + /** + * specifies the vertical alignment of the text in the control. + * @since OOo 2.0 + */ + VerticalAlign: style.VerticalAlignment; + } + + /** specifies a check box control. */ + interface UnoControlCheckBox extends UnoControl, XCheckBox, XLayoutConstrains { } + + /** specifies the standard model of an {@link UnoControlCheckBox} . */ + interface UnoControlCheckBoxModel extends UnoControlModel { + /** + * specifies the horizontal alignment of the text in the control. + * + * `; 0: left; 1: center; 2: right; ` + * @since OOo 2.0 + */ + Align: number; + + /** specifies the background color (RGB) of the control. */ + BackgroundColor: number; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** + * specifies a graphic to be displayed besides the label of the control + * + * If this property is present, it interacts with the {@link ImageURL} in the following way: If {@link ImageURL} is set, {@link Graphic} will be reset to + * an object as loaded from the given image URL, or `NULL` if {@link ImageURL} does not point to a valid image file.If {@link Graphic} is set, {@link + * ImageURL} will be reset to an empty string. + * @since OOo 2.1 + */ + Graphic: graphic.XGraphic; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * specifies the position of the image, if any, relative to the text, if any + * + * Valid values of this property are specified with {@link ImagePosition} . + */ + ImagePosition: number; + + /** + * specifies an URL to an image to display besides the label of the control + * @see Graphic + */ + ImageURL: string; + + /** specifies the label of the control. */ + Label: string; + + /** + * specifies that the text may be displayed on more than one line. + * @since OOo 2.0 + */ + MultiLine: boolean; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** + * specifies the state of the control. + * + * `; 0: not checked; 1: checked; 2: don't know; ` + */ + State: number; + + /** specifies that the control can be reached with the TAB key. */ + Tabstop: boolean; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** specifies that the control may have the state "don't know". */ + TriState: boolean; + + /** + * specifies the vertical alignment of the text in the control. + * @since OOo 2.0 + */ + VerticalAlign: style.VerticalAlignment; + + /** + * specifies a visual effect to apply to the check box control + * + * Possible values for this property are {@link VisualEffect.FLAT} and {@link VisualEffect.LOOK3D} . + * @see com.sun.star.awt.VisualEffect + * @since OOo 2.0 + */ + VisualEffect: number; + + /** + * denotes the writing mode used in the control, as specified in the {@link com.sun.star.text.WritingMode2} constants group. + * + * Only {@link com.sun.star.text.WritingMode2.LR_TB} and {@link com.sun.star.text.WritingMode2.RL_TB} are supported at the moment. + * @since OOo 3.1 + */ + WritingMode: number; + } + + /** specifies a combo box control. */ + interface UnoControlComboBox extends UnoControlEdit, XComboBox { } + + /** specifies the standard model of an {@link UnoControlComboBox} . */ + interface UnoControlComboBoxModel extends UnoControlModel, XItemList { + /** + * specifies the horizontal alignment of the text in the control. + * + * `; 0: left; 1: center; 2: right; ` + */ + Align: number; + + /** specifies whether automatic completion of text is enabled. */ + Autocomplete: boolean; + + /** specifies the background color (RGB) of the control. */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** specifies if the control has a drop down button. */ + Dropdown: boolean; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * specifies whether the selection in the control should be hidden when the control is not active (focused). + * @since OOo 2.0 + */ + HideInactiveSelection: boolean; + + /** specifies the maximum line count displayed in the drop down box. */ + LineCount: number; + + /** + * specifies the maximum character count. + * + * There's no limitation, if set to 0. + */ + MaxTextLen: number; + + /** + * defines how the mouse wheel can be used to scroll through the control's content. + * + * Usually, the mouse wheel scroll through the control's entry list. Using this property, and one of the {@link MouseWheelBehavior} constants, you can + * control under which circumstances this is possible. + */ + MouseWheelBehavior: number; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies that the content of the control cannot be modified by the user. */ + ReadOnly: boolean; + + /** specifies the list of items. */ + StringItemList: SafeArray; + + /** specifies that the control can be reached with the TAB key. */ + Tabstop: boolean; + + /** specifies the text displayed in the control. */ + Text: string; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** + * denotes the writing mode used in the control, as specified in the {@link com.sun.star.text.WritingMode2} constants group. + * + * Only {@link com.sun.star.text.WritingMode2.LR_TB} and {@link com.sun.star.text.WritingMode2.RL_TB} are supported at the moment. + * @since OOo 3.1 + */ + WritingMode: number; + } + + /** specifies an abstract control which contains other controls. */ + interface UnoControlContainer extends UnoControl, XUnoControlContainer, XControlContainer, container.XContainer { } + + /** specifies the standard model of an {@link UnoControlContainer} . */ + interface UnoControlContainerModel extends UnoControlModel { + /** specifies the background color (RGB) of the control. */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** determines whether a control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** specifies whether the control will be printed with the document. */ + Printable: boolean; + + /** specifies the text displayed in the control. */ + Text: string; + } + + /** + * specifies a currency field control. + * + * A currency field makes it possible to enter, display and edit currency values. + */ + interface UnoControlCurrencyField extends UnoControlEdit, XSpinField, XCurrencyField { } + + /** specifies the standard model of an {@link UnoControlCurrencyField} . */ + interface UnoControlCurrencyFieldModel extends UnoControlModel { + /** specifies the background color (RGB) of the control. */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** specifies the currency symbol. */ + CurrencySymbol: string; + + /** specifies the decimal accuracy. */ + DecimalAccuracy: number; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * specifies whether the selection in the control should be hidden when the control is not active (focused). + * @since OOo 2.0 + */ + HideInactiveSelection: boolean; + + /** + * defines how the mouse wheel can be used to scroll through the control's content. + * + * Usually, the mouse wheel spins the numeric value displayed in the control. Using this property, and one of the {@link MouseWheelBehavior} constants, + * you can control under which circumstances this is possible. + */ + MouseWheelBehavior: number; + + /** specifies whether the currency symbol is to be prepended. */ + PrependCurrencySymbol: boolean; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies that the content of the control cannot be modified by the user. */ + ReadOnly: boolean; + + /** + * specifies whether the mouse should show repeating behavior, i.e. repeatedly trigger an action when keeping pressed. + * @since OOo 2.0 + */ + Repeat: boolean; + + /** + * specifies the mouse repeat delay, in milliseconds. + * + * When the user presses a mouse in a control area where this triggers an action (such as spinning the value), then usual control implementations allow + * to repeatedly trigger this action, without the need to release the mouse button and to press it again. The delay between two such triggers is + * specified with this property. + * @since OOo 2.0 + */ + RepeatDelay: number; + + /** specifies whether the thousands separator is to be displayed. */ + ShowThousandsSeparator: boolean; + + /** specifies that the control has a spin button. */ + Spin: boolean; + + /** specifies that the value is checked during the user input. */ + StrictFormat: boolean; + + /** specifies that the control can be reached with the TAB key. */ + Tabstop: boolean; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** specifies the value displayed in the control. */ + Value: number; + + /** specifies the maximum value that can be entered. */ + ValueMax: number; + + /** specifies the minimum value that can be entered. */ + ValueMin: number; + + /** specifies the value step when using the spin button. */ + ValueStep: number; + + /** + * specifies the vertical alignment of the text in the control. + * @since OOo 3.3 + */ + VerticalAlign: style.VerticalAlignment; + + /** + * denotes the writing mode used in the control, as specified in the {@link com.sun.star.text.WritingMode2} constants group. + * + * Only {@link com.sun.star.text.WritingMode2.LR_TB} and {@link com.sun.star.text.WritingMode2.RL_TB} are supported at the moment. + * @since OOo 3.1 + */ + WritingMode: number; + } + + /** + * specifies a date field control. + * + * A date field makes it possible to enter, display and edit date values. + */ + interface UnoControlDateField extends UnoControlEdit, XSpinField, XDateField { } + + /** specifies the standard model of an {@link UnoControlDateField} . */ + interface UnoControlDateFieldModel extends UnoControlModel { + /** specifies the background color(RGB) of the control. */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** specifies the date displayed in the control. */ + Date: util.Date; + + /** + * specifies the format of the displayed date. + * + * `; 0: system short; 1: system short YY; 2: system short YYYY; 3: system long; 4: short DDMMYY; 5: short MMDDYY; 6: short YYMMDD; 7: + * short DDMMYYYY; 8: short MMDDYYYY; 9: short YYYYMMDD; 10: short YYMMDD DIN5008; 11: short YYYYMMDD DIN5008; ` + */ + DateFormat: number; + + /** specifies the maximum date that can be entered. */ + DateMax: util.Date; + + /** specifies the minimum date that can be entered. */ + DateMin: util.Date; + + /** specifies, if the date century is displayed. */ + DateShowCentury: boolean; + + /** specifies, if the control has a dropdown button. */ + Dropdown: boolean; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * specifies whether the selection in the control should be hidden when the control is not active (focused). + * @since OOo 2.0 + */ + HideInactiveSelection: boolean; + + /** + * defines how the mouse wheel can be used to scroll through the control's content. + * + * Usually, the mouse wheel spins the numeric value displayed in the control. Using this property, and one of the {@link MouseWheelBehavior} constants, + * you can control under which circumstances this is possible. + */ + MouseWheelBehavior: number; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies that the content of the control cannot be modified by the user. */ + ReadOnly: boolean; + + /** + * specifies whether the mouse should show repeating behavior, i.e. repeatedly trigger an action when keeping pressed. + * @since OOo 2.0 + */ + Repeat: boolean; + + /** + * specifies the mouse repeat delay, in milliseconds. + * + * When the user presses a mouse in a control area where this triggers an action (such as spinning the value), then usual control implementations allow + * to repeatedly trigger this action, without the need to release the mouse button and to press it again. The delay between two such triggers is + * specified with this property. + * @since OOo 2.0 + */ + RepeatDelay: number; + + /** specifies that the control has a spin button. */ + Spin: boolean; + + /** specifies that the date is checked during the user input. */ + StrictFormat: boolean; + + /** specifies that the control can be reached with the TAB key. */ + Tabstop: boolean; + + /** + * specifies the text displayed in the control. + * @since OOo 2.0 + */ + Text: string; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** + * specifies the vertical alignment of the text in the control. + * @since OOo 3.3 + */ + VerticalAlign: style.VerticalAlignment; + + /** + * denotes the writing mode used in the control, as specified in the {@link com.sun.star.text.WritingMode2} constants group. + * + * Only {@link com.sun.star.text.WritingMode2.LR_TB} and {@link com.sun.star.text.WritingMode2.RL_TB} are supported at the moment. + * @since OOo 3.1 + */ + WritingMode: number; + } + + /** specifies a set of properties to describe the model of an {@link UnoControl} which is embedded in a {@link UnoControlDialogModel} . */ + interface UnoControlDialogElement { + /** specifies the height of the control. */ + Height: number; + + /** specifies the name of the control. */ + Name: string; + + /** specifies the horizontal position of the control. */ + PositionX: string; + + /** specifies the vertical position of the control. */ + PositionY: string; + + /** specifies the step of the control. */ + Step: number; + + /** specifies the tabindex of the control. */ + TabIndex: number; + + /** specifies the tag of the control. */ + Tag: string; + + /** specifies the width of the control. */ + Width: number; + } + + /** specifies the standard model of an {@link UnoControlDialog} . */ + interface UnoControlDialogModel extends UnoControlModel, lang.XMultiServiceFactory, container.XContainer, container.XNameContainer { + /** specifies the background color (RGB) of the dialog. */ + BackgroundColor: util.Color; + + /** specifies if the dialog is closeable. */ + Closeable: boolean; + + /** + * If set to true the dialog will have the desktop as parent. + * @since OOo 2.3 + */ + DesktopAsParent: boolean; + + /** determines whether a dialog is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the caption bar of the dialog. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the caption bar of the dialog. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the caption bar of the dialog. */ + FontRelief: number; + + /** + * specifies a graphic to be displayed as a background image + * + * If this property is present, it interacts with the {@link ImageURL} in the following way: If {@link ImageURL} is set, {@link Graphic} will be reset to + * an object as loaded from the given image URL, or `NULL` if {@link ImageURL} does not point to a valid image file.If {@link Graphic} is set, {@link + * ImageURL} will be reset to an empty string. + * @since OOo 2.4 + */ + Graphic: graphic.XGraphic; + + /** specifies the help text of the dialog. */ + HelpText: string; + + /** specifies the help URL of the dialog. */ + HelpURL: string; + + /** + * specifies a URL that references a graphic that should be used as a background image. + * @see Graphic + * @since OOo 2.4 + */ + ImageURL: string; + + /** specifies if the dialog is moveable. */ + Moveable: boolean; + + /** specifies if the dialog is sizeable. */ + Sizeable: boolean; + + /** specifies the text color (RGB) of the dialog. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the dialog. */ + TextLineColor: util.Color; + + /** specifies the text that is displayed in the caption bar of the dialog. */ + Title: string; + } + + /** + * specifies a service to load a dialog model and allows to access the control models inside + * @since OOo 3.3 + */ + interface UnoControlDialogModelProvider extends container.XNameContainer { + /** Creates a new dialog model */ + create(URL: string): void; + } + + /** specifies an edit control. */ + interface UnoControlEdit extends UnoControl, XTextComponent, XLayoutConstrains, XTextLayoutConstrains { + getMinimumSize(nCols: number, nLines: number): Size; + getMinimumSize(): Size; + } + + /** specifies the standard model of an {@link UnoControlEdit} . */ + interface UnoControlEditModel extends UnoControlModel { + /** + * specifies the horizontal alignment of the text in the control. + * + * `; 0: left; 1: center; 2: right; ` + */ + Align: number; + + /** + * If set to true an horizontal scrollbar will be added automatically when needed. + * @since OOo 2.3 + */ + AutoHScroll: boolean; + + /** + * If set to true an vertical scrollbar will be added automatically when needed. + * @since OOo 2.3 + */ + AutoVScroll: boolean; + + /** specifies the background color (RGB) of the control. */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** specifies the echo character for a password edit field. */ + EchoChar: number; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** specifies if hard line breaks will be returned in the {@link XTextComponent.getText()} method. */ + HardLineBreaks: boolean; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * specifies whether the selection in the control should be hidden when the control is not active (focused). + * @since OOo 2.0 + */ + HideInactiveSelection: boolean; + + /** specifies if the content of the control can be scrolled in the horizontal direction. */ + HScroll: boolean; + + /** + * specifies which line end type should be used for multi line text + * + * Controls working with this model care for this setting when the user enters text. Every line break entered into the control will be treated according + * to this setting, so that the {@link Text} property always contains only line ends in the format specified. + * + * Possible values are all constants from the {@link LineEndFormat} group. + * + * Note that this setting is usually not relevant when you set new text via the API. No matter which line end format is used in this new text then, usual + * control implementations should recognize all line end formats and display them properly. + * @since OOo 2.0 + */ + LineEndFormat: number; + + /** + * specifies the maximum character count. + * + * There's no limitation, if set to 0. + */ + MaxTextLen: number; + + /** specifies that the control may have more than one line. */ + MultiLine: boolean; + + /** + * specifies whether the control paints it background or not. + * @since OOo 2.3 + */ + PaintTransparent: boolean; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies that the content of the control cannot be modified by the user. */ + ReadOnly: boolean; + + /** specifies that the control can be reached with the TAB key. */ + Tabstop: boolean; + + /** specifies the text displayed in the control. */ + Text: string; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** + * specifies the vertical alignment of the text in the control. + * @since OOo 3.3 + */ + VerticalAlign: style.VerticalAlignment; + + /** specifies if the content of the control can be scrolled in the vertical direction. */ + VScroll: boolean; + + /** + * denotes the writing mode used in the control, as specified in the {@link com.sun.star.text.WritingMode2} constants group. + * + * Only {@link com.sun.star.text.WritingMode2.LR_TB} and {@link com.sun.star.text.WritingMode2.RL_TB} are supported at the moment. + * @since OOo 3.1 + */ + WritingMode: number; + } + + /** specifies the standard model of an {@link UnoControlFileControl} . */ + interface UnoControlFileControlModel extends UnoControlModel { + /** specifies the background color (RGB) of the control. */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** determines whether a control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * specifies whether the selection in the control should be hidden when the control is not active (focused). + * @since OOo 2.0 + */ + HideInactiveSelection: boolean; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** + * specifies that the content of the control cannot be modified by the user. + * @since OOo 1.1.2 + */ + ReadOnly: boolean; + + /** specifies that the control can be reached with the TAB key. */ + Tabstop: boolean; + + /** specifies the text displayed in the control. */ + Text: string; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** + * specifies the vertical alignment of the text in the control. + * @since OOo 3.3 + */ + VerticalAlign: style.VerticalAlignment; + } + + /** specifies a control for displaying fixed hyperlink. */ + interface UnoControlFixedHyperlink extends UnoControl, XFixedHyperlink, XLayoutConstrains { } + + /** specifies the standard model of an {@link UnoControlFixedHyperlink} . */ + interface UnoControlFixedHyperlinkModel extends UnoControlModel { + /** + * specifies the horizontal alignment of the text in the control. + * + * `; 0: left; 1: center; 2: right; ` + */ + Align: number; + + /** specifies the background color (RGB) of the control. */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** specifies the label of the control. */ + Label: string; + + /** specifies that the text may be displayed on more than one line. */ + MultiLine: boolean; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** specifies the URL. */ + URL: string; + + /** + * specifies the vertical alignment of the text in the control. + * @since OOo 2.0 + */ + VerticalAlign: style.VerticalAlignment; + } + + /** specifies the standard model of an {@link UnoControlFixedLine} . */ + interface UnoControlFixedLineModel extends UnoControlModel { + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** specifies the label of the control. */ + Label: string; + + /** + * specifies the orientation of the control. + * + * `; 0: horizontal; 1: vertical; ` + */ + Orientation: number; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + } + + /** specifies a control for displaying fixed text. */ + interface UnoControlFixedText extends UnoControl, XFixedText, XLayoutConstrains { } + + /** specifies the standard model of an {@link UnoControlFixedText} . */ + interface UnoControlFixedTextModel extends UnoControlModel { + /** + * specifies the horizontal alignment of the text in the control. + * + * `; 0: left; 1: center; 2: right; ` + */ + Align: number; + + /** specifies the background color (RGB) of the control. */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** specifies the label of the control. */ + Label: string; + + /** specifies that the text may be displayed on more than one line. */ + MultiLine: boolean; + + /** + * suppresses automatic accelerator assignment on this control. + * @since OOo 2.4 + */ + NoLabel: boolean; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** + * specifies the vertical alignment of the text in the control. + * @since OOo 2.0 + */ + VerticalAlign: style.VerticalAlignment; + } + + /** specifies a formatted field control. */ + interface UnoControlFormattedField extends UnoControlEdit, XSpinField { } + + /** specifies the standard model of an {@link UnoControlFormattedField} . */ + interface UnoControlFormattedFieldModel extends UnoControlModel { + /** + * specifies the horizontal alignment of the text in the control. + * + * `; 0: left; 1: center; 2: right; ` + */ + Align: number; + + /** specifies the background color (RGB) of the control. */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** + * specifies the default value of the formatted field. + * + * This may be a numeric value (double) or a string, depending on the formatting of the field. + */ + EffectiveDefault: any; + + /** + * specifies the maximum value that can be entered. + * + * This property is ignored if the format of the field is no numeric format. + */ + EffectiveMax: number; + + /** + * specifies the minimum value that can be entered. + * + * This property is ignored if the format of the field is no numeric format. + */ + EffectiveMin: number; + + /** + * specifies the current value of the formatted field. + * + * This may be a numeric value (double) or a string, depending on the formatting of the field. + */ + EffectiveValue: number; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** + * specifies the format to be used when formatting the field input and output. + * + * This value is meaningful relative to the FormatsSupplier property only. + */ + FormatKey: number; + + /** supplies the formats the field should work with. */ + FormatsSupplier: util.XNumberFormatsSupplier; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * specifies whether the selection in the control should be hidden when the control is not active (focused). + * @since OOo 2.0 + */ + HideInactiveSelection: boolean; + + /** + * specifies the maximum character count. + * + * There's no limitation, if set to 0. + */ + MaxTextLen: number; + + /** + * defines how the mouse wheel can be used to scroll through the control's content. + * + * Usually, the mouse wheel spins the numeric value displayed in the control. Using this property, and one of the {@link MouseWheelBehavior} constants, + * you can control under which circumstances this is possible. + */ + MouseWheelBehavior: number; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies that the content of the control cannot be modified by the user. */ + ReadOnly: boolean; + + /** + * specifies whether the mouse should show repeating behavior, i.e. repeatedly trigger an action when keeping pressed. + * @since OOo 2.0 + */ + Repeat: boolean; + + /** + * specifies the mouse repeat delay, in milliseconds. + * + * When the user presses a mouse in a control area where this triggers an action (such as spinning the value), then usual control implementations allow + * to repeatedly trigger this action, without the need to release the mouse button and to press it again. The delay between two such triggers is + * specified with this property. + * @since OOo 2.0 + */ + RepeatDelay: number; + + /** specifies that the control has a spin button. */ + Spin: boolean; + + /** + * specifies that the text is checked during the user input. + * + * This property is optional - not every component implementing this service is required to provide it, as real-time input checking on a formatted field + * may be pretty expensive. + */ + StrictFormat: boolean; + + /** specifies that the control can be reached with the TAB key. */ + Tabstop: boolean; + + /** specifies the text displayed in the control. */ + Text: string; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** specifies that the text is treated as a number. */ + TreatAsNumber: boolean; + + /** + * specifies the vertical alignment of the text in the control. + * @since OOo 3.3 + */ + VerticalAlign: style.VerticalAlignment; + + /** + * denotes the writing mode used in the control, as specified in the {@link com.sun.star.text.WritingMode2} constants group. + * + * Only {@link com.sun.star.text.WritingMode2.LR_TB} and {@link com.sun.star.text.WritingMode2.RL_TB} are supported at the moment. + * @since OOo 3.1 + */ + WritingMode: number; + } + + /** specifies the standard model of an {@link UnoControlGroupBox} . */ + interface UnoControlGroupBoxModel extends UnoControlModel { + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** specifies the label of the control. */ + Label: string; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** + * denotes the writing mode used in the control, as specified in the {@link com.sun.star.text.WritingMode2} constants group. + * + * Only {@link com.sun.star.text.WritingMode2.LR_TB} and {@link com.sun.star.text.WritingMode2.RL_TB} are supported at the moment. + * @since OOo 3.1 + */ + WritingMode: number; + } + + /** specifies a control for displaying an image. */ + interface UnoControlImageControl extends UnoControl, XLayoutConstrains { } + + /** specifies the standard model of an {@link UnoControlImageControl} . */ + interface UnoControlImageControlModel extends UnoControlModel { + /** specifies the background color (RGB) of the control. */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** + * specifies a graphic to be displayed on the control + * + * If this property is present, it interacts with the {@link ImageURL} in the following way: If {@link ImageURL} is set, {@link Graphic} will be reset to + * an object as loaded from the given image URL, or `NULL` if {@link ImageURL} does not point to a valid image file.If {@link Graphic} is set, {@link + * ImageURL} will be reset to an empty string. + * @since OOo 2.1 + */ + Graphic: graphic.XGraphic; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * specifies an URL to an image to use for the control. + * @see Graphic + */ + ImageURL: string; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies if the image is automatically scaled to the size of the control. */ + ScaleImage: boolean; + + /** + * defines how to scale the image + * + * If this property is present, it supersedes the {@link ScaleImage} property. + * + * The value of this property is one of the {@link ImageScaleMode} constants. + * @since OOo 3.1 + */ + ScaleMode: number; + + /** + * specifies that the control can be reached with the TAB key. + * @since OOo 1.1.2 + */ + Tabstop: boolean; + } + + /** + * specifies a list box control. + * + * A list box displays a list of strings and allows a selection within these. + */ + interface UnoControlListBox extends UnoControl, XListBox, XLayoutConstrains, XTextLayoutConstrains { + getMinimumSize(nCols: number, nLines: number): Size; + getMinimumSize(): Size; + } + + /** specifies the standard model of an {@link UnoControlListBox} . */ + interface UnoControlListBoxModel extends UnoControlModel, XItemList { + /** + * specifies the horizontal alignment of the text in the control. + * + * `; 0: left; 1: center; 2: right; ` + */ + Align: number; + + /** specifies the background color (RGB) of the control. */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** specifies if the control has a drop down button. */ + Dropdown: boolean; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * specifies where an item separator - a horizontal line - is drawn. + * + * If this is not `NULL` , then a horizontal line will be drawn between the item at the given position, and the following item. + * @since OOo 3.3 + */ + ItemSeparatorPos: number; + + /** specifies the maximum line count displayed in the drop down box. */ + LineCount: number; + + /** + * defines how the mouse wheel can be used to scroll through the control's content. + * + * Usually, the mouse wheel scroll through the control's entry list. Using this property, and one of the {@link MouseWheelBehavior} constants, you can + * control under which circumstances this is possible. + */ + MouseWheelBehavior: number; + + /** specifies if more than one entry can be selected. */ + MultiSelection: boolean; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies that the content of the control cannot be modified by the user. */ + ReadOnly: boolean; + + /** specifies the sequence of selected items, identified by the position. */ + SelectedItems: SafeArray; + + /** specifies the list of items. */ + StringItemList: SafeArray; + + /** specifies that the control can be reached with the TAB key. */ + Tabstop: boolean; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** + * denotes the writing mode used in the control, as specified in the {@link com.sun.star.text.WritingMode2} constants group. + * + * Only {@link com.sun.star.text.WritingMode2.LR_TB} and {@link com.sun.star.text.WritingMode2.RL_TB} are supported at the moment. + * @since OOo 3.1 + */ + WritingMode: number; + } + + /** + * specifies the standard model of an {@link UnoControl} in the **Smalltalk model view controller design** . + * + * The interfaces {@link com.sun.star.beans.XPropertySet} and {@link com.sun.star.beans.XMultiPropertySet} need access to the model data from the + * embedding environment. The control and the model can specify additional interfaces to exchange data or export more functionality from the model. + */ + interface UnoControlModel extends UnoControlDialogElement, XControlModel, lang.XComponent, beans.XPropertySet, beans.XMultiPropertySet, io.XPersistObject, + util.XCloneable { + /** specifies the service name of the default control for this model. */ + DefaultControl: string; + } + + /** + * specifies a numeric field control. + * + * A numeric field makes it possible to enter, display and edit formatted numeric values. + */ + interface UnoControlNumericField extends UnoControlEdit, XSpinField, XNumericField { } + + /** specifies the standard model of an {@link UnoControlNumericField} . */ + interface UnoControlNumericFieldModel extends UnoControlModel { + /** specifies the background color(RGB) of the control. */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** specifies the decimal accuracy. */ + DecimalAccuracy: number; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * specifies whether the selection in the control should be hidden when the control is not active (focused). + * @since OOo 2.0 + */ + HideInactiveSelection: boolean; + + /** + * defines how the mouse wheel can be used to scroll through the control's content. + * + * Usually, the mouse wheel spins the numeric value displayed in the control. Using this property, and one of the {@link MouseWheelBehavior} constants, + * you can control under which circumstances this is possible. + */ + MouseWheelBehavior: number; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies that the content of the control cannot be modified by the user. */ + ReadOnly: boolean; + + /** + * specifies whether the mouse should show repeating behavior, i.e. repeatedly trigger an action when keeping pressed. + * @since OOo 2.0 + */ + Repeat: boolean; + + /** + * specifies the mouse repeat delay, in milliseconds. + * + * When the user presses a mouse in a control area where this triggers an action (such as spinning the value), then usual control implementations allow + * to repeatedly trigger this action, without the need to release the mouse button and to press it again. The delay between two such triggers is + * specified with this property. + * @since OOo 2.0 + */ + RepeatDelay: number; + + /** specifies whether the thousands separator is to be displayed. */ + ShowThousandsSeparator: boolean; + + /** specifies that the control has a spin button. */ + Spin: boolean; + + /** specifies that the value is checked during the user input. */ + StrictFormat: boolean; + + /** specifies that the control can be reached with the TAB key. */ + Tabstop: boolean; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** specifies the value displayed in the control. */ + Value: number; + + /** specifies the maximum value that can be entered. */ + ValueMax: number; + + /** specifies the minimum value that can be entered. */ + ValueMin: number; + + /** specifies the value step when using the spin button. */ + ValueStep: number; + + /** + * specifies the vertical alignment of the text in the control. + * @since OOo 3.3 + */ + VerticalAlign: style.VerticalAlignment; + + /** + * denotes the writing mode used in the control, as specified in the {@link com.sun.star.text.WritingMode2} constants group. + * + * Only {@link com.sun.star.text.WritingMode2.LR_TB} and {@link com.sun.star.text.WritingMode2.RL_TB} are supported at the moment. + * @since OOo 3.1 + */ + WritingMode: number; + } + + /** + * specifies a pattern field control. + * + * A pattern field makes it possible to enter, display and edit text which conforms to a specified pattern. + */ + interface UnoControlPatternField extends UnoControlEdit, XSpinField, XPatternField { } + + /** specifies the standard model of an {@link UnoControlPatternField} . */ + interface UnoControlPatternFieldModel extends UnoControlModel { + /** specifies the background color (RGB) of the control. */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** specifies the edit mask. */ + EditMask: string; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * specifies whether the selection in the control should be hidden when the control is not active (focused). + * @since OOo 2.0 + */ + HideInactiveSelection: boolean; + + /** specifies the literal mask. */ + LiteralMask: string; + + /** specifies the maximum character count. */ + MaxTextLen: number; + + /** + * defines how the mouse wheel can be used to scroll through the control's content. + * + * Usually, the mouse wheel spins the numeric value displayed in the control. Using this property, and one of the {@link MouseWheelBehavior} constants, + * you can control under which circumstances this is possible. + */ + MouseWheelBehavior: number; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies that the content of the control cannot be modified by the user. */ + ReadOnly: boolean; + + /** specifies that the text is checked during the user input. */ + StrictFormat: boolean; + + /** specifies that the control can be reached with the TAB key. */ + Tabstop: boolean; + + /** specifies the text displayed in the control. */ + Text: string; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** + * specifies the vertical alignment of the text in the control. + * @since OOo 3.3 + */ + VerticalAlign: style.VerticalAlignment; + + /** + * denotes the writing mode used in the control, as specified in the {@link com.sun.star.text.WritingMode2} constants group. + * + * Only {@link com.sun.star.text.WritingMode2.LR_TB} and {@link com.sun.star.text.WritingMode2.RL_TB} are supported at the moment. + * @since OOo 3.1 + */ + WritingMode: number; + } + + /** specifies a progress bar control. */ + interface UnoControlProgressBar extends UnoControl, XProgressBar { } + + /** specifies the standard model of an {@link UnoControlProgressBar} . */ + interface UnoControlProgressBarModel extends UnoControlModel { + /** specifies the background color (RGB) of the control. */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the fill color (RGB) of the control. */ + FillColor: util.Color; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies the progress value of the control. */ + ProgressValue: number; + + /** specifies the maximum progress value of the control. */ + ProgressValueMax: number; + + /** specifies the minimum progress value of the control. */ + ProgressValueMin: number; + } + + /** specifies a radio button control. */ + interface UnoControlRadioButton extends UnoControl, XRadioButton, XLayoutConstrains { } + + /** specifies the standard model of an {@link UnoControlRadioButton} . */ + interface UnoControlRadioButtonModel extends UnoControlModel { + /** + * specifies the horizontal alignment of the text in the control. + * + * `; 0: left; 1: center; 2: right; ` + * @since OOo 2.0 + */ + Align: number; + + /** specifies the background color (RGB) of the control. */ + BackgroundColor: number; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** + * specifies a graphic to be displayed besides the label of the control + * + * If this property is present, it interacts with the {@link ImageURL} in the following way: If {@link ImageURL} is set, {@link Graphic} will be reset to + * an object as loaded from the given image URL, or `NULL` if {@link ImageURL} does not point to a valid image file.If {@link Graphic} is set, {@link + * ImageURL} will be reset to an empty string. + * @since OOo 2.1 + */ + Graphic: graphic.XGraphic; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * specifies the position of the image, if any, relative to the text, if any + * + * Valid values of this property are specified with {@link ImagePosition} . + */ + ImagePosition: number; + + /** + * specifies an URL to an image to display besides the label of the control + * @see Graphic + */ + ImageURL: string; + + /** specifies the label of the control. */ + Label: string; + + /** + * specifies that the text may be displayed on more than one line. + * @since OOo 2.0 + */ + MultiLine: boolean; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** + * specifies the state of the control. + * + * `; 0: not checked; 1: checked; ` + */ + State: number; + + /** specifies that the control can be reached with the TAB key. */ + Tabstop: boolean; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** + * specifies the vertical alignment of the text in the control. + * @since OOo 2.0 + */ + VerticalAlign: style.VerticalAlignment; + + /** + * specifies a visual effect to apply to the radio button control. + * + * Possible values for this property are {@link VisualEffect.FLAT} and {@link VisualEffect.LOOK3D} . + * @see com.sun.star.awt.VisualEffect + * @since OOo 2.0 + */ + VisualEffect: number; + + /** + * denotes the writing mode used in the control, as specified in the {@link com.sun.star.text.WritingMode2} constants group. + * + * Only {@link com.sun.star.text.WritingMode2.LR_TB} and {@link com.sun.star.text.WritingMode2.RL_TB} are supported at the moment. + * @since OOo 3.1 + */ + WritingMode: number; + } + + /** + * specifies a Roadmap control. The model of the Roadmap control must be a {@link UnoControlRoadmapModel} + * + * The model properties are implemented in the control as follows: CurrentItem: The RGB code of the background color is RGB(194, 211, 238)ImageURL: The + * image referenced by the URL is placed in the lower right corner of the control.Graphic: The graphic is placed in the lower right corner of the + * control.Complete: When set to `FALSE` a non interactive {@link RoadmapItem} is appended after the last roadmap item, labeled with three dots, + * indicating incompleteness.Interactive: When activating a {@link RoadmapItem} (see {@link RoadmapItem} ) the information about which Item has been + * selected is passed over when an itemlistener has been registered at the control. + */ + interface UnoControlRoadmap extends UnoControl, XItemEventBroadcaster { } + + /** specifies the standard model of an {@link UnoControlContainer} . */ + interface UnoControlRoadmapModel extends UnoControlModel, container.XIndexContainer { + /** specifies the background color (RGB) of the control. The Default value is white */ + BackgroundColor: number; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** determines whether the control container is complete or not. If it is false than a non - interactive {@link RoadmapItem} is appended */ + Complete: boolean; + + /** + * refers to the ID of the currently selected item. Initially this property is set to "-1" which is equal to "undefined" If the Roadmap Item that the + * CurrentItemID refers to is removed the property "CurrentItemID" is set to -1 + */ + CurrentItemID: number; + + /** + * specifies a graphic to be displayed on the control + * + * If this property is present, it interacts with the {@link ImageURL} in the following way: If {@link ImageURL} is set, {@link Graphic} will be reset to + * an object as loaded from the given image URL, or `NULL` if {@link ImageURL} does not point to a valid image file.If {@link Graphic} is set, {@link + * ImageURL} will be reset to an empty string. + * @since OOo 2.1 + */ + Graphic: graphic.XGraphic; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * specifies an URL to an image to use for the control. The image is placed in the lower right corner of the control + * @see Graphic + */ + ImageURL: string; + + /** + * determines whether the control is interactive or not. + * + * A roadmap control which is interactive allows selecting its items out-of-order, by simply clicking them. + */ + Interactive: boolean; + + /** specifies whether the control will be printed with the document. */ + Printable: boolean; + + /** specifies the text displayed in the control. */ + Text: string; + } + + /** specifies a scroll bar control. */ + interface UnoControlScrollBar extends UnoControl, XScrollBar { } + + /** specifies the standard model of an {@link UnoControlScrollBar} . */ + interface UnoControlScrollBarModel extends UnoControlModel { + /** + * specifies the RGB color to be used for the control. + * @since OOo 2.0 + */ + BackgroundColor: util.Color; + + /** specifies the increment for a block move. */ + BlockIncrement: number; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** specifies the increment for a single line move. */ + LineIncrement: number; + + /** + * specifies the scrolling behavior of the control. + * + * `TRUE` means, that when the user moves the slider in the scroll bar, the content of the window is updated immediately. `FALSE` means, that the window + * is only updated after the user has released the mouse button. + * @since OOo 2.0 + */ + LiveScroll: boolean; + + /** specifies the {@link ScrollBarOrientation} of the control. */ + Orientation: number; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** + * specifies the mouse repeat delay, in milliseconds. + * + * When the user presses a mouse in a control area where this triggers an action (such as scrolling the scrollbar), then usual control implementations + * allow to repeatedly trigger this action, without the need to release the mouse button and to press it again. The delay between two such triggers is + * specified with this property. + * @since OOo 2.0 + */ + RepeatDelay: number; + + /** specifies the scroll value of the control. */ + ScrollValue: number; + + /** specifies the maximum scroll value of the control. */ + ScrollValueMax: number; + + /** + * specifies the minimum scroll value of the control. + * + * If this optional property is not present, clients of the component should assume a minimal scroll value of 0. + */ + ScrollValueMin: number; + + /** + * specifies the RGB color to be used when painting symbols which are part of the control's appearance, such as the arrow buttons. + * @since OOo 2.0 + */ + SymbolColor: util.Color; + + /** + * specifies that the control can be reached with the TAB key. + * @since OOo 2.0 + */ + Tabstop: boolean; + + /** specifies the visible size of the scroll bar. */ + VisibleSize: number; + } + + /** + * specifies a spin button control. + * + * The model of an {@link UnoControlSpinButton} control must support the {@link UnoControlSpinButtonModel} service. + */ + interface UnoControlSpinButton extends UnoControl, XSpinValue { } + + /** + * specifies the standard model of an {@link UnoControlSpinButton} . + * + * A spin button is a control which has a numeric value associated with it, and allows to change this value using two spin buttons. + * + * A spin button is similar to a scroll bar, but it usually has no (own) visual representation of the associated value, but is used to propagate its + * value to other controls. + * @see UnoControlScrollBarModel + */ + interface UnoControlSpinButtonModel extends UnoControlModel { + /** specifies the RGB color to be used for the control */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * defines how the mouse wheel can be used to scroll through the control's content. + * + * Usually, the mouse wheel spins the numeric value displayed in the control. Using this property, and one of the {@link MouseWheelBehavior} constants, + * you can control under which circumstances this is possible. + */ + MouseWheelBehavior: number; + + /** specifies the {@link ScrollBarOrientation} of the control. */ + Orientation: number; + + /** specifies whether the control will be printed with the document. */ + Printable: boolean; + + /** specifies whether the mouse should show repeating behavior, i.e. repeatedly trigger an action when keeping pressed. */ + Repeat: boolean; + + /** + * specifies the mouse repeat delay, in milliseconds. + * + * When the user presses a mouse in a control area where this triggers an action (such as spinning the value), then usual control implementations allow + * to repeatedly trigger this action, without the need to release the mouse button and to press it again. The delay between two such triggers is + * specified with this property. + */ + RepeatDelay: number; + + /** specifies the increment by which the value is changed when using operating the spin button. */ + SpinIncrement: number; + + /** specifies the current value of the control. */ + SpinValue: number; + + /** specifies the maximum value of the control. */ + SpinValueMax: number; + + /** specifies the minimum value of the control. */ + SpinValueMin: number; + + /** specifies the RGB color to be used when painting symbols which are part of the control's appearance, such as the arrow buttons. */ + SymbolColor: util.Color; + } + + /** + * specifies a time field control. + * + * A time field makes it possible to enter, display, and edit time values. + */ + interface UnoControlTimeField extends UnoControlEdit, XSpinField, XTimeField { } + + /** specifies the standard model of an {@link UnoControlTimeField} . */ + interface UnoControlTimeFieldModel extends UnoControlModel { + /** specifies the background color (RGB) of the control. */ + BackgroundColor: util.Color; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * specifies whether the selection in the control should be hidden when the control is not active (focused). + * @since OOo 2.0 + */ + HideInactiveSelection: boolean; + + /** + * defines how the mouse wheel can be used to scroll through the control's content. + * + * Usually, the mouse wheel spins the numeric value displayed in the control. Using this property, and one of the {@link MouseWheelBehavior} constants, + * you can control under which circumstances this is possible. + */ + MouseWheelBehavior: number; + + /** specifies that the control will be printed with the document. */ + Printable: boolean; + + /** specifies that the content of the control cannot be modified by the user. */ + ReadOnly: boolean; + + /** + * specifies whether the mouse should show repeating behavior, i.e. repeatedly trigger an action when keeping pressed. + * @since OOo 2.0 + */ + Repeat: boolean; + + /** + * specifies the mouse repeat delay, in milliseconds. + * + * When the user presses a mouse in a control area where this triggers an action (such as spinning the value), then usual control implementations allow + * to repeatedly trigger this action, without the need to release the mouse button and to press it again. The delay between two such triggers is + * specified with this property. + * @since OOo 2.0 + */ + RepeatDelay: number; + + /** specifies that the control has a spin button. */ + Spin: boolean; + + /** specifies that the date is checked during the user input. */ + StrictFormat: boolean; + + /** specifies that the control can be reached with the TAB key. */ + Tabstop: boolean; + + /** + * specifies the text displayed in the control. + * @since OOo 2.0 + */ + Text: string; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + + /** specifies the text line color (RGB) of the control. */ + TextLineColor: util.Color; + + /** specifies the time displayed in the control. */ + Time: util.Time; + + /** + * specifies the format of the displayed time. + * + * `; 0: 24h short; 1: 24h long; 2: 12h short; 3: 12h long; 4: Duration short; 5: Duration long; ` + */ + TimeFormat: number; + + /** specifies the maximum time that can be entered. */ + TimeMax: util.Time; + + /** specifies the minimum time that can be entered. */ + TimeMin: util.Time; + + /** + * specifies the vertical alignment of the text in the control. + * @since OOo 3.3 + */ + VerticalAlign: style.VerticalAlignment; + + /** + * denotes the writing mode used in the control, as specified in the {@link com.sun.star.text.WritingMode2} constants group. + * + * Only {@link com.sun.star.text.WritingMode2.LR_TB} and {@link com.sun.star.text.WritingMode2.RL_TB} are supported at the moment. + * @since OOo 3.1 + */ + WritingMode: number; + } + + /** + * specifies a container event. + * + * These events are provided **only** for notification purposes. + * @see XVclContainerListener + */ + interface VclContainerEvent extends lang.EventObject { + /** returns the child component that was added or removed. */ + Child: uno.XInterface; + } + + /** describes a window. */ + interface WindowDescriptor { + /** + * specifies the position and size of the window. + * + * This member is ignored if the window attribute is {@link com.sun.star.awt.WindowAttribute.FULLSIZE} . + */ + Bounds: Rectangle; + + /** + * specifies the parent of the component. + * + * If `Parent == 0 && ParentIndex == -1` , then the window is on the desktop. + */ + Parent: XWindowPeer; + + /** + * specifies the index of the parent window, if available. + * + * If `Parent == 0` and this struct is a member of an array, then this is the offset from the beginning of the array to the parent. A value of -1 means + * desktop. + */ + ParentIndex: number; + + /** specifies the type of window. */ + Type: WindowClass; + + /** + * specifies the window attributes. + * + * Use one value out of the constant group {@link com.sun.star.awt.WindowAttribute} . + */ + WindowAttributes: number; + + /** + * specifies the name of the component service. + * + * A zero length name means that the VCL creates a blank top, a container, or a simple window. The following service names are defined: ; + * spinbuttonspinfieldsplittersplitwindowstatusbarsystemchildwindowtabcontroltabdialogtabpagetimeboxtimefieldtoolboxtristateboxwarningboxwindowworkwindow + */ + WindowServiceName: string; + } + + /** specifies a window event. */ + interface WindowEvent extends lang.EventObject { + /** + * specifies the inset from the bottom. + * + * The inset is the distance between the outer and the inner window, that means the bottom inset is the height of the bottom border. + */ + BottomInset: number; + + /** specifies the outer (total) height of the window. */ + Height: number; + + /** + * specifies the inset from the left. + * + * The inset is the distance between the outer and the inner window, that means the left inset is the width of the left border. + */ + LeftInset: number; + + /** + * specifies the inset from the right. + * + * The inset is the distance between the outer and the inner window, that means the right inset is the width of the right border. + */ + RightInset: number; + + /** + * specifies the inset from the top. + * + * The inset is the distance between the outer and the inner window, that means the top inset is the height of the top border. + */ + TopInset: number; + + /** specifies the outer (total) width of the window. */ + Width: number; + + /** specifies the outer x position of the window. */ + X: number; + + /** specifies the outer y position of the window. */ + Y: number; + } + + /** makes it possible to receive action events. */ + interface XActionListener extends lang.XEventListener { + /** is invoked when an action is performed. */ + actionPerformed(rEvent: ActionEvent): void; + } + + /** + * makes it possible to receive activate events. + * @see XFocusListener + * @see XTopWindowListener + */ + interface XActivateListener extends lang.XEventListener { + /** + * is invoked when a window is activated. + * + * A window is activated if a child or itself got the focus. + * @see XFocusListener.focusGained + */ + windowActivated(e: lang.EventObject): void; + + /** + * is invoked when a window is deactivated. + * + * A window is deactivated if a child or itself lost the focus. + * @see XFocusListener.focusLost + */ + windowDeactivated(e: lang.EventObject): void; + } + + /** makes it possible to receive adjustment events. */ + interface XAdjustmentListener extends lang.XEventListener { + /** is invoked when the adjustment has changed. */ + adjustmentValueChanged(rEvent: AdjustmentEvent): void; + } + + /** + * allows administrating a set of images, to be displayed as animated seres. + * + * Components implementing this interface maintain a variable number of image sets. Components displaying those images will choose the best-fitting image + * set depending on the available space, and possibly other restrictions. + * @since OOo 3.4 + */ + interface XAnimatedImages extends container.XContainer { + /** + * specifies whether the animation should start over with the first image of the image series when the last image has been played. + * + * The default value for this attribute is `TRUE` . + */ + AutoRepeat: boolean; + + /** + * returns the URLs of the image set with the given index + * @param iIndex the index of the set those image URLs are to be retrieved. Must be greater than or equal to `0` , and smaller than the value returned by { + * @throws com::sun::star::lang::IndexOutOfBoundsException if the `iIndex` is not a valid index. + */ + getImageSet(iIndex: number): SafeArray; + + /** returns the number of images sets maintained by the component. */ + getImageSetCount(): number; + + /** returns the number of images sets maintained by the component. */ + readonly ImageSetCount: number; + + /** + * sets the URLs of the image set with the given index + * @param iIndex the index at which a new image set should be inserted. Must be greater than or equal to `0` , and smaller than or equal to the value retur + * @param iImageURLs the URLs for the images for the given set. Will be resolved using a {@link com.sun.star.graphic.GraphicProvider} . + * @throws com::sun::star::lang::IndexOutOfBoundsException if the `iIndex` is not a valid index. + */ + insertImageSet(iIndex: number, iImageURLs: LibreOffice.SeqEquiv): void; + + /** + * removes the image set with the given index + * @param iIndex the index of the set to remove. Must be greater than or equal to `0` , and smaller than the value returned by {@link getImageSetCount()} . + * @throws com::sun::star::lang::IndexOutOfBoundsException if the `iIndex` is not a valid index. + */ + removeImageSet(iIndex: number): void; + + /** + * replaces the image set given by index with a new one + * @param iIndex the index of the set those image URLs are to be replaced. Must be greater than or equal to `0` , and smaller than the value returned by {@ + * @param iImageURLs the URLs for the images for the given set. Will be resolved using a {@link com.sun.star.graphic.GraphicProvider} . + * @throws com::sun::star::lang::IndexOutOfBoundsException if the `iIndex` is not a valid index. + */ + replaceImageSet(iIndex: number, iImageURLs: LibreOffice.SeqEquiv): void; + + /** + * controls the way the images are scaled up or down, when the available space is larger or smaller than what is needed for them. + * + * Allowed values are those from the {@link ImageScaleMode} constants group. + */ + ScaleMode: number; + + /** + * specifies the time in milliseconds between two animation steps. + * + * This is the minimum time, the actual value might be longer due to system load. The default value will be 100 ms. + */ + StepTime: number; + } + + /** + * allows controlling an animation. + * @since OOo 3.4 + */ + interface XAnimation { + /** determines whether the animation is currently running */ + isAnimationRunning(): boolean; + + /** starts the animation */ + startAnimation(): void; + + /** stops the animation */ + stopAnimation(): void; + } + + /** provides a bitmap in the Microsoft DIB format. */ + interface XBitmap extends uno.XInterface { + /** returns the device independent bitmap. */ + readonly DIB: SafeArray; + + /** returns the device independent bitmap. */ + getDIB(): SafeArray; + + /** returns the transparency mask of the device independent bitmap. */ + getMaskDIB(): SafeArray; + + /** returns the size of the bitmap in pixel. */ + getSize(): Size; + + /** returns the transparency mask of the device independent bitmap. */ + readonly MaskDIB: SafeArray; + + /** returns the size of the bitmap in pixel. */ + readonly Size: Size; + } + + /** makes it possible to set the label of a button and to register for action events. */ + interface XButton extends uno.XInterface { + /** registers an event handler for button action events. */ + addActionListener(l: XActionListener): void; + + /** unregisters an event handler for button action events. */ + removeActionListener(l: XActionListener): void; + + /** + * sets a command string for pushing the button. + * @param Command value can be used to detect which button is pressed. + */ + setActionCommand(Command: string): void; + + /** sets the label of the button. */ + setLabel(Label: string): void; + } + + /** specifies an interface which can be used to call back an implementation */ + interface XCallback { + /** + * notifies the callback implementation + * @param aData private data which was provided when the callback was requested. + */ + notify(aData: any): void; + } + + /** gives access to the state of a check box and makes it possible to register for events. */ + interface XCheckBox extends uno.XInterface { + /** registers a listener for item events. */ + addItemListener(l: XItemListener): void; + + /** enables or disables the tri state mode. */ + enableTriState(b: boolean): void; + + /** + * returns the state of the check box. + * @see com.sun.star.awt.UnoControlCheckBoxModel.State + */ + getState(): number; + + /** unregisters a listener for item events. */ + removeItemListener(l: XItemListener): void; + + /** sets the label of the check box. */ + setLabel(Label: string): void; + + /** + * sets the state of the check box. + * @see com.sun.star.awt.UnoControlCheckBoxModel.State + */ + setState(n: number): void; + + /** + * returns the state of the check box. + * @see com.sun.star.awt.UnoControlCheckBoxModel.State + */ + State: number; + } + + /** gives access to the items of a combo box and makes it possible to register item and action event listeners. */ + interface XComboBox extends uno.XInterface { + /** registers a listener for action events. */ + addActionListener(l: XActionListener): void; + + /** adds an item at the specified position. */ + addItem(aItem: string, nPos: number): void; + + /** registers a listener for item events. */ + addItemListener(l: XItemListener): void; + + /** adds multiple items at the specified position. */ + addItems(aItems: LibreOffice.SeqEquiv, nPos: number): void; + + /** returns the number of visible lines in the drop down mode. */ + DropDownLineCount: number; + + /** returns the number of visible lines in the drop down mode. */ + getDropDownLineCount(): number; + + /** returns the item at the specified position. */ + getItem(nPos: number): string; + + /** returns the number of items in the combo box. */ + getItemCount(): number; + + /** returns all items of the combo box. */ + getItems(): SafeArray; + + /** returns the number of items in the combo box. */ + readonly ItemCount: number; + + /** returns all items of the combo box. */ + readonly Items: SafeArray; + + /** unregisters a listener for action events. */ + removeActionListener(l: XActionListener): void; + + /** unregisters a listener for item events. */ + removeItemListener(l: XItemListener): void; + + /** removes a number of items at the specified position. */ + removeItems(nPos: number, nCount: number): void; + + /** sets the number of visible lines for drop down mode. */ + setDropDownLineCount(nLines: number): void; + } + + /** Handles events fired by windows represented by a {@link com.sun.star.awt.XWindow} interface. */ + interface XContainerWindowEventHandler extends uno.XInterface { + /** + * Handles an event generated by a window. + * + * The implementation must be aware that the EventObject argument contains types which it is not prepared to handle. Similarly this applies for the + * MethodName argument. In this case the method should simply return false. + * @param xWindow the window instance that generated the event. If used in the scope of {@link com.sun.star.awt.XContainerWindowProvider} this is the same + * @param EventObject an object describing the event which occurred in the window or anything else that provides additional information for the event. If t + * @param MethodName the name of the function which is to be called. + * @returns true if the event was handled, otherwise false. + * @throws com::sun::star::lang::WrappedTargetException if the implementation of the method, which is determined by the argument MethodName, throws an excep + */ + callHandlerMethod(xWindow: XWindow, EventObject: any, MethodName: string): boolean; + + /** + * returns a sequence of supported method names + * @returns all method names that will be accepted in calls to callHandlerMethod. + */ + getSupportedMethodNames(): SafeArray; + + /** + * returns a sequence of supported method names + * @returns all method names that will be accepted in calls to callHandlerMethod. + */ + readonly SupportedMethodNames: SafeArray; + } + + /** provides container windows implementing the {@link com.sun.star.awt.XWindow} interface. */ + interface XContainerWindowProvider extends uno.XInterface { + /** + * creates a window for the given URL + * @param URL is the URL. + * @param WindowType Type of Window to be created, for future use, not supported yet + * @param xParent a valid {@link XWindowPeer} reference which is used as a parent. This parameter must not be null. + * @param xHandler is the interface that will be called to handle the Events that are generated by the window (and all controls placed on it) and bound to + * @returns a window implementing the {@link com.sun.star.awt.XWindow} interface. + * @see com.sun.star.awt.XContainerWindowEventHandler + * @throws com::sun::star::lang::IllegalArgumentException if no window for the given URL is found or if the URL is invalid or xParent is null. + */ + createContainerWindow(URL: string, WindowType: string, xParent: XWindowPeer, xHandler: uno.XInterface): XWindow; + } + + /** + * identifies a control. + * + * Implementations of this interface are abstract windows. The main reason to instantiate this implementation is to show the window on the screen. Before + * the window appears on the screen, the {@link XControl.createPeer()} method must be called. + * + * If the implementation of the control does not distinguish between model, view and controller, it must allow to set a new {@link XGraphics} in the + * view, so that the control can be printed. + */ + interface XControl extends lang.XComponent { + /** gets the context of the control. */ + Context: uno.XInterface; + + /** + * creates a "child" window on the screen. + * + * If the parent is NULL, then the desktop window of the toolkit is the parent. + */ + createPeer(Toolkit: XToolkit, Parent: XWindowPeer): void; + + /** gets the context of the control. */ + getContext(): uno.XInterface; + + /** returns the model for this control. */ + getModel(): XControlModel; + + /** returns the peer which was previously created or set. */ + getPeer(): XWindowPeer; + + /** returns the view of this control. */ + getView(): XView; + + /** returns `TRUE` if the control is in design mode, `FALSE` otherwise. */ + isDesignMode(): boolean; + + /** returns `TRUE` if the control is transparent, `FALSE` otherwise. */ + isTransparent(): boolean; + + /** returns the model for this control. */ + Model: XControlModel; + + /** returns the peer which was previously created or set. */ + readonly Peer: XWindowPeer; + + /** sets the context of the control. */ + setContext(Context: uno.XInterface): void; + + /** + * sets the design mode for use in a design editor. + * + * Normally the control will be painted directly without a peer. + */ + setDesignMode(bOn: boolean): void; + + /** sets a model for the control. */ + setModel(Model: XControlModel): boolean; + + /** returns the view of this control. */ + readonly View: XView; + } + + /** Provides access to the controls within an {@link UnoControlContainer} . */ + interface XControlContainer extends uno.XInterface { + /** adds the given control with the specified name to the container. */ + addControl(Name: string, Control: XControl): void; + + /** returns all controls. */ + readonly Controls: SafeArray; + + /** returns the control with the specified name. */ + getControl(aName: string): XControl; + + /** returns all controls. */ + getControls(): SafeArray; + + /** removes the given control from the container. */ + removeControl(Control: XControl): void; + + /** sets the status text in the status bar of the container. */ + setStatusText(StatusText: string): void; + } + + /** gives access to the value and formatting of a currency field. */ + interface XCurrencyField extends uno.XInterface { + /** returns the currently set number of decimals. */ + DecimalDigits: number; + + /** returns the currently set first value which is set on POS1 key. */ + First: number; + + /** returns the currently set number of decimals. */ + getDecimalDigits(): number; + + /** returns the currently set first value which is set on POS1 key. */ + getFirst(): number; + + /** returns the currently set last value which is set on END key. */ + getLast(): number; + + /** returns the currently set maximum value that can be entered by the user. */ + getMax(): number; + + /** returns the currently set minimum value that can be entered by the user. */ + getMin(): number; + + /** returns the currently set increment value for the spin button. */ + getSpinSize(): number; + + /** returns the value which is currently displayed in the currency field. */ + getValue(): number; + + /** returns whether the format is currently checked during user input. */ + isStrictFormat(): boolean; + + /** returns the currently set last value which is set on END key. */ + Last: number; + + /** returns the currently set maximum value that can be entered by the user. */ + Max: number; + + /** returns the currently set minimum value that can be entered by the user. */ + Min: number; + + /** sets the number of decimals. */ + setDecimalDigits(nDigits: number): void; + + /** sets the first value to be set on POS1 key. */ + setFirst(Value: number): void; + + /** sets the last value to be set on END key. */ + setLast(Value: number): void; + + /** sets the maximum value that can be entered by the user. */ + setMax(Value: number): void; + + /** sets the minimum value that can be entered by the user. */ + setMin(Value: number): void; + + /** sets the increment value for the spin button. */ + setSpinSize(Value: number): void; + + /** determines if the format is checked during user input. */ + setStrictFormat(bStrict: boolean): void; + + /** sets the value which is displayed in the currency field. */ + setValue(Value: number): void; + + /** returns the currently set increment value for the spin button. */ + SpinSize: number; + + /** returns the value which is currently displayed in the currency field. */ + Value: number; + } + + /** This interface extends the {@link XToolkit} interface with clipboard and drag-and-drop support. */ + interface XDataTransferProviderAccess extends uno.XInterface { + /** + * returns the specified clipboard. + * @param clipboardName the name of the clipboard to return. If an empty string is passed in, the default clipboard is returned. + * @returns the specified clipboard (if available). + */ + getClipboard(clipboardName: string): datatransfer.clipboard.XClipboard; + + /** + * returns the drag gesture recognizer of the specified window. + * @param window a window created by the same toolkit instance. + * @returns the drag gesture recognizer. + */ + getDragGestureRecognizer(window: XWindow): datatransfer.dnd.XDragGestureRecognizer; + + /** + * returns the drag source of the specified window. + * @param window a window created by the same toolkit instance. + * @returns the drag source. + */ + getDragSource(window: XWindow): datatransfer.dnd.XDragSource; + + /** + * returns the drop target of the specified window. + * @param window a window created by the same toolkit instance. + * @returns the drop target. + */ + getDropTarget(window: XWindow): datatransfer.dnd.XDropTarget; + } + + /** gives access to the value and settings of a date field. */ + interface XDateField extends uno.XInterface { + /** returns the date value which is currently displayed in the date field. */ + Date: util.Date; + + /** returns the currently set first value which is set on POS1 key. */ + First: util.Date; + + /** returns the date value which is currently displayed in the date field. */ + getDate(): util.Date; + + /** returns the currently set first value which is set on POS1 key. */ + getFirst(): util.Date; + + /** returns the currently set last value which is set on END key. */ + getLast(): util.Date; + + /** returns the currently set maximum date value that can be entered by the user. */ + getMax(): util.Date; + + /** returns the currently set minimum date value that can be entered by the user. */ + getMin(): util.Date; + + /** returns whether currently an empty value is set for the date. */ + isEmpty(): boolean; + + /** determines if the long date format is currently used. */ + isLongFormat(): boolean; + + /** returns whether the format is currently checked during user input. */ + isStrictFormat(): boolean; + + /** returns the currently set last value which is set on END key. */ + Last: util.Date; + + /** returns the currently set maximum date value that can be entered by the user. */ + Max: util.Date; + + /** returns the currently set minimum date value that can be entered by the user. */ + Min: util.Date; + + /** sets the date value which is displayed in the date field. */ + setDate(Date: util.Date): void; + + /** sets an empty value for the date. */ + setEmpty(): void; + + /** sets the first value to be set on POS1 key. */ + setFirst(Date: util.Date): void; + + /** sets the last value to be set on END key. */ + setLast(Date: util.Date): void; + + /** determines if the long date format is to be used. */ + setLongFormat(bLong: boolean): void; + + /** sets the maximum date value that can be entered by the user. */ + setMax(Date: util.Date): void; + + /** sets the minimum date value that can be entered by the user. */ + setMin(Date: util.Date): void; + + /** determines if the format is checked during user input. */ + setStrictFormat(bStrict: boolean): void; + } + + /** provides information about a graphical output device and offers a factory for the **graphics** which provides write operations on the device. */ + interface XDevice extends uno.XInterface { + /** + * creates a bitmap with the current device depth. + * + * If the specified area does not lie entirely in the device, the bits outside are not specified. + */ + createBitmap(nX: number, nY: number, nWidth: number, nHeight: number): XBitmap; + + /** + * creates a new device which is compatible with this one. + * + * If the device does not support the GETBITS device capability, this method returns `NULL` . + */ + createDevice(nWidth: number, nHeight: number): XDevice; + + /** + * creates a device compatible bitmap. + * + * The data of the bitmap is in process memory instead of in the device, so that the output operation is fast. + */ + createDisplayBitmap(Bitmap: XBitmap): XDisplayBitmap; + + /** creates a new graphics whose output operation is directed to this device. */ + createGraphics(): XGraphics; + + /** returns the list of available font descriptors. */ + readonly FontDescriptors: SafeArray; + + /** + * returns information about a font offered by this device. + * @param aDescriptor specifies the description of a font. The unit of measure is pixel for this device. + * @returns the font of this device. + */ + getFont(aDescriptor: FontDescriptor): XFont; + + /** returns the list of available font descriptors. */ + getFontDescriptors(): SafeArray; + + /** returns information about the device. */ + getInfo(): DeviceInfo; + + /** returns information about the device. */ + readonly Info: DeviceInfo; + } + + /** makes it possible to show and hide a dialog and gives access to the title of the dialog. */ + interface XDialog extends uno.XInterface { + /** hides the dialog and then causes {@link XDialog.execute()} to return. */ + endExecute(): void; + + /** shows the dialog. */ + execute(): number; + + /** gets the title of the dialog. */ + getTitle(): string; + + /** sets the title of the dialog. */ + setTitle(Title: string): void; + + /** gets the title of the dialog. */ + Title: string; + } + + /** + * Makes it possible to end a dialog and set a help id. + * @since OOo 3.0 + */ + interface XDialog2 extends XDialog { + /** hides the dialog and then causes {@link XDialog.execute()} to return with the given result value. */ + endDialog(Result: number): void; + + /** sets the help id so that the standard help button action will show the appropriate help page. */ + setHelpId(Id: string): void; + } + + /** Handles events fired by dialogs represented by a {@link com.sun.star.awt.XDialog} interface. */ + interface XDialogEventHandler extends uno.XInterface { + /** + * Handles an event generated by a dialog. + * + * The implementation must be aware that the EventObject argument contains types which it is not prepared to handle. Similarly this applies for the + * MethodName argument. In this case the method should simply return false. + * @param xDialog the dialog instance that generated the event. This is the same dialog instance that was returned by the {@link com.sun.star.awt.XDialogPr + * @param EventObject an object describing the event which occurred in the dialog or anything else that provides additional information for the event. If t + * @param MethodName the name of the function which is to be called. + * @returns true if the event was handled, otherwise false. + * @throws com::sun::star::lang::WrappedTargetException if the implementation of the method, which is determined by the argument MethodName, throws an excep + */ + callHandlerMethod(xDialog: XDialog, EventObject: any, MethodName: string): boolean; + + /** + * returns a sequence of supported method names + * @returns all method names that will be accepted in calls to callHandlerMethod. + */ + getSupportedMethodNames(): SafeArray; + + /** + * returns a sequence of supported method names + * @returns all method names that will be accepted in calls to callHandlerMethod. + */ + readonly SupportedMethodNames: SafeArray; + } + + /** provides dialogs implementing the {@link com.sun.star.awt.XDialog} interface. */ + interface XDialogProvider extends uno.XInterface { + /** + * creates a dialog for the given URL. + * @param URL is the URL. + * @returns a dialog implementing the {@link com.sun.star.awt.XDialog} interface. + * @throws com::sun::star::lang::IllegalArgumentException if no dialog for the given URL is found or if the URL is invalid. + */ + createDialog(URL: string): XDialog; + } + + /** provides dialogs implementing the {@link com.sun.star.awt.XDialog} interface. */ + interface XDialogProvider2 extends XDialogProvider { + /** + * creates a dialog for the given URL, accepting additional creation parameters + * + * The arguments accepted so far are **ParentWindow** - must be a component supporting the {@link XWindowPeer} interface, or a component supporting the + * {@link XControl} interface, so an `XWindowPeer` can be obtained from it. The given window will be used as parent window for the to-be-created + * dialog.**EventHandler** - specifies a component handling events in the dialog. See {@link createDialogWithHandler()} for a detailed specification of + * dialog event handling. + */ + createDialogWithArguments(URL: string, Arguments: LibreOffice.SeqEquiv): XDialog; + + /** + * creates a dialog for the given URL accepting an Interface used to handle dialog events. + * @param URL is the URL. + * @param xHandler is the interface that will be called to handle the Events that are generated by the dialog (and all controls placed on it) and bound to + * @returns a dialog implementing the {@link com.sun.star.awt.XDialog} interface. + * @see com.sun.star.awt.XDialogEventHandler + * @throws com::sun::star::lang::IllegalArgumentException if no dialog for the given URL is found or if the URL is invalid or xHandler is null. + */ + createDialogWithHandler(URL: string, xHandler: uno.XInterface): XDialog; + } + + /** This interface should be implemented by toolkits that want to give access to their internal message handling loop. */ + interface XDisplayConnection extends uno.XInterface { + /** + * register an error handler for toolkit specific errors. + * @param errorHandler the handler to register. + */ + addErrorHandler(errorHandler: XEventHandler): void; + + /** + * registers an event handler. + * @param window the platform specific window id. If empty, the handler should be registered for all windows. + * @param eventHandler the handler to register. + * @param eventMask the event mask specifies the events the handler is interested in. + */ + addEventHandler(window: any, eventHandler: XEventHandler, eventMask: number): void; + + /** + * returns a identifier. + * @returns a unique platform dependent identifier for a display connection. + */ + getIdentifier(): any; + + /** + * returns a identifier. + * @returns a unique platform dependent identifier for a display connection. + */ + readonly Identifier: any; + + /** + * remover an error handler from the handler list. + * @param errorHandler the handler to remove. + */ + removeErrorHandler(errorHandler: XEventHandler): void; + + /** + * removes a eventHandler from the handler list. + * @param window the platform specific window id the handler should be unregistered for. If empty, the handler should be unregistered completely. + * @param eventHandler the handler to remove. + */ + removeEventHandler(window: any, eventHandler: XEventHandler): void; + } + + /** + * specifies the docking interface for a window component. + * + * A window can either be docked where it resides as a child window in an application frame window or it can be floating where it will reside in its own + * decorated top level window. + */ + interface XDockableWindow extends uno.XInterface { + /** adds a docking listener to the object. only a single listener may be registered at any time. */ + addDockableWindowListener(xListener: XDockableWindowListener): void; + + /** + * enable or disable docking, docking is disabled by default + * @param bEnable `TRUE` specifies that docking is enabled `FALSE` specifies that docking is disabled and no {@link com.sun.star.awt.XDockableWindowListene + */ + enableDocking(bEnable: boolean): void; + + /** + * queries the current window state + * @returns `TRUE` if the window is floating `FALSE` if the window is docked + */ + isFloating(): boolean; + + /** + * queries the current pop-up mode + * @returns `TRUE` if the window is in pop-up mode `FALSE` if the window is not in pop-up mode + */ + isInPopupMode(): boolean; + + /** + * queries the current locking state + * @returns `TRUE` if the window is locked `FALSE` if the window is not locked + */ + isLocked(): boolean; + + /** prevents the window from being undocked this has no effect if the window is floating */ + lock(): void; + + /** removes the specified docking listener from the object. */ + removeDockableWindowListener(xListener: XDockableWindowListener): void; + + /** + * toggle between floating and docked state + * @param bFloating specifies the new floating mode: `TRUE` means floating, `FALSE` means docked + */ + setFloatingMode(bFloating: boolean): void; + + /** + * shows the window in a menu like style, i.e. without decoration a special indicator will allow for tearing off the window see {@link + * com.sun.star.awt.XDockableWindowListener} for the corresponding events + * @param WindowRect specifies the position and size of the pop-up window in frame coordinates + */ + startPopupMode(WindowRect: Rectangle): void; + + /** enables undocking this has no effect if the window is floating */ + unlock(): void; + } + + /** makes it possible to receive docking events. */ + interface XDockableWindowListener extends lang.XEventListener { + /** is invoked when the window was actively closed */ + closed(e: lang.EventObject): void; + + /** + * is invoked during the docking procedure when the window has been moved. + * + * on return the {@link DockingData} must contain either the old tracking rectangle or a changed rectangle if required, additionally it must indicate if + * the window should be docked or floating + * + * Note: the tracking rectangle indicates to the user where the window would be placed if he releases the mouse. + */ + docking(e: DockingEvent): DockingData; + + /** is invoked when the docking procedure ends. aWindowRect contains the new position and size of the window */ + endDocking(e: EndDockingEvent): void; + + /** is invoked when the window currently is in pop-up mode and wants to be undocked or closed */ + endPopupMode(e: EndPopupModeEvent): void; + + /** + * is invoked when the floating mode is about to be changed between floating and docked or vice versa + * + * if returned FALSE the floating mode will not be changed + */ + prepareToggleFloatingMode(e: lang.EventObject): boolean; + + /** is invoked when the docking procedure starts. */ + startDocking(e: DockingEvent): void; + + /** is invoked when the floating mode is changed between floating and docked or vice versa */ + toggleFloatingMode(e: lang.EventObject): void; + } + + /** + * makes it possible to receive enhanced events from the mouse. + * @since OOo 2.0 + */ + interface XEnhancedMouseClickHandler extends lang.XEventListener { + /** is invoked when a mouse button has been pressed on a window. */ + mousePressed(e: EnhancedMouseEvent): boolean; + + /** is invoked when a mouse button has been released on a window. */ + mouseReleased(e: EnhancedMouseEvent): boolean; + } + + /** This interface can be implemented by clients that need access to the toolkits window message loop. */ + interface XEventHandler extends uno.XInterface { + /** + * requests the implementor of this interface to handle a platform dependent event. + * @param event the platform dependent event. + * @returns `TRUE` if the event was handled properly and no further handling should take place, `FALSE` otherwise. + */ + handleEvent(event: any): boolean; + } + + /** + * The {@link XExtendedToolkit} is an extension of the {@link com.sun.star.awt.XToolkit} interface. It basically provides access to three event + * broadcasters which are used for instance in the context of accessibility. It is, however, not restricted to accessibility. + * + * The first event broadcaster lets you keep track of the open top-level windows (frames). To get the set of currently open top-level window use the + * {@link XExtendedToolkit.getTopWindowCount()} and {@link XExtendedToolkit.getTopWindow()} methods. + * + * The second event broadcaster informs its listeners of key events. Its listeners can, unlike with most other broadcasters/listeners, consume events, so + * that other listeners will not be called for consumed events. + * + * The last event broadcaster sends events on focus changes of all elements that can have the input focus. + * @deprecated DeprecatedThis interface was only implemented in an intermediate developer release anyway. + * @since OOo 1.1.2 + */ + interface XExtendedToolkit extends uno.XInterface { + /** + * Return the currently active top-level window, i.e. which has currently the input focus. + * @returns The returned reference may be empty when no top-level window is active. + */ + readonly ActiveTopWindow: XTopWindow; + + /** + * Add a new listener that is called on {@link com.sun.star.awt.FocusEvent} . Use this focus broadcaster to keep track of the object that currently has + * the input focus. + * @param xListener If this is a valid reference it is inserted into the list of listeners. It is the task of the caller to not register the same listener + */ + addFocusListener(xListener: XFocusListener): void; + + /** + * Add a new listener that is called on {@link com.sun.star.awt.KeyEvent} . Every listener is given the opportunity to consume the event, i.e. prevent + * the not yet called listeners from being called. + * @param xHandler If this is a valid reference it is inserted into the list of handlers. It is the task of the caller to not register the same handler twi + */ + addKeyHandler(xHandler: XKeyHandler): void; + + /** + * Add a new listener that is called for events that involve {@link com.sun.star.awt.XTopWindow} . After having obtained the current list of existing + * top-level windows you can keep this list up-to-date by listening to opened or closed top-level windows. Wait for activations or deactivations of + * top-level windows to keep track of the currently active frame. + * @param xListener If this is a valid reference it is inserted into the list of listeners. It is the task of the caller to not register the same listener + */ + addTopWindowListener(xListener: XTopWindowListener): void; + + /** + * Broadcasts the a focusGained on all registered focus listeners + * @param source The object that has gained the input focus. It should implement {@link com.sun.star.accessibility.XAccessible} . + */ + fireFocusGained(source: uno.XInterface): void; + + /** + * Broadcasts the a focusGained on all registered focus listeners + * @param source The object that has lost the input focus. It should implement {@link com.sun.star.accessibility.XAccessible} . + */ + fireFocusLost(source: uno.XInterface): void; + + /** + * Return the currently active top-level window, i.e. which has currently the input focus. + * @returns The returned reference may be empty when no top-level window is active. + */ + getActiveTopWindow(): XTopWindow; + + /** + * Return a reference to the specified top-level window. Note that the number of top-level windows may change between a call to {@link + * getTopWindowCount()} and successive calls to this function. + * @param nIndex The index should be in the interval from 0 up to but not including the number of top-level windows as returned by {@link getTopWindowCount()} . + * @returns The returned value is a valid reference to a top-level window. + * @throws IndexOutOfBoundsException when the specified index is outside the valid range. + */ + getTopWindow(nIndex: number): XTopWindow; + + /** + * This function returns the number of currently existing top-level windows. + * @returns Returns the number of top-level windows. This includes all top-level windows, regardless of whether they are iconized, visible, or active. + */ + getTopWindowCount(): number; + + /** + * Remove the specified listener from the list of listeners. + * @param xListener If the reference is empty then nothing will be changed. If the listener has been registered twice (or more) then all references will be + */ + removeFocusListener(xListener: XFocusListener): void; + + /** + * Remove the specified listener from the list of listeners. + * @param xHandler If the reference is empty then nothing will be changed. If the handler has been registered twice (or more) then all references will be r + */ + removeKeyHandler(xHandler: XKeyHandler): void; + + /** + * Remove the specified listener from the list of listeners. + * @param xListener If the reference is empty then nothing will be changed. If the listener has been registered twice (or more) then all references will be + */ + removeTopWindowListener(xListener: XTopWindowListener): void; + + /** + * This function returns the number of currently existing top-level windows. + * @returns Returns the number of top-level windows. This includes all top-level windows, regardless of whether they are iconized, visible, or active. + */ + readonly TopWindowCount: number; + } + + /** + * gives access to a file dialog. + * @deprecated Deprecated + */ + interface XFileDialog extends uno.XInterface { + /** returns the currently selected filter. */ + CurrentFilter: string; + + /** returns the currently selected filter. */ + getCurrentFilter(): string; + + /** returns the path. */ + getPath(): string; + + /** returns the path. */ + Path: string; + + /** sets the current filter. */ + setCurrentFilter(Filter: string): void; + + /** sets the filters. */ + setFilters(rFilterNames: LibreOffice.SeqEquiv, rMasks: LibreOffice.SeqEquiv): void; + + /** sets the path. */ + setPath(Path: string): void; + } + + /** gives access to the text and formatting of a fixed hyperlink field. */ + interface XFixedHyperlink extends uno.XInterface { + /** registers an event handler for click action event. */ + addActionListener(l: XActionListener): void; + + /** returns the alignment of the text in the control. */ + Alignment: number; + + /** returns the alignment of the text in the control. */ + getAlignment(): number; + + /** returns the text of the control. */ + getText(): string; + + /** returns the url of the control. */ + getURL(): string; + + /** unregisters an event handler for click action event. */ + removeActionListener(l: XActionListener): void; + + /** + * sets the alignment of the text in the control. + * + * `; 0: left; 1: center; 2: right; ` + */ + setAlignment(nAlign: number): void; + + /** sets the text of the control. */ + setText(Text: string): void; + + /** sets the url of the control. */ + setURL(URL: string): void; + + /** returns the text of the control. */ + Text: string; + + /** returns the url of the control. */ + URL: string; + } + + /** gives access to the text and formatting of a fixed text field. */ + interface XFixedText extends uno.XInterface { + /** returns the alignment of the text in the control. */ + Alignment: number; + + /** returns the alignment of the text in the control. */ + getAlignment(): number; + + /** returns the text of the control. */ + getText(): string; + + /** + * sets the alignment of the text in the control. + * + * `; 0: left; 1: center; 2: right; ` + */ + setAlignment(nAlign: number): void; + + /** sets the text of the control. */ + setText(Text: string): void; + + /** returns the text of the control. */ + Text: string; + } + + /** + * makes it possible to receive keyboard focus events. + * + * The window which has the keyboard focus is the window which gets the keyboard events. + */ + interface XFocusListener extends lang.XEventListener { + /** + * is invoked when a window gains the keyboard focus. + * @see XActivateListener.windowActivated + */ + focusGained(e: FocusEvent): void; + + /** + * is invoked when a window loses the keyboard focus. + * @see XActivateListener.windowDeactivated + */ + focusLost(e: FocusEvent): void; + } + + /** + * describes a font on a specific device. + * + * All values are in pixels within this device. + */ + interface XFont extends uno.XInterface { + /** + * returns the description of the font. + * + * The unit of measurement is pixels for the device. + */ + readonly FontDescriptor: FontDescriptor; + + /** returns additional information about the font. */ + readonly FontMetric: SimpleFontMetric; + + /** + * returns the width of the specified character. + * @returns the character width measured in pixels for the device. + */ + getCharWidth(c: string): number; + + /** + * returns the widths of the specified characters. + * @returns a sequence of the widths of subsequent characters for this font. + */ + getCharWidths(nFirst: string, nLast: string): SafeArray; + + /** + * returns the description of the font. + * + * The unit of measurement is pixels for the device. + */ + getFontDescriptor(): FontDescriptor; + + /** returns additional information about the font. */ + getFontMetric(): SimpleFontMetric; + + /** queries the kerning pair table. */ + getKernPairs(Chars1: [LibreOffice.SeqEquiv], Chars2: [LibreOffice.SeqEquiv], Kerns: [LibreOffice.SeqEquiv]): void; + + /** + * returns the string width. + * @returns the width of the specified string of characters measured in pixels for the device. + */ + getStringWidth(str: string): number; + + /** + * returns the string and the character widths. + * @param str the input string. + * @param aDXArray receives the width of every single character measured in pixels for the device. + * @returns the width of the specified string of characters measured in pixels for the device. + */ + getStringWidthArray(str: string, aDXArray: [LibreOffice.SeqEquiv]): number; + } + + /** + * extends the {@link XFont} interface and provides additional information for a font. + * @since OOo 3.0 + */ + interface XFont2 extends XFont { + /** + * checks whether or not this font has all the glyphs for the text specified by aText. + * @param aText The specified text for which glyphs are needed. + * @returns Returns whether or not this font has all the glyphs for the specified text. + */ + hasGlyphs(aText: string): boolean; + } + + /** provides the basic output operation of a device. */ + interface XGraphics extends uno.XInterface { + /** copies a rectangle of pixels from another device into this one. */ + copy(xSource: XDevice, nSourceX: number, nSourceY: number, nSourceWidth: number, nSourceHeight: number, nDestX: number, nDestY: number, nDestWidth: number, nDestHeight: number): void; + + /** returns the device of this graphics. */ + readonly Device: XDevice; + + /** draws a part of the specified bitmap to the output device. */ + draw(xBitmapHandle: XDisplayBitmap, SourceX: number, SourceY: number, SourceWidth: number, SourceHeight: number, DestX: number, DestY: number, DestWidth: number, DestHeight: number): void; + + /** draws an arc (part of a circle) in the output device. */ + drawArc(X: number, Y: number, Width: number, Height: number, X1: number, Y1: number, X2: number, Y2: number): void; + + /** + * draws a chord of a circular area in the output device. + * + * A chord is a segment of a circle. You get two chords from a circle if you intersect the circle with a straight line joining two points on the circle. + */ + drawChord(nX: number, nY: number, nWidth: number, nHeight: number, nX1: number, nY1: number, nX2: number, nY2: number): void; + + /** draws an ellipse in the output device. */ + drawEllipse(X: number, Y: number, Width: number, Height: number): void; + + /** draws a color dispersion in the output device. */ + drawGradient(nX: number, nY: number, nWidth: number, Height: number, aGradient: Gradient): void; + + /** draws a line in the output device. */ + drawLine(X1: number, Y1: number, X2: number, Y2: number): void; + + /** draws a circular area in the output device. */ + drawPie(X: number, Y: number, Width: number, Height: number, X1: number, Y1: number, X2: number, Y2: number): void; + + /** sets a single pixel in the output device. */ + drawPixel(X: number, Y: number): void; + + /** draws a polygon line in the output device. */ + drawPolygon(DataX: LibreOffice.SeqEquiv, DataY: LibreOffice.SeqEquiv): void; + + /** draws multiple lines in the output device at once. */ + drawPolyLine(DataX: LibreOffice.SeqEquiv, DataY: LibreOffice.SeqEquiv): void; + + /** draws multiple polygons in the output device at once. */ + drawPolyPolygon(DataX: LibreOffice.SeqEquiv>, DataY: LibreOffice.SeqEquiv>): void; + + /** draws a rectangle in the output device. */ + drawRect(X: number, Y: number, Width: number, Height: number): void; + + /** draws a rectangle with rounded corners in the output device. */ + drawRoundedRect(X: number, Y: number, Width: number, Height: number, nHorzRound: number, nVertRound: number): void; + + /** draws text in the output device. */ + drawText(X: number, Y: number, Text: string): void; + + /** draws texts in the output device using an explicit kerning table. */ + drawTextArray(X: number, Y: number, Text: string, Longs: LibreOffice.SeqEquiv): void; + + /** returns the font metric of the current font. */ + readonly FontMetric: SimpleFontMetric; + + /** returns the device of this graphics. */ + getDevice(): XDevice; + + /** returns the font metric of the current font. */ + getFontMetric(): SimpleFontMetric; + + /** builds the intersection with the current region. */ + intersectClipRegion(xClipping: XRegion): void; + + /** restores all previous saved settings. */ + pop(): void; + + /** saves all current settings (Font, TextColor, TextFillColor, LineColor, FillColor, RasterOp, ClipRegion). */ + push(): void; + + /** creates a new font and sets the font. */ + selectFont(aDescription: FontDescriptor): void; + + /** sets the clip region to specified clipping. */ + setClipRegion(Clipping: XRegion): void; + + /** sets the fill color. */ + setFillColor(nColor: util.Color): void; + + /** sets the font used by text operations. */ + setFont(xNewFont: XFont): void; + + /** sets the line color. */ + setLineColor(nColor: util.Color): void; + + /** + * sets the raster operation. + * + * If the device does not support raster operations then this call is ignored. + */ + setRasterOp(ROP: RasterOperation): void; + + /** sets the text color used by text operations. */ + setTextColor(nColor: util.Color): void; + + /** sets the fill color used by text operations. */ + setTextFillColor(nColor: util.Color): void; + } + + /** provides the basic output operation of a device. */ + interface XGraphics2 extends XGraphics { + /** + * clears the given rectangle on the device + * @since LibreOffice 4.1 + */ + clear(aRect: Rectangle): void; + + /** + * draws a {@link com.sun.star.graphic.XGraphic} in the output device. + * + * Note that some devices may not support this operation. + * @param nX the X coordinate on the device where the graphic will be drawn + * @param nY the Y coordinate on the device where the graphic will be drawn + * @param nWidth the width of the region on the device + * @param nHeight the height of the region on the device + * @param nStyle the style used to draw the image. See {@link com.sun.star.awt.ImageDrawMode} . + * @param aGraphic the {@link com.sun.star.graphic.XGraphic} to be drawn onto the device + * @since LibreOffice 4.1 + */ + drawImage(nX: number, nY: number, nWidth: number, nHeight: number, nStyle: number, aGraphic: graphic.XGraphic): void; + } + + /** makes it possible to register for action events of an image button and sets the action command. */ + interface XImageButton extends uno.XInterface { + /** registers a listener for action events. */ + addActionListener(l: XActionListener): void; + + /** unregisters a listener for action events. */ + removeActionListener(l: XActionListener): void; + + /** sets the action command string. */ + setActionCommand(Command: string): void; + } + + /** + * specifies a data sink for an image. + * + * An image consumer is a component which wants to display or just receive an image from an image producer. + * @see XImageProducer + */ + interface XImageConsumer extends uno.XInterface { + /** + * is called for the notification of the degree to which the image is delivered. + * + * The complete method is called when the image producer has finished delivering all of the pixels that the source image contains, or when a single frame + * of a multi-frame animation has been completed, or when an error in loading or producing the image has occurred. The image consumer should remove + * itself from the list of consumers registered with the image producer at this time, unless it is interested in successive frames. + */ + complete(Status: number, xProducer: XImageProducer): void; + + /** initializes the consumer with image dimensions. */ + init(Width: number, Height: number): void; + + /** changes color model for next pixels typically called once after initialization. */ + setColorModel(BitCount: number, RGBAPal: LibreOffice.SeqEquiv, RedMask: number, GreenMask: number, BlueMask: number, AlphaMask: number): void; + + /** + * delivers a chunk of pixels as `long` values. + * + * The pixels of the image are delivered using one or more calls to this method. Each call specifies the location and size of the rectangle of source + * pixels that are contained in the array of pixels. The specified color model object should be used to convert the pixels into their corresponding color + * and alpha components. Pixel (m,n) is stored in the pixels array at index (n * **nScanSize**m + nOffset). + */ + setPixelsByBytes(nX: number, nY: number, nWidth: number, nHeight: number, aProducerData: LibreOffice.SeqEquiv, nOffset: number, nScanSize: number): void; + + /** + * delivers a chunk of pixels as `byte` values. + * + * The pixels of the image are delivered using one or more calls to this method. Each call specifies the location and size of the rectangle of source + * pixels that are contained in the array of pixels. The specified color model object should be used to convert the pixels into their corresponding color + * and alpha components. Pixel (m,n) is stored in the pixels array at index (n * **nScanSize**m + nOffset). + */ + setPixelsByLongs(nX: number, nY: number, nWidth: number, nHeight: number, aProducerData: LibreOffice.SeqEquiv, nOffset: number, nScanSize: number): void; + } + + /** specifies a source for an image. */ + interface XImageProducer extends uno.XInterface { + /** + * registers an image consumer with the image producer for accessing the image data during a later reconstruction of the image. + * + * The image producer may, at its discretion, start delivering the image data to the consumer using the {@link XImageConsumer} interface immediately, or + * when the next available image reconstruction is triggered by a call to the startProduction method. + */ + addConsumer(xConsumer: XImageConsumer): void; + + /** + * removes the given {@link com.sun.star.awt.XImageConsumer} callback from the list of consumers currently registered to receive image data. + * + * It is not considered an error to remove a consumer that is not currently registered. The image producer should stop sending data to this consumer as + * soon as it is feasible. + */ + removeConsumer(xConsumer: XImageConsumer): void; + + /** + * registers the given image consumer as a consumer and starts an immediate reconstruction of the image data. + * + * The image data will then be delivered to this consumer and any other consumer which may have already been registered with the producer. This method + * differs from the addConsumer method in that a reproduction of the image data should be triggered as soon as possible. + */ + startProduction(): void; + } + + /** represents an information printer. */ + interface XInfoPrinter extends XPrinterPropertySet { + /** + * creates a new object which implements an {@link XDevice} . + * + * The current settings are used as a template. + */ + createDevice(): XDevice; + } + + /** registers item listeners at controls like the com::sun::star::awt::Roadmap */ + interface XItemEventBroadcaster extends uno.XInterface { + /** registers a listener for item events. */ + addItemListener(l: XItemListener): void; + + /** unregisters a listener for item events. */ + removeItemListener(l: XItemListener): void; + } + + /** provides convenient access to the list of items in a list box */ + interface XItemList { + /** registers a listener which is notified about changes in the item list. */ + addItemListListener(Listener: XItemListListener): void; + + /** retrieves the texts and images of all items in the list */ + readonly AllItems: SafeArray>; + + /** retrieves the texts and images of all items in the list */ + getAllItems(): SafeArray>; + + /** + * retrieves the implementation dependent value associated with the given list item. + * @param Position the position of the item whose data value should be retrieved. Must be greater or equal to 0, and lesser than {@link ItemCount} . + * @see setItemData + * @throws com::sun::star::lang::IndexOutOfBoundsException if `Position` is invalid. + */ + getItemData(Position: number): any; + + /** + * retrieves the URL of the image of an existing item + * @param Position the position of the item whose image should be retrieved. Must be greater or equal to 0, and lesser than {@link ItemCount} . + * @throws com::sun::star::lang::IndexOutOfBoundsException if `Position` is invalid. + */ + getItemImage(Position: number): string; + + /** + * retrieves the text of an existing item + * @param Position the position of the item whose text should be retrieved. Must be greater or equal to 0, and lesser than {@link ItemCount} . + * @throws com::sun::star::lang::IndexOutOfBoundsException if `Position` is invalid. + */ + getItemText(Position: number): string; + + /** + * retrieves both the text and the image URL of an existing item + * @param Position the position of the item whose text and image should be retrieved. Must be greater or equal to 0, and lesser than {@link ItemCount} . + * @throws com::sun::star::lang::IndexOutOfBoundsException if `Position` is invalid. + */ + getItemTextAndImage(Position: number): com.sun.star.beans.Pair; + + /** + * inserts a new item into the list + * @param Position the position at which the item should be inserted. Must be greater or equal to 0, and lesser than or equal to {@link ItemCount} . + * @param ItemText the text of the item to be inserted. + * @param ItemImageURL the URL of the image to display for the item + * @throws com::sun::star::lang::IndexOutOfBoundsException if `Position` is invalid. + */ + insertItem(Position: number, ItemText: string, ItemImageURL: string): void; + + /** + * inserts an item which has only an image, but no text + * @param Position the position at which the item should be inserted. Must be greater or equal to 0, and lesser than or equal to {@link ItemCount} . + * @param ItemImageURL the URL of the image to display for the item + * @throws com::sun::star::lang::IndexOutOfBoundsException if `Position` is invalid. + */ + insertItemImage(Position: number, ItemImageURL: string): void; + + /** + * inserts an item which has only a text, but no image + * @param Position the position at which the item should be inserted. Must be greater or equal to 0, and lesser than or equal to {@link ItemCount} . + * @param ItemText the text of the item to be inserted. + * @throws com::sun::star::lang::IndexOutOfBoundsException if `Position` is invalid. + */ + insertItemText(Position: number, ItemText: string): void; + + /** is the number of items in the list */ + ItemCount: number; + + /** removes all items from the list */ + removeAllItems(): void; + + /** + * removes an item from the list + * @param Position the position of the item which should be removed. Must be greater or equal to 0, and lesser than {@link ItemCount} . + * @throws com::sun::star::lang::IndexOutOfBoundsException if `Position` is invalid. + */ + removeItem(Position: number): void; + + /** revokes a listener which is notified about changes in the item list. */ + removeItemListListener(Listener: XItemListListener): void; + + /** + * associates an implementation dependent value with the given list item. + * + * You can use this to store data for an item which does not interfere with the displayed text and image, but can be used by the client of the list box + * for an arbitrary purpose. + * @param Position the position of the item whose data value should be set. Must be greater or equal to 0, and lesser than {@link ItemCount} . + * @param ItemData the data to associate with the list item + * @see getItemData + * @throws com::sun::star::lang::IndexOutOfBoundsException if `Position` is invalid. + */ + setItemData(Position: number, ItemData: any): void; + + /** + * sets a new image for an existing item + * @param Position the position of the item whose image is to be changed. Must be greater or equal to 0, and lesser than {@link ItemCount} . + * @param ItemImageURL the new URL of the image to display for the item + * @throws com::sun::star::lang::IndexOutOfBoundsException if `Position` is invalid. + */ + setItemImage(Position: number, ItemImageURL: string): void; + + /** + * sets a new text for an existing item + * @param Position the position of the item whose text is to be changed. Must be greater or equal to 0, and lesser than {@link ItemCount} . + * @param ItemText the new text of the item + * @throws com::sun::star::lang::IndexOutOfBoundsException if `Position` is invalid. + */ + setItemText(Position: number, ItemText: string): void; + + /** + * sets both a new position and text for an existing item + * @param Position the position of the item whose text and image is to be changed. Must be greater or equal to 0, and lesser than {@link ItemCount} . + * @param ItemText the new text of the item + * @param ItemImageURL the new URL of the image to display for the item + * @throws com::sun::star::lang::IndexOutOfBoundsException if `Position` is invalid. + */ + setItemTextAndImage(Position: number, ItemText: string, ItemImageURL: string): void; + } + + /** makes it possible to receive events from a component when the state of an item changes. */ + interface XItemListener extends lang.XEventListener { + /** is invoked when an item changes its state. */ + itemStateChanged(rEvent: ItemEvent): void; + } + + /** + * describes a listener for changes in a item list + * @see XListItems + */ + interface XItemListListener extends lang.XEventListener { + /** is called when the list has been completely cleared, i.e. after an invocation of {@link XItemList.removeAllItems()} */ + allItemsRemoved(Event: lang.EventObject): void; + + /** + * is called when the changes to the item list which occurred are too complex to be notified in single events. + * + * Consumers of this event should discard their cached information about the current item list, and completely refresh it from the {@link XItemList} 's + * current state. + */ + itemListChanged(Event: lang.EventObject): void; + + /** is called when an item is inserted into the list */ + listItemInserted(Event: ItemListEvent): void; + + /** is called when an item in the list is modified, i.e. its text or image changed */ + listItemModified(Event: ItemListEvent): void; + + /** is called when an item is removed from the list */ + listItemRemoved(Event: ItemListEvent): void; + } + + /** + * This key handler is similar to {@link com.sun.star.awt.XKeyListener} but allows the consumption of key events. If a key event is consumed by one + * handler both the following handlers, with respect to the list of key handlers of the broadcaster, and a following handling by the broadcaster will not + * take place. + * @since OOo 1.1.2 + */ + interface XKeyHandler extends lang.XEventListener { + /** + * This function is called by the broadcaster, an {@link com.sun.star.awt.XExtendedToolkit} for instance, after a key has been pressed but before it is + * released. The return value decides about whether other handlers will be called and a handling by the broadcaster will take place. + * + * Consume the event if the action performed by the implementation is mutually exclusive with the default action of the broadcaster or, when known, with + * that of other handlers. + * + * Consuming this event does not prevent the pending key-release event from being broadcasted. + * @param aEvent The key event informs about the pressed key. + * @returns When `FALSE` is returned the other handlers are called and a following handling of the event by the broadcaster takes place. Otherwise, when `TRU + */ + keyPressed(aEvent: KeyEvent): boolean; + + /** + * This function is called by the broadcaster, an {@link com.sun.star.awt.XExtendedToolkit} for instance, after a key has been pressed and released. The + * return value decides about whether other handlers will be called and a handling by the broadcaster will take place. + * + * Consume the event if the action performed by the implementation is mutually exclusive with the default action of the broadcaster or, when known, with + * that of other handlers. + * @param aEvent The key event informs about the pressed key. + * @returns When `FALSE` is returned the other handlers are called and a following handling of the event by the broadcaster takes place. Otherwise, when `TRU + */ + keyReleased(aEvent: KeyEvent): boolean; + } + + /** makes it possible to receive keyboard events. */ + interface XKeyListener extends lang.XEventListener { + /** is invoked when a key has been pressed. */ + keyPressed(e: KeyEvent): void; + + /** is invoked when a key has been released. */ + keyReleased(e: KeyEvent): void; + } + + /** specifies the layout constraints for a surrounding container. */ + interface XLayoutConstrains extends uno.XInterface { + /** calculates the adjusted size for a given maximum size. */ + calcAdjustedSize(aNewSize: Size): Size; + + /** returns the minimum size for this component. */ + getMinimumSize(): Size; + + /** returns the preferred size for this component. */ + getPreferredSize(): Size; + + /** returns the minimum size for this component. */ + readonly MinimumSize: Size; + + /** returns the preferred size for this component. */ + readonly PreferredSize: Size; + } + + /** gives access to the items of a list box and makes it possible to register item and action event listeners. */ + interface XListBox extends uno.XInterface { + /** registers a listener for action events. */ + addActionListener(l: XActionListener): void; + + /** adds an item at the specified position. */ + addItem(aItem: string, nPos: number): void; + + /** registers a listener for item events. */ + addItemListener(l: XItemListener): void; + + /** adds multiple items at the specified position. */ + addItems(aItems: LibreOffice.SeqEquiv, nPos: number): void; + + /** returns the number of visible lines in drop down mode. */ + DropDownLineCount: number; + + /** returns the number of visible lines in drop down mode. */ + getDropDownLineCount(): number; + + /** returns the item at the specified position. */ + getItem(nPos: number): string; + + /** returns the number of items in the listbox. */ + getItemCount(): number; + + /** returns all items of the list box. */ + getItems(): SafeArray; + + /** + * returns the currently selected item. When multiple items are selected, the first one is returned. When nothing is selected, an empty string is + * returned. + */ + getSelectedItem(): string; + + /** + * returns the position of the currently selected item. When multiple items are selected, the position of the first one is returned. When nothing is + * selected, -1 is returned. + */ + getSelectedItemPos(): number; + + /** returns all currently selected items. */ + getSelectedItems(): SafeArray; + + /** returns the positions of all currently selected items. */ + getSelectedItemsPos(): SafeArray; + + /** returns `TRUE` if multiple items can be selected, `FALSE` if only one item can be selected. */ + isMutipleMode(): boolean; + + /** returns the number of items in the listbox. */ + readonly ItemCount: number; + + /** returns all items of the list box. */ + readonly Items: SafeArray; + + /** makes the item at the specified position visible by scrolling. */ + makeVisible(nEntry: number): void; + + /** unregisters a listener for action events. */ + removeActionListener(l: XActionListener): void; + + /** unregisters a listener for item events. */ + removeItemListener(l: XItemListener): void; + + /** removes a number of items at the specified position. */ + removeItems(nPos: number, nCount: number): void; + + /** + * returns the currently selected item. When multiple items are selected, the first one is returned. When nothing is selected, an empty string is + * returned. + */ + readonly SelectedItem: string; + + /** + * returns the position of the currently selected item. When multiple items are selected, the position of the first one is returned. When nothing is + * selected, -1 is returned. + */ + readonly SelectedItemPos: number; + + /** returns all currently selected items. */ + readonly SelectedItems: SafeArray; + + /** returns the positions of all currently selected items. */ + readonly SelectedItemsPos: SafeArray; + + /** selects/deselects the specified item. */ + selectItem(aItem: string, bSelect: boolean): void; + + /** selects/deselects the item at the specified position. */ + selectItemPos(nPos: number, bSelect: boolean): void; + + /** selects/deselects multiple items at the specified positions. */ + selectItemsPos(aPositions: LibreOffice.SeqEquiv, bSelect: boolean): void; + + /** sets the number of visible lines for drop down mode. */ + setDropDownLineCount(nLines: number): void; + + /** determines if only a single item or multiple items can be selected. */ + setMultipleMode(bMulti: boolean): void; + } + + /** specifies a simple menu. */ + interface XMenu extends uno.XInterface { + /** + * adds the specified menu listener to receive events from this menu. + * @param xListener the {@link XMenuListener} to be added. + */ + addMenuListener(xListener: XMenuListener): void; + + /** removes all items from the menu. */ + clear(): void; + + /** + * specifies whether mnemonics are automatically assigned to menu items, or not. + * @param bEnable if `TRUE` , mnemonics are automatically assigned to menu items. + */ + enableAutoMnemonics(bEnable: boolean): void; + + /** + * enables or disables the menu item. + * @param nItemId specifies the menu item ID. + * @param bEnable specifies whether the menu item should be enabled ( `TRUE` ) or disabled ( `FALSE` ). + */ + enableItem(nItemId: number, bEnable: boolean): void; + + /** + * retrieves the command string for the menu item. + * @param nItemId specifies the menu item ID for which the command URL should be set. + * @returns the command of the menu item. + */ + getCommand(nItemId: number): string; + + /** + * retrieves the help command string for the menu item. + * @param nItemId specifies the menu item ID for which the help command should be set. + * @returns the help command of the menu item. + */ + getHelpCommand(nItemId: number): string; + + /** + * retrieves the help text for the menu item. + * @param nItemId specifies the menu item identifier for which the help text should be retrieved. + * @returns a string with the help text. + */ + getHelpText(nItemId: number): string; + + /** + * returns the number of items in the menu. + * @returns the number of items in this {@link XMenu} . + */ + getItemCount(): number; + + /** + * returns the ID of the item at the specified position. + * @param nItemPos specifies the position of the menu item for which the item ID is queried. + * @returns the ID of the menu item at the given position. + */ + getItemId(nItemPos: number): number; + + /** + * returns the position of the item with the specified ID. + * @param nItemId specifies the ID of the menu item for which the item position is queried. + * @returns the position of the menu item with the specified ID. + */ + getItemPos(nItemId: number): number; + + /** + * returns the string for the given item id. + * @param nItemId specifies the ID of the menu item. + * @returns the label of the menu item. + */ + getItemText(nItemId: number): string; + + /** + * retrieves the type of the menu item. + * @param nItemPos specifies the position of the menu item for which the item type is queried. + * @returns a MenuItemType indicating the item type. + */ + getItemType(nItemPos: number): MenuItemType; + + /** + * returns the popup menu from the menu item. + * @param nItemId specifies the menu item ID for which the {@link XPopupMenu} should be retrieved. + * @returns a {@link XPopupMenu} . + */ + getPopupMenu(nItemId: number): XPopupMenu; + + /** + * retrieves the tip help text for the menu item. + * @param nItemId specifies the menu item identifier for which the tip help text should be retrieved. + * @returns a string with the tip help text. + */ + getTipHelpText(nItemId: number): string; + + /** + * specifies whether disabled menu entries should be hidden, or not. + * @param bHide if `TRUE` , disabled menu entries are hidden. + */ + hideDisabledEntries(bHide: boolean): void; + + /** + * inserts an item into the menu. + * + * The item is appended if the position is greater than or equal to {@link getItemCount()} or if it is negative. + * @param nItemId specifies the ID of the menu item to be inserted. + * @param aText specifies the label of the menu item. + * @param nItemStyle specifies the style of the menu item, as defined in {@link MenuItemStyle} . + * @param nItemPos specifies the position where the menu item will be inserted. + */ + insertItem(nItemId: number, aText: string, nItemStyle: number, nItemPos: number): void; + + /** + * returns the state of the menu item. + * @param nItemId specifies the menu item ID. + * @returns `TRUE` if the item is enabled, `FALSE` otherwise. + */ + isItemEnabled(nItemId: number): boolean; + + /** + * checks whether an {@link XMenu} is an {@link XPopupMenu} . + * @returns `TRUE` if the menu is a {@link PopupMenu} , `FALSE` if it is a {@link MenuBar} . + */ + isPopupMenu(): boolean; + + /** + * returns the number of items in the menu. + * @returns the number of items in this {@link XMenu} . + */ + readonly ItemCount: number; + + /** + * removes one or more items from the menu. + * @param nItemPos specifies the position of the (first) menu item to be removed. + * @param nCount specifies the number of menu items to remove. + */ + removeItem(nItemPos: number, nCount: number): void; + + /** + * removes the specified menu listener so that it no longer receives events from this menu. + * @param xListener the {@link XMenuListener} to be removed. + */ + removeMenuListener(xListener: XMenuListener): void; + + /** + * sets the command string for the menu item. + * @param nItemId specifies the menu item ID for which the command should be set. + * @param aCommand specifies the command for the menu item. + */ + setCommand(nItemId: number, aCommand: string): void; + + /** + * sets the help command string for the menu item. + * @param nItemId specifies the menu item ID for which the help command URL be set. + * @param aCommand specifies the help command for the menu item. + */ + setHelpCommand(nItemId: number, aCommand: string): void; + + /** + * sets the help text for the menu item. + * @param nItemId specifies the menu item identifier for which the help text should be set. + * @param sHelpText specifies the help text for the menu item. + */ + setHelpText(nItemId: number, sHelpText: string): void; + + /** + * sets the text for the menu item. + * @param nItemId specifies the ID of the menu item. + * @param aText specifies the label of the menu item. + */ + setItemText(nItemId: number, aText: string): void; + + /** + * sets the popup menu for a specified menu item. + * @param nItemId specifies the menu item ID for which the {@link XPopupMenu} should be set. + * @param aPopupMenu specifies a {@link XPopupMenu} . + */ + setPopupMenu(nItemId: number, aPopupMenu: XPopupMenu): void; + + /** + * sets the tip help text for the menu item. + * @param nItemId specifies the menu item identifier for which the tip help text should be set. + * @param sTipHelpText specifies the tip help text for the menu item. + */ + setTipHelpText(nItemId: number, sTipHelpText: string): void; + } + + /** makes it possible to receive menu events on a window. */ + interface XMenuListener extends lang.XEventListener { + /** is invoked when a menu is activated. */ + itemActivated(aEvent: MenuEvent): void; + + /** is invoked when a menu is deactivated. */ + itemDeactivated(aEvent: MenuEvent): void; + + /** is invoked when a menu item is highlighted. */ + itemHighlighted(aEvent: MenuEvent): void; + + /** is invoked when a menu item is selected. */ + itemSelected(aEvent: MenuEvent): void; + } + + /** gives access to a message box. */ + interface XMessageBox { + /** the caption text. */ + CaptionText: string; + + /** + * shows the message box. + * @returns one of {@link MessageBoxResults} . + */ + execute(): number; + + /** the message text. */ + MessageText: string; + } + + /** specifies a factory interface for creating message boxes. */ + interface XMessageBoxFactory extends uno.XInterface { + /** + * creates a message box. + * @param aParent a valid {@link XWindowPeer} reference which is used as a parent. This parameter must not be null. + * @param eType the message box type. + * @param nButtons specifies which buttons should be available on the message box. A combination of {@link com.sun.star.awt.MessageBoxButtons} A com::sun + * @param sTitle specifies the title of the message box. + * @param sMessage specifies text which will be shown by the message box. Line-breaks must be added using 'CR' or 'CR+LF'. + * @returns the created message box or a null reference if it cannot be created. + */ + createMessageBox(aParent: XWindowPeer, eType: MessageBoxType, nButtons: number, sTitle: string, sMessage: string): XMessageBox; + } + + /** gives access to the value and formatting of a metric field. */ + interface XMetricField extends uno.XInterface { + /** returns the currently set number of decimals. */ + DecimalDigits: number; + + /** returns the corrected value which is displayed in the metric field. */ + getCorrectedValue(FieldUnit: number): number; + + /** returns the currently set number of decimals. */ + getDecimalDigits(): number; + + /** returns the currently set first value which is set on POS1 key. */ + getFirst(FieldUnit: number): number; + + /** returns the currently set last value which is set on END key. */ + getLast(FieldUnit: number): number; + + /** returns the currently set maximum value that can be entered by the user. */ + getMax(FieldUnit: number): number; + + /** returns the currently set minimum value that can be entered by the user. */ + getMin(FieldUnit: number): number; + + /** returns the currently set increment value for the spin button. */ + getSpinSize(): number; + + /** returns the value which is currently displayed in the metric field. */ + getValue(FieldUnit: number): number; + + /** returns whether the format is currently checked during user input. */ + isStrictFormat(): boolean; + + /** sets the number of decimals. */ + setDecimalDigits(nDigits: number): void; + + /** sets the first value to be set on POS1 key. */ + setFirst(Value: number, FieldUnit: number): void; + + /** sets the last value to be set on END key. */ + setLast(Value: number, FieldUnit: number): void; + + /** sets the maximum value that can be entered by the user. */ + setMax(Value: number, FieldUnit: number): void; + + /** sets the minimum value that can be entered by the user. */ + setMin(Value: number, FieldUnit: number): void; + + /** sets the increment value for the spin button. */ + setSpinSize(Value: number): void; + + /** determines if the format is checked during user input. */ + setStrictFormat(bStrict: boolean): void; + + /** sets the user value which is displayed in the metric field. */ + setUserValue(Value: number, FieldUnit: number): void; + + /** sets the value which is displayed in the metric field. */ + setValue(Value: number, FieldUnit: number): void; + + /** returns the currently set increment value for the spin button. */ + SpinSize: number; + } + + /** + * makes it possible to receive events from the mouse in a certain window. + * @since OOo 1.1.2 + */ + interface XMouseClickHandler extends lang.XEventListener { + /** + * is invoked when a mouse button has been pressed on a window. + * @returns When `FALSE` is returned the other handlers are called and a following handling of the event by the broadcaster takes place. Otherwise, when `TRU + */ + mousePressed(e: MouseEvent): boolean; + + /** + * is invoked when a mouse button has been released on a window. + * @returns When `FALSE` is returned the other handlers are called and a following handling of the event by the broadcaster takes place. Otherwise, when `TRU + */ + mouseReleased(e: MouseEvent): boolean; + } + + /** makes it possible to receive events from the mouse in a certain window. */ + interface XMouseListener extends lang.XEventListener { + /** is invoked when the mouse enters a window. */ + mouseEntered(e: MouseEvent): void; + + /** is invoked when the mouse exits a window. */ + mouseExited(e: MouseEvent): void; + + /** + * is invoked when a mouse button has been pressed on a window. + * + * Since mouse presses are usually also used to indicate requests for pop-up menus (also known as context menus) on objects, you might receive two events + * for a single mouse press: For example, if, on your operating system, pressing the right mouse button indicates the request for a context menu, then + * you will receive one call to {@link mousePressed()} indicating the mouse click, and another one indicating the context menu request. For the latter, + * the {@link MouseEvent.PopupTrigger} member of the event will be set to `TRUE` . + */ + mousePressed(e: MouseEvent): void; + + /** is invoked when a mouse button has been released on a window. */ + mouseReleased(e: MouseEvent): void; + } + + /** makes it possible to receive mouse motion events on a window. */ + interface XMouseMotionHandler extends lang.XEventListener { + /** + * is invoked when a mouse button is pressed on a window and then dragged. + * + * Mouse drag events will continue to be delivered to the window where the first event originated until the mouse button is released (regardless of + * whether the mouse position is within the bounds of the window). + * @returns When `FALSE` is returned the other handlers are called and a following handling of the event by the broadcaster takes place. Otherwise, when `TRU + */ + mouseDragged(e: MouseEvent): boolean; + + /** + * is invoked when the mouse button has been moved on a window (with no buttons down). + * @returns When `FALSE` is returned the other handlers are called and a following handling of the event by the broadcaster takes place. Otherwise, when `TRU + */ + mouseMoved(e: MouseEvent): boolean; + } + + /** makes it possible to receive mouse motion events on a window. */ + interface XMouseMotionListener extends lang.XEventListener { + /** + * is invoked when a mouse button is pressed on a window and then dragged. + * + * Mouse drag events will continue to be delivered to the window where the first event originated until the mouse button is released (regardless of + * whether the mouse position is within the bounds of the window). + */ + mouseDragged(e: MouseEvent): void; + + /** is invoked when the mouse pointer has been moved on a window (with no buttons down). */ + mouseMoved(e: MouseEvent): void; + } + + /** gives access to the value and formatting of a numeric field. */ + interface XNumericField extends uno.XInterface { + /** returns the currently set number of decimals. */ + DecimalDigits: number; + + /** returns the currently set first value which is set on POS1 key. */ + First: number; + + /** returns the currently set number of decimals. */ + getDecimalDigits(): number; + + /** returns the currently set first value which is set on POS1 key. */ + getFirst(): number; + + /** returns the currently set last value which is set on END key. */ + getLast(): number; + + /** returns the currently set maximum value that can be entered by the user. */ + getMax(): number; + + /** returns the currently set minimum value that can be entered by the user. */ + getMin(): number; + + /** returns the currently set increment value for the spin button. */ + getSpinSize(): number; + + /** returns the value which is currently displayed in the numeric field. */ + getValue(): number; + + /** returns whether the format is currently checked during user input. */ + isStrictFormat(): boolean; + + /** returns the currently set last value which is set on END key. */ + Last: number; + + /** returns the currently set maximum value that can be entered by the user. */ + Max: number; + + /** returns the currently set minimum value that can be entered by the user. */ + Min: number; + + /** sets the number of decimals. */ + setDecimalDigits(nDigits: number): void; + + /** sets the first value to be set on POS1 key. */ + setFirst(Value: number): void; + + /** sets the last value to be set on END key. */ + setLast(Value: number): void; + + /** sets the maximum value that can be entered by the user. */ + setMax(Value: number): void; + + /** sets the minimum value that can be entered by the user. */ + setMin(Value: number): void; + + /** sets the increment value for the spin button. */ + setSpinSize(Value: number): void; + + /** determines if the format is checked during user input. */ + setStrictFormat(bStrict: boolean): void; + + /** sets the value which is displayed in the numeric field. */ + setValue(Value: number): void; + + /** returns the currently set increment value for the spin button. */ + SpinSize: number; + + /** returns the value which is currently displayed in the numeric field. */ + Value: number; + } + + /** makes it possible to receive paint events. */ + interface XPaintListener extends lang.XEventListener { + /** is invoked when a region of the window became invalid, e.g. when another window has been moved away. */ + windowPaint(e: PaintEvent): void; + } + + /** gives access to the value and formatting of a pattern field. */ + interface XPatternField extends uno.XInterface { + /** returns the currently set pattern mask. */ + getMasks(EditMask: [string], LiteralMask: [string]): void; + + /** returns the currently set string value of the pattern field. */ + getString(): string; + + /** returns whether the format is currently checked during user input. */ + isStrictFormat(): boolean; + + /** sets the pattern mask. */ + setMasks(EditMask: string, LiteralMask: string): void; + + /** determines if the format is checked during user input. */ + setStrictFormat(bStrict: boolean): void; + + /** sets the string value of the pattern field. */ + setString(Str: string): void; + + /** returns the currently set string value of the pattern field. */ + String: string; + } + + /** gives access to the type of mouse pointer. */ + interface XPointer extends uno.XInterface { + /** returns the currently set {@link SystemPointer} of this mouse pointer. */ + getType(): number; + + /** selects a {@link SystemPointer} for this mouse pointer. */ + setType(nType: number): void; + + /** returns the currently set {@link SystemPointer} of this mouse pointer. */ + Type: number; + } + + /** controls a pop-up menu. */ + interface XPopupMenu extends XMenu { + /** + * sets the state of the item to be checked or unchecked. + * @param nItemId specifies the menu item identifier. + * @param bCheck specifies if the item is checked ( `TRUE` ) or unchecked ( `FALSE` ). + */ + checkItem(nItemId: number, bCheck: boolean): void; + + /** + * returns the menu default item. + * @returns the ID of the default item. + */ + DefaultItem: number; + + /** + * ends the execution of the {@link PopupMenu} . + * + * {@link com.sun.star.awt.XPopupMenu.execute()} will then return 0. + * @see com.sun.star.awt.XPopupMenu.execute() + */ + endExecute(): void; + + /** + * executes the popup menu and returns the selected item or `0` , if cancelled. + * @param Parent the parent window. + * @param Position a {@link Rectangle} representing the coordinates system where the popup menu should be executed. + * @param Direction the direction in which a popup menu will grow, as specified by one of the {@link PopupMenuDirection} constants. + * @returns returns the selected item or `0` , if cancelled. + */ + execute(Parent: XWindowPeer, Position: Rectangle, Direction: number): number; + + /** + * retrieves the {@link KeyEvent} for the menu item. + * + * The {@link KeyEvent} is **only** used as a container to transport the shortcut information, so that in this case {@link + * com.sun.star.lang.EventObject.Source} is NULL. + * @param nItemId specifies the menu item identifier for which the {@link KeyEvent} should be retrieved. + * @returns the {@link KeyEvent} struct assigned to the requested menu item. + */ + getAcceleratorKeyEvent(nItemId: number): KeyEvent; + + /** + * returns the menu default item. + * @returns the ID of the default item. + */ + getDefaultItem(): number; + + /** + * retrieves the image for the menu item. + * @param nItemId specifies the menu item identifier for which the image should be retrieved. + * @returns a XGraphic reference to the current image for the requested menu item. + */ + getItemImage(nItemId: number): graphic.XGraphic; + + /** + * inserts a separator at the specified position. + * @param nItemPos specifies the position where the menu separator will be inserted. + */ + insertSeparator(nItemPos: number): void; + + /** + * queries if the {@link PopupMenu} is being. + * + * Returns `TRUE` only if the {@link PopupMenu} is being executed as a result of invoking {@link XPopupMenu.execute()} ; that is, for a {@link PopupMenu} + * activated by a {@link MenuBar} item, this methods returns `FALSE` . + * @returns `TRUE` if the {@link PopupMenu} is being executed, `FALSE` otherwise. + * @see XPopupMenu.execute() + */ + isInExecute(): boolean; + + /** + * returns whether the item is checked or unchecked. + * @param nItemId specifies the menu item identifier. + * @returns `TRUE` if the item is checked, `FALSE` otherwise. + */ + isItemChecked(nItemId: number): boolean; + + /** + * sets the {@link KeyEvent} for the menu item. + * + * The {@link KeyEvent} is **only** used as a container to transport the shortcut information, this methods only draws the text corresponding to this + * keyboard shortcut. The client code is responsible for listening to keyboard events (typically done via {@link XUserInputInterception} ), and dispatch + * the respective command. + * @param nItemId specifies the menu item identifier for which the {@link KeyEvent} should be set. + * @param aKeyEvent specifies the {@link KeyEvent} for the menu item. + */ + setAcceleratorKeyEvent(nItemId: number, aKeyEvent: KeyEvent): void; + + /** + * sets the menu default item. + * @param nItemId specifies the menu item identifier. + */ + setDefaultItem(nItemId: number): void; + + /** + * sets the image for the menu item. + * @param nItemId specifies the menu item identifier for which the image should be set. + * @param xGraphic specifies the image for the menu item. + * @param bScale if `TRUE` , the image will be scaled to the standard size used internally by the implementation. + */ + setItemImage(nItemId: number, xGraphic: graphic.XGraphic, bScale: boolean): void; + } + + /** + * represents a virtual printer. + * + * All properties are vetoable properties. If you change the properties between a call to {@link com.sun.star.awt.XPrinter.startPage()} and a call to + * {@link com.sun.star.awt.XPrinter.endPage()} , a {@link com.sun.star.beans.PropertyVetoException} is thrown. + */ + interface XPrinter extends XPrinterPropertySet { + /** + * notifies the printer spooler that the job is done and printing starts. + * @see terminate + */ + end(): void; + + /** ends the current page. */ + endPage(): void; + + /** + * puts the job into the printer spooler. + * + * This call may block the thread. So release all resources (mutex, semaphore, etc.) before this call. + */ + start(nJobName: string, nCopies: number, nCollate: boolean): boolean; + + /** begins with a new page. */ + startPage(): XDevice; + + /** + * stops the current print job. + * + * If the method {@link com.sun.star.awt.XPrinter.end()} is called beforehand, then this call does nothing. If you call {@link + * com.sun.star.awt.XPrinter.terminate()} in or before the call to {@link com.sun.star.awt.XPrinter.start()} , {@link + * com.sun.star.awt.XPrinter.terminate()} returns `FALSE` . This call must not block the thread. + * @see end + */ + terminate(): void; + } + + /** + * represents an extended property set for printer properties. + * + * All properties are vetoable properties. If you change the properties between {@link com.sun.star.awt.XPrinter.startPage()} and {@link + * com.sun.star.awt.XPrinter.endPage()} , a {@link com.sun.star.beans.PropertyVetoException} is thrown. + * @see XPrinter + * @see XInfoPrinter + */ + interface XPrinterPropertySet extends beans.XPropertySet { + /** returns a binary encoded version of the printer setup. */ + BinarySetup: SafeArray; + + /** returns descriptions of all available printer forms. */ + readonly FormDescriptions: SafeArray; + + /** returns a binary encoded version of the printer setup. */ + getBinarySetup(): SafeArray; + + /** returns descriptions of all available printer forms. */ + getFormDescriptions(): SafeArray; + + /** + * sets the form that should be used. + * + * Indirectly a printer is selected. + */ + selectForm(aFormDescription: string): void; + + /** + * sets the data specific to the printer driver. + * + * Get this data from the info printer and set the data to the printer. + */ + setBinarySetup(data: LibreOffice.SeqEquiv): void; + + /** sets the orientation. */ + setHorizontal(bHorizontal: boolean): void; + } + + /** manages several printers on one machine. */ + interface XPrinterServer extends uno.XInterface { + /** + * creates a new information printer. + * + * You can get all information from this printer, but the printer cannot really print. + */ + createInfoPrinter(printerName: string): XInfoPrinter; + + /** + * creates a new virtual printer. + * + * You must call {@link com.sun.star.awt.XPrinter.start()} to put the job into the printer spooler. + */ + createPrinter(printerName: string): XPrinter; + + /** returns a list of all available printer names. */ + getPrinterNames(): SafeArray; + + /** returns a list of all available printer names. */ + readonly PrinterNames: SafeArray; + } + + /** gives access to the value and settings of a progress bar. */ + interface XProgressBar extends uno.XInterface { + /** returns the current progress value of the progress bar. */ + getValue(): number; + + /** sets the background color (RGB) of the control. */ + setBackgroundColor(Color: util.Color): void; + + /** sets the foreground color (RGB) of the control. */ + setForegroundColor(Color: util.Color): void; + + /** + * sets the minimum and the maximum progress value of the progress bar. + * + * If the minimum value is greater than the maximum value, the method exchanges the values automatically. + */ + setRange(Min: number, Max: number): void; + + /** sets the progress value of the progress bar. */ + setValue(Value: number): void; + + /** returns the current progress value of the progress bar. */ + Value: number; + } + + /** + * gives access to the text of a progress monitor. + * @deprecated Deprecated + */ + interface XProgressMonitor extends XProgressBar { + /** adds a new text line to the control. */ + addText(Topic: string, Text: string, beforeProgress: boolean): void; + + /** removes a text line from the control. */ + removeText(Topic: string, beforeProgress: boolean): void; + + /** updates an existing text line at the control. */ + updateText(Topic: string, Text: string, beforeProgress: boolean): void; + } + + /** gives access to the state of a radio button and makes it possible to register item event listeners. */ + interface XRadioButton extends uno.XInterface { + /** registers a listener for item events. */ + addItemListener(l: XItemListener): void; + + /** returns `TRUE` if the button is checked, `FALSE` otherwise. */ + getState(): boolean; + + /** unregisters a listener for item events. */ + removeItemListener(l: XItemListener): void; + + /** sets the label of the radio button. */ + setLabel(Label: string): void; + + /** sets the state of the radio button. */ + setState(b: boolean): void; + + /** returns `TRUE` if the button is checked, `FALSE` otherwise. */ + State: boolean; + } + + /** manages multiple rectangles which make up a region. */ + interface XRegion extends uno.XInterface { + /** returns the bounding box of the shape. */ + readonly Bounds: Rectangle; + + /** makes this region an empty region. */ + clear(): void; + + /** removes the area of the specified rectangle from this region. */ + excludeRectangle(Rect: Rectangle): void; + + /** removes the area of the specified region from this region. */ + excludeRegion(Region: XRegion): void; + + /** returns the bounding box of the shape. */ + getBounds(): Rectangle; + + /** returns all rectangles which are making up this region. */ + getRectangles(): SafeArray; + + /** intersects the specified rectangle with the current region. */ + intersectRectangle(Region: Rectangle): void; + + /** intersects the specified region with the current region. */ + intersectRegion(Region: XRegion): void; + + /** moves this region by the specified horizontal and vertical delta. */ + move(nHorzMove: number, nVertMove: number): void; + + /** returns all rectangles which are making up this region. */ + readonly Rectangles: SafeArray; + + /** adds the specified rectangle to this region. */ + unionRectangle(Rect: Rectangle): void; + + /** adds the specified region to this region. */ + unionRegion(Region: XRegion): void; + + /** applies an exclusive-or operation with the specified rectangle to this region. */ + xOrRectangle(Rect: Rectangle): void; + + /** applies an exclusive-or operation with the specified region to this region. */ + xOrRegion(Region: XRegion): void; + } + + /** specifies an interface which can be used to call back an implementation */ + interface XRequestCallback { + /** + * adds a callback request to the implementation + * @param aData any private data which will be provided to the callback implementation. + * @param xCallback a reference to the callback which should be called by the implementation of this interface. + */ + addCallback(xCallback: XCallback, aData: any): void; + } + + /** + * The {@link XReschedule} interface can be used to give control to the main thread to allow events processing. + * @deprecated DeprecatedThis interface was only implemented in an intermediate developer release anyway. + * @since OOo 2.0 + */ + interface XReschedule extends uno.XInterface { + /** Allow the main thread to process some events. */ + reschedule(): void; + } + + /** gives access to the value and settings of a scroll bar and makes it possible to register adjustment event listeners. */ + interface XScrollBar extends uno.XInterface { + /** registers an adjustment event listener. */ + addAdjustmentListener(l: XAdjustmentListener): void; + + /** returns the currently set increment for a block move. */ + BlockIncrement: number; + + /** returns the currently set increment for a block move. */ + getBlockIncrement(): number; + + /** returns the currently set increment for a single line move. */ + getLineIncrement(): number; + + /** returns the currently set maximum scroll value of the scroll bar. */ + getMaximum(): number; + + /** returns the currently set {@link ScrollBarOrientation} of the scroll bar. */ + getOrientation(): number; + + /** returns the current scroll value of the scroll bar. */ + getValue(): number; + + /** returns the currently visible size of the scroll bar. */ + getVisibleSize(): number; + + /** returns the currently set increment for a single line move. */ + LineIncrement: number; + + /** returns the currently set maximum scroll value of the scroll bar. */ + Maximum: number; + + /** returns the currently set {@link ScrollBarOrientation} of the scroll bar. */ + Orientation: number; + + /** unregisters an adjustment event listener. */ + removeAdjustmentListener(l: XAdjustmentListener): void; + + /** sets the increment for a block move. */ + setBlockIncrement(n: number): void; + + /** sets the increment for a single line move. */ + setLineIncrement(n: number): void; + + /** sets the maximum scroll value of the scroll bar. */ + setMaximum(n: number): void; + + /** sets the {@link ScrollBarOrientation} of the scroll bar. */ + setOrientation(n: number): void; + + /** sets the scroll value of the scroll bar. */ + setValue(n: number): void; + + /** sets the scroll value, visible area and maximum scroll value of the scroll bar. */ + setValues(nValue: number, nVisible: number, nMax: number): void; + + /** sets the visible size of the scroll bar. */ + setVisibleSize(n: number): void; + + /** returns the current scroll value of the scroll bar. */ + Value: number; + + /** returns the currently visible size of the scroll bar. */ + VisibleSize: number; + } + + /** specifies the basic operations for a tab controller, but does not require {@link XControl} as type of tabs. */ + interface XSimpleTabController extends uno.XInterface { + /** + * activate the specified tab. + * + * The new tab will be activated and all listener will get an event describing this. Of course there will be an event too, which notifies listener about + * the deactivation of the last active tab. + * @param ID the ID of the new active tab. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the specified ID isn't used inside this tab controller. + */ + activateTab(ID: number): void; + + /** + * return the unique ID of the current active tab. + * @returns [long] the ID of the active tab. + */ + readonly ActiveTabID: number; + + /** + * register listener for inserting/removing tabs and changing their properties. + * @param Listener the listener to register. + */ + addTabListener(Listener: XTabListener): void; + + /** + * return the unique ID of the current active tab. + * @returns [long] the ID of the active tab. + */ + getActiveTabID(): number; + + /** + * retrieve the set of properties for the specified tab. + * @param ID the ID of the tab. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the specified ID isn't used inside this tab controller. + */ + getTabProps(ID: number): SafeArray; + + /** + * create a new tab and return an unique ID, which can be used further to address this tab by using other methods of this interface. + * @returns [long an unique ID for this new tab. + */ + insertTab(): number; + + /** + * remove a tab with the given ID. + * @param ID the ID of the tab, which should be removed. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the specified ID isn't used inside this tab controller. + */ + removeTab(ID: number): void; + + /** + * unregister listener for inserting/removing tabs and changing their properties. + * @param Listener the listener to unregister. + */ + removeTabListener(Listener: XTabListener): void; + + /** + * change some properties of the specified tab. + * @param Properties Such properties can be: {{table here, see documentation}} + * @param ID the ID of the tab, which should be changed. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the specified ID isn't used inside this tab controller. + */ + setTabProps(ID: number, Properties: LibreOffice.SeqEquiv): void; + } + + /** gives access to the value of a spin field and makes it possible to register for spin events. */ + interface XSpinField extends uno.XInterface { + /** registers a listener for spin events. */ + addSpinListener(l: XSpinListener): void; + + /** decreases the value by one step. */ + down(): void; + + /** enables/disables automatic repeat mode. */ + enableRepeat(bRepeat: boolean): void; + + /** sets the value to the previously set lower value. */ + first(): void; + + /** sets the value to the previously set upper value. */ + last(): void; + + /** unregisters a listener for spin events. */ + removeSpinListener(l: XSpinListener): void; + + /** increases the value by one step. */ + up(): void; + } + + /** makes it possible to receive spin events. */ + interface XSpinListener extends lang.XEventListener { + /** is invoked when the spin field is spun down. */ + down(rEvent: SpinEvent): void; + + /** is invoked when the spin field is set to the lower value. */ + first(rEvent: SpinEvent): void; + + /** is invoked when the spin field is set to the upper value. */ + last(rEvent: SpinEvent): void; + + /** is invoked when the spin field is spun up. */ + up(rEvent: SpinEvent): void; + } + + /** gives access to the value and settings of a control which is associated with a spinnable value. */ + interface XSpinValue extends uno.XInterface { + /** registers an adjustment event listener. */ + addAdjustmentListener(listener: XAdjustmentListener): void; + + /** returns the currently set maximum value of the control */ + getMaximum(): number; + + /** returns the currently set minimum value of the control */ + getMinimum(): number; + + /** returns the current orientation of the control */ + getOrientation(): number; + + /** returns the value by which the current value of the control should be incremented or decremented upon spinning. */ + getSpinIncrement(): number; + + /** returns the current value of the control. */ + getValue(): number; + + /** returns the currently set maximum value of the control */ + Maximum: number; + + /** returns the currently set minimum value of the control */ + Minimum: number; + + /** returns the current orientation of the control */ + Orientation: number; + + /** unregisters an adjustment event listener. */ + removeAdjustmentListener(listener: XAdjustmentListener): void; + + /** sets the maximum value which can be set on the control */ + setMaximum(maxValue: number): void; + + /** sets the minimum value which can be set on the control */ + setMinimum(minValue: number): void; + + /** + * controls the orientation of the control + * @param orientation one of the {@link ScrollBarOrientation} values specifying the orientation + * @throws com::sun::star::lang::NoSupportException in case the given orientation is not supported + */ + setOrientation(orientation: number): void; + + /** sets the value by which the current value of the control should be incremented or decremented upon spinning. */ + setSpinIncrement(spinIncrement: number): void; + + /** sets the current value of the control */ + setValue(value: number): void; + + /** + * sets the value and value range of the control + * @see setValue + * @see setMinimum + * @see setMaximum + */ + setValues(minValue: number, maxValue: number, currentValue: number): void; + + /** returns the value by which the current value of the control should be incremented or decremented upon spinning. */ + SpinIncrement: number; + + /** returns the current value of the control. */ + Value: number; + } + + /** + * to be implemented by components which wish to be notified about changes in the style of a component + * @see XStyleSettings + */ + interface XStyleChangeListener extends lang.XEventListener { + styleSettingsChanged(Event: lang.EventObject): void; + } + + /** + * provides access to certain style settings within an OpenOffice.org component, such as a window, or within OpenOffice.org as a whole. + * + * Note that there are constraints for those settings. For instance, if controls are drawn with the native widget framework, i.e. in the desktop theme's + * look, then they won't necessarily respect all their style settings, because those have a lesser priority than the native look. + * + * On the other hand, some settings are respected only when rendering the controls in the native desktop/theme look. For instance, without native + * theming, buttons do not support a "roll over" mode, i.e., they're painted the same way, no matter if they mouse hovers over them or not. But with + * native theming, this changes, as here the general button look is drawn by the system's theming engine, while the text is drawn by OpenOffice.org. In + * this case, the button respects the `ButtonRolloverTextColor` when painting its text. + */ + interface XStyleSettings { + ActiveBorderColor: util.Color; + ActiveColor: util.Color; + ActiveTabColor: util.Color; + ActiveTextColor: util.Color; + addStyleChangeListener(Listener: XStyleChangeListener): void; + ApplicationFont: FontDescriptor; + ButtonRolloverTextColor: util.Color; + ButtonTextColor: util.Color; + CheckedColor: util.Color; + DarkShadowColor: util.Color; + DeactiveBorderColor: util.Color; + DeactiveColor: util.Color; + DeactiveTextColor: util.Color; + DialogColor: util.Color; + DialogTextColor: util.Color; + DisableColor: util.Color; + FaceColor: util.Color; + FaceGradientColor: util.Color; + FieldColor: util.Color; + FieldFont: FontDescriptor; + FieldRolloverTextColor: util.Color; + FieldTextColor: util.Color; + FloatTitleFont: FontDescriptor; + GroupFont: FontDescriptor; + GroupTextColor: util.Color; + HelpColor: util.Color; + HelpFont: FontDescriptor; + HelpTextColor: util.Color; + + /** controls whether the an UI component should use a high-contrast mode */ + HighContrastMode: boolean; + HighlightColor: util.Color; + HighlightTextColor: util.Color; + InactiveTabColor: util.Color; + LabelFont: FontDescriptor; + LabelTextColor: util.Color; + LightColor: util.Color; + MenuBarColor: util.Color; + MenuBarTextColor: util.Color; + MenuBorderColor: util.Color; + MenuColor: util.Color; + MenuFont: FontDescriptor; + MenuHighlightColor: util.Color; + MenuHighlightTextColor: util.Color; + MenuTextColor: util.Color; + MonoColor: util.Color; + PushButtonFont: FontDescriptor; + RadioCheckFont: FontDescriptor; + RadioCheckTextColor: util.Color; + removeStyleChangeListener(Listener: XStyleChangeListener): void; + SeparatorColor: util.Color; + ShadowColor: util.Color; + TitleFont: FontDescriptor; + ToolFont: FontDescriptor; + WindowColor: util.Color; + WindowTextColor: util.Color; + WorkspaceColor: util.Color; + } + + /** provides access to the style settings of a component */ + interface XStyleSettingsSupplier { + StyleSettings: XStyleSettings; + } + + /** specifies a factory interface for creating system child windows. */ + interface XSystemChildFactory extends uno.XInterface { + /** + * creates a system child window. + * @param Parent a system-specific handle to a window. You must check the machine ID and the process ID. ; WIN32: HWND. ; WIN16: HWND. ; JAVA: global + * @param ProcessId Ignored. + * @param SystemType one constant out of the constant group {@link com.sun.star.lang.SystemDependent} . + * @returns the created window. + */ + createSystemChild(Parent: any, ProcessId: LibreOffice.SeqEquiv, SystemType: number): XWindowPeer; + } + + /** + * provides access to the system dependent implementation of the window. + * @see com.sun.star.lang.SystemDependent + * @see WindowAttribute + * @see WindowAttribute.SYSTEMDEPENDENT + */ + interface XSystemDependentMenuPeer extends uno.XInterface { + /** + * returns a system-specific window handle. + * @param ProcessId the process identifier. Use the sal_getGlobalProcessId function of the RTL library. + * @param SystemType one constant out of the constant group {@link com.sun.star.lang.SystemDependent} . + * @returns a system-specific handle to a menu or 0 if the menu is not in the same process. You must check the machine ID and the process ID. ; WIN32: Retu + */ + getMenuHandle(ProcessId: LibreOffice.SeqEquiv, SystemType: number): any; + } + + /** + * provides access to the system dependent implementation of the window. + * @see com.sun.star.lang.SystemDependent + * @see WindowAttribute + * @see WindowAttribute.SYSTEMDEPENDENT + */ + interface XSystemDependentWindowPeer extends uno.XInterface { + /** + * returns a system-specific window handle. + * @param ProcessId the process identifier. Use the sal_getGlobalProcessId function of the RTL library. + * @param SystemType one constant out of the constant group {@link com.sun.star.lang.SystemDependent} . + * @returns a system-specific handle to a window or 0 if the window is not in the same process. You must check the machine ID and the process ID. ; WIN32: + */ + getWindowHandle(ProcessId: LibreOffice.SeqEquiv, SystemType: number): any; + } + + /** specifies the basic operations for a tab controller. */ + interface XTabController extends uno.XInterface { + /** sets the focus to the first control that can be reached with the TAB key. */ + activateFirst(): void; + + /** sets the focus to the last control that can be reached with the TAB key. */ + activateLast(): void; + + /** activates tab order. */ + activateTabOrder(): void; + + /** enables automatic tab order. */ + autoTabOrder(): void; + + /** returns the control container. */ + Container: XControlContainer; + + /** returns all controls of the control container. */ + readonly Controls: SafeArray; + + /** returns the control container. */ + getContainer(): XControlContainer; + + /** returns all controls of the control container. */ + getControls(): SafeArray; + + /** returns the tab controller model. */ + getModel(): XTabControllerModel; + + /** set the control container. */ + setContainer(Container: XControlContainer): void; + + /** sets the tab controller model. */ + setModel(Model: XTabControllerModel): void; + } + + /** specifies the basic operations for a tab controller model. */ + interface XTabControllerModel extends uno.XInterface { + /** returns the control models. */ + ControlModels: SafeArray; + + /** returns the control models. */ + getControlModels(): SafeArray; + + /** returns a control model group. */ + getGroup(nGroup: number, Group: [LibreOffice.SeqEquiv], Name: [string]): void; + + /** returns a control model group by name. */ + getGroupByName(Name: string, Group: [LibreOffice.SeqEquiv]): void; + + /** returns whether the control models are grouped together. */ + getGroupControl(): boolean; + + /** returns the number of control model groups. */ + getGroupCount(): number; + + /** returns whether the control models are grouped together. */ + GroupControl: boolean; + + /** returns the number of control model groups. */ + readonly GroupCount: number; + + /** sets the control models. */ + setControlModels(Controls: LibreOffice.SeqEquiv): void; + + /** sets a control model group. */ + setGroup(Group: LibreOffice.SeqEquiv, GroupName: string): void; + + /** determines if the control models are grouped together. */ + setGroupControl(GroupControl: boolean): void; + } + + /** such listener will be informed if tab's was inserted/removed from an {@link XSimpleTabController} instance or if the properties of a tab was changed. */ + interface XTabListener extends lang.XEventListener { + /** a tab was activated (e.g. by using mouse/keyboard or method {@link XSimpleTabController.activateTab()} */ + activated(ID: number): void; + + /** + * a tab was changed within it's properties. + * @param ID the unique ID of the changed tab. + * @param Properties the current set of properties for this tab. + */ + changed(ID: number, Properties: LibreOffice.SeqEquiv): void; + + /** a tab was deactivated, because another tab became the new active state. */ + deactivated(ID: number): void; + + /** + * a new tab was inserted. + * @param ID this is the unique ID of this new tab. + */ + inserted(ID: number): void; + + /** + * a tab was removed. + * @param ID this was the unique ID of this tab. + */ + removed(ID: number): void; + } + + /** gives access to the text in a control. */ + interface XTextArea extends uno.XInterface { + /** returns the text lines as a single string with line separators. */ + getTextLines(): string; + + /** returns the text lines as a single string with line separators. */ + readonly TextLines: string; + } + + /** gives access to the text of a component and makes it possible to register event listeners. */ + interface XTextComponent extends uno.XInterface { + /** registers a text event listener. */ + addTextListener(l: XTextListener): void; + + /** returns the currently set maximum text length. */ + getMaxTextLen(): number; + + /** returns the currently selected text. */ + getSelectedText(): string; + + /** returns the current user selection. */ + getSelection(): Selection; + + /** returns the text of the component. */ + getText(): string; + + /** inserts text at the specified position. */ + insertText(Sel: Selection, Text: string): void; + + /** returns if the text is editable by the user. */ + isEditable(): boolean; + + /** returns the currently set maximum text length. */ + MaxTextLen: number; + + /** unregisters a text event listener. */ + removeTextListener(l: XTextListener): void; + + /** returns the currently selected text. */ + readonly SelectedText: string; + + /** returns the current user selection. */ + Selection: Selection; + + /** makes the text editable for the user or read-only. */ + setEditable(bEditable: boolean): void; + + /** sets the maximum text length. */ + setMaxTextLen(nLen: number): void; + + /** sets the user selection. */ + setSelection(aSelection: Selection): void; + + /** sets the text of the component. */ + setText(aText: string): void; + + /** returns the text of the component. */ + Text: string; + } + + /** is used for password fields. */ + interface XTextEditField extends uno.XInterface { + /** sets the character to display as a substitute on user input. */ + setEchoChar(cEcho: string): void; + } + + /** specifies the layout constraints for a text field. */ + interface XTextLayoutConstrains extends uno.XInterface { + /** returns the ideal number of columns and lines for displaying this text. */ + getColumnsAndLines(nCols: [number], nLines: [number]): void; + + /** returns the minimum size for a given number of columns and lines. */ + getMinimumSize(nCols: number, nLines: number): Size; + } + + /** makes it possible to receive text change events. */ + interface XTextListener extends lang.XEventListener { + /** is invoked when the text has changed. */ + textChanged(rEvent: TextEvent): void; + } + + /** gives access to the value and settings of a time field. */ + interface XTimeField extends uno.XInterface { + /** returns the currently set first value which is set on POS1 key. */ + First: util.Time; + + /** returns the currently set first value which is set on POS1 key. */ + getFirst(): util.Time; + + /** returns the currently set last value which is set on END key. */ + getLast(): util.Time; + + /** returns the currently set maximum time value that can be entered by the user. */ + getMax(): util.Time; + + /** returns the currently set minimum time value that can be entered by the user. */ + getMin(): util.Time; + + /** returns the time value which is currently displayed in the time field. */ + getTime(): util.Time; + + /** returns whether currently an empty value is set for the time. */ + isEmpty(): boolean; + + /** returns whether the format is currently checked during user input. */ + isStrictFormat(): boolean; + + /** returns the currently set last value which is set on END key. */ + Last: util.Time; + + /** returns the currently set maximum time value that can be entered by the user. */ + Max: util.Time; + + /** returns the currently set minimum time value that can be entered by the user. */ + Min: util.Time; + + /** sets an empty value for the time. */ + setEmpty(): void; + + /** sets the first value to be set on POS1 key. */ + setFirst(Time: util.Time): void; + + /** sets the last value to be set on END key. */ + setLast(Time: util.Time): void; + + /** sets the maximum time value that can be entered by the user. */ + setMax(Time: util.Time): void; + + /** sets the minimum time value that can be entered by the user. */ + setMin(Time: util.Time): void; + + /** determines if the format is checked during user input. */ + setStrictFormat(bStrict: boolean): void; + + /** sets the time value which is displayed in the time field. */ + setTime(Time: util.Time): void; + + /** returns the time value which is currently displayed in the time field. */ + Time: util.Time; + } + + /** + * specifies a factory interface for the window toolkit. + * + * This is similar to the abstract window toolkit (AWT) in Java. + */ + interface XToolkit extends uno.XInterface { + /** creates a region. */ + createRegion(): XRegion; + + /** creates a virtual device that is compatible with the screen. */ + createScreenCompatibleDevice(Width: number, Height: number): XDevice; + + /** creates a new window using the given descriptor. */ + createWindow(Descriptor: WindowDescriptor): XWindowPeer; + + /** returns a sequence of windows which are newly created using the given descriptors. */ + createWindows(Descriptors: LibreOffice.SeqEquiv): SafeArray; + + /** returns the desktop window. */ + readonly DesktopWindow: XWindowPeer; + + /** returns the desktop window. */ + getDesktopWindow(): XWindowPeer; + + /** + * For LibreOffice versions < 4.1, this method just returned an empty rectangle. After that, it started returning a valid value. + * @returns the size and position of the primary display + */ + getWorkArea(): Rectangle; + + /** + * For LibreOffice versions < 4.1, this method just returned an empty rectangle. After that, it started returning a valid value. + * @returns the size and position of the primary display + */ + readonly WorkArea: Rectangle; + } + + /** + * Provides a unified interface for the new-style service {@link Toolkit} to implement. + * @since LibreOffice 4.0 + */ + interface XToolkit2 extends XToolkit, XDataTransferProviderAccess, XSystemChildFactory, XMessageBoxFactory, XExtendedToolkit, XReschedule { } + + /** Work in progress, don't use unless you know what you are doing. */ + interface XToolkitExperimental extends XToolkit2 { + /** Get the number of OpenGL buffer swaps. */ + getOpenGLBufferSwapCounter(): number; + + /** Get the number of OpenGL buffer swaps. */ + readonly OpenGLBufferSwapCounter: number; + + /** Pause the main thread of LibreOffice for the requested amount of time. */ + pause(nMilliseconds: number): void; + + /** Process all pending idle events */ + processEventsToIdle(): void; + + /** Turn on or off deterministic scheduling (off is the default). */ + setDeterministicScheduling(bDeterministicMode: boolean): void; + } + + /** + * Allows injection of keyboard and mouse events + * @since LibreOffice 5.1 + */ + interface XToolkitRobot { + keyPress(aKeyEvent: KeyEvent): void; + keyRelease(aKeyEvent: KeyEvent): void; + mouseMove(aMouseEvent: MouseEvent): void; + mousePress(aMouseEvent: MouseEvent): void; + mouseRelease(aMouseEvent: MouseEvent): void; + } + + /** manages the functionality specific for a top window. */ + interface XTopWindow extends uno.XInterface { + /** adds the specified top window listener to receive window events from this window. */ + addTopWindowListener(xListener: XTopWindowListener): void; + + /** removes the specified top window listener so that it no longer receives window events from this window. */ + removeTopWindowListener(xListener: XTopWindowListener): void; + + /** sets a menu bar. */ + setMenuBar(xMenu: XMenuBar): void; + + /** places this window at the bottom of the stacking order and makes the corresponding adjustment to other visible windows. */ + toBack(): void; + + /** places this window at the top of the stacking order and shows it in front of any other windows. */ + toFront(): void; + } + + /** extends {@link XTopWindow} with additional functionality */ + interface XTopWindow2 extends XTopWindow { + /** + * controls on which display the window is shown. + * + * When retrieving this property, in case the window is positioned on multiple displays, the number returned will be of the display containing the upper + * left pixel of the frame area (that is of the client area on system decorated windows, or the frame area of undecorated resp. owner decorated windows). + * @see com.sun.star.awt.DisplayAccess + * @see com.sun.star.awt.DisplayInfo + * @throws com::sun::star::lang::IndexOutOfBoundsException if you attempt to set this property to a value which does not correspond to the number of an exis + */ + Display: number; + + /** controls whether the window is currently maximized */ + IsMaximized: boolean; + + /** controls whether the window is currently minimized */ + IsMinimized: boolean; + } + + /** + * makes it possible to receive window events. + * @see XActivateListener + */ + interface XTopWindowListener extends lang.XEventListener { + /** is invoked when a window is activated. */ + windowActivated(e: lang.EventObject): void; + + /** is invoked when a window has been closed. */ + windowClosed(e: lang.EventObject): void; + + /** + * is invoked when a window is in the process of being closed. + * + * The close operation can be overridden at this point. + */ + windowClosing(e: lang.EventObject): void; + + /** is invoked when a window is deactivated. */ + windowDeactivated(e: lang.EventObject): void; + + /** is invoked when a window is iconified. */ + windowMinimized(e: lang.EventObject): void; + + /** is invoked when a window is deiconified. */ + windowNormalized(e: lang.EventObject): void; + + /** is invoked when a window has been opened. */ + windowOpened(e: lang.EventObject): void; + } + + /** + * allows converting between different measurement units + * @since OOo 3.0 + */ + interface XUnitConversion extends uno.XInterface { + /** + * converts the given {@link Point} , which is specified in pixels, into the given logical unit + * @param Point A given {@link Point} in a well known type + * @param TargetUnit A type from {@link com.sun.star.util.MeasureUnit} in which the {@link Point} will convert to. + * @returns Returns a new {@link Point} in the TargetUnit type format. + */ + convertPointToLogic(Point: Point, TargetUnit: number): Point; + + /** + * converts the given {@link Point} , which is specified in the given logical unit, into pixels + * @param Point A given {@link Point} in the SourceUnit type + * @param SourceUnit The type from {@link com.sun.star.util.MeasureUnit} of the {@link Point} . + * @returns Return a new {@link Point} in Pixel type format. + */ + convertPointToPixel(Point: Point, SourceUnit: number): Point; + + /** + * converts the given {@link Size} , which is specified in pixels, into the given logical unit + * @param Size A given {@link Size} in a well known type + * @param TargetUnit A type from {@link com.sun.star.util.MeasureUnit} in which the {@link Size} will convert to. + * @returns Returns a new {@link Size} in the TargetUnit type format. + */ + convertSizeToLogic(Size: Size, TargetUnit: number): Size; + + /** + * converts the given {@link Size} , which is specified in the given logical unit, into pixels + * @param Size A given {@link Size} in a well known type + * @param SourceUnit The type from {@link com.sun.star.util.MeasureUnit} of the {@link Size} . + * @returns Returns a new {@link Size} in the TargetUnit type format. + */ + convertSizeToPixel(Size: Size, SourceUnit: number): Size; + } + + /** gives access to the tab controllers of a {@link UnoControlContainer} . */ + interface XUnoControlContainer extends uno.XInterface { + /** adds a single tab controller. */ + addTabController(TabController: XTabController): void; + + /** returns all currently specified tab controllers. */ + getTabControllers(): SafeArray; + + /** removes a single tab controller. */ + removeTabController(TabController: XTabController): void; + + /** sets a set of tab controllers. */ + setTabControllers(TabControllers: LibreOffice.SeqEquiv): void; + + /** returns all currently specified tab controllers. */ + TabControllers: SafeArray; + } + + /** + * The interface for the {@link UnoControlDialog} service. This service actually implements a whole whack of interfaces. This is the just the subset that + * our code needs. + * @since LibreOffice 4.2 + */ + interface XUnoControlDialog extends XControlContainer, XControl, XWindow, XTopWindow, XDialog2 { } + + /** + * Interface to add handlers for key and mouse events. A handler is not a passive listener, it can even consume the event. + * @since OOo 1.1.2 + */ + interface XUserInputInterception extends uno.XInterface { + /** + * Add a new listener that is called on {@link com.sun.star.awt.KeyEvent} . Every listener is given the opportunity to consume the event, i.e. prevent + * the not yet called listeners from being called. + * @param xHandler If this is a valid reference it is inserted into the list of handlers. It is the task of the caller to not register the same handler twi + */ + addKeyHandler(xHandler: XKeyHandler): void; + + /** + * Add a new listener that is called on {@link com.sun.star.awt.MouseEvent} . Every listener is given the opportunity to consume the event, i.e. prevent + * the not yet called listeners from being called. + * @param xHandler If this is a valid reference it is inserted into the list of handlers. It is the task of the caller to not register the same handler twi + */ + addMouseClickHandler(xHandler: XMouseClickHandler): void; + + /** + * Remove the specified listener from the list of listeners. + * @param xHandler If the reference is empty then nothing will be changed. If the handler has been registered twice (or more) then all references will be r + */ + removeKeyHandler(xHandler: XKeyHandler): void; + + /** + * Remove the specified listener from the list of listeners. + * @param xHandler If the reference is empty then nothing will be changed. If the handler has been registered twice (or more) then all references will be r + */ + removeMouseClickHandler(xHandler: XMouseClickHandler): void; + } + + /** + * represents a VCL container window. + * @deprecated Deprecated + */ + interface XVclContainer extends uno.XInterface { + /** adds the specified container listener to receive container events from this container. */ + addVclContainerListener(l: XVclContainerListener): void; + + /** returns all windows. */ + getWindows(): SafeArray; + + /** removes the specified container listener so that it no longer receives container events from this container. */ + removeVclContainerListener(l: XVclContainerListener): void; + + /** returns all windows. */ + readonly Windows: SafeArray; + } + + /** + * makes it possible to receive container events. + * + * Container events are provided **only** for notification purposes. The VCL will automatically handle add and remove operations internally. + * @deprecated Deprecated + */ + interface XVclContainerListener extends lang.XEventListener { + /** is invoked when a window has been added to the VCL container window. */ + windowAdded(e: VclContainerEvent): void; + + /** is invoked when a window has been removed from the VCL container window. */ + windowRemoved(e: VclContainerEvent): void; + } + + /** + * gives access to the VCL container window implementation. + * @deprecated Deprecated + */ + interface XVclContainerPeer extends uno.XInterface { + /** enable as dialog control. */ + enableDialogControl(bEnable: boolean): void; + + /** sets a group. */ + setGroup(Windows: LibreOffice.SeqEquiv): void; + + /** sets the tab order. */ + setTabOrder(WindowOrder: LibreOffice.SeqEquiv, Tabs: LibreOffice.SeqEquiv, GroupControl: boolean): void; + } + + /** + * gives access to the VCL window implementation. + * @deprecated Deprecated + */ + interface XVclWindowPeer extends XWindowPeer { + /** enables clipping of sibling windows. */ + enableClipSiblings(bClip: boolean): void; + + /** returns the value of the property with the specified name. */ + getProperty(PropertyName: string): any; + + /** returns the font, foreground and background color for the specified type. */ + getStyles(nType: number, Font: [FontDescriptor], ForegroundColor: [util.Color], BackgroundColor: [util.Color]): void; + + /** returns `TRUE` if the window peer is a child, `FALSE` otherwise. */ + isChild(Peer: XWindowPeer): boolean; + + /** returns `TRUE` if the window peer is in design mode, `FALSE` otherwise. */ + isDesignMode(): boolean; + + /** sets the control font. */ + setControlFont(aFont: FontDescriptor): void; + + /** sets the design mode for use in a design editor. */ + setDesignMode(bOn: boolean): void; + + /** sets the foreground color. */ + setForeground(Color: util.Color): void; + + /** sets the value of the property with the specified name. */ + setProperty(PropertyName: string, Value: any): void; + } + + /** + * makes it possible to attach an output device to the object. + * + * This kind of object is called view-object. + */ + interface XView extends uno.XInterface { + /** + * draws the object at the specified position. + * + * If the output should be clipped, the caller has to set the clipping region. + */ + draw(nX: number, nY: number): void; + + /** returns the output device which was set using the method {@link XView.setGraphics()} . */ + getGraphics(): XGraphics; + + /** + * returns the size of the object in device units. + * + * A device must be set before. + */ + getSize(): Size; + + /** returns the output device which was set using the method {@link XView.setGraphics()} . */ + Graphics: XGraphics; + + /** sets the output device. */ + setGraphics(aDevice: XGraphics): boolean; + + /** + * sets the zoom factor. + * + * The zoom factor only affects the content of the view, not the size. + */ + setZoom(fZoomX: number, fZoomY: number): void; + + /** + * returns the size of the object in device units. + * + * A device must be set before. + */ + readonly Size: Size; + } + + /** + * specifies the basic operations for a window component. + * + * A window is a rectangular region on an output device with its own position, size, and internal coordinate system. A window is used for displaying + * data. In addition, the window receives events from the user. + */ + interface XWindow extends lang.XComponent { + /** adds a focus listener to the object. */ + addFocusListener(xListener: XFocusListener): void; + + /** adds a key listener to the object. */ + addKeyListener(xListener: XKeyListener): void; + + /** adds a mouse listener to the object. */ + addMouseListener(xListener: XMouseListener): void; + + /** adds a mouse motion listener to the object. */ + addMouseMotionListener(xListener: XMouseMotionListener): void; + + /** adds a paint listener to the object. */ + addPaintListener(xListener: XPaintListener): void; + + /** + * adds a window listener to the object. + * @param xListener the listener to add. If this listener also supports the {@link XWindowListener2} interface, it will receive the additional events decla + */ + addWindowListener(xListener: XWindowListener): void; + + /** returns the outer bounds of the window. */ + getPosSize(): Rectangle; + + /** returns the outer bounds of the window. */ + readonly PosSize: Rectangle; + + /** removes the specified focus listener from the listener list. */ + removeFocusListener(xListener: XFocusListener): void; + + /** removes the specified key listener from the listener list. */ + removeKeyListener(xListener: XKeyListener): void; + + /** removes the specified mouse listener from the listener list. */ + removeMouseListener(xListener: XMouseListener): void; + + /** removes the specified mouse motion listener from the listener list. */ + removeMouseMotionListener(xListener: XMouseMotionListener): void; + + /** removes the specified paint listener from the listener list. */ + removePaintListener(xListener: XPaintListener): void; + + /** removes the specified window listener from the listener list. */ + removeWindowListener(xListener: XWindowListener): void; + + /** enables or disables the window depending on the parameter. */ + setEnable(Enable: boolean): void; + + /** sets the focus to the window. */ + setFocus(): void; + + /** + * sets the outer bounds of the window. + * @param X the x-coordinate of the window. + * @param Y the y-coordinate of the window. + * @param Width the width of the window. + * @param Height the height of the window. + * @param Flags Flags are of type {@link PosSize} and specify, which parameters are taken into account when setting the outer bounds of the window. + */ + setPosSize(X: number, Y: number, Width: number, Height: number, Flags: number): void; + + /** shows or hides the window depending on the parameter. */ + setVisible(Visible: boolean): void; + } + + /** + * specifies some extended operations for a window component. + * + * A window is a rectangular region on an output device with its own position, size, and internal coordinate system. A window is used for displaying + * data. In addition, the window receives events from the user. + */ + interface XWindow2 extends XWindow { + /** returns the inner bounds of the window, also known as the client size. */ + getOutputSize(): Size; + + /** returns the focus state of the window */ + hasFocus(): boolean; + + /** returns the activation state of the window */ + isActive(): boolean; + + /** returns the enabled state of the window */ + isEnabled(): boolean; + + /** returns the visibility state of the window */ + isVisible(): boolean; + + /** returns the inner bounds of the window, also known as the client size. */ + OutputSize: Size; + + /** + * sets the inner bounds of the window, also known as the client size + * @param Size the inner width and height of the window. + */ + setOutputSize(Size: Size): void; + } + + /** + * makes it possible to receive window events. + * + * Component events are provided **only** for notification purposes. Moves and resizes will be handled internally by the window component, so that GUI + * layout works properly regardless of whether a program registers such a listener or not. + */ + interface XWindowListener extends lang.XEventListener { + /** is invoked when the window has been hidden. */ + windowHidden(e: lang.EventObject): void; + + /** is invoked when the window has been moved. */ + windowMoved(e: WindowEvent): void; + + /** is invoked when the window has been resized. */ + windowResized(e: WindowEvent): void; + + /** is invoked when the window has been shown. */ + windowShown(e: lang.EventObject): void; + } + + /** allows receive window-related events, additional to the ones received by an {@link XWindowListener} */ + interface XWindowListener2 extends XWindowListener { + /** is called when the window has been disabled. */ + windowDisabled(e: lang.EventObject): void; + + /** is called when the window has been enabled. */ + windowEnabled(e: lang.EventObject): void; + } + + /** gives access to the actual window implementation on the device. */ + interface XWindowPeer extends lang.XComponent { + /** returns the toolkit which created this object. */ + getToolkit(): XToolkit; + + /** + * invalidates the whole window with the specified {@link InvalidateStyle} . + * @param Flags see {@link com.sun.star.awt.InvalidateStyle} + */ + invalidate(Flags: number): void; + + /** + * invalidates a rectangular area of the window with the specified {@link InvalidateStyle} . + * @param Rect the area to invalidate. + * @param Flags see {@link com.sun.star.awt.InvalidateStyle} + */ + invalidateRect(Rect: Rectangle, Flags: number): void; + + /** sets the background color. */ + setBackground(Color: util.Color): void; + + /** sets the mouse pointer. */ + setPointer(Pointer: XPointer): void; + + /** returns the toolkit which created this object. */ + readonly Toolkit: XToolkit; + } + + namespace CharSet { + const enum Constants { + ANSI = 1, + DONTKNOW = 0, + IBMPC_437 = 3, + IBMPC_850 = 4, + IBMPC_860 = 5, + IBMPC_861 = 6, + IBMPC_863 = 7, + IBMPC_865 = 8, + MAC = 2, + SYMBOL = 10, + SYSTEM = 9, + } + } + + namespace Command { + const enum Constants { + AUTOSCROLL = 5, + CONTEXTMENU = 1, + CURSORPOS = 11, + ENDEXTTEXTINPUT = 9, + EXTTEXTINPUT = 8, + HANGUL_HANJA_CONVERSION = 14, + INPUTCONTEXTCHANGE = 10, + MODKEYCHANGE = 13, + PASTESELECTION = 12, + STARTAUTOSCROLL = 4, + STARTDRAG = 2, + STARTEXTTEXTINPUT = 7, + USER = 4096, + VOICE = 6, + WHEEL = 3, + } + } + + namespace DeviceCapability { + const enum Constants { + GETBITS = 2, + RASTEROPERATIONS = 1, + } + } + + namespace FieldUnit { + const enum Constants { + FUNIT_100TH_MM = 13, + FUNIT_CM = 2, + FUNIT_CUSTOM = 11, + FUNIT_FOOT = 9, + FUNIT_INCH = 8, + FUNIT_KM = 4, + FUNIT_M = 3, + FUNIT_MILE = 10, + FUNIT_MM = 1, + FUNIT_NONE = 0, + FUNIT_PERCENT = 12, + FUNIT_PICA = 7, + FUNIT_POINT = 6, + FUNIT_TWIP = 5, + } + } + + namespace FocusChangeReason { + const enum Constants { + AROUND = 64, + BACKWARD = 32, + CURSOR = 2, + FORWARD = 16, + MNEMONIC = 4, + TAB = 1, + UNIQUEMNEMONIC = 256, + } + } + + namespace FontEmphasisMark { + const enum Constants { + ABOVE = 4096, + ACCENT = 4, + BELOW = 8192, + CIRCLE = 2, + DISC = 3, + DOT = 1, + NONE = 0, + } + } + + namespace FontFamily { + const enum Constants { + DECORATIVE = 1, + DONTKNOW = 0, + MODERN = 2, + ROMAN = 3, + SCRIPT = 4, + SWISS = 5, + SYSTEM = 6, + } + } + + namespace FontPitch { + const enum Constants { + DONTKNOW = 0, + FIXED = 1, + VARIABLE = 2, + } + } + + namespace FontRelief { + const enum Constants { + EMBOSSED = 1, + ENGRAVED = 2, + NONE = 0, + } + } + + namespace FontStrikeout { + const enum Constants { + BOLD = 4, + DONTKNOW = 3, + DOUBLE = 2, + NONE = 0, + SINGLE = 1, + SLASH = 5, + X = 6, + } + } + + namespace FontType { + const enum Constants { + DEVICE = 2, + DONTKNOW = 0, + RASTER = 1, + SCALABLE = 4, + } + } + + namespace FontUnderline { + const enum Constants { + BOLD = 12, + BOLDDASH = 14, + BOLDDASHDOT = 16, + BOLDDASHDOTDOT = 17, + BOLDDOTTED = 13, + BOLDLONGDASH = 15, + BOLDWAVE = 18, + DASH = 5, + DASHDOT = 7, + DASHDOTDOT = 8, + DONTKNOW = 4, + DOTTED = 3, + DOUBLE = 2, + DOUBLEWAVE = 11, + LONGDASH = 6, + NONE = 0, + SINGLE = 1, + SMALLWAVE = 9, + WAVE = 10, + } + } + + namespace FontWeight { + const enum Constants { + BLACK = 200.000000, + BOLD = 150.000000, + DONTKNOW = 0.000000, + LIGHT = 75.000000, + NORMAL = 100.000000, + SEMIBOLD = 110.000000, + SEMILIGHT = 90.000000, + THIN = 50.000000, + ULTRABOLD = 175.000000, + ULTRALIGHT = 60.000000, + } + } + + namespace FontWidth { + const enum Constants { + CONDENSED = 75.000000, + DONTKNOW = 0.000000, + EXPANDED = 150.000000, + EXTRACONDENSED = 60.000000, + EXTRAEXPANDED = 175.000000, + NORMAL = 100.000000, + SEMICONDENSED = 90.000000, + SEMIEXPANDED = 110.000000, + ULTRACONDENSED = 50.000000, + ULTRAEXPANDED = 200.000000, + } + } + + namespace grid { + /** + * If you do not want to implement the {@link XGridColumnModel} yourself, use this service. + * @since OOo 3.3 + */ + type DefaultGridColumnModel = XGridColumnModel; + + /** + * If you do not want to implement the {@link XGridDataModel} yourself, use this service. + * + * The `DefaultGridDataModel` implementation is a dumb container of tabular data. You can add and remove rows, modify cell values, and the like. + * + * The implementation will implicitly increase its column count if you add a row which has more values than the current column count. + * @since OOo 3.3 + */ + type DefaultGridDataModel = XMutableGridDataModel; + + /** + * Represents a column as used by the {@link DefaultGridColumnModel} + * @since OOo 3.3 + */ + type GridColumn = XGridColumn; + + /** + * Exception is thrown to indicate that set data is invalid, e.g. type of data is unknown or data count doesn't match with column count. + * @since OOo 3.3 + */ + type GridInvalidDataException = uno.RuntimeException; + + /** + * Exception is thrown when data or column model isn't set. + * @since OOo 3.3 + */ + type GridInvalidModelException = uno.RuntimeException; + + /** + * An event used by a {@link XGridColumn} to notify changes in the column. + * @since OOo 3.3 + */ + interface GridColumnEvent extends lang.EventObject { + /** Contains the name of the attributes whose value changed. */ + AttributeName: string; + + /** Contains the index of the changed column */ + ColumnIndex: number; + + /** Contains the new value */ + NewValue: any; + + /** Contains the old value */ + OldValue: any; + } + + /** + * used to notify changes in the data represented by an {@link XMutableGridDataModel} . + * + * Effectively, a `GridDataEvent` denotes a continuous two-dimensional cell range within a grid's data model, which is affected by a certain change. + * @see XMutableGridDataModel + * @see XGridDataListener + * @since OOo 3.3 + */ + interface GridDataEvent extends lang.EventObject { + /** + * denotes the first column affected by a change. + * + * If `FirstColumn` is -1, the listener should assume that all rows of a grid's data model are affected. + */ + FirstColumn: number; + + /** + * denotes the first row affected by a change. + * + * If `FirstRow` is -1, the listener should assume that all rows of a grid's data model are affected. + */ + FirstRow: number; + + /** denotes the last column affected by a change */ + LastColumn: number; + + /** denotes the last row affected by a change */ + LastRow: number; + } + + /** + * An event used by a {@link XGridControl} to notify changes in its row selection. + * @see XGridRowSelection + * @see XGridSelectionListener + */ + interface GridSelectionEvent extends lang.EventObject { + /** denotes the indexes of the columns being selected at the time the event was fired. */ + SelectedColumnIndexes: SafeArray; + + /** denotes the indexes of the rows being selected at the time the event was fired. */ + SelectedRowIndexes: SafeArray; + } + + /** + * provides a default implementation of a {@link XSortableGridData} . + * + * This service must be created with a secondary grid data model, which all actual data requests are delegated to. But before providing this data to the + * service's own clients, it is sorted, according to the sort order defined via the `XSortableGridData` interface. + * + * The service implementation is able to compare the default scalar types, plus strings. + * + * For determining the data type of a column which the data should be sorted by, the first non- `VOID` data encountered in this column is taken into + * account. Further read requests to this column will assume that all non- `VOID` data is of the same type. + * + * Consequently, you cannot use this service with data sets containing heterogeneous data in a given column. + * + * All requests made via the {@link XMutableGridDataModel} are delegated to the `XMutableGridDataModel` instance passed in the service constructor. + * + * Note that changing the data might result in the sort order being destroyed. If you want to ensure that the data represented by the model is still + * sorted after your modifications, you should call {@link XSortableGridData.sortByColumn()} , again. + */ + interface SortableGridDataModel extends XSortableMutableGridDataModel { + /** + * creates a new instance of the `SortableGridDataModel` + * + * For string comparison, a default {@link com.sun.star.i18n.Collator} , based on the system's locale, will be used. + * @param DelegatorModel the data model to which read requests are delegated. + * @throws com::sun::star::lang::IllegalArgumentException if the given `DelegatorModel` is `NULL` + */ + create(DelegatorModel: XMutableGridDataModel): void; + + /** + * creates a new instance of the ScortableDefaultGridDataModel, passing a collator to be used for string comparison. + * @param DelegatorModel is the data model to which read requests are delegated + * @param Collator is the collator to be used for string comparison + * @throws com::sun::star::lang::IllegalArgumentException if the given `DelegatorModel` is `NULL` + */ + createWithCollator(DelegatorModel: XMutableGridDataModel, Collator: i18n.XCollator): void; + } + + /** + * A control that displays a set of tabular data. + * + * **The Column Model** + * + * The horizontal structure of the grid is defined by the {@link XGridColumnModel} implemented in {@link DefaultGridColumnModel} The {@link XGridColumn} + * implemented in {@link GridColumn} describes the properties and behavior of a single column. Use the {@link XGridColumnModel.addColumn()} to add a + * column to the column model. + * + * **The Data Model** + * + * All row data are stored in the {@link XGridDataModel} . Use the {@link DefaultGridDataModel} to add XGridDataModel::addRow() or remove + * XGridDataModel::removeRow() rows. + * + * The column and data model must be set at the {@link UnoControlGridModel.ColumnModel} and {@link UnoControlGridModel.GridDataModel} properties. + * + * **{@link Selection}** + * + * If you are interested in knowing when the selection changes implement a {@link XGridSelectionListener} and add the instance with the method {@link + * XGridRowSelection.addSelectionListener()} . You than will be notified for any selection change. + * @since OOo 3.3 + */ + interface UnoControlGrid extends UnoControl, XGridControl, XGridRowSelection { } + + /** + * specifies the standard model of a {@link UnoControlGrid} control. + * @since OOo 3.3 + */ + interface UnoControlGridModel extends UnoControlModel { + /** + * specifies the color to be used when drawing the background of selected cells, while the control has the focus. + * + * If this property has a value of `VOID` , the grid control renderer will use some default color, depending on the control's style settings. + */ + ActiveSelectionBackgroundColor: util.Color; + + /** + * specifies the color to be used when drawing the text of selected cells, while the control has the focus. + * + * If this property has a value of `VOID` , the grid control renderer will use some default color, depending on the control's style settings. + */ + ActiveSelectionTextColor: util.Color; + + /** + * specifies the height of the column header row, if applicable. + * + * The height is specified in application font units - see {@link com.sun.star.util.MeasureUnit} . + * + * The value given here is ignored if {@link ShowColumnHeader} is `FALSE` . + * + * If the property is `VOID` , the grid control shall automatically determine a height which conveniently allows, according to the used font, to display + * one line of text. + */ + ColumnHeaderHeight: number; + + /** + * Specifies the {@link XGridColumnModel} that is providing the column structure. + * + * You can implement your own instance of {@link XGridColumnModel} or use the {@link DefaultGridColumnModel} . + * + * The column model is in the ownership of the grid model: When you set a new column model, or dispose the grid model, then the (old) column model is + * disposed, too. + * + * The default for this property is an empty instance of the {@link DefaultGridColumnModel} . + */ + ColumnModel: XGridColumnModel; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: FontDescriptor; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + FontEmphasisMark: number; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + FontRelief: number; + + /** + * Specifies the {@link XGridDataModel} that is providing the hierarchical data. + * + * You can implement your own instance of {@link XGridDataModel} or use the {@link DefaultGridDataModel} . + * + * The data model is in the ownership of the grid model: When you set a new data model, or dispose the grid model, then the (old) data model is disposed, + * too. + * + * The default for this property is an empty instance of the {@link DefaultGridDataModel} . + */ + GridDataModel: XGridDataModel; + + /** + * specifies the color to be used when drawing lines between cells + * + * If this property has a value of `VOID` , the grid control renderer will use some default color, depending on the control's style settings. + * @see UseGridLines + */ + GridLineColor: util.Color; + + /** + * specifies the color to be used when drawing the background of row or column headers + * + * If this property has a value of `VOID` , the grid control renderer will use some default color, depending on the control's style settings. + */ + HeaderBackgroundColor: util.Color; + + /** + * specifies the color to be used when drawing the text within row or column headers + * + * If this property has a value of `VOID` , the grid control renderer will use some default color, depending on the control's style settings. + */ + HeaderTextColor: util.Color; + + /** specifies the help text of the control. */ + HelpText: string; + + /** specifies the help URL of the control. */ + HelpURL: string; + + /** + * Specifies the vertical scrollbar mode. + * + * The default value is `FALSE` + */ + HScroll: boolean; + + /** + * specifies the color to be used when drawing the background of selected cells, while the control does not have the focus. + * + * If this property has a value of `VOID` , the grid control renderer will use some default color, depending on the control's style settings. + */ + InactiveSelectionBackgroundColor: util.Color; + + /** + * specifies the color to be used when drawing the text of selected cells, while the control does not have the focus. + * + * If this property has a value of `VOID` , the grid control renderer will use some default color, depending on the control's style settings. + */ + InactiveSelectionTextColor: util.Color; + + /** + * specifies the colors to be used as background for data rows. + * + * If this sequence is non-empty, the data rows will be rendered with alternating background colors: Assuming the sequence has `n` elements, each row + * will use the background color as specified by its number's remainder modulo `n` . + * + * If this sequence is empty, all rows will use the same background color as the control as whole. + * + * If this property has a value of `VOID` , rows will be painted in alternating background colors, every second row having a background color derived + * from the control's selection color. + */ + RowBackgroundColors: SafeArray; + + /** + * specifies the width of the row header column, if applicable. + * + * The width is specified in application font units - see {@link com.sun.star.util.MeasureUnit} . + * + * The value given here is ignored if {@link ShowRowHeader} is `FALSE` . + */ + RowHeaderWidth: number; + + /** + * Specifies the height of rows in the grid control. + * + * The height is specified in application font units - see {@link com.sun.star.util.MeasureUnit} . + */ + RowHeight: number; + + /** + * Specifies the selection mode that is enabled for this grid control. + * + * The default value is com::sun::star::view::SelectionType::SINGLE + */ + SelectionModel: view.SelectionType; + + /** + * Specifies whether the grid control should display a title row. + * + * The default value is `TRUE` + */ + ShowColumnHeader: boolean; + + /** + * Specifies whether the grid control should display a special header column. + * + * The default value is `FALSE` + */ + ShowRowHeader: boolean; + + /** Specifies that the control can be reached with the TAB key. */ + Tabstop: boolean; + + /** + * specifies the color to be used when drawing cell texts + * + * If this property has a value of `VOID` , the grid control renderer will use some default color, depending on the control's style settings. + */ + TextColor: util.Color; + + /** + * specifies the color to be used when drawing text lines (underlining and strikethrough) + * + * If this property has a value of `VOID` , the grid control renderer will use some default color, depending on the control's style settings. + */ + TextLineColor: util.Color; + + /** + * controls whether or not to paint horizontal and vertical lines between the grid cells. + * @see GridLineColor + */ + UseGridLines: boolean; + + /** specifies the vertical alignment of the content in the control. */ + VerticalAlign: style.VerticalAlignment; + + /** + * Specifies the horizontal scrollbar mode. + * + * The default value is `FALSE` + */ + VScroll: boolean; + } + + /** + * The {@link XGridColumn} defines the properties and behavior of a column in a grid control. + * @since OOo 3.3 + */ + interface XGridColumn extends lang.XComponent, util.XCloneable { + /** + * Adds a listener for the {@link GridColumnEvent} posted after the grid changes. + * @param Listener the listener to add. + */ + addGridColumnListener(Listener: XGridColumnListener): void; + + /** specifies the current width of the column. */ + ColumnWidth: number; + + /** + * denotes the index of the data column which should be used to fetch this grid column's data + * + * A grid control has a column model and a data model, both containing a possibly different number of columns. The `DataColumnIndex` attribute defines + * the index of the column within the data model, which should be used to retrieve actual data. + * + * Using this, you can do runtime changes to the column model, i.e. insertion and removal of columns, without necessarily needing to adjust the data + * model, too. + * + * If `DataColumnIndex` is negative, the it will be ignored, then the column's index within its column model, as determined by the {@link Index} + * attribute, will be used. + */ + DataColumnIndex: number; + + /** + * specifies the flexibility of the column when it is automatically resized due to the grid control as a whole being resized. + * + * Specify `0` here if you do not want the column to be resized automatically. + * + * If a column has a flexibility greater than 0, it is set in relationship to the flexibility of all other such columns, and the respective widths of the + * columns are changed in the same relationship. + * + * Note that a column's flexibility is ignored if its {@link Resizeable} attribute is `FALSE` . + * + * A column's flexibility cannot be negative, attempts to set a negative value will raise an exception. + */ + Flexibility: number; + + /** + * is the help text associated with the column. + * + * A grid control will usually display a column's help text as tooltip. + */ + HelpText: string; + + /** Specifies the horizontal alignment of the content in the control. */ + HorizontalAlign: style.HorizontalAlignment; + + /** + * specifies an identifier of the column + * + * This identifier will not be evaluated by the grid control, or its model. It is merely for clients to identify particular columns. + */ + Identifier: any; + + /** + * denotes the index of the column within the grid column model it belongs to + * + * If the column is not yet part of a column model, `Index` is -1. + */ + Index: number; + + /** specifies the maximal width the column can have. */ + MaxWidth: number; + + /** specifies the minimal width the column can have. */ + MinWidth: number; + + /** + * Removes a listener previously added with addColumnListener(). + * @param Listener the listener to remove. + */ + removeGridColumnListener(Listener: XGridColumnListener): void; + + /** + * controls whether or not the column's width is fixed or not. + * + * If this is `TRUE` , the user can interactively change the column's width. Also, the column is subject to auto-resizing, if its {@link Flexibility} + * attribute is greater `0` . + */ + Resizeable: boolean; + + /** A title is displayed in the column header row if {@link UnoControlGridModel.ShowColumnHeader()} is set to `TRUE` */ + Title: string; + } + + /** + * An instance of this interface is used by the {@link XGridColumnModel} to get notifications about column model changes. + * @since OOo 3.3 + */ + interface XGridColumnListener extends lang.XEventListener { + /** Invoked after a column was modified. */ + columnChanged(event: GridColumnEvent): void; + } + + /** + * An instance of this interface is used by the {@link UnoControlGrid} to retrieve the column structure that is displayed in the actual control. + * + * If you do not need your own model implementation, you can also use the {@link DefaultGridColumnModel} . + * @since OOo 3.3 + */ + interface XGridColumnModel extends lang.XComponent, container.XContainer, util.XCloneable { + /** + * Adds a column to the model. + * + * You should use the {@link createColumn()} member to create a new column. This gives implementations of the `XGridColumnModel` interface the + * possibility to provide own column implementations which extend the basic {@link GridColumn} type. + * + * As soon as the column has been inserted into the model, the model takes ownership of it. This means when the column is removed, or when the column + * model is disposed, the grid column is disposed as well. + * @param column the column to add to the model. + * @returns the index of new created column. + * @throws com::sun::star::lang::IllegalArgumentException if the given column is not a valid element for the column container, or if it is `NULL` . + */ + addColumn(column: XGridColumn): number; + + /** + * Returns the number of columns. + * @returns the number of columns. + */ + readonly ColumnCount: number; + + /** + * Returns all columns of the model. + * @returns all columns associated with the model in a sequence of {@link XGridColumn} . + */ + readonly Columns: SafeArray; + + /** + * creates a new column for use with the column model. + * + * The newly created column is not yet inserted into the column container, you need to call {@link addColumn()} after you initialized the column object. + */ + createColumn(): XGridColumn; + + /** + * Returns a specific column. + * @param index the position of the requested column. + * @returns the requested column. + */ + getColumn(index: number): XGridColumn; + + /** + * Returns the number of columns. + * @returns the number of columns. + */ + getColumnCount(): number; + + /** + * Returns all columns of the model. + * @returns all columns associated with the model in a sequence of {@link XGridColumn} . + */ + getColumns(): SafeArray; + + /** + * removes a column from the model + * + * The column object will be disposed upon removal. + * @param ColumnIndex denotes the index of the column to remove + * @throws com::sun::star::lang::IndexOutOfBoundsException if `ColumnIndex` does not denote a valid column index. + */ + removeColumn(ColumnIndex: number): void; + + /** + * Fills the model with the given number of default columns + * + * Existing columns will be removed before adding new columns. Listeners at the column model will be notified one {@link + * com.sun.star.container.XContainerListener.elementRemoved()} event for each removed column, and one {@link + * com.sun.star.container.XContainerListener.elementInserted()} event for each insertion. + * @param elements the number of default columns that should be set. + */ + setDefaultColumns(elements: number): void; + } + + /** + * An interface to a control that displays a tabular data. + * @see UnoControlGrid + * @since OOo 3.3 + */ + interface XGridControl { + /** + * returns the column index of the currently active cell + * + * If the grid control's does not contain any cells (which happens if the grid column model does not contain any columns, or if grid data model does not + * contain any rows), then `-1` is returned. + */ + readonly CurrentColumn: number; + + /** + * returns the row index of the currently active cell + * + * If the grid control's does not contain any cells (which happens if the grid column model does not contain any columns, or if grid data model does not + * contain any rows), then `-1` is returned. + */ + readonly CurrentRow: number; + + /** + * retrieves the column which a given point belongs to + * @param X the ordinate of the point, in pixel coordinates. + * @param Y the abscissa of the point, in pixel coordinates. + * @returns the index of the column which the point lies in, or -1 if no column is under the given point. + */ + getColumnAtPoint(X: number, Y: number): number; + + /** + * returns the column index of the currently active cell + * + * If the grid control's does not contain any cells (which happens if the grid column model does not contain any columns, or if grid data model does not + * contain any rows), then `-1` is returned. + */ + getCurrentColumn(): number; + + /** + * returns the row index of the currently active cell + * + * If the grid control's does not contain any cells (which happens if the grid column model does not contain any columns, or if grid data model does not + * contain any rows), then `-1` is returned. + */ + getCurrentRow(): number; + + /** + * retrieves the row which a given point belongs to + * @param X the ordinate of the point, in pixel coordinates. + * @param Y the abscissa of the point, in pixel coordinates. + * @returns the index of the row which the point lies in, or -1 if no row is under the given point. + */ + getRowAtPoint(X: number, Y: number): number; + + /** + * moves the cursor to the given cell + * @param ColumnIndex the column index of the cell to activate. + * @param RowIndex the row index of the cell to activate. + * @throws com::sun::star::lang::IndexOutOfBoundsException if either `ColumnIndex` or `RowIndex` are out of range. + * @throws com::sun::star::util::VetoException if moving the cursor to another cell is vetoed. + */ + goToCell(ColumnIndex: number, RowIndex: number): void; + } + + /** + * An instance of this interface is used by the {@link XGridDataModel} to get notifications about data model changes. + * + * Usually you must not implement this interface yourself, but you must notify it correctly if you implement the {@link XGridDataModel} yourself + * + * . + * @since OOo 3.3 + */ + interface XGridDataListener extends lang.XEventListener { + /** is called when existing data in a grid control's data model has been modified. */ + dataChanged(Event: GridDataEvent): void; + + /** is called when the title of one or more rows changed. */ + rowHeadingChanged(Event: GridDataEvent): void; + + /** is called when one or more rows of data have been inserted into a grid control's data model. */ + rowsInserted(Event: GridDataEvent): void; + + /** is called when one or more rows of data have been removed from a grid control's data model. */ + rowsRemoved(Event: GridDataEvent): void; + } + + /** + * An instance of this interface is used by the {@link UnoControlGrid} to retrieve the content data that is displayed in the actual control. + * + * If you do not need your own model implementation, you can also use the {@link DefaultGridDataModel} . + * @since OOo 3.3 + */ + interface XGridDataModel extends lang.XComponent, util.XCloneable { + /** denotes the number of columns for which the model can provide data */ + ColumnCount: number; + + /** + * retrieves the data for a given cell + * @throws com::sun::star::lang::IndexOutOfBoundsException if the column or row index do not denote a valid cell position. + */ + getCellData(Column: number, RowIndex: number): any; + + /** + * retrieves the tool tip to be displayed when the mouse hovers over a given cell + * + * At the moment, only string tool tips are supported. + * + * If `VOID` is returned here, the cell's content will be displayed as tip, but only if it does not fit into the cell. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the column or row index do not denote a valid cell position. + */ + getCellToolTip(Column: number, RowIndex: number): any; + + /** + * retrieves the data for a complete row + * + * This method is provided for performance and convenience reasons, it delivers the same result as subsequent calls to {@link getCellData()} would. + * @param RowIndex the index of the row whose data should is to be retrieved. + * @throws com::sun::star::lang::IndexOutOfBoundsException of the given row index does not denote a valid row. + */ + getRowData(RowIndex: number): SafeArray; + + /** + * retrieves the heading of a given row + * + * A grid control will usually paint a row's title in the header column of the respective row. + * + * At the moment, only strings are supported as row headings. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the given index does not denote a valid row. + */ + getRowHeading(RowIndex: number): any; + + /** denotes the number of rows for which the model can provide data */ + RowCount: number; + } + + /** + * This interfaces provides access to the selection of row for {@link UnoControlGrid} . + * @since LibreOffice 3.4 + */ + interface XGridRowSelection { + /** + * Adds a listener for the {@link GridSelectionEvent} posted after the grid changes. + * @param listener the listener to add. + */ + addSelectionListener(listener: XGridSelectionListener): void; + + /** Deselects all selected rows. */ + deselectAllRows(): void; + + /** + * removes the selection for a given row + * @param RowIndex denotes the index of the row to deselect + */ + deselectRow(RowIndex: number): void; + + /** + * Returns the indices of all selected rows. + * @returns a sequence of indices. + */ + getSelectedRows(): SafeArray; + + /** + * Returns whether rows are selected. + * @returns `TRUE` if and only if at least one row is selected. + */ + hasSelectedRows(): boolean; + + /** + * Returns whether a specific row is selected. + * @param RowIndex the index of a row. If the value does not denote a valid row index, i.e. is smaller than `0` or greater than the number of rows, this is + * @returns `TRUE` if and only if there is a row with the given index, and it is selected currently. + */ + isRowSelected(RowIndex: number): boolean; + + /** + * Removes a listener previously added with {@link addSelectionListener()} . + * @param listener the listener to remove. + */ + removeSelectionListener(listener: XGridSelectionListener): void; + + /** Selects all rows. */ + selectAllRows(): void; + + /** + * Returns the indices of all selected rows. + * @returns a sequence of indices. + */ + readonly SelectedRows: SafeArray; + + /** + * selects a given row + * @param RowIndex denotes the index of the row to select + * @throws com::sun::star::lang::IndexOutOfBoundsException if `RowIndex` does not denote a valid row index + */ + selectRow(RowIndex: number): void; + } + + /** An instance of this interface is used by the {@link XGridRowSelection} to get notifications about selection changes. */ + interface XGridSelectionListener extends lang.XEventListener { + /** Invoked after a selection was changed. */ + selectionChanged(gridSelectionEvent: GridSelectionEvent): void; + } + + /** allows to modify the data represented by a {@link XGridDataModel} */ + interface XMutableGridDataModel extends XGridDataModel { + /** + * registers listener to be notified of data changes in the model + * @param Listener specifies the listener to register + */ + addGridDataListener(Listener: XGridDataListener): void; + + /** + * appends a row to the model. + * @param Heading denotes the heading of the row. + * @param Data specifies the content of the row. + */ + addRow(Heading: any, Data: LibreOffice.SeqEquiv): void; + + /** + * appends multiple rows of data to the model. + * @param Headings denotes the headings of the to-be-added rows. + * @param Data specifies the data of the rows to be added. + * @throws com::sun::star::lang::IllegalArgumentException if `Titles` and `Data` are of different length. + */ + addRows(Headings: LibreOffice.SeqEquiv, Data: LibreOffice.SeqEquiv): void; + + /** + * inserts a row into the set of data rows + * @param Index denotes the position at which the row is to be inserted + * @param Heading denotes the heading of the row. + * @param Data specifies the content of the row. + * @throws com::sun::star::lang::IndexOutOfBoundsException if `Index` is smaller than `0` or greater than the number of rows in the model. + */ + insertRow(Index: number, Heading: any, Data: LibreOffice.SeqEquiv): void; + + /** + * inserts multiple rows of data into the model. + * @param Index denotes the position at which the rows are to be inserted + * @param Headings denotes the headings of the to-be-added rows. + * @param Data specifies the data of the rows to be added. + * @throws com::sun::star::lang::IllegalArgumentException if `Titles` and `Data` are of different length. + * @throws com::sun::star::lang::IndexOutOfBoundsException if `Index` is smaller than `0` or greater than the number of rows in the model. + */ + insertRows(Index: number, Headings: LibreOffice.SeqEquiv, Data: LibreOffice.SeqEquiv): void; + + /** Removes all rows from the model. */ + removeAllRows(): void; + + /** + * revokes a listener which was previously registered via {@link addGridDataListener()} + * @param Listener specifies the listener to revoke. + */ + removeGridDataListener(Listener: XGridDataListener): void; + + /** + * removes a row of data from the model + * @param RowIndex the index of the row that should be removed. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the given index is invalid + */ + removeRow(RowIndex: number): void; + + /** + * updates the content of the given cell + * @param ColumnIndex the column index of the to-be-updated cell + * @param RowIndex the row index of the to-be-updated cell + * @param Value the new value of the cell. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the row or column index is invalid + */ + updateCellData(ColumnIndex: number, RowIndex: number, Value: any): void; + + /** + * updates the tooltip to be displayed for a given cell + * @see XGridDataModel.getCellToolTip + */ + updateCellToolTip(ColumnIndex: number, RowIndex: number, Value: any): void; + + /** + * updates the content of a given row. + * + * The change in the data model will be notified to registered listeners via {@link XGridDataListener.dataChanged()} . The {@link + * GridDataEvent.FirstColumn} and {@link GridDataEvent.LastColumn} will denote the smallest respectively largest column index from ColumnIndexes. + * @param ColumnIndexes contains the column indexes of the cells, which should be updated + * @param RowIndex contains the index of the row whose data is to be updated + * @param Values specifies the new values of the cells. + * @throws com::sun::star::lang::IndexOutOfBoundsException if one of the row indexes or the column index is invalid + * @throws com::sun::star::lang::IllegalArgumentException if the lengths of the `ColumnIndexes` and `Values` sequences are not equal. + */ + updateRowData(ColumnIndexes: LibreOffice.SeqEquiv, RowIndex: number, Values: LibreOffice.SeqEquiv): void; + + /** + * sets a new title for a given row. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the given index does not denote a valid row. + */ + updateRowHeading(RowIndex: number, Heading: any): void; + + /** + * updates the tooltip for all cells of a given row + * + * Effectively this method is a shortcut for calling {@link updateCellToolTip()} multiple times in a row, for all cells of a given row. + * @see XGridDataModel.getCellToolTip + * @see updateCellToolTip + */ + updateRowToolTip(RowIndex: number, Value: any): void; + } + + /** allows to sort the data represented by a {@link XGridDataModel} */ + interface XSortableGridData { + /** + * returns the current sort order. + * @returns a structure describing the current sort order. com::sun::star::beans::Pair::First denotes the column by which the data is sorted, or -1 if the da + */ + readonly CurrentSortOrder: com.sun.star.beans.Pair; + + /** + * returns the current sort order. + * @returns a structure describing the current sort order. com::sun::star::beans::Pair::First denotes the column by which the data is sorted, or -1 if the da + */ + getCurrentSortOrder(): com.sun.star.beans.Pair; + + /** removes any possibly present sorting of the grid data */ + removeColumnSort(): void; + + /** + * sorts the rows represented by the model by a given column's data. + * @param ColumnIndex the index of the column whose data should be used as sort key + * @param SortAscending is `TRUE` if the data should be sorted ascending, `FALSE` otherwise. + * @throws com::sun::star::lang::IndexOutOfBoundsException if `ColumnIndex` does not denote a valid column. + */ + sortByColumn(ColumnIndex: number, SortAscending: boolean): void; + } + + /** describes a grid control data model whose data can be modified and sorted. */ + interface XSortableMutableGridDataModel extends XMutableGridDataModel, XSortableGridData { } + } + + namespace ImageAlign { + const enum Constants { + BOTTOM = 3, + LEFT = 0, + RIGHT = 2, + TOP = 1, + } + } + + namespace ImageDrawMode { + const enum Constants { + DEACTIVE = 4, + DISABLE = 1, + HIGHLIGHT = 2, + NONE = 0, + SEMITRANSPARENT = 16, + } + } + + namespace ImagePosition { + const enum Constants { + AboveCenter = 7, + AboveLeft = 6, + AboveRight = 8, + BelowCenter = 10, + BelowLeft = 9, + BelowRight = 11, + Centered = 12, + LeftBottom = 2, + LeftCenter = 1, + LeftTop = 0, + RightBottom = 5, + RightCenter = 4, + RightTop = 3, + } + } + + namespace ImageScaleMode { + const enum Constants { + ANISOTROPIC = 2, + ISOTROPIC = 1, + NONE = 0, + } + } + + namespace ImageStatus { + const enum Constants { + IMAGESTATUS_ABORTED = 4, + IMAGESTATUS_ERROR = 1, + IMAGESTATUS_SINGLEFRAMEDONE = 2, + IMAGESTATUS_STATICIMAGEDONE = 3, + } + } + + namespace InvalidateStyle { + const enum Constants { + CHILDREN = 1, + NOCHILDREN = 2, + NOCLIPCHILDREN = 16384, + NOERASE = 4, + NOTRANSPARENT = 32, + TRANSPARENT = 16, + UPDATE = 8, + } + } + + namespace Key { + const enum Constants { + A = 512, + ADD = 1287, + B = 513, + BACKSPACE = 1283, + BRACKETLEFT = 1315, + BRACKETRIGHT = 1316, + C = 514, + CAPSLOCK = 1312, + COMMA = 1292, + CONTEXTMENU = 1305, + COPY = 1298, + CUT = 1297, + D = 515, + DECIMAL = 1309, + DELETE = 1286, + DELETE_TO_BEGIN_OF_LINE = 1536, + DELETE_TO_BEGIN_OF_PARAGRAPH = 1538, + DELETE_TO_END_OF_LINE = 1537, + DELETE_TO_END_OF_PARAGRAPH = 1539, + DELETE_WORD_BACKWARD = 1540, + DELETE_WORD_FORWARD = 1541, + DIVIDE = 1290, + DOWN = 1024, + E = 516, + END = 1029, + EQUAL = 1295, + ESCAPE = 1281, + F = 517, + F1 = 768, + F10 = 777, + F11 = 778, + F12 = 779, + F13 = 780, + F14 = 781, + F15 = 782, + F16 = 783, + F17 = 784, + F18 = 785, + F19 = 786, + F2 = 769, + F20 = 787, + F21 = 788, + F22 = 789, + F23 = 790, + F24 = 791, + F25 = 792, + F26 = 793, + F3 = 770, + F4 = 771, + F5 = 772, + F6 = 773, + F7 = 774, + F8 = 775, + F9 = 776, + FIND = 1302, + FRONT = 1304, + G = 518, + GREATER = 1294, + H = 519, + HANGUL_HANJA = 1308, + HELP = 1306, + HOME = 1028, + I = 520, + INSERT = 1285, + INSERT_LINEBREAK = 1542, + INSERT_PARAGRAPH = 1543, + J = 521, + K = 522, + L = 523, + LEFT = 1026, + LESS = 1293, + M = 524, + MENU = 1307, + MOVE_TO_BEGIN_OF_DOCUMENT = 1560, + MOVE_TO_BEGIN_OF_LINE = 1546, + MOVE_TO_BEGIN_OF_PARAGRAPH = 1548, + MOVE_TO_END_OF_DOCUMENT = 1561, + MOVE_TO_END_OF_LINE = 1547, + MOVE_TO_END_OF_PARAGRAPH = 1549, + MOVE_WORD_BACKWARD = 1544, + MOVE_WORD_FORWARD = 1545, + MULTIPLY = 1289, + N = 525, + NUM0 = 256, + NUM1 = 257, + NUM2 = 258, + NUM3 = 259, + NUM4 = 260, + NUM5 = 261, + NUM6 = 262, + NUM7 = 263, + NUM8 = 264, + NUM9 = 265, + NUMLOCK = 1313, + O = 526, + OPEN = 1296, + P = 527, + PAGEDOWN = 1031, + PAGEUP = 1030, + PASTE = 1299, + POINT = 1291, + PROPERTIES = 1303, + Q = 528, + QUOTELEFT = 1311, + QUOTERIGHT = 1318, + R = 529, + REPEAT = 1301, + RETURN = 1280, + RIGHT = 1027, + S = 530, + SCROLLLOCK = 1314, + SELECT_ALL = 1557, + SELECT_BACKWARD = 1550, + SELECT_FORWARD = 1551, + SELECT_LINE = 1555, + SELECT_PARAGRAPH = 1556, + SELECT_TO_BEGIN_OF_DOCUMENT = 1562, + SELECT_TO_BEGIN_OF_LINE = 1558, + SELECT_TO_BEGIN_OF_PARAGRAPH = 1564, + SELECT_TO_END_OF_DOCUMENT = 1563, + SELECT_TO_END_OF_LINE = 1559, + SELECT_TO_END_OF_PARAGRAPH = 1565, + SELECT_WORD = 1554, + SELECT_WORD_BACKWARD = 1552, + SELECT_WORD_FORWARD = 1553, + SEMICOLON = 1317, + SPACE = 1284, + SUBTRACT = 1288, + T = 531, + TAB = 1282, + TILDE = 1310, + U = 532, + UNDO = 1300, + UP = 1025, + V = 533, + W = 534, + X = 535, + Y = 536, + Z = 537, + } + } + + namespace KeyFunction { + const enum Constants { + CLOSE = 6, + COPY = 9, + CUT = 8, + DELETE = 13, + DONTKNOW = 0, + FIND = 15, + FINDBACKWARD = 16, + FRONT = 18, + NEW = 1, + OPEN = 2, + PASTE = 10, + PRINT = 5, + PROPERTIES = 17, + QUIT = 7, + REDO = 12, + REPEAT = 14, + SAVE = 3, + SAVEAS = 4, + UNDO = 11, + } + } + + namespace KeyGroup { + const enum Constants { + ALPHA = 512, + CURSOR = 1024, + FKEYS = 768, + MISC = 1280, + NUM = 256, + TYPE = 3840, + } + } + + namespace KeyModifier { + const enum Constants { + MOD1 = 2, + MOD2 = 4, + MOD3 = 8, + SHIFT = 1, + } + } + + namespace LineEndFormat { + const enum Constants { + CARRIAGE_RETURN = 0, + CARRIAGE_RETURN_LINE_FEED = 2, + LINE_FEED = 1, + } + } + + namespace MenuItemStyle { + const enum Constants { + AUTOCHECK = 4, + CHECKABLE = 1, + RADIOCHECK = 2, + } + } + + namespace MessageBoxButtons { + const enum Constants { + BUTTONS_ABORT_IGNORE_RETRY = 6, + BUTTONS_OK = 1, + BUTTONS_OK_CANCEL = 2, + BUTTONS_RETRY_CANCEL = 5, + BUTTONS_YES_NO = 3, + BUTTONS_YES_NO_CANCEL = 4, + DEFAULT_BUTTON_CANCEL = 131072, + DEFAULT_BUTTON_IGNORE = 393216, + DEFAULT_BUTTON_NO = 327680, + DEFAULT_BUTTON_OK = 65536, + DEFAULT_BUTTON_RETRY = 196608, + DEFAULT_BUTTON_YES = 262144, + } + } + + namespace MessageBoxResults { + const enum Constants { + CANCEL = 0, + IGNORE = 5, + NO = 3, + OK = 1, + RETRY = 4, + YES = 2, + } + } + + namespace MouseButton { + const enum Constants { + LEFT = 1, + MIDDLE = 4, + RIGHT = 2, + } + } + + namespace MouseWheelBehavior { + const enum Constants { + SCROLL_ALWAYS = 2, + SCROLL_DISABLED = 0, + SCROLL_FOCUS_ONLY = 1, + } + } + + namespace PopupMenuDirection { + const enum Constants { + EXECUTE_DEFAULT = 0, + EXECUTE_DOWN = 1, + EXECUTE_LEFT = 4, + EXECUTE_RIGHT = 8, + EXECUTE_UP = 2, + } + } + + namespace PosSize { + const enum Constants { + HEIGHT = 8, + POS = 3, + POSSIZE = 15, + SIZE = 12, + WIDTH = 4, + X = 1, + Y = 2, + } + } + + namespace ScrollBarOrientation { + const enum Constants { + HORIZONTAL = 0, + VERTICAL = 1, + } + } + + namespace Style { + const enum Constants { + DIALOG = 1, + FRAME = 0, + } + } + + namespace SystemPointer { + const enum Constants { + ARROW = 0, + CHAIN = 70, + CHAIN_NOTALLOWED = 71, + CHART = 65, + COPYDATA = 41, + COPYDATALINK = 44, + COPYFILE = 46, + COPYFILELINK = 49, + COPYFILES = 51, + CROOK = 36, + CROP = 37, + CROSS = 5, + DETECTIVE = 66, + DRAW_ARC = 57, + DRAW_BEZIER = 56, + DRAW_CAPTION = 64, + DRAW_CIRCLECUT = 59, + DRAW_CONNECT = 62, + DRAW_ELLIPSE = 60, + DRAW_FREEHAND = 61, + DRAW_LINE = 53, + DRAW_PIE = 58, + DRAW_POLYGON = 55, + DRAW_RECT = 54, + DRAW_TEXT = 63, + ESIZE = 10, + FILL = 31, + HAND = 27, + HELP = 4, + HSHEAR = 33, + HSIZEBAR = 25, + HSPLIT = 23, + INVISIBLE = 1, + LINKDATA = 42, + LINKFILE = 47, + MAGNIFY = 30, + MIRROR = 35, + MOVE = 6, + MOVEBEZIERWEIGHT = 39, + MOVEDATA = 40, + MOVEDATALINK = 43, + MOVEFILE = 45, + MOVEFILELINK = 48, + MOVEFILES = 50, + MOVEPOINT = 38, + NESIZE = 12, + NOTALLOWED = 52, + NSIZE = 7, + NWSIZE = 11, + PEN = 29, + PIVOT_COL = 67, + PIVOT_FIELD = 69, + PIVOT_ROW = 68, + REFHAND = 28, + ROTATE = 32, + SESIZE = 14, + SSIZE = 8, + SWSIZE = 13, + TEXT = 3, + VSHEAR = 34, + VSIZEBAR = 26, + VSPLIT = 24, + WAIT = 2, + WINDOW_ESIZE = 18, + WINDOW_NESIZE = 20, + WINDOW_NSIZE = 15, + WINDOW_NWSIZE = 19, + WINDOW_SESIZE = 22, + WINDOW_SSIZE = 16, + WINDOW_SWSIZE = 21, + WINDOW_WSIZE = 17, + WSIZE = 9, + } + } + + namespace tab { + /** + * specifies the standard model of a {@link XTabPageModel} . + * @since OOo 3.4 + */ + type UnoControlTabPageModel = XTabPageModel; + + /** + * An interface to a control that displays a tab page. + * @see UnoControlTabPage + * @since OOo 3.4 + */ + type XTabPage = any; + + /** + * An event used by a {@link XTabPageContainer} to notify changes in tab page activation. + * @since OOo 3.4 + */ + interface TabPageActivatedEvent extends lang.EventObject { + /** Contains the ID of the tab page */ + TabPageID: number; + } + + /** + * specifies a TabPage control. + * @since OOo 3.4 + */ + interface UnoControlTabPage extends UnoControlContainer, XTabPage { } + + /** + * specifies a TabPageContainer control. + * @since OOo 3.4 + */ + interface UnoControlTabPageContainer extends UnoControl, XTabPageContainer { } + + /** + * specifies a model for a {@link UnoControlTabPageContainer} control. + * @since OOo 3.4 + */ + interface UnoControlTabPageContainerModel extends UnoControlModel, XTabPageContainerModel { } + + /** + * An interface to a control that displays tab pages. + * @see UnoControlTabPageContainer + * @since OOo 3.4 + */ + interface XTabPageContainer { + /** Specifies the ID of the current active tab page. */ + ActiveTabPageID: number; + + /** + * Adds a listener for the TabPageActivedEvent posted after the tab page was activated. + * @param listener the listener to add. + */ + addTabPageContainerListener(listener: XTabPageContainerListener): void; + + /** + * Returns tab page for the given index. + * @param tabPageIndex - index of the tab page in the IndexContainer. + * @returns tab page which has tabPageIndex. + */ + getTabPage(tabPageIndex: number): XTabPage; + + /** + * Returns tab page for the given ID. + * @param tabPageID - ID of the tab page. + * @returns tab page which has tabPageID. + */ + getTabPageByID(tabPageID: number): XTabPage; + + /** + * Returns the number of tab pages. + * @returns the number of tab pages. + */ + getTabPageCount(): number; + + /** + * Checks whether a tab page is activated. + * @param tabPageIndex the tab page to be checked. + * @returns `TRUE` if tab page is activated, else `FALSE` . + */ + isTabPageActive(tabPageIndex: number): boolean; + + /** + * Removes a listener previously added with addTabPageListener(). + * @param listener the listener to remove. + */ + removeTabPageContainerListener(listener: XTabPageContainerListener): void; + + /** + * Returns the number of tab pages. + * @returns the number of tab pages. + */ + readonly TabPageCount: number; + } + + /** + * An instance of this interface is used by the {@link XTabPageContainer} to get notifications about changes in activation of tab pages. + * @since OOo 3.4 + */ + interface XTabPageContainerListener extends lang.XEventListener { + /** Invoked after a tab page was activated. */ + tabPageActivated(tabPageActivatedEvent: TabPageActivatedEvent): void; + } + + /** + * specifies an interface for a {@link UnoControlTabPageContainerModel} . + * @since OOo 3.4 + */ + interface XTabPageContainerModel extends container.XIndexContainer, container.XContainer { + /** + * creates a TabPageModel which can be inserted into the container. + * @param TabPageID the id of the tab page + */ + createTabPage(TabPageID: number): XTabPageModel; + + /** + * creates a TabPageModel which can be inserted into the container, by loading it from a user interface resource file. + * @param TabPageID the id of the tab page + * @param ResourceURL the URL of the user interface resource to load + */ + loadTabPage(TabPageID: number, ResourceURL: string): XTabPageModel; + } + + /** + * specifies an {@link XTabPageModel} interface. + * @since OOo 3.4 + */ + interface XTabPageModel { + /** determines whether a tab page is enabled or disabled. */ + Enabled: boolean; + + /** specifies a URL that references a graphic that should be displayed in the tab bar. */ + ImageURL: string; + + /** ID for tab page. */ + TabPageID: number; + + /** specifies the text that is displayed in the tab bar of the tab page. */ + Title: string; + + /** specifies a tooltip text that should be displayed in the tab bar. */ + ToolTip: string; + } + } + + namespace TextAlign { + const enum Constants { + CENTER = 1, + LEFT = 0, + RIGHT = 2, + } + } + + namespace tree { + /** If you do not want to implement the {@link XTreeDataModel} yourself, use this service. This implementation uses {@link MutableTreeNode} for its nodes. */ + type MutableTreeDataModel = XMutableTreeDataModel; + + /** Represents an editable tree node as used by the {@link MutableTreeDataModel} */ + type MutableTreeNode = XMutableTreeNode; + + /** + * A control that displays a set of hierarchical data as an outline. + * + * **The Data Model** + * + * A specific node in a tree is identified by a {@link XTreeNode} . A leaf node is a node without any children and that returns `FALSE` when calling + * {@link XTreeNode.hasChildrenOnDemand()} . An expanded node is a non-leaf node that will displays its children when all its ancestors are expanded. A + * collapsed node is one which hides them. A node is visible when all parent nodes are expanded and the node itself is in the display area. + * + * The nodes are retrieved from a {@link XTreeDataModel} . You can implement it yourself or use the {@link MutableTreeDataModel} which uses {@link + * XMutableTreeNode} and {@link XMutableTreeDataModel} for a simple and mutable data model. + * + * The data model must be set at the TreeControlModel::TreeDataModel property. + * + * **{@link Selection}** + * + * If you are interested in knowing when the selection changes implement a {@link com.sun.star.view.XSelectionChangeListener} and add the instance with + * the method {@link com.sun.star.view.XSelectionSupplier.addSelectionChangeListener()} . You than will be notified for any selection change. + * + * If you are interested in detecting either double-click events or when a user clicks on a node, regardless of whether or not it was selected, you can + * get the {@link com.sun.star.awt.XWindow} and add yourself as a {@link com.sun.star.awt.XMouseClickHandler} . You can use the method {@link + * XTreeControl.getNodeForLocation()} to retrieve the node that was under the mouse at the time the event was fired. + * + * **Adding child nodes on demand** + * + * If you want to add child nodes to your tree on demand you can do the following. Make sure the parent node returns `TRUE` for {@link + * XTreeNode.hasChildrenOnDemand()} either by implementing {@link XTreeNode} yourself or if you use the {@link MutableTreeDataModel} , use {@link + * XMutableTreeNode.setHasChildrenOnDemand()} .Implement a {@link XTreeExpansionListener} and add the instance with the method {@link + * XTreeControl.addTreeExpansionListener()} . Now you get called when the node will become expanded or collapsed. So on {@link + * XTreeExpansionListener.treeExpanding()} you can check the {@link TreeExpansionEvent} if the parent node with children on demand is going to be + * expanded and in that case add the missing child nodes. You can also veto the expansion or collapsing of a parent node by using the {@link + * ExpandVetoException} . + */ + type TreeControl = XTreeControl; + + /** + * Exception used to stop an expand/collapse from happening. + * @see XTreeExpansionListener + * @see XTreeControl + */ + interface ExpandVetoException extends util.VetoException { + /** The event that the exception was created for. */ + Event: TreeExpansionEvent; + } + + /** specifies the standard model of a {@link TreeControl} . */ + interface TreeControlModel extends UnoControlModel { + /** + * Specifies the {@link XTreeDataModel} that is providing the hierarchical data. + * + * You can implement your own instance of {@link XTreeDataModel} or use the {@link MutableTreeDataModel} . + */ + DataModel: XTreeDataModel; + + /** + * Specifies whether the nodes of the tree are editable. + * + * The default value is `FALSE` + * @see XTreeControl.startEditingAtNode() + * @see XTreeEditListener + */ + Editable: boolean; + + /** + * Specifies what happens when editing is interrupted by selecting another node in the tree, a change in the tree's data, or by some other means. + * + * Setting this property to `TRUE` causes the changes to be automatically saved when editing is interrupted. `FALSE` means that editing is canceled and + * changes are lost + * + * The default value is `FALSE` + */ + InvokesStopNodeEditing: boolean; + + /** + * Specifies if the root node of the tree is displayed. + * + * If **RootDisplayed** is set to `FALSE` , the root node of a model is no longer a valid node for the {@link XTreeControl} and can't be used with any + * method of {@link XTreeControl} . + * + * The default value is `TRUE` + */ + RootDisplayed: boolean; + + /** + * Specifies the height of each row, in pixels. + * + * If the specified value is less than or equal to zero, the row height is the maximum height of all rows. + * + * The default value is 0 + */ + RowHeight: number; + + /** + * Specifies the selection mode that is enabled for this tree. + * + * The default value is com::sun::star::view::SelectionType::NONE + */ + SelectionType: view.SelectionType; + + /** + * Specifies whether the node handles should be displayed. + * + * The handles are doted lines that visualize the tree like hierarchy + * + * The default value is `TRUE` + */ + ShowsHandles: boolean; + + /** + * Specifies whether the node handles should also be displayed at root level. + * + * The default value is `TRUE` + */ + ShowsRootHandles: boolean; + } + + /** + * An event used by a {@link XTreeDataModel} to notify changes in the data model to the {@link XTreeControl} . You usually need to fill this event only + * if you implement the {@link XTreeDataModel} yourself. + * @see XTreeDataModel + * @see XTreeControl + * @see XTreeDataModelListener + */ + interface TreeDataModelEvent extends lang.EventObject { + /** + * contains the changed, added or removed nodes. + * + * All nodes must have {@link ParentNode} as parent. + */ + Nodes: SafeArray; + + /** + * holds the parent node for changed, added or removed nodes. + * + * If this is null, {@link Nodes} must contain only the root node + */ + ParentNode: XTreeNode; + } + + /** + * This event tells you what node is currently expanding or collapsing. + * @see XTreeExpansionListener + * @see XTreeControl + */ + interface TreeExpansionEvent extends lang.EventObject { + Node: XTreeNode; + } + + /** + * This is the editable version of the {@link XTreeDataModel} . + * + * Note that only {@link XTreeNode} created from the same instance with {@link createNode()} are valid nodes for this instance. + */ + interface XMutableTreeDataModel extends XTreeDataModel { + /** + * creates a new tree node with the given value and given settings. + * @param DisplayValue should be convertible to a string and is used by the {@link XTreeControl} as a textual representation of the created node. + * @param ChildrenOnDemand if `TRUE` is used as a parameter, the created node will be treated as a non-leaf node by the {@link XTreeControl} , even when it + * @returns a new {@link XMutableTreeNode} that can be used for this model. + * @see XTreeNode.getDisplayValue() + * @see XTreeNode.hasChildrenOnDemand() + */ + createNode(DisplayValue: any, ChildrenOnDemand: boolean): XMutableTreeNode; + + /** + * changes the root node of this model to **RootNode** . + * @param RootNode the {@link XMutableTreeNode} that becomes the new root node of this model. + * @throws com::sun::star::lang::IllegalArgumentException if **RootNode** is not a valid node of this {@link XTreeDataModel} . + */ + setRoot(RootNode: XMutableTreeNode): void; + } + + /** Represents a mutable tree node as used by the {@link MutableTreeDataModel} */ + interface XMutableTreeNode extends XTreeNode { + /** + * appends **ChildNode** to this instance. + * @throws com::sun::star::lang::IllegalArgumentException if **ChildNode** is not a valid node of the corresponding {@link XTreeDataModel} . + */ + appendChild(ChildNode: XMutableTreeNode): void; + + /** + * Stores an implementation dependent value. + * + * You can use this attribute to store data for this node that is independent of the display value + */ + DataValue: any; + + /** + * inserts **ChildNode** to this instance at the given index. + * @param Index the index where the node will be inserted to this instance. + * @param ChildNode the node to insert. + * @throws com::sun::star::lang::IllegalArgumentException if **ChildNode** is not a valid node of the corresponding {@link XTreeDataModel} . + * @throws com::sun::star::lang::IndexOutOfBoundsException if **Index** is less than 0 or greater then {@link XTreeNode.getChildCount()} . + */ + insertChildByIndex(Index: number, ChildNode: XMutableTreeNode): void; + + /** + * removes the node from this instance at the specified index. + * @param Index the index of the node to be removed from this instance. + * @throws com::sun::star::lang::IndexOutOfBoundsException if **Index** is less than 0 or greater then {@link XTreeNode.getChildCount()} . + */ + removeChildByIndex(Index: number): void; + + /** + * The URL for a graphic that is rendered to visualize collapsed non leaf nodes. + * + * If **URL** is empty, {@link XTreeControl.DefaultCollapsedGraphicURL} is used. + */ + setCollapsedGraphicURL(URL: string): void; + + /** sets the display value of this node */ + setDisplayValue(Value: any): void; + + /** + * The URL for a graphic that is rendered to visualize expanded non leaf nodes. + * + * If **URL** is empty, {@link XTreeControl.DefaultExpandedGraphicURL} is used. + */ + setExpandedGraphicURL(URL: string): void; + + /** + * Changes if the children of this node are created on demand. + * @see XTreeNode.hasChildrenOnDemand() + */ + setHasChildrenOnDemand(ChildrenOnDemand: boolean): void; + + /** + * The URL for a graphic that is rendered before the text part of this node. + * + * If this URL is empty, no graphic is rendered. + */ + setNodeGraphicURL(URL: string): void; + } + + /** + * An interface to a control that displays a set of hierarchical data as an outline. + * @see TreeControl + */ + interface XTreeControl extends view.XMultiSelectionSupplier { + /** + * Adds a {@link XTreeEditListener} . + * @param Listener a {@link XTreeEditListener} that will be notified before and after a tree node is edited. + */ + addTreeEditListener(Listener: XTreeEditListener): void; + + /** + * Adds a listener for TreeExpansion events. + * @param Listener a {@link XTreeExpansionListener} that will be notified when a tree node is expanded or collapsed. + */ + addTreeExpansionListener(Listener: XTreeExpansionListener): void; + + /** + * Cancels the current editing session. + * + * Has no effect if the tree isn't being edited. + */ + cancelEditing(): void; + + /** + * Ensures that **Node** is collapsed. + * @param Node the {@link XTreeNode} identifying a node + * @throws com::sun::star::lang::IllegalArgumentException if **Node** is not a valid node of the corresponding {@link XTreeDataModel} . + * @throws ExpandVetoException if collapsing **Node** failed because at least one of the registered {@link XTreeExpansionListener} raised a {@link ExpandVet + */ + collapseNode(Node: XTreeNode): void; + + /** + * If the given URL points to a loadable graphic, the graphic is rendered before collapsed non leaf nodes. + * + * This can be overridden for individual nodes by {@link XTreeNode.getCollapsedGraphicURL()} + */ + DefaultCollapsedGraphicURL: string; + + /** + * If the given URL points to a loadable graphic, the graphic is rendered before expanded non leaf nodes. + * + * This can be overridden for individual nodes by {@link XTreeNode.getExpandedGraphicURL()} + */ + DefaultExpandedGraphicURL: string; + + /** + * Ensures that **Node** is expanded and visible. + * + * If **Node** is a leaf node, this will have no effect. + * @param Node the {@link XTreeNode} identifying a node. + * @throws com::sun::star::lang::IllegalArgumentException if **Node** is not a valid node of the corresponding {@link XTreeDataModel} . + * @throws ExpandVetoException if expanding **Node** failed because at least one of the registered {@link XTreeExpansionListener} raised a {@link ExpandVeto + */ + expandNode(Node: XTreeNode): void; + + /** + * Returns the node that is closest to x,y. + * + * If no nodes are currently viewable, or there is no model, returns null, otherwise it always returns a valid node. To test if the node is exactly at x, + * y, use {@link getNodeForLocation()} . + * @param x an integer giving the number of pixels horizontally from the left edge of the controls display area + * @param y an integer giving the number of pixels vertically from the top edge of the controls display area + * @returns the {@link XTreeNode} for the node closest to that location, null if nothing is viewable or there is no model + */ + getClosestNodeForLocation(x: number, y: number): XTreeNode; + + /** + * Returns the node at the specified location. + * @param x an integer giving the number of pixels horizontally from the left edge of the controls display area + * @param y an integer giving the number of pixels vertically from the top edge of the controls display area + * @returns the {@link XTreeNode} for the node at that location, or 0 if there is no node at the given position + */ + getNodeForLocation(x: number, y: number): XTreeNode; + + /** + * returns the rectangle occupied by the visual representation of the given node + * @param Node the node whose geometry should be obtained + * @throws com::sun::star::lang::IllegalArgumentException if the given node is `NULL` , or does not belong to the tree's data model + */ + getNodeRect(Node: XTreeNode): Rectangle; + + /** + * Returns `TRUE` if one of tree's nodes is being currently edited. + * + * The node that is being edited can be obtained using {@link com.sun.star.view.XSelectionSupplier.getSelection()} . + * @returns `TRUE` if the user is currently editing a node + */ + isEditing(): boolean; + + /** + * Returns `TRUE` if **Node** is currently collapsed. + * @param Node the {@link XTreeNode} specifying the node to check + * @returns `TRUE` if **Node** or at least one of its parent nodes are collapsed, `FALSE` if **Node** and all of its parent nodes are expanded + * @throws com::sun::star::lang::IllegalArgumentException if **Node** is not a valid node of the corresponding {@link XTreeDataModel} . + */ + isNodeCollapsed(Node: XTreeNode): boolean; + + /** + * Returns `TRUE` if **Node** is currently expanded. + * @param Node the {@link XTreeNode} specifying the node to check. + * @returns `FALSE` if **Node** or at least one of its parent nodes are collapsed, `TRUE` if **Node** and all of its parent nodes are expanded. + * @throws com::sun::star::lang::IllegalArgumentException if **Node** is not a valid node of the corresponding {@link XTreeDataModel} . + */ + isNodeExpanded(Node: XTreeNode): boolean; + + /** + * Returns `TRUE` if **Node** is currently visible. + * + * Visible means it is either the root or all of its parents are expanded. + * @returns `TRUE` if **Node** is visible, otherwise `FALSE` + * @throws com::sun::star::lang::IllegalArgumentException if **Node** is not a valid node of the corresponding {@link XTreeDataModel} . + */ + isNodeVisible(Node: XTreeNode): boolean; + + /** + * Ensures that **Node** is currently visible. + * + * This includes expanding all parent nodes and scroll the control so this node is visible in the controls display area. + * @param Node the {@link XTreeNode} specifying the node to make visible. + * @throws com::sun::star::lang::IllegalArgumentException if **Node** is not a valid node of the corresponding {@link XTreeDataModel} . + * @throws ExpandVetoException if **Node** can't be made visible since at least one of the parent nodes are collapsed and expanding failed because at least + */ + makeNodeVisible(Node: XTreeNode): void; + + /** + * Removes a {@link XTreeEditListener} . + * @param Listener the {@link XTreeEditListener} to remove + */ + removeTreeEditListener(Listener: XTreeEditListener): void; + + /** + * Removes a listener for TreeExpansion events. + * @param Listener the {@link XTreeExpansionListener} to remove. + */ + removeTreeExpansionListener(Listener: XTreeExpansionListener): void; + + /** + * Selects **Node** and initiates editing. + * + * If {@link TreeControlModel.Editable} is `FALSE` or if there are no registered {@link XTreeEditListener} , this call has no effect. + * + * Calling this method also ensures that **Node** will become visible. + * @param Node the {@link XTreeNode} identifying a node. + * @throws com::sun::star::lang::IllegalArgumentException if **Node** is not a valid node of the corresponding {@link XTreeDataModel} . + */ + startEditingAtNode(Node: XTreeNode): void; + + /** + * Ends the current editing session. + * + * All registered {@link XTreeEditListener} are notified if an editing session was in progress + * + * Has no effect if the tree isn't being edited. + * @returns `TRUE` if editing was in progress and is now stopped, `FALSE` if editing was not in progress + */ + stopEditing(): boolean; + } + + /** + * An instance of this interface is used by the {@link TreeControl} to retrieve the hierarchical outline data that is displayed in the actual control. + * + * If you implement your own {@link XTreeDataModel} you need to notify registered {@link XTreeDataModelListener} if your model changes after the control + * is created. If this is not done correctly the {@link TreeControl} will not update the data properly. + * + * If you do not need your own model implementation, you can also use the {@link MutableTreeDataModel} . + */ + interface XTreeDataModel extends lang.XComponent { + /** + * Adds a listener for the {@link TreeDataModelEvent} posted after the tree changes. + * @param Listener the listener to add. + */ + addTreeDataModelListener(Listener: XTreeDataModelListener): void; + + /** + * Returns the root of the tree. + * + * Returns null only if the tree has no nodes. + * @returns the root of the tree + */ + getRoot(): XTreeNode; + + /** + * Removes a listener previously added with {@link addTreeDataModelListener()} . + * @param Listener the listener to remove. + */ + removeTreeDataModelListener(Listener: XTreeDataModelListener): void; + + /** + * Returns the root of the tree. + * + * Returns null only if the tree has no nodes. + * @returns the root of the tree + */ + readonly Root: XTreeNode; + } + + /** + * An instance of this interface is used by the {@link TreeControl} to get notifications about data model changes. + * + * Usually you must not implement this interface yourself as it is already handled by the {@link TreeControl} , but you must notify it correctly if you + * implement the {@link XTreeDataModel} yourself + * + * . + */ + interface XTreeDataModelListener extends lang.XEventListener { + /** + * Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children + * arrays, but other attributes have changed and may affect presentation. + * + * Example: the name of a file has changed, but it is in the same location in the file system. + * + * To indicate the root has changed, {@link TreeDataModelEvent.Nodes} will contain the root node and {@link TreeDataModelEvent.ParentNode} will be empty. + */ + treeNodesChanged(Event: TreeDataModelEvent): void; + + /** + * Invoked after nodes have been inserted into the tree. + * + * Use {@link TreeDataModelEvent.ParentNode} to get the parent of the new node(s). {@link TreeDataModelEvent.Nodes} contains the new node(s). + */ + treeNodesInserted(Event: TreeDataModelEvent): void; + + /** + * Invoked after nodes have been removed from the tree. + * + * Note that if a subtree is removed from the tree, this method may only be invoked once for the root of the removed subtree, not once for each + * individual set of siblings removed. + * + * Use {@link TreeDataModelEvent.ParentNode} to get the former parent of the deleted node(s). {@link TreeDataModelEvent.Nodes} contains the removed + * node(s). + */ + treeNodesRemoved(Event: TreeDataModelEvent): void; + + /** + * Invoked after the tree has drastically changed structure from a given node down. + * + * Use {@link TreeDataModelEvent.ParentNode} to get the node which structure has changed. {@link TreeDataModelEvent.Nodes} is empty. + */ + treeStructureChanged(Event: TreeDataModelEvent): void; + } + + /** + * You can implement this interface and register with {@link XTreeControl.addTreeEditListener()} to get notifications when editing of a node starts and + * ends. + * + * You have to set the {@link TreeControlModel.Editable} property to `TRUE` before a tree supports editing. + */ + interface XTreeEditListener extends lang.XEventListener { + /** + * This method is called from the {@link TreeControl} implementation when editing of **Node** is finished and was not canceled. + * + * Implementations that register a {@link XTreeEditListener} must update the display value at the Node. + * @param Node the {@link XTreeNode} for that an edit request was fired by calling {@link XTreeControl.startEditingAtNode()} + * @param NewText the text that was entered by the user. + */ + nodeEdited(Node: XTreeNode, NewText: string): void; + + /** + * This method is called from the {@link TreeControl} implementation when editing of **Node** is requested by calling {@link + * XTreeControl.startEditingAtNode()} . + * @param Node the {@link XTreeNode} for that an edit request was fired by calling {@link XTreeControl.startEditingAtNode()} + * @throws VetoException if thrown the editing will not start. + */ + nodeEditing(Node: XTreeNode): void; + } + + /** + * An instance of this interface can get notifications from a {@link TreeControl} when nodes are expanded or collapsed. + * @see XTreeControl.addTreeExpansionListener + * @see XTreeControl.removeTreeExpansionListener + */ + interface XTreeExpansionListener extends lang.XEventListener { + /** + * Invoked when a node with children on demand is about to be expanded. + * + * This event is invoked before the {@link treeExpanding()} event. + */ + requestChildNodes(Event: TreeExpansionEvent): void; + + /** Called whenever a node in the tree has been successfully collapsed. */ + treeCollapsed(Event: TreeExpansionEvent): void; + + /** + * Invoked whenever a node in the tree is about to be collapsed. + * @throws ExpandVetoException to notify the calling {@link XTreeControl} that collapsing {@link TreeExpansionEvent.Node} should fail. + */ + treeCollapsing(Event: TreeExpansionEvent): void; + + /** Called whenever a node in the tree has been successfully expanded. */ + treeExpanded(Event: TreeExpansionEvent): void; + + /** + * Invoked whenever a node in the tree is about to be expanded. + * @throws ExpandVetoException to notify the calling {@link XTreeControl} that expanding {@link TreeExpansionEvent.Node} should fail. + */ + treeExpanding(Event: TreeExpansionEvent): void; + } + + /** + * An instance implementing this interface represents the model data for an entry in a {@link XTreeDataModel} . + * + * The {@link TreeControl} uses this interface to retrieve the model information needed to display a hierarchical outline + * + * Each {@link XTreeNode} in a {@link XTreeDataModel} must be unique. + */ + interface XTreeNode { + /** Returns the number of child nodes. */ + readonly ChildCount: number; + + /** + * The URL for a graphic that is rendered to visualize collapsed non leaf nodes. + * + * If **URL** is empty, {@link XTreeControl.DefaultCollapsedGraphicURL} is used. + */ + readonly CollapsedGraphicURL: string; + + /** If not empty, the textual representation of this any is used as the text part of this node. */ + readonly DisplayValue: any; + + /** + * The URL for a graphic that is rendered to visualize expanded non leaf nodes. + * + * If **URL** is empty, {@link XTreeControl.DefaultExpandedGraphicURL} is used. + */ + readonly ExpandedGraphicURL: string; + + /** + * Returns the child tree node at **Index** . + * @throws com::sun::star::lang::IndexOutOfBoundsException if **Index** is less than 0 or equal or greater then {@link getChildCount()} . + */ + getChildAt(Index: number): XTreeNode; + + /** Returns the number of child nodes. */ + getChildCount(): number; + + /** + * The URL for a graphic that is rendered to visualize collapsed non leaf nodes. + * + * If **URL** is empty, {@link XTreeControl.DefaultCollapsedGraphicURL} is used. + */ + getCollapsedGraphicURL(): string; + + /** If not empty, the textual representation of this any is used as the text part of this node. */ + getDisplayValue(): any; + + /** + * The URL for a graphic that is rendered to visualize expanded non leaf nodes. + * + * If **URL** is empty, {@link XTreeControl.DefaultExpandedGraphicURL} is used. + */ + getExpandedGraphicURL(): string; + + /** + * Returns the index of **Node** in this instances children. + * @returns The child index of **Node** , or -1 if **Node** is no child of this instance. + */ + getIndex(Node: XTreeNode): number; + + /** + * The URL for a graphic that is rendered before the text part of this node. + * + * If this URL is empty, no graphic is rendered. + */ + getNodeGraphicURL(): string; + + /** Returns the parent node of this node. */ + getParent(): XTreeNode; + + /** + * Returns `TRUE` if the children of this node are created on demand. + * + * A {@link TreeControl} will handle a node that returns `TRUE` always like a node that has child nodes, even if {@link getChildCount()} returns 0. + * @see TreeExpansionListener; + */ + hasChildrenOnDemand(): boolean; + + /** + * The URL for a graphic that is rendered before the text part of this node. + * + * If this URL is empty, no graphic is rendered. + */ + readonly NodeGraphicURL: string; + + /** Returns the parent node of this node. */ + readonly Parent: XTreeNode; + } + } + + namespace VclWindowPeerAttribute { + const enum Constants { + AUTOHSCROLL = 1073741824, + AUTOVSCROLL = -2147483648, + CENTER = 2048, + CLIPCHILDREN = 524288, + DEF_CANCEL = 268435456, + DEF_NO = -2147483648, + DEF_OK = 134217728, + DEF_RETRY = 536870912, + DEF_YES = 1073741824, + DEFBUTTON = 65536, + DROPDOWN = 32768, + GROUP = 2097152, + HSCROLL = 256, + LEFT = 1024, + NOBORDER = 1048576, + NOLABEL = 536870912, + OK = 4194304, + OK_CANCEL = 8388608, + READONLY = 262144, + RETRY_CANCEL = 67108864, + RIGHT = 4096, + SORT = 16384, + SPIN = 8192, + VSCROLL = 512, + YES_NO = 16777216, + YES_NO_CANCEL = 33554432, + } + } + + namespace VisualEffect { + const enum Constants { + FLAT = 2, + LOOK3D = 1, + NONE = 0, + } + } + + namespace WindowAttribute { + const enum Constants { + BORDER = 16, + CLOSEABLE = 128, + FULLSIZE = 2, + MINSIZE = 8, + MOVEABLE = 64, + NODECORATION = 512, + OPTIMUMSIZE = 4, + SHOW = 1, + SIZEABLE = 32, + SYSTEMDEPENDENT = 256, + } + } + } + + namespace beans { + /** + * This exception is thrown to indicate the use of a type which is not appropriate. + * + * This problem can occur, if you use an `any` . + * @see PropertyContainer + */ + type IllegalTypeException = uno.Exception; + + /** + * A legacy (single-instance) service variant of {@link theIntrospection} singleton. + * @deprecated DeprecatedUse theIntrospection instead. + */ + type Introspection = XIntrospection; + + /** + * This exception is thrown when an exception happens during introspection. + * @deprecated Deprecated This exception isn't specified and used anywhere + */ + type IntrospectionException = uno.Exception; + + /** This exception is thrown to indicate that removing a property from an {@link XPropertyContainer} is not allowed. */ + type NotRemoveableException = uno.Exception; + + /** + * This exception is thrown to indicate that a property with this name already exists in the object. + * @see PropertyContainer + */ + type PropertyExistException = uno.Exception; + + /** + * specifies a sequence of {@link PropertyValue} instances. + * + * Such sequences are especially useful for remote interfaces. + */ + type PropertyValues = LibreOffice.SeqEquiv; + + /** + * This exception is thrown when a proposed change to a property represents an unacceptable value. + * @see XPropertySet + */ + type PropertyVetoException = uno.Exception; + + /** + * provides functionality to get information about an object's properties and methods. + * + * **Important note:** An object can only be inspected completely if it supports the {@link com.sun.star.lang.XTypeProvider} interface. + * + * For details, see method {@link XIntrospection.inspect()} . + * @since LibreOffice 4.3 + */ + type theIntrospection = XIntrospection; + + /** + * This exception is thrown to indicate that the property name is unknown to the implementation. + * @see XPropertySet + */ + type UnknownPropertyException = uno.Exception; + + /** + * This enumeration lists the states that a property value can have. + * + * The state consists of two aspects: + * + * 1. whether a value is available or void, 2. whether the value is stored in the property set itself or is a default, or ambiguous. + * @see XPropertyState + * @see Property + */ + const enum PropertyState { + /** + * The value of the property is only a recommendation because there are multiple values for this property (e.g., from a multi selection). + * + * The {@link PropertyAttribute} field in the struct {@link Property} must contain the {@link PropertyAttribute.MAYBEAMBIGUOUS} flag. The property value + * must be available and of the specified type. If the Attribute field in the struct {@link Property} contains {@link PropertyAttribute.MAYBEVOID} , then + * the value may be void. + */ + AMBIGUOUS_VALUE = 2, + /** + * The value of the property is available from a master (e.g., template).

The PropertyAttribute field in the struct + * + * Property must contain the + * + * PropertyAttribute::MAYBEDEFAULT flag. The property + * + * value must be available and of the specified type. If the + * + * PropertyAttribute field in the struct Property + * + * contains PropertyAttribute::MAYBEVOID, then the + * + * value may be void.

+ */ + DEFAULT_VALUE = 1, + /** + * The value of the property is stored in the {@link PropertySet} itself.

The property value must be available and of the specified type. + * + * If the PropertyAttribute field in the struct + * + * Property contains PropertyAttribute::MAYBEVOID, + * + * then the value may be void.

+ */ + DIRECT_VALUE = 0, + } + + /** + * A value of a given type that can be ambiguous. + * + * This structure is used as the type of interface attributes corresponding to instances of {@link com.sun.star.beans.Property} that have the {@link + * com.sun.star.beans.PropertyAttribute.MAYBEAMBIGUOUS} . + */ + interface Ambiguous< T > { + /** Marks this structure instance as ambiguous. */ + IsAmbiguous: boolean; + + /** + * The underlying value of this structure instance. + * + * Even if this structure instance is ambiguous, this member should contain a useful value. If there is no useful value for an ambiguous structure + * instance, com::sun::star::beans::Optional can be used as the type of this member. + */ + Value: T; + } + + /** + * A value of a given type that can be defaulted. + * + * This structure is used as the type of interface attributes corresponding to instances of {@link com.sun.star.beans.Property} that have the {@link + * com.sun.star.beans.PropertyAttribute.MAYBEDEFAULT} . + */ + interface Defaulted< T > { + /** Marks this structure instance as defaulted. */ + IsDefaulted: boolean; + + /** + * The underlying value of this structure instance. + * + * Even if this structure instance is defaulted, this member should contain a useful value. If there is no useful value for a defaulted structure + * instance, com::sun::star::beans::Optional can be used as the type of this member. + */ + Value: T; + } + + /** + * specifies information being retrieved about a single property. + * + * This type is used for the elements in the sequence returned by com::sun::star::beans::XTolerantMultiPropertySet::GetDirectPropertyTolerantResult. + * @see com.sun.star.beans.XTolerantMultiPropertySet + */ + interface GetDirectPropertyTolerantResult extends GetPropertyTolerantResult { + /** specifies the name of the property. */ + Name: string; + } + + /** + * specifies information being retrieved about a single property. + * @see com.sun.star.beans.XTolerantMultiPropertySet + */ + interface GetPropertyTolerantResult { + /** + * specifies a success or error code for the retrieval operation. + * @see com.sun.star.beans.TolerantPropertySetResultType + */ + Result: number; + + /** + * contains the state of the property. + * + * The value is undefined if **Result** is not {@link com.sun.star.beans.TolerantPropertySetResultType.SUCCESS} . + */ + State: PropertyState; + + /** + * contains the value of the property. + * + * The value is undefined if **Result** is not {@link com.sun.star.beans.TolerantPropertySetResultType.SUCCESS} . + */ + Value: any; + } + + /** specifies a pair assembled from a name and a value. */ + interface NamedValue { + /** specifies the name part of the pair */ + Name: string; + + /** specifies the value part of the pair. */ + Value: any; + } + + /** + * An optional value of a given type. + * + * This structure is used as the type of interface attributes corresponding to instances of {@link com.sun.star.beans.Property} that have the {@link + * com.sun.star.beans.PropertyAttribute.MAYBEVOID} . It might also be useful in other situations, for example as the return type of an interface method. + */ + interface Optional< T > { + /** Marks this structure instance as having an actual value. */ + IsPresent: boolean; + + /** + * The actual value of this structure instance. + * + * If no actual value is present, a producer of such a structure instance should leave this member defaulted, and a consumer of such a structure instance + * should ignore the specific value stored in this member. + */ + Value: T; + } + + /** + * A tuple, or pair. + * + * This structure allows for conveniently packing together two values of any type, and could be useful as the result type of methods. + * @since OOo 3.0 + */ + interface Pair< T, U > { + First: T; + Second: U; + } + + /** + * This structure describes a property. + * + * There are three types of properties: bound propertiesconstrained propertiesfree properties + */ + interface Property { + /** This field may contain zero or more constants of the {@link PropertyAttribute} constants group. */ + Attributes: number; + + /** + * contains an implementation-specific handle for the property. + * + * It may be -1 if the implementation has no handle. You can use this handle to get values from the {@link XFastPropertySet} . + */ + Handle: number; + + /** + * specifies the name of the property. + * + * The name is unique within an {@link XPropertySet} . Upper and lower case are distinguished. + */ + Name: string; + + /** + * contains an object that identifies the declared type for the property. + * + * If the property has multiple types or the type is not known, **but not an any** , then void must be returned. + */ + Type: type; + } + + /** + * Implementation of this service can keep any properties and is useful when an {@link XPropertySet} is to be used, for example, as parameters for a + * method call. + * + * Scripting engines might not be able to use such objects as normal property sets, giving direct access to the properties. In this case, use the methods + * like {@link XPropertySet.getPropertyValue()} . + */ + interface PropertyBag extends XPropertyBag { + createDefault(): void; + createWithTypes(AllowedTypes: LibreOffice.SeqEquiv, AllowEmptyPropertyName: boolean, AutomaticAddition: boolean): void; + } + + /** + * gets delivered whenever a "bound" or "constrained" property is changed. + * + * A {@link PropertyChangeEvent} object is sent as an argument to the methods of {@link XPropertyChangeListener} and {@link XVetoableChangeListener} . + * + * Normally such events contain the name and the old and new value of the changed property. + * + * Void values may be provided for the old and new values if their true values are not known. + */ + interface PropertyChangeEvent extends lang.EventObject { + /** contains `TRUE` if further events in the same transaction occur. */ + Further: boolean; + + /** contains the new value of the property. */ + NewValue: any; + + /** contains the old value of the property. */ + OldValue: any; + + /** + * contains the implementation handle for the property. + * + * May be -1 if the implementation has no handle. You can use this handle to get values from the {@link XFastPropertySet} . + */ + PropertyHandle: number; + + /** contains the unique name of the property which changes its value. */ + PropertyName: string; + } + + /** + * This is a generic service which should be supported by all servies which have properties. + * + * It specifies several, mostly optional ways to access properties. + */ + interface PropertySet extends XPropertySet, XFastPropertySet, XMultiPropertySet, XPropertyAccess, XPropertyState { + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * gets delivered whenever an {@link XPropertySetInfo} is changed. + * + * A {@link PropertySetInfoChangeEvent} object is sent to XPropertySetInfoChangeListeners. + */ + interface PropertySetInfoChangeEvent extends lang.EventObject { + /** + * contains the implementation handle for the property. + * + * May be -1 if the implementation has no handle. + */ + Handle: number; + + /** contains the name of the property. */ + Name: string; + + /** + * contains the reason for the event. + * @see PropertySetInfoChange + */ + Reason: number; + } + + /** + * is delivered whenever the state of a "bound" property is changed. + * + * It is sent as an argument to the method of {@link XPropertyStateChangeListener} . + * + * Normally these events are accompanied by the name, and the old and new values of the changed property. + * + * Void values may be provided for the old and new values if their true values are not known. + */ + interface PropertyStateChangeEvent extends lang.EventObject { + /** contains the new value of the property. */ + NewValue: PropertyState; + + /** contains the old value of the property. */ + OldValue: PropertyState; + + /** + * contains the implementation handle for the property. + * + * It may be -1 if the implementation has no handle. You can use this handle to get values from the {@link XFastPropertySet} interface. + */ + PropertyHandle: number; + + /** + * specifies the name of the property which changes its value. + * + * This name identifies the property uniquely within an {@link XPropertySet} . Upper and lower case are distinguished. + */ + PropertyName: string; + } + + /** specifies a property value. */ + interface PropertyValue { + /** + * contains an implementation-specific handle for the property. + * + * It may be -1 if the implementation has no handle. If available it can be used for fast lookups. + */ + Handle: number; + + /** + * specifies the name of the property. + * + * The name is unique within a sequence of PropertyValues. Upper and lower case are distinguished. + */ + Name: string; + + /** determines if the value comes from the object itself or from a default and if the value cannot be determined exactly. */ + State: PropertyState; + + /** contains the value of the property or `VOID` , if no value is available. */ + Value: any; + } + + /** + * specifies information about a single property failed to be set. + * @see com.sun.star.beans.XTolerantMultiPropertySet + */ + interface SetPropertyTolerantFailed { + /** specifies the name of the property. */ + Name: string; + + /** + * specifies the success or error code for setting the properties value. + * + * Since the property was not successful set the result will never be {@link com.sun.star.beans.TolerantPropertySetResultType.SUCCESS} . + * @see com.sun.star.beans.TolerantPropertySetResultType + */ + Result: number; + } + + /** specifies a pair of two strings. */ + interface StringPair { + /** specifies the first of the two strings. */ + First: string; + + /** specifies the second of the two strings. */ + Second: string; + } + + /** + * provides a method of changing names for converting an approximate name to an existing name. + * + * One field of application is the conversion of case-insensitive names to the existing names. + * + * Example: A basic interpreter ignores the case of the names. So it must query the {@link XExactName} interface and then call the method. + * @see com.sun.star.beans.XPropertySet + * @see com.sun.star.beans.XIntrospectionAccess + * @see com.sun.star.container.XNameAccess + */ + interface XExactName extends uno.XInterface { + /** @returns the exact name for a given aprroximate name. For example "getExactName" could be returned for "GETEXACTNAME" when "GETEXACTNAME" was used by a c */ + getExactName(aApproximateName: string): string; + } + + /** + * provides a fast way of accessing and changing property values. + * + * This interface is an extension to the {@link XPropertySet} interface. The get and set methods use handles to access the property values instead of + * character strings. + */ + interface XFastPropertySet extends uno.XInterface { + /** + * @param nHandle contains the implementation handle of the implementation for the property. + * @returns the value of the property with the name PropertyName. + * @throws UnknownPropertyException if the property does not exist. + * @throws com::sun::star::lang::WrappedTargetException if the implementation has an internal reason for the exception. In this case the original exception + */ + getFastPropertyValue(nHandle: number): any; + + /** + * sets the value to the property with the specified name. + * @param nHandle contains the implementation handle of the implementation for the property. + * @param aValue contains the new value of the property. + * @throws UnknownPropertyException if the property does not exist. + * @throws PropertyVetoException if a vetoable listener does not approve the change of a property value. + * @throws IllegalArgumentException if the new value cannot be converted to the type of the underlying property by an identity or widening conversion. + * @throws com::sun::star::lang::WrappedTargetException if the implementation has an internal reason for the exception. In this case the original exception + */ + setFastPropertyValue(nHandle: number, aValue: any): void; + } + + /** + * provides information about and access to the a hierarchy of properties from an implementation. + * + * Usually an object that implements this interface also implements {@link XPropertySet} and at least some of the properties have subproperties. + * + * This interface allows direct access to subsubproperties, ... up to an arbitrary nesting depth. Often the intermediate elements of the hierarchy + * implement {@link XProperty} . + * + * Each implementation specifies how the hierarchical property names, that are used to access the elements of the hierarchy, are formed. + * + * Commonly a notation similar to filesystem paths (separated by '/' slashes) or nested module names (separated by dots '.' or '::') is used. + */ + interface XHierarchicalPropertySet extends uno.XInterface { + /** + * retrieve information about the hierarchy of properties + * @returns the {@link XHierarchicalPropertySetInfo} interface, which describes the property hierarchy of the object which supplies this interface. + * @returns `NULL` if the implementation cannot or will not provide information about the properties; otherwise the interface {@link XHierarchicalPropertySet + */ + getHierarchicalPropertySetInfo(): XHierarchicalPropertySetInfo; + + /** + * @param aHierarchicalPropertyName This parameter specifies the name of the property. + * @returns the value of the property with the specified nested name. + * @see XPropertySet.getPropertyValue + * @throws UnknownPropertyException if the property does not exist. + * @throws com::sun::star::uno::lang::IllegalArgumentException if **aHierarchicalPropertyName** is not a well-formed nested name for this hierarchy. An impl + * @throws com::sun::star::lang::WrappedTargetException if the implementation has an internal reason for the exception. In this case the original exception + */ + getHierarchicalPropertyValue(aHierarchicalPropertyName: string): any; + + /** + * retrieve information about the hierarchy of properties + * @returns the {@link XHierarchicalPropertySetInfo} interface, which describes the property hierarchy of the object which supplies this interface. + * @returns `NULL` if the implementation cannot or will not provide information about the properties; otherwise the interface {@link XHierarchicalPropertySet + */ + readonly HierarchicalPropertySetInfo: XHierarchicalPropertySetInfo; + + /** + * sets the value of the property with the specified nested name. + * @param aHierarchicalPropertyName This parameter specifies the name of the property. + * @param aValue This parameter specifies the new value for the property. + * @see XPropertySet.setPropertyValue + * @throws UnknownPropertyException if the property does not exist. + * @throws PropertyVetoException if the property is constrained and the change is vetoed by a {@link XVetoableChangeListener} . + * @throws com::sun::star::uno::lang::IllegalArgumentException if **aValue** is not a legal value for this property or if **aHierarchicalPropertyName** is n + * @throws com::sun::star::lang::WrappedTargetException if the implementation has an internal reason for the exception. In this case the original exception + */ + setHierarchicalPropertyValue(aHierarchicalPropertyName: string, aValue: any): void; + } + + /** + * specifies a hierarchy of properties. + * + * The specification only describes the properties, it does not contain any values. + */ + interface XHierarchicalPropertySetInfo extends uno.XInterface { + /** + * @param aHierarchicalName specifies the nested name of the property. + * @returns the property with the specified name from the hierarchy. + * @throws UnknownPropertyException if the property does not exist. + * @throws com::sun::star::lang::IllegalArgumentException if **aHierarchicalName** is not a well-formed nested name for this hierarchy. An implementation is + */ + getPropertyByHierarchicalName(aHierarchicalName: string): Property; + + /** + * @param aHierarchicalName specifies the name of the property. + * @returns `TRUE` if a property with the specified name exists; otherwise `FALSE` is returned. + * @throws com::sun::star::lang::IllegalArgumentException if **aHierarchicalName** is not a well-formed nested name for this hierarchy. An implementation is + */ + hasPropertyByHierarchicalName(aHierarchicalName: string): boolean; + } + + /** + * allows the inspection of an object's properties and methods. + * + * **Important note:** An object can only be inspected completely if it supports the {@link com.sun.star.lang.XTypeProvider} interface. + * + * For details see method {@link XIntrospection.inspect()} . + * @see XIntrospectionAccess + */ + interface XIntrospection extends uno.XInterface { + /** + * inspects the given object. + * + * It identifies all properties supported by the object if they are represented in one of the following ways: + * + * **property set **: If the object supports an {@link XPropertySet} interface, all its properties are adopted.; + * + * **attributes **: All of an object's attributes are considered as properties with same name. If an attribute is read-only, the property also is + * read-only.; + * + * **get/set methods **: Every method `RetType getX()` defines a property where "X" stands for the property name and "RetType" for its type. The method + * must not have any parameters, or there is no property access method and "X" has no property. If there is also a method `void setX( [in] RetType )` , + * the property "X" also allows write access; otherwise it is read-only.; + * + * **Important note:**: If an object implements {@link com.sun.star.container.XNameAccess} , the items that can be accessed are not considered as + * properties of the object and so are not included in the property list offered by {@link com.sun.star.beans.XIntrospectionAccess.getProperties()} . + * {@link com.sun.star.container.XNameAccess} items have to be accessed separately by com::sun::star::beans::XIntrospectionAccess::getNameAccess(). + * + * + * + * In addition, the inspect method identifies all listener access methods in the form `add...Listener` / `remove...Listener` (except methods of interface + * {@link XPropertySet} ) where "..." stands for the listener type. + * + * Methods which do not belong to a property nor which represent a listener access nor which are methods of {@link XPropertySet} , {@link + * com.sun.star.container.XNameAccess} , {@link com.sun.star.container.XIndexAccess} , or {@link com.sun.star.container.XEnumerationAccess} , are + * considered to be normal methods. + * @see XIntrospectionAccess + */ + inspect(aObject: any): XIntrospectionAccess; + } + + /** + * represents the result of an introspection operation done by the inspect method of {@link XIntrospection} . + * + * This interface gives information about an object's properties and methods as detected in the introspection process. It's not possible to access + * properties or call methods directly using this interface but it provides access to other interfaces to do so. See {@link + * com.sun.star.beans.XIntrospectionAccess.queryAdapter()} + * + * The {@link XExactName} interface has to be supported in order to implement inaccurate name access for all objects which implement the {@link + * com.sun.star.container.XNameAccess} interface or {@link XPropertySet} . + * + * The {@link XMaterialHolder} interface has to be supported to give access to the inspected object. + * @@see XPropertySet + * @@see com::sun::star::beans::XExactName + */ + interface XIntrospectionAccess extends uno.XInterface { + /** + * returns information about a method if a method with the demanded name exists and if it accords to one of the demanded MethodConcepts. The information + * is provided as {@link com.sun.star.reflection.XIdlMethod} . + * @param aName the name of the method. + * @param nMethodConcepts zero or more constants of the {@link MethodConcept} constants group combined by an arithmetical or-operation. + * @returns A {@link com.sun.star.reflection.XIdlMethod} providing information about and access to the demanded method if a corresponding method exists. + * @throws NoSuchElementException when a method with the demanded name doesn't exist or if it accords to a wrong {@link MethodConcept} . + */ + getMethod(aName: string, nMethodConcepts: number): reflection.XIdlMethod; + + /** + * returns a sequence of methods of the introspected object. + * @param nMethodConcepts zero or more constants of the {@link MethodConcept} constants group combined by an arithmetical or-operation. + * @returns all methods of the introspected object which accord to the demanded MethodConcepts. + */ + getMethods(nMethodConcepts: number): SafeArray; + + /** + * returns a sequence of properties of the introspected object + * @param nPropertyConcepts zero or more constants of the {@link PropertyConcept} constants group combined by an arithmetical or-operation. + * @returns all properties of the introspected object which accord to the demanded PropertyConcepts. + */ + getProperties(nPropertyConcepts: number): SafeArray; + + /** + * returns information about a property if a property with the demanded name exists and if it accords to one of the demanded PropertyConcepts. The + * information is provided as {@link Property} struct. + * @param aName the name of the property. + * @param nPropertyConcepts zero or more constants of the {@link PropertyConcept} constants group combined by an arithmetical or-operation. + * @returns A {@link Property} struct providing information about the demanded property, if a corresponding property exists. + * @throws NoSuchElementException when a property with the demanded name doesn't exist or if it accords to a wrong {@link PropertyConcept} . + */ + getProperty(aName: string, nPropertyConcepts: number): Property; + + /** + * returns information about which method concepts described in the {@link MethodConcept} constants group are supported by this {@link + * XIntrospectionAccess} implementation. + * + * The minimum supported concepts should be: + * + * {@link MethodConcept.PROPERTY} ,{@link MethodConcept.LISTENER} ,{@link MethodConcept.ENUMERATION} ,{@link MethodConcept.NAMECONTAINER}{@link + * MethodConcept.INDEXCONTAINER} ; + * @returns zero or more constants of the {@link MethodConcept} constants group combined by an arithmetical or-operation. + */ + getSuppliedMethodConcepts(): number; + + /** + * returns information about which property concepts described in the {@link PropertyConcept} constants group are supported by this {@link + * XIntrospectionAccess} implementation. + * + * The minimum supported concepts should be: + * + * {@link PropertyConcept.PROPERTYSET} ,{@link PropertyConcept.ATTRIBUTES} and{@link PropertyConcept.METHODS} . + * @returns zero or more constants of the {@link PropertyConcept} constants group.combined by an arithmetical or-operation. + */ + getSuppliedPropertyConcepts(): number; + + /** + * returns the listener types supported by the introspected object. + * + * If the introspected object has the methods `addFooListener( XFooListener xFoo )` and `removeFooListener( XFooListener xFoo )` the type of XFooListener + * will be one of the elements in the returned sequence. + * @returns a sequence of the types of listener interfaces which are supported by the introspected object. + */ + getSupportedListeners(): SafeArray; + + /** + * allows to ask if a method with the demanded name exists and if it accords to one of the demanded {@link MethodConcept} . + * @param aName the name of the method. + * @param nMethodConcepts zero or more constants of the {@link MethodConcept} constants group combined by an arithmetical or-operation. + * @returns `TRUE` if the method exists and accords to one of the demanded MethodConcepts, otherwise `FALSE` is returned. + */ + hasMethod(aName: string, nMethodConcepts: number): boolean; + + /** + * allows to ask if a property with the demanded name exists and if it accords to one of the demanded {@link PropertyConcept} . + * @param aName the name of the property. + * @param nPropertyConcepts zero or more constants of the {@link PropertyConcept} constants group combined by an arithmetical or-operation. + * @returns `TRUE` if the property exists and accords to one of the demanded PropertyConcepts, otherwise `FALSE` is returned. + */ + hasProperty(aName: string, nPropertyConcepts: number): boolean; + + /** + * creates an adapter that implements an interface with the specified type. + * + * To access properties, query for the {@link XPropertySet} interface. If the {@link XPropertySet} can be queried, the {@link XFastPropertySet} interface + * must be supported too. + * + * If the introspected object implements a name container, the introspection should return the {@link com.sun.star.container.XNameAccess} and {@link + * com.sun.star.container.XNameContainer} interfaces. + * + * If the introspected object implements an index container, the introspection should return the {@link com.sun.star.container.XIndexAccess} and {@link + * com.sun.star.container.XIndexContainer} interfaces. + * + * If the introspected object implements an enumeration container, the introspection should return the {@link com.sun.star.container.XEnumerationAccess} + * interface. + * + * If the introspected object implements the {@link com.sun.star.reflection.XIdlArray} interface, the introspection should return this. + * + * To implement inaccurate name access, at all objects, which implement the {@link com.sun.star.container.XNameAccess} or {@link XPropertySet} interface, + * the {@link XExactName} interface has to be supported. + * @see com.sun.star.beans.XExactName + */ + queryAdapter(aInterfaceType: type): uno.XInterface; + + /** + * returns information about which method concepts described in the {@link MethodConcept} constants group are supported by this {@link + * XIntrospectionAccess} implementation. + * + * The minimum supported concepts should be: + * + * {@link MethodConcept.PROPERTY} ,{@link MethodConcept.LISTENER} ,{@link MethodConcept.ENUMERATION} ,{@link MethodConcept.NAMECONTAINER}{@link + * MethodConcept.INDEXCONTAINER} ; + * @returns zero or more constants of the {@link MethodConcept} constants group combined by an arithmetical or-operation. + */ + readonly SuppliedMethodConcepts: number; + + /** + * returns information about which property concepts described in the {@link PropertyConcept} constants group are supported by this {@link + * XIntrospectionAccess} implementation. + * + * The minimum supported concepts should be: + * + * {@link PropertyConcept.PROPERTYSET} ,{@link PropertyConcept.ATTRIBUTES} and{@link PropertyConcept.METHODS} . + * @returns zero or more constants of the {@link PropertyConcept} constants group.combined by an arithmetical or-operation. + */ + readonly SuppliedPropertyConcepts: number; + + /** + * returns the listener types supported by the introspected object. + * + * If the introspected object has the methods `addFooListener( XFooListener xFoo )` and `removeFooListener( XFooListener xFoo )` the type of XFooListener + * will be one of the elements in the returned sequence. + * @returns a sequence of the types of listener interfaces which are supported by the introspected object. + */ + readonly SupportedListeners: SafeArray; + } + + /** + * gives access to the material a (tool-) object is working on. + * + * Example: The introspection service allows the inspection of an object's properties and methods. The result is represented as {@link + * XIntrospectionAccess} interface. The inspected object then is the material attached to the introspection tool and an implementation of {@link + * XIntrospectionAccess} should also support {@link XMaterialHolder} to give access to this material. + * @see XIntrospectionAccess + */ + interface XMaterialHolder extends uno.XInterface { + /** + * returns the material that is connected to this (tool-) object + * @returns the material that is connected to this (tool-) object. + */ + getMaterial(): any; + + /** + * returns the material that is connected to this (tool-) object + * @returns the material that is connected to this (tool-) object. + */ + readonly Material: any; + } + + /** + * provides access to multiple properties which form a hierarchy. + * @see XHierarchicalPropertySet + */ + interface XMultiHierarchicalPropertySet extends uno.XInterface { + /** + * retrieve information about the hierarchy of properties + * @returns the {@link XHierarchicalPropertySetInfo} interface, which describes the property hierarchy of the object which supplies this interface. + * @returns `NULL` if the implementation cannot or will not provide information about the properties; otherwise the interface {@link XHierarchicalPropertySet + * @see XHierarchicalPropertySet.getHierarchicalPropertySetInfo + */ + getHierarchicalPropertySetInfo(): XHierarchicalPropertySetInfo; + + /** + * @returns a sequence of all values of the properties which are specified by their nested names. The order of the values in the returned sequence will be t + * @see XHierarchicalPropertySet.getHierarchicalPropertyValue + * @see XMultiPropertySet.setPropertyValues + * @throws com::sun::star::lang::IllegalArgumentException if one of the names is not a well-formed nested name for this hierarchy. An implementation is not + * @throws com::sun::star::lang::WrappedTargetException if the implementation has an internal reason for the exception. In this case the original exception + */ + getHierarchicalPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + + /** + * retrieve information about the hierarchy of properties + * @returns the {@link XHierarchicalPropertySetInfo} interface, which describes the property hierarchy of the object which supplies this interface. + * @returns `NULL` if the implementation cannot or will not provide information about the properties; otherwise the interface {@link XHierarchicalPropertySet + * @see XHierarchicalPropertySet.getHierarchicalPropertySetInfo + */ + readonly HierarchicalPropertySetInfo: XHierarchicalPropertySetInfo; + + /** + * sets the values of the properties with the specified nested names. + * + * The values of the properties must change before bound events are fired. The values of constrained properties should change after the vetoable events + * are fired, if no exception occurs. + * + * Unknown properties are ignored. + * @param aHierarchicalPropertyNames This parameter specifies the names of the properties. + * @param Values This parameter specifies the new values for the properties. + * @see XHierarchicalPropertySet.setHierarchicalPropertyValue + * @see XMultiPropertySet.setPropertyValues + * @throws PropertyVetoException if one of the properties is constrained and the change is vetoed by a {@link XVetoableChangeListener} . + * @throws com::sun::star::lang::IllegalArgumentException if one of the values is not a legal value for the corresponding property or if one of the names is + * @throws com::sun::star::lang::WrappedTargetException if the implementation has an internal reason for the exception. In this case the original exception + */ + setHierarchicalPropertyValues(aHierarchicalPropertyNames: LibreOffice.SeqEquiv, Values: LibreOffice.SeqEquiv): void; + } + + /** provides access to multiple properties with a single call. */ + interface XMultiPropertySet extends uno.XInterface { + /** + * adds an {@link XPropertiesChangeListener} to the specified property with the specified names. + * + * The implementation can ignore the names of the properties and fire the event on all properties. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + * @param aPropertyNames specifies the names of the properties. + * @param xListener contains the listener for the property change events. + * @see removePropertiesChangeListener + */ + addPropertiesChangeListener(aPropertyNames: LibreOffice.SeqEquiv, xListener: XPropertiesChangeListener): void; + + /** + * fires a sequence of PropertyChangeEvents to the specified listener. + * @param aPropertyNames specifies the sorted names of the properties. + * @param xListener contains the listener for the property change events. + */ + firePropertiesChangeEvent(aPropertyNames: LibreOffice.SeqEquiv, xListener: XPropertiesChangeListener): void; + + /** + * @returns the {@link XPropertySetInfo} interface, which describes all properties of the object to which this interface belongs. NULL is returned if the obj + * @see XPropertySet.getPropertySetInfo + */ + getPropertySetInfo(): XPropertySetInfo; + + /** + * @param aPropertyNames specifies the names of the properties. This sequence must be alphabetically sorted. + * @returns a sequence of all values of the properties which are specified by their names. The order of the values in the returned sequence will be the same + */ + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + + /** + * @returns the {@link XPropertySetInfo} interface, which describes all properties of the object to which this interface belongs. NULL is returned if the obj + * @see XPropertySet.getPropertySetInfo + */ + readonly PropertySetInfo: XPropertySetInfo; + + /** + * removes an {@link XPropertiesChangeListener} from the listener list. + * + * It is a "noop" if the listener is not registered. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + * @param xListener contains the listener to be removed. + * @see addPropertiesChangeListener + */ + removePropertiesChangeListener(xListener: XPropertiesChangeListener): void; + + /** + * sets the values to the properties with the specified names. + * + * The values of the properties must change before the bound events are fired. The values of the constrained properties should change after the vetoable + * events are fired and only if no exception occurred. Unknown properties are ignored. + * @param aPropertyNames specifies the names of the properties. All names must be unique. This sequence must be alphabetically sorted. + * @param aValues contains the new values of the properties. The order is the same as in **aPropertyNames** . + * @throws IllegalArgumentException if one of the new values cannot be converted to the type of the underlying property by an identity or widening conversion. + * @throws com::sun::star::lang:WrappedTargetException if the implementation has an internal reason for the exception. In this case the original exception i + */ + setPropertyValues(aPropertyNames: LibreOffice.SeqEquiv, aValues: LibreOffice.SeqEquiv): void; + } + + /** + * makes it possible to query information about the state of one or more properties. + * + * The state of a property contains information about the source of the value, e.g. the object itself, a default or a stylesheet. For more information + * see PropertyState. + */ + interface XMultiPropertyStates extends uno.XInterface { + /** + * @param aPropertyNames specifies the names of the properties. All names must be unique. This sequence must be alphabetically sorted. + * @returns the default values of the propertes with the specified names. If no default exists, is not known, or is void, then the return type at the corres + * @throws UnknownPropertyException if one of the propertes does not exist. + * @throws com::sun::star::lang::WrappedTargetException if the implementation has an internal reason for the exception. In this case the original exception + */ + getPropertyDefaults(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + + /** + * @param aPropertyName specifies the names of the properties. All names must be unique. This sequence must be alphabetically sorted. + * @returns a sequence of the states of the properties which are specified by their names. The order of the states is correlating to the order of the given + */ + getPropertyStates(aPropertyName: LibreOffice.SeqEquiv): SafeArray; + + /** + * sets all properties to their default values. + * + * Each value depends on the implementation of this interface. If it is a bound property, you must change the value before the change events are fired. + * If it is a constrained property, you must fire the vetoable event before you change the property value. + */ + setAllPropertiesToDefault(): void; + + /** + * sets the specified properties to their default values. + * + * Each value depends on the implementation of this interface. If it is a bound property, you must change the value before the change events are fired. + * If it is a constrained property, you must fire the vetoable event before you change the property value. + * @param aPropertyNames specifies the names of the properties. All names must be unique. This sequence must be alphabetically sorted. + * @throws UnknownPropertyException if one of the properties does not exist. + */ + setPropertiesToDefault(aPropertyNames: LibreOffice.SeqEquiv): void; + } + + /** receives events which get fired whenever a bound property is changed. */ + interface XPropertiesChangeListener extends lang.XEventListener { + /** + * gets called when bound properties are changed. + * @param aEvent contains a sequence of {@link PropertyChangeEvent} objects which describe the event source and the properites that have changed. + */ + propertiesChange(aEvent: LibreOffice.SeqEquiv): void; + } + + /** + * specifies a notifier for changed property values + * @see XPropertiesChangeListener + */ + interface XPropertiesChangeNotifier extends uno.XInterface { + /** adds an {@link XPropertiesChangeListener} to the specified properties with the specified names. */ + addPropertiesChangeListener(PropertyNames: LibreOffice.SeqEquiv, Listener: XPropertiesChangeListener): void; + + /** removes an {@link XPropertiesChangeListener} from the listener list. */ + removePropertiesChangeListener(PropertyNames: LibreOffice.SeqEquiv, Listener: XPropertiesChangeListener): void; + } + + /** + * Is implemented by objects that also are a property of some other object. + * + * Provides access to traits of this object that would otherwise only be available from a containing {@link XPropertySet} via its {@link + * XPropertySetInfo} . + */ + interface XProperty extends uno.XInterface { + /** @returns the specification of this object as {@link Property} . */ + readonly AsProperty: Property; + + /** @returns the specification of this object as {@link Property} . */ + getAsProperty(): Property; + } + + /** + * makes it possible to access all property values and to set them at once. + * + * In most cases this interface will be in addition to {@link XPropertySet} . It is especially useful for remote communication because it lessens the + * number of calls for getting property values; that is especially important because these calls are necessarily synchronous. + * + * Another advantage of this method is that conflicts are avoided if property value restrictions depend on the value of other properties. + */ + interface XPropertyAccess extends uno.XInterface { + /** @returns a sequence of all property values within the object in a single call. */ + getPropertyValues(): SafeArray; + + /** @returns a sequence of all property values within the object in a single call. */ + PropertyValues: SafeArray; + + /** + * sets the values of given properties. + * + * All properties which are not contained in the sequence **aProps** will be left unchanged. + */ + setPropertyValues(aProps: LibreOffice.SeqEquiv): void; + } + + /** @since LibreOffice 4.1 */ + interface XPropertyBag extends XPropertySet, XPropertyContainer, XPropertyAccess { } + + /** is used to receive PropertyChangeEvents whenever a bound property is changed. */ + interface XPropertyChangeListener extends lang.XEventListener { + /** is called when a bound property is changed. */ + propertyChange(evt: PropertyChangeEvent): void; + } + + /** + * makes it possible to add and remove properties to or from an object. + * + * Some scripting engines cannot access properties directly when the property set is changed. Please use {@link XPropertySet.getPropertyValue()} etc. in + * this case. + */ + interface XPropertyContainer extends uno.XInterface { + /** + * adds a property to the object. + * @param Name specifies the name of the new property. + * @param Attributes specifies the property attributes, see {@link PropertyAttribute} . + * @param DefaultValue specifies the type of the new property and a potential default value. + * @throws PropertyExistException if a property with the same name already exists. + * @throws IllegalTypeException if the specified type is not allowed. + */ + addProperty(Name: string, Attributes: number, DefaultValue: any): void; + + /** + * removes a property from the object. + * @param Name specified the name of the property. + * @throws UnknownPropertyException if the property does not exist. + */ + removeProperty(Name: string): void; + } + + /** + * provides information about and access to the properties from an implementation. + * + * There are three types of properties: + * + * bound propertiesconstrained propertiesfree properties + * + * You can listen to changes of bound properties with the {@link XPropertyChangeListener} and you can veto changes of constrained properties with the + * {@link XVetoableChangeListener} . + * + * To implement inaccurate name access, you must support the interface {@link XExactName} . + * @see com.sun.star.beans.XExactName + */ + interface XPropertySet extends uno.XInterface { + /** + * adds an {@link XPropertyChangeListener} to the specified property. + * + * An empty name ("") registers the listener to all bound properties. If the property is not bound, the behavior is not specified. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + * @see removePropertyChangeListener + */ + addPropertyChangeListener(aPropertyName: string, xListener: XPropertyChangeListener): void; + + /** + * adds an {@link XVetoableChangeListener} to the specified property with the name PropertyName. + * + * An empty name ("") registers the listener to all constrained properties. If the property is not constrained, the behavior is not specified. + * @see removeVetoableChangeListener + */ + addVetoableChangeListener(PropertyName: string, aListener: XVetoableChangeListener): void; + + /** + * @returns the {@link XPropertySetInfo} interface, which describes all properties of the object which supplies this interface. + * @returns NULL if the implementation cannot or will not provide information about the properties; otherwise the interface {@link XPropertySetInfo} is returned. + */ + getPropertySetInfo(): XPropertySetInfo; + + /** + * @param PropertyName This parameter specifies the name of the property. + * @returns the value of the property with the specified name. + * @throws UnknownPropertyException if the property does not exist. + * @throws com::sun::star::lang::WrappedTargetException if the implementation has an internal reason for the exception. In this case the original exception + */ + getPropertyValue(PropertyName: string): any; + + /** + * @returns the {@link XPropertySetInfo} interface, which describes all properties of the object which supplies this interface. + * @returns NULL if the implementation cannot or will not provide information about the properties; otherwise the interface {@link XPropertySetInfo} is returned. + */ + readonly PropertySetInfo: XPropertySetInfo; + + /** + * removes an {@link XPropertyChangeListener} from the listener list. + * + * It is a "noop" if the listener is not registered. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + * @see addPropertyChangeListener + */ + removePropertyChangeListener(aPropertyName: string, aListener: XPropertyChangeListener): void; + + /** + * removes an {@link XVetoableChangeListener} from the listener list. + * + * It is a "noop" if the listener is not registered. + * @see addVetoableChangeListener + */ + removeVetoableChangeListener(PropertyName: string, aListener: XVetoableChangeListener): void; + + /** + * sets the value of the property with the specified name. + * + * If it is a bound property the value will be changed before the change event is fired. If it is a constrained property a vetoable event is fired before + * the property value can be changed. + * @throws com::sun::star::beans::PropertyVetoException if the property is read-only or vetoable and one of the listeners throws this exception because of a + */ + setPropertyValue(aPropertyName: string, aValue: any): void; + } + + /** + * specifies a set of properties. + * + * There are three kinds of properties: bound propertiesconstrained propertiesfree properties + * + * The specification only describes the properties, it does not contain any values. + */ + interface XPropertySetInfo extends uno.XInterface { + /** @returns a sequence with all property descriptors which are specified within this {@link XPropertySetInfo} . */ + getProperties(): SafeArray; + + /** + * @param aName specifies the name of the property. + * @returns the property with the specified name from the object. + * @throws UnknownPropertyException if the property does not exist. + */ + getPropertyByName(aName: string): Property; + + /** + * @param Name specifies the name of the property. + * @returns `TRUE` if a property with the specified name exist; otherwise `FALSE` is returned. + */ + hasPropertyByName(Name: string): boolean; + + /** @returns a sequence with all property descriptors which are specified within this {@link XPropertySetInfo} . */ + readonly Properties: SafeArray; + } + + /** + * a listener for events related to XPropertySetInfos. + * @see PropertySetInfoChangeEvent + * @see XPropertySetInfoChangeNotifier + */ + interface XPropertySetInfoChangeListener extends lang.XEventListener { + /** is called whenever changes of a {@link XPropertySetInfo} shall be propagated. */ + propertySetInfoChange(evt: PropertySetInfoChangeEvent): void; + } + + /** + * a notifier for changes of XPropertySetInfos. + * @see PropertySetInfoChangeEvent + * @see XPropertySetInfoChangeListener + */ + interface XPropertySetInfoChangeNotifier extends uno.XInterface { + /** + * registers a listener for PropertySetInfoChangeEvents. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + */ + addPropertySetInfoChangeListener(Listener: XPropertySetInfoChangeListener): void; + + /** + * removes a listener for PropertySetInfoChangeEvents. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + */ + removePropertySetInfoChangeListener(Listener: XPropertySetInfoChangeListener): void; + } + + interface XPropertySetOption extends uno.XInterface { + /** Turn on or off notifying change listeners on property value change. This option is turned on by default. */ + enableChangeListenerNotification(bEnable: boolean): void; + } + + /** + * makes it possible to query information about the state of one or more properties. + * + * The state contains the information if: + * + * a value is available or voidthe value is stored in the object itself, or if a default value is to be usedand if the value cannot be determined, due to + * ambiguity (multi selection with multiple values). + */ + interface XPropertyState extends uno.XInterface { + /** + * @param aPropertyName specifies the name of the property. + * @returns the default value of the property with the name PropertyName. If no default exists, is not known or is void, then the return type is `void` . + * @throws UnknownPropertyException if the property does not exist. + * @throws com::sun::star::lang::WrappedTargetException if the implementation has an internal reason for the exception. In this case the original exception + */ + getPropertyDefault(aPropertyName: string): any; + + /** + * @param PropertyName specifies the name of the property. + * @returns the state of the property. + * @throws UnknownPropertyException if the property does not exist. + */ + getPropertyState(PropertyName: string): PropertyState; + + /** + * @param aPropertyName contains the sequence of property names. + * @returns a sequence of the states of the properties which are specified by their names. The order of the states is correlating to the order of the given + * @throws UnknownPropertyException if one property does not exist. + */ + getPropertyStates(aPropertyName: LibreOffice.SeqEquiv): SafeArray; + + /** + * Sets the property to default value. + * + * The value depends on the implementation of this interface. If it is a bound property, you must change the value before the change events are fired. If + * it is a constrained property, you must fire the vetoable event before you change the property value. + * @param PropertyName specifies the name of the property. + * @throws UnknownPropertyException if the property does not exist. + */ + setPropertyToDefault(PropertyName: string): void; + } + + /** receives events which get fired whenever the state of a bound property is changed. */ + interface XPropertyStateChangeListener extends lang.XEventListener { + /** + * is called when a bound property's state is changed. + * @param aEvent describes the event source and the property that has changed. + */ + propertyStateChange(aEvent: PropertyStateChangeEvent): void; + } + + /** + * makes it possible to query information about the state of this object, seen as a property contained in a property set. + * + * This interface provides direct access to operations that are available if the containing property set implements {@link XPropertyState} . + * + * The state contains the information if: + * + * a value is available or voidthe value is stored in the object itself, or if a default value is being usedor if the value cannot be determined, due to + * ambiguity (multi selection with multiple values). + * + * Generally objects that implement this interface also implement {@link XProperty} . + */ + interface XPropertyWithState extends uno.XInterface { + /** + * @returns an object representing the default state of this object (as a property). If no default exists, is not known or is void, then the return value is + * @throws com::sun::star::lang::WrappedTargetException if the implementation has an internal reason for the exception. In this case the original exception + */ + readonly DefaultAsProperty: uno.XInterface; + + /** + * @returns an object representing the default state of this object (as a property). If no default exists, is not known or is void, then the return value is + * @throws com::sun::star::lang::WrappedTargetException if the implementation has an internal reason for the exception. In this case the original exception + */ + getDefaultAsProperty(): uno.XInterface; + + /** @returns the state of this as a property. */ + getStateAsProperty(): PropertyState; + + /** + * sets this to its default value. + * + * The value depends on the implementation of this interface. If this is a bound property, the value changes before the change events are fired. If this + * is a constrained property, the vetoable event is fired before the property value changes. + * @@throws com::sun::star::lang::WrappedTargetException if the implementation has an internal reason for the exception. In this case the original ex + */ + setToDefaultAsProperty(): void; + + /** @returns the state of this as a property. */ + readonly StateAsProperty: PropertyState; + } + + /** + * provides access to multiple iformation of a set of properties with a single call. + * + * The speciality of this interface is that none of the functions will throw the usual exceptions associated with setting and retrieving of property + * values. Instead the data for the failures is collected and returned. + * + * Note: There is no support for property change listeners in this interface. + * @see com.sun.star.beans.XPropertySet + * @see com.sun.star.beans.XMultiPropertySet + */ + interface XTolerantMultiPropertySet extends uno.XInterface { + /** + * retrieve only those values of the specified properties which are direct values. + * + * Since the count of returned elements may be different from the number of supplied property names the returned elements will also state the name of the + * property. + * @param aPropertyNames specifies the names of the properties. The property names must be sorted ascending. If the names are not sorted the behaviour of + * @returns a sequence of type {@link com.sun.star.beans.GetDirectPropertyTolerantResult} but only for those properties supplied whoms state is com::sun::sta + */ + getDirectPropertyValuesTolerant(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + + /** + * retrieve the values of the specified properties + * + * The count and order of the values in the returned sequence will be the same as the order of the names in the argument. + * @param aPropertyNames specifies the names of the properties. The property names must be sorted ascending. If the names are not sorted the behaviour of + * @returns a sequence of type {@link com.sun.star.beans.GetPropertyTolerantResult} for each of the properties listed in **aPropertyNames** . + */ + getPropertyValuesTolerant(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + + /** + * sets the values to the properties with the specified names. + * @param aPropertyNames specifies the names of the properties. The property names must be sorted ascending. If the names are not sorted the behaviour of + * @param aValues specifies the values of the properties. The order of the values has to be the same as in the **aPropertyNames** parameter int order to ma + * @returns An empty sequence if all properties are successful set. Otherwise for every property value that could not successfully be set an entry of the {@l + * @throws IllegalArgumentException if the number of property names and values do not match. + */ + setPropertyValuesTolerant(aPropertyNames: LibreOffice.SeqEquiv, aValues: LibreOffice.SeqEquiv): SafeArray; + } + + /** + * is used to receive PropertyChangeEvents whenever a "constrained" property is changed. + * + * You can register an {@link XVetoableChangeListener} with a source object so as to be notified of any constrained property updates. + */ + interface XVetoableChangeListener extends lang.XEventListener { + /** gets called when a constrained property is changed. */ + vetoableChange(aEvent: PropertyChangeEvent): void; + } + + namespace MethodConcept { + const enum Constants { + ALL = -1, + DANGEROUS = 1, + ENUMERATION = 8, + INDEXCONTAINER = 32, + LISTENER = 4, + NAMECONTAINER = 16, + PROPERTY = 2, + } + } + + namespace PropertyAttribute { + const enum Constants { + BOUND = 2, + CONSTRAINED = 4, + MAYBEAMBIGUOUS = 32, + MAYBEDEFAULT = 64, + MAYBEVOID = 1, + OPTIONAL = 256, + READONLY = 16, + REMOVABLE = 128, + REMOVEABLE = 128, + TRANSIENT = 8, + } + } + + namespace PropertyConcept { + const enum Constants { + ALL = -1, + ATTRIBUTES = 4, + DANGEROUS = 1, + METHODS = 8, + PROPERTYSET = 2, + } + } + + namespace PropertySetInfoChange { + const enum Constants { + PROPERTY_INSERTED = 0, + PROPERTY_REMOVED = 1, + } + } + + namespace TolerantPropertySetResultType { + const enum Constants { + ILLEGAL_ARGUMENT = 2, + PROPERTY_VETO = 3, + SUCCESS = 0, + UNKNOWN_FAILURE = 5, + UNKNOWN_PROPERTY = 1, + WRAPPED_TARGET = 4, + } + } + } + + namespace bridge { + /** Indicates, that it was tried to create a remote bridge with a name, which already existed. */ + type BridgeExistsException = uno.Exception; + + /** + * allows to create new or access existing interprocess bridges. + * + * It enumerates at the servicemanager all services supporting the meta service {@link com.sun.star.bridge.Bridge} to get all known, possible protocols. + * @see com.sun.star.bridge.Bridge + */ + type BridgeFactory = XBridgeFactory2; + + /** + * registers UNO objects as COM objects. + * + * That is, COM class factories are registered with COM at runtime. The required EXE server is the application which deploys this service. In order to + * access the factories by COM API functions, there need to be proper registry entries. This service does not provide for writing those entries. + * + * The instantiation of the registered objects can be carried out by any ordinary mechanism which is used in a certain language to create COM components. + * For example, CreateObject in Visual Basic, CoCreateInstance in C++. + * + * Currently only a factory for the service com.sun.star.long.MultiServiceFactory is registered by this service. The CLSID is + * {82154420-0FBF-11d4-8313-005004526AB4} and the ProgId is com.sun.star.ServiceManager. + * + * {@link OleApplicationRegistration} does not provide any particular interface because the UNO objects are registered while instantiating this service + * and deregistered if the implementation, which makes use of this service, is being released. + * @deprecated Deprecated + */ + type OleApplicationRegistration = uno.XInterface; + + /** + * makes it possible to generate OLE bridges to UNO objects and vice versa. + * + * The service implements the {@link XBridgeSupplier} interface and handles the model types {@link ModelDependent.UNO} and {@link ModelDependent.OLE} . + * The service does not specify any requirements on registering OLE objects and class factories. + * @deprecated Deprecated + */ + type OleBridgeSupplier = XBridgeSupplier; + + /** + * maps UNO types to oleautomation types and vice versa. + * + * The {@link XBridgeSupplier2} interface provides the function `createBridge` which maps a value of an UNO or Automation type to the desired target + * type. If an UNO interface was mapped to IDispatch, then all objects (interfaces, structs) and other types which are obtained from that Automation + * object are automatically mapped to the corresponding Automation types. Hence, if one provides an initial object which forms the root of all other + * objects, such as a service manager, then only that object needs to be explicitly mapped by a call to `createBridge` . The same holds true if an + * automation object is mapped to an UNO interface. ; + * + * The Automation types `VT_CY` and `VT_DATE` are not supported. For Automation objects to be mapped they have to implement IDispatch interface. Other + * COM interfaces, except for IUnknown, are not supported.UNO interfaces and structs are mapped to IDispatch. + * + * The service implements the {@link XBridgeSupplier2} interface and handles the model types {@link com.sun.star.bridge.ModelDependent.UNO} and {@link + * com.sun.star.bridge.ModelDependent.OLE} . The service does not specify any requirements for registering OLE objects and class factories. + * @deprecated Deprecated + */ + type OleBridgeSupplier2 = XBridgeSupplier2; + + /** + * maps UNO types to COM types and vice versa. It is optimized for use in a remote szenario. + * + * The functionality is basically the same as {@link com.sun.star.bridge.OleBridgeSupplier2} . However, the implementation should be optimized for remote + * access. For example, it could try to reduce the calls into the remote process. Also it could create components on its own behalf in the remote + * process, if this increases performance. + * @deprecated Deprecated + */ + type OleBridgeSupplierVar1 = OleBridgeSupplier2; + + /** + * makes it possible to create COM objects as UNO objects. + * + * A COM object must have a ProgId since the ProgId is used as argument for XMultiServiceFactory::createInstance. The only interfaces which are mapped + * are `IUnknown` and `IDispatch` . The created UNO objects support {@link com.sun.star.script.XInvocation} if the original COM objects support + * IDispatch. + * + * The optional parameters of the method {@link com.sun.star.lang.XMultiServiceFactory.createInstanceWithArguments()} are reserved for future use; at + * this time they are ignored. + * @deprecated Deprecated + */ + type OleObjectFactory = lang.XMultiServiceFactory; + + /** provides the ability to access remote processes, resolving them by an UNO url. ; */ + type UnoUrlResolver = XUnoUrlResolver; + + /** + * This meta service allows the bridgefactory service to instantiate an interprocess bridge using a certain transfer protocol. + * + * Components, that support a certain protocol, must have at least two service names: + * + * {@link com.sun.star.bridge.Bridge}arbitrary-module-path.ProtocolnameBridge + * + * The protocol name should be written as common servicenames, first letter is a capital letter, the rest in small letters postfixed by {@link Bridge} + * (e.g.: `com.sun.star.bridge.UrpBridge` would be correct servicename for the "urp" protocol). However, the protocol names are compared case + * insensitive. If there exist two services supporting the same protocol, it is arbitrary which one is chosen, so this should be omitted. + */ + interface Bridge extends lang.XInitialization, XBridge, lang.XComponent { } + + /** + * Concrete service of the meta service {@link Bridge} for iiop. + * + * This bridge works with the iiop protocol. + * @see com.sun.star.bridge.Bridge + */ + interface IiopBridge extends lang.XInitialization, XBridge, lang.XComponent { } + + /** + * Indicates, that a requested property change could not be executed by the remote counterpart. + * @see XProtocolProperties + */ + interface InvalidProtocolChangeException extends uno.Exception { + /** The first invalid property. */ + invalidProperty: ProtocolProperty; + + /** Contains 1, if the property name is unknown to the thrower; or contains 2, if the property's value can't be accepted by the thrower. */ + reason: number; + } + + /** string/value pair */ + interface ProtocolProperty { + Name: string; + Value: any; + } + + /** + * Concrete service of the meta service {@link Bridge} for the urp protocol. + * + * This bridge works with the urp protocol. + * @see com.sun.star.bridge.Bridge + */ + interface UrpBridge extends lang.XInitialization, XBridge, lang.XComponent { } + + /** main interface for an interprocess bridge. */ + interface XBridge extends uno.XInterface { + /** a unique descriptive string: protocol + ":" + XConnection.getDescription() */ + readonly Description: string; + + /** a unique descriptive string: protocol + ":" + XConnection.getDescription() */ + getDescription(): string; + + /** + * tries to get an interface from the remote that is known by this name. + * + * In general, this method is called once to get the initial object from the remote, but it is allowed to call the method multiple times. + * @param sInstanceName The name of the object, that shall be retrieved from the remote process. The call is delegated to {@link com.sun.star.bridge.XInsta + * @see com.sun.star.bridge.XInstanceProvider + */ + getInstance(sInstanceName: string): uno.XInterface; + + /** name that the bridge got when it was created. */ + getName(): string; + + /** name that the bridge got when it was created. */ + readonly Name: string; + } + + /** factory to create interprocess bridges. */ + interface XBridgeFactory extends uno.XInterface { + /** + * tries to create a UNO interprocess bridge. + * @param sName The name of the bridge. This allows other components to reuse an already created bridge (using getBridge). If empty, an anonymous bridge is + * @param sProtocol The protocol, that will be used on the connection (e.g., urp) plus additional comma separated name=value protocol properties. + * @param aConnection The connection, which is used to transfer the calls. The bridge expects to own the connection, thus it will close the connection, in + * @param anInstanceProvider gets called, when a request from remote comes in. You can pass a null reference in case you don't want to export any objects. + * @throws BridgeExistsException There is already a bridge registered with this name. Use getBridge instead. + * @throws IllegalArgumentException The protocol is unknown or the connection is null. + */ + createBridge(sName: string, sProtocol: string, aConnection: connection.XConnection, anInstanceProvider: XInstanceProvider): XBridge; + + /** returns the sequence of all named and unnamed UNO interprocess bridges that are instantiated at the time the call is made. */ + readonly ExistingBridges: SafeArray; + + /** + * tries to get a bridge by this name. + * + * Cannot be retrieved, when the bridge got disposed before. + * @returns An existing remote bridge or a null reference. + */ + getBridge(sName: string): XBridge; + + /** returns the sequence of all named and unnamed UNO interprocess bridges that are instantiated at the time the call is made. */ + getExistingBridges(): SafeArray; + } + + /** + * Provides a unified interface for the {@link BridgeFactory} service to implement. + * @since LibreOffice 4.0 + */ + interface XBridgeFactory2 extends XBridgeFactory, lang.XComponent { } + + /** + * defines the interface for creating bridges to other object models. + * + * Because bridges sometimes can not be generated in an address space, the implementation needs to check the address space of the caller by comparing the + * machine and process ID against its own. These IDs are provided by the UNO runtime. + * + * All objects, whether they are part of the UNO object model or not, are carried in an `any` . The representation of this object is heavily + * model-dependent and has to be specified in the following list: + * + * **UNO: **: The any carries normal UNO types, which can be any base type, struct, sequence, enum, or interface.; + * + * **OLE: **: The any carries an `unsigned long` (on 32-bit systems) or an `unsigned hyper` (on 64-bit systems), which is interpreted as a variant + * pointer. The any does not control the lifetime of the represented variant. That implies that the caller has the responsibility of freeing the OLE + * resources represented by the any value.; + * + * **JAVA: **: not yet specified.; + * + * **CORBA: **: not yet specified. + * + * + * + * Any implementation can supply its own bridges to other object models by implementing this interface and returning the bridge when the method is called + * with itself as the first parameter. + * @deprecated Deprecated + * @see com.sun.star.bridge.OleBridgeSupplier + */ + interface XBridgeSupplier extends uno.XInterface { + /** creates a bridge to provide an object of one object model with another. */ + createBridge(modelDepObject: any, MachineId: uno.Uik, ProcessId: number, sourceModelType: number, destModelType: number): any; + } + + /** + * defines the interface for creating bridges to other object models. + * + * The created bridges are transparent to the user. That is, if one maps an interface into the target model, then the resulting target interface is a + * bridge implementation, that is not being noticed by an user. During a call on that interface, the bridge is invoked to convert the arguments and carry + * out a call according to the rules of the source model. Return values are automatically mapped to the types of the target model. + * + * Simple types are mapped to simple target types. That is, there is no additional bridging code involved when those types are being used. + * + * Sometimes a bridge cannot be created, depending on whether a programm uses the {@link XBridgeSupplier2} interface remotely. Assuming one wants to + * bridge an OLE Automation object to UNO by calling createBridge on a proxy, then the UNO remote bridge would not recognise that the Any argument + * contains an IDispatch interface. Therefore it cannot marshal it as COM requires it and the bridgeing would fail. To prevent this, implementations of + * this interface should be aware of this scenario and if necessary take the appropriate steps. The process ID argument to the createBridge function + * represents the calling process and may be used by the implementation to determine if it is being accessed remotely. + * + * All objects, whether they are part of the UNO object model or not, are carried in an `any` . The representation of this object is heavily + * model-dependent and has to be specified in the following list: + * + * **UNO: **: The any carries normal UNO types, which can be any base type, struct, sequence, enum or interface.; + * + * **OLE: **: The any carries an `unsigned long` (on 32-bit systems) or an `unsigned hyper` (on 64-bit systems), which is interpreted as a variant + * pointer. The any does not control the lifetime of the represented variant. That implies that the caller has the responsibility of freeing the OLE + * resources represented by the any value.; + * + * **JAVA: **: not specified yet.; + * + * **CORBA: **: not specified yet. + * + * + * + * Any implementation can supply its own bridges to other object models by implementing this interface and returning the bridge when the method {@link + * XBridgeSupplier2.createBridge()} is called with itself as the first parameter. + * @see com.sun.star.bridge.OleBridgeSupplier2 + */ + interface XBridgeSupplier2 extends uno.XInterface { + /** creates a bridge to provide an object of one object model with another. */ + createBridge(aModelDepObject: any, aProcessId: LibreOffice.SeqEquiv, nSourceModelType: number, nDestModelType: number): any; + } + + /** + * allows to export UNO objects to other processes. + * @see XBridge + */ + interface XInstanceProvider extends uno.XInterface { + /** + * gets called, when an initial object is requested from a remote process. You may either create a new instance or return an existing object. + * @param sInstanceName The name of the requested object. + * @returns the object associated with the name. The return value may be null in case there is no object to offer for this string. In this case, {@link XBrid + * @throws NoSuchElementException You may throw this exception to indicate, that there is no object for this name. Due to a specification bug, this exceptio + */ + getInstance(sInstanceName: string): uno.XInterface; + } + + /** + * {@link Bridge} internal interface, that allows to change protocol settings of the remote counter part. + * + * In general, this interface is implemented by the bridge itself. It must not be called from outside the bridge. + * + * INTERNAL INTERFACE, DO NOT USE IT ELSEWHERE! + */ + interface XProtocolProperties extends uno.XInterface { + /** + * called to commit a protocol change. + * + * It is only allowed to call commitChange, if requestChange has been called previously and the return value was true. The new properties are valid after + * the reply of commitChange has been received. Note, that this is difficult for the callee, because it must marshal the reply with the old settings. + * + * All properties not mentioned in the list are unchanged. Note that the bridge must be blocked for other threads, before commitChange is sent and + * unblocked after the reply has been received. This blocks the bridge. + * @throws InvalidProtocolChangeException when the remote counterpart could not change at least one of the properties. No property has been changed. request + */ + commitChange(newValues: LibreOffice.SeqEquiv): void; + + /** + * called to get a list of bridge internal properties. Which properties can be retrieved, is protocol dependent. + * + * The properties MUST NOT change between a requestChange and a commit change call. + */ + getProperties(): SafeArray; + + /** + * called to get a list of bridge internal properties. Which properties can be retrieved, is protocol dependent. + * + * The properties MUST NOT change between a requestChange and a commit change call. + */ + readonly Properties: SafeArray; + + /** + * called to initiate a protocol change. + * + * This method should always be called in the scope of the local bridge setting object, because the remote counter part may do such a call at the same + * time (typically at startup time). + * @param nRandomNumber In case both processes call requestChange at the same time, the caller with the higher nRandomNumber is allowed to call commitChange. + * @returns 1, if the caller may ( and MUST !!!) call commitChange. 0, if the caller is not allowed to call commitChange. This can only happen, if the other + */ + requestChange(nRandomNumber: number): number; + } + + /** allows to resolve an object using the uno-url. */ + interface XUnoUrlResolver extends uno.XInterface { + /** + * resolves an object using the given uno-url. + * @param sUnoUrl the uno-url. The uno-url is specified [here]{@link url="http://udk.openoffice.org/common/man/spec/uno-url.html"} . + * @returns the resolved object, in general a proxy for a remote object. You can use it the same way as you use local references. + */ + resolve(sUnoUrl: string): uno.XInterface; + } + + namespace ModelDependent { + const enum Constants { + CORBA = 4, + JAVA = 3, + OLE = 2, + UNO = 1, + } + } + + namespace oleautomation { + /** + * registers UNO objects as COM objects. + * + * That is, COM class factories are registered with COM at runtime. The required EXE server is the application which deploys this service. In order to + * access the factories by COM API functions, there need to be proper registry entries. This service does not provide for writing those entries. + * + * The instantiation of the registered objects can be carried out by any ordinary mechanism which is used in a certain language to create COM components. + * For example, `CreateObject` in Visual Basic, `CoCreateInstance` in C++. + * + * Currently only a factory for the service {@link com.sun.star.lang.MultiServiceFactory} is registered by this service. The CLSID is + * {82154420-0FBF-11d4-8313-005004526AB4} and the ProgId is com.sun.star.ServiceManager. + * + * {@link ApplicationRegistration} does not provide any particular interface because the UNO objects are registered while instantiating this service and + * deregistered if the implementation, which makes use of this service, is being released. + */ + type ApplicationRegistration = uno.XInterface; + + /** + * maps UNO types to oleautomation types and vice versa. + * + * The function {@link com.sun.star.bridge.XBridgeSupplier2.createBridge()} maps a value of a UNO or Automation type to the desired target type. If a UNO + * interface was mapped to `IDispatch` , then all objects (interfaces, structs) and other types which are obtained from that Automation object are + * automatically mapped to the corresponding Automation types. Hence, if one provides an initial object which forms the root of all other objects, such + * as a service manager, then only that object needs to be explicitly mapped by a call to {@link com.sun.star.bridge.XBridgeSupplier2.createBridge()} . + * The same holds true if an automation object is mapped to an UNO interface. + * + * For Automation objects to be mapped they have to implement `IDispatch` interface. Other COM interfaces, except for `IUnknown` , are not supported. UNO + * interfaces and structs are mapped to `IDispatch` . + * + * The service implements the {@link com.sun.star.bridge.XBridgeSupplier2} interface and handles the model types {@link + * com.sun.star.bridge.ModelDependent.UNO} and {@link com.sun.star.bridge.ModelDependent.OLE} . The service does not specify any requirements for + * registering OLE objects and class factories. + */ + type BridgeSupplier = XBridgeSupplier2; + + /** + * makes it possible to create COM objects as UNO objects. + * + * A COM object must have a ProgId since the ProgId is used as argument for {@link com.sun.star.lang.XMultiServiceFactory.createInstance()} . The only + * interfaces which are mapped are `IUnknown` and `IDispatch` . The created UNO objects support {@link com.sun.star.script.XInvocation} if the original + * COM objects support `IDispatch` . + * + * The optional parameters of the method {@link com.sun.star.lang.XMultiServiceFactory.createInstanceWithArguments()} are reserved for future use; at + * this time they are ignored. + */ + type Factory = lang.XMultiServiceFactory; + + /** + * a tagging interface for UNO objects which represent Automation objects. + * + * If a Automation object is bridged into the UNO environment, then the resulting UNO object does not distinguish itself from any other ordinary UNO + * object. However, it may be desirable to have that distinction regardless, if a UNO client needs to take particular Automation specific characteristics + * into account. By providing {@link XAutomationObject} an object declares to be representing an Automation object. + * @since OOo 1.1.2 + */ + type XAutomationObject = uno.XInterface; + + /** + * is the UNO representation of the Automation type `CY` , also know as `CURRENCY` . + * + * A `CY` could actually be represented as `hyper` in UNO and therefore a typedef from `hyper` to a currency type would do. But a typedef cannot be + * expressed in all language bindings. In the case where no typedefs are supported the actual type is used. That is, a typedef'd currency type would be + * represented as `long` in Java. The information that the `long` is a currency type is lost. + * + * When calling Automation objects from UNO the distinction between `hyper` and a currency type is important. Therefore {@link Currency} is declared as + * struct. + * @since OOo 1.1.2 + */ + interface Currency { + /** corresponds to the Automation type `CY` . */ + Value: number; + } + + /** + * is the UNO representation of the Automation type `DATE` . + * + * A `DATE` could actually be representd as `double` in UNO and therefore a typedef from `double` to a date type would do. But a typedef cannot be + * expressed in all language bindings. In the case where no typedefs are supported the actual type is used. That is, a typedef'd date type would be + * represented as `double` in Java. The information that the `double` is a date type is lost. + * + * When calling Automation objects from UNO the distinction between `double` and date type is important. Therefore {@link Date} is declared as struct. + * @since OOo 1.1.2 + */ + interface Date { + /** corresponds to the Automation type `DATE` . */ + Value: number; + } + + /** + * is the UNO representation of the Automation type `DECIMAL` . + * @since OOo 1.1.2 + */ + interface Decimal { + /** corresponds to `DECIMAL.Hi32` . */ + HighValue: number; + + /** corresponds to `DECIMAL.Lo32` . */ + LowValue: number; + + /** corresponds to `DECIMAL.Mid32` . */ + MiddleValue: number; + + /** corresponds to `DECIMAL.scale` . */ + Scale: number; + + /** corresponds to `DECIMAL.sign` . */ + Sign: number; + } + + /** + * represents a named argument in a call to a method of an Automation object. + * + * The Automation bridge accepts values of {@link NamedArgument} when a call to an Automation object is made. The call is done through the {@link + * com.sun.star.script.XInvocation.invoke()} method, which takes all arguments in a sequence of anys. Usually the order of the arguments must correspond + * to the order of arguments in the Automation method. By using instances of {@link NamedArgument} the arguments in the sequence can be unordered. The + * Automation object being called must support named arguments, otherwise the call fails. + * @since OOo 1.1.2 + */ + interface NamedArgument { + /** The name of the argument, for which {@link NamedArgument.Value} is intended. */ + Name: string; + + /** The value of the argument whoose name is the one as contained in the member {@link Name} . */ + Value: any; + } + + /** + * contains a value that is used as argument in a "property put" operation on a Automation object. + * + * If a Automation object is converted into a UNO object by a scripting bridge, such as {@link com.sun.star.bridge.oleautomation.BridgeSupplier} , then + * it is accessed through the {@link com.sun.star.script.XInvocation} interface. The methods {@link com.sun.star.script.XInvocation.setValue()} and + * {@link com.sun.star.script.XInvocation.getValue()} are used to access properties which do not have additional arguments. To access a property with + * additional arguments, the method {@link com.sun.star.script.XInvocation.invoke()} has to be used. The method implementation must decide, if the + * property is to be written or read so it can perform the proper operation on the Automation object. To make this decision, the caller has to provide + * the information if the current call is intended to be a write or read operation. This is done by providing either instances of {@link + * PropertyPutArgument} or PropertyGetArgument as arguments to com::sun::star::script::XInvocation::Invoke. + * @since OOo 1.1.2 + */ + interface PropertyPutArgument { + /** contains the actual argument. */ + Value: any; + } + + /** + * is the UNO representation of the Automation type SCODE. + * + * A `SCODE` is used to express errors in Automation. In UNO it could be represented by a `long` and therefore a typedef from `long` to a particular + * error type would do. But a typedef cannot be expressed in all language bindings. In the case where no typedefs are supported the actual type is used. + * That is, a typedef'd error type would be represented as `int` in Java. The information that the `int` is an error type is lost. + * + * When calling Automation objects from UNO the distinction between error type and `long` is important. Therefore the Scode is declared as struct. + * @since OOo 1.1.2 + */ + interface SCode { + Value: number; + } + } + } + + namespace chart { + /** must be supported by every component that wants to provide data for a chart */ + type ChartData = XChartData; + + /** @deprecated Deprecated */ + type ChartDataPoint = LibreOffice.SeqEquiv; + + /** + * a service for donut diagrams. + * + * Donut diagrams are also known as ring diagrams. + */ + type DonutDiagram = Diagram; + + /** Values specify the arrangement of the axes descriptions. */ + const enum ChartAxisArrangeOrderType { + /** + * The descriptions are arranged automatically.

If there is enough space to put them side by side, this + * + * arrangement is preferred. If the descriptions would overlap + * + * when arranged side by side, they are staggered.

+ */ + AUTO = 0, + /** The descriptions are arranged side by side. */ + SIDE_BY_SIDE = 1, + /** The descriptions are alternately put on two lines with the even values out of the normal line. */ + STAGGER_EVEN = 2, + /** The descriptions are alternately put on two lines with the odd values out of the normal line. */ + STAGGER_ODD = 3, + } + + /** Specifies the position of the axis labels with respect to the axis on the scale of the crossing axis. */ + const enum ChartAxisLabelPosition { + /** + * The labels are placed adjacent to the axis. When the axis itself is placed at the minimum or maximum of the scale ( that is when the property + * CrossoverPosition equals ChartAxisPosition_MINIMUM or ChartAxisPosition_MAXIMUM) the labels are placed outside the coordinate system. Otherwise the + * labels are placed adjacent to the axis on that side that belongs to the lower values on the crossing axis. E.g. when the ChartAxisLabelPosition is set + * to NEAR_AXIS for an y axis the labels are placed adjacent to the y axis on that side that belongs to the lower x values. + */ + NEAR_AXIS = 0, + /** The labels are placed adjacent to the axis on the opposite side as for NEAR_AXIS. */ + NEAR_AXIS_OTHER_SIDE = 1, + /** + * The labels are placed outside the coordinate region on that side where the crossing axis has its maximum value. E.g. when this is set for an y axis + * the labels are placed outside the diagram on that side where to the x axis has its maximum value. + */ + OUTSIDE_END = 3, + /** + * The labels are placed outside the coordinate region on that side where the crossing axis has its minimum value. E.g. when this is set for an y axis + * the labels are placed outside the diagram on that side where to the x axis has its minimum value. + */ + OUTSIDE_START = 2, + } + + /** Specifies the position of the axis interval marks. */ + const enum ChartAxisMarkPosition { + /** + * The interval marks are drawn at the axis line. This makes a difference to "AT_LABELS" only when the labels are not placed near the axis ( + * @see ChartAxisLabelPosition). + */ + AT_AXIS = 1, + /** The interval marks are drawn besides the axis labels. */ + AT_LABELS = 0, + /** + * Interval marks are drawn at the axis line and also besides the axis labels. This makes a difference to "AT_LABELS" only when the labels are not placed + * near the axis ( + * @see ChartAxisLabelPosition). + */ + AT_LABELS_AND_AXIS = 2, + } + + /** + * Specifies the position of the axis on the scale of the crossing axis. When the property is set at a x-axis it indicates a position on the scale of the + * primary y-axis. When the property is set at a y-axis it indicates a position on the scale of the primary x-axis. + */ + const enum ChartAxisPosition { + /** Cross the other axes at their maximum scale value. */ + END = 2, + /** Cross the other axes at their minimum scale value. */ + START = 1, + /** Cross the other axes at the value specified in the property CrossoverValue. */ + VALUE = 3, + /** Cross the other axes at zero. If zero is not contained in the current scale the value is used which is nearest to zero. */ + ZERO = 0, + } + + /** specifies the type of change that was applied to the data. */ + const enum ChartDataChangeType { + /** Major changes were applied to the data. */ + ALL = 0, + /** The column given in the {@link ChartDataChangeEvent} , was deleted. */ + COLUMN_DELETED = 4, + /** The column given in the {@link ChartDataChangeEvent} , was inserted. */ + COLUMN_INSERTED = 2, + /** The range of columns and rows, given in the {@link ChartDataChangeEvent} , has changed. */ + DATA_RANGE = 1, + /** The row given in the {@link ChartDataChangeEvent} , was deleted. */ + ROW_DELETED = 5, + /** The row given in the {@link ChartDataChangeEvent} , was inserted. */ + ROW_INSERTED = 3, + } + + /** + * specifies if the data rows (aka data series) displayed in the chart, take their values from the row or the column in the underlying data source ( + * {@link ChartDataArray} ). + */ + const enum ChartDataRowSource { + /** values displayed as data rows are taken from the columns of the data source. */ + COLUMNS = 1, + /** values displayed as data rows are taken from the rows of the data source. */ + ROWS = 0, + } + + /** specifies the category of error indicators. */ + const enum ChartErrorCategory { + /** + * displays the same lower and upper error indicators for all data points. + * + * The values for these are given as absolute numbers in {@link ChartStatistics.ConstantErrorLow} and {@link ChartStatistics.ConstantErrorHigh} + * @see ChartStatistics + */ + CONSTANT_VALUE = 5, + /** + * The length of the error indicators for all data points is calculated by taking the percentage given as {@link ChartStatistics.ErrorMargin} of the + * largest data point value. + * @see ChartStatistics + */ + ERROR_MARGIN = 4, + /** + * error indicators are not displayed. + * + * displays no error indicators. + * + * no chart legend is displayed.

To disable the legend you should set the property + * + * ChartDocument::HasLegend to `FALSE` instead + * + * of setting this value.

+ * + * + * + * displays no regression curve. + */ + NONE = 0, + /** + * The length of the error indicators is calculated for each data point by taking the percentage given as {@link ChartStatistics.PercentageError} of its + * value. + * @see ChartStatistics + */ + PERCENT = 3, + /** displays error indicators for the standard deviation (square root of variance) of the data row. */ + STANDARD_DEVIATION = 2, + /** displays error indicators for the variance of the data row. */ + VARIANCE = 1, + } + + /** specifies how the error is indicated. */ + const enum ChartErrorIndicatorType { + /** displays only the lower value. */ + LOWER = 3, + /** + * error indicators are not displayed. + * + * displays no error indicators. + * + * no chart legend is displayed.

To disable the legend you should set the property + * + * ChartDocument::HasLegend to `FALSE` instead + * + * of setting this value.

+ * + * + * + * displays no regression curve. + */ + NONE = 0, + /** displays both the upper and lower values. */ + TOP_AND_BOTTOM = 1, + /** displays only the upper value. */ + UPPER = 2, + } + + /** Specifies sizing aspects of the legend */ + const enum ChartLegendExpansion { + /** The legend entries are arranged in a way that the aspect ratio of the resulting legend is as near to 1 as possible. */ + BALANCED = 2, + /** The size of the legend is given explicitly */ + CUSTOM = 3, + /** + * The legend entries are stacked in a single column if possible. If not enough space is available further columns are added.

This is usually used for + * legends that are displayed on the + * + * left or right hand side of the page.

+ */ + HIGH = 1, + /** + * The legend entries are arranged in a single row if possible. If not enough space is available further rows are added.

This is usually used for + * legends that are displayed at the + * + * top or bottom of the page.

+ */ + WIDE = 0, + } + + /** specifies one of the default positions of the legend in relation to the diagram. */ + const enum ChartLegendPosition { + /** + * displays the chart legend beneath the diagram.

The second entry in the legend is placed on the right hand + * + * side of the first one.

+ */ + BOTTOM = 4, + /** + * displays the chart legend on the left side of the diagram.

The second entry in the legend is placed below the first + * + * one.

+ */ + LEFT = 1, + /** + * error indicators are not displayed. + * + * displays no error indicators. + * + * no chart legend is displayed.

To disable the legend you should set the property + * + * ChartDocument::HasLegend to `FALSE` instead + * + * of setting this value.

+ * + * + * + * displays no regression curve. + */ + NONE = 0, + /** + * displays the chart legend on the right side of the diagram.

The second entry in the legend is placed below the first + * + * one.

+ */ + RIGHT = 3, + /** + * displays the chart legend above the diagram.

The second entry in the legend is placed on the right hand + * + * side of the first one.

+ */ + TOP = 2, + } + + /** specifies the type of the regression curve to be displayed. */ + const enum ChartRegressionCurveType { + /** + * displays an exponential regression curve.

The values of the series are approximated using the model + * + * y = A⋅eBx.

+ */ + EXPONENTIAL = 3, + /** + * displays a linear regression curve.

The values of the series are approximated using the model + * + * y = Ax + B.

+ */ + LINEAR = 1, + /** + * displays a linear logarithmic regression curve.

The values of the series are approximated using the model + * + * y = A⋅log(x) + B.

+ */ + LOGARITHM = 2, + /** + * error indicators are not displayed. + * + * displays no error indicators. + * + * no chart legend is displayed.

To disable the legend you should set the property + * + * ChartDocument::HasLegend to `FALSE` instead + * + * of setting this value.

+ * + * + * + * displays no regression curve. + */ + NONE = 0, + /** displays a polynomial regression curve. */ + POLYNOMIAL = 4, + /** + * displays a regression curve using a power function.

The values of the series are approximated using the model + * + * y = A⋅xB.

+ * + * displays a moving average regression curve. + */ + POWER = 5, + } + + /** + * The {@link AccessibleChartDocumentView} service is supported by a Component that represents the view of a Chart document to provide an entry point to + * the document tree for accessibility. + * + * An object that implements the {@link AccessibleChartDocumentView} service provides information about itself and about the chart subcomponents + * contained in the chart document displayed in a window. This service gives a simplified view on the underlying implementation. It tries both to keep + * the structure of the accessibility representation tree as simple as possible and provide as much relevant information as possible. + * @since OOo 1.1.2 + */ + interface AccessibleChartDocumentView extends accessibility.XAccessible, accessibility.XAccessibleContext, accessibility.XAccessibleComponent { } + + /** + * This service is supported by all components that are contained in the view of a chart document that are controlled by the chart. Shapes added by a + * user via the clipboard are not treated as chart elements. + * + * The list of objects that implement this service is {@link com.sun.star.chart.ChartTitle} , {@link com.sun.star.chart.ChartLegend} , {@link + * com.sun.star.chart.Diagram} , {@link com.sun.star.chart.ChartAxis} , {@link com.sun.star.chart.ChartDataRowProperties} , {@link + * com.sun.star.chart.ChartDataPointProperties} . + * + * The {@link com.sun.star.accessibility.XAccessibleExtendedComponent} is supported by all chart elements. + * @since OOo 1.1.2 + */ + interface AccessibleChartElement extends accessibility.XAccessible, accessibility.XAccessibleContext, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent { } + + /** This is a service for area diagrams. */ + interface AreaDiagram extends Diagram, ChartStatistics, ChartAxisXSupplier, ChartTwoAxisYSupplier, ChartAxisZSupplier, Dim3DDiagram, StackableDiagram { } + + /** This is a service for bar and column diagrams. */ + interface BarDiagram extends Diagram, ChartStatistics, ChartAxisXSupplier, ChartTwoAxisYSupplier, ChartAxisZSupplier, Dim3DDiagram, StackableDiagram { + /** + * If `TRUE` , determines that in a three-dimensional bar chart the bars of each series are arranged behind each other in the z-direction. If `FALSE` the + * arrangement of bars is like in two-dimensional bar charts. + */ + Deep: boolean; + + /** + * If bars of a bar or column chart are attached to different axis, this property determines how to display those. If `TRUE` , the bars are grouped + * together in one block for each axis, thus they are painted one group over the other. + * + * If `FALSE` , the bars are displayed side-by-side, as if they were all attached to the same axis. + * + * If all data series of a bar or column chart are attached to only one axis, this property has no effect. + */ + GroupBarsPerAxis: boolean; + + /** + * Determines how many data rows are displayed as lines rather than bars. + * + * If this property differs from zero the last {@link BarDiagram.NumberOfLines} data rows are shown as lines. It is currently supported by two + * dimensional vertical bar charts only. + * @deprecated Deprecated + */ + NumberOfLines: number; + + /** + * determines if, in a stacked chart, there are connecting lines between corresponding bars. Currently, bar charts with horizontal bars do not support + * this property. + */ + StackedBarsConnected: boolean; + + /** + * Determines if the bars of a chart are drawn vertically or horizontally. Default is vertical. + * + * If Vertical is `FALSE` you get a column chart rather than a bar chart. + */ + Vertical: boolean; + } + + /** + * a service for bubble diagrams. + * @since OOo 3.2 + */ + interface BubbleDiagram extends Diagram, ChartAxisXSupplier, ChartTwoAxisYSupplier, ChartStatistics { } + + /** + * Specifies all the properties for the graphic object of a data point in a three-dimensional bar diagram. + * @see BarDiagram + */ + interface Chart3DBarProperties extends beans.XPropertySet { + /** + * Specifies the solid shape of a data point. + * @see ChartSolidType + */ + SolidType: number; + } + + /** Specifies the area elements of a chart, e.g. the background area, the diagram wall, and the diagram floor of three-dimensional charts. */ + interface ChartArea extends drawing.FillProperties, drawing.LineProperties, xml.UserDefinedAttributesSupplier, beans.XPropertySet { } + + /** + * Specifies the axes in a diagram. + * + * Note: The text properties correlate to all axis description elements, not to just a single text element. + */ + interface ChartAxis extends drawing.LineProperties, style.CharacterProperties, xml.UserDefinedAttributesSupplier, XAxis, beans.XPropertySet { + /** The axis description may be arranged in a special order for a better placement. */ + ArrangeOrder: ChartAxisArrangeOrderType; + + /** The maximum value of the axis scale is calculated by the chart if this property is `TRUE` . */ + AutoMax: boolean; + + /** The minimum value of the axis scale is calculated by the chart if this property is `TRUE` . */ + AutoMin: boolean; + + /** The origin is calculated by the chart if this property is `TRUE` . */ + AutoOrigin: boolean; + + /** The number of help intervals within a main interval is calculated by the chart if this property is `TRUE` . */ + AutoStepHelp: boolean; + + /** The distance between the main tick marks is calculated by the chart if this property is `TRUE` . */ + AutoStepMain: boolean; + + /** + * determines which type of axis this is, e.g. a date-axis or a category-axis + * @see ChartAxisType + * @since OOo 3.4 + */ + AxisType: number; + + /** Determines where the axis crosses the other axis. */ + CrossoverPosition: ChartAxisPosition; + + /** Determines the scale value on the other axis when CrossoverPosition is set to VALUE. */ + CrossoverValue: number; + + /** Properties for axes labels:Determines whether to display text at the axis or not. */ + DisplayLabels: boolean; + + /** + * Specifies the width of the gaps between each set of data points in a bar chart. + * + * The value is given in percent of the width of a bar; the valid range is 0 to 600%. + */ + GapWidth: number; + + /** + * Determines the type of the help marks. + * @see ChartAxisMarks + */ + HelpMarks: number; + + /** Determines where the axis labels are placed. */ + LabelPosition: ChartAxisLabelPosition; + + /** + * determines whether to use the number format given by the container application, e.g. a spreadsheet document, or from the own property {@link + * NumberFormat} . + */ + LinkNumberFormatToSource: boolean; + + /** Determines if the axis is scaled logarithmically or not (linear). */ + Logarithmic: boolean; + + /** Determines where the interval marks are placed. */ + MarkPosition: ChartAxisMarkPosition; + + /** + * Properties for interval marks:Determines the type of the marks. + * @see ChartAxisMarks + */ + Marks: number; + + /** Properties for scaling:Contains the maximum value for the axis scale. */ + Max: number; + + /** Contains the minimum value for the axis scale. */ + Min: number; + + /** + * Contains the type id for the number formatter of the axis. + * @see com.sun.star.util.XNumberFormatter + */ + NumberFormat: number; + + /** + * Indicates the reference value where bars or areas have their grounding. This property has only an effect when the used ODF file format does not allow + * for further axis positioning or the axis is a secondary y-axis. + */ + Origin: number; + + /** + * Properties related to bar charts:Determines the overlap of the bars in a bar-type chart. + * + * The value is given in percent of the width of the bars. The valid range is -100% to +100%. +100% means full overlap, -100% indicates a distance of one + * bar between 2 neighboring bars. + */ + Overlap: number; + + /** Determines if the axis orientation is mathematical or reversed. */ + ReverseDirection: boolean; + + /** @deprecated DeprecatedUser property StepHelpCount instead Contains the distance between the help tick marks. */ + StepHelp: number; + + /** + * Contains the number of help intervals within a main interval. E.g. a StepHelpCount of 5 divides the main interval into 5 pieces and thus produces 4 + * help tick marks. + */ + StepHelpCount: number; + + /** Contains the distance between the main tick marks. */ + StepMain: number; + + /** Determines if long text is broken into multiple lines. */ + TextBreak: boolean; + + /** Determines if certain labels are hidden, if they would otherwise overlap. In this case, the value of this property must be set to `FALSE` . */ + TextCanOverlap: boolean; + + /** Determines the rotation of the text elements (axis description) in 100th degrees. */ + TextRotation: number; + + /** + * if the current axis is a date-axis the intervals are chosen as given with {@link TimeIncrement} + * @since OOo 3.4 + */ + TimeIncrement: TimeIncrement; + } + + /** has to be supported by charts providing the capabilities of a horizontal axis, i.e., an **x** -axis. */ + interface ChartAxisXSupplier extends XAxisXSupplier { + /** + * This property determines if the x-axis is shown or hidden. + * @see ChartAxis + */ + HasXAxis: boolean; + + /** Determines if the description of the x-axis is shown or hidden. */ + HasXAxisDescription: boolean; + + /** + * Determines if the major grid of the x-axis is shown or hidden. + * @see ChartGrid + */ + HasXAxisGrid: boolean; + + /** + * Determines if the minor grid of the x-axis is shown or hidden. + * @see ChartGrid + */ + HasXAxisHelpGrid: boolean; + + /** + * Determines if the title of the x-axis is shown or hidden. + * @see ChartTitle + */ + HasXAxisTitle: boolean; + } + + /** A helper service for the y-axis. */ + interface ChartAxisYSupplier extends XAxisYSupplier { + /** + * Determines if the y-axis is shown or hidden. + * @see ChartAxis + */ + HasYAxis: boolean; + + /** Determines if the description of the y-axis is shown or hidden. */ + HasYAxisDescription: boolean; + + /** + * Determines if the major grid of the y-axis is shown or hidden. + * @see ChartGrid + */ + HasYAxisGrid: boolean; + + /** + * Determines if the minor grid of the y-axis is shown or hidden. + * @see ChartGrid + */ + HasYAxisHelpGrid: boolean; + + /** + * Determines if the title of the y-axis is shown or hidden. + * @see ChartTitle + */ + HasYAxisTitle: boolean; + } + + /** A helper service for chart documents which supply a z-axis. */ + interface ChartAxisZSupplier extends XAxisZSupplier { + /** + * Determines if the z-axis is shown or hidden. + * @see ChartAxis + */ + HasZAxis: boolean; + + /** Determines if the description of the z-axis is shown or hidden. */ + HasZAxisDescription: boolean; + + /** + * Determines if the major grid of the z-axis is shown or hidden. + * @see ChartGrid + */ + HasZAxisGrid: boolean; + + /** + * Determines if the minor grid of the z-axis is shown or hidden. + * @see ChartGrid + */ + HasZAxisHelpGrid: boolean; + + /** + * Determines if the title of the z-axis is shown or hidden. + * @see ChartTitle + */ + HasZAxisTitle: boolean; + } + + /** + * must be supported by each data source for charts, where you want to access the values directly. + * + * It contains the data values as well as the descriptions for each row and column. + */ + interface ChartDataArray extends ChartData, XChartDataArray { } + + /** describes a change that was applied to the data. */ + interface ChartDataChangeEvent extends lang.EventObject { + /** specifies the column number in which the changes end. */ + EndColumn: number; + + /** specifies the row number in which the changes end. */ + EndRow: number; + + /** specifies the column number in which the changes begin. */ + StartColumn: number; + + /** specifies the row number in which the changes begin. */ + StartRow: number; + + /** specifies the type of change to the data. */ + Type: ChartDataChangeType; + } + + /** + * specifies all the properties for the graphic object of a data point (e.g., a single bar in a bar chart). + * + * Text properties correlate to the data description of the data point. There is a similar service for a group of graphic elements called {@link + * ChartDataRowProperties} for the properties of whole data rows. + * @see ChartDataRowProperties + */ + interface ChartDataPointProperties extends drawing.FillProperties, drawing.LineProperties, style.CharacterProperties, xml.UserDefinedAttributesSupplier, + Chart3DBarProperties, beans.XPropertySet { + /** + * specifies how the captions of data points are displayed. + * @see ChartDataCaption + */ + DataCaption: number; + + /** + * specifies a relative position for the data label + * @see DataLabelPlacement + */ + LabelPlacement: number; + + /** specifies a string that is used to separate the parts of a data label (caption) */ + LabelSeparator: string; + + /** specifies a number format for the display of the value in the data label */ + NumberFormat: number; + + /** specifies a number format for the display of the percentage value in the data label */ + PercentageNumberFormat: number; + + /** the offset by which pie segments in a {@link PieDiagram} are dragged outside from the center. This value is given in percent of the radius. */ + SegmentOffset: number; + + /** + * In charts that support symbols, you can set this property to any valid URL that points to a graphic file. This graphic is then used as symbol for each + * data point. + * + * When you query this value you get an internal URL of the embedded graphic. + * @see ChartSymbolType + */ + SymbolBitmapURL: string; + + /** + * specifies the type of symbols if the current chart type supports the usage of symbols. + * @see ChartSymbolType + */ + SymbolType: number; + + /** + * specifies if the text of a data label (caption) must be wrapped + * @since LibreOffice 5.1 + */ + TextWordWrap: boolean; + } + + /** + * describes a single data row, specified by its name and a sequence of data points. + * + * This struct is currently used nowhere. + * @deprecated Deprecated + */ + interface ChartDataRow { + /** The name of the data row. */ + Name: string; + + /** The points contained in this data row. */ + Points: SafeArray>; + } + + /** + * specifies the properties for a group of graphic elements which belong to a data row (also known as data series). + * + * For this service, the properties supported by {@link ChartDataPointProperties} are applied to all data point elements contained in this group. They + * serve as a template; thus, when changing a data point property afterwards + * @see ChartDataPointProperties + */ + interface ChartDataRowProperties extends ChartDataPointProperties, ChartStatistics, xml.UserDefinedAttributesSupplier, beans.XPropertySet { + /** + * determines to which axis the data row is assigned. + * + * The axis must be a primary or secondary y-axis + * @see ChartAxisAssign + * @see ChartAxisYSupplier + * @see ChartTwoAxisYSupplier + */ + Axis: number; + + /** + * holds the properties of the error markers, if those are enabled. + * @see ChartLine + * @see ChartStatistics + */ + DataErrorProperties: beans.XPropertySet; + + /** + * holds the properties of the average line, if such one is enabled. + * @see ChartLine + * @see ChartStatistics + */ + DataMeanValueProperties: beans.XPropertySet; + + /** + * holds the properties of the regression line, if such one is enabled. + * @see ChartLine + * @see ChartStatistics + */ + DataRegressionProperties: beans.XPropertySet; + } + + /** + * describes a single data value, including the error + * + * This struct is currently used nowhere. + * @deprecated Deprecated + */ + interface ChartDataValue { + /** highest possible error value. */ + HighError: number; + + /** lowest possible error value. */ + LowError: number; + + /** value by itself. */ + Value: number; + } + + /** + * is the service for a chart document. + * + * A chart document consists of a reference to the data source, the diagram and some additional elements like a main title, a sub-title or a legend. + * @see Diagram + * @see ChartLegend + * @see ChartTitle + * @see ChartDataArray + */ + interface ChartDocument extends xml.UserDefinedAttributesSupplier, XChartDocument, beans.XPropertySet, drawing.XDrawPageSupplier { + /** determines if the legend is shown or hidden. */ + HasLegend: boolean; + + /** determines if the main title is shown or hidden. */ + HasMainTitle: boolean; + + /** determines if the subtitle is shown or hidden. */ + HasSubTitle: boolean; + } + + /** + * specifies the grid of the diagram in a chart. + * + * The distance between the grid lines depends on the distance of the help or main tick marks, which may be set in {@link ChartAxis} . + * @see ChartAxis + */ + interface ChartGrid extends drawing.LineProperties, xml.UserDefinedAttributesSupplier, beans.XPropertySet { } + + /** + * specifies the legend of a chart. + * + * The text/font properties which are specified in the service {@link com.sun.star.drawing.Shape} correlate to all text objects inside the legend. + */ + interface ChartLegend extends drawing.Shape, style.CharacterProperties, xml.UserDefinedAttributesSupplier { + /** determines the alignment of the legend relative to the diagram. */ + Alignment: ChartLegendPosition; + + /** + * If this property is `TRUE` the position is calculated by the application automatically. Setting this property to false will have no effect. Instead + * use the interface {@link com.sun.star.drawing.XShape} to set a concrete position. + */ + AutomaticPosition: boolean; + } + + /** specifies line elements in a chart (regression lines, etc.). */ + interface ChartLine extends drawing.LineProperties, beans.XPropertySet { } + + /** + * specifies all the properties for the graphic object of a pie segment. + * @see PieDiagram + */ + interface ChartPieSegmentProperties extends ChartDataPointProperties, beans.XPropertySet { + /** + * reflects the offset of a pie segment in percent of the radius. + * + * The default value for all the segments of a {@link PieDiagram} is 0. If you change this value from 0 to 100 the segment is pulled out from the center + * by its radius. + * + * Currently this property is supported by two dimensional pie diagrams only. + */ + SegmentOffset: number; + } + + /** + * This structure describes a single data row, specified by its name and a sequence of data points. + * + * The cell addresses are in the format of the application that contains this chart. + */ + interface ChartSeriesAddress { + /** contains the cell range address of the data for this series. */ + DataRangeAddress: string; + + /** + * contains cell addresses for each domain of this series. + * + * For XY (scatter) diagrams at least one series has a domain. Most of the other chart types use an empty sequence here. + */ + DomainRangeAddresses: SafeArray; + + /** contains the cell address of label (i.e. name) of this series. */ + LabelAddress: string; + } + + /** offers statistical properties for the data in the chart. It is available for a single data row and for the whole diagram. */ + interface ChartStatistics extends beans.XPropertySet { + /** + * specifies the upper limit of the error range of a data row. + * + * this setting is effective if the {@link ChartStatistics.ErrorCategory} is set to ChartErrorCategory::CONSTANT_VALUE. + * @see ConstantErrorLow + * @see ErrorCategory + */ + ConstantErrorHigh: number; + + /** + * specifies the lower limit of the error range of a data row. + * + * this setting is effective if the {@link ChartStatistics.ErrorCategory} is set to ChartErrorCategory::CONSTANT_VALUE. + * @see ConstantErrorHigh + * @see ErrorCategory + */ + ConstantErrorLow: number; + + /** contains a cell range string for negative error bars. This property is used when the ErrorBarCategory is set to ErrorBarCategory::FROM_DATA. */ + ErrorBarRangeNegative: string; + + /** contains a cell range string for positive error bars. This property is used when the ErrorBarCategory is set to ErrorBarCategory::FROM_DATA. */ + ErrorBarRangePositive: string; + + /** + * determines the style of the error bars. Use this instead of ErrorCategory + * @see ErrorBarStyle + */ + ErrorBarStyle: number; + + /** + * determines the type of error to indicate. + * @deprecated Deprecated + * @see ChartErrorCategory + * @see PercentageError + * @see ErrorMargin + * @see ConstantErrorLow + * @see ConstantErrorHigh + * @see ErrorIndicator + */ + ErrorCategory: ChartErrorCategory; + + /** + * determines how the error is indicated. + * + * You can enable indicators pointing up, down or both. + * @see ErrorCategory + */ + ErrorIndicator: ChartErrorIndicatorType; + + /** + * specifies the percentage for the margin of errors. + * + * The length of the error indicators is calculated by taking the percentage given of the largest data point value. + * + * this setting is effective if the {@link ChartStatistics.ErrorCategory} is set to ChartErrorCategory::ERROR_MARGIN. + * @see ErrorCategory + */ + ErrorMargin: number; + + /** determines if the mean value for a data row is displayed as a line. */ + MeanValue: boolean; + + /** + * specifies the percentage that is used to display error bars. + * + * The length of the error indicators is calculated for each data point by taking the given percentage of its value. + * + * this setting is effective if the {@link ChartStatistics.ErrorCategory} is set to ChartErrorCategory::PERCENT. + * @see ErrorCategory + */ + PercentageError: number; + + /** + * determines a type of regression for the data row values. + * @see ChartRegressionCurveType + */ + RegressionCurves: ChartRegressionCurveType; + } + + /** + * This is a helper service for access to table Address to cell ranges of the container document of a chart. + * + * The cell addresses are in the format of the application that contains this chart. + */ + interface ChartTableAddressSupplier { + /** + * contains the address to the cells containing the names of the categories. + * + * Note: Each value of a data series belongs exactly to one category. + */ + CategoriesRangeAddress: string; + + /** contains the address to the main title. */ + MainTitleAddress: string; + + /** + * contains the addresses to the elements of a series. This sequence should contain one element for each series in the chart. + * @see ChartSeriesAddress + */ + SeriesAddresses: SafeArray; + + /** contains the address to the sub title. */ + SubTitleAddress: string; + } + + /** + * specifies titles in a chart. + * + * In a chart there may be the following titles: the main title, the sub title, and axis titles of the x- and y-axis. + */ + interface ChartTitle extends drawing.Shape, xml.UserDefinedAttributesSupplier { + /** + * If this property is `TRUE` the position is calculated by the application automatically. Setting this property to false will have no effect. Instead + * use the interface {@link com.sun.star.drawing.XShape} to set a concrete position. + */ + AutomaticPosition: boolean; + + /** + * contains the text of the title. + * + * Note that you cannot change attributes of parts of a title, e.g., put one word in bold characters. All formatting affects the entire string. + */ + String: string; + + /** + * specifies the rotation of the shape in 100th of degrees. + * + * Especially in three-dimensional charts, this property comes in handy if you want to align the axis titles with the axis, which are usually not + * vertical or horizontal in the two-dimensional projection. + */ + TextRotation: number; + } + + /** a helper service for chart documents which supply primary and secondary x-axes. */ + interface ChartTwoAxisXSupplier extends XTwoAxisXSupplier, ChartAxisXSupplier { + /** + * determines if the secondary x-axis is shown or hidden. + * @see ChartAxis + */ + HasSecondaryXAxis: boolean; + + /** determines for the secondary x-axis if the labels at the tick marks are shown or hidden. */ + HasSecondaryXAxisDescription: boolean; + + /** + * determines if the title of the secondary X-axis is shown or hidden. + * @see ChartTitle + * @since OOo 3.0 + */ + HasSecondaryXAxisTitle: boolean; + } + + /** a helper service for chart documents which supply primary and secondary y-axes. */ + interface ChartTwoAxisYSupplier extends XTwoAxisYSupplier, ChartAxisYSupplier { + /** + * determines if the secondary y-axis is shown or hidden. + * @see ChartAxis + */ + HasSecondaryYAxis: boolean; + + /** determines for the secondary y-axis if the labels at the tick marks are shown or hidden. */ + HasSecondaryYAxisDescription: boolean; + + /** + * determines if the title of the secondary y-axis is shown or hidden. + * @see ChartTitle + * @since OOo 3.0 + */ + HasSecondaryYAxisTitle: boolean; + } + + /** + * the base service for the diagram of the chart document. + * + * The diagram is the object that contains the actual plot. + * + * Different {@link Diagram} Types, e.g., {@link PieDiagram} or {@link LineDiagram} , can be instantiated by the {@link + * com.sun.star.lang.XMultiServiceFactory} of the {@link XChartDocument} . + */ + interface Diagram extends XDiagram, XAxisSupplier, XSecondAxisTitleSupplier, XDiagramPositioning, beans.XPropertySet, xml.UserDefinedAttributesSupplier { + /** + * If this property is `TRUE` the position is calculated by the application automatically. Setting this property to false will have no effect. Instead + * use the interface {@link com.sun.star.drawing.XShape} to set a concrete position (note {@link com.sun.star.chart.XDiagram} is derived from {@link + * com.sun.star.drawing.XShape} ). + */ + AutomaticPosition: boolean; + + /** + * If this property is `TRUE` the size is calculated by the application automatically. Setting this property to false will have no effect. Instead use + * the interface {@link com.sun.star.drawing.XShape} to set a concrete size (note {@link com.sun.star.chart.XDiagram} is derived from {@link + * com.sun.star.drawing.XShape} ). + */ + AutomaticSize: boolean; + + /** + * specifies how the caption of data points is displayed. + * @see ChartDataCaption + */ + DataCaption: number; + + /** + * determines if the data for a data row is contained in the columns or in the rows of the data array. + * @see ChartDataRowSource + * @see ChartDataArray + */ + DataRowSource: ChartDataRowSource; + + /** + * specifies how empty or invalid cells in the provided data should be handled when displayed + * @see MissingValueTreatment + */ + MissingValueTreatment: number; + } + + /** is a service for diagrams that support the capability to render themselves as three-dimensional diagrams as well as two-dimensional ones. */ + interface Dim3DDiagram extends X3DDisplay, X3DDefaultSetter { + /** If set to `TRUE` , the chart becomes a three-dimensional chart. Otherwise it is two-dimensional. */ + Dim3D: boolean; + + /** Perspective of 3D charts ( [0,100] ). */ + Perspective: number; + + /** Horizontal rotation of 3D charts in degrees ( ]-180,180] ). */ + RotationHorizontal: number; + + /** Vertical rotation of 3D charts in degrees ( ]-180,180] ). */ + RotationVertical: number; + } + + /** + * specifies filled net diagrams. + * @since OOo 3.2 Net diagrams are also known as radar diagrams. + */ + interface FilledNetDiagram extends Diagram, ChartAxisXSupplier, ChartAxisYSupplier, StackableDiagram { } + + /** specifies line, spline and symbol diagrams. */ + interface LineDiagram extends Diagram, ChartStatistics, ChartAxisXSupplier, ChartTwoAxisYSupplier, ChartAxisZSupplier, Dim3DDiagram, StackableDiagram { + /** determines if the chart type has lines connecting the data points or contains just symbols. */ + Lines: boolean; + + /** + * specifies the power of the polynomials used for spline calculation + * + * This property is only valid for B-splines + */ + SplineOrder: number; + + /** determines the number of sampling points of a spline */ + SplineResolution: number; + + /** + * determines if the chart is a spline-chart type and specifies the type of splines. + * @see CurveStyle You can set the following values: {{table here, see documentation}} + */ + SplineType: number; + + /** + * Set this property to any valid URL that points to a graphic file. This graphic is then used as symbol for all series. + * + * When you query this value you get an internal URL of the embedded graphic. + * @deprecated Deprecated + * @see ChartSymbolType + */ + SymbolBitmapURL: string; + + /** specifies the size of symbols in 1/100th of a millimeter. */ + SymbolSize: awt.Size; + + /** + * determines which type of symbols are displayed. + * + * In this interface, only the two values {@link ChartSymbolType.NONE} and {@link ChartSymbolType.AUTO} are supported. Later versions may support the + * selection of the symbols shape. + * + * If you set this property to {@link ChartSymbolType.AUTO} , you can change the symbol shape for objects supporting the service {@link + * ChartDataPointProperties} or {@link ChartDataRowProperties} . + * @see ChartDataPointProperties + * @see ChartDataRowProperties + */ + SymbolType: number; + } + + /** + * specifies net diagrams. + * + * Net diagrams are also known as radar diagrams. + */ + interface NetDiagram extends Diagram, StackableDiagram, ChartAxisYSupplier { } + + /** a service for pie diagrams. */ + interface PieDiagram extends Diagram, Dim3DDiagram { } + + /** a helper service for stackable chart types (e.g., charts in which the data rows may be displayed stacked on each other or in percent relation). */ + interface StackableDiagram { + /** If `TRUE` , the series of the diagram are stacked and each category sums up to 100%. */ + Percent: boolean; + + /** + * If `TRUE` , the series of the diagram are stacked. + * + * If you have a stacked bar chart, you can easily determine the sum of data in each category, by taking the top of the topmost bar. + */ + Stacked: boolean; + } + + /** + * specifies a diagram which can be used for presenting stock quotes. + * + * Note that the data must have a specific structure for stock diagrams. Let us assume that data is interpreted, such that series are taken from columns + * (see property {@link Diagram.DataRowSource} ). Then you need tables of the following structures for different types: + * + * **StockDiagram::Volume is FALSEStockDiagram::UpDown is FALSE**{{table here, see documentation}} + * + * **StockDiagram::Volume is TRUEStockDiagram::UpDown is FALSE**{{table here, see documentation}} + * + * **StockDiagram::Volume is FALSEStockDiagram::UpDown is TRUE**{{table here, see documentation}} + * + * **StockDiagram::Volume is TRUEStockDiagram::UpDown is TRUE**{{table here, see documentation}} + */ + interface StockDiagram extends XStatisticDisplay, ChartStatistics, Diagram, ChartAxisXSupplier, ChartTwoAxisYSupplier { + /** + * indicates if a stock chart contains data representing the value of stocks on the opening and closing date. + * + * The difference will be indicated by bars. The color of the bar will be significant for positive or negative differences between open and closed data. + * + * If this property is `FALSE` , the values of the first series (or second if {@link StockDiagram.Volume} is `TRUE` ) of the chart data are interpreted + * as the day's lowest value. The next series is interpreted as the day's highest value, and the last series is interpreted as the closing value. + * + * If this property is set to `TRUE` , one additional series is needed with the opening value of the stocks. It is assumed as the series before the + * series with the day's lowest value. + */ + UpDown: boolean; + + /** + * indicates if a stock chart contains data representing the volume of stocks. + * + * The values of the volume are represented as columns like those of a {@link BarDiagram} . + * + * If this property is set to `TRUE` , the values of the first series of the chart data are interpreted as volume. + */ + Volume: boolean; + } + + /** + * A {@link TimeIncrement} describes how tickmarks are positioned on the scale of a date-time axis. + * @since OOo 3.4 + */ + interface TimeIncrement { + /** + * if the any contains a struct of type {@link com.sun.star.chart.TimeInterval} this is used as a fixed distance value for the major tickmarks. + * Otherwise, if the any is empty or contains an incompatible type, the distance between major tickmarks is calculated automatically by the application. + */ + MajorTimeInterval: any; + + /** + * if the any contains a struct of type {@link com.sun.star.chart.TimeInterval} this is used as a fixed distance value for the minor tickmarks. + * Otherwise, if the any is empty or contains an incompatible type, the distance between minor tickmarks is calculated automatically by the application. + */ + MinorTimeInterval: any; + + /** + * if the any contains a constant of type {@link com.sun.star.chart.TimeUnit} this is the smallest time unit that is displayed on the date-time axis. + * Otherwise, if the any is empty or contains an incompatible type, the resolution is chosen automatically by the application. + */ + TimeResolution: any; + } + + /** + * Describes an interval on a date-axis + * @since OOo 3.4 + */ + interface TimeInterval { + /** specifies the number of units */ + Number: number; + + /** + * specifies a unit for the interval + * + * is a value out of the constant group {@link com.sun.star.chart.TimeUnit} . + */ + TimeUnit: number; + } + + /** + * makes it easy to set suitable defaults for illumination and rotation for 3D charts + * @see Dim3DDiagram + */ + interface X3DDefaultSetter extends uno.XInterface { + /** The result may depend on the current chart type and the current shade mode. */ + set3DSettingsToDefault(): void; + + /** + * set suitable defaults for the illumination of the current 3D chart. The result may dependent on other 3D settings as rotation or shade mode. It may + * depend on the current chart type also. + */ + setDefaultIllumination(): void; + + /** sets a suitable default for the rotation of the current 3D chart. The result may depend on the current chart type. */ + setDefaultRotation(): void; + } + + /** + * gives access to 3D elements of a three-dimensional chart. + * @see Dim3DDiagram + */ + interface X3DDisplay extends uno.XInterface { + /** + * @returns the properties of the floor. This is only valid for three-dimensional diagrams. + * @see ChartArea + */ + readonly Floor: beans.XPropertySet; + + /** + * @returns the properties of the floor. This is only valid for three-dimensional diagrams. + * @see ChartArea + */ + getFloor(): beans.XPropertySet; + + /** + * @returns the properties of the diagram wall(s). This specifies the properties of the two side walls of the chart scene. Note that this property is also + * @see ChartArea + */ + getWall(): beans.XPropertySet; + + /** + * @returns the properties of the diagram wall(s). This specifies the properties of the two side walls of the chart scene. Note that this property is also + * @see ChartArea + */ + readonly Wall: beans.XPropertySet; + } + + /** + * Allows easier access to the different subelements of an axis. + * @since OOo 3.4 + */ + interface XAxis extends uno.XInterface { + /** @returns the title of the axis. The returned object supports the properties described in service {@link ChartTitle} . */ + readonly AxisTitle: beans.XPropertySet; + + /** @returns the title of the axis. The returned object supports the properties described in service {@link ChartTitle} . */ + getAxisTitle(): beans.XPropertySet; + + /** @returns the properties of the major grid of the axis. The returned object supports service {@link ChartGrid} . */ + getMajorGrid(): beans.XPropertySet; + + /** @returns the properties of the minor grid of the axis. The returned object supports service {@link ChartGrid} . */ + getMinorGrid(): beans.XPropertySet; + + /** @returns the properties of the major grid of the axis. The returned object supports service {@link ChartGrid} . */ + readonly MajorGrid: beans.XPropertySet; + + /** @returns the properties of the minor grid of the axis. The returned object supports service {@link ChartGrid} . */ + readonly MinorGrid: beans.XPropertySet; + } + + /** + * Easier access to the different axes within a chart. + * @since OOo 3.4 + */ + interface XAxisSupplier extends uno.XInterface { + /** + * @param nDimensionIndex Parameter nDimensionIndex says whether it is a x, y or z-axis (0 for x). + * @returns the primary axis of the specified dimension. The returned object supports service {@link ChartAxis} . + */ + getAxis(nDimensionIndex: number): XAxis; + + /** + * @param nDimensionIndex Parameter nDimensionIndex says whether it is a x, y or z-axis (0 for x). + * @returns the secondary axis of the specified dimension. The returned object supports service {@link ChartAxis} . + */ + getSecondaryAxis(nDimensionIndex: number): XAxis; + } + + /** + * gives access to the **x** -axis of a chart. + * + * Note that not all diagrams are capable of displaying an **x** -axis, e.g., the {@link PieDiagram} . + * @see XDiagram + */ + interface XAxisXSupplier extends uno.XInterface { + /** + * @returns the properties of the **x** -axis of the diagram. The returned property set contains scaling properties as well as formatting properties. + * @see ChartAxis + */ + getXAxis(): beans.XPropertySet; + + /** + * @returns the **x** -axis title shape. + * @see ChartTitle + */ + getXAxisTitle(): drawing.XShape; + + /** + * @returns the properties of the help grid (minor grid) of the **x** -axis of the diagram. + * @see ChartGrid + */ + getXHelpGrid(): beans.XPropertySet; + + /** + * @returns the properties of the main grid (major grid) of the **x** -axis of the diagram. + * @see ChartGrid + */ + getXMainGrid(): beans.XPropertySet; + + /** + * @returns the properties of the **x** -axis of the diagram. The returned property set contains scaling properties as well as formatting properties. + * @see ChartAxis + */ + readonly XAxis: beans.XPropertySet; + + /** + * @returns the **x** -axis title shape. + * @see ChartTitle + */ + readonly XAxisTitle: drawing.XShape; + + /** + * @returns the properties of the help grid (minor grid) of the **x** -axis of the diagram. + * @see ChartGrid + */ + readonly XHelpGrid: beans.XPropertySet; + + /** + * @returns the properties of the main grid (major grid) of the **x** -axis of the diagram. + * @see ChartGrid + */ + readonly XMainGrid: beans.XPropertySet; + } + + /** + * gives access to the **y** -axis of a chart. + * + * Note that not all diagrams are capable of displaying a **y** -axis, e.g., the {@link PieDiagram} . + * @see XDiagram + */ + interface XAxisYSupplier extends uno.XInterface { + /** + * @returns the properties of the **y** -axis of the diagram. The returned property set contains scaling properties as well as formatting properties. + * @see ChartAxis + */ + getYAxis(): beans.XPropertySet; + + /** + * @returns the **y** -axis title shape. + * @see ChartTitle + */ + getYAxisTitle(): drawing.XShape; + + /** + * @returns the properties of the help grid (minor grid) of the **y** -axis of the diagram. + * @see ChartGrid + */ + getYHelpGrid(): beans.XPropertySet; + + /** + * @returns the properties of the main grid (major grid) of the **y** -axis of the diagram. + * @see ChartGrid + */ + getYMainGrid(): beans.XPropertySet; + + /** + * @returns the properties of the **y** -axis of the diagram. The returned property set contains scaling properties as well as formatting properties. + * @see ChartAxis + */ + readonly YAxis: beans.XPropertySet; + + /** + * @returns the **y** -axis title shape. + * @see ChartTitle + */ + readonly YAxisTitle: drawing.XShape; + + /** + * @returns the properties of the help grid (minor grid) of the **y** -axis of the diagram. + * @see ChartGrid + */ + readonly YHelpGrid: beans.XPropertySet; + + /** + * @returns the properties of the main grid (major grid) of the **y** -axis of the diagram. + * @see ChartGrid + */ + readonly YMainGrid: beans.XPropertySet; + } + + /** + * gives access to the **z** -axis of a chart. + * @see XDiagram + */ + interface XAxisZSupplier extends uno.XInterface { + /** + * @returns the properties of the **z** -axis of the diagram. The returned property set contains scaling properties as well as formatting properties. + * @see ChartAxis + */ + getZAxis(): beans.XPropertySet; + + /** + * @returns the **z** -axis title shape. + * @see ChartTitle + */ + getZAxisTitle(): drawing.XShape; + + /** + * @returns the properties of the help grid (minor grid) of the **z** -axis of the diagram. + * @see ChartGrid + */ + getZHelpGrid(): beans.XPropertySet; + + /** + * @returns the properties of the main grid (major grid) of the **z** -axis of the diagram. + * @see ChartGrid + */ + getZMainGrid(): beans.XPropertySet; + + /** + * @returns the properties of the **z** -axis of the diagram. The returned property set contains scaling properties as well as formatting properties. + * @see ChartAxis + */ + readonly ZAxis: beans.XPropertySet; + + /** + * @returns the **z** -axis title shape. + * @see ChartTitle + */ + readonly ZAxisTitle: drawing.XShape; + + /** + * @returns the properties of the help grid (minor grid) of the **z** -axis of the diagram. + * @see ChartGrid + */ + readonly ZHelpGrid: beans.XPropertySet; + + /** + * @returns the properties of the main grid (major grid) of the **z** -axis of the diagram. + * @see ChartGrid + */ + readonly ZMainGrid: beans.XPropertySet; + } + + /** + * manages the data of the chart. + * @see XChartDocument + */ + interface XChartData extends uno.XInterface { + /** + * allows a component supporting the {@link XChartDataChangeEventListener} interface to register as listener. The component will be notified with a + * {@link ChartDataChangeEvent} every time the chart's data changes. + * @param aListener the component that is to be added as listener + * @see XChartDataChangeEventListener + * @see ChartDataChangeEvent + */ + addChartDataChangeEventListener(aListener: XChartDataChangeEventListener): void; + + /** @returns the value which is to be used as an indicator for a missing value in the data. In IEEE arithmetic format it is one of the NaN values, so there a */ + getNotANumber(): number; + + /** + * checks whether the value given is equal to the indicator value for a missing value. + * + * In IEEE arithmetic format it is one of the NaN values, so there are no conflicts with existing numeric values. + * + * Always use this method to check, if a value is **not a number** . If you compare the value returned by {@link XChartData.getNotANumber()} to another + * double value using the = operator, you may not get the desired result! + * @param nNumber the number that you want to check for validity. + * @returns `TRUE` if the number given is interpreted by the chart as a missing value. + */ + isNotANumber(nNumber: number): boolean; + + /** @returns the value which is to be used as an indicator for a missing value in the data. In IEEE arithmetic format it is one of the NaN values, so there a */ + readonly NotANumber: number; + + /** + * removes a previously registered listener. + * @param aListener the component that is to be removed + */ + removeChartDataChangeEventListener(aListener: XChartDataChangeEventListener): void; + } + + /** + * gives access to data represented as an array of rows. + * + * Can be obtained from interface {@link XChartDocument} via method {@link getData()} . + * + * If used for an {@link XYDiagram} , the row number 0 represents the **x** -values. + */ + interface XChartDataArray extends XChartData { + /** + * retrieves the description texts for all columns. + * @returns a sequence of strings, each representing the description of a column. + */ + ColumnDescriptions: SafeArray; + + /** + * retrieves the numerical data as a nested sequence of values. + * @returns the values as a sequence of sequences. The inner sequence represents rows. + */ + Data: SafeArray>; + + /** + * retrieves the description texts for all columns. + * @returns a sequence of strings, each representing the description of a column. + */ + getColumnDescriptions(): SafeArray; + + /** + * retrieves the numerical data as a nested sequence of values. + * @returns the values as a sequence of sequences. The inner sequence represents rows. + */ + getData(): SafeArray>; + + /** + * retrieves the description texts for all rows. + * @returns a sequence of strings, each representing the description of a row. + */ + getRowDescriptions(): SafeArray; + + /** + * retrieves the description texts for all rows. + * @returns a sequence of strings, each representing the description of a row. + */ + RowDescriptions: SafeArray; + + /** + * sets the description texts for all columns. + * @param aColumnDescriptions a sequence of strings which represent a description for each column. + */ + setColumnDescriptions(aColumnDescriptions: LibreOffice.SeqEquiv): void; + + /** + * sets the chart data as an array of numbers. + * @param aData the values as a sequence of sequences. The inner sequence represents rows. + */ + setData(aData: LibreOffice.SeqEquiv>): void; + + /** + * sets the description texts for all rows. + * @param aRowDescriptions a sequence of strings which represent a description for each row. + */ + setRowDescriptions(aRowDescriptions: LibreOffice.SeqEquiv): void; + } + + /** makes it possible to receive events when chart data changes. */ + interface XChartDataChangeEventListener extends lang.XEventListener { + /** + * is called whenever chart data changes in value or structure. + * + * This interface must be implemented by components that wish to get notified of changes in chart data. They can be registered at an {@link XChartData} + * component. + * @param aEvent the event that gives further information on what changed. + * @see ChartDataChangeEvent + * @see XChartData + */ + chartDataChanged(aEvent: ChartDataChangeEvent): void; + } + + /** + * manages the chart document. + * @see XDiagram + * @see XChartData + */ + interface XChartDocument extends frame.XModel { + /** + * @returns the properties of the background area of the chart document. The area's extent is equal to the document size. If you want to access properties o + * @see ChartArea + * @see X3DDisplay + */ + readonly Area: beans.XPropertySet; + + /** + * attaches data to the chart. + * + * The given object needs to support interface {@link XChartDataArray} . + * + * Since OOo 3.3 if the given object might support interface {@link XComplexDescriptionAccess} which allows to set complex hierarchical axis + * descriptions. + * + * Since OOo 3.4 if the given object might support interface {@link XDateCategories} which allows to set date values as x values for category charts. + * + * The given data is copied before it is applied to the chart. So changing xData after this call will have no effect on the chart. + * @param xData the object that provides the new data. + * @see XChartData + * @see XChartDataArray + * @see XComplexDescriptionAccess + * @see XDateCategories + */ + attachData(xData: XChartData): void; + + /** + * @returns the data of the chart. The returned object supports interface {@link XChartDataArray} which can be used to access the concrete data. Since OOo + * @see XChartData + * @see XChartDataArray + * @see XComplexDescriptionAccess + * @see XDateCategories + */ + readonly Data: XChartData; + + /** + * @returns the diagram of the chart document. + * @see Diagram + */ + Diagram: XDiagram; + + /** + * @returns the properties of the background area of the chart document. The area's extent is equal to the document size. If you want to access properties o + * @see ChartArea + * @see X3DDisplay + */ + getArea(): beans.XPropertySet; + + /** + * @returns the data of the chart. The returned object supports interface {@link XChartDataArray} which can be used to access the concrete data. Since OOo + * @see XChartData + * @see XChartDataArray + * @see XComplexDescriptionAccess + * @see XDateCategories + */ + getData(): XChartData; + + /** + * @returns the diagram of the chart document. + * @see Diagram + */ + getDiagram(): XDiagram; + + /** + * @returns the shape of the legend of the chart document. + * @see ChartLegend + */ + getLegend(): drawing.XShape; + + /** + * @returns the shape of the subtitle of the chart document. Usually the subtitle is smaller than the main title by default. And it is most commonly placed + * @see ChartTitle + */ + getSubTitle(): drawing.XShape; + + /** + * @returns the shape of the main title of the chart document. + * @see ChartTitle + */ + getTitle(): drawing.XShape; + + /** + * @returns the shape of the legend of the chart document. + * @see ChartLegend + */ + readonly Legend: drawing.XShape; + + /** + * sets the diagram for the chart document. + * + * Setting a new diagram implicitly disposes the previous diagram. + * @param xDiagram the new diagram that should be set for the chart. To create such a diagram component, you can use the {@link com.sun.star.lang.XMultiSer + */ + setDiagram(xDiagram: XDiagram): void; + + /** + * @returns the shape of the subtitle of the chart document. Usually the subtitle is smaller than the main title by default. And it is most commonly placed + * @see ChartTitle + */ + readonly SubTitle: drawing.XShape; + + /** + * @returns the shape of the main title of the chart document. + * @see ChartTitle + */ + readonly Title: drawing.XShape; + } + + /** + * Offers access to complex column and row descriptions. + * + * Can be obtained from interface {@link XChartDocument} via method {@link getData()} . + * @since OOo 3.3 + */ + interface XComplexDescriptionAccess extends XChartDataArray { + /** + * retrieves the description texts for all columns. + * @returns a sequence of sequences of strings representing the descriptions of all columns. The outer index represents different columns. The inner index re + */ + ComplexColumnDescriptions: SafeArray>; + + /** + * retrieves the description texts for all rows. + * @returns a sequence of sequences of strings representing the descriptions of all rows. The outer index represents different rows. The inner index represen + */ + ComplexRowDescriptions: SafeArray>; + + /** + * retrieves the description texts for all columns. + * @returns a sequence of sequences of strings representing the descriptions of all columns. The outer index represents different columns. The inner index re + */ + getComplexColumnDescriptions(): SafeArray>; + + /** + * retrieves the description texts for all rows. + * @returns a sequence of sequences of strings representing the descriptions of all rows. The outer index represents different rows. The inner index represen + */ + getComplexRowDescriptions(): SafeArray>; + + /** + * sets the description texts for all columns. + * @param rColumnDescriptions a sequence of sequences of strings which represent the descriptions of all columns. The outer index represents different colu + */ + setComplexColumnDescriptions(rColumnDescriptions: LibreOffice.SeqEquiv>): void; + + /** + * sets the description texts for all rows. + * @param rRowDescriptions a sequence of sequences of strings representing the descriptions of all rows. The outer index represents different rows. The inn + */ + setComplexRowDescriptions(rRowDescriptions: LibreOffice.SeqEquiv>): void; + } + + /** + * Allows to set date values as categories. + * + * Can be obtained from interface {@link XChartDocument} via method getData(). + * @since OOo 3.4 + */ + interface XDateCategories { + /** + * retrieves the date values if the category x-axis id a date axis + * @returns a sequence of doubles representing dates. + */ + DateCategories: SafeArray; + + /** + * retrieves the date values if the category x-axis id a date axis + * @returns a sequence of doubles representing dates. + */ + getDateCategories(): SafeArray; + + /** + * sets dates as categories + * @param rDates a sequence of sequences of doubles representing dates. + */ + setDateCategories(rDates: LibreOffice.SeqEquiv): void; + } + + /** + * manages the diagram of the chart document. + * @see XChartDocument + */ + interface XDiagram extends drawing.XShape { + /** @returns a string representing the diagram type. This string contains the fully qualified name of the corresponding service. */ + readonly DiagramType: string; + + /** + * @param nCol the index of the data point of a series (0-based). + * @param nRow the index of a series (0-based). + * @returns the properties of the specified data point. + * @see ChartDataPointProperties + */ + getDataPointProperties(nCol: number, nRow: number): beans.XPropertySet; + + /** + * @param nRow the index of the series (0-based) + * @returns the properties of the specified data row (series). + * @see ChartDataRowProperties + */ + getDataRowProperties(nRow: number): beans.XPropertySet; + + /** @returns a string representing the diagram type. This string contains the fully qualified name of the corresponding service. */ + getDiagramType(): string; + } + + /** + * allow for different positioning options for a diagram + * @see Diagram + */ + interface XDiagramPositioning extends uno.XInterface { + /** @returns the position rectangle of the inner diagram part excluding any axes, labels and titles. Position and size are given in 100/th mm. It might be nec */ + calculateDiagramPositionExcludingAxes(): awt.Rectangle; + + /** @returns the position rectangle of the diagram including the axes and axes labels, but excluding the axes titles. Position and size are given in 100/th mm */ + calculateDiagramPositionIncludingAxes(): awt.Rectangle; + + /** @returns the position rectangle of the diagram including the axes, axes labels and axes titles. Position and size are given in 100/th mm. It might be nece */ + calculateDiagramPositionIncludingAxesAndAxisTitles(): awt.Rectangle; + + /** @returns whether the diagram is placed automatically */ + isAutomaticDiagramPositioning(): boolean; + + /** @returns true in case the diagram position was set with method setDiagramPositionExcludingAxes */ + isExcludingDiagramPositioning(): boolean; + + /** the diagram will be placed automatically */ + setAutomaticDiagramPositioning(): void; + + /** + * place the inner diagram part excluding any axes, labels and titles + * @param PositionRect specifies the position and size in 100/th mm + */ + setDiagramPositionExcludingAxes(PositionRect: awt.Rectangle): void; + + /** + * place the outer diagram part including the axes and axes labels, but excluding the axes titles. + * @param PositionRect specifies the position and size in 100/th mm + */ + setDiagramPositionIncludingAxes(PositionRect: awt.Rectangle): void; + + /** + * place the diagram including the axes, axes labels and axes titles. For the placement the current axis titles are taken into account, so the titles + * must be initialized properly before this method is called. + * @param PositionRect specifies the position and size in 100/th mm + */ + setDiagramPositionIncludingAxesAndAxisTitles(PositionRect: awt.Rectangle): void; + } + + interface XSecondAxisTitleSupplier extends uno.XInterface { + getSecondXAxisTitle(): drawing.XShape; + getSecondYAxisTitle(): drawing.XShape; + readonly SecondXAxisTitle: drawing.XShape; + readonly SecondYAxisTitle: drawing.XShape; + } + + /** + * gives access to statistical elements for the chart. + * + * Statistical elements are used by a {@link StockDiagram} . + * @see XChartDocument + * @see StockDiagram + */ + interface XStatisticDisplay extends uno.XInterface { + /** + * @returns the properties of the down bars of a stock chart which has {@link StockDiagram.UpDown} set to `TRUE` . The **DownBar** is the box that is drawn + * @see ChartArea + */ + readonly DownBar: beans.XPropertySet; + + /** + * @returns the properties of the down bars of a stock chart which has {@link StockDiagram.UpDown} set to `TRUE` . The **DownBar** is the box that is drawn + * @see ChartArea + */ + getDownBar(): beans.XPropertySet; + + /** + * @returns the properties of the lines that are drawn between the lowest and highest stock value during a day. + * @see ChartLine + */ + getMinMaxLine(): beans.XPropertySet; + + /** + * @returns the properties of the up bars of a stock chart which has {@link StockDiagram.UpDown} set to `TRUE` . The **UpBar** is the box that is drawn betw + * @see ChartArea + */ + getUpBar(): beans.XPropertySet; + + /** + * @returns the properties of the lines that are drawn between the lowest and highest stock value during a day. + * @see ChartLine + */ + readonly MinMaxLine: beans.XPropertySet; + + /** + * @returns the properties of the up bars of a stock chart which has {@link StockDiagram.UpDown} set to `TRUE` . The **UpBar** is the box that is drawn betw + * @see ChartArea + */ + readonly UpBar: beans.XPropertySet; + } + + /** + * gives access to both the primary and the secondary **x** -axis of a chart. + * @see XDiagram + */ + interface XTwoAxisXSupplier extends XAxisXSupplier { + /** + * @returns the properties of the secondary **x** -axis of the diagram. The returned property set contains scaling properties as well as formatting properties. + * @see ChartAxis + */ + getSecondaryXAxis(): beans.XPropertySet; + + /** + * @returns the properties of the secondary **x** -axis of the diagram. The returned property set contains scaling properties as well as formatting properties. + * @see ChartAxis + */ + readonly SecondaryXAxis: beans.XPropertySet; + } + + /** + * gives access to both the primary and the secondary y-axis of a diagram. + * @see XChartDocument + */ + interface XTwoAxisYSupplier extends XAxisYSupplier { + /** + * @returns the properties of the secondary **y** -axis of the diagram. The returned property set contains scaling properties as well as formatting properties. + * @see ChartAxis + */ + getSecondaryYAxis(): beans.XPropertySet; + + /** + * @returns the properties of the secondary **y** -axis of the diagram. The returned property set contains scaling properties as well as formatting properties. + * @see ChartAxis + */ + readonly SecondaryYAxis: beans.XPropertySet; + } + + /** + * a service for X/Y diagrams (Also known as scatter charts). + * + * The special thing about X/Y diagrams is that the first series of data contains **x** -values. The other series contain **y** -values. Together both + * form two-dimensional coordinates, at which data points are placed. + */ + interface XYDiagram extends Diagram, ChartStatistics, ChartAxisXSupplier, ChartTwoAxisYSupplier, LineDiagram { } + + namespace ChartAxisAssign { + const enum Constants { + PRIMARY_Y = 2, + SECONDARY_Y = 4, + } + } + + namespace ChartAxisMarks { + const enum Constants { + INNER = 1, + NONE = 0, + OUTER = 2, + } + } + + namespace ChartAxisType { + const enum Constants { + AUTOMATIC = 0, + CATEGORY = 1, + DATE = 2, + } + } + + namespace ChartDataCaption { + const enum Constants { + FORMAT = 8, + NONE = 0, + PERCENT = 2, + SYMBOL = 16, + TEXT = 4, + VALUE = 1, + } + } + + namespace ChartSolidType { + const enum Constants { + CONE = 2, + CYLINDER = 1, + PYRAMID = 3, + RECTANGULAR_SOLID = 0, + } + } + + namespace ChartSymbolType { + const enum Constants { + AUTO = -2, + BITMAPURL = -1, + NONE = -3, + SYMBOL0 = 0, + SYMBOL1 = 1, + SYMBOL2 = 2, + SYMBOL3 = 3, + SYMBOL4 = 4, + SYMBOL5 = 5, + SYMBOL6 = 6, + SYMBOL7 = 7, + } + } + + namespace DataLabelPlacement { + const enum Constants { + AVOID_OVERLAP = 0, + BOTTOM = 6, + BOTTOM_LEFT = 5, + BOTTOM_RIGHT = 7, + CENTER = 1, + INSIDE = 10, + LEFT = 4, + NEAR_ORIGIN = 12, + OUTSIDE = 11, + RIGHT = 8, + TOP = 2, + TOP_LEFT = 3, + TOP_RIGHT = 9, + } + } + + namespace ErrorBarStyle { + const enum Constants { + ABSOLUTE = 3, + ERROR_MARGIN = 5, + FROM_DATA = 7, + NONE = 0, + RELATIVE = 4, + STANDARD_DEVIATION = 2, + STANDARD_ERROR = 6, + VARIANCE = 1, + } + } + + namespace MissingValueTreatment { + const enum Constants { + CONTINUE = 2, + LEAVE_GAP = 0, + USE_ZERO = 1, + } + } + + namespace TimeUnit { + const enum Constants { + DAY = 0, + MONTH = 1, + YEAR = 2, + } + } + } + + namespace chart2 { + /** @since LibreOffice 4.1 */ + type CartesianCoordinateSystem2d = XCoordinateSystem; + + /** @since LibreOffice 4.1 */ + type CartesianCoordinateSystem3d = XCoordinateSystem; + + /** A factory for creating ChartTypeTemplates. */ + type ChartTypeManager = lang.MultiServiceFactory; + + type ChartTypeTemplate = XChartTypeTemplate; + + /** + * The service {@link CoordinateSystemType} represents a special type of coordinate system. For example a 2 dimensional Cartesian coordinate system is a + * {@link CoordinateSystemType} and different from for example a 3 dimensional spherical coordinate system. + * + * A {@link CoordinateSystemType} is a stateless service which has no owner and does not enable cyclic references, thus its lifetime can be handled by + * reference or it may be implemented as a singleton. + */ + type CoordinateSystemType = any; + + type CoordinateSystemTypeID = string; + + /** @since LibreOffice 4.1 */ + type ExponentialRegressionCurve = XRegressionCurve; + + /** + * {@link Scaling} that scales a value **x** by taking the power of the base to **x** . + * + * If not mentioned explicitly, the base for the power function is 10.0 + */ + type ExponentialScaling = XScaling; + + type FormattedString = XFormattedString2; + + /** @since LibreOffice 4.1 */ + type LinearRegressionCurve = XRegressionCurve; + + /** + * {@link Scaling} that scales a value **x** by calculating **m x + t** . + * + * If not mentioned explicitly, the parameter **m** is 1.0 and **t** is 0.0, which means the transformation is an identical mapping. + */ + type LinearScaling = XScaling; + + /** @since LibreOffice 4.1 */ + type LogarithmicRegressionCurve = XRegressionCurve; + + /** + * {@link Scaling} that scales values by taking their logarithm. + * + * If not mentioned explicitly, the base for the logarithm is 10.0 + */ + type LogarithmicScaling = XScaling; + + /** @since LibreOffice 4.1 */ + type MovingAverageRegressionCurve = XRegressionCurve; + + /** @since LibreOffice 4.1 */ + type PolarCoordinateSystem2d = XCoordinateSystem; + + /** @since LibreOffice 4.1 */ + type PolarCoordinateSystem3d = XCoordinateSystem; + + /** @since LibreOffice 4.1 */ + type PolynomialRegressionCurve = XRegressionCurve; + + /** @since LibreOffice 4.1 */ + type PotentialRegressionCurve = XRegressionCurve; + + /** + * {@link Scaling} that scales a value **x** by taking the power of **x** to the exponent. + * + * If not mentioned explicitly, the exponent for the power function is 10.0 + */ + type PowerScaling = XScaling; + + /** @since LibreOffice 4.1 */ + type RegressionEquation = beans.XPropertySet; + + /** stateless service */ + type Scaling = XScaling; + + type XChartTypeManager = uno.XInterface; + + /** interface for the legend of a diagram */ + type XLegend = uno.XInterface; + + const enum AxisOrientation { + /** means equal to the primary writing direction */ + MATHEMATICAL = 0, + /** means the opposite of the primary writing direction */ + REVERSE = 1, + } + + /** Sets the type of curves that are drawn for line charts. */ + const enum CurveStyle { + /** Data points are connected via a parametric, interpolating B-spline curve. */ + B_SPLINES = 2, + /** Data points are connected via a smoothed cubic spline curve. The data points themselves are part of to the curve. */ + CUBIC_SPLINES = 1, + /** Lines between data points are not smoothed */ + LINES = 0, + NURBS = 3, + /** + * Data points are connected via a 3-segmented stepped line. The lines is horizontal till the center of the X values. + * + * +--O + * + * | + * + * | + * + * | + * + * O--+ + */ + STEP_CENTER_X = 6, + /** + * Data points are connected via a 3-segmented stepped line. The lines is horizontal at the center of the Y values. + * + * O + * + * | + * + * +-----+ + * + * | + * + * O + */ + STEP_CENTER_Y = 7, + /** + * Data points are connected via a 2-segmented stepped line. The line ends horizontally. + * + * +------O + * + * | + * + * | + * + * | + * + * O + */ + STEP_END = 5, + /** + * Data points are connected via a 2-segmented stepped line. The line starts horizontally. + * + * O + * + * | + * + * | + * + * | + * + * O-----+ + */ + STEP_START = 4, + } + + const enum LegendPosition { + /** The position of the legend is given by an offset value */ + CUSTOM = 4, + /** In LTR mode this is the right-hand side

This usually is the default.

*/ + LINE_END = 1, + /** In LTR mode this is the left-hand side */ + LINE_START = 0, + /** In LTR mode this is the bottom side */ + PAGE_END = 3, + /** In LTR mode this is the top side */ + PAGE_START = 2, + } + + /** Mode used for a pie chart template to determine the initial state of exploded pies. */ + const enum PieChartOffsetMode { + /** All pies are exploded by a certain percentage. The default is 10 percent. */ + ALL_EXPLODED = 1, + /** + * Default, no pies are exploded. + * + * The symbol is invisible + * + * no transparency attribute is evaluated + */ + NONE = 0, + } + + const enum StackingDirection { + NO_STACKING = 0, + Y_STACKING = 1, + Z_STACKING = 2, + } + + /** determines what kind of symbol to use */ + const enum SymbolStyle { + /** + * The symbol is taken automatically.

This will typically be the nth standard symbol for the nth + * + * data series.

+ */ + AUTO = 1, + /** uses the graphic given in {@link Symbol.Graphic} as symbol. */ + GRAPHIC = 4, + /** + * Default, no pies are exploded. + * + * The symbol is invisible + * + * no transparency attribute is evaluated + */ + NONE = 0, + /** uses the symbol given in the {@link com.sun.star.drawing.PolyPolygonBezierCoords} given in {@link Symbol.PolygonCoords} . */ + POLYGON = 3, + /** uses one of the standard symbols. Which standard symbol is given in {@link Symbol.StandardSymbol} . */ + STANDARD = 2, + } + + const enum TransparencyStyle { + /** The property TransparencyGradient is evaluated, Transparency is ignored */ + GRADIENT = 2, + /** The property Transparency is evaluated, TransparencyGradient is ignored */ + LINEAR = 1, + /** + * Default, no pies are exploded. + * + * The symbol is invisible + * + * no transparency attribute is evaluated + */ + NONE = 0, + } + + interface Axis extends drawing.LineProperties, style.CharacterProperties, beans.PropertySet, style.CharacterPropertiesAsian, style.CharacterPropertiesComplex, + XAxis, XTitled { + /** Determines how to stagger the labels at the axis (side by side, even, odd, auto ) */ + ArrangeOrder: chart.ChartAxisArrangeOrderType; + + /** + * Determines built in display unit value for axis + * @since LibreOffice 4.3 + */ + BuiltInUnit: string; + + /** Determines where the axis crosses the other axis. */ + CrossoverPosition: chart.ChartAxisPosition; + + /** Determines the scale value on the other axis when CrossoverPosition is set to VALUE. */ + CrossoverValue: number; + + /** Determines whether to display text at the axis or not. */ + DisplayLabels: boolean; + + /** + * Determines display units are avaiblable for axis + * @since LibreOffice 4.3 + */ + DisplayUnits: boolean; + + /** Determines where the axis labels are placed. */ + LabelPosition: chart.ChartAxisLabelPosition; + + /** + * determines what kind of tickmarks should be shown for major ticks. + * @see TickmarkStyle. + */ + MajorTickmarks: number; + + /** Determines where the interval marks are placed. */ + MarkPosition: chart.ChartAxisMarkPosition; + + /** + * determines what kind of tickmarks should be shown for minor ticks. + * @see TickmarkStyle. + */ + MinorTickmarks: number; + + /** + * A NumberFormat key. + * + * If this property is not set, it is treated as auto. This means linked to the source format. + * + * To determine a source format, the axis can query the XDataSequences used by the data series attached to it (see + * XDataSequence::getNumberFormatKeyByIndex()). + */ + NumberFormat: number; + ReferencePageSize: awt.Size; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + + /** Determines, whether the axis should be rendered by the view. */ + Show: boolean; + + /** Determines whether the characters in a single labels should be stacked one upon each other */ + StackCharacters: boolean; + + /** Determines whether the labels are allowed to break into more than one line */ + TextBreak: boolean; + + /** Determines whether the labels are allowed to overlap */ + TextOverlap: boolean; + + /** Determines the rotation of the text labels in degrees */ + TextRotation: number; + + /** + * Compatibility option: determines which strategy should be tried first for fixing axis labels overlapping issues + * @since LibreOffice 5.1 + */ + TryStaggeringFirst: boolean; + } + + /** chart type service for candlestick charts. */ + interface CandleStickChartType extends ChartType { + /** + * If the candlestick chart shows Japanese candlesticks, that is the property {@link Japanese} is `TRUE` , the property set given here contains the + * formatting attributes of the black boxes, i.e. the boxes shown for falling values. + * + * The {@link com.sun.star.beans.XPropertySet} given here must support the services {@link com.sun.star.drawing.FillProperties} and {@link + * com.sun.star.drawing.LineProperties} . + */ + BlackDay: beans.XPropertySet; + + /** + * If this property is `TRUE` , the candlesticks are shown as Japanese candlesticks. This implies that the property {@link ShowFirst} is also `TRUE` . + * + * Japanese candlesticks show the first and last value as boxes. A rising course (i.e. if the last value is greater than the first one) is shown by a + * white box. A falling course is shown by a black box. + * + * Default is `FALSE` . + * @see WhiteDay + * @see BlackDay + */ + Japanese: boolean; + + /** + * If this property is `TRUE` , the first value (which would be the opening course in a stock chart) is shown in the chart. This also makes the role + * "values-first" mandatory. + * + * This property is only evaluated for non-Japanese candlestick charts, as Japanese candlesticks always require to show the first value. + * + * Default is `FALSE` . + */ + ShowFirst: boolean; + + /** + * If this property is `TRUE` , the low and high values are shown in the chart. This also makes the roles "values-min" and "values-max" mandatory. + * + * Default is `TRUE` . + */ + ShowHighLow: boolean; + + /** + * If the candlestick chart shows Japanese candlesticks, that is the property {@link Japanese} is `TRUE` , the property set given here contains the + * formatting attributes of the white boxes, i.e. the boxes shown for rising values. + * + * The {@link com.sun.star.beans.XPropertySet} given here must support the services {@link com.sun.star.drawing.FillProperties} and {@link + * com.sun.star.drawing.LineProperties} . + */ + WhiteDay: beans.XPropertySet; + } + + interface ChartDocument extends XChartDocument, data.XDataReceiver, XTitled, style.XStyleFamiliesSupplier, util.XNumberFormatsSupplier, lang.XInitialization { } + + /** + * A component that implements the {@link com.sun.star.chart.ChartDocument} service and is initialized with a {@link com.sun.star.chart2.ChartDocument} + * via the {@link com.sun.star.uno.XAggregation} interface. + */ + interface ChartDocumentWrapper extends chart.ChartDocument, uno.XAggregation { } + + /** {@link ChartType} service */ + interface ChartType extends XChartType, XDataSeriesContainer, beans.XPropertySet { } + + interface CoordinateSystem extends XCoordinateSystem, XChartTypeContainer, util.XCloneable { + SwapXAndYAxis: boolean; + } + + interface DataPoint extends DataPointProperties, style.CharacterProperties, style.CharacterPropertiesAsian, style.CharacterPropertiesComplex { + /** + * this property handles the style. This property must support the service {@link com.sun.star.style.Style} . + * + * It should provide templates for all properties in this service, thus it must also support {@link DataPoint} . + * + * Gives the offset of the data point. For PieDiagrams this would be the percentage by which pies are dragged out of the cake. + */ + Offset: number; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + interface DataPointLabel { + /** The caption contains the category name of the category to which a data point belongs. */ + ShowCategoryName: boolean; + + /** The symbol of data series is additionally displayed in the caption. */ + ShowLegendSymbol: boolean; + + /** + * if `TRUE` , the value that is represented by a data point is displayed next to it. + * @see ShowNumberInPercent + */ + ShowNumber: boolean; + + /** + * This is only effective, if {@link ShowNumber} is `TRUE` . If this member is also `TRUE` , the numbers are displayed as percentages of a category. + * + * That means, if a data point is the first one of a series, the percentage is calculated by using the first data points of all available series. + */ + ShowNumberInPercent: boolean; + } + + interface DataPointProperties extends beans.PropertySet, drawing.FillProperties { + /** + * Is used for borders around filled objects. See `LineColor` . + * @see com.sun.star.drawing.LineProperties + */ + BorderColor: number; + + /** + * Is used for borders around filled objects. See `LineDash` . + * @see com.sun.star.drawing.LineProperties + */ + BorderDash: drawing.LineDash; + + /** + * The name of a dash that can be found in the {@link com.sun.star.container.XNameContainer} "com.sun.star.drawing.LineDashTable", that can be created + * via the com::sun::star::uno::XMultiServiceFactory of the {@link ChartDocument} . + */ + BorderDashName: string; + + /** + * Is used for borders around filled objects. See `LineStyle` . + * @see com.sun.star.drawing.LineProperties + */ + BorderStyle: drawing.LineStyle; + + /** + * Is used for borders around filled objects. See `LineTransparence` . + * @see com.sun.star.drawing.LineProperties + */ + BorderTransparency: number; + + /** + * Is used for borders around filled objects. See `LineWidth` . + * @see com.sun.star.drawing.LineProperties + */ + BorderWidth: number; + + /** + * points to a style that also supports this service (but not this property) that is used as default, if the PropertyState of a property is + * `DEFAULT_VALUE` .This is the main color of a data point. + * + * For charts with filled areas, like bar-charts, this should map to the `FillColor` of the objects. For line-charts this should map to the `LineColor` + * property. + * @see com.sun.star.drawing.FillProperties + * @see com.sun.star.drawing.LineProperties + */ + Color: number; + + /** + * If void, no error bars are shown for the data point in x-direction. + * + * The {@link com.sun.star.beans.XPropertySet} must support the service {@link ErrorBar} . + */ + ErrorBarX: beans.XPropertySet; + + /** + * If void, no error bars are shown for the data point in y-direction. + * + * The {@link com.sun.star.beans.XPropertySet} must support the service {@link ErrorBar} . + */ + ErrorBarY: beans.XPropertySet; + + /** If `TRUE` , fills the background of a hatch with the color given in the {@link Color} property. */ + FillBackground: boolean; + + /** + * specifies if the size is given in percentage or as an absolute value. + * + * If this is `TRUE` , the properties FillBitmapSizeX and FillBitmapSizeY contain the size of the tile in percent of the size of the original bitmap. If + * this is `FALSE` , the size of the tile is specified with 1/100th mm. + */ + FillBitmapLogicalSize: boolean; + + /** this enum selects how a area is filled with a single bitmap. */ + FillBitmapMode: drawing.BitmapMode; + FillBitmapName: string; + + /** + * This is the horizontal offset where the tile starts. + * + * It is given in percent in relation to the width of the bitmap. + */ + FillBitmapOffsetX: number; + + /** + * This is the vertical offset where the tile starts. + * + * It is given in percent in relation to the width of the bitmap. + */ + FillBitmapOffsetY: number; + + /** Every second line of tiles is moved the given percent of the width of the bitmap. */ + FillBitmapPositionOffsetX: number; + + /** Every second row of tiles is moved the given percent of the width of the bitmap. */ + FillBitmapPositionOffsetY: number; + + /** The RectanglePoint specifies the position inside of the bitmap to use as the top left position for rendering. */ + FillBitmapRectanglePoint: drawing.RectanglePoint; + + /** + * This is the width of the tile for filling. + * + * Depending on the property FillBitmapLogicalSize, this is either relative or absolute. + */ + FillBitmapSizeX: number; + + /** + * This is the height of the tile for filling. + * + * Depending on the property FillBitmapLogicalSize, this is either relative or absolute. + */ + FillBitmapSizeY: number; + + /** This enumeration selects the style with which the area will be filled. */ + FillStyle: drawing.FillStyle; + + /** + * describes the geometry of a 3 dimensional data point. Number is one of constant group {@link DataPointGeometry3D} . + * + * This is especially used for 3D bar-charts. + * + * CUBOID==0 CYLINDER==1 CONE==2 PYRAMID==3 CUBOID==else + */ + Geometry3D: number; + Gradient: awt.Gradient; + GradientName: string; + Hatch: drawing.Hatch; + HatchName: string; + Label: DataPointLabel; + + /** + * specifies a relative position for the data label + * @see com.sun.star.chart.DataLabelPlacement + */ + LabelPlacement: number; + + /** specifies a string that is used to separate the parts of a data label (caption) */ + LabelSeparator: string; + + /** + * Is only used for line-chart types. + * @see com.sun.star.drawing.LineProperties + */ + LineDash: drawing.LineDash; + + /** + * The name of a dash that can be found in the {@link com.sun.star.container.XNameContainer} "com.sun.star.drawing.LineDashTable", that can be created + * via the com::sun::star::uno::XMultiServiceFactory of the {@link ChartDocument} . + */ + LineDashName: string; + LineStyle: drawing.LineStyle; + + /** + * Is only used for line-chart types. + * @see com.sun.star.drawing.LineProperties + */ + LineWidth: number; + + /** specifies a number format for the display of the value in the data label */ + NumberFormat: number; + + /** + * describes a value by which a data point is moved from its default position in percent of the maximum allowed distance. + * + * This is especially useful for the explosion of pie-chart segments. + */ + Offset: number; + + /** specifies a number format for the display of the percentage value in the data label */ + PercentageNumberFormat: number; + + /** A value between 0 and 100 indicating the percentage how round an edge should be. */ + PercentDiagonal: number; + + /** + * The size of the page at the moment when the font size for data labels was set. + * + * This size is used to resize text in the view when the size of the page has changed since the font sizes were set (automatic text scaling). + */ + ReferencePageSize: awt.Size; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + + /** In case {@link ErrorBarX} and {@link ErrorBarY} both are set, and error bars are shown, a box spanning all error-indicators is rendered. */ + ShowErrorBox: boolean; + Symbol: Symbol; + + /** + * specifies if the text of a data label (caption) must be wrapped + * @since LibreOffice 5.1 + */ + TextWordWrap: boolean; + + /** + * This is the main transparency value of a data point. + * + * For charts with filled areas, like bar-charts, this should map to the `FillTransparence` of the objects. For line-charts this should map to the + * `LineTransparence` property. + * @see com.sun.star.drawing.FillProperties + * @see com.sun.star.drawing.LineProperties + */ + Transparency: number; + + /** This describes the transparency of the fill area as a gradient. */ + TransparencyGradient: awt.Gradient; + TransparencyGradientName: string; + } + + /** + * reflects the model data of the object that has all the information for a DataRenderer to create a visible data series in a chart. + * + * It combines one or more DataSequences which are interpreted by evaluating their role-string. + * @see DataSequenceRole + */ + interface DataSeries extends beans.PropertySet, DataPointProperties, XDataSeries, data.XDataSink, data.XDataSource, XRegressionCurveContainer { + /** + * This property describes whether the series should be shown at the main value axis or at the secondary value axis. Having this property not set or + * setting it to 0 means that this data series will be scaled at the primary y-axis ( of the coordinate system in which this series is hosted ). + * + * Setting this property to 1 means that this series should be scaled at the secondary y-axis. If there is no secondary axis the main axis should be used + * for scaling instead. + * + * If you want to scale a series at a different x or z axis you need to create an additional coordinate system and host this series there. + */ + AttachedAxisIndex: number; + + /** + * This service will be used to render this data series. + * + * This service name can be used to determine which {@link DataSeries} are of the same type. + * + * The result of the DataSeries::DataSequenceRoles depends on the renderer service set here. + * + * a sequence of indexes denoting which data points have set properties that differ from the default. + * + * The default values are determined by the properties set at the {@link DataPointProperties} of the data series. + * + * If the sequence is empty, that means that all data points look alike. They are formatted using the property values set in the data series. + * + * The indexes in this sequence match the indexes used by the XIndexContainer. + * + * This property is especially useful for large data series with only some formatted data points, because you do not have to iterate over all elements. + */ + AttributedDataPoints: SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + + /** indicates whether this series should be stacked with respect to the previous series. */ + StackingDirection: StackingDirection; + + /** If `TRUE` , the data points of this series get different colors by default, like in a pie chart. */ + VaryColorsByPoint: boolean; + } + + interface Diagram extends XDiagram, XCoordinateSystemContainer, XTitled, chart.X3DDefaultSetter { + /** Draw connection lines for stacked bar charts. */ + ConnectBars: boolean; + + /** Chart Datatable flags */ + DataTableHBorder: boolean; + DataTableOutline: boolean; + DataTableVBorder: boolean; + ExternalData: string; + + /** + * If bars of a bar or column chart are attached to different axis, this property determines how to display those. If `TRUE` , the bars are grouped + * together in one block for each axis, thus they are painted one group over the other. + * + * If `FALSE` , the bars are displayed side-by-side, as if they were all attached to the same axis. + * + * If all data series of a bar or column chart are attached to only one axis, this property has no effect. + */ + GroupBarsPerAxis: boolean; + + /** + * specifies how empty or invalid cells in the provided data should be handled when displayed + * @see com.sun.star.chart.MissingValueTreatment + */ + MissingValueTreatment: number; + + /** Perspective of 3D charts ( [0,100] ). */ + Perspective: number; + + /** + * The attributes {@link RelativePosition} and {@link RelativeSize} should be used for the inner coordinate region without axis labels and without data + * labels. + */ + PosSizeExcludeLabels: boolean; + + /** + * The position is as a relative position on the page. + * + * If a relative position is given the diagram is not automatically placed, but instead is placed relative on the page. + */ + RelativePosition: RelativePosition; + + /** The size of the diagram as relative size of the page size. */ + RelativeSize: RelativeSize; + RightAngledAxes: boolean; + + /** Horizontal rotation of 3D charts in degrees ( ]-180,180] ). */ + RotationHorizontal: number; + + /** Vertical rotation of 3D charts in degrees ( ]-180,180] ). */ + RotationVertical: number; + + /** Sort data points by x values for rendering */ + SortByXValues: boolean; + + /** Starting angle in degrees for pie charts and doughnut charts. */ + StartingAngle: number; + } + + interface ErrorBar extends drawing.LineProperties, data.XDataSink, data.XDataSource { + /** @see com.sun.star.chart.ErrorBarStyle */ + ErrorBarStyle: number; + NegativeError: number; + PositiveError: number; + ShowNegativeError: boolean; + ShowPositiveError: boolean; + + /** The weight for the standard deviation. */ + Weight: number; + } + + /** + * This structure contains all properties of a bitmap when used as FillStyle. + * @see com.sun.star.drawing.FillProperties + */ + interface FillBitmap { + /** + * this enum selects how a area is filled with a single bitmap. + * + * It may be repeated, stretched or displayed with blank space around it. + */ + aBitmapMode: drawing.BitmapMode; + + /** + * This is the horizontal and vertical offset where the tile starts. + * + * It is given in percent in relation to the width of the bitmap. + */ + aOffset: awt.Point; + + /** Every second line (X) / row (Y) of tiles is moved the given percent of the width of the bitmap. */ + aPositionOffset: awt.Point; + + /** The RectanglePoint specifies the position inside of the bitmap to use as the top left position for rendering. */ + aRectanglePoint: drawing.RectanglePoint; + + /** + * This is the size of the tile for filling. + * + * Depending on the property LogicalSize, this is either relative or absolute. + */ + aSize: awt.Size; + + /** a URL to the bitmap used. This may be an internal URL of the graphics manager. */ + aURL: string; + + /** + * specifies if the size is given in percentage or as an absolute value. + * + * If this is `TRUE` , the properties SizeX and SizeY contain the size of the tile in percent of the size of the original bitmap. If this is `FALSE` , + * the size of the tile is specified with 1/100th mm. + */ + bLogicalSize: boolean; + } + + /** Must be supported by all grids */ + interface GridProperties extends drawing.LineProperties { + /** Determines, whether the grid should be rendered by the view. */ + Show: boolean; + } + + /** + * An {@link IncrementData} describes how tickmarks are positioned on the scale of an axis. + * @see Axis + * @see Grid + * @see Scale + * @see XScaling + */ + interface IncrementData { + /** + * if the any contains a double value this is used as a fixed BaseValue. Otherwise, if the any is empty or contains an incompatible type, the BaseValue + * is meant to be calculated automatically by the view component representing the model containing this increment. + */ + BaseValue: any; + + /** + * if the any contains a double value this is used as a fixed Distance value. Otherwise, if the any is empty or contains an incompatible type, the + * Distance is meant to be calculated automatically by the view component representing the model containing this increment. + */ + Distance: any; + + /** + * {@link PostEquidistant} rules whether the member {@link Distance} describes a distance before or after the scaling is applied. + * + * If {@link PostEquidistant} equals `TRUE`{@link Distance} is given in values after {@link XScaling} is applied, thus resulting main tickmarks will + * always look equidistant on the screen. If {@link PostEquidistant} equals `FALSE`{@link Distance} is given in values before {@link XScaling} is + * applied. + */ + PostEquidistant: any; + + /** + * {@link SubIncrements} describes the positioning of further sub tickmarks on the scale of an axis. + * + * The first {@link SubIncrement} in this sequence determines how the distance between two neighboring main tickmarks is divided for positioning of + * further sub tickmarks. Every following {@link SubIncrement} determines the positions of subsequent tickmarks in relation to their parent tickmarks + * given by the preceding {@link SubIncrement} . + */ + SubIncrements: SafeArray; + } + + /** offers tooling to interpret different data sources in a structural and chart-type-dependent way. */ + interface InterpretedData { + Categories: data.XLabeledDataSequence; + Series: SafeArray>; + } + + /** Describes a legend for a {@link Diagram} . */ + interface Legend extends drawing.FillProperties, drawing.LineProperties, beans.PropertySet, XLegend { + /** Provides an automated position */ + AnchorPosition: LegendPosition; + + /** + * Determines how the aspect ratio of the legend should roughly be. + * + * Set the Expansion to {@link com.sun.star.chart.HIGH} for a legend that is positioned on the right or left hand side. Use {@link + * com.sun.star.chart.WIDE} for a legend that is positioned on top or the bottom. + */ + Expansion: chart.ChartLegendExpansion; + + /** + * contains the size of the page at the time when properties were set (e.g. the CharHeight). + * + * This way it is possible to resize objects (like text) in the view without modifying the model. + */ + ReferencePageSize: awt.Size; + + /** + * The position is as a relative position on the page. + * + * If a relative position is given the legend is not automatically placed, but instead is placed relative on the page. + * + * If `VOID` , the legend position is solely determined by the {@link AnchorPosition} . + */ + RelativePosition: RelativePosition; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + + /** Determines, whether the legend should be rendered by the view. */ + Show: boolean; + } + + interface LightSource { + /** the direction into which the light-source points */ + aDirection: drawing.Direction3D; + bIsEnabled: boolean; + + /** When `TRUE` , the specularity of material is taken into account when lighting an object. */ + bSpecular: boolean; + + /** the light source's color */ + nDiffuseColor: number; + } + + /** + * The properties of this service correspond to the similar named attributes and subelements of the XML element {@link chart2} :increment in the {@link + * chart2} file format. + */ + interface LogicTargetModel { + /** + * not BOUND nor CONSTRAINED in terms of Listener notifications, each element in the sequence must implement the service {@link + * com.sun.star.chart2.CoordinateSystem} + */ + CoordinateSystems: SafeArray; + + /** identifies an instance of this service within one chart document. */ + ID: string; + + /** + * identifies an instance of the service com::sun::star::chart2::LegendModel within one chart document. that instance is used to automatically calculate + * missing properties + */ + LegendID: string; + + /** + * MAYBEVOID, not BOUND nor CONSTRAINED in terms of Listener notifications, each element in the sequence must implement the service {@link + * com.sun.star.chart2.LogicTargetModel} + */ + LogicTargetModels: SafeArray; + } + + interface PropertyPool extends style.Style, style.XDefaultsSupplier { } + + interface RegressionCurve extends beans.PropertySet, drawing.LineProperties, XRegressionCurve { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + interface RegressionCurveEquation extends beans.PropertySet, drawing.FillProperties, drawing.LineProperties, style.CharacterProperties { + NumberFormat: number; + ReferencePageSize: awt.Size; + RelativePosition: RelativePosition; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + ShowCorrelationCoefficient: boolean; + ShowEquation: boolean; + XName: string; + YName: string; + } + + /** + * Determines a position of an object relative to a size defined by other means. Values from 0 to 1 cover the entire reference rectangle. Values may also + * be outside this range, especially negative. + */ + interface RelativePosition { + /** + * This indicates how the object is placed at the relative position. + * + * The Anchor indicates which point of the placed object will be placed at the coordinates given within Primary and Secondary. + * + * For example if Anchor is TOP_LEFT the top left corner of an object will be placed at the given coordinates. If Anchor is RIGHT the right middle corner + * of the object will be placed at the given coordinates. + */ + Anchor: drawing.Alignment; + + /** + * The position in the primary direction. The direction is defined by the object using this point. + * + * For example for western languages the primary direction may be the horizontal distance measured from left to right. + * + * The values are relative to a reference size (for example the page size). Values between 0 and 1 span the complete bounding rectangle. + */ + Primary: number; + + /** + * The position in the secondary direction. The direction is defined by the object using this point. + * + * For example for western languages the secondary direction may be the vertical distance measured from top to bottom. + * + * The values are relative to a reference size (for example the page size). Values between 0 and 1 span the complete bounding rectangle. + */ + Secondary: number; + } + + /** + * Gives a position relative to some size defined by other means. Values from 0 to 1 cover the entire reference rectangle. Values may also be greater + * than one, meaning a bigger size than the reference size. Negative values are not allowed. + */ + interface RelativeSize { + /** + * The extension in the primary direction. The direction is defined by the object using this point. + * + * Typically, the direction is determined by an Orientation. Another typical use would be the direction of a given orientation-angle. + * + * The values are relative to the page or an object. Values between 0 and 1 span the complete bounding rectangle of the page/object. + * + * For a western Orientation this is the width. + */ + Primary: number; + + /** + * The extension in the secondary direction. The direction is defined by the object using this point. + * + * Typically, the direction is determined by an Orientation. Another typical use would be the direction perpendicular to a given orientation-angle. + * + * The values are relative to the page or an object. Values between 0 and 1 span the complete bounding rectangle of the page/object. + * + * For a western Orientation this is the height. + */ + Secondary: number; + } + + interface ScaleData { + /** if true an {@link AxisType} CATEGORY is interpreted as DATE if the underlying data given in Categories are dates */ + AutoDateAxis: boolean; + + /** + * describes the type of the axis. + * + * It can be a real number axis or a category axis or something else. {@link AxisType} is one value out of the constant group {@link AxisType} . + */ + AxisType: number; + Categories: data.XLabeledDataSequence; + + /** increment data to be used for not date-time axis */ + IncrementData: IncrementData; + + /** + * if the any contains a double value this is used as a fixed minimum. Otherwise, if the any is empty or contains an incompatible type, the minimum is + * automatic. + * + * If the minimum is automatic, this means, each view that represents the model containing this scale, has to calculate a minimum by its own means. + */ + Maximum: any; + + /** + * if the any contains a double value this is used as a fixed maximum. Otherwise, if the any is empty or contains an incompatible type, the maximum is + * automatic. + * + * If the maximum is automatic, this means, each view that represents the model containing this scale, has to calculate a maximum by its own means. + */ + Minimum: any; + + /** + * {@link Axis} orientation (standard or reversed). + * + * If used at the Y axis in pie charts or doughnut charts, specifies the rotation direction of the pie. The value AxisOrientation::MATHEMATICAL rotates + * the pie counterclockwise, the value AxisOrientation::REVERSE rotates the pie clockwise. + * + * Note: Is this a good place for the axis orientation? Two axes may use the same scale, but point into two different directions. + */ + Orientation: AxisOrientation; + + /** + * The Origin indicates where other axes cross this axis. If the any contains a double value that value is used. Otherwise an appropriate value has to be + * calculated by that instances using Origin. + */ + Origin: any; + Scaling: XScaling; + + /** + * describes whether data points on category or date axis are placed between tickmarks or not if true the maximum on the scale will be expanded for one + * interval + */ + ShiftedCategoryPosition: boolean; + + /** increment data to be used in case of date-time axis */ + TimeIncrement: chart.TimeIncrement; + } + + /** parameters that may be passed to {@link XChartTypeTemplate.createDiagramByDataSource()} . */ + interface StandardDiagramCreationParameters { + /** States whether the first XLabeledDataSequence in a data-source is used as categories. */ + HasCategories: boolean; + + /** If categories are given they should be used as x values also if a chart type requires x values. Default is true. */ + UseCategoriesAsX: boolean; + } + + interface SubIncrement { + /** should contain nothing for **auto** , or an integer value for an explicit interval count. */ + IntervalCount: any; + + /** should contain nothing for **auto** , or a boolean value for an explicit setting. */ + PostEquidistant: any; + } + + /** properties that are used for {@link DataSeries} that display symbols. */ + interface Symbol { + /** + * The color used for drawing the border of symbols. + * + * Only effective if {@link Style} is SymbolStyle::AUTO, SymbolStyle::STANDARD or SymbolStyle::POLYGON. + */ + BorderColor: number; + + /** + * The color used for filling symbols that contain closed polygons. + * + * Only effective if {@link Style} is SymbolStyle::AUTO, SymbolStyle::STANDARD or SymbolStyle::POLYGON. + */ + FillColor: number; + + /** use this graphic as symbol */ + Graphic: graphic.XGraphic; + + /** The given polygon is used as symbol. */ + PolygonCoords: drawing.PolyPolygonBezierCoords; + + /** The size of the symbol in 100th of a mm. */ + Size: awt.Size; + + /** + * Use the nth standard symbol, if {@link Style} is set to SymbolStlye::STANDARD. + * + * If n is the number of standard symbols available in an implementation, the symbol number is {@link StandardSymbol} modulo n. + * + * The default implementation for example currently uses 8 different standard symbols that are matched to the numbers 0 to 7. + * + * {{table here, see documentation}} + */ + StandardSymbol: number; + + /** determines which of the following members determines the appearance of the symbol. */ + Style: SymbolStyle; + } + + interface Title extends style.ParagraphProperties, drawing.FillProperties, drawing.LineProperties, beans.PropertySet, XTitle { + /** + * contains the size of the page at the time when properties were set (e.g. the CharHeight). + * + * This way it is possible to resize objects (like text) in the view without modifying the model. + */ + ReferencePageSize: awt.Size; + + /** + * The position is a relative position on the page. + * + * If a relative position is given the title is not automatically placed, but instead is placed relative on the page. + */ + RelativePosition: RelativePosition; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + + /** writes the characters of the title on top of each other if set to `TRUE` . */ + StackCharacters: boolean; + + /** the rotation of the title's text in degrees in the range [0,360). */ + TextRotation: number; + } + + interface X3DChartWindowProvider { + setWindow(window: number): void; + } + + /** + * Offers any access to column and row descriptions. This allows to set date values as categories. + * + * Can be obtained from interface {@link XChartDocument} via method {@link getData()} . + * @since OOo 3.4 + */ + interface XAnyDescriptionAccess extends chart.XComplexDescriptionAccess { + /** + * retrieves the descriptions for all columns. + * @returns a sequence of sequences of anys representing the descriptions of all columns. The outer index represents different columns. The inner index repre + */ + readonly AnyColumnDescriptions: SafeArray; + + /** + * retrieves the descriptions for all rows. + * @returns a sequence of sequences of anys representing the descriptions of all rows. The outer index represents different rows. The inner index represents + */ + readonly AnyRowDescriptions: SafeArray; + + /** + * retrieves the descriptions for all columns. + * @returns a sequence of sequences of anys representing the descriptions of all columns. The outer index represents different columns. The inner index repre + */ + getAnyColumnDescriptions(): SafeArray; + + /** + * retrieves the descriptions for all rows. + * @returns a sequence of sequences of anys representing the descriptions of all rows. The outer index represents different rows. The inner index represents + */ + getAnyRowDescriptions(): SafeArray; + + /** + * sets the descriptions for all columns. + * @param rColumnDescriptions a sequence of sequences of anys which represent the descriptions of all columns. The outer index represents different columns + */ + setAnyColumnDescriptions(rColumnDescriptions: LibreOffice.SeqEquiv): void; + + /** + * sets the descriptions for all rows. + * @param rRowDescriptions a sequence of sequences of anys representing the descriptions of all rows. The outer index represents different rows. The inner + */ + setAnyRowDescriptions(rRowDescriptions: LibreOffice.SeqEquiv): void; + } + + interface XAxis extends uno.XInterface { + /** the returned property set must support the service {@link GridProperties} */ + getGridProperties(): beans.XPropertySet; + getScaleData(): ScaleData; + + /** + * the returned property sets must support the service {@link GridProperties} + * + * If you do not want to render certain a sub-grid, in the corresponding XPropertySet the property {@link GridProperties.Show} must be `FALSE` . + */ + getSubGridProperties(): SafeArray; + + /** the returned property sets must support the service TickProperties */ + getSubTickProperties(): SafeArray; + + /** the returned property set must support the service {@link GridProperties} */ + readonly GridProperties: beans.XPropertySet; + ScaleData: ScaleData; + setScaleData(aScale: ScaleData): void; + + /** + * the returned property sets must support the service {@link GridProperties} + * + * If you do not want to render certain a sub-grid, in the corresponding XPropertySet the property {@link GridProperties.Show} must be `FALSE` . + */ + readonly SubGridProperties: SafeArray; + + /** the returned property sets must support the service TickProperties */ + readonly SubTickProperties: SafeArray; + } + + interface XChartDocument extends frame.XModel { + /** retrieves the component that is able to create different chart type templates (components of type {@link ChartTypeTemplate} ) */ + ChartTypeManager: XChartTypeManager; + + /** Creates a default chart type for a brand-new chart object. */ + createDefaultChart(): void; + + /** + * creates an internal com::sun::star::chart2::XDataProvider that is handled by the chart document itself. + * + * When the model is stored, the data provider will also be stored in a sub-storage. + * @param bCloneExistingData if `TRUE` and a data provider was previously attached, its referred data will be copied to the new internal data provider. Not + * @throws com::sun::star::util:CloseVetoException If the new data provider could not be created due to a failed removal of the former data provider. + */ + createInternalDataProvider(bCloneExistingData: boolean): void; + + /** + * Returns the currently set data provider. This may be an internal one, if {@link createInternalDataProvider()} has been called before, or an external + * one if XDataReceiver::attachDataProvider() has been called. + */ + readonly DataProvider: data.XDataProvider; + + /** + * Notes: this is preliminary, we need an API that supports more than one diagram. The method name getDiagram exists in the css.chart API, so there is + * would be no way to chose either this or the other method from Basic (it would chose one or the other by random). + */ + FirstDiagram: XDiagram; + + /** retrieves the component that is able to create different chart type templates (components of type {@link ChartTypeTemplate} ) */ + getChartTypeManager(): XChartTypeManager; + + /** + * Returns the currently set data provider. This may be an internal one, if {@link createInternalDataProvider()} has been called before, or an external + * one if XDataReceiver::attachDataProvider() has been called. + */ + getDataProvider(): data.XDataProvider; + + /** + * Notes: this is preliminary, we need an API that supports more than one diagram. The method name getDiagram exists in the css.chart API, so there is + * would be no way to chose either this or the other method from Basic (it would chose one or the other by random). + */ + getFirstDiagram(): XDiagram; + + /** + * Gives access to the page background appearance. + * @returns the properties of the background area of the chart document. The area's extent is equal to the document size. If you want to access properties o + */ + getPageBackground(): beans.XPropertySet; + + /** @returns `TRUE` if the data provider set at the chart document is an internal one. This is the case directly after {@link createInternalDataProvider()} h */ + hasInternalDataProvider(): boolean; + + /** Returns true if the chart is based on OpenGL */ + isOpenGLChart(): boolean; + + /** + * Gives access to the page background appearance. + * @returns the properties of the background area of the chart document. The area's extent is equal to the document size. If you want to access properties o + */ + readonly PageBackground: beans.XPropertySet; + + /** sets a new component that is able to create different chart type templates (components of type {@link ChartTypeTemplate} ) */ + setChartTypeManager(xNewManager: XChartTypeManager): void; + + /** + * Notes: this is preliminary, we need an API that supports more than one diagram. The method name setDiagram exists in the css.chart API, so there is + * would be no way to chose either this or the other method from Basic (it would chose one or the other by random). + */ + setFirstDiagram(xDiagram: XDiagram): void; + } + + /** this interface is used for a wrapper of objects implementing the service {@link com.sun.star.drawing.Shape} */ + interface XChartShape extends uno.XInterface { + /** the method corresponds to the identical methods of the interface {@link com.sun.star.drawing.XShape} */ + getPosition(): awt.Point; + + /** the method corresponds to the identical methods of the interface {@link com.sun.star.beans.XPropertySet} */ + getPropertyValue(PropertyName: string): any; + + /** the method corresponds to the identical methods of the interface {@link com.sun.star.drawing.XShape} ??????????? deprecated */ + getShapeType(): string; + + /** the method corresponds to the identical methods of the interface {@link com.sun.star.drawing.XShape} */ + getSize(): awt.Size; + + /** the method corresponds to the identical methods of the interface {@link com.sun.star.drawing.XShape} */ + Position: awt.Point; + + /** the method corresponds to the identical methods of the interface {@link com.sun.star.drawing.XShape} */ + setPosition(aPosition: awt.Point): void; + + /** the method corresponds to the identical methods of the interface {@link com.sun.star.beans.XPropertySet} */ + setPropertyValue(aPropertyName: string, aValue: any): void; + + /** the method corresponds to the identical methods of the interface {@link com.sun.star.drawing.XShape} */ + setSize(aSize: awt.Size): void; + + /** the method corresponds to the identical methods of the interface {@link com.sun.star.drawing.XShape} ??????????? deprecated */ + readonly ShapeType: string; + + /** the method corresponds to the identical methods of the interface {@link com.sun.star.drawing.XShape} */ + Size: awt.Size; + } + + interface XChartShapeContainer extends uno.XInterface { + /** a renderer creates ChartShapes and adds it to this container */ + addShape(xShape: drawing.XShape): void; + getShape(): drawing.XShape; + + /** a renderer can remove ChartShapes from this container (e.g. if the visible range has changed) */ + removeShape(xShape: drawing.XShape): void; + readonly Shape: drawing.XShape; + } + + interface XChartType extends uno.XInterface { + /** A string representation of the chart type. This needs to be the service-name which can be used to create a chart type. */ + readonly ChartType: string; + + /** + * Creates a coordinate systems that fits the chart-type with its current settings and for the given dimension. + * @throws IllegalArgumentException This chart type cannot be displayed in the given dimension. + */ + createCoordinateSystem(DimensionCount: number): XCoordinateSystem; + + /** A string representation of the chart type. This needs to be the service-name which can be used to create a chart type. */ + getChartType(): string; + + /** Returns the role of the XLabeledDataSequence of which the label will be taken to identify the {@link DataSeries} in dialogs or the legend. */ + getRoleOfSequenceForSeriesLabel(): string; + + /** + * Returns a sequence of roles that are understood by this chart type. + * + * All roles must be listed in the order in which they are usually parsed. This ensures that gluing sequences together and splitting them up apart again + * results in the same structure as before. + * + * Note, that this does not involve optional roles, like error-bars. + */ + getSupportedMandatoryRoles(): SafeArray; + + /** + * Returns a sequence of roles that are understood in addition to the mandatory roles (see {@link XChartType.getSupportedMandatoryRoles()} ). + * + * An example for an optional role are error-bars. + */ + getSupportedOptionalRoles(): SafeArray; + + /** + * Returns a sequence with supported property mapping roles. + * + * An example for a property mapping role is FillColor. + */ + getSupportedPropertyRoles(): SafeArray; + + /** Returns the role of the XLabeledDataSequence of which the label will be taken to identify the {@link DataSeries} in dialogs or the legend. */ + readonly RoleOfSequenceForSeriesLabel: string; + + /** + * Returns a sequence of roles that are understood by this chart type. + * + * All roles must be listed in the order in which they are usually parsed. This ensures that gluing sequences together and splitting them up apart again + * results in the same structure as before. + * + * Note, that this does not involve optional roles, like error-bars. + */ + readonly SupportedMandatoryRoles: SafeArray; + + /** + * Returns a sequence of roles that are understood in addition to the mandatory roles (see {@link XChartType.getSupportedMandatoryRoles()} ). + * + * An example for an optional role are error-bars. + */ + readonly SupportedOptionalRoles: SafeArray; + + /** + * Returns a sequence with supported property mapping roles. + * + * An example for a property mapping role is FillColor. + */ + readonly SupportedPropertyRoles: SafeArray; + } + + interface XChartTypeContainer extends uno.XInterface { + /** + * add a chart type to the chart type container + * @throws IllegalArgumentException If the given chart type is already contained in the chart type container. + */ + addChartType(aChartType: XChartType): void; + + /** retrieve all chart types */ + ChartTypes: SafeArray; + + /** retrieve all chart types */ + getChartTypes(): SafeArray; + + /** removes one data series from the chart type container. */ + removeChartType(aChartType: XChartType): void; + + /** set all chart types */ + setChartTypes(aChartTypes: LibreOffice.SeqEquiv): void; + } + + interface XChartTypeTemplate extends uno.XInterface { + /** + * Applies a chart-type specific style (e.g. symbols) to all series in the sequence aSeries. + * @param xSeries a single data series to which a style will be applied + * @param nChartTypeGroupIndex Denotes in which chart-type group the series lies, such this method can apply different styles for different chart-type groups + * @param nSeriesIndex The index of the series inside the current chart-type group. nSeriesIndex does not uniquely identify a data series alone, but only t + * @param nSeriesCount The number of series in the current chart-type group. + */ + applyStyle(xSeries: XDataSeries, nChartTypeGroupIndex: number, nSeriesIndex: number, nSeriesCount: number): void; + + /** + * Analyses the given diagram and reinterprets its {@link DataSeries} and Categories and creates a new diagram based on these series. + * + * Note, that if {@link matchesTemplate()} returns `TRUE` for the given {@link XDiagram} , the latter should not be changed. + * @param xDiagram The diagram given will be modified such that it represents this {@link ChartTypeTemplate} . + */ + changeDiagram(xDiagram: XDiagram): void; + + /** + * Changes the given diagram `xDiagram` by using the new data given in `xDataSource` . + * + * Note that the data is interpreted in a way that fits this template, but not necessarily the chart-types of the diagram. This method should only be + * called if the data-format of the diagram is compatible with the data-format of this template. + * + * Ideally a {@link matchesTemplate()} call for the given diagram should return `TRUE` before this method is called. + * @param xDiagram The diagram to be changed. + * @param xDataSource This data source will be interpreted in a chart-type specific way and the {@link DataSeries} found in `xDiagram` will be adapted to t + * @param aArguments Arguments that tell the template how to slice the given range. The properties should be defined in a separate service. For standard p + */ + changeDiagramData(xDiagram: XDiagram, xDataSource: data.XDataSource, aArguments: LibreOffice.SeqEquiv): void; + + /** + * Creates a new diagram based upon the given data . + * @param xDataSource This data source will be interpreted in a chart-type specific way and appropriate {@link DataSeries} will be created which serve as i + * @param aArguments Arguments that tell the template how to slice the given range. The properties should be defined in a separate service. For standard p + * @returns The new diagram which represents this {@link ChartTypeTemplate} . + */ + createDiagramByDataSource(xDataSource: data.XDataSource, aArguments: LibreOffice.SeqEquiv): XDiagram; + readonly DataInterpreter: XDataInterpreter; + + /** + * Provides a chart type object that can be used to create new series. + * @param aFormerlyUsedChartTypes The list can be used to copy some aspects from old chart types during the creation of a new chart type. The list might be + */ + getChartTypeForNewSeries(aFormerlyUsedChartTypes: LibreOffice.SeqEquiv): XChartType; + getDataInterpreter(): XDataInterpreter; + + /** + * States whether the given diagram could have been created by the template. + * + * The template will parse the DataSeriesTree of the diagram to determine if the structure matches the one which would have been created by {@link + * createDiagramByDataSource()} . + * + * For analysis all parts of the diagram may be used, e.g. also properties set at the data series (like symbols)./p> + * @param xDiagram The diagram to be analyzed. + * @param bAdaptProperties If `TRUE` the properties of the template are set, such that the template matches more accurately. E.g. for a line-chart with sym + * @returns `TRUE` if the diagram given is structurally identical to a diagram that was created using {@link createDiagramByDataSource()} or {@link changeDia + */ + matchesTemplate(xDiagram: XDiagram, bAdaptProperties: boolean): boolean; + + /** + * Resets all styles that were changed from the default at any object in the chart and have not been later modified. + * + * In {@link createDiagramByDataSource()} or {@link changeDiagram()} a template might e.g. change the page background color or the line style of all data + * series. This method should reset all objects that still have the changed settings to the default. + * + * If for example the template changed the {@link com.sun.star.drawing.LineStyle} of all series to NONE, this method should reset all series with + * LineStyle NONE back to SOLID. If a series has a style DASH, it must not be changed. + */ + resetStyles(xDiagram: XDiagram): void; + + /** @returns `TRUE` if the template does support categories */ + supportsCategories(): boolean; + } + + interface XColorScheme extends uno.XInterface { + /** + * returns the default color for the nth data series. + * + * This may be a system wide color or a color coming from a color scheme. + * + * Usually there exist a fixed number of default colors. This method should always return a valid Color. If the index (i) is higher than the number of + * default colors (n), the method should return the modulus (i mod n), i.e., the colors should repeat in a cyclic way. + * @param nIndex The index of the series. This is used to obtain the correct default color. + */ + getColorByIndex(nIndex: number): util.Color; + } + + interface XCoordinateSystem extends uno.XInterface { + /** identifies the type of coordinate system (e.g. Cartesian, polar ...) */ + readonly CoordinateSystemType: string; + + /** the dimension of the coordinate-system. */ + readonly Dimension: number; + + /** + * The dimension says whether it is a x, y or z axis. The index indicates whether it is a primary or a secondary axis or maybe more in future. Use nIndex + * == 0 for a primary axis. An empty Reference will be returned if the given nDimension and nIndex are in the valid range but no axis is set for those + * values. An IndexOutOfBoundsException will be thrown if nDimension is lower than 0 or greater than the value returned by {@link getDimension()} and/or + * if nIndex is lower 0 or greater than the value returned by getMaxAxisIndexByDimension(nDimension). + */ + getAxisByDimension(nDimension: number, nIndex: number): XAxis; + + /** identifies the type of coordinate system (e.g. Cartesian, polar ...) */ + getCoordinateSystemType(): string; + + /** the dimension of the coordinate-system. */ + getDimension(): number; + + /** + * In one dimension there could be several axes to enable main and secondary axis and maybe more in future. This method returns the maximum index at + * which an axis exists for the given dimension. It is allowed that some indexes in between do not have an axis. + */ + getMaximumAxisIndexByDimension(nDimension: number): number; + + /** return a service name from which the view component for this coordinate system can be created */ + getViewServiceName(): string; + + /** The dimension says whether it is a x, y or z axis. The index says whether it is a primary or a secondary axis. Use nIndex == 0 for a primary axis. */ + setAxisByDimension(nDimension: number, xAxis: XAxis, nIndex: number): void; + + /** return a service name from which the view component for this coordinate system can be created */ + readonly ViewServiceName: string; + } + + interface XCoordinateSystemContainer extends uno.XInterface { + /** + * add an coordinate system to the coordinate system container + * @throws IllegalArgumentException If the given coordinate system is already contained in the container. + */ + addCoordinateSystem(aCoordSys: XCoordinateSystem): void; + + /** retrieve all coordinate systems */ + CoordinateSystems: SafeArray; + + /** retrieve all coordinate systems */ + getCoordinateSystems(): SafeArray; + + /** removes one coordinate system from the coordinate system container. */ + removeCoordinateSystem(aCoordSys: XCoordinateSystem): void; + + /** set all coordinate systems */ + setCoordinateSystems(aCoordinateSystems: LibreOffice.SeqEquiv): void; + } + + /** offers tooling to interpret different data sources in a structural and chart-type-dependent way. */ + interface XDataInterpreter extends uno.XInterface { + /** + * Interprets the given data. + * @param xSource the data source. + * @param aArguments Arguments that tell the template how to slice the given range. The properties should be defined in a separate service. For standard p + * @param aSeriesToReUse use all the data series given here for the result before creating new ones. + */ + interpretDataSource(xSource: data.XDataSource, aArguments: LibreOffice.SeqEquiv, aSeriesToReUse: LibreOffice.SeqEquiv): InterpretedData; + + /** + * parses the given data and states, if a {@link reinterpretDataSeries()} call can be done without data loss. + * @returns `TRUE` , if the data given in `aInterpretedData` has a similar structure than the one required is used as output of the data interpreter. + */ + isDataCompatible(aInterpretedData: InterpretedData): boolean; + + /** + * Try to reverse the operation done in {@link interpretDataSource()} . + * + * In case `aInterpretedData` is the result of {@link interpretDataSource()} ( `xSource` ), the result of this method should be `xSource` . + */ + mergeInterpretedData(aInterpretedData: InterpretedData): data.XDataSource; + + /** Re-interprets the data given in `aInterpretedData` while keeping the number of data series and the categories. */ + reinterpretDataSeries(aInterpretedData: InterpretedData): InterpretedData; + } + + /** A data series represents the object that has all the knowledge to be rendered as a visual data series. */ + interface XDataSeries extends uno.XInterface { + /** + * @param nIndex specifies the index of the data point within the series. The first index is 0. + * @returns the element at the specified index. + * @throws com::sun::star::lang::IndexOutOfBoundException if the index is not valid. + */ + getDataPointByIndex(nIndex: number): beans.XPropertySet; + + /** all data point formatting are cleared */ + resetAllDataPoints(): void; + + /** + * the formatting of the specified data point is cleared + * @param nIndex specifies the index of the data point within the series. The first index is 0. + */ + resetDataPoint(nIndex: number): void; + } + + interface XDataSeriesContainer extends uno.XInterface { + /** + * add a data series to the data series container + * @throws IllegalArgumentException If the given data series is already contained in the data series container. + */ + addDataSeries(aDataSeries: XDataSeries): void; + + /** retrieve all data series */ + DataSeries: SafeArray; + + /** retrieve all data series */ + getDataSeries(): SafeArray; + + /** removes one data series from the data series container. */ + removeDataSeries(aDataSeries: XDataSeries): void; + + /** set all data series */ + setDataSeries(aDataSeries: LibreOffice.SeqEquiv): void; + } + + /** Allows to set a default size. This size will be used in case no further information si available. */ + interface XDefaultSizeTransmitter extends uno.XInterface { + /** + * set a default size + * @param aSize100ThMm specifies a size in hundredth mm. + */ + setDefaultSize(aSize100ThMm: awt.Size): void; + } + + interface XDiagram extends uno.XInterface { + /** returns an {@link XColorScheme} that defines the default colors for data series (or data points) in the diagram. */ + DefaultColorScheme: XColorScheme; + + /** + * returns the property set that determines the visual appearance of the floor if any. + * + * The floor is the bottom of a 3D diagram. For a 2D diagram NULL is returned. + */ + readonly Floor: beans.XPropertySet; + + /** returns an {@link XColorScheme} that defines the default colors for data series (or data points) in the diagram. */ + getDefaultColorScheme(): XColorScheme; + + /** + * returns the property set that determines the visual appearance of the floor if any. + * + * The floor is the bottom of a 3D diagram. For a 2D diagram NULL is returned. + */ + getFloor(): beans.XPropertySet; + + /** returns the legend, which may represent data series and other information about a diagram in a separate box. */ + getLegend(): XLegend; + + /** + * returns the property set that determines the visual appearance of the wall. + * + * The wall is the area behind the union of all coordinate systems used in a diagram. + */ + getWall(): beans.XPropertySet; + + /** returns the legend, which may represent data series and other information about a diagram in a separate box. */ + Legend: XLegend; + + /** sets an {@link XColorScheme} that defines the default colors for data series (or data points) in the diagram. */ + setDefaultColorScheme(xColorScheme: XColorScheme): void; + + /** + * sets new data to the diagram. + * @param xDataSource This data source will be interpreted in a chart-type specific way and the {@link DataSeries} found in `xDiagram` will be adapted to t + * @param aArguments Arguments tells how to slice the given data. For standard parameters that may be used, see the service {@link StandardDiagramCreation + */ + setDiagramData(xDataSource: data.XDataSource, aArguments: LibreOffice.SeqEquiv): void; + + /** sets a new legend. */ + setLegend(xLegend: XLegend): void; + + /** + * returns the property set that determines the visual appearance of the wall. + * + * The wall is the area behind the union of all coordinate systems used in a diagram. + */ + readonly Wall: beans.XPropertySet; + } + + /** Gives access to a single diagram. This interface is needed by the wrapper for the old API (namespace {@link com.sun.star.chart} ). */ + interface XDiagramProvider extends uno.XInterface { + Diagram: XDiagram; + getDiagram(): XDiagram; + setDiagram(xDiagram: XDiagram): void; + } + + interface XFormattedString extends uno.XInterface { + getString(): string; + setString(String: string): void; + String: string; + } + + /** + * Provides unified interface for {@link FormattedString} service. + * @since LibreOffice 4.1 + */ + interface XFormattedString2 extends beans.XPropertySet, XFormattedString { } + + /** An internal DataProvider that has more access to data than a plain DataProvider. */ + interface XInternalDataProvider extends data.XDataProvider { + /** same as insertSequence with nAfterIndex being the largest current index of the data, i.e. (size - 1) */ + appendSequence(): void; + + /** + * deletes an additional sequence for categories at nLevel>=1; categories at level 0 are always present and cannot be deleted + * @since OOo 3.3 + */ + deleteComplexCategoryLevel(nLevel: number): void; + deleteDataPointForAllSequences(nAtIndex: number): void; + deleteSequence(nAtIndex: number): void; + getDataByRangeRepresentation(aRange: string): SafeArray; + hasDataByRangeRepresentation(aRange: string): boolean; + + /** + * insert an additional sequence for categories nLevel>=1; categories at level 0 are always present and cannot be inserted or deleted + * @since OOo 3.3 + */ + insertComplexCategoryLevel(nLevel: number): void; + insertDataPointForAllSequences(nAfterIndex: number): void; + insertSequence(nAfterIndex: number): void; + + /** + * If range representations of data sequences change due to internal structural changes, they must be registered at the data provider. + * + * Sequences that are directly retrieved via the methods of the XDataProvider interface are already registered. If a labeled data sequence was created by + * cloning an existing one, it has to be explicitly registered via this method. + */ + registerDataSequenceForChanges(xSeq: data.XDataSequence): void; + setDataByRangeRepresentation(aRange: string, aNewData: LibreOffice.SeqEquiv): void; + swapDataPointWithNextOneForAllSequences(nAtIndex: number): void; + } + + interface XLabeled { + getLabel(): XTitle; + getLabelAnchor(): drawing.RectanglePoint; + getOffset(): SafeArray; + getOwnAnchor(): drawing.RectanglePoint; + Label: XTitle; + LabelAnchor: drawing.RectanglePoint; + Offset: SafeArray; + OwnAnchor: drawing.RectanglePoint; + setLabel(xTitle: XTitle): void; + setLabelAnchor(aAnchorPoint: drawing.RectanglePoint): void; + setOffset(aOffsetVector: LibreOffice.SeqEquiv): void; + setOwnAnchor(aAnchorPoint: drawing.RectanglePoint): void; + } + + interface XRegressionCurve extends uno.XInterface { + readonly Calculator: XRegressionCurveCalculator; + EquationProperties: beans.XPropertySet; + getCalculator(): XRegressionCurveCalculator; + getEquationProperties(): beans.XPropertySet; + setEquationProperties(xEquationProperties: beans.XPropertySet): void; + } + + interface XRegressionCurveCalculator extends uno.XInterface { + /** + * Returns the value of the correlation coefficient for the given regression. This value is often denoted as **r** or **R** . + * + * The value of **r** is signed. Often **r**2 is used instead of **r** to denote a regression curve's accuracy. + * @returns The return value is the fraction of the variance in the data that is explained by the regression. + */ + readonly CorrelationCoefficient: number; + + /** + * Returns the value of the correlation coefficient for the given regression. This value is often denoted as **r** or **R** . + * + * The value of **r** is signed. Often **r**2 is used instead of **r** to denote a regression curve's accuracy. + * @returns The return value is the fraction of the variance in the data that is explained by the regression. + */ + getCorrelationCoefficient(): number; + + /** + * calculates the value of the regression curve for **x** . + * @param x The abscissa value for which the value of the regression curve should be calculated. All numbers that are part of the domain of the regression + * @returns If **x** is element of the domain of the regression curve function, the result is its value. + * @throws com::sun::star::lang::IllegalArgumentException If **x** is not part of the domain of the regression function. + */ + getCurveValue(x: number): number; + + /** + * calculate multiple points of a regression curve at once. Note that this method may optimize the output by returning less points, e.g. for a line you + * may get only two resulting points instead of nPointCount() points. This is only allowed if the parameter bMaySkipPointsInCalculation() is set to + * `TRUE` . + * + * It is important that a renderer takes the scalings into account. When one of these parameters is unknown, no optimization must be done. + * @param min the abscissa value for the starting point. + * @param max the abscissa value for the ending point. + * @param nPointCount the number of points to calculate. + * @param bMaySkipPointsInCalculation determines whether it is allowed to skip points in the calculation. When this parameter is `TRUE` it is assumed that + * @param xScalingX a scaling that is used for the values in x-direction + * @param xScalingY a scaling that is used for the values in y-direction + */ + getCurveValues(min: number, max: number, nPointCount: number, xScalingX: XScaling, xScalingY: XScaling, bMaySkipPointsInCalculation: boolean): SafeArray; + + /** + * Returns a representation using the given number format for formatting all numbers contained in the formula. Wrap equation to fit in nFormulaLength + * characters + * @see getRepresentation + */ + getFormattedRepresentation(xNumFmtSupplier: util.XNumberFormatsSupplier, nNumberFormatKey: number, nFormulaLength: number): string; + + /** + * Retrieve a string showing the regression curve's function with calculated parameters. + * @returns The string returned contains the regression curve's formula in a form `"f(x) = ..."` , where the calculated parts are filled out. For a linear re + */ + getRepresentation(): string; + + /** + * recalculates the parameters of the internal regression curve according to the **x** - and **y** -values given. + * @param aXValues All x-values that represent the measurement points on which the regression is based + * @param aYValues All y-values that represent the measurement points on which the regression is based + */ + recalculateRegression(aXValues: LibreOffice.SeqEquiv, aYValues: LibreOffice.SeqEquiv): void; + + /** + * Retrieve a string showing the regression curve's function with calculated parameters. + * @returns The string returned contains the regression curve's formula in a form `"f(x) = ..."` , where the calculated parts are filled out. For a linear re + */ + readonly Representation: string; + + /** + * set calculation properties for curve calculation. + * @param degree Degree of polynomial regression curve, value should be greater than zero If the curve is not polynomial, this property has no effect. + * @param period Period of a moving average regression curve, value should greater or equal to 2 If the curve is not moving average regression curve, this + * @param forceIntercept Should force the intercept value. + * @param interceptValue Intercept value. + */ + setRegressionProperties(degree: number, forceIntercept: boolean, interceptValue: number, period: number): void; + + /** + * Set the names of X and Y variables of the equation to replace "x" and "f(x)" in representation + * @param aXName string of the name of X variable + * @param aYName string of the name of Y variable + */ + setXYNames(aXName: string, aYName: string): void; + } + + interface XRegressionCurveContainer extends uno.XInterface { + /** + * add an regression curve to the container + * @throws IllegalArgumentException If the given regression curve is already contained in the container. + */ + addRegressionCurve(aRegressionCurve: XRegressionCurve): void; + + /** retrieve all regression curves */ + getRegressionCurves(): SafeArray; + + /** retrieve all regression curves */ + RegressionCurves: SafeArray; + + /** removes one regression curve from the container. */ + removeRegressionCurve(aRegressionCurve: XRegressionCurve): void; + + /** set all regression curves */ + setRegressionCurves(aRegressionCurves: LibreOffice.SeqEquiv): void; + } + + interface XScaling extends uno.XInterface { + /** + * Given a numeric value, return the scaled value that conforms to a predefined scaling rule. For instance, for linear scaling, given a x value, the + * method may return a y value as defined by y = Ax + B for predefined values of A and B. + * @param value input value from which to calculate the scaled value. + * @returns scaled value based on a predefined scaling rule. + */ + doScaling(value: number): number; + + /** + * Get an interface object that conforms to a scaling rule that is the reverse of the original scaling rule. + * @returns internface object that represents the reversed scaling rule. + */ + getInverseScaling(): XScaling; + + /** + * Get an interface object that conforms to a scaling rule that is the reverse of the original scaling rule. + * @returns internface object that represents the reversed scaling rule. + */ + readonly InverseScaling: XScaling; + } + + interface XTarget extends uno.XInterface { + addDrawElement(): void; + } + + interface XTimeBased extends uno.XInterface { + setRange(start: number, end: number): void; + + /** + * point is the zero based index into the time based array + * @returns FALSE if the point is outside of the supported array + */ + setToPointInTime(point: number): boolean; + + /** @returns FALSE if the data wrapped around */ + switchToNext(wrap: boolean): boolean; + } + + interface XTitle extends uno.XInterface { + getText(): SafeArray; + setText(Strings: LibreOffice.SeqEquiv): void; + Text: SafeArray; + } + + /** Interface to be implemented by objects that support having a title of type {@link XTitle} . */ + interface XTitled extends uno.XInterface { + /** get the object holding the title's content and formatting */ + getTitleObject(): XTitle; + + /** set a new title object replacing the former one */ + setTitleObject(Title: XTitle): void; + + /** get the object holding the title's content and formatting */ + TitleObject: XTitle; + } + + /** allows the transformation of numeric values from one coordinate-system into an other. Values may be transformed using any mapping. */ + interface XTransformation extends uno.XInterface { + /** the dimension of the input coordinate sequence that is to be transformed by the {@link transform()} method. */ + getSourceDimension(): number; + + /** the dimension of the output coordinate sequence that is the result of the {@link transform()} method. */ + getTargetDimension(): number; + + /** the dimension of the input coordinate sequence that is to be transformed by the {@link transform()} method. */ + readonly SourceDimension: number; + + /** the dimension of the output coordinate sequence that is the result of the {@link transform()} method. */ + readonly TargetDimension: number; + + /** + * transforms the given input data tuple, given in the source coordinate system, according to the internal transformation rules, into a tuple of + * transformed coordinates in the destination coordinate system. + * + * Note that both coordinate systems may have different dimensions, e.g., if a transformation does simply a projection into a lower-dimensional space. + * @param aValues a source tuple of data that is to be transformed. The length of this sequence must be equivalent to the dimension of the source coordinat + * @returns the transformed data tuple. The length of this sequence is equal to the dimension of the output coordinate system. + * @throws com::sun::star::lang::IllegalArgumentException if the dimension of the input vector is not equal to the dimension given in {@link getSourceDimens + */ + transform(aValues: LibreOffice.SeqEquiv): SafeArray; + } + + namespace AxisType { + const enum Constants { + CATEGORY = 2, + DATE = 4, + PERCENT = 1, + REALNUMBER = 0, + SERIES = 3, + } + } + + namespace data { + /** + * a string that states in what way a {@link DataSequence} should be used. If this property is an empty string, no proposition about usage is made. + * + * The strings can have any value. However some values are predefined and should always be interpreted in the same way. + * + * **label **: values are used as a label for a series. Usually, you will have just one cell containing a string. + * + * **values-x **: values are used as x-values in an XY- or bubble diagram + * + * **values-y **: values are used as y-values in an XY-Diagram or as values in a bar, line, etc. chart + * + * **values-z **: values may be used as z-values in a three-dimensional XYZ-Diagram or a surface-chart + * + * **sizes **: values are used as radius of the bubbles in a Bubble-Diagram + * + * **error-bars-x-positive **: values are used as error-information in positive x-direction for displaying error-bars + * + * **error-bars-x-negative **: values are used as error-information in negative x-direction for displaying error-bars + * + * **error-bars-y-positive **: values are used as error-information in positive y-direction for displaying error-bars + * + * **error-bars-y-negative **: values are used as error-information in negative y-direction for displaying error-bars + * + * **categories **: values are used for categories in the diagram + * + * + * + * In a candle-stick chart you have the following roles: + * + * **values-first **: the first value of a series of values. In a stock-chart this would be the opening course. + * + * **values-last **: the last value of a series of values. In a stock-chart this would be the closing course. + * + * **values-min **: the minimum value of a series of values. In a stock-chart this would be the lowest course that occurred during trading. + * + * **values-max **: the maximum value of a series of values. In a stock-chart this would be the highest course that occurred during trading. + */ + type DataSequenceRole = string; + + /** describes a service that allows reading two-dimensional data in the form of a sequence of DataSequences. */ + type DataSink = XDataSink; + + /** describes a service that allows reading two-dimensional data in the form of a sequence of DataSequences. */ + type DataSource = XDataSource; + + /** describes a container for a sequence pair of value-sequences, one for a label and one for the associated data. */ + type LabeledDataSequence = XLabeledDataSequence2; + + type RangeHighlighter = XRangeHighlighter; + + /** + * A selection change listener that is attached to a {@link XRangeHighlighter} in order to get notified about selection changes that affect range + * highlighting. + */ + type RangeHighlightListener = view.XSelectionChangeListener; + + /** + * is used to specify how the labels have to be created. + * @see XDataSequence.generateLabel(). + */ + const enum LabelOrigin { + /** + * Uses the column name for label generation. A spreadsheet range A1:A6 could, e.g., result in "Column A". + * + * If a range consists of more than one column the result of label generation may be empty. Of course, it could also succeed with a string like "Columns + * A to B". + */ + COLUMN = 2, + /** + * This is exactly the opposite of SHORT_SIDE. I.e., if SHORT_SIDE has the same effect as ROW, LONG_SIDE will have the same effect as COLUMN and the + * other way round. + * @see LabelOrigin.SHORT_SIDE + */ + LONG_SIDE = 1, + /** + * Uses the column name for label generation. A spreadsheet range A2:D2 could, e.g., result in "Row 2". + * + * If a range consists of more than one row the result of label generation may be empty. Of course, it could also succeed with a string like "Rows 1-3". + */ + ROW = 3, + /** + * If a range spans a single row over more than one column, this parameter has the same effect as ROW. If the range spans a single column over more than + * one row, this is the same as COLUMN. + * + * In case of a range spanning more than one column and row, the shorter range of both should be used (e.g. a spreadsheet range A1:B10 should treat + * columns as short side). + * + * In case of a rectangular range, or a range that is composed of more than one contiguous sub-regions, the short side cannot be determined, thus {@link + * XDataSequence.generateLabel()} will return an empty sequence. + */ + SHORT_SIDE = 0, + } + + interface DatabaseDataProvider extends XDatabaseDataProvider { + createWithConnection(connection: sdbc.XConnection): void; + } + + /** + * A filter gets some data and provides some data. The received data is typically (but not necessarily) different from the data that can be retrieved by + * a filter. + */ + interface DataFilter extends DataSink, DataSource { } + + interface DataProvider extends XDataProvider, XRangeXMLConversion { + /** If set to false `FALSE` , values from hidden cells are not returned. */ + IncludeHiddenCells: boolean; + } + + /** + * describes a container for a sequence of values. + * + * With the interface {@link XDataSequence} it is possible to transfer a complete sequence of values. + * + * With the optional {@link com.sun.star.container.XIndexReplace} it is possible to modify single elements, if the corresponding {@link DataProvider} + * supports modification of its values. + */ + interface DataSequence extends XDataSequence, XNumericalDataSequence, XTextualDataSequence, container.XIndexReplace, util.XCloneable, util.XModifyBroadcaster, + beans.XPropertySet { + /** a sequence of indexes that identify values that are hidden in the underlying data provider. */ + HiddenValues: SafeArray; + + /** If set to false `FALSE` , values from hidden cells are not returned. */ + IncludeHiddenCells: boolean; + + /** + * The key (index) of the number format that this sequence should be formatted with. + * + * The key identifies a number format in an {@link com.sun.star.util.XNumberFormats} object. This object can be retrieved by the {@link + * com.sun.star.util.XNumberFormatsSupplier} interface supported by {@link com.sun.star.chart.ChartDocument} . + * + * The role of the series inside a data series. This may be any string. However some strings are predefined and should always be used in the same way. + * @see DataSequenceRole + */ + Role: DataSequenceRole; + } + + interface HighlightedRange { + /** + * If the highlighted range is visually highlighted and this member is `TRUE` , the range given in {@link RangeRepresentation} may be included in a + * merged range rectangle spanning a bigger range. + */ + AllowMerginigWithOtherRanges: boolean; + + /** Only take the cell at position Index out of the given Range. If this value is -1 take the whole sequence. */ + Index: number; + + /** Use this color for marking the range. This color may be ignored and replaced by a better fitting color, if it would be otherwise not well visible. */ + PreferredColor: number; + + /** The range representation string of the highlighted range. */ + RangeRepresentation: string; + } + + interface TabularDataProviderArguments { + /** + * the range address string spanning all data. + * + * The range address string must be interpretable by the component that implements {@link XDataProvider} and gets this property as argument to {@link + * XDataProvider.detectArguments()} . + * + * The representation string is of a form that may be used in the user interface. Example for OOo Calc: "$Sheet1.$A$1:$D$7", example for OOo Writer: + * "<Table1.A1:D7>". + * + * When used as input, this range will be split in columns or rows depending on the property {@link DataRowSource} . + * + * When used as output of {@link XDataProvider.detectArguments()} this is the range that spans the ranges of all given XDataSequences. If the result is + * ambiguous, i.e., a splitting of this range would not yield the same result, this property should be empty. The latter is the case, when ranges are + * overlapping, the lengths of sequences are not equal or even if the order of two sequences is swapped (e.g. data comes from column A, C, B). + */ + CellRangeRepresentation: string; + + /** + * determines, whether data sequences are created out of columns or rows in a table. + * + * If this property is not given as argument it is assumed to com::sun::star::chart::ChartDataRowSource::COLUMNS, i.e., the default is "take data from + * columns". + */ + DataRowSource: chart.ChartDataRowSource; + + /** + * If data comes from columns, the first row will provide the labels for all sequences, if data comes from rows, the first column will provide the labels + * for all sequences. + * + * Even if this property is false, the {@link XLabeledDataSequence} may contain a label, but this will not be the first cell of the selection. It may be + * a generic string like "Column C". + * + * If this property is not given as argument it is assumed to be `FALSE` , i.e., the default is "no labels". + */ + FirstCellAsLabel: boolean; + + /** + * If `FALSE` the data provider may create a data sequence containing generated categories that fit the rest of the data, like e.g. "Row 12", "Row 13", + * etc. + * + * This property is not relevant for the splitting up of the data. It just indicates, if the chart wants to use part of the data as categories, so that + * generic categories can be returned if it doesn't. + * + * The generic category labeled sequence returned should be the first one in the returned {@link XDataSource} . It needs no label. The values should have + * their role set to "categories". The generic strings returned should also be localized. + */ + HasCategories: boolean; + + /** + * determines the order of the created labeled sequences + * + * For example a SequenceMapping of [3,0,2,1] indicates that the sequence from old position "3" should now be the first one. Then comes the sequence from + * old position "0". Then that one from old position "2" and then the sequence from old position "1". + * + * If the SequenceMapping contains invalid indexes just ignore those single indexes. For example if you only have three labeled sequences and a + * SequenceMapping [2,5,1,0], you should ignore the "5" and continue to place the sequence from old index "1" to the next new position and so on. + * + * If the given SequenceMapping does not cover all existing labeled sequences just put the remaining sequences in old order behind the others. For + * example you have 4 sequences and a SequenceMapping [3,1]. The result should be a as if [3,1,0,2] was given. + */ + SequenceMapping: SafeArray; + + /** + * This property is for providing proprietary table indexes for each table appearing in a range given in CellRangeRepresentation. + * @deprecated Deprecated This argument is supported by Spreadsheets in order to be able to export a document into the StarOffice 5.0 binary format. Example: + */ + TableNumberList: string; + } + + /** + * identifies a {@link XDataProvider} for result sets. + * @see XDataProvider + * @see DataProvider + */ + interface XDatabaseDataProvider extends XDataProvider, XRangeXMLConversion, lang.XInitialization, lang.XComponent, beans.XPropertySet, sdbc.XParameters, sdbc.XRowSet { + /** specifies the active connection which is used to create the resulting report. */ + ActiveConnection: sdbc.XConnection; + + /** indicates whether the filter should be applied or not, default is `FALSE` . */ + ApplyFilter: boolean; + + /** + * is the command which should be executed, the type of command depends on the CommandType. + * + * In case of a {@link CommandType} of CommandType::COMMAND, means in case the {@link Command} specifies an SQL statement, the inherited {@link + * com.sun.star.sdbc.RowSet.EscapeProcessing} becomes relevant: ; It then can be to used to specify whether the SQL statement should be analyzed on the + * client side before sending it to the database server. ; The default value for {@link com.sun.star.sdbc.RowSet.EscapeProcessing} is `TRUE` . By + * switching it to `FALSE` , you can pass backend-specific SQL statements, which are not standard SQL, to your database. + * @see com.sun.star.sdb.CommandType + */ + Command: string; + + /** + * specifies the type of the command to be executed to retrieve a result set. + * + * {@link Command} needs to be interpreted depending on the value of this property. + * + * This property is only meaningful together with the {@link Command} property, thus either **both** or **none** of them are present. + * @see com.sun.star.sdb.CommandType + */ + CommandType: number; + + /** is the name of the data source to use, this could be a named data source or the URL of a data access component. */ + DataSourceName: string; + + /** + * is used for subreports and contains the names of the columns of the subreport which are related to the master fields of the parent report. + * + * Entries in this sequence can either denote column names in the sub report, or parameter names. ; For instance, you could base the report on the SQL + * statement `SELECT * FROM invoices WHERE cust_ref = :cid` , and add `cid` to the DetailFields property. In this case, the parameter will be filled from + * the corresponding master field. ; Alternatively, you could simply base your report on the table `invoices` , and add the column name `cust_ref` to + * the DetailFields. In this case, and implicit filter clause `WHERE cust_ref = :` will be created, and the artificial parameter will be + * filled from the corresponding master field. ; If a string in this property denotes both a column name and a parameter name, it is undefined which way + * it is interpreted, but implementations of the service are required to either decide for the parameter or the column, and proceed as usual. + * + * The columns specified herein typically represent a part of the primary key fields or their aliases of the detail report. + * + * If the report is no sub report (e.g. its parent is not a report itself), this property is not evaluated. + */ + DetailFields: SafeArray; + + /** + * specifies if the {@link Command} should be analyzed on the client side before sending it to the database server. + * + * The default value of this property is `TRUE` . By switching it to `FALSE` , you can pass backend-specific SQL statements, which are not standard SQL, + * to your database. + * + * This property is usually present together with the {@link Command} and {@link CommandType} properties, and is evaluated if and only if {@link + * CommandType} equals CommandType::COMMAND. + */ + EscapeProcessing: boolean; + + /** + * specifies an additional filter to optionally use. + * + * The Filter string has to form a SQL WHERE-clause, **without** the WHERE-string itself. + * + * If a {@link DataSourceName} , {@link Command} and {@link CommandType} are specified, a RowSet can be created with this information. If the results + * provided by the row set are to be additionally filtered, the Filter property can be used. + * + * Note that the Filter property does not make sense if a resultSet has been specified in the DataAccessDescriptor. + * @see com.sun.star.sdb.RowSet + * @see ResultSet + */ + Filter: string; + + /** additional group by for the row set */ + GroupBy: string; + + /** additional having clause for the row set */ + HavingClause: string; + + /** + * is used for subreports and contains the names of columns of the parent report. + * + * These columns are typically the foreign key fields of the parent report. The values of theses columns are used to identify the data for the subreport. + * Each time the parent report changes its current row, the subreport requeries it's data based on the values of the master fields. + * + * If the report is no sub report (e.g. its parent is not a report itself), this property is not evaluated. + */ + MasterFields: SafeArray; + + /** is a additional sort order definition for a row set. */ + Order: string; + + /** + * specifies the maximal count of rows which should be fetched. + * + * A value of zero implies that no limit exists. + */ + RowLimit: number; + } + + /** An application that provides data for a chart must implement this interface. */ + interface XDataProvider extends uno.XInterface { + /** + * creates a single data sequence for the given data range. + * @param aRangeRepresentation is a string that can be interpreted by the component that implements this interface. The representation string is of a form + * @see createDataSource + * @throws com::sun::star::lang::IllegalArgumentException if the given range does not contain a valid range representation for a one-dimensional range of data. + */ + createDataSequenceByRangeRepresentation(aRangeRepresentation: string): XDataSequence; + + /** + * If `TRUE` is returned, a call to createDataSequenceByRangeRepresentation with the same argument must return a valid {@link XDataSequence} object. If + * `FALSE` is returned, createDataSequenceByRangeRepresentation throws an exception. + */ + createDataSequenceByRangeRepresentationPossible(aRangeRepresentation: string): boolean; + createDataSequenceByValueArray(aRole: string, aValueArray: string): XDataSequence; + + /** + * Creates a data source object that matches the given range representation string. + * + * This can be used for creating the necessary data for a new chart out of a previously selected range of cells in a spreadsheet. + * @param aArguments Arguments that tell the data provider how to slice the given range. The properties should be defined in a separate service. For sprea + * @returns a data source containing DataSequences that span the entire region given in `aArguments` . + * @throws com::sun::star::lang::IllegalArgumentException may be raised by the {@link XDataProvider} if it is unable to interpret the arguments passed in `a + */ + createDataSource(aArguments: LibreOffice.SeqEquiv): XDataSource; + + /** + * If `TRUE` is returned, a call to createDataSource with the same arguments must return a valid {@link XDataSequence} object. If `FALSE` is returned, + * createDataSource throws an exception. + */ + createDataSourcePossible(aArguments: LibreOffice.SeqEquiv): boolean; + + /** + * Tries to find out with what parameters the passed {@link DataSource} most probably was created. + * + * if xDataSource is a data source that was created with {@link createDataSource()} , the arguments returned here should be the same than the ones passed + * to the function. Of course, this cannot be guaranteed. However, if detection is ambiguous, the returned arguments should be empty. + * + * This method may merge representation strings together if adjacent ranges appear successively in the range identifiers. E.g., if the first range refers + * to "$Sheet1.$A$1:$A$8" and the second range refers to "$Sheet1.$B$1:$B$8", those should be merged together to "$Sheet1.$A$1:$B$8". + * @param xDataSource A data source containing all data used in a chart. + * @returns Arguments that when being passed to {@link createDataSource()} should in an ideal case return the same data source as `xDataSource` . + */ + detectArguments(xDataSource: XDataSource): SafeArray; + + /** + * Returns a component that is able to change a given range representation to another one. This usually is a controller-component that uses the GUI to + * allow a user to select a new range. + * + * This method may return nothing, if it does not support range selection or if there is no current controller available that offers the functionality. + * @returns The component for selecting a new range. It must support XComponent, in order to inform the receiver about its lifetime. + */ + getRangeSelection(): sheet.XRangeSelection; + + /** + * Returns a component that is able to change a given range representation to another one. This usually is a controller-component that uses the GUI to + * allow a user to select a new range. + * + * This method may return nothing, if it does not support range selection or if there is no current controller available that offers the functionality. + * @returns The component for selecting a new range. It must support XComponent, in order to inform the receiver about its lifetime. + */ + readonly RangeSelection: sheet.XRangeSelection; + } + + interface XDataReceiver extends uno.XInterface { + /** + * attaches a component that provides data for the document. + * + * The previously set data provider will be released. + * @param xProvider The new {@link DataProvider} . If it is an empty reference, the {@link ChartDocument} will have no data. + */ + attachDataProvider(xProvider: XDataProvider): void; + + /** + * attaches an XNumberFormatsSupplier to this {@link XDataReceiver} . + * + * The given number formats will be used for display purposes. + */ + attachNumberFormatsSupplier(xSupplier: util.XNumberFormatsSupplier): void; + + /** + * Returns a component at which a view representing the data of the attached data provider may listen for highlighting the data ranges used by the + * currently selected objects in the data receiver component. + * + * This is typically used by a spreadsheet to highlight the ranges used by the currently selected object in a chart. + * + * The range highlighter is optional, i.e., this method may return an empty object. + */ + getRangeHighlighter(): XRangeHighlighter; + + /** Returns the data requested by the most recently attached data provider, that is still used. */ + getUsedData(): XDataSource; + + /** + * returns a list of all range strings for which data has been requested by the most recently attached data provider, and which is still used. + * + * This list may be used by the data provider to swap charts out of memory, but still get informed by changes of ranges while the chart is not loaded. + * @returns a list of used range strings. + */ + getUsedRangeRepresentations(): SafeArray; + + /** + * Returns a component at which a view representing the data of the attached data provider may listen for highlighting the data ranges used by the + * currently selected objects in the data receiver component. + * + * This is typically used by a spreadsheet to highlight the ranges used by the currently selected object in a chart. + * + * The range highlighter is optional, i.e., this method may return an empty object. + */ + readonly RangeHighlighter: XRangeHighlighter; + setArguments(aArguments: LibreOffice.SeqEquiv): void; + + /** Returns the data requested by the most recently attached data provider, that is still used. */ + readonly UsedData: XDataSource; + + /** + * returns a list of all range strings for which data has been requested by the most recently attached data provider, and which is still used. + * + * This list may be used by the data provider to swap charts out of memory, but still get informed by changes of ranges while the chart is not loaded. + * @returns a list of used range strings. + */ + readonly UsedRangeRepresentations: SafeArray; + } + + /** + * allows access to a one-dimensional sequence of data. + * + * The data that is stored in this container may contain different types. + */ + interface XDataSequence extends uno.XInterface { + /** + * retrieves the data stored in this component. + * @returns a sequence containing the actual data. This sequence is a copy of the internal data. Therefore changing this object does not affect the content o + */ + readonly Data: SafeArray; + + /** + * creates a label that describes the origin of this data sequence. + * + * This is useful, if a {@link XLabeledDataSequence} has no label sequence. In this case you can call this method at the value sequence to obtain a + * fitting replacement label. + * + * The sequence returned here may be empty if no suitable label can be generated. + * + * The strings returned should be localized. + * @param eLabelOrigin denotes what part of the range should be used for label generation. If you have, e.g., one cell only, the parameter COLUMN enables y + * @returns Suitable labels for the given sequence depending on the range of the sequence and the parameter `eLabelOrigin` passed. In a spreadsheet this woul + */ + generateLabel(eLabelOrigin: LabelOrigin): SafeArray; + + /** + * retrieves the data stored in this component. + * @returns a sequence containing the actual data. This sequence is a copy of the internal data. Therefore changing this object does not affect the content o + */ + getData(): SafeArray; + + /** + * returns a number format key for the value at the given index in the data sequence. If nIndex is -1, a key for the entire sequence should be returned, + * e.g. the most commonly used one. + * + * If number formats are not supported, or there is no heuristic to return a key for the entire series, return 0 here. + * + * The number format key must be valid for the {@link com.sun.star.util.XNumberFormatsSupplier} given by the {@link XDataProvider} , or 0 which is + * assumed to be always valid. + */ + getNumberFormatKeyByIndex(nIndex: number): number; + + /** returns the (UI) range representation string used by this {@link XDataSequence} . */ + getSourceRangeRepresentation(): string; + + /** returns the (UI) range representation string used by this {@link XDataSequence} . */ + readonly SourceRangeRepresentation: string; + } + + /** + * is a container for sequences of data. With this interface data can only be written to. + * + * If you want to be able to also read the data set here, your component must also implement {@link XDataSource} . + */ + interface XDataSink extends uno.XInterface { + /** + * sets new data sequences. The elements set here must support the service {@link DataSequence} . + * + * If the data consist only of floating point numbers (double values), the instances set here should also support the service NumericalDataSequence. + * + * If the data consist only of strings, the instances set here should also support the service TextualDataSequence. + * + * If one of the derived services is supported by one element of the sequence, it should be available for all elements in the sequence. + */ + setData(aData: LibreOffice.SeqEquiv): void; + } + + /** + * provides access to sequences of data. With this interface data can only be read from. + * + * If the data stored consists only of floating point numbers (double values), the returned instances should also support the service + * NumericalDataSequence. + * + * If the data stored consists only of strings, the returned instances should also support the service TextualDataSequence. + */ + interface XDataSource extends uno.XInterface { + /** + * returns data sequences. + * @returns a sequence of objects that support at least the service {@link DataSequence} . If the data stored consist only of floating point numbers (double + */ + readonly DataSequences: SafeArray; + + /** + * returns data sequences. + * @returns a sequence of objects that support at least the service {@link DataSequence} . If the data stored consist only of floating point numbers (double + */ + getDataSequences(): SafeArray; + } + + /** + * allows access to a one-dimensional sequence of data. + * + * The data that is stored in this container may contain different types. + */ + interface XLabeledDataSequence extends uno.XInterface { + /** returns an {@link XDataSequence} containing the label for the labeled sequence. */ + getLabel(): XDataSequence; + + /** returns an {@link XDataSequence} containing the actual data. */ + getValues(): XDataSequence; + + /** returns an {@link XDataSequence} containing the label for the labeled sequence. */ + Label: XDataSequence; + + /** sets a new {@link XDataSequence} containing the label for the labeled sequence. */ + setLabel(xSequence: XDataSequence): void; + + /** sets a new {@link XDataSequence} containing the actual data. */ + setValues(xSequence: XDataSequence): void; + + /** returns an {@link XDataSequence} containing the actual data. */ + Values: XDataSequence; + } + + /** @since LibreOffice 4.1 */ + interface XLabeledDataSequence2 extends XLabeledDataSequence, util.XModifyBroadcaster, util.XCloneable { } + + /** allows access to a one-dimensional sequence of double precision floating-point numbers. */ + interface XNumericalDataSequence extends uno.XInterface { + /** retrieves data as `double` values. */ + getNumericalData(): SafeArray; + + /** retrieves data as `double` values. */ + readonly NumericalData: SafeArray; + } + + interface XRangeHighlighter extends uno.XInterface { + /** registers an event listener, which is called when the selection is changed and affects different source ranges */ + addSelectionChangeListener(xListener: view.XSelectionChangeListener): void; + + /** Returns a list of ranges that are used by objects that are currently selected. */ + getSelectedRanges(): SafeArray; + + /** unregisters an event listener which was registered with {@link XRangeHighlighter.addSelectionChangeListener()} before. */ + removeSelectionChangeListener(xListener: view.XSelectionChangeListener): void; + + /** Returns a list of ranges that are used by objects that are currently selected. */ + readonly SelectedRanges: SafeArray; + } + + /** An application that provides data for a chart must implement this interface. */ + interface XRangeXMLConversion extends uno.XInterface { + /** converts an XML-style range into the internal {@link DataProvider} 's format. */ + convertRangeFromXML(aXMLRange: string): string; + + /** + * converts the range to a valid XML syntax. + * + * For example spreadsheet ranges consisting of more than one consecutive region are usually separated by a semicolon whereas in XML you separate + * multiple regions by a space. + */ + convertRangeToXML(aRangeRepresentation: string): string; + } + + /** Interface specific to spreadsheet data provider backend. */ + interface XSheetDataProvider extends uno.XInterface { + createDataSequenceByFormulaTokens(aTokens: LibreOffice.SeqEquiv): XDataSequence; + createDataSequenceByFormulaTokensPossible(aTokens: LibreOffice.SeqEquiv): boolean; + } + + /** allows access to a one-dimensional sequence of strings. */ + interface XTextualDataSequence extends uno.XInterface { + /** retrieves the data as strings */ + getTextualData(): SafeArray; + + /** retrieves the data as strings */ + readonly TextualData: SafeArray; + } + } + + namespace DataPointGeometry3D { + const enum Constants { + CONE = 2, + CUBOID = 0, + CYLINDER = 1, + PYRAMID = 3, + } + } + + namespace TickmarkStyle { + const enum Constants { + INNER = 1, + NONE = 0, + OUTER = 2, + } + } + } + + namespace configuration { + /** is thrown when an application tries to create a configuration provider but the configuration can't be loaded */ + type CannotLoadConfigurationException = uno.Exception; + + /** + * This exception is thrown in case the global UI configuration (including menubars/toolbars and accelerators) does not exists or contains corrupted + * data. + * @since OOo 2.3 + */ + type CorruptedUIConfigurationException = CorruptedConfigurationException; + + /** is thrown when creating a configuration provider fails because the user's installation for the is missing or incomplete */ + type InstallationIncompleteException = CannotLoadConfigurationException; + + /** + * The default {@link ConfigurationProvider} . + * + * This singleton somewhat arbitrarily makes available the {@link com.sun.star.lang.XMultiServiceFactory} interface of the (old-style) {@link + * DefaultProvider} service, as it is the most frequently used one. See the {@link DefaultProvider} service for details. + * @since OOo 1.1.2 + */ + type theDefaultProvider = lang.XMultiServiceFactory; + + type Update = XUpdate; + + /** + * provides information about the root element of a hierarchy and about the hierarchy as a whole. + * + * Provides information about the element and the whole hierarchy. Allows controlling the lifetime of the hierarchy. Allows observing changes in the + * hierarchy as a whole. + * + * When access to a hierarchy is first obtained from a factory or provider, this is the initial object that is created by the factory. It represents the + * **root** of the accessible part of the hierarchy. + * + * **NOTE: In this description "hierarchy" may actually designate a part or fragment of a larger hierarchy. It is that part that is rooted in the element + * represented by an implementation of this service and that is accessible starting from this element.** + * + * Generally it is not possible to navigate the parent or siblings, if any, of this element, so {@link com.sun.star.container.XChild} is not supported. + * @see com.sun.star.configuration.UpdateRootElement Implementations that support modifying data in the hierarchy implement service UpdateRootElement. + * @see com.sun.star.configuration.SetElement A complementary service, for children of a dynamic homogeneous container. + * @see com.sun.star.configuration.GroupElement A complementary service, for children of a static heterogeneous collection. + * @see com.sun.star.configuration.ConfigurationProvider Objects provided by a ConfigurationProvider implement this service. + */ + interface AccessRootElement extends HierarchyElement, lang.XComponent, util.XChangesNotifier, lang.XLocalizable { } + + /** + * manages one, or more, complete sets of configuration data for administrative purposes and serves as a factory for objects that provide access to + * subsets of these shared configurations. + * + * Shared sets of configuration data usually serve to provide defaults, which are used if no individual settings are present. Depending on the data store + * multiple layers of defaults may be combined with a user-specific layer to make up the final configuration. + * + * Many aspects of the supported behavior depend strongly on the underlying data store and on the administrative structures it defines. With some data + * stores this service also enables access to individual user's configuration data by an administrator. + * + * On the other hand, in the simplest model there is only a single layer of default data which is accessible through this service. + * + * An implementation is usually obtained from a {@link com.sun.star.lang.ServiceManager} . The arguments passed to + * com::sun::star::lang::XMultiComponentFactory::createInstanceWithContextAndArguments() select the configuration data source. They may also define the + * scope of administrable data or contain credentials to be used to authorize the administrative access. Missing parameters may be filled in from the + * context or the environment. + * @see com.sun.star.configuration.ConfigurationProvider Offers the same services and creates the same accessor objects as this service, but accesses the + */ + interface AdministrationProvider extends lang.XMultiServiceFactory, lang.XComponent { } + + /** + * provides read access to a fragment of the configuration hierarchy. + * + * Values that are direct or indirect descendants of a root element can be retrieved and, if themselves objects, navigated. Other interfaces provide + * access to information about this element and its context. Changes to values in the hierarchy can be monitored by event listeners. + * + * Descendants of this service also implement this service. + * + * Ultimately the configuration holds values. These values are organized into a hierarchy using structural elements. The structure is defined in advance + * in a schema. Necessary information from the schema is stored in the configuration repository itself and is accessible through an implementation of + * this service. + * + * Two different kinds of structural elements are used in the configuration hierarchy: + * + * **Sets **: are dynamic containers of homogeneous elements. Which elements a **set** contains can vary. Their names are defined by the clients that + * insert them. On the other hand, the **type** of the elements is the same for all elements. In the case of elements that are themselves hierarchy + * objects, the **type** includes the structure of the hierarchy fragment they contain. Such types are defined in the configuration schema as + * **templates** .; + * + * **Groups **: are static collections of heterogeneous elements. The names and types of the elements of a **group** are completely defined in the + * configuration schema. Here each element may be of a different **type** , allowing **groups** that contain a mix of subobjects and simple values. + * + * + * + * Objects in the configuration hierarchy, for example, implementations of this service, can thus be classified in the following ways: + * + * **Container** role: An object that can hold child elements as a **set** or a **group** .**Element** role: An object may be an element of a **set** or + * a **group** or else it may be the root element. + * + * Several types of simple **values** can be used in the configuration. In addition to the basic (scalar) types, sequences of the basic types are + * supported. The basic types are: + * + * **string** can hold a human-readable text. + * + * Values are represented as `string` . + * + * + * + * Sequences are represented as `string[]` . + * + * + * + * "human-readable" here excludes non-printing characters except for CR, LF and TAB [Unicode code points 9,10,13]. For binary data, use type + * **binary** instead. + * + * **boolean** can hold the values `TRUE` or `FALSE` . + * + * Values are represented as `boolean` . + * + * Sequences are represented as `boolean[]` . + * + * **short** can hold a 16-bit signed integer. + * + * Values are represented as `short` . + * + * + * + * Sequences are represented as `short[]` . + * + * **int** can hold a 32-bit signed integer. + * + * Values are represented as `long` . + * + * + * + * Sequences are represented as `long[]` . + * + * **long** can hold a 64-bit signed integer. + * + * Values are represented as `hyper` . + * + * + * + * Sequences are represented as `hyper[]` . + * + * **double** can hold a floating point number. + * + * Values are represented as `double` . + * + * + * + * Sequences are represented as `double[]` . + * + * **binary** can hold a sequence of octets. + * + * Values are represented as `byte[]` . + * + * + * + * Sequences are represented as `byte[][]` . + * + * + * + * Within templates an additional type **any** can occur. When such a template is used to create a new {@link SetElement} , the type of the element is + * initially reported as `any` (having no value). When the value of such an element is first set, it will assume the type used. + * + * If the schema marks a value as **nullable** (which is indicated by attribute {@link com.sun.star.beans.PropertyAttribute.MAYBEVOID} ), its contents + * may be `NULL` . + * + * The configuration should support explicit access to default values (implementing {@link com.sun.star.beans.XPropertyState} and {@link + * com.sun.star.beans.XPropertyWithState} ). + * @see ConfigurationProvider Root instances of this service can be requested from a ConfigurationProvider. + * @see ConfigurationUpdateAccess an extended service that includes facilities for modifying configuration data. + */ + interface ConfigurationAccess extends HierarchyAccess, HierarchyElement, SetAccess, GroupAccess, AccessRootElement, SetElement, GroupElement { + getPropertyStates(aPropertyName: LibreOffice.SeqEquiv): SafeArray; + } + + /** + * manages one, or more, complete sets of configuration data and serves as a factory for objects that provide access to a subset of the configuration. + * + * An implementation is usually obtained from a {@link com.sun.star.lang.ServiceManager} . The arguments passed to + * com::sun::star::lang::XMultiComponentFactory::createInstanceWithContextAndArguments() select the configuration data source. Arguments must be provided + * as {@link com.sun.star.beans.NamedValue} or {@link com.sun.star.beans.PropertyValue} . If the parameters given are incomplete missing values are taken + * from the context or the environment. If an instance already exists for the given set of arguments, the existing instance may be reused. In particular, + * instantiating a provider without explicit arguments to access the default configuration data will always yield the same {@link + * com.sun.star.configuration.DefaultProvider} object. + * + * Some arguments for {@link com.sun.star.lang.XMultiServiceFactory.createInstanceWithArguments()} may be given default values during creation of this + * service. In particular this applies to the parameters `"Locale"` and `"EnableAsync"` . + * @deprecated DeprecatedUse theDefaultProvider instead. + */ + interface ConfigurationProvider extends lang.XMultiServiceFactory, lang.XComponent { } + + interface ConfigurationRegistry extends registry.XSimpleRegistry, util.XFlushable { } + + /** + * provides modifying access to a fragment of the configuration hierarchy. + * + * Extends {@link ConfigurationAccess} to support modifying values or inserting and removing elements. + * + * Descendants of this service also implement this service unless they are marked **read-only** (which is indicated by attribute {@link + * com.sun.star.beans.PropertyAttribute.READONLY} ), in which case they only need implement {@link ConfigurationAccess} . + * + * The classification of implementations that is described for {@link ConfigurationAccess} applies to implementations of this service as well. Therefore + * an implementation will support one of several alternate services describing its **Container** role and one of several alternate services describing + * its **Element** role. These services are extensions of the respective services documented for {@link ConfigurationAccess} . + * + * **Container** role: A **group** permits changing child values. A **set** permits inserting and removing contained elements.**Element** role: The root + * element of a modifiable tree provides extended functionality to control processing of changes for the entire tree (fragment) by supporting {@link + * com.sun.star.util.XChangesBatch} . For elements of a **set** or a **group** no additional interfaces are supported. + * @see ConfigurationProvider Root instances of this service can be requested from a ConfigurationProvider + */ + interface ConfigurationUpdateAccess extends ConfigurationAccess, SetUpdate, GroupUpdate, UpdateRootElement { + createInstance(aServiceSpecifier: K): LibreOffice.ServicesNameMap[K]; + createInstance(aServiceSpecifier: K): LibreOffice.ServicesNameMap[K]; + createInstance(aServiceSpecifier: K): LibreOffice.ServicesNameMap[K]; + createInstance(aServiceSpecifier: K): LibreOffice.ServicesNameMap[K]; + createInstance(aServiceSpecifier?: string): uno.XInterface; + createInstanceWithArguments(ServiceSpecifier: K, Arguments: LibreOffice.SeqEquiv): LibreOffice.ServicesNameMap[K]; + createInstanceWithArguments(ServiceSpecifier: K, Arguments: LibreOffice.SeqEquiv): LibreOffice.ServicesNameMap[K]; + createInstanceWithArguments(ServiceSpecifier: K, Arguments: LibreOffice.SeqEquiv): LibreOffice.ServicesNameMap[K]; + createInstanceWithArguments(ServiceSpecifier: K, Arguments: LibreOffice.SeqEquiv): LibreOffice.ServicesNameMap[K]; + createInstanceWithArguments(aArguments: LibreOffice.SeqEquiv | string): uno.XInterface; + getPropertyStates(aPropertyName: LibreOffice.SeqEquiv): SafeArray; + } + + /** + * This exception is thrown in case a configuration does not exists or contains corrupt data. + * + * This exception must be used as base exception to derive specialized exceptions from it which identify a concrete error case. + * @since OOo 2.3 + */ + interface CorruptedConfigurationException extends uno.RuntimeException { + /** Instead of the message part of an exception, this value describe the type of corruption more in detail. */ + Details: string; + } + + /** + * is a {@link ConfigurationProvider} , that is the default {@link ConfigurationProvider} for its {@link com.sun.star.uno.XComponentContext} . + * + * This object is accessible as singleton {@link theDefaultProvider} + * + * . + * @since OOo 1.1.2 + */ + interface DefaultProvider extends ConfigurationProvider, util.XRefreshable, util.XFlushable, lang.XLocalizable { + /** + * Property to enable/disable asynchronous write-back from in-memory cache to backend(s) + * @since OOo 2.0 + */ + EnableAsync: boolean; + } + + /** + * provides access to a predefined heterogeneous group of values and nested trees as part of a hierarchy. + * + * Provides access to, and information about, its children and descendants viewed either as properties or as contained elements. + * + * **Groups** are static collections within the hierarchy. + * + * The number and names of contained elements are fixed in advance and each child may have a different type. + * + * This service subsumes two alternate ways of accessing child and descendent elements. These strongly overlap, supporting the basic identity + * `xGroup.getPropertyValue( aName ) == xGroup.getByName( aName )` . + * @see com.sun.star.configuration.GroupElement Child objects of this service generally implement service GroupElement. + * @see com.sun.star.configuration.SetAccess A complementary service providing for dynamic homogeneous sets of elements. + */ + interface GroupAccess extends HierarchyAccess, PropertyHierarchy, beans.XPropertyState, beans.XMultiPropertyStates { + getPropertyStates(aPropertyName: LibreOffice.SeqEquiv): SafeArray; + } + + /** + * provides information about a predefined element contained in a heterogeneous group of elements within a hierarchy. + * + * Provides information about the element. Provides access to its containing group object. + * + * A group element bears a predefined name. It may only exist within a containing group object. + * @see com.sun.star.configuration.GroupAccess Parent objects of this service generally implement service GroupAccess. + * @see com.sun.star.configuration.SetElement A complementary service, for elements of a dynamic homogeneous container. + * @see com.sun.star.configuration.AccessRootElement A complementary service, for the root element of a hierarchy. + */ + interface GroupElement extends HierarchyElement, container.XChild { } + + /** + * provides write access to a predefined heterogeneous group of values and nested trees as part of a hierarchy. + * + * This service extends {@link GroupAccess} to support modifying values. + */ + interface GroupUpdate extends GroupAccess, container.XNameReplace { } + + /** + * provides access to a hierarchy of descendant elements. + * + * Subnodes are accessed by their name. Values that are direct or indirect descendants of this tree node can be retrieved. Non-value subnodes can be + * navigated using container interfaces. Other interfaces provide access to information about this node. Changes to values in the subtree can be + * monitored by event listeners. + * + * Elements of this container that are not simple values are similar containers themselves, thus (recursively) forming a hierarchical tree. + * + * Implementations of this service usually also implement service {@link HierarchyElement} , which concerns the complementary role of being accessible as + * an element of the hierarchy. + */ + interface HierarchyAccess extends container.XNameAccess, container.XHierarchicalNameAccess, container.XContainer, beans.XExactName, beans.XPropertySetInfo, + beans.XPropertyState, beans.XMultiPropertyStates { + getPropertyStates(aPropertyName: LibreOffice.SeqEquiv): SafeArray; + } + + /** + * provides information about an element within a hierarchy. + * + * The local name and the full hierarchical name can be retrieved. Attributes detailing the role of the element can be queried. The state of the element + * (regarding defaults) can be accessed. + * + * Implementations of this service usually also implement service {@link HierarchyAccess} , which concerns the complementary role of providing access to + * subelements of the hierarchy. + */ + interface HierarchyElement extends container.XHierarchicalName, container.XNamed, beans.XProperty, beans.XPropertyWithState, container.XChild { } + + /** is thrown when creating a configuration provider fails because a bootstrap file needed to locate the configuration contains invalid data */ + interface InvalidBootstrapFileException extends CannotLoadConfigurationException { + BootstrapFileURL: string; + } + + /** is thrown when creating a configuration provider fails because a bootstrap file needed to locate the configuration is missing */ + interface MissingBootstrapFileException extends CannotLoadConfigurationException { + BootstrapFileURL: string; + } + + /** + * provides access to and information about properties and subproperties of an implementation. + * + * Properties in a property set may be full-fledged objects that have properties themselves (and so on recursively), thereby forming a hierarchy of + * properties. This service describes such a hierarchy, and allows direct access even to subproperties. + * @see com.sun.star.beans.XProperty Properties of an implementation that are objects themselves will often implement com.sun.star.beans.XProperty to all + */ + interface PropertyHierarchy extends beans.XPropertySet, beans.XMultiPropertySet, beans.XHierarchicalPropertySet, beans.XMultiHierarchicalPropertySet { } + + /** + * Provides easy read-only access to the complete configuration. + * + * This service is still unpublished and unstable. + * @since LibreOffice 4.0 + */ + interface ReadOnlyAccess extends container.XHierarchicalNameAccess { + /** + * Service constructor. + * @param locale a string representation of the locale to use for localized properties; use `*` for all-locale access + */ + create(locale: string): void; + } + + /** + * Provides easy read/write access to the complete configuration. + * + * This service is still unpublished and unstable. + * @since LibreOffice 4.0 + */ + interface ReadWriteAccess extends XReadWriteAccess { + /** + * Service constructor. + * @param locale a string representation of the locale to use for localized properties; use `*` for all-locale access + */ + create(locale: string): void; + } + + /** + * provides access to a dynamic, homogeneous set of values or nested trees within a hierarchy. + * + * Also provides information about the template for elements. Allows normalizing externally generated names. + * + * **Sets** are dynamic containers within the hierarchy. + * + * The number and names of contained elements are not fixed in advance, but all elements have to be of one predetermined type. + * @see com.sun.star.configuration.SetElement Child objects of this service generally implement SetElement. The template name returned by the child from + * @see com.sun.star.configuration.GroupAccess A complementary service that provides for static heterogeneous groups of elements within the hierarchy. + */ + interface SetAccess extends HierarchyAccess, SimpleSetAccess, container.XContainer { } + + /** + * provides information about a dynamic element that can be inserted into a homogeneous set of elements within a hierarchy. + * + * Provides information about the element. Provides access to its containing set object. Allows controlling the lifetime of the element. + * + * Set elements may be added to and removed from the hierarchy at runtime. They bear user-defined names. They may exist independently, outside any + * container. + * + * New set element instances generally are created through members of {@link com.sun.star.lang.XSingleServiceFactory} or, if supported, {@link + * com.sun.star.lang.XMultiServiceFactory} on an implementation of {@link SetUpdate} . Initially, they are not contained in a set object and have no + * meaningful name. + * + * While an instance is not contained in a set object, it is owned by the client and can be disposed by calling {@link + * com.sun.star.lang.XComponent.dispose()} . The name of the object can freely be changed in that situation though without persistent effect. + * + * When the instance is inserted into a set (this includes replacing an existing element), ownership is transferred to the container. While it is + * contained in the container, clients must not dispose the object. When inserted, the name of the object is fixed and is used to identify it within the + * container. An implementation may support {@link com.sun.star.container.XNamed.setName()} even in this case. If it does, changing the name has the same + * effect of removing the object (under the old name) and then reinserting it into the same container (using the new name). + * + * When an instance is removed from a set (this includes being replaced by a new element), ownership is transferred to the client again. It can then be + * disposed or reinserted into a container. An instance can only be inserted into a container, if it was obtained from the same hierarchy. + * + * When a set element is removed from its set from outside the hierarchy, the container disposes of the object. This occurrence can be detected by + * registering a {@link com.sun.star.lang.XEventListener} with the object. + * + * If an implementation is part of a **read-only** view of the hierarchy, changing the name or parent is not supported (the object can't be removed from + * its container anyway). + * @see com.sun.star.configuration.SetAccess Parent objects of this service generally implement service SetAccess. + * @see com.sun.star.configuration.GroupElement A complementary service for elements of a static heterogeneous collection. + * @see com.sun.star.configuration.AccessRootElement A complementary service for the root element of a hierarchy. + */ + interface SetElement extends HierarchyElement, container.XChild, lang.XComponent, XTemplateInstance { } + + /** + * provides write access to a dynamic homogeneous set of values or nested trees within a hierarchy. + * + * Allows adding and removing elements. Helps creates new elements to be added. + * + * This service extends {@link SetAccess} to support modifying the container. + * + * Any child and descendant objects support modifying access as well, unless they represent a read-only tree element (as indicated by {@link + * com.sun.star.beans.PropertyAttribute.READONLY} ). + */ + interface SetUpdate extends SetAccess, SimpleSetUpdate { + createInstance(aServiceSpecifier: K): LibreOffice.ServicesNameMap[K]; + createInstance(aServiceSpecifier: K): LibreOffice.ServicesNameMap[K]; + createInstance(aServiceSpecifier?: string): uno.XInterface; + createInstanceWithArguments(ServiceSpecifier: K, Arguments: LibreOffice.SeqEquiv): LibreOffice.ServicesNameMap[K]; + createInstanceWithArguments(ServiceSpecifier: K, Arguments: LibreOffice.SeqEquiv): LibreOffice.ServicesNameMap[K]; + createInstanceWithArguments(aArguments: LibreOffice.SeqEquiv | string): uno.XInterface; + } + + /** + * provides access to a dynamic, homogeneous, nonhierarchical set of values or objects. + * + * Also provides information about the template for elements. Allows normalizing externally generated names. + * + * **Sets** are dynamic containers. + * + * The number and names of contained elements is not fixed in advance, but all elements have to be of one predetermined type. + */ + interface SimpleSetAccess extends container.XNameAccess, XTemplateContainer, util.XStringEscape, container.XContainer { } + + /** + * provides write access to a dynamic, homogeneous, non-hierarchical set of values or objects. + * + * Allows adding and removing elements. Helps create new elements to be added. + * + * This service extends {@link SimpleSetAccess} to support modifying the container. Any child objects shall in turn support modifying access. + */ + interface SimpleSetUpdate extends SimpleSetAccess, container.XNameContainer, lang.XSingleServiceFactory, lang.XMultiServiceFactory { + createInstance(aServiceSpecifier: K): LibreOffice.ServicesNameMap[K]; + createInstance(aServiceSpecifier?: string): uno.XInterface; + createInstanceWithArguments(ServiceSpecifier: K, Arguments: LibreOffice.SeqEquiv): LibreOffice.ServicesNameMap[K]; + createInstanceWithArguments(aArguments: LibreOffice.SeqEquiv | string): uno.XInterface; + } + + /** + * provides update control for a hierarchy of configuration items and information about the hierarchy as a whole as well as its root. + * + * Extends {@link AccessRootElement} by adding support for collecting changes and applying them to a backend store as a single batch. + * + * An implementation represents the root of a partial hierarchy. [See the documentation for {@link AccessRootElement} ]. The hierarchy in turn is a + * **view** onto a fragment of persistent data tree that can be accessed through several such views, or even several processes, simultaneously. + * + * Elements of the hierarchy, such as descendants of this root element, may support modification by providing appropriate interfaces. Changes done this + * way initially only affect these objects themselves and other objects within the same hierarchy, such as other descendants of this root element. + * + * The accumulated changes within this hierarchy can be managed using {@link com.sun.star.util.XChangesBatch} . Pending changes will become persistent + * and visible from other overlapping hierarchies only when {@link com.sun.star.util.XChangesBatch.commitChanges()} is called. If the hierarchy is + * disposed or discarded without committing changes, the changes will be lost. + * @see com.sun.star.configuration.GroupUpdate + * @see com.sun.star.configuration.SetUpdate + */ + interface UpdateRootElement extends AccessRootElement, util.XChangesBatch { } + + interface XReadWriteAccess extends container.XHierarchicalNameReplace, util.XChangesBatch, beans.XHierarchicalPropertySetInfo { } + + /** + * is implemented by objects that contain instances of a named template to provide information about the template. + * + * An implementation will also implement {@link com.sun.star.lang.XSingleServiceFactory} , in which case that interface creates instances of the + * specified template. + * + * If multiple templates are supported, the supported factory interface may be {@link com.sun.star.lang.XMultiServiceFactory} , in which case the + * `string` returned from {@link XTemplateContainer.getElementTemplateName()} can be used as the service name argument. + * @see XTemplateInstance + */ + interface XTemplateContainer extends uno.XInterface { + /** + * retrieves the name of the template + * + * If instances of multiple templates are accepted by the container, this is the name of the basic or primary template. + * + * Instances of the template must be created using an appropriate factory. + * @returns the name of the (default) template for elements. + */ + readonly ElementTemplateName: string; + + /** + * retrieves the name of the template + * + * If instances of multiple templates are accepted by the container, this is the name of the basic or primary template. + * + * Instances of the template must be created using an appropriate factory. + * @returns the name of the (default) template for elements. + */ + getElementTemplateName(): string; + } + + /** + * is implemented by objects that are instances of a named template to provide information about the template. + * + * Template names are similar to service names, but apply to structure and content, rather than to type. + * + * Often a template description can be retrieved from a repository and then be interpreted by a factory object. Templates provide a means to build new + * kinds of objects dynamically. + * @see XTemplateContainer + */ + interface XTemplateInstance extends uno.XInterface { + /** + * retrieves the name of the template + * @returns the name of the template this object was built from or conforms to. + */ + getTemplateName(): string; + + /** + * retrieves the name of the template + * @returns the name of the template this object was built from or conforms to. + */ + readonly TemplateName: string; + } + + interface XUpdate { + insertExtensionXcsFile(shared: boolean, fileUri: string): void; + insertExtensionXcuFile(shared: boolean, fileUri: string): void; + insertModificationXcuFile(fileUri: string, includedPaths: LibreOffice.SeqEquiv, excludedPaths: LibreOffice.SeqEquiv): void; + removeExtensionXcuFile(fileUri: string): void; + } + + namespace backend { + /** + * Exception thrown when authentication to the underlying backend fails due to an unknown user-id or invalid credentials. + * @since OOo 1.1.2 + */ + type AuthenticationFailedException = BackendSetupException; + + /** + * Generic exception thrown when physical access to an underlying backend fails. + * + * Wraps an exception that originates in the underlying access layer. + * @since OOo 1.1.2 + */ + type BackendAccessException = lang.WrappedTargetException; + + /** + * Exception thrown when a connection to the underlying backend cannot be established. + * + * Examples of this include Misconfigured backend.Communications link failure.{@link Backend} is unavailable temporarily or permanently.Internal failure + * of the backend access layer. + * @since OOo 1.1.2 + */ + type CannotConnectException = BackendSetupException; + + /** + * Exception thrown when the connection to the underlying backend was lost irrecoverably. + * + * Any future attempts to access data from the backend through this object will also fail. + * @since OOo 1.1.2 + */ + type ConnectionLostException = BackendAccessException; + + /** + * allows importing data from one configuration repository into another. + * @since OOo 1.1.2 + */ + type DataImporter = task.XJob; + + /** + * is a {@link DefaultBackend} , that is the default {@link DefaultBackend} for its {@link com.sun.star.uno.XComponentContext} . + * + * This object is accessible as singleton within the context + * + * . + * @since OOo 1.1.2 + */ + type DefaultBackend = Backend; + + /** + * allows scanning a configuration data repository for available components . + * @since OOo 1.1.2 + */ + type HierarchyBrowser = task.XJob; + + /** + * Exception thrown when access to the underlying backend fails because of insufficient access rights to some needed resource. + * + * Examples of this include Misconfigured anonymous access.Missing rights to get internal configuration data.Missing access to shared or default + * data.Missing access to personal data.Missing write access when updating data. + * @since OOo 1.1.2 + */ + type InsufficientAccessRightsException = BackendAccessException; + + /** + * Exception thrown when authentication to the underlying backend fails because the configured authentication mechanism is not supported by the backend + * or no valid mechanism can be negotiated. + * @since OOo 1.1.2 + */ + type InvalidAuthenticationMechanismException = BackendSetupException; + + /** + * describe the contents of a layer to an {@link XLayerHandler} object. The contents of the layer is contained in the sequence of {@link PropertyInfo} + * structures + * @see PropertyInfo + */ + type LayerDescriber = XLayerContentDescriber; + + /** implements {@link MultiLayerStratum} that provides access to a multiple layers of configuration data from LDAP source */ + type LdapMultiLayerStratum = MultiLayerStratum; + + /** + * implements {@link SingleBackend} that stores data in an LDAP directory. + * @since OOo 1.1.2 + */ + type LdapSingleBackend = SingleBackend; + + /** implements {@link SingleLayerStratum} that provides access to a single layer of configuration data from LDAP source */ + type LdapSingleStratum = SingleLayerStratum; + + /** + * allows importing data from a local configuration data repository or file into any {@link Backend} . + * + * Data to be imported can be a single layer either from a full local configuration database or from a particular OOR {@link Update} XML file. + * + * Data is imported into the {@link DefaultBackend} . + * @see com.sun.star.configuration.backend.LocalHierarchyBrowser Service that can be used to locate available layer files or components. + * @see com.sun.star.configuration.backend.LocalSingleBackend Service that can be used to access a local configuration database. + * @since OOo 1.1.2 + */ + type LocalDataImporter = DataImporter; + + /** + * is a {@link HierarchyBrowser} , that browses a configuration database stored in the local file system. + * @see com.sun.star.configuration.backend.LocalSingleBackend + * @since OOo 1.1.2 + */ + type LocalHierarchyBrowser = HierarchyBrowser; + + /** implements {@link SchemaSupplier} providing access to local configuration schemas */ + type LocalSchemaSupplier = SchemaSupplier; + + /** + * implements {@link SingleBackend} that stores data in the local file system using the OOR XML formats. + * @since OOo 1.1.2 + */ + type LocalSingleBackend = SingleBackend; + + /** implements {@link SingleLayerStratum} that provides access to a singe layer of configuration data from local file system */ + type LocalSingleStratum = SingleLayerStratum; + + /** + * imports data into a configuration layer by merging with existing data. + * + * No named arguments to {@link com.sun.star.lang.XInitialization.initialize()} are supported. + * @since OOo 1.1.2 + */ + type MergeImporter = Importer; + + /** + * implements {@link BackendAdapter} that maintains a cache so it can operate even if the {@link SingleBackend} holding the data is inaccessible. + * @see com.sun.star.configuration.backend.OnlineBackend + * @since OOo 1.1.2 + */ + type OfflineBackend = BackendAdapter; + + /** + * implements a {@link BackendAdapter} that requires that the {@link SingleBackend} holding the data is continuously accessible. + * @see com.sun.star.configuration.backend.OfflineBackend + * @since OOo 1.1.2 + */ + type OnlineBackend = BackendAdapter; + + /** implements {@link SingleLayerStratum} that provides access to a singe layer of configuration data from external data store */ + type PlatformBackend = SingleLayerStratum; + + /** provides access to configuration schemas */ + type SchemaSupplier = XSchemaSupplier; + + /** + * implements a simple {@link BackendAdapter} that can be used for normal configuration operation. + * + * All real functionality is provided by the wrapped {@link SingleBackend} . + * @see com.sun.star.configuration.backend.OnlineBackend + * @since OOo 1.1.2 + */ + type SingleBackendAdapter = BackendAdapter; + + /** + * provides access to a configuration database composed of one or more storage backends containing settings used by software modules. + * + * Configuration data is organized into layers which are selected by components and entities. + * + * Components are characterized by configuration schemas. A component contains configuration data for a particular application domain or software module. + * + * Entities are organized hierarchically in organizations, groups, roles and individual users. Each element of the associated hierarchy corresponds to a + * layer that applies to an entity. + * + * A layer contains data for multiple components associated to a single entity. + * @since OOo 1.1.2 + */ + interface Backend extends XSchemaSupplier, XBackend, XBackendEntities { } + + /** + * implements {@link Backend} retrieving data from a {@link SingleBackend} . + * @since OOo 1.1.2 + */ + interface BackendAdapter extends Backend, XBackendEntities, lang.XInitialization { } + + /** + * Generic exception thrown when setting up a connection to an underlying backend fails. + * + * Indicates an error that originates in the underlying access layer. + * @since OOo 1.1.2 + */ + interface BackendSetupException extends CannotLoadConfigurationException { + /** + * The exception that is raised by the underlying backend implementation. + * + * May be a numeric error code, a message `string` or `VOID` , if the original exception is not represented as a {@link com.sun.star.uno.Exception} . + */ + BackendException: any; + } + + /** + * This event is fired when a change becomes effective on the source of the event + * @see XBackendChangesNotifier + */ + interface ComponentChangeEvent extends lang.EventObject { + /** The name of the Component that changed */ + Component: string; + } + + /** + * imports data into a configuration layer by copying over existing data. + * @since OOo 1.1.2 + */ + interface CopyImporter extends Importer, lang.XInitialization { } + + /** + * imports data into a configuration layer. + * + * The configuration changes are read from a {@link XLayer} and stored into a {@link Backend} . + * @since OOo 1.1.2 + */ + interface Importer extends XLayerImporter, lang.XInitialization { } + + /** + * An interaction request handler that lets the user handle a number of well known requests via GUI dialogs. + * + * The well known requests handled by this service include MergeRecoveryRequest* The requests marked with an asterisk are only handled if (a) their + * continuations match certain restrictions (see below), and (b) the necessary resource strings are available (this can be exploited by applications that + * carry only a subset of all resource files with them). + * + * The continuation restrictions are as follows: Let **C** be the subset of the provided continuations that are of type {@link + * com.sun.star.task.XInteractionApprove} , {@link com.sun.star.task.XInteractionDisapprove} , {@link com.sun.star.task.XInteractionRetry} , or {@link + * com.sun.star.task.XInteractionAbort} (or of a derived type). All other continuations are ignored for these requests. The request is only handled if + * the set **C** is any of the following: AbortRetry, AbortApproveApprove, AbortApprove, DisapproveApprove, Disapprove, Abort + * @see com.sun.star.task.InteractionHandler + * @since OOo 2.0 + */ + interface InteractionHandler extends task.XInteractionHandler, lang.XInitialization { } + + /** + * provides read-only access to a configuration data layer. + * + * A layer contains the configuration setting changes to be performed on a default settings tree to obtain the values of those settings for a given + * entity and component. + * @see com.sun.star.configuration.backend.Schema Service providing access to schema data for a configuration component. + * @see com.sun.star.configuration.backend.UpdatableLayer Service providing write access to a configuration data layer. + * @since OOo 1.1.2 + */ + interface Layer extends XLayer, XCompositeLayer, util.XTimeStamped { + /** + * The URL of the layer data. + * @since OOo 2.0 + */ + URL: string; + } + + /** + * provides a filtered version of a configuration data {@link Layer} . + * + * A layer filter wraps a source {@link XLayer} object and provides access to a filtered version of its data. The data read from the filter usually is + * produced from the source data by adding and removing elements or modifying values. + * @see com.sun.star.configuration.backend.DataImporter Service that supports applying a LayerFilter to imported data. + * @since OOo 2.0 + */ + interface LayerFilter extends XLayer, lang.XInitialization { } + + /** + * applies updates to a configuration layer. + * + * The configuration layer data is read from a {@link XLayer} and the changed layer is provided as {@link XLayer} again or described to a {@link + * XLayerHandler} . + * @see com.sun.star.configuration.backend.UpdatableLayer Service describes a layer and accepts a changed layer.. + * @since OOo 1.1.2 + */ + interface LayerUpdateMerger extends XUpdateHandler, lang.XInitialization { } + + /** + * is raised when the data of a component schema, layer or update is not well-formed, violates the schema or is otherwise invalid. + * @since OOo 1.1.2 + */ + interface MalformedDataException extends uno.Exception { + /** + * data that provides more detailed information about the reason and location of the error. + * + * Typically this member should contain an exception characterizing the error in detail. + * + * For example the following exceptions may be used: **com::sun::star::container::ElementExistException**: for duplicate nodes.; + * + * **com::sun::star::container::NoSuchElementException**: for nodes that are not in the schema.; + * + * **com::sun::star::beans::IllegalTypeException**: for properties having the wrong or an invalid type.; + * + * **com::sun::star::beans::PropertyExistException**: for duplicate properties.; + * + * **com::sun::star::beans::UnknownPropertyException**: for properties that are not in the schema.; + * + * **com::sun::star::lang::IllegalArgumentException**: for data values (names,attributes,etc.) that are invalid.; + * + * **com::sun::star::lang::IllegalAccessException**: for changes that violate access restrictions.; + * + * **com::sun::star::lang::NoSupportException**: for features that are not supported by the current implementation. + * + * + * + * If no more detail information is available, this may be left `VOID` . + */ + ErrorDetails: any; + } + + /** + * is passed to an {@link InteractionHandler} when merging fails due to invalid layer data or access problems. + * @since OOo 2.0 + */ + interface MergeRecoveryRequest extends uno.Exception { + /** + * data that provides more detailed information about the reason and location of the error. + * + * Typically this member should contain an exception characterizing the error in detail. + * + * For example the following exceptions may be used: **MalformedException **: for layers containing invalid data.; + * + * **BackendAccessException**: for layers that can't be accessed. + * + * + * + * If no more detail information is available, this may be left `VOID` . + */ + ErrorDetails: any; + + /** Identifier of the layer object containing the invalid data. */ + ErrorLayerId: string; + + /** + * specifies whether the requester wants to remove or skip the invalid layer. + * + * If `TRUE` the requester wants to remove the underlying data of the layer. ; If `FALSE` the request is to skip the underlying data this time, but + * without removing it. + */ + IsRemovalRequest: boolean; + } + + /** Provides access to a singe layer of configuration data */ + interface MultiLayerStratum extends XMultiLayerStratum, XBackendEntities { } + + /** + * implements {@link Backend} provides access to a configuration database composed of one or more storage backends containing settings used by software + * modules. + */ + interface MultiStratumBackend extends Backend, lang.XInitialization { } + + /** + * This structure contains all the information related to a property + * @see XLayerContentDescriber + */ + interface PropertyInfo { + /** The full name of the Property for eg. org.openoffice.Inet/Settings/ooInetHTTPProxyName */ + Name: string; + + /** Is the property protected, if true the property can not be over written in later layer. */ + Protected: boolean; + + /** The type of the Property */ + Type: string; + + /** The value of the property */ + Value: any; + } + + /** + * provides read only access to a configuration component schema. + * + * A component is a set of hierarchically organized and semantically related configuration settings, e.g StarWriter settings. + * + * A component schema contains two separate sections, one which describes the templates to be used in the dynamic containers (sets) of the component and + * one which describes the component's data structure. + * @see com.sun.star.configuration.backend.Layer Service providing access to individual configuration data for an entity. + * @since OOo 1.1.2 + */ + interface Schema extends XSchema { + /** + * The URL of the layer data. + * @since OOo 2.0 + */ + URL: string; + } + + /** + * is a configuration storage backends containing a complete configuration database, including user data, default or policy layers and schemata. + * + * Configuration data is organized into layers which are selected by components and entities. + * + * Components are characterized by configuration schemas. A component contains configuration data for a particular application domain or software module. + * + * Entities are organized hierarchically in organizations, groups, roles and individual users. Each element of the associated hierarchy corresponds to a + * layer that applies to an entity. + * + * Layers contains data for multiple components associated to a single entity. + * @since OOo 1.1.2 + */ + interface SingleBackend extends XSchemaSupplier, XMultiLayerStratum, XBackendEntities { } + + /** Provides access to a single layer of configuration data */ + interface SingleLayerStratum extends XSingleLayerStratum, XBackendEntities { } + + /** + * is passed to an {@link InteractionHandler} when creating a stratum backend fails. + * @since OOo 2.0 + */ + interface StratumCreationException extends BackendSetupException { + /** Initialization data passed to the stratum instance. */ + StratumData: string; + + /** Identifier of the stratum service that could not be created. */ + StratumService: string; + } + + /** provides access to a configuration data composed of one or more platform backends containing settings used by software modules. */ + interface SystemIntegration extends XBackend, lang.XInitialization { } + + /** + * holds the data needed to identify a template. + * @since OOo 1.1.2 + */ + interface TemplateIdentifier { + /** specifies the component where the template originates. */ + Component: string; + + /** + * specifies the name of the template. + * + * The name is unique within a component. + */ + Name: string; + } + + /** + * provides read/write access to a configuration data layer. + * + * A layer contains the configuration setting changes to be performed on a default layer (or schema) to obtain the values of those settings for a given + * entity and component. + * + * An updatable layer can be read or replaced with another layer. + * @since OOo 1.1.2 + */ + interface UpdatableLayer extends Layer, XUpdatableLayer { } + + /** + * Handles access to layered data stored in a repository. + * + * Data can be retrieved on behalf of one or more entities. + * + * There is an implied owner entity associated to the object when it is created. This entity should be used for normal data access. For administrative + * operations data of other entities can be accessed. + * @see com.sun.star.configuration.backend.XBackendEntities + * @see com.sun.star.configuration.backend.XSchemaSupplier + * @since OOo 1.1.2 + */ + interface XBackend extends uno.XInterface { + /** + * creates an update handler for the owner entity layer for a component. + * @param aComponent component whose data will be updated + * @returns an object allowing manipulation of the component data for the current entity + * @see com.sun.star.configuration.backend.XBackendEntities.getOwnerEntity() + * @throws com::sun::star::lang::IllegalArgumentException if the component identifier is invalid + * @throws com::sun::star::lang::NoSupportException if updates are not supported for this backend + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the data. + */ + getOwnUpdateHandler(aComponent: string): XUpdateHandler; + + /** + * creates an update handler on an entity's layer for a component. + * @param aComponent component whose data will be updated + * @param aEntity entity whose data will be updated + * @returns an object allowing manipulation of the component data for the entity + * @see com.sun.star.configuration.backend.XBackendEntities.supportsEntity() + * @throws com::sun::star::lang::IllegalArgumentException if the component identifier is invalid or if the entity doesn't exist. + * @throws com::sun::star::lang::NoSupportException if updates are not supported for this backend + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the data. + */ + getUpdateHandler(aComponent: string, aEntity: string): XUpdateHandler; + + /** + * retrieves the layers associated to an entity for a component. + * @param aComponent component whose data will be accessed + * @param aEntity entity whose data will be accessed + * @returns a list of objects allowing access to the component data for each layer associated with the entity. + * @see com.sun.star.configuration.backend.XBackendEntities.supportsEntity() + * @throws com::sun::star::lang::IllegalArgumentException if the component identifier is invalid or if the entity doesn't exist. + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the data. + */ + listLayers(aComponent: string, aEntity: string): SafeArray; + + /** + * retrieves the layers associated to the owner entity for a component. + * @param aComponent component whose data will be accessed + * @returns a list of objects allowing access to the component data for each layer associated to the current entity + * @see com.sun.star.configuration.backend.XBackendEntities.getOwnerEntity() + * @throws com::sun::star::lang::IllegalArgumentException if the component identifier is invalid + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the data. + */ + listOwnLayers(aComponent: string): SafeArray; + } + + /** + * receives notification from backend broadcaster objects. + * @see XBackendChangesNotifier + */ + interface XBackendChangesListener extends lang.XEventListener { + /** + * is invoked when component data in backend source changes + * @param Event Event indicating the component data change + */ + componentDataChanged(Event: ComponentChangeEvent): void; + } + + /** + * broadcasts changes when data from backend sources has changed. + * @see XBackendChangesListener + */ + interface XBackendChangesNotifier extends uno.XInterface { + /** + * adds the specified listener to receive events when changes occurred. + * @param aListener specifies the listener object. + * @param component The name of the component the listener is monitoring changes for. + */ + addChangesListener(aListener: XBackendChangesListener, component: string): void; + + /** + * removes the specified listener. + * @param aListener specifies the listener object. + * @param component The name of the component the listener is monitoring changes for. + */ + removeChangesListener(aListener: XBackendChangesListener, component: string): void; + } + + /** + * Provides functionality relating to common and supported entities for a configuration data backend. + * @see com.sun.star.configuration.backend.XBackend + * @see com.sun.star.configuration.backend.XMultiLayerStratum + * @since OOo 1.1.2 + */ + interface XBackendEntities extends uno.XInterface { + /** + * provides the entity id of an entity for general administrative access. + * + * The admin entity is an entity that should be used to read and manage configuration data that applies to all entities within the backend. + * @returns an entity identifier for the admin entity or an empty string, if there is no entity that can be used for general administrative access. + */ + readonly AdminEntity: string; + + /** + * provides the entity id of an entity for general administrative access. + * + * The admin entity is an entity that should be used to read and manage configuration data that applies to all entities within the backend. + * @returns an entity identifier for the admin entity or an empty string, if there is no entity that can be used for general administrative access. + */ + getAdminEntity(): string; + + /** + * provides the entity id of the owner entity of the backend. + * @returns an entity identifier for the owner entity. The owner entity is the default entity for the backend. For normal configuration data access the owner + * @see com.sun.star.configuration.backend.XBackend.listOwnLayers() + * @see com.sun.star.configuration.backend.XBackend.getOwnUpdateHandler() + */ + getOwnerEntity(): string; + + /** + * determines, if two given entity ids denote the same entity. + * @param aEntity The name of an entity. + * @param aOtherEntity The name of another entity. + * @returns `TRUE` , if aEntity and aOtherEntity denote the same entity within this backend, `FALSE` otherwise. + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the backend. + * @throws com::sun::star::lang::IllegalArgumentException if either entity does not exist. + */ + isEqualEntity(aEntity: string, aOtherEntity: string): boolean; + + /** + * provides the entity id of the owner entity of the backend. + * @returns an entity identifier for the owner entity. The owner entity is the default entity for the backend. For normal configuration data access the owner + * @see com.sun.star.configuration.backend.XBackend.listOwnLayers() + * @see com.sun.star.configuration.backend.XBackend.getOwnUpdateHandler() + */ + readonly OwnerEntity: string; + + /** + * determines, if a given entity id exists in this backend. + * @param aEntity The name of an entity. + * @returns `TRUE` , if aEntity is a valid, existing entity for this backend, `FALSE` otherwise. + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the backend. + */ + supportsEntity(aEntity: string): boolean; + } + + /** + * provides read access to layers that contain sublayers accessible through an additional criterion (for instance the locale they contain data for). + * @since OOo 1.1.2 + */ + interface XCompositeLayer extends XLayer { + /** + * Returns a list of the criteria that can be used to access the sublayers. + * @returns a list supported sublayer identifiers + * @throws com::sun::star::lang::WrappedTargetException if an error occurs in the retrieval of the data. + */ + listSubLayerIds(): SafeArray; + + /** + * Describes the content of a particular sublayer to an {@link XLayerHandler} . + * @param aHandler Handler object that will receive calls describing the contents of the sublayer. + * @param aSubLayerId Identifier of the sublayer to be read. Must be one the identifiers returned by {@link XCompositeLayer.listSubLayerIds()} + * @throws com::sun::star::lang::NullPointerException if a `NULL` handler is passed. + * @throws com::sun::star::lang::IllegalArgumentException if the identifier is invalid. + * @throws com::sun::star::lang::WrappedTargetException if an error occurs in the access to or processing of the data. + * @throws com::sun::star::configuration::backend::MalformedDataException if the data read from the layer is rejected as invalid by the {@link XLayerHandler} . + */ + readSubLayerData(aHandler: XLayerHandler, aSubLayerId: string): void; + } + + /** + * provides read access to the data contained in a layer. + * @since OOo 1.1.2 + */ + interface XLayer extends uno.XInterface { + /** + * describes the contents of the layer to an {@link XLayerHandler} . + * @param aHandler Handler object that will receive calls describing the contents of the layer + * @throws com::sun::star::lang::NullPointerException if a `NULL` handler is passed. + * @throws com::sun::star::lang::WrappedTargetException if an error occurs in the access to or processing of the data. + * @throws com::sun::star::configuration::backend::MalformedDataException if the data read from the layer is rejected as invalid by the {@link XLayerHandler} . + */ + readData(aHandler: XLayerHandler): void; + } + + /** + * describe the contents of a layer to an {@link XLayerHandler} object. The contents of the layer is contained in the sequence of {@link PropertyInfo} + * structures + * @see PropertyInfo + */ + interface XLayerContentDescriber extends uno.XInterface { + /** + * describes the contents of the layer to an {@link XLayerHandler} . + * @param aHandler Handler object that will receive calls describing the contents of the layer + * @param aPropertyInfos sequence of {@link PropertyInfo} structs contained all required property information + * @throws com::sun::star::lang::NullPointerException if a `NULL` handler is passed. + * @throws com::sun::star::configuration::backend::MalformedDataException if the data read from the layer is rejected as invalid by the {@link XLayerHandler} . + */ + describeLayer(aHandler: XLayerHandler, aPropertyInfos: LibreOffice.SeqEquiv): void; + } + + /** + * receives a description of a configuration layer as a sequence of events. + * @since OOo 1.1.2 + */ + interface XLayerHandler extends uno.XInterface { + /** + * receives notification that a new item is started. + * + * The current node must be a set and a preexisting item (if any) must be removable. + * + * The new item will be created from the default template of the set. + * + * Subsequent calls describe the difference from the template of properties and members or items of the node until a matching call to {@link + * XLayerHandler.endNode()} is encountered. + * @param aName specifies the name of the item. + * @param aAttributes specifies attribute values to be applied to the new node. The value is a combination of {@link NodeAttribute} flags. Note that {@lin + * @see com.sun.star.configuration.backend.NodeAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a set node in progress currentlyif there already was a change to a + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + addOrReplaceNode(aName: string, aAttributes: number): void; + + /** + * receives notification that a new item based on a particular template is started. + * + * The current node must be a set and a preexisting item (if any) must be removable. + * + * Subsequent calls describe the difference from the template of properties and members or items of the node until a matching call to {@link + * XLayerHandler.endNode()} is encountered. + * @param aName specifies the name of the item. + * @param aTemplate specifies the template to use for the new node + * @param aAttributes specifies attribute values to be applied to the new node. The value is a combination of {@link NodeAttribute} flags. Note that {@lin + * @see com.sun.star.configuration.backend.NodeAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a set node in progress currentlyif there already was a change to a + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + addOrReplaceNodeFromTemplate(aName: string, aTemplate: TemplateIdentifier, aAttributes: number): void; + + /** + * receives notification that a property having a `VOID` value is added to the current node. + * + * The current node must be extensible. + * @param aName specifies the name of the new property. + * @param aAttributes specifies the attributes of the new property. The value is a combination of {@link NodeAttribute} flags and may also contain the {@l + * @param aType specifies the type of the new property. + * @see com.sun.star.configuration.backend.SchemaAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't an extensible node in progress currentlyif a property with that nam + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + addProperty(aName: string, aAttributes: number, aType: type): void; + + /** + * receives notification that a property having a non- `VOID` value is added to the current node. + * + * The current node must be extensible. + * @param aName specifies the name of the new property. + * @param aAttributes specifies the attributes of the new property. The value is a combination of {@link NodeAttribute} flags and may also contain the {@l + * @param aValue specifies the value of the new property. The value also determines the type. Therefore the value must not be `VOID` . + * @see com.sun.star.configuration.backend.SchemaAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't an extensible node in progress currentlyif a property with that nam + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + addPropertyWithValue(aName: string, aAttributes: number, aValue: any): void; + + /** + * receives notification that a node is dropped from a set. + * + * The current node must be a set and the item must be removable. + * @param aName specifies the name of the node. + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a set node in progress currentlyif there already was a change to a + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + dropNode(aName: string): void; + + /** + * receives notification that a layer description is complete. + * + * Must match a previous call to {@link XLayerHandler.startLayer()} . + * @throws com::sun::star::configuration::backend::MalformedDataException if invalid data is detected in the layerif there is a unfinished subnode in progre + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + endLayer(): void; + + /** + * receives notification that a node description is complete. + * + * Must match the last open call to {@link XLayerHandler.overrideNode()} , {@link XLayerHandler.addOrReplaceNode()} or {@link + * XLayerHandler.addOrReplaceNodeFromTemplate()} . + * @throws com::sun::star::configuration::backend::MalformedDataException if invalid data is detected in the nodeif no node is started at all**Not every imp + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + endNode(): void; + + /** + * receives notification that a property description is complete. + * + * Must match an open call to {@link XLayerHandler.overrideProperty()} , + * @throws com::sun::star::configuration::backend::MalformedDataException if invalid data is detected in the propertyif no property is started at all**Not e + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + endProperty(): void; + + /** + * receives notification that a description of a node override is started. + * + * Subsequent calls describe overrides to properties and members or items of the node until a matching call to {@link XLayerHandler.endNode()} is + * encountered. + * @param aName specifies the name of the node. + * @param aAttributes specifies attribute values to be applied to the node. The value is a combination of {@link NodeAttribute} flags. The attributes are + * @param bClear if `TRUE` , specifies that the node should be cleared to an empty state by removing all non-mandatory children from lower layers prior to + * @see com.sun.star.configuration.backend.NodeAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a layer in progressif there already was a change to that nodeif the + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + overrideNode(aName: string, aAttributes: number, bClear: boolean): void; + + /** + * receives notification that an existing property is modified. + * + * Subsequent calls describe new value(s) for the property until a matching call to {@link XLayerHandler.endProperty()} is encountered. + * @param aName specifies the name of the property. + * @param aAttributes specifies the new attributes of the property. The value is a combination of {@link NodeAttribute} flags. The attributes are combine + * @param aType specifies the type of the property. This must be the same type as is already defined in the schema or lower layers, unless the previous ty + * @param bClear if `TRUE` , specifies that the property should be cleared to an empty state by discarding all values from lower layers prior to applying t + * @see com.sun.star.configuration.backend.NodeAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a group or extensible node in progress currentlyif there already wa + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + overrideProperty(aName: string, aAttributes: number, aType: type, bClear: boolean): void; + + /** + * receives notification that the value of the current property is overridden. + * @param aValue specifies the new value of the property. The value must match the type of the current property. If the property does not have the {@link + * @see com.sun.star.configuration.backend.NodeAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a property in progress currentlyif there already was a change to th + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + setPropertyValue(aValue: any): void; + + /** + * receives notification that the value of the current localized property is overridden for a specific locale . + * @param aValue specifies the new value of the property. The value must match the type of the current property. If the property does not have the {@link + * @param aLocale specifies the locale this value should apply to. + * @see com.sun.star.configuration.backend.NodeAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a property in progress currentlyif the current property isn't local + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + setPropertyValueForLocale(aValue: any, aLocale: string): void; + + /** + * receives notification that a layer description is started for a component. + * + * Subsequent calls describe the contents of the layer until a matching call to {@link XLayerHandler.endLayer()} is encountered. + * @throws com::sun::star::configuration::backend::MalformedDataException if there is an unfinished layer in progress + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + startLayer(): void; + } + + /** + * allows importing a layer into a {@link Backend} + * @since OOo 1.1.2 + */ + interface XLayerImporter extends uno.XInterface { + /** + * gets the target backend for importing. + * @returns the {@link Backend} into which layers are imported by {@link XLayerImporter.importLayer()} . + */ + getTargetBackend(): XBackend; + + /** + * Imports the layer given into the backend. + * + * This method imports data for the current entity of the backend. + * @param aLayer a layer whose data will be imported into the backend + * @see com.sun.star.configuration.backend.XBackend.getOwnUpdateHandler() + * @throws com::sun::star::lang::NullPointerException if the layer passed is `NULL` or no backend is available. + * @throws com::sun::star::configuration::backend::MalformedDataException if the layer passed is invalid + * @throws com::sun::star::lang::IllegalArgumentException if the layer passed is for a component that doesn't exist in the backend + * @throws com::sun::star::lang::WrappedTargetException if an error occurs in the backend or source layer. + */ + importLayer(aLayer: XLayer): void; + + /** + * Imports the layer given into the backend for a given entity. + * + * This method imports data for the current entity of the backend. + * @param aLayer a layer whose data will be imported into the backend + * @param aEntity a entity into whose data the layer will be imported + * @see com.sun.star.configuration.backend.XBackend.getUpdateHandler() + * @throws com::sun::star::lang::NullPointerException if the layer passed is `NULL` or no backend is available. + * @throws com::sun::star::configuration::backend::MalformedDataException if the layer passed is invalid + * @throws com::sun::star::lang::IllegalArgumentException if the layer passed is for a component that doesn't exist in the backend or if the entity doesn't + * @throws com::sun::star::lang::WrappedTargetException if an error occurs in the backend or source layer. + */ + importLayerForEntity(aLayer: XLayer, aEntity: string): void; + + /** + * sets the target backend for importing. + * @param aBackend a {@link Backend} into which layers should be imported by {@link XLayerImporter.importLayer()} . + * @throws com::sun::star::lang::NullPointerException if the backend passed is `NULL` . + */ + setTargetBackend(aBackend: XBackend): void; + + /** + * gets the target backend for importing. + * @returns the {@link Backend} into which layers are imported by {@link XLayerImporter.importLayer()} . + */ + TargetBackend: XBackend; + } + + /** + * Handles access to a stratum consisting of multiple layers in a single configuration data repository + * + * The interface provides access to data for multiple entities and timestamp-checking capabilities for efficient caching. + * @see com.sun.star.configuration.backend.XBackendEntities + * @see com.sun.star.util.XTimeStamped + * @see com.sun.star.configuration.backend.XSchemaSupplier + * @see com.sun.star.configuration.backend.XSingleLayerStratum + * @since OOo 1.1.2 + */ + interface XMultiLayerStratum extends uno.XInterface { + /** + * retrieves a layer associated to a layer id, if newer than indicated. + * + * A timestamp can be provided, which is used to indicate a point in time. The layer should be returned only if is modified since that time. + * @param aLayerId identifier of the layers to be accessed.{@link Layer} ids can be obtained from {@link XMultiLayerStratum.listLayerIds()} or {@link XMult + * @param aTimestamp a timestamp for the layer. An empty timestamp indicates, that the layer should be retrieved irrespective of its modification time. T + * @returns a {@link Layer} object providing access to the layer data, `NULL` if the layer is newer than indicated by the timestamp. + * @see com.sun.star.util.XTimeStamped + * @throws com::sun::star::lang::IllegalArgumentException if the layer id is invalid or if the timestamp is invalid + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the data. + */ + getLayer(aLayerId: string, aTimestamp: string): XLayer; + + /** + * retrieves the layers associated to a series of layer ids, if newer than indicated. + * + * A timestamp can be provided, which is used to indicate a point in time. Only layers that are modified since that time should be returned. The same + * timestamp is used for all layers. + * @param aLayerIds identifiers of the layers to be accessed.{@link Layer} ids can be obtained from {@link XMultiLayerStratum.listLayerIds()} . + * @param aTimestamp a timestamp for all of the layers. An empty timestamp indicates, that the layers should be retrieved irrespective of their modificatio + * @returns a list of {@link Layer} objects providing access to the layer data. The list has the same length as aLayerIds. Each layer object is associated to + * @see com.sun.star.util.XTimeStamped + * @throws com::sun::star::lang::IllegalArgumentException if one of the layer ids is invalid or if the timestamp is invalid + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the data. + */ + getLayers(aLayerIds: LibreOffice.SeqEquiv, aTimestamp: string): SafeArray; + + /** + * retrieves the layers associated to a series of layer ids, if newer than indicated for each layer. + * + * For each layer an individual timestamp can be provided, which is used to indicate the last known version of the layer. Only layers that are modified + * since that time should be returned. + * @param aLayerIds identifiers of the layers to be accessed.{@link Layer} ids can be obtained from {@link XMultiLayerStratum.listLayerIds()} . + * @param aTimestamps timestamps for each of the layers. This list must have the same length as aLayerIds. Timestamps are matched to layer ids by their po + * @returns a list of {@link Layer} objects providing access to the layer data. The list has the same length as aLayerIds. Each layer object is associated to + * @see com.sun.star.util.XTimeStamped + * @throws com::sun::star::lang::IllegalArgumentException if one of the layer ids is invalid or if one of the timestamps is invalid or if the lengths of the + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the data. + */ + getMultipleLayers(aLayerIds: LibreOffice.SeqEquiv, aTimestamps: LibreOffice.SeqEquiv): SafeArray; + + /** + * retrieves a writable representation of the layer associated to a layer id. + * @param aLayerId identifier of the layer to be accessed for writing. A layer id for writing can be obtained from {@link XMultiLayerStratum.getUpdateLayer + * @returns an {@link UpdatableLayer} object providing write access to the layer + * @throws com::sun::star::lang::IllegalArgumentException if the layer id is invalid. + * @throws com::sun::star::lang::NoSupportException if the implementation does not support updates. + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the data. + */ + getUpdatableLayer(aLayerId: string): XUpdatableLayer; + + /** + * identifies the layer which should be modified to update data of a component on behalf of an entity. + * + * The layer id returned is one of the layer ids obtained from {@link XMultiLayerStratum.listLayerIds()} for the same component and entity. + * @param aComponent The name of the component to access. + * @param aEntity The name of an entity on behalf of which data will be accessed. + * @returns a layer identifier that can be used to obtain an {@link UpdatableLayer} object. + * @see com.sun.star.configuration.backend.XMultiLayerStratum.getUpdatableLayer() + * @see com.sun.star.configuration.backend.XBackendEntities + * @throws com::sun::star::lang::IllegalArgumentException if the component identifier is invalid or if the entity doesn't exist. + * @throws com::sun::star::lang::NoSupportException if the implementation does not support updates. + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the data. + */ + getUpdateLayerId(aComponent: string, aEntity: string): string; + + /** + * identifies the layers within this stratum which should be read and merged to determine data of a component for an entity + * @param aComponent The name of the component to access. + * @param aEntity The name of an entity on behalf of which data will be accessed. + * @returns a list of layer identifiers that can be used to retrieve {@link Layer} objects. The list is ordered by priority. Typically the most general layer + * @see com.sun.star.configuration.backend.XMultiLayerStratum.getLayer() + * @see com.sun.star.configuration.backend.XMultiLayerStratum.getLayers() + * @see com.sun.star.configuration.backend.XMultiLayerStratum.getMultipleLayers() + * @see com.sun.star.configuration.backend.XBackendEntities + * @throws com::sun::star::lang::IllegalArgumentException if the component identifier is invalid or if the entity doesn't exist. + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the data. + */ + listLayerIds(aComponent: string, aEntity: string): SafeArray; + } + + /** + * Handles access to the elements of a component schema, i.e its templates and its component definition. + * @since OOo 1.1.2 + */ + interface XSchema extends uno.XInterface { + /** + * Describes only the component definition to a {@link XSchemaHandler} . + * @param aHandler schema handler that will receive calls describing the contents of the component definition + * @throws com::sun::star::lang::NullPointerException if a `NULL` handler is passed. + * @throws com::sun::star::lang::WrappedTargetException if an error occurs in the access to or processing of the data or if a subsequent call to any of the + * @throws com::sun::star::configuration::backend::MalformedDataException if the data read from the layer is rejected as invalid by the {@link XSchemaHandler} . + */ + readComponent(aHandler: XSchemaHandler): void; + + /** + * Describes the full schema (templates + component) to a {@link XSchemaHandler} . + * @param aHandler schema handler that will receive calls describing the contents of the templates and the component definition + * @throws com::sun::star::lang::NullPointerException if a `NULL` handler is passed. + * @throws com::sun::star::lang::WrappedTargetException if an error occurs in the access to or processing of the data or if a subsequent call to any of the + * @throws com::sun::star::configuration::backend::MalformedDataException if the data read from the layer is rejected as invalid by the {@link XSchemaHandler} . + */ + readSchema(aHandler: XSchemaHandler): void; + + /** + * Describes the component templates to a {@link XSchemaHandler} . + * @param aHandler schema handler that will receive calls describing the contents of the templates + * @throws com::sun::star::lang::NullPointerException if a `NULL` handler is passed. + * @throws com::sun::star::lang::WrappedTargetException if an error occurs in the access to or processing of the data or if a subsequent call to any of the + * @throws com::sun::star::configuration::backend::MalformedDataException if the data read from the layer is rejected as invalid by the {@link XSchemaHandler} . + */ + readTemplates(aHandler: XSchemaHandler): void; + } + + /** + * receives a description of a configuration schema as a sequence of events. + * @since OOo 1.1.2 + */ + interface XSchemaHandler extends uno.XInterface { + /** + * receives notification that the current group has a child node that is an instance of a specified template. + * @param aName specifies the name of the new node. + * @param aTemplate specifies a template that describes the new node. + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a group node in progress currentlyif there already is a node with t + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + addInstance(aName: string, aTemplate: TemplateIdentifier): void; + + /** + * receives notification that the current set can contain items that are instances of a specified template. + * @param aItemType specifies a template that is accepted as valid item type for the current set node. + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a set node in progress currentlyif the template is not foundif the + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + addItemType(aItemType: TemplateIdentifier): void; + + /** + * receives notification that a property is added to the current node. + * + * The property will have a default value of `NULL` (unless it is {@link SchemaAttribute.REQUIRED} ). + * @param aName specifies the name of the new property. + * @param aAttributes specifies the attributes of the new property. The value is a combination of {@link SchemaAttribute} flags. + * @param aType specifies the type of the new property. + * @see com.sun.star.configuration.backend.SchemaAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a group or extensible node in progress currentlyif a property with + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + addProperty(aName: string, aAttributes: number, aType: type): void; + + /** + * receives notification that a property having a default value is added to the current node. + * @param aName specifies the name of the new property. + * @param aAttributes specifies the attributes of the new property. The value is a combination of {@link SchemaAttribute} flags. + * @param aDefaultValue specifies the value of the new property. The value also determines the type. Therefore the value must not be `VOID` . + * @see com.sun.star.configuration.backend.SchemaAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a group or extensible node in progress currentlyif a property with + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + addPropertyWithDefault(aName: string, aAttributes: number, aDefaultValue: any): void; + + /** + * receives notification that a component description is complete. + * + * Must match a previous call to {@link startComponent()} . + * @throws com::sun::star::configuration::backend::MalformedDataException if invalid data is detected in the componentif there is a unfinished subnode in pr + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + endComponent(): void; + + /** + * receives notification that a node description is complete. + * + * Must match the last open call to {@link startGroup()} or {@link startSet()} . + * @throws com::sun::star::configuration::backend::MalformedDataException if the name is not a the name of the node in progressif invalid data is detected i + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + endNode(): void; + + /** + * receives notification that the current schema description is complete. + * + * Must match a previous call to {@link startSchema()} . + * @throws com::sun::star::configuration::backend::MalformedDataException if invalid data is detected in the schemaif there is a unfinished component or tem + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + endSchema(): void; + + /** + * receives notification that a template description is complete. + * + * Must match a previous call to {@link startGroupTemplate()} or {@link startSetTemplate()} . + * @throws com::sun::star::configuration::backend::MalformedDataException if invalid data is detected in the templateif there is a unfinished subnode in pro + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + endTemplate(): void; + + /** + * receives notification that the schema depends on templates from a different component. + * @param aName specifies the name of the component. + * @throws com::sun::star::configuration::backend::MalformedDataException if there is a unfinished component or template in progressif no schema is started + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + importComponent(aName: string): void; + + /** + * receives notification that a component description is started. + * + * Subsequent calls describe the schema of the component until a matching call to {@link endComponent()} is encountered. + * @param aName specifies the name of the component. + * @throws com::sun::star::configuration::backend::MalformedDataException if there is a unfinished component or template in progressif no schema is started + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + startComponent(aName: string): void; + + /** + * receives notification that a group description is started. + * + * Subsequent calls describe the members and properties of the group until a matching call to {@link endNode()} is encountered. + * @param aName specifies the name of the group. + * @param aAttributes specifies the attributes of the node. The value is a combination of {@link SchemaAttribute} flags. {@link SchemaAttribute.EXTENSIBL + * @see com.sun.star.configuration.backend.SchemaAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a group node in progress currentlyif there already is a node with t + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + startGroup(aName: string, aAttributes: number): void; + + /** + * receives notification that a template description is started for a group. + * + * Subsequent calls describe the members and properties of the template until a matching call to {@link endTemplate()} is encountered. + * @param aTemplate specifies the identity of the template. + * @param aAttributes specifies the attributes of the template. The value is a combination of {@link SchemaAttribute} flags. {@link SchemaAttribute.EXTEN + * @see com.sun.star.configuration.backend.SchemaAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there is a unfinished component or template in progressif no schema is started + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + startGroupTemplate(aTemplate: TemplateIdentifier, aAttributes: number): void; + + /** + * receives notification that a schema description is started. + * + * The schema description may comprise components templates or both. + * @throws com::sun::star::configuration::backend::MalformedDataException if a schema is already started (and has not been ended). + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + startSchema(): void; + + /** + * receives notification that a set description is started. + * + * Subsequent calls describe the item-types and properties of the set until a matching call to {@link endNode()} is encountered. + * @param aName specifies the name of the set. + * @param aAttributes specifies the attributes of the node. The value is a combination of {@link SchemaAttribute} flags. {@link SchemaAttribute.EXTENSIBL + * @param aItemType specifies the (default) template for set items. + * @see com.sun.star.configuration.backend.SchemaAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a group node in progress currentlyif there already is a node with t + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + startSet(aName: string, aAttributes: number, aItemType: TemplateIdentifier): void; + + /** + * receives notification that a template description is started for a set. + * + * Subsequent calls describe the members and properties of the template until a matching call to {@link endTemplate()} is encountered. + * @param aTemplate specifies the identity of the template. + * @param aAttributes specifies the attributes of the template. The value is a combination of {@link SchemaAttribute} flags. {@link SchemaAttribute.EXTEN + * @param aItemType specifies the (default) template for set items. + * @see com.sun.star.configuration.backend.SchemaAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there is a unfinished component or template in progressif no schema is started + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + startSetTemplate(aTemplate: TemplateIdentifier, aAttributes: number, aItemType: TemplateIdentifier): void; + } + + /** + * provides access to configuration component schemas. + * @since OOo 1.1.2 + */ + interface XSchemaSupplier extends uno.XInterface { + /** + * Returns the schema information (component + templates) for a particular component. + * @param aComponent component whose schema will be accessed + * @returns an object allowing access to the various parts of the schema, `NULL` if the component doesn't exist. + * @throws com::sun::star::lang::IllegalArgumentException if the component identifier is invalid. + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the data. + */ + getComponentSchema(aComponent: string): XSchema; + } + + /** + * Handles access to a stratum consisting of a single layer in a configuration data repository + * + * The interface provides timestamp-checking capabilities for efficient caching. + * @see com.sun.star.util.XTimeStamped + * @see com.sun.star.configuration.backend.XSchemaSupplier + * @see com.sun.star.configuration.backend.XMultiLayerStratum + * @since OOo 1.1.2 + */ + interface XSingleLayerStratum extends uno.XInterface { + /** + * retrieves the layer data for a component, if newer than indicated. + * + * A timestamp can be provided, which is used to indicate a point in time. The layer should be returned only if is modified since that time. + * @param aComponent The name of the component to access. + * @param aTimestamp a timestamp for the layer. An empty timestamp indicates, that the layer should be retrieved irrespective of its modification time. T + * @returns a {@link Layer} object providing access to the layer data, `NULL` if the layer is newer than indicated by the timestamp. + * @see com.sun.star.util.XTimeStamped + * @throws com::sun::star::lang::IllegalArgumentException if the component identifier is invalid or if the timestamp is invalid. + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the data. + */ + getLayer(aComponent: string, aTimestamp: string): XLayer; + + /** + * retrieves a writable representation of the layer for a component. + * @param aComponent The name of the component to access. + * @returns an {@link UpdatableLayer} object providing write access to the layer + * @throws com::sun::star::lang::IllegalArgumentException if the component identifier is invalid. + * @throws com::sun::star::lang::NoSupportException if the implementation does not support updates. + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the data. + */ + getUpdatableLayer(aComponent: string): XUpdatableLayer; + } + + /** + * Provides access to a read-write layer of configuration data for a given component and entity. + * @since OOo 1.1.2 + */ + interface XUpdatableLayer extends XLayer { + /** + * Replaces the current layer with the layer given as input parameter. + * + * After the replacement has been performed, reading the layer will return the new content. Some implementations may not support this, so after an update + * {@link XLayer.readData()} may fail. + * @param aNewLayer replacement layer + * @throws com::sun::star::lang::NullPointerException if a `NULL` handler is passed. + * @throws com::sun::star::lang::WrappedTargetException if an error occurs during the replacement. + * @throws com::sun::star::configuration::backend::MalformedDataException if the layer contains invalid data. + */ + replaceWith(aNewLayer: XLayer): void; + } + + /** + * receives a description of a configuration update or layer as a sequence of events. + * @since OOo 1.1.2 + */ + interface XUpdateHandler extends uno.XInterface { + /** + * receives notification that a node is started as a new item. + * + * The current node must be a set and a preexisting item (if any) must be removable. + * + * The new item will be created from the default template of the set. + * + * Subsequent calls describe the difference from the template of properties, items or members of the node until a matching call to {@link + * XUpdateHandler.endNode()} is encountered. + * @param aName specifies the name of the new item. + * @param aAttributes specifies attribute values to be applied to the new node. The value is a combination of {@link NodeAttribute} flags. Note that {@lin + * @see com.sun.star.configuration.backend.NodeAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a set node in progress currentlyif there already was a change to an + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + addOrReplaceNode(aName: string, aAttributes: number): void; + + /** + * receives notification that a node is started as a new item based on a particular template. + * + * The current node must be a set and a preexisting item (if any) must be removable. + * + * Subsequent calls describe the difference from the template of properties or members of the node until a matching call to {@link + * XUpdateHandler.endNode()} is encountered. + * @param aName specifies the name of the item. + * @param aTemplate specifies the template to use for the new node + * @param aAttributes specifies attribute values to be applied to the new node. The value is a combination of {@link NodeAttribute} flags. Note that {@lin + * @see com.sun.star.configuration.backend.NodeAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a set node in progress currentlyif there already was a change to an + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + addOrReplaceNodeFromTemplate(aName: string, aAttributes: number, aTemplate: TemplateIdentifier): void; + + /** + * receives notification that a property having a value of `VOID` is added to the current node. + * + * The current node must be extensible and a preexisting property (if any) must be removable in this layer. + * @param aName specifies the name of the new property. + * @param aAttributes specifies the attributes of the new property. The value is a combination of {@link NodeAttribute} flags and may also contain the {@l + * @param aType specifies the type of the new property. + * @see com.sun.star.configuration.backend.SchemaAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a group or extensible node in progress currentlyif there already wa + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + addOrReplaceProperty(aName: string, aAttributes: number, aType: type): void; + + /** + * receives notification that a property having a non- `NULL` value is added to the current node. + * + * The current node must be extensible and a preexisting property (if any) must be removable in this layer. + * @param aName specifies the name of the new property. + * @param aAttributes specifies the attributes of the new property. The value is a combination of {@link NodeAttribute} flags and may also contain the {@l + * @param aValue specifies the value of the new property. The value also determines the type. Therefore the value must not be `VOID` . + * @see com.sun.star.configuration.backend.SchemaAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a group or extensible node in progress currentlyif there already wa + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + addOrReplacePropertyWithValue(aName: string, aAttributes: number, aValue: any): void; + + /** + * receives notification that a node modification is complete. + * + * Must match the last open call to {@link XUpdateHandler.modifyNode()} , {@link XUpdateHandler.addOrReplaceNode()} or {@link + * XUpdateHandler.addOrReplaceNodeFromTemplate()} . + * @throws com::sun::star::configuration::backend::MalformedDataException if invalid data is detected in the nodeif no node is started at all**Not every imp + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + endNode(): void; + + /** + * receives notification that a property modification is complete. + * + * Must match the last open call to {@link XUpdateHandler.modifyProperty()} . + * @throws com::sun::star::configuration::backend::MalformedDataException if invalid data is detected in the propertyif no property is started at all**Not e + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + endProperty(): void; + + /** + * receives notification that the current update description is complete. + * + * Must match a previous call to {@link XUpdateHandler.startUpdate()} . + * @throws com::sun::star::configuration::backend::MalformedDataException if no update is started at allif invalid data is detected in the updateif there is + * @throws com::sun::star::lang::IllegalAccessException if the target layer is read-only + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + endUpdate(): void; + + /** + * receives notification that a modification of a node is started. + * + * Subsequent calls describe changes to properties and items or members of the node until a matching call to {@link XUpdateHandler.endNode()} is + * encountered. + * @param aName specifies the name of the node. + * @param aAttributes specifies attribute values to be applied to the node in the current layer. The value is a combination of {@link NodeAttribute} flags + * @param aAttributeMask specifies which attributes should be changed for the node. The value is a combination of {@link NodeAttribute} flags. + * @param bReset if `TRUE` , specifies that the node should be reset to its default state as given by lower layers and the schema or template prior to appl + * @see com.sun.star.configuration.backend.NodeAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't an update in progress at allif a node is not valid in this placeif + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + modifyNode(aName: string, aAttributes: number, aAttributeMask: number, bReset: boolean): void; + + /** + * receives notification that modification of an existing property is started. + * + * Subsequent calls describe changes to the value(s) of the property until a matching call to {@link XUpdateHandler.endProperty()} is encountered. + * @param aName specifies the name of the property. + * @param aAttributes specifies new attributes of the property. The value is a combination of {@link NodeAttribute} flags. Only attributes which are sele + * @param aAttributeMask specifies which attributes should be changed for the property. The value is a combination of {@link NodeAttribute} flags. + * @param aType specifies the type of the property. A `VOID` type can be used to signify that the type is unknown and should not be recorded. + * @see com.sun.star.configuration.backend.NodeAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a group or extensible node in progress currentlyif there already wa + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + modifyProperty(aName: string, aAttributes: number, aAttributeMask: number, aType: type): void; + + /** + * receives notification that an item is to be dropped from a set. + * + * The current node must be a set and the item must be removable. + * @param aName specifies the name of the node. + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a set node in progress currentlyif there already was a change to a + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + removeNode(aName: string): void; + + /** + * receives notification that a property is dropped from the current node. + * + * The current node must be extensible and the property removable. + * @param aName specifies the name of the property. + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a group or extensible node in progress currentlyif there is no prop + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + removeProperty(aName: string): void; + + /** + * receives notification that a property is reset to its default state. + * @param aName specifies the name of the property. + * @see com.sun.star.configuration.backend.NodeAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a group or extensible node in progress currentlyif there already wa + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + resetProperty(aName: string): void; + + /** + * receives notification that the value of the current property should be reset to its default. + * @see com.sun.star.configuration.backend.NodeAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a property modification in progress currentlyif there already was a + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + resetPropertyValue(): void; + + /** + * receives notification that the value of the current property for a specific locale should be reset to its default. + * @param aLocale specifies the locale the change applies to. + * @see com.sun.star.configuration.backend.NodeAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a property modification in progress currentlyif the property is not + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + resetPropertyValueForLocale(aLocale: string): void; + + /** + * receives notification about a change to the value of the current property. + * @param aValue specifies the new value of the property. The value must match the type of the existing property. If the property does not have the {@link + * @see com.sun.star.configuration.backend.NodeAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a property modification in progress currentlyif there already was a + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + setPropertyValue(aValue: any): void; + + /** + * receives notification about a change to the value of the current property for a specific locale. + * @param aValue specifies the new value of the property for the given locale. The value must match the type of the existing property. If the property doe + * @param aLocale specifies the locale that the new value applies to. + * @see com.sun.star.configuration.backend.NodeAttribute + * @throws com::sun::star::configuration::backend::MalformedDataException if there isn't a property modification in progress currentlyif the property is not + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + setPropertyValueForLocale(aValue: any, aLocale: string): void; + + /** + * receives notification that a update or description is started. + * @throws com::sun::star::configuration::backend::MalformedDataException if the update already was started + * @throws com::sun::star::lang::IllegalAccessException if the target layer is read-only**Some implementations can only detect this when executing XUpdateHa + * @throws com::sun::star::lang::WrappedTargetException if an error occurs processing the event. + */ + startUpdate(): void; + } + + /** + * provides access to versioned configuration component schemas. + * @since OOo 2.0 + */ + interface XVersionedSchemaSupplier extends XSchemaSupplier { + /** + * Returns the schema version for a particular component. + * @param aComponent component whose schema version will be determined + * @returns a `string` that identifies the schema version for the given component. The format of the version string is arbitrary. No meaning should be attac + * @throws com::sun::star::lang::IllegalArgumentException if the component identifier is invalid. + * @throws com::sun::star::configuration::backend::BackendAccessException if an error occurs while accessing the version data. + */ + getSchemaVersion(aComponent: string): string; + } + + namespace NodeAttribute { + const enum Constants { + FINALIZED = 256, + FUSE = 2048, + MANDATORY = 512, + MASK = 32512, + READONLY = 1024, + } + } + + namespace SchemaAttribute { + const enum Constants { + EXTENSIBLE = 4, + LOCALIZED = 2, + MASK = 255, + REQUIRED = 1, + } + } + + namespace xml { + /** + * represents a configuration data layer that is stored in a stream in OOR {@link Update} XML format. + * + * The configuration layer XML from a given stream is parsed and fed to a {@link com.sun.star.configuration.backend.XLayerHandler} . + * @see com.sun.star.configuration.backend.xml.SchemaParser Service that represents a configuration schema stored in XML. + * @see com.sun.star.configuration.backend.xml.LayerWriter Service that writes OOR Update XML for data described via com.sun.star.configuration.backend.X + * @since OOo 1.1.2 + */ + interface LayerParser extends XLayer, io.XActiveDataSink, lang.XInitialization { } + + /** + * can be used to parse a stream of configuration layer XML. + * + * The configuration layer data described to a {@link com.sun.star.configuration.backend.XLayerHandler} is written to a stream as OOR {@link Update} XML. + * @see com.sun.star.configuration.backend.xml.LayerParser Service that parses configuration layer XML. + * @since OOo 1.1.2 + */ + interface LayerWriter extends XLayerHandler, io.XActiveDataSource, lang.XInitialization { } + + /** + * represents a configuration schema that is stored in a stream in OOR {@link Schema} XML format. + * + * The configuration schema XML from a given stream is parsed and fed to a {@link com.sun.star.configuration.backend.XSchemaHandler} . + * @see com.sun.star.configuration.backend.xml.LayerParser Service that parses configuration layer XML. + * @since OOo 1.1.2 + */ + interface SchemaParser extends XSchema, io.XActiveDataSink, lang.XInitialization { } + } + } + + namespace bootstrap { + /** + * provides access to a component context that is enhanced with bootstrap parameters for configuration services from the associated metaconfiguration + * mechanism. + * + * The contained settings are used to initialize the {@link com.sun.star.configuration.DefaultProvider} and {@link + * com.sun.star.configuration.backend.DefaultBackend} of the component context. + * + * The implementation is usually available as a singleton in the context that it wraps.. + * @deprecated Deprecated + * @since OOo 1.1.2 + */ + type BootstrapContext = uno.XComponentContext; + } + } + + namespace connection { + /** + * allows to accept connection attempts from another process. + * + * {@link Acceptor} is a delegating service. You can add further acceptors by giving them a service name com.sun.star.connection.Acceptor.xxx, where xxx + * is the connection type used in the connection string during {@link accept()} /connect() call. + */ + type Acceptor = XAcceptor; + + /** Is thrown, when there is another thread already accepting on this instance. */ + type AlreadyAcceptingException = uno.Exception; + + /** Is thrown, when it is not possible to accept on a local resource. */ + type ConnectionSetupException = uno.Exception; + + /** + * allows to establish a connection to another process. + * + * {@link Connector} is a delegating service. You can add further connectors by giving them a service name com.sun.star.connection.Connector.xxx, where + * xxx is the connection type used in the connection string during accept()/connect() call. + */ + type Connector = XConnector; + + /** Is thrown in case no one is accepting on the specified resource. */ + type NoConnectException = uno.Exception; + + /** + * This permission represents access to a network via sockets. A {@link SocketPermission} consists of a host specification and a set of actions + * specifying ways to connect to that host. The host is specified as `; host = (hostname | IPaddress)[:portrange]; portrange = portnumber | + * -portnumber | portnumber-[portnumber]; ` The host is expressed as a DNS name, as a numerical IP address, or as `"localhost"` (for the local + * machine). The wildcard `"*"` may be included once in a DNS name host specification. If it is included, it must be in the leftmost position, as in + * `"*.sun.com"` . ; The port or portrange is optional. A port specification of the form `"N-"` , where `N` is a port number, signifies all ports + * numbered `N` and above, while a specification of the form `"-N"` indicates all ports numbered `N` and below. + * + * The possible ways to connect to the host are `accept``connect``listen``resolve`; The `"listen"` action is only meaningful when used with + * `"localhost"` . The `"resolve"` (resolve host/ip name service lookups) action is implied when any of the other actions are present. ; As an example + * of the creation and meaning of SocketPermissions, note that if the following permission `SocketPermission("foo.bar.com:7777", "connect,accept");; ` is + * granted, it allows to connect to port 7777 on foo.bar.com, and to accept connections on that port. ; Similarly, if the following permission + * `SocketPermission("localhost:1024-", "accept,connect,listen");; ` is granted, it allows that code to accept connections on, connect to, or listen on + * any port between 1024 and 65535 on the local host. + * @since OOo 1.1.2 + */ + interface SocketPermission { + /** comma separated actions list */ + Actions: string; + + /** target host with optional portrange */ + Host: string; + } + + /** + * allows to passively accept connection attempts from other processes. + * + * This is the counterpart to the {@link XConnector} interface. + */ + interface XAcceptor extends uno.XInterface { + /** + * accepts an interprocess connection. Waits until someone connects to the resource. + * + * After a successful return, the method may be called again to accept further connections, but the parameter string MUST be left unchanged. + * @param sConnectionDescription contains the kind of the connection plus a comma separated list of attributes, e.g., **socket,host=localhost,port=2345** f + * @returns null reference, stopAccepting was called. Otherwise a valid {@link XConnection} reference. + * @throws AlreadyAcceptingException Only one acceptor-thread per instance allowed. + * @throws ConnectionSetupException Problems during setting up the acceptor. (e.g., Security-reasons, socket already busy, etc.) + * @throws com::sun::star::lang::IllegalArgumentException sConnectionDescription could not be interpreted + */ + accept(sConnectionDescription: string): XConnection; + + /** pushes acceptor out of the accept-call. */ + stopAccepting(): void; + } + + /** + * A bidirectional bytestream. + * + * You should additionally implement {@link XConnection2} . + * @see XConnection2 + */ + interface XConnection extends uno.XInterface { + /** Immediately terminates any ongoing read or write calls. All subsequent read or write calls() */ + close(): void; + + /** + * A unique string describing the connection. + * + * This string is different from the arguments to XConnection::accept() and {@link XConnector.connect()} . In general, the string contains an additional + * handle value. For example, "socket,host=localhost,port=2002,uniqueValue=2324". + */ + readonly Description: string; + + /** Empties all internal buffers. */ + flush(): void; + + /** + * A unique string describing the connection. + * + * This string is different from the arguments to XConnection::accept() and {@link XConnector.connect()} . In general, the string contains an additional + * handle value. For example, "socket,host=localhost,port=2002,uniqueValue=2324". + */ + getDescription(): string; + + /** + * reads a requested number of bytes from the connection. + * + * This method is blocking, meaning that it always returns a bytesequence with the requested number of bytes, unless it has reached end of file (which + * often means, that {@link close()} has been called). + * + * please see also the readSomeBytes() method of {@link XConnection2} . + * @param aReadBytes The buffer to receive the read bytes. + * @param nBytesToRead The number of bytes to be read from the stream. + * @returns The read number of bytes. The return value and the length of the returned sequence must be identical. + * @throws com::sun::star::io::IOException in case an error occurred during reading from the stream. + */ + read(aReadBytes: [LibreOffice.SeqEquiv], nBytesToRead: number): number; + + /** + * writes the given bytesequence to the stream. + * + * The method blocks until the whole sequence is written. + * @throws com::sun::star::io::IOException in case an error occurred during writing to the stream. + */ + write(aData: LibreOffice.SeqEquiv): void; + } + + /** {@link XConnection2} extends the `XConnection` interface with `available` and `readSomeBytes` */ + interface XConnection2 extends XConnection { + /** Gives the number of bytes available via `read` without blocking. */ + available(): number; + + /** Blocks if no data is available otherwise reads at max **nMaxBytesToRead** but at least 1 byte. */ + readSomeBytes(aData: [LibreOffice.SeqEquiv], nMaxBytesToRead: number): number; + } + + /** + * allows to add listeners to a connection. + * + * Maybe supported by connections returned from {@link XAcceptor.accept()} or {@link XConnector.connect()} . + */ + interface XConnectionBroadcaster extends uno.XInterface { + /** + * registers an object to receive events from this connection. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + */ + addStreamListener(aListener: io.XStreamListener): void; + + /** + * unregisters an object to receive events from this connection. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + */ + removeStreamListener(aListener: io.XStreamListener): void; + } + + /** allows to actively establish an interprocess connection. */ + interface XConnector extends uno.XInterface { + /** + * creates a new connection interprocess connection. + * + * Tries to connect to an {@link XAcceptor} . Behavior is unspecified if a call to connect is made when another call to connect either has not yet + * returned or has returned successfully without raising an exception. + * @param sConnectionDescription contains the kind of the connection plus a comma separated list of attributes, e.g., **socket,host=locahost,port=2345** fo + * @throws ConnectionSetupException Problems during setting up the connector on client side, (e.g., Security-reasons, socket already busy .. ), or the strin + * @throws NoConnectException Couldn't reach a server (e.g. network failure), no server is listening + */ + connect(sConnectionDescription: string): XConnection; + } + } + + namespace container { + /** + * is thrown by container methods, if an element is added which is already a child of the container. + * + * Probably not the same element is already a member, when this exception is thrown, but a member with the same id or name. + * @see XNameContainer + * @see XNameContainer.insertByName + */ + type ElementExistException = uno.Exception; + + /** + * is thrown by child access methods of collections, if the addressed child does not exist. + * @see XEnumeration + * @see XEnumeration.nextElement + */ + type NoSuchElementException = uno.Exception; + + /** + * This event is fired when an element is inserted in a container. + * @see XContainerListener + */ + interface ContainerEvent extends lang.EventObject { + /** + * It contains the accessor to the element which is inserted or removed. + * + * The type and the value of the accessor depends on the service. + */ + Accessor: any; + + /** This contains the element that was inserted or removed. */ + Element: any; + + /** This contains the replaced element. */ + ReplacedElement: any; + } + + /** + * provides a default {@link XEnumerableMap} implementation + * + * For the keys put into the map using {@link XMap.put()} or {@link createImmutable()} , the following rules apply: A `VOID` key is not allowed.If the + * key type is `BOOLEAN` , `CHAR` , `FLOAT` , `DOUBLE` , `STRING` , `TYPE` , or `UNSIGNED HYPER` , then only keys of exactly this type are accepted.If + * the key type is `DOUBLE` or `FLOAT` , then `Double.NaN` respectively `Float.NaN` is not accepted as key.If the key type's class is + * com::sun::star::uno::TypeClass::ENUM, then only keys of exactly this type are accepted.If the key type is any of `BYTE` , `SHORT` , `UNSIGNED SHORT` , + * `LONG` , `UNSIGNED LONG` , or `HYPER` , then all keys which can losslessly be converted to this type (possibly using widening conversions) are + * accepted.If the key type is an interface type, then all key values denoting objects which can be queried for the given interface are accepted.All + * other key types are rejected. + * + * For the values put into the map using {@link XMap.put()} or {@link createImmutable()} , the following rules apply: The `VOID` value will be accepted + * to be put into the map. + * + * If the value type's class is com::sun::star::uno::TypeClass::ANY, any value will be accepted.If the value type is an interface type, then all values + * denoting objects which can be queried for the given interface are accepted.If the value type's class is com::sun::star::uno::TypeClass::EXCEPTION or + * com::sun::star::uno::TypeClass::STRUCT, then values whose type equals the value type, or is a sub class of the value type, are accepted.For all other + * value types, only values whose type matches exactly are accepted.If the value type is `DOUBLE` or `FLOAT` , then `Double.NaN` respectively `Float.NaN` + * is not accepted. + * + * The factory methods of the `XEnumerableMap` interface support both **isolated** and **non-isolated** enumerators. The latter one will be automatically + * disposed when the map changes after enumerator creation, so every attempt to use them will result in a {@link com.sun.star.lang.DisposedException} + * being thrown. + * @see http://udk.openoffice.org/common/man/typesystem.html + */ + interface EnumerableMap extends XEnumerableMap { + /** + * creates an instance mapping from the given key type to the given value type + * @param KeyType denotes the type of the keys in the to-be-created map + * @param ValueType denotes the type of the values in the to-be-created map + * @throws com::sun::star::beans::IllegalTypeException if KeyType or ValueType are unsupported types. For values, all type classes except com::sun::star::un + */ + create(KeyType: type, ValueType: type): void; + + /** + * creates an instance mapping from the given key type to the given value type + * + * The resulting map is immutable, so later alter operations on it will fail with a {@link com.sun.star.lang.NoSupportException} . + * @param KeyType denotes the type of the keys in the to-be-created map + * @param ValueType denotes the type of the values in the to-be-created map + * @param Values denote the values contained in the to-be-created map + * @throws com::sun::star::beans::IllegalTypeException if KeyType or ValueType are unsupported types. For values, all type classes except com::sun::star::un + * @throws com::sun::star::lang::IllegalArgumentException if any of the given values or keys violates the [key rules]{@link url="#keyrules"} or [value rules + */ + createImmutable(KeyType: type, ValueType: type, Values: LibreOffice.SeqEquiv>): void; + } + + /** + * provides access to the parent of the object. + * + * This interface normally is only supported if the objects all have exactly one dedicated parent container. + */ + interface XChild extends uno.XInterface { + /** grants access to the object containing this content. */ + getParent(): uno.XInterface; + + /** grants access to the object containing this content. */ + Parent: uno.XInterface; + + /** + * sets the parent to this object. + * @throws com::sun::star::lang::NoSupportException if the name of this object cannot be changed. + */ + setParent(Parent: uno.XInterface): void; + } + + /** provides a typified enumeration through components. */ + interface XComponentEnumeration extends XEnumeration { + /** + * @returns the next component of this enumeration. + * @throws NoSuchElementException if no more elements exist. + */ + nextComponent(): lang.XComponent; + } + + /** provides a factory for a typified enumeration through a collection of components. */ + interface XComponentEnumerationAccess extends XEnumerationAccess { + /** creates a new instance of enumeration through components. */ + createComponentEnumeration(): XComponentEnumeration; + } + + /** + * supports quick access to the information if a container currently contains elements. + * + * The {@link XContainer} interface is provided for containers which need to broadcast changes within the container; that means the actions of adding or + * removing elements are broadcast to the listeners. + * + * This can be useful for UI to enable/disable some functions without actually accessing the data. + * @see XContent + * @see XIndexAccess + * @see XNameAccess + * @see XEnumerationAccess + */ + interface XContainer extends uno.XInterface { + /** + * adds the specified listener to receive events when elements are inserted or removed. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + * @see XContainerListener + */ + addContainerListener(xListener: XContainerListener): void; + + /** + * removes the specified listener so it does not receive any events from this container. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + * @see XContainerListener + */ + removeContainerListener(xListener: XContainerListener): void; + } + + /** allows containers to implement a vetoing mechanism for insertion, removal, and replacement of their elements. */ + interface XContainerApproveBroadcaster { + /** adds a listener which can veto changes in the container's content */ + addContainerApproveListener(Listener: XContainerApproveListener): void; + + /** removes a previously added listener */ + removeContainerApproveListener(Listener: XContainerApproveListener): void; + } + + /** + * is notified to approve changes which happen to the content of a generic container + * @see XContainerApproveBroadcaster + */ + interface XContainerApproveListener { + /** + * is called for the listener to approve an insertion into the container + * @returns an instance implementing the {@link com.sun.star.util.XVeto} interface, if the insertion is vetoed, `NULL` otherwise. + */ + approveInsertElement(Event: ContainerEvent): util.XVeto; + + /** + * is called for the listener to approve a removal of an element from the container + * @returns an instance implementing the {@link com.sun.star.util.XVeto} interface, if the removal is vetoed, `NULL` otherwise. + */ + approveRemoveElement(Event: ContainerEvent): util.XVeto; + + /** + * is called for the listener to approve a replacement inside the container + * @returns an instance implementing the {@link com.sun.star.util.XVeto} interface, if the replacement is vetoed, `NULL` otherwise. + */ + approveReplaceElement(Event: ContainerEvent): util.XVeto; + } + + /** receives events when the content of the related container changes. */ + interface XContainerListener extends lang.XEventListener { + /** is invoked when a container has inserted an element. */ + elementInserted(Event: ContainerEvent): void; + + /** is invoked when a container has removed an element. */ + elementRemoved(Event: ContainerEvent): void; + + /** is invoked when a container has replaced an element. */ + elementReplaced(Event: ContainerEvent): void; + } + + /** + * supports simple query feature on a container + * + * This interface makes it possible to create sub sets of container items which serve specified search criterion. + */ + interface XContainerQuery extends uno.XInterface { + /** + * creates a sub set of container items which supports searched properties as minimum + * + * It's not possible to use special commands or search specific parameters here. You can match by properties only. Enumerated elements must provide + * queried properties as minimum. Not specified properties willn't be used for searching. + * @param Properties items of sub set must support given properties as minimum ; example: ; (supported) ; search for items which match the name pattern + * @returns an sub set of container items as an enumeration. + */ + createSubSetEnumerationByProperties(Properties: LibreOffice.SeqEquiv): XEnumeration; + + /** + * creates a sub set of container items which match given query command + * + * Items of this sub set must match used query string. Format of query depends from real implementation. Using of "param=value" pairs isn't necessary. So + * it's possible to combine different parameters as one simple command string. + * @param Query items of sub set must match to this query ; example: ; (1) ; query as parameter sequence to return all elements which match the name pat + * @returns an sub set of container items as an enumeration. + */ + createSubSetEnumerationByQuery(Query: string): XEnumeration; + } + + /** + * allows access to the collections of all content types within the object. + * + * This example prints the names of all tables: + * + * {{program example here, see documentation}} + */ + interface XContentEnumerationAccess extends uno.XInterface { + /** @returns all names of services of which instances exist in this object. {@link XContentEnumerationAccess.createContentEnumeration()} creates an enumerati */ + readonly AvailableServiceNames: SafeArray; + + /** @returns a new enumeration object for the contents of the specified service type. */ + createContentEnumeration(aServiceName: string): XEnumeration; + + /** @returns all names of services of which instances exist in this object. {@link XContentEnumerationAccess.createContentEnumeration()} creates an enumerati */ + getAvailableServiceNames(): SafeArray; + } + + /** This is the base interface of all collection interfaces. */ + interface XElementAccess extends uno.XInterface { + /** @returns the type of the elements. `void` means that it is a multi-type container and you cannot determine the exact types with this interface. */ + readonly ElementType: type; + + /** @returns the type of the elements. `void` means that it is a multi-type container and you cannot determine the exact types with this interface. */ + getElementType(): type; + + /** @returns `TRUE` if the object contain elements, otherwise `FALSE` . */ + hasElements(): boolean; + } + + /** + * extends {@link XMap} with enumeration capabilities. + * + * No assumption should be made about the ordering of the elements returned by the various enumerators. In particular, you cannot assume the elements are + * returned in the same order as they were inserted. Also, you should not expect the `XMap` implementation to make use of a possibly existing strict + * ordering defined on the domain of all possible key values. + * + * You can create enumerators for the keys of the map, its values, and its key-value pairs. + * + * In all cases, you can create an **isolated** enumerator, which works on a copy of the map's content. Such an iterator is not affected by changes done + * to the map after creation of the enumerator. + * + * On the contrary, an enumerator which is **non-isolated** works directly on the map data. This is less expensive than an **isolated** enumerator, but + * means that changes to the map while an enumeration is running potentially invalidate your enumerator. The concrete behavior in this case is undefined, + * it's up to the service implementing the `XEnumerableMap` interface to specify it in more detail. + * + * Implementations of this interface might decide to support only **isolated** enumerators, or only **non-isolated** enumerators. Again, it's up to the + * service to specify this. Requesting an enumerator type which is not supported will generally result in an {@link com.sun.star.lang.NoSupportException} + * being thrown. + */ + interface XEnumerableMap extends XMap { + /** + * creates a enumerator for the key-value pairs of the map + * + * The elements returned by the enumerator are instances of com::sun::star::beans::Pair, holding the key-value-pairs which are part of the map. + * @param Isolated controls whether the newly create enumerator should be isolated from the map. + * @throws com::sun::star::lang::NoSupportException if the specified enumerator method is not supported by the implementation. + */ + createElementEnumeration(Isolated: boolean): XEnumeration; + + /** + * creates a enumerator for the keys of the map + * @param Isolated controls whether the newly create enumerator should be isolated from the map. + * @throws com::sun::star::lang::NoSupportException if the specified enumerator method is not supported by the implementation. + */ + createKeyEnumeration(Isolated: boolean): XEnumeration; + + /** + * creates a enumerator for the values of the map + * @param Isolated controls whether the newly create enumerator should be isolated from the map. + * @throws com::sun::star::lang::NoSupportException if the specified enumerator method is not supported by the implementation. + */ + createValueEnumeration(Isolated: boolean): XEnumeration; + } + + /** + * provides functionality to enumerate the contents of a container. + * + * An object that implements the {@link XEnumeration} interface generates a series of elements, one at a time. Successive calls to the + * `XEnumeration::nextElement` method return successive elements of the series. + * + * For example (Java), to print all elements of a vector **aVect** : + * + * {{program example here, see documentation}} + * + * + * + * If the object changed, the behavior of the enumeration is not specified. This is not a remote interface. + */ + interface XEnumeration extends uno.XInterface { + /** tests whether this enumeration contains more elements. */ + hasMoreElements(): boolean; + + /** + * @returns the next element of this enumeration. + * @throws NoSuchElementException if no more elements exist. + * @throws com::sun::star::lang::WrappedTargetException If the implementation has internal reasons for exceptions, then wrap these in a {@link com.sun.star. + */ + nextElement(): any; + } + + /** used to enumerate objects in a container which contains objects. */ + interface XEnumerationAccess extends XElementAccess { + /** @returns a new enumeration object for this container. It returns NULL if there are no objects in this container. */ + createEnumeration(): XEnumeration; + } + + /** + * specifies the fully qualified name of the object within a hierarchy. + * + * The name is generally globally unique in the hierarchy. + * @see com.sun.star.container.XHierarchicalNameAccess + * @see com.sun.star.container.XNamed + */ + interface XHierarchicalName extends uno.XInterface { + /** + * builds the hierarchical name of an object, given a relative name + * + * Can be used to find the name of a descendant object in the hierarchy without actually accessing it. + * @see XHierarchicalNameAccess.hasByHierarchicalName + */ + composeHierarchicalName(aRelativeName: string): string; + + /** @returns the fully qualified hierarchical name of the object. */ + getHierarchicalName(): string; + + /** @returns the fully qualified hierarchical name of the object. */ + readonly HierarchicalName: string; + } + + /** + * is used to have hierarchical access to elements within a container. + * + * You address an object of a specific level in the hierarchy by giving its fully qualified name, e.g., "com.sun.star.uno.XInterface". + * + * To implement inaccurate name access, support the {@link com.sun.star.beans.XExactName} interface. + * @see com.sun.star.beans.XExactName + */ + interface XHierarchicalNameAccess extends uno.XInterface { + /** + * @param aName the name of the object. + * @returns the object with the specified name. + * @throws NoSuchElementException if an element under Name does not exist. + */ + getByHierarchicalName(aName: string): any; + + /** + * @param aName the name of the object. + * @returns `TRUE` if an element with this name is in the container, `FALSE` otherwise. In many cases, the next call is {@link XNameAccess.getByName()} . Yo + */ + hasByHierarchicalName(aName: string): boolean; + } + + /** Insertion and removal of hierarchical elements. */ + interface XHierarchicalNameContainer extends XHierarchicalNameReplace { + /** inserts the element at the specified name. */ + insertByHierarchicalName(aName: string, aElement: any): void; + + /** removes the element at the specified name. */ + removeByHierarchicalName(Name: string): void; + } + + /** Replacement of hierarchical elements. */ + interface XHierarchicalNameReplace extends XHierarchicalNameAccess { + /** replaces the element at the specified name. */ + replaceByHierarchicalName(aName: string, aElement: any): void; + } + + /** provides access to the elements of a collection through a unique identifier. */ + interface XIdentifierAccess extends XElementAccess { + /** + * @param Identifier specifies the identifier of the element that should be retrieved. + * @returns the element with the specified identifier + * @throws com::sun::star::lang::NoSuchElementException If the identifier is not existing. + * @throws com::sun::star::lang::WrappedTargetException If the implementation has internal reasons for exceptions, then wrap these in a {@link com.sun.star. + */ + getByIdentifier(Identifier: number): any; + + /** @returns a sequence of all identifiers in this container. The order of the identifiers is not specified. */ + getIdentifiers(): SafeArray; + + /** @returns a sequence of all identifiers in this container. The order of the identifiers is not specified. */ + readonly Identifiers: SafeArray; + } + + /** + * This is the generic interface for supporting the creation and removal of elements with unique identifiers. + * @see XContainer + */ + interface XIdentifierContainer extends XIdentifierReplace { + /** + * inserts an element and creates a new unique identifier for it. + * @param aElement The new element that will be inserted. + * @returns the newly created identifier under which the element is inserted. + * @throws com::sun::star::lang::IllegalArgumentException if the argument is not vailid for this container. + * @throws com::sun::star::lang::WrappedTargetException If the implementation has internal reasons for exceptions, then wrap these in a {@link com.sun.star. + */ + insert(aElement: any): number; + + /** + * removes the element with the specified identifier. + * @param Identifier The identifier that should be removed. + * @throws com::sun::star::lang::NoSuchElementException If the identifier does not exist. + * @throws com::sun::star::lang::WrappedTargetException If the implementation has internal reasons for exceptions, then wrap these in a {@link com.sun.star. + */ + removeByIdentifier(Identifier: number): void; + } + + /** This is the generic interface for supporting the replacement of elements with unique identifiers. */ + interface XIdentifierReplace extends XIdentifierAccess { + /** + * replaces the element with the specified identifier. + * @param Identifier specifies the identifier of the element that should be retrieved. + * @param aElement the new element that replaces the old element for the specified identifier. + * @throws com::sun::star::lang::IllegalArgumentException If the argument is not valid for this container. + * @throws com::sun::star::lang::NoSuchElementException If the identifier is not existing. + * @throws com::sun::star::lang::WrappedTargetException If the implementation has internal reasons for exceptions, then wrap these in a {@link com.sun.star. + */ + replaceByIdentifer(Identifier: number, aElement: any): void; + } + + /** makes it possible to access contents through an implicit (unique) ID. */ + interface XImplicitIDAccess extends XElementAccess { + /** @returns the element with the specified implicit ID. */ + getByImplicitID(ID: string): any; + + /** @returns a sequence with all existing implicit IDs. */ + getImplicitIDs(): SafeArray; + + /** @returns a sequence with all existing implicit IDs. */ + readonly ImplicitIDs: SafeArray; + } + + /** makes it possible to insert and remove elements in/from a container using an implicit (unique) ID. */ + interface XImplicitIDContainer extends XImplicitIDReplace { + /** + * adds a new object to the container and generates an implicit (unique) ID for this object. + * @returns the implicit ID for the new object. + */ + addWithImplicitID(aElement: any): string; + + /** removes an object from the container which is specified by an implicit (unique) identifier. */ + removeByImplicitID(ID: string): void; + } + + /** makes it possible to replace contents in a collection by an implicit (unique) ID: */ + interface XImplicitIDReplace extends uno.XInterface { + /** replaces the content which is specified by its implicit (unique) ID with a new content. */ + replaceByUniqueID(ID: string, aNewElement: any): void; + } + + /** + * provides access to the elements of a collection through an index. + * + * This interface should only be used if the data structure, itself, is indexed. + */ + interface XIndexAccess extends XElementAccess { + /** @returns the number of elements in this container. */ + readonly Count: number; + + /** + * @param Index specifies the position in the array. The first index is 0. + * @returns the element at the specified index. + * @throws com::sun::star::lang::IndexOutOfBoundException if the index is not valid. + * @throws com::sun::star::lang::WrappedTargetException If the implementation has internal reasons for exceptions, then wrap these in a {@link com.sun.star. + */ + getByIndex(Index: number): any; + + /** @returns the number of elements in this container. */ + getCount(): number; + } + + /** + * This is the generic interface for supporting the insertion and removal of indexed elements. + * @see XContainer + */ + interface XIndexContainer extends XIndexReplace { + /** + * inserts the given element at the specified index. + * + * To append an element, use the index "last index +1". + */ + insertByIndex(Index: number, Element: any): void; + + /** removes the element at the specified index. */ + removeByIndex(Index: number): void; + } + + /** + * This is the generic interface for supporting the replacement of indexed elements. + * @see XContainer + */ + interface XIndexReplace extends XIndexAccess { + /** replaces the element at the specified index with the given element. */ + replaceByIndex(Index: number, Element: any): void; + } + + /** + * describes a map between keys and values. + * + * Keys in the map are unique, and each key maps to exactly one value. + * + * Locating elements in the map, both values and keys, requires a notion of equality of two objects. In conformance with the [UNO type system]{@link + * url="http://udk.openoffice.org/common/man/typesystem.html"} , two values are said to be equal if and only if they have the same type, and both denote + * the same element of this type's value set. + * @see Map for a default implementation of this interface + */ + interface XMap extends XElementAccess { + /** + * clears the map, removing all key-value pairs from it. + * @throws com::sun::star::lang::NoSupportException if the map is not mutable. + */ + clear(): void; + + /** + * determines whether a mapping for he given key exists in the map + * @param Key is the key whose presence in the map is to be tested. + * @returns `TRUE` if and only if the map contains a mapping for the given key. + * @throws com::sun::star::beans::IllegalTypeException if the given key is not of a type which is accepted by the map + * @throws com::sun::star::lang::IllegalArgumentException if the given key is not supported to be put into the map. It's up to the service implementing the + */ + containsKey(Key: any): boolean; + + /** + * determines whether the map contains a mapping to a given value. + * @param Value is the value whose presence in the map is to be tested. + * @returns `TRUE` if and only one or more keys map to the given value. + * @throws com::sun::star::beans::IllegalTypeException if the given value is not of a type which is accepted by the map. It's up to the service implementing + * @throws com::sun::star::lang::IllegalArgumentException if the given value is not supported to be put into the map. + */ + containsValue(Value: any): boolean; + + /** + * gets the value to which a given key maps. + * @param Key they key whose associated value is to be returned. + * @returns the value which is associated with the given key. + * @throws com::sun::star::beans::IllegalTypeException if the given key is not of a type which is accepted by the map + * @throws com::sun::star::lang::IllegalArgumentException if the given key is not supported to be put into the map. It's up to the service implementing the + * @throws com::sun::star::container::NoSuchElementException if there is no value associated with the given key + */ + get(Key: any): any; + + /** + * denotes the type of the keys in the map. + * + * Implementations are free to accept any supertype of `KeyType` as keys. + */ + KeyType: type; + + /** + * associates a given key with a given value + * + * If the map already contains a mapping for the given key, then the old value is replaced by the given new value. + * @param Key is the key which the given value should be associated with + * @param Value is the value which should be associated with the given key + * @returns the value which was previously associated with the given key, or `VOID` if there was no such previous association. + * @throws com::sun::star::beans::IllegalTypeException if the given key is not of a type which is accepted by the map + * @throws com::sun::star::lang::IllegalArgumentException if the given key, or the given value, is not supported to be put into the map. It's up to the serv + * @throws com::sun::star::lang::NoSupportException if the map does not support putting new mappings into it + */ + put(Key: any, Value: any): any; + + /** + * removes a key-value mapping, given by key, from the map. + * @param Key is the key whose mapping should be removed from the map + * @returns the value which was associated with the given key before the removal + * @throws com::sun::star::beans::IllegalTypeException if the given key is not of a type which is accepted by the map + * @throws com::sun::star::lang::IllegalArgumentException if the given key is not supported to be put into the map. It's up to the service implementing the + * @throws com::sun::star::lang::NoSupportException if the map does not support removing mappings + * @throws com::sun::star::container::NoSuchElementException if there is no value associated with the given key + */ + remove(Key: any): any; + + /** + * denotes the type of the values in the map. + * + * Implementations are free to accept any supertype of the `ValueType` as values. + */ + ValueType: type; + } + + /** + * is used to access named objects within a container. + * + * To implement inaccurate name access, support the {@link com.sun.star.beans.XExactName} interface. + * @see com.sun.star.beans.XExactName + */ + interface XNameAccess extends XElementAccess { + /** @returns a sequence of all element names in this container. The order of the names is not specified. */ + readonly ElementNames: SafeArray; + + /** + * @param aName the name of the object. + * @returns the object with the specified name. + * @throws NoSuchElementException if an element under Name does not exist. + * @throws com::sun::star::lang::WrappedTargetException If the implementation has internal reasons for exceptions, then wrap these in a {@link com.sun.star. + */ + getByName(aName: string): any; + + /** @returns a sequence of all element names in this container. The order of the names is not specified. */ + getElementNames(): SafeArray; + + /** + * @param aName the name of the object. + * @returns `TRUE` if an element with this name is in the container, `FALSE` otherwise. In many cases the next call is {@link XNameAccess.getByName()} . You + */ + hasByName(aName: string): boolean; + } + + /** + * This is the generic interface for supporting the insertion and removal of named elements. + * @see XContainer + */ + interface XNameContainer extends XNameReplace { + /** inserts the given element at the specified name. */ + insertByName(aName: string, aElement: any): void; + + /** removes the element with the specified name. */ + removeByName(Name: string): void; + } + + /** + * specifies the name of the object. + * + * The name is generally unique in the container of the object. + */ + interface XNamed extends uno.XInterface { + /** @returns the programmatic name of the object. */ + getName(): string; + + /** @returns the programmatic name of the object. */ + Name: string; + + /** sets the programmatic name of the object. */ + setName(aName: string): void; + } + + /** + * This is the generic interface for supporting the replacement of named elements. + * @see XContainer + */ + interface XNameReplace extends XNameAccess { + /** replaces the element with the specified name with the given element. */ + replaceByName(aName: string, aElement: any): void; + } + + /** + * This is the generic interface for supporting the insertion and removal of elements. + * @see XContainer + */ + interface XSet extends XEnumerationAccess { + /** @returns `TRUE` if the given element is a member of this container, otherwise `FALSE` . */ + has(aElement: any): boolean; + + /** inserts the given element into this container. */ + insert(aElement: any): void; + + /** removes the given element from this container. */ + remove(aElement: any): void; + } + + /** + * maps strings to anys. + * @since OOo 2.3 + */ + interface XStringKeyMap { + /** the number of elements in the map. */ + Count: number; + + /** + * obtains the key of an element by index. + * @param nIndex is the index of the element. + * @returns the key string matching the given index. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the specified index is greater than the number of elements + */ + getKeyByIndex(nIndex: number): string; + + /** + * reads data from the map. + * @param aKey The key string which should be searched for. + * @returns the value matching aKey. + * @throws com::sun::star::container::NoSuchElementException if an element under aKey does not exist. + */ + getValue(aKey: string): any; + + /** + * obtains the value of an element by index. + * @param nIndex is the index of the key. + * @returns the value matching the given index. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the specified index is greater than the number of elements + */ + getValueByIndex(nIndex: number): any; + + /** + * checks for element existence. + * @param aKey The key string which should be searched for. + * @returns true if an element with key aKey exists. + */ + hasValue(aKey: string): boolean; + + /** + * writes data to the map. + * @param aKey The key string which should be used to store the value. + * @param aValue The value that should be stored. + * @throws com::sun::star::lang::IllegalArgumentException if the element could not be inserted. + * @throws com::sun::star::container::ElementExistException if there is already a value stored under the key aKey. + */ + insertValue(aKey: string, aValue: any): void; + } + + /** makes it possible to access contents via a unique ID. */ + interface XUniqueIDAccess extends uno.XInterface { + /** @returns the element with the specified unique ID. */ + getByUniqueID(ID: string): any; + + /** removes the element with the specified unique ID from this container. */ + removeByUniqueID(ID: string): void; + } + } + + namespace cui { + /** @since LibreOffice 4.1 */ + interface ColorPicker extends ui.dialogs.XExecutableDialog { + createWithParent(Parent: awt.XWindow): void; + } + } + + namespace datatransfer { + /** + * Different platforms use different types to describe data formats available during data exchange operations like clipboard or drag&drop. + * Implementations of this service do convert system dependent data types to a {@link DataFlavor} and vice versa. + * @see com.sun.star.datatransfer.XDataFormatTranslator + * @see com.sun.star.datatransfer.DataFlavor Converts a {@link DataFlavor} to system data types and vice versa. + */ + type DataFormatTranslator = XDataFormatTranslator; + + /** + * Used to create an instance that implement the interface {@link XMimeContentType} from a string representation of such a MIME content-type that + * conforms to [Rfc2045]{@link url="ftp://ftp.isi.edu/in-notes/rfc2045.txt"} and [Rfc2046]{@link url="ftp://ftp.isi.edu/in-notes/rfc2046.txt"} . + * @see com.sun.star.datatransfer.XMimeContentTypeFactory + */ + type MimeContentTypeFactory = XMimeContentTypeFactory; + + /** + * Exception will be thrown if there is a request for data in a {@link DataFlavor} that is not supported by a data source. + * @see com.sun.star.datatransfer.DataFlavor + * @see com.sun.star.datatransfer.XTransferable + */ + type UnsupportedFlavorException = uno.Exception; + + /** Each instance represents the concept of a data format as it would appear on a clipboard, or during drag and drop. */ + interface DataFlavor { + /** The type of the object to transfer, for example, XOutputStream. */ + DataType: type; + + /** A human presentable name for the data format. */ + HumanPresentableName: string; + + /** + * The MIME content-type (type/subtype) string describing the data format of the object to transfer. MimeType must conform to [Rfc2045]{@link + * url="ftp://ftp.isi.edu/in-notes/rfc2045.txt"} and [Rfc2046]{@link url="ftp://ftp.isi.edu/in-notes/rfc2046.txt"} ) + */ + MimeType: string; + } + + /** + * Interface to be implemented by objects used to translate a {@link DataFlavor} to a system dependent data transfer type and vice versa. + * + * Different platforms use different types to describe data formats available during data exchange operations like clipboard or drag&drop. Windows for + * instance uses integer values to describe an available clipboard or drag&drop format, Unix X11 uses so called Atoms etc. + */ + interface XDataFormatTranslator extends uno.XInterface { + /** + * Converts a system dependent data type to a {@link DataFlavor} . + * @param aSysDataType A system dependent data type. If aSysDataType is empty so is the returned {@link DataFlavor} . + * @returns A {@link DataFlavor} for the given system dependent data transfer type. If there is no appropriate mapping for a system dependent data type, the + */ + getDataFlavorFromSystemDataType(aSysDataType: any): DataFlavor; + + /** + * Converts a {@link DataFlavor} to system dependent data type. + * @param aDataFlavor Describes the format for which a system dependent data types is requested. + * @returns A system dependent data transfer type for the given {@link DataFlavor} if there is one available. If the is no system dependent data type for a g + */ + getSystemDataTypeFromDataFlavor(aDataFlavor: DataFlavor): any; + } + + /** + * An implementation of this interface represents a MIME content-type that conforms to [Rfc2045]{@link url="ftp://ftp.isi.edu/in-notes/rfc2045.txt"} and + * [Rfc2046]{@link url="ftp://ftp.isi.edu/in-notes/rfc2046.txt"} . Instances that implement this interface could be created using the interface {@link + * XMimeContentTypeFactory} . + */ + interface XMimeContentType extends uno.XInterface { + /** + * To get the full media/submedia type of the MIME content-type. + * @returns The full media/submedia type of the MIME content-type. + */ + readonly FullMediaType: string; + + /** + * To get the full media/submedia type of the MIME content-type. + * @returns The full media/submedia type of the MIME content-type. + */ + getFullMediaType(): string; + + /** + * To get the media subtype of the MIME content-type. + * @returns The media subtype of the MIME content-type. + */ + getMediaSubtype(): string; + + /** + * To get the media type of the MIME content-type. + * @returns The media type of the MIME content-type. + */ + getMediaType(): string; + + /** + * To get a list of parameters that the MIME content-type contains. + * @returns A list of the names of all parameters of the MIME content-type. + */ + getParameters(): SafeArray; + + /** + * To get the value of a specified parameter. + * @param aName The name of the parameter for which the value is requested. + * @returns The value of the specified parameter. + * @throws com::sun::star::container::NoSuchElementException if the specified parameter doesn't exist. + */ + getParameterValue(aName: string): string; + + /** + * To query if a specific parameter is supported. + * @param aName The name of the parameter to query for. + * @returns A value of `TRUE` if the MIME content-type has the specified parameter. A value of `FALSE` if the MIME content-type has not the specified parameter. + */ + hasParameter(aName: string): boolean; + + /** + * To get the media subtype of the MIME content-type. + * @returns The media subtype of the MIME content-type. + */ + readonly MediaSubtype: string; + + /** + * To get the media type of the MIME content-type. + * @returns The media type of the MIME content-type. + */ + readonly MediaType: string; + + /** + * To get a list of parameters that the MIME content-type contains. + * @returns A list of the names of all parameters of the MIME content-type. + */ + readonly Parameters: SafeArray; + } + + /** + * Implementations of this interface do create a {@link com.sun.star.datatransfer.XMimeContentType} from a given string that represents a MIME + * content-type (see [Rfc2045]{@link url="ftp://ftp.isi.edu/in-notes/rfc2045.txt"} and [Rfc2046]{@link url="ftp://ftp.isi.edu/in-notes/rfc2046.txt"} ). + */ + interface XMimeContentTypeFactory extends uno.XInterface { + /** + * Creates an object that implements {@link XMimeContentType} . + * @param aContentType A string that represents a MIME content-type as specified in [Rfc2045]{@link url="ftp://ftp.isi.edu/in-notes/rfc2045.txt"} and [Rfc2 + * @returns An object that implements {@link XMimeContentType} . + * @see com.sun.star.datatransfer.XMimeContentType + * @throws com::sun::star::lang::IllegalArgumentException if the string does not conform to [Rfc2045]{@link url="ftp://ftp.isi.edu/in-notes/rfc2045.txt"} an + */ + createMimeContentType(aContentType: string): XMimeContentType; + } + + /** + * Interface to be implemented by objects used to provide system dependent data for a transfer operation. Those objects usually also implement {@link + * XTransferable} . + */ + interface XSystemTransferable extends uno.XInterface { + /** + * Called by a data consumer to obtain a system specific data object from the source. The data object is returned in an any. The contained type may + * differ on different platforms. + * @param aProcessId The argument aProcessId is a process identifier of the caller's process. The interface implementation must ensure that the system data + * @returns The system dependent data object.; ; **Notes:** Under Windows the returned any contains an unsigned long which represents a pointer to an IData + */ + getData(aProcessId: LibreOffice.SeqEquiv): any; + } + + /** + * Interface to be implemented by objects used to provide data for a data transfer operation. + * @see com.sun.star.datatransfer.DataFlavor + */ + interface XTransferable extends uno.XInterface { + /** + * Called by a data consumer to obtain data from the source in a specified format. + * @param aFlavor Describes the requested data format + * @returns The data in the specified {@link DataFlavor} . + * @throws com::sun::star::io::IOException if the data is no longer available in the requested flavor. + * @throws com::sun::star::datatransfer::UnsupportedFlavorException if the requested {@link DataFlavor} is not supported. + */ + getTransferData(aFlavor: DataFlavor): any; + + /** + * Returns a sequence of supported {@link DataFlavor} . + * @returns The sequence of supported {@link DataFlavor} . + * @see com.sun.star.datatransfer.DataFlavor + */ + getTransferDataFlavors(): SafeArray; + + /** + * Checks if the data object supports the specified data flavor. + * @param aFlavor Describes the format that should be checked + * @returns A value of `TRUE` if the {@link DataFlavor} is supported by the transfer source. A value of `FALSE` if the {@link DataFlavor} is unsupported by t + */ + isDataFlavorSupported(aFlavor: DataFlavor): boolean; + + /** + * Returns a sequence of supported {@link DataFlavor} . + * @returns The sequence of supported {@link DataFlavor} . + * @see com.sun.star.datatransfer.DataFlavor + */ + readonly TransferDataFlavors: SafeArray; + } + + interface XTransferable2 extends XTransferable { + /** + * This is equivalent of getTransferData of {@link XTransferable} , but takes an additional parameter that specifies the destination document type. + * @param aFlavor requested data format + * @param aDestShellID destination document shell ID. The ID of each individual shell must be unique. + * @returns data in specified data format. + * @throws com::sun::star::io::IOException if the data is no longer available in the requested flavor. + * @throws com::sun::star::datatransfer::UnsupportedFlavorException if the requested {@link DataFlavor} is not supported. + */ + getTransferData2(aFlavor: DataFlavor, aDestShellID: string): any; + } + + /** + * Interface to be implemented by objects used to provide data for a transfer operation. + * @see com.sun.star.datatransfer.DataFlavor + * @see com.sun.star.datatransfer.XTransferable + */ + interface XTransferableEx extends uno.XInterface { + /** + * @param requestedFlavors Sequence of {@link DataFlavor} of interest. Specify an empty sequence for interest in all data flavors with top-level MIME conte + * @returns The list of the matching supported {@link DataFlavor} that were requested. For each requested top-level MIME content-type, all supported subtypes + */ + queryTransferDataFlavors(requestedFlavors: LibreOffice.SeqEquiv): SafeArray; + } + + /** + * The transferable source interface. + * @see com.sun.star.datatransfer.XTransferable + */ + interface XTransferableSource extends uno.XInterface { + /** @returns A human presentable description of the source that created the transferable object. */ + readonly DataSourceDescription: string; + + /** @returns A human presentable description of the source that created the transferable object. */ + getDataSourceDescription(): string; + } + + interface XTransferableSupplier { + /** + * To get access to a transferable representation of a selected part of an object. + * @returns The transferable object representing the selection inside the supplying object + * @see com.sun.star.datatransfer.XTransferable + */ + getTransferable(): XTransferable; + + /** + * Hands over a transferable object that shall be inserted. + * @param xTrans The transferable object to be inserted A NULL value is not allowed. + * @see com.sun.star.datatransfer.XTransferable + * @throws com::sun::star::datatransfer::UnsupportedFlavorException if the given {@link com.sun.star.datatransfer.XTransferable} has no {@link com.sun.star. + */ + insertTransferable(xTrans: XTransferable): void; + + /** + * To get access to a transferable representation of a selected part of an object. + * @returns The transferable object representing the selection inside the supplying object + * @see com.sun.star.datatransfer.XTransferable + */ + readonly Transferable: XTransferable; + } + + /** + * This interface provides direct access to the data in all data flavors. It can be used by the clipboard implementation to optimize data transport on + * flush operations. + * @see com.sun.star.datatransfer.XTransferable + */ + interface XTransferDataAccess extends uno.XInterface { + /** + * To get all the data of a sequence of {@link DataFlavor} . + * @param aFlavorList The sequence of requested {@link DataFlavor} . An unsupported {@link DataFlavor} will be ignored. + * @returns The data in the requested {@link DataFlavor} . For unsupported {@link DataFlavor} an empty any will be returned. + */ + getData(aFlavorList: LibreOffice.SeqEquiv): SafeArray; + + /** + * To query for the summarized data size in bytes of a sequence of {@link DataFlavor} . + * @param aFlavorList A sequence of requested {@link DataFlavor} . An unsupported {@link DataFlavor} will be ignored. + * @returns The number of bytes of the transfer data in the specified sequence of {@link DataFlavor} . + */ + queryDataSize(aFlavorList: LibreOffice.SeqEquiv): number; + } + + namespace clipboard { + /** The system clipboard service builds a bridge to the OS specific clipboard interfaces. */ + type SystemClipboard = XSystemClipboard; + + /** + * A clipboard uses this object to notify its listeners of content changes. + * @see com.sun.star.datatransfer.clipboard.XClipboardListener + */ + interface ClipboardEvent extends lang.EventObject { + /** The current content of the clipboard. */ + Contents: XTransferable; + } + + /** + * The clipboard manager is a one-instance service that holds a list of all known clipboard instances. + * @see XClipboardManager + */ + interface ClipboardManager extends XClipboardManager, lang.XComponent { } + + /** A generic clipboard service is a simple container for transferable objects. */ + interface GenericClipboard extends XClipboardEx, XClipboardNotifier, lang.XInitialization, lang.XComponent { } + + interface XClipboard extends uno.XInterface { + /** + * To get the current content of the clipboard. + * @returns The transferable object representing the current content of this clipboard. + * @see com.sun.star.datatransfer.XTransferable + */ + readonly Contents: XTransferable; + + /** + * To get the current content of the clipboard. + * @returns The transferable object representing the current content of this clipboard. + * @see com.sun.star.datatransfer.XTransferable + */ + getContents(): XTransferable; + + /** + * To get the name of the clipboard instance. + * @returns The name of this clipboard object. If the returned string is empty the clipboard instance is the system clipboard. + */ + getName(): string; + + /** + * To get the name of the clipboard instance. + * @returns The name of this clipboard object. If the returned string is empty the clipboard instance is the system clipboard. + */ + readonly Name: string; + + /** + * Sets the current contents of the clipboard to the specified transferable object and registers the specified clipboard owner as the owner of the new + * contents. + * @param xTrans The transferable object to set as new content. If the given {@link com.sun.star.datatransfer.XTransferable} has no {@link com.sun.star.dat + * @param xClipboardOwner The new owner of the clipboard. NULL is an acceptable value and means that the caller is not interested in lost ownership notific + * @see com.sun.star.datatransfer.XTransferable + * @see com.sun.star.datatransfer.clipboard.XClipboardOwner + */ + setContents(xTrans: XTransferable, xClipboardOwner: XClipboardOwner): void; + } + + /** + * The extended clipboard interface. + * @see com.sun.star.datatransfer.clipboard.XClipboard + */ + interface XClipboardEx extends XClipboard { + /** + * To determine the supported rendering capabilities of the clipboard instance. + * @returns A set of flags describing the rendering capabilities of the clipboard instance. + * @see RenderingCapabilities + */ + getRenderingCapabilities(): number; + + /** + * To determine the supported rendering capabilities of the clipboard instance. + * @returns A set of flags describing the rendering capabilities of the clipboard instance. + * @see RenderingCapabilities + */ + readonly RenderingCapabilities: number; + } + + /** + * Should be implemented by a clipboard factory that simplifies the creation of multiple clipboard instances. + * @see com.sun.star.datatransfer.clipboard.XClipboard + */ + interface XClipboardFactory extends uno.XInterface { + /** + * Creates a new named clipboard instance. + * @param aName The name the clipboard should have. + * @returns A newly created instance of a {@link GenericClipboard} implementation. + * @throws com::sun::star::lang::IllegalArgumentException If an empty string is passed as clipboard name. + */ + createClipboard(aName: string): XClipboard; + } + + /** Interface to be implemented to receive notifications on clipboard content changes. */ + interface XClipboardListener extends lang.XEventListener { + /** + * The content of the clipboard has changed. + * @param event The event object containing the new clipboard content. + * @see com.sun.star.datatransfer.clipboard.ClipboardEvent + */ + changedContents(event: ClipboardEvent): void; + } + + /** + * This interface is used to retrieve, add, or remove clipboard instances. + * @see com.sun.star.datatransfer.clipboard.XClipboard + */ + interface XClipboardManager extends uno.XInterface { + /** + * Add a clipboard instance to the manager's list. + * @param xClipboard The clipboard to add. + * @throws com::sun::star::IllegalArgumentException if xClipboard is not a valid clipboard. + * @throws com::sun::star::container::ElementExistsException if a clipboard with the name of xClipboard already exists. + */ + addClipboard(xClipboard: XClipboard): void; + + /** + * Get a clipboard instance by name. + * @param aName The name of clipboard to return. To retrieve the default (system) clipboard, pass an empty string. + * @returns The clipboard object with the specified name. + * @throws com::sun::star::container::NoSuchElementException if no clipboard with the specified name exists. + */ + getClipboard(aName: string): XClipboard; + + /** + * Get a list of a managed clipboards. + * @returns A sequence of the names of all available clipboards. + */ + listClipboardNames(): SafeArray; + + /** + * Removes the clipboard with the specified name from the list. + * @param aName The name of the clipboard to remove. + */ + removeClipboard(aName: string): void; + } + + interface XClipboardNotifier extends uno.XInterface { + /** + * Requests notifications on clipboard content changes. + * @param listener The object receiving the notifications. + */ + addClipboardListener(listener: XClipboardListener): void; + + /** + * Removes listener from notification list. + * @param listener The object to remove from notification list. + */ + removeClipboardListener(listener: XClipboardListener): void; + } + + /** + * The owner of a transferable object may pass this interface to the clipboard instance. + * @see com.sun.star.datatransfer.clipboard.XClipboard + */ + interface XClipboardOwner extends uno.XInterface { + /** + * Notifies the transferable object source that it is no longer the owner of the clipboard. + * @param xClipboard The clipboard for which the ownership was lost. + * @param xTrans The transferable object that has been the contents of the clipboard. + * @see com.sun.star.datatransfer.clipboard.XClipboard + * @see com.sun.star.datatransfer.XTransferable + */ + lostOwnership(xClipboard: XClipboard, xTrans: XTransferable): void; + } + + /** + * An interface for flushable clipboards may optionally be implemented by a system clipboard service. + * @see com.sun.star.datatransfer.clipboard.SystemClipboard + */ + interface XFlushableClipboard extends uno.XInterface { + /** Renders the current content of the clipboard to the system so that it is available even if the source application no longer exist. */ + flushClipboard(): void; + } + + /** + * Provides a unified interface for new-style service {@link SystemClipboard} . + * @since LibreOffice 4.2 + */ + interface XSystemClipboard extends XClipboardEx, XClipboardNotifier, XFlushableClipboard, lang.XComponent { } + + namespace RenderingCapabilities { + const enum Constants { + Delayed = 1, + Persistant = 2, + } + } + } + + namespace dnd { + /** + * This exception is thrown by various methods in the {@link datatransfer.dnd} package. + * + * It is usually thrown to indicate that the target in question is unable to undertake the requested operation at the present time, since the underlying + * Drag and Drop system is not in the appropriate state. + */ + type InvalidDNDOperationException = uno.RuntimeException; + + /** + * A {@link DragGestureEvent} is passed to the method {@link XDragGestureListener.dragGestureRecognized()} when a particular {@link + * XDragGestureRecognizer} detects that a platform dependent drag initiating gesture has occurred on the component that it is tracking. + */ + interface DragGestureEvent extends lang.EventObject { + /** + * The action selected by the user. + * + * Different constants may be combined using a logical OR. + * + * It's further possible to combine the ACTION_DEFAULT with one of the other actions defined in {@link com.sun.star.datatransfer.dnd.DNDConstants} . This + * means the user did not press any key during the Drag and Drop operation and the action that was combined with ACTION_DEFAULT is the system default + * action. + * @see com.sun.star.datatransfer.dnd.DNDConstants + */ + DragAction: number; + + /** The x coordinate where the drag originated in component coordinates. */ + DragOriginX: number; + + /** The y coordinate where the drag originated in component coordinates. */ + DragOriginY: number; + + /** The DragSource associated with this drag action. */ + DragSource: XDragSource; + + /** + * The last event comprising the gesture. + * + * The initial trigger event will presumably be a {@link com.sun.star.awt.MouseEvent} event. If it is not, the implementation should either react + * accordingly or presume that the left mouse button was clicked. + */ + Event: any; + } + + /** + * The {@link DragSourceDragEvent} is delivered from an object that implements the {@link XDragSourceContext} to the currently registered drag source + * listener. + * + * It contains state regarding the current state of the operation to enable the operations initiator to provide the end user with the appropriate drag + * over feedback. + * @see com.sun.star.datatransfer.dnd.XDragSourceListener + */ + interface DragSourceDragEvent extends DragSourceEvent { + /** + * The drag action selected by the current drop target. + * @see com.sun.star.datatransfer.dnd.DNDConstants + */ + DropAction: number; + + /** + * The user's currently selected drop action. + * @see com.sun.star.datatransfer.dnd.DNDConstants + */ + UserAction: number; + } + + /** + * The {@link DragSourceDropEvent} is delivered from an object that implements {@link XDragSourceContext} to its currently registered drag source + * listener's. + * + * It contains sufficient information for the originator of the operation to provide appropriate feedback to the end user when the operation completes. + * @see com.sun.star.datatransfer.dnd.XDragSourceListener + */ + interface DragSourceDropEvent extends DragSourceEvent { + /** + * The action performed by the target on the subject of the drop. + * @see com.sun.star.datatransfer.dnd.DNDConstants + */ + DropAction: number; + + /** Indicates if the drop was successful. */ + DropSuccess: boolean; + } + + /** + * This class is the base class for {@link DragSourceDragEvent} and {@link DragSourceDropEvent} . + * + * To access the {@link XDragSource} that originated this event, use the {@link com.sun.star.lang.EventObject.Source} member of this object. + */ + interface DragSourceEvent extends lang.EventObject { + /** + * The drag source on which the Drag and Drop operation was initiated. + * @see com.sun.star.datatransfer.dnd.XDragSource + */ + DragSource: XDragSource; + + /** + * The drag source context of the current drag operation. + * @see com.sun.star.datatransfer.dnd.XDragSourceContext + */ + DragSourceContext: XDragSourceContext; + } + + /** + * The {@link DropTargetDragEnterEvent} is delivered from the drop target to the currently registered drop target listeners whenever the logical cursor + * associated with a Drag and Drop operation enters the visible geometry of a window associated with a drop target. + * + * It contains the {@link com.sun.star.datatransfer.DataFlavor} types supported by the transferable object of the current Drag and Drop operation. + * @see com.sun.star.datatransfer.XTransferable + */ + interface DropTargetDragEnterEvent extends DropTargetDragEvent { + /** A sequence of supported {@link com.sun.star.datatransfer.DataFlavor} types. */ + SupportedDataFlavors: SafeArray; + } + + /** + * The {@link DropTargetDragEvent} is delivered from the drop target to the currently registered drop target listener. + * + * It contains information regarding the current state of the operation to enable the operations initiator to provide the end user with the appropriate + * drag over feedback. + * @see com.sun.star.datatransfer.dnd.XDropTargetListener + */ + interface DropTargetDragEvent extends DropTargetEvent { + /** + * The drop target context of the current drag operation. + * @see com.sun.star.datatransfer.dnd.XDropTargetDragContext + */ + Context: XDropTargetDragContext; + + /** + * This value represents the currently selected drop action. + * @see com.sun.star.datatransfer.dnd.DNDConstants + */ + DropAction: number; + + /** The cursor's current x location within the window's coordinates. */ + LocationX: number; + + /** The cursor's current y location within the window's coordinates. */ + LocationY: number; + + /** + * This value represents the action or actions supported by the source. This may be a combination of arbitrary source actions except ACTION_DEFAULT. + * + * To combine different actions use a logical OR. + * @see com.sun.star.datatransfer.dnd.DNDConstants + */ + SourceActions: number; + } + + /** + * The {@link DropTargetDropEvent} is delivered from the drop target to its currently registered drop target listener. + * + * It contains sufficient information for the originator of the operation to provide appropriate feedback to the end user when the operation completes. + */ + interface DropTargetDropEvent extends DropTargetEvent { + /** + * The drop target context of the current drag operation. + * @see com.sun.star.datatransfer.dnd.XDropTargetDropContext + */ + Context: XDropTargetDropContext; + + /** + * This value represents the action or actions selected by the user at the time of the drop. + * + * If more than one action is specified, the {@link XDropTargetListener} should raise a dialog to ask the user which action to use. + * @see com.sun.star.datatransfer.dnd.DNDConstants + */ + DropAction: number; + + /** The cursor's current x location within the window's coordinates. */ + LocationX: number; + + /** The cursor's current y location within the window's coordinates. */ + LocationY: number; + + /** This value represents the action or actions supported by the source. */ + SourceActions: number; + + /** + * The transferable object associated with the drop. + * @see com.sun.star.datatransfer.XTransferable + */ + Transferable: XTransferable; + } + + /** + * This class is the base class for {@link DropTargetDragEvent} and {@link DropTargetDropEvent} . + * + * To access the {@link XDropTarget} that originated this event, use the {@link com.sun.star.lang.EventObject.Source} member of this object. + */ + interface DropTargetEvent extends lang.EventObject { + /** UNO specification does not allow empty struct definitions. */ + Dummy: number; + } + + /** + * This service connects the Java-like UNO drag and drop protocol to the protocol used on window platforms. It realized the drag source. + * @see XDragSource + */ + interface OleDragSource extends XDragSource, lang.XInitialization, lang.XComponent { } + + /** + * This service connects the Java-like UNO Drag & Drop protocol to the protocol used on window platforms. It realizes the drop target. + * @see XDropTarget + */ + interface OleDropTarget extends XDropTarget, lang.XInitialization, lang.XComponent { } + + /** + * This service connects the Java-like UNO Drag and Drop protocol to the X Drag and Drop protocol used on X-Servers to transfer data between applications + * via Drag and Drop operations. + * @see XDragSource + */ + interface X11DragSource extends XDragSource, lang.XInitialization, lang.XComponent { } + + /** + * This service connects the Java-like UNO Drag and Drop protocol to the X Drag and Drop protocol used on X-Servers to transfer data between application + * via Drag and Drop operations. + * @see XDragSource + * @see XDropTarget + */ + interface X11DropTarget extends XDropTarget, lang.XInitialization, lang.XComponent { } + + /** + * Interface for autoscroll support. + * + * During Drag and Drop operations it is possible that a user may wish to drop the subject of the operation on a region of a scrollable GUI control that + * is not currently visible to the user. + * + * In such situations it is desirable that the GUI control detect this and institute a scroll operation in order to make obscured region(s) visible to + * the user. This feature is known as autoscrolling. + * + * If a GUI control is both an active DropTarget and is also scrollable, it can receive notifications of autoscrolling gestures by the user from the Drag + * and Drop system by implementing this interface. + * + * An autoscrolling gesture is initiated by the user by keeping the drag cursor motionless with a border region of the Component, referred to as the + * "autoscrolling region", for a predefined period of time, this will result in repeated scroll requests to the Component until the drag Cursor resumes + * its motion. + */ + interface XAutoscroll extends uno.XInterface { + /** + * Notify the component to autoscroll. + * @param cursorLocationX X location of the cursor in pixel. + * @param cursorLocationY Y location of the cursor in pixel. + */ + autoscroll(cursorLocationX: number, cursorLocationY: number): void; + + /** + * Returns the regions describing the autoscrolling region. + * @returns The regions describing the autoscrolling region or border relative to the geometry of the implementing component. + */ + readonly AutoscrollRegion: any; + + /** + * Returns the regions describing the autoscrolling region. + * @returns The regions describing the autoscrolling region or border relative to the geometry of the implementing component. + */ + getAutoscrollRegion(): any; + } + + /** + * This interface will be used by a {@link XDragGestureRecognizer} when it detects a drag initiating gesture. + * + * The implementor of this interface is responsible for starting the drag as a result of receiving such notification. + */ + interface XDragGestureListener extends lang.XEventListener { + /** + * A {@link XDragGestureRecognizer} has detected a platform-dependent drag initiating gesture and is notifying this listener in order for it to initiate + * the action for the user. + * @param dge The {@link DragGestureEvent} describing the gesture that has just occurred. + */ + dragGestureRecognized(dge: DragGestureEvent): void; + } + + /** + * This interface is implemented by a view or window that supports drag operations. + * + * Different to Java, the association between view and interface is fixed and cannot be changed. Otherwise, the AWT messaging would have to be + * implemented for any window supporting Drag and Drop operations, which would be a performance issue. + */ + interface XDragGestureRecognizer extends uno.XInterface { + /** + * Registers a new {@link XDragGestureListener} . + * @param dgl The {@link XDragGestureListener} to register with this {@link XDragGestureRecognizer} . + */ + addDragGestureListener(dgl: XDragGestureListener): void; + + /** + * Unregisters the specified {@link XDragGestureListener} . + * @param dgl The {@link XDragGestureListener} to register with this {@link XDragGestureRecognizer} . + */ + removeDragGestureListener(dgl: XDragGestureListener): void; + + /** Reset the recognizer. If it is currently recognizing a gesture, ignore it. */ + resetRecognizer(): void; + } + + /** + * This interface is implemented by a view or window that supports drag operations and will be received as part of a {@link DragGestureEvent} through a + * {@link com.sun.star.datatransfer.dnd.XDragGestureListener.dragGestureRecognized()} callback. + * + * Differently to Java, the association between view and interface is fixed and can not be changed. Otherwise, the AWT messaging would have to be + * implemented for any window supporting Drag and Drop operations, which would be a real performance issue. + */ + interface XDragSource extends uno.XInterface { + /** + * To get the default cursor for a specified drag action. + * @param dragAction A drag action as specified in {@link DNDConstants} . + * @returns The default drag cursor for the specified drag action. The returned value may be used as parameter for the method {@link com.sun.star.datatransfe + */ + getDefaultCursor(dragAction: number): number; + + /** + * In order to query if drag image support is available. + * @returns A boolean indicating whether or not drag image support is available on the underlying platform. + */ + isDragImageSupported(): boolean; + + /** + * Starts the drag operation. + * + * Note: this call does **not** block until the drag and drop operation ends. If the Drag and Drop system is unable to initiate a drag operation or if + * the user attempts to start a drag while an existing drag operation is still executing, the action fails immediately. This is indicated by calling + * {@link com.sun.star.datatransfer.dnd.XDragSourceListener.dragDropEnd()} on the parameter listener with a {@link DragSourceDragEvent} showing a + * failure. + * @param trigger The {@link DragGestureEvent} that initiated the drag. + * @param sourceActions The action or actions supported for this transferable as defined in {@link DNDConstants} . + * @param cursor The initial drag cursor id or 0 as default. + * @param image The initial drag image id or 0 as default. + * @param trans The transferable object dragged. + * @param listener The {@link XDragSourceListener} . + * @see com.sun.star.datatransfer.XTransferable + */ + startDrag(trigger: DragGestureEvent, sourceActions: number, cursor: number, image: number, trans: XTransferable, listener: XDragSourceListener): void; + } + + /** + * The drag source context class is responsible for managing the initiator side of the Drag and Drop protocol. + * + * In particular, it is responsible for managing event notifications to the DragSourceListener and providing the Transferable state to enable the data + * transfer. + * + * An instance of this class is created as a result of the method {@link XDragSource.startDrag()} being successfully invoked. This instance is + * responsible for tracking the state of the operation on behalf of the drag source and dispatching state changes to the drag source listener. + * @see com.sun.star.datatransfer.dnd.XDragSourceContext + * @see com.sun.star.datatransfer.dnd.XDragSourceListener + */ + interface XDragSourceContext extends uno.XInterface { + /** + * Get the identifier of the currently used cursor. + * @returns The currently selected drag cursor. + */ + readonly CurrentCursor: number; + + /** + * Get the identifier of the currently used cursor. + * @returns The currently selected drag cursor. + */ + getCurrentCursor(): number; + + /** + * This method sets the current drag cursor. + * + * This method should only be called to set another cursor than the default one for drag action currently selected by the user. + * + * Invalid cursor identifiers will be ignored. + * @param cursorId The identifier the drag source returned when registering the cursor. + */ + setCursor(cursorId: number): void; + + /** + * This method sets the current drag image. + * @param imageId The identifier the drag source returned when registering the image (0 = none). Invalid identifier will be ignored. + */ + setImage(imageId: number): void; + + /** + * This method notifies the context that the {@link com.sun.star.datatransfer.DataFlavor} types of the transferable object have changed. + * @see com.sun.star.datatransfer.XTransferable + */ + transferablesFlavorsChanged(): void; + } + + /** + * This interface must be implemented by any drag gesture recognizer implementation that a drag source supports. + * @see com.sun.star.datatransfer.dnd.XDragGestureRecognizer + * @see com.sun.star.datatransfer.dnd.XDragSource + */ + interface XDragSourceListener extends lang.XEventListener { + /** + * This method is invoked to signify that the Drag and Drop operation is complete. + * @param dsde The {@link DragSourceDropEvent} + */ + dragDropEnd(dsde: DragSourceDropEvent): void; + + /** + * Called as the hotspot enters a platform dependent drop site. + * + * **NOTE:** currently this notification can not be ensured by all implementations. Do not rely on it ! + * @param dsde The {@link DragSourceDragEvent} . + */ + dragEnter(dsde: DragSourceDragEvent): void; + + /** + * Called as the hotspot exits a platform dependent drop site. + * + * **NOTE:** Currently this notification can not be ensured by all implementations. Do not rely on it ! + * @param dse The {@link DragSourceEvent} . + */ + dragExit(dse: DragSourceEvent): void; + + /** + * Called as the hotspot moves over a platform dependent drop site. + * @param dsde The {@link DragSourceEvent} + */ + dragOver(dsde: DragSourceDragEvent): void; + + /** + * Called when the user has modified the drop gesture. + * @param dsde The {@link DragSourceEvent} . + */ + dropActionChanged(dsde: DragSourceDragEvent): void; + } + + /** + * This interface is implemented by a view or window that supports drop operations. + * + * Differently to Java, the association between view and interface is fixed and cannot be changed. Otherwise, the AWT messaging would have to be + * implemented for any window supporting Drag and Drop operations, which would be a performance issue. + */ + interface XDropTarget extends uno.XInterface { + /** + * Add a DropTargetListener. + * + * The listener will be queried for the {@link XAutoscroll} interface to see if it supports autoscrolling. + * @param dtl The listener to add to the notification list. + */ + addDropTargetListener(dtl: XDropTargetListener): void; + + /** + * Determine the actions supported by a drop target. + * @returns The current action or actions supported by this drop target. By default this will include all drag and drop actions. + * @see com.sun.star.datatransfer.dnd.DNDConstants + */ + DefaultActions: number; + + /** + * Determine the actions supported by a drop target. + * @returns The current action or actions supported by this drop target. By default this will include all drag and drop actions. + * @see com.sun.star.datatransfer.dnd.DNDConstants + */ + getDefaultActions(): number; + + /** + * Indicates either a drop target object is active or not. + * @returns A boolean indicating whether or not this drop target object is currently active, that is ready to accept drops. + */ + isActive(): boolean; + + /** + * Remove a drop target listener. + * @param dtl The listener to remove from notification list. + */ + removeDropTargetListener(dtl: XDropTargetListener): void; + + /** + * Sets the drop target object active or inactive. + * @param active A value of `TRUE` sets the drop target object active. A value of `FALSE` sets the drop target object inactive. + */ + setActive(active: boolean): void; + + /** + * Sets the default acceptable actions for this drop target. + * + * This method is a way to reduce the number of Drag and Drop events by blocking events for actions not supported by this target. + * + * By default the listener will receive notifications for all actions. + * @param actions The actions. + * @see com.sun.star.datatransfer.dnd.DNDConstants + */ + setDefaultActions(actions: number): void; + } + + /** + * This interface is implemented by any drop target context object. + * + * A drop target context is created whenever the logical cursor associated with a Drag and Drop operation moves within the visible geometry of a window + * associated with a drop target. + * + * The drop target context provides the mechanism for a potential receiver of a drop operation to both provide the end user with the appropriate drag + * under feedback and effect the subsequent data transfer, if appropriate. + */ + interface XDropTargetDragContext extends uno.XInterface { + /** + * Accept the Drag. + * + * This method should be called from the methods of {@link XDropTargetListener}{@link XDropTargetListener.dragEnter()}{@link + * XDropTargetListener.dragOver()}XDropTargetListener::dragActionChanged() if the implementation wishes to accept the drag operation with the specified + * action. + * @param dragOperation The operation accepted by the target. + * @see DNDConstants + * @see DropTargetDragEvent + */ + acceptDrag(dragOperation: number): void; + + /** + * Reject the drag as a result of examining the available {@link com.sun.star.datatransfer.DataFlavor} types received in the {@link + * com.sun.star.datatransfer.dnd.XDropTargetListener.dragEnter()} method. + */ + rejectDrag(): void; + } + + /** + * This interface is implemented by any drop target context object. + * + * A DropTargetContext is created whenever the logical cursor associated with a Drag and Drop operation moves within the visible geometry of a window + * associated with a DropTarget. + * + * The drop target context provides the mechanism for a potential receiver of a drop operation to provide the end user with the appropriate drag under + * feedback and to effect the subsequent data transfer, if appropriate. + */ + interface XDropTargetDropContext extends uno.XInterface { + /** + * Accept the Drop. + * + * This method should be called from the {@link com.sun.star.datatransfer.dnd.XDropTargetListener.drop()} method if the implementation wishes to accept + * the drop operation with the specified action. + * @param dragOperation The operation accepted by the target. + * @see DNDConstants + * @see DropTargetDragEvent + */ + acceptDrop(dragOperation: number): void; + + /** + * Signals that the drop is completed and if it was successful or not. + * @param success A value of `TRUE` means the drop completed successfully A value of `FALSE` means the drop completed unsuccessfully. + */ + dropComplete(success: boolean): void; + + /** + * Reject the drop as a result of examining the available {@link com.sun.star.datatransfer.DataFlavor} types received in the {@link + * XDropTargetListener.dragEnter()} method. + */ + rejectDrop(): void; + } + + /** + * This interface is the callback interface used by the drop target object to provide notification of Drag and Drop operations that involve the subject + * drop target. + * + * Methods of this interface may be implemented to provide "drag under" visual feedback to the user throughout the Drag and Drop operation. + */ + interface XDropTargetListener extends lang.XEventListener { + /** + * Called when a drag operation has encountered the drop target. + * @param dtdee The {@link DropTargetDragEvent} . + */ + dragEnter(dtdee: DropTargetDragEnterEvent): void; + + /** + * The drag operation has departed the drop target without dropping. + * @param dte The {@link DropTargetEvent} . + */ + dragExit(dte: DropTargetEvent): void; + + /** + * Called when a drag operation is ongoing on the drop target. + * @param dtde The {@link DropTargetEvent} . + */ + dragOver(dtde: DropTargetDragEvent): void; + + /** + * The drag operation has terminated with a drop on this drop target. + * + * **NOTE:** The implementation has to wait until the method {@link XDropTargetDropContext.dropComplete()} is called before releasing the data for the + * drop operation. This should occur before returning from drop in a normal flow of operation. Also, the implementor of {@link XDropTargetListener} + * should not assume the {@link DropTargetDropEvent} to be meaningful after returning from the {@link XDropTargetListener.drop()} method. + * @param dtde The {@link DropTargetDropEvent} . + */ + drop(dtde: DropTargetDropEvent): void; + + /** + * Called when the user has modified the drop gesture. + * @param dtde The {@link DropTargetEvent} . + */ + dropActionChanged(dtde: DropTargetDragEvent): void; + } + + namespace DNDConstants { + const enum Constants { + ACTION_COPY = 1, + ACTION_COPY_OR_MOVE = 3, + ACTION_DEFAULT = -128, + ACTION_LINK = 4, + ACTION_MOVE = 2, + ACTION_NONE = 0, + ACTION_REFERENCE = 4, + } + } + } + } + + namespace deployment { + /** + * the {@link ExtensionManager} service. + * + * The component context entry is ` /singletons/com.sun.star.deployment.ExtensionManager` . + * @since OOo 3.3 + */ + type ExtensionManager = XExtensionManager; + + /** + * indicates that a function call with the given arguments is not supported because the extension was removed. {@link XPackage.isRemoved()} will return + * true on that object. + * @since OOo 3.3 + */ + type ExtensionRemovedException = uno.Exception; + + /** + * Implementations of this service provide the root location of a package for a given Package ID. + * @since OOo 2.3 + */ + type PackageInformationProvider = XPackageInformationProvider; + + /** + * {@link thePackageManagerFactory} denotes the one and only {@link XPackageManagerFactory} object to be used. + * + * The component context entry is ` /singletons/com.sun.star.deployment.thePackageManagerFactory` . + * @deprecated DeprecatedUse XExtensionManager. + * @since OOo 2.0 + */ + type thePackageManagerFactory = XPackageManagerFactory; + + /** + * Implementations of this service provide access to the root element of one or more update information files for a given sets of URLs. + * @since OOo 2.2 + */ + type UpdateInformationProvider = XUpdateInformationProvider; + + /** + * describes unsatisfied dependencies a deployment unit has on its target environment. + * + * This exception is intended to be used with an {@link com.sun.star.task.XInteractionHandler} . + * @since OOo 2.0.4 + */ + interface DependencyException extends uno.Exception { + /** + * a sequence of dependencies represented by XML elements. + * + * The exact nature of those XML elements is deliberately left open, so that new kinds of dependencies can be defined in the future. OOo 2.0.4 does not + * define any kinds of dependencies. Each such XML element should have an attribute whose global name consists of the namespace name + * `http://openoffice.org/extensions/description/2006` and the local part `name` and whose value is a human-readable (English) description of the + * dependency. If an instance of OOo does not know more about a specific kind of dependency, it should display the value of that attribute to the user. + * + * The sequence must not be empty, and none of the elements may be `NULL` . + */ + UnsatisfiedDependencies: SafeArray; + } + + /** + * A {@link DeploymentException} reflects a deployment error. + * @since OOo 2.0 + */ + interface DeploymentException extends uno.Exception { + /** reflects the cause of the error. Commonly an exception. */ + Cause: any; + } + + /** + * describes the fact that deployment unit is about to be installed. + * + * This exception is intended to be used with an {@link com.sun.star.task.XInteractionHandler} . + * @since OOo 2.2 + */ + interface InstallException extends uno.Exception { + /** the display name of the extension, which is to be installed. */ + displayName: string; + } + + /** + * indicates that {@link XPackageRegistry.bindPackage()} was previously called with a different value for the `removed` parameter and that the {@link + * XPackage} object created by that call still exist. + * @since OOo 3.3 + */ + interface InvalidRemovedParameterException extends uno.Exception { + /** + * the {@link XPackage} that was already bound to the provided `url` parameter during {@link XPackageRegistry.bindPackage()} . + * + * Must not be `NULL` . + */ + Extension: XPackage; + + /** + * the value of the `removed` parameter which was used in {@link XPackageRegistry.bindPackage()} to create the currently existing {@link XPackage} + * object. + */ + PreviousValue: boolean; + } + + /** + * A {@link LicenseException} reflects the necessity of someone agreeing to a license. + * @since OOo 2.0.4 + */ + interface LicenseException extends uno.Exception { + /** contains the value of the attribute `/description/registration/simple-license/@accept-by` from the description.xml */ + AcceptBy: string; + + /** + * name of the extension. + * + * The display name of the extension. See {@link XPackage.getDisplayName()} + */ + ExtensionName: string; + + /** contains the text of the license. */ + Text: string; + } + + /** + * The {@link PackageRegistryBackend} service is used to bind a specific type of {@link XPackage} which can be registered or revoked. + * + * All {@link PackageRegistryBackend} objects are related to a {@link XPackageManager} instance. + * @since OOo 2.0 + */ + interface PackageRegistryBackend extends XPackageRegistry { + /** + * Creates a persistent registry. + * @param context context of registry, e.g. user, shared + * @param cacheDirectory cache directory that the registry has to use + * @param readOnly reflects whether writing to cache directory is allowed + */ + createPersistent(context: string, cacheDirectory: string, readOnly: boolean): void; + + /** + * Creates a transient registry. + * @param context context of registry, e.g. user, shared + */ + createTransient(context: string): void; + } + + /** + * A {@link DeploymentException} indicates that the current platform is not supported. + * @since OOo 3.0 + */ + interface PlatformException extends uno.Exception { + /** The package which does not support the current platform. */ + package: XPackage; + } + + /** + * Objects of this type are used as elements of the enumeration returned by {@link XUpdateInformationProvider} . + * @since OOo 2.3 + */ + interface UpdateInformationEntry { + /** the (optional) description for an update information entry extracted from the update feed container */ + Description: string; + + /** the DOM representation of an update information entry */ + UpdateDocument: xml.dom.XElement; + } + + /** + * describes version clashes of a deployment unit. + * + * This exception is intended to be used with an {@link com.sun.star.task.XInteractionHandler} . + * @since OOo 2.1 + */ + interface VersionException extends uno.Exception { + /** + * represents the already installed version of the deployment unit. + * + * Must not be `NULL` . + */ + Deployed: XPackage; + + /** the display name of the extension which is being installed. */ + NewDisplayName: string; + + /** the version of the extension which is being installed. */ + NewVersion: string; + } + + /** + * The {@link XExtensionManager} interface is used to manage extensions in the user, shared and bundled repository. + * @see ExtensionManager + * @since OOo 3.3 + */ + interface XExtensionManager extends lang.XComponent, util.XModifyBroadcaster { + /** + * adds an extension. + * + * The properties argument is currently only used to suppress the license information for shared extensions. + * @param url package URL, must be UCB conform + * @param properties additional properties, for example, that the license is to be suppressed (if supported by the extension) + * @param repository the name of the repository + * @param xAbortChannel abort channel to asynchronously abort the adding process, or null + * @param xCmdEnv command environment for error and progress handling + * @returns object representing the extension. + */ + addExtension(url: string, properties: LibreOffice.SeqEquiv, repository: string, xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): XPackage; + + /** check if all prerequisites for the extension are fulfilled and activates it, if possible. */ + checkPrerequisitesAndEnable(extension: XPackage, xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): number; + + /** + * creates a command channel to be used to asynchronously abort a command. + * @returns abort channel + */ + createAbortChannel(): task.XAbortChannel; + + /** + * disable an extension. + * + * If the extension is not from the user repository then an IllegalArgumentException is thrown. + * @param extension the extension which is to be disabled + * @param xAbortChannel abort channel to asynchronously abort the removing process, or null + * @param xCmdEnv command environment for error and progress handling + */ + disableExtension(extension: XPackage, xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): void; + + /** + * enable an extension. + * + * If the extension is not from the user repository then an IllegalArgumentException is thrown. + * @param extension the extension which is to be enabled. + * @param xAbortChannel abort channel to asynchronously abort the removing process, or null + * @param xCmdEnv command environment for error and progress handling + */ + enableExtension(extension: XPackage, xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): void; + + /** + * returns a sequence containing all installed extensions. + * + * The members of the returned sequence correspond to an extension with a particular extension identifier. The members are also sequences which contain + * as many elements as there are repositories. Those are ordered according to the priority of the repository. That is, the first member is the extension + * from the user repository, the second is from the shared repository and the last is from the bundled repository. + */ + getAllExtensions(xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): SafeArray>; + + /** + * gets an installed extensions. + * @param repository the name of the repository + * @param identifier extension identifier + * @param fileName extension file name + * @param xCmdEnv command environment for error and progress handling + * @returns {@link XPackage} object + */ + getDeployedExtension(repository: string, identifier: string, fileName: string, xCmdEnv: ucb.XCommandEnvironment): XPackage; + + /** + * gets all currently installed extensions, including disabled user extensions. + * @param repository the repository from which the extensions are returned + * @param xAbortChannel abort channel to asynchronously abort the removing process, or null + * @param xCmdEnv command environment for error and progress handling + * @returns all currently installed packages + */ + getDeployedExtensions(repository: string, xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): SafeArray; + + /** + * gets all extensions with the same identifier from all repositories. + * + * The extension at the first position in the returned sequence represents the extension from the user repository. The next element is from the shared + * and the last one is from the bundled repository. If one repository does not contain this extension, then the respective element is a null reference. + */ + getExtensionsWithSameIdentifier(identifier: string, fileName: string, xCmdEnv: ucb.XCommandEnvironment): SafeArray; + + /** + * returns all extensions which are currently not in use because the user did not accept the license. + * + * The function will not return any object for the user repository, because a user extension will not be kept in the user repository if its license is + * declined. Only extensions which are registered at start-up of OOo, that is, shared and bundled extensions, can be returned. + * + * Extensions which allow the license to be suppressed, that is, it does not need to be displayed, and which are installed with the corresponding option, + * are also not returned. + * + * Extensions returned by these functions are not returned by {@link XExtensionManager.getDeployedExtension()}{@link + * XExtensionManager.getDeployedExtensions()}{@link XExtensionManager.getAllExtensions()}{@link XExtensionManager.getExtensionsWithSameIdentifier()} + */ + getExtensionsWithUnacceptedLicenses(repository: string, xCmdEnv: ucb.XCommandEnvironment): SafeArray; + + /** + * gets the supported XPackageTypeInfos. + * @returns supported XPackageTypeInfos. + */ + getSupportedPackageTypes(): SafeArray; + + /** determines if the current user has write access to the extensions folder of the repository. */ + isReadOnlyRepository(repository: string): boolean; + + /** + * Expert feature: erases the underlying registry cache and reinstalls all previously added extensions. Please keep in mind that all registration status + * get lost. + * + * Please use this in case of suspected cache inconsistencies only. + * @param force set to true when called during soffice bootstrap after cleaning old extension cache + * @param repository the name of the repository + * @param xAbortChannel abort channel to asynchronously abort the adding process + * @param xCmdEnv command environment for error and progress handling + */ + reinstallDeployedExtensions(force: boolean, repository: string, xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): void; + + /** + * removes an extension. + * @param identifier package identifier + * @param fileName package file name + * @param repository the name of the repository + * @param xAbortChannel abort channel to asynchronously abort the removing process, or null + * @param xCmdEnv command environment for error and progress handling + */ + removeExtension(identifier: string, fileName: string, repository: string, xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): void; + + /** + * gets the supported XPackageTypeInfos. + * @returns supported XPackageTypeInfos. + */ + readonly SupportedPackageTypes: SafeArray; + + /** + * synchronizes the extension database with the contents of the extensions folder of shared and bundled extensions. + * + * Added extensions will be added to the database and removed extensions will be removed from the database. The active extensions are determined. That + * is, shared or bundled extensions are not necessaryly registered ( {@link XPackage.registerPackage()} ). + * @returns If true - then at least one extension was removed or added. Otherwise nothing was changed. + */ + synchronize(xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): boolean; + } + + /** + * Objects of this interface reflect a bound package and are issued by a {@link PackageRegistryBackend} . + * @since OOo 2.0 + */ + interface XPackage extends lang.XComponent, util.XModifyBroadcaster { + /** + * checks if the dependencies for this package are still satisfied + * + * After updating the OpenOffice.org, some dependencies for packages might no longer be satisfied. + * @param xCmdEnv command environment for error handling and other interaction. + * @returns `TRUE` - all dependencies are satisfied `FALSE` - at least one dependency failed. + * @since OOo 3.2 + */ + checkDependencies(xCmdEnv: ucb.XCommandEnvironment): boolean; + + /** + * checks if the package can be installed. + * + * Only if the return value is `TRUE` the package is allowed to be installed. In case of `FALSE` or in case of an exception, the package must be removed + * completely. After return of this function no code from the extension may be used anymore, so that the extension can be safely removed from the hard + * disk. + * @param xAbortChannel abort channel to asynchronously abort the registration process, or `NULL` + * @param xCmdEnv command environment for error handling and other interaction. + * @param alreadyInstalled indicates that an extension with the same identifier is already installed. + * @returns `NULL` - all prerequisites are met. Otherwise, a value from {@link Prerequisites} indicating what prerequisites are missing. + */ + checkPrerequisites(xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment, alreadyInstalled: boolean): number; + + /** + * creates a command channel to be used to asynchronously abort a command. + * @returns abort channel + */ + createAbortChannel(): task.XAbortChannel; + + /** + * returns a description string to describe the package. + * @returns description + */ + readonly Description: string; + + /** + * returns the display name of the package, e.g. for graphical user interfaces (GUI). + * @returns display name of the package + */ + readonly DisplayName: string; + + /** + * exports package to given destination URL. + * @param destFolderURL package destination folder URL, must be UCB conforming + * @param newTitle new package name + * @param nameClashAction one of {@link com.sun.star.ucb.NameClash} + * @param xCmdEnv command environment for error and progress handling + */ + exportTo(destFolderURL: string, newTitle: string, nameClashAction: number, xCmdEnv: ucb.XCommandEnvironment): void; + + /** + * Gets packages of the bundle. + * + * If {@link isRemoved()} returns `TRUE` then getBundle may return an empty sequence in case the object is not registered. + * @param xAbortChannel abort channel to asynchronously abort the registration process, or `NULL` + * @param xCmdEnv command environment for error and progress handling + * @returns set of packages enclosed in this package + */ + getBundle(xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): SafeArray; + + /** + * returns a description string to describe the package. + * @returns description + */ + getDescription(): string; + + /** + * returns the display name of the package, e.g. for graphical user interfaces (GUI). + * @returns display name of the package + */ + getDisplayName(): string; + + /** + * returns an icon for a package. + * @param highContrast return high contrast icon + * @returns the icon which should be used to represent the table in the database application window, or `NULL` if the default icon should be used. + */ + getIcon(highContrast: boolean): graphic.XGraphic; + + /** + * returns the unique extension identifier. + * @returns the extension identifier (a `"org.openoffice.legacy."` one if the extension does not explicitly specify one), or an empty `Optional` if this pack + */ + getIdentifier(): com.sun.star.beans.Optional; + + /** + * returns a string containing the license text. + * @returns license + */ + getLicenseText(): string; + + /** + * returns the file name of the package. + * @returns file name of the package + */ + getName(): string; + + /** + * returns the {@link XPackageTypeInfo} , e.g. media-type etc. + * @returns media type of package + */ + getPackageType(): XPackageTypeInfo; + + /** + * returns the publisher info for the package, the strings might be empty, if there is no publisher + * + * {@link com.sun.star.beans.StringPair.First} represents the publisher name and {@link com.sun.star.beans.StringPair.Second} represents the URL to the + * publisher. + */ + getPublisherInfo(): beans.StringPair; + + /** + * return a URL to a directory which contains the registration data. + * + * This data may be created when calling {@link XPackage.registerPackage()} . If this is the case is indicated by + * com::sun::star::beans::Optional::IsPresent of the return value. If registration data are created during registration, but the package is currently not + * registered, for example after calling {@link XPackage.revokePackage()} , then com::sun::star::beans::Optional::IsPresent is `TRUE` and the + * com::sun::star::beans::Optional::Value may be an empty string. + */ + getRegistrationDataURL(): com.sun.star.beans.Optional; + + /** returns the name of the repository where this object comes from. */ + getRepositoryName(): string; + + /** + * returns a sequence of update information URLs. + * + * The sequence may be empty in case no update information is available. If the sequence contains more than one URL, the extra URLs must mirror the + * information available at the first URL. + * @returns update information URLs + */ + getUpdateInformationURLs(): SafeArray; + + /** + * returns the location of the package. + * @returns location of package + */ + getURL(): string; + + /** + * returns the textual version representation of the package. + * + * A textual version representation is a finite string following the BNF ; version ::= [element ("." element)*] ; element ::= ("0" | "1" | "2" | "3" | + * "4" | "5" | "6" | "7" | "8" | "9")+ + * @returns the textual version representation + */ + getVersion(): string; + + /** + * returns the unique extension identifier. + * @returns the extension identifier (a `"org.openoffice.legacy."` one if the extension does not explicitly specify one), or an empty `Optional` if this pack + */ + readonly Identifier: com.sun.star.beans.Optional; + + /** + * reflects whether this package is a bundle of one or more packages, e.g. a zip (legacy) package file or a document hosting script packages. + * @returns `TRUE` if this package is a package bundle, `FALSE` otherwise + */ + isBundle(): boolean; + + /** + * determines whether the package is currently registered, i.e. whether it is active. + * @param xAbortChannel abort channel to asynchronously abort the registration process, or `NULL` + * @param xCmdEnv command environment for error and progress handling + * @returns status whether the package is registered ( `TRUE` , `FALSE` ) or the status is ambiguous. Additionally, a registration status may not apply, e.g. + */ + isRegistered(xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): com.sun.star.beans.Optional>; + + /** + * indicates if this object represents a removed extension or extension item. This is the case when it was created by providing `TRUE` for the `removed` + * parameter in the function {@link XPackageRegistry.bindPackage()} . + */ + isRemoved(): boolean; + + /** + * returns a string containing the license text. + * @returns license + */ + readonly LicenseText: string; + + /** + * returns the file name of the package. + * @returns file name of the package + */ + readonly Name: string; + + /** + * returns the {@link XPackageTypeInfo} , e.g. media-type etc. + * @returns media type of package + */ + readonly PackageType: XPackageTypeInfo; + + /** + * returns the publisher info for the package, the strings might be empty, if there is no publisher + * + * {@link com.sun.star.beans.StringPair.First} represents the publisher name and {@link com.sun.star.beans.StringPair.Second} represents the URL to the + * publisher. + */ + readonly PublisherInfo: beans.StringPair; + + /** + * registers this {@link XPackage} . + * + * NEVER call this directly. This is done by the extension manager if necessary. + * @param startup indicates that registration is adapted to the particular startup scenario. That is, it is set to `TRUE` , when called from {@link XExtens + * @param xAbortChannel abort channel to asynchronously abort the registration process, or `NULL` + * @param xCmdEnv command environment for error and progress handling + */ + registerPackage(startup: boolean, xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): void; + + /** + * return a URL to a directory which contains the registration data. + * + * This data may be created when calling {@link XPackage.registerPackage()} . If this is the case is indicated by + * com::sun::star::beans::Optional::IsPresent of the return value. If registration data are created during registration, but the package is currently not + * registered, for example after calling {@link XPackage.revokePackage()} , then com::sun::star::beans::Optional::IsPresent is `TRUE` and the + * com::sun::star::beans::Optional::Value may be an empty string. + */ + readonly RegistrationDataURL: com.sun.star.beans.Optional; + + /** returns the name of the repository where this object comes from. */ + readonly RepositoryName: string; + + /** + * revokes this {@link XPackage} . + * + * NEVER call this directly. This is done by the extension manager if necessary. + * @param startup indicates that registration is adapted to the particular startup scenario. That is, it is set to `TRUE` , when called from {@link XExtens + * @param xAbortChannel abort channel to asynchronously abort the registration process, or `NULL` + * @param xCmdEnv command environment for error and progress handling + */ + revokePackage(startup: boolean, xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): void; + + /** + * returns a sequence of update information URLs. + * + * The sequence may be empty in case no update information is available. If the sequence contains more than one URL, the extra URLs must mirror the + * information available at the first URL. + * @returns update information URLs + */ + readonly UpdateInformationURLs: SafeArray; + + /** + * returns the location of the package. + * @returns location of package + */ + readonly URL: string; + + /** + * returns the textual version representation of the package. + * + * A textual version representation is a finite string following the BNF ; version ::= [element ("." element)*] ; element ::= ("0" | "1" | "2" | "3" | + * "4" | "5" | "6" | "7" | "8" | "9")+ + * @returns the textual version representation + */ + readonly Version: string; + } + + /** + * Objects implementing this interface provide an URL to the root of an installed package. + * @since OOo 2.3 + */ + interface XPackageInformationProvider { + /** returns a list of all installed extension with their version. */ + readonly ExtensionList: SafeArray>; + + /** returns a list of all installed extension with their version. */ + getExtensionList(): SafeArray>; + + /** + * get Package information for a specific extension. + * @param extensionId the unique identifier of an extension. The service looks for an installed package with the given id and returns the URL to the root o + */ + getPackageLocation(extensionId: string): string; + + /** + * check if there are updates available for an extension. + * @param extensionId the unique identifier of an extension. When the extensionId is empty, the service looks checks all installed extensions for a newer v + */ + isUpdateAvailable(extensionId: string): SafeArray>; + } + + /** + * The {@link XPackageManager} interface is used to add or remove packages to a specific repository. This interface represents a particular repository. + * Packages are deployable files, e.g. scripts or UNO components. + * + * Adding an UNO package means that a copy of the package is stored in the repository. + * + * Removing an UNO package means that the previously added package is removed from the repository. + * + * All interface methods do neither register nor revoke an extension. This happens exclusively by {@link XExtensionManager} . + * + * Objects of this interface are created using the {@link XPackageManagerFactory} service resp. the singleton ` + * /singletons/com.sun.star.deployment.thePackageManagerFactory` . + * @deprecated DeprecatedUse XExtensionManager. + * @see thePackageManagerFactory + * @since OOo 2.0 + */ + interface XPackageManager extends lang.XComponent, util.XModifyBroadcaster { + /** + * adds an UNO package. + * + * The properties argument is currently only used to suppress the license information for shared extensions. + * @param url package URL, must be UCB conform + * @param properties additional properties, for example, that the license is to be suppressed (if supported by the extension) + * @param mediaType media-type of package, empty string if to be detected + * @param xAbortChannel abort channel to asynchronously abort the adding process, or null + * @param xCmdEnv command environment for error and progress handling + * @returns {@link XPackage} handle + */ + addPackage(url: string, properties: LibreOffice.SeqEquiv, mediaType: string, xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): XPackage; + + /** + * checks if the extension can be used. + * + * The extension must be managed by this package manager, that is, it must be recorded in its database. The package manager calls {@link + * XPackage.checkPrerequisites} and updates its data base with the result. The result, which is from {@link Prerequisites} will be returned. + */ + checkPrerequisites(extension: XPackage, xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): number; + + /** + * returns the underlying deployment context, that is, the name of the repository. + * @returns underlying deployment context + */ + readonly Context: string; + + /** + * creates a command channel to be used to asynchronously abort a command. + * @returns abort channel + */ + createAbortChannel(): task.XAbortChannel; + + /** + * returns the underlying deployment context, that is, the name of the repository. + * @returns underlying deployment context + */ + getContext(): string; + + /** + * gets a deployed package. + * @param identifier package identifier + * @param fileName package file name + * @param xCmdEnv command environment for error and progress handling + * @returns {@link XPackage} handle + */ + getDeployedPackage(identifier: string, fileName: string, xCmdEnv: ucb.XCommandEnvironment): XPackage; + + /** + * gets all currently deployed packages. + * @param xAbortChannel abort channel to asynchronously abort the removing process, or null + * @param xCmdEnv command environment for error and progress handling + * @returns all currently deployed packages + */ + getDeployedPackages(xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): SafeArray; + + /** + * returns all extensions which are currently not in use because the user did not accept the license. + * + * The function will not return any object for the user repository, because a user extension will not be kept in the user repository if its license is + * declined. Only extensions which are registered at start-up of OOo, that is, shared and bundled extensions, can be returned. + * + * Extensions which allow the license to be suppressed, that is, it does not need to be displayed, and which are installed with the corresponding option, + * are also not returned. + */ + getExtensionsWithUnacceptedLicenses(xCmdEnv: ucb.XCommandEnvironment): SafeArray; + + /** + * gets the supported XPackageTypeInfos. + * @returns supported XPackageTypeInfos. + */ + getSupportedPackageTypes(): SafeArray; + + /** + * adds an extension. + * + * This copies the extension. If it was from the same repository, which is represented by this {@link XPackageManager} interface, then nothing happens. + * @param extension + * @param xAbortChannel abort channel to asynchronously abort the adding process, or null + * @param xCmdEnv command environment for error and progress handling + * @returns {@link XPackage} handle + */ + importExtension(extension: XPackage, xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): XPackage; + + /** + * indicates that this implementation cannot be used for tasks which require write access to the location where the extensions are installed. + * + * Normally one would call a method and handle the exception if writing failed. However, a GUI interface may need to know beforehand if writing is + * allowed. For example, the Extension Manager dialog needs to enable / disable the Add button depending if the user has write permission. Only the + * {@link XPackageManager} implementation knows the location of the installed extensions. Therefore it is not possible to check "externally" for write + * permission. + */ + isReadOnly(): boolean; + + /** + * Expert feature: erases the underlying registry cache and reinstalls all previously added packages. Please keep in mind that all registration status + * get lost. + * + * Please use this in case of suspected cache inconsistencies only. + * @param force set to true when called during soffice bootstrap after cleaning old extension cache + * @param xAbortChannel abort channel to asynchronously abort the adding process + * @param xCmdEnv command environment for error and progress handling + */ + reinstallDeployedPackages(force: boolean, xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): void; + + /** + * removes an UNO package. + * @param identifier package identifier + * @param fileName package file name + * @param xAbortChannel abort channel to asynchronously abort the removing process, or null + * @param xCmdEnv command environment for error and progress handling + */ + removePackage(identifier: string, fileName: string, xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): void; + + /** + * gets the supported XPackageTypeInfos. + * @returns supported XPackageTypeInfos. + */ + readonly SupportedPackageTypes: SafeArray; + + /** + * synchronizes the extension database with the contents of the extensions folder. + * + * Added extensions will be added to the database and removed extensions will be removed from the database. + * @param xAbortChannel abort channel to asynchronously abort the adding process + * @param xCmdEnv command environment for error and progress handling + * @returns If true - then at least one extension was removed or added. Otherwise nothing was changed. + */ + synchronize(xAbortChannel: task.XAbortChannel, xCmdEnv: ucb.XCommandEnvironment): boolean; + } + + /** + * The {@link XPackageManagerFactory} interface is used to obtain {@link XPackageManager} instances. + * + * You have to use the singleton ` /singletons/com.sun.star.deployment.thePackageManagerFactory` exclusively. + * @deprecated DeprecatedUse XExtensionManager. + * @since OOo 2.0 + */ + interface XPackageManagerFactory { + /** + * Method to create (or reusing and already existing) {@link XPackageManager} object to add or remove UNO packages persistently. + * + * Packages for context strings `"user"` and `"shared"` will be registered and revoked persistently. + * + * Context strings other than `"user"` , `"shared"` will last in an {@link com.sun.star.lang.IllegalArgumentException} . + * @param context context string, e.g. `"user"` => persistent storage and registration into installation's user layer`"shared"` => persistent storage and r + * @returns {@link XPackageManager} object + * @throws com::sun::star::lang::IllegalArgumentException in case of an invalid context + */ + getPackageManager(context: string): XPackageManager; + } + + /** + * Interface to bind an UNO package. + * @since OOo 2.0 + */ + interface XPackageRegistry { + /** + * binds a package URL to a {@link XPackage} handle. The returned UNO package handle ought to late-initialize itself, thus the process of binding must + * not be an expensive operation, because it is not abortable. + * + * Calling the function several time with the same parameters must result in returning the same object. + * + * The file or folder at the location where url points to may not exist or it was replaced. This can happen, for example, when a bundled extension was + * removed by the setup and a user later starts OOo. Then the user data may still contain all registration data of that extension, but the actual + * extension files do not exist anymore. The registration data must then be cleaned of all the remains of that extension. To do that one creates an + * {@link XPackage} object on behalf of that extension and calls XPackage::revokePakage(). The parameter `removed` indicates this case. The returned + * object may not rely on the file or folder to which refers `url` . Instead it must use previously saved data to successfully carry out the revocation + * of this object ( {@link XPackage.revokePackage()} ). + * + * The implementation must ensure that there is only one instance of {@link XPackage} for the same `url` at any time. Therefore calling {@link + * bindPackage()} again with the same `url` but different `mediaType` (the exception is, if previously an empty string was provided to cause the + * determination of the media type) or `removed` parameters will cause an exception. An {@link com.sun.star.lang.IllegalArgumentException} will be thrown + * in case of a different `mediaType` parameter and a {@link InvalidRemovedParameterException} is thrown if the `removed` parameter is different. + * + * The `identifier` parameter must be provided when `removed` = true. If not, then an {@link com.sun.star.lang.IllegalArgumentException} will be thrown. + * @param url package URL, must be UCB conform + * @param mediaType media type of package, empty string if to be detected + * @param removed + * @param identifier the identifier of the extension + * @param xCmdEnv command environment for error and progress handling + * @returns {@link XPackage} handle + */ + bindPackage(url: string, mediaType: string, removed: boolean, identifier: string, xCmdEnv: ucb.XCommandEnvironment): XPackage; + + /** + * gets the supported XPackageTypeInfos. + * @returns supported XPackageTypeInfos. + */ + getSupportedPackageTypes(): SafeArray; + packageRemoved(url: string, mediaType: string): void; + + /** + * gets the supported XPackageTypeInfos. + * @returns supported XPackageTypeInfos. + */ + readonly SupportedPackageTypes: SafeArray; + } + + /** + * Objects of this interface provide information about a package's type. + * @since OOo 2.0 + */ + interface XPackageTypeInfo { + /** + * returns a description string to describe a package type. + * @returns description + */ + readonly Description: string; + + /** + * returns a file filter string for the file picker user interface. Both, the short description string and file filter string will be passed to {@link + * com.sun.star.ui.dialogs.XFilterManager.appendFilter()} . + * @returns file filter string + */ + readonly FileFilter: string; + + /** + * returns a description string to describe a package type. + * @returns description + */ + getDescription(): string; + + /** + * returns a file filter string for the file picker user interface. Both, the short description string and file filter string will be passed to {@link + * com.sun.star.ui.dialogs.XFilterManager.appendFilter()} . + * @returns file filter string + */ + getFileFilter(): string; + + /** + * returns an icon for a package. + * @param highContrast return high contrast icon + * @param smallIcon return a small icon (e.g. 16x16 pixel), else return a big one (e.g. 26x26 pixel) + * @returns currently an unsigned short (resource id for deploymentgui resource file), `VOID` any if none is available + */ + getIcon(highContrast: boolean, smallIcon: boolean): any; + + /** + * returns the media type of a package, e.g. `application/vnd.sun.star.basic-script` . + * @returns media type of package + */ + getMediaType(): string; + + /** + * returns a short description string to describe a package type (one line only). + * @returns description + */ + getShortDescription(): string; + + /** + * returns the media type of a package, e.g. `application/vnd.sun.star.basic-script` . + * @returns media type of package + */ + readonly MediaType: string; + + /** + * returns a short description string to describe a package type (one line only). + * @returns description + */ + readonly ShortDescription: string; + } + + /** + * Objects implementing this interface provide access to the xml root of one or more update information files for a given set of URLs. + * @since OOo 2.2 + */ + interface XUpdateInformationProvider { + /** interrupts a getUpdateInformation call and let's it return immediately. */ + cancel(): void; + + /** + * get update information for a specific extension or all available information from a repository. + * @param repositories a repository and its mirrors. + * @param extensionId the unique identifier of an extension. If it is not empty and the update document is an atom feed, only items whose "term" attribute + */ + getUpdateInformation(repositories: LibreOffice.SeqEquiv, extensionId: string): SafeArray; + + /** + * get update information for a specific extension or all available information from a repository. + * @param repositories a repository and its mirrors. + * @param extensionId the unique identifier of an extension. If it is not empty and the update document is an atom feed, only items whose "term" attribute + * @returns an enumeration of {@link UpdateInformationEntry} . + */ + getUpdateInformationEnumeration(repositories: LibreOffice.SeqEquiv, extensionId: string): container.XEnumeration; + + /** + * Sets an interaction handler to be used for further operations. + * + * A default interaction handler is available as service {@link com.sun.star.task.InteractionHandler} . The documentation of this service also contains + * further information about the interaction handler concept. + * @param handler The interaction handler to be set + * @see com.sun.star.task.InteractionHandler + */ + setInteractionHandler(handler: task.XInteractionHandler): void; + } + + namespace Prerequisites { + const enum Constants { + DEPENDENCIES = 2, + LICENSE = 4, + PLATFORM = 1, + } + } + + namespace test { + type SmoketestCommandEnvironment = ucb.XCommandEnvironment; + } + + namespace ui { + /** + * The {@link LicenseDialog} is used to display a license text. + * @since OOo 2.0.4 + */ + interface LicenseDialog extends com.sun.star.ui.dialogs.XExecutableDialog { + /** + * Create a GUI using the specific parent window and focus on the given context. + * @param xParent parent window + * @param extensionName the display name of the extension + * @param licenseText text to be displayed + */ + create(xParent: awt.XWindow, extensionName: string, licenseText: string): void; + } + + /** + * The {@link PackageManagerDialog} is used to visually manage installed packages of the user and shared installation as well as currently open + * documents. + * @since OOo 2.0 + */ + interface PackageManagerDialog extends com.sun.star.ui.dialogs.XAsynchronousExecutableDialog { + /** + * Create a GUI using the specific parent window and focus on the given context. + * @param xParent parent window + * @param focussedContext context to be focused + */ + create(xParent: awt.XWindow, focussedContext: string): void; + + /** + * Create a GUI and pass the URL of the extension which shall be installed right away. This constructor is intended for the case when unopkg is run as + * result of clicking an extension in a file browser, etc. The extensions will always be installed for the current user. + * @param extensionURL URL of extension + */ + createAndInstall(extensionURL: string): void; + + /** Create a default GUI. */ + createDefault(): void; + } + + /** + * The {@link UpdateRequiredDialog} is used to show a list of extensions not compatible with this office version. + * @since OOo 3.2 + */ + interface UpdateRequiredDialog extends com.sun.star.ui.dialogs.XExecutableDialog { + /** Create a GUI using the specific parent window and focus on the given context. */ + create(): void; + } + } + } + + namespace document { + /** + * Is used for interaction handle to query user decision in case the document being saved was already stored by another user during the editing. + * @since OOo 3.1 + */ + type ChangedByOthersRequest = uno.Exception; + + /** interface to maintain a list of document revisions */ + type DocumentRevisionListPersistence = XDocumentRevisionListPersistence; + + /** + * is raised when an operation is attemption at an {@link XUndoManager} which requires a non-empty stack of undo actions, and this requirement is not + * fulfilled. + * @since OOo 3.4 + */ + type EmptyUndoStackException = util.InvalidStateException; + + /** + * is a collection of all events supported by a document or content of a document + * + * Such {@link Events} will be broadcasted by a {@link XEventBroadcaster} to any {@link XEventListener} packed as EventObjects. + */ + type Events = container.XNameReplace; + + /** + * describes a class of service which will be used for deep {@link TypeDetection} in a generic way + * + * Due to the registered types, flat {@link TypeDetection} is already possible, i.e. the assignment of types (e.g. to a URL) only on the basis of + * configuration data. If, however, you imagine special cases (e.g. modifying the file extension of a Writer file from .sdw to .doc), it quickly becomes + * clear that you cannot always get a correct result with flat detection. To be certain to get correct results, you need deep detection, i.e. the file + * itself has to be examined. And that is exactly the function of DetectServices. They get all the information collected so far on a document and then + * decide which type to assign it to. In the new modular model, such a detector is meant as UNO service which registers itself in the office and is + * requested by the generic type detection if necessary. ; Therefore you need two pieces of information: The **ServiceName** - This must be a valid UNO + * service name. It is also an entry in the corresponding configuration list. ; Example: "com.company.devision.DetectService" ; Note that this really + * means the implementation name of the service. Because it's not possible otherwise to distinguish between more than one registered detect services in + * same office installation! But it's possible for the generic type detection to create an UNO service by his implementation name too.A list of **Types** + * able to be recognized by this service - You can also implement and register detectors for groups of types. See service {@link TypeDetection} and his + * configuration for further information. + * @see TypeDetection + */ + type ExtendedTypeDetection = XExtendedFilterDetection; + + type FilterAdapter = XFilterAdapter; + + /** @since LibreOffice 4.1 */ + type FilterConfigRefresh = util.XRefreshable; + + /** @since LibreOffice 4.1 */ + type IndexedPropertyValues = container.XIndexContainer; + + /** + * This service gives access to a collection of names that are child links of the parent object that supplied this service. + * + * The {@link com.sun.star.container.XNameAccess} returns elements of {@link com.sun.star.beans.XPropertySet} that implement the service {@link + * LinkTarget} . + */ + type LinkTargets = container.XNameAccess; + + /** + * Is used for interaction handle to query user decision regarding storing to a location where no lock file can be created. + * @since OOo 3.0 + */ + type LockFileIgnoreRequest = io.IOException; + + /** @since LibreOffice 4.1 */ + type NamedPropertyValues = container.XNameContainer; + + /** + * registers embedded server for StarOffice documents + * + * This service is only used to register embedded server support for StarOffice documents. + * @since OOo 1.1.2 + */ + type OleEmbeddedServerRegistration = uno.XInterface; + + /** allows to import document properties from OOXML format */ + type OOXMLDocumentPropertiesImporter = XOOXMLDocumentPropertiesImporter; + + /** This service is for a {@link PDFDialog} */ + type PDFDialog = ui.dialogs.FilterOptionsDialog; + + /** + * is thrown when an operation is attempted at an {@link XUndoManager} which requires all undo contexts to be closed, but this requirement is not + * fulfilled. + * @since OOo 3.4 + */ + type UndoContextNotClosedException = util.InvalidStateException; + + /** + * Filter for importing Basic macros from the OASIS Open Office file format. + * + * The {@link XImporter.setTargetDocument()} method must be called in order to provide the import component with the target document to which the data + * should be imported. The {@link com.sun.star.xml.sax.XDocumentHandler} interface is used to stream the XML data into the filter. + * @since OOo 2.0 + */ + type XMLOasisBasicImporter = XXMLOasisBasicImporter; + + /** + * should be used for interaction to handle states of ambiguous filter detection + * + * This exception indicates, that generic filter detection can't decide which of two filters is the right one. In this case an interaction will be made. + * Given URL can be used to decide between given two filters. Decision can be made e.g. by a dialog, on which the user must select one of these filters. + * A possible continuation of type {@link XInteractionFilterSelect} transport this decision back to source of started interaction. + * @see XInteractionFilterSelect + */ + interface AmbigousFilterRequest extends uno.Exception { + /** transport the real detected filter, which stands in conflict to the pre selected one */ + DetectedFilter: string; + + /** transport the preselected filter */ + SelectedFilter: string; + + /** transport URL which couldn't be detected right */ + URL: string; + } + + /** + * Is used for interaction handle in case package is broken. + * @since OOo 1.1.2 + */ + interface BrokenPackageRequest extends uno.Exception { + /** The name of the document that is broken */ + aName: string; + } + + /** specifies a CMIS property. */ + interface CmisProperty { + /** specifies the possible choices of the values. */ + Choices: any; + + /** unique ID of the Cmis property */ + Id: string; + + /** specifies if the property has multiple value */ + MultiValued: boolean; + + /** specifies the display name of the CMIS property. */ + Name: string; + + /** specifies if the property value can be freely set or is restricted from a list of choices. */ + OpenChoice: boolean; + + /** specifies if the property is required and can not be empty. */ + Required: boolean; + + /** type of the property */ + Type: string; + + /** specifies if the property is updatable. */ + Updatable: boolean; + + /** specifies value of the property */ + Value: any; + } + + /** specifies a CMIS document version. */ + interface CmisVersion { + /** contains the author that created the version. */ + Author: string; + + /** contains the comment the author has left. */ + Comment: string; + + /** unique ID of the Cmis version */ + Id: string; + + /** specifies the time when the revision was created. */ + TimeStamp: util.DateTime; + } + + /** + * This exception is thrown in case the global filter configuration does not exists or contains corrupted data. + * @since OOo 2.0 + */ + interface CorruptedFilterConfigurationException extends uno.RuntimeException { + /** Instead of the message part of an exception, this value describe the type of corruption more in detail. */ + Details: string; + } + + /** + * describes an event happening in an {@link OfficeDocument} + * + * The {@link com.sun.star.lang.EventObject.Source} member of the base type refers to the document which broadcasts the event. + * + * This type is the successor of the {@link EventObject} type, which should not be used anymore. + * @see XDocumentEventBroadcaster + * @since OOo 3.1 + */ + interface DocumentEvent extends lang.EventObject { + /** + * specifies the name of the event. + * + * It's the responsibility of the component supporting the {@link XDocumentEventBroadcaster} interface to specify which events it supports. + */ + EventName: string; + + /** + * contains supplemental information about the event which is being notified + * + * The semantics of this additional information needs to be specified by the broadcaster of the event. + */ + Supplement: any; + + /** + * denotes the view respectively controller which the event applies to. + * + * Might be `NULL` if the event is not related to a concrete view of the document. + */ + ViewController: frame.XController2; + } + + /** + * provides document-specific information such as the author, creation date, and user-defined fields. + * + * This service replaces the deprecated DocumentInfo and StandaloneDocumentInfo services. + * @see XDocumentProperties + * @see XDocumentPropertiesSupplier + * @since OOo 3.0 + */ + interface DocumentProperties extends XDocumentProperties { + /** constructs default-initialized instance */ + create(): void; + } + + /** + * specifies an event binding for a document or a document content + * @see Events + * @see XEventsSupplier + */ + interface EventDescriptor { + /** + * specifies the type of the event handler + * + * Usually this is one of the following: "None""StarBasic""JavaScript""Presentation" This list is extensible. + */ + EventType: string; + + /** specifies the script source code */ + Script: string; + } + + /** + * is thrown on document and document content events + * @deprecated Deprecated + * @see XEventListener + * @see XEventBroadcaster + * @see DocumentEvent + */ + interface EventObject extends lang.EventObject { + /** + * specifies the name of the occurred event + * + * For a list of possible event names see {@link Events} . + */ + EventName: string; + } + + /** + * filter for exports + * + * Such filters can be used for exporting a content. Of course it's possible to combine it with the service {@link ImportFilter} if import functionality + * should be available at same implementation too. + * @see ImportFilter + */ + interface ExportFilter extends XExporter, XFilter, lang.XInitialization, container.XNamed { } + + /** + * factory to create extended type detection components. + * + * This factory implements read/write access on the underlying configuration set. and further a validate and flush mechanism for more performance and a + * special query mode can be used here too. + * @since OOo 1.1.2 + */ + interface ExtendedTypeDetectionFactory extends lang.XMultiServiceFactory, container.XNameAccess, container.XNameContainer, container.XContainerQuery, util.XFlushable { } + + /** + * factory to create filter components. + * + * After a generic {@link TypeDetection} an internal type name will be known. Further a generic {@link com.sun.star.frame.FrameLoader} can use this + * information, to search a suitable filter (may the default filter) at this factory and use it for loading the document into a specified frame. + * + * This factory implements read/write access on the underlying configuration set. and further a validate and flush mechanism for more performance and a + * special query mode can be used here too. + */ + interface FilterFactory extends lang.XMultiServiceFactory, container.XNameAccess, container.XNameContainer, container.XContainerQuery, util.XFlushable { } + + /** + * Is used for interaction handle to get filter options. + * @since OOo 1.1.2 + */ + interface FilterOptionsRequest extends uno.Exception { + /** The model of the document that should be provided to filters that supports {@link XExporter} interface. */ + rModel: frame.XModel; + + /** The Media-descriptor of the document */ + rProperties: SafeArray; + } + + /** @since LibreOffice 4.1 */ + interface GraphicObjectResolver extends XGraphicObjectResolver { + createWithStorage(Storage: embed.XStorage): void; + } + + /** + * describes properties that control the formatting of headers and footers for documents that do not allow individual settings for individual parts like + * pages or slides. + */ + interface HeaderFooterSettings extends beans.XPropertySet { + /** enables or disables the printing of the date in the header or footer */ + IsPrintDate: boolean; + + /** enables or disables the printing of the page name in the header or footer */ + IsPrintPageName: boolean; + + /** enables or disables the printing of the current time in the header or footer */ + IsPrintTime: boolean; + } + + /** + * filter for imports + * + * Such filters can be used for importing a content. Of course it's possible to combine it with the service {@link ExportFilter} if export functionality + * should be available at same implementation too. + * @see ExportFilter + */ + interface ImportFilter extends XImporter, XFilter, lang.XInitialization, container.XNamed { } + + /** This service is implemented by objects inside a document object model that can be the target of a link inside a document */ + interface LinkTarget extends beans.XPropertySet, XLinkTargetSupplier { + /** contains a human readable name for this object that could be displayed in a user interface. */ + LinkDisplayName: string; + } + + /** + * Is used for interaction handle to query user decision regarding locked document. + * @since OOo 3.0 + */ + interface LockedDocumentRequest extends uno.Exception { + /** The URL of the locked document. */ + DocumentURL: string; + + /** The user information of the locked document. */ + UserInfo: string; + } + + /** + * Is used for interaction handle to query user decision regarding locked document on saving. + * @since OOo 3.1 + */ + interface LockedOnSavingRequest extends uno.Exception { + /** The URL of the locked document. */ + DocumentURL: string; + + /** The user information of the locked document. */ + UserInfo: string; + } + + /** + * describes properties of a document, regarding the relationship between the loaded document and the resource the document is loaded from / stored to. + * + * This service may be represented by a {@link com.sun.star.beans.PropertyValue} []. Such descriptors will be passed to different functions, included + * into possible load/save processes. Every member of such process can use this descriptor and may change it if to actualize the information about the + * document. So this descriptor should be used as an in/out parameter. + * + * Note: ; It's not allowed to hold member of this descriptor by references longer than they will be used (especially a possible stream). It's allowed + * to use it directly or by copying it only. + * @see com.sun.star.beans.PropertyValue + */ + interface MediaDescriptor { + /** May be set by filters or detection services if user has chosen to abort loading/saving, e.g. while entering a password. */ + Aborted: boolean; + + /** + * document is a template + * + * Loading a component of type "template" creates a new untitled document by default, but setting the "AsTemplate" property to `FALSE` loads the template + * document for editing. Setting "AsTemplate" to `TRUE` creates a new untitled document out of the loaded document, even if it has not a "template" type. + */ + AsTemplate: boolean; + + /** + * the author of the document + * + * Only for storing versions in components supporting versioning: author of version. + */ + Author: string; + + /** + * identifier of used character set + * + * Defines the character set for document formats that contain single byte characters (if necessary). + */ + CharacterSet: string; + + /** + * description of document + * + * Only for storing versions in components supporting versioning: comment (description) for stored version. + */ + Comment: string; + + /** + * pack specific properties of caller + * + * This is a parameter that can be used for any properties specific for a special component type. Format of that depends from real type of addressed + * component. + * + * For extensibility, it is recommended to use values of type sequence with this property. + */ + ComponentData: any; + + /** The base URL of the document to be used to resolve relative links. */ + DocumentBaseURL: string; + + /** + * document title + * + * This parameter can be used to specify a title for a document. + */ + DocumentTitle: string; + + /** + * encryption information for encryption/decryption of documents + * + * It contains the necessary information for encryption/decryption of a component (if necessary). If neither password nor encryption data is specified, + * loading of a password protected document will fail, storing will be done without encryption. If both are provided, the encryption data is used ( if + * the filter supports it ). + * + * The encryption data is generated based on the password. + */ + EncryptionData: SafeArray; + + /** + * same as {@link MediaDescriptor.URL} + * + * It will be supported for compatibility reasons only. + * @deprecated Deprecated + */ + FileName: string; + + /** + * additional properties for filter + * + * This is a parameter that can be used for any properties specific for a special filter type. It should be used if {@link MediaDescriptor.FilterOptions} + * isn't enough. + */ + FilterData: any; + + /** + * same as {@link MediaDescriptor.FilterOptions} + * + * It will be supported for compatibility reasons only. + * @deprecated Deprecated + */ + FilterFlags: string; + + /** + * internal filter name + * + * Name of a filter that should be used for loading or storing the component. Names must match the names of the {@link TypeDetection} configuration, + * invalid names are ignored. If a name is specified on loading, it still will be verified by a filter detection, but in case of doubt it will be + * preferred. + */ + FilterName: string; + + /** + * additional properties for filter + * + * Some filters need additional parameters; use only together with property {@link MediaDescriptor.FilterName} . Details must be documented by the + * filter. This is an old format for some filters. If a string is not enough, filters can use the property {@link MediaDescriptor.FilterData} . + */ + FilterOptions: string; + + /** specifies the frame containing the document. May be empty. */ + Frame: frame.XFrame; + + /** + * load document invisible + * + * Defines if the loaded component is made visible. If this property is not specified, the component is made visible by default. + */ + Hidden: boolean; + + /** The hierarchical path to the embedded document from topmost container. */ + HierarchicalDocumentName: string; + + /** + * content of document + * + * If used when loading a document: reading must be done using this stream. If no stream is provided, the loader will create a stream by itself using the + * other properties. It is not allowed to keep a reference to this InputStream after loading the component, and it would be useless, because in general + * an InputStream is usable for reading only once, except when it also implements the {@link com.sun.star.io.XSeekable} interface. + */ + InputStream: io.XInputStream; + + /** + * handle exceptional situations + * + * Object implementing the {@link com.sun.star.task.InteractionHandler} service that is used to handle exceptional situations where proceeding with the + * task is impossible without additional information or impossible at all. The implemented API provides a default implementation for it that can handle + * many situations. If no InteractionHandler is set, a suitable exception is thrown. It is not allowed to keep a reference to this object, even not in + * the loaded or stored component's copy of the {@link MediaDescriptor} provided by its arguments attribute. + */ + InteractionHandler: task.XInteractionHandler; + + /** + * jump to a marked position after loading + * + * This is the same as the text behind a "#" in a http URL. But this syntax with a "#" is not specified in most URL schemas. + */ + JumpMark: string; + + /** + * should the macro be executed. the value should be one from {@link com.sun.star.document.MacroExecMode} constant list. + * @since OOo 1.1.2 + */ + MacroExecutionMode: number; + + /** + * specify mime type of content + * + * Type of the medium to load, that must match to one of the types defined in the {@link TypeDetection} configuration (otherwise it's ignored). This + * bypasses the type detection of the {@link com.sun.star.frame.Desktop} environment, so passing a wrong MediaType will cause failure of loading. + */ + MediaType: string; + + /** + * please use the corresponding parameters of this descriptor instead + * + * String that summarizes some flags for loading. The string contains capital letters for the flags: ; {{table here, see documentation}} + * @deprecated Deprecated + */ + OpenFlags: string; + + /** + * opens a new view for an already loaded document + * + * Setting this to `TRUE` forces the component to create a new window on loading in any case. If the component supports multiple views, a second view is + * opened, if not, the component is loaded one more time. Otherwise the behavior depends on the default window handling of the {@link + * com.sun.star.frame.Desktop} environment. + */ + OpenNewView: boolean; + + /** + * a stream to receive the document data. + * + * If used when storing a document: writing must be done using this stream. If no stream is provided, the loader will create a stream by itself using the + * other properties. It is not allowed to keep a reference to this OutputStream after storing the component. + */ + OutputStream: io.XOutputStream; + + /** + * overwrite any existing file + * + * For storing only: overwrite any existing file, default is `FALSE` , so an error occurs if the target file already exists. + */ + Overwrite: boolean; + + /** + * password for loading storing documents + * + * It contains a password for loading or storing a component (if necessary). If neither password nor encryption data is specified, loading of a password + * protected document will fail, storing will be done without encryption. If both are provided, the encryption data is used ( if the filter supports it + * ). + */ + Password: string; + + /** + * contains the data for HTTP post method as a sequence of bytes. + * + * Data to send to a location described by the media descriptor to get a result in return that will be loaded as a component (usually in webforms). + * Default is: no PostData. + */ + PostData: SafeArray; + + /** + * use {@link MediaDescriptor.PostData} instead of this + * + * Same as PostData, but the data is transferred as a string (just for compatibility). + * @deprecated Deprecated + */ + PostString: string; + + /** + * show preview + * + * Setting this to `TRUE` tells the a loaded component that it is loaded as a preview, so it can optimize loading and viewing for this special purpose. + * Default is `FALSE` . + */ + Preview: boolean; + + /** + * open document readonly + * + * Tells whether a document should be loaded in a (logical) readonly or in read/write mode. If opening in the desired mode is impossible, an error + * occurs. By default the loaded content decides what to do: if its UCB content supports a "readonly" property, the logical open mode depends on that, + * otherwise it will be read/write. This is only a UI related property, opening a document in read only mode will not prevent the component from being + * modified by API calls, but all modifying functionality in the UI will be disabled or removed. + */ + ReadOnly: boolean; + + /** + * name of document referrer + * + * A URL describing the environment of the request; e.g. a referrer may be a URL of a document, if a hyperlink inside this document is clicked to load + * another document. The referrer may be evaluated by the addressed UCB content or the loaded document. Without a referrer the processing of URLs that + * needs security checks will be denied, e.g. "macro:" URLs. ; Don't be confused about the wrong spelling; it is kept for compatibility reasons. + */ + Referer: string; + + /** + * let the document be opened in repair mode + * + * For loading of corrupted zip packages: Setting this to `TRUE` let the document be opened in repair mode, so as much as possible information will be + * retrieved. + * @since OOo 1.1.2 + */ + RepairPackage: boolean; + + /** + * start presentation from a document + * + * Tells the component loading the document that a presentation that is in the document is to be started right away. + */ + StartPresentation: boolean; + + /** + * can be used for status information + * + * Object implementing the {@link com.sun.star.task.XStatusIndicator} interface that can be used to give status information (text or progress) for the + * task. The office provides a default implementation for it. It is not allowed to keep a reference to this object, even not in the loaded or stored + * component's copy of the {@link MediaDescriptor} provided by its arguments attribute. + */ + StatusIndicator: task.XStatusIndicator; + + /** + * allows to specify the URL that is used next time SaveAs dialog is opened + * + * If the parameter is specified, the URL will be used by SaveAs dialog next time as target folder. + */ + SuggestedSaveAsDir: string; + + /** + * allows to specify the suggested file name that is used next time SaveAs dialog is opened + * + * If the parameter is specified, the file name will be suggested by SaveAs dialog next time. + */ + SuggestedSaveAsName: string; + + /** + * name of the template instead of the URL + * + * The logical name of a template to load. Together with the MediaDescriptor::TemplateRegion property it can be used instead of the URL of the template. + * Use always in conjunction with {@link MediaDescriptor.TemplateRegionName} . + */ + TemplateName: string; + + /** + * name of the template instead of the URL + * + * See {@link MediaDescriptor.TemplateName} . The template region names are the folder names you see in the templates dialog. + */ + TemplateRegionName: string; + + /** + * regulate using of compressing + * + * For storing: Setting this to `TRUE` means, don't use a zip file to save the document, use a folder instead (only usable for UCB contents, that support + * folders). Default is `FALSE` . + */ + Unpacked: boolean; + + /** + * can the document be updated depending from links. the value should be one from {@link com.sun.star.document.UpdateDocMode} constant list. + * @since OOo 1.1.2 + */ + UpdateDocMode: number; + + /** + * URL of the document + * + * The location of the component in URL syntax. It must be the full qualified URL and + */ + URL: string; + + /** + * storage version + * + * For components supporting versioning: the number of the version to be loaded or saved. Default is zero and means: no version is created or loaded, the + * "main" document is processed. + */ + Version: number; + + /** + * specifies the name of the view controller to create when loading a document + * + * If this property is used when loading a document into a frame, then it specifies the name of the view controller to create. That is, the property is + * passed to the document's {@link com.sun.star.frame.XModel2.createViewController()} method. ; If the loaded document does not support the `XModel2` + * interface, the property is ignored. + * @see com.sun.star.frame.XModel2.createViewController + * @see com.sun.star.frame.XController2.ViewControllerName + * @since OOo 3.0 + */ + ViewControllerName: string; + + /** + * set special view state + * + * Data to set a special view state after loading. The type depends on the component and is usually retrieved from a {@link + * com.sun.star.frame.Controller} object by its {@link com.sun.star.frame.XController} interface. Default is: no view data. + */ + ViewData: any; + + /** + * id of the initial view + * + * For components supporting different views: a number to define the view that should be constructed after loading. Default is: zero, and this should be + * treated by the component as the default view. + */ + ViewId: number; + } + + /** + * should be used for interaction to handle states of unknown filter during detection + * + * If during loading time the filter can't be detected and wasn't given at calling time, a possible {@link com.sun.star.task.InteractionHandler} will be + * used. (it's a part of used {@link MediaDescriptor} ) Such "NoSuchFilterRequest" will be used then to start right interaction on that to get a decision + * which filter should be used for given URL. A possible continuation of type {@link XInteractionFilterSelect} will transport this decision back to + * generic filter detection and force using of it. Of course it's possible to abort the loading process by use another continuation {@link + * com.sun.star.task.XInteractionAbort} . + * @see MediaDescriptor + * @see com.sun.star.task.InteractionHandler + * @see XInteractionFilterSelect + * @see com.sun.star.task.XInteractionAbort + */ + interface NoSuchFilterRequest extends uno.Exception { + /** transport URL which couldn't be detected */ + URL: string; + } + + /** + * abstract service which specifies a storable and printable document + * + * All major document-like components should support this service instead of simple components which supports a {@link com.sun.star.frame.Controller} or + * pure {@link com.sun.star.awt.XWindow} only. + * @see com.sun.star.frame.Controller + */ + interface OfficeDocument extends frame.XModel, util.XModifiable, frame.XStorable, view.XPrintable, XEventBroadcaster, XDocumentEventBroadcaster, XEventsSupplier, + XViewDataSupplier, view.XPrintJobBroadcaster, XEmbeddedScripts, XDocumentPropertiesSupplier, XUndoManagerSupplier { + addEventListener(Listener: lang.XEventListener | XEventListener): void; + + /** + * controls the initial (on-load) behavior of the form controls in the document + * + * If set to `TRUE` , upon loading the document, the form controls will be in design mode. ; If set to `FALSE` , they will be alive, i.e. operational. ; + * With this, you may control if your document works primarily as a form document. + */ + ApplyFormDesignMode: boolean; + + /** + * controls the focus behavior of the form controls in the document + * + * If this flag is set to `TRUE` , any view belonging to the document should focus the first control in the document. With this, you may control if your + * document works primarily as a form document. + */ + AutomaticControlFocus: boolean; + + /** + * Grab bag of document properties, used as a string-any map for interim interop purposes. + * @since LibreOffice 4.2 This property is intentionally not handled by the ODF filter. Any member that should be handled there should be first moved out + */ + InteropGrabBag: SafeArray; + removeEventListener(Listener: lang.XEventListener | XEventListener): void; + + /** + * contains a unique id for the document + * + * Once calculated, the id must not change until the document has been closed. Upon closing it will not be made persistent. Thus, the document may get a + * different id every time it gets loaded. + */ + RuntimeUID: string; + } + + /** + * Is used for interaction handle to query user decision regarding locked document. + * @since OOo 3.1 + */ + interface OwnLockOnDocumentRequest extends uno.Exception { + /** The URL of the locked document. */ + DocumentURL: string; + + /** Whether the request is related to storing process */ + IsStoring: boolean; + + /** The time from which the document is locked. */ + TimeInfo: string; + } + + /** + * describes properties that apply to the whole document of any application. + * + * For application specific settings, please refer to the individual services. + * @see com.sun.star.text.DocumentSettings + * @see com.sun.star.sheet.DocumentSettings + * @see com.sun.star.drawing.DocumentSettings + * @see com.sun.star.presentation.DocumentSettings + */ + interface Settings extends beans.XPropertySet { + /** layout engine should add value of a Font's "external leading" attribute to the line spacing. */ + AddExternalLeading: boolean; + + /** specifies if the user-specific settings saved within a document should be loaded with the document. */ + ApplyUserData: boolean; + AutoCalculate: boolean; + BitmapTableURL: string; + + /** + * specifies the compression (character spacing) type used for Asian characters. + * @see com.sun.star.text.CharacterCompressionType + */ + CharacterCompressionType: number; + + /** contains the URL that points to a color table (file extension .soc) that will be used for showing a palette in dialogs using colors. */ + ColorTableURL: string; + + /** a string value, specifying the name of the object displayed currently (or the SQL statement used). */ + CurrentDatabaseCommand: string; + + /** + * determines the interpretation of the property DataTableName. + * @see com.sun.star.sdb.CommandType + */ + CurrentDatabaseCommandType: number; + + /** + * The name of the globally registered {@link com.sun.star.sdb.DataSource} from which the current data is taken. + * + * The data source can e.g. be used for feeding a form letter. + */ + CurrentDatabaseDataSource: string; + DashTableURL: string; + DefaultTabStop: number; + + /** + * Whether to embed fonts used by the document (see e.g. handling of OOXML embedRegular etc.) + * @since LibreOffice 4.0 + */ + EmbedFonts: boolean; + + /** + * Whether to embed also system fonts used by the document. Does not have any effect if EmbedFonts is false. + * @since LibreOffice 4.0 + */ + EmbedSystemFonts: boolean; + + /** specifies if fields in text documents are updated automatically. */ + FieldAutoUpdate: boolean; + + /** + * gives access to the set of forbidden characters. + * @returns the {@link com.sun.star.i18n.XForbiddenCharacters} interface to allow retrieval and modification of the forbidden characters set. + */ + ForbiddenCharacters: i18n.XForbiddenCharacters; + GradientTableURL: string; + HatchTableURL: string; + + /** + * specifies if kerning is applied to Asian punctuation. + * + * Applies only if kerning is enabled. + */ + IsKernAsianPunctuation: boolean; + + /** + * determines if the document will be printed as a booklet (brochure), i.e., two document pages are put together on one physical page, such that you can + * fold the print result and get a booklet. + * + * Note, that you have to print in duplex mode, if both, {@link IsPrintBookletFront} and {@link IsPrintBookletBack} are set to `TRUE` . + */ + IsPrintBooklet: boolean; + + /** + * is only effective, if {@link IsPrintBooklet} is `TRUE` . If this property is also `TRUE` , only the backs of the pages of your booklet are printed. + * + * This is especially useful, if your printer does not supply duplex printing. + */ + IsPrintBookletBack: boolean; + + /** + * is only effective, if {@link IsPrintBooklet} is `TRUE` . If this property is also `TRUE` , only the fronts of the pages of your booklet are printed. + * + * This is especially useful, if your printer does not supply duplex printing. + */ + IsPrintBookletFront: boolean; + LineEndTableURL: string; + + /** + * specifies the update mode for links when loading text documents. + * + * For supported values see the constants group {@link LinkUpdateModes} . + */ + LinkUpdateMode: number; + + /** + * forbid use of printer metrics for layout + * + * For supported values see the constants group {@link PrinterIndependentLayout} . + */ + PrinterIndependentLayout: number; + + /** printer used by the document. */ + PrinterName: string; + + /** + * platform and driver dependent printer setup data. + * + * This property serves to capture the current printer setup settings, such as paper tray, printer options, etc. The data can typically be interpreted + * only by the system that generated it. The PrinterSetup property may be used to save and restore the user's printer settings. + */ + PrinterSetup: SafeArray; + PrintQuality: number; + + /** specifies if a new version is created if a document has been modified and you want to close it. */ + SaveVersionOnClose: boolean; + + /** + * specifies if the document should be updated when the template it was created from changes. + * + * Applies only for documents that were created from a template. + */ + UpdateFromTemplate: boolean; + } + + /** + * encapsulate a type detection service and provide read/write access on it's configuration data. + * + * It's possible to make a "flat" detection which may use internal configuration data only - or a "deep" detection which use special {@link + * ExtendedTypeDetection} services to look into the document stream. Last mode can be suppressed to perform the operation. Of course the results can't be + * guaranteed then. (e.g. in case the extension was changed) + */ + interface TypeDetection extends XTypeDetection, container.XNameAccess, container.XNameContainer, container.XContainerQuery, util.XFlushable { } + + /** + * thrown when reverting to re-applying an undoable action fails. + * @see XUndoAction.undo + * @see XUndoManager.undo + * @since OOo 3.4 + */ + interface UndoFailedException extends uno.Exception { + /** describes the reason why the operation failed. Usually, this member will carry an exception. */ + Reason: any; + } + + /** + * is an event sent by an {@link XUndoManager} implementation when the Undo/Redo stacks of the manager are modified. + * @see XUndoManager + * @see XUndoManagerListener + * @see XUndoAction + * @since OOo 3.4 + */ + interface UndoManagerEvent extends lang.EventObject { + /** + * the title of the undo action which is described by the event + * @see XUndoAction.Title + */ + UndoActionTitle: string; + + /** + * denotes the number of Undo contexts which are open, and not yet closed, at the time the event is fired. + * @see XUndoManager.enterUndoContext + */ + UndoContextDepth: number; + } + + /** + * makes it possible to prevent object internal updates for a certain period to be able to quickly change multiple parts of the objects, where the + * updates would invalidate each other, anyway. + */ + interface XActionLockable extends uno.XInterface { + /** increments the lock count of the object by one. */ + addActionLock(): void; + + /** @returns `TRUE` if at least one lock exists. */ + isActionLocked(): boolean; + + /** decrements the lock count of the object by one. */ + removeActionLock(): void; + + /** + * resets the locking level. + * + * This method is used for debugging purposes. The debugging environment of a programming language can reset the locks to allow refreshing of the view if + * a breakpoint is reached or step execution is used. + */ + resetActionLocks(): number; + + /** + * sets the locking level. + * + * This method is used for debugging purposes. The programming environment can restore the locking after a break of a debug session. + */ + setActionLocks(nLock: number): void; + } + + /** + * This interface encapsulates functionality to get/resolve binary data streams. It is used to transform binary data to an URL or to transform an URL to + * binary data. The binary data is represented through input and output streams. + * + * In the case of transforming an URL to binary data, the `getInputStream` method is used. This returns a {@link com.sun.star.io.XInputStream} from which + * the binary data, transformed from the given URL, can be read. + * + * In the case of transforming binary data to an URL, a {@link com.sun.star.io.XOutputStream} is created first to write the binary data to. After this, + * the `resolveOutputStream` method can be used to transform the binary data, represented through the {@link com.sun.star.io.XOutputStream} interface, to + * an URL. + */ + interface XBinaryStreamResolver extends uno.XInterface { + /** + * creates an output stream, to which binary data can be written. After writing, an URL can be retrieved by a call to {@link + * XBinaryStreamResolver.resolveOutputStream()} . + */ + createOutputStream(): io.XOutputStream; + + /** converts the given URL from the source URL namespace to an input stream, from which binary data can be read */ + getInputStream(aURL: string): io.XInputStream; + + /** converts the output stream, data has been written to, to an URL in source URL namespace. */ + resolveOutputStream(aBinaryStream: io.XOutputStream): string; + } + + /** The document can provide access to CMIS properties and versions through this interface. */ + interface XCmisDocument extends uno.XInterface { + readonly AllVersions: SafeArray; + canCancelCheckOut(): boolean; + + /** Cancel checked out document, this will discard all changes since check-out. */ + cancelCheckOut(): void; + canCheckIn(): boolean; + canCheckOut(): boolean; + + /** Creates a new version of the document from the private working copy. */ + checkIn(isMajor: boolean, comment: string): void; + + /** Check out the document into a private working copy on the server, and update the loaded document to reflect this change. */ + checkOut(): void; + + /** Contains the properties values named after their CMIS ID. */ + CmisProperties: SafeArray; + getAllVersions(): SafeArray; + + /** Tells whether a document can support versioning or not. */ + isVersionable(): boolean; + updateCmisProperties(cmisProperties: LibreOffice.SeqEquiv): void; + } + + interface XCodeNameQuery { + getCodeNameForContainer(aObj: uno.XInterface): string; + getCodeNameForObject(aObj: uno.XInterface): string; + } + + interface XCompatWriterDocProperties { + Category: string; + Company: string; + Manager: string; + } + + /** + * allows to be notified of events happening in an {@link OfficeDocument} , and to cause notification of such events. + * + * This interface is the successor of the {@link XEventBroadcaster} interface, which should not be used anymore. + * @see DocumentEvent + * @since OOo 3.1 + */ + interface XDocumentEventBroadcaster { + /** + * registers a listener which is notified about document events + * @param Listener the listener to register. The behavior of the method is undefined this listener is `NULL` . + */ + addDocumentEventListener(Listener: XDocumentEventListener): void; + + /** + * causes the broadcaster to notify all registered listeners of the given event + * + * The method will create a {@link DocumentEvent} instance with the given parameters, and fill in the `Source` member (denoting the broadcaster) as + * appropriate. + * + * Whether the actual notification happens synchronously or asynchronously is up to the implementor of this method. However, implementations are + * encouraged to specify this, for the list of supported event types, in their service contract. + * + * Implementations might also decide to limit the list of allowed events (means event names) at their own discretion. Again, in this case they're + * encouraged to document this in their service contract. + * @param EventName the name of the event to be notified. + * @param ViewController the view/controller which the event applies to. May be `NULL` + * @param Supplement supplemental information related to the event. + * @throws com::sun::star::lang::IllegalArgumentException if EventName is empty, or if EventName is not supported by the document implementation. + * @throws com::sun::star::lang::NoSupportException if the broadcaster implementation does not supported broadcasting events induced externally. This is usu + */ + notifyDocumentEvent(EventName: string, ViewController: frame.XController2, Supplement: any): void; + + /** + * revokes a listener which has previously been registered to be notified about document events. + * @param Listener the listener to revoke. The behavior of the method is undefined this listener is `NULL` . + */ + removeDocumentEventListener(Listener: XDocumentEventListener): void; + } + + /** + * allows to be notified of events happening in an {@link OfficeDocument} + * + * This interface is the successor of the {@link XEventListener} interface, which should not be used anymore. + * @see XDocumentEventBroadcaster + * @since OOo 3.1 + */ + interface XDocumentEventListener extends lang.XEventListener { + /** is called whenever a document event occurred */ + documentEventOccured(Event: DocumentEvent): void; + } + + /** makes it possible to import a document from a given URL into this document. */ + interface XDocumentInsertable extends uno.XInterface { + /** inserts the document that is specified by the URL. */ + insertDocumentFromURL(aURL: string, aOptions: LibreOffice.SeqEquiv): void; + } + + interface XDocumentLanguages extends uno.XInterface { + /** + * retrieve the list of languages already used in current document + * @returns sequence + */ + getDocumentLanguages(nScriptTypes: number, nCount: number): SafeArray; + } + + /** + * provides document-specific information such as the author, creation date, and user-defined fields. + * + * This interface manages access to document meta-data properties. Such properties may be set from the outside via the setter methods (e.g. when + * importing arbitrary document formats that support document properties), or imported from an ODF package via the methods {@link loadFromStorage()} and + * {@link loadFromMedium()} . The properties may also be stored via the methods {@link storeToStorage()} and {@link storeToMedium()} . + * @see XDocumentPropertiesSupplier for getting access to an instance from a loaded document + * @see DocumentProperties for a service that implements this interface + * @since OOo 3.0 + */ + interface XDocumentProperties { + /** contains the initial author of the document. */ + Author: string; + + /** + * contains the number of seconds after which a specified URL is to be loaded after the document is loaded into a desktop frame. + * + * A value of 0 is valid and describes a redirection. A value of 0 together with an empty `string` as {@link AutoloadURL} describes a case where no + * autoload is specified. + * @see AutoloadURL + * @throws com::sun::star::lang::IllegalArgumentException if argument is negative + */ + AutoloadSecs: number; + + /** + * contains the URL to load automatically at a specified time after the document is loaded into a desktop frame. + * + * An empty URL is valid and describes a case where the document shall be reloaded from its original location after some time described by the attribute + * {@link AutoloadSecs} . An empty `string` together with an {@link AutoloadSecs} value of 0 describes a case where no autoload is specified. + * @see AutoloadSecs + */ + AutoloadURL: string; + + /** contains the date and time when the document was created. */ + CreationDate: util.DateTime; + + /** + * contains the name of the default frame into which links should be loaded if no target is specified. + * + * This applies to the autoload feature too, but to others as well. + */ + DefaultTarget: string; + + /** + * contains a multi-line comment describing the document. + * + * Line delimiters can be UNIX, Macintosh or DOS style. + */ + Description: string; + + /** + * contains some statistics about the document. + * + * The contained statistics may be specific to the type of the document. + */ + DocumentStatistics: SafeArray; + + /** + * describes how often the document was edited and saved. + * @throws com::sun::star::lang::IllegalArgumentException if argument is negative + */ + EditingCycles: number; + + /** + * contains the net time of editing the document (in seconds). + * @throws com::sun::star::lang::IllegalArgumentException if argument is negative + */ + EditingDuration: number; + + /** + * identifies which application was used to create or last modify the document. + * + * The generating application will set this attribute when it creates a new document or it saves a document. When a document is loaded that itself + * contains such an attribute it will be preserved until the document is saved again. + */ + Generator: string; + + /** + * provides access to a container for user-defined properties. + * + * The returned object also implements the interface {@link com.sun.star.beans.XPropertySet} . + * @returns a container that provides access to user-defined properties + */ + getUserDefinedProperties(): beans.XPropertyContainer; + + /** contains a list of keywords for the document. */ + Keywords: SafeArray; + + /** contains the default language of the document. */ + Language: lang.Locale; + + /** + * loads document properties from an ODF package or an OLE container. + * @param URL the URL of the source document The URL could be part of the Medium parameter, but because often no other parameters except the URL are needed + * @param Medium the {@link com.sun.star.document.MediaDescriptor} representing the source + * @throws com::sun::star::io::WrongFormatException if parsing the XML document fails + * @throws com::sun::star::lang::WrappedTargetException if thrown when trying to open a stream in the given storage + * @throws com::sun::star::io::IOException if thrown when trying to open a stream in the given storage + */ + loadFromMedium(URL: string, Medium: LibreOffice.SeqEquiv): void; + + /** + * loads document properties from an ODF package. + * + * This method is used for accessing an ODF package that is owned by someone else, e.g., a document. + * @param Storage the {@link com.sun.star.embed.Storage} representing the ODF package + * @param Medium the {@link com.sun.star.document.MediaDescriptor} representing the source This is unfortunately necessary in order to properly resolve rel + * @throws com::sun::star::lang::IllegalArgumentException if argument is `NULL` + * @throws com::sun::star::io::WrongFormatException if parsing the XML document fails + * @throws com::sun::star::lang::WrappedTargetException if thrown when trying to open a stream in the given storage + * @throws com::sun::star::io::IOException if thrown when trying to open a stream in the given storage + */ + loadFromStorage(Storage: embed.XStorage, Medium: LibreOffice.SeqEquiv): void; + + /** + * contains the date and time of the last time the document was stored. + * + * If the document has never been stored, contains a default value. + */ + ModificationDate: util.DateTime; + + /** contains the name of the person who most recently stored the document. */ + ModifiedBy: string; + + /** + * contains the date and time when the document was last printed. + * + * If the document has never been printed, contains a default value. + */ + PrintDate: util.DateTime; + + /** contains the name of the person who most recently printed the document. */ + PrintedBy: string; + + /** + * resets all attributes that could identify the user. + * + * Clears the document properties, such that it appears the document has just been created. This is a convenience method which resets several attributes + * at once, as follows: {@link Author} is set to the given parameter.{@link CreationDate} is set to the current date and time.{@link ModifiedBy} is + * cleared.{@link ModificationDate} is cleared.{@link PrintedBy} is cleared.{@link PrintDate} is cleared.{@link EditingDuration} is cleared.{@link + * EditingCycles} is set to 1. + * @param Author the new value of the {@link Author} attribute. + */ + resetUserData(Author: string): void; + + /** + * stores document properties to an ODF package or an OLE container. + * @param URL the URL of the target document The URL could be part of the Medium parameter, but because often no other parameters except the URL are needed + * @param Medium the {@link com.sun.star.document.MediaDescriptor} representing the target + * @throws com::sun::star::lang::WrappedTargetException if thrown when trying to open a stream in the given storage + * @throws com::sun::star::io::IOException if thrown when writing to the storage + */ + storeToMedium(URL: string, Medium: LibreOffice.SeqEquiv): void; + + /** + * stores document properties to an ODF package. + * + * This method is used for accessing an ODF package that is owned by someone else, e.g., a document. Note that the implementation may choose to store the + * meta-data in either OOo or ODF format, depending on the MediaType property of the given Storage argument. + * @param Storage the {@link com.sun.star.embed.Storage} representing the ODF package + * @param Medium the {@link com.sun.star.document.MediaDescriptor} representing the source This is unfortunately necessary in order to properly resolve rel + * @throws com::sun::star::lang::IllegalArgumentException if argument is `NULL` + * @throws com::sun::star::lang::WrappedTargetException if thrown when trying to open a stream in the given storage + * @throws com::sun::star::io::IOException if thrown when writing to the storage + */ + storeToStorage(Storage: embed.XStorage, Medium: LibreOffice.SeqEquiv): void; + + /** contains the subject of the document. */ + Subject: string; + + /** contains the date and time of when the document was created or updated from the template. */ + TemplateDate: util.DateTime; + + /** + * contains the name of the template from which the document was created. + * + * The value is an empty `string` if the document was not created from a template or if it was detached from the template. + */ + TemplateName: string; + + /** + * contains the URL of the template from which the document was created. + * + * The value is an empty `string` if the document was not created from a template or if it was detached from the template. + */ + TemplateURL: string; + + /** contains the title of the document. */ + Title: string; + + /** + * provides access to a container for user-defined properties. + * + * The returned object also implements the interface {@link com.sun.star.beans.XPropertySet} . + * @returns a container that provides access to user-defined properties + */ + readonly UserDefinedProperties: beans.XPropertyContainer; + } + + /** + * provides access to the {@link XDocumentProperties} instance of a document. + * + * A {@link DocumentProperties} instance is available on loaded documents via this supplier interface. + * @see XDocumentProperties + * @see DocumentProperties + * @since OOo 3.0 + */ + interface XDocumentPropertiesSupplier { + /** + * provides the document properties object. + * @returns an object of type {@link XDocumentProperties} + */ + readonly DocumentProperties: XDocumentProperties; + + /** + * provides the document properties object. + * @returns an object of type {@link XDocumentProperties} + */ + getDocumentProperties(): XDocumentProperties; + } + + /** is the interface to be implemented by documents who wish to participate in the document emergency-save / recovery process. */ + interface XDocumentRecovery { + /** + * recovers the document after a previous emergency or session save. + * + * The document itself has previously been created, but **not** loaded (via {@link com.sun.star.frame.XLoadable.load()} ) or initialized (via {@link + * com.sun.star.frame.XLoadable.initNew()} ). + * + * Upon successful return, the document must be fully initialized. In particular, the caller is not responsible for calling {@link + * com.sun.star.frame.XModel.attachResource()} . Instead, the implementation is responsible to do so, if required. + * + * A default implementation of this method could simply delegate this call to {@link com.sun.star.frame.XLoadable.load()} , followed by {@link + * com.sun.star.frame.XModel.attachResource()} . + * @param SourceLocation specifies the URL of the location to which the document was previously emergency-saved. + * @param SalvagedFile specifies the original URL of the file which had been emergency-saved. If this is empty, then the file should be recovered from its + * @param MediaDescriptor contains additional arguments for the load process, for instance an StatusIndicator. + * @see MediaDescriptor + */ + recoverFromFile(SourceLocation: string, SalvagedFile: string, MediaDescriptor: LibreOffice.SeqEquiv): void; + + /** + * does an emergency save of the document + * + * A default implementation of this method could simply delegate this call to {@link com.sun.star.frame.XStorable.storeToURL()} . + * @param TargetLocation specifies the URL of the location to which the document should be emergency-saved. + * @param MediaDescriptor contains additional arguments for the save process, for instance an StatusIndicator. + * @see MediaDescriptor + */ + storeToRecoveryFile(TargetLocation: string, MediaDescriptor: LibreOffice.SeqEquiv): void; + + /** + * determines whether the document has been modified since the last call to {@link storeToRecoveryFile()} . + * + * If `storeToRecoveryFile` has not been called before, this method returns whether the document has been modified since it has been loaded respectively + * created. + * + * When saving a session, either in case of a emergency (when OpenOffice.org crashed), or during a periodic session save as configured by the user, + * {@link storeToRecoveryFile()} is called for every document where `wasModifiedSinceLastSave` returns `TRUE` . + * + * It's allowed to implement this method sloppy, by returning `TRUE` in cases where it is not sure whether the document actually has been modified. So, + * the most simple implementation could simply delegate this call to {@link com.sun.star.util.XModifiable.isModified()} . (Well, actually that's the + * second simple implementation, the **most** simple one would, still legitimately, always return `TRUE` .) + * + * However, in such a case, the document might be saved more often than needed. In particular during the periodic session save, this might become a + * problem when saving is expensive, for a single document or the sum of all open documents. + */ + wasModifiedSinceLastSave(): boolean; + } + + /** interface to load or store a list of document revisions from or to a document using the packed XML file format */ + interface XDocumentRevisionListPersistence extends uno.XInterface { + /** + * Loads a list of available revisions from a storage + * + * This method does not load any revision itself + */ + load(Storage: embed.XStorage): SafeArray; + + /** + * Stores a list of available revisions to a storage + * + * This method does not store revisions themselves + */ + store(Storage: embed.XStorage, List: LibreOffice.SeqEquiv): void; + } + + /** + * through this interface documents can provide access to their substorages + * + * A temporary interface to get access to documents substorages. + */ + interface XDocumentSubStorageSupplier extends uno.XInterface { + /** + * provides the list of substorages + * @returns sequence of substorages names + */ + readonly DocumentSubStoragesNames: SafeArray; + + /** + * provides the access to a substorage with specified name + * @param StorageName the name of requested substorage + * @param nMode a mode the storage should be opened in can take value from {@link com.sun.star.embed.ElementModes} + * @returns XStorage implementation that refers to specified substorage + */ + getDocumentSubStorage(StorageName: string, nMode: number): embed.XStorage; + + /** + * provides the list of substorages + * @returns sequence of substorages names + */ + getDocumentSubStoragesNames(): SafeArray; + } + + /** this interface converts embedded object URLs from one URL space to another. */ + interface XEmbeddedObjectResolver extends uno.XInterface { + /** converts the given URL from the source URL namespace to the destination URL space of this instance. */ + resolveEmbeddedObjectURL(aURL: string): string; + } + + /** represents something that provides an embedded object. */ + interface XEmbeddedObjectSupplier extends uno.XInterface { + /** returns the object which is embedded into this object. */ + readonly EmbeddedObject: lang.XComponent; + + /** returns the object which is embedded into this object. */ + getEmbeddedObject(): lang.XComponent; + } + + /** represents something that provides an embedded object. */ + interface XEmbeddedObjectSupplier2 extends XEmbeddedObjectSupplier { + /** allows to control the aspect of the object. */ + Aspect: number; + + /** + * returns the object which is embedded into this object. + * + * This method does not return the model that is controlled by the embedded object, but the embedded object itself. + */ + readonly ExtendedControlOverEmbeddedObject: embed.XEmbeddedObject; + + /** + * returns the object which is embedded into this object. + * + * This method does not return the model that is controlled by the embedded object, but the embedded object itself. + */ + getExtendedControlOverEmbeddedObject(): embed.XEmbeddedObject; + + /** allows to get the replacement image of the object. */ + ReplacementGraphic: graphic.XGraphic; + } + + /** + * is supported by OfficeDocuments which allow to embed scripts + * @since OOo 2.4 + */ + interface XEmbeddedScripts { + /** + * determines whether executing macros from this document is allowed. + * + * Effectively, this attribute is an evaluation of the document's {@link MacroExecMode} against possibly applicable configuration settings, the document + * location in relation to the trusted location, and the like. + * @see MacroExecMode + */ + AllowMacroExecution: boolean; + + /** is the container of `StarBasic` macro libraries contained in the document */ + BasicLibraries: script.XStorageBasedLibraryContainer; + + /** is the container of dialogs libraries contained in the document */ + DialogLibraries: script.XStorageBasedLibraryContainer; + } + + /** + * makes it possible to register listeners which are called whenever a document event (see {@link EventObject} ) occurs + * @deprecated Deprecated + * @see XDocumentEventBroadcaster + */ + interface XEventBroadcaster extends uno.XInterface { + /** + * registers the given listener + * @param Listener listener which is interested on such events + */ + addEventListener(Listener: XEventListener): void; + + /** + * unregisters the given listener + * @param Listener listener which isn't interested on such events any longer + */ + removeEventListener(Listener: XEventListener): void; + } + + /** + * makes it possible to register listeners, which are called whenever a document or document content event occurs + * + * Such events will be broadcasted by a {@link XEventBroadcaster} . + * @deprecated Deprecated + * @see XDocumentEventListener + */ + interface XEventListener extends lang.XEventListener { + /** + * is called whenever a document event (see {@link EventObject} ) occurs + * @param Event specifies the event type + */ + notifyEvent(Event: EventObject): void; + } + + /** gives access to a list of URLs bound to events of this object */ + interface XEventsSupplier extends uno.XInterface { + /** + * offers a list of event handlers which are be bound to events of this object + * @returns an {@link Events} description object + */ + readonly Events: container.XNameReplace; + + /** + * offers a list of event handlers which are be bound to events of this object + * @returns an {@link Events} description object + */ + getEvents(): container.XNameReplace; + } + + /** + * makes it possible to connect a document with an {@link ExportFilter} + * + * An {@link ExportFilter} must know the source of his filter operation. To set this on a filter is part of this interface. Same mechanism exist for + * import too. + * @see ExportFilter + * @see ImportFilter + * @see XImporter + */ + interface XExporter extends uno.XInterface { + /** + * sets the source document for the exporter + * @param Document the source document + * @throws com::sun::star::lang::IllegalArgumentException if **Document** does not support any service which is supported by this exporter + */ + setSourceDocument(Document: lang.XComponent): void; + } + + /** + * provides a "deep" filter detection + * + * A "deep" filter detection means looking into the document stream to detect the format of it. Services of type {@link ExtendedTypeDetection} must + * support this interface to be called from generic load mechanism of the office for that. + * @see DetectService + * @see TypeDetection + * @see FilterFactory + */ + interface XExtendedFilterDetection extends uno.XInterface { + /** + * controls agreement of a "flat" {@link TypeDetection} with given URL or arguments + * + * Registered services in configuration, which support this interface for different mime types, will be called automatically to look into the document + * stream and decide which format it represent. Add the collected information about detected documents in given {@link MediaDescriptor}**Descriptor** . + * The decision must be returned as any valid type name (which specifies the detected format) or an empty value for unknown formats. + * @param Descriptor represent a {@link MediaDescriptor} which can be used to get/set information about the detected document + * @returns an internal type name if format was detected successfully ; or an empty value for an unknown document format. + */ + detect(Descriptor: [LibreOffice.SeqEquiv]): string; + } + + /** + * interface to filter documents + * + * This interface will be used by service {@link ImportFilter} or {@link ExportFilter} to support loading/saving of documents in different formats. The + * target/source of such filter operations must be known **before** filtering will be started. (see {@link XImporter} and {@link XExporter} too) + * Otherwise this interface can't work right. + * @see ImportFilter + * @see ExportFilter + * @see XImporter + * @see XExporter + */ + interface XFilter extends uno.XInterface { + /** cancel the process. */ + cancel(): void; + + /** + * filter the document. + * + * The given {@link MediaDescriptor} holds all necessary information about the document. + * + * Don't hold hard references to the descriptor items. You must copy needed information! Otherwise we couldn't destroy (for example) an existing input + * stream! + * @param aDescriptor the {@link MediaDescriptor} describing the respective document. + * @returns a boolean value indicating whether the filter operation was successful or not. + */ + filter(aDescriptor: LibreOffice.SeqEquiv): boolean; + } + + /** + * This is an interface that can be used to link a filter to the {@link FilterAdapter} + * @since OOo 1.1.2 + * @throws com::sun::star::uno::RuntimeException + */ + interface XFilterAdapter extends uno.XInterface { + convert(xml: io.XInputStream, device: io.XOutputStream, convertToOffice: boolean, pluginUrl: string, fileName: string): void; + } + + /** this interface converts graphic object URLs from one URL space to another. */ + interface XGraphicObjectResolver extends uno.XInterface { + /** converts the given URL from the source URL namespace to the destination URL space of this instance. */ + resolveGraphicObjectURL(aURL: string): string; + } + + /** + * makes it possible to connect a document with an {@link ImportFilter} + * + * An {@link ImportFilter} must know the target of his filter operation. To set this on a filter is part of this interface. Same mechanism exist for + * export too. + * @see ExportFilter + * @see ImportFilter + * @see XExporter + */ + interface XImporter extends uno.XInterface { + /** + * sets the target document for the importer + * @param Document the target document + * @throws com::sun::star::lang::IllegalArgumentException if **Document** does not support any service which is supported by this importer + */ + setTargetDocument(Document: lang.XComponent): void; + } + + /** + * A continuation to return filter options from interaction helper. + * @since OOo 1.1.2 + */ + interface XInteractionFilterOptions extends task.XInteractionContinuation { + /** + * Get results from the continuation. + * @returns the stored list of properties containing filter options. + */ + FilterOptions: SafeArray; + + /** + * Get results from the continuation. + * @returns the stored list of properties containing filter options. + */ + getFilterOptions(): SafeArray; + + /** + * Store results to the continuation. + * @param rProperties the list of properties containing filter options. + */ + setFilterOptions(rProperties: LibreOffice.SeqEquiv): void; + } + + /** + * continuation used by interaction mechanism at filter detection during loading documents + * + * If during loading time the filter can't be detected and wasn't given at calling time, a possible {@link com.sun.star.task.InteractionHandler} will be + * used. (it's a part of used {@link MediaDescriptor} ) A {@link NoSuchFilterRequest} will be used then to start right interaction on that to get a + * decision which filter should be used for given URL. A possible continuation of that can be this {@link XInteractionFilterSelect} . It will transport + * the decision back to generic filter detection and force using of it. Of course it's possible to abort the loading process by use another continuation + * {@link com.sun.star.task.XInteractionAbort} . + * @see MediaDescriptor + * @see com.sun.star.task.InteractionHandler + * @see NoSuchFilterRequest + * @see com.sun.star.task.XInteractionAbort + */ + interface XInteractionFilterSelect extends task.XInteractionContinuation { + /** used by detection to get selected filter */ + Filter: string; + + /** used by detection to get selected filter */ + getFilter(): string; + + /** + * used by interaction to set selected filter + * + * This value must be saved till another one will be set and must be provided on {@link getFilter()} for interest users. + */ + setFilter(Name: string): void; + } + + /** + * interface is supplied by objects inside a document object model that have children that can be the target of a link inside a document. + * + * These targets implement the service {@link LinkTarget} . + */ + interface XLinkTargetSupplier extends uno.XInterface { + /** @returns the names of possible links to children of this object inside a document object model. It implements the service {@link LinkTargets} . */ + getLinks(): container.XNameAccess; + + /** @returns the names of possible links to children of this object inside a document object model. It implements the service {@link LinkTargets} . */ + readonly Links: container.XNameAccess; + } + + /** provides information regarding which MIME types are supported by a filter. */ + interface XMimeTypeInfo extends uno.XInterface { + /** @returns a sequence of the names of all supported MIME types. */ + getSupportedMimeTypeNames(): SafeArray; + + /** @returns a sequence of the names of all supported MIME types. */ + readonly SupportedMimeTypeNames: SafeArray; + + /** asks whether a MIME type is supported or not. */ + supportsMimeType(MimeTypeName: string): boolean; + } + + /** + * Filter for exporting Basic macros to the OpenOffice.org file format. + * + * First the {@link XExporter.setSourceDocument()} method must be called in order to provide the export component with the source document from which the + * data should be exported. After that, the export is started by calling the {@link XFilter.filter()} method. + * @since OOo 2.0 + */ + interface XMLBasicExporter extends XXMLBasicExporter { + createWithHandler(DocumentHandler: xml.sax.XDocumentHandler): void; + } + + /** + * Filter for importing Basic macros from the OpenOffice.org file format. + * + * The {@link XImporter.setTargetDocument()} method must be called in order to provide the import component with the target document to which the data + * should be imported. The {@link com.sun.star.xml.sax.XDocumentHandler} interface is used to stream the XML data into the filter. + * @since OOo 2.0 + */ + interface XMLBasicImporter extends XImporter, xml.sax.XDocumentHandler { } + + /** + * Filter for exporting Basic macros to the OASIS Open Office file format. + * + * First the {@link XExporter.setSourceDocument()} method must be called in order to provide the export component with the source document from which the + * data should be exported. After that, the export is started by calling the {@link XFilter.filter()} method. + * @since OOo 2.0 + */ + interface XMLOasisBasicExporter extends XXMLBasicExporter { + createWithHandler(DocumentHandler: xml.sax.XDocumentHandler): void; + } + + /** allows to import the document properties from OOXML format */ + interface XOOXMLDocumentPropertiesImporter extends uno.XInterface { + /** + * allows to import the document properties from OOXML format + * + * The implementation should parse the document properties from OOXML format storage and set them to the target {@link XDocumentProperties} + * implementation. + * + * The storage must represent OOXML format and support {@link com.sun.star.embed.XRelationshipAccess} interface. Please see {@link + * com.sun.star.embed.StorageFactory} for details regarding creation of such a storage. + * @param xSource the source storage representing OOXML document + * @param xDocumentProperties the target {@link XDocumentProperties} interface implementation + * @throws com::sun::star::lang::IllegalArgumentException the exception is thrown in case unexpected arguments are provided + * @throws com::sun::star::xml::sax::SAXException the exception is thrown in case of parsing problems + * @throws com::sun::star::uno::Exception the exception is thrown in case of other problems during the import + */ + importProperties(xSource: embed.XStorage, xDocumentProperties: XDocumentProperties): void; + } + + /** provides access to a container of the redline objects of the document. */ + interface XRedlinesSupplier extends uno.XInterface { + /** @returns an enumeration access that provides access to the redline objects of the document. The returned objects implement at least the interface {@link */ + getRedlines(): container.XEnumerationAccess; + + /** @returns an enumeration access that provides access to the redline objects of the document. The returned objects implement at least the interface {@link */ + readonly Redlines: container.XEnumerationAccess; + } + + /** + * indicates support for executing scripts contained in a, possibly foreign, document. + * + * If the component implementing it is a document, which supports embedding scripts into itself, then {@link ScriptContainer} refers to the document + * itself. Implementing this interface is unnecessary then, instead the document should simply implement {@link XEmbeddedScripts} directly. + * + * If the interface is implemented by a document which does not itself support embedding scripts into it, but which is associated unambiguously with a + * document which does, then this other document is denoted by {@link ScriptContainer} . + * + * If the interface is implemented by a controller, then {@link ScriptContainer} refers to the document which supports embedding scripts, and which is + * unambiguously associated with the controller. This must not necessarily be the model returned by {@link com.sun.star.frame.XController.getModel()} . + * @since OOo 2.4 + */ + interface XScriptInvocationContext { + /** + * denotes the document which contains the scripts which are to be invoked from the component implementing the {@link XScriptInvocationContext} + * interface. + */ + ScriptContainer: XEmbeddedScripts; + } + + /** allows to initialize document with a storage, to store document to a storage, and to set document to be based on provided storage. */ + interface XStorageBasedDocument extends uno.XInterface { + /** allows to register a listener that will be notified when another storage is set to the document. */ + addStorageChangeListener(xListener: XStorageChangeListener): void; + + /** allows to get the storage the document is based on. */ + readonly DocumentStorage: embed.XStorage; + + /** allows to get the storage the document is based on. */ + getDocumentStorage(): embed.XStorage; + + /** lets the document load itself using provided storage. */ + loadFromStorage(xStorage: embed.XStorage, aMediaDescriptor: LibreOffice.SeqEquiv): void; + + /** allows to deregister the listener. */ + removeStorageChangeListener(xListener: XStorageChangeListener): void; + + /** lets the document store itself to the provided storage. */ + storeToStorage(xStorage: embed.XStorage, aMediaDescriptor: LibreOffice.SeqEquiv): void; + + /** allows to switch the document to the provided storage. */ + switchToStorage(xStorage: embed.XStorage): void; + } + + /** allows to be notified when a document is switched to a new storage. */ + interface XStorageChangeListener extends lang.XEventListener { + /** + * is called when document switches to another storage. + * @param xDocument the document that has changed the storage it is based on + * @param xStorage the new storage the document is based on + */ + notifyStorageChange(xDocument: uno.XInterface, xStorage: embed.XStorage): void; + } + + /** + * support "flat" and "deep" type detection of a given document + * + * A "flat" detection means specifying the document format by using the URL and some configuration data only. That will perform but produce may invalid + * results if e.g., the extension of the document is wrong. A "deep" detection means looking into the document stream to be right which format it + * supports. Of course that includes a "flat" detection before. The combination of both ones should produce stable results every time. + * @see TypeDetection + */ + interface XTypeDetection extends uno.XInterface { + /** + * make a "deep" detection or optional a "flat" detection by using a {@link MediaDescriptor} + * + * Instead of {@link XTypeDetection.queryTypeByURL()} this function use a {@link MediaDescriptor} to specify the document for detection. Such descriptor + * hold different information about the document. He will be passed to any part of made detection process and every part can change it to actualize it. + * The property {@link MediaDescriptor.URL} should be set on this descriptor as minimum. It specifies the location of the document. If this parameter is + * missing another one is required: {@link MediaDescriptor.InputStream} . This can be useful to prevent operation against multiple opening of the stream + * and perform the operation. If this stream isn't already included the detection will open it (if allowed!) and add it to the descriptor so it will be + * available for all following parts. A combination of both parameters can be useful to perform the operation and make results more stable; but only one + * of them is required. Of course its possible to specify more document properties (e.g. {@link MediaDescriptor.ReadOnly} ). ; As an additional feature + * it's possible to suppress "deep" detection by using argument **AllowDeep** . + * @param Descriptor means the {@link MediaDescriptor} which specify the resource for detection + * @param AllowDeep if it is set to `TRUE` a "deep" detection will be follow a "flat" detection ; if it is set to `FALSE` a "flat" detection will be made only + * @returns an internal type name which represent the detected format ; or an empty value for unknown ones + */ + queryTypeByDescriptor(Descriptor: [LibreOffice.SeqEquiv], AllowDeep: boolean): string; + + /** + * make a "flat" detection by using the URL of the document + * + * It use given URL in combination with the internal configuration of well known types only to specify the format of given document. + * @param URL specify the document by name + * @returns an internal type name which represent the detected format ; or an empty value for unknown ones + */ + queryTypeByURL(URL: string): string; + } + + /** + * represents a single (undoable) action on a document + * @since OOo 3.4 + */ + interface XUndoAction { + /** + * repeats the action represented by the instance, after it had previously been reverted. + * @throws UndoFailedException if repeating the action failed. In this case, the caller should assume that this is a permanent failure, and take appropriate + */ + redo(): void; + + /** is the human-readable, localized description of the action. */ + Title: string; + + /** + * reverts the action represented by the instance + * @throws UndoFailedException if reverting the action failed. In this case, the caller should assume that this is a permanent failure, and take appropriate + */ + undo(): void; + } + + /** + * provides access to the undo/redo stacks of a document + * + * **Undo** + * + * Changes to a document usually result in recording of information how to undo those changes, if desired. A so-called undo action records the + * information how to undo a single change. Undo actions are maintained in a stack, so that the changes they represent can be undo in the reverse order + * they have originally been applied. + * + * **Redo** + * + * Additionally, the Undo manager manages a Redo stack: Actions which are undone are moved from the Undo to the Redo stack, so it is possible to re-apply + * the changes to the document. + * + * **Undo contexts** + * + * For collecting multiple changes in a single undo action, so-called Undo contexts are provided. When an Undo context is entered, all subsequently added + * Undo actions are not pushed onto the undo stack directly, but considered a sub action of the Undo context. Once the Undo context is left, a single + * undo action is pushed onto the undo stack, which comprises all those single Undo actions. ; Undo contexts can be arbitrarily nested. + * + * **Hidden Undo actions** + * + * Hidden Undo actions are those which in no observable way contribute to the undo stack. That is, any method retrieving information about the stack will + * behave as if the undo action does not exist. Nonetheless, calling {@link undo()} respectively {@link redo()} will include those actions. ; Hidden + * Undo actions can be created by calling {@link enterHiddenUndoContext()} , following by {@link leaveUndoContext()} . + * + * **Locking** + * + * An Undo manager can be locked and unlocked, using the XLockable::lock() and XLockable::unlock() methods. When it is locked, then every attempt to add + * an undo action, or to enter or leave an Undo context, will be silently ignored. + * @since OOo 3.4 + */ + interface XUndoManager extends util.XLockable, container.XChild { + /** + * adds the given undo action to the undo stack. + * + * The redo stack is cleared when a new action is pushed onto the undo stack. + * + * The Undo manager takes ownership of any actions pushed onto the undo stack. This means that if the action is finally removed from the Undo manager's + * control (e.g. by calling {@link clear()} resp. {@link clearRedo()} ), it will be disposed, as long as it supports the {@link + * com.sun.star.lang.XComponent} interface. + * + * If the Undo manager is [locked]{@link url="#locking"} at the moment the method is called, the call will be ignored, and the undo action will + * immediately be disposed, if applicable. + * @throws com::sun::star::lang::IllegalArgumentException if the given undo action is `NULL` . + */ + addUndoAction(iAction: XUndoAction): void; + + /** adds a listener to be notified of changes in the Undo/Redo stacks. */ + addUndoManagerListener(iListener: XUndoManagerListener): void; + + /** + * returns the titles of all actions currently on the Redo stack, from top to bottom + * @see XUndoAction.Title + */ + readonly AllRedoActionTitles: SafeArray; + + /** + * returns the titles of all actions currently on the undo stack, from top to bottom + * @see XUndoAction.Title + */ + readonly AllUndoActionTitles: SafeArray; + + /** + * clears the undo and the redo stack. + * + * All actions will be removed from both the Undo and the Redo stack. Actions which implement the {@link com.sun.star.lang.XComponent} interface will be + * disposed. + * @throws UndoContextNotClosedException if the method is invoked while an undo context is still open + */ + clear(): void; + + /** + * clears the redo stack. + * + * All actions will be removed from the Redo stack. Actions which implement the {@link com.sun.star.lang.XComponent} interface will be disposed. + * @throws UndoContextNotClosedException if the method is invoked while an undo context is still open + */ + clearRedo(): void; + + /** + * returns the title of the top-most action on the Redo stack + * @see XUndoAction.Title + * @throws EmptyUndoStackException when the Redo stack is currently empty + */ + readonly CurrentRedoActionTitle: string; + + /** + * returns the title of the top-most action on the undo stack + * @see XUndoAction.Title + * @throws EmptyUndoStackException when the undo stack is currently empty + */ + readonly CurrentUndoActionTitle: string; + + /** + * enters a new undo context, creating a hidden undo action. + * + * A hidden undo action does not, in any visible way, contribute to the undo stack. This means that Calling {@link undo()} when the top-element is a + * hidden undo action will transparently undo this action, and also undo the new top element of the stack.Calling {@link redo()} when the top-element is + * a hidden action will transparently redo this action, and also redo the new top element of the stack.In any user interface presenting the current Undo + * or Redo actions to the user, a hidden action will not be listed. + * + * + * + * A new undo action will be added to the undo stack. As long as the context is not left, every undo action added to the stack will be treated as sub + * action. This means it will not be directly accessible at the undo manager, not appear in any user interface, and cannot be separately undone or + * re-done. + * + * Each call to `enterHiddenUndoContext` must be paired by a call to {@link leaveUndoContext()} , otherwise, the document's undo stack is left in an + * inconsistent state. + * + * Undo contexts can be nested, i.e. it is legitimate to call {@link enterUndoContext()} and `enterHiddenUndoContext` multiple times without calling + * {@link leaveUndoContext()} inbetween. + * @see enterUndoContext + * @see leaveUndoContext + * @throws EmptyUndoStackException if the undo stack is currently empty, in which case it is impossible to push a hidden undo action onto it. + */ + enterHiddenUndoContext(): void; + + /** + * enters a new undo context. + * + * A new undo action will be added to the undo stack, with the title given as `iTitle` . As long as the context is not left, every undo action added to + * the stack will be treated as sub action. This means it will not be directly accessible at the Undo manager, not appear in any user interface, and + * cannot be separately undone or re-done. + * + * Each call to `enterUndoContext` must be paired by a call to {@link leaveUndoContext()} , otherwise, the document's undo stack is left in an + * inconsistent state. + * + * Undo contexts can be nested, i.e. it is legitimate to call `enterUndoContext` and {@link enterHiddenUndoContext()} multiple times without calling + * {@link leaveUndoContext()} inbetween. + * @see leaveUndoContext + */ + enterUndoContext(iTitle: string): void; + + /** + * returns the titles of all actions currently on the Redo stack, from top to bottom + * @see XUndoAction.Title + */ + getAllRedoActionTitles(): SafeArray; + + /** + * returns the titles of all actions currently on the undo stack, from top to bottom + * @see XUndoAction.Title + */ + getAllUndoActionTitles(): SafeArray; + + /** + * returns the title of the top-most action on the Redo stack + * @see XUndoAction.Title + * @throws EmptyUndoStackException when the Redo stack is currently empty + */ + getCurrentRedoActionTitle(): string; + + /** + * returns the title of the top-most action on the undo stack + * @see XUndoAction.Title + * @throws EmptyUndoStackException when the undo stack is currently empty + */ + getCurrentUndoActionTitle(): string; + + /** + * determines whether {@link redo()} can reasonably be expected to succeed. + * @returns `FALSE` if and only if the redo stack is currently empty, or there is an open and not-yet-closed undo context. + */ + isRedoPossible(): boolean; + + /** + * determines whether {@link undo()} can reasonably be expected to succeed. + * @returns `FALSE` if and only if the undo stack is currently empty, or there is an open and not-yet-closed undo context. + */ + isUndoPossible(): boolean; + + /** + * leaves the undo context previously opened via {@link enterUndoContext()} respectively {@link enterHiddenUndoContext()} . + * + * If no undo action has been added since the context has been opened, the context is not only left, but silently removed, and does not contribute to the + * undo stack at all. In this case, possible listeners will be notified via {@link XUndoManagerListener.cancelledContext()} . + * + * Otherwise, the undo context will be closed, and added to the Undo stack; the redo stack will be cleared, and listeners will be notified via {@link + * XUndoManagerListener.leftContext()} resp. {@link XUndoManagerListener.leftHiddenContext()} + * @see enterUndoContext + * @see enterHiddenUndoContext + * @throws com::sun::star::util::InvalidStateException if no undo context is currently open. + */ + leaveUndoContext(): void; + + /** + * replays the action on the document which has most recently been undone + * + * Effectively, invoking this method will invoke {@link XUndoAction.redo()} on the top-most action of the redo stackmove this action from the redo stack + * to the undo stack + * @see undo + * @throws EmptyUndoStackException when the Redo stack is currently empty + * @throws UndoContextNotClosedException if there currently is an open undo context + * @throws UndoFailedException if the invocation of {@link XUndoAction.redo()} raised this exception. In this case, the redo stack of the undo manager will + */ + redo(): void; + + /** removes a previously added listener */ + removeUndoManagerListener(iListener: XUndoManagerListener): void; + + /** + * resets the Undo manager + * + * In particular, this method will remove all locks from the undo managerclose all open undo contextsclear the undo stackclear the redo stack + * + * Note that possible listeners will not get notifications for the single parts of the reset, i.e. there will be no single {@link + * XUndoManagerListener.allActionsCleared()} , {@link XUndoManagerListener.leftContext()} , etc., notifications. Instead, listeners will be notified of + * the reset by calling their {@link XUndoManagerListener.resetAll()} method. + */ + reset(): void; + + /** + * reverts the most recent action on the document. + * + * Effectively, invoking this method will invoke {@link XUndoAction.undo()} on the top-most action of the undo stackmove this undo action from the undo + * stack to the redo stack + * @see redo + * @see enterUndoContext + * @throws EmptyUndoStackException if the undo stack is currently empty + * @throws UndoContextNotClosedException if there currently is an open undo context + * @throws UndoFailedException if the invocation of {@link XUndoAction.undo()} raised this exception. In this case, the undo stack of the undo manager will + */ + undo(): void; + } + + /** + * implemented by components which want to be notified of changes in the Undo/Redo stacks of an Undo manager. + * @see XUndoManager + * @since OOo 3.4 + */ + interface XUndoManagerListener extends lang.XEventListener { + /** + * is called when the top-most action of the Redo stack has been re-applied. + * @see XUndoManager.redo + */ + actionRedone(iEvent: UndoManagerEvent): void; + + /** + * is called when the top-most action of the undo stack has been undone. + * @see XUndoManager.undo + */ + actionUndone(iEvent: UndoManagerEvent): void; + + /** + * is called when both the Undo and the Redo stack have been cleared from all Undo actions. + * @see XUndoManager.clear + */ + allActionsCleared(iEvent: lang.EventObject): void; + + /** + * is called when an Undo context has been left, but no actions have been added within this context. + * + * In such a case, the context which has just been left will not contribute to the undo stack, but instead be silently removed. Consequently, the {@link + * UndoManagerEvent.UndoActionTitle} is empty. + * @see XUndoManager.leaveUndoContext + * @see leftContext + * @see leftHiddenContext + */ + cancelledContext(iEvent: UndoManagerEvent): void; + + /** + * is called when a new Undo context has been entered. + * + * {@link UndoManagerEvent.UndoActionTitle} carries the title of the Undo context, and {@link UndoManagerEvent.UndoContextDepth} the number of open Undo + * contexts, including the one just entered. + * @see XUndoManager.enterUndoContext + */ + enteredContext(iEvent: UndoManagerEvent): void; + + /** + * is called when a new hidden Undo context has been entered. + * + * {@link UndoManagerEvent.UndoActionTitle} carries the title of the Undo context, and {@link UndoManagerEvent.UndoContextDepth} the number of open Undo + * contexts, including the one just entered. + * @see XUndoManager.enterUndoContext + */ + enteredHiddenContext(iEvent: UndoManagerEvent): void; + + /** + * is called when an Undo context has been left. + * + * {@link UndoManagerEvent.UndoActionTitle} carries the title of the Undo context, and {@link UndoManagerEvent.UndoContextDepth} the number of open Undo + * contexts, exluding the one just left. + * @see XUndoManager.leaveUndoContext + * @see leftHiddenUndocontext + * @see cancelledContext + */ + leftContext(iEvent: UndoManagerEvent): void; + + /** + * is calledn when a hidden Undo context has been left. + * + * {@link UndoManagerEvent.UndoActionTitle} is empty, as hidden Undo contexts don't have a title. + * @see XUndoManager.leaveHiddenUndoContext + * @see leftContext + * @see cancelledContext + */ + leftHiddenContext(iEvent: UndoManagerEvent): void; + + /** + * is called when the Redo stack has been cleared. + * @see XUndoManager.clearRedo + */ + redoActionsCleared(iEvent: lang.EventObject): void; + + /** called when the complete undo manager has been reset */ + resetAll(iEvent: lang.EventObject): void; + + /** + * is called when an undo action is added to the undo stack. + * + * Note that the action must not necessarily be the new top element of the stack: In case there's an open Undo context, {@link + * UndoManagerEvent.UndoContextDepth} will be greater `0` , and the newly added action will be subordinate of the context action. + * @see XUndoManager.addUndoAction + */ + undoActionAdded(iEvent: UndoManagerEvent): void; + } + + /** + * provides access to an {@link XUndoManager} . + * @since OOo 3.4 + */ + interface XUndoManagerSupplier { + /** returns the Undo manager associated with the component. */ + getUndoManager(): XUndoManager; + + /** returns the Undo manager associated with the component. */ + readonly UndoManager: XUndoManager; + } + + interface XVbaMethodParameter extends uno.XInterface { + /** returns the value of the parameter with the specified name. */ + getVbaMethodParameter(PropertyName: string): any; + + /** sets the value of the parameter with the specified name. */ + setVbaMethodParameter(PropertyName: string, Value: any): void; + } + + /** + * gives access to some properties describing all open views to a document + * + * Each view is described by a sequence< ::com::sun::star::beans::PropertyValue >. Through this interface the state of all open views can be retrieved + * and restored later. These states can also be made persistent so that a document loader can create all views of the correct types and restore their + * state to the state when the document was saved. + */ + interface XViewDataSupplier extends uno.XInterface { + /** + * retrieve information about currently opened view to restore it later + * @returns a {@link com.sun.star.container.XIndexAccess} , that gives access to a list of {@link com.sun.star.beans.PropertyValue} for every open view. May + */ + getViewData(): container.XIndexAccess; + + /** + * restore all views which will be represented by given data argument + * @param Data a list of {@link com.sun.star.beans.PropertyValues} with information about last opened views to restore it `NULL` isn't allowed here. + */ + setViewData(Data: container.XIndexAccess): void; + + /** + * retrieve information about currently opened view to restore it later + * @returns a {@link com.sun.star.container.XIndexAccess} , that gives access to a list of {@link com.sun.star.beans.PropertyValue} for every open view. May + */ + ViewData: container.XIndexAccess; + } + + /** + * Provides unified interface for {@link XMLOasisBasicExporter} and {@link XMLBasicExporter} services. + * @since LibreOffice 4.1 + */ + interface XXMLBasicExporter extends XExporter, XFilter { } + + /** @since LibreOffice 4.1 */ + interface XXMLOasisBasicImporter extends XImporter, xml.sax.XDocumentHandler { } + + namespace LinkUpdateModes { + const enum Constants { + AUTO = 2, + GLOBAL_SETTING = 3, + MANUAL = 1, + NEVER = 0, + } + } + + namespace MacroExecMode { + const enum Constants { + ALWAYS_EXECUTE = 2, + ALWAYS_EXECUTE_NO_WARN = 4, + FROM_LIST = 1, + FROM_LIST_AND_SIGNED_NO_WARN = 9, + FROM_LIST_AND_SIGNED_WARN = 8, + FROM_LIST_NO_WARN = 7, + NEVER_EXECUTE = 0, + USE_CONFIG = 3, + USE_CONFIG_APPROVE_CONFIRMATION = 6, + USE_CONFIG_REJECT_CONFIRMATION = 5, + } + } + + namespace PrinterIndependentLayout { + const enum Constants { + DISABLED = 1, + HIGH_RESOLUTION = 3, + LOW_RESOLUTION = 2, + } + } + + namespace RedlineDisplayType { + const enum Constants { + INSERTED = 1, + INSERTED_AND_REMOVED = 2, + NONE = 0, + REMOVED = 3, + } + } + + namespace UpdateDocMode { + const enum Constants { + ACCORDING_TO_CONFIG = 2, + FULL_UPDATE = 3, + NO_UPDATE = 0, + QUIET_UPDATE = 1, + } + } + } + + namespace drawing { + /** + * this service provides the properties to describe a background filling for a drawing page. It can be obtained by the {@link + * com.sun.star.lang.XMultiServiceFactory} of a document and be set on draw pages that support a filled background. + */ + type Background = FillProperties; + + /** + * this is a container for URLs to bitmaps. + * + * It is used for example to access the bitmaps that are used inside a document for filling. + * @see DrawingDocumentFactory + * @see FillStyle.FillBitmapURL + */ + type BitmapTable = container.XNameContainer; + + /** @since LibreOffice 4.1 */ + type ColorTable = container.XNameContainer; + + type CoordinateSequence = LibreOffice.SeqEquiv; + + type CoordinateSequenceSequence = LibreOffice.SeqEquiv; + + /** + * this is a container for LineDashs + * + * It is used for example to access the LineDashs that are used inside a document. + * @see DrawingDocumentFactory + * @see LineDash + */ + type DashTable = container.XNameContainer; + + type DoubleSequence = LibreOffice.SeqEquiv; + + type DoubleSequenceSequence = LibreOffice.SeqEquiv; + + /** specifies a document which consists of multiple pages with drawings. */ + type DrawingDocument = GenericDrawingDocument; + + /** @deprecated DeprecatedPleas use the factory interface of the service GenericDrawingDocument. */ + type DrawingDocumentFactory = lang.XMultiServiceFactory; + + type FlagSequence = LibreOffice.SeqEquiv; + + type FlagSequenceSequence = LibreOffice.SeqEquiv; + + /** + * this is a container for com::sun::star::awt::Gradients + * + * It is used for example to access the com::sun::star::awt::Gradients that are used inside a document. + * @see DrawingDocumentFactory + * @see com.sun.star.awt.Gradient + */ + type GradientTable = container.XNameContainer; + + /** + * a component that supports this service lets you export pages, shapes, or groups of shapes from a {@link DrawingDocument} to a file in one of the file + * formats supported by the component. + */ + type GraphicExportFilter = XGraphicExportFilter; + + /** + * this is a container for Hatchs + * + * It is used for example to access the Hatchs that are used inside a document. + * @see DrawingDocumentFactory + * @see Hatch + */ + type HatchTable = container.XNameContainer; + + /** + * this is a container for PointSequences + * + * It is used for example to access the line ends that are used inside a document. + * @see DrawingDocumentFactory + * @see PointSequence + */ + type MarkerTable = container.XNameContainer; + + /** + * This service is a single master page inside a drawing document. + * + * It serves as a background page for zero or more {@link DrawPages} . Since this service is derived from the service {@link GenericDrawPage} , it can be + * used as a draw page with three differences: + * + * 1. It is not linked to any other {@link MasterPage} . 2. It cannot be removed from a document as long as one or more instances of {@link DrawPage} + * are linked to it. 3. Modifications to a {@link MasterPage} are instantly visible on every {@link DrawPage} that is linked to it. + */ + type MasterPage = GenericDrawPage; + + /** + * provides access to a container of {@link MasterPages} and makes it possible for them to be manipulated. + * @see XMasterPagesSupplier + * @see DrawingDocument + */ + type MasterPages = XDrawPages; + + /** @since LibreOffice 4.1 */ + type ModuleDispatcher = frame.XDispatchProvider; + + type PointSequence = LibreOffice.SeqEquiv; + + type PointSequenceSequence = LibreOffice.SeqEquiv; + + /** + * This service describes a generic container to manage collections of {@link Shape} . The {@link Shape} that are added to this collection are not owned + * by the collection. + * + * This service is used by the view f.e. to return a collection of {@link Shape} that are selected at the ui. + */ + type ShapeCollection = XShapes; + + /** This service is for a generic collection of shapes. */ + type Shapes = XShapes; + + /** + * this is a container for com::sun::star::awt::Gradients + * + * It is used for example to access the com::sun::star::awt::Gradients that are used inside a document for fill transparency. + * @see DrawingDocumentFactory + * @see com.sun.star.awt.Gradient + */ + type TransparencyGradientTable = container.XNameContainer; + + /** identifies an {@link XShapes} as a {@link DrawPage} . */ + type XDrawPage = XShapes; + + /** identifies the object as a {@link Layer} . */ + type XLayer = beans.XPropertySet; + + /** The Alignment enumeration is a general way to specify the alignment of an object or sub-object relative to another object. */ + const enum Alignment { + /** + * the connection line leaves the connected object from the bottom, + * + * The bottom edge of the text is adjusted to the bottom edge of the shape. + * + * The text is positioned below the main line. + */ + BOTTOM = 7, + BOTTOM_LEFT = 6, + BOTTOM_RIGHT = 8, + /** The text is centered inside the shape. */ + CENTER = 4, + /** + * the connection line leaves the connected object to the left, + * + * The text is positioned to the left. + * + * The left edge of the text is adjusted to the left edge of the shape. + */ + LEFT = 3, + /** + * the connection line leaves the connected object to the right, + * + * The text is positioned to the right. + * + * The right edge of the text is adjusted to the right edge of the shape. + */ + RIGHT = 5, + /** + * the connection line leaves the connected object from the top, + * + * The top edge of the text is adjusted to the top edge of the shape. + * + * The text is positioned above the main line. + */ + TOP = 1, + TOP_LEFT = 0, + TOP_RIGHT = 2, + } + + /** + * With this enumeration you can arrange the relative position of an object within the other objects. + * @deprecated Deprecated + */ + const enum Arrangement { + /** Move this object behind all other objects. */ + BACK = 3, + /** Move this object in front of all other objects. */ + FRONT = 0, + /** Move this object one object more to the back. */ + MORE_BACK = 2, + /** Move this object one object more to the front. */ + MORE_FRONT = 1, + } + + /** The BitmapMode selects an algorithm for filling an area with a bitmap. */ + const enum BitmapMode { + /** the bitmap is painted in its original or selected size. */ + NO_REPEAT = 2, + /** the bitmap is repeated over the fill area. */ + REPEAT = 0, + /** + * the bitmap is stretched to fill the area. + * + * The text is stretched so that the longest line goes from the left to the right edge of the shape. + */ + STRETCH = 1, + } + + /** This enumeration defines a circle. */ + const enum CircleKind { + /** a circle with an open cut */ + ARC = 3, + /** a circle with a cut connected by two lines */ + CUT = 2, + /** a full circle */ + FULL = 0, + /** a circle with a cut connected by a line */ + SECTION = 1, + } + + /** The ColorMode defines the output style of colors for a graphic. */ + const enum ColorMode { + /** the graphic is rendered in grayscale on the output device, */ + GREYS = 1, + /** the graphic is rendered in black and white only, */ + MONO = 2, + /** + * the graphic is rendered in the default color style of the output device, + * + * the connector is drawn with three lines, with the middle line perpendicular to the other two + * + * use the length measurement. + */ + STANDARD = 0, + /** the graphic is rendered in a watermark like style, */ + WATERMARK = 3, + } + + /** the direction where the connection line leaves the connection point. */ + const enum ConnectionType { + /** + * the connection point is chosen automatically, + * + * Set this to have the application select the best horizontal position for the text. + */ + AUTO = 0, + /** + * the connection line leaves the connected object from the bottom, + * + * The bottom edge of the text is adjusted to the bottom edge of the shape. + * + * The text is positioned below the main line. + */ + BOTTOM = 4, + /** + * the connection line leaves the connected object to the left, + * + * The text is positioned to the left. + * + * The left edge of the text is adjusted to the left edge of the shape. + */ + LEFT = 1, + /** + * the connection line leaves the connected object to the right, + * + * The text is positioned to the right. + * + * The right edge of the text is adjusted to the right edge of the shape. + */ + RIGHT = 3, + /** + * not implemented, yet. + * + * deprecated + */ + SPECIAL = 5, + /** + * the connection line leaves the connected object from the top, + * + * The top edge of the text is adjusted to the top edge of the shape. + * + * The text is positioned above the main line. + */ + TOP = 2, + } + + /** The ConnectorType specifies the appearance of a connector. */ + const enum ConnectorType { + /** the {@link ConnectorShape} is drawn as a curve */ + CURVE = 1, + /** + * the {@link ConnectorShape} is drawn as a straight line + * + * This is the PolygonKind for a {@link LineShape} . + */ + LINE = 2, + /** the connector is drawn with three lines */ + LINES = 3, + /** + * the graphic is rendered in the default color style of the output device, + * + * the connector is drawn with three lines, with the middle line perpendicular to the other two + * + * use the length measurement. + */ + STANDARD = 0, + } + + /** This enumeration defines the style of a dash on a line. */ + const enum DashStyle { + /** the dash is a rectangle */ + RECT = 0, + /** the dash is a rectangle, with the size of the dash given in relation to the length of the line */ + RECTRELATIVE = 2, + /** + * the dash is a point + * + * the line will get a half circle as additional cap + * + * the lines join with an arc + */ + ROUND = 1, + /** the dash is a point, with the size of the dash given in relation to the length of the line */ + ROUNDRELATIVE = 3, + } + + /** + * This enumeration specifies the view mode of a view in a presentation document. + * @deprecated Deprecated + */ + const enum DrawViewMode { + /** The view shows the drawing pages. */ + DRAW = 0, + /** The view shows the handout pages, */ + HANDOUT = 2, + /** The view shows the notes pages. */ + NOTES = 1, + } + + const enum EnhancedCustomShapeTextPathMode { + /** + * the text is drawn along the path without scaling. + * + * the point is normal, from the curve discussion view. + */ + NORMAL = 0, + /** the text is fit to the path. */ + PATH = 1, + /** the text is fit to the bounding box of the shape. */ + SHAPE = 2, + } + + /** This enumeration defines the escape direction a connector takes on a glue point. */ + const enum EscapeDirection { + DOWN = 4, + /** mirror to the horizontal axis */ + HORIZONTAL = 5, + /** + * the connection line leaves the connected object to the left, + * + * The text is positioned to the left. + * + * The left edge of the text is adjusted to the left edge of the shape. + */ + LEFT = 1, + /** + * the connection line leaves the connected object to the right, + * + * The text is positioned to the right. + * + * The right edge of the text is adjusted to the right edge of the shape. + */ + RIGHT = 2, + SMART = 0, + UP = 3, + /** mirror to the vertical axis */ + VERTICAL = 6, + } + + /** specifies how an area will be filled. */ + const enum FillStyle { + /** use a bitmap to fill the area. */ + BITMAP = 4, + /** use a gradient color to fill the area. */ + GRADIENT = 2, + /** use a hatch to fill the area. */ + HATCH = 3, + /** + * the area is not filled. + * + * the line has no special end. + * + * the joint between lines will not be connected + * + * the line is hidden. + * + * Don't animate this text. + * + * the text size is only defined by the font properties + */ + NONE = 0, + /** + * use a solid color to fill the area. + * + * the line is solid. + */ + SOLID = 1, + } + + /** The HatchStyle defines the style of the lines in a hatch. */ + const enum HatchStyle { + /** the hatch has a horizontal and a vertical line */ + DOUBLE = 1, + /** the hatch consists of a single horizontal line */ + SINGLE = 0, + /** the hatch has a horizontal, a vertical and a diagonal line */ + TRIPLE = 2, + } + + /** The HorizontalDimensioning specifies the horizontal position of the text of a dimensioning shape. */ + const enum HorizontalDimensioning { + /** + * the connection point is chosen automatically, + * + * Set this to have the application select the best horizontal position for the text. + */ + AUTO = 0, + /** + * The text is positioned at the center. + * + * The text is positioned over the main line. + */ + CENTERED = 2, + /** + * the connection line leaves the connected object to the left, + * + * The text is positioned to the left. + * + * The left edge of the text is adjusted to the left edge of the shape. + */ + LEFT = 1, + /** + * the connection line leaves the connected object to the right, + * + * The text is positioned to the right. + * + * The right edge of the text is adjusted to the right edge of the shape. + */ + RIGHT = 3, + } + + /** This enumeration specifies the type of a drawing layer. */ + const enum LayerType { + /** This is the layer for the controls. */ + CONTROLSA = 1, + /** This is the layer for all measure shapes. */ + DIMENSIONIANG_LINES = 2, + /** This is the layer for all standard shapes. */ + LAYOUT = 0, + /** There can be zero or more layers of this type. */ + USER_DEFINED = 3, + } + + /** The LineCap defines rendering of ends of thick lines */ + const enum LineCap { + /** the line will end without any additional shape */ + BUTT = 0, + /** + * the dash is a point + * + * the line will get a half circle as additional cap + * + * the lines join with an arc + */ + ROUND = 1, + /** + * the line will get a half square as additional cap + * + * the line uses a square for the line end. + */ + SQUARE = 2, + } + + /** + * The LineEndType specifies the appearance of the bullet at the end of a line. + * @deprecated Deprecated + */ + const enum LineEndType { + /** the line uses an arrow for the line end. */ + ARROW = 1, + /** the line uses a circle for the line end. */ + CIRCLE = 2, + /** + * the area is not filled. + * + * the line has no special end. + * + * the joint between lines will not be connected + * + * the line is hidden. + * + * Don't animate this text. + * + * the text size is only defined by the font properties + */ + NONE = 0, + /** + * not implemented, yet. + * + * deprecated + */ + SPECIAL = 4, + /** + * the line will get a half square as additional cap + * + * the line uses a square for the line end. + */ + SQUARE = 3, + } + + /** The LineJoint defines rendering of joints between thick lines */ + const enum LineJoint { + /** the edges of the thick lines will be joined by lines */ + BEVEL = 2, + /** the middle value between the joints is used */ + MIDDLE = 1, + /** the lines join at intersections */ + MITER = 3, + /** + * the area is not filled. + * + * the line has no special end. + * + * the joint between lines will not be connected + * + * the line is hidden. + * + * Don't animate this text. + * + * the text size is only defined by the font properties + */ + NONE = 0, + /** + * the dash is a point + * + * the line will get a half circle as additional cap + * + * the lines join with an arc + */ + ROUND = 4, + } + + /** specifies the appearance of the lines of a shape. */ + const enum LineStyle { + /** the line use dashes. */ + DASH = 2, + /** + * the area is not filled. + * + * the line has no special end. + * + * the joint between lines will not be connected + * + * the line is hidden. + * + * Don't animate this text. + * + * the text size is only defined by the font properties + */ + NONE = 0, + /** + * use a solid color to fill the area. + * + * the line is solid. + */ + SOLID = 1, + } + + /** + * determines whether a measured shape is a standard measure or a radius measure. + * @deprecated Deprecated + */ + const enum MeasureKind { + /** use the radius measurement. This option cannot be used from the GUI Interface. */ + RADIUS = 1, + /** + * the graphic is rendered in the default color style of the output device, + * + * the connector is drawn with three lines, with the middle line perpendicular to the other two + * + * use the length measurement. + */ + STANDARD = 0, + } + + /** This enumeration defines the relative horizontal placement of the text inside a measure shape. */ + const enum MeasureTextHorzPos { + /** + * the connection point is chosen automatically, + * + * Set this to have the application select the best horizontal position for the text. + */ + AUTO = 0, + INSIDE = 2, + LEFTOUTSIDE = 1, + RIGHTOUTSIDE = 3, + } + + /** This enumeration defines the relative vertical placement of the text inside a measure shape. */ + const enum MeasureTextVertPos { + /** + * the connection point is chosen automatically, + * + * Set this to have the application select the best horizontal position for the text. + */ + AUTO = 0, + BREAKEDLINE = 2, + /** + * The text is positioned at the center. + * + * The text is positioned over the main line. + */ + CENTERED = 4, + EAST = 1, + WEST = 3, + } + + /** defines an axis for simple mirroring. */ + const enum MirrorAxis { + /** mirror to the horizontal axis */ + HORIZONTAL = 1, + /** mirror to the vertical axis */ + VERTICAL = 0, + } + + /** specifies in which way the standard normals for an object are produced. */ + const enum NormalsKind { + /** + * forces one normal per flat part. + * + * With FLAT shading, the faces of the object are rendered in a solid color. + */ + FLAT = 1, + /** does not produce standard normals, but leaves the object-specific ones untouched. */ + SPECIFIC = 0, + /** + * forces normals to think that the object is a sphere. + * + * This value forces projection to wrapping in X and/or Y. + */ + SPHERE = 2, + } + + /** defines how a Bezier curve goes through a point. */ + const enum PolygonFlags { + /** the point is a control point, to control the curve from the user interface. */ + CONTROL = 2, + /** + * the text is drawn along the path without scaling. + * + * the point is normal, from the curve discussion view. + */ + NORMAL = 0, + /** + * the point is smooth, the first derivation from the curve discussion view. + * + * With SMOOTH shading, the colors of the lit vertices is interpolated. + */ + SMOOTH = 1, + /** the point is symmetric, the second derivation from the curve discussion view. */ + SYMMETRIC = 3, + } + + /** This enumeration defines the type of polygon. */ + const enum PolygonKind { + /** This is the PolygonKind for a ClosedFreeHandShape. */ + FREEFILL = 6, + /** This is the PolygonKind for an OpenFreeHandShape. */ + FREELINE = 5, + /** + * the {@link ConnectorShape} is drawn as a straight line + * + * This is the PolygonKind for a {@link LineShape} . + */ + LINE = 0, + /** This is the PolygonKind for a {@link ClosedBezierShape} . */ + PATHFILL = 4, + /** This is the PolygonKind for an {@link OpenBezierShape} . */ + PATHLINE = 3, + /** This is the PolygonKind for a PolyLinePathShape. */ + PATHPLIN = 8, + /** This is the PolygonKind for a PolyPolygonPathShape. */ + PATHPOLY = 7, + /** This is the PolygonKind for a {@link PolyLineShape} . */ + PLIN = 2, + /** This is the PolygonKind for a {@link PolyPolygonShape} . */ + POLY = 1, + } + + /** defines whether the 3D objects are to be drawn in perspective or parallel projection. */ + const enum ProjectionMode { + /** + * the 3D objects are drawn in the parallel projection. + * + * This value specifies a flat parallel projection in the specified degree of freedom (X or Y). + */ + PARALLEL = 0, + /** the 3D objects are drawn in the perspective projection. */ + PERSPECTIVE = 1, + } + + /** specifies one of nine points in a rectangle. */ + const enum RectanglePoint { + /** specify to the point on the bottom of the left side from the rectangle. */ + LEFT_BOTTOM = 6, + /** specify to the point on the middle of the left side from the rectangle. */ + LEFT_MIDDLE = 3, + /** specify to the point on the left side from the top of the rectangle. */ + LEFT_TOP = 0, + /** specify to the point on the middle of the bottom from the rectangle. */ + MIDDLE_BOTTOM = 7, + /** specify to the point on the center from the rectangle. */ + MIDDLE_MIDDLE = 4, + /** specify to the point on the middle of the top from the rectangle. */ + MIDDLE_TOP = 1, + /** specify to the point on the bottom of the right side from the rectangle. */ + RIGHT_BOTTOM = 8, + /** specify to the point on the middle of the right side from the rectangle. */ + RIGHT_MIDDLE = 5, + /** specify to the point on the right side from the top of the rectangle. */ + RIGHT_TOP = 2, + } + + /** The ShadeMode determines the quality of displaying the object. */ + const enum ShadeMode { + /** DRAFT is a special mode which uses a BSP tree and triangle subdivision for displaying. */ + DRAFT = 3, + /** + * forces one normal per flat part. + * + * With FLAT shading, the faces of the object are rendered in a solid color. + */ + FLAT = 0, + /** With PHONG shading, the normal itself is interpolated to get more realistic colors and light reflections. */ + PHONG = 1, + /** + * the point is smooth, the first derivation from the curve discussion view. + * + * With SMOOTH shading, the colors of the lit vertices is interpolated. + */ + SMOOTH = 2, + } + + /** @deprecated Deprecated */ + const enum SnapObjectType { + /** mirror to the horizontal axis */ + HORIZONTAL = 2, + POINT = 0, + /** mirror to the vertical axis */ + VERTICAL = 1, + } + + /** + * This enumeration specifies the position of a text inside a shape in relation to the shape. + * @deprecated Deprecated This counts for the complete text, not individual lines. + */ + const enum TextAdjust { + /** + * The text extends from the left to the right edge of the shape. + * + * The text extends from the top to the bottom edge of the shape. + */ + BLOCK = 3, + /** The text is centered inside the shape. */ + CENTER = 1, + /** + * the connection line leaves the connected object to the left, + * + * The text is positioned to the left. + * + * The left edge of the text is adjusted to the left edge of the shape. + */ + LEFT = 0, + /** + * the connection line leaves the connected object to the right, + * + * The text is positioned to the right. + * + * The right edge of the text is adjusted to the right edge of the shape. + */ + RIGHT = 2, + /** + * the bitmap is stretched to fill the area. + * + * The text is stretched so that the longest line goes from the left to the right edge of the shape. + */ + STRETCH = 4, + } + + /** This enumeration defines the movement direction of a scrolltext. */ + const enum TextAnimationDirection { + DOWN = 3, + /** + * the connection line leaves the connected object to the left, + * + * The text is positioned to the left. + * + * The left edge of the text is adjusted to the left edge of the shape. + */ + LEFT = 0, + /** + * the connection line leaves the connected object to the right, + * + * The text is positioned to the right. + * + * The right edge of the text is adjusted to the right edge of the shape. + */ + RIGHT = 1, + UP = 2, + } + + /** This enumeration specifies the type of animation for a text. */ + const enum TextAnimationKind { + /** Scroll the text from one side to the other and back. */ + ALTERNATE = 3, + /** Let this text switch its state from visible to invisible continuously. */ + BLINK = 1, + /** + * the area is not filled. + * + * the line has no special end. + * + * the joint between lines will not be connected + * + * the line is hidden. + * + * Don't animate this text. + * + * the text size is only defined by the font properties + */ + NONE = 0, + /** Let this text scroll. */ + SCROLL = 2, + /** Scroll the text from one side to the final position and stop there. */ + SLIDE = 4, + } + + /** This enumeration specifies how the text within a shape relates to the size of the shape. */ + const enum TextFitToSizeType { + /** like `PROPORTIONAL` , but the width of each text row is also scaled proportional. */ + ALLLINES = 2, + /** if the shape is scaled, the font is scaled isotropically to fit the available space. Auto line-breaks will keep working */ + AUTOFIT = 3, + /** + * the area is not filled. + * + * the line has no special end. + * + * the joint between lines will not be connected + * + * the line is hidden. + * + * Don't animate this text. + * + * the text size is only defined by the font properties + */ + NONE = 0, + /** if the shape is scaled, the text character size is scaled proportional */ + PROPORTIONAL = 1, + } + + /** + * This enumeration specifies the horizontal position of text inside a shape in relation to the shape. + * + * This counts for the complete text, not individual lines. + */ + const enum TextHorizontalAdjust { + /** + * The text extends from the left to the right edge of the shape. + * + * The text extends from the top to the bottom edge of the shape. + */ + BLOCK = 3, + /** The text is centered inside the shape. */ + CENTER = 1, + /** + * the connection line leaves the connected object to the left, + * + * The text is positioned to the left. + * + * The left edge of the text is adjusted to the left edge of the shape. + */ + LEFT = 0, + /** + * the connection line leaves the connected object to the right, + * + * The text is positioned to the right. + * + * The right edge of the text is adjusted to the right edge of the shape. + */ + RIGHT = 2, + } + + /** + * These enumeration values specify how the texture is applied. + * @deprecated Deprecated + */ + const enum TextureKind { + /** + * With this mode the lighting is ignored and only the texture color information is used. + * + * With this mode, the lighting is ignored and only the texture color information is used. + */ + COLOR = 1, + /** With TextureKind LUMINANCE, the texture and the lighting information are mixed to produce the image, so a lit, textured object is achieved. */ + LUMINANCE = 0, + } + + /** These enumeration values specify how the texture is applied. */ + const enum TextureKind2 { + /** + * With this mode the lighting is ignored and only the texture color information is used. + * + * With this mode, the lighting is ignored and only the texture color information is used. + */ + COLOR = 2, + /** With TextureKind INTENSITY, each texture pixel is used as an intensity value. */ + INTENSITY = 1, + /** With TextureKind LUMINANCE, the texture and the lighting information are mixed to produce the image, so a lit, textured object is achieved. */ + LUMINANCE = 0, + } + + /** The TextureMode defines in which way the texture color data replaces the object color data. */ + const enum TextureMode { + /** This mixes both data sources in a fixed ratio. */ + BLEND = 2, + /** This mixes up colors in a way defined by the texture bitmap. */ + MODULATE = 1, + /** This is the standard mode. */ + REPLACE = 0, + } + + /** + * defines how the texture is mapped to the object. + * + * It can be set independently for X and Y texture directions. + */ + const enum TextureProjectionMode { + /** This value specifies that the standard object projection method is used. */ + OBJECTSPECIFIC = 0, + /** + * the 3D objects are drawn in the parallel projection. + * + * This value specifies a flat parallel projection in the specified degree of freedom (X or Y). + */ + PARALLEL = 1, + /** + * forces normals to think that the object is a sphere. + * + * This value forces projection to wrapping in X and/or Y. + */ + SPHERE = 2, + } + + /** + * This enumeration specifies the vertical position of text inside a shape in relation to the shape. + * + * This counts for the complete text, not individual lines. + */ + const enum TextVerticalAdjust { + /** + * The text extends from the left to the right edge of the shape. + * + * The text extends from the top to the bottom edge of the shape. + */ + BLOCK = 3, + /** + * the connection line leaves the connected object from the bottom, + * + * The bottom edge of the text is adjusted to the bottom edge of the shape. + * + * The text is positioned below the main line. + */ + BOTTOM = 2, + /** The text is centered inside the shape. */ + CENTER = 1, + /** + * the connection line leaves the connected object from the top, + * + * The top edge of the text is adjusted to the top edge of the shape. + * + * The text is positioned above the main line. + */ + TOP = 0, + } + + /** specifies the vertical position of the text of a dimensioning shape. */ + const enum VerticalDimensioning { + /** + * the connection point is chosen automatically, + * + * Set this to have the application select the best horizontal position for the text. + */ + AUTO = 0, + /** + * the connection line leaves the connected object from the bottom, + * + * The bottom edge of the text is adjusted to the bottom edge of the shape. + * + * The text is positioned below the main line. + */ + BOTTOM = 3, + /** + * The text is positioned at the center. + * + * The text is positioned over the main line. + */ + CENTERED = 2, + /** + * the connection line leaves the connected object from the top, + * + * The top edge of the text is adjusted to the top edge of the shape. + * + * The text is positioned above the main line. + */ + TOP = 1, + } + + /** + * The {@link AccessibleDrawDocumentView} service is implemented by views of Draw and Impress documents. + * + * An object that implements the {@link AccessibleDrawDocumentView} service provides information about the view of a Draw or Impress document in one of + * the various view modes. With its children it gives access to the current page and the shapes on that page. + * + * This service gives a simplified view on the underlying document. It tries both to keep the structure of the accessibility representation tree as + * simple as possible and provide as much relevant information as possible. This has the following consequences: 1. Only the current draw page and only + * the visible shapes are accessible. To switch to another page or to access shapes that lie outside the currently visible area, the user has to issue + * these requests manually or programmatically through the usual channels, e.g. pressing keys or selecting menu entries. 2. The hierarchy exposed through + * the {@link com.sun.star.accessibility.XAccessibleContext} interface does not necessarily correspond directly to the underlying draw page structure. + * Internal nodes in this hierarchy are introduced by group shapes, 3D scenes, and OLE objects. 3. The view modes editing view, outline view, slides + * view, notes view, handout view, and presentation view are not exposed explicitly. However, if there happens to be a view mode change which results in + * a rearrangement of the visible shapes, the user gets notified of this. + * @since OOo 1.1.2 + */ + interface AccessibleDrawDocumentView extends accessibility.XAccessible, accessibility.XAccessibleContext, accessibility.XAccessibleComponent { } + + /** + * The service describes the accessible graph controls that are used in the image map of the Draw and Impress applications and the contour dialog of the + * Writer application. + * + * The children of graph controls are shapes that define contours. + * @since OOo 1.1.2 + */ + interface AccessibleGraphControl extends accessibility.XAccessible, accessibility.XAccessibleContext, accessibility.XAccessibleComponent, + accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleSelection { } + + /** + * The {@link AccessibleGraphicShape} service is implemented by the graphic object shapes shapes {@link com.sun.star.drawing.GraphicObjectShape} and + * {@link com.sun.star.presentation.GraphicObjectShape} . + * + * It differs from the included {@link AccessibleShape} "base" service by the additional support of the {@link + * com.sun.star.accessibility.XAccessibleImage} interface. + * @since OOo 1.1.2 + */ + interface AccessibleGraphicShape extends AccessibleShape, accessibility.XAccessibleImage { } + + /** + * The accessible view of an image bullet. + * @since OOo 1.1.2 + */ + interface AccessibleImageBullet extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent { } + + /** + * The {@link AccessibleOLEShape} service is implemented by OLE shapes. + * + * This includes generic OLE shapes, frames, plug-ins, and applets. + * + * This service supports the additional {@link com.sun.star.accessibility.XAccessibleAction} interface. + * + * OLE objects are handled as place holders. While not activated the accessible OLE shape is the only indicator of the OLE object's existence. When an + * OLE object has been activated then the accessibility tree representing it (as far as that is available) is included directly under the accessible + * document view and not under the OLE object. This is due to underlying implementation constraints and may change in the future. + * @since OOo 1.1.2 + */ + interface AccessibleOLEShape extends AccessibleShape, accessibility.XAccessibleAction { } + + /** + * The {@link AccessibleShape} service is implemented by UNO shapes to provide accessibility information that describe the shape's features. A UNO shape + * is any object that implements the {@link com.sun.star.drawing.XShape} interface. + * + * The content of a draw page is modelled as tree of accessible shapes and accessible text paragraphs. The root of this (sub-)tree is the accessible draw + * document view. An accessible shape implements either this service or one of the "derived" services {@link AccessibleGraphicShape} or {@link + * AccessibleOLEShape} . See the section Children in the description of the {@link com.sun.star.accessibility.XAccessibleContext} interface support for + * more details. + * + * There are two services that extend this one: the {@link AccessibleGraphicShape} and the {@link AccessibleOLEShape} services provide additional + * interfaces. See there for details. + * + * A shape object is either fully or partially visible on the screen or has set the {@link com.sun.star.accessibility.AccessibleStateType.DEFUNC} state + * to indicate that it is no longer actively supported by its parent. + * + * Each shape object that has not set the DEFUNC state has a valid parent. That is either the containing draw page or a group shape or a 3D scene object. + * @since OOo 1.1.2 + */ + interface AccessibleShape extends accessibility.XAccessible, accessibility.XAccessibleContext, accessibility.XAccessibleComponent, + accessibility.XAccessibleExtendedComponent { } + + /** + * The {@link AccessibleSlideView} service is implemented by slide views of Impress documents. + * + * An accessible slide view gives access to all visible slides of a slide view. + * @since OOo 1.1.2 + */ + interface AccessibleSlideView extends accessibility.XAccessible, accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, + accessibility.XAccessibleComponent, accessibility.XAccessibleSelection { } + + /** + * The {@link AccessibleSlideViewObject} service is implemented by the slides of the slide view of Impress documents. + * + * An accessible slide view object gives access to one of the visible slides of a slide view. + * @since OOo 1.1.2 + */ + interface AccessibleSlideViewObject extends accessibility.XAccessible, accessibility.XAccessibleContext, accessibility.XAccessibleEventBroadcaster, + accessibility.XAccessibleComponent { } + + /** + * This {@link Shape} encapsulates an applet. + * + * An applet is a small Java-based program that is executed and rendered embedded in a document. + */ + interface AppletShape extends Shape { + /** + * This property specifies one of the following: ; The name of the class file that contains the compiled applet subclass. ; The path to the class, + * including the class file itself. + */ + AppletCode: string; + + /** + * This property specifies the base URI for the applet. + * + * If this property is empty, then it defaults the same base URI as for the current document. + */ + AppletCodeBase: string; + + /** This sequence contains parameters that are passed to the applet when it is initialized. */ + AppletCommands: SafeArray; + + /** This property specifies whether or not the applet can be scripted. */ + AppletIsScript: boolean; + + /** this is an optional name for the applet. */ + AppletName: string; + } + + /** + * This is a point on a Bezier curve. + * + * The two control points specify how the Bezier curve goes through the given position. + * @deprecated Deprecated + */ + interface BezierPoint { + /** This is the position of the first control point. */ + ControlPoint1: awt.Point; + + /** This is the position of the second control point. */ + ControlPoint2: awt.Point; + + /** This is the position of this point. */ + Position: awt.Point; + } + + /** specifies a three-dimensional boundary volume with two positions. */ + interface BoundVolume { + /** this is the maximum position inside the boundary volume. */ + max: Position3D; + + /** this is the minimum position inside the boundary volume. */ + min: Position3D; + } + + /** specifies a three-dimensional camera. */ + interface CameraGeometry { + /** is the camera view direction */ + vpn: Direction3D; + + /** is the camera position */ + vrp: Position3D; + + /** is the camera up direction */ + vup: Direction3D; + } + + /** + * The {@link CaptionShape} represents a rectangular drawing shape with an additional set of lines. It can be used as a description for a fixed point + * inside a drawing. + */ + interface CaptionShape extends Shape, FillProperties, LineProperties, ShadowProperties, Text, RotationDescriptor { + /** This property specifies the escape angle of the line of a caption. It is only used if `CaptionIsFixedAngle` is set to `TRUE` */ + CaptionAngle: number; + + /** This property specifies the absolute escape distance for the line of a caption. */ + CaptionEscapeAbsolute: number; + + /** + * This property specifies the escape direction for the line of a caption. + * @see CaptionEscapeDirection + */ + CaptionEscapeDirection: number; + + /** This property specifies the relative escape distance for the line of a caption. */ + CaptionEscapeRelative: number; + + /** This property specifies the distance between the text area of the caption and the start of the line. */ + CaptionGap: number; + + /** If this property is `TRUE` , the property `CaptionEscapeRelative` is used, else the property `CaptionEscapeAbsolute` is used. */ + CaptionIsEscapeRelative: boolean; + + /** If this property is `TRUE` , the application determines the best possible length for the caption line. */ + CaptionIsFitLineLength: boolean; + + /** + * This property specifies if the escape angle of the line of a caption is fixed or free. If this is set to `FALSE` , the application can choose the best + * possible angle. If not, the value in `CaptionAngle` is used. + */ + CaptionIsFixedAngle: boolean; + + /** This property specifies the length of the caption line. */ + CaptionLineLength: number; + + /** The caption point property specify the position of the point that is captioned. A set of lines are rendered from the caption area. */ + CaptionPoint: awt.Point; + + /** + * This property specifies the geometry of the line of a caption. + * @see CaptionType + */ + CaptionType: number; + + /** This is the radius of the caption area corners. */ + CornerRadius: number; + } + + /** This service is for a closed Bezier shape. */ + interface ClosedBezierShape extends Shape, LineProperties, FillProperties, PolyPolygonBezierDescriptor, Text, ShadowProperties, RotationDescriptor { } + + /** This is a set of properties to describe the style for rendering connector. */ + interface ConnectorProperties { + /** This property contains the kind of the connector. */ + EdgeKind: ConnectorType; + + /** This property contains the horizontal distance of node 1. */ + EdgeNode1HorzDist: number; + + /** This property contains the vertical distance of node 1. */ + EdgeNode1VertDist: number; + + /** This property contains the horizontal distance of node 2. */ + EdgeNode2HorzDist: number; + + /** This property contains the vertical distance of node 2. */ + EdgeNode2VertDist: number; + } + + /** This service is for a {@link ConnectorShape} , a specialized {@link Shape} , which can be connected to other {@link Shapes} or GluePoints. */ + interface ConnectorShape extends Shape, LineProperties, ConnectorProperties, ShadowProperties, Text, RotationDescriptor { + /** This property contains the distance of line 1. */ + EdgeLine1Delta: number; + + /** This property contains the distance of line 2. */ + EdgeLine2Delta: number; + + /** This property contains the distance of line 3. */ + EdgeLine3Delta: number; + + /** + * this is the position of the connectors end point in 100th/mm. For unconnected end points you can get and set the position. For connected end points + * you can only get the position. + */ + EndGluePointIndex: number; + + /** this property holds the index of the glue point the end point of this connector is glued on. */ + EndPosition: awt.Point; + + /** + * this property either holds the shape that the end point of this connector is connected to, or is empty when the end point of the connector is not + * connected to a shape. + */ + EndShape: XShape; + + /** this property holds the index of the glue point the start point of this connector is glued on. */ + StartGluePointIndex: number; + + /** + * this is the position of the connectors start point in 100th/mm. For unconnected start points you can get and set the position. For connected start + * points you can only get the position. + */ + StartPosition: awt.Point; + + /** + * this property either holds the shape that the start point of this connector is connected to, or is empty when the start point of the connector is not + * connected to a shape. + */ + StartShape: XShape; + } + + /** + * This service is for a {@link Shape} which contains a control. + * @see Shape + * @see XControlShape + */ + interface ControlShape extends Shape, XControlShape { } + + /** This service is for a {@link CustomShape} */ + interface CustomShape extends Shape, FillProperties, LineProperties, ShadowProperties, Text, RotationDescriptor { + /** This property can be used to store data that the {@link CustomShapeEngine} may use for rendering */ + CustomShapeData: string; + + /** This property contains the {@link CustomShapeEngine} service name that has to be used for rendering. */ + CustomShapeEngine: string; + + /** + * This property describes the geometry of the {@link CustomShape} . The {@link CustomShapeEngine} that is used should be able to get on with the content + * of this property. + * + * If the {@link CustomShapeEngine} property is "com.sun.star.drawing.EnhancedCustomShapeEngine", then this property is containing properties as they are + * specified in the service {@link com.sun.star.drawing.EnhancedCustomShapeGeometry} + */ + CustomShapeGeometry: SafeArray; + + /** This property describes the URL to a replacement graphic that could be displayed if the {@link CustomShape} engine is not available. */ + CustomShapeReplacementURL: string; + } + + /** This service is for a {@link CustomShape} */ + interface CustomShapeEngine extends lang.XInitialization, XCustomShapeEngine { } + + /** + * This is a set of properties to access the defaults of a drawing document + * @see DrawingDocumentFactory + */ + interface Defaults extends TextProperties, LineProperties, FillProperties, ShadowProperties, ConnectorProperties, MeasureProperties { } + + /** specifies a 3-dimensional vector. */ + interface Direction3D { + DirectionX: number; + DirectionY: number; + DirectionZ: number; + } + + /** describes properties that apply to the whole drawing document. */ + interface DocumentSettings extends document.Settings, document.HeaderFooterSettings, beans.XPropertySet { + /** enables or disables the fitting of the page to the printable area during print */ + IsPrintFitPage: boolean; + + /** if this is true and the paper size for printing is larger than the paper size of the printer than the content is tiled over multiple pages. */ + IsPrintTilePage: boolean; + + /** This is the default logical measure unit that is used for string formatting inside the document, f.e. the measure text */ + MeasureUnit: number; + + /** is the number format used for page number fields */ + PageNumberFormat: number; + + /** + * If this is true, the distance between two paragraphs is the sum of ParaTopMargin of the previous and ParaBottomMargin of the next paragraph. If false, + * only the greater of the two is chosen. + */ + ParagraphSummation: boolean; + + /** is the denominator for the logical scale of the document */ + ScaleDenominator: number; + + /** is the numerator for the logical scale of the document */ + ScaleNumerator: number; + } + + /** This component integrates a view to a {@link DrawPages} or {@link MasterPage} from a {@link DrawingDocument} . */ + interface DrawingDocumentDrawView extends frame.Controller, awt.XWindow, view.XFormLayerAccess, XDrawView, beans.XPropertySet, view.XSelectionSupplier { + /** This is the drawing page that is currently visible. */ + CurrentPage: XDrawPage; + + /** If the view is in layer mode, the user can modify the layer of the model of this view in the user interface. */ + IsLayerMode: boolean; + + /** If the view is in master page mode, the view shows the master pages of this model. */ + IsMasterPageMode: boolean; + + /** + * defines the offset from the top left position of the displayed page to the top left position of the view area in 100th/mm. + * @since OOo 1.1.2 + */ + ViewOffset: awt.Point; + + /** This is the area that is currently visible. */ + VisibleArea: awt.Rectangle; + + /** + * This property defines the zoom type for the document. + * @see com.sun.star.view.DocumentZoomType Note: After setting other types then {@link com.sun.star.view.DocumentZoomType.BY_VALUE} , implementations may + * @since OOo 1.1.2 + */ + ZoomType: number; + + /** + * Defines the zoom value to use. Valid only if the ZoomType is set to {@link com.sun.star.view.DocumentZoomType.BY_VALUE} . + * @since OOo 1.1.2 + */ + ZoomValue: number; + } + + /** + * This service specifies a page for the actual draw pages to contain the drawings. + * @see GenericDrawPage + * @see DrawPages + */ + interface DrawPage extends GenericDrawPage, XMasterPageTarget, form.XFormsSupplier { } + + /** + * provides access to a container of {@link DrawPages} and makes it possible for you to manipulate them. + * @see XDrawPagesSupplier + * @see DrawingDocument + */ + interface DrawPages extends XDrawPages, XDrawPageSummarizer, XDrawPageExpander { } + + /** This service is for an ellipse or circle shape. */ + interface EllipseShape extends Shape, LineProperties, FillProperties, Text, ShadowProperties, RotationDescriptor { + /** If the kind specifies an open circle, this is the end angle. */ + CircleEndAngle: number; + + /** This is the kind of circle. */ + CircleKind: CircleKind; + + /** If the kind specifies an open circle, this is the start angle. */ + CircleStartAngle: number; + } + + /** specifies a single AdjustmentValue */ + interface EnhancedCustomShapeAdjustmentValue { + /** optional name, used by pptx import/export for custom shape presets */ + Name: string; + State: beans.PropertyState; + + /** the any can be of type long or double */ + Value: any; + } + + /** This service may be represented by a {@link com.sun.star.beans.PropertyValue} []. */ + interface EnhancedCustomShapeExtrusion { + /** This attribute specifies the brightness of a scene in percent. */ + Brightness: number; + + /** + * The first value of {@link EnhancedCustomShapeParameterPair} specifies the depth of the extrusion in 1/100 mm. The second value (0.0 to 1.0) specifies + * the fraction of the extrusion that lies before the shape, a value of 0 is default. + */ + Depth: EnhancedCustomShapeParameterPair; + + /** This attribute specifies the amount of diffusion reflected by the shape in percent */ + Diffusion: number; + + /** This property specifies if extrusion is displayed. The default for this property is "false" */ + Extrusion: boolean; + + /** This attribute specifies if the "SecondFillColor" is used as extrusion color */ + ExtrusionColor: boolean; + + /** Specifies the direction of the first light. */ + FirstLightDirection: Direction3D; + + /** Specifies if the primary light is harsh. */ + FirstLightHarsh: boolean; + + /** Specifies the intensity for the first light in percent. */ + FirstLightLevel: number; + + /** Specifies if the front face of the extrusion responds to lightning changes. */ + LightFace: boolean; + + /** Specifies if the surface of the extrusion object looks like metal. */ + Metal: boolean; + + /** Specifies the number of line segments that should be used to display curved surfaces. The higher the number the more line segments are used. */ + NumberOfLineSegments: number; + + /** This attribute specifies the origin within the bounding box of the shape in terms of the shape size fractions. */ + Origin: EnhancedCustomShapeParameterPair; + + /** This property defines the projection mode. */ + ProjectionMode: ProjectionMode; + + /** + * This attributes specifies the rotation angle about the x-axis in grad. The order of rotation is: z-axis, y-axis and then x-axis. The z-axis is + * specified by the draw:rotate-angle. + */ + RotateAngle: EnhancedCustomShapeParameterPair; + + /** + * This attribute specifies the position of the rotate center in terms of shape size fractions, if the property is omitted, then the geometrical center + * of the shape is used (this is the default). + */ + RotationCenter: Direction3D; + + /** Specifies the direction of the second light. */ + SecondLightDirection: Direction3D; + + /** Specifies if the secondary light is harsh. */ + SecondLightHarsh: boolean; + + /** Specifies the intensity for the second light in percent. */ + SecondLightLevel: number; + + /** This property defines the shade mode. */ + ShadeMode: ShadeMode; + + /** The draw:extrusion-shininess specifies the shininess of a mirror in percent. */ + Shininess: number; + + /** + * The first value of the draw:extrusion-skew attribute specifies the skew amount of an extrusion in percent. The second parameter specifies the + * skew-angle. Skew settings are only applied if the attribute ProjectionMode is ProjectionMode_PARALLEL. + */ + Skew: EnhancedCustomShapeParameterPair; + + /** This attribute specifies the specularity of an extrusion object in percent. */ + Specularity: number; + + /** This attribute specifies the viewpoint of the observer. */ + ViewPoint: Position3D; + } + + /** This service may be represented by a {@link com.sun.star.beans.PropertyValue} []. */ + interface EnhancedCustomShapeGeometry { + /** This property specifies a sequence of Adjustment values. */ + AdjustmentValues: SafeArray; + + /** + * This property is describing the equations that are used, each equation can be referenced by {@link com.sun.star.drawing.EnhancedCustomShapeParameter} + * which are often used in Path, Extrusion and or Handle descriptions. + */ + Equations: SafeArray; + + /** + * This property sequence is including the extrusion description, the properties are as same as specified in the service {@link com.sun.star} : {@link + * drawing.EnhancedCustomShapeExtrusion} + */ + Extrusion: SafeArray; + + /** + * This property is describing the interaction handles that are used, each inner property sequence is having the same properties as they are specified in + * the service {@link com.sun.star} : {@link drawing.EnhancedCustomShapeHandle} + */ + Handles: SafeArray; + + /** This property specifies if the orientation of the shape is horizontal mirrored. */ + MirroredX: boolean; + + /** This property specifies if the orientation of the shape is vertical mirrored. */ + MirroredY: boolean; + + /** + * This property sequence is including the path description, the properties are as same as specified in the service {@link com.sun.star} : {@link + * drawing.EnhancedCustomShapePath} + */ + Path: SafeArray; + + /** + * This property sequence is including the text path description, the properties are as same as specified in the service {@link com.sun.star} : {@link + * drawing.EnhancedCustomShapeTextPath} + */ + TextPath: SafeArray; + + /** This property specifies the text rotation angle in degrees. The text rotation is added to the shape geometry rotation. */ + TextRotateAngle: number; + + /** + * The Type attribute contains the name of a shape type. This name can be used to offer specialized user interfaces for certain classes of shapes, like + * for arrows, smileys, etc. The shape type is rendering engine dependent and does not influence the geometry of the shape. If the value of the draw:type + * attribute is non-primitive, then no shape type is available. + */ + Type: string; + + /** This property describes the user space of the shape in its canonical form */ + ViewBox: awt.Rectangle; + } + + /** This service may be represented by a {@link com.sun.star.beans.PropertyValue} []. */ + interface EnhancedCustomShapeHandle { + /** Specifies if the x position of the handle is mirrored. */ + MirroredX: boolean; + + /** Specifies if the y position of the handle is mirrored. */ + MirroredY: boolean; + + /** + * If this attribute is set, the handle is a polar handle. The property specifies the center position of the handle. If this attribute is set, the + * attributes RangeX and RangeY are ignored, instead the attribute RadiusRange is used. + */ + Polar: EnhancedCustomShapeParameterPair; + + /** + * If the property Polar is set, then the first value specifies the radius and the second parameter the angle of the handle. Otherwise, if the handle is + * not polar, the first parameter specifies the horizontal handle position, the vertical handle position is described by the second parameter. + */ + Position: EnhancedCustomShapeParameterPair; + + /** If this attribute is set, it specifies the maximum radius range that can be used for a polar handle. */ + RadiusRangeMaximum: EnhancedCustomShapeParameter; + + /** If this attribute is set, it specifies the minimum radius range that can be used for a polar handle. */ + RadiusRangeMinimum: EnhancedCustomShapeParameter; + + /** If the attribute RangeXMaximum is set, it specifies the horizontal maximum range of the handle. */ + RangeXMaximum: EnhancedCustomShapeParameter; + + /** If the attribute RangeXMinimum is set, it specifies the horizontal minimum range of the handle. */ + RangeXMinimum: EnhancedCustomShapeParameter; + + /** If the attribute RangeYMaximum is set, it specifies the vertical maximum range of the handle. */ + RangeYMaximum: EnhancedCustomShapeParameter; + + /** If the attribute RangeYMinimum is set, it specifies the vertical minimum range of the handle. */ + RangeYMinimum: EnhancedCustomShapeParameter; + + /** RefAngle, if this attribute is set, it specifies the index of the adjustment value which is connected to the angle of the handle */ + RefAngle: number; + + /** RefR, if this attribute is set, it specifies the index of the adjustment value which is connected to the radius of the handle */ + RefR: number; + + /** RefX, if this attribute is set, it specifies the index of the adjustment value which is connected to the horizontal position of the handle */ + RefX: number; + + /** RefY, if this attribute is set, it specifies the index of the adjustment value which is connected to the vertical position of the handle */ + RefY: number; + + /** Specifies if the handle directions are swapped if the shape is taller than wide. */ + Switched: boolean; + } + + /** specifies a single value which is used with EnhancedCustomShapes */ + interface EnhancedCustomShapeParameter { + Type: number; + + /** the any can be of type long or double */ + Value: any; + } + + /** specifies the coordinates used with EnhancedCustomShapes */ + interface EnhancedCustomShapeParameterPair { + First: EnhancedCustomShapeParameter; + Second: EnhancedCustomShapeParameter; + } + + /** This service may be represented by a {@link com.sun.star.beans.PropertyValue} []. */ + interface EnhancedCustomShapePath { + /** This property specifies if this shape supports concentric gradient fill. The default is false. */ + ConcentricGradientFillAllowed: boolean; + + /** This property is specifying the points that makes the geometry of the shape */ + Coordinates: SafeArray; + + /** This property specifies if this shape supports the {@link EnhancedCustomShapeExtrusion} properties. The default is true. */ + ExtrusionAllowed: boolean; + + /** This property specifies {@link GluePoint} leaving directions. */ + GluePointLeavingDirections: SafeArray; + + /** This property specifies custom glue points */ + GluePoints: SafeArray; + + /** + * This property defines the {@link GluePoint} type. The values that can be used are specified in {@link + * com.sun.star.drawing.EnhancedCustomShapeGluePointType} + */ + GluePointType: number; + + /** This property specifies the commands and the way the Coordinates have to be interpreted. */ + Segments: SafeArray; + + /** This property specifies the horizontal StretchPoint that has to be used. No stretching is used if this property is omitted. */ + StretchX: number; + + /** This property specifies the vertical StretchPoint that has to be used. No stretching is used if this property is omitted. */ + StretchY: number; + + /** This property specifies view size per sub path */ + SubViewSize: SafeArray; + + /** + * This property specifies the text frames that can be used with the shape. In general the first text frame is used, except the shape is containing + * vertical text, then the object tries to use the second text frame. The default text frame will be as big as the shape. + */ + TextFrames: SafeArray; + + /** This property specifies if this shape supports concentric gradient fill. The default is false; */ + TextPathAllowed: boolean; + } + + interface EnhancedCustomShapeSegment { + Command: number; + Count: number; + } + + /** specifies the coordinates used with EnhancedCustomShapes */ + interface EnhancedCustomShapeTextFrame { + BottomRight: EnhancedCustomShapeParameterPair; + TopLeft: EnhancedCustomShapeParameterPair; + } + + /** This service may be represented by a {@link com.sun.star.beans.PropertyValue} []. */ + interface EnhancedCustomShapeTextPath { + /** This property specifies if the text is scaled using the shape path. */ + ScaleX: boolean; + + /** This property specifies if a text path is used. The default is false. */ + TextPath: boolean; + + /** This property specifies how the text is drawn. */ + TextPathMode: EnhancedCustomShapeTextPathMode; + } + + /** This is a set of properties to describe the style for rendering an area. */ + interface FillProperties { + /** if this is `TRUE` , the transparent background of a hatch filled area is drawn in the current background color. */ + FillBackground: boolean; + + /** If the property {@link FillStyle} is set to FillStyle::BITMAP, this is the bitmap used. */ + FillBitmap: awt.XBitmap; + + /** + * specifies if the size is given in percentage or as an absolute value. + * + * If this is `TRUE` , the properties {@link FillBitmapSizeX} and {@link FillBitmapSizeY} contain the size of the tile in percent of the size of the + * original bitmap. If this is `FALSE` , the size of the tile is specified with 1/100th mm. + */ + FillBitmapLogicalSize: boolean; + + /** + * this enum selects how a area is filled with a single bitmap. + * + * This property corresponds to the properties {@link FillBitmapStretch} and {@link FillBitmapTile} . + * + * If set to BitmapMode::REPEAT, the property FillBitmapStretch is set to `FALSE` , and the property FillBitmapTile is set to `TRUE` . + * + * If set to BitmapMode::STRETCH, the property FillBitmapStretch is set to `TRUE` , and the property FillBitmapTile is set to `FALSE` . + * + * If set to BitmapMode::NO_REPEAT, both properties FillBitmapStretch and FillBitmapTile are set to `FALSE` . + */ + FillBitmapMode: BitmapMode; + + /** If the property {@link FillStyle} is set to FillStyle::BITMAP, this is the name of the used fill bitmap style. */ + FillBitmapName: string; + + /** Every second line of tiles is moved the given percent of the width of the bitmap. */ + FillBitmapOffsetX: number; + + /** Every second row of tiles is moved the given percent of the height of the bitmap. */ + FillBitmapOffsetY: number; + + /** + * This is the horizontal offset where the tile starts. + * + * It is given in percent in relation to the width of the bitmap. + */ + FillBitmapPositionOffsetX: number; + + /** + * This is the vertical offset where the tile starts. + * + * It is given in percent in relation to the height of the bitmap. + */ + FillBitmapPositionOffsetY: number; + + /** The RectanglePoint specifies the position inside of the bitmap to use as the top left position for rendering. */ + FillBitmapRectanglePoint: RectanglePoint; + + /** + * This is the width of the tile for filling. + * + * Depending on the property {@link FillBitmapLogicalSize} , this is either relative or absolute. + */ + FillBitmapSizeX: number; + + /** + * This is the height of the tile for filling. + * + * Depending on the property {@link FillBitmapLogicalSize} , this is either relative or absolute. + */ + FillBitmapSizeY: number; + + /** + * if set, the fill bitmap is stretched to fill the area of the shape. + * + * This property should not be used anymore and is included here for completeness. The {@link FillBitmapMode} property can be used instead to set all + * supported bitmap modes. + * + * If set to `TRUE` , the value of the FillBitmapMode property changes to BitmapMode::STRETCH. BUT: behavior is undefined, if the property {@link + * FillBitmapTile} is `TRUE` too. + * + * If set to `FALSE` , the value of the FillBitmapMode property changes to BitmapMode::REPEAT or BitmapMode::NO_REPEAT, depending on the current value of + * the {@link FillBitmapTile} property. + */ + FillBitmapStretch: boolean; + + /** + * if set, the fill bitmap is repeated to fill the area of the shape. + * + * This property should not be used anymore and is included here for completeness. The {@link FillBitmapMode} property can be used instead to set all + * supported bitmap modes. + * + * If set to `TRUE` , the value of the FillBitmapMode property changes to BitmapMode::REPEAT. BUT: behavior is undefined, if the property {@link + * FillBitmapStretch} is `TRUE` too. + * + * If set to `FALSE` , the value of the FillBitmapMode property changes to BitmapMode::STRETCH or BitmapMode::NO_REPEAT, depending on the current value + * of the {@link FillBitmapStretch} property. + */ + FillBitmapTile: boolean; + + /** If the property {@link FillStyle} is set to FillStyle::BITMAP, this is a URL to the bitmap used. */ + FillBitmapURL: string; + + /** If the property {@link FillStyle} is set to FillStyle::SOLID, this is the color used. */ + FillColor: util.Color; + + /** If the property {@link FillStyle} is set to FillStyle::GRADIENT, this describes the gradient used. */ + FillGradient: awt.Gradient; + + /** If the property {@link FillStyle} is set to FillStyle::GRADIENT, this is the name of the used fill gradient style. */ + FillGradientName: string; + + /** If the property {@link FillStyle} is set to FillStyle::HATCH, this describes the hatch used. */ + FillHatch: Hatch; + + /** If the property {@link FillStyle} is set to FillStyle::HATCH, this is the name of the used fill hatch style. */ + FillHatchName: string; + + /** This enumeration selects the style the area will be filled with. */ + FillStyle: FillStyle; + + /** + * This is the transparence of the filled area. + * + * This property is only valid if the property {@link FillStyle} is set to FillStyle::SOLID. + */ + FillTransparence: number; + + /** This describes the transparency of the fill area as a gradient. */ + FillTransparenceGradient: awt.Gradient; + + /** + * If a gradient is used for transparency, this is the name of the used transparence gradient style or it is empty. If you set the name of a transparence + * gradient style contained in the document, this style used. + */ + FillTransparenceGradientName: string; + + /** + * contains the cropping of the object. + * + * If the property {@link FillBitmapMode} is set to BitmapMode::STRETCH, this is the cropping, otherwise it is empty. + * @see com.sun.star.text.GraphicCrop + * @since LibreOffice 4.3 + */ + GraphicCrop: text.GraphicCrop; + } + + /** + * specifies a document which consists of multiple pages with drawings. + * + * Because its function is needed more than once, its defined as generic one. + */ + interface GenericDrawingDocument extends document.OfficeDocument, lang.XMultiServiceFactory, beans.XPropertySet, XDrawPageDuplicator, XDrawPagesSupplier, + XMasterPagesSupplier, XLayerSupplier, style.XStyleFamiliesSupplier { + addEventListener(Listener: document.XEventListener | lang.XEventListener): void; + + /** contains the identifier of the default locale of the document. */ + CharLocale: lang.Locale; + + /** This property gives the XForbiddenCharacters. */ + ForbiddenCharacters: i18n.XForbiddenCharacters; + removeEventListener(Listener: document.XEventListener | lang.XEventListener): void; + + /** This property specifies the length between the default tab stops inside text in this document in 1/100th mm. */ + TabStop: number; + + /** if this document is an OLE client, this is the current visible area in 100th mm */ + VisibleArea: awt.Rectangle; + } + + /** + * This abstract service is implemented by every page of a {@link DrawingDocument} . + * + * Example to create and insert a couple of LineShapes: + * + * {{program example here, see documentation}} + */ + interface GenericDrawPage extends XShapes, XShapeGrouper, XShapeCombiner, XShapeBinder, container.XNamed, beans.XPropertySet { + /** This is the border at the bottom. */ + BorderBottom: number; + + /** This is the border at the left. */ + BorderLeft: number; + + /** This is the border at the right. */ + BorderRight: number; + + /** This is the border at the top. */ + BorderTop: number; + + /** This is the height. */ + Height: number; + + /** + * this property is true if the averaged background filling colors luminance is belove an application specified threshold value. This can be used to + * determine the actual value of an auto color. + */ + IsBackgroundDark: boolean; + + /** + * this index access defines a navigation order for the top level shapes inside this page. By default this is equal to the index access of the slide + * itself, making the z-order the default navigation order for top level shapes. + */ + NavigationOrder: container.XIndexAccess; + + /** This is the number of this page, starting with 1. */ + Number: number; + + /** This is the orientation of this page. */ + Orientation: view.PaperOrientation; + + /** + * this property stores xml attributes. They will be saved to and restored from automatic styles inside xml files. + * @see com.sun.star.xml.AttributeContainer + */ + UserDefinedAttributes: container.XNameContainer; + + /** This is the width. */ + Width: number; + } + + /** + * A {@link GluePoint} could be attached to a shape or to a page. + * + * If a {@link GluePoint} is attached to a shape, it is moved when the shape moves. The ends of connectors can be attached to {@link GluePoint} . + * @deprecated Deprecated + * @see GluePoint2 + */ + interface GluePoint { + /** The alignment of a `GluePoint` defines how the position of the point is affected by resizing the parent `Shape` . */ + Alignment: number; + + /** This is the direction in which the connector line leaves the {@link GluePoint} . */ + EscapeDirection: number; + + /** This is the position of this {@link GluePoint} . */ + Position: awt.Point; + + /** If this is `TRUE` , then the position of this {@link GluePoint} is absolute on a page and is not relative to a shape. */ + PositionAbsolute: boolean; + } + + /** + * This struct defines the attributes of a glue point. + * + * A glue point is a position inside a drawing shape where an edge of a connector shape can be connected. + */ + interface GluePoint2 { + /** this member specifies the escape direction for a glue point. The escape direction is the direction the connecting line escapes the shape. */ + Escape: EscapeDirection; + + /** if this flag is set to true, the position of this glue point is given in 1/100% values instead of 1/100cm. */ + IsRelative: boolean; + + /** + * if this flag is set to false, this is a default glue point. Some shapes may have default glue points attached to them which cannot be altered or + * removed. + */ + IsUserDefined: boolean; + + /** This is the position of this glue point. Depending on the flag `IsRelative` , this is either in 1/100cm or in 1/100%. */ + Position: awt.Point; + + /** + * if this glue points position is not relative, this enum specifies the vertical and horizontal alignment of this point. The alignment specifies how the + * glue point is moved if the shape is resized. + */ + PositionAlignment: Alignment; + } + + /** + * represents a general error graphic filter exception. It can be used to transport the error code information. E.g. that can be useful for interactions. + * @since OOo 3.0 + */ + interface GraphicFilterRequest extends uno.Exception { + /** specifies the error code. */ + ErrCode: number; + } + + /** This service is for a graphic shape. */ + interface GraphicObjectShape extends Shape, Text, ShadowProperties, RotationDescriptor { + /** If this property is set, the blue channel of this graphic shape is adjusted by the given signed percent value. */ + AdjustBlue: number; + + /** If this property is set, the contrast of this graphic shape is adjusted by the given signed percent value. */ + AdjustContrast: number; + + /** If this property is set, the green channel of this graphic shape is adjusted by the given signed percent value. */ + AdjustGreen: number; + + /** If this property is set, the luminance of this graphic shape is adjusted by the given signed percent value. */ + AdjustLuminance: number; + + /** If this property is set, the red channel of this graphic shape is adjusted by the given signed percent value. */ + AdjustRed: number; + + /** If this property is set, the gamma value of this graphic shape is adjusted by the given value. */ + Gamma: number; + + /** This is the graphic that represents this graphic shape */ + Graphic: graphic.XGraphic; + + /** This property selects the color mode that is used for rendering. */ + GraphicColorMode: ColorMode; + + /** Deprecated. Use graphic property instead! This is the bitmap that represents this graphic shape. */ + GraphicObjectFillBitmap: awt.XBitmap; + + /** This is an url to the stream ("in document" or linked graphic) for this graphic shape. */ + GraphicStreamURL: string; + + /** This is an url to the source bitmap for this graphic shape. */ + GraphicURL: string; + + /** + * This property contains a image map for this graphic. + * @see com.sun.star.image.ImageMap + */ + ImageMap: container.XIndexContainer; + + /** + * If this property is set, the transparency value of this graphic shape is adjusted by the given unsigned percent value. 100% is fully transparent, 0% + * is fully opaque. + */ + Transparency: number; + } + + /** + * This service is for a group of {@link Shapes} . + * @see XShapeGroup + * @see XShapes + */ + interface GroupShape extends Shape, XShapeGroup, XShapes { } + + /** + * This struct defines the appearance of a hatch. + * + * A hatch is a texture made of straight lines. + */ + interface Hatch { + /** You can rotate the lines of the hatch with this angle. */ + Angle: number; + + /** This is the color of the hatch lines. */ + Color: util.Color; + + /** This is the distance between the lines in the hatch. */ + Distance: number; + + /** The HatchStyle defines the kind of lines used to draw this hatch. */ + Style: HatchStyle; + } + + /** specifies a homogeneous matrix by three homogeneous lines */ + interface HomogenMatrix { + Line1: HomogenMatrixLine; + Line2: HomogenMatrixLine; + Line3: HomogenMatrixLine; + Line4: HomogenMatrixLine; + } + + /** specifies a homogeneous matrix by three homogeneous lines */ + interface HomogenMatrix3 { + Line1: HomogenMatrixLine3; + Line2: HomogenMatrixLine3; + Line3: HomogenMatrixLine3; + } + + /** specifies a homogeneous matrix by four homogeneous lines. */ + interface HomogenMatrix4 { + Line1: HomogenMatrixLine4; + Line2: HomogenMatrixLine4; + Line3: HomogenMatrixLine4; + Line4: HomogenMatrixLine4; + } + + /** specifies a single line for a {@link HomogenMatrix} . */ + interface HomogenMatrixLine { + Column1: number; + Column2: number; + Column3: number; + Column4: number; + } + + /** specifies a single line for a {@link HomogenMatrix3} . */ + interface HomogenMatrixLine3 { + Column1: number; + Column2: number; + Column3: number; + } + + /** specifies a single line for a {@link HomogenMatrix4} . */ + interface HomogenMatrixLine4 { + Column1: number; + Column2: number; + Column3: number; + Column4: number; + } + + /** + * A layer is an entity inside a document which contains shapes. + * + * There could be zero or more {@link Shapes} attached to such a layer. + * + * The properties of a {@link Layer} instance affect all {@link Shapes} attached to the {@link Layer} . + * @see DrawingDocument + * @see LayerManager + */ + interface Layer extends beans.XPropertySet { + /** If a {@link Layer} is locked, the objects in this {@link Layer} cannot be edited in the user interface. */ + IsLocked: boolean; + + /** If a {@link Layer} is not printable, the objects in this {@link Layer} are not printed. */ + IsPrintable: boolean; + + /** If a {@link Layer} is not visible, the objects in this {@link Layer} are not shown in the user interface. */ + IsVisible: boolean; + + /** The name of a {@link Layer} is used to identify the {@link Layer} in the user interface. */ + Name: string; + } + + /** + * This service is provided by documents to support Layers. + * @see DrawingDocument + */ + interface LayerManager extends XLayerManager, container.XNameAccess { } + + /** A {@link LineDash} defines a non-continuous line. */ + interface LineDash { + /** This is the number of dashes. */ + Dashes: number; + + /** This is the length of a single dash. */ + DashLen: number; + + /** This is the distance between the dots. */ + Distance: number; + + /** This is the length of a dot. */ + DotLen: number; + + /** This is the number of dots in this {@link LineDash} . */ + Dots: number; + + /** This sets the style of this {@link LineDash} . */ + Style: DashStyle; + } + + /** + * This is a set of properties to describe the style for rendering a Line. + * + * The properties for line ends and line starts are only supported by shapes with open line ends. + */ + interface LineProperties { + /** This property defines the rendering of ends of thick lines */ + LineCap: LineCap; + + /** This property contains the line color. */ + LineColor: util.Color; + + /** This property contains the dash of the line. */ + LineDash: LineDash; + + /** This property contains the name of the dash of the line. */ + LineDashName: string; + + /** This property contains the line end in the form of a poly polygon Bezier. */ + LineEnd: PolyPolygonBezierCoords; + + /** If this property is `TRUE` , the line will end in the center of the polygon. */ + LineEndCenter: boolean; + + /** + * This property contains the name of the line end poly polygon Bezier. + * + * If this string is empty, no line end polygon is rendered. + */ + LineEndName: string; + + /** This property contains the width of the line end polygon. */ + LineEndWidth: number; + + /** This property defines the rendering of joints between thick lines */ + LineJoint: LineJoint; + + /** This property contains the line start in the form of a poly polygon Bezier. */ + LineStart: PolyPolygonBezierCoords; + + /** If this property is `TRUE` , the line will start from the center of the polygon. */ + LineStartCenter: boolean; + + /** + * This property contains the name of the line start poly polygon Bezier. + * + * If this string is empty, no line start polygon is rendered. + */ + LineStartName: string; + + /** This property contains the width of the line start polygon. */ + LineStartWidth: number; + + /** This property contains the type of the line. */ + LineStyle: LineStyle; + + /** This property contains the extent of transparency. */ + LineTransparence: number; + + /** This property contains the width of the line in 1/100th mm. */ + LineWidth: number; + } + + /** This service is for a simple {@link Shape} with lines. */ + interface LineShape extends Shape, LineProperties, PolyPolygonDescriptor, Text, ShadowProperties, RotationDescriptor { } + + /** This service describes a {@link MeasureShape} . */ + interface MeasureProperties { + /** If this property is `TRUE` , the measure is drawn below the reference edge instead of above it. */ + MeasureBelowReferenceEdge: boolean; + + /** + * This value is the number of decimal places that is used to format the measure value. + * @since OOo 1.1.2 + */ + MeasureDecimalPlaces: number; + + /** This is the length of the first help line. */ + MeasureHelpLine1Length: number; + + /** This is the length of the second help line. */ + MeasureHelpLine2Length: number; + + /** This is the distance from the measure line to the start of the help lines. */ + MeasureHelpLineDistance: number; + + /** This is the overhang of the two help lines. */ + MeasureHelpLineOverhang: number; + + /** This enumeration specifies the MeasureKind. */ + MeasureKind: MeasureKind; + + /** This is the distance from the reference edge to the measure line. */ + MeasureLineDistance: number; + + /** This is the overhang of the reference line over the help lines. */ + MeasureOverhang: number; + + /** If this is `TRUE` , the unit of measure is shown in the measure text. */ + MeasureShowUnit: boolean; + + /** If this is `TRUE` , the angle of the measure is set automatically. */ + MeasureTextAutoAngle: boolean; + + /** This is the automatic angle. */ + MeasureTextAutoAngleView: number; + + /** This is the fixed angle. */ + MeasureTextFixedAngle: number; + + /** This is the horizontal position of the measure text. */ + MeasureTextHorizontalPosition: MeasureTextHorzPos; + + /** If this value is `TRUE` , the measure has a fixed angle. */ + MeasureTextIsFixedAngle: boolean; + + /** If this value is `TRUE` , the text is rotated 90 degrees. */ + MeasureTextRotate90: boolean; + + /** If this value is `TRUE` , the text is printed upside down. */ + MeasureTextUpsideDown: boolean; + + /** This is the vertical position of the text. */ + MeasureTextVerticalPosition: MeasureTextVertPos; + } + + /** This service is for a dimensioning shape. */ + interface MeasureShape extends Shape, MeasureProperties, LineProperties, Text, ShadowProperties, RotationDescriptor { + /** this point is the end of the measured distance */ + EndPosition: awt.Point; + + /** this point is the start of the measured distance */ + StartPosition: awt.Point; + } + + /** This service is for an OLE shape. */ + interface OLE2Shape extends Shape { + /** + * If you get this property you get the CLSID of the OLE2 document stream contained in this OLE2 shape. If you set it, an empty OLE2 document stream with + * this CLSID is created within this OLE2 shape. + */ + CLSID: string; + + /** This property returns `TRUE` for all OLE2 that are internal Office components. */ + IsInternal: boolean; + + /** + * This is the model for the OLE2 inside this shape. + * + * This property returns an empty reference if the OLE2 is not an Office component. + */ + Model: frame.XModel; + + /** this is the internal storage name that keeps this OLE2 persist. */ + PersistName: string; + } + + /** This service is for an open Bezier shape. */ + interface OpenBezierShape extends Shape, LineProperties, PolyPolygonBezierDescriptor, Text, ShadowProperties, RotationDescriptor { } + + /** + * This service is for a page shape. A page shape displays a preview of another page. These shapes are used inside notes pages to preview the + * corresponding drawing page. They're also used in the handout page to preview the printing position and order of pages + */ + interface PageShape extends Shape { + /** + * this is the page number that is used for the preview. For page shapes on notes pages, this can't be changed. For page shapes on handout pages, this + * value only describes the relative order of the different page shapes on the page. + */ + PageNumber: number; + } + + /** + * This {@link Shape} encapsulates a plugin. + * + * A plugin is a binary object that is plugged into a document to represent a media-type that is not handled natively by the application. + */ + interface PluginShape extends Shape { + /** This sequence contains parameters that are passed to the application that renders the plugin when it is initialized. */ + PluginCommands: SafeArray; + + /** This property specifies the media-type to which this plugin should be registered. */ + PluginMimeType: string; + + /** This property specifies the url to the binary object. */ + PluginURL: string; + } + + /** + * This service is for a polyline shape. + * + * A polyline has one or more straight lines. + */ + interface PolyLineShape extends Shape, LineProperties, PolyPolygonDescriptor, Text, ShadowProperties, RotationDescriptor { } + + /** specifies the coordinates for a poly polygon Bezier. */ + interface PolyPolygonBezierCoords { + Coordinates: PointSequenceSequence; + Flags: FlagSequenceSequence; + } + + /** + * This service describes a polypolygonbezier. + * + * A polypolygonbezier consists of multiple Bezier polygons combined in one. + */ + interface PolyPolygonBezierDescriptor { + /** These are the untransformed Bezier coordinates of this polygon. */ + Geometry: PolyPolygonBezierCoords; + + /** This is the type of this polygon. */ + PolygonKind: PolygonKind; + + /** These are the Bezier points of this polygon. */ + PolyPolygonBezier: PolyPolygonBezierCoords; + } + + /** This service specifies a poly-polygon Bezier shape. */ + interface PolyPolygonBezierShape extends Shape, LineProperties, FillProperties, PolyPolygonBezierDescriptor, Text, ShadowProperties, RotationDescriptor { } + + /** + * This service describes a poly-polygon. + * + * A poly-polygon consists of multiple polygons combined in one. + */ + interface PolyPolygonDescriptor { + /** These are the untransformed points of this polygon. */ + Geometry: PointSequenceSequence; + + /** This is the type of polygon. */ + PolygonKind: PolygonKind; + + /** These are the reference points for this polygon. */ + PolyPolygon: PointSequenceSequence; + } + + /** + * This service is for a polygon shape. + * + * A poly-polygon has 2 or more straight lines, with the first and last point connected by a straight line. + */ + interface PolyPolygonShape extends Shape, LineProperties, FillProperties, PolyPolygonDescriptor, Text, ShadowProperties, RotationDescriptor { } + + /** specifies the coordinates of a 3-dimensional poly polygon. */ + interface PolyPolygonShape3D { + SequenceX: DoubleSequenceSequence; + SequenceY: DoubleSequenceSequence; + SequenceZ: DoubleSequenceSequence; + } + + /** specifies a 3-dimensional point. */ + interface Position3D { + /** the position on the X-Axis in the 3D room in 100th of millimeters */ + PositionX: number; + + /** the position on the Y-Axis in the 3D room in 100th of millimeters */ + PositionY: number; + + /** the position on the Z-Axis in the 3D room in 100th of millimeters */ + PositionZ: number; + } + + /** This service is for a rectangle {@link Shape} . */ + interface RectangleShape extends Shape, FillProperties, LineProperties, Text, ShadowProperties, RotationDescriptor { + /** For {@link Shapes} with rounded corners, this is the radius of the corners. */ + CornerRadius: number; + } + + /** + * This abstract service specifies the general characteristics of an optional rotation and shearing for a {@link Shape} . + * + * This service is deprecated, instead please use the `Transformation` property of the service {@link Shape} . + * @deprecated Deprecated + */ + interface RotationDescriptor { + /** + * This is the angle for rotation of this {@link Shape} . The shape is rotated counter-clockwise around the center of the bounding box. + * + * This property contains an error, the rotation angle is mathematically inverted when You take into account that the Y-Axis of the coordinate system is + * pointing down. Please use the `Transformation` property of the service {@link Shape} instead. + * @deprecated Deprecated + */ + RotateAngle: number; + + /** + * This is the amount of shearing for this {@link Shape} . The shape is sheared counter-clockwise around the center of the bounding box + * @deprecated Deprecated + */ + ShearAngle: number; + } + + /** This is a set of properties to describe the style for rendering a shadow. */ + interface ShadowProperties { + /** + * enables/disables the shadow of a {@link Shape} . + * + * The other shadow properties are only applied if this is set to `TRUE` . + */ + Shadow: boolean; + + /** This is the color of the shadow of this {@link Shape} . */ + ShadowColor: util.Color; + + /** This defines the degree of transparence of the shadow in percent. */ + ShadowTransparence: number; + + /** This is the horizontal distance of the left edge of the {@link Shape} to the shadow. */ + ShadowXDistance: number; + + /** This is the vertical distance of the top edge of the {@link Shape} to the shadow. */ + ShadowYDistance: number; + } + + /** + * This abstract service specifies the general characteristics of all {@link Shapes} . + * @see XShape + * @see com.sun.star.lang.XComponent + * @see com.sun.star.text.XText + * @see ShapeDescriptor + */ + interface Shape extends beans.XPropertySet, XShape, lang.XComponent, XShapeDescriptor, XGluePointsSupplier, beans.XTolerantMultiPropertySet { + /** this property lets you get and set a hyperlink for this shape. */ + Hyperlink: string; + + /** + * Grab bag of shape properties, used as a string-any map for interim interop purposes. + * @since LibreOffice 4.2 This property is intentionally not handled by the ODF filter. Any member that should be handled there should be first moved out + */ + InteropGrabBag: SafeArray; + + /** This is the ID of the {@link Layer} to which this {@link Shape} is attached. */ + LayerID: number; + + /** This is the name of the {@link Layer} to which this {@link Shape} is attached. */ + LayerName: string; + + /** With this set to `TRUE` , this {@link Shape} cannot be moved interactively in the user interface. */ + MoveProtect: boolean; + + /** This is the name of this {@link Shape} . */ + Name: string; + + /** this property stores the navigation order of this shape. If this value is negative, the navigation order for this shapes page is equal to the z-order. */ + NavigationOrder: number; + + /** If this is `FALSE` , the {@link Shape} is not visible on printer outputs. */ + Printable: boolean; + + /** + * contains the relative height of the object. + * + * It is only valid if it is greater than zero. + * @since LibreOffice 4.3 + */ + RelativeHeight: number; + + /** + * contains the relation of the relative height of the object. + * + * It is only valid if RelativeHeight is greater than zero. + * @see com.sun.star.text.RelOrientation + * @since LibreOffice 4.3 + */ + RelativeHeightRelation: number; + + /** + * contains the relative width of the object. + * + * It is only valid if it is greater than zero. + * @since LibreOffice 4.3 + */ + RelativeWidth: number; + + /** + * contains the relation of the relative width of the object. + * + * It is only valid if RelativeWidth is greater than zero. + * @see com.sun.star.text.RelOrientation + * @since LibreOffice 4.3 + */ + RelativeWidthRelation: number; + + /** + * this property stores xml attributes. They will be saved to and restored from automatic styles inside xml files. + * @see com.sun.star.xml.AttributeContainer + */ + ShapeUserDefinedAttributes: container.XNameContainer; + + /** With this set to `TRUE` , this {@link Shape} may not be sized interactively in the user interface. */ + SizeProtect: boolean; + + /** this property lets you get and set a style for this shape. */ + Style: style.XStyle; + + /** + * this property lets you get and set the transformation matrix for this shape. + * + * The transformation is a 3x3 homogeneous matrix and can contain translation, rotation, shearing and scaling. + */ + Transformation: HomogenMatrix3; + + /** + * If this is `FALSE` , the {@link Shape} is not visible on screen outputs. Please note that the {@link Shape} may still be visible when printed, see + * {@link Printable} . + */ + Visible: boolean; + + /** is used to query or change the ZOrder of this {@link Shape} . */ + ZOrder: number; + } + + /** Create preview bitmaps for single slides. */ + interface SlideRenderer extends XSlideRenderer { + /** Create a new {@link SlideRenderer} object. */ + create(): void; + } + + /** + * A slide sorter shows previews for a set of slides, typically all slides in a document, and allows the selection, reordering, creation, and deletion of + * slides. + * + * In the drawing framework a slide sorter is regarded as a view. + */ + interface SlideSorter extends XSlideSorterBase { + /** + * Create a new slide sorter object. + * @param xViewId The resource id of the new slide sorter. + * @param xController The access point to an impress document. + * @param xParentWindow The parent window which will be completely covered by the new slide sorter. + */ + create(xViewId: framework.XResourceId, xController: frame.XController, xParentWindow: awt.XWindow): void; + } + + /** This abstract service specifies the general characteristics of an optional text inside a {@link Shape} . */ + interface Text extends text.XText, TextProperties { } + + /** This is a set of properties to describe the style for rendering the text area inside a shape. */ + interface TextProperties extends style.CharacterProperties, style.CharacterPropertiesAsian, style.CharacterPropertiesComplex, style.ParagraphProperties, + style.ParagraphPropertiesAsian, style.ParagraphPropertiesComplex { + /** If this is `TRUE` , numbering is ON for the text of this {@link Shape} . */ + IsNumbering: boolean; + + /** + * describes the numbering levels. + * + * The different rules accessible with this {@link com.sun.star.container.XIndexReplace} interface are sequences of property values as described in the + * service {@link com.sun.star.style.NumberingRule} . + */ + NumberingRules: container.XIndexReplace; + + /** This is the number of pixels the text is moved in each animation step. */ + TextAnimationAmount: number; + + /** + * This number defines how many times the text animation is repeated. + * + * If this is set to zero, the repeat is endless. + */ + TextAnimationCount: number; + + /** This is the delay in thousandths of a second between each of the animation steps. */ + TextAnimationDelay: number; + + /** This enumeration defines the direction in which the text moves. */ + TextAnimationDirection: TextAnimationDirection; + + /** This value defines the type of animation. */ + TextAnimationKind: TextAnimationKind; + + /** If this value is `TRUE` , the text is visible at the start of the animation. */ + TextAnimationStartInside: boolean; + + /** If this value is `TRUE` , the text is visible at the end of the animation. */ + TextAnimationStopInside: boolean; + + /** If this value is `TRUE` , the height of the {@link Shape} is automatically expanded/shrunk when text is added to or removed from the {@link Shape} . */ + TextAutoGrowHeight: boolean; + + /** If this value is `TRUE` , the width of the {@link Shape} is automatically expanded/shrunk when text is added to or removed from the {@link Shape} . */ + TextAutoGrowWidth: boolean; + + /** If this value is `TRUE` , the left edge of every line of text is aligned with the left edge of this {@link Shape} . */ + TextContourFrame: boolean; + + /** With this set to `TRUE` , the text inside of the {@link Shape} is stretched to fit into the {@link Shape} . */ + TextFitToSize: TextFitToSizeType; + + /** adjusts the horizontal position of the text inside of the {@link Shape} . */ + TextHorizontalAdjust: TextHorizontalAdjust; + + /** + * This is the distance from the left edge of the {@link Shape} to the left edge of the text. + * + * This is only useful if {@link Text.TextHorizontalAdjust} is BLOCK or STRETCH or if Text::TextFitSize is `TRUE` . + */ + TextLeftDistance: number; + + /** + * This is the distance from the lower edge of the {@link Shape} to the lower edge of the text. + * + * This is only useful if {@link Text.TextVerticalAdjust} is BLOCK or if Text::TextFitSize is `TRUE` . + */ + TextLowerDistance: number; + + /** + * with this property you can set the maximum height for a shape with text. On edit, the auto grow feature will not grow the object higher than the value + * of this property. + */ + TextMaximumFrameHeight: number; + + /** + * with this property you can set the maximum width for a shape with text. On edit, the auto grow feature will not grow the objects wider than the value + * of this property. + */ + TextMaximumFrameWidth: number; + + /** + * with this property you can set the minimum height for a shape with text. On edit, the auto grow feature will not shrink the objects height smaller + * than the value of this property. + */ + TextMinimumFrameHeight: number; + + /** + * with this property you can set the minimum width for a shape with text. On edit, the auto grow feature will not shrink the object width smaller than + * the value of this property. + */ + TextMinimumFrameWidth: number; + + /** + * This is the distance from the right edge of the {@link Shape} to the right edge of the text. + * + * This is only useful if {@link Text.TextHorizontalAdjust} is BLOCK or STRETCH or if Text::TextFitSize is `TRUE` . + */ + TextRightDistance: number; + + /** + * This is the distance from the upper edge of the {@link Shape} to the upper edge of the text. + * + * This is only useful if {@link Text.TextVerticalAdjust} is BLOCK or if Text::TextFitSize is `TRUE` . + */ + TextUpperDistance: number; + + /** adjusts the vertical position of the text inside of the {@link Shape} . */ + TextVerticalAdjust: TextVerticalAdjust; + + /** This value selects the writing mode for the text. */ + TextWritingMode: text.WritingMode; + } + + /** This service is for a text shape. */ + interface TextShape extends Shape, FillProperties, LineProperties, ShadowProperties, Text, RotationDescriptor { + /** This is the radius of the corners. */ + CornerRadius: number; + } + + /** @deprecated Deprecated */ + interface XConnectableShape extends uno.XInterface { + canConnect(nPos: awt.Point, bCreateGluePoint: boolean, nMaxDist: number): boolean; + doConnect(nPos: awt.Point, bCreateGluePoint: boolean, nMaxDist: number): boolean; + } + + /** @deprecated Deprecated */ + interface XConnectorShape extends XShape { + /** connects the end of this instance. */ + connectEnd(xShape: XConnectableShape, nPos: ConnectionType): void; + + /** connects the start of this instance */ + connectStart(xShape: XConnectableShape, nPos: ConnectionType): void; + + /** disconnects the given {@link Shape} from the start of this instance. */ + disconnectBegin(xShape: XConnectableShape): void; + + /** disconnects the given {@link Shape} from the end of this instance. */ + disconnectEnd(xShape: XConnectableShape): void; + } + + /** + * is implemented by a {@link ControlShape} to access the controls model. + * @see com.sun.star.drawing.ControlShape + * @see com.sun.star.awt.UnoControlModel + */ + interface XControlShape extends XShape { + /** + * returns the control model of this {@link Shape} . + * @returns if there is already a control model assigned to this {@link ControlShape} , than its returned. Otherwise you get an empty reference. + */ + Control: awt.XControlModel; + + /** + * returns the control model of this {@link Shape} . + * @returns if there is already a control model assigned to this {@link ControlShape} , than its returned. Otherwise you get an empty reference. + */ + getControl(): awt.XControlModel; + + /** + * sets the control model for this {@link Shape} . + * @param xControl this will be the new control model that is displayed with this shape. You may change the model more than once during the lifetime of a { + */ + setControl(xControl: awt.XControlModel): void; + } + + /** The {@link XCustomShapeEngine} */ + interface XCustomShapeEngine extends uno.XInterface { + /** @returns a collection of interaction handles */ + getInteraction(): SafeArray; + + /** @returns the line geometry of the object */ + getLineGeometry(): PolyPolygonBezierCoords; + + /** @returns the text bound of the shape */ + getTextBounds(): awt.Rectangle; + + /** @returns a collection of interaction handles */ + readonly Interaction: SafeArray; + + /** @returns the line geometry of the object */ + readonly LineGeometry: PolyPolygonBezierCoords; + + /** @returns a the shape that is representing the {@link CustomShape} */ + render(): XShape; + + /** @returns the text bound of the shape */ + readonly TextBounds: awt.Rectangle; + } + + /** The {@link XCustomShapeHandle} */ + interface XCustomShapeHandle extends uno.XInterface { + /** + * is getting the actual handle position + * @returns a the actual handle position + */ + getPosition(): awt.Point; + + /** + * is getting the actual handle position + * @returns a the actual handle position + */ + readonly Position: awt.Point; + + /** is setting a new position for the handle */ + setControllerPosition(aPoint: awt.Point): void; + } + + /** makes it possible to duplicate pages within the same document. */ + interface XDrawPageDuplicator extends uno.XInterface { + /** + * creates a duplicate of a {@link DrawPage} or {@link MasterPage} , including the {@link Shapes} on that page and inserts it into the same model. + * @param xPage that is the source {@link DrawPage} or {@link MasterPage} that will be duplicated + * @returns a newly created {@link DrawPage} or {@link MasterPage} that as all properties and copies of all {@link Shapes} from the source page. + */ + duplicate(xPage: XDrawPage): XDrawPage; + } + + /** + * is implemented by documents that can expand the contents of a summary on a {@link DrawPage} into a collection of {@link DrawPages} . + * @deprecated Deprecated + * @see XDrawPageSummarizer + */ + interface XDrawPageExpander extends uno.XInterface { + /** + * creates a collection of {@link DrawPages} from the summary inside the given {@link DrawPage} and adds them to the same model as the source {@link + * DrawPage} . + */ + expand(xPage: XDrawPage): XDrawPages; + } + + /** + * gives access to a container of {@link DrawPages} or {@link MasterPages} . + * + * The pages are stored in an index container. The order is determined by the index. + * + * You usually get this interface if you use the {@link XDrawPagesSupplier} or the {@link XMasterPagesSupplier} at a model that contains {@link + * DrawPages} or {@link MasterPages} + */ + interface XDrawPages extends container.XIndexAccess { + /** + * creates and inserts a new {@link DrawPage} or {@link MasterPage} into this container + * @param nIndex the index at which the newly created {@link DrawPage} or {@link MasterPage} will be inserted. + * @returns the newly created and already inserted {@link DrawPage} or {@link MasterPage} . + */ + insertNewByIndex(nIndex: number): XDrawPage; + + /** + * removes a {@link DrawPage} or {@link MasterPage} from this container. + * @param xPage this {@link DrawPage} or {@link MasterPage} must be contained and will be removed from this container. It will also be disposed and shouldn + */ + remove(xPage: XDrawPage): void; + } + + /** must be supported to provide access to a multi-page drawing-layer. */ + interface XDrawPagesSupplier extends uno.XInterface { + /** @returns an indexed container with the service {@link DrawPages} . */ + readonly DrawPages: XDrawPages; + + /** @returns an indexed container with the service {@link DrawPages} . */ + getDrawPages(): XDrawPages; + } + + /** + * is implemented by documents that can create summaries of their {@link DrawPages} . + * @deprecated Deprecated + */ + interface XDrawPageSummarizer extends uno.XInterface { + /** creates a new {@link DrawPage} with a summary of all {@link DrawPages} in the given collection. */ + summarize(xPages: XDrawPages): XDrawPage; + } + + /** + * represents something that provides a {@link DrawPage} . + * + * This interface is provided if the container only supports exactly one {@link DrawPage} . For containers which support multiple {@link DrawPages} + * interface {@link XDrawPagesSupplier} is supported. + * @deprecated Deprecated + */ + interface XDrawPageSupplier extends uno.XInterface { + /** returns the {@link DrawPage} . */ + readonly DrawPage: XDrawPage; + + /** returns the {@link DrawPage} . */ + getDrawPage(): XDrawPage; + } + + /** + * View dependent part of the Draw and Impress controller. + * + * During the lifetime of an Impress application the {@link com.sun.star.drawing.DrawingDocumentDrawView} changes its sub controllers whenever the view + * in the center pane is replaced by another one. The sub controller handles the things that are not common to all views, i.e. properties, the current + * page/slide, and the selection. + */ + interface XDrawSubController extends XDrawView, view.XSelectionSupplier, beans.XFastPropertySet { } + + /** is implemented by views that display {@link DrawPages} or {@link MasterPages} . */ + interface XDrawView extends uno.XInterface { + /** + * returns the current page. + * @returns the {@link DrawPage} or {@link MasterPage} that is currently displayed. + */ + CurrentPage: XDrawPage; + + /** + * returns the current page. + * @returns the {@link DrawPage} or {@link MasterPage} that is currently displayed. + */ + getCurrentPage(): XDrawPage; + + /** + * changes the current page. + * @param xPage this {@link DrawPage} or {@link MasterPage} will be displayed inside this view. + */ + setCurrentPage(xPage: XDrawPage): void; + } + + interface XEnhancedCustomShapeDefaulter extends uno.XInterface { + /** + * This interface allows to create shape properties for the given "ShapeType". The "ShapeType" string can be empty then the current "ShapeType" of the + * shape is used. "non-primitive", + * + * "rectangle", + * + * "round-rectangle", + * + * "ellipse", + * + * "diamond", + * + * "isosceles-triangle" + * + * "right-triangle", + * + * "parallelogram", + * + * "trapezoid", + * + * "hexagon", + * + * "octagon", + * + * "cross", + * + * "star5", + * + * "right-arrow", + * + * "mso-spt14", + * + * "pentagon-right", + * + * "cube", + * + * "mso-spt17", + * + * "mso-spt18", + * + * "mso-spt19", + * + * "mso-spt20", + * + * "mso-spt21", + * + * "can", + * + * "ring", + * + * "mso-spt24", + * + * "mso-spt25", + * + * "mso-spt26", + * + * "mso-spt27", + * + * "mso-spt28", + * + * "mso-spt29", + * + * "mso-spt30", + * + * "mso-spt31", + * + * "mso-spt32", + * + * "mso-spt33", + * + * "mso-spt34", + * + * "mso-spt35", + * + * "mso-spt36", + * + * "mso-spt37", + * + * "mso-spt38", + * + * "mso-spt39", + * + * "mso-spt40", + * + * "mso-spt41", + * + * "mso-spt42", + * + * "mso-spt43", + * + * "mso-spt44", + * + * "mso-spt45", + * + * "mso-spt46", + * + * "line-callout-1", + * + * "line-callout-2", + * + * "mso-spt49", + * + * "mso-spt50", + * + * "mso-spt51", + * + * "mso-spt52", + * + * "mso-spt53", + * + * "mso-spt54", + * + * "chevron", + * + * "pentagon", + * + * "forbidden", + * + * "star8", + * + * "mso-spt59", + * + * "mso-spt60", + * + * "rectangular-callout", + * + * "round-rectangular-callout", + * + * "round-callout", + * + * "mso-spt64", + * + * "paper", + * + * "left-arrow", + * + * "down-arrow", + * + * "up-arrow", + * + * "left-right-arrow", + * + * "up-down-arrow", + * + * "mso-spt71", + * + * "bang", + * + * "lightning", + * + * "heart", + * + * "mso-spt75", + * + * "quad-arrow", + * + * "left-arrow-callout", + * + * "right-arrow-callout", + * + * "up-arrow-callout", + * + * "down-arrow-callout", + * + * "left-right-arrow-callout", + * + * "up-down-arrow-callout", + * + * "quad-arrow-callout", + * + * "quad-bevel", + * + * "left-bracket", + * + * "right-bracket", + * + * "left-brace", + * + * "right-brace", + * + * "mso-spt89", + * + * "mso-spt90", + * + * "mso-spt91", + * + * "star24", + * + * "striped-right-arrow", + * + * "notched-right-arrow", + * + * "block-arc", + * + * "smiley", + * + * "vertical-scroll", + * + * "horizontal-scroll", + * + * "circular-arrow", + * + * "mso-spt100", + * + * "mso-spt101", + * + * "mso-spt102", + * + * "mso-spt103", + * + * "mso-spt104", + * + * "mso-spt105", + * + * "cloud-callout", + * + * "mso-spt107", + * + * "mso-spt108", + * + * "flowchart-process", + * + * "flowchart-decision", + * + * "flowchart-data", + * + * "flowchart-predefined-process", + * + * "flowchart-internal-storage", + * + * "flowchart-document", + * + * "flowchart-multidocument", + * + * "flowchart-terminator", + * + * "flowchart-preparation", + * + * "flowchart-manual-input", + * + * "flowchart-manual-operation", + * + * "flowchart-connector", + * + * "flowchart-card", + * + * "flowchart-punched-tape", + * + * "flowchart-summing-junction", + * + * "flowchart-or", + * + * "flowchart-collate", + * + * "flowchart-sort", + * + * "flowchart-extract", + * + * "flowchart-merge", + * + * "mso-spt129", + * + * "flowchart-stored-data", + * + * "flowchart-sequential-access", + * + * "flowchart-magnetic-disk", + * + * "flowchart-direct-access-storage", + * + * "flowchart-display", + * + * "flowchart-delay", + * + * "fontwork-plain-text", + * + * "fontwork-stop", + * + * "fontwork-triangle-up", + * + * "fontwork-triangle-down", + * + * "fontwork-chevron-up", + * + * "fontwork-chevron-down", + * + * "mso-spt142", + * + * "mso-spt143", + * + * "fontwork-arch-up-curve", + * + * "fontwork-arch-down-curve", + * + * "fontwork-circle-curve", + * + * "fontwork-open-circle-curve", + * + * "fontwork-arch-up-pour", + * + * "fontwork-arch-down-pour", + * + * "fontwork-circle-pour", + * + * "fontwork-open-circle-pour", + * + * "fontwork-curve-up", + * + * "fontwork-curve-down", + * + * "fontwork-fade-up-and-right", + * + * "fontwork-fade-up-and-left", + * + * "fontwork-wave", + * + * "mso-spt157", + * + * "mso-spt158", + * + * "mso-spt159", + * + * "fontwork-inflate", + * + * "mso-spt161", + * + * "mso-spt162", + * + * "mso-spt163", + * + * "mso-spt164", + * + * "mso-spt165", + * + * "mso-spt166", + * + * "mso-spt167", + * + * "fontwork-fade-right", + * + * "fontwork-fade-left", + * + * "fontwork-fade-up", + * + * "fontwork-fade-down", + * + * "fontwork-slant-up", + * + * "fontwork-slant-down", + * + * "mso-spt174", + * + * "mso-spt175", + * + * "flowchart-alternate-process", + * + * "flowchart-off-page-connector", + * + * "mso-spt178", + * + * "mso-spt179", + * + * "mso-spt180", + * + * "line-callout-3", + * + * "mso-spt182", + * + * "sun", + * + * "moon", + * + * "bracket-pair", + * + * "brace-pair", + * + * "star4", + * + * "mso-spt188", + * + * "mso-spt189", + * + * "mso-spt190", + * + * "mso-spt191", + * + * "mso-spt192", + * + * "mso-spt193", + * + * "mso-spt194", + * + * "mso-spt195", + * + * "mso-spt196", + * + * "mso-spt197", + * + * "mso-spt198", + * + * "mso-spt199", + * + * "mso-spt200", + * + * "mso-spt201", + * + * "mso-spt202", + * + * + * + * SJ: following shape types can't be created with this method, they are part of the gallery (soon they also will be added) gallery: quadrat gallery: + * round-quadrat gallery: circle gallery: circle-pie gallery: frame gallery: flower gallery: cloud gallery: puzzle gallery: octagon-bevel gallery: + * diamond-bevel gallery: up-right-arrow gallery: up-right-down-arrow gallery: corner-right-arrow gallery: split-arrow gallery: up-right-arrow-callout + * gallery: split-round-arrow gallery: s-sharped-arrow Gallery: star6 Gallery: star12 Gallery: concave-star6 Gallery: signet Gallery: doorplate gallery: + * fontwork-arch-left-curve gallery: fontwork-arch-right-curve gallery: fontwork-arch-left-pour gallery: fontwork-arch-right-pour + */ + createCustomShapeDefaults(aShapeType: string): void; + } + + /** must be supported to provide access to a container of {@link GluePoint2} . */ + interface XGluePointsSupplier extends uno.XInterface { + /** @returns a container of {@link GluePoint2} structs. */ + getGluePoints(): container.XIndexContainer; + + /** @returns a container of {@link GluePoint2} structs. */ + readonly GluePoints: container.XIndexContainer; + } + + /** @since LibreOffice 4.1 */ + interface XGraphicExportFilter extends document.XFilter, document.XExporter, document.XMimeTypeInfo { } + + /** + * This interface makes it possible to access and manage the Layers of a document. + * @see LayerManager + */ + interface XLayerManager extends container.XIndexAccess { + /** + * attaches a {@link Shape} to the given {@link Layer} . + * @param xShape this is the {@link Shape} that will be attached to a {@link Layer} + * @param xLayer this is the {@link Layer} that will be attached to a {@link Shape} + */ + attachShapeToLayer(xShape: XShape, xLayer: XLayer): void; + + /** + * queries the {@link Layer} that a {@link Shape} is attached to + * @param xShape specifies the {@link Shape} for which the layer is requested. + * @returns the {@link Layer} to which the {@link Shape} is attached. + */ + getLayerForShape(xShape: XShape): XLayer; + + /** + * creates a new {@link Layer} + * @param nIndex the index at which the new layer is inserted + * @returns the new created {@link Layer} + */ + insertNewByIndex(nIndex: number): XLayer; + + /** + * removes a {@link Layer} and all {@link Shapes} on this {@link Layer} . + * @param xLayer this {@link Layer} will be removed and disposed + */ + remove(xLayer: XLayer): void; + } + + /** + * gives access to a {@link LayerManager} . + * @see LayerManager + */ + interface XLayerSupplier extends uno.XInterface { + /** @returns the {@link LayerManager} . */ + getLayerManager(): container.XNameAccess; + + /** @returns the {@link LayerManager} . */ + readonly LayerManager: container.XNameAccess; + } + + /** must be supported to provide access to the {@link MasterPages} of a multi-page drawing-layer. */ + interface XMasterPagesSupplier extends uno.XInterface { + /** @returns an indexed container with the service {@link MasterPages} . */ + getMasterPages(): XDrawPages; + + /** @returns an indexed container with the service {@link MasterPages} . */ + readonly MasterPages: XDrawPages; + } + + /** + * is implemented by objects that can be linked to a {@link MasterPage} . + * @see DrawPage + */ + interface XMasterPageTarget extends uno.XInterface { + /** @returns the {@link MasterPage} linked to this object. */ + getMasterPage(): XDrawPage; + + /** @returns the {@link MasterPage} linked to this object. */ + MasterPage: XDrawPage; + + /** + * links a {@link MasterPage} to this object. + * @param xMasterPage the {@link MasterPage} that is linked to this object + */ + setMasterPage(xMasterPage: XDrawPage): void; + } + + /** + * This interface is a collection of functions that were necessary to implement larger parts of the presenter screen as extension. The methods of this + * interface give access to services that could only be implemented in the Office core, not in an extension. + * + * As the presenter screen is no extension any more, this hack can go again; it just needs clean-up. + */ + interface XPresenterHelper { + /** + * Capture the mouse so that no other window will receive mouse events. Note that this is a potentially dangerous method. Not calling releaseMouse + * eventually can lead to an unresponsive application. + * @param xWindow The window for which mouse events will be notified even when the mouse pointer moves outside the window or over other windows. + */ + captureMouse(xWindow: awt.XWindow): void; + + /** + * Create a new canvas for the given window. + * @param xWindow The canvas is created for this window. Must not be `NULL` + * @param nRequestedCanvasFeatureList List of requested features that the new canvas should (has to) provide. Use only values from the {@link CanvasFeature + * @param sOptionalCanvasServiceName When an explicit service name is given then a new object of this service is created. This service name lets the caller + */ + createCanvas(xWindow: awt.XWindow, nRequestedCanvasFeatureList: number, sOptionalCanvasServiceName: string): rendering.XCanvas; + + /** + * Create a new canvas for the given window. The new canvas is a wrapper around the given shared canvas. The wrapper only modifies the origin in all + * output and clipping methods. + * @param xUpdateCanvas This canvas is used to call updateScreen() on. May be `NULL` + * @param xUpdateWindow The window that belongs to the update canvas. May also be `NULL` (is expected to b `NULL` whenever xUpdateCanvas is.) + * @param xSharedCanvas The canvas that is shared by the wrapper. + * @param xSharedWindow The window of the shared canvas. This is used to determine the proper offset. + * @param xWindow The canvas is created for this window. Must not be `NULL` + */ + createSharedCanvas( + xUpdateCanvas: rendering.XSpriteCanvas, xUpdateWindow: awt.XWindow, xSharedCanvas: rendering.XCanvas, xSharedWindow: awt.XWindow, xWindow: awt.XWindow): rendering.XCanvas; + + /** + * Create a new window as child window of the given parent window. + * @param xParentWindow The parent window of the new window. + * @param bCreateSystemChildWindow When `TRUE` then the new window will be a system window that, in the context of the presenter screen, can not be painted + * @param bInitiallyVisible When `TRUE` the new window will be visible from the start, i.e. a window listener will not receive a windowShown signal. + * @param bEnableChildTransparentMode When `TRUE` the parent window is painted behind its child windows. This is one half of allowing child windows to be t + * @param bEnableParentClip When `TRUE` then the parent window is not clipped where its child windows are painted. This is the other half of allowing child + */ + createWindow(xParentWindow: awt.XWindow, bCreateSystemChildWindow: boolean, bInitiallyVisible: boolean, bEnableChildTransparentMode: boolean, bEnableParentClip: boolean): awt.XWindow; + + /** Return the bounding box of the given child window relative to the direct or indirect parent window. */ + getWindowExtentsRelative(xChildWindow: awt.XWindow, xParentWindow: awt.XWindow): awt.Rectangle; + + /** + * Load a bitmap with a given ID. + * @param id The ID of the bitmap. + * @param xCanvas The bitmap is created to be compatible, and possibly optimized, for this canvas. + */ + loadBitmap(id: string, xCanvas: rendering.XCanvas): rendering.XBitmap; + + /** + * Release a previously captured mouse. + * @param xWindow The window from which the mouse will be released. + */ + releaseMouse(xWindow: awt.XWindow): void; + + /** + * Move the specified window to the top of its stacking order. As a result the window will be painted over all its overlapping siblings. + * @param xWindow This window will be moved to the top of its stacking order. + */ + toTop(xWindow: awt.XWindow): void; + } + + interface XSelectionFunction extends lang.XComponent, lang.XServiceInfo, frame.XDispatch, awt.XKeyHandler, awt.XMouseClickHandler, awt.XMouseMotionHandler, + view.XSelectionChangeListener { } + + /** lets you do a basic transformation on a {@link Shape} and get its type. */ + interface XShape extends XShapeDescriptor { + /** + * gets the current position of this object. + * @returns the position of the top left edge in 100/th mm + */ + getPosition(): awt.Point; + + /** + * gets the size of this object. + * @returns the size in 100/th mm + */ + getSize(): awt.Size; + + /** + * gets the current position of this object. + * @returns the position of the top left edge in 100/th mm + */ + Position: awt.Point; + + /** + * sets the current position of this object + * @param aPosition the position of the top left edge in 100/th mm + */ + setPosition(aPosition: awt.Point): void; + + /** + * sets the size of this object. + * @param aSize the size in 100/th mm + */ + setSize(aSize: awt.Size): void; + + /** + * gets the size of this object. + * @returns the size in 100/th mm + */ + Size: awt.Size; + } + + /** + * Objects implementing this interface can be used to align {@link Shapes} . + * @deprecated Deprecated + */ + interface XShapeAligner extends uno.XInterface { + /** aligns the specified {@link Shapes} . */ + alignShapes(aShapes: [XShapes], eType: Alignment): void; + } + + /** + * Objects implementing this interface can be used to arrange {@link Shapes} . + * @deprecated Deprecated + */ + interface XShapeArranger extends uno.XInterface { + /** applies the specified Arrangement to the specified collection of {@link Shapes} . */ + arrange(xShapes: XShapes, eType: Arrangement): void; + + /** moves the specified {@link Shapes} by a specified number of objects more to the front. */ + bringToFront(xShapes: XShapes, nSteps: number): void; + + /** reverses the order of the specified collection of {@link Shapes} . */ + reverseOrder(xShapes: XShapes): void; + + /** moves the specified {@link Shapes}**nSteps** objects more to the back. */ + sendToBack(xShapes: XShapes, nSteps: number): void; + + /** moves the specified collection of {@link Shapes} behind the specified single {@link Shape} . */ + setBehindShape(xShapes: XShapes, xShape: XShape): void; + + /** moves the specified collection of {@link Shapes} in front of the specified single {@link Shape} . */ + setInFrontOf(xShapes: XShapes, xShape: XShape): void; + } + + /** connects or breaks the lines of {@link Shapes} */ + interface XShapeBinder extends uno.XInterface { + /** + * binds {@link Shapes} together. + * @param xShapes a container with {@link Shapes} that will be bind together. All {@link Shapes} will be converted to a {@link PolyPolygonBezierShape} and + * @returns a newly created {@link PolyPolygonBezierShape} which contains all line segment from the supplied {@link Shapes} . It is also added to the {@link + */ + bind(xShapes: XShapes): XShape; + + /** + * breaks a {@link Shape} into its line segments + * @param xShape the given {@link Shape} will be converted to a {@link PolyPolygonBezierShape} and the line segments of this {@link Shape} will be used to + */ + unbind(xShape: XShape): void; + } + + /** specifies the combine/split functionality. */ + interface XShapeCombiner extends uno.XInterface { + /** + * combines {@link Shapes} + * @param xShapes the {@link Shapes} inside this container are converted to PolyPolygonBezierShapes and are than combined into one {@link PolyPolygonBezier + * @returns a newly created {@link PolyPolygonBezierShape} which contains all converted {@link PolyPolygonBezierShape} combined. It is also added to the {@li + */ + combine(xShapes: XShapes): XShape; + + /** + * splits {@link Shapes} . + * @param Group the {@link Shape} is converted to a PolyPolygonBezierShapes and then split into several PolyPolygonBezierShapes The {@link Shapes} in xShap + */ + split(Group: XShape): void; + } + + /** + * offers some settings which are allowed even for objects which are not yet inserted into a draw page. + * @deprecated Deprecatedreplaced by com::sun::star::lang::XServiceName + */ + interface XShapeDescriptor extends uno.XInterface { + /** @returns the programmatic name of the shape type. */ + getShapeType(): string; + + /** @returns the programmatic name of the shape type. */ + readonly ShapeType: string; + } + + /** + * is implemented by {@link Shapes} that contain other {@link Shapes} . + * @deprecated Deprecated + */ + interface XShapeGroup extends XShape { + /** + * enters the group which enables the editing function for the parts of a grouped {@link Shape} . Then the parts can be edited instead of the group as a + * whole. + * + * This affects only the user interface. The behavior is not specified if this instance is not visible on any view. In this case it may or may not work. + */ + enterGroup(): void; + + /** + * leaves the group, which disables the editing function for the parts of a grouped {@link Shape} . Then only the group as a whole can be edited. + * + * This affects only the user interface. The behavior is not specified if this instance is not visible on any view. In this case it may or may not work. + */ + leaveGroup(): void; + } + + /** specifies the group/ungroup functionality. */ + interface XShapeGrouper extends uno.XInterface { + /** + * groups the {@link Shapes} inside a collection. + * + * Grouping of objects in text documents works only if none of the objects has an anchor of type + * com::sun::star::text::TextContentAnchorType::AS_CHARACTER + * + * . + * @param xShapes the {@link Shapes} that will be grouped. They must all be inserted into the same {@link GenericDrawPage} . + * @returns a newly created {@link GroupShape} that contains all {@link Shapes} from xShapes and is also added to the {@link GenericDrawPage} of the {@link S + */ + group(xShapes: XShapes): XShapeGroup; + + /** + * ungroups a given {@link GroupShape} . + * @param aGroup moves all {@link Shapes} from this {@link GroupShape} to the parent {@link XShapes} of the {@link GroupShape} . The {@link GroupShape} is + */ + ungroup(aGroup: XShapeGroup): void; + } + + /** + * Objects implementing this interface can be used to mirror {@link Shapes} . + * @deprecated Deprecated + */ + interface XShapeMirror extends uno.XInterface { + /** mirrors the given {@link Shapes} at the given axis. */ + mirror(aShapes: [XShapes], eAxis: MirrorAxis): void; + + /** mirrors the given {@link Shapes} at the given axis. */ + mirrorAtAxis(aShapes: [XShapes], aLine: XShape): void; + } + + /** + * makes it possible to access, add, and remove the {@link Shapes} in a collection. + * @see DrawPage + * @see MasterPage + * @see DrawingDocumentDrawView + */ + interface XShapes extends container.XIndexAccess { + /** + * inserts a {@link Shape} into this collection. + * @param xShape a {@link Shape} that will be inserted. + */ + add(xShape: XShape): void; + + /** + * removes a {@link Shape} from this collection. + * @param xShape the {@link Shape} will be removed from the collection and disposed. + */ + remove(xShape: XShape): void; + } + + /** + * Allows insertion of shapes at different positions. + * @since LibreOffice 4.2 + */ + interface XShapes2 { + /** + * Insert a new shape to the bottom of the stack. + * @param xShape shape to be inserted. + * @since LibreOffice 4.2 + */ + addBottom(xShape: XShape): void; + + /** + * Insert a new shape to the top of the stack. + * @param xShape shape to be inserted. + * @since LibreOffice 4.2 + */ + addTop(xShape: XShape): void; + } + + /** + * A cache of preview bitmaps for the slides of one Impress or Draw document in one size. There may be more than one cache for one document. These are + * internally connected and for missing previews one cache may take it from another cache and scale it to the desired size. When a preview is not present + * then it is created asynchronously. On creation all registered listeners are notified. + * + * Slides are referenced via their index in an XIndexAccess container in order to allow multiple references to a single slide (custom presentations). + */ + interface XSlidePreviewCache { + /** Register a listener that is called when a preview has been created asynchronously. */ + addPreviewCreationNotifyListener(xListener: XSlidePreviewCacheListener): void; + + /** + * Return a preview for the given slide index. The returned bitmap may be the requested preview, a preview of the preview, i.e. a scaled up or down + * version, or an empty reference when the preview is not yet present. + * + * This call may lead to the asynchronous creation of the requested preview. In that case all registered listeners are notified when the preview has been + * created. + */ + getSlidePreview(nSlideIndex: number, xCanvas: rendering.XCanvas): rendering.XBitmap; + + /** Stop the asynchronous creation of previews temporarily. Call {@link resume()} to restart it. */ + pause(): void; + + /** Remove a previously registered listener for preview creations. */ + removePreviewCreationNotifyListener(xListener: XSlidePreviewCacheListener): void; + + /** Resume the asynchronous creation of slide previews. */ + resume(): void; + + /** + * Set the set of slides for which the cache will provide the previews. All slides in the given XIndexAccess are required to come from the given model. + * @param xSlides The set of slides for which the called cache will provide the previews. This container defines the indices that are used to look up slides. + * @param xDocument The model that contains the slides reference by the xSlides argument. + */ + setDocumentSlides(xSlides: container.XIndexAccess, xDocument: uno.XInterface): void; + + /** Define the size of the previews that are managed by the called cache. */ + setPreviewSize(aSize: geometry.IntegerSize2D): void; + + /** + * Define which slides are currently visible on the screen and which are not. This information is used for give preview creation for visible slides a + * higher priority than for those slides that are not visible. + */ + setVisibleRange(nFirstVisibleSlideIndex: number, nLastVisibleSlideIndex: number): void; + } + + /** + * Listener for asynchronous preview creations. Called when a slide preview has been created that was previously requested via a call to {@link + * XSlidePreviewCache.getSlidePreview()} . The implementor may then call getSlidePreview() a second time to get the up-to-date version of the preview. + */ + interface XSlidePreviewCacheListener { + /** + * Called by a {@link XSlidePreviewCache} object when a preview has been created for the slide with the given index. + * @param nSlideIndex The index of the slide for which a new preview has been created. + */ + notifyPreviewCreation(nSlideIndex: number): void; + } + + /** Create preview bitmaps for single slides. */ + interface XSlideRenderer { + /** + * Return a size that has the given aspect ratio and shares either the width or the height with the given maximum size. + * @param nSlideAspectRatio The aspect ratio must not be 0. + * @param aMaximumPreviewPixelSize The maximum size of the returned preview size. + */ + calculatePreviewSize(nSlideAspectRatio: number, aMaximumPreviewPixelSize: awt.Size): awt.Size; + + /** + * Create a preview for the given slide that has the same aspect ratio as the page and is as large as possible but not larger than the specified size. + * + * The reason for not using the given size directly as preview size and thus possibly changing the aspect ratio is that a) a different aspect ratio is + * not used often, and b) leaving the adaption of the actual preview size (according to the aspect ratio of the slide) to the slide renderer is more + * convenient to the caller than having to this himself. + * @param xSlide The slide for which a preview will be created. + * @param aMaximumPreviewPixelSize The maximum size of the preview measured in pixels. When the aspect ratios of this size and of the given slide differ, t + * @param nSuperSampleFactor When larger than the default 1 then internally a larger preview is created which, before it is returned, is scaled down to the + */ + createPreview(xSlide: XDrawPage, aMaximumPreviewPixelSize: awt.Size, nSuperSampleFactor: number): awt.XBitmap; + + /** + * Exactly the same functionality as {@link createPreview()} , only a different return type: {@link com.sun.star.rendering.XBitmap} instead of {@link + * com.sun.star.awt.XBitmap} . + * @param xSlide See description in {@link createPreview} . + * @param aMaximumPreviewPixelSize See description in {@link createPreview} . + * @param nSuperSampleFactor See description in {@link createPreview} . + * @param xCanvas This canvas is used create a canvas specific bitmap. + * @see createPreview + */ + createPreviewForCanvas(xSlide: XDrawPage, aMaximumPreviewPixelSize: awt.Size, nSuperSampleFactor: number, xCanvas: rendering.XCanvas): rendering.XBitmap; + } + + /** + * This interface exists only because services do not directly support multiple inheritance and attributes. + * + * It provides the interfaces and attributes that every object that implements the {@link SlideSorter} service. + */ + interface XSlideSorterBase extends framework.XView, XDrawView { + BackgroundColor: util.Color; + + /** + * The set of slides that are displayed by the implementing object. + * + * The default value is the set of all slides of the document for which a slide sorter is created. + */ + DocumentSlides: container.XIndexAccess; + HighlightColor: util.Color; + + /** + * When this flag has the value `TRUE` then every time the current slide is changed the visual area is shifted so that the new current slide is display + * in the center of the slide sorter window. + * + * It is not always possible to move the current slide into the exact center of the window, for example when slides are located near the start or end of + * a document. + * + * The default value is `FALSE` . + */ + IsCenterSelection: boolean; + + /** + * Set this flag to `TRUE` in order to have the current slide highlighted. + * + * The default value is `FALSE` . + */ + IsHighlightCurrentSlide: boolean; + + /** The orientation of a slide sorter can be either vertical ( `TRUE` ) or horizontal ( `FALSE` ). */ + IsOrientationVertical: boolean; + + /** + * Set this flag to `TRUE` to visualize to where the focus is by showing a dotted rectangle around the focused slide. + * + * The default value is `TRUE` . + */ + IsShowFocus: boolean; + + /** + * Set this flag to `TRUE` in order to visualize the selection of slides (typically a bold frame around the selected slides). + * + * The default value is `TRUE` . + */ + IsShowSelection: boolean; + + /** This flag is a hint to make scrolling look smooth. */ + IsSmoothScrolling: boolean; + + /** + * This flag controls whether updates of previews are created during full screen presentations ( `FALSE` ) or not ( `TRUE` ). The suspension of preview + * creations is an optimization for not slowing down a running presentation. + * + * The default value is `TRUE` . + */ + IsSuspendPreviewUpdatesDuringFullScreenPresentation: boolean; + + /** + * This flag controls whether the model can be modified by using keyboard or mouse. + * + * The default value is `TRUE` . + */ + IsUIReadOnly: boolean; + SelectionColor: util.Color; + TextColor: util.Color; + } + + /** @deprecated Deprecated */ + interface XUniversalShapeDescriptor extends XShapeDescriptor { + setShapeType(aShapeTypeName: string): void; + } + + namespace CanvasFeature { + const enum Constants { + None = 0, + SpriteCanvas = 1, + } + } + + namespace CaptionEscapeDirection { + const enum Constants { + auto = 2, + horizontal = 0, + vertical = 1, + } + } + + namespace CaptionType { + const enum Constants { + angled = 1, + connector = 2, + straight = 0, + } + } + + namespace EnhancedCustomShapeGluePointType { + const enum Constants { + CUSTOM = 2, + NONE = 0, + RECT = 3, + SEGMENTS = 1, + } + } + + namespace EnhancedCustomShapeParameterType { + const enum Constants { + ADJUSTMENT = 2, + BOTTOM = 6, + EQUATION = 1, + HASFILL = 10, + HASSTROKE = 9, + HEIGHT = 12, + LEFT = 3, + LOGHEIGHT = 14, + LOGWIDTH = 13, + NORMAL = 0, + RIGHT = 5, + TOP = 4, + WIDTH = 11, + XSTRETCH = 7, + YSTRETCH = 8, + } + } + + namespace EnhancedCustomShapeSegmentCommand { + const enum Constants { + ANGLEELLIPSE = 9, + ANGLEELLIPSETO = 8, + ARC = 11, + ARCANGLETO = 17, + ARCTO = 10, + CLOCKWISEARC = 13, + CLOCKWISEARCTO = 12, + CLOSESUBPATH = 4, + CURVETO = 3, + DARKEN = 18, + DARKENLESS = 19, + ELLIPTICALQUADRANTX = 14, + ELLIPTICALQUADRANTY = 15, + ENDSUBPATH = 5, + LIGHTEN = 20, + LIGHTENLESS = 21, + LINETO = 2, + MOVETO = 1, + NOFILL = 6, + NOSTROKE = 7, + QUADRATICCURVETO = 16, + UNKNOWN = 0, + } + } + + namespace framework { + /** + * Abstraction of tool bars used by the drawing framework. + * @see XToolBarController + * @see XToolBarFactory + */ + type XToolBar = XResource; + + /** + * A view in the drawing framework is any object that paints into a pane. + * + * Typical examples are the Impress views that show a graphical representation of a document. But the task pane, which is primarily a container of + * dialogs, is a view as well. + * + * Luckily the drawing framework does not need to know much about what a view is. It just needs to identify view objects and a typesafe way to reference + * them. + * + * The URL prefix of views is `private:resource/view` + */ + type XView = XResource; + + /** + * This enum specifies how a resource is bound to an anchor. This can be direct or indirect. + * + * Example: Let r:a1:a2 denote a resource r which is bound to anchor a1:a2 which itself is a resource a1 bound to anchor a2. Then r:a1:a2 is bound + * directly to a1:a2 and indirectly to a2. + */ + const enum AnchorBindingMode { + DIRECT = 0, + INDIRECT = 1, + } + + /** See {@link XPaneBorderPainter} and its addBorder() and removeBorder() methods for an explanation of the border type and its values. */ + const enum BorderType { + INNER_BORDER = 0, + OUTER_BORDER = 1, + TOTAL_BORDER = 2, + } + + /** + * The ResourceActivationMode specifies, for example for the {@link com.sun.star.drawing.framework.XConfigurationController.requestResourceActivation()} + * , whether a requested resource is to replace an existing resource of the same class or is to be activated additionally. + */ + const enum ResourceActivationMode { + /** A resource is requested in addition to already existing ones. This is used for example for panes. */ + ADD = 0, + /** A resource is requested to replace an already existing one of the same class. This is used for example for views. */ + REPLACE = 1, + } + + /** + * The {@link BasicPaneFactory} is a resource factory that provides the panes used by the Draw and Impress applications. + * + * This factory provides the center, left, and right pane. For the left pane there are two URLS, `private:resource/floater/LeftImpressPane` and + * `private:resource/floater/LeftDrawPane` , one for Impress, the other for Draw. The center pane and the right pane have the URLs + * `private:resource/floater/CenterPane` and `private:resource/floater/RightPane` respectively. + * + * This factory is typically created indirectly by registering it in the configuration and have the {@link XModuleController} create it on demand. + */ + interface BasicPaneFactory extends XResourceFactory { + /** Give the controller to new instances so that they have access to the drawing framework controllers. */ + create(xController: frame.XController): void; + } + + /** + * The {@link BasicToolBarFactory} is a resource factory that provides (some of) the tool bars used by the Draw and Impress applications. + * + * The factory recognizes the following URLs: `private:resource/toolbar/ViewTabBar` for the tab bar that allows the switching between views. This short + * list marks the implementation of this service clearly as being in transition. + * + * This factory is typically created indirectly by registering it in the configuration and have the {@link XModuleController} create it on demand. + */ + interface BasicToolBarFactory extends XResourceFactory { + /** Give the controller to new instances so that they have access to the drawing framework controllers. */ + create(xController: frame.XController): void; + } + + /** + * The {@link BasicViewFactory} is a view factory that provides the panes used by the Draw and Impress applications. + * + * The factory recognizes the following URLs: `private:resource/view/ImpressView` for the regular edit view of the Impress + * application.`private:resource/view/GraphicView` for the regular edit view of the Draw application.`private:resource/view/OutlineView` for the outline + * view.`private:resource/view/NotesView` for the notes view.`private:resource/view/HandoutView` for the handout view.`private:resource/view/SlideSorter` + * for the slide sorter regardless of which pane it is used in.`private:resource/view/PresentationView` for the slide + * show.`private:resource/view/TaskPane` for the task pane. + */ + interface BasicViewFactory extends XResourceFactory { + /** Give the controller to new instances so that they have access to the drawing framework controllers. */ + create(xController: frame.XController): void; + } + + /** + * This service provides the means for constructing new configurations. + * + * Most likely use is the {@link XConfigurationController.restoreConfiguration()} method. + * @see XConfiguration for a description of the configuration. + */ + interface Configuration extends XConfiguration { + /** + * Create an empty configuration. + * + * This should not be necessary very often. Changes to an existing configuration are more likely. + */ + create(): void; + } + + /** + * Objects of this class are used for notifying changes of the configuration. + * + * They are broadcasted by the configuration controller which maintains the configuration. The set of types of configuration changes is not fixed and is + * not maintained or documented in one place. + * + * The set of used members and the exact meaning of their values is not the same for all types. Therefore, the descriptions of the members are just + * general guidelines. See {@link XConfigurationController} for a list of event types used by the basic drawing framework. + */ + interface ConfigurationChangeEvent extends lang.EventObject { + /** The current configuration, depending on the event type, either before or after the change. May be an empty reference. */ + Configuration: XConfiguration; + + /** The resource id that is part of the configuration change. */ + ResourceId: XResourceId; + + /** The resource object that corresponds to the {@link ResourceId} . May be an empty reference. */ + ResourceObject: uno.XInterface; + + /** + * The type of configuration change is a free-form string. This is the only member that is always set. The values of the other members depend on the + * configuration change type and may or may not be set. + */ + Type: string; + + /** Each listener is called with exactly the {@link UserData} that was given when the listener was registered. */ + UserData: any; + } + + /** + * See {@link XConfigurationController} for a description of the configuration controller. + * + * This service is used at the moment by the {@link XControllerManager} to create a configuration controller. This allows developers to replace the + * default implementation of the configuration controller with their own. This may not be a useful feature. Furthermore the sub controllers may need a + * tighter coupling than the interfaces allow. These are reasons for removing this service in the future and let the controller manager create the sub + * controllers directly. + */ + interface ConfigurationController extends XConfigurationController { + create(xController: frame.XController): void; + } + + /** + * See {@link XModuleController} for a description of the module controller. + * + * See {@link ConfigurationController} for a comment why this service may be removed in the future. + * + * The {@link ModuleController} object for an application can be obtained via the {@link XControllerManager} interface. + */ + interface ModuleController extends XModuleController { + /** Create a new instance of a {@link ModuleController} as sub controller of the given XController object. */ + create(xController: frame.XController): void; + } + + /** + * The {@link ResourceId} service provides several constructors for resource ids. + * + * They mainly differ in how the anchor is specified. + */ + interface ResourceId extends XResourceId { + /** + * Create a resource id that has no anchor. + * + * This constructor can be used to create resource ids for panes. + */ + create(sResourceURL: string): void; + + /** Create an empty resource id. It does not specify a specific resource but describes the absence of one. */ + createEmpty(): void; + + /** Create a resource id for an anchor that is given as {@link XResourceId} object. This is the most general of the constructor variants. */ + createWithAnchor(sResourceURL: string, xAnchor: XResourceId): void; + + /** + * Create a resource id for a resource that is bound to an anchor that can be specified by a single URL. + * + * This constructor can be used to create resources ids for views where the anchor is a pane. + */ + createWithAnchorURL(sResourceURL: string, sAnchorURL: string): void; + } + + /** + * Descriptor of a tab bar button. Tab bar buttons are typically used to offer the user the choice between different views to be displayed in one pane. + * + * For identification only the {@link ResourceId} is used, so for some methods of the {@link XTabBar} interface only the {@link ResourceId} member is + * evaluated. + */ + interface TabBarButton { + /** + * This label is displayed on the UI as button text. + * + * The label is expected to be localized. + */ + ButtonLabel: string; + + /** The localized help text that may be displayed in a tool tip. */ + HelpText: string; + + /** + * {@link XResourceId} object of the resource that is requested to be displayed when the tab bar button is activated. + * + * For some methods of the {@link XTabBar} interface only this member is evaluated. That is because only this member is used to identify a tab bar + * button. + */ + ResourceId: XResourceId; + } + + /** + * A configuration describes the resources of an application like panes, views, and tool bars and their relationships that are currently active or are + * requested to be activated. Resources are specified by {@link ResourceId} structures rather than references so that not only the current configuration + * but also a requested configuration can be represented. + * + * Direct manipulation of a configuration object is not advised with the exception of the {@link ConfigurationController} and objects that implement the + * {@link XConfigurationChangeRequest} interface. + * @see XConfigurationController + */ + interface XConfiguration extends util.XCloneable { + /** + * Add a resource to the configuration. + * + * This method should be used only by objects that implement the XConfigurationRequest interface or by the configuration controller. + * @param xResourceId The resource to add to the configuration. When the specified resource is already part of the configuration then this call is silently + * @throws IllegalArgumentException When an empty resource id is given then an IllegalArgumentException is thrown. + */ + addResource(xResourceId: XResourceId): void; + + /** + * Returns the list of resources that are bound directly and/or indirectly to the given anchor. A URL filter can reduce the set of returned resource ids. + * @param xAnchorId This anchor typically is either a pane or an empty {@link XResourceId} object. An empty reference is treated like an {@link XResourceId + * @param sTargetURLPrefix When a non-empty string is given then resource ids are returned only when their resource URL matches this prefix, i.e. when it b + * @param eSearchMode This flag defines whether to return only resources that are directly bound to the given anchor or a recursive search is to be made. N + * @returns The set of returned resource ids may be empty when there are no resource ids that match all conditions. The resources in the sequence are ordered + */ + getResources(xAnchorId: XResourceId, sTargetURLPrefix: string, eSearchMode: AnchorBindingMode): SafeArray; + + /** + * Returns whether the specified resource is part of the configuration. + * + * This is independent of whether the resource does really exist and is active, i.e. has a visible representation in the GUI. + * @param xResourceId The id of a resource. May be empty (empty reference or empty {@link XResourceId} object) in which case `FALSE` is returned. + * @returns Returns `TRUE` when the resource is part of the configuration and `FALSE` when it is not. + */ + hasResource(xResourceId: XResourceId): boolean; + + /** + * Remove a resource from the configuration. + * + * This method should be used only by objects that implement the XConfigurationRequest interface or by the configuration controller. + * @param xResourceId The resource to remove from the configuration. When the specified resource is not part of the configuration then this call is silentl + * @throws IllegalArgumentException When an empty resource id is given then an IllegalArgumentException is thrown. + */ + removeResource(xResourceId: XResourceId): void; + } + + /** A listener for configuration changes is called when it has been registered at the configuration controller and a configuration change occurs. */ + interface XConfigurationChangeListener extends lang.XEventListener { + /** + * The exact time of when a listener is called (before the change takes place, during the change, or when the change has been made) depends on the change + * event. The order in which listeners are called is the order in which they are registered (First registered, first called.) + */ + notifyConfigurationChange(aEvent: ConfigurationChangeEvent): void; + } + + /** + * A single explicit request for a configuration change. + * + * The requested change is committed to a configuration only when the {@link execute()} method is called. {@link Configuration} change requests are + * executed asynchronously. This is done to avoid reentrance problems with objects that are registered as {@link XConfigurationChangeListener} and at the + * same time make configuration change requests. When the requests were executed synchronously then the listeners would be notified of the changes while + * their request call has not yet returned. + * + * This interface is typically used internally by the {@link XConfigurationController} + * @see XConfigurationController + */ + interface XConfigurationChangeRequest { + /** + * Commit the configuration change request represented by the called object to the given configuration. + * @param xConfiguration This is the configuration to commit the requested change to. + */ + execute(xConfiguration: XConfiguration): void; + } + + /** + * The configuration controller is responsible for the management of the set of active resources. + * + * There are two configurations of resources: The current configuration contains the set of currently active resources.The requested configuration + * describes what the current configuration should be. The requested configuration is changed usually by calling {@link requestResourceActivation()} and + * {@link requestResourceDeactivation()} . + * + * When the two configurations differ then the current configuration is updated eventually to reflect the requested configuration. An update takes place + * when the following three conditions are fulfilled. 1. when the last pending request for configuration changes has been processed, 2. when the {@link + * update()} method is called. 3. when the configuration manager it is unlocked after formerly being locked. + * + * Requests for configuration changes are handled in a two step process: 1. First the requested configuration is updated iteratively: Every request that + * is being made by calling {@link requestResourceActivation()} or {@link requestResourceDeactivation()} results in one or more function objects, that + * each implement the {@link XConfigurationChangeRequest} interface. These are inserted into a queue. The request objects in the queue are processed + * asynchronously one at a time in the order in which they are inserted. Only when one request object is processed a change to the requested + * configuration is made. These changes are broadcasted to registered {@link XConfigurationChangeListener} objects. Listeners may decide to make requests + * that then are added to the queue. For example when the view in the center pane is replaced by another view, some listeners may want to turn some side + * panes on or off, or show other views in the side panes. + * + * + * + * This process goes on until the queue of request objects becomes empty. Until this point only the requested configuration has been modified. No + * resources have been activated or deactivated. + * + * + * + * 2. + * + * The second update step activates or deactivates resources so that the current configuration (the one that comprises the actually active resources) + * reflects the requested configuration. + * + * + * + * The order in which resources are activated or deactivated depends on the dependency between the resources. For example a view depends on the pane it + * is displayed in. Resources that other resources depend on are activated first and deactivated last. The order is undefined for unrelated resources. + * + * + * + * Note that the second update step may not be able to activate (or even to deactivate) all the requested resources. Either because they are temporarily + * or permanently unavailable. For example, during the start-up of a new Impress application the side panes are displayed with a visible delay because + * they are not provided sooner by the underlying framework. Such unavailable resources are not forgotten but remain in the requested configuration. + * Every time the configuration controller updates its current configuration these resources are requested once more. + * + * The configuration controller sends the following events: ResourceActivationRequested is sent when the activation of a resource has been requested and + * the resource is not yet active in the requested configuration. The event is sent when the configuration change request is executed, not when the + * {@link requestResourceActivation()} call is made. + * + * + * + * The {@link ConfigurationChangeEvent.ResourceId} member is set to the requested resource. The ResourceObject member is not set. + * + * ResourceDeactivationRequested is sent when the deactivation of a resource has been requested and the resource is active in the requested + * configuration. The event is sent when the configuration change request is executed that is created when for example {@link + * requestResourceDeactivation()} is called. + * + * + * + * The {@link ResourceId} member is set to the requested resource. The ResourceObject member is not set. + * + * ConfigurationUpdateStart is sent before the update of the current configuration starts. + * + * + * + * The requested configuration is available in the {@link ConfigurationChangeEvent.Configuration} member. The {@link ResourceId} and ResourceObject + * members are not set. + * + * ConfigurationUpdateEnd is sent after the update of the current configuration ends. + * + * + * + * The requested configuration is available in the {@link ConfigurationChangeEvent.Configuration} member. The {@link ResourceId} and ResourceObject + * members are not set. + * + * ResourceActivation is sent when a resource is activated, i.e. when a new object of a resource is created (or taken from a cache). + * + * + * + * The {@link ResourceId} and ResourceObject members are set to the {@link XResourceId} and object reference of the activated resource. + * + * ResourceDeactivation is sent when a resource is deactivated, i.e. when an object that previously was part of the configuration is removed from the + * configuration. + * + * + * + * The {@link ResourceId} and ResourceObject members are set to {@link XResourceId} and object reference of the deactivated resource. + */ + interface XConfigurationController extends XConfigurationControllerRequestQueue, XConfigurationControllerBroadcaster, XResourceFactoryManager { + /** + * Return a copy of the current configuration. + * + * Modifications to the returned configuration have no effect on the drawing framework. + */ + readonly CurrentConfiguration: XConfiguration; + + /** + * Return a copy of the current configuration. + * + * Modifications to the returned configuration have no effect on the drawing framework. + */ + getCurrentConfiguration(): XConfiguration; + + /** + * Return a copy of the requested configuration. + * + * Modifications to the returned configuration have no effect on the drawing framework. + */ + getRequestedConfiguration(): XConfiguration; + + /** + * Return the active resource specified by the given resource id. + * @param xResourceId A valid resource id. This should, but does not have to be, the resource id of an active resource. + * @returns When the given resource id specifies an active resource then that resource is returned. Otherwise an empty reference is returned. + */ + getResource(xResourceId: XResourceId): XResource; + + /** + * Lock the processing of configuration change requests. + * + * This is only necessary when more than one change request is being made in a row. It prevents an update being made (with all the visible UI changes) + * before all change requests are being made. + * + * Recursive {@link lock()} calls are recognized: the configuration controller is locked while {@link lock()} was called more often than {@link unlock()} + * . + */ + lock(): void; + + /** + * Return a copy of the requested configuration. + * + * Modifications to the returned configuration have no effect on the drawing framework. + */ + readonly RequestedConfiguration: XConfiguration; + + /** + * Request the activation of a resource. + * + * The request is processed asynchronously. Notifications about configuration changes are sent after this call returns. + * @param xResourceId The resource whose activation is requested. + * @param eMode When eMode is REPLACE then, before adding the resource activation to the request queue, similar resources linked to the same anchor are re + */ + requestResourceActivation(xResourceId: XResourceId, eMode: ResourceActivationMode): void; + + /** + * Request the deactivation of a resource. + * + * The request is processed asynchronously. Notifications about configuration changes are sent after this call returns. + * + * Requesting the deactivation of a resource that is not active is not an error. + * @param xResourceId The resource whose deactivation is requested. + */ + requestResourceDeactivation(xResourceId: XResourceId): void; + + /** + * Replace the requested configuration with the given configuration and schedule an update of the current configuration. + * + * Together with the {@link getCurrentConfiguration()} and {@link getRequestedConfiguration()} methods this allows the saving and restoring of + * configurations. However, the given configuration can have other origins then these methods. + * + * The given configuration is transformed into a list of change requests so that the resulting requested configuration equals the given configuration. + * This has the advantage that not only the resource activations and deactivations but all configuration changes are properly broadcasted. + * + * Note that because of the configuration change notifications listeners can make more configuration change requests, so that the resulting requested + * configuration can be different from the given configuration. + * @param xConfiguration This typically is a configuration that was obtained with an earlier {@link getRequestedConfiguration()} call. + */ + restoreConfiguration(xConfiguration: XConfiguration): void; + + /** + * Unlock the processing of configuration change requests. + * + * When {@link unlock()} is called as many times as {@link lock()} and the queue of configuration change requests is not empty the configuration + * controller continues the processing of the change requests. An update of the current configuration will eventually being made. + */ + unlock(): void; + + /** + * Explicitly request an update of the current configuration. + * + * Call it when a resource is activated or deactivated without the control and knowledge of the drawing framework. Calling this method (from outside the + * drawing framework) should hardly every be necessary. + */ + update(): void; + } + + /** + * Manage the set of registered event listeners and the event notification for a configuration controller. + * + * The listeners are called in the order in which they are registered. + */ + interface XConfigurationControllerBroadcaster { + /** + * Add a new listener for configuration changes. + * + * The listener is notified only for the specified type of configuration changes. When the listener is interested in more than one event type this method + * has to be called multiple times. Alternatively it can register as universal listener that will be called for all event types. However, this option is + * provided primarily to support debugging and monitoring. + * @param xListener The new listener. + * @param sEventType The event type that the listener is interested in. The set of event types is not fixed and there can be no exhaustive list. The empty + * @param aUserData Arbitrary data that is passed to the listener when it is called for the specified event type. When one listener is registered for more + */ + addConfigurationChangeListener(xListener: XConfigurationChangeListener, sEventType: string, aUserData: any): void; + + /** With this method other objects can send events to all the registered listeners. */ + notifyEvent(aEvent: ConfigurationChangeEvent): void; + + /** + * Remove a listener for configuration changes. + * @param xListener The listener that is to be removed. + */ + removeConfigurationChangeListener(xListener: XConfigurationChangeListener): void; + } + + /** + * The request queue of the configuration controller handles requests for changes to the current configuration. + * + * This interface allows callers to add requests to the back of the queue and to determine whether the queue is empty. Using this interface should + * normally not be necessary for anyone else than the {@link XConfigurationController} . It may be removed in the future. + */ + interface XConfigurationControllerRequestQueue { + /** + * Return whether there are pending requests for configuration changes. + * @returns Returns `TRUE` when there is at least one request object in the queue that has not yet been processed. It returns `FALSE` when the queue is empty. + */ + hasPendingRequests(): boolean; + + /** + * Add a request for a configuration change to the request queue. + * + * This method should not be called from outside the drawing framework. Other sub controllers of the drawing framework are typical callers. They can add + * change requests that can not be made with the requestResourceActivation() and requestResourceDeactivation() methods. + * @param xRequest The configuration change represented by this request object must only be committed to the configuration when the {@link com.sun.star.dra + */ + postChangeRequest(xRequest: XConfigurationChangeRequest): void; + } + + /** + * The {@link XControllerManager} gives access to the controllers of the drawing framework. + * + * The {@link XControllerManager} interface is typically implemented by the same object that implements {@link com.sun.star.frame.XController} . + */ + interface XControllerManager { + /** + * Return the {@link XConfigurationController} object. + * @returns The returned reference is never empty. + */ + readonly ConfigurationController: XConfigurationController; + + /** + * Return the {@link XConfigurationController} object. + * @returns The returned reference is never empty. + */ + getConfigurationController(): XConfigurationController; + + /** + * Return the {@link XModuleController} object. + * @returns The returned reference is never empty. + */ + getModuleController(): XModuleController; + + /** + * Return the {@link XModuleController} object. + * @returns The returned reference is never empty. + */ + readonly ModuleController: XModuleController; + } + + /** + * The module controller is responsible for loading a module (ad-don, plugin, whatever the name) when it is first used. + * + * For this there is a list in the office configuration which associates resource URLs with service names which in turn are associated with modules (or + * dlls). The path to the office configuration list is MultiPaneGUI/Framework/ResourceFactories in the Impress.xcu file. + */ + interface XModuleController { + /** When the specified resource is requested for the first time then create a new instance of the associated factory service. */ + requestResource(sResourceTypeURL: string): void; + } + + /** + * A pane is an abstraction of a window and is one of the resources managed by the drawing framework. + * + * Apart from the area that displays a view a pane may contain other parts like title, menu, closer button. + * + * The URL prefix of panes is `private:resource/floater` + */ + interface XPane extends XResource { + /** + * Return the com::sun::star::awt::XCanvas of the pane. The {@link com.sun.star.rendering.XCanvas} object is expected to be associated with the {@link + * com.sun.star.awt.XWindow} object returned by {@link getWindow()} . + * @returns When the {@link com.sun.star.rendering.XCanvas} interface is not supported then an empty reference is returned. + */ + readonly Canvas: rendering.XCanvas; + + /** + * Return the com::sun::star::awt::XCanvas of the pane. The {@link com.sun.star.rendering.XCanvas} object is expected to be associated with the {@link + * com.sun.star.awt.XWindow} object returned by {@link getWindow()} . + * @returns When the {@link com.sun.star.rendering.XCanvas} interface is not supported then an empty reference is returned. + */ + getCanvas(): rendering.XCanvas; + + /** Return the {@link com.sun.star.awt.XWindow} of the pane that is used to display a view. */ + getWindow(): awt.XWindow; + + /** Return the {@link com.sun.star.awt.XWindow} of the pane that is used to display a view. */ + readonly Window: awt.XWindow; + } + + /** + * An extension of the {@link XPane} interface that adds support for a) showing and hiding the windows that internally belong to the pane and b) setting + * the accessibility object. This is typically an optional interface. + */ + interface XPane2 { + /** Return the accessibility object that is currently associated with the windows that implement the pane. */ + Accessible: accessibility.XAccessible; + + /** Return the accessibility object that is currently associated with the windows that implement the pane. */ + getAccessible(): accessibility.XAccessible; + + /** + * Return whether all windows that are used to implement the pane are visible. + * @returns `TRUE` when all windows of the pane are visible. + */ + isVisible(): boolean; + + /** + * Set the accessibility object for the pane. When there is more than one window used to implement the pane then the given accessibility object is + * usually set at the topmost window. However, the details are implementation dependent. + * @param xAccessible May be an empty reference. + */ + setAccessible(xAccessible: accessibility.XAccessible): void; + + /** + * Hide or show the pane. If there is more than one window used to implement the pane then it is left to the implementation if one, some, or all windows + * are hidden or shown as long as the pane becomes hidden or visible. + * @param bIsVisible When `TRUE` then show the pane. Hide it otherwise. + */ + setVisible(bIsVisible: boolean): void; + } + + /** + * Paint the border around a rectangular region, typically a pane. + * + * Calling objects have to be able to derive inner bounding boxes of the border from the outer ones and inner ones from outer ones. This conversion and + * the painting of the border involves three rectangles. The inner and outer bounding box of the border. This is a logical bounding box which the paint + * methods may paint over. The center box is the third rectangle. This is the actual border between outer and inner background color or bitmap and it is + * used for placing the bitmaps that are used paint the border. The inner sides and corners are places relative to this center box, i.e. when not further + * offsets are given then the upper left corner bitmap is painted with its lower right at the upper left of the center box. + */ + interface XPaneBorderPainter { + /** + * Enlarge the given rectangle by the size of the specified part of the border. This method can be used to convert an inner bounding box into the center + * box or the outer bounding box. + * @param sPaneBorderStyleName The pane style defines the sizes of the border. + * @param aRectangle This rectangle will be converted into a larger one. This should be the center box or the inner bounding box of the border. + * @param eBorderType The part of the border to add to the given rectangle. Use INNER_BORDER to convert an inner bounding box into the center box or TOTAL_ + */ + addBorder(sPaneBorderStyleName: string, aRectangle: awt.Rectangle, eBorderType: BorderType): awt.Rectangle; + + /** + * Return the offset of a call out anchor with respect to the outer border. This value is used when the call out is realized by a fixed bitmap in order + * to determine the size and/or location of the outer border for a given call out. + */ + getCalloutOffset(sPaneBorderStyleName: string): awt.Point; + + /** + * Paint the border around a pane. + * @param sPaneBorderStyleName The pane style to use for painting the border. + * @param xCanvas The canvas onto which the border is painted. + * @param aOuterBorderRectangle The outer bounding box of the border. Use addBorder to convert the bounding box of a pane (the inner bounding box of the bo + * @param aRepaintArea The area in which the border has to be repainted. The clip rectangle. + * @param sTitle The pane title. Supply an empty string for panes without title. It is the responsibility of the caller to supply a title only for pane bor + */ + paintBorder(sPaneBorderStyleName: string, xCanvas: rendering.XCanvas, aOuterBorderRectangle: awt.Rectangle, aRepaintArea: awt.Rectangle, sTitle: string): void; + + /** + * Paint the border around a pane where the border includes a call out that is anchored at the given point. Most arguments have the same meaning as in + * the {@link paintBorder()} . + * @param sPaneBorderStyleName See description in {@link paintBorder} . + * @param xCanvas See description in {@link paintBorder} . + * @param aOuterBorderRectangle See description in {@link paintBorder} . + * @param aRepaintArea See description in {@link paintBorder} . + * @param sTitle See description in {@link paintBorder} . + * @param aCalloutAnchor The anchor point of the call out. It is usually located outside the border. + * @see paintBorder + */ + paintBorderWithCallout( + sPaneBorderStyleName: string, xCanvas: rendering.XCanvas, aOuterBorderRectangle: awt.Rectangle, aRepaintArea: awt.Rectangle, sTitle: string, aCalloutAnchor: awt.Point): void; + + /** + * Shrink the given rectangle by the size of the specified part of the border. This method can be used to convert an outer bounding box into the center + * box or the inner bounding box. + * @param sPaneBorderStyleName The pane style defines the sizes of the border. + * @param aRectangle This rectangle will be converted into a smaller one that lies inside it. It should be the center box or the outer bounding box of the + * @param eBorderType The part of the border to remove from the given rectangle. Use OUTER_BORDER to convert an outer bounding box into the center box or T + */ + removeBorder(sPaneBorderStyleName: string, aRectangle: awt.Rectangle, eBorderType: BorderType): awt.Rectangle; + } + + /** An optional interface that is implemented by resources that are relocatable to different anchors. */ + interface XRelocatableResource { + /** + * Replace the current anchor of the called resource with the given one. + * @param xNewAnchor The new anchor. + * @returns Returns `TRUE` when the relocation was successful. + */ + relocateToAnchor(xNewAnchor: XResource): boolean; + } + + /** Base interface that provides functionality shared by all resource types of the drawing framework. */ + interface XResource { + /** Return an {@link XResourceId} object for the called resource. The returned id unambiguously identifies the resource. */ + getResourceId(): XResourceId; + + /** + * Some resources must not be leafs, i.e. have to be anchor to at least one other resource. Most panes are examples for this. Views on the other hand are + * in most cases no anchors. So the typical pane will return `TRUE` and the typical view will return `FALSE` . + * + * The return value is used to determine whether a resource has to be deactivated when it has no children, either because none is requested or because + * none can be created. + */ + isAnchorOnly(): boolean; + + /** Return an {@link XResourceId} object for the called resource. The returned id unambiguously identifies the resource. */ + readonly ResourceId: XResourceId; + } + + /** + * Factory and possibly cache for creating and releasing resources. + * + * A resource factory is created and used by the {@link XConfigurationController} object. + * + * A factory may want to implement a cache to reuse previously released resources. + */ + interface XResourceFactory { + /** + * Create a resource for the given {@link XResourceId} object. + * @param xResourceId The resource URL of this id specifies the type of resource to create. The anchor can be used to obtain the associated object from the + * @returns Returns a resource object that has been just created or was taken from a cache. When the requested resource can not be created then an empty refe + * @throws InvalidArgumentException when the given URL is not supported by the factory. + */ + createResource(xResourceId: XResourceId): XResource; + + /** + * Call this method to tell a factory that the given resource is no longer in use. The factory can decide whether to destroy the resource or to keep it + * in a cache in order to reuse it later. + * @param xResource The given resource has to be one created by the same factory. + * @throws InvalidArgumentException when the given pane was not created by the same factory. + */ + releaseResource(xResource: XResource): void; + } + + /** + * The {@link XResourceFactoryManager} is part of the configuration controller and manages the set of registered resource factories. + * @see XConfigurationController + * @see XResourceFactory + */ + interface XResourceFactoryManager { + /** + * Register a new resource factory for the given URL. + * + * When one factory is responsible for more than one type of resource then this method has to be called for each type. If this method is called multiple + * times for the same URL then a previously registered factory is removed for the URL. + * @param sResourceURL The URL of the resource that the factory can create. + * @param xResourceFactory The resource factory object. + */ + addResourceFactory(sResourceURL: string, xResourceFactory: XResourceFactory): void; + + /** + * Return the resource factory that was previously registered for the given resource type. This method is typically called by one of the resource + * controllers. + * @param sResourceURL The URL of the resource type for which to return the resource factory. + * @returns When no resource factory was registered for the given resource type then an empty reference is returned. + */ + getResourceFactory(sResourceURL: string): XResourceFactory; + + /** + * Remove a resource factory for all resource types it has been registered for. Use {@link removeResourceFactoryForURL()} to remove a factory just for + * one resource type and to leave it registered for others. + * @param xResourceFactory The resource factory object to remove. + */ + removeResourceFactoryForReference(xResourceFactory: XResourceFactory): void; + + /** + * Remove a resource factory for one type of resource. When the factory has been registered for other URLs as well then it remains registered for them. + * Use the {@link removeResourceFactoryForReference()} to remove a factory completely. + * @param sResourceURL The URL for which to remove the resource factory. + */ + removeResourceFactoryForURL(sResourceURL: string): void; + } + + /** + * A resource id uses a set of URLs to unambiguously specify a resource of the drawing framework. + * + * Resources of the drawing framework are panes, views, tool bars, and command groups. One URL describes the type of the actual resource. A sequence of + * URLs (typically one, sometimes two) specifies its anchor, the resource it is bound to. The anchor typically is a pane (for views), or it is empty (for + * panes). + * + * The resource URL may be empty. In this case the anchor is empty, too. Such an empty resource id does not describe a resource but rather the absence of + * one. Instead of an empty {@link XResourceId} object an empty reference can be used in many places. + * + * The resource URL may have arguments that are passed to the factory method on its creation. Arguments are only available through the {@link + * getFullResourceURL()} . The {@link getResourceURL()} method strips them away. + */ + interface XResourceId { + /** Return a new {@link XResourceId} that represents the anchor resource. */ + readonly Anchor: XResourceId; + + /** + * Return the, possibly empty, list of anchor URLs. The URLs are ordered so that the one in position 0 is the direct anchor of the resource, while the + * one in position i+1 is the direct anchor of the one in position i. + */ + readonly AnchorURLs: SafeArray; + + /** Return a copy of the called resource id. The caller becomes the owner of the new object. */ + clone(): XResourceId; + + /** + * Compare the called {@link XResourceId} object with the given one. + * + * The two resource ids A and B are compared so that if A; + + /** Return an URL object of the resource URL that may contain arguments. */ + getFullResourceURL(): util.URL; + + /** Return the type prefix of the resource URL. This includes all up to and including the second slash. */ + getResourceTypePrefix(): string; + + /** Return the URL of the resource. Arguments supplied on creation are stripped away. Use {@link getFullResourceURL()} to access them. */ + getResourceURL(): string; + + /** Return whether there is a non-empty anchor URL. When this method returns `FALSE` then {@link getAnchorURLs()} will return an empty list. */ + hasAnchor(): boolean; + + /** + * Return whether the anchor of the called resource id object represents the same resource as the given object. + * + * Note that not only the anchor of the given object is taken into account. The whole object, including the resource URL, is interpreted as anchor + * resource. + * @param xAnchorId The resource id of the anchor. + * @param eMode This mode specifies how the called resource has to be bound to the given anchor in order to have this function return `TRUE` . If eMode is + */ + isBoundTo(xAnchorId: XResourceId, eMode: AnchorBindingMode): boolean; + + /** + * Return whether the anchor of the called resource id object represents the same resource as the given anchor URL. This is a convenience variant of the + * {@link isBoundTo()} function that can also be seen as an optimization for the case that the anchor consists of exactly one URL. + * @param AnchorURL The resource URL of the anchor. + * @param eMode This mode specifies how the called resource has to be bound to the given anchor in order to have this function return. See the description + */ + isBoundToURL(AnchorURL: string, eMode: AnchorBindingMode): boolean; + + /** Return the type prefix of the resource URL. This includes all up to and including the second slash. */ + readonly ResourceTypePrefix: string; + + /** Return the URL of the resource. Arguments supplied on creation are stripped away. Use {@link getFullResourceURL()} to access them. */ + readonly ResourceURL: string; + } + + /** + * UI control for the selection of views in a pane. + * + * Every tab of a tab bar has, besides its localized title and help text, the URL of a view. A possible alternative would be to use a command URL instead + * of the view URL. + * + * In the current Impress implementation a tab bar is only used for the center pane to switch between views in the center pane. Tab bars can make sense + * for other panes as well, i.e. for showing either the slide sorter or the outline view in the left pane. + * + * Tab bar buttons are identified by their resource id. Note that because the resource anchors are all the same (the tab bar), it is the resource URL + * that really identifies a button. There can not be two buttons with the same resource id. + * + * A better place for this interface (in an extended version) would be `com::sun::star::awt` + * @see TabBarButton + */ + interface XTabBar { + /** + * Add a tab bar button to the right of another one. + * @param aButton The new tab bar button that is to be inserted. If a button with the same resource id is already present than that is removed before the n + * @param aAnchor The new button is inserted to the right of this button. When its {@link ResourceId} is empty then the new button is inserted at the left + */ + addTabBarButtonAfter(aButton: TabBarButton, aAnchor: TabBarButton): void; + + /** + * Add a tab bar button at the right most position. + * @param aButton The new tab bar button that is to be inserted. + */ + appendTabBarButton(aButton: TabBarButton): void; + + /** + * Return a sequence of all the tab bar buttons. + * + * Their order reflects the visible order in the tab bar. + * + * This method can be used when {@link addTabBarButtonAfter()} does not provide enough control as to where to insert a new button. + */ + getTabBarButtons(): SafeArray; + + /** + * Test whether the specified button exists in the tab bar. + * @param aButton The tab bar button whose existence is tested. + * @returns Returns `TRUE` when the button exists. + */ + hasTabBarButton(aButton: TabBarButton): boolean; + + /** + * Remove a tab bar button. + * @param aButton The tab bar button to remove. When there is no button with the specified resource id then this call is silently ignored. + */ + removeTabBarButton(aButton: TabBarButton): void; + + /** + * Return a sequence of all the tab bar buttons. + * + * Their order reflects the visible order in the tab bar. + * + * This method can be used when {@link addTabBarButtonAfter()} does not provide enough control as to where to insert a new button. + */ + readonly TabBarButtons: SafeArray; + } + } + + namespace ShadingPattern { + const enum Constants { + CLEAR = 0, + DIAG_CROSS = 19, + DIAG_STRIPE = 17, + HORZ_CROSS = 18, + HORZ_STRIPE = 14, + NIL = 65535, + PCT10 = 3, + PCT12 = 37, + PCT15 = 38, + PCT17 = 39, + PCT2 = 35, + PCT20 = 4, + PCT22 = 40, + PCT25 = 5, + PCT27 = 41, + PCT30 = 6, + PCT32 = 42, + PCT35 = 43, + PCT37 = 44, + PCT40 = 7, + PCT42 = 45, + PCT45 = 46, + PCT47 = 47, + PCT5 = 2, + PCT50 = 8, + PCT52 = 48, + PCT55 = 49, + PCT57 = 50, + PCT60 = 9, + PCT62 = 51, + PCT65 = 52, + PCT67 = 53, + PCT7 = 36, + PCT70 = 10, + PCT72 = 54, + PCT75 = 11, + PCT77 = 55, + PCT80 = 12, + PCT82 = 56, + PCT85 = 57, + PCT87 = 58, + PCT90 = 13, + PCT92 = 59, + PCT95 = 60, + PCT97 = 61, + REVERSE_DIAG_STRIPE = 16, + SOLID = 1, + THIN_DIAG_CROSS = 25, + THIN_DIAG_STRIPE = 23, + THIN_HORZ_CROSS = 24, + THIN_HORZ_STRIPE = 20, + THIN_REVERSE_DIAG_STRIPE = 22, + THIN_VERT_STRIPE = 21, + UNUSED_1 = 26, + UNUSED_2 = 27, + UNUSED_3 = 28, + UNUSED_4 = 29, + UNUSED_5 = 30, + UNUSED_6 = 31, + UNUSED_7 = 32, + UNUSED_8 = 33, + UNUSED_9 = 34, + VERT_STRIPE = 15, + } + } + } + + namespace embed { + /** @since LibreOffice 4.1 */ + type EmbeddedObjectCreator = XEmbeddedObjectCreator; + + /** This is a service that allows to get access to a file system folder using storage hierarchy. */ + type FileSystemStorage = BaseStorage; + + /** + * The {@link FileSystemStorageFactory} is a service that allows to create a {@link FileSystemStorage} based on URL. The URL must point to a folder. + * + * In case {@link com.sun.star.lang.XSingleServiceFactory.createInstance()} call is used the result storage will be open in read-write mode based on an + * arbitrary file system folder. + * + * In case {@link com.sun.star.lang.XSingleServiceFactory.createInstanceWithArguments()} call is used a sequence of the following parameters can be used: + * + * **parameter 1 **: specifies source of the object, it must be a string containing URL.; + * + * **parameter 2 **: specifies mode the storage should be open in, can take values from {@link ElementModes} constant set.; + * + * **parameter 3 **: allows to provide com::sun::star::document::MediaDescryptor to the storage so some parts can be used for initialization, it can be + * for example {@link com.sun.star.task.XInteractionHandler} implementation. + * + * + * + * The parameters are optional, that means that sequence can be empty or contain only first parameter, or first and second one. In case no parameters are + * provided the call works the same way as {@link com.sun.star.lang.XSingleServiceFactory.createInstance()} . In case only first parameter is provided, + * the storage is opened in readonly mode. + * + * The opened storages can support read access in addition to specified one. + */ + type FileSystemStorageFactory = lang.XSingleServiceFactory; + + /** @since LibreOffice 4.1 */ + type HatchWindowFactory = XHatchWindowFactory; + + /** + * This exception can be thrown in case a storage is invalid. + * + * For example in case it is broken one. + */ + type InvalidStorageException = io.IOException; + + /** + * This exception can be thrown in case a linked object is misused. + * + * Or if embedded object is misused as a linked object. + */ + type LinkageMisuseException = uno.Exception; + + /** @since LibreOffice 4.1 */ + type MSOLEObjectSystemCreator = XEmbedObjectClipboardCreator; + + /** + * This exception can be thrown in case a list of accepted verbs of states is requested and the object is in loaded state and this information can be + * retrieved only when the object is in running state. + * + * This exception means that the object supports at least running state in addition to the loaded state. Other states and possible verbs can be detected + * only after object is switched to running state. + */ + type NeedsRunningStateException = WrongStateException; + + /** This exception can be thrown in case the object can not provide own visual area currently. */ + type NoVisualAreaSizeException = uno.Exception; + + /** + * This exception can be thrown in case container wants to avoid objects saving. + * @see XEmbeddedClient + */ + type ObjectSaveVetoException = uno.Exception; + + /** @since LibreOffice 4.1 */ + type OLEEmbeddedObjectFactory = XEmbeddedObjectCreator; + + /** @since LibreOffice 4.1 */ + type OOoEmbeddedObjectFactory = XEmbeddedObjectCreator; + + /** + * The {@link StorageFactory} is a service that allows to create a storage based on either stream or URL. + * + * In case {@link com.sun.star.lang.XSingleServiceFactory.createInstance()} call is used the result storage will be open in read-write mode based on an + * arbitrary medium. + * + * In case {@link com.sun.star.lang.XSingleServiceFactory.createInstanceWithArguments()} call is used a sequence of the following parameters can be used: + * + * **parameter 1 **: specifies source of the object, it can be a string containing URL, an {@link com.sun.star.io.XStream} implementation or {@link + * com.sun.star.io.XInputStream} ; in case of {@link com.sun.star.io.XStream} implementation the {@link com.sun.star.io.XSeekable} interface must be + * supported.; + * + * **parameter 2 **: specifies mode the storage should be open in, can take values from {@link ElementModes} constant set.; + * + * **parameter 3 **: this parameter represents `any` containing a sequence of {@link com.sun.star.beans.PropertyValue} . ; The parameter can contain + * entries from com::sun::star::document::MediaDescryptor to transport some document info during the storage initialization, it can be for example {@link + * com.sun.star.task.XInteractionHandler} implementation, password for the storage and repair package flag. ; Additionally the parameter might contain + * property with the name "StorageFormat" that can take values from {@link com.sun.star.embed.StorageFormats} . If the property is not provided a storage + * of package format is created. + * + * + * + * The parameters are optional, that means that sequence can be empty or contain only first parameter, or first and second one. In case no parameters are + * provided the call works the same way as {@link com.sun.star.lang.XSingleServiceFactory.createInstance()} . In case only first parameter is provided, + * the storage is opened in readonly mode. + * + * The opened root storage can support read access in addition to specified one. + */ + type StorageFactory = lang.XSingleServiceFactory; + + /** This exception can wrap an exception thrown during {@link XStorage} methods execution. */ + type StorageWrappedTargetException = lang.WrappedTargetException; + + /** This exception can be thrown in case the object's state does not allow to call requested functionality. */ + type WrongStateException = uno.Exception; + + /** + * Represents a marker for embedded OLE objects. + * @since LibreOffice 5.2 + */ + type XEmbeddedOleObject = any; + + /** This is a service that allows to get access to a storage hierarchy. */ + interface BaseStorage extends XStorage, beans.XPropertySet { + /** + * allows to get the mode the storage is opened in. + * + * Can be a combination of values from {@link ElementModes} . + */ + OpenMode: number; + + /** allows to retrieve URL the storage is based on. */ + URL: string; + } + + /** + * The main task of this service is to close an office document frame embedded in an application running in another process correctly. + * + * The usual usage of this service is to create it, initialize with document frame, and to dispose the service. While disposing the service will do all + * the required actions to let the frame be closed using com::sun::star::util::XCloseable::close( true ). Thus in case there is a code that prevents + * closing of the frame the code automatically becomes the owner of the frame. + * + * In addition the code will disconnect the VCL window the frame is based on from the container system window. + */ + interface DocumentCloser extends lang.XComponent { + /** + * is used to initialize the object on it's creation. + * @param xFrame the frame of the document that should be closed. + */ + DocumentCloserCtor1(xFrame: frame.XFrame): void; + } + + /** + * describes properties of an embedded object + * + * This service may be represented by a com::sun::star::beansPropertyValue[]. Such descriptors will be passed to different functions, included into + * possible load/save processes. Every member of such process can use this descriptor and may change it to actualize the information about the object. So + * this descriptor should be used as an in/out parameter. + * @see com.sun.star.beans.PropertyValue + */ + interface EmbeddedObjectDescriptor { + /** allows to provide a dispatch interceptor for outplace activation. */ + OutplaceDispatchInterceptor: frame.XDispatchProviderInterceptor; + + /** + * denotes the storage from which the embedded object is to be recovered. + * + * Upon activating the embedded object, it is normally loaded from a storage as denoted by the parameters to the {@link XEmbedObjectCreator} method + * calls. + * + * You can pass a non- `NULL``RecoveryStorage` in the object descriptor if you wish to load the embedded object from an alternate storage. + * + * The object will still be based on the storage denoted in the `XEmbedObjectCreator` method call, i.e., subsequent save operations will still use that + * storage. `RecoveryStorage` is used at loading time only, and then discarded. + */ + RecoveryStorage: XStorage; + + /** + * lets the graphical representation of embedded document be stored. + * + * Setting of this property to true tells the embedded object that controls the document to store or not to store the graphical representation of the + * document in to the object persistence. If this property is not set the object makes the decision itself. + */ + StoreVisualReplacement: boolean; + } + + /** is intended to provide result of creation of an embedded object by dialog. */ + interface InsertedObjectInfo { + /** The new created embedded object. */ + Object: XEmbeddedObject; + + /** + * Container related options selected by user. + * + * A dialog related to embedded object creation usually allows user to make some choices that can be container related. This information can be provided + * by this member. + */ + Options: SafeArray; + } + + /** + * The main task of this service is to prevent closing, terminating and/or etc. of controlled object. + * + * After creation the service adds a listener of requested type ( close, terminate and/or etc. ) to the controlled object and let the listener throw + * related veto exception until the service is disposed. + */ + interface InstanceLocker extends lang.XComponent { + /** + * is used to initialize the object on it's creation. + * @param xInstance the controlled object. Must implement the related to the requested actions broadcaster interface. + * @param nActions specifies the actions that should be done ( prevent closing, prevent termination and/or etc. ). It must not be empty and can currently c + */ + InstanceLockerCtor1(xInstance: uno.XInterface, nActions: number): void; + + /** + * is used to initialize the object on it's creation. + * @param xInstance the controlled object. Must implement the related to the requested actions broadcaster interface. + * @param nActions specifies the actions that should be done ( prevent closing, prevent termination and/or etc. ). It must not be empty and can currently c + * @param xApprove The object implementing {@link XActionsApproval} interface. If this parameter is an empty reference the object will proceed with the spe + */ + InstanceLockerCtor2(xInstance: uno.XInterface, nActions: number, xApprove: XActionsApproval): void; + } + + /** This service provides a simple functionality to allow read/write the storages in OLE storage format. */ + interface OLESimpleStorage extends XOLESimpleStorage { + /** + * is used to initialize the object on it's creation. + * @param xInputStream [in] the InputStream that contains data in OLE storage format. + * @param bNoTempCopy [in] specifies whether a temporary copy should be created during substreams opening. If the copy is not created the storage must stay + */ + createFromInputStream(xInputStream: io.XInputStream, bNoTempCopy: boolean): void; + + /** + * is used to initialize the object on it's creation. + * @param xStream [in] the Stream that contains data in OLE storage format. + * @param bNoTempCopy [in] specifies whether a temporary copy should be created during substreams opening. If the copy is not created the storage must stay + */ + createFromStream(xStream: io.XStream, bNoTempCopy: boolean): void; + } + + /** This exception can be thrown in case the object does not allow to call requested functionality currently because the object is changing state. */ + interface StateChangeInProgressException extends WrongStateException { + /** + * contains the target state the object tries to reach currently. + * + * Contains a value from {@link EmbedStates} constant set. + */ + TargetState: number; + } + + /** + * This is a service that allows to get access to a package using storage hierarchy. + * + * A root storage should be retrieved by using {@link StorageFactory} service. Substorages are created through {@link XStorage} interface of a parent + * storage. + */ + interface Storage extends BaseStorage, XTransactedObject, XTransactionBroadcaster, XEncryptionProtectedSource { + /** + * allows to detect if the storage contains encrypted entries. + * + * In case it is set to `TRUE` the storage itself and/or a tree of substorages contain encrypted streams. Usually in case this property is supported the + * implementation supports {@link XEncryptionProtectedSource} interface. + */ + HasEncryptedEntries: boolean; + + /** + * allows to detect if the storage contains non-encrypted entries. + * + * In case it is set to `TRUE` the storage itself and/or a tree of substorages contains non-encrypted streams. Usually in case this property is supported + * the implementation supports {@link XEncryptionProtectedSource} interface. + */ + HasNonEncryptedEntries: boolean; + + /** allows to detect whether the storage is a root one. */ + IsRoot: boolean; + + /** allows to get and set the media type of the storage. */ + MediaType: string; + + /** + * allows to detect whether mediatype is detected by using fallback approach. + * + * Can be set to true if the mediatype can not be detected in standard way, but there is a fallback solution allows to do it. + * + * Usually means that the document validity is questionable, although the package itself is not corrupted. The decision about document validity in this + * case is in application hands. It is up to user of the storage to decide whether he accepts the fallback approach for an implementation of this + * service, outputs a warning or an error. + */ + MediaTypeFallbackIsUsed: boolean; + + /** allows to detect whether storage is open in "repair package" mode or not. */ + RepairPackage: boolean; + + /** allows to get and set the version of the format related to the MediaType. */ + Version: string; + } + + /** + * This is a service that represents a stream that can be provided by {@link XStorage.openStreamElement()} call implemented by {@link Storage} service. + * + * In case a stream is open with read-write access only one instance of the stream can exist. + */ + interface StorageStream extends io.XStream, lang.XComponent, beans.XPropertySet, io.XSeekable, XEncryptionProtectedSource { + /** specifies if the stream should be compressed next time it is stored. */ + IsCompressed: boolean; + + /** + * allows to detect if the stream is encrypted. + * + * The property value `TRUE` means that the stream is currently encrypted. `FALSE` - the stream is not encrypted. + * + * If somebody sets a password explicitly by using {@link XEncryptionProtectedSource} interface the value is automatically set to `TRUE` . If the + * interface is used to remove the encryption - the value is automatically set to `FALSE` . + */ + IsEncrypted: boolean; + + /** allows to get and set media type of the stream. */ + MediaType: string; + + /** allows to detect size of the stream in bytes. */ + Size: number; + + /** + * specifies whether the stream will become encrypted next time the common storage password holder is committed. + * + * The property value `TRUE` means that the stream will become encrypted after the closest storage in the parent hierarchy, that has common storage + * password, is committed. `FALSE` - the stream will not react to commit of such a storage. + * + * In case stream is not encrypted and the property is set to `TRUE` , the stream will stay non-encrypted until the closest storage in the parent + * hierarchy, that has common storage password, is committed. On the commit the stream will be encrypted with the common storage password. If there is no + * such storage in the hierarchy the stream will not be encrypted at all. Thus this property must be set very carefully. + * + * If somebody sets a password explicitly by using {@link XEncryptionProtectedSource} interface the value is automatically set to `FALSE` and the stream + * becomes encrypted with specified password immediately. + * + * In case stream is encrypted one and the value is set to `TRUE` the stream becomes non-encrypted until the common storage password holder is committed. + * The data about previously set password ( if any ) will be removed and the stream can be accessed as non-encrypted stream. + */ + UseCommonStoragePasswordEncryption: boolean; + } + + /** This exception can be thrown in case specified state can not be reached. */ + interface UnreachableStateException extends uno.Exception { + /** The current state of the object. */ + CurrentState: number; + + /** The state that could not be reached. */ + NextState: number; + } + + /** + * This exception can be thrown in case a storage commit is failed. + * + * If a commit process of a storage fails on last transfer and the original content may be corrupted the storage should throw this exception to notify + * the user that a backup usage is required to restore the original content. + * + * The storage itself must disconnect from the medium it is based on to allow restoring. Although the storage will still contain all the data internally, + * and can be used as a temporary storage usually used. + */ + interface UseBackupException extends io.IOException { + /** The URL of the temporary file the storage is based on now. */ + TemporaryFileURL: string; + } + + /** describes a verb. */ + interface VerbDescriptor { + /** + * specifies the attributes of the verb. + * + * It can take values from {@link VerbAttributes} . + */ + VerbAttributes: number; + + /** + * specifies the flags that are set for the verb. + * + * The flags can be used to build the verb's menu. + */ + VerbFlags: number; + + /** specifies the id of the verb. */ + VerbID: number; + + /** specifies the name of the verb. */ + VerbName: string; + } + + /** can contain a graphical representation in an arbitrary format. */ + interface VisualRepresentation { + /** The data in the format specified by {@link Flavor} . */ + Data: any; + + /** The format of the visual representation. */ + Flavor: datatransfer.DataFlavor; + } + + /** + * allows to request an approval for an action. + * + * An implementation of this interface is usually provided to another object to allow this object to request an approval for actions. The list of + * possible actions must be documented in documentation of the object. + */ + interface XActionsApproval extends uno.XInterface { + /** + * requests an approval for the specified action. + * @param nAction a value specifying the action that should be approved. Could take values from {@link Actions} constants set. The explicit set of the acti + * @returns returns `TRUE` in case the specified action is approved. + */ + approveAction(nAction: number): boolean; + } + + /** represents common functionality for embedded objects */ + interface XClassifiedObject extends uno.XInterface { + /** + * retrieves class ID of the object. + * @returns unique class ID of the object + */ + readonly ClassID: SafeArray; + + /** + * retrieves symbolic name for the object type to be used in UI. + * @returns the symbolic name for the object + */ + readonly ClassName: string; + + /** + * retrieves class ID of the object. + * @returns unique class ID of the object + */ + getClassID(): SafeArray; + + /** + * retrieves symbolic name for the object type to be used in UI. + * @returns the symbolic name for the object + */ + getClassName(): string; + + /** + * sets the class ID and symbolic name to an object. + * @param aClassID the new class ID + * @param sClassName the new symbolic name + * @throws com::sun::star::lang::NoSupportException in case changing of class information is not allowed + */ + setClassInfo(aClassID: LibreOffice.SeqEquiv, sClassName: string): void; + } + + /** specifies common implementation for embedded objects and links persistence. */ + interface XCommonEmbedPersist extends uno.XInterface { + /** + * allows to detect if the data store is read-only. + * @returns `TRUE` if the data store is readonly or opened readonly `FALSE` otherwise + * @throws com::sun::star::embed::WrongStateException the object is in wrong state ( has no entry ) + */ + isReadonly(): boolean; + + /** + * lets the object or the link reload itself. + * + * If the object has persistence it will be reloaded from its persistent entry. + * @param aMediaArgs optional parameters for document reloading, see also {@link com.sun.star.document.MediaDescriptor} + * @param aObjectArgs optional parameters for object reloading, see also {@link com.sun.star.embed.EmbeddedObjectDescriptor} + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + * @throws com::sun::star::io::IOException in case of io problems during opening or creation + * @throws com::sun::star::uno::Exception in case of other problems + */ + reload(aMediaArgs: LibreOffice.SeqEquiv, aObjectArgs: LibreOffice.SeqEquiv): void; + + /** + * lets the object or the link store itself. + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + * @throws com::sun::star::io::IOException in case of io problems during saving + * @throws com::sun::star::uno::Exception in case of other problems + */ + storeOwn(): void; + } + + /** provides access to a component. */ + interface XComponentSupplier extends uno.XInterface { + /** + * allows to get access to a component. + * + * The component may not support {@link com.sun.star.lang.XComponent} interface. + * @returns component representation + */ + readonly Component: util.XCloseable; + + /** + * allows to get access to a component. + * + * The component may not support {@link com.sun.star.lang.XComponent} interface. + * @returns component representation + */ + getComponent(): util.XCloseable; + } + + /** represents common functionality for embedded clients. */ + interface XEmbeddedClient extends XComponentSupplier { + /** + * asks client to let the object store itself. + * @throws com::sun::star::uno::ObjectSaveVetoException in case container chants to avoid saving of object + * @throws com::sun::star::uno::Exception in case of problems during saving + */ + saveObject(): void; + + /** + * An object can use this method to notify the client when the object outplace window becomes visible or invisible. + * @param bVisible visibility state of the window + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + */ + visibilityChanged(bVisible: boolean): void; + } + + /** represents common functionality for embedded objects. */ + interface XEmbeddedObject extends XVisualObject, XClassifiedObject, XComponentSupplier, XStateChangeBroadcaster, document.XEventBroadcaster, util.XCloseable { + /** + * changes the state of the object to the requested one. + * @param nNewState specifies the new state, can take values from the constant set {@link com.sun.star.embed.EmbedStates} + * @throws com::sun::star::embed::UnreachableStateException the specified state can not be reached + * @throws com::sun::star::embed::WrongStateException in case object is in invalid state + * @throws com::sun::star::uno::Exception in case of other problems + */ + changeState(nNewState: number): void; + + /** + * provides access to the internal link to the container client. + * @returns a reference to related container client if any is set + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + */ + ClientSite: XEmbeddedClient; + + /** + * returns the current state of the object. + * @returns the current state of the object + * @throws com::sun::star::embed::WrongStateException in case object is in invalid state + */ + readonly CurrentState: number; + + /** + * lets object perform an action referenced by nVerbID. + * @param nVerbID specifies an action to perform, can take values from {@link EmbedVerbs} + * @throws com::sun::star::lang::IllegalArgumentException the verb is not supported + * @throws com::sun::star::embed::WrongStateException the object is in wrong state to call the function + * @throws com::sun::star::embed::UnreachableStateException the state, required by the verb, can not be reached + * @throws com::sun::star::uno::Exception in case of other problems + */ + doVerb(nVerbID: number): void; + + /** + * provides access to the internal link to the container client. + * @returns a reference to related container client if any is set + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + */ + getClientSite(): XEmbeddedClient; + + /** + * returns the current state of the object. + * @returns the current state of the object + * @throws com::sun::star::embed::WrongStateException in case object is in invalid state + */ + getCurrentState(): number; + + /** + * returns supported states for the object. + * @returns the sequence of states the object can be set to + * @throws com::sun::star::embed::NeedsRunnignStateException means that the object is in loaded state now and can be switched to running state, other possib + * @throws com::sun::star::embed::WrongStateException in case object is in invalid state + */ + getReachableStates(): SafeArray; + + /** + * retrieves the status of the object. + * @param nAspect the aspect specifying the form of object representation + * @returns the value specifying the status of the object for specified aspect can take values from {@link EmbedMisc} constant set + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + */ + getStatus(nAspect: number): number; + + /** + * returns supported verbs for the object. + * @returns the sequence of verbs the object supports + * @throws com::sun::star::embed::NeedsRunnignStateException means that the object is in loaded state now and can be switched to running state, acceptable v + * @throws com::sun::star::embed::WrongStateException the object is in wrong state to call the function + */ + getSupportedVerbs(): SafeArray; + + /** + * returns supported states for the object. + * @returns the sequence of states the object can be set to + * @throws com::sun::star::embed::NeedsRunnignStateException means that the object is in loaded state now and can be switched to running state, other possib + * @throws com::sun::star::embed::WrongStateException in case object is in invalid state + */ + readonly ReachableStates: SafeArray; + + /** + * sets a connection to the container's client. + * @param xClient provides a reference to a client implementation + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + */ + setClientSite(xClient: XEmbeddedClient): void; + + /** + * provides object with the name of container document. + * @param sName name of the container document + */ + setContainerName(sName: string): void; + + /** + * specifies how often the object's representation should be updated. + * @param nMode the new update mode, can take values from EmbeddedUpdateModes + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + */ + setUpdateMode(nMode: number): void; + + /** + * returns supported verbs for the object. + * @returns the sequence of verbs the object supports + * @throws com::sun::star::embed::NeedsRunnignStateException means that the object is in loaded state now and can be switched to running state, acceptable v + * @throws com::sun::star::embed::WrongStateException the object is in wrong state to call the function + */ + readonly SupportedVerbs: SafeArray; + + /** + * updates object's representations. + * @throws com::sun::star::embed::WrongStateException the object is in wrong state to call the function + * @throws com::sun::star::uno::Exception in case problems detected + */ + update(): void; + } + + /** @since LibreOffice 4.1 */ + interface XEmbeddedObjectCreator extends XEmbedObjectCreator, XEmbedObjectFactory, XLinkCreator, XLinkFactory { } + + /** + * allows to create and initialize a new embedded object from clipboard. + * + * This interface contains methods that can help to create and initialize an embedded object based on system clipboard. + */ + interface XEmbedObjectClipboardCreator extends uno.XInterface { + /** + * creates a new object and initializes it from the system clipboard. + * + * In case specified entry exists it's contents are ignored and will be overwritten on storing. + * + * The clipboard can provide a number of choices that are container related. This information will be returned in the {@link InsertedObjectInfo} object. + * @param xStorage a parent storage the entry should be created/opened in + * @param sEntryName a name for the entry + * @param aObjectArgs optional parameters for the object persistence initialization see also {@link EmbeddedObjectDescriptor} + * @returns the structure containing the object and container related options + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + * @throws com::sun::star::io::IOException in case of io problems during opening or creation + * @throws com::sun::star::uno::Exception in case of other problems + */ + createInstanceInitFromClipboard(xStorage: XStorage, sEntryName: string, aObjectArgs: LibreOffice.SeqEquiv): InsertedObjectInfo; + } + + /** + * allows to create and initialize a new embedded object. + * + * This interface contains methods that can help to create and initialize an embedded object. + */ + interface XEmbedObjectCreator extends uno.XInterface { + /** + * creates a new object that should be based on specified storage entry. + * + * The specified entry must exists and the object should be loaded from the entry. In case a persistent representation of a link is specified, the result + * object will be a link. + * @param xStorage a parent storage the entry should be opened in + * @param sEntryName a name for the entry + * @param aMediaDescriptor an object of type {@link com.sun.star.document.MediaDescriptor} that specifies document related properties; please remember that + * @param aObjectArgs an object of type {@link EmbeddedObjectDescriptor} contains object related properties + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + * @throws com::sun::star::container::NoSuchElementException the specified entry does not exist + * @throws com::sun::star::io::IOException in case of io problems during opening + * @throws com::sun::star::uno::Exception in case of other problems + */ + createInstanceInitFromEntry( + xStorage: XStorage, sEntryName: string, aMediaDescriptor: LibreOffice.SeqEquiv, aObjectArgs: LibreOffice.SeqEquiv): uno.XInterface; + + /** + * creates a new object and initializes it based on {@link com.sun.star.document.MediaDescriptor} . + * + * In case specified entry exists it's contents are ignored and will be overwritten on storing. + * @param xStorage a parent storage the entry should be created/opened in + * @param sEntryName a name for the entry + * @param aMediaDescriptor an object of type {@link com.sun.star.document.MediaDescriptor} that specifies source + * @param aObjectArgs an object of type {@link EmbeddedObjectDescriptor} contains object related properties + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + * @throws com::sun::star::io::IOException in case of io problems during opening or creation + * @throws com::sun::star::uno::Exception in case of other problems + */ + createInstanceInitFromMediaDescriptor( + xStorage: XStorage, sEntryName: string, aMediaDescriptor: LibreOffice.SeqEquiv, aObjectArgs: LibreOffice.SeqEquiv): uno.XInterface; + + /** + * creates a new object and initializes it as a new one. + * + * In case specified entry exists it's contents are ignored and will be overwritten on storing. + * @param aClassID the class id of the new object + * @param sClassName the class name of the new object + * @param xStorage a parent storage the entry should be created/opened in + * @param sEntryName a name for the entry + * @param aObjectArgs optional parameters for the object persistence initialization see also {@link EmbeddedObjectDescriptor} + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + * @throws com::sun::star::io::IOException in case of io problems during opening or creation + * @throws com::sun::star::uno::Exception in case of other problems + */ + createInstanceInitNew( + aClassID: LibreOffice.SeqEquiv, sClassName: string, xStorage: XStorage, sEntryName: string, aObjectArgs: LibreOffice.SeqEquiv): uno.XInterface; + } + + /** + * allows to create and initialize a new embedded object of specified type. + * + * This interface provides user with full control over object creation. + */ + interface XEmbedObjectFactory extends uno.XInterface { + /** + * creates a new object and transport parameters for persistent initialization. + * + * This method can be used to have a full control over persistence initialization of a object. + * + * If the service implementation does not support {@link XEmbedObjectCreator} interface, it must accept the empty aClassID parameter in case of loading + * from existing entry. + * @param aClassID the class id of the new object + * @param sClassName the class name of the new object + * @param xStorage a parent storage the entry should be created/opened in + * @param sEntName a name for the entry + * @param nEntryConnectionMode a mode in which the object should be initialized from entry can take values from {@link EntryInitModes} constant set + * @param aArgs optional parameters for the embedded document persistence initialization, see also {@link com.sun.star.document.MediaDescriptor} + * @param aObjectArgs optional parameters for the object persistence initialization, see also {@link com.sun.star.embed.EmbeddedObjectDescriptor} + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + * @throws com::sun::star::io::IOException in case of io problems during opening or creation + * @throws com::sun::star::uno::Exception in case of other problems + */ + createInstanceUserInit( + aClassID: LibreOffice.SeqEquiv, sClassName: string, xStorage: XStorage, sEntName: string, nEntryConnectionMode: number, + aArgs: LibreOffice.SeqEquiv, aObjectArgs: LibreOffice.SeqEquiv): uno.XInterface; + } + + /** + * specifies an implementation for embedded object persistence. + * + * The idea is that any usable embedded object should be initialized with an entry in the parent storage that will be used as persistent representation. + */ + interface XEmbedPersist extends XCommonEmbedPersist { + /** + * allows to retrieve the current object entry name. + * @returns the object entry name if any + * @throws com::sun::star::embed::WrongStateException the object is in wrong state ( has no entry ) + */ + readonly EntryName: string; + + /** + * allows to retrieve the current object entry name. + * @returns the object entry name if any + * @throws com::sun::star::embed::WrongStateException the object is in wrong state ( has no entry ) + */ + getEntryName(): string; + + /** + * allows to detect if the object has entry. + * @returns `TRUE` if the object has own entry set `FALSE` otherwise + */ + hasEntry(): boolean; + + /** + * specifies whether the object should use an old storage or a new one after "save as" operation. + * @param bUseNew `TRUE` the new storage should be used `FALSE` the old one + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + * @throws com::sun::star::uno::Exception in case of other problems + */ + saveCompleted(bUseNew: boolean): void; + + /** + * provides object with a parent storage and a name for object's entry. + * + * An entry with the specified name should be created/opened inside provided storage. It can be a storage or a stream. For example, OOo API will refer to + * OLE storages only by streams, but the object implementation will use storage based on this stream. + * + * Factory does this call to initialize the embedded object. The linked object can be initialized by factory in different way ( internally ). + * + * It is also possible to switch object persistent representation through this call. Actually this is the way, this call can be used by user ( since + * initialization is done by factory ). + * @param xStorage a parent storage the entry should be created in + * @param sEntName a name for the entry + * @param nEntryConnectionMode a mode in which the object should be initialized from entry can take values from {@link EntryInitModes} constant set + * @param aMediaArgs optional parameters for the embedded document persistence initialization, see also {@link com.sun.star.document.MediaDescriptor} + * @param aObjectArgs optional parameters for the object persistence initialization, see also {@link com.sun.star.embed.EmbeddedObjectDescriptor} + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + * @throws com::sun::star::io::IOException in case of io problems during opening or creation + * @throws com::sun::star::uno::Exception in case of other problems + */ + setPersistentEntry( + xStorage: XStorage, sEntName: string, nEntryConnectionMode: number, aMediaArgs: LibreOffice.SeqEquiv, + aObjectArgs: LibreOffice.SeqEquiv): void; + + /** + * lets the object store itself to an entry in destination storage and prepare to use the new entry for own persistence. + * + * The object should be stored to the new entry, after that the entry should be remembered by the object. After the storing process is finished the + * {@link XEmbedPersist.saveCompleted()} method can be used to specify whether the object should use the new entry or the old one. The object persistence + * can not be used until {@link XEmbedPersist.saveCompleted()} is called. So this state can be treated as "HandsOff" state. + * @param xStorage a parent storage the entry should be created in + * @param sEntName a name for the entry + * @param aMediaArgs optional parameters for document saving, see also {@link com.sun.star.document.MediaDescriptor} + * @param aObjectArgs optional parameters for the object saving, see also {@link com.sun.star.embed.EmbeddedObjectDescriptor} + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + * @throws com::sun::star::io::IOException in case of io problems during storing + * @throws com::sun::star::uno::Exception in case of other problems + */ + storeAsEntry(xStorage: XStorage, sEntName: string, aMediaArgs: LibreOffice.SeqEquiv, aObjectArgs: LibreOffice.SeqEquiv): void; + + /** + * lets the object store itself to an entry in destination storage, the own persistence entry is not changed. + * @param xStorage a parent storage the entry should be created inside + * @param sEntName a name for the entry + * @param aMediaArgs optional parameters for document saving, see also {@link com.sun.star.document.MediaDescriptor} + * @param aObjectArgs optional parameters for the object saving, see also {@link com.sun.star.embed.EmbeddedObjectDescriptor} + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + * @throws com::sun::star::io::IOException in case of io problems during storing + * @throws com::sun::star::uno::Exception in case of other problems + */ + storeToEntry(xStorage: XStorage, sEntName: string, aMediaArgs: LibreOffice.SeqEquiv, aObjectArgs: LibreOffice.SeqEquiv): void; + } + + interface XEmbedPersist2 extends XEmbedPersist { + /** Checks whether or not the object has created its persistent representation counterpart of its in-memory model. */ + isStored(): boolean; + } + + /** This interface allows to set a password for an object. */ + interface XEncryptionProtectedSource extends uno.XInterface { + /** + * removes encryption from the object. + * @throws com::sun::star::io::IOException in case encryption could not be removed + */ + removeEncryption(): void; + + /** + * sets a password for the object. + * @param sPassword the new password + * @throws com::sun::star::io::IOException in case password could not be set + */ + setEncryptionPassword(sPassword: string): void; + } + + /** + * This interface allows to set a password for an object. + * @since OOo 3.4 + */ + interface XEncryptionProtectedSource2 extends XEncryptionProtectedSource { + /** + * determine if an encryption data is set for this object. + * @returns true if some encryption data was set, false otherwise + */ + hasEncryptionData(): boolean; + + /** + * sets an encryption data for the object. + * @param aEncryptionData the new encryption data + * @throws com::sun::star::io::IOException in case the data could not be set + */ + setEncryptionData(aEncryptionData: LibreOffice.SeqEquiv): void; + } + + /** + * This interface allows to set a password for an object. + * @since OOo 3.4 + */ + interface XEncryptionProtectedStorage extends XEncryptionProtectedSource2 { + /** allows to get the encryption algorithms of the object. */ + EncryptionAlgorithms: SafeArray; + + /** allows to get the encryption algorithms of the object. */ + getEncryptionAlgorithms(): SafeArray; + + /** + * allows to set the encryption algorithms for the object. + * + * The algorithms will of course be used only for streams that have been marked to be encrypted. If no stream in the storage is marked to be encrypted, + * the algorithms-related information may have no effect to the result package. + * + * The following values could be part of the provided sequence: + * + * **StartKeyGenerationAlgorithm **: specifies the algorithm that was used to generate the EncryptionKey from the original password; in case the contents + * should be decrypted, the algorithm might be already known by the object; if a different one is set an exception should be thrown to indicate the + * error; it should take values from {@link com.sun.star.xml} :crypto::DigestID. + * + * **EncryptionAlgorithm **: specifies the algorithm that should be used to encrypt/decrypt the contents; in case the contents should be decrypted, the + * algorithm might be already known by the object; if a different one is set an exception should be thrown to indicate the error; it should take values + * from {@link com.sun.star.xml} :crypto::CipherID. + * + * **ChecksumAlgorithm **: specifies the algorithm that was used to generate the checksum of the encrypted data; in case the contents should be + * decrypted, the algorithm might be already known by the object; if a different one is set an exception should be thrown to indicate the error; it + * should take values from {@link com.sun.star.xml} :crypto::DigestID. + */ + setEncryptionAlgorithms(aAlgorithms: LibreOffice.SeqEquiv): void; + } + + /** This interface allows access to an extended storage stream that might be transacted. */ + interface XExtendedStorageStream extends io.XStream, lang.XComponent, io.XSeekable, XEncryptionProtectedSource, beans.XPropertySet, XTransactedObject, + XTransactionBroadcaster { } + + /** + * specifies the operations for a hatch window. + * + * A hatch window is a kind of window that is adopted to contain an embedded object window to represent the contained window border and to handle + * resizing/moving in a specific way: after user have selected the new size/placement the hatching window sends request to owner for resizing/moving. + * Thus the window can not resize/move itself. + */ + interface XHatchWindow extends lang.XComponent { + HatchBorderSize: awt.Size; + + /** sets the object that will control resizing/moving, if the object is not set the window can not be resized/moved. */ + setController(xController: XHatchWindowController): void; + } + + /** + * specifies the operations for a hatch window. + * + * A hatch window owner is responsible to handle resize/move requests sent by the window. It is also responsible to validate tracking rectangle size. + */ + interface XHatchWindowController extends uno.XInterface { + activated(): void; + + /** + * returns the closest valid rectangle to the provided one. + * @param aRect a new selected position and size of the tracking rectangle + * @returns the closest valid position and size to the provided one + */ + calcAdjustedRectangle(aRect: awt.Rectangle): awt.Rectangle; + deactivated(): void; + + /** + * requests window owner to resize/move the window. + * @param aRect the new requested position and size of the window + */ + requestPositioning(aRect: awt.Rectangle): void; + } + + /** creates a hatch window implementation. */ + interface XHatchWindowFactory extends uno.XInterface { + /** + * creates a new hatch window instance. + * @param xParent the parent window the hatch window should be created in + * @param aBounds position and size of the hatch window + * @param aSize border and handler squares size + * @returns a new hatch window + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + */ + createHatchWindowInstance(xParent: awt.XWindowPeer, aBounds: awt.Rectangle, aSize: awt.Size): XHatchWindow; + } + + /** + * This interface allows hierarchical access to storage tree. + * + * Currently only streams can be opened using this interface. + * + * The hierarchical access can not be mixed with a normal access. Thus when in a storage a stream with a path "a/b/c" is accessed using hierarchical + * access, another stream "a/b/d" can also be opened with hierarchical access ( if it is still not opened ), but the substorage "a" can not be opened ( + * it is locked by hierarchical access ). + */ + interface XHierarchicalStorageAccess { + /** + * allows to get access to a child encrypted stream with password using hierarchical path. + * + * If storage does not allow any encryption this method will always throw {@link com.sun.star.packages.NoEncryptionException} . + * + * In case the stream is open in readonly mode the {@link com.sun.star.io.XStream.getOutputStream()} method will return an empty reference. + * @param sStreamName the path to the substream that should be open + * @param nOpenMode a mode the stream should be open in, can be a combination of {@link ElementModes} values + * @param sPassword this parameter allows to specify a reading password for the stream, the password must be a correct one, otherwise an exception will be + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::packages::NoEncryptionException the stream is not encrypted + * @throws com::sun::star::packages::WrongPasswordException the provided password is wrong + * @throws com::sun::star::io::IOException in case of io errors during stream opening + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + openEncryptedStreamElementByHierarchicalName(sStreamName: string, nOpenMode: number, sPassword: string): XExtendedStorageStream; + + /** + * allows to get access to a child stream of the storage, using hierarchical path. + * + * In case the stream is open in readonly mode the {@link com.sun.star.io.XStream.getOutputStream()} method will return an empty reference. + * @param sStreamPath the path to the substream that should be open + * @param nOpenMode a mode the stream should be open in, can be a combination of {@link ElementModes} values + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::packages::WrongPasswordException the provided password is wrong + * @throws com::sun::star::io::IOException in case of io errors during stream opening + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + openStreamElementByHierarchicalName(sStreamPath: string, nOpenMode: number): XExtendedStorageStream; + + /** + * removes a stream specified by hierarchical name from a storage. + * @param sElementPath the path to the element to remove + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException an illegal argument is provided + * @throws com::sun::star::container::NoSuchElementException there is no element with such name + * @throws com::sun::star::io::IOException in case of io errors during removing + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + removeStreamElementByHierarchicalName(sElementPath: string): void; + } + + /** This interface extends {@link XHierarchicalStorageAccess} interface. */ + interface XHierarchicalStorageAccess2 extends XHierarchicalStorageAccess { + /** + * allows to get access to a child encrypted stream with encryption data using hierarchical path. + * + * If storage does not allow any encryption this method will always throw {@link com.sun.star.packages.NoEncryptionException} . + * + * In case the stream is open in readonly mode the {@link com.sun.star.io.XStream.getOutputStream()} method will return an empty reference. + * @param sStreamName the path to the substream that should be open + * @param nOpenMode a mode the stream should be open in, can be a combination of {@link ElementModes} values + * @param aEncryptionData this parameter allowes to specify an encryption data for the stream, the data must be correct, otherwise an exception will be thrown + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::packages::NoEncryptionException the stream is not encrypted + * @throws com::sun::star::packages::WrongPasswordException the provided password is wrong + * @throws com::sun::star::io::IOException in case of io errors during stream opening + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + openEncryptedStreamByHierarchicalName(sStreamName: string, nOpenMode: number, aEncryptionData: LibreOffice.SeqEquiv): XExtendedStorageStream; + } + + /** represents common functionality for inplace clients. */ + interface XInplaceClient extends uno.XInterface { + /** + * notifies container through the client that the object is to be inplace activated. + * @throws com::sun::star::embed::WrongStateException the container is not ready for activation + */ + activatingInplace(): void; + + /** + * notifies container through the client that the object is to be UI-activated. + * @throws com::sun::star::embed::WrongStateException the container is not ready for activation + */ + activatingUI(): void; + + /** + * checks if the container can activate the object inplace. + * @returns `TRUE` the container can activate the object inplace. `FALSE` otherwise. + */ + canInplaceActivate(): boolean; + + /** + * notifies the container that the position of the object is changed. + * @param aPosRect specifies a new position rectangle + * @throws com::sun::star::embed::WrongStateException the object state is not correct + * @throws com::sun::star::uno::Exception in case of other problems + */ + changedPlacement(aPosRect: awt.Rectangle): void; + + /** + * gets the inplace object clip rectangle. + * + * The rectangle is provided in object's parent window coordinates in pixels. The intersection of position and clip rectangles specifies the visible part + * of the object. + * @returns specifies a new clip rectangle + * @throws com::sun::star::embed::WrongStateException the object is in unexpected state to make such request + */ + readonly ClipRectangle: awt.Rectangle; + + /** + * notifies container through the client that the object is deactivated. + * @throws com::sun::star::embed::WrongStateException the container is not ready for deactivation + */ + deactivatedInplace(): void; + + /** + * notifies container through the client that the object is UI-deactivated. + * + * After this notification the container can restore it's own UI and take focus. + * @throws com::sun::star::embed::WrongStateException the container is not ready for deactivation + */ + deactivatedUI(): void; + + /** + * gets the inplace object clip rectangle. + * + * The rectangle is provided in object's parent window coordinates in pixels. The intersection of position and clip rectangles specifies the visible part + * of the object. + * @returns specifies a new clip rectangle + * @throws com::sun::star::embed::WrongStateException the object is in unexpected state to make such request + */ + getClipRectangle(): awt.Rectangle; + + /** + * allows to retrieve the container's dispatch provider. + * @returns reference to object implementing the {@link com.sun.star.frame.XDispatchProvider} + * @throws com::sun::star::embed::WrongStateException the object is in unexpected state to make such request + */ + getInplaceDispatchProvider(): frame.XDispatchProvider; + + /** + * allows to retrieve the {@link com.sun.star.frame.LayoutManager} of the container. + * @returns reference to object representing the {@link com.sun.star.frame.LayoutManager} of the container + * @throws com::sun::star::embed::WrongStateException the object is in unexpected state to make such request + */ + getLayoutManager(): frame.XLayoutManager; + + /** + * gets the inplace object position rectangle. + * + * The rectangle is provided in object's parent window coordinates in pixels. The intersection of position and clip rectangles specifies the visible part + * of the object. In case the position window has a size that is bigger than object's size, the object should either scale or deactivate. + * @returns specifies a new position rectangle + * @throws com::sun::star::embed::WrongStateException the object is in unexpected state to make such request + */ + getPlacement(): awt.Rectangle; + + /** + * allows to retrieve the container's dispatch provider. + * @returns reference to object implementing the {@link com.sun.star.frame.XDispatchProvider} + * @throws com::sun::star::embed::WrongStateException the object is in unexpected state to make such request + */ + readonly InplaceDispatchProvider: frame.XDispatchProvider; + + /** + * allows to retrieve the {@link com.sun.star.frame.LayoutManager} of the container. + * @returns reference to object representing the {@link com.sun.star.frame.LayoutManager} of the container + * @throws com::sun::star::embed::WrongStateException the object is in unexpected state to make such request + */ + readonly LayoutManager: frame.XLayoutManager; + + /** + * gets the inplace object position rectangle. + * + * The rectangle is provided in object's parent window coordinates in pixels. The intersection of position and clip rectangles specifies the visible part + * of the object. In case the position window has a size that is bigger than object's size, the object should either scale or deactivate. + * @returns specifies a new position rectangle + * @throws com::sun::star::embed::WrongStateException the object is in unexpected state to make such request + */ + readonly Placement: awt.Rectangle; + + /** + * scrolls the object. + * @param aOffset scrolls the object to specified offset in pixels + * @throws com::sun::star::embed::WrongStateException the object is in unexpected state + */ + scrollObject(aOffset: awt.Size): void; + + /** + * provides accelerator table the object wants to use while it is inplace active. + * @param aKeys an accelerator table from object + * @throws com::sun::star::embed::WrongStateException the object is in unexpected state + */ + translateAccelerators(aKeys: LibreOffice.SeqEquiv): void; + } + + /** represents common functionality for inplace embedded objects. */ + interface XInplaceObject extends uno.XInterface { + /** + * enables or disables modeless dialogs of the object. + * + * In case container wants to show a modal dialog it should disable modeless of embedded object dialogs with this call. Later the same call can be used + * to enable it. + * @param bEnable `TRUE` to enable object modeless `FALSE` to disable it + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + * @throws com::sun::star::uno::Exception in case of other problems + */ + enableModeless(bEnable: boolean): void; + + /** + * sets the visible part of the inplace object. + * + * Both rectangles are provided in object's parent window coordinates in pixels. The intersection of rectangles specifies the visible part of the object. + * In case the position window has a size that is different from object's visual area size, the object should either scale or deactivate. + * + * The method must activate object repainting. + * @param aPosRect specifies a new position rectangle + * @param aClipRect specifies a new clip rectangle + * @throws com::sun::star::embed::WrongStateException the object is in invalid state + * @throws com::sun::star::uno::Exception in case of other problems + */ + setObjectRectangles(aPosRect: awt.Rectangle, aClipRect: awt.Rectangle): void; + + /** + * provides accelerator table the container wants to use during inplace editing. + * @returns an accelerator table from container + * @throws com::sun::star::embed::WrongStateException the object is in unexpected state + */ + translateAccelerators(aKeys: LibreOffice.SeqEquiv): void; + } + + /** allows to create and initialize a new embedded object using GUI dialog. */ + interface XInsertObjectDialog extends uno.XInterface { + /** + * creates a new object using GUI dialog. + * + * The dialog allows for user to do a number of choices that are container related. This information will be returned in the {@link InsertedObjectInfo} + * object. + * @param xStorage a parent storage the entry should be created/opened in + * @param sEntName a name for the entry + * @param lObjArgs optional parameters for the object persistence initialization see also {@link com.sun.star.embed.EmbeddedObjectDescriptor} + * @returns the structure containing the object and container related options + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + * @throws com::sun::star::io::IOException in case of io problems during opening or creation + * @throws com::sun::star::uno::Exception in case of other problems + */ + createInstanceByDialog(xStorage: XStorage, sEntName: string, lObjArgs: LibreOffice.SeqEquiv): InsertedObjectInfo; + } + + /** specifies an additional implementation for linked embedded object support. */ + interface XLinkageSupport extends XCommonEmbedPersist { + /** + * breaks the link and provides the object with a parent storage and a name for object's entry + * + * This method can be used only for links implementations that implement the whole set of embedded object interfaces. Usually the sets of interfaces are + * the same for links and objects. An example of exception from this are OOo links that do not implement {@link XEmbedPersist} interface. For such cases + * the method will throw an exception. + * + * The link will be broken and the linked object will become a normal embedded object. + * + * An entry with the specified name should be created or opened inside provided storage. This entry will be used for the object persistence. If the entry + * exists already all its contents will be ignored. + * @param xStorage a parent storage the entry should be created or opened in + * @param sEntryName a name for the entry + * @see also XEmbedPersist.setPersistentEntry + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + * @throws com::sun::star::embed::WrongStateException the object is in wrong state or not a linked object + * @throws com::sun::star::io::IOException in case object has not persistence or other io problems + * @throws com::sun::star::uno::Exception in case of other problems + */ + breakLink(xStorage: XStorage, sEntryName: string): void; + + /** + * returns the URL of the link object. + * @throws com::sun::star::embed::WrongStateException the object is in wrong state or is not a link + */ + getLinkURL(): string; + + /** + * allows to detect whether the object is a linked one. + * + * Most of embedded objects will not support this interface, but some of them can do it, to allow conversion from link to object. After the conversion + * the object does not change, so interface set stays the same, but the object is not a link any more. + * @returns `TRUE` - the object is a linked one. `FALSE` - otherwise + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + */ + isLink(): boolean; + + /** + * returns the URL of the link object. + * @throws com::sun::star::embed::WrongStateException the object is in wrong state or is not a link + */ + readonly LinkURL: string; + } + + /** + * allows to create and initialize a new link. + * + * Methods of this interface does not require specification of the object type, it will be detected. + */ + interface XLinkCreator extends uno.XInterface { + /** + * creates a new object based on {@link com.sun.star.document.MediaDescriptor} and initializes it as a link. + * + * In case the entry exists already all its contents will be ignored and rewritten on storing of the object. + * @param xStorage a parent storage the entry should be created or opened in + * @param sEntryName a name for the entry + * @param aArgs {@link com.sun.star.document.MediaDescriptor} the link will be based on + * @param aObjectArgs optional parameters for the object persistence initialization, see also {@link com.sun.star.embed.EmbeddedObjectDescriptor} + * @throws com::sun::star::lang::IllegalArgumentException the argument is illegal + * @throws com::sun::star::io::IOException in case of io problems during opening or creation + * @throws com::sun::star::uno::Exception in case of other problems + */ + createInstanceLink(xStorage: XStorage, sEntryName: string, aArgs: LibreOffice.SeqEquiv, aObjectArgs: LibreOffice.SeqEquiv): uno.XInterface; + } + + /** allows to create and initialize a new link of specified type. */ + interface XLinkFactory extends uno.XInterface { + /** + * creates a new link and transport parameters for persistent initialization. + * + * This method can be used to have a full control over persistence initialization of a link. + * @param aClassID the class id of the new object + * @param ClassName the class name of the new object + * @param xStorage a parent storage the entry should be created in + * @param sEntryName a name for the entry + * @param aArgs {@link com.sun.star.document.MediaDescriptor} that contains source for the link + * @param aObjectArgs optional parameters for the object persistence initialization see also {@link com.sun.star.embed.EmbeddedObjectDescriptor} + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + * @throws com::sun::star::io::IOException in case of io problems during opening or creation + * @throws com::sun::star::uno::Exception in case of other problems + */ + createInstanceLinkUserInit( + aClassID: LibreOffice.SeqEquiv, ClassName: string, xStorage: XStorage, sEntryName: string, aArgs: LibreOffice.SeqEquiv, + aObjectArgs: LibreOffice.SeqEquiv): uno.XInterface; + } + + /** + * This interface allows to access and change contents of OLE storages. + * + * This is a simple container allowing the access to OLE storages. The subcomponents are either OLE storages themselves or streams. + */ + interface XOLESimpleStorage extends container.XNameContainer, lang.XComponent, XTransactedObject, XClassifiedObject { } + + /** + * This is a temporary interface that is introduced to temporarily optimize the document storing process. PLEASE DO NOT USE IT, it might change in any + * time and will be deprecated soon! Another solution will be introduced as final one. + */ + interface XOptimizedStorage { + /** + * allows to switch storage persistence to the provided URL. The caller is responsible to be sure that the file referenced by the URL contains the same + * contents as the stream the storage is based currently. Thus using of this method is very dangerous and should be avoided when possible. It is + * applicable only for root storages. + */ + attachToURL(sURL: string, bReadOnly: boolean): void; + + /** allows to copy storage element directly, not guarantied to work. */ + copyElementDirectlyTo(sSourceName: string, xTargetStorage: XOptimizedStorage, sTargetName: string): void; + + /** + * fills the provided stream with the last flushed version of data from the child stream of the storage. + * @param sStreamName the name of the substream that should be copied + * @param xTargetStream the target stream where the data must be copied to + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::packages::WrongPasswordException the provided password is wrong + * @throws com::sun::star::io::IOException in case of io errors during stream opening + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + copyStreamElementData(sStreamName: string, xTargetStream: io.XStream): void; + + /** + * allows to get property of the child element with the specified name. The implementation of the method might allow to access only subset of the + * supported by element properties. + */ + getElementPropertyValue(sElementName: string, sPropertyName: string): any; + + /** allows to insert a raw stream representing non-encrypted stream with header. */ + insertRawNonEncrStreamElementDirect(sStreamName: string, xInStream: io.XInputStream): void; + + /** allows to insert a stream to the storage directly. The stream must stay alive till the storage is committed. */ + insertStreamElementDirect(sStreamName: string, xInStream: io.XInputStream, aProperties: LibreOffice.SeqEquiv): void; + + /** + * allows to switch storage persistence to the provided stream. The stream will be filled by the storage. If an empty reference is provided, the storage + * will create a temporary stream to switch to itself. It is applicable only for root storages. + */ + writeAndAttachToStream(xStream: io.XStream): void; + } + + /** allows to convert file system folder tree in to a package. */ + interface XPackageStructureCreator extends uno.XInterface { + /** + * converts file system folder tree in to a package. + * @param sFolderURL the URL of folder that must be converted, the URL must be in format accepted by UCB + * @param xTargetStream the result package will be written into this stream + * @throws com::sun::star::io::IOException in case any problem on reading/writing appears + */ + convertToPackage(sFolderURL: string, xTargetStream: io.XOutputStream): void; + } + + /** allows to disconnect an object from its persistence. */ + interface XPersistanceHolder extends uno.XInterface { + /** + * connects the object to a persistence. + * @param xStream a stream that specify the persistence + * @throws com::sun::star::io::IOException in case of io problems + * @throws com::sun::star::uno::Exception in case of other problems + */ + connectPersistance(xStream: io.XStream): void; + + /** + * disconnects the object from the persistence. + * @throws com::sun::star::io::IOException in case of io problems + * @throws com::sun::star::uno::Exception in case of other problems + */ + disconnectPersistence(): void; + } + + /** + * This interface allows to get access to relationship data. + * + * The relationship data is organized as a set of entries. Each of entry is represented by a set of tags, where each tag has unique for this entry name + * and a string value. An entry must contain at least one tag named "ID", the value of this tag must be unique for the whole set of entries, this tag is + * used as a unique identifier of an entry. + */ + interface XRelationshipAccess extends uno.XInterface { + /** + * retrieves the sequence containing all the entries controlled by the object. + * @returns sequence of entries, each entry is represented by sequence, each element of the sequence represents tag, {@link com.sun.star.beans.StringPair.Fir + * @throws com::sun::star::io::IOException in case there is a problem reading the relations info + */ + readonly AllRelationships: SafeArray>; + + /** + * allows to clear the set of entries. + * @throws com::sun::star::io::IOException in case there is a problem reading/writing the relations info + */ + clearRelationships(): void; + + /** + * retrieves the sequence containing all the entries controlled by the object. + * @returns sequence of entries, each entry is represented by sequence, each element of the sequence represents tag, {@link com.sun.star.beans.StringPair.Fir + * @throws com::sun::star::io::IOException in case there is a problem reading the relations info + */ + getAllRelationships(): SafeArray>; + + /** + * retrieves the sequence containing all the tags from the entry with specified value of "ID" tag. + * @param sID the value of "ID" tag + * @returns sequence, each element of the sequence represents tag, {@link com.sun.star.beans.StringPair.First} represents the tag name and {@link com.sun.sta + * @throws com::sun::star::container::NoSuchElementException in case there is no entry with specified tag + * @throws com::sun::star::io::IOException in case there is a problem reading the relations info + */ + getRelationshipByID(sID: string): SafeArray; + + /** + * retrieves the sequence containing all the entries which "Type" tag takes the specified value. + * @param sType specified value of "Type" tag, the parameter can contain an empty string, in this case all the entries that have empty "Type" tag or no suc + * @returns sequence of entries, each entry is represented by sequence, each element of the sequence represents tag, {@link com.sun.star.beans.StringPair.Fir + * @throws com::sun::star::io::IOException in case there is a problem reading the relations info + */ + getRelationshipsByType(sType: string): SafeArray>; + + /** + * retrieves the value of "Target" tag from the entry with specified "ID" tag. + * + * If the entry has no "Target" tag an empty string is returned. + * @param sID the value of "ID" tag + * @throws com::sun::star::container::NoSuchElementException in case there is no entry with specified tag + * @throws com::sun::star::io::IOException in case there is a problem reading the relations info + */ + getTargetByID(sID: string): string; + + /** + * retrieves the value of "Type" tag from the entry with specified "ID" tag. + * + * If the entry has no "Type" tag an empty string is returned. + * @param sID the value of "ID" tag + * @throws com::sun::star::container::NoSuchElementException in case there is no entry with specified tag + * @throws com::sun::star::io::IOException in case there is a problem reading the relations info + */ + getTypeByID(sID: string): string; + + /** + * allows to detect whether there is an entry with specified value of "ID" tag. + * @param sID the value of "ID" tag + * @throws com::sun::star::io::IOException in case there is a problem reading the relations info + */ + hasByID(sID: string): boolean; + + /** + * allows to insert an entry. + * @param sID the value of "ID" tag + * @param aEntry a sequence, each element of the sequence represents tag, {@link com.sun.star.beans.StringPair.First} represents the tag name and {@link co + * @param bReplace specifies whether the replacement of existing entry is allowed + * @throws com::sun::star::io::IOException in case there is a problem reading/writing the relations info + * @throws com::sun::star::container::ElementExistException in case an element with the specified "ID" tag exists already, and no replacement is allowed + */ + insertRelationshipByID(sID: string, aEntry: LibreOffice.SeqEquiv, bReplace: boolean): void; + + /** + * allows to insert a set of entries + * @param aEntries sequence of entries, each entry is represented by sequence, each element of the sequence represents tag, {@link com.sun.star.beans.Strin + * @param bReplace specifies whether the replacement of existing entry is allowed + * @throws com::sun::star::container::ElementExistException in case an element with the provided "ID" tag exists already, and no replacement is allowed + * @throws com::sun::star::io::IOException in case there is a problem reading/writing the relations info + */ + insertRelationships(aEntries: LibreOffice.SeqEquiv>, bReplace: boolean): void; + + /** + * allows to remove an entry. + * @param sID the value of "ID" tag + * @throws com::sun::star::container::NoSuchElementException in case there is no entry with specified tag + * @throws com::sun::star::io::IOException in case there is a problem reading/writing the relations info + */ + removeRelationshipByID(sID: string): void; + } + + /** broadcasts message in case embedded object object changes it's state. */ + interface XStateChangeBroadcaster extends uno.XInterface { + /** adds the specified listener to receive events about states change */ + addStateChangeListener(xListener: XStateChangeListener): void; + + /** removes the specified listener */ + removeStateChangeListener(xListener: XStateChangeListener): void; + } + + /** makes it possible to receive events when an embedded object changes it's state. */ + interface XStateChangeListener extends lang.XEventListener { + /** + * is called just before the object changes state. + * + * Actually the listener can try to complain about state changing, but it is up to object to decide whether the state change can be prevented. Anyway the + * possibility to complain must be used very carefully. + * @param aEvent specifies the object that is going to change own state + * @param nOldState specifies the old state of the object + * @param nNewState specifies the new state of the object + * @throws com::sun::star::embed::WrongStateException the state change is unexpected by listener + */ + changingState(aEvent: lang.EventObject, nOldState: number, nNewState: number): void; + + /** + * is called after the object has changed state. + * @param aEvent specifies the object that has changed own state + * @param nOldState specifies the old state of the object + * @param nNewState specifies the new state of the object + */ + stateChanged(aEvent: lang.EventObject, nOldState: number, nNewState: number): void; + } + + /** This interface represents main storage functionality. */ + interface XStorage extends container.XNameAccess, lang.XComponent { + /** + * allows to get readonly copy of a child encrypted stream with password. + * + * If storage does not allow any encryption this method will always throw {@link com.sun.star.packages.NoEncryptionException} . + * + * The stream is open in readonly mode so the {@link com.sun.star.io.XStream.getOutputStream()} method will return an empty reference. + * + * This method allows to specify reading password for the child stream explicitly. + * @param sStreamName the name of the substream that should be copied + * @param sPassword this parameter allows to specify a reading password for the stream, the password must be a correct one, otherwise an exception will be + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::packages::NoEncryptionException the stream is not encrypted + * @throws com::sun::star::packages::WrongPasswordException the provided password is wrong + * @throws com::sun::star::io::IOException in case of io errors during stream opening + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + cloneEncryptedStreamElement(sStreamName: string, sPassword: string): io.XStream; + + /** + * allows to get readonly copy of a child stream of the storage. + * + * The stream is open in readonly mode so the {@link com.sun.star.io.XStream.getOutputStream()} method will return an empty reference. + * @param sStreamName the name of the substream that should be copied + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::packages::WrongPasswordException the provided password is wrong + * @throws com::sun::star::io::IOException in case of io errors during stream opening + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + cloneStreamElement(sStreamName: string): io.XStream; + + /** + * allows to copy an entry from one storage to another. + * + * If target element supports transacted mode it must be committed by this method after successful copying. + * @param sElementName the name of the element in this storage + * @param xDest a destination storage + * @param sNewName the name of the result element in destination storage + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::container::NoSuchElementException there is no specified source element in this storage + * @throws com::sun::star::container::ElementExistException an element with specified destination name already exists in destination storage + * @throws com::sun::star::io::IOException in case of io errors during copying + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + copyElementTo(sElementName: string, xDest: XStorage, sNewName: string): void; + + /** + * allows to get copy of this storage at the state of its last commit. + * + * This method makes sense only for services implementations that allow transaction in the storage. + * @param xTargetStorage the target storage that will be filled in with copy. + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::io::IOException in case of io errors during copying + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + copyLastCommitTo(xTargetStorage: XStorage): void; + + /** + * allows to get copy of a child storage at the state of its last commit. + * + * This method makes sense only for services implementations that allow transaction in the storage. + * @param sStorName the name of the storage that should be copied + * @param xTargetStorage the target storage that will be filled in with copy + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::io::IOException in case of io errors during copying + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + copyStorageElementLastCommitTo(sStorName: string, xTargetStorage: XStorage): void; + + /** + * allows to copy current storage to another one + * + * The destination storage contents are overwritten. After the successful copying the target storage is automatically committed if it implements + * transacted access. + * @param xDest a destination storage this storage must be copied to. + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException an illegal argument is provided + * @throws com::sun::star::io::IOException in case of io errors during copying + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exception acquired during copying + */ + copyToStorage(xDest: XStorage): void; + + /** + * allows to check if an element is a child storage with specified name. + * + * In case there is no child element with such name an exception will be thrown. + * @param sElementName the name of the element to check + * @returns `TRUE` in case the element is a storage `FALSE` - the element is a stream + * @throws com::sun::star::container::NoSuchElementException there is no element with such name + * @throws com::sun::star::lang::IllegalArgumentException an illegal argument is provided + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + */ + isStorageElement(sElementName: string): boolean; + + /** + * allows to check if an element is a child stream with specified name. + * + * In case there is no child element with such name an exception will be thrown. + * @param sElementName the name of the element to check + * @returns `TRUE` in case the element is a stream `FALSE` - the element is a storage + * @throws com::sun::star::container::NoSuchElementException there is no element with such name + * @throws com::sun::star::lang::IllegalArgumentException an illegal argument is provided + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + */ + isStreamElement(sElementName: string): boolean; + + /** + * allows to move an entry from one storage to another. + * + * If target element supports transacted mode it must be committed by this method after successful moving. + * @param sElementName the name of the element in this storage + * @param xDest a destination storage + * @param sNewName the name of the result element in destination storage + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::container::NoSuchElementException there is no specified source element in this storage + * @throws com::sun::star::container::ElementExistException an element with specified destination name already exists in destination storage + * @throws com::sun::star::io::IOException in case of io errors during moving + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + moveElementTo(sElementName: string, xDest: XStorage, sNewName: string): void; + + /** + * allows to get access to a child encrypted stream with password. + * + * If storage does not allow any encryption this method will always throw {@link com.sun.star.packages.NoEncryptionException} . + * + * In case the stream is open in readonly mode the {@link com.sun.star.io.XStream.getOutputStream()} method will return an empty reference. + * @param sStreamName the name of the substream that should be open + * @param nOpenMode a mode the stream should be open in, can be a combination of {@link ElementModes} values + * @param sPassword this parameter allows to specify a reading password for the stream, the password must be a correct one, otherwise an exception will be + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::packages::NoEncryptionException the stream is not encrypted + * @throws com::sun::star::packages::WrongPasswordException the provided password is wrong + * @throws com::sun::star::io::IOException in case of io errors during stream opening + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + openEncryptedStreamElement(sStreamName: string, nOpenMode: number, sPassword: string): io.XStream; + + /** + * allows to get access to a child storage. + * + * The opened substorage must support specified in "nOpenMode" access modes. It can support "read" mode in addition. But any child element can support + * one of those modes only in case this mode is supported by parent storage. + * @param sStorName the name of the storage that should be open + * @param nOpenMode a mode the storage should be open in + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::io::IOException in case of io errors during stream opening + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + openStorageElement(sStorName: string, nOpenMode: number): XStorage; + + /** + * allows to get access to a child stream of the storage. + * + * In case the stream is open in readonly mode the {@link com.sun.star.io.XStream.getOutputStream()} method will return an empty reference. + * @param sStreamName the name of the substream that should be open + * @param nOpenMode a mode the stream should be open in, can be a combination of {@link ElementModes} values + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::packages::WrongPasswordException the provided password is wrong + * @throws com::sun::star::io::IOException in case of io errors during stream opening + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + openStreamElement(sStreamName: string, nOpenMode: number): io.XStream; + + /** + * removes an element from a storage. + * @param sElementName the name of the element to remove + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException an illegal argument is provided + * @throws com::sun::star::container::NoSuchElementException there is no element with such name + * @throws com::sun::star::io::IOException in case of io errors during removing + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + removeElement(sElementName: string): void; + + /** + * renames an element in a storage. + * @param sElementName the old name of the element to rename + * @param sNewName the new name of the element to rename + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException an illegal argument is provided + * @throws com::sun::star::container::NoSuchElementException there is no element with old name in this storage + * @throws com::sun::star::container::ElementExistException an element with new name already exists in this storage + * @throws com::sun::star::io::IOException in case of io errors during renaming + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + renameElement(sElementName: string, sNewName: string): void; + } + + /** This interface extends the base {@link XStorage} interface. */ + interface XStorage2 extends XStorage { + /** + * allows to get readonly copy of a child encrypted stream with encryption data. + * + * If storage does not allow any encryption this method will always throw {@link com.sun.star.packages.NoEncryptionException} . + * + * The stream is open in readonly mode so the {@link com.sun.star.io.XStream.getOutputStream()} method will return an empty reference. + * + * This method allows to specify encryption data for the child stream explicitly. + * @param sStreamName the name of the substream that should be copied + * @param aEncryptionData this parameter allowes to specify an encryption data for the stream, the encryption data must be correct, otherwise an exception + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::packages::NoEncryptionException the stream is not encrypted + * @throws com::sun::star::packages::WrongPasswordException the provided encryption data is wrong + * @throws com::sun::star::io::IOException in case of io errors during stream opening + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + cloneEncryptedStream(sStreamName: string, aEncryptionData: LibreOffice.SeqEquiv): io.XStream; + + /** + * allows to get access to a child encrypted stream with EncryptionData. + * + * If storage does not allow any encryption this method will always throw {@link com.sun.star.packages.NoEncryptionException} . + * + * In case the stream is open in readonly mode the {@link com.sun.star.io.XStream.getOutputStream()} method will return an empty reference. + * @param sStreamName the name of the substream that should be open + * @param nOpenMode a mode the stream should be open in, can be a combination of {@link ElementModes} values + * @param aEncryptionData this parameter allowes to specify an encryption data to decrypt the stream, the encryption data must be correct, otherwise an exc + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::packages::NoEncryptionException the stream is not encrypted + * @throws com::sun::star::packages::WrongPasswordException the provided encryption data is wrong + * @throws com::sun::star::io::IOException in case of io errors during stream opening + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + openEncryptedStream(sStreamName: string, nOpenMode: number, aEncryptionData: LibreOffice.SeqEquiv): io.XStream; + } + + /** This interface represents main storage functionality. */ + interface XStorageRawAccess { + /** + * allows to get a plain raw stream representing a package stream. + * + * This method returns a stream from the package as it is stored there, without any decompression/description and etc. This method can be helpful to + * check file consistency, for example by signing. + * @param sStreamName the name of the substream that should be open + * @returns the raw representation of encrypted stream with all the data required to copy the stream without information loss + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::container::NoSuchElementException there is no element with specified name + * @throws com::sun::star::io::IOException in case of io errors during stream opening + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + getPlainRawStreamElement(sStreamName: string): io.XInputStream; + + /** + * allows to get a raw stream representing encrypted stream with header. + * + * This method allows to transport encrypted streams without decryption. Mainly this method is introduced to allow to copy one encrypted storage stream + * to another without decryption. It is not recommended to use this method outside of storage implementation since different storages implementation + * could have different encryption format. If the method is used outside of storage implementation the user code is responsible to get sure that the raw + * format of source and target storages is the same. + * + * The difference of this method from the previous one is that it handles only encrypted streams. The contents of returned by these methods streams can + * differ for the same entry, since this method can add additional data into the stream to allow successful insertion. + * @param sStreamName the name of the substream that should be open + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::packages::NoEncryptionException the stream is not an encrypted one + * @throws com::sun::star::container::NoSuchElementException there is no element with specified name + * @throws com::sun::star::io::IOException in case of io errors during stream opening + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + getRawEncrStreamElement(sStreamName: string): io.XInputStream; + + /** + * allows to insert a raw stream representing encrypted stream with header. + * + * This method allows to insert a stream retrieved by {@link XStorageRawAccess.getRawEncrStreamElement()} into a storage. + * + * This method allows to transport encrypted streams without decryption. Mainly this method is introduced to allow to copy one encrypted storage stream + * to another without decryption. It is not recommended to use this method outside of storage implementation since different storages implementation + * could have different encryption format. + * @param sStreamName the name of the substream that should be open + * @param xInStream a raw stream representing encrypted stream + * @throws com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + * @throws com::sun::star::packages::NoRawFormatException the stream is not one of raw package stream format + * @throws com::sun::star::container::ElementExistException an element with specified name already exists + * @throws com::sun::star::io::IOException in case of io errors during stream opening + * @throws com::sun::star::embed::StorageWrappedTargetException wraps other exceptions + */ + insertRawEncrStreamElement(sStreamName: string, xInStream: io.XInputStream): void; + } + + /** allows transacted access to an object. */ + interface XTransactedObject extends uno.XInterface { + /** commits the changes made for object. */ + commit(): void; + + /** removes all the changes made for the object after last commit or loading. */ + revert(): void; + } + + /** broadcasts message in case transacted object is committed or reverted. */ + interface XTransactionBroadcaster extends uno.XInterface { + /** adds the specified listener to receive events about commits and reverts. */ + addTransactionListener(aListener: XTransactionListener): void; + + /** removes the specified listener. */ + removeTransactionListener(aListener: XTransactionListener): void; + } + + /** makes it possible to receive events when a transacted object is committed or reverted. */ + interface XTransactionListener extends lang.XEventListener { + /** is called after the object is committed. */ + commited(aEvent: lang.EventObject): void; + + /** is called just before the object is committed. */ + preCommit(aEvent: lang.EventObject): void; + + /** is called just before the object is reverted. */ + preRevert(aEvent: lang.EventObject): void; + + /** is called after the object is reverted. */ + reverted(aEvent: lang.EventObject): void; + } + + /** provide access to a {@link com.sun.star.datatransfer.XTransferable} implementation from the object. */ + interface XTransferableSupplier extends uno.XInterface { + /** + * allows to get access to {@link com.sun.star.datatransfer.XTransferable} implementation. + * @returns {@link com.sun.star.datatransfer.XTransferable} implementation + */ + getTransferable(): datatransfer.XTransferable; + + /** + * allows to get access to {@link com.sun.star.datatransfer.XTransferable} implementation. + * @returns {@link com.sun.star.datatransfer.XTransferable} implementation + */ + readonly Transferable: datatransfer.XTransferable; + } + + /** represents common visualization functionality for embedded objects. */ + interface XVisualObject extends uno.XInterface { + /** + * retrieves map mode the object communicates in. + * @param nAspect the aspect the map mode is requested for. Can take values from {@link Aspects} constant set. + * @returns the map mode the object communicates in, it can take values from {@link EmbedMapUnits} constant + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + * @throws com::sun::star::uno::Exception in case of problems + */ + getMapUnit(nAspect: number): number; + + /** + * retrieves visual representation of the object in preferable format. + * + * If the object persistence entry contains cached visual representation then it can be retrieved by using this method even in loaded state. + * @param nAspect the aspect the representation is requested for. Can take values from {@link Aspects} constant set. + * @returns the visual representation of the object in the default format and the format + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + * @throws com::sun::star::uno::Exception in case of problems + */ + getPreferredVisualRepresentation(nAspect: number): VisualRepresentation; + + /** + * gets the size of object's visual area. + * + * The size must be provided in logical units according to map mode the object communicates in. + * @param nAspect the aspect specifying the form of object representation. Can take values from {@link Aspects} constant set. + * @returns the size of visual area + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + */ + getVisualAreaSize(nAspect: number): awt.Size; + + /** + * sets the size of object's visual area. + * + * The size must be provided in logical units according to map mode the object communicates in. + * + * If an object is inplace- or ui-active the method must not initiate repainting itself. + * @param nAspect the aspect specifying the form of object representation. Can take values from {@link Aspects} constant set. + * @param aSize the new size of the visual area + * @throws com::sun::star::lang::IllegalArgumentException one of arguments is illegal + * @throws com::sun::star::embed::WrongStateException the object is in wrong state + * @throws com::sun::star::uno::Exception the object failed to resize + */ + setVisualAreaSize(nAspect: number, aSize: awt.Size): void; + } + + /** provides access to a VCL window implementation. */ + interface XWindowSupplier extends uno.XInterface { + /** + * allows to get access to a VCL window implementation. + * @returns VCL window implementation + */ + getWindow(): awt.XWindow; + + /** + * allows to get access to a VCL window implementation. + * @returns VCL window implementation + */ + readonly Window: awt.XWindow; + } + + namespace Actions { + const enum Constants { + PREVENT_CLOSE = 1, + PREVENT_TERMINATION = 2, + } + } + + namespace Aspects { + const enum Constants { + MSOLE_CONTENT = 1, + MSOLE_DOCPRINT = 8, + MSOLE_ICON = 4, + MSOLE_THUMBNAIL = 2, + } + } + + namespace ElementModes { + const enum Constants { + NOCREATE = 16, + READ = 1, + READWRITE = 7, + SEEKABLE = 2, + SEEKABLEREAD = 3, + TRUNCATE = 8, + WRITE = 4, + } + } + + namespace EmbedMapUnits { + const enum Constants { + ONE_1000TH_INCH = 4, + ONE_100TH_INCH = 5, + ONE_100TH_MM = 0, + ONE_10TH_INCH = 6, + ONE_10TH_MM = 1, + ONE_CM = 3, + ONE_INCH = 7, + ONE_MM = 2, + PIXEL = 10, + POINT = 8, + TWIP = 9, + } + } + + namespace EmbedMisc { + const enum Constants { + EMBED_ACTIVATEIMMEDIATELY = 4294967296, + EMBED_NEEDSSIZEONLOAD = 17179869184, + EMBED_NEVERRESIZE = 8589934592, + MS_EMBED_ACTIVATEWHENVISIBLE = 256, + MS_EMBED_ACTSLIKEBUTTON = 4096, + MS_EMBED_ACTSLIKELABEL = 8192, + MS_EMBED_ALIGNABLE = 32768, + MS_EMBED_ALWAYSRUN = 2048, + MS_EMBED_CANLINKBYOLE1 = 32, + MS_EMBED_CANTLINKINSIDE = 16, + MS_EMBED_IGNOREACTIVATEWHENVISIBLE = 524288, + MS_EMBED_IMEMODE = 262144, + MS_EMBED_INSERTNOTREPLACE = 4, + MS_EMBED_INSIDEOUT = 128, + MS_EMBED_INVISIBLEATRUNTIME = 1024, + MS_EMBED_ISLINKOBJECT = 64, + MS_EMBED_NOUIACTIVATE = 16384, + MS_EMBED_ONLYICONIC = 2, + MS_EMBED_RECOMPOSEONRESIZE = 1, + MS_EMBED_RENDERINGISDEVICEINDEPENDENT = 512, + MS_EMBED_SETCLIENTSITEFIRST = 131072, + MS_EMBED_SIMPLEFRAME = 65536, + MS_EMBED_STATIC = 8, + MS_EMBED_SUPPORTSMULTILEVELUNDO = 2097152, + MS_EMBED_WANTSTOMENUMERGE = 1048576, + } + } + + namespace EmbedStates { + const enum Constants { + ACTIVE = 2, + INPLACE_ACTIVE = 3, + LOADED = 0, + RUNNING = 1, + UI_ACTIVE = 4, + } + } + + namespace EmbedUpdateModes { + const enum Constants { + ALWAYS_UPDATE = 0, + EXPLICIT_UPDATE = 1, + } + } + + namespace EmbedVerbs { + const enum Constants { + MS_OLEVERB_DISCARDUNDOSTATE = -6, + MS_OLEVERB_HIDE = -3, + MS_OLEVERB_IPACTIVATE = -5, + MS_OLEVERB_OPEN = -2, + MS_OLEVERB_PRIMARY = 0, + MS_OLEVERB_SHOW = -1, + MS_OLEVERB_UIACTIVATE = -4, + } + } + + namespace EntryInitModes { + const enum Constants { + DEFAULT_INIT = 0, + MEDIA_DESCRIPTOR_INIT = 3, + NO_INIT = 2, + TRUNCATE_INIT = 1, + URL_LINK_INIT = 4, + } + } + + namespace StorageFormats { + const enum Constants { + OFOPXML = 3, + PACKAGE = 1, + ZIP = 2, + } + } + + namespace VerbAttributes { + const enum Constants { + MS_VERBATTR_NEVERDIRTIES = 1, + MS_VERBATTR_ONCONTAINERMENU = 2, + } + } + } + + namespace form { + /** + * is not used anymore, and superseded by {@link com.sun.star.form.runtime.FormController} and {@link com.sun.star.form.runtime.FormOperations} . + * @deprecated Deprecated + */ + type FormControllerDispatcher = frame.XDispatchProvider; + + /** + * specifies the capabilities of a collection of forms. + * + * Basically, a {@link Forms} is a {@link FormComponents} , with the additional restriction that the contained elements support the {@link + * com.sun.star.form.component.Form} service. + * @see com.sun.star.form.component.Form + */ + type Forms = XForms; + + /** + * identifies a {@link FormComponent} as being a (sub-) form. + * + * This interface does not really provide an own functionality, it is only for easier runtime identification of form components. + * @see XFormComponent + */ + type XForm = XFormComponent; + + /** + * describes a component which may be part of a form. + * + * This interface does not really provide an own functionality, it is only for easier runtime identification of form components. + * @see XForm + */ + type XFormComponent = container.XChild; + + /** + * describes the type of datasource used for a form. + * + * Please do **not** use anymore, this enum is deprecated. + * @deprecated Deprecated + */ + const enum DataSelectionType { + /** The control should be filled with the results of a database query. */ + QUERY = 1, + /** The control should be filled with the results of a database statement. */ + SQL = 2, + /** The control should be filled with the results of a database statement, which is not evaluated by the database engine. */ + SQLPASSTHROUGH = 3, + /** The control should be filled with the data of a table. */ + TABLE = 0, + } + + /** + * specifies the action to execute when a button is pressed. + * @see com.sun.star.form.component.CommandButton + */ + const enum FormButtonType { + /** requires the button to act like a common push button, means no special action is triggered. */ + PUSH = 0, + /** When the button is clicked, it performs a reset on its containing form. */ + RESET = 2, + /** When the button is clicked, it performs a submit on its containing form. */ + SUBMIT = 1, + /** + * When the button is clicked, an URL set for the button is opened. + * @see com.sun.star.form.component.CommandButton.TargetURL + * @see com.sun.star.form.component.CommandButton.TargetFrame Specifies to use "application/x-www-form-urlencoded" as submit encoding. Usually used if t + */ + URL = 3, + } + + /** specify the MIME encoding to be used when form data is submitted. */ + const enum FormSubmitEncoding { + /** + * Specifies to use "multipart/form-data" as submit encoding. + * + * Usually used when the form contains a file upload element. + */ + MULTIPART = 1, + /** + * specifies to use "text/plain" + * + * Usually used if the FormSubmitMethod attribute has the value POST and the content should be reviewed as full text. + */ + TEXT = 2, + /** + * When the button is clicked, an URL set for the button is opened. + * @see com.sun.star.form.component.CommandButton.TargetURL + * @see com.sun.star.form.component.CommandButton.TargetFrame Specifies to use "application/x-www-form-urlencoded" as submit encoding. Usually used if t + */ + URL = 0, + } + + /** specifies how information is sent to a program invoked by submitting a form. */ + const enum FormSubmitMethod { + /** specifies to append the input information of a form to the target URL as parameters. */ + GET = 0, + /** specifies to send the input information in a data body. */ + POST = 1, + } + + /** + * describes the kind of data source used to fill the list data of a listbox or a combobox control. + * @see com.sun.star.form.component.ListBox + * @see com.sun.star.form.component.ComboBox + */ + const enum ListSourceType { + /** The control should be filled with the results of a database query. */ + QUERY = 2, + /** The control should be filled with the results of a database statement. */ + SQL = 3, + /** The control should be filled with the results of a database statement, which is not evaluated by the database engine. */ + SQLPASSTHROUGH = 4, + /** The control should be filled with the data of a table. */ + TABLE = 1, + /** The control should be filled with the field names of a database table. */ + TABLEFIELDS = 5, + /** The control should be filled with a list of string values. */ + VALUELIST = 0, + } + + /** describes in which way the navigation of the records of a database form is performed. */ + const enum NavigationBarMode { + /** + * a navigation bar is provided and navigation will be performed on the current/active form. + * + * This is the default and most often encountered mode. + * + * pressing the TAB key from the last control moves the focus to the first control in the tab order of the same record. + */ + CURRENT = 1, + /** + * no navigation bar is provided and navigation on the current form is only possible with the keyboard (TAB/SHIFT TAB). + * + * Note that when this mode is set, a simultaneous TabulatorCycle value of TabulatorCycle::CURRENT means that you cannot travel between records anymore. + * @see TabulatorCycle + */ + NONE = 0, + /** + * a navigation bar is provided and navigation will be performed on the parent of the current/active form. + * + * This options is usually used for forms containing an grid control only. In such a form, the control has it's own navigation elements, so there is no + * need to use the navigation bar for the form, but rather for its parent. + */ + PARENT = 2, + } + + /** + * specifies how the TAB key should be used in a form. + * + * If the last control of a form is focused, and the user pressed the TAB key, there are several possibilities how a {@link FormController} should handle + * this. TabulatorCycle specifies these possibilities. + * + * Note that the TabulatorCycle determines what happens when SHIFT-TAB is pressed on the **first** control of a form, as well as when TAB is pressed on + * the **last** control. + * + * **First** and **last** refers to the tabbing order of controls. + * @see FormControlModel.TabIndex + * @see FormController + */ + const enum TabulatorCycle { + /** + * a navigation bar is provided and navigation will be performed on the current/active form. + * + * This is the default and most often encountered mode. + * + * pressing the TAB key from the last control moves the focus to the first control in the tab order of the same record. + */ + CURRENT = 1, + /** pressing the TAB key from the last control of a form moves the focus to the first control of the next form in the tab order. */ + PAGE = 2, + /** pressing the TAB key from the last control moves the focus to the first control in the tab order of the next record. */ + RECORDS = 0, + } + + /** @since LibreOffice 4.1 */ + interface ControlFontDialog extends ui.dialogs.XExecutableDialog { + createWithGridModel(GridModel: beans.XPropertySet): void; + } + + /** + * is an abstract service for specialized FormControlModels which are data aware and thus can be bound to a data source. + * + * The connection between a data-aware control model and a form whose data the control should display is made by parentship relations. The parent of a + * data-aware control model (see {@link com.sun.star.container.XChild} , inherited via the {@link FormControlModel} and {@link FormComponent} services) + * has always to be a {@link com.sun.star.form.component.DataForm} . + */ + interface DataAwareControlModel extends FormControlModel, XBoundComponent, XLoadListener, XReset { + /** + * references to the cursor field to which the control is bound. + * + * Applies only if the form the control model belongs to is loaded and the control is valid bound. The referenced field supports the {@link + * com.sun.star.sdb.Column} service. + * @see DataAwareControlModel.DataField + */ + BoundField: beans.XPropertySet; + + /** + * specifies the name of the bound database field. + * + * This property makes sense in the **context** of the control model only. Normally, a control model is a child of a {@link + * com.sun.star.form.component.DataForm} , which is bound to a higher level object such as a table or query - more general, a result set. ; This member + * here describes the column of this result set which the control should act for. + * + * Not every control model can be bound to every database column. Usually, super services of the {@link DataAwareControlModel} restrict the column types + * they can be used with. + * @see DataAwareControlModel.BoundField + */ + DataField: string; + + /** + * determines whether or not input into this field is required, when it is actually bound to a database field. + * + * If this property is set to `FALSE` , then the form runtime will not check the control/model for `NULL` values before submitting data to the database. + * Usually, if a control model is bound to a database field which cannot be `NULL` , and the model itself does not have a value, then the database update + * is prevented, showing an error message to the user. To disable this behavior on a per-control basis, use the `InputRequired` property. + * @since OOo 3.1 + */ + InputRequired: boolean; + + /** + * references to a control model within the same document which should be used as a label. + * + * Any user interface action which needs to refer to the control is assumed to use this property. ; A very common design method for forms is to group a + * data aware control with a label control, with the latter describing the content of the former. For instance, you may have a {@link + * com.sun.star.form.component.TextField} , which is bound to the e-mail column of your data source. Then you will probably add a {@link + * com.sun.star.form.component.FixedText} whose label is "E-Mail", and associate it with the TextField by setting it as {@link LabelControl} . ; Now if + * you imagine a component offering data search in a form, this component will examine the {@link LabelControl} property, find the {@link + * com.sun.star.form.component.FixedText} , examine it's label, and use this label to refer to the {@link com.sun.star.form.component.TextField} . + * + * When setting the property, a number of constraints apply: The object which is to be set has to support the following interfaces {@link + * com.sun.star.awt.XControlModel}{@link com.sun.star.lang.XServiceInfo}{@link com.sun.star.beans.XPropertySet}{@link com.sun.star.container.XChild}It + * has to be a part of the same document as the model who's property is to be modified.Additionally, the support of a special service, indicating that + * the model is of the right type, is required. Which kind of service is in the request depends on the type of the control model. ; + * + * For instance, text fields ( {@link com.sun.star.form.component.TextField} ) can be labeled by label controls only ( {@link + * com.sun.star.form.component.FixedText} ), and radio buttons ( {@link com.sun.star.form.component.RadioButton} ) can be labeled by group boxes ( {@link + * com.sun.star.form.component.GroupBox} ) only. + */ + LabelControl: beans.XPropertySet; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * is fired if a database record is going to be deleted. + * + * Please do **not** use anymore, this struct is deprecated. + * @deprecated Deprecated + */ + interface DatabaseDeleteEvent extends lang.EventObject { + Bookmarks: SafeArray; + } + + /** is fired if values for parameters are needed. */ + interface DatabaseParameterEvent extends lang.EventObject { + /** + * specifies the list of parameters which are required for opening a result set. + * + * Usually, a {@link com.sun.star.form.component.DataForm} fires this event when loading the form requires parameters to be filled in. + * + * Every parameter object supports the {@link com.sun.star.beans.XPropertySet} interface, and at least the properties **Name** and **Value** + * @see com.sun.star.sdb.RowSet + * @see com.sun.star.form.component.DataForm + */ + Parameters: container.XIndexAccess; + } + + /** + * occurs in case of fired database exceptions triggered by a database form. + * + * Please do **not** use anymore, this struct is deprecated. + * @deprecated Deprecated + */ + interface ErrorEvent extends lang.EventObject { + Reason: any; + } + + /** + * specifies a component which can be part of a form. + * @see FormControlModel + * @see com.sun.star.form.component.Form + */ + interface FormComponent extends XFormComponent, lang.XComponent, container.XNamed, beans.XPropertySet, io.XPersistObject, beans.XPropertyBag { + /** + * the name of the component. + * + * Note that the name accessed here is the same as when using the {@link com.sun.star.container.XNamed} interface. + */ + Name: string; + } + + /** + * specifies the capabilities of a collection of {@link FormComponents} . + * + * The collection must provide the possibility of adding and removing components by name and by index. The name of a component is not necessarily unique, + * so the collection must be able to handle duplicate entry names. + * @see FormComponent + */ + interface FormComponents extends container.XContainer, container.XNameContainer, container.XIndexContainer, container.XEnumerationAccess, script.XEventAttacherManager { } + + /** + * is superseded by {@link com.sun.star.form.runtime.FormController} . + * @deprecated Deprecated + */ + interface FormController extends FormControllerDispatcher, XFormController, awt.XTabController, container.XChild, lang.XComponent, container.XEnumerationAccess, + util.XModifyBroadcaster, XConfirmDeleteBroadcaster, sdb.XSQLErrorBroadcaster, sdb.XRowSetApproveBroadcaster, XDatabaseParameterBroadcaster { } + + /** + * specifies a control model within a form. + * + * Note that the model-view-paradigm is used for form controls, too. + */ + interface FormControlModel extends awt.UnoControlModel, FormComponent, beans.XFastPropertySet, beans.XPropertyState { + /** + * specifies the ID for classification of the component. + * @see FormComponentType + */ + ClassId: number; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + + /** + * determines the relative taborder of the control associated with the model. + * + * The default -1 is used to indicate that the tab-order of this control should be determined automatically. + * + * Each component which supports a tabstop must provide a {@link FormControlModel.TabIndex} property. + * + * Normally, a {@link FormController} instance is evaluating this property. + */ + TabIndex: number; + + /** + * used for additional information. + * + * No semantics is given for this property, it will usually be used by the creator of a document containing form controls. + */ + Tag: string; + } + + /** + * describes a controller which can be used to browse and modify properties of form controls. + * + * The controller can be plugged into an {@link com.sun.star.frame.XFrame} , and will provide a visual component for inspecting control properties. This + * means it allows to interactively control several aspects of a {@link FormControlModel} or {@link DataAwareControlModel} , such as it's data binding, + * it's layout, and it's event binding + * + * For using a {@link PropertyBrowserController} , you need to instantiate it at a service factory of your choiceattach it to an empty frame of your + * choiceset the IntrospectedObject property to the control model which you wish to analyze + * + * {{program example here, see documentation}} + * @deprecated Deprecated Note that nowadays, this service is only a legacy wrapper using the {@link com.sun.star.inspection.ObjectInspector} and the {@link co + * @see com.sun.star.frame.XController + */ + interface PropertyBrowserController extends frame.XController, beans.XPropertySet, beans.XFastPropertySet, beans.XMultiPropertySet { + /** + * controls the actually visible page. + * + * The aspects of a {@link DataAwareControlModel} which can be browsed and modified using this controller can be separated into 3 groups: common aspects, + * data-awareness related aspects, and bound events. ; The appearance of the visual component created by the controller is that 3 tab pages, one for + * each group, are displayed (of course if the control does not support any aspects of a given group, the group is omitted). ; With this property, it + * can be controller which page is currently active. + * + * Valid values are (this list may be extended in the future): GenericDataEvents + */ + CurrentPage: string; + + /** + * contains the object to inspect. + * + * Changing this property from outside causes the controller to update its view with the data of the new object + */ + IntrospectedObject: beans.XPropertySet; + } + + /** @since LibreOffice 4.2 */ + interface TabOrderDialog extends ui.dialogs.XExecutableDialog { + createWithModel(TabbingModel: awt.XTabControllerModel, ControlContext: awt.XControlContainer, ParentWindow: awt.XWindow): void; + } + + /** + * allows to probably veto actions to be performed on components. + * + * Usually, a component which supports the {@link XApproveActionBroadcaster} interface implements {@link com.sun.star.awt.XActionListener} as well. + */ + interface XApproveActionBroadcaster extends uno.XInterface { + /** + * adds the specified listener to receive the {@link XApproveActionListener.approveAction()} event. + * @param aListener the listener to be added + */ + addApproveActionListener(aListener: XApproveActionListener): void; + + /** + * removes the specified listener + * @param aListener the listener to be removed + */ + removeApproveActionListener(aListener: XApproveActionListener): void; + } + + /** + * can be implemented to listen and probably veto actions to be performed on components. + * + * An example for an action would be the click of a CommandButton. + * @see XApproveActionBroadcaster + * @see com.sun.star.form.component.CommandButton + * @see com.sun.star.form.control.CommandButton + */ + interface XApproveActionListener extends lang.XEventListener { + /** + * is invoked when an action is performed. + * @param aEvent A descriptor specifying the source of the event. + * @returns `TRUE` when the action is permitted, otherwise `FALSE` . + */ + approveAction(aEvent: lang.EventObject): boolean; + } + + /** + * specifies a (form) component which is bound to a data source. + * + * The interface provides the possibility of committing its respective data to a data source it is bound to. A {@link commit()} will be performed by the + * environment (usually, a {@link FormController} ). ; For example, suppose you have a data-bound control that is connected to a database field. Each + * time the control loses its focus, the model (component) of the control is triggered by the environment to store its value in the database field. + * + * A commit may fail if an {@link XUpdateListener} vetoes the it. + * @see com.sun.star.form.XUpdateListener + */ + interface XBoundComponent extends XUpdateBroadcaster { + /** + * commits the content of the component into the data source it is bound to. + * @returns `TRUE` when the commitment was successful, otherwise `FALSE` . + */ + commit(): boolean; + } + + /** allows locking the input on components. */ + interface XBoundControl extends uno.XInterface { + /** + * determines whether the input is currently locked or not. + * @returns `TRUE` when it is currently locked, otherwise `FALSE` . + */ + getLock(): boolean; + + /** + * determines whether the input is currently locked or not. + * @returns `TRUE` when it is currently locked, otherwise `FALSE` . + */ + Lock: boolean; + + /** + * is used for altering the current lock state of the component. + * @param bLock the new lock state. + */ + setLock(bLock: boolean): void; + } + + /** + * provides functionality to notify listeners of data changes. + * + * The concrete semantics of a change (i.e. the conditions for when a change event is fired) must be specified in the service description of the + * providing service. + * @see XChangeListener + */ + interface XChangeBroadcaster extends uno.XInterface { + /** + * adds the specified listener to receive the "changed" event. + * @param aListener the listener to add. + * @see com.sun.star.form.XChangeListener + */ + addChangeListener(aListener: XChangeListener): void; + + /** + * removes the specified listener. + * @param aListener the listener to remove. + * @see com.sun.star.form.XChangeListener + */ + removeChangeListener(aListener: XChangeListener): void; + } + + /** + * is the listener interface for receiving notifications about data changes. + * + * The concrete semantics of a change (i.e. the conditions for when a change event is fired) must be specified in the description of the service + * broadcasting the change. + * @see XChangeBroadcaster + */ + interface XChangeListener extends lang.XEventListener { + /** + * is invoked when the data of a component has been changed. + * @param rEvent A descriptor specifying the source of the event. + */ + changed(rEvent: lang.EventObject): void; + } + + /** + * provides the possibility of receiving an event for confirming deletions of rows in a {@link com.sun.star.form.component.DataForm} . + * @see XConfirmDeleteListener + */ + interface XConfirmDeleteBroadcaster extends uno.XInterface { + /** + * remembers the specified listener to receive an event for confirming deletions + * + * {@link XConfirmDeleteListener.confirmDelete()} is called before a deletion is performed. You may use the event to write your own confirmation + * messages. + * @param aListener the listener to add. + * @see com.sun.star.form.XConfirmDeleteListener + */ + addConfirmDeleteListener(aListener: XConfirmDeleteListener): void; + + /** + * removes the specified listener. + * @param aListener the listener to remove. + * @see com.sun.star.form.XConfirmDeleteListener + */ + removeConfirmDeleteListener(aListener: XConfirmDeleteListener): void; + } + + /** + * allows to register a component for confirming deletions of rows in a {@link com.sun.star.form.component.DataForm} . + * @see XConfirmDeleteBroadcaster + */ + interface XConfirmDeleteListener extends lang.XEventListener { + /** + * is invoked when the current record of a database form will be deleted. + * @param aEvent A descriptor specifying the deletion request. + * @returns `TRUE` when the row can be deleted, otherwise `FALSE` . + */ + confirmDelete(aEvent: sdb.RowChangeEvent): boolean; + } + + /** + * provides the possibility of receiving an event for configuration of parameters. + * + * This interface is usually implemented by components which are to execute a statement, and may need parameter information. For example, the {@link + * com.sun.star.form.component.DataForm} is such a component. When it is bound to a statement which contains parameters, or to a query which is based + * upon a parametrized statement, it needs values to fill in the parameters with actual values when it is being loaded. One method to gather these values + * is calling the {@link XDatabaseParameterListener} listeners, which can fill them in. + */ + interface XDatabaseParameterBroadcaster extends uno.XInterface { + /** + * adds the specified listener, to allow it to fill in necessary parameter values. + * @param aListener the listener to add. + * @see com.sun.star.form.XDatabaseParameterListener + */ + addParameterListener(aListener: XDatabaseParameterListener): void; + + /** + * removes the specified listener. + * @param aListener the listener to remove. + * @see com.sun.star.form.XDatabaseParameterListener + */ + removeParameterListener(aListener: XDatabaseParameterListener): void; + } + + /** + * provides the possibility of receiving an event for configuration of parameters. + * + * Note that this interface provides exactly the same functionality as the {@link XDatabaseParameterBroadcaster} interface. It exists purely for + * compatibility with the {@link com.sun.star.script.XEventAttacher.attachSingleEventListener()} : It expects the methods for adding and removing + * listeners to follow a certain naming scheme, respective to the name of the listener which is being added/removed. + * @see XDatabaseParameterBroadcaster + * @see com.sun.star.script.XEventAttacher + */ + interface XDatabaseParameterBroadcaster2 extends XDatabaseParameterBroadcaster { + /** + * registers an {@link XDatabaseParameterListener} + * + * This method behaves exactly as the {@link XDatabaseParameterBroadcaster.addParameterListener()} method inherited from the base interface. + */ + addDatabaseParameterListener(aListener: XDatabaseParameterListener): void; + + /** + * revokes an {@link XDatabaseParameterListener} + * + * This method behaves exactly as the {@link XDatabaseParameterBroadcaster.removeParameterListener()} method inherited from the base interface. + */ + removeDatabaseParameterListener(aListener: XDatabaseParameterListener): void; + } + + /** allows to intercept value request for parametrized SQL statements. */ + interface XDatabaseParameterListener extends lang.XEventListener { + /** + * is invoked when there is a need for parameter values + * @param aEvent the event describing the parameter value request. + * @returns `TRUE` when the execution of the parametrized statement should continue, `FALSE` otherwise. + * @see com.sun.star.form.DatabaseParameterEvent + */ + approveParameter(aEvent: DatabaseParameterEvent): boolean; + } + + /** + * This is the listener interface for receiving "approveDelete" and "deleted" events posted by a database form. + * + * "approveDelete" may be used to abort a deletion of the current data record. + * + * Please do **not** use anymore, this interface is superseded by {@link com.sun.star.form.XConfirmDeleteListener} . + * @deprecated Deprecated + */ + interface XDeleteListener extends lang.XEventListener { + /** is invoked when the current record of the database form will be deleted. */ + approveDelete(aEvent: lang.EventObject): boolean; + + /** is invoked when a database form has finished the delete processing and the data has been successfully deleted from the datasource. */ + deleted(aEvent: lang.EventObject): void; + } + + /** + * provides the possibility of receiving database error events. + * + * Please do **not** use anymore, this interface is superseded by {@link com.sun.star.sdb.XSQLErrorBroadcaster} . + * @deprecated Deprecated + */ + interface XErrorBroadcaster extends uno.XInterface { + /** adds the specified listener to be notified of errors. */ + addErrorListener(aListener: XErrorListener): void; + + /** removes the specified listener. */ + removeErrorListener(aListener: XErrorListener): void; + } + + /** + * used to be notified when errors in a database form happen. + * + * Each time an exception is triggered by a database form, the error event is posted to the error listeners. This event may be used to configure the + * error handling of a database form. + * + * Please do **not** use anymore, this interface is superseded by {@link com.sun.star.sdb.XSQLErrorListener} . + * @deprecated Deprecated + */ + interface XErrorListener extends lang.XEventListener { + /** is invoked when a database action performed by a database form raises an exception. */ + errorOccured(aEvent: ErrorEvent): void; + } + + /** + * is superseded by {@link com.sun.star.form.runtime.XFormController} . + * @deprecated Deprecated + */ + interface XFormController extends awt.XTabController { + addActivateListener(l: XFormControllerListener): void; + readonly CurrentControl: awt.XControl; + getCurrentControl(): awt.XControl; + removeActivateListener(l: XFormControllerListener): void; + } + + /** + * allows to be notified when the activation status of a {@link FormController} changes. + * + * A form controller is activated if a form control gains the focus and none of its controls currently owned the focus before. + * @see XFormController + */ + interface XFormControllerListener extends lang.XEventListener { + /** + * is invoked when a control of the controller gained the focus and the controller was not previously activated. + * @param rEvent the event happened. + */ + formActivated(rEvent: lang.EventObject): void; + + /** + * is invoked when a control of the "XFormController" lost the focus and no control of the controller received the focus. In other words, no control of + * the controller owns the focus. + * @param rEvent the event happened. + */ + formDeactivated(rEvent: lang.EventObject): void; + } + + /** @since LibreOffice 4.1 */ + interface XForms extends container.XContainer, container.XNameContainer, container.XIndexContainer, container.XEnumerationAccess, script.XEventAttacherManager, + container.XChild, util.XCloneable, lang.XComponent { } + + /** provides the access to a collection of forms. */ + interface XFormsSupplier extends uno.XInterface { + /** + * accesses the forms. + * + * {{program example here, see documentation}} + * @returns the container of all the top-level forms belonging to the component. + */ + readonly Forms: container.XNameContainer; + + /** + * accesses the forms. + * + * {{program example here, see documentation}} + * @returns the container of all the top-level forms belonging to the component. + */ + getForms(): container.XNameContainer; + } + + /** extends the {@link XFormsSupplier} with convenience methods */ + interface XFormsSupplier2 extends XFormsSupplier { + /** + * determines whether there are currently forms available at all + * + * If you need read access to the forms collection, then you might check the existence of forms using {@link hasForms()} , and if it returns `FALSE` , + * you can do as if {@link XFormsSupplier.getForms()} would have returned an empty container. + * + * Semantically, {@link hasForms()} is equivalent to calling XElementAccess::hasElements() on the container returned by {@link XFormsSupplier.getForms()} + * . But when using the latter, the implementation is forced to create a empty container, which might be potentially expensive. + */ + hasForms(): boolean; + } + + /** + * provides the possibility of setting and retrieving the position of the current cell in a grid control. + * + * Note that a grid control does not allow free control over the current row: In such a control, every line represents a row of data of the underlying + * {@link com.sun.star.form.component.DataForm} . Thus, the **current row** of the grid control always equals the current row of the {@link + * com.sun.star.form.component.DataForm} , and can be affected only by changing the latter. ; The current column of a grid control, whoever, can be + * freely controlled. + * @deprecated Deprecated + * @see com.sun.star.form.component.GridControl + * @see com.sun.star.form.control.GridControl + */ + interface XGrid extends uno.XInterface { + /** retrieves the current column position. */ + CurrentColumnPosition: number; + + /** retrieves the current column position. */ + getCurrentColumnPosition(): number; + + /** sets the current column position. */ + setCurrentColumnPosition(nPos: number): void; + } + + /** + * allows to create columns to be added into a grid control model. + * + * Grid columns (more precise: models of grid columns) are direct children of the grid control model they belong to. Grid columns can't be created on a + * global service factory, instead, you need to create them on the grid, where you want to insert them later on. + * @see com.sun.star.form.component.GridControl + */ + interface XGridColumnFactory extends uno.XInterface { + /** + * returns a list of available column types. + * @returns a list of column types. + */ + readonly ColumnTypes: SafeArray; + + /** + * creates a new column object + * @param aColumnType the type of column to be created + * @returns the new column object + * @throws com::sun::star::lang::IllegalArgumentException if aColumnType is not available. + */ + createColumn(aColumnType: string): beans.XPropertySet; + + /** + * returns a list of available column types. + * @returns a list of column types. + */ + getColumnTypes(): SafeArray; + } + + /** + * specifies (some) functionality provided by a grid control (aka table control) + * @since OOo 3.1 + */ + interface XGridControl extends XGrid, XGridFieldDataSupplier { + /** registers a listener which is to be notified about state changes in the grid control */ + addGridControlListener(listener: XGridControlListener): void; + + /** revokes a previously registered grid control listener */ + removeGridControlListener(listener: XGridControlListener): void; + } + + /** + * specifies a listener which is to be notified about state changes in a grid control + * @see XGridControl + * @since OOo 3.1 + */ + interface XGridControlListener extends lang.XEventListener { + /** + * called when the current column in a grid control changed + * @see XGrid.getCurrentColumnPosition + */ + columnChanged(event: lang.EventObject): void; + } + + /** + * provides access to the data of a GridControl + * + * You can retrieve the data type information and the data in a row. + * + * This interface allows to retrieve data even for rows which are not current, which is quite useful, as normally, you can't affect the current row in a + * grid control without moving the cursor of the underlying {@link com.sun.star.form.component.DataForm} . + * @deprecated Deprecated + * @see XGrid + * @see com.sun.star.form.control.GridControl + * @see com.sun.star.form.component.GridControl + */ + interface XGridFieldDataSupplier extends uno.XInterface { + /** + * retrieves the actual column data for the given row + * + * If a column does not support the requested type, `NULL` is returned at the respective position. + * @see XGridFieldDataSupplier.queryFieldDataType + */ + queryFieldData(nRow: number, xType: type): SafeArray; + + /** + * checks whether or not the content of the grid's columns can be retrieved in the requested format. + * + * Not every cell content can be retrieved in every representation. For example, in a text column, you usually won't be able to retrieve the content as + * double. ; To check if the type you need is supported by the columns, use this method. + * @returns A sequence of boolean flags. Each flag corresponds to the respective column, and `TRUE` indicates that the column content can be retrieved in the + * @see XGridColumnFactory + * @see DataAwareControlModel + * @see XGridFieldDataSupplier.queryFieldData + */ + queryFieldDataType(xType: type): SafeArray; + } + + /** + * represents the window peer of a GridControl and allows you to set and retrieve the model data. + * + * Usually, the columns used are the columns as supplied by the grid control model. + * + * You should use this interface only if you know exactly what you are doing. Tampering with the columns of a grid control which is part of a complex + * form can really hurt .... + * @deprecated Deprecated + * @see com.sun.star.awt.XWindowPeer + * @see com.sun.star.form.component.GridControl + */ + interface XGridPeer extends uno.XInterface { + /** retrieves the currently used column definitions of the peer. */ + Columns: container.XIndexContainer; + + /** retrieves the currently used column definitions of the peer. */ + getColumns(): container.XIndexContainer; + + /** sets the column definition for the peer. */ + setColumns(aColumns: container.XIndexContainer): void; + } + + /** + * provides the access to an image producer. + * @see com.sun.star.awt.XImageProducer + */ + interface XImageProducerSupplier extends uno.XInterface { + /** + * accesses the image producer. + * @returns the image producer. + */ + getImageProducer(): awt.XImageProducer; + + /** + * accesses the image producer. + * @returns the image producer. + */ + readonly ImageProducer: awt.XImageProducer; + } + + /** + * allows to receive notifications about insertions into a database form. + * + * Please do **not** use anymore, this interface is deprecated, and superseded by functionality from the {@link com.sun.star.form.component.DataForm} + * service, as well as the {@link com.sun.star.sdbc.XRowSetListener} and {@link com.sun.star.sdb.XRowSetApproveListener} interfaces. + * @deprecated Deprecated + */ + interface XInsertListener extends lang.XEventListener { + /** is invoked after a database form has inserted a record to a data source. */ + inserted(aEvent: lang.EventObject): void; + + /** is invoked when a database form starts inserting a record. */ + inserting(aEvent: lang.EventObject): void; + } + + /** + * provides functionality to implement objects which may be loaded. + * + * The object is typically implemented by high-level objects which can connect to a data source. + * @see XLoadListener + */ + interface XLoadable extends uno.XInterface { + /** + * adds the specified listener to receive load-related events + * @param aListener the listener to add. + */ + addLoadListener(aListener: XLoadListener): void; + + /** returns if the object is in loaded state. */ + isLoaded(): boolean; + + /** + * loads the data. + * + * If the data is already loaded (->isLoaded), then the method returns silently. In this case, you should use ->reload. + */ + load(): void; + + /** + * does a smart refresh of the object. + * + * The final state will be the same as if unload and load were called, but reload is the more efficient way to do the same. If the object isn't loaded, + * nothing happens. + */ + reload(): void; + + /** + * removes the specified listener. + * @param aListener the listener to remove. + */ + removeLoadListener(aListener: XLoadListener): void; + + /** unloads the data. */ + unload(): void; + } + + /** + * receives load-related events from a loadable object. + * + * The interface is typically implemented by data-bound components, which want to listen to the data source that contains their database form. + * @see com.sun.star.form.XLoadable + * @see DataAwareControlModel + */ + interface XLoadListener extends lang.XEventListener { + /** + * is invoked when the object has successfully connected to a datasource. + * @param aEvent the event happened. + */ + loaded(aEvent: lang.EventObject): void; + + /** + * is invoked when the object has been reloaded. + * @param aEvent the event happened. + */ + reloaded(aEvent: lang.EventObject): void; + + /** + * is invoked when the object is about to be reloaded. + * + * Components may use this to stop any other event processing related to the event source until they get the reloaded event. + * @param aEvent the event happened. + */ + reloading(aEvent: lang.EventObject): void; + + /** + * is invoked after the object has disconnected from a datasource. + * @param aEvent the event happened. + */ + unloaded(aEvent: lang.EventObject): void; + + /** + * is invoked when the object is about to be unloaded. + * + * Components may use this to stop any other event processing related to the event source before the object is unloaded. + * @param aEvent the event happened. + */ + unloading(aEvent: lang.EventObject): void; + } + + /** + * allows to receive notifications about cursor movements into a database form. + * + * Please do **not** use anymore, this interface is deprecated, and superseded by functionality from the {@link com.sun.star.form.component.DataForm} + * service, as well as the {@link com.sun.star.sdbc.XRowSetListener} . + * @deprecated Deprecated + */ + interface XPositioningListener extends lang.XEventListener { + /** is invoked when the database form has been positioned on a data record. */ + positioned(aEvent: lang.EventObject): void; + } + + /** + * provides functionality to reset components to some default values. + * + * The semantics of **default value** depends on the providing service. + */ + interface XReset extends uno.XInterface { + /** + * adds the specified listener to receive events related to resetting the component. + * @param aListener the listener to add. + */ + addResetListener(aListener: XResetListener): void; + + /** + * removes the specified listener + * @param aListener the listener to remove + */ + removeResetListener(aListener: XResetListener): void; + + /** resets a component to some default value. */ + reset(): void; + } + + /** + * is the interface for receiving notifications about reset events. + * + * The listener is called if a component implementing the {@link XReset} interface performs a reset. ; Order of events: a reset is triggered on a + * componentthe component calls XReset::approveReset() on all its listenersif all listeners approve the reset operation, the data is resetthe component + * calls XReset::resetted() on all its listeners + * @see XReset + */ + interface XResetListener extends lang.XEventListener { + /** + * is invoked before a component is reset. + * @param rEvent the event happened. + * @returns `TRUE` when reset was approved, `FALSE` when the reset operation should be canceled. + */ + approveReset(rEvent: lang.EventObject): boolean; + + /** + * is invoked when a component has been reset. + * @param rEvent the event happened. + */ + resetted(rEvent: lang.EventObject): void; + } + + /** + * receives notifications about data being restored. + * + * Such a notification is typically sent when the user cancels updating the current record of a database form without saving the data. After restoring, + * the user operates on the original data. + * + * Please do **not** use anymore, this interface is deprecated, and superseded by functionality from the {@link com.sun.star.form.component.DataForm} and + * {@link com.sun.star.sdb.RowSet} services + * @deprecated Deprecated + */ + interface XRestoreListener extends lang.XEventListener { + /** is invoked when a modified record has been restored */ + restored(aEvent: lang.EventObject): void; + } + + /** + * provides functionality to submit data from a component. + * + * Usually, this is used by com::sun::star::form::component::HTMLForms. + * + * See the [HTML specification]{@link url="http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#h-17.13"} to learn about submitting forms. + */ + interface XSubmit extends uno.XInterface { + /** + * adds the specified listener to receive the "approveSubmit" event. + * @param aListener the listener to add. + * @see com.sun.star.form.XSubmitListener + */ + addSubmitListener(aListener: XSubmitListener): void; + + /** + * removes the specified listener. + * @param aListener the listener to remove. + * @see com.sun.star.form.XSubmitListener + */ + removeSubmitListener(aListener: XSubmitListener): void; + + /** + * submits the component's data to a specified target. + * @param aControl the control whose data is to be submitted + * @param aMouseEvt the event which triggered the submit, if it was a mouse event + * @see com.sun.star.awt.MouseEvent + */ + submit(aControl: awt.XControl, aMouseEvt: awt.MouseEvent): void; + } + + /** + * receives notifications about data being submitted. + * + * The submission may be canceled, so the listener has the possibility of verifying the data before submission. + * @deprecated DeprecatedThis interface is superseded by the com::sun::star::form::submission::XSubmissionVetoListener interface. New implementations should use + * @see XSubmit + */ + interface XSubmitListener extends lang.XEventListener { + /** + * is invoked when a component is about to submit it's data. + * @param Event the event happened + * @returns `TRUE` when submitting was approved, otherwise `FALSE` . + */ + approveSubmit(Event: lang.EventObject): boolean; + } + + /** + * is the broadcaster interface for sending "approveUpdate" and "updated" events. + * + * The component supporting this interface must do approval calls ( {@link XUpdateListener.approveUpdate()} ) immediately before the data is updated, and + * notification calls ( {@link XUpdateListener.updated()} ) immediately afterwards. + * @see XUpdateListener + */ + interface XUpdateBroadcaster extends uno.XInterface { + /** + * adds the specified listener to receive the events "approveUpdate" and "updated". + * @param aListener the listener to add. + * @see com.sun.star.form.XUpdateListener + */ + addUpdateListener(aListener: XUpdateListener): void; + + /** + * removes the specified listener. + * @param aListener the listener to remove. + * @see com.sun.star.form.XUpdateListener + */ + removeUpdateListener(aListener: XUpdateListener): void; + } + + /** + * used to listen on objects which allow updating their data. + * + * In addition to just get notified when an data update happened, the listener has a chance to veto updates **before** they happen. + * @see XUpdateBroadcaster + */ + interface XUpdateListener extends lang.XEventListener { + /** + * is invoked to check the current data. + * + * For a given update process, if one of the XUpdateListeners vetoes the change, the update is canceled, and no further notification happens. + * @param aEvent An event descriptor specifying the broadcaster of the change. + * @returns `TRUE` when the update was approved, otherwise `FALSE` . + */ + approveUpdate(aEvent: lang.EventObject): boolean; + + /** + * is invoked when an object has finished processing the updates and the data has been successfully written. + * @param aEvent A event descriptor specifying the broadcaster of the change. + */ + updated(aEvent: lang.EventObject): void; + } + + namespace binding { + /** + * this service specifies a {@link BindableControlModel} which reflects an integer value, out of a range of permitted integer values. + * + * BindableIntegerValueRanges have a value property, a minimum, and a maximum, all of type integer. + */ + type BindableIntegerValueRange = BindableControlModel; + + /** thrown to indicate that the types of an {@link XValueBinding} and an {@link XBindableValue} are incompatible */ + type IncompatibleTypesException = uno.Exception; + + /** thrown when an {@link XValueBinding} cannot perform a requested operation due to an invalid state. */ + type InvalidBindingStateException = uno.Exception; + + /** specifies the model of a form control which supports binding to an external value supplier. */ + interface BindableControlModel extends FormControlModel, XBindableValue { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * is a specialization of the {@link com.sun.star.form.DataAwareControlModel} which additionally supports binding to external value suppliers. + * + * Control models usually have some kind of value property, which reflects the very current content of the controls associated with this model. For + * instance, for an {@link com.sun.star.form.component.TextField} , this would be the {@link com.sun.star.awt.UnoControlEditModel.Text} property of the + * base service. Similarly, a {@link com.sun.star.form.component.CheckBox} has a property {@link com.sun.star.awt.UnoControlCheckBoxModel.State} , which + * reflects the current check state. + * + * Usual com::sun::star::form::DataAwareControlModels can be bound to a column of a {@link com.sun.star.form.component.DataForm} , and exchange their + * content with such a column. ; In particular, when the {@link com.sun.star.form.component.DataForm} is moved to a different record, then the bound + * control model is updated with the value of it's column in this particular row. ; On the other hand, when any change in the control model (e.g. + * resulting from a user entering data in a control associated with the control model) is committed ( {@link com.sun.star.form.XBoundComponent.commit()} + * ), then the actual data of the control model is written into the associated {@link com.sun.star.form.component.DataForm} column. + * + * {@link BindableDataAwareControlModel} 's additionally support an alternative value binding, which forces them to exchange their value with another + * foreign instance. In some sense, they are an abstraction of the data aware control models, which only support a specialized, hard-coded value binding + * (namely the binding to a {@link com.sun.star.form.component.DataForm} column). + * + * For this, they provide the {@link XBindableValue} interface which allows to set an external component to exchange the value with. + * + * The following rules apply when a data aware control model is bound to an external value binding: **Priority**; External value bindings overrule any + * active SQL-column binding. If an external component is bound to a control model which currently has an active SQL binding, this SQL binding is + * suspended, until the external binding is revoked.**Activation**; An external value binding becomes effective as soon as it is set. This is a + * difference to SQL bindings, which only are effective when the parent form of the control model is loaded ( {@link com.sun.star.form.XLoadable} + * ).**Immediacy**; When a {@link BindableDataAwareControlModel} is bound to an external value, then every change in the control model's value is + * **immediately** reflected in the external binding. This is a difference to SQL bindings of most {@link com.sun.star.form.DataAwareControlModel} 's, + * where changes in the control model's value are only propagated to the bound column upon explicit request via {@link + * com.sun.star.form.XBoundComponent.commit()} . ; Note that this restriction is inherited from the {@link BindableControlModel} .**Cloning**; + * com::sun::star::form::FormControlModels support cloning themselves via the {@link com.sun.star.util.XCloneable} interface which they inherit from the + * {@link com.sun.star.awt.UnoControlModel} service. ; When a {@link BindableDataAwareControlModel} is cloned while it has an active external value + * binding, then the clone is also bound to the same binding instance. ; Note that this restriction is inherited from the {@link BindableControlModel} . + * + * When a {@link BindableDataAwareControlModel} is being bound to an external value, using {@link XBindableValue.setValueBinding()} , then the control + * model (its value property, respectively) and the external value are initially synchronized by setting the external value ( {@link + * XValueBinding.getValue()} ) at the control model. + */ + interface BindableDataAwareControlModel extends DataAwareControlModel, BindableControlModel { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies a check box which is data-aware and thus can be bound to a database field, and additionally supports binding to arbitrary + * external values. + * + * The {@link com.sun.star.form.binding.XValueBinding} instance which can be associated with a {@link BindableDatabaseCheckBox} must support exchanging + * boolean values. The following mapping between external values and control states apply: `TRUE` will be mapped to the box being checked, and vice + * versa`FALSE` will be mapped to it being unchecked, and vice versa`NULL` will be mapped to it being in undetermined state, if the box currently + * supports this, or being unchecked else. The undetermined of the check box will always be mapped to `NULL` when writing the external value. + * + * If the value binding associated with a {@link BindableDatabaseCheckBox} supports exchanging string values, **and** the {@link + * com.sun.star.form.component.CheckBox.RefValue} is **not** empty, then the radio button will exchange its value as string: A string equal to the + * reference value will be mapped to the button being checked, and vice versaA string not equal to the reference value will be mapped to the button being + * unchecked, and vice versa`NULL` will be mapped to it being in undetermined state + * @see com.sun.star.form.binding.XValueBinding.supportsType + * @see com.sun.star.awt.UnoControlCheckBoxModel.State + * @see com.sun.star.awt.UnoControlCheckBoxModel.TriState + * @see com.sun.star.form.component.CheckBox.RefValue + */ + interface BindableDatabaseCheckBox extends component.DatabaseCheckBox, BindableDataAwareControlModel { + /** + * specifies a value which is to be associated with the control when it's **not** checked. + * + * {@link com.sun.star.form.component.CheckBox.RefValue} is transferred to possible external value bindings as soon as the check box is checked. With the + * member {@link SecondaryRefValue} , clients of the check box can also associate a value with the **not checked** state of the control. + */ + SecondaryRefValue: string; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies a model of a combo box (a list box combined with a text input field) which is data-aware and thus can be bound to a database + * field, and additionally supports binding to arbitrary external values. + * + * If an {@link com.sun.star.form.binding.ValueBinding} instance is set at the field, it will exchange it's text with the binding as **string** , thus + * only bindings supporting string exchange will be accepted in com::sun::star::form::binding::XValueBinding::setValueBinding(). + * @see com.sun.star.form.binding.XValueBinding.supportsType + * @see com.sun.star.awt.UnoControlComboBoxModel.Text + */ + interface BindableDatabaseComboBox extends component.DatabaseComboBox, BindableDataAwareControlModel { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies a date input field which is data-aware and thus can be bound to a database field, and additionally supports binding to + * arbitrary external values. + * + * If an {@link com.sun.star.form.binding.ValueBinding} instance is set at the field, it will exchange it's content with the binding as {@link + * com.sun.star.util.Date} . + * @see com.sun.star.form.binding.XValueBinding.supportsType + * @see com.sun.star.awt.UnoControlDateFieldModel.Date + */ + interface BindableDatabaseDateField extends component.DatabaseDateField, BindableDataAwareControlModel { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies a formatted input field which is data-aware and thus can be bound to a database field, and additionally supports binding to + * arbitrary external values. + * + * The {@link com.sun.star.form.binding.XValueBinding} instance which can be associated with a {@link BindableDatabaseFormattedField} must support + * exchanging values of type **double** . + * @see com.sun.star.form.binding.XValueBinding.supportsType + */ + interface BindableDatabaseFormattedField extends component.DatabaseFormattedField, BindableDataAwareControlModel { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies a list box model which is data-aware and thus can be bound to a database field, and additionally supports binding to arbitrary + * external values. + * + * There are six possible ways that a {@link BindableDatabaseListBox} exchanges values with an external binding. If a new binding is set at a {@link + * BindableDatabaseListBox} , the types from the following list are tried in descending order: The first type supported by the binding is used for data + * exchange. 1. **sequences of anys** : The elements in the sequence will represent the values the selected entries of the list box (taken from + * ValueList or read from BoundColumn). In other words, the SelectedValues property. 2. **any value** : The value will represent the value of the + * selected entry (taken from ValueList or read from BoundColumn). If more than one entry is selected, `NULL` will be transferred. In other words, the + * SelectedValue property. 3. **sequences of long integers** : When used, the integers in the sequence will represent the indexes of the selected entries + * of the list box. 4. **long integer value** : When used, the value will represent the index of the selected entry. If no entry is selected, -1 will be + * transferred. If more than one entry is selected, `NULL` will be transferred. 5. **sequences of strings** : When used, the strings in the sequence + * present the texts of the selected entries of the list box. 6. **string values** : When used. the value will represent the text of the selected entry. + * If no entry is selected, an empty string will be transferred. If more than one entry is selected, `NULL` will be transferred. + * @see com.sun.star.form.binding.XValueBinding.supportsType + */ + interface BindableDatabaseListBox extends component.DatabaseListBox, BindableDataAwareControlModel { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies a numeric input field which is data-aware and thus can be bound to a database field, and additionally supports binding to + * arbitrary external values. + * + * The {@link com.sun.star.form.binding.XValueBinding} instance which can be associated with a {@link BindableDatabaseNumericField} must support + * exchanging values of type **double** . + * @see com.sun.star.form.binding.XValueBinding.supportsType + */ + interface BindableDatabaseNumericField extends component.DatabaseNumericField, BindableDataAwareControlModel { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies a radio button which is data-aware and thus can be bound to a database field, and additionally supports binding to arbitrary + * external values. + * + * The {@link com.sun.star.form.binding.XValueBinding} instance which can be associated with a {@link BindableDatabaseRadioButton} must support + * exchanging boolean values. The following mapping between external values and control states apply: `TRUE` will be mapped to the button being checked, + * and vice versa`FALSE` will be mapped to it being unchecked, and vice versa`NULL` will be mapped to it being in undetermined state + * + * If the value binding associated with a {@link BindableDatabaseRadioButton} supports exchanging string values, **and** the {@link + * com.sun.star.form.component.RadioButton.RefValue} is **not** empty, then the radio button will exchange its value as string: A string equal to the + * reference value will be mapped to the button being checked, and vice versaA string not equal to the reference value will be mapped to the button being + * unchecked, and vice versa`NULL` will be mapped to it being in undetermined state + * @see com.sun.star.form.binding.XValueBinding.supportsType + * @see com.sun.star.awt.UnoControlRadioButtonModel.State + * @see com.sun.star.form.component.RadioButton.RefValue + */ + interface BindableDatabaseRadioButton extends component.DatabaseRadioButton, BindableDataAwareControlModel { + /** + * specifies a value which is to be associated with the control when it's **not** selected. + * + * {@link com.sun.star.form.component.RadioButton.RefValue} is transferred to possible external value bindings as soon as the radio button is selected. + * With the member {@link SecondaryRefValue} , clients of the radio button can also associate a value with the **not selected** state of the control. + */ + SecondaryRefValue: string; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies a text input field which is data-aware and thus can be bound to a database field, and additionally supports binding to + * arbitrary external values. + * + * If an {@link com.sun.star.form.binding.ValueBinding} instance is set at the field, it will exchange it's text with the binding as **string** , thus + * only bindings supporting string exchange will be accepted in com::sun::star::form::binding::XValueBinding::setValueBinding(). + * @see com.sun.star.form.binding.XValueBinding.supportsType + * @see com.sun.star.awt.UnoControlEditModel.Text + */ + interface BindableDatabaseTextField extends component.DatabaseTextField, BindableDataAwareControlModel { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies a date input field which is data-aware and thus can be bound to a database field, and additionally supports binding to + * arbitrary external values. + * + * If an {@link com.sun.star.form.binding.ValueBinding} instance is set at the field, it will exchange it's content with the binding as {@link + * com.sun.star.util.Time} . + * @see com.sun.star.form.binding.XValueBinding.supportsType + * @see com.sun.star.awt.UnoControlTimeFieldModel.Time + */ + interface BindableDatabaseTimeField extends component.DatabaseTimeField, BindableDataAwareControlModel { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * specifies the event which is notified when a change in a string entry list occurred + * @see XListEntrySource + * @see XListEntryListener + */ + interface ListEntryEvent extends lang.EventObject { + /** denotes the number of changed entries, in case a change of an entry **range** is being notified. */ + Count: number; + + /** + * denotes the changed entries + * + * The concrete semantics of the value depends on the concrete event being notified. + */ + Entries: SafeArray; + + /** + * denotes the position where a change occurred. + * + * The concrete semantics of the value depends on the concrete event being notified. + */ + Position: number; + } + + /** defines a component which provides a list of string entries */ + interface ListEntrySource extends XListEntrySource, lang.XComponent { } + + /** + * defines a component which allows access to a single value + * + * Read/Write access to the value represented by this component is supported, as well as (optionally) active broadcasting of value changes + */ + interface ValueBinding extends beans.XPropertySet, XValueBinding, util.XModifyBroadcaster, lang.XComponent { + /** + * determines whether the value is currently readonly + * + * For instance, you could imagine a {@link ValueBinding} which represents a cell in a spreadsheet document, and whose value is readonly as long as the + * spreadsheet is locked. + * + * As long as this property is `TRUE` , the value binding should throw a {@link InvalidBindingStateException} when its {@link XValueBinding.setValue()} + * method is invoked. + */ + ReadOnly: boolean; + + /** + * determines the relevance of the value represented by the binding + * + * In a more complex scenario, where different form controls are bound to different values, which all are part of a larger data structure, some of the + * items in this data structure may not be relevant currently. This is indicated by the {@link Relevant} property being `FALSE` . + * + * XBindableValues which are bound to this binding may or may not react in certain ways on the (ir)relevance of their bound value. + * + * One possible reaction could be that user interface elements which are associated with the {@link XBindableValue} are disabled as long as {@link + * Relevant} is `FALSE` . + */ + Relevant: boolean; + } + + /** + * specifies support for being bound to an external value + * @see XValueBinding + */ + interface XBindableValue extends uno.XInterface { + /** retrieves the external instance which currently controls the value of the component */ + getValueBinding(): XValueBinding; + + /** + * sets an external instance which controls the value of the component + * + * Any previously active binding will be revoked. There can be only one! + * @param aBinding the new binding which is to be used by the component. May be `NULL` , in this case only the current binding is revoked. + * @throws IncompatibleTypesException if the new binding (provided it's not `NULL` ) supports only types which are incompatible with the types of the bindab + */ + setValueBinding(aBinding: XValueBinding): void; + + /** retrieves the external instance which currently controls the value of the component */ + ValueBinding: XValueBinding; + } + + /** specifies a listener for changes in a string entry list */ + interface XListEntryListener extends lang.XEventListener { + /** + * notifies the listener that all entries of the list have changed. + * + * The listener should retrieve the complete new list by calling the {@link XListEntrySource.getAllListEntries()} method of the event source (which is + * denoted by {@link com.sun.star.lang.EventObject.Source} ). + */ + allEntriesChanged(Source: lang.EventObject): void; + + /** + * notifies the listener that a single entry in the list has change + * @param Source is the event describing the change. The {@link ListEntryEvent.Position} member denotes the position of the changed entry, the first (and o + */ + entryChanged(Source: ListEntryEvent): void; + + /** + * notifies the listener that a range of entries has been inserted into the list + * @param Source is the event describing the change. The {@link ListEntryEvent.Position} member denotes the position of the first inserted entry, the {@lin + */ + entryRangeInserted(Source: ListEntryEvent): void; + + /** + * notifies the listener that a range of entries has been removed from the list + * @param Source is the event describing the change. The {@link ListEntryEvent.Position} member denotes the position of the first removed entry, the {@link + */ + entryRangeRemoved(Source: ListEntryEvent): void; + } + + /** specifies support for indirect manipulation of a string list */ + interface XListEntrySink extends uno.XInterface { + /** retrieves the current source for the list entries of the component. */ + getListEntrySource(): XListEntrySource; + + /** retrieves the current source for the list entries of the component. */ + ListEntrySource: XListEntrySource; + + /** + * sets the new source for the list entries of the component + * + * The list represented by this component will be cleared, and initially filled with the entries from the new list source. + * @param Source the new source for the list entries. May be `NULL` , in this case, the current source is revoked. + */ + setListEntrySource(Source: XListEntrySource): void; + } + + /** + * specifies a source of string list entries + * + * The interface supports foreign components which actively retrieve list entries, as well as components which want to passively being notified of + * changes in the list. + * @see XListEntrySink + */ + interface XListEntrySource extends uno.XInterface { + /** + * adds a listener which will be notified about changes in the list reflected by the component. + * @throws com::sun::star::lang::NullPointerException if the given listener is `NULL` + */ + addListEntryListener(Listener: XListEntryListener): void; + + /** provides access to the entirety of all list entries */ + readonly AllListEntries: SafeArray; + + /** provides access to the entirety of all list entries */ + getAllListEntries(): SafeArray; + + /** + * provides access to a single list entry + * @see getListEntryCount + * @throws com::sun::star::lang::IndexOutOfBoundsException if the given position does not denote a valid index in the list + */ + getListEntry(Position: number): string; + + /** retrieves the number of entries in the list */ + getListEntryCount(): number; + + /** retrieves the number of entries in the list */ + readonly ListEntryCount: number; + + /** + * revokes the given listener from the list of components which will be notified about changes in the entry list. + * @throws com::sun::star::lang::NullPointerException if the given listener is `NULL` + */ + removeListEntryListener(Listener: XListEntryListener): void; + } + + /** specifies a binding to a value which can be read and written. */ + interface XValueBinding extends uno.XInterface { + /** + * determines the types which are supported by this binding for value exchange + * @see supportsType + */ + getSupportedValueTypes(): SafeArray; + + /** + * retrieves the current value + * @see getSupportedValueTypes + * @see supportsType + * @throws IncompatibleTypesException if the requested value type is not supported by the binding + */ + getValue(aType: type): any; + + /** + * sets the current value + * @see getSupportedValueTypes + * @see supportsType + * @see ValueBinding + * @throws IncompatibleTypesException if the given value type is not supported by the binding + * @throws InvalidBindingStateException if the value currently cannot be changed, since the binding is not fully operational. Possible reasons for this incl + * @throws com::sun::star::lang::NoSupportException if the binding in general does not support write access to its binding + */ + setValue(aValue: any): void; + + /** + * determines the types which are supported by this binding for value exchange + * @see supportsType + */ + readonly SupportedValueTypes: SafeArray; + + /** + * determines whether a given type is supported by this binding for value exchange + * + * Calling this method is equal to calling {@link getSupportedValueTypes()} , and looking up the given type in the resulting type sequence. + * @see getSupportedValueTypes + */ + supportsType(aType: type): boolean; + } + } + + namespace component { + /** + * specifies the model of a check box control + * + * The model supports the properties required for HTML, thus you can build up HTMLForms with it + */ + interface CheckBox extends awt.UnoControlCheckBoxModel, FormControlModel, XReset { + /** + * contains a default value for the control. + * + * This value is used when the control is initially displayed, and for resetting it. + * @see com.sun.star.awt.UnoControlCheckBoxModel.State + * @see com.sun.star.form.XReset + */ + DefaultState: number; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + + /** + * contains a reference value which is used for submission in a HTML form + * + * When submitting a {@link HTMLForm} which contains a check box, which is checked, the RefValue is used for submission. + */ + RefValue: string; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** specifies a component which allows the input of text or selection of text from a list of text values. */ + interface ComboBox extends awt.UnoControlComboBoxModel, FormControlModel, XReset { + /** + * contains a default value for the control. + * + * This value is used when the control is initially displayed, and for resetting it. + * @see com.sun.star.awt.UnoControlComboBoxModel.Text + * @see com.sun.star.form.XReset + */ + DefaultText: string; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * specifies the control model for a clickable button which is part of a form component hierarchy. + * @see ImageButton + */ + interface CommandButton extends awt.UnoControlButtonModel, FormControlModel, XImageProducerSupplier, XReset { + /** describes the action to be executed by the button when pressed. */ + ButtonType: FormButtonType; + + /** + * specifies the default toggle state for the button, used when it is reset. + * + * This property is meaningful only when {@link com.sun.star.awt.UnoControlButtonModel.Toggle} is `TRUE` . In this case, the `DefaultState` controls to + * which `State` the button will be reset. + * + * For a given implementation of the interface, if this (optional) property is present, then also the optional interface {@link com.sun.star.form.XReset} + * must be present. + */ + DefaultState: boolean; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + + /** + * describes the frame, where to open the document specified by the TargetURL. + * + * This property is evaluated if the button is of type URL. + * + * As always, there is a number of target names which have a special meaning, and force a special {@link com.sun.star.frame.Frame} to be used. + */ + TargetFrame: string; + + /** + * specifies the URL, which should be opened if the button was clicked. + * + * This property is evaluated if the button is of type URL. + * @see com.sun.star.form.FormButtonType + */ + TargetURL: string; + } + + /** This service specifies the ControlModel for an edit field which contains a currency value. */ + interface CurrencyField extends awt.UnoControlCurrencyFieldModel, FormControlModel, XReset { + /** + * contains a default value for the control. + * @see com.sun.star.awt.UnoControlCurrencyFieldModel.Value + * @see com.sun.star.form.XReset + */ + DefaultValue: number; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies a check box which is data-aware, and can be bound to a database field. + * + * Mostly, you will create data-aware checkboxes as tristate checkboxes, because this is a requirement to correctly handle `NULL` values in databases. + * @see com.sun.star.awt.UnoControlCheckBoxModel.TriState + */ + interface DatabaseCheckBox extends CheckBox, DataAwareControlModel { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies a combo box which is data-aware, and can be bound to a database field. + * + * Like most other data aware controls, such a combo box will display the actual content of the field it is bound to. In addition, as a combo box + * contains a list where the user can choose items to fill into the control, this list can be filled with different data from a database, too. + */ + interface DatabaseComboBox extends ComboBox, DataAwareControlModel { + /** + * determines if an empty text should be treated as a `NULL` value. + * + * When the user enters text into a combo box, and after this, the control content is to be committed into the database field the control is bound to, a + * decision must be made how to deal with empty strings. ; This is controlled by {@link ConvertEmptyToNull} . + * + * If the property is set to `TRUE` , and an empty text is to be committed, this is converted into `NULL` , else it is written as empty string. + */ + ConvertEmptyToNull: boolean; + + /** + * describes the source of items in the combo box's list. + * + * The concrete meaning of this property depends on the value of {@link ListSourceType} + */ + ListSource: string; + + /** + * specifies the kind of list source. + * + * Note: A value of com::sun::star::form::ListSourceType::VALUELIST is not valid for a combo box. It won't be rejected when setting it, but controls will + * usually ignore it and leave the list empty. + */ + ListSourceType: ListSourceType; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** This service specifies a currency field which is data-aware, and can be bound to a database field. */ + interface DatabaseCurrencyField extends CurrencyField, DataAwareControlModel { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** This service specifies a date field which is data-aware, and can be bound to a database field. */ + interface DatabaseDateField extends DateField, DataAwareControlModel { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** This service specifies a formatted field model which is data-aware, and can be bound to a database field. */ + interface DatabaseFormattedField extends FormattedField, DataAwareControlModel { + /** + * determines if an empty text should be treated as a `NULL` value. + * + * When the user enters text into a formatted field control, and after this, the control content is to be committed into the database field the control + * is bound to, a decision must be made how to deal with empty strings. ; This is controlled by {@link ConvertEmptyToNull} . + * + * If the property is set to `TRUE` , and an empty text is to be committed, this is converted into `NULL` , else it is written as empty string. + */ + ConvertEmptyToNull: boolean; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * specifies the model of a control used for displaying images stored in a database. + * + * As every {@link com.sun.star.form.DataAwareControlModel} , an image control can be bound to a database field. This means that for instance with every + * record change, the content of the database field is taken, interpreted as image, and displayed in the control. ; Unlike other more text-based + * controls, it does not interpret the content of the field as text or double, but as binary stream (see {@link + * com.sun.star.sdb.XColumn.getBinaryStream()} ). + * + * Usually, an image control model can be bound to binary columns only, namely {@link com.sun.star.sdbc.DataType.BINARY} , {@link + * com.sun.star.sdbc.DataType.VARBINARY} , {@link com.sun.star.sdbc.DataType.LONGVARBINARY} , {@link com.sun.star.sdbc.DataType.OTHER} , {@link + * com.sun.star.sdbc.DataType.LONGVARCHAR} + * + * Note that besides taking the image to be displayed from the bound field, there is another option. The {@link + * com.sun.star.awt.UnoControlImageControlModel.ImageURL} property specifies the URL of an image to be displayed. If this property is changed from + * outside, the respective file is loaded and set as image source. + * + * In a usual data form, the scenario will be as follows: There is a {@link DatabaseImageControl} as part of the document model, which acts as control + * model for an {@link com.sun.star.form.control.ImageControl} . + * + * The control is an {@link com.sun.star.awt.XImageConsumer} for the {@link com.sun.star.awt.XImageProducer} supplied by the model. + * + * Whenever the form's cursor is positioned on a new record, the column the control model is bound to is examined for a binary data stream. This stream + * is set as source at the image producer, which notifies it's consumers, which leads to the control displaying the image. + * + * When the user by some interaction tells the control to contain a new image, this is exchanged by URL. For example, implementations of the control + * service may allow the user to browse for image. After this, the URL of the image is set as {@link + * com.sun.star.awt.UnoControlImageControlModel.ImageURL} property at the model. ; Now the control loads the image determined by the property value, and + * starts producing a new data stream, which is displayed by the control (which is a consumer for this stream). ; From now on, the control and thus the + * database record counts as modified. If the cursor of the form is moved further, the modified record is saved, means the content of the image pointed + * to by {@link com.sun.star.awt.UnoControlImageControlModel.ImageURL} is saved into the column. + */ + interface DatabaseImageControl extends awt.UnoControlImageControlModel, DataAwareControlModel, XImageProducerSupplier { + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + + /** indicates if it is possible to change the image being displayed. */ + ReadOnly: boolean; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies a data-aware list box control model. + * + * The base service for list boxes ( {@link ListBox} ) offers only one possibility to specify the list entries: The display strings in the {@link + * com.sun.star.awt.UnoControlListBoxModel.StringItemList} property and the corresponding values in the {@link ListBox.ListSource} property. + * + * This service here extends this mimic. It allows to fill the list from a data source. This means that a second result set is opened, which works on the + * same connection as the form which the list box belongs to, but can be based on an arbitrary table or SQL statement. + * + * For instance, you may have a form which is bound to a table **invoice** , and you use it to enter invoices for your customers. Probably, you will have + * a second table (say **customer** ), which (among other data) contains a unique key for identifying customers. In your invoice table, you will have a + * foreign key referring to these customers. ; Now, besides the result set the form is based on (all your invoices), the list box can be instructed to + * open a second result set, this time for the **customer** table, and fill its list with entries from this result set. ; Additionally, it allows to + * model the relation between the two tables: When the user selects a customer from the list, this customer has the unique id we just talked about (which + * is not necessarily visible to the user in any way). The list box then automatically transfers this id into the foreign key column of **invoice** , + * thus allowing the user to transparently work with human-readable strings instead of pure numbers. ; Let's call this result set the list is filled + * from the **list result set** here ... + * + * The display strings are always taken from the first column of that result set, and the corresponding value as per the BoundColumn property. + */ + interface DatabaseListBox extends ListBox, DataAwareControlModel { + /** + * specifies which column of the list result set should be used for data exchange. + * + * When you make a selection from a list box, the "BoundColumn" property reflects which column value of a result set should be used as the value of the + * component. If the control is bound to a database field, the column value is stored in the database field identified by the property {@link + * com.sun.star.form.DataAwareControlModel.DataField} . + * + * **-1 **: The index (starting at 0) of the selected list box entry is stored in the current database field.; + * + * **0 or greater **: The column value of the result set at the position (0-indexed) is stored in the current database field. In particular, for value 0, + * the selected (displayed) list box string is stored. + * + * + * + * The bound column property is only used if a list source is defined and the list source matches with the types + * com::sun::star::form::ListSourceType::TABLE, com::sun::star::form::ListSourceType::QUERY, com::sun::star::form::ListSourceType::SQL or + * com::sun::star::form::ListSourceType::SQLPASSTHROUGH. Otherwise the property is ignored, as there is no result set from which to get the column + * values. + */ + BoundColumn: number; + + /** + * describes the kind of list source used. + * + * Depending on the value of this property, the way the value of {@link ListBox.ListSource} is evaluated varies. + * **com::sun::star::form::ListSourceType::VALUELIST **: The elements in the string sequence in {@link ListBox.ListSource} build up the entry list.; + * + * **com::sun::star::form::ListSourceType::TABLE **: The first element of the string sequence in {@link ListBox.ListSource} determines the table which + * the list result set should be based on.; + * + * **com::sun::star::form::ListSourceType::QUERY **: The first element of the string sequence in {@link ListBox.ListSource} determines the query which + * the list result set should be based on. ; For retrieving the query, the connection which the data form is working with ( {@link + * com.sun.star.sdb.RowSet.ActiveConnection} ) is queried for the {@link com.sun.star.sdb.XQueriesSupplier} interface.; + * + * **com::sun::star::form::ListSourceType::SQL **: The first element of the string sequence in {@link ListBox.ListSource} contains the SQL statement + * which the list result set should be based on.; ; + * + * **com::sun::star::form::ListSourceType::SQLPASSTHROUGH **: The first element of the string sequence in {@link ListBox.ListSource} contains the SQL + * statement which the list result set should be based on. ; The statement is not analyzed by the parser. This means that you can use database specific + * SQL features here, but, on the other hand, lose features like parameter value substitution.; + * + * **com::sun::star::form::ListSourceType::TABLEFIELDS **: The first element of the string sequence in {@link ListBox.ListSource} determines the table + * whose column names should fill the list. + */ + ListSourceType: ListSourceType; + + /** The selected value, if there is at most one. */ + SelectedValue: any; + + /** The selected values. */ + SelectedValues: SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** This service specifies a numeric field which is data-aware, and can be bound to a database field. */ + interface DatabaseNumericField extends NumericField, DataAwareControlModel { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** This service specifies a data-aware control model for entering text which matches a specific pattern. */ + interface DatabasePatternField extends PatternField, DataAwareControlModel { + /** + * determines if an empty text should be treated as a `NULL` value. + * + * When the user enters text into a pattern field, and after this, the control content is to be committed into the database field the control is bound + * to, a decision must be made how to deal with empty strings. ; This is controlled by this property. + * + * If the property is set to `TRUE` , and an empty text is to be committed, this is converted into `NULL` , else it is written as empty string. + */ + ConvertEmptyToNull: boolean; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** This service specifies a radio button which is data-aware, and can be bound to a database field. */ + interface DatabaseRadioButton extends RadioButton, DataAwareControlModel { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** This service specifies a text field which is data-aware, and can be bound to a database field. */ + interface DatabaseTextField extends TextField, DataAwareControlModel { + /** + * determines if an empty text should be treated as a `NULL` value. + * + * When the user enters text into a text field, and after this, the control content is to be committed into the database field the control is bound to, a + * decision must be made how to deal with empty strings. ; This is controlled by this property. + * + * If the property is set to `TRUE` , and an empty text is to be committed, this is converted into `NULL` , else it is written as empty string. + */ + ConvertEmptyToNull: boolean; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** This service specifies a data-aware field for inputting a time value. */ + interface DatabaseTimeField extends TimeField, DataAwareControlModel { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies a form which is connected to a database and displays the results of SQL queries. It provides the possibility of adding new data + * records, modifying existing ones, or deleting them. + * + * A database form is a special kind of enhanced database row set which provides all information for displaying the data and has more possibilities for + * configuring the data manipulation. + */ + interface DataForm extends sdb.RowSet, Form, XReset, XLoadable, sdb.XCompletedExecution, XDatabaseParameterBroadcaster { + /** + * determines if deletions of records of the form are allowed. + * + * Note that this is a recommendation for user interface components displaying the form. {@link Form} implementations may decide to allow for deletions + * done via the API, even if the property is set to `FALSE` , but the user interface should respect the property value. + */ + AllowDeletes: boolean; + + /** + * determines if insertions into the form's row set are allowed. + * + * Note that this is a recommendation for user interface components displaying the form. {@link Form} implementations may decide to allow for insertions + * done via the API, even if the property is set to `FALSE` , but the user interface should respect the property value. + */ + AllowInserts: boolean; + + /** + * determines if modifications of the current record of the form are allowed. + * + * Note that this is a recommendation for user interface components displaying the form. {@link Form} implementations may decide to allow for updates + * done via the API, even if the property is set to `FALSE` , but the user interface should respect the property value. + */ + AllowUpdates: boolean; + + /** returns the kind of tabulator controlling. */ + Cycle: TabulatorCycle; + + /** + * is used for subforms and contains the names of the columns of the subform which are related to the master fields of the parent form. + * + * Entries in this sequence can either denote column names in the sub form, or parameter names. ; For instance, you could base the form on the SQL + * statement `SELECT * FROM invoices WHERE cust_ref = :cid` , and add `cid` to the DetailFields property. In this case, the parameter will be filled from + * the corresponding master field. ; Alternatively, you could simply base your form on the table `invoices` , and add the column name `cust_ref` to the + * DetailFields. In this case, and implicit filter clause `WHERE cust_ref = :` will be created, and the artificial parameter will be + * filled from the corresponding master field. ; If a string in this property denotes both a column name and a parameter name, it is undefined which way + * it is interpreted, but implementations of the service are required to either decide for the parameter or the column, and proceed as usual. + * + * The columns specified herein typically represent a part of the primary key fields or their aliases of the detail form. + * + * If the form is no sub form (e.g. its parent is not a form itself), this property is not evaluated. + */ + DetailFields: SafeArray; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + + /** + * is used for subforms and contains the names of columns of the parent form. + * + * These columns are typically the foreign key fields of the parent form. The values of theses columns are used to identify the data for the subform. + * Each time the parent form changes its current row, the subform requeries it's data based on the values of the master fields. + * + * If the form is no sub form (e.g. its parent is not a form itself), this property is not evaluated. + */ + MasterFields: SafeArray; + + /** determines how an navigation bar for this form should act. */ + NavigationBarMode: NavigationBarMode; + } + + /** specifies the model of a date field control, which is an edit field used to enter a date. */ + interface DateField extends awt.UnoControlDateFieldModel, FormControlModel, XReset { + /** + * contains a default value for the control. + * + * This value is used when the control is initially displayed, and for resetting it. + * @see com.sun.star.awt.UnoControlDateFieldModel.Date + * @see com.sun.star.form.XReset + */ + DefaultDate: number; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** This service specifies the control model of an edit field for a file name. */ + interface FileControl extends awt.UnoControlFileControlModel, FormControlModel, XReset { + /** + * contains a default value for the control. + * + * This value is used when the control is initially displayed, and for resetting it. + * @see com.sun.star.awt.UnoControlFileControlModel.Text + * @see com.sun.star.form.XReset + */ + DefaultText: string; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies the control model for a text which can be displayed, but not edited by the user. + * + * These kind of controls is usually used to label other controls. + * @see com.sun.star.form.DataAwareControlModel.LabelControl + */ + interface FixedText extends awt.UnoControlFixedTextModel, FormControlModel { + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies a form which is a group of {@link FormComponents} . + * + * A form fulfills several tasks, like storing the structure of its form components, storing the information concerning tab ordering and control + * grouping, and last but not least, it provides the event environment for its contained elements. + * + * A form acts on the one hand like a container of {@link FormComponents} and on the other hand like a {@link FormComponent} . This generic construction + * allows the definition of hierarchies of forms and their dependent subforms. + * @see com.sun.star.form.FormControlModel + */ + interface Form extends FormComponent, FormComponents, XForm, awt.XTabControllerModel { + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + } + + /** + * This service specifies the control model of an edit field for entering text which can be (nearly) arbitrarily formatted. + * @see com.sun.star.util.XNumberFormatsSupplier + */ + interface FormattedField extends awt.UnoControlFormattedFieldModel, FormControlModel, XReset { + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * specifies a model for a control which can display form data in a table-like way. + * + * In opposite to other form controls, grid controls do not only display the single current value of a column they are bound to. Moreover, they do + * display not only the current row of the form, but all rows (at least potentially, limited by the control size, of course). + * + * The table rows in a grid control correspond to the rows in the {@link DataForm} the control belongs to, and the columns correspond to single columns + * of the form's row set. + * + * Columns of a grid control are modeled by own objects, too. They are very similar to usual com::sun::star::form::DataAwareControlModels modeling other + * "single-value" controls, but they are not described as own services. Instead, they need to be created using the {@link + * com.sun.star.form.XGridColumnFactory} interface. + */ + interface GridControl extends FormControlModel, FormComponents, XGridColumnFactory, view.XSelectionSupplier, XReset { + /** + * returns the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see {@link Border} ) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + * @since OOo 2.0 + */ + BorderColor: number; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** contains the font attributes of the text in the control. */ + FontDescriptor: awt.FontDescriptor; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + + /** + * specifies the height of a row of the grid. + * + * If the value is set to `NULL` , the height is determined automatically according to the current font used. + * @see GridControl.FontDescriptor + */ + RowHeight: number; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + + /** determines whether the control can be reached by the tabulator key. */ + Tabstop: boolean; + + /** specifies the text color (RGB) of the control. */ + TextColor: util.Color; + } + + /** This service specifies a model for a control which can be used to visually group controls. */ + interface GroupBox extends awt.UnoControlGroupBoxModel, FormControlModel { + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies the model of a hidden control. + * + * The only sense of a hidden control is to store data in the form which is not visible to the user. + * + * Usually, hidden controls are used in com::sun::star::form::component::HTMLForms, where they contain data which is to be submitted. ; Nevertheless, + * you can use them in your own forms for storing any data, for instance to evaluate it in some scripting macro. + */ + interface HiddenControl extends FormComponent { + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + + /** specifies the value of the component. */ + HiddenValue: string; + } + + /** + * This service specifies the special kind of {@link Forms} for HTML documents. + * + * An {@link HTMLForm} fulfills the specification of forms in HTML. It supplies the possibility of submitting or resetting the contents of a form. For + * more information on HTML forms, please see the documentation of HTML. + */ + interface HTMLForm extends Form, XReset, XSubmit { + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + + /** specifies the kind of encoding for submission. */ + SubmitEncoding: FormSubmitEncoding; + + /** specifies the kind of submission. */ + SubmitMethod: FormSubmitMethod; + + /** describes the frame, where to open the document specified by the TargetURL. */ + TargetFrame: string; + + /** specifies the URL, which should be used for submission. */ + TargetURL: string; + } + + /** + * This service specifies the control model for a clickable button which is represented by an image. + * + * The image to be displayed is determined by {@link com.sun.star.awt.UnoControlImageControlModel.ImageURL} property specifies the URL of an image to be + * displayed. + * @see CommandButton + */ + interface ImageButton extends awt.UnoControlImageControlModel, FormControlModel, XImageProducerSupplier { + /** describes the action to be executed by the button when pressed. */ + ButtonType: FormButtonType; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + + /** + * describes the frame, where to open the document specified by the TargetURL. + * + * This property is evaluated if the button is of type URL. + * + * As always, there is a number of target names which have a special meaning, and force a special {@link com.sun.star.frame.Frame} to be used. + */ + TargetFrame: string; + + /** + * specifies the URL, which should be opened if the button was clicked. + * + * This property is evaluated if the button is of type URL. + * @see com.sun.star.form.FormButtonType + */ + TargetURL: string; + } + + /** specifies a model for a control which allows to choose in a list of alternative values. */ + interface ListBox extends awt.UnoControlListBoxModel, FormControlModel, XReset { + /** + * contains the indexes of entries of the listbox, which should selected by default. + * + * This selection is used initially or for a reset. + * @see com.sun.star.awt.UnoControlListBoxModel.SelectedItems + * @see com.sun.star.form.XReset + */ + DefaultSelection: SafeArray; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + + /** contains the values associated to the strings to be displayed (which are specified by {@link com.sun.star.awt.UnoControlListBoxModel.StringItemList} ) */ + ListSource: SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * This service specifies the model for control which provides controller functionality for a {@link DataForm} , such as navigating or filtering the + * form. + */ + interface NavigationToolBar extends FormControlModel { + /** + * denotes the border style of the control. + * + * Allowed values are **0** : no border at all**1** : 3D border**2** : simple flat + */ + Border: number; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** contains the font attributes for the text in the control */ + FontDescriptor: awt.FontDescriptor; + + /** + * specifies the emphasis mark for the font described in {@link FontDescriptor} + * + * The value must be one of the {@link com.sun.star.text.FontEmphasis} constants. + */ + FontEmphasisMark: number; + + /** + * specifies the relief for the font described in {@link FontDescriptor} + * + * The value must be one of the {@link com.sun.star.text.FontRelief} constants. + */ + FontRelief: number; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + + /** + * specifies the size of the icons in the control + * + * At least the following values are to be supported: 0: small icons (16x16)1: medium size icons (26x26) + */ + IconSize: number; + + /** + * specifies a repeat delay for the control + * + * Some buttons of a {@link NavigationToolBar} may show repeating behavior, e.g. may be repeatedly triggered when the user keeps the mouse pressed over + * such a button. ; The delay between two such triggers (in milliseconds) is specified with this property. + */ + RepeatDelay: number; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + + /** determines whether the control should provide functionality for filtering and sorting the parent form */ + ShowFilterSort: boolean; + + /** determines whether the control should provide functionality for navigating the parent form */ + ShowNavigation: boolean; + + /** determines whether the control should provide functionality for positioning the parent form */ + ShowPosition: boolean; + + /** determines whether the control should provide functionality for acting on the current record of the parent form */ + ShowRecordActions: boolean; + + /** specifies the text color (as RGB value) of the control. */ + TextColor: number; + + /** + * specifies the text line color (as RGB value) of the control. + * + * This color is used if the {@link FontDescriptor} defines that the text in the control should be underlined or stroke out. + */ + TextLineColor: number; + } + + /** specifies a component which allows the input of a numeric value. */ + interface NumericField extends awt.UnoControlNumericFieldModel, FormControlModel, XReset { + /** + * contains a default value for the control. + * + * This value is used when the control is initially displayed, and for resetting it. + * @see com.sun.star.awt.UnoControlNumericFieldModel.Value + * @see com.sun.star.form.XReset + */ + DefaultValue: number; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** specifies a component which allows the input of text which matches a specific pattern. */ + interface PatternField extends awt.UnoControlPatternFieldModel, FormControlModel, XReset { + /** + * contains a default value for the control. + * + * This value is used when the control is initially displayed, and for resetting it. + * @see com.sun.star.awt.UnoControlPatternFieldModel.Text + * @see com.sun.star.form.XReset + */ + DefaultText: string; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * specifies a component which acts as a radio button as needed in HTMLForms. + * + * Radio buttons are controls which can be grouped together, and in every group, only one of the controls can be check. This means if one of them is + * checked by a user interaction, all other controls in the same group are automatically unchecked + * + * Like in HTML, radio buttons are grouped together if and only if they have the same name (see {@link com.sun.star.form.FormComponent.Name} ). + */ + interface RadioButton extends awt.UnoControlRadioButtonModel, FormControlModel, XReset { + /** + * contains a default value for the control. + * + * This value is used when the control is initially displayed, and for resetting it. + * + * In a group of radio buttons only one button should be checked by default. + * @see com.sun.star.awt.UnoControlRadioButtonModel.State + * @see com.sun.star.form.XReset + */ + DefaultState: number; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + + /** + * contains a reference value which is used for submission in a HTML form. + * + * If the form the control belongs to is to be submitted (see {@link com.sun.star.form.XSubmit} ), and the control is checked, this reference value is + * used for submission. + */ + RefValue: string; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + + /** + * specifies a value which is to be associated with the control when it's **not** selected. + * + * In various situations, the {@link RefValue} is associated with the control if and only if it is selected. ; {@link UncheckedRefValue} provides a + * extensions of this concept: If present, the value should be associated with the control when it is **not** selected. + */ + UncheckedRefValue: string; + } + + /** specifies a component which extends the {@link com.sun.star.awt.UnoControlEditModel} with capabilities to display and input formatted text. */ + interface RichTextControl extends awt.UnoControlEditModel, FormControlModel, text.TextRange { + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + + /** + * specifies whether text should be automatically wrapped to fit into the control. + * + * If set to `TRUE` , users need to manually press the enter key to insert a line break. If set to `FALSE` , text is automatically wrapped at the control + * border. + */ + HardLineBreaks: boolean; + + /** + * specifies whether the control should display the text including all its formatting. + * + * If this is set to `FALSE` , the control will act as ordinary {@link com.sun.star.awt.UnoControlEditModel} . + * + * If the property is set to `TRUE` , the control will ignore the following properties: {@link com.sun.star.awt.UnoControlEditModel.EchoChar}{@link + * com.sun.star.awt.UnoControlEditModel.MaxTextLen}{@link com.sun.star.awt.UnoControlEditModel.MultiLine}{@link + * com.sun.star.awt.UnoControlEditModel.Align} + */ + RichText: boolean; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** specifies the model of a scroll bar control. */ + interface ScrollBar extends awt.UnoControlScrollBarModel, FormControlModel, XReset { + /** + * contains a default value for the control. + * + * This value is used when the control is initially displayed, and for resetting it. + * @see com.sun.star.awt.UnoControlScrollBarModel.ScrollValue + * @see com.sun.star.form.XReset + */ + DefaultScrollValue: number; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** specifies the model of a scroll bar control. */ + interface SpinButton extends awt.UnoControlSpinButtonModel, FormControlModel, XReset { + /** + * contains a default value for the control. + * + * This value is used when the control is initially displayed, and for resetting it. + * @see com.sun.star.awt.UnoControlSpinButtonModel.SpinValue + * @see com.sun.star.form.XReset + */ + DefaultSpinValue: number; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * specifies the control model for a button, part of a form component hierarchy, which can be bound to external submissions. + * @see CommandButton + */ + interface SubmitButton extends FormControlModel, submission.XSubmissionSupplier { + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** specifies a component which allows the input of text, either single- or multi-line. */ + interface TextField extends awt.UnoControlEditModel, FormControlModel, RichTextControl, XReset { + /** + * contains a default value for the control. + * + * This value is used when the control is initially displayed, and for resetting it. + * @see com.sun.star.awt.UnoControlEditModel.Text + * @see com.sun.star.form.XReset + */ + DefaultText: string; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** specifies the control model for a field which can be used to input time values. */ + interface TimeField extends awt.UnoControlTimeFieldModel, FormControlModel, XReset { + /** + * contains a default value for the control. + * + * This value is used when the control is initially displayed, and for resetting it. + * @see com.sun.star.awt.UnoControlTimeFieldModel.Time + * @see com.sun.star.form.XReset + */ + DefaultTime: number; + getPropertyValues(aPropertyNames: LibreOffice.SeqEquiv): SafeArray; + getPropertyValues(): SafeArray; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + } + + namespace control { + /** + * describes a control which can be used for visually grouping controls + * + * The model of the control has to support the {@link com.sun.star.form.component.GroupBox} service. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + */ + type GroupBox = awt.UnoControlGroupBox; + + /** + * This service specifies the model for control which provides controller functionality for a {@link com.sun.star.form.component.DataForm} , such as + * navigating or filtering the form. + * @see com.sun.star.form.component.NavigationToolBar + */ + type NavigationToolBar = awt.UnoControl; + + /** + * specifies a button control which can execute external submissions + * + * The model of the control has to support the {@link com.sun.star.form.component.SubmitButton} service. + * + * The control is clickable. When clicked (by mouse or keyboard, or programmatically), the following happens: 1. Any + * com::sun::star::form::submission::XSubmissionVetoListeners registered at the component are given the chance to veto the submission. 2. The model of + * the control is examined for an external submission object. That is, com::sun::star::form::submission::XSubmissionSupplier::getSubmission() is called + * at the model. ; If there is such a submission object, its {@link com.sun.star.form.submission.XSubmission.submit()} method is invoked. 3. If there is + * no external submission, the parent object of the model is examined for the presence of the {@link com.sun.star.form.XSubmit} interface. If it is + * present, it's {@link com.sun.star.form.XSubmit.submit()} method is invoked. ; Since the parent object of a submit button can only be a {@link + * com.sun.star.form.component.Form} , this means that SubmitButtons are also able to submit com::sun::star::form::component::HTMLForms. + */ + type SubmitButton = submission.XSubmission; + + /** + * describes a check box control which can (but not necessarily has to) be bound to a database field. + * + * The model of the control has to support the {@link com.sun.star.form.component.CheckBox} service. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + */ + interface CheckBox extends awt.UnoControlCheckBox, XBoundControl { } + + /** + * describes a combo box control. + * + * The model of the control has to support the {@link com.sun.star.form.component.ComboBox} service. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + */ + interface ComboBox extends awt.UnoControlComboBox, XBoundControl { } + + /** + * describes a button control. + * + * The model of the control has to support the {@link com.sun.star.form.component.CommandButton} service. + * + * The control is clickable, the action taken upon clicking depends on the settings of the model the control belongs to. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + * @see com.sun.star.form.component.CommandButton.ButtonType + */ + interface CommandButton extends awt.UnoControlButton, XApproveActionBroadcaster { } + + /** + * describes a control which can be used for inputting currency values, and which can (but not necessarily has to) be bound to a database field. + * + * The model of the control has to support the {@link com.sun.star.form.component.CurrencyField} service. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + */ + interface CurrencyField extends awt.UnoControlCurrencyField, XBoundControl { } + + /** + * describes a control which can be used for inputting date values, and which can (but not necessarily has to) be bound to a database field. + * + * The model of the control has to support the {@link com.sun.star.form.component.DateField} service. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + */ + interface DateField extends awt.UnoControlDateField, XBoundControl { } + + /** + * describes a check box control which can (but not necessarily has to) be bound to a database field. + * + * The model of the control has to support the {@link com.sun.star.form.component.CheckBox} service. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + */ + interface FilterControl extends awt.XControl { + createWithFormat(MessageParent: awt.XWindow, NumberFormatter: util.XNumberFormatter, ControlModel: beans.XPropertySet): void; + } + + /** + * describes a control which can be used for inputting values with a arbitrary formatting, and can (but not necessarily has to) be bound to a database + * field. + * + * The model of the control has to support the {@link com.sun.star.form.component.FormattedField} service. + * + * In addition, this control can be used in HTML forms. It triggers the {@link com.sun.star.form.XSubmit.submit()} method of the form it belongs to if + * the **enter** key is pressed while it has the focus. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + * @see com.sun.star.util.XNumberFormatsSupplier + */ + interface FormattedField extends awt.UnoControlFormattedField, XBoundControl { } + + /** + * describes a table-like control for displaying data. + * + * The model of the control has to support the {@link com.sun.star.form.component.GridControl} service. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + */ + interface GridControl extends awt.UnoControl, XBoundComponent, XGrid, XGridControl, util.XModifyBroadcaster, XGridFieldDataSupplier, container.XIndexAccess, + container.XEnumerationAccess, util.XModeSelector, view.XSelectionSupplier, frame.XDispatchProviderInterception { } + + /** + * describes a control which can be used for displaying images on a control acting like a button. + * + * The model of the control has to support the {@link com.sun.star.form.component.ImageButton} service. + * + * The control is clickable, the action taken upon clicking depends on the settings of the model the control belongs to. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + * @see com.sun.star.form.component.ImageButton.ButtonType + */ + interface ImageButton extends awt.UnoControlImageControl, XApproveActionBroadcaster { } + + /** + * describes a control used for displaying images stored in a database. + * + * The model of the control has to support the {@link com.sun.star.form.component.DatabaseImageControl} service. + * + * If the model of the control is valid bound to a database field, the control allows to select an image (browsing the file system) upon double clicking + * into it, and forwards the URL of the chosen image to the ImageURL property of its model. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + */ + interface ImageControl extends awt.UnoControlImageControl, XBoundControl { } + + /** is an extended grid control, which allows the user to customize some of its user interface's aspects. */ + interface InteractionGridControl extends GridControl, frame.XDispatch { } + + /** + * describes a list box control which can (but not necessarily has to) be bound to a database field. + * + * The model of the control has to support the {@link com.sun.star.form.component.ListBox} service. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + */ + interface ListBox extends awt.UnoControlListBox, XBoundControl, XChangeBroadcaster { } + + /** + * describes a control for inputting numeric values and which can (but not necessarily has to) be bound to a database field. + * + * The model of the control has to support the {@link com.sun.star.form.component.NumericField} service. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + */ + interface NumericField extends awt.UnoControlNumericField, XBoundControl { } + + /** + * describes a control for inputting text complying to a given pattern, and which can (but not necessarily has to) be bound to a database field. + * + * The model of the control has to support the {@link com.sun.star.form.component.PatternField} service. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + */ + interface PatternField extends awt.UnoControlPatternField, XBoundControl { } + + /** + * describes a radio button control which can (but not necessarily has to) be bound to a database field. + * + * The model of the control has to support the {@link com.sun.star.form.component.RadioButton} service. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + */ + interface RadioButton extends awt.UnoControlRadioButton, XBoundControl { } + + /** + * describes a control for entering arbitrary text which can (but not necessarily has to) be bound to a database field. + * + * The model of the control has to support the {@link com.sun.star.form.component.TextField} service. + * + * In addition, this control can be used in HTML forms. It triggers the {@link com.sun.star.form.XSubmit.submit()} method of the form it belongs to if + * the **enter** is pressed while it has the focus. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + */ + interface TextField extends awt.UnoControlEdit, XBoundControl, XChangeBroadcaster { } + + /** + * describes a control for inputting time values which can (but not necessarily has to) be bound to a database field. + * + * The model of the control has to support the {@link com.sun.star.form.component.TimeField} service. + * @see com.sun.star.awt.UnoControl + * @see com.sun.star.awt.UnoControlModel + */ + interface TimeField extends awt.UnoControlTimeField, XBoundControl { } + } + + namespace FormComponentType { + const enum Constants { + CHECKBOX = 5, + COMBOBOX = 7, + COMMANDBUTTON = 2, + CONTROL = 1, + CURRENCYFIELD = 18, + DATEFIELD = 15, + FILECONTROL = 12, + FIXEDTEXT = 10, + GRIDCONTROL = 11, + GROUPBOX = 8, + HIDDENCONTROL = 13, + IMAGEBUTTON = 4, + IMAGECONTROL = 14, + LISTBOX = 6, + NAVIGATIONBAR = 22, + NUMERICFIELD = 17, + PATTERNFIELD = 19, + RADIOBUTTON = 3, + SCROLLBAR = 20, + SPINBUTTON = 21, + TEXTFIELD = 9, + TIMEFIELD = 16, + } + } + + namespace inspection { + /** + * implements a property handler for use with an {@link com.sun.star.inspection.ObjectInspector} which is able to enhance the {@link + * com.sun.star.form.component.CommandButton.ButtonType} and {@link com.sun.star.form.component.CommandButton.TargetURL} properties of a {@link + * com.sun.star.form.component.CommandButton} . + * + * For this, the two properties are superseded by new versions, where as button type, additional possible values are added for navigating the parent form + * of the button. For instance, in an {@link com.sun.star.inspection.ObjectInspector} using this handler, the user will be able to choose a button type + * saying "move to the next record", which, when chosen, well, moves the parent database form of the button to the next record. + * @see com.sun.star.inspection.XPropertyHandler + * @see com.sun.star.form.component.CommandButton + */ + type ButtonNavigationHandler = com.sun.star.inspection.XPropertyHandler; + + /** + * implements a property handler for use with an {@link com.sun.star.inspection.ObjectInspector} which is able to provide properties to bind a form + * component to a spreadsheet cell. + * + * The handler expects a value named "ContextDocument" in the context in which it is created. That is, the {@link com.sun.star.uno.XComponentContext} + * used for creating the {@link CellBindingPropertyHandler} is examined for a value with this name. If the object in this value denotes a spreadsheet + * document (indicated by supporting the {@link com.sun.star.sheet.XSpreadsheetDocument} interface), this document is used to create the + * com::sun::star::form::binding::ValueBindings to bind the inspected object to cells in this document. + * @see com.sun.star.inspection.XPropertyHandler + * @see com.sun.star.form.binding.BindableControlModel + * @see com.sun.star.form.binding.ValueBinding + * @see com.sun.star.table.CellValueBinding + * @see com.sun.star.table.ListPositionCellBinding + * @see com.sun.star.uno.XComponentContext.getValueByName + */ + type CellBindingPropertyHandler = com.sun.star.inspection.XPropertyHandler; + + /** + * implements a property handler for use with an {@link com.sun.star.inspection.ObjectInspector} which provides convenience wrappers for some properties + * existing at a form component derived from {@link com.sun.star.awt.UnoControlEditModel} . + * + * First, the handler supersedes the HScroll and the VScroll properties of a {@link com.sun.star.awt.UnoControlEditModel} and puts them into one common + * property, allowing the user to choose whether she want to have "no", a "vertical", a "horizontal", or "both" scrollbars. + * + * Second, if it detects a {@link com.sun.star.form.component.RichTextControl} to inspect, it supersedes the {@link + * com.sun.star.form.component.RichTextControl.RichText} and the {@link com.sun.star.awt.UnoControlEditModel.MultiLine} properties with a new one which + * allows choosing the text type with one single action. + * @see com.sun.star.inspection.XPropertyHandler + * @see com.sun.star.awt.UnoControlEditModel + * @see com.sun.star.form.component.RichTextControl + * @see com.sun.star.form.component.TextField + */ + type EditPropertyHandler = com.sun.star.inspection.XPropertyHandler; + + /** + * implements a property handler for use with an {@link com.sun.star.inspection.ObjectInspector} which, for a {@link com.sun.star.form.FormComponent} , + * provides the script events offered by this form component. + * + * For this, the parent of the form component, which by definition supports the {@link com.sun.star.form.FormComponent} service, is examined for the + * {@link com.sun.star.script.XEventAttacherManager} interface. + * @see com.sun.star.inspection.XPropertyHandler + * @see com.sun.star.form.component.CommandButton + * @see com.sun.star.form.FormComponents + * @see com.sun.star.script.XEventAttacherManager + */ + type EventHandler = com.sun.star.inspection.XPropertyHandler; + + /** + * implements the default property handler for all known types of {@link com.sun.star.form.FormComponents} . + * @see com.sun.star.inspection.XPropertyHandler + * @see com.sun.star.form.FormComponents + */ + type FormComponentPropertyHandler = com.sun.star.inspection.XPropertyHandler; + + /** + * implements a property handler for use with an {@link com.sun.star.inspection.ObjectInspector} which provides properties for button controls which + * support submission of XML forms. + * + * The handler expects a value named "ContextDocument" in the context in which it is created. That is, the {@link com.sun.star.uno.XComponentContext} + * used for creating the {@link CellBindingPropertyHandler} is examined for a value with this name. If the object in this value denotes a XML form + * document (indicated by supporting the {@link com.sun.star.xforms.XFormsSupplier} interface), this document is used to examine the XML submissions + * which the button can be bound to. + * @see com.sun.star.inspection.XPropertyHandler + * @see com.sun.star.form.submission.XSubmission + * @see com.sun.star.form.submission.XSubmissionProvider + * @see com.sun.star.form.component.SubmitButton + * @see com.sun.star.xforms.XSubmission + * @see com.sun.star.uno.XComponentContext.getValueByName + */ + type SubmissionPropertyHandler = com.sun.star.inspection.XPropertyHandler; + + /** + * implements a property handler for use with an {@link com.sun.star.inspection.ObjectInspector} which provides properties related to binding form + * control models to {@link XForm} bindings. + * + * The handler introduces new properties to choose an {@link com.sun.star.xforms.XModel} and a {@link com.sun.star.xforms.Binding} within this model. + * Additionally, it introduces properties which reflect the different facets of the binding (e.g. com::sun::star::xforms::Binding::BindingExpression), so + * they can be changed directly in the {@link com.sun.star.inspection.ObjectInspector} as if they were a property of the form component which is being + * inspected. + * + * The handler expects a value named "ContextDocument" in the context in which it is created. That is, the {@link com.sun.star.uno.XComponentContext} + * used for creating the {@link CellBindingPropertyHandler} is examined for a value with this name. If the object in this value denotes a XML form + * document (indicated by supporting the {@link com.sun.star.xforms.XFormsSupplier} interface), this document is used to do XML binding related work. + * @see com.sun.star.inspection.XPropertyHandler + * @see com.sun.star.form.binding.BindableControlModel + * @see com.sun.star.form.binding.ValueBinding + * @see com.sun.star.xforms.Binding + * @see com.sun.star.uno.XComponentContext.getValueByName + */ + type XMLFormsPropertyHandler = com.sun.star.inspection.XPropertyHandler; + + /** + * implements a property handler for use with an {@link com.sun.star.inspection.ObjectInspector} which provides properties related to binding form + * control models to {@link XForm} bindings and validating the form control content. + * + * By using an {@link XMLFormsPropertyHandler} , an {@link com.sun.star.inspection.ObjectInspector} can be used to bind form components to {@link + * com.sun.star.xforms.Binding} instances. Since those instances also support validating form control content (by supporting an {@link + * com.sun.star.form.validation.XValidator} interface), it seems reasonable to edit those validate-related properties (like the XSD data type to validate + * against) in the {@link com.sun.star.inspection.ObjectInspector} , too. This is what an {@link XSDValidationPropertyHandler} is good for. + * + * The handler expects a value named "ContextDocument" in the context in which it is created. That is, the {@link com.sun.star.uno.XComponentContext} + * used for creating the {@link CellBindingPropertyHandler} is examined for a value with this name. If the object in this value denotes a XML form + * document (indicated by supporting the {@link com.sun.star.xforms.XFormsSupplier} interface), this document is used to do XML binding related work. + * @see com.sun.star.inspection.XPropertyHandler + * @see com.sun.star.form.binding.BindableControlModel + * @see com.sun.star.form.binding.ValueBinding + * @see com.sun.star.forms.validation.ValidatableControlModel + * @see com.sun.star.xforms.Binding + * @see com.sun.star.xsd.XDataType + * @see com.sun.star.uno.XComponentContext.getValueByName + */ + type XSDValidationPropertyHandler = com.sun.star.inspection.XPropertyHandler; + + /** + * implements a {@link com.sun.star.inspection.XObjectInspectorModel} for inspecting form components, in particular all components implementing the + * {@link FormComponent} service. + * + * A {@link DefaultFormComponentInspectorModel} provides the following handlers by default: {@link ButtonNavigationHandler}{@link + * CellBindingPropertyHandler}{@link EditPropertyHandler}{@link EventHandler}{@link FormComponentPropertyHandler}{@link SubmissionPropertyHandler}{@link + * XMLFormsPropertyHandler}{@link XSDValidationPropertyHandler} + * @see com.sun.star.inspection.XObjectInspectorModel.HandlerFactories + */ + interface DefaultFormComponentInspectorModel extends com.sun.star.inspection.XObjectInspectorModel { + /** + * creates a default {@link DefaultFormComponentInspectorModel} , providing factories for all handlers listed above. + * @since OOo 2.2 + */ + createDefault(): void; + + /** + * creates a default {@link DefaultFormComponentInspectorModel} , providing factories for all handlers listed above, and describing an ObjectInspector + * which has a help section. + * @param minHelpTextLines denotes the minimum number of lines of text to be reserved for the help section. + * @param maxHelpTextLines denotes the maximum number of lines of text to be reserved for the help section. + * @see XObjectInspectorModel.HasHelpSection + * @see XObjectInspectorModel.MinHelpTextLines + * @see XObjectInspectorModel.MaxHelpTextLines + * @since OOo 2.2 + * @throws com::sun::star::lang::IllegalArgumentException if minHelpTextLines or maxHelpTextLines are negative, or if minHelpTextLines is greater than maxHe + */ + createWithHelpSection(minHelpTextLines: number, maxHelpTextLines: number): void; + } + } + + namespace runtime { + /** specifies a component controlling the interaction between the user and multiple form controls belonging to a single form. */ + type FormController = XFormController; + + /** + * encapsulates the state of a {@link FormFeature} + * @see XFormOperations + * @since OOo 2.2 + */ + interface FeatureState { + /** determines whether the respective feature is enabled (i.e. available) in the current state of the form. */ + Enabled: boolean; + + /** determines the state of the feature. The concrete semantics depends on the concrete {@link FormFeature} . */ + State: any; + } + + /** + * is an event fired by a filter controller, when the filter managed by the controller changes. + * @see XFilterController + * @since OOo 3.3 + */ + interface FilterEvent extends lang.EventObject { + /** denotes the index of the **disjunctive term** to which the event applies, if any. */ + DisjunctiveTerm: number; + + /** denotes the index of the **filter component** to which the event applies, if any. */ + FilterComponent: number; + + /** denotes the **predicate expression** associated with the event. */ + PredicateExpression: string; + } + + /** + * encapsulates operations on a database form which has a UI representation, and is interacting with the user. + * @since OOo 2.2 + */ + interface FormOperations extends XFormOperations { + /** + * creates a `FormOperations` instance which works on a {@link com.sun.star.form.component.DataForm} instance. + * @throws IllegalArgumentException if the given form is `NULL` , or does not support the {@link com.sun.star.form.component.DataForm} service. + */ + createWithForm(Form: XForm): void; + + /** + * creates a `FormOperations` instance which works on a {@link com.sun.star.form.FormController} instance. + * @throws IllegalArgumentException if the given form controller is `NULL` , or does not have a model denoting a valid {@link com.sun.star.form.component.Da + */ + createWithFormController(Controller: XFormController): void; + } + + /** + * implements a callback for a {@link XFormOperations} instance, which is called when the state of one or more FormFeatures might have changed. + * @see XFormOperations + * @since OOo 2.2 + */ + interface XFeatureInvalidation { + /** + * invalidates all features + * + * This method is used of it cannot be exactly and reliably determined which features might actually have changed their state. In this case, the callee + * should assume all features it is interested in must be requeried. + */ + invalidateAllFeatures(): void; + + /** + * invalidates the given FormFeatures + * + * Invalidation means that any user interface representation (such as toolbox buttons), or any dispatches associated with the features in question are + * potentially out-of-date, and need to be updated. + * @param Features The set of features whose state might have changed. + */ + invalidateFeatures(Features: LibreOffice.SeqEquiv): void; + } + + /** + * provides access to a form based filter for a database form + * + * In a form based filter, form controls bound to a searchable database field are replaced with a control which allows entering a search expression. This + * so-called **predicate expression** is basically a part of an SQL `WHERE` clause, but without the part denoting the database column. For instance, if + * you have a form control bound to a table column named `Name` , then entering the string `LIKE 'Smith'` effectively constitutes a SQL `WHERE` clause + * `"Name" LIKE 'Smith'` . + * + * In the actual document view, there are usually some relaxations to this. For instance, keywords such as `LIKE` might be localized, according to + * OpenOffice.org's UI locale. Also, for an equality criterion, the equality sign `=` is usually omitted. However, this interface here provides + * programmatic access to the form based filter, so those relaxations are not considered here. + * + * The filter maintained by a filter controller is, logically, a disjunctive normal form of an SQL `WHERE` class. That is, it is a disjunction of **m** + * terms, where each term is a conjunction of **n** clauses of the form ` ` or of the form ` IS [NOT] NULL` . + * + * **n** equals the number of filter controls which the filter controller is responsible for. This number doesn't change during one session of the form + * based filter. On the other hand, **m** , the number of disjunctive terms, is dynamic. + * + * + * + * With the above, there are potentially **m * n****predicate expressions** (though usually only a fraction of those will actually exist). Since in a + * form based filter, there are only **n** filter controls, and each filter control displays exactly one **predicate expression** , this means that only + * a part of the complete filter can be displayed, in particular, only one **disjunctive term** can be displayed at a time. Thus, the filter controller + * knows the concept of an **active term** , denoted by the {@link ActiveTerm} attribute, controls which of the terms is currently displayed in the form + * controls. + * @see XFormController + * @see com.sun.star.sdbc.XResultSetMetaData.isSearchable + * @see com.sun.star.sdb.XSingleSelectQueryAnalyzer.getStructuredFilter + * @see com.sun.star.sdb.SQLFilterOperator + * @since OOo 3.3 + */ + interface XFilterController { + /** denotes the [**active term**]{@link url="#active_term"} of the filter controller. */ + ActiveTerm: number; + + /** + * registers a listener to be notified of certain changes in the form based filter. + * + * Registering the same listener multiple times results in multiple notifications of the same event, and also requires multiple revocations of the + * listener. + */ + addFilterControllerListener(Listener: XFilterControllerListener): void; + + /** appends an empty disjunctive term to the list of terms. */ + appendEmptyDisjunctiveTerm(): void; + + /** is the number of **disjunctive terms** of the filter expression represented by the form based filter. */ + DisjunctiveTerms: number; + + /** + * is the number of **filter components** , or filter controls, which the filter controller is responsible for. + * + * This number is constant during one session of the form based filter. + */ + FilterComponents: number; + + /** + * retrieves the filter component with the given index. + * + * The filter control has the same control model as the control which it stands in for. Consequently, you can use this method to obtain the database + * column which the filter control works on, by examining the control model's `BoundField` property. + * @param Component denotes the index of the filter component whose control should be obtained. Must be greater than or equal to 0, and smaller than {@link + * @see com.sun.star.form.DataAwareControlModel.BoundField + * @throws com::sun::star::lang::IndexOutOfBoundsException if Component is out of the allowed range. + */ + getFilterComponent(Component: number): awt.XControl; + + /** + * retrieves the entirety of the **predicate expressions** represented by the filter controller. + * + * Each element of the returned sequence is a **disjunctive term** , having exactly {@link FilterComponents} elements, which denote the single + * **predicate expressions** of this term. + */ + getPredicateExpressions(): SafeArray>; + + /** + * retrieves the entirety of the **predicate expressions** represented by the filter controller. + * + * Each element of the returned sequence is a **disjunctive term** , having exactly {@link FilterComponents} elements, which denote the single + * **predicate expressions** of this term. + */ + readonly PredicateExpressions: SafeArray>; + + /** + * removes a given **disjunctive term** + * @param Term the index of the term to remove. Must be greater than or equal to 0, and smaller than {@link DisjunctiveTerms} . + * @throws com::sun::star::lang::IndexOutOfBoundsException if Term is out of the allowed range. + */ + removeDisjunctiveTerm(Term: number): void; + + /** revokes a listener which was previously registered to be notified of certain changes in the form based filter. */ + removeFilterControllerListener(Listener: XFilterControllerListener): void; + + /** + * sets a given **predicate expression** + * @param Component denotes the filter component whose expression is to be set. Must be greater than or equal to 0, and smaller than {@link FilterComponents} . + * @param Term denotes the **disjunctive term** in which the expression is to be set. Must be greater than or equal to 0, and smaller than {@link Disjuncti + * @param PredicateExpression denotes the **predicate expression** to set for the given filter component in the given term. + * @throws com::sun::star::lang::IndexOutOfBoundsException if one of the indexes is out of the allowed range + */ + setPredicateExpression(Component: number, Term: number, PredicateExpression: string): void; + } + + /** + * is implemented by components listening for events fired by an {@link XFilterController} . + * @since OOo 3.3 + */ + interface XFilterControllerListener extends lang.XEventListener { + /** + * is fired when a **disjunctive term** was added to the filter of the filter controller. + * + * {@link FilterEvent.DisjunctiveTerm} is the index of the **disjunctive term** which was added. + * + * {@link FilterEvent.FilterComponent} and {@link FilterEvent.PredicateExpression} are not used for this event type. + */ + disjunctiveTermAdded(Event: FilterEvent): void; + + /** + * is fired when a **disjunctive term** was removed from the filter of the filter controller. + * + * {@link FilterEvent.DisjunctiveTerm} is the index of the **disjunctive term** which was removed. + * + * {@link FilterEvent.FilterComponent} and {@link FilterEvent.PredicateExpression} are not used for this event type. + */ + disjunctiveTermRemoved(Event: FilterEvent): void; + + /** + * is fired when a single **predicate expression** of the filter represented by the filter controller changed. + * + * {@link FilterEvent.DisjunctiveTerm} is the index of the **disjunctive term** in which the expression changed. This usually equals {@link + * XFilterController.ActiveTerm} . + * + * {@link FilterEvent.FilterComponent} denotes the index of the filter component whose **predicate expression** changed. + * + * {@link FilterEvent.PredicateExpression} is the new **predicate expressions** . + */ + predicateExpressionChanged(Event: FilterEvent): void; + } + + /** + * specifies a component controlling the interaction between the user and form functionality. + * + * As soon as a form (containing controls) is to be presented to the user, there is a need for an instance controlling the user interaction. ; Such a + * `FormController` is responsible for dialog processing, like controlling the tab order and the grouping of controls. + * + * As a form may contain one or many subforms, a {@link FormController} may contain one or more other FormControllers, so the form model structure or + * hierarchy is reflected in the structure of FormControllers. That is, retrieving the parent of the model of a controller will give you the same object + * as retrieving the model of the parent of the controller. Similarly, retrieving the model of the `n`th child of a controller gives you the + * same object as retrieving the `n`th child of the model of the controller. + * + * A controller is called **active** if one of the controls it is responsible for has the focus, else inactive. To be notified whenever this activation + * state of a given controller changes, you can add listeners. + * + * This interface supersedes the {@link com.sun.star.form.FormController} . + * + * **Responsibilities** + * + * A {@link FormController} is responsible for a {@link com.sun.star.awt.UnoControlContainer} , and all controls therein. + * + * Furthermore, a form controller is responsible for preventing invalid user input. That is, if the form contains controls bound to a database, or to an + * external validator, then the form controller will check their current value when the current record is to be saved to the database. + * + * First, it will check whether any controls with an external validator exist. If so, those validators will be asked to validate the current control + * content. If this fails, the message provided by the validator is displayed to the user, the control is focused, and the update of the record is + * vetoed. + * + * Second, the controls are examined for NULL values. If a control is bound to a database field which is declared to be `NOT NULL` , no auto-increment + * field, but still `NULL` , then an error message is shown to the user saying that input is required, the respective control is focused, and the update + * of the record is vetoed. + * + * Note that you can present the second check - for database fields containing `NULL` values - on a per-form and a per-database basis. ; For the former, + * you need to add a boolean property `FormsCheckRequiredFields` to the form (aka the `FormController` 's model), using its {@link + * com.sun.star.beans.XPropertyContainer.addProperty()} method, with a value of `FALSE` . ; For the latter, you need to set the respective property of + * the data source's `Settings` (also named `FormsCheckRequiredFields` ) to `FALSE` . + * + * Alternatively, you can prevent the check on a per-control basis, using the {@link DataAwareControlModel.InputRequired} property of a single control + * model. + * + * If a control which the controller is responsible for supports the {@link com.sun.star.frame.XDispatchProviderInterception} interface, the controller + * registers a dispatch interceptor. Then, the control can try to delegate part of its functionality to the controller by querying the dispatch + * interceptor for it. + * + * Below, there's a list of URLs which have a defined meaning - if an implementation supports one of them, there must be a guaranteed semantics. However, + * concrete implementations may support an arbitrary sub or super set of these URLs. + * + * In general, all URLs start with the same prefix, namely **.uno:FormController/** . To this, a suffix is appended which describes the requested + * functionality. ; Example: The URL suffix for deleting the current record is **deleteRecord** , so the complete URL for requesting a dispatcher for + * this functionality is **.uno:FormController/deleteRecord** . + * + * Some URLs may require parameters. For this, the sequence of {@link com.sun.star.beans.PropertyValues} passed to the {@link + * com.sun.star.frame.XDispatch.dispatch()} call is used - every property value is used as one named parameter. + * + * For all URLs, interested parties can register as status listeners ( {@link com.sun.star.frame.XStatusListener} ) at the dispatchers, and be notified + * whenever the functionality associated with the URL becomes enabled or disabled. ; For instance, the URL with the suffix **moveToFirst** is associated + * with moving the form to the first record, and it will be disabled in case the form is already positioned on the first record. + * + * {{table here, see documentation}} + * @see com.sun.star.form.component:Form + * @see com.sun.star.form.binding.BindableControlModel + * @see com.sun.star.sdb.DataSource.Settings + * @since OOo 3.3 + */ + interface XFormController extends awt.XTabController, container.XChild, container.XIndexAccess, container.XEnumerationAccess, lang.XComponent, + util.XModifyBroadcaster, XConfirmDeleteBroadcaster, sdb.XSQLErrorBroadcaster, sdb.XRowSetApproveBroadcaster, XDatabaseParameterBroadcaster2, + util.XModeSelector, XFilterController { + /** adds the specified listener to receive notifications whenever the activation state of the controller changes. */ + addActivateListener(Listener: XFormControllerListener): void; + + /** + * adds a controller to the list of child controllers + * @throws com::sun::star::lang::IllegalArgumentException if the given controller is `NULL` , or cannot rightfully be a child controller. Since controllers + */ + addChildController(ChildController: XFormController): void; + + /** allows to delegate certain tasks to the context of the form controller */ + Context: XFormControllerContext; + + /** provides access to the currently active control */ + CurrentControl: awt.XControl; + + /** + * denotes the instance which is used to implement operations on the form which the controller works for. + * + * This instance can be used, for instance, to determine the current state of certain form features. + */ + FormOperations: XFormOperations; + + /** used (if not `NULL` ) for user interactions triggered by the form controller. */ + InteractionHandler: task.XInteractionHandler; + + /** removes the specified listener from the list of components to receive notifications whenever the activation state of the controller changes. */ + removeActivateListener(Listener: XFormControllerListener): void; + } + + /** + * provides a context for a {@link FormController} + * + * A {@link FormController} knows about the controls it is responsible for, and about the control container which those controls live in. However, it + * doesn't know about a possible larger context, like a scrollable view which the controls are embedded into. To compensate this, it can be provided a + * `XFormControllerContext` . + */ + interface XFormControllerContext { + /** ensures the given control is visible, by scrolling the view if necessary. */ + makeVisible(Control: awt.XControl): void; + } + + /** + * encapsulates operations on a database form. + * + * This instance allows for operations on a user interface form, by saving its clients from various tedious and error-prone operations. + * + * As an example, imagine you have a database form, displayed in some user interface, which you want to move to the next record. ; It is as easy as + * calling {@link com.sun.star.sdbc.XResultSet.next()} on this form, right? Wrong. First, you need to care for saving the current record, so the user + * doesn't lose her input. So you need to call {@link com.sun.star.sdbc.XResultSetUpdate.updateRow()} or {@link + * com.sun.star.sdbc.XResultSetUpdate.insertRow()} , depending on the form's {@link com.sun.star.sdb.RowSet.IsNew} property. ; But then you're done, + * right? Wrong, again. ; When the user just entered some data into one of the form fields, but did not yet leave this field, then the data is not yet + * committed to the form, not to talk about being committed to the underlying database. So, before everything else, you would need to obtain the active + * control of the form, and commit it. ; **Now** you're done ... + * + * As another example, consider that you want to delete the current record from the form. You have to take into account any + * com::sun::star::form::XConfirmDeleteListeners registered at the {@link com.sun.star.form.FormController} or the {@link + * com.sun.star.form.component.DataForm} . + * + * If you agree that this is ugly to do and maintain, then `XFormOperations` is for you. It provides a {@link execute()} method, which will do all of the + * above for you; plus some similar convenient wrappers for similar functionality. + * @see FormFeature + * @since OOo 2.2 + */ + interface XFormOperations extends lang.XComponent { + /** + * commits the current control of our controller + * @throws com::sun::star::sdbc::SQLException if a database access error occurs + */ + commitCurrentControl(): boolean; + + /** + * commits the current record of the form + * @param RecordInserted will be `TRUE` if a record has been inserted, i.e. the form was positioned on the insertion row. + * @returns `TRUE` if and only if the current record needed being committed. That's the case if the record or the active control of the form were modified. + * @throws com::sun::star::sdbc::SQLException if a database access error occurs + */ + commitCurrentRecord(RecordInserted: [boolean]): boolean; + + /** + * provides access to the form controller which the instance is operating on. + * + * Note that it is possible to operate on a user interface form without actually having access to the form controller instance. However, in this case + * some functionality will not be available. In particular, every feature which relies on the active control of the controller might be of limited use. + */ + Controller: XFormController; + + /** provides access to the cursor of the form the instance is operating on. */ + Cursor: sdbc.XRowSet; + + /** + * executes the operation associated with the given feature + * @param Feature the feature which is to be executed. Must be one of the {@link FormFeature} constants. + * @see executeWithArguments + * @throws com::sun::star::lang::IllegalArgumentException if the given Feature is unknown, not executable, or strictly requires arguments to be executed. + * @throws com::sun::star::sdbc::SQLException if a database access error occurs + * @throws com::sun::star::lang::WrappedTargetException if an exception is caught which is no {@link com.sun.star.uno.RuntimeException} and no {@link com.su + */ + execute(Feature: number): void; + + /** + * executes the operation associated with the given feature, with passing arguments for execution + * @param Feature the feature which is to be executed. Must be one of the {@link FormFeature} constants. + * @param Arguments the named arguments for the feature to execute. See the {@link FormFeature} list for features which require arguments. + * @throws com::sun::star::lang::IllegalArgumentException if the given feature is unknown, or not executable + * @throws com::sun::star::lang::IllegalArgumentException if the given arguments are not sufficient to execute the feature + * @throws com::sun::star::sdbc::SQLException if a database access error occurs + * @throws com::sun::star::lang::WrappedTargetException if an exception is caught which is no {@link com.sun.star.uno.RuntimeException} and no {@link com.su + */ + executeWithArguments(Feature: number, Arguments: LibreOffice.SeqEquiv): void; + + /** + * denotes the instance which should be notified about features whose state might have changed. + * + * If this attribute is not `NULL` , the instance which it denotes will be notified whenever the state of any supported feature might have changed. + * + * For instance, imagine a form whose current row has just been moved to another record, using the {@link execute()} method. This means that potentially, + * the state of all movement-related features might have changed. + * + * Note that the instance does not actually notify changes in the feature states, but only **potential** changes: It's up to the callee to react on this + * appropriately. This is since OpenOffice.org's application framework features own mechanisms to cache and invalidate feature states, so we do not + * burden this implementation here with such mechanisms. + * @see FormFeature + */ + FeatureInvalidation: XFeatureInvalidation; + + /** + * retrieves the current state of the given feature + * + * You would usually use this to update some user interface to reflect this state. For instance, you could imagine a toolbar button which is associated + * with a given feature. This button would be enabled if and only if the respective feature is currently available, and be checked if and only if the + * feature state is a `boolean` evaluating to `TRUE` . + * @param Feature the feature whose state is to be determined. Must be one of the {@link FormFeature} constants. ; An invalid value here will be silently + */ + getState(Feature: number): FeatureState; + + /** + * determines whether a feature is currently enabled. + * + * Calling this is equivalent to calling {@link getState()} , and evaluating the {@link FeatureState.Enabled} member. + * @param Feature the feature whose state is to be determined. Must be one of the {@link FormFeature} constants. ; An invalid value here will be silently + */ + isEnabled(Feature: number): boolean; + + /** + * determines whether the form is currently positioned on the insertion row + * + * This is a convenience method only. Calling it is equivalent to examining the {@link com.sun.star.sdb.RowSet.IsNew} property of the form. + * @throws com::sun::star::lang::WrappedTargetException if an error occurs obtaining the form property + */ + isInsertionRow(): boolean; + + /** + * determines whether the current row of the form is modified + * + * This is a convenience method only. Calling it is equivalent to examining the {@link com.sun.star.sdb.RowSet.IsModified} property of the form. + * @throws com::sun::star::lang::WrappedTargetException if an error occurs obtaining the form property + */ + isModifiedRow(): boolean; + + /** provides access to the update cursor of the form the instance is operating on. */ + UpdateCursor: sdbc.XResultSetUpdate; + } + + namespace FormFeature { + const enum Constants { + AutoFilter = 15, + DeleteRecord = 10, + InteractiveFilter = 16, + InteractiveSort = 14, + MoveAbsolute = 1, + MoveToFirst = 3, + MoveToInsertRow = 7, + MoveToLast = 6, + MoveToNext = 5, + MoveToPrevious = 4, + RefreshCurrentControl = 19, + ReloadForm = 11, + RemoveFilterAndSort = 18, + SaveRecordChanges = 8, + SortAscending = 12, + SortDescending = 13, + ToggleApplyFilter = 17, + TotalRecords = 2, + UndoRecordChanges = 9, + } + } + } + + namespace submission { + /** is implemented by components which support submitting data. */ + interface XSubmission extends uno.XInterface { + /** + * registers the given listener to be notified when a submission occurs + * @param listener the listener to register + * @throws com::sun::star::lang::NoSupportException when the component does not support external components vetoing the submission + */ + addSubmissionVetoListener(listener: XSubmissionVetoListener): void; + + /** + * revokes a listener which has previously been registered to be notified when a submission occurs + * @param listener the listener to revoke + * @throws com::sun::star::lang::NoSupportException when the component does not support external components vetoing the submission + */ + removeSubmissionVetoListener(listener: XSubmissionVetoListener): void; + + /** + * tells the component to submit data + * @throws com::sun::star::util::VetoException if the submission has been vetoed. Usually, this indicates that not all requirements for the submission, e.g. + * @throws com::sun::star::lang::WrappedTargetException if an error occurred during invoking the submission target + */ + submit(): void; + + /** + * tells the component to submit data + * @param aHandler This handler allows additional user interaction, which may be necessary before the submission can be performed. + * @throws com::sun::star::util::VetoException if the submission has been vetoed. Usually, this indicates that not all requirements for the submission, e.g. + * @throws com::sun::star::lang::WrappedTargetException if an error occurred during invoking the submission target + */ + submitWithInteraction(aHandler: task.XInteractionHandler): void; + } + + /** + * is implemented by a component which allows access to a component which can submit data. + * @see XSubmission + */ + interface XSubmissionSupplier extends uno.XInterface { + /** specifies the {@link XSubmission} instance to which the submission request should be delegated. */ + Submission: XSubmission; + } + + /** + * is implement by components which want to observe (and probably veto) the submission of data. + * @see XSubmission + */ + interface XSubmissionVetoListener extends lang.XEventListener { + /** + * is invoked when a component, at which the listener has been registered, is about to submit its data. + * @param event The submission event. The {@link com.sun.star.lang.EventObject.Source} member of the structure describes the component which is about to su + * @throws com::sun::star::util::VetoException when the submission is vetoed. {@link com.sun.star.uno.Exception.Message} should contain a justification for + */ + submitting(event: lang.EventObject): void; + } + } + + namespace validation { + /** + * specifies a control model which supports both binding to an external value supplier, and to an external validator. + * + * There are two methods how the value which is represented by a control model can interact with other components (well, except the trivial ones + * accessible by using {@link com.sun.star.beans.XPropertySet} ): binding the value to an external component via {@link + * com.sun.star.form.binding.XBindableValue}validating the current value by an external component, via {@link XValidatable} and {@link XValidator} + * + * The {@link ValidatableBindableControlModel} services describes the interaction of these concepts for control models which support both of them. + */ + interface ValidatableBindableControlModel extends ValidatableControlModel, binding.BindableControlModel { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** + * specifies the model of a form control which supports live validation of its input. + * + * Validatable control models support setting a validator with dynamic validity constraints, and broadcasting changes in their value as well as the + * validity of their value. + */ + interface ValidatableControlModel extends FormControlModel, XValidatableFormComponent, XValidityConstraintListener { + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** is the listener interface to be notified of changes of a {@link XValidatableFormComponent} */ + interface XFormComponentValidityListener extends lang.XEventListener { + /** + * called when the validity and/or the value of the form component at which the listener is registered changed. + * @param Source The member {@link com.sun.star.lang.EventObject.Source} represents the {@link XValidatableFormComponent} whose validity, value, or text ch + */ + componentValidityChanged(Source: lang.EventObject): void; + } + + /** + * specifies support for validating a component + * @see XValidator + */ + interface XValidatable extends uno.XInterface { + /** retrieves the external instance which is currently used to validate the component */ + getValidator(): XValidator; + + /** + * sets an external instance which is able to validate the component + * + * Any previously active validator will be revoked - there can be only one! + * @param Validator the new validator which is to be used by the component. May be `NULL` , in this case only the current validator is revoked. + * @throws com::sun::star::util::VetoException if changing the validator is not allowed in the current component state + */ + setValidator(Validator: XValidator): void; + + /** retrieves the external instance which is currently used to validate the component */ + Validator: XValidator; + } + + /** + * is a convenience interface for accessing several aspects of a form component which supports validation. + * + * A validatable form component has two aspects which other parties might be interested in: The pure validity flag: Whatever the user enters in the + * component, this is either valid (relative to the active validator), or invalid.The current value: Even if the validity flag does not change with the + * user input (e.g. because the user replaces one invalid value with another invalid value), observers might be interested in the current value, for + * example to include it in a feedback message to the user. + * + * An {@link XValidatableFormComponent} allows to easily access both of these aspects. + * + * Note that all of the information provided at this interface can also obtained by other means, but much more inconveniently. + * @see XValidatable + * @see XValidator + */ + interface XValidatableFormComponent extends XValidatable { + /** + * registers the given listener. + * + * XFormComponentValidityListeners are called whenever **any** of the aspects of the validatable form component (the validity flag, or the value) + * changed. + * @throws com::sun::star::lang::NullPointerException if the given listener is `NULL` + */ + addFormComponentValidityListener(Listener: XFormComponentValidityListener): void; + + /** + * retrieves the current value of the component. + * + * The type of the current value, as well as it's semantics, depend on the service implementing this interface. + * + * Again, this is a convenience method. For example, for a {@link com.sun.star.form.component.FormattedField} , calling this method is equivalent to + * retrieving the {@link com.sun.star.awt.UnoControlFormattedFieldModel.EffectiveValue} . + * + * If no validator has been set ( {@link XValidatable.setValidator()} ), the value returned here is defined by the service implementing this interface. + */ + readonly CurrentValue: any; + + /** + * retrieves the current value of the component. + * + * The type of the current value, as well as it's semantics, depend on the service implementing this interface. + * + * Again, this is a convenience method. For example, for a {@link com.sun.star.form.component.FormattedField} , calling this method is equivalent to + * retrieving the {@link com.sun.star.awt.UnoControlFormattedFieldModel.EffectiveValue} . + * + * If no validator has been set ( {@link XValidatable.setValidator()} ), the value returned here is defined by the service implementing this interface. + */ + getCurrentValue(): any; + + /** + * determines whether the current value of the component passed the validity test at the validator. + * + * Calling this is equal to calling {@link XValidator.isValid()} with the current value (see {@link getCurrentValue()} ) of the component, where the + * validator is obtained via {@link XValidatable.getValidator()} . + * + * If no validator has been set ( {@link XValidatable.setValidator()} ), this method returns true. + */ + isValid(): boolean; + + /** + * registers the given listener. + * @throws com::sun::star::lang::NullPointerException if the given listener is `NULL` + */ + removeFormComponentValidityListener(Listener: XFormComponentValidityListener): void; + } + + /** + * specifies a component able to validate (the content of) other components + * + * Validators support simple validity checks and retrieving justifications for invalidity. + * + * Validators may additionally support dynamic validity constraints. In such a case, the validity of a given value may change, without the value changing + * itself. ; To be notified about this, interested components should register as {@link XValidityConstraintListener} . + * @see XValidatable + */ + interface XValidator extends uno.XInterface { + /** + * registers the given validity listener. + * + * Usually, an {@link XValidatable} instance will also add itself as validity listener, as soon as the validator is introduced to it. + * + * Implementations which do not support dynamic validity constraints should simply ignore this call. + * @see XValidityConstraintListener + * @throws com::sun::star::lang::NullPointerException if the given listener is `NULL` + */ + addValidityConstraintListener(Listener: XValidityConstraintListener): void; + + /** + * retrieves a justification for the invalidity of the given value + * @param Value the value which has been recognized as being invalid + * @returns a human-readable string, which explains why the given value is considered invalid. + */ + explainInvalid(Value: any): string; + + /** + * determines whether the given value is valid + * @param Value the value to check for validity + * @returns `TRUE` if and only if the value is considered valid. + */ + isValid(Value: any): boolean; + + /** + * revokes the given validity listener + * @see XValidityConstraintListener + * @throws com::sun::star::lang::NullPointerException if the given listener is `NULL` + */ + removeValidityConstraintListener(Listener: XValidityConstraintListener): void; + } + + /** specifies an interface for listening for changes in the validity constraints represented by an {@link XValidator} . */ + interface XValidityConstraintListener extends lang.XEventListener { + /** + * called when the validity constraint represented by an {@link XValidator} , at which the listener is registered, changed. + * @param Source The event source. The member {@link com.sun.star.lang.EventObject.Source} represents the validator component whose validity constraint changed. + */ + validityConstraintChanged(Source: lang.EventObject): void; + } + } + } + + namespace formula { + /** + * The accessible view of a formula documents command text. + * @since OOo 1.1.2 + */ + interface AccessibleFormulaText extends accessibility.XAccessible, accessibility.XAccessibleComponent, accessibility.XAccessibleContext, + accessibility.XAccessibleEventBroadcaster { } + + /** + * The accessible view of a formula documents visual representation. + * @since OOo 1.1.2 + */ + interface AccessibleFormulaView extends accessibility.XAccessible, accessibility.XAccessibleComponent, accessibility.XAccessibleContext, + accessibility.XAccessibleText, accessibility.XAccessibleEventBroadcaster { } + + /** The formula properties provide access to the properties of a formula in a formula generator */ + interface FormulaProperties { + /** + * contains the alignment of the formula. + * @see HorizontalAlignment + */ + Alignment: number; + + /** + * contains the base font height in point the formula will be formatted in. + * + * All properties containing relative values are related to this value. + */ + BaseFontHeight: number; + + /** + * contains the baselines offset in respect to the top of the formula rectangle + * @since OOo 3.4 + */ + BaseLine: number; + + /** contains the metric value of the bottom margin of the formula. */ + BottomMargin: number; + + /** customized name for fixed font. */ + CustomFontNameFixed: string; + + /** customized name for sans serif font */ + CustomFontNameSans: string; + + /** customized name for serif font */ + CustomFontNameSerif: string; + + /** determines if the customized fixed font is bold. */ + FontFixedIsBold: boolean; + + /** determines if the customized fixed font is italic. */ + FontFixedIsItalic: boolean; + + /** determines if the font that is used to display functions is bold. */ + FontFunctionsIsBold: boolean; + + /** determines if the font that is used to display functions is italic. */ + FontFunctionsIsItalic: boolean; + + /** contains the name of the font that is used to display functions contained in the formula. */ + FontNameFunctions: string; + + /** contains the name of the font that is used to display numbers contained in the formula. */ + FontNameNumbers: string; + + /** contains the name of the font that is used to display text contained in the formula. */ + FontNameText: string; + + /** contains the name of the font that is used to display variables contained in the formula. */ + FontNameVariables: string; + + /** determines if the font that is used to display numbers is bold. */ + FontNumbersIsBold: boolean; + + /** determines if the font that is used to display numbers is italic. */ + FontNumbersIsItalic: boolean; + + /** determines if the customized sans serif font is bold. */ + FontSansIsBold: boolean; + + /** determines if the customized sans serif font is italic. */ + FontSansIsItalic: boolean; + + /** determines if the customized serif font is bold. */ + FontSerifIsBold: boolean; + + /** determines if the customized serif font is italic. */ + FontSerifIsItalic: boolean; + + /** determines if the font that is used to display text is bold. */ + FontTextIsBold: boolean; + + /** determines if the font that is used to display text is italic. */ + FontTextIsItalic: boolean; + + /** determines if the font that is used to display variables is bold. */ + FontVariablesIsBold: boolean; + + /** determines if the font that is used to display variables is italic. */ + FontVariablesIsItalic: boolean; + + /** contains the command string of the formula */ + Formula: string; + + /** decides if all brackets (even those without "left"/"right" modifier) are scaled. */ + IsScaleAllBrackets: boolean; + + /** switches into text mode. */ + IsTextMode: boolean; + + /** contains the metric value of the left margin of the formula. */ + LeftMargin: number; + + /** contains the relative distance of brackets. */ + RelativeBracketDistance: number; + + /** contains the relative excess size of brackets. */ + RelativeBracketExcessSize: number; + + /** + * contains the relative height of the font for functions. + * + * The values unit is percent of the {@link com.sun.star.formula.FormulaProperties.BaseFontHeight} + */ + RelativeFontHeightFunctions: number; + + /** + * contains the relative height of the font for indices. + * + * The values unit is percent of the {@link com.sun.star.formula.FormulaProperties.BaseFontHeight} + */ + RelativeFontHeightIndices: number; + + /** + * contains the relative height of the font for limits. + * + * The values unit is percent of the {@link com.sun.star.formula.FormulaProperties.BaseFontHeight} + */ + RelativeFontHeightLimits: number; + + /** + * contains the relative height of the font for operators. + * + * The values unit is percent of the {@link com.sun.star.formula.FormulaProperties.BaseFontHeight} + */ + RelativeFontHeightOperators: number; + + /** + * contains the relative height of the font for text. + * + * The values unit is percent of the {@link com.sun.star.formula.FormulaProperties.BaseFontHeight} + */ + RelativeFontHeightText: number; + + /** contains the relative excess length of a fraction bar. */ + RelativeFractionBarExcessLength: number; + + /** contains the relative line weight of a fraction bar. */ + RelativeFractionBarLineWeight: number; + + /** contains the relative depth of the denominator of a fraction */ + RelativeFractionDenominatorDepth: number; + + /** contains the relative height of the numerator of a fraction. */ + RelativeFractionNumeratorHeight: number; + + /** contains the relative superscript of indices. */ + RelativeIndexSubscript: number; + + /** contains the relative subscript of indices. */ + RelativeIndexSuperscript: number; + + /** contains the relative line spacing. */ + RelativeLineSpacing: number; + + /** contains the relative distance of lower limits. */ + RelativeLowerLimitDistance: number; + + /** contains the relative column spacing of matrices. */ + RelativeMatrixColumnSpacing: number; + + /** contains the relative line spacing of matrices. */ + RelativeMatrixLineSpacing: number; + + /** contains the relative excess of operators. */ + RelativeOperatorExcessSize: number; + + /** contains the relative spacing of operators. */ + RelativeOperatorSpacing: number; + + /** contains the relative root spacing */ + RelativeRootSpacing: number; + + /** contains the relative scaling of the bracket excess. */ + RelativeScaleBracketExcessSize: number; + + /** contains the relative spacing. */ + RelativeSpacing: number; + + /** contains the relative minimum height of the formula. */ + RelativeSymbolMinimumHeight: number; + + /** contains the relative primary height of symbols. */ + RelativeSymbolPrimaryHeight: number; + + /** contains the relative distance of upper limits */ + RelativeUpperLimitDistance: number; + + /** contains the metric value of the right margin of the formula. */ + RightMargin: number; + + /** contains the metric value of the top margin of the formula. */ + TopMargin: number; + } + + /** @deprecated DeprecateddraftnWeight should be changed to float as in FontWeight.idlnItalic probably needs to have FontItalic extended by the two extra defines */ + interface SymbolDescriptor { + /** Specifies the Unicode character of the symbol. */ + nCharacter: number; + + /** + * Specifies the character set which is supported by the font. + * @see com.sun.star.awt.CharSet + */ + nCharSet: number; + + /** + * Specifies the general style of the font. + * @see com.sun.star.awt.FontFamily + */ + nFamily: number; + + /** + * Specifies if the font is italic. + * @see com.sun.star.awt.FontSlant The values com::sun::star::awt::FontSlant::REVERSE_OBLIQUE and com::sun::star::awt::FontSlant::REVERSE_ITALIC may not + */ + nItalic: number; + + /** + * Specifies the pitch of the font. + * @see com.sun.star.awt.FontPitch + */ + nPitch: number; + + /** + * Specifies the thickness of the line. + * @see com.sun.star.awt.FontWeight The allowed integer values correspond as follows: 0 : {@link com.sun.star.awt.FontWeight.DONTKNOW} 1 : {@link com.sun + */ + nWeight: number; + + /** The export name of the symbol. */ + sExportName: string; + + /** Specifies the exact name of the font ("Arial", "Courier", etc.). */ + sFontName: string; + + /** The name of the symbol. */ + sName: string; + + /** Specifies the name of the symbol set to which this symbol belongs. */ + sSymbolSet: string; + } + } + + namespace frame { + /** @since LibreOffice 4.2 */ + type AppDispatchProvider = XAppDispatchProvider; + + /** + * A legacy (single-instance) service-variant of {@link theAutoRecovery} singleton. + * @deprecated DeprecatedUse theAutoRecovery singleton instead. + * @since LibreOffice 4.0 + */ + type AutoRecovery = XDispatch; + + /** @since LibreOffice 4.1 */ + type Bibliography = container.XNameAccess; + + /** + * specifies a collection of components + * + * One important instance of this service is available from the {@link Desktop} object via the {@link XDesktop} interface. + * @see com.sun.star.lang.XComponent + * @see XDesktop + */ + type Components = container.XEnumerationAccess; + + /** + * special dispatcher for non visible contents, e.g. sounds + * + * This handler doesn't need any frame as target for loading components. Content handler are registered for content types. (See type/filter configuration + * of {@link com.sun.star.document.TypeDetection} for further information) If generic load mechanism found such documents which can be handled by a + * {@link ContentHandler} it will create and use it. + * @see com.sun.star.document.TypeDetection + */ + type ContentHandler = XNotifyingDispatch; + + /** + * factory to create content loader + * + * With this factory it's possible to have access on configuration of set of registered content handler objectscreate a content handler by his internal + * namequery for a content handler by using special query or property description. + */ + type ContentHandlerFactory = XLoaderFactory; + + /** + * A legacy (single-instance) service-variant of {@link theDesktop} singleton. + * @deprecated DeprecatedUse theDesktop singleton instead. + */ + type Desktop = XDesktop2; + + /** @deprecated Deprecated */ + type DesktopTasks = container.XEnumerationAccess; + + /** + * provides an easy way to dispatch an URL using one call instead of multiple ones. + * + * Normally a complete dispatch is split into different parts: converting and parsing the URLsearching for a valid dispatch object available on a + * dispatch providerdispatching of the URL and its parameters + * @see DispatchProvider + * @see XDispatchProvider + * @see XDispatch + * @since OOo 1.1.2 + */ + type DispatchHelper = XDispatchHelper; + + /** + * provides functionality to record {@link XDispatch.dispatch()} requests + * + * It records all necessary parameters of a call {@link XDispatch.dispatch()} and generate code which can be executed at later time to run same + * operations again. Which code will be generated depends from real implementation. So it's possible to generate e.g. Java/Basic or may Perl code. By + * using of a {@link DispatchRecorderSupplier} , which is available on a property of a {@link Frame.DispatchRecorderSupplier} , it's possible to change + * such code generation for further requests or disable it in general by setting this property to `NULL` . + * @see DispatchRecorderSupplier + * @see Frame.RecorderSupplier + * @since OOo 1.1.2 + */ + type DispatchRecorder = XDispatchRecorder; + + /** + * provides a {@link DispatchRecorder} + * + * This supplier regulate macro recording of {@link XDispatch.dispatch()} calls. For that it encapsulates a reference to a {@link DispatchRecorder} . + * Such recorder is used internally and can be used externally too. A supplier will be available on a {@link Frame} if recording was enabled, otherwise + * not. A frame supports a special property for that. This modular concept of recorder, supplier and frame makes it possible to implement local recording + * on one frame; global recording by using all currently opened frames or only some of them; and so on. + * @see DispatchRecorder + * @see Frame + * @since OOo 1.1.2 + */ + type DispatchRecorderSupplier = XDispatchRecorderSupplier; + + /** + * is a service for accessing the document templates of the office and manipulate them ( add or rename or remove templates ) + * + * It implements a high level interface on top of an ucb content provider which is used for template configuration. + */ + type DocumentTemplates = XDocumentTemplates; + + /** + * This exception can be thrown in case an object is initialized second time. + * @since OOo 1.1.2 + */ + type DoubleInitializationException = uno.Exception; + + /** + * represents the environment for a desktop component + * + * Frames are the anchors for the office components and they are the component's link to the outside world. They create a skeleton for the whole office + * API infrastructure by building frame hierarchies. These hierarchies contains all currently loaded documents and make it possible to walk during these + * trees. A special service {@link Desktop} can(!) combine different of such trees to a global one which life time will be controlled by it. + * @see Desktop + */ + type Frame = XFrame2; + + /** + * factory to create frame loader + * + * With this factory it's possible to have access on configuration of set of registered frame loader objectscreate a frame loader by his internal + * namequery for a frame loader by using special query or property description. + */ + type FrameLoaderFactory = XLoaderFactory; + + /** + * this is a special container which can contain frames + * + * All elements in this container support the service frame. Implementations of this service are available by interface {@link XFramesSupplier} . + * @see XFramesSupplier + */ + type FramesContainer = XFrames; + + /** + * A legacy (single-instance) service-variant of {@link theGlobalEventBroadcaster} singleton. + * @deprecated DeprecatedUse theGlobalEventBroadcaster singleton instead. + */ + type GlobalEventBroadcaster = XGlobalEventBroadcaster; + + /** + * This exception can be thrown in case arguments are wrong. + * @since OOo 1.1.2 + */ + type IllegalArgumentIOException = io.IOException; + + /** + * controls the layout of user interface elements which are part of a frame. + * + * Layout management is the process of determining the size and position of user interface elements. By default, each {@link Frame} has a layout manager + * - it performs layout management for the user interface elements within the frame. User interface elements can provide size and alignment hints to + * layout managers, but layout managers have the final decision on the size and position of those user interface elements. + * @since OOo 2.0 + */ + type LayoutManager = XLayoutManager2; + + /** + * provides for mapping a given sequence of content identifier strings to a sequence of respective media (mime) types + * + * Order of given and their returned corresponding strings is important. Don't pack or optimize it. Every item of [in] list must match to an item of + * [out] list. + */ + type MediaTypeDetectionHelper = util.XStringMapping; + + /** + * can be used to identify office modules. + * + * Further it provides read access to the configuration of office modules. + * @since OOo 2.0 + */ + type ModuleManager = XModuleManager2; + + /** @since LibreOffice 4.2 */ + type OfficeFrameLoader = XSynchronousFrameLoader; + + /** + * A legacy (single-instance) service-variant of {@link thePopupMenuControllerFactory} singleton. + * @deprecated DeprecatedUse thePopupMenuControllerFactory singleton instead. + * @since OOo 2.0 + */ + type PopupMenuControllerFactory = XUIControllerFactory; + + /** + * The {@link SessionManager} service provides an interface to the session manager of the desktop. A session manager keeps track of applications that are + * running when the desktop shuts down and starts them again in the same state they were left when the desktop starts up the next time. To be able to do + * this the session manager needs cooperation from applications; applications have to provide sufficient information to be started again as well as + * restore the state they were left in. The normal flow of operation looks like this: + * + * 1. The user starts the desktop shutdown. 2. The session manager informs all its connected applications about the pending shutdown. 3. Each + * application saves its current state; while doing this it may The application may request to interact with the user (e.g. to ask where to save + * documents). This request is necessary because at any one time only one application can interact with the user. The session manager coordinates these + * requests and grants every application in need of user interaction a timeslot in which it may interact with the usertry to cancel the whole shutdown; + * the session manager may or may not honor that request. 4. After saving is done the session manager signals all applications to exit. 5. Applications + * answer the exit message by disconnecting from the session manager. 6. After all applications have exited or a reasonable timeout the session manager + * kills all remaining applications and finally lets the desktop shut down. + */ + type SessionManager = XSessionManagerClient; + + /** @deprecated Deprecated */ + type Settings = container.XNameAccess; + + /** + * is an abstract service for a component which offers a more complex user interface to users within a status bar. + * + * A generic status bar function is represented as a text field which provides status information to the user. A status bar controller can be added to a + * status bar and provides information or functions with a more sophisticated user interface. ; A typical example for a status bar controller is the + * zoom level chooser within the statusbar. It provides an option to change the zoom level of an application. + * @see com.sun.star.frame.XDispatchProvider + * @see com.sun.star.frame.XStatusbarController + * @since OOo 2.0 + */ + type StatusbarController = XStatusbarController; + + /** + * A legacy (single-instance) service-variant of {@link theStatusbarControllerFactory} singleton. + * @deprecated DeprecatedUse theStatusbarControllerFactory singleton instead. + * @since OOo 2.0 + */ + type StatusbarControllerFactory = XUIControllerFactory; + + /** @since LibreOffice 4.1 */ + type TaskCreator = lang.XSingleServiceFactory; + + /** + * can be thrown by a {@link XTerminateListener} to prevent the environment (e.g., desktop) from terminating + * + * If a {@link XTerminateListener} use this exception for a veto against the termination of the office, he will be the new "owner" of it. After his own + * operation will be finished, he MUST try to terminate the office again. Any other veto listener can intercept that again or office will die really. + * + * Since LibreOffice 5.3: Throwing this exception will only prevent **termination** . Exiting LibreOffice will close all the windows, but the process + * will keep running. + * @see XDesktop.terminate() + * @see XTerminateListener + */ + type TerminationVetoException = uno.Exception; + + /** + * Prior to LibreOffice 4.3, this singleton was only available as a (single-instance) {@link AutoRecovery} service. + * @since LibreOffice 4.3 + */ + type theAutoRecovery = XDispatch; + + /** + * is the environment for components which can instantiate within frames + * + * A desktop environment contains tasks with one or more frames in which components can be loaded. The term "task" or naming a frame as a "task frame" is + * not in any way related to any additional implemented interfaces, it's just because these frames use task windows. + * + * Prior to LibreOffice 4.3, this singleton was only available as a (single-instance) {@link Desktop} service. + * @since LibreOffice 4.3 + */ + type theDesktop = XDesktop2; + + /** + * This singleton offers the document event functionality that can be found at any {@link com.sun.star.document.OfficeDocument} , but it does it for all + * existing documents. + * + * So it is a single place where a listener can be registered for all events in all documents. + * + * Prior to LibreOffice 4.3, this singleton was only available as a (single-instance) {@link GlobalEventBroadcaster} service. + * @since LibreOffice 4.3 + */ + type theGlobalEventBroadcaster = XGlobalEventBroadcaster; + + /** + * specifies a factory that creates instances of registered popup menu controller. + * + * A pop-up menu controller can be registered for a command URL and a model service name. A menu bar or context menu will automatically create a pop-up + * menu controller if it contains a registered command URL. + * + * Prior to LibreOffice 4.3, this singleton was only available as a (single-instance) {@link PopupMenuControllerFactory} service. + * @since LibreOffice 4.3 + */ + type thePopupMenuControllerFactory = XUIControllerFactory; + + /** + * specifies a factory that creates instances of registered status bar controller. + * + * A status bar controller can be registered for a command URL and a model service name. A status bar will automatically create a status bar controller + * if it contains a registered command URL. + * + * Prior to LibreOffice 4.3, this singleton was only available as a (single-instance) {@link StatusbarControllerFactory} service. + * @since LibreOffice 4.3 + */ + type theStatusbarControllerFactory = XUIControllerFactory; + + /** + * specifies a factory that creates instances of registered toolbar controller. + * + * A toolbar controller can be registered for a command URL and a model service name. + * + * Prior to LibreOffice 4.3, this singleton was only available as a (single-instance) {@link ToolbarControllerFactory} service. + * @since LibreOffice 4.3 + */ + type theToolbarControllerFactory = XUIControllerFactory; + + /** + * a singleton which provides information about user interface commands of modules. + * + * OpenOffice.org has an amount of commands that can be used by user interface elements. This singleton provides access to the user interface commands + * that are part of OpenOffice.org modules, like Writer or Calc. + * + * Provides access to user interface commands of the installed modules. + * + * To access the user interface command description of a module, a unique module specifier must be provided to {@link + * com.sun.star.container.XNameAccess.getByName()} function. The module specifier can be retrieved from the {@link com.sun.star.frame.ModuleManager} + * service. The interface provides references to com::sun:star:: {@link ui.ModuleUICommandDescription} . + * @see com.sun.star.frame.ModuleManager Prior to LibreOffice 4.3, this singleton was only available as a (single-instance) {@link UICommandDescription} + * @since LibreOffice 4.3 + */ + type theUICommandDescription = container.XNameAccess; + + /** + * A legacy (single-instance) service-variant of {@link theToolbarControllerFactory} singleton. + * @deprecated DeprecatedUse theToolbarControllerFactory singleton instead. + * @since OOo 2.0 + */ + type ToolbarControllerFactory = XUIControllerFactory; + + /** + * specifies a factory for com::sun::star::ucb::TransientDocumentsDocumentContents. + * @since OOo 2.0 + */ + type TransientDocumentsDocumentContentFactory = XTransientDocumentsDocumentContentFactory; + + /** + * A legacy (single-instance) service-variant of {@link theUICommandDescription} singleton. + * @deprecated DeprecatedUse theUICommandDescription singleton instead. + * @since OOo 2.0 + */ + type UICommandDescription = container.XNameAccess; + + /** + * This exception can be thrown in case an office module could not be classified or does not have a valid configuration. + * @since OOo 2.0 + */ + type UnknownModuleException = uno.Exception; + + /** + * these are the events which can happen to the components in frames of the desktop + * + * Interest listener can get information about loaded/reloaded or unloaded components into a {@link Frame} . + * @see XFrame + * @see XFrameActionListener + * @see FrameActionEvent + */ + const enum FrameAction { + /** + * an event of this kind is broadcast whenever a component is attached to a frame + * + * This is almost the same as the instantiation of the component within that frame. The component is attached to the frame immediately before this event + * is broadcast. + * @see XFrame.setComponent() + */ + COMPONENT_ATTACHED = 0, + /** + * an event of this kind is broadcast whenever a component is detaching from a frame + * + * This is quite the same as the destruction of the component which was in that frame. At the moment when the event is broadcast the component is still + * attached to the frame but in the next moment it won't. + * @see XFrame.setComponent() + */ + COMPONENT_DETACHING = 1, + /** + * an event of this kind is broadcast whenever a component is attached to a new model. + * + * In this case the component remains the same but operates on a new model component. + */ + COMPONENT_REATTACHED = 2, + /** + * an event of this kind is broadcast whenever a component changes its internal context (i.e., the selection). + * + * If the activation status within a frame changes, this counts as a context change too. + * @see XFrame.contextChanged() + */ + CONTEXT_CHANGED = 5, + /** + * an event of this kind is broadcast whenever a component gets activated + * + * Activations are broadcast from the top component which was not active before, down to the inner most component. + * @see XFrame.activate() + */ + FRAME_ACTIVATED = 3, + /** + * an event of this kind is broadcasted immediately before the component is deactivated + * + * Deactivations are broadcast from the innermost component which does not stay active up to the outer most component which does not stay active. + * @see XFrame.deactivate() + */ + FRAME_DEACTIVATING = 4, + /** + * an event of this kind is broadcast by an active frame when it is getting UI control (tool control). + * @see XFrame.activate() + */ + FRAME_UI_ACTIVATED = 6, + /** + * an event of this kind is broadcast by an active frame when it is losing UI control (tool control). + * @see XFrame.deactivate() + */ + FRAME_UI_DEACTIVATING = 7, + } + + /** specifies a border area by offsets from each side. */ + interface BorderWidths { + /** specifies the offset from bottom border. */ + Bottom: number; + + /** specifies the offset from left border. */ + Left: number; + + /** specifies the offset from right border. */ + Right: number; + + /** specifies the offset from top border. */ + Top: number; + } + + /** + * describes a command which can be send to a generic toolbar control. + * @since OOo 2.0.3 + */ + interface ControlCommand { + /** + * specifies a sequence of named values which are used as argument for the command. The number and type of arguments depend on the the command and + * control. + */ + Arguments: SafeArray; + + /** specifies the command which should be processed by the toolbar control. */ + Command: string; + } + + /** + * describes a control event send by extended user interface controls. + * @since OOo 2.0.3 + */ + interface ControlEvent { + /** specifies a sequence of named values which are used as additional values for the event. The number and types of named values depend on the event. */ + aInformation: SafeArray; + + /** fully parsed URL describing the control that sends this notification. */ + aURL: util.URL; + + /** specifies the event which has occurred. */ + Event: string; + } + + /** + * is an abstract service for a component which offers a deeper integration of desktop components than a {@link com.sun.star.awt.XWindow} can offer + * + * Such components can be loaded into a {@link Frame} inside a {@link Desktop} environment. A controller is a richer component then a pure window, but + * full featured components need a {@link XModel} interface too. ; (see service {@link com.sun.star.document.OfficeDocument} for further information) + * @see com.sun.star.document.OfficeDocument + */ + interface Controller extends XController, XDispatchProvider, ui.XContextMenuInterception, awt.XUserInputInterception, view.XSelectionSupplier, + datatransfer.XTransferableSupplier { } + + /** + * use the {@link Frame} service instead of this + * @deprecated Deprecated + */ + interface DesktopTask extends XDesktopTask, XFrame, beans.XPropertySet, XWindowArranger, XFramesSupplier { + initialize(xWindow: awt.XWindow): void; + IsAlwaysVisible: boolean; + IsDesktop: boolean; + IsFloating: boolean; + + /** use th visible state of the frame container window instead of this */ + IsVisible: boolean; + + /** use the position of the frame container window instead of this */ + Position: awt.Point; + + /** use the size of the frame container window instead of this */ + Size: awt.Size; + + /** use property {@link Frame.Title} instead of that */ + Title: string; + } + + /** + * describes a feature to be retrieved by a URL that has to be loaded into a specified frame + * + * For a normal dispatch calls all needed parameters are separated. For optimized remote functionality XDispatch::queryDispatches() it's necessary to + * pack these parameters in a flat structure which can be used in a simple manner. + * @see XDispatchProvider.queryDispatches() + */ + interface DispatchDescriptor { + /** + * specifies the URL of the resource/function + * + * Must be a full parsed URL. Use service {@link com.sun.star.util.URLTransformer} for that. + * @see com.sun.star.util.URLTransformer + */ + FeatureURL: util.URL; + + /** + * name of the target frame + * + * Special targets (e.g. "_blank", "_self") or really existing target names can be used. + * @see XDispatchProvider.queryDispatch() + */ + FrameName: string; + + /** + * describes how the target frame is to be searched + * + * This optional parameter is used if **FrameName** isn't a special target only. + * @see FrameSearchFlag + */ + SearchFlags: number; + } + + /** + * provides information about a supported command + * @see XDispatchInformationProvider + * @see Controller + * @since OOo 2.0 + */ + interface DispatchInformation { + /** command URL of a supported command. */ + Command: string; + + /** + * group identifier to which the supported command belong. + * @see CommandGroup + */ + GroupId: number; + } + + /** + * provides {@link XDispatch} objects for certain functions which are useful at the UI + * + * Such dispatch objects must be queried explicitly and used for queried purposes only. They can handle requests with guaranteed notifications ( {@link + * XNotifyingDispatch} ) or with possible (but not guaranteed) notifications ( {@link XDispatch} ). + * @see XNotifyingDispatch + * @see XDispatch + * @see XControlNotificationListener + */ + interface DispatchProvider extends XDispatchProvider, XDispatchProviderInterception { } + + /** + * contains the result of the dispatch action, if State is set to SUCCESS + * + * The type of the result is dispatch action dependent. The member State can be set to one of the values defined in {@link DispatchResultState} . If + * State is set to {@link DispatchResultState.FAILURE} , Result may specify the reason (or is empty). The type is also dispatch action dependent. If + * State is set to {@link DispatchResultState.DONTKNOW} , Result is empty. + * @see DispatchResultState + */ + interface DispatchResultEvent extends lang.EventObject { + /** describes result for given **State** */ + Result: any; + + /** describes state of dispatch */ + State: number; + } + + /** + * represents a dispatch statement from a recorded macro + * @since OOo 1.1.2 + */ + interface DispatchStatement { + /** + * specifies the dispatch command arguments + * + * That means the **Arguments** parameter of a corresponding {@link XDispatch.dispatch()} request. + */ + aArgs: SafeArray; + + /** + * specifies the dispatch command + * + * That means the **URL** parameter of a corresponding {@link XDispatchProvider.queryDispatch()} request. + */ + aCommand: string; + + /** + * specifies the frame target + * + * That means the **TargetFrameName** parameter of a corresponding {@link XDispatchProvider.queryDispatch()} request. + */ + aTarget: string; + + /** + * specifies if this statement should be recorded as commented out or not + * @see XDispatchRecorder.recordDispatchAsComment() + */ + bIsComment: boolean; + + /** + * specifies the optional search flags + * + * That means the **SearchFlags** parameter of a corresponding {@link XDispatchProvider.queryDispatch()} request. + */ + nFlags: number; + } + + /** + * This event is broadcast by a {@link Controller} whenever the state of the feature changes + * @see XController + * @see XStatusListener + */ + interface FeatureStateEvent extends lang.EventObject { + /** contains a descriptor of the feature for the user interface. */ + FeatureDescriptor: string; + + /** contains the URL of the feature. */ + FeatureURL: util.URL; + + /** specifies whether the feature is currently enabled or disabled. */ + IsEnabled: boolean; + + /** + * specifies whether the {@link XDispatch} has to be requeried. + * + * Interest code should listen for {@link FrameActionEvent} too, to update own feature states and dispatch listener on FrameAction::CONTEXT_CHANGED. + */ + Requery: boolean; + + /** + * contains the state of the feature in this dispatch. + * + * This can be, for example, simply `TRUE` for a boolean feature like underline on/off. Some simple types like `string` or `boolean` are useful here for + * generic UI elements, like a checkmark in a menu. + */ + State: any; + } + + /** + * this event struct is broadcast for actions which can happen to components within frames + * @see XFrameActionListener + */ + interface FrameActionEvent extends lang.EventObject { + /** specifies the concrete event */ + Action: FrameAction; + + /** contains the frame in which the event occurred */ + Frame: XFrame; + } + + /** + * contains a frame with a desktop component + * + * If the control is visible and has a valid (loadable) component URL, then the {@link FrameControl.Frame} property is set. Normally this control can be + * used for preview functionality inside any UI. + */ + interface FrameControl extends awt.UnoControl { + /** contains the type of the component which is loaded into the frame, or the document which implicitly specifies the type */ + ComponentUrl: string; + + /** + * the frame held by this control + * + * The {@link Frame} is created if the control is shown and the {@link ComponentUrl} is set. + */ + Frame: string; + } + + /** + * derivations of this abstract service are used to load components into Frames of the environment + * + * Concrete implementations of this service register, for example, for file name extensions or MIME types to load appropriate components. The components + * loaded are at least {@link Controller} . Instead of {@link SynchronousFrameLoader} this one use asynchronous processes to load the component. + * @see SynchronousFrameLoader + */ + interface FrameLoader extends XFrameLoader, lang.XInitialization, container.XNamed { } + + /** + * provides access to a pop-up menu controller. + * + * A pop-up menu controller is used to make special functions available to users, which depend on runtime or context specific conditions. ; A typical + * example for a pop-up menu controller can be a recent file list implementation which provides a list of latest files that a user has worked on. This + * list gets changes consistently during a work session. + * @since OOo 2.0 + */ + interface PopupMenuController extends XPopupMenuController, lang.XInitialization, XStatusListener, XDispatchProvider, lang.XComponent { } + + /** + * special dispatch provider registered for URL protocols + * + * The generic dispatch mechanism on a {@link Frame} search for such registered protocol handler and use it if it agrees with the dispatched URL. + * + * Supported URLs must match follow format: `protocol scheme:protocol specific part` If a handler provides optional arguments ("?") or jump marks ("#") + * depends from his definition and implementation. The generic dispatch provider will use registered URL pattern to detect right handler. + */ + interface ProtocolHandler extends XDispatchProvider, lang.XInitialization { } + + /** + * This was created from its sole place of use, so it might be incomplete. + * @since LibreOffice 4.1 + */ + interface SessionListener extends XSessionManagerListener2 { + createWithOnQuitFlag(AllowUserInteractionOnQuit: boolean): void; + } + + /** @since LibreOffice 4.1 */ + interface StartModule extends XController { + createWithParentWindow(ContainerWindow: awt.XWindow): void; + } + + /** + * derivations of this abstract service are used to load components into Frames of the environment + * + * Concrete implementations of this service register, for example, for file name extensions or MIME types to load appropriate components. The components + * loaded are at least {@link Controller} . Instead of service {@link FrameLoader} this one use synchronous processes to load the component. + * @see FrameLoader + */ + interface SynchronousFrameLoader extends XSynchronousFrameLoader, lang.XInitialization, container.XNamed { } + + /** + * represents a top level frame in the frame hierarchy with the desktop as root + * + * Please use the service {@link Frame} instead of this deprecated {@link Task} . If it's method {@link XFrame.isTop()} returns `TRUE` , it's the same as + * a check for the {@link Task} service. + * @deprecated Deprecated + * @see Frame + * @since OOo 1.1.2 + */ + interface Task extends XFrame, XTask { } + + /** provides a high level API to organize document templates */ + interface TemplateAccess extends XDocumentTemplates, lang.XLocalizable { } + + /** Contains the information about a changed title. */ + interface TitleChangedEvent extends lang.EventObject { + /** The new title */ + Title: string; + } + + /** + * is an abstract service for a component which offers a more complex user interface to users within a toolbar. + * + * A generic toolbar function is represented as a button which has a state (enabled,disabled and selected, not selected). A toolbar controller can be + * added to a toolbar and provide information or functions within a more sophisticated user interface. ; A typical example for toolbar controller is the + * font chooser within the toolbar. It provides all available fonts in a dropdown box and shows the current chosen font. + * @see com.sun.star.frame.XDispatchProvider + * @since OOo 2.0 + */ + interface ToolbarController extends XStatusListener, lang.XInitialization, util.XUpdatable, XToolbarController, XSubToolbarController { } + + /** @since LibreOffice 4.2 */ + interface XAppDispatchProvider extends XDispatchInformationProvider, XDispatchProvider { } + + /** allows to listen to border resize events of a controller. */ + interface XBorderResizeListener extends lang.XEventListener { + /** + * notifies the listener that the controller's border widths have been changed. + * @param Object reference to the object representing the controller + * @param NewSize the new widths of the controller's border + */ + borderWidthsChanged(Object: uno.XInterface, NewSize: BorderWidths): void; + } + + /** @deprecated Deprecated */ + interface XBrowseHistoryRegistry extends uno.XInterface { + /** @deprecated Deprecated */ + createNewEntry(URL: string, Arguments: LibreOffice.SeqEquiv, Title: string): void; + + /** @deprecated Deprecated */ + updateViewData(Value: any): void; + } + + /** + * this is a simple interface to load components by an URL into a frame environment + * @see Desktop + * @see Frame + * @see XFrame + */ + interface XComponentLoader extends uno.XInterface { + loadComponentFromURL(URL: 'private:factory/scalc', TargetFrameName: string, SearchFlags: number, Arguments: LibreOffice.SeqEquiv): sheet.SpreadsheetDocument; + loadComponentFromURL(URL: 'private:factory/sdraw', TargetFrameName: string, SearchFlags: number, Arguments: LibreOffice.SeqEquiv): drawing.DrawingDocument; + loadComponentFromURL( + URL: 'private:factory/simpress', TargetFrameName: string, SearchFlags: number, Arguments: LibreOffice.SeqEquiv): presentation.PresentationDocument; + loadComponentFromURL(URL: 'private:factory/swriter', TargetFrameName: string, SearchFlags: number, Arguments: LibreOffice.SeqEquiv): text.TextDocument; + + /** + * loads a component specified by an URL into the specified new or existing frame. + * @param URL specifies the URL of the document to load To create new documents, use "private:factory/scalc", "private:factory/swriter", etc. Other specia + * @param TargetFrameName specifies the name of the frame to view the document in If a frame with the specified name already exists, it is used, otherwise + * @param SearchFlags use the values of {@link FrameSearchFlag} to specify how to find the specified **TargetFrameName** Note: These flags are optional on + * @param Arguments these arguments specify component or filter specific behavior For example, "ReadOnly" with a boolean value specifies whether the docum + * @returns a {@link com.sun.star.lang.XComponent} for successfully loaded documents or ; `NULL` if it failed This interface is a generic one and can be use + * @throws com::sun::star::io::IOException when **URL** couldn't be found or was corrupt + * @throws com::sun::star::lang::IllegalArgumentException when given parameters doesn't perform the specification + */ + loadComponentFromURL(URL: string, TargetFrameName: string, SearchFlags: number, Arguments: LibreOffice.SeqEquiv): lang.XComponent; + } + + /** @deprecated Deprecated */ + interface XComponentRegistry extends uno.XInterface { + /** @deprecated Deprecated */ + createObject(URL: string, Uik: uno.Uik): uno.XInterface; + } + + /** @deprecated Deprecated */ + interface XConfigManager extends uno.XInterface { + /** + * add a listener to notify changes on well known variables inside the real implementation + * + * Listener can update his text values by calling {@link XConfigManager.substituteVariables()} again. If **KeyName** specifies a group of keys, the + * listener gets one notify for each subkey. + * @deprecated Deprecated + * @param KeyName specifies variable about listener will be informed on changes + * @param Listener listener which will be informed + * @see XConfigManager.removePropertyChangeListener() + */ + addPropertyChangeListener(KeyName: string, Listener: beans.XPropertyChangeListener): void; + + /** + * was designed for additional functionality for interface {@link com.sun.star.registry.XSimpleRegistry} and make no sense without that + * @deprecated Deprecated + */ + flush(): void; + + /** + * remove a registered listener + * @deprecated Deprecated + * @param KeyName specifies variable on which listener was registered + * @param Listener listener which will be deregistered + * @see XConfigManager.addPropertyChangeListener() + */ + removePropertyChangeListener(KeyName: string, Listener: beans.XPropertyChangeListener): void; + + /** + * substitute variables (place holder) inside given parameter **Text** + * + * The value of **Text** is NOT changed. + * @param Text original value including variables + * @returns changed copy of **Text** without any variables + */ + substituteVariables(Text: string): string; + } + + /** + * With this interface, components viewed in a {@link Frame} can serve events (by supplying dispatches). + * @see XFrame + * @see com.sun.star.awt.XWindow + * @see XModel + */ + interface XController extends lang.XComponent { + /** + * is called to attach the controller with its managing frame. + * @param Frame the new owner frame of this controller + */ + attachFrame(Frame: XFrame): void; + + /** + * is called to attach the controller to a new model. + * @param Model the new model for this controller + * @returns `TRUE` if attach was successfully ; `FALSE` otherwise + */ + attachModel(Model: XModel): boolean; + + /** + * provides access to owner frame of this controller + * @returns the frame containing this controller. + */ + readonly Frame: XFrame; + + /** + * provides access to owner frame of this controller + * @returns the frame containing this controller. + */ + getFrame(): XFrame; + + /** + * provides access to currently attached model + * @returns the currently attached model. + */ + getModel(): XModel; + + /** + * provides access to current view status + * @returns set of data that can be used to restore the current view status at later time by using {@link XController.restoreViewData()} + */ + getViewData(): any; + + /** + * provides access to currently attached model + * @returns the currently attached model. + */ + readonly Model: XModel; + + /** + * restores the view status using the data gotten from a previous call to {@link XController.getViewData()} . + * @param Data set of data to restore it + */ + restoreViewData(Data: any): void; + + /** + * is called to prepare the controller for closing the view + * @param Suspend `TRUE` force the controller to suspend his work `FALSE` try to reactivate the controller + * @returns `TRUE` if request was accepted and of course successfully finished ; `FALSE` otherwise + */ + suspend(Suspend: boolean): boolean; + + /** + * provides access to current view status + * @returns set of data that can be used to restore the current view status at later time by using {@link XController.restoreViewData()} + */ + readonly ViewData: any; + } + + /** + * extends the {@link XController} interface + * @since OOo 3.0 + */ + interface XController2 extends XController { + /** + * denotes the "root window" of the controller. + * + * If the controller is plugged into a frame, this window acts as the frame's `ComponentWindow` . + * @see XFrame + */ + ComponentWindow: awt.XWindow; + + /** + * denotes the arguments used to create the instance. + * + * Usually, controllers are created via {@link XModel2.createViewController()} , where the caller can pass not only a controller name, but also arguments + * parameterizing the to-be-created instance. Those arguments used at creation time can subsequently be retrieved using the `CreationArguments` member. + */ + CreationArguments: SafeArray; + + /** + * get the sidebar if exists + * @since LibreOffice 5.1 + */ + getSidebar(): ui.XSidebarProvider; + + /** + * get the sidebar if exists + * @since LibreOffice 5.1 + */ + readonly Sidebar: ui.XSidebarProvider; + + /** + * specifies the view name of the controller. + * + * A view name is a logical name, which can be used to create views of the same type. The name is meaningful only in conjunction with {@link + * XModel2.createViewController()}if it's passed there, a view/controller pair of the same type will be created. + */ + ViewControllerName: string; + } + + /** allows to retrieve information about controller's border. */ + interface XControllerBorder extends uno.XInterface { + /** adds the specified listener to receive events about controller's border resizing. */ + addBorderResizeListener(xListener: XBorderResizeListener): void; + + /** + * allows to get current border sizes of the document. + * @returns {@link BorderWidths} representing the sizes of border + */ + readonly Border: BorderWidths; + + /** + * allows to get current border sizes of the document. + * @returns {@link BorderWidths} representing the sizes of border + */ + getBorder(): BorderWidths; + + /** + * allows to get suggestion for resizing of object area surrounded by the border. + * + * If the view is going to be resized/moved this method can be used to get suggested object area. Pixels are used as units. + * @returns suggestion for the resizing + */ + queryBorderedArea(aPreliminaryRectangle: awt.Rectangle): awt.Rectangle; + + /** removes the specified listener. */ + removeBorderResizeListener(xListener: XBorderResizeListener): void; + } + + /** + * Must be implemented by dispatch objects which want to get notifications about control events. + * @since OOo 2.0.3 + */ + interface XControlNotificationListener extends uno.XInterface { + /** + * notifies that a control event has happened + * @param Event contains the event information + */ + controlEvent(Event: ControlEvent): void; + } + + /** + * This is the main interface of a desktop service. + * + * A desktop is an environment for components which can be viewed in frames. Frames are like frames in HTML framesets. This does not imply that a desktop + * can handle framesets; the frames may be top frames only. + * @see Desktop + */ + interface XDesktop extends uno.XInterface { + /** + * registers an event listener to the desktop, which is called when the desktop is queried to terminate, and when it really terminates. + * @param Listener listener for termination events + * @see XDesktop.removeTerminateListener() + */ + addTerminateListener(Listener: XTerminateListener): void; + + /** + * provides read access to collection of all currently loaded components inside the frame tree + * + * The component is, by definition, the model of the control which is loaded into a frame, or if no model exists, into the control itself. The service + * {@link Components} which is available from this method is a collection of all components of the desktop which are open within a frame of the desktop. + * @returns the collection of all components + * @see Components + */ + readonly Components: container.XEnumerationAccess; + + /** + * provides read access to the component inside the tree which has the UI focus + * + * Normally, the component is the model part of the active component. If no model exists it is the active controller (view) itself. + * @returns the component within the desktop environment which has the UI focus. + * @see XDesktop.getCurrentFrame() + */ + readonly CurrentComponent: lang.XComponent; + + /** + * provides read access to the frame which contains the current component + * @returns the frame of the component which has the UI focus within this desktop environment + * @see XDesktop.getCurrentComponent() + */ + readonly CurrentFrame: XFrame; + + /** + * provides read access to collection of all currently loaded components inside the frame tree + * + * The component is, by definition, the model of the control which is loaded into a frame, or if no model exists, into the control itself. The service + * {@link Components} which is available from this method is a collection of all components of the desktop which are open within a frame of the desktop. + * @returns the collection of all components + * @see Components + */ + getComponents(): container.XEnumerationAccess; + + /** + * provides read access to the component inside the tree which has the UI focus + * + * Normally, the component is the model part of the active component. If no model exists it is the active controller (view) itself. + * @returns the component within the desktop environment which has the UI focus. + * @see XDesktop.getCurrentFrame() + */ + getCurrentComponent(): lang.XComponent; + + /** + * provides read access to the frame which contains the current component + * @returns the frame of the component which has the UI focus within this desktop environment + * @see XDesktop.getCurrentComponent() + */ + getCurrentFrame(): XFrame; + + /** + * unregisters an event listener for termination events. + * @param Listener listener which wish to be deregistered + * @see XDesktop.addTerminateListener() + */ + removeTerminateListener(Listener: XTerminateListener): void; + + /** + * tries to terminate the desktop. + * + * First, every terminate listener is called by his {@link XTerminateListener.queryTermination()} method. Throwing of a {@link TerminationVetoException} + * can break the termination process and the listener how has done that will be the new "controller" of the desktop lifetime. He should try to terminate + * it by himself after his own processes will be finished. If nobody disagree with the termination request, every listener will be called by his {@link + * XTerminateListener.notifyTermination()} method. + * @returns `TRUE` if all listener agree with this request ; `FALSE` otherwise + * @see XTerminateListener + * @see TerminationVetoException + */ + terminate(): boolean; + } + + /** @since LibreOffice 4.1 */ + interface XDesktop2 extends XDispatchProvider, XDispatchProviderInterception, XFramesSupplier, XDesktop, XComponentLoader { } + + /** + * use {@link XFrame} instead of this + * @deprecated Deprecated + */ + interface XDesktopTask extends lang.XComponent { + /** + * use {@link com.sun.star.util.XCloseable} or {@link com.sun.star.lang.XComponent.dispose()} instead. + * @deprecated Deprecated + */ + close(): boolean; + + /** + * use {@link com.sun.star.lang.XInitialization} instead. + * @deprecated Deprecated + */ + initialize(TaskWindow: awt.XWindow): void; + } + + /** + * serves state information of objects which can be connected to controls (e.g. toolbox controls). + * + * Each state change is to be broadcasted to all registered status listeners. The first notification should be performed synchronously from {@link + * XDispatch.addStatusListener()} ; if not, controls may flicker. State listener must be aware of this synchronous notification. + * + * The state consists of enabled/disabled and a short descriptive text of the function (e.g. "undo insert character"). It is to be broadcasted whenever + * this state changes or the control should re-get the value for the URL it is connected to. Additionally, a context-switch-event is to be broadcasted + * whenever the object may be out of scope, to force the state listener to requery the {@link XDispatch} . + * @see Frame + * @see FeatureStateEvent + */ + interface XDispatch extends uno.XInterface { + /** + * registers a listener of a control for a specific URL at this object to receive status events. + * + * It is only allowed to register URLs for which this {@link XDispatch} was explicitly queried. Additional arguments ("#..." or "?...") will be ignored. + * + * Note: Notifications can't be guaranteed! This will be a part of interface {@link XNotifyingDispatch} . + * @param Control listener that wishes to be informed + * @param URL the URL (without additional arguments) the listener wishes to be registered for. A listener can be registered for more than one URL at the sa + * @see XStatusListener + * @see XDispatch.removeStatusListener() + */ + addStatusListener(Control: XStatusListener, URL: util.URL): void; + + /** + * dispatches (executes) an URL + * + * It is only allowed to dispatch URLs for which this {@link XDispatch} was explicitly queried. Additional arguments ("'#..." or "?...") are allowed. + * @param URL fully parsed URL describing the feature which should be dispatched (=executed) + * @param Arguments optional arguments for this request (see {@link com.sun.star.document.MediaDescriptor} ) They depend on the real implementation of the + */ + dispatch(URL: util.URL, Arguments: LibreOffice.SeqEquiv): void; + + /** + * unregisters a listener from a control. + * @param Control listener that wishes to be unregistered + * @param URL URL the listener was registered for. Additional arguments ("#..." or "?...") will be ignored. + * @see XStatusListener + * @see XDispatch.addStatusListener() + */ + removeStatusListener(Control: XStatusListener, URL: util.URL): void; + } + + /** + * provides an easy way to dispatch functions useful at UI level. + * @see XDispatch + * @since OOo 1.1.2 + */ + interface XDispatchHelper extends uno.XInterface { + /** + * executes the dispatch. + * + * Listeners are not supported here! + * @param DispatchProvider points to the provider, which should be asked for valid dispatch objects + * @param URL describes the feature which should be supported by internally used dispatch object + * @param TargetFrameName specifies the frame which should be the target for this request + * @param SearchFlags optional search parameter for finding the frame if no special **TargetFrameName** was used + * @param Arguments optional arguments for this request They depend on the real implementation of the dispatch object. + * @returns A possible result of the executed internal dispatch. The information behind this `any` depends on the dispatch! + * @see XDispatch.dispatch() + */ + executeDispatch(DispatchProvider: XDispatchProvider, URL: string, TargetFrameName: string, SearchFlags: number, Arguments: LibreOffice.SeqEquiv): any; + } + + /** + * provides information about supported commands + * + * This interface can be used to retrieve additional information about supported commands. This interface is normally used by configuration + * implementations to retrieve all supported commands. A dispatch information provider is normally supported by a {@link Frame} service. + * @see Frame + * @since OOo 2.0 + */ + interface XDispatchInformationProvider extends uno.XInterface { + /** + * returns additional information about supported commands of a given command group. + * @param CommandGroup specifies a command group. + * @returns name and group name of every command supported. A group ID which is not supported returns an empty com::sun::star::uno::Sequence. + */ + getConfigurableDispatchInformation(CommandGroup: number): SafeArray; + + /** + * returns all supported command groups. + * @returns a sequence of supported command groups. + * @see CommandGroup + */ + getSupportedCommandGroups(): SafeArray; + + /** + * returns all supported command groups. + * @returns a sequence of supported command groups. + * @see CommandGroup + */ + readonly SupportedCommandGroups: SafeArray; + } + + /** + * provides {@link XDispatch} interfaces for certain functions which are useful at the UI. + * @see XDispatch + */ + interface XDispatchProvider extends uno.XInterface { + /** + * searches for an {@link XDispatch} for the specified URL within the specified target frame. + * @param URL describe the feature which should be supported by returned dispatch object + * @param TargetFrameName specify the frame which should be the target for this request + * @param SearchFlags optional search parameter for finding the frame if no special **TargetFrameName** was used + * @returns the dispatch object which provides queried functionality ; or `NULL` if no dispatch object is available + * @see XFrame.findFrame() + * @see XDispatchProvider.queryDispatches() + */ + queryDispatch(URL: util.URL, TargetFrameName: string, SearchFlags: number): XDispatch; + + /** + * actually this method is redundant to {@link XDispatchProvider.queryDispatch()} to avoid multiple remote calls. + * @param Requests list of dispatch requests + * @returns multiple dispatch interfaces for the specified descriptors at once It's not allowed to pack it - because every request must match to his real re + */ + queryDispatches(Requests: LibreOffice.SeqEquiv): SafeArray; + } + + /** + * makes it possible to register an {@link XDispatchProvider} which intercepts all requests of {@link XDispatch} to this instance. + * + * Note: Nobody can guarantee order of used interceptor objects if more than ones exist. Later registered ones will be used at first. But it's possible + * to increase the chance for that by providing the optional interface {@link XInterceptorInfo} . + * @see XDispatchProvider + * @see XDispatch + * @see XInterceptorInfo + */ + interface XDispatchProviderInterception extends uno.XInterface { + /** + * registers an {@link XDispatchProviderInterceptor} , which will become the first interceptor in the chain of registered interceptors. + * @param Interceptor the interceptor which wishes to be registered + * @see XDispatchProviderInterception.releaseDispatchProviderInterceptor() + */ + registerDispatchProviderInterceptor(Interceptor: XDispatchProviderInterceptor): void; + + /** + * removes an {@link XDispatchProviderInterceptor} which was previously registered + * + * The order of removals is arbitrary. It is not necessary to remove the last registered interceptor first. + * @param Interceptor the interceptor which wishes to be unregistered + * @see XDispatchProviderInterception.registerDispatchProviderInterceptor() + */ + releaseDispatchProviderInterceptor(Interceptor: XDispatchProviderInterceptor): void; + } + + /** + * makes it possible to intercept request of {@link XDispatch} . + * + * Can be registered as an interceptor by using interface {@link XDispatchProviderInterception} . + * @see XDispatchProviderInterception + */ + interface XDispatchProviderInterceptor extends XDispatchProvider { + /** + * access to the master {@link XDispatchProvider} of this interceptor + * @returns the master of this interceptor + * @see XDispatchProviderInterceptor.setMasterDispatchProvider() + */ + getMasterDispatchProvider(): XDispatchProvider; + + /** + * access to the slave {@link XDispatchProvider} of this interceptor + * @returns the slave of this interceptor + * @see XDispatchProviderInterceptor.setSlaveDispatchProvider() + */ + getSlaveDispatchProvider(): XDispatchProvider; + + /** + * access to the master {@link XDispatchProvider} of this interceptor + * @returns the master of this interceptor + * @see XDispatchProviderInterceptor.setMasterDispatchProvider() + */ + MasterDispatchProvider: XDispatchProvider; + + /** + * sets the master {@link XDispatchProvider} , which may forward calls to its {@link XDispatchProvider.queryDispatch()} to this dispatch provider. + * @param NewSupplier the master of this interceptor + * @see XDispatchProviderInterceptor.getMasterDispatchProvider() + */ + setMasterDispatchProvider(NewSupplier: XDispatchProvider): void; + + /** + * sets the slave {@link XDispatchProvider} to which calls to {@link XDispatchProvider.queryDispatch()} can be forwarded under control of this dispatch + * provider. + * @param NewDispatchProvider the new slave of this interceptor + * @see XDispatchProviderInterceptor.getSlaveDispatchProvider() + */ + setSlaveDispatchProvider(NewDispatchProvider: XDispatchProvider): void; + + /** + * access to the slave {@link XDispatchProvider} of this interceptor + * @returns the slave of this interceptor + * @see XDispatchProviderInterceptor.setSlaveDispatchProvider() + */ + SlaveDispatchProvider: XDispatchProvider; + } + + /** + * provides recording functionality of dispatches + * + * With such recorder it will be possible to record requests of type {@link XDispatch} by using additional interface {@link XRecordableDispatch} . The + * result of that will be a a script which can be used to start the dispatch at later time again. Such recorder objects are available on a {@link + * XDispatchRecorderSupplier} which is provided by the {@link Frame} service. + * @see Frame + * @see XDispatchRecorderSupplier + * @since OOo 1.1.2 + */ + interface XDispatchRecorder extends uno.XInterface { + /** + * stops the recording process + * + * Must be called in pairs with {@link XDispatchRecorder.startRecording()} . + * @see getRecordedMacro() + */ + endRecording(): void; + + /** + * returns the recorded source code + * + * This method must be used before {@link endRecording()} is called! Otherwise the macro will be released. + * @returns the recorded data as a string which can be interpreted as a script + */ + getRecordedMacro(): string; + + /** + * records a single dispatch call identified by its command URL + * @param URL the full parsed command URL + * @param Arguments optional arguments for the command URL ; (see {@link com.sun.star.document.MediaDescriptor} for further information) + */ + recordDispatch(URL: util.URL, Arguments: LibreOffice.SeqEquiv): void; + + /** + * records a single dispatch call identified by its command URL, but comments it out + * + * This way calls that failed on execution can be documented. + * @param URL the full parsed command URL + * @param Arguments optional arguments for the command URL ; (see {@link com.sun.star.document.MediaDescriptor} for further information) + */ + recordDispatchAsComment(URL: util.URL, Arguments: LibreOffice.SeqEquiv): void; + + /** + * returns the recorded source code + * + * This method must be used before {@link endRecording()} is called! Otherwise the macro will be released. + * @returns the recorded data as a string which can be interpreted as a script + */ + readonly RecordedMacro: string; + + /** + * initializes the recorder by passing the frame for which all macro statements shall be recorded + * @param Frame it includes the document on which such requests shall be recorded + */ + startRecording(Frame: XFrame): void; + } + + /** + * provides access to the record mechanism of dispatches + * + * With a {@link XDispatchRecorder} it's possible to record calls of {@link XDispatch.dispatch()} . The recorded data (may a script) can be used to + * automate recorded dispatch and start it at later time again. This supplier provides access to the recorder and supports some functionality to work + * with the macro recording mechanism in an easy manner. + * @see XDispatchRecorder + * @since OOo 1.1.2 + */ + interface XDispatchRecorderSupplier extends uno.XInterface { + /** + * dispatch given URL and record it if recording is enabled + * + * Parameter **Dispatcher** is used internally to make the dispatch. If recording isn't enabled it will be a normal {@link XDispatch.dispatch()} call. + * Otherwise follow algorithm is used: If **Dispatcher** doesn't support the interface {@link XRecordableDispatch} a normal dispatch() call will be made + * and depend from the result state of that the request will be recorded. In this case it's possible to record the incoming parameter ( **URL** and + * **Arguments** ) only. Parameters of internal processes can't be recorded then and will be lost.If **Dispatcher** support the interface {@link + * XRecordableDispatch} it will be used to dispatch and record all necessary parameters of the whole process. + * @see XRecordableDispatch + */ + dispatchAndRecord(URL: util.URL, Arguments: LibreOffice.SeqEquiv, Dispatcher: XDispatch): void; + + /** + * provides access on the recorder of this supplier + * + * Returned recorder can be used to record dispatches manually or to get recorded data for further using e.g. saving. He is internally used too due to + * the method {@link XDispatchRecorderSupplier.dispatchAndRecord()} . + * @returns the dispatch recorder of this supplier + * @see XDispatchRecorder + */ + DispatchRecorder: XDispatchRecorder; + + /** + * provides access on the recorder of this supplier + * + * Returned recorder can be used to record dispatches manually or to get recorded data for further using e.g. saving. He is internally used too due to + * the method {@link XDispatchRecorderSupplier.dispatchAndRecord()} . + * @returns the dispatch recorder of this supplier + * @see XDispatchRecorder + */ + getDispatchRecorder(): XDispatchRecorder; + + /** + * set a dispatch recorder on this supplier + * + * Setting of a new recorder make it possible to change recording mode. May there can exist different implementations of a recorder (e.g. to generate + * Java, Basic or other formats). Changing between local recording inside one {@link Frame} or global one by using more than ones can be forced too. + * @param Recorder the new recorder for this supplier + */ + setDispatchRecorder(Recorder: XDispatchRecorder): void; + } + + /** + * listener for results of {@link XNotifyingDispatch.dispatchWithNotification()} + * @see XNotifyingDispatch + */ + interface XDispatchResultListener extends lang.XEventListener { + /** + * indicates finished dispatch + * @param Result contains the result of the dispatch action + * @see DispatchResultEvent + */ + dispatchFinished(Result: DispatchResultEvent): void; + } + + /** + * provides a high level API to organize document templates + * + * Template information are saved as links to the original content and organized in groups. This data should be persistent and can be updated by calling + * special method {@link XDocumentTemplates.update()} . A real implementation of this interface can do that on top of an ucb content provider. Method + * {@link XDocumentTemplates.getContent()} force that. + */ + interface XDocumentTemplates extends uno.XInterface { + /** + * creates a new group + * @param GroupName the name of the group to be created + * @returns `TRUE` if operation was successful ; `FALSE` otherwise + */ + addGroup(GroupName: string): boolean; + + /** + * creates the template with the given name in the given group using the given URL + * @param GroupName specifies the group + * @param TemplateName specifies the template + * @param SourceURL specifies the position of template + * @returns `TRUE` if operation was successful ; `FALSE` otherwise + * @see XDocumentTemplates.storeTemplate() + */ + addTemplate(GroupName: string, TemplateName: string, SourceURL: string): boolean; + + /** + * provides access to the root of internal used hierarchy + * + * This content can be used for accessing the groups directly. + * @returns the ucb content for template configuration + */ + readonly Content: ucb.XContent; + + /** + * provides access to the root of internal used hierarchy + * + * This content can be used for accessing the groups directly. + * @returns the ucb content for template configuration + */ + getContent(): ucb.XContent; + + /** + * remove an existing group + * @param GroupName the name of the group to be removed + * @returns `TRUE` if operation was successful ; `FALSE` otherwise + */ + removeGroup(GroupName: string): boolean; + + /** + * remove a template from specified group + * @param GroupName specifies the group which include the template + * @param TemplateName specifies the template for delete + * @returns `TRUE` if operation was successful ; `FALSE` otherwise + */ + removeTemplate(GroupName: string, TemplateName: string): boolean; + + /** + * rename an existing group + * @param OldGroupName the old name of the group + * @param NewGroupName the new name of the group + * @returns `TRUE` if operation was successful ; `FALSE` otherwise + */ + renameGroup(OldGroupName: string, NewGroupName: string): boolean; + + /** + * rename a template inside specified group + * @param GroupName specifies the group which include the template + * @param OldTemplateName specifies the template for renaming + * @param NewTemplateName specifies the new name for the template + * @returns `TRUE` if operation was successful ; `FALSE` otherwise + */ + renameTemplate(GroupName: string, OldTemplateName: string, NewTemplateName: string): boolean; + + /** + * creates the template with the given name in the given group using the data from the storable + * @param GroupName specifies the group + * @param TemplateName specifies the template + * @param Storable specifies the target + * @returns `TRUE` if operation was successful ; `FALSE` otherwise + * @see XDocumentTemplates.addTemplate() + */ + storeTemplate(GroupName: string, TemplateName: string, Storable: XStorable): boolean; + + /** + * force an update for internal structures + * + * Because the templates are well known by links and not as direct content they can be outdated. An update force actualization of that to find wrong + * links. + */ + update(): void; + } + + /** + * use {@link com.sun.star.document.XExtendedFilterDetection} instead of this + * @deprecated Deprecated + */ + interface XExtendedFilterDetection extends uno.XInterface { + /** + * use {@link com.sun.star.document.XExtendedFilterDetection.detect()} instead of this + * @deprecated Deprecated + */ + detect(URL: string, Argumentlist: LibreOffice.SeqEquiv): string; + } + + /** + * use {@link com.sun.star.document.XExtendedFilterDetection} instead of this + * @deprecated Deprecated + */ + interface XFilterDetect extends uno.XInterface { + getContentType(URL: string): string; + useExternBrowser(URL: string): boolean; + } + + /** + * a frame object can be considered to be an "anchor" object where a component can be attached to. + * + * A frame can be (it's not a must!) a part of a frame tree. If not this frame won't be accessible by using the API. This mode make sense for previews. + * The root node of the tree can be a {@link Desktop} implementation. + * @see Desktop + */ + interface XFrame extends lang.XComponent { + /** + * activates this frame and thus the component within. + * + * At first the frame sets itself as the active frame of its creator by calling {@link XFramesSupplier.setActiveFrame()} , then it broadcasts an {@link + * FrameActionEvent} with FrameAction::FRAME_ACTIVATED. The component within this frame may listen to this event to grab the focus on activation; for + * simple components this can be done by the {@link FrameLoader} . + * + * Finally, most frames may grab the focus to one of its windows or forward the activation to a sub-frame. + * @see XFrame.deactivate() + * @see XFrame.isActive() + */ + activate(): void; + + /** + * registers an event listener, which will be called when certain things happen to the components within this frame or within sub-frames of this frame. + * + * E.g., it is possible to determine instantiation/destruction and activation/deactivation of components. + * @param xListener specifies the listener which will be informed + * @see XFrame.removeFrameActionListener() + */ + addFrameActionListener(xListener: XFrameActionListener): void; + + /** + * provides access to the component window + * + * Note: Don't dispose this window - the frame is the owner of it. + * @returns the current visible component in this frame ; or `NULL` if no one currently exist + * @see XFrame.setComponent() + */ + readonly ComponentWindow: awt.XWindow; + + /** + * provides access to the container window of the frame. + * + * Normally this is used as the parent window of the component window. + * @returns the container window of this frame + * @see XFrame.initialize() + */ + readonly ContainerWindow: awt.XWindow; + + /** + * notifies the frame that the context of the controller within this frame changed (i.e. the selection). + * + * According to a call to this interface, the frame calls {@link XFrameActionListener.frameAction()} with FrameAction::CONTEXT_CHANGED to all listeners + * which are registered using {@link XFrame.addFrameActionListener()} . For external controllers this event can be used to requery dispatches. + * @see XFrameEventListener + * @see FrameAction + * @see XFrame.addFrameActionListener() + */ + contextChanged(): void; + + /** + * provides access to the controller + * + * Note: Don't dispose it - the frame is the owner of it. Use {@link XController.getFrame()} to dispose the frame after you the controller agreed with a + * {@link XController.suspend()} call. + * @returns the current controller within this frame ; or `NULL` if no one currently exist + * @see XFrame.setComponent() + */ + readonly Controller: XController; + + /** + * provides access to the creator (parent) of this frame + * @returns the frame container that created and contains this frame. + * @see XFrame.setCreator() + */ + Creator: XFramesSupplier; + + /** + * is called by the creator frame when another sub-frame gets activated. + * + * At first the frame deactivates its active sub-frame, if any. Then broadcasts a {@link FrameActionEvent} with FrameAction::FRAME_DEACTIVATING. + * @see XFrame.activate() + * @see XFrame.isActive() + */ + deactivate(): void; + + /** + * searches for a frame with the specified name. + * + * Frames may contain other frames (e.g., a frameset) and may be contained in other frames. This hierarchy is searched with this method. First some + * special names are taken into account, i.e. "", "_self", "_top", "_blank" etc. **SearchFlags** is ignored when comparing these names with + * **TargetFrameName** ; further steps are controlled by **SearchFlags** . If allowed, the name of the frame itself is compared with the desired one, and + * then ( again if allowed ) the method is called for all children of the frame. Finally may be called for the siblings and then for parent frame (if + * allowed). + * + * List of special target names: {{table here, see documentation}} + * + * If no frame with the given name is found, a new top frame is created; if this is allowed by a special flag {@link FrameSearchFlag.CREATE} . The new + * frame also gets the desired name. + * @param aTargetFrameName identify (a) a special target ("_blank","_self" ...) or(b) any well known frame to search it inside the current hierarchy + * @param nSearchFlags optional parameter to regulate search if no special target was used for **TargetFrameName** + * @see FrameSearchFlag + */ + findFrame(aTargetFrameName: string, nSearchFlags: number): XFrame; + + /** + * provides access to the component window + * + * Note: Don't dispose this window - the frame is the owner of it. + * @returns the current visible component in this frame ; or `NULL` if no one currently exist + * @see XFrame.setComponent() + */ + getComponentWindow(): awt.XWindow; + + /** + * provides access to the container window of the frame. + * + * Normally this is used as the parent window of the component window. + * @returns the container window of this frame + * @see XFrame.initialize() + */ + getContainerWindow(): awt.XWindow; + + /** + * provides access to the controller + * + * Note: Don't dispose it - the frame is the owner of it. Use {@link XController.getFrame()} to dispose the frame after you the controller agreed with a + * {@link XController.suspend()} call. + * @returns the current controller within this frame ; or `NULL` if no one currently exist + * @see XFrame.setComponent() + */ + getController(): XController; + + /** + * provides access to the creator (parent) of this frame + * @returns the frame container that created and contains this frame. + * @see XFrame.setCreator() + */ + getCreator(): XFramesSupplier; + + /** + * access to the name property of this frame + * @returns the programmatic name of this frame. + * @see XFrame.setName() + */ + getName(): string; + + /** + * is called to initialize the frame within a window - the container window. + * + * This window will be used as parent for the component window and to support some UI relevant features of the frame service. Note: Re-parenting mustn't + * supported by a real frame implementation! It's designed for initializing - not for setting. + * + * This frame will take over ownership of the window referred from **xWindow** . Thus, the previous owner is not allowed to dispose this window anymore. + * @param xWindow the new container window + * @see XFrame.getContainerWindow() + */ + initialize(xWindow: awt.XWindow): void; + + /** + * determines if the frame is active. + * @returns `TRUE` for active or UI active frames ; `FALSE` otherwise + * @see XFrame.activate() + * @see XFrame.deactivate() + */ + isActive(): boolean; + + /** + * determines if the frame is a top frame. + * + * In general a top frame is the frame which is a direct child of a task frame or which does not have a parent. Possible frame searches must stop the + * search at such a frame unless the flag {@link FrameSearchFlag.TASKS} is set. + * @returns `TRUE` if frame supports top frame specification ; `FALSE` otherwise + */ + isTop(): boolean; + + /** + * access to the name property of this frame + * @returns the programmatic name of this frame. + * @see XFrame.setName() + */ + Name: string; + + /** + * unregisters an event listener + * @param xListener specifies the listener which won't be informed any longer + * @see XFrame.addFrameActionListener() + */ + removeFrameActionListener(xListener: XFrameActionListener): void; + + /** + * sets a new component into the frame or release an existing one from a frame. + * @param xComponentWindow the window of the new component or `NULL` for release A valid component window should be a child of the frame container window. + * @param xController the controller of the new component or `NULL` for release Simple components may implement a {@link com.sun.star.awt.XWindow} only. I + * @returns `TRUE` if setting of new component or release of an existing one was successfully ; `FALSE` otherwise (especially, if an existing controller disa + * @see XFrame.getComponentWindow() + * @see XFrame.getContainerWindow() + * @see XFrame.getController() + */ + setComponent(xComponentWindow: awt.XWindow, xController: XController): boolean; + + /** + * sets the frame container that created this frame. + * + * Only the creator is allowed to call this method. But creator doesn't mean the implementation which creates this instance ... it means the parent frame + * of the frame hierarchy. Because; normally a frame should be created by using the API and is necessary for searches inside the tree (e.g. {@link + * XFrame.findFrame()} ) + * @param Creator the creator (parent) of this frame + * @see XFrame.getCreator() + */ + setCreator(Creator: XFramesSupplier): void; + + /** + * sets the name of the frame. + * + * Normally the name of the frame is set initially (e.g. by the creator). The name of a frame will be used for identifying it if a frame search was + * started. These searches can be forced by: {@link XFrame.findFrame()}{@link XDispatchProvider.queryDispatch()}{@link + * XComponentLoader.loadComponentFromURL()} Note: Special targets like "_blank", "_self" etc. are not allowed. That's why frame names shouldn't start + * with a sign "_". + * @param aName the new programmatic name of this frame + * @see XFrame.findFrame() + * @see XFrame.getName() + * @see XDispatchProvider + * @see XComponentLoader + */ + setName(aName: string): void; + } + + /** @since LibreOffice 4.1 */ + interface XFrame2 extends XDispatchProvider, XDispatchInformationProvider, XDispatchProviderInterception, XFramesSupplier, task.XStatusIndicatorFactory { + /** + * provides access to the dispatch recorder of the frame + * + * Such recorder can be used to record dispatch requests. The supplier contains a dispatch recorder and provide the functionality to use it for any + * dispatch object from outside which supports the interface {@link XDispatch} . A supplier is available only, if recording was enabled. That means: if + * someone wishes to enable recoding on a frame he must set a supplier with a recorder object inside of it. Every user of dispatches has to check then if + * such supplier is available at this frame property. If value of this property is `NULL` he must call {@link XDispatch.dispatch()} on the original + * dispatch object. If it's a valid value he must use the supplier by calling his method {@link XDispatchRecorderSupplier.dispatchAndRecord()} with the + * original dispatch object as argument. + * + * Note: ; It's not recommended to cache an already gotten supplier. Because there exist no possibility to check for enabled/disabled recording then. + * @since OOo 1.1.2 + */ + DispatchRecorderSupplier: XDispatchRecorderSupplier; + + /** + * Provides access to the {@link LayoutManager} of the frame. This is actually of type {@link XLayoutManager} , but this API is still experimental + * (unpublished). + */ + LayoutManager: uno.XInterface; + + /** + * if possible it sets/gets the UI title on/from the frame container window + * + * It depends from the type of the frame container window. If it is a system task window all will be OK. Otherwise the title can't be set. + * Setting/getting of the pure value of this property must be possible in every case. Only showing on the UI can be fail. + */ + Title: string; + + /** contains user defined attributes. */ + UserDefinedAttributes: container.XNameContainer; + } + + /** + * has to be provided if an object wants to receive events when several things happen to components within frames of the desktop frame tree. + * + * E.g., you can receive events of instantiation/destruction and activation/deactivation of components. + * @see XFrame.addFrameActionListener() + * @see XFrame.removeFrameActionListener() + */ + interface XFrameActionListener extends lang.XEventListener { + /** + * is called whenever any action occurs to a component within a frame. + * @param Action describes the detected frame action for which the listener can react + */ + frameAction(Action: FrameActionEvent): void; + } + + /** + * load components into a frame + * + * It's an asynchronous loading. For synchronous processes use {@link XSynchronousFrameLoader} instead of this one. The generic load algorithm of the + * office supports both ones - but preferred the synchronous interface. + * @see XFrame + */ + interface XFrameLoader extends uno.XInterface { + /** + * cancels the loading process. + * + * After returning from this call, neither the frame nor the load-event-listener specified in {@link XFrameLoader.load()} may be called back. Because + * only the owner of this process who called load method before can cancel this process. And he doesn't need any notification about that. On the other + * hand - nobody then this owner himself can be registered as an {@link XLoadEventListener} here. + */ + cancel(): void; + + /** + * starts the loading of the specified resource into the specified {@link Frame} . + * @param Frame specifies the loading target + * @param URL describes the resource of loading component Support of special protocols are implementation details and depends from the environment. + * @param Arguments optional arguments for loading (see {@link com.sun.star.document.MediaDescriptor} for further information) + * @param Listener this listener will be informed about success + * @see XLoadEventListener + */ + load(Frame: XFrame, URL: string, Arguments: LibreOffice.SeqEquiv, Listener: XLoadEventListener): void; + } + + /** + * use service {@link FrameLoaderFactory} instead of this + * @deprecated Deprecated + */ + interface XFrameLoaderQuery extends uno.XInterface { + /** + * use member {@link com.sun.star.container.XNameAccess.getElementNames()} provided by service {@link FrameLoaderFactory} instead of this + * @deprecated Deprecated + */ + readonly AvailableFilterNames: SafeArray; + + /** + * use member {@link com.sun.star.container.XNameAccess.getElementNames()} provided by service {@link FrameLoaderFactory} instead of this + * @deprecated Deprecated + */ + getAvailableFilterNames(): SafeArray; + + /** + * use member {@link com.sun.star.container.XNameAccess.getByName()} provided by service {@link FrameLoaderFactory} instead of this + * @deprecated Deprecated + */ + getLoaderProperties(sFilterName: string): SafeArray; + + /** + * use member {@link com.sun.star.container.XContainerQuery} provided by service {@link FrameLoaderFactory} instead of this + * @deprecated Deprecated + */ + searchFilter(sURL: string, seqArguments: LibreOffice.SeqEquiv): string; + } + + /** + * manages and creates frames. + * + * Frames may contain other frames (by implementing an {@link XFrames} interface) and may be contained in other frames. + * @see XFrame + * @see Frame + */ + interface XFrames extends container.XIndexAccess { + /** + * appends the specified {@link Frame} to the list of sub-frames. + * @param xFrame new frame for inserting into this container + */ + append(xFrame: XFrame): void; + + /** + * provides access to the list of all currently existing frames inside this container and her sub frames + * @param nSearchFlags use combinations of {@link FrameSearchFlag} to specify which frames should be found + * @returns all frames of this container and all available frames of the whole frame tree which match search parameter **SearchFlags** + */ + queryFrames(nSearchFlags: number): SafeArray; + + /** + * removes the frame from its container. + * + * Note: The method XComponent::dispose() is not called implicitly by this method.The creator attribute of the frame must be reset by the caller of this + * method. + * @param xFrame frame which should be removed from this container + */ + remove(xFrame: XFrame): void; + } + + /** + * use {@link XModel} instead of this + * @deprecated Deprecated + */ + interface XFrameSetModel extends uno.XInterface { + getSource(): string; + setSource(Source: string): void; + Source: string; + } + + /** + * provides access to sub frames of current one + * @see XFrames + */ + interface XFramesSupplier extends XFrame { + /** + * gets the current active frame of this container (not of any other available supplier) + * + * This may be the frame itself. The active frame is defined as the frame which contains (recursively) the window with the focus. If no window within the + * frame contains the focus, this method returns the last frame which had the focus. If no containing window ever had the focus, the first frame within + * this frame is returned. + * @returns the {@link Frame} which is active within this frame. + */ + ActiveFrame: XFrame; + + /** + * provides access to this container and to all other {@link XFramesSupplier} which are available from this node of frame tree + * @returns the collection of frames which is represented by a {@link FramesContainer} . + */ + readonly Frames: XFrames; + + /** + * gets the current active frame of this container (not of any other available supplier) + * + * This may be the frame itself. The active frame is defined as the frame which contains (recursively) the window with the focus. If no window within the + * frame contains the focus, this method returns the last frame which had the focus. If no containing window ever had the focus, the first frame within + * this frame is returned. + * @returns the {@link Frame} which is active within this frame. + */ + getActiveFrame(): XFrame; + + /** + * provides access to this container and to all other {@link XFramesSupplier} which are available from this node of frame tree + * @returns the collection of frames which is represented by a {@link FramesContainer} . + */ + getFrames(): XFrames; + + /** + * is called on activation of a direct sub-frame. + * + * This method is only allowed to be called by a sub-frame according to {@link XFrame.activate()} or {@link XFramesSupplier.setActiveFrame()} . After + * this call {@link XFramesSupplier.getActiveFrame()} will return the frame specified by **Frame** . + * + * In general this method first calls the method {@link XFramesSupplier.setActiveFrame()} at the creator frame with **this** as the current argument. + * Then it broadcasts the {@link FrameActionEvent} FrameAction::FRAME_ACTIVATED. + * + * Note: Given parameter **Frame** must already exist inside the container (e.g., inserted by using {@link XFrames.append()} ) + * @param Frame the new active child frame inside this container + */ + setActiveFrame(Frame: XFrame): void; + } + + /** + * Provides the unified interface of {@link theGlobalEventBroadcaster} singleton. + * @since LibreOffice 4.0 + */ + interface XGlobalEventBroadcaster extends document.XEventsSupplier, document.XDocumentEventBroadcaster, document.XEventBroadcaster, container.XSet, + document.XDocumentEventListener { } + + /** + * makes it possible to get information about a registered interceptor and is used by frame interceptor mechanism to perform interception. + * + * {@link Frame} can call right interceptor directly without calling all of registered ones. Use it as an additional interface to {@link + * XDispatchProviderInterceptor} . If any interceptor in list doesn't support this interface - these mechanism will be broken and normal list of + * master-slave interceptor objects will be used from top to the bottom. + * @see XDispatchProviderInterception + * @see XDispatchProviderInterceptor + */ + interface XInterceptorInfo extends uno.XInterface { + /** + * returns the URL list for interception. + * + * Wildcards inside the URLs are allowed to register the interceptor for URLs too, which can have optional arguments (e.g. "..#.." or "..?.."). + * @returns a list of URLs which are handled by this interceptor + */ + getInterceptedURLs(): SafeArray; + + /** + * returns the URL list for interception. + * + * Wildcards inside the URLs are allowed to register the interceptor for URLs too, which can have optional arguments (e.g. "..#.." or "..?.."). + * @returns a list of URLs which are handled by this interceptor + */ + readonly InterceptedURLs: SafeArray; + } + + /** + * central interface to query for, create, destroy and manipulate user interface elements which are bound to a layout manager. + * + * Every user interface element which is controlled by a layout manager has a unique identifier called resource URL. + * + * A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name. + * + * Currently the following user interface element types are defined: **menubar** A configurable user interface element representing a menu + * bar.**popupmenu** A configurable user interface element representing a pop-up menu.**toolbar** A configurable user interface element a tool + * bar.**statusbar** A configurable user interface element representing a status bar.**floater** A basic user interface element representing a floating + * window. + * @see com.sun.star.ui.UIElementTypes + * @see com.sun.star.frame.XFrame + * @since OOo 2.0 + */ + interface XLayoutManager extends uno.XInterface { + /** + * attaches a {@link com.sun.star.frame.XFrame} to a layout manager. + * @param Frame specifies the frame that should be attached to the layout manager A layout manager needs a {@link com.sun.star.frame.XFrame} to be able to + */ + attachFrame(Frame: XFrame): void; + + /** + * creates a new user interface element. + * @param ResourceURL specifies which user interface element should be created. A resource URL must meet the following syntax: "private:resource/$type/$nam + */ + createElement(ResourceURL: string): void; + + /** + * provides the current docking area size of the layout manager. + * @returns The {@link com.sun.star.awt.Rectangle} contains pixel values. The members of {@link com.sun.star.awt.Rectangle} are filled as following: X = dock + */ + readonly CurrentDockingArea: awt.Rectangle; + + /** + * destroys a user interface element. + * @param ResourceURL specifies which user interface element should be destroyed. A resource URL must meet the following syntax: "private:resource/$type/$n + */ + destroyElement(ResourceURL: string): void; + + /** + * docks all windows which are member of the provided user interface element type. + * @param nElementType specifies which user interface element type should be docked. + * @returns returns `TRUE` if all user interface elements of the requested type could be docked, otherwise `FALSE` will be returned. + * @see com.sun.star.ui.UIElementType + */ + dockAllWindows(nElementType: number): boolean; + + /** + * retrieves the current docking area acceptor that controls the border space of the frame's container window. + * @returns current docking area acceptor which controls the border space of frame's container window. A docking area acceptor retrieved by this method is o + */ + DockingAreaAcceptor: ui.XDockingAreaAcceptor; + + /** + * docks a window based user interface element to a specified docking area. + * @param ResourceURL specifies which user interface element should be docked. A resource URL must meet the following syntax: "private:resource/$type/$name + * @param DockingArea specifies on which docking area the window based user interface element should docked. + * @param Pos specifies the position inside the docking area. + * @returns returns `TRUE` if the user interface element has been docked, otherwise `FALSE` will be returned. + * @see com.sun.star.ui.DockingArea + */ + dockWindow(ResourceURL: string, DockingArea: ui.DockingArea, Pos: awt.Point): boolean; + + /** forces a complete new layouting of all user interface elements. */ + doLayout(): void; + + /** + * retrieves all user interface elements which are currently instantiated. + * @returns a sequence of user interface elements providing {@link com.sun.star.ui.XUIElement} interface. The layout manager instance is owner of the return + */ + readonly Elements: SafeArray; + + /** + * forces a window based user interface element to float. + * @param ResourceURL specifies which user interface element should be float. A resource URL must meet the following syntax: "private:resource/$type/$name" + * @returns returns `TRUE` if the user interface element has been docked, otherwise `FALSE` will be returned. + */ + floatWindow(ResourceURL: string): boolean; + + /** + * provides the current docking area size of the layout manager. + * @returns The {@link com.sun.star.awt.Rectangle} contains pixel values. The members of {@link com.sun.star.awt.Rectangle} are filled as following: X = dock + */ + getCurrentDockingArea(): awt.Rectangle; + + /** + * retrieves the current docking area acceptor that controls the border space of the frame's container window. + * @returns current docking area acceptor which controls the border space of frame's container window. A docking area acceptor retrieved by this method is o + */ + getDockingAreaAcceptor(): ui.XDockingAreaAcceptor; + + /** + * retrieves a user interface element which has been created before. + * @param ResourceURL specifies which user interface element should be retrieved. A resource URL must meet the following syntax: "private:resource/$type/$n + */ + getElement(ResourceURL: string): ui.XUIElement; + + /** + * retrieves the current pixel position of a window based user interface element. + * @param ResourceURL specifies for which user interface element the current position should be retrieved. A resource URL must meet the following syntax: " + * @returns the size in pixel of the user interface element. A non-window based user interface element provides a zero size. + */ + getElementPos(ResourceURL: string): awt.Point; + + /** + * retrieves all user interface elements which are currently instantiated. + * @returns a sequence of user interface elements providing {@link com.sun.star.ui.XUIElement} interface. The layout manager instance is owner of the return + */ + getElements(): SafeArray; + + /** + * retrieves the current size of a window based user interface element. + * @param ResourceURL specifies for which user interface element the current size should be retrieved. A resource URL must meet the following syntax: "priv + * @returns the size in pixel of the user interface element. A non-window based user interface element provides a zero size. + */ + getElementSize(ResourceURL: string): awt.Size; + + /** + * hides a user interface element. + * @param ResourceURL specifies which user interface element should be hidden. A resource URL must meet the following syntax: "private:resource/$type/$name + * @returns returns `TRUE` if the user interface element has been hidden, otherwise `FALSE` will be returned. + */ + hideElement(ResourceURL: string): boolean; + + /** + * retrieves the current docking state of a window based user interface element. + * @param ResourceURL specifies for which user interface element the docking state should be retrieved. A resource URL must meet the following syntax: "pri + * @returns `TRUE` if the user interface element is docked, otherwise `FALSE` . + */ + isElementDocked(ResourceURL: string): boolean; + + /** + * retrieves the current floating state of a window based user interface element. + * @param ResourceURL specifies for which user interface element the floating state should be retrieved. A resource URL must meet the following syntax: "pr + * @returns `TRUE` if the user interface element is floating, otherwise `FALSE` . + */ + isElementFloating(ResourceURL: string): boolean; + + /** + * retrieves the current lock state of a window based user interface element. + * @param ResourceURL specifies for which user interface element the lock state should be retrieved. A resource URL must meet the following syntax: "privat + * @returns `TRUE` if the user interface element is locked, otherwise `FALSE` . + */ + isElementLocked(ResourceURL: string): boolean; + + /** + * retrieves the current visibility state of a window based user interface element. + * @param ResourceURL specifies for which user interface element the visibility state should be retrieved. A resource URL must meet the following syntax: " + * @returns `TRUE` if the user interface element is visible, otherwise `FALSE` . + */ + isElementVisible(ResourceURL: string): boolean; + + /** + * retrieves the visibility state of a layout manager. + * + * A layout manager can be set to invisible state to force it to hide all of its user interface elements. If another component wants to use the window + * for its own user interface elements it can use this function. This function is normally used to implement inplace editing. + */ + isVisible(): boolean; + + /** + * prohibit all layout updates until unlock is called again. + * + * This call can be used to speed up the creation process of several user interface elements. Otherwise the layout manager would calculate the layout for + * every creation. + */ + lock(): void; + + /** + * locks a window based user interface element if it's in a docked state. + * @param ResourceURL specifies which user interface element should be locked. A resource URL must meet the following syntax: "private:resource/$type/$name + * @returns returns `TRUE` if the user interface element has been locked, otherwise `FALSE` will be returned. + */ + lockWindow(ResourceURL: string): boolean; + + /** + * request to make a user interface element visible if it is not in hidden state. + * @param ResourceURL specifies which user interface element should be made visible. A resource URL must meet the following syntax: "private:resource/$type + * @returns returns `TRUE` if the user interface element could be made visible, otherwise `FALSE` will be returned. If a user interface element should force + */ + requestElement(ResourceURL: string): boolean; + + /** + * resets the layout manager and remove all of its internal user interface elements. + * + * This call should be handled with care as all user interface elements will be destroyed and the layout manager is reseted to a state after a {@link + * attachFrame()} has been made. That means an attached frame which has been set by {@link attachFrame()} is not released. The layout manager itself + * calls reset after a component has been attached or reattached to a frame. + */ + reset(): void; + + /** + * sets a docking area acceptor that controls the border space of the frame's container window. + * @param xDockingAreaAcceptor a docking area acceptor which controls the border space of frame's container window. A docking area acceptor decides if the + */ + setDockingAreaAcceptor(xDockingAreaAcceptor: ui.XDockingAreaAcceptor): void; + + /** + * sets a new position for a window based user interface element. + * @param ResourceURL specifies which user interface element should be moved. A resource URL must meet the following syntax: "private:resource/$type/$name" + * @param Pos specifies the new position in pixel. It is up to the layout manager to decide if the user interface element can be moved. The new position c + */ + setElementPos(ResourceURL: string, Pos: awt.Point): void; + + /** + * sets a new position and size for a window based user interface element. + * @param ResourceURL specifies which user interface element should be moved and resized. A resource URL must meet the following syntax: "private:resource/ + * @param Pos specifies the new position in pixel. + * @param Size specifies the new position in pixel. It is up to the layout manager to decide if the user interface element can be moved and resized. The n + */ + setElementPosSize(ResourceURL: string, Pos: awt.Point, Size: awt.Size): void; + + /** + * sets a new size for a window based user interface element. + * @param ResourceURL specifies which user interface element should be resized. A resource URL must meet the following syntax: "private:resource/$type/$nam + * @param Size specifies the new size in pixel. It is up to the layout manager to decide if the user interface element can be resized. The new size can be + */ + setElementSize(ResourceURL: string, Size: awt.Size): void; + + /** + * sets the layout manager to invisible state and hides all user interface elements. + * + * A layout manager can be set to invisible state to force it to hide all of its user interface elements. If another component wants to use the window + * for its own user interface elements it can use this function. This function is normally used to implement inplace editing. + * @param Visible provide `FALSE` to make layout manager invisible otherwise this must be set to `TRUE` . + */ + setVisible(Visible: boolean): void; + + /** + * shows a user interface element. + * @param ResourceURL specifies which user interface element should be shown. A resource URL must meet the following syntax: "private:resource/$type/$name" + * @returns returns `TRUE` if the user interface element has been shown, otherwise `FALSE` will be returned. + */ + showElement(ResourceURL: string): boolean; + + /** + * permit layout updates again. + * + * This function should be called to permit layout updates. The layout manager starts to calculate the new layout after this call. + */ + unlock(): void; + + /** + * unlocks a window based user interface element if it's in a docked state. + * @param ResourceURL specifies which user interface element should be unlocked. A resource URL must meet the following syntax: "private:resource/$type/$na + * @returns returns `TRUE` if the user interface element has been unlocked, otherwise `FALSE` will be returned. + */ + unlockWindow(ResourceURL: string): boolean; + } + + /** + * Unified interface for {@link LayoutManager} service. + * @since LibreOffice 4.2 + */ + interface XLayoutManager2 extends XLayoutManager, XFrameActionListener, ui.XUIConfigurationListener, XMenuBarMergingAcceptor, XLayoutManagerEventBroadcaster { } + + /** + * makes it possible to receive events from a layout manager. + * @see com.sun.star.frame.LayoutManager + * @since OOo 2.0 + */ + interface XLayoutManagerEventBroadcaster extends uno.XInterface { + /** + * adds a layout manager event listener to the object's listener list. + * @param aLayoutManagerListener a listener that wants to receive events regarding user interface elements that are controlled by a layout manager. + */ + addLayoutManagerEventListener(aLayoutManagerListener: XLayoutManagerListener): void; + + /** + * removes a layout manager event listener from the object's listener list. + * @param aLayoutManagerListener a listener that don't want to receive events regarding user interface elements that are controlled by a layout manager. + */ + removeLayoutManagerEventListener(aLayoutManagerListener: XLayoutManagerListener): void; + } + + /** + * makes it possible to receive events from a layout manager. + * + * Events are provided **only** for notification purposes only. All operations are handled internally by the layout manager component, so that GUI layout + * works properly regardless of whether a component registers such a listener or not. + * @see com.sun.star.frame.LayoutManager + * @see com.sun.star.frame.LayoutManagerEvents + * @since OOo 2.0 + */ + interface XLayoutManagerListener extends lang.XEventListener { + /** + * is invoked when a layout manager has made a certain operation. + * @param aSource reference to the layout manager which invoked the event. + * @param eLayoutEvent identifies the layout event that has occurred. + * @param aInfo provides additional information about the event. The type of info depends on the event. + */ + layoutEvent(aSource: lang.EventObject, eLayoutEvent: number, aInfo: any): void; + } + + /** + * offers a simple way to initialize a component or load it from an URL. + * + * In case an object supports the interface the object must be initialized with either {@link initNew()} or {@link load()} call before any usage. In case + * the object is already initialized the mentioned methods should throw {@link DoubleInitializationException} . + * @since OOo 1.1.2 + */ + interface XLoadable extends uno.XInterface { + /** creates a component from scratch */ + initNew(): void; + + /** + * loads a component from an URL + * @param lArguments parameters for saving (see {@link com.sun.star.document.MediaDescriptor} for further details) the FileName parameter must be specified + */ + load(lArguments: LibreOffice.SeqEquiv): void; + } + + /** + * Unified service interface for {@link FrameLoaderFactory} and {@link ContentHandlerFactory} . + * @since LibreOffice 4.2 + */ + interface XLoaderFactory extends lang.XMultiServiceFactory, container.XNameAccess, container.XContainerQuery { } + + /** + * is used to receive callbacks from an asynchronous frame loader. + * @see XFrameLoader + */ + interface XLoadEventListener extends lang.XEventListener { + /** + * is called when a frame load is canceled or failed. + * @param Loader the source of this event + */ + loadCancelled(Loader: XFrameLoader): void; + + /** + * is called when a new component is loaded into a frame successfully. + * @param Loader the source of this event + */ + loadFinished(Loader: XFrameLoader): void; + } + + /** + * provides function to update a menu bar for inplace editing. + * @deprecated Deprecated + * @since OOo 2.0 + */ + interface XMenuBarAcceptor extends uno.XInterface { + /** + * update menu bar according to the current frame mode. This is used in inplace editing mode where we have to merge our own menu into the container + * applications menu. + * @param xMenuBar the menu bar that should be merged with current one. + */ + updateMenuBar(xMenuBar: [awt.XMenuBar]): void; + } + + /** + * provides functions to set and remove a merged menu bar for inplace editing. + * @since OOo 2.0 + */ + interface XMenuBarMergingAcceptor extends uno.XInterface { + /** removes a previously set merged menu bar and sets a previously created menu bar back. */ + removeMergedMenuBar(): void; + + /** + * allows to set a merged menu bar. + * @param xMergedMenuBar specifies the merged menu bar. This function is normally used to provide inplace editing where functions from two application par + * @see com.sun.star.ui.UIElementSettings + * @see com.sun.star.frame.XDispatchProvider + * @see com.sun.star.frame.XLayoutManager + */ + setMergedMenuBar(xMergedMenuBar: container.XIndexAccess): boolean; + } + + /** + * represents a component which is created from an URL and arguments. + * + * It is a representation of a resource in the sense that it was created/loaded from the resource. The arguments are passed to the loader to modify its + * behavior. An example for such an argument is "AsTemplate", which loads the resource as a template for a new document. (see {@link + * com.sun.star.document.MediaDescriptor} for further details) + * + * Models can be controlled by controller components, which are usually views of the model. (see {@link Controller} for further details) + * + * If there is at least one controller, there is by definition a current controller. And if that controller supports the interface {@link + * com.sun.star.view.XSelectionSupplier} , it has a current selection too. + * @see com.sun.star.document.MediaDescriptor + * @see Controller + * @see com.sun.star.view.XSelectionSupplier + */ + interface XModel extends lang.XComponent { + /** + * provides read access on currently representation of the {@link com.sun.star.document.MediaDescriptor} of this model which describes the model and his + * state + * @returns the arguments with which the model was originally created or stored the last time. + */ + readonly Args: SafeArray; + + /** + * informs a model about its resource description. + * @param URL specifies the resource + * @param Arguments are optional arguments for that resource (see {@link com.sun.star.document.MediaDescriptor} ) + * @returns `TRUE` for success ; `FALSE` otherwise + */ + attachResource(URL: string, Arguments: LibreOffice.SeqEquiv): boolean; + + /** + * is called whenever a new controller is created for this model. + * + * The {@link com.sun.star.lang.XComponent} interface of the controller must be used to recognize when it is deleted. + * @param Controller a new controller for this model + * @see XModel.disconnectController() + */ + connectController(Controller: XController): void; + + /** + * provides access to the controller which currently controls this model + * @returns If the controller which is active is a controller of this model, it will be returned. If not, the controller which was the last active of this mo + */ + CurrentController: XController; + + /** + * provides read access on current selection on controller + * @returns the current selection in the current controller. If there is no current controller, it returns `NULL` . + */ + readonly CurrentSelection: uno.XInterface; + + /** + * is called whenever an existing controller should be deregistered at this model. + * + * The {@link com.sun.star.lang.XComponent} interface of the controller must be used to recognize when it is deleted. + * @param Controller the existing controller which should be deregistered + * @see XModel.connectController() + */ + disconnectController(Controller: XController): void; + + /** + * provides read access on currently representation of the {@link com.sun.star.document.MediaDescriptor} of this model which describes the model and his + * state + * @returns the arguments with which the model was originally created or stored the last time. + */ + getArgs(): SafeArray; + + /** + * provides access to the controller which currently controls this model + * @returns If the controller which is active is a controller of this model, it will be returned. If not, the controller which was the last active of this mo + */ + getCurrentController(): XController; + + /** + * provides read access on current selection on controller + * @returns the current selection in the current controller. If there is no current controller, it returns `NULL` . + */ + getCurrentSelection(): uno.XInterface; + + /** + * provides information about the location of this model + * @returns the URL of the resource which is represented by this model. + * @see XStorable.getLocation() + */ + getURL(): string; + + /** + * determines if there is at least one lock remaining. + * + * While there is at least one lock remaining, some notifications for display updates are not broadcasted to the controllers. + * @returns `TRUE` if any lock exist ; `FALSE` otherwise + */ + hasControllersLocked(): boolean; + + /** + * suspends some notifications to the controllers which are used for display updates. + * + * The calls to {@link XModel.lockControllers()} and {@link XModel.unlockControllers()} may be nested and even overlapping, but they must be in pairs. + * While there is at least one lock remaining, some notifications for display updates are not broadcasted. + */ + lockControllers(): void; + + /** + * sets a registered controller as the current controller. + * @param Controller reference to an already existing connected controller, which should be the new active one + * @throws com::sun::star::container::NoSuchElementException if **xController** isn't an already connected controller on this model + */ + setCurrentController(Controller: XController): void; + + /** + * resumes the notifications which were suspended by {@link XModel.lockControllers()} . + * + * The calls to {@link XModel.lockControllers()} and {@link XModel.unlockControllers()} may be nested and even overlapping, but they must be in pairs. + * While there is at least one lock remaining, some notifications for display updates are not broadcasted. + */ + unlockControllers(): void; + + /** + * provides information about the location of this model + * @returns the URL of the resource which is represented by this model. + * @see XStorable.getLocation() + */ + readonly URL: string; + } + + /** + * extends interface {@link XModel} . + * + * The following functions are added: + * + * enumeration of all currently connected controller objects. (not {@link getCurrentController()} only, which depends on focus)establish new view + * controller factory methods, which will make it possible to create new views for this model. + */ + interface XModel2 extends XModel { + /** + * provides the available names of the factory to be used to create views. + * + * The names are usually logical view names. The following names have a defined meaning, i.e. every concrete implementation which returns such a name + * must ensure it has the same meaning, and if a concrete implementation has a view with the given meaning, it must give it the name as defined here: + * **Default** specifies the default view of the document.**Preview** specifies a preview of the document. A minimal implementation of such a view is a + * **Default** view which is read-only.**PrintPreview** specifies a print preview of the document. + * + * Implementations of this interface might decide to support additional view names, which then are documented in the respective service descriptions. + * @returns a sequence of names of all supported views for this document. + * @see createView + */ + readonly AvailableViewControllerNames: SafeArray; + + /** + * provides list of all currently connected controller objects. + * + * Please note: Because this interface will might be used inside multi threaded environments those list can contain still disposed items or it new added + * controller will be missing (if they was added after this enumeration was created). + * @returns list of controller objects. Enumeration can be empty but not NULL. + */ + readonly Controllers: container.XEnumeration; + + /** + * creates the default view instance for this model. + * + * Effectively, this method is equivalent to calling createView() with the `ViewName` being `"Default"` . + * @param Frame used to place the new created view there + * @returns the new view controller instance + * @throws com::sun::star::lang::IllegalArgumentException if one of the given parameter was wrong + * @throws com::sun::star::uno::Exception if creation of a new view failed by other reasons + */ + createDefaultViewController(Frame: XFrame): XController2; + + /** + * creates a new view instance classified by the specified name and arguments. + * + * The newly created controller must not be connected with the document and the frame. That is, you should neither call {@link XFrame.setComponent()} , + * nor {@link XController.attachFrame()} , nor {@link XController.attachModel()} , nor {@link XModel.connectController()} , not {@link + * XModel.setCurrentController()} . All of this is the responsibility of the caller, which will do it in the proper order. + * @param ViewName classified name of instance + * @param Arguments arguments used for creation + * @param Frame used to place the new created view there + * @returns the new view controller instance + * @throws com::sun::star::lang::IllegalArgumentException if one of the given parameter was wrong + * @throws com::sun::star::uno::Exception if creation of a new view failed by other reasons + */ + createViewController(ViewName: string, Arguments: LibreOffice.SeqEquiv, Frame: XFrame): XController2; + + /** + * provides the available names of the factory to be used to create views. + * + * The names are usually logical view names. The following names have a defined meaning, i.e. every concrete implementation which returns such a name + * must ensure it has the same meaning, and if a concrete implementation has a view with the given meaning, it must give it the name as defined here: + * **Default** specifies the default view of the document.**Preview** specifies a preview of the document. A minimal implementation of such a view is a + * **Default** view which is read-only.**PrintPreview** specifies a print preview of the document. + * + * Implementations of this interface might decide to support additional view names, which then are documented in the respective service descriptions. + * @returns a sequence of names of all supported views for this document. + * @see createView + */ + getAvailableViewControllerNames(): SafeArray; + + /** + * provides list of all currently connected controller objects. + * + * Please note: Because this interface will might be used inside multi threaded environments those list can contain still disposed items or it new added + * controller will be missing (if they was added after this enumeration was created). + * @returns list of controller objects. Enumeration can be empty but not NULL. + */ + getControllers(): container.XEnumeration; + } + + /** + * can be used to overrule identification of office modules. + * + * Normally an office module will be identified by its service name in combination with a set of configuration data. But sometimes whole existing office + * modules will be used as black box components to implement a different office module on top of it. Patching a service name is not possible. So this + * optional interface can be used to overwrite identification of a module. + * @see XModuleManager + * @since OOo 2.3 + */ + interface XModule extends uno.XInterface { + /** @returns the module identifier. */ + getIdentifier(): string; + + /** @returns the module identifier. */ + Identifier: string; + + /** @param Identifier a new "name" for this module. */ + setIdentifier(Identifier: string): void; + } + + /** + * can be used to identify office modules. + * @since OOo 2.0 + */ + interface XModuleManager extends uno.XInterface { + /** + * This identifier can then be used at the service {@link ModuleManager} to get more information about this module. + * + * For identification the interface {@link com.sun.star.lang.XServiceInfo} is requested on the given module. Because all module service registrations + * must be unique this value can be queried and checked against the configuration. + * + * Since OOo 2.3.0 also the optional interface {@link XModule} will be used. If its exists it will be preferred. + * @param Module Possible objects for this parameter can be the following one: **com::sun::star::frame::XFrame**; A frame contains (against a component wi + * @returns An identifier for the given module. Note: This value varies every time. Error will be transported by thrown exceptions! + * @throws com::sun::star::lang::IllegalArgumentException if the parameter Module is: an empty oneor does not provide one of the needed interface {@link XFr + * @throws UnknownModuleException if the given module could not be identified. Note: If the module represent a {@link XFrame} instance with does not contain + */ + identify(Module: uno.XInterface): string; + } + + /** + * This interface provides a merged single interface for the {@link ModuleManager} service to implement. + * @since LibreOffice 4.0 + */ + interface XModuleManager2 extends XModuleManager, container.XNameReplace { } + + /** + * dispatch with guaranteed notify (instead of {@link XDispatch} ) + * @see XDispatch + * @see XStatusListener + */ + interface XNotifyingDispatch extends XDispatch { + /** + * Do the same like {@link XDispatch.dispatch()} but notifies listener in every case. Should be used if result must be known. + * @param URL full parsed URL describes the feature which should be dispatched (executed) + * @param Arguments optional arguments for this request (see {@link com.sun.star.document.MediaDescriptor} ) + * @param Listener optional listener for guaranteed notifications of this request + */ + dispatchWithNotification(URL: util.URL, Arguments: LibreOffice.SeqEquiv, Listener: XDispatchResultListener): void; + } + + /** + * provides data to a pop-up menu controller implementation to fill and update a pop-up menu dynamically. + * + * A pop-up menu controller gets a {@link com.sun.star.awt.XPopupMenu} from its parent menu implementation. The controller has to fill this pop-up menu + * with a set of menu items and/or sub menus. The parent menu implementation briefs the controller whenever the pop-up menu gets activated by a user. + * @since OOo 2.0 + */ + interface XPopupMenuController extends uno.XInterface { + /** + * provides a {@link com.sun.star.awt.XPopupMenu} to a pop-up menu controller implementation. The controller must fill this pop-up menu with its + * functions. + * @param PopupMenu An empty pop-up menu that must be filled by the pop-up menu controller. + */ + setPopupMenu(PopupMenu: awt.XPopupMenu): void; + + /** + * briefs the pop-up menu controller to update the contents of the provided pop-up menu to reflect the current state. + * + * A controller should **never** update the pop-up menu structure on its own to prevent performance problems. A better way would be that a controller + * registers itself as status listener to for a command URL and immediately deregister after that. Therefore status updates will not be send regularly + * for a non visible pop-up menu. + */ + updatePopupMenu(): void; + } + + /** + * extends an existing {@link XDispatch} implementation with functionality for dispatch recording + * + * This interface can be implemented as an additional one beside an existing {@link XDispatch} one to provide record functionality of dispatches. Because + * it's an additional interface the status events are available there and not at this interface. + * + * But normally this interface mustn't be used directly. If a dispatch object is well known and recording was enabled on a {@link + * XDispatchRecorderSupplier} it's possible to use method {@link XDispatchRecorderSupplier.dispatchAndRecord()} of it to make dispatch and recording + * automatically. The interface {@link XRecordableDispatch} is used transparently there. + * + * {{program example here, see documentation}} + * @see XDispatchRecorderSupplier + * @see XDispatch + * @since OOo 1.1.2 + */ + interface XRecordableDispatch extends uno.XInterface { + /** + * dispatch and record it + * @param URL full parsed URL which describe the feature which should be dispatched (executed) + * @param Arguments optional arguments for this request (see {@link com.sun.star.document.MediaDescriptor} for details) + * @param Recorder object which can be used to record the request (available on {@link XDispatchRecorderSupplier.getDispatchRecorder()} ) + */ + dispatchAndRecord(URL: util.URL, Arguments: LibreOffice.SeqEquiv, Recorder: XDispatchRecorder): void; + } + + /** Connect to a session manager to get information about pending desktop shutdown */ + interface XSessionManagerClient extends uno.XInterface { + /** + * addSessionManagerListener registers a listener for session management events + * @param xListener listener for session management events + * @see XSessionManagerListener + * @see XSessionManagerClient.removeSessionManagerListener() + */ + addSessionManagerListener(xListener: XSessionManagerListener): void; + + /** + * Call cancelShutdown to try to cancel a desktop shutdown in progress + * @returns `TRUE` if shutdown was canceled, `FALSE` else. + */ + cancelShutdown(): boolean; + + /** + * interactionDone is called when a listener has finished user interaction + * @param xListener the listener done with user interaction + * @see XSessionManagerListener + */ + interactionDone(xListener: XSessionManagerListener): void; + + /** + * queryInteraction issues a request for a user interaction slot from the session manager + * @param xListener the listener requesting user interaction + * @see XSessionManagerListener + */ + queryInteraction(xListener: XSessionManagerListener): void; + + /** + * removeSessionManagerListener deregisters a listener for session events + * @param xListener listener to be removed + * @see XSessionManagerListener + * @see XSessionManagerClient.addSessionManagerListener() + */ + removeSessionManagerListener(xListener: XSessionManagerListener): void; + + /** + * saveDone signals that a listener has processed a save request + * @param xListener the listener having finished save request processing + * @see XSessionManagerListener + */ + saveDone(xListener: XSessionManagerListener): void; + } + + interface XSessionManagerListener extends lang.XEventListener { + /** + * approveInteraction is called when an outstanding interaction request was processed by the session manager + * @param bInteractionGranted If `FALSE` the listener must not interact with the user. If `TRUE` the listener can interact with the user now. After interac + * @see XSessionManagerClient + * @see XSessionManagerClient.interactionDone() + */ + approveInteraction(bInteractionGranted: boolean): void; + + /** returns true, if a session was restored */ + doRestore(): boolean; + + /** + * doSave gets called when a save event was issued by the session manager the listener should do what is necessary to restore the current state of the + * application + * + * If the listener desires to interact with the user it must first issue a user interaction request and only do so if interaction was granted + * + * When the save request is processed (with or without user interaction) the listener must call {@link XSessionManagerClient.saveDone()} on the session + * manager client service object. + * @param bShutdown `TRUE` if a shutdown is in progress, `FALSE` if just a save point was requested + * @param bCancelable `TRUE` if a shutdown in progress can be canceled by the listener, `FALSE` else the listener may choose to ignore the saveDone() even + * @see XSessionManagerClient + * @see XSessionManagerClient.saveDone() + */ + doSave(bShutdown: boolean, bCancelable: boolean): void; + + /** + * shutdownCanceled is called when a shutdown was canceled by the user The listener can cancel his saving operations. No further interaction is necessary + * and further calls on the session manager client service object will be ignored. + */ + shutdownCanceled(): void; + } + + interface XSessionManagerListener2 extends XSessionManagerListener { + /** + * doQuit gets called when the session manager has decided the application should quit. Under these circumstances bringing up further UI will usually be + * impossible and must be avoided. + */ + doQuit(): void; + } + + /** + * interface to be implemented by a component offering a more complex user interface to users within a status bar. + * + * A generic status bar field is represented as a simple text field. A status bar controller can be added to a Statusbar and provide information or + * functions with a more sophisticated user interface. ; A typical example for status bar controller is a zoom chooser. It shows the current zoom and + * provides general zoom levels on a pop-up menu that can be activated by a mouse action for context menus. + * @see com.sun.star.frame.XDispatchProvider + * @since OOo 2.0 + */ + interface XStatusbarController extends lang.XComponent, lang.XInitialization, XStatusListener, util.XUpdatable { + /** + * is called by a status bar if the user clicked with mouse into the field of the corresponding control. + * @param aPos the current mouse position in pixel. + */ + click(aPos: awt.Point): void; + + /** + * is called by a status bar if a command event is available for a controller. + * @param aPos the current mouse position in pixel. + * @param nCommand describes which command has been invoked. ; See {@link com.sun.star.awt.Command} for possible values. + * @param bMouseEvent `TRUE` if the command is based on a mouse event, otherwise `FALSE` . + * @param aData for future use only. + */ + command(aPos: awt.Point, nCommand: number, bMouseEvent: boolean, aData: any): void; + + /** + * is called by a status bar if the user double-clicked with mouse into the field of the corresponding control. + * @param aPos the current mouse position in pixel. + */ + doubleClick(aPos: awt.Point): void; + + /** + * is called by a status bar if the mouse position is within the controller and a mouse button has been pressed. If the controller has captured the mouse + * input this function is also called when the mouse position is not within the controller. + * @param aMouseEvent current information about the mouse pointer. + * @returns return `TRUE` if the event should not be processed and `FALSE` if the event should be processed by the status bar. + */ + mouseButtonDown(aMouseEvent: awt.MouseEvent): boolean; + + /** + * is called by a status bar if the mouse position is within the controller and a mouse button has been released. If the controller has captured the + * mouse input this function is also called when the mouse position is not within the controller. + * @param aMouseEvent current information about the mouse pointer. + * @returns return `TRUE` if the event should not be processed and `FALSE` if the event should be processed by the status bar. + */ + mouseButtonUp(aMouseEvent: awt.MouseEvent): boolean; + + /** + * is called by a status bar if the mouse position is within the controller and a mouse has been moved. If the controller has captured the mouse input + * this function is also called when the mouse position is not within the controller. + * @param aMouseEvent current information about the mouse pointer. + * @returns return `TRUE` if the event should not be processed and `FALSE` if the event should be processed by the status bar. + */ + mouseMove(aMouseEvent: awt.MouseEvent): boolean; + + /** + * is called by a status bar if the controller has to update the visual representation. + * @param xGraphics a reference to a {@link com.sun.star.awt.XGraphics} which has to be used to update the visual representation. + * @param OutputRectangle a {@link com.sun.star.awt.Rectangle} which determine the output rectangle for all drawing operations + * @param nStyle reserved for future use. + */ + paint(xGraphics: awt.XGraphics, OutputRectangle: awt.Rectangle, nStyle: number): void; + } + + /** + * makes it possible to receive events when the state of a feature changes. + * + * Nobody guarantee any notification. Use combination of {@link XNotifyingDispatch} and {@link XDispatchResultListener} for that. + * @see XDispatch + * @see XNotifyingDispatch + * @see XDispatchResultListener + */ + interface XStatusListener extends lang.XEventListener { + /** + * is called when the status of the feature changes. + * @param State provides information about changes of the requested feature + */ + statusChanged(State: FeatureStateEvent): void; + } + + /** + * offers a simple way to store a component to an URL. + * + * It is usually only useful for two cases: + * + * 1. Large components which are wrapped up in UNO interfaces and for which distinct filters are not available separately as components. 2. Very small + * components for which only one or very few hard coded file format filters make sense or even exist. + */ + interface XStorable extends uno.XInterface { + /** + * After {@link XStorable.storeAsURL()} it returns the URL the object was stored to. + * @returns the URL of the resource which is represented by this object. + */ + getLocation(): string; + + /** + * The object may know the location because it was loaded from there, or because it is stored there. + * @returns `TRUE` if the object knows a location where it is persistent `FALSE` otherwise + */ + hasLocation(): boolean; + + /** + * It is not possible to call {@link XStorable.store()} successfully when the data store is read-only. + * @returns `TRUE` if the data store is readonly or opened readonly `FALSE` otherwise + */ + isReadonly(): boolean; + + /** + * After {@link XStorable.storeAsURL()} it returns the URL the object was stored to. + * @returns the URL of the resource which is represented by this object. + */ + readonly Location: string; + + /** + * stores the data to the URL from which it was loaded. + * + * Only objects which know their locations can be stored. + * @see XStorable.storeAsURL + * @see XStorable.storeToURL + * @throws com::sun::star::io::IOException if an IO error occurred during save operation (may the location is unknown) + */ + store(): void; + + /** + * stores the object's persistent data to a URL and makes this URL the new location of the object. + * + * This is the normal behavior for UI's "save-as" feature. + * + * The change of the location makes it necessary to store the document in a format that the object can load. For this reason the implementation of {@link + * XStorable.storeAsURL()} will throw an exception if a pure export filter is used, it will accept only combined import/export filters. For such filters + * the method {@link XStorable.storeToURL()} must be used that does not change the location of the object. + * @param sURL specifies the new location of this component + * @param lArguments optional parameters for saving (see {@link com.sun.star.document.MediaDescriptor} for further details) + * @see XStorable.store + * @see XStorable.storeToURL + * @see com.sun.star.document.MediaDescriptor + * @throws com::sun::star::io::IOException if an IO error occurred during save operation (may the location is unknown) + */ + storeAsURL(sURL: string, lArguments: LibreOffice.SeqEquiv): void; + + /** + * stores the object's persistent data to a URL and continues to be a representation of the old URL. + * + * This is the normal behavior for UI's export feature. + * + * This method accepts all kinds of export filters, not only combined import/export filters because it implements an exporting capability, not a + * persistence capability. + * @param sURL specifies the location where to store the object + * @param lArguments optional parameters for saving (see {@link com.sun.star.document.MediaDescriptor} for further details) + * @see XStorable.store + * @see XStorable.storeAsURL + * @see com.sun.star.document.MediaDescriptor + * @throws com::sun::star::io::IOException if an IO error occurred during save operation (may the location is unknown) + */ + storeToURL(sURL: string, lArguments: LibreOffice.SeqEquiv): void; + } + + /** extends {@link XStorable} . */ + interface XStorable2 extends XStorable { + /** + * stores the data to the URL from which it was loaded. + * + * Only objects which know their locations can be stored. + * + * This is an extension of the {@link XStorable.store()} . This method allows to specify some additional parameters for storing process. + * @param lArguments optional parameters for saving, can take values from subset of {@link com.sun.star.document.MediaDescriptor} + * @see XStorable.store + * @throws com::sun::star::lang::IllegalArgumentException the optional parameters contain unacceptable for save entry + * @throws com::sun::star::io::IOException if an IO error occurred during save operation + */ + storeSelf(lArguments: LibreOffice.SeqEquiv): void; + } + + /** + * special interface to support sub-toolbars in a controller implementation. + * + * This interface is normally used to implement the toolbar button/sub- toolbar function feature. It exchanges the function of the toolbar button, that + * opened the sub-toolbar, with the one that has been selected on the sub-toolbar. + * @see com.sun.star.frame.ToolbarController + * @since OOo 2.0 + */ + interface XSubToolbarController extends uno.XInterface { + /** + * gets called to notify a controller that a sub-toolbar function has been selected. + * @param aCommand a string which identifies the function that has been selected by a user. + */ + functionSelected(aCommand: string): void; + + /** + * provides the resource URL of the sub-toolbar this controller opens. + * @returns name of the sub-toolbar this controller offers. A empty string will be interpreted as if this controller offers no sub-toolbar. + */ + getSubToolbarName(): string; + + /** + * if the controller features a sub-toolbar. + * @returns `TRUE` if the controller offers a sub toolbar, otherwise `FALSE` . Enables implementations to dynamically decide to support sub-toolbars or not. + */ + opensSubToolbar(): boolean; + + /** + * provides the resource URL of the sub-toolbar this controller opens. + * @returns name of the sub-toolbar this controller offers. A empty string will be interpreted as if this controller offers no sub-toolbar. + */ + readonly SubToolbarName: string; + + /** + * gets called to notify a controller that it should set an image which represents the current selected function. + * + * Only the controller instance is able to set the correct image for the current function. A toolbar implementation will ask sub-toolbar controllers to + * update their image whenever it has to update the images of all its buttons. + */ + updateImage(): void; + } + + /** + * additional interfaces for dispatch objects: allow to execute with return value + * @see XDispatch + * @since OOo 2.0 + */ + interface XSynchronousDispatch extends uno.XInterface { + /** + * dispatches a URL synchronously and offers a return values + * + * After getting a dispatch object as a result of a queryDispatch call, this interface can be used to dispatch the URL synchronously and with a return + * value. + * @param URL full parsed URL which describe the feature which should be dispatched (executed) + * @param Arguments optional arguments for this request They depend on the real implementation of the dispatch object. + */ + dispatchWithReturnValue(URL: util.URL, Arguments: LibreOffice.SeqEquiv): any; + } + + /** + * loads a resource into a {@link Frame} . + * + * Unlike the {@link XFrameLoader} interface, this loading will be synchronous. + * @see XFrameLoader + */ + interface XSynchronousFrameLoader extends uno.XInterface { + /** + * cancels the loading process. + * + * No notifications (neither to the frame or the caller) must be notified. Because it's a synchronous process this cancel call can be forced by another + * thread the loader thread only. Method {@link XSynchronousFrameLoader.load()} must return `FALSE` then and caller of this method {@link + * XSynchronousFrameLoader.cancel()} already knows the state ... + */ + cancel(): void; + + /** + * starts the loading of the specified resource into the specified {@link Frame} . + * @param Descriptor describes the resource which should be loaded It use a {@link com.sun.star.document.MediaDescriptor} for that. + * @param Frame the target frame which should contain the new loaded component + * @returns `TRUE` if loading is successfully ; `FALSE` otherwise + */ + load(Descriptor: LibreOffice.SeqEquiv, Frame: XFrame): boolean; + } + + /** + * use {@link XFrame} instead of this one + * @deprecated Deprecated + */ + interface XTask extends XFrame { + /** @deprecated Deprecated */ + arrangeWindowsHorizontal(): void; + + /** @deprecated Deprecated */ + arrangeWindowsVertical(): void; + + /** + * use {@link com.sun.star.util.XCloseable} or {@link com.sun.star.lang.XComponent.dispose()} at a {@link Frame} instead of this one + * @deprecated Deprecated + */ + close(): boolean; + + /** @deprecated Deprecated */ + tileWindows(): void; + } + + /** + * use {@link XFramesSupplier} instead of that + * @deprecated Deprecated + */ + interface XTasksSupplier extends uno.XInterface { + /** + * use {@link XFramesSupplier.getActiveFrame()} instead of this one + * @deprecated Deprecated + */ + readonly ActiveTask: XTask; + + /** + * use {@link XFramesSupplier.getActiveFrame()} instead of this one + * @deprecated Deprecated + */ + getActiveTask(): XTask; + + /** + * use {@link XFramesSupplier.getFrames()} instead of this one + * @deprecated Deprecated + */ + getTasks(): container.XEnumerationAccess; + + /** + * use {@link XFramesSupplier.getFrames()} instead of this one + * @deprecated Deprecated + */ + readonly Tasks: container.XEnumerationAccess; + } + + /** + * has to be provided if an object wants to receive an event when the master environment (e.g., desktop) is terminated. + * @see XDesktop.terminate() + * @see XDesktop.addTerminateListener() + * @see XDesktop.removeTerminateListener() + */ + interface XTerminateListener extends lang.XEventListener { + /** + * is called when the master environment is finally terminated. No veto will be accepted then. + * @param Event describe the source of the event (e.g., the desktop) + */ + notifyTermination(Event: lang.EventObject): void; + + /** + * is called when the master environment (e.g., desktop) is about to terminate. + * + * Termination can be intercepted by throwing {@link TerminationVetoException} . Interceptor will be the new owner of desktop and should call {@link + * XDesktop.terminate()} after finishing his own operations. + * @param Event describe the source of the event (e.g., the desktop) + * @throws TerminationVetoException listener can disagree with this query by throwing this veto exception + */ + queryTermination(Event: lang.EventObject): void; + } + + /** extend interface {@link XTerminateListener} so a listener will be informed in case termination process was canceled by other reasons. */ + interface XTerminateListener2 extends XTerminateListener { + /** + * is called when the master environment (e.g., desktop) was canceled in it's terminate request. + * + * Termination can be intercepted by throwing {@link TerminationVetoException} . But if a listener was queried for termination .. doesn't throw a veto + * exception ... it doesn't know if termination will be real next time. Because any other listener can throw those exception too ... and so it can happen + * that after {@link queryTermination()} no {@link notifyTermination()} will occur. But these listener don't know if its allowed to start new processes + * then. Using this optional(!) interface will make it possible to be informed about canceled termination requests also. + * @param Event describe the source of the event (e.g., the desktop) + */ + cancelTermination(Event: lang.EventObject): void; + } + + /** an interface representing an entity with a modifyable title. */ + interface XTitle extends uno.XInterface { + /** + * Returns the title of the object. + * @returns The title. + */ + getTitle(): string; + + /** + * Sets the title of the object. + * @param sTitle The title. + */ + setTitle(sTitle: string): void; + + /** + * Returns the title of the object. + * @returns The title. + */ + Title: string; + } + + /** Allows to register for title changed events. */ + interface XTitleChangeBroadcaster extends uno.XInterface { + /** Add a listener */ + addTitleChangeListener(xListener: XTitleChangeListener): void; + + /** Remove a listener */ + removeTitleChangeListener(xListener: XTitleChangeListener): void; + } + + /** Allows to receive notifications when the frame title changes */ + interface XTitleChangeListener extends lang.XEventListener { + /** The frame title has changed */ + titleChanged(aEvent: TitleChangedEvent): void; + } + + /** + * is an abstract service for a component which offers a more complex user interface to users within a toolbar. + * + * A generic toolbar function is represented as a button which has a state (enabled,disabled and selected, not selected). A toolbar controller can be + * added to a toolbar and provide information or functions with a more sophisticated user interface. ; A typical example for toolbar controller is a + * font chooser on a toolbar. It provides all available fonts in a dropdown box and shows the current chosen font. + * @see com.sun.star.frame.XDispatchProvider + * @since OOo 2.0 + */ + interface XToolbarController extends uno.XInterface { + /** notifies a component that a single click has been made on the toolbar item. */ + click(): void; + + /** + * requests to create an item window which can be added to the toolbar. + * @param Parent a {@link com.sun.star.awt.XWindow} which must be used as a parent for the requested item window. + * @returns a {@link com.sun.star.awt.XWindow} which can be added to a toolbar. The reference must be empty if a component does not want to provide an item w + */ + createItemWindow(Parent: awt.XWindow): awt.XWindow; + + /** + * requests to create a pop-up window for additional functions. + * @returns a {@link com.sun.star.awt.XWindow} which provides additional functions to the user. The reference must be empty if component does not want to pro + */ + createPopupWindow(): awt.XWindow; + + /** notifies a component that a double click has been made on the toolbar item. */ + doubleClick(): void; + + /** + * provides a function to execute the command which is bound to the toolbar controller. + * @param KeyModifier a combination of {@link com.sun.star.awt.KeyModifier} value that represent the current state of the modifier keys. This function is + */ + execute(KeyModifier: number): void; + } + + /** + * is used to notify a toolbar controller about events + * @see com.sun.star.frame.ToolbarController + * @since OOo 2.0 + */ + interface XToolbarControllerListener extends uno.XInterface { + /** + * gets called to notify a controller that a toolbar function has been selected. + * @param aToolbarRes a string which identifies the toolbar where the function has been selected. + * @param aCommand a string which identifies the function that has been selected. This notification is normally used to implement the toolbar button/sub-t + */ + functionSelected(aToolbarRes: string, aCommand: string): void; + } + + /** + * specifies a factory for com::sun::star::ucb::TransientDocumentsDocumentContents. + * @author Kai Sommerfeld + * @see com.sun.star.document.OfficeDocument + * @see com.sun.star.ucb.TransientDocumentsDocumentContent + * @since OOo 2.0 + * @version 1.0 + */ + interface XTransientDocumentsDocumentContentFactory extends uno.XInterface { + /** + * creates a {@link com.sun.star.ucb.TransientDocumentsDocumentContent} based on a given {@link com.sun.star.document.OfficeDocument} . + * @param Model the document model for that a {@link com.sun.star.ucb.TransientDocumentsDocumentContent} is requested. The model must be an implementation + * @returns a document content based on the given document model. The content must be an implementation of service {@link com.sun.star.ucb.TransientDocuments + * @throws com::sun::star::lang::IllegalArgumentException if the document model cannot be associated with content for any reason. + */ + createDocumentContent(Model: XModel): ucb.XContent; + } + + /** + * a factory to create User Interface controllers. + * + * A user interface controller can be registered for a command URL. A certain user interface controller will be created when a user interface element + * contains a registered command URL. + * @see PopupMenuControllerFactory + * @see StatusbarControllerFactory + * @see ToolbarControllerFactory + * @since LibreOffice 4.1 + */ + interface XUIControllerFactory extends lang.XMultiComponentFactory, XUIControllerRegistration { } + + /** + * is used to query, register and unregister user interface controller. + * + * A user interface controller can be registered for a command URL. A certain user interface controller will be created when a user interface element + * contains a registered command URL. + * @see PopupMenuControllerFactory + * @since OOo 2.0 + */ + interface XUIControllerRegistration extends uno.XInterface { + /** + * function to remove a previously defined association between a user interface controller implementation and a command URL and optional module. + * @param aCommandURL a command URL which specifies an action which should be associated with a user interface controller. + * @param aModelName an optional name of an OpenOffice model service. This value can remain empty if no model service name was specified. + */ + deregisterController(aCommandURL: string, aModelName: string): void; + + /** + * function to check if an user interface controller is registered for a command URL and optional module. + * @param aCommandURL a command URL which specifies an action. + * @param aModelName an optional name of an OpenOffice model service. This value can remain empty if no model service name was specified. + * @returns true if a controller was registered for the combination of command URL and model name. + */ + hasController(aCommandURL: string, aModelName: string): boolean; + + /** + * function to create an association between a user interface controller implementation and a command URL and optional module. + * @param aCommandURL a command URL which specifies an action which should be associated with a user interface controller. + * @param aModelName an optional name of an OpenOffice model service. This value can remain empty if no model service name was specified. + * @param aControllerImplementationName a UNO implementation name that can be used to create a user interface controller with the OpenOffice service manager. + */ + registerController(aCommandURL: string, aModelName: string, aControllerImplementationName: string): void; + } + + /** knows all currently used and all free numbers for using with untitled but counted objects. */ + interface XUntitledNumbers extends uno.XInterface { + /** + * returns the localized string value to be used for untitled objects in combination with the leased number. + * + * Note: Such string already contains leading spaces/tabs etc. ! The only thing which an outside code has todo then ... adding a leased number to the + * string. + * @returns the localized string for untitled components. + */ + getUntitledPrefix(): string; + + /** + * callee has to lease a number before he can use it within in its own title. + * + * Such number must be freed after using e.g. while the object was closed or gets another title (e.g. by saving a document to a real location on disc). + * @param xComponent the component which has to be registered for the leased number. + * @returns the new number for these object or 0 if no further numbers are available. + * @throws [IllegalArgumentException] if an invalid object reference was provided to this method. + */ + leaseNumber(xComponent: uno.XInterface): number; + + /** + * has to be used to mark those number as "free for using". + * + * If the registered component does not use such leased number any longer it has to be released so it can be used for new components. + * + * Note: calling this method with an unknown (but normally valid number) has to be ignored. No exceptions - no errors. + * @param nNumber specify number for release. + * @throws [IllegalArgumentException] if the given number is the special value 0. + */ + releaseNumber(nNumber: number): void; + + /** + * does the same then releaseNumber () but it searches the corresponding number for the specified component and deregister it. + * @param xComponent the component for deregistration. + * @throws [IllegalArgumentException] if an invalid object reference was provided to this method. + */ + releaseNumberForComponent(xComponent: uno.XInterface): void; + + /** + * returns the localized string value to be used for untitled objects in combination with the leased number. + * + * Note: Such string already contains leading spaces/tabs etc. ! The only thing which an outside code has todo then ... adding a leased number to the + * string. + * @returns the localized string for untitled components. + */ + readonly UntitledPrefix: string; + } + + /** @deprecated Deprecated */ + interface XUrlList extends uno.XInterface { + List: SafeArray; + } + + /** @deprecated Deprecated */ + interface XWindowArranger extends uno.XInterface { + /** @deprecated Deprecated */ + arrange(nCommand: number): void; + + /** @deprecated Deprecated */ + hasArrangeCommand(nCommand: number): boolean; + } + + namespace CommandGroup { + const enum Constants { + APPLICATION = 1, + CHART = 20, + CONNECTOR = 22, + CONTROLS = 25, + DATA = 17, + DOCUMENT = 3, + DRAWING = 24, + EDIT = 4, + ENUMERATION = 16, + EXPLORER = 21, + FORMAT = 10, + FRAME = 13, + GRAPHIC = 14, + IMAGE = 19, + INSERT = 9, + INTERNAL = 0, + MACRO = 5, + MATH = 7, + MODIFY = 23, + NAVIGATOR = 8, + OPTIONS = 6, + SPECIAL = 18, + TABLE = 15, + TEMPLATE = 11, + TEXT = 12, + VIEW = 2, + } + } + + namespace DispatchResultState { + const enum Constants { + DONTKNOW = 2, + FAILURE = 0, + SUCCESS = 1, + } + } + + namespace FrameSearchFlag { + const enum Constants { + ALL = 23, + AUTO = 0, + CHILDREN = 4, + CREATE = 8, + GLOBAL = 55, + PARENT = 1, + SELF = 2, + SIBLINGS = 16, + TASKS = 32, + } + } + + namespace LayoutManagerEvents { + const enum Constants { + INVISIBLE = 4, + LAYOUT = 2, + LOCK = 0, + MERGEDMENUBAR = 5, + UIELEMENT_INVISIBLE = 7, + UIELEMENT_VISIBLE = 6, + UNLOCK = 1, + VISIBLE = 3, + } + } + + namespace status { + /** + * contains a list of format IDs and names which are part of the system clipboard. + * @since OOo 2.0 + */ + interface ClipboardFormats { + /** specifies a sequence of format IDs which are contained in the system clipboard. */ + Identifiers: SafeArray; + + /** specifies a sequence of format names which are contained in the system clipboard. */ + Names: SafeArray; + } + + /** + * describes the characteristics of a font. + * + * For example, this can be used to select a font. + * @since OOo 2.0 + */ + interface FontHeight { + /** specifies the width of the font in the measure of the destination. */ + Diff: number; + + /** specifies the current height of the font. */ + Height: number; + + /** specifies the height of the font in the measure of the destination. */ + Prop: number; + } + + /** + * describes a state of a property. + * @since OOo 2.0 + */ + interface ItemStatus { + /** optional data which can be used by an implementation to send additional information. The content is dependent on the specific implementation. */ + aStateData: any; + + /** + * numerical value which describes the current state of an item. + * @see ItemState + */ + State: number; + } + + /** + * specifies a left and right margin. + * @since OOo 2.0 + */ + interface LeftRightMargin { + /** specifies a left side margin in 1/100th mm. */ + Left: number; + + /** specifies a right side margin in 1/100th mm. */ + Right: number; + } + + /** + * specifies a left and right margin. + * @since LibreOffice 5.3 + */ + interface LeftRightMarginScale { + /** specifies if the automatic calculation of the first line indent occurs. */ + AutoFirstLine: boolean; + + /** specifies a first line indent relative to TextLeft in 1/100th mm. */ + FirstLine: number; + + /** specifies a left margin in 1/100th mm. */ + Left: number; + + /** specifies a right margin in 1/100th mm. */ + Right: number; + + /** specifies a scale value for the first line margin in percent. */ + ScaleFirstLine: number; + + /** specifies a scale value for the left margin in percent. */ + ScaleLeft: number; + + /** specifies a scale value for the right margin in percent. */ + ScaleRight: number; + + /** specifies a left text margin in 1/100th mm. */ + TextLeft: number; + } + + /** + * contains an association between a style name and a value. + * @since OOo 2.0 + */ + interface Template { + /** specifies a style name. */ + StyleName: string; + + /** specifies a value that is bound to the style name. */ + Value: number; + } + + /** + * specifies an upper and lower margin. + * @since OOo 2.0 + */ + interface UpperLowerMargin { + /** specifies a lower margin in 1/100th mm. */ + Lower: number; + + /** specifies a upper margin in 1/100th mm. */ + Upper: number; + } + + /** + * specifies an upper and lower margin. + * @since OOo 2.0 + */ + interface UpperLowerMarginScale { + /** specifies a lower margin in 1/100th mm. */ + Lower: number; + + /** specifies a scale value for the lower margin. */ + ScaleLower: number; + + /** specifies a scale value for the upper margin. */ + ScaleUpper: number; + + /** specifies a upper margin in 1/100th mm. */ + Upper: number; + } + + /** + * describes a command that can be send to an OLE object + * + * For example, this can be used to select a font. + * @since OOo 2.0 + */ + interface Verb { + /** specifies the Id of the command. */ + VerbId: number; + + /** specifies if the command is available for a constant object. */ + VerbIsConst: boolean; + + /** specifies if the command should be visible in a menu. */ + VerbIsOnMenu: boolean; + + /** specifies the name of the command. The name is localized. */ + VerbName: string; + } + + /** + * describes the visibility state of a property. + * @since OOo 2.0 + */ + interface Visibility { + /** `TRUE` if the property is visible otherwise `FALSE` . */ + bVisible: boolean; + } + + namespace ItemState { + const enum Constants { + DEFAULT_VALUE = 32, + DISABLED = 1, + DONT_CARE = 16, + READ_ONLY = 2, + SET = 64, + UNKNOWN = 0, + } + } + } + + namespace UntitledNumbersConst { + const enum Constants { + INVALID_NUMBER = 0, + } + } + + namespace WindowArrange { + const enum Constants { + CASCADE = 4, + HORIZONTAL = 3, + MAXIMIZE = 5, + MINIMIZE = 6, + TILE = 1, + VERTICAL = 2, + } + } + } + + namespace gallery { + /** + * provides access to a container of Gallery items and makes it possible for you to manipulate them. + * @see XGalleryTheme + */ + type GalleryTheme = XGalleryTheme; + + /** service to get access to the properties of a single Gallery item */ + interface GalleryItem extends XGalleryItem, beans.XPropertySet { + /** + * the drawing content of the Gallery item + * + * This is an optional property and may not available for every item + */ + Drawing: lang.XComponent; + + /** + * The type of the Gallery item + * @see GalleryItemType + */ + GalleryItemType: number; + + /** + * the graphic content of the Gallery item + * + * This is an optional property and may not available for every item + */ + Graphic: graphic.XGraphic; + + /** + * the thumbnail of the Gallery item + * + * The thumbnail may be either a pixel or a vector graphic + */ + Thumbnail: graphic.XGraphic; + + /** the title of the Gallery item */ + Title: string; + + /** + * the URL of the Gallery item + * + * The interpretation of the URL depends on the type of the Gallery item. In case of graphic and media items, the URL is a "real" URL, in case of + * drawings it is a private URL + */ + URL: string; + } + + /** + * provides access to a container of GalleryThemes and makes it possible for you to manipulate them. + * @see XGalleryThemeProvider + */ + interface GalleryThemeProvider extends XGalleryThemeProvider, lang.XInitialization { } + + /** provides access to a single item of a Gallery theme. */ + interface XGalleryItem extends uno.XInterface { + /** + * retrieves the type of the Gallery item + * @returns The type of the Gallery item + * @see GalleryItemType + */ + getType(): number; + + /** + * retrieves the type of the Gallery item + * @returns The type of the Gallery item + * @see GalleryItemType + */ + readonly Type: number; + } + + /** + * provides access to the items of a Gallery themes. It also allows inserting and removing of single items. + * + * This interface extends the interface {@link com.sun.star.container.XIndexAccess} which provides access to existing Gallery items collection. + * @see com.sun.star.container.XIndexAccess + * @see com.sun.star.sheet.DataPilotTable + */ + interface XGalleryTheme extends container.XIndexAccess { + /** + * retrieves the name of the Gallery theme + * @returns The name of the Gallery theme + */ + getName(): string; + + /** + * inserts an item + * @param Drawing A drawing model that should be added to the collection + * @param Index The zero based index of the position where to insert the new object inside the collection. If the index is larger than or equal to the numb + * @returns The zero based position at which the object was inserted. If the object could not be inserted, -1 is returned. + * @see XGalleryItem + * @see com.sun.star.lang.WrappedTargetException + */ + insertDrawingByIndex(Drawing: lang.XComponent, Index: number): number; + + /** + * inserts an item + * @param Graphic The {@link com.sun.star.graphic.XGraphic} object that should be added to the collection + * @param Index The zero based index of the position where to insert the new object inside the collection. If the index is larger than or equal to the numb + * @returns The zero based position at which the object was inserted. If the object could not be inserted, -1 is returned. + * @see com.sun.star.graphic.XGraphic + * @see XGalleryItem + * @see com.sun.star.lang.WrappedTargetException + */ + insertGraphicByIndex(Graphic: graphic.XGraphic, Index: number): number; + + /** + * inserts an item + * @param URL The URL of a graphic or media object, that should be added to the collection + * @param Index The zero based index of the position where to insert the new object inside the collection. If the index is larger than or equal to the numb + * @returns The zero based position at which the object was inserted. If the object could not be inserted, -1 is returned. + * @see XGalleryItem + * @see com.sun.star.lang.WrappedTargetException + */ + insertURLByIndex(URL: string, Index: number): number; + + /** + * retrieves the name of the Gallery theme + * @returns The name of the Gallery theme + */ + readonly Name: string; + + /** + * deletes an item from the collection + * @param Index The position of the item to be removed. The position is zero based. + * @see com.sun.star.container.NoSuchElementException + */ + removeByIndex(Index: number): void; + + /** + * updates the theme + * + * This method iterates over each item of the Gallery theme and updates it accordingly. Main purpose is to automatically regenerate the thumbnails and to + * remove invalid items, that is items who have got an URL that has become invalid. This method also optimizes underlying data structures. + */ + update(): void; + } + + /** + * provides access to the Gallery themes. It also allows inserting and removing of Gallery themes by name. + * + * This interface extends the interface {@link com.sun.star.container.XNameAccess} which provides access to existing Gallery themes collection. + * @see com.sun.star.container.XNameAccess + */ + interface XGalleryThemeProvider extends container.XNameAccess { + /** + * creates a new Gallery theme and adds it to the collection. + * @param ThemeName The name of the Gallery theme to be added to the collection. The name must be unique. + * @returns {@link XGalleryTheme} The created theme interface + * @see com.sun.star.container.ElementExistException + */ + insertNewByName(ThemeName: string): XGalleryTheme; + + /** + * deletes a Gallery theme from the collection. + * @param ThemeName The name of the Gallery theme to be removed. The theme with the given name must exist. + * @see com.sun.star.container.NoSuchElementException + */ + removeByName(ThemeName: string): void; + } + + namespace GalleryItemType { + const enum Constants { + DRAWING = 3, + EMPTY = 0, + GRAPHIC = 1, + MEDIA = 2, + } + } + } + + namespace geometry { + /** + * This structure defines a 2 by 3 affine matrix. + * + * The matrix defined by this structure constitutes an affine mapping of a point in 2D to another point in 2D. The last line of a complete 3 by 3 matrix + * is omitted, since it is implicitly assumed to be [0,0,1]. + * + * An affine mapping, as performed by this matrix, can be written out as follows, where `xs` and `ys` are the source, and `xd` and `yd` the corresponding + * result coordinates: + * + * ` xd = m00*xs + m01*ys + m02; yd = m10*xs + m11*ys + m12; ` + * + * Thus, in common matrix language, with M being the {@link AffineMatrix2D} and vs=[xs,ys]^T, vd=[xd,yd]^T two 2D vectors, the affine transformation is + * written as vd=M*vs. Concatenation of transformations amounts to multiplication of matrices, i.e. a translation, given by T, followed by a rotation, + * given by R, is expressed as vd=R*(T*vs) in the above notation. Since matrix multiplication is associative, this can be shortened to vd=(R*T)*vs=M'*vs. + * Therefore, a set of consecutive transformations can be accumulated into a single {@link AffineMatrix2D} , by multiplying the current transformation + * with the additional transformation from the left. + * + * Due to this transformational approach, all geometry data types are points in abstract integer or real coordinate spaces, without any physical + * dimensions attached to them. This physical measurement units are typically only added when using these data types to render something onto a physical + * output device, like a screen or a printer, Then, the total transformation matrix and the device resolution determine the actual measurement unit. + * @since OOo 2.0 + */ + interface AffineMatrix2D { + m00: number; + m01: number; + m02: number; + m10: number; + m11: number; + m12: number; + } + + /** + * This structure defines a 3 by 4 affine matrix. + * + * The matrix defined by this structure constitutes an affine mapping of a point in 3D to another point in 3D. The last line of a complete 4 by 4 matrix + * is omitted, since it is implicitly assumed to be [0,0,0,1]. + * + * An affine mapping, as performed by this matrix, can be written out as follows, where `xs, ys` and `zs` are the source, and `xd, yd` and `zd` the + * corresponding result coordinates: + * + * ` xd = m00*xs + m01*ys + m02*zs + m03; yd = m10*xs + m11*ys + m12*zs + m13; zd = m20*xs + m21*ys + m22*zs + m23; ` + * + * Thus, in common matrix language, with M being the {@link AffineMatrix3D} and vs=[xs,ys,zs]^T, vd=[xd,yd,zd]^T two 3D vectors, the affine + * transformation is written as vd=M*vs. Concatenation of transformations amounts to multiplication of matrices, i.e. a translation, given by T, followed + * by a rotation, given by R, is expressed as vd=R*(T*vs) in the above notation. Since matrix multiplication is associative, this can be shortened to + * vd=(R*T)*vs=M'*vs. Therefore, a set of consecutive transformations can be accumulated into a single {@link AffineMatrix3D} , by multiplying the + * current transformation with the additional transformation from the left. + * + * Due to this transformational approach, all geometry data types are points in abstract integer or real coordinate spaces, without any physical + * dimensions attached to them. This physical measurement units are typically only added when using these data types to render something onto a physical + * output device. For 3D coordinates there is also a projection from 3D to 2D device coordinates needed. Only then the total transformation matrix + * (including projection to 2D) and the device resolution determine the actual measurement unit in 3D. + * @since OOo 2.0 + */ + interface AffineMatrix3D { + m00: number; + m01: number; + m02: number; + m03: number; + m10: number; + m11: number; + m12: number; + m13: number; + m20: number; + m21: number; + m22: number; + m23: number; + } + + /** + * This structure specifies an arbitrary elliptical arc. + * + * This structure contains all parameters necessary to specify arbitrary elliptical arcs. The parameters are modeled closely after the [SVG]{@link + * url="http://www.w3c.org"} specification. + * + * As with the parameters below, there are mostly four different ellipses arcs (two different ellipses, on which four different arcs connect start and + * end point) which satisfy the given set of constrains. Thus, there are two flags indicating which one of those ellipses should be taken. + * @since OOo 2.0 + */ + interface EllipticalArc { + EndPosition: RealPoint2D; + + /** If `TRUE` , and there's a choice, take the arc that goes clock-wise from start to end point. */ + IsClockwiseSweep: boolean; + + /** If `TRUE` , and there's a choice, take the longer one of two arcs connecting start and end point. */ + IsLargeArc: boolean; + RadiusX: number; + RadiusY: number; + StartPosition: RealPoint2D; + + /** Rotation angle of the x axis of the ellipse relative to the x axis of the reference coordinate system. */ + XAxisRotation: number; + } + + /** + * This structure contains the relevant data for a cubic Bezier curve. + * + * The data is stored integer-valued. The last point of the segment is taken from the first point of the following segment, and thus not included herein. + * That is, when forming a polygon out of cubic Bezier segments, each two consecutive IntegerBezierSegment2Ds define the actual curve, with the very last + * segment providing only the end point of the last curve, and the remaining members ignored. + * @see com.sun.star.rendering.XBezierPolyPolygon2D + * @since OOo 2.0 + */ + interface IntegerBezierSegment2D { + C1x: number; + C1y: number; + C2x: number; + C2y: number; + Px: number; + Py: number; + } + + /** + * This structure defines a two-dimensional point + * + * This structure contains x and y integer-valued coordinates of a two-dimensional point. + * @since OOo 2.0 + */ + interface IntegerPoint2D { + X: number; + Y: number; + } + + /** + * This structure contains the necessary information for a two-dimensional rectangle. + * @since OOo 2.0 + */ + interface IntegerRectangle2D { + X1: number; + + /** + * X coordinate of lower right corner. + * + * Must be greater than X1 for non-empty rectangles. + */ + X2: number; + Y1: number; + + /** + * Y coordinate of lower right corner. + * + * Must be greater than y1 for non-empty rectangles. + */ + Y2: number; + } + + /** + * This structure contains data representing a two-dimensional size. + * + * The data is stored integer-valued. + * @since OOo 2.0 + */ + interface IntegerSize2D { + Height: number; + Width: number; + } + + /** + * This structure defines a 2 by 2 matrix. + * + * This constitutes a linear mapping of a point in 2D to another point in 2D. + * + * The matrix defined by this structure constitutes a linear mapping of a point in 2D to another point in 2D. In contrast to the {@link + * com.sun.star.geometry.AffineMatrix2D} , this matrix does not include any translational components. + * + * A linear mapping, as performed by this matrix, can be written out as follows, where `xs` and `ys` are the source, and `xd` and `yd` the corresponding + * result coordinates: + * + * ` xd = m00*xs + m01*ys; yd = m10*xs + m11*ys; ` + * + * Thus, in common matrix language, with M being the {@link Matrix2D} and vs=[xs,ys]^T, vd=[xd,yd]^T two 2D vectors, the linear mapping is written as + * vd=M*vs. Concatenation of transformations amounts to multiplication of matrices, i.e. a scaling, given by S, followed by a rotation, given by R, is + * expressed as vd=R*(S*vs) in the above notation. Since matrix multiplication is associative, this can be shortened to vd=(R*S)*vs=M'*vs. Therefore, a + * set of consecutive transformations can be accumulated into a single {@link Matrix2D} , by multiplying the current transformation with the additional + * transformation from the left. + * + * Due to this transformational approach, all geometry data types are points in abstract integer or real coordinate spaces, without any physical + * dimensions attached to them. This physical measurement units are typically only added when using these data types to render something onto a physical + * output device, like a screen or a printer. Then, the total transformation matrix and the device resolution determine the actual measurement unit. + * @since OOo 2.0 + */ + interface Matrix2D { + m00: number; + m01: number; + m10: number; + m11: number; + } + + /** + * This structure contains the relevant data for a cubic Bezier curve. + * + * The data is stored real-valued. The last point of the segment is taken from the first point of the following segment, and thus not included herein. + * That is, when forming a polygon out of cubic Bezier segments, each two consecutive {@link RealBezierSegment2D} define the actual curve, with the very + * last segment providing only the end point of the last curve, and the remaining members ignored. + * @see com.sun.star.rendering.XBezierPolyPolygon2D + * @since OOo 2.0 + */ + interface RealBezierSegment2D { + C1x: number; + C1y: number; + C2x: number; + C2y: number; + Px: number; + Py: number; + } + + /** + * This structure defines a two-dimensional point + * + * This structure contains x and y real-valued coordinates of a two-dimensional point. + * @since OOo 2.0 + */ + interface RealPoint2D { + X: number; + Y: number; + } + + /** + * This structure contains the necessary information for a two-dimensional rectangle. + * @since OOo 2.0 + */ + interface RealRectangle2D { + X1: number; + + /** + * X coordinate of lower right corner. + * + * Must be greater than x1 for non-empty rectangles. + * + * . + */ + X2: number; + Y1: number; + + /** + * Y coordinate of lower right corner. + * + * Must be greater than y1 for non-empty rectangles. + */ + Y2: number; + } + + /** + * This structure contains the necessary information for a three-dimensional cube. + * @since OOo 2.0 + */ + interface RealRectangle3D { + X1: number; + + /** + * maximum X coordinate. + * + * Must be greater than X1 for non-empty cubes. + * + * . + */ + X2: number; + Y1: number; + + /** + * maximum Y coordinate. + * + * Must be greater than Y1 for non-empty cubes. + */ + Y2: number; + Z1: number; + + /** + * maximum Z coordinate. + * + * Must be greater than Z1 for non-empty cubes. + */ + Z2: number; + } + + /** + * This structure contains data representing a two-dimensional size. + * + * The data is stored real-valued. + * @since OOo 2.0 + */ + interface RealSize2D { + Height: number; + Width: number; + } + + /** + * Interface defining an arbitrary bijective mapping from R^2 to R^2. + * + * This interface provides methods to define an arbitrary bijective mapping from R^2 to R^2, i.e. from the two-dimensional space of real numbers onto + * itself, as is representable by the double floating point type. The mapping must be bijective, i.e. map a pair of real numbers to exactly one other + * pair of real numbers an vice versa, to facilitate a working inverse. Bijectiveness also implies completeness, i.e. for every pair of real numbers + * there must be another pair that is mapped upon them. + * @since OOo 2.0 + */ + interface XMapping2D extends uno.XInterface { + /** Forward 2D mapping function */ + map(aPoint: RealPoint2D): RealPoint2D; + + /** + * Inverse 2D mapping function. + * + * The following invariant must hold: `map(mapInverse(p))=p` . This effectively rules out non-bijective mappings. + */ + mapInverse(aPoint: RealPoint2D): RealPoint2D; + } + } + + namespace graphic { + /** + * Central service of the {@link Graphic} API that gives access to graphics of any kind + * + * This service allows to load graphics from and to store graphics to any location. The one and only interface that has to be implemented is the {@link + * XGraphicProvider} interface, that exposes the necessary methods for loading and storing the graphic contents and descriptors + * @see XGraphicProvider + */ + type GraphicProvider = XGraphicProvider; + + /** + * Service that describes the necessary interfaces and properties to convert arbitrary graphic data to a {@link XGraphic} interface containing a pixel + * graphic, that can be rendered the usual ways. + */ + type GraphicRasterizer = XGraphicRasterizer; + + /** Service that describes the necessary interfaces and properties for tooling involved with {@link XPrimitive2D} interfaces */ + type Primitive2DTools = XPrimitive2DRenderer; + + /** @since LibreOffice 4.1 */ + type PrimitiveFactory2D = XPrimitiveFactory2D; + + /** + * Service that describes the necessary interfaces and properties to handle svg files. Parses a svg file to a sequence of B2DPrimitives for internal + * usage + */ + type SvgTools = XSvgParser; + + /** + * This service acts as a container for graphics + * + * The main interface that has to be implemented for this service is the {@link XGraphic} interface, which itself exposes only a few methods. Beside + * this, a {@link Graphic} service incorporates the {@link GraphicDescriptor} to give access to the attributes of the graphic. + * @see XGraphic + * @see XGraphicTransformer + * @see GraphicDescriptor + */ + interface Graphic extends XGraphic, GraphicDescriptor { } + + /** + * This service describes all graphic properties that are available via the {@link com.sun.star.beans.XPropertySet} interface + * @see XPropertySet + */ + interface GraphicDescriptor extends beans.XPropertySet { + /** + * Indicates that it is a pixel graphic with an alpha channel + * + * The status of this flag is not always clear if the graphic was not loaded at all, e.g. in case of just querying for the {@link GraphicDescriptor} + */ + Alpha: boolean; + + /** + * Indicates that it is a graphic that consists of several frames that can be played as an animation + * + * The status of this flag is not always clear if the graphic was not loaded at all, e.g. in case of just querying for the {@link GraphicDescriptor} + */ + Animated: boolean; + + /** + * The number of bits per pixel used for the pixel graphic + * + * This property is not available for vector graphics and may not be available for some kinds of pixel graphics + */ + BitsPerPixel: number; + + /** + * The type of the graphic + * @see GraphicType + */ + GraphicType: number; + + /** + * The MimeType of the loaded graphic + * + * The mime can be the original mime type of the graphic source the graphic container was constructed from or it can be the internal mime type + * image/x-vclgraphic, in which case the original mime type is not available anymore + * + * Currently, the following mime types are supported for loaded graphics: + * + * erimage/x-targaimage/x-photoshopimage/x-epsimage/x-dxfimage/x-metimage/x-pictimage/x-sgfimage/x-svmimage/x-wmfimage/x-sgvimage/x-emfimage/x-vclgraphic + */ + MimeType: string; + + /** + * The Size of the graphic in 100th mm. + * + * This property may not be available in case of pixel graphics or if the logical size can not be determined correctly for some formats without loading + * the whole graphic + */ + Size100thMM: awt.Size; + + /** + * The Size of the graphic in pixel. + * + * This property may not be available in case of vector graphics or if the pixel size can not be determined correctly for some formats without loading + * the whole graphic + */ + SizePixel: awt.Size; + + /** + * Indicates that it is a transparent graphic + * + * This property is always `TRUE` for vector graphics. The status of this flag is not always clear if the graphic was not loaded at all, e.g. in case of + * just querying for the {@link GraphicDescriptor} . + */ + Transparent: boolean; + } + + /** + * The `GraphicObject` service can be used to create {@link XGraphicObject} instances. + * + * {@link XGraphicObject} objects are accessible using {@link GraphicObject} scheme URLs like + * `vnd.sun.star.GraphicObject:10000000000001940000012FB99807BD` . As long as at least one instance of {@link XGraphicObject} with a particular UniqueID + * exists, the associated image/graphic is available. + * @see GraphicObject + * @see GraphicProvider + * @see MediaProperties + */ + interface GraphicObject extends XGraphicObject { + /** Creates an {@link GraphicObject} */ + create(): void; + + /** + * Creates an {@link GraphicObject} with `uniqueId` + * @param uniqueId If another {@link XGraphicObject} with `uniqueId` exists, this {@link GraphicObject} is populated with the other {@link GraphicObject} ' + */ + createWithId(uniqueId: string): void; + } + + /** + * Service that describes the necessary interfaces and properties to render a graphic container of {@link XGraphic} type + * + * To render a {@link XGraphic} container, just create an instance of this service, set the appropriate properties and use the {@link XGraphicRenderer} + * interface to initiate the rendering process itself + */ + interface GraphicRendererVCL extends XGraphicRenderer, beans.XPropertySet { + /** Specifies the destination rectangle, into which the graphic content is to be rendered onto the device */ + DestinationRect: awt.Rectangle; + + /** + * Holds the device onto which the {@link XGraphic} container should be rendered + * + * In case of using VCL Devices, this property should hold a {@link com.sun.star.awt.XDevice} interface + */ + Device: any; + + /** Additional properties for rendering, unspecified at the moment */ + RenderData: any; + } + + /** This service describes the properties that are used when using the {@link XGraphicProvider} interface methods */ + interface MediaProperties { + /** Additional properties that will be passed to the appropriate filter module. */ + FilterData: beans.PropertyValues; + + /** + * This property is only used for loading graphics or querying graphic descriptors + * + * A {@link InputStream} can be used instead of the {@link URL} property + * @see com.sun.star.io.XInputStream + */ + InputStream: io.XInputStream; + + /** + * This property is only used for storing graphics and describes the format into which the graphic is to be converted + * + * At the moment, the following mime types are supported for storing graphics: + * + * sterimage/x-emfimage/x-epsimage/x-metimage/x-pictimage/x-portable-bitmapimage/x-portable-pixmapimage/x-wmfimage/x-svmimage/x-xpixmapimage/x-vclgraphic + */ + MimeType: string; + + /** + * This property is only used for storing graphics + * + * A {@link OutputStream} can be used instead of the {@link URL} property + * @see com.sun.star.io.XStream + */ + OutputStream: io.XStream; + + /** + * Property that describes the location of the source or target of the graphic as URL. + * + * A URL can be used instead of the {@link InputStream} or {@link OutputStream} property + * + * In addition to the normal protocols like [file://]{@link url="file://"} or [http://]{@link url="http://"} you can use private URLs as follows to get + * access to graphics lying inside the resource system within an Office context: + * + * 2345private:resource/projectshortname/image/12345private:resource/projectshortname/imagelist/12345private:resource/projectshortname/imagelist/12345/12 + * And additionally, {@link GraphicObject} scheme URLs like vnd.sun.star.GraphicObject:10000000000001940000012FB99807BD can be used to access graphics + * held by the GraphicCache implementation. + * + * Yet more, you can access graphics in the application-wide image repository by specifying URLs of the form + * `private:graphicrepository/` . + */ + URL: string; + } + + /** + * This interface acts as a container for the loaded graphic. + * + * The interface itself can be retrieved by using the appropriate methods of {@link XGraphicProvider} interface. {@link XGraphicProvider} also offers a + * method to store the graphic content at a specific location + * + * To render the graphic content onto a specific device, you have to create a {@link XGraphicRenderer} interface and pass this interface appropriately + * @see XGraphicProvider + * @see XGraphicRenderer + */ + interface XGraphic extends uno.XInterface { + /** + * Get the type of the contained graphic + * @returns The type of the contained graphic + * @see GraphicType + */ + getType(): number; + + /** + * Get the type of the contained graphic + * @returns The type of the contained graphic + * @see GraphicType + */ + readonly Type: number; + } + + /** + * `XGraphicObject` objects represent in-memory image and graphic objects. + * + * Such objects are accessible using {@link GraphicObject} scheme URLs like vnd.sun.star.GraphicObject:10000000000001940000012FB99807BD The numeric + * portion of the url is formed from {@link UniqueID} . As long as at least one instance of `XGraphicObject` with a particular UniqueID exists, the + * associated image/graphic is available. + * @see XGraphicObject + * @see GraphicProvider + * @see MediaProperties + */ + interface XGraphicObject extends uno.XInterface { + /** is the associated image/graphic for this object. */ + Graphic: XGraphic; + + /** is the id that can be used to form the `vnd.sun.star.GraphicObject` url to address this object. */ + UniqueID: string; + } + + /** + * This interface acts as the main interface to handle graphic content. It is used to load graphics, store graphics and to get information about unloaded + * graphics + */ + interface XGraphicProvider extends uno.XInterface { + /** + * Calling this method returns a {@link XGraphic} interface that holds the graphic content after loading the graphic + * @param MediaProperties A sequence of property values to describe the location of the graphic from which the graphic is to be loaded + * @returns The {@link XGraphic} interface + * @see MediaProperties + * @see XGraphic + * @see com.sun.star.beans.PropertyValues + */ + queryGraphic(MediaProperties: beans.PropertyValues): XGraphic; + + /** + * Calling this method returns a {@link com.sun.star.beans.XPropertySet} interface that gives access to the properties of the unloaded graphic + * + * In most cases, this method will be used to query the mime type of the graphic and, in the case of pixel graphics, the resulting size after loading + * @param MediaProperties A sequence of property values to describe the location of the graphic, for which the attributes should be returned + * @returns A {@link com.sun.star.beans.XPropertySet} interface to get access to the different graphic properties + * @see MediaProperties + * @see GraphicDescriptor + * @see com.sun.star.beans.PropertyValues + */ + queryGraphicDescriptor(MediaProperties: beans.PropertyValues): beans.XPropertySet; + + /** + * Store the graphic content, represented through the {@link XGraphic} interface at the specified location + * @param Graphic The graphic that should be stored + * @param MediaProperties A sequence of property values to describe the destination location of the graphic + * @see XGraphic + * @see MediaProperties + * @see com.sun.star.beans.PropertyValues + */ + storeGraphic(Graphic: XGraphic, MediaProperties: beans.PropertyValues): void; + } + + /** This interfaces exposes the initialize and a rasterize method to rasterize a given data stream to a pixel graphic */ + interface XGraphicRasterizer extends uno.XInterface { + /** + * Initializing the rasterizer + * + * This method could also be used to determine, if the provided data is able to be rasterized by the implementation. The implementation should take care + * of this feature as well as setting the default image size in pixel within the given output parameter. + * @param DataStream The input stream of data that should be rasterized + * @param DPI_X The horizontal resolution of the callers device in pixel per inch. This value is needed to calculate the correct dimensions of the graphic + * @param DPI_Y The vertical resolution of the callers device in pixel per inch. This value is needed to calculate the correct dimensions of the graphic to + * @param DefaultSizePixel The default rendering size in pixel of the underlying graphics data may be available after the call via this output parameter. I + * @returns A boolean value indicating if rasterizing of the given data is possible at all and if the initialization process happened successfully. + * @see com.sun.star.io.XInputStream + * @see com.sun.star.awt.Size + */ + initializeData(DataStream: io.XInputStream, DPI_X: number, DPI_Y: number, DefaultSizePixel: [awt.Size]): boolean; + + /** + * Rasterizing the initialized data into a {@link XGraphic} container. + * + * The {@link XGraphic} container will contain a pixel type graphic after a successful rasterization process + * + * In case of any fault during the rasterization process, the {@link XGraphic} container will be empty afterwards and the method will return false + * @param Width The width in pixel of the graphic to be rasterized. This parameter is used without taking other transformation values into account. + * @param Height The height in pixel of the graphic to be rasterized. This parameter is used without taking other transformation values into account. + * @param RotateAngle The rotation angle of the graphic to be rasterized. This parameter is used without taking other transformation values into account. T + * @param ShearAngle_X The horizontal shear angle of the graphic to be rasterized. This parameter is used without taking other transformation values into a + * @param ShearAngle_Y The vertical shear angle of the graphic to be rasterized. This parameter is used without taking other transformation values into acc + * @param RasterizeProperties Additional properties for special needs (undefined by now) + * @returns {@link com.sun.star.graphic.XGraphic} An interface to a graphic container that holds the rasterized pixel data + * @see com.sun.star.beans.PropertyValues + * @see com.sun.star.graphic.XGraphic + */ + rasterize(Width: number, Height: number, RotateAngle: number, ShearAngle_X: number, ShearAngle_Y: number, RasterizeProperties: beans.PropertyValues): XGraphic; + } + + /** This interfaces exposes just one method to render a {@link XGraphic} container */ + interface XGraphicRenderer extends uno.XInterface { + /** + * Renders the {@link XGraphic} container + * @param Graphic The graphic container to be rendered + * @see XGraphic + */ + render(Graphic: XGraphic): void; + } + + /** + * This interface is allowing to transform a {@link XGraphic} + * + * To transform a {@link XGraphic} , just the corresponding method has to be used, a new {@link XGraphic} instance will be returned + */ + interface XGraphicTransformer extends uno.XInterface { + /** + * changes brightness/contrast + * @param In The input {@link Graphic} . + * @param brightness The brightness that shall be applied. + * @param contrast The contrast that shall be applied. + * @param mso whether to use MSOffice brightness/contrast formula + * @returns The modified graphic + */ + applyBrightnessContrast(In: XGraphic, brightness: number, contrast: number, mso: boolean): XGraphic; + + /** + * applies Duotone effect + * @returns The modified graphic + */ + applyDuotone(In: XGraphic, ColorOne: number, ColorTwo: number): XGraphic; + + /** + * transforms a {@link Graphic} + * @returns The transformed graphic + */ + colorChange(In: XGraphic, ColorFrom: number, tolerance: number, ColorTo: number, AlphaTo: number): XGraphic; + } + + /** + * {@link XPrimitive2D} interface + * + * This is the basic interface for 2D graphic primitives. They need to be able to provide a decomposition consisting of simpler graphic primitivesto + * provide a 2D bound rectangle as a 2D range + */ + interface XPrimitive2D extends uno.XInterface { + /** + * Retrieve decomposed list of simpler primitives + * @param aViewParameters 2D View-specific parameter set. The defined but not mandatory parameters include:{@link com.sun.star.geometry.AffineMatrix2D} Tra + */ + getDecomposition(aViewParameters: LibreOffice.SeqEquiv): SafeArray; + + /** + * Retrieve bound rect of primitive + * + * This method calculates the actual bound rect of the area in **world coordinates** . Note that for view-dependent primitives, the necessary pixel + * adjustments are taken into account. For that reason the ViewParameters need to be given. + * @param aViewParameters 2D View-specific parameter set, same as in getDecomposition. + */ + getRange(aViewParameters: LibreOffice.SeqEquiv): geometry.RealRectangle2D; + } + + /** + * {@link XPrimitive2DRenderer} interface + * + * This interface allows to convert from a sequence of XPrimitive2Ds to a XBitmap + */ + interface XPrimitive2DRenderer extends uno.XInterface { + /** + * return rasterized version of given {@link XPrimitive2D} + * @param Primitive2DSequence The graphic content description + * @param aViewInformationSequence The ViewInformation2D + * @param DPI_X The horizontal resolution of the callers device in pixel per inch. This value is needed to calculate the correct dimensions of the graphic + * @param DPI_Y The vertical resolution of the callers device in pixel per inch. This value is needed to calculate the correct dimensions of the graphic to + * @param Range The range in 1/100th mm of the graphic to be rasterized + * @param MaximumQuadraticPixels The maximum allowed number of pixels to be used to allow limiting the possible size of used pixels. The AspectRatio is pre + */ + rasterize( + Primitive2DSequence: LibreOffice.SeqEquiv, aViewInformationSequence: LibreOffice.SeqEquiv, DPI_X: number, DPI_Y: number, + Range: geometry.RealRectangle2D, MaximumQuadraticPixels: number): rendering.XBitmap; + } + + /** + * {@link XPrimitive3D} interface + * + * This is the basic interface for graphic 3D primitives. They need to be able to provide a decomposition consisting of simpler graphic primitivesto + * provide a 3D bound rectangle as a 3D range + */ + interface XPrimitive3D extends uno.XInterface { + /** + * Retrieve decomposed list of simpler primitives + * @param aViewParameters 3D View-specific parameter set. The defined but not mandatory parameters include: double Time Defines the point in time for whic + */ + getDecomposition(aViewParameters: LibreOffice.SeqEquiv): SafeArray; + + /** + * Retrieve bound rect of primitive + * + * This method calculates the actual bound rect of the area in **world coordinates** . Note that for view-dependent primitives, the necessary pixel + * adjustments are taken into account. For that reason the ViewParameters need to be given. + * @param aViewParameters 3D View-specific parameter set, same as in getDecomposition. + */ + getRange(aViewParameters: LibreOffice.SeqEquiv): geometry.RealRectangle3D; + } + + /** + * {@link XPrimitiveFactory2D} interface + * + * Use this interface to generate {@link XPrimitive2D} instances + */ + interface XPrimitiveFactory2D extends uno.XInterface { + /** + * Create primitives from {@link com.sun.star.drawing.XDrawPage} + * @param xDrawPage The XDrawPage, for which the primitives are to be generated. Specifying an invalid or empty page here will result in an empty return value. + * @param aParms Sequence of factory parameters, whose semantics depend on the page to be generated. + * @returns a sequence of primitives, that consists of the geometrical representation for the given XDrawPage. + */ + createPrimitivesFromXDrawPage(xDrawPage: drawing.XDrawPage, aParms: LibreOffice.SeqEquiv): SafeArray; + + /** + * Create primitives from {@link com.sun.star.drawing.XShape} + * @param xShape The XShape, for which the primitives are to be generated. Specifying an invalid or empty shape here will result in an empty return value. + * @param aParms Sequence of factory parameters, whose semantics depend on the shape to be generated. + * @returns a sequence of primitives, that consists of the geometrical representation from the given XShape. + */ + createPrimitivesFromXShape(xShape: drawing.XShape, aParms: LibreOffice.SeqEquiv): SafeArray; + } + + /** + * {@link XSvgParser} interface + * + * This interface allows to parse a SVG stream in form of a sequence of bytes to be parsed into a sequence of XPrimitive2Ds + */ + interface XSvgParser extends uno.XInterface { + /** + * Retrieve decomposed list of simpler primitives + * @param xSvgStream The file containing the SVG XML data + * @param aAbsolutePath The path containing the SVG XML data + */ + getDecomposition(xSvgStream: io.XInputStream, aAbsolutePath: string): SafeArray; + } + + namespace GraphicColorMode { + const enum Constants { + HIGH_CONTRAST = 1, + NORMAL = 0, + } + } + + namespace GraphicType { + const enum Constants { + EMPTY = 0, + PIXEL = 1, + VECTOR = 2, + } + } + } + + namespace i18n { + /** + * contains the base routines for iteration in Unicode string. Iterates over characters, words, sentences and line breaks. + * + * It also contains a {@link BreakIterator} service for Asian languages. + */ + type BreakIterator = XBreakIterator; + + type ChapterCollator = XCollator; + + /** + * Character classification, such as upper, lower, alpha, digit, et al. + * + * Provides also a generic parser functionality. + */ + type CharacterClassification = XCharacterClassification; + + /** Access collation algorithms of different locales. */ + type Collator = XCollator; + + type IndexEntrySupplier = XExtendedIndexEntrySupplier; + + /** + * Check input sequence of CTL languages like Thai or Hindi. + * @since OOo 1.1.2 + */ + type InputSequenceChecker = XExtendedInputSequenceChecker; + + type LocaleCalendar = XCalendar3; + + /** + * Access a locale specific calendar. + * @since LibreOffice 5.0 + */ + type LocaleCalendar2 = XCalendar4; + + type LocaleData = XLocaleData4; + + /** + * Indicates transliteration generated multiple characters output but only single character return value was requested. + * + * Used by {@link XExtendedTransliteration.transliterateChar2Char()} + * @since OOo 1.1.2 + */ + type MultipleCharsOutputException = uno.Exception; + + /** + * Supplier for transliteration of numerals (native number strings). + * @since OOo 1.1.2 + */ + type NativeNumberSupplier = XNativeNumberSupplier; + + /** Access locale data number format codes to use with the number formatter */ + type NumberFormatMapper = XNumberFormatCode; + + /** + * provides access to locale specific ordinal suffix systems. + * @since OOo 2.2 + */ + type OrdinalSuffix = XOrdinalSuffix; + + /** + * offers generic text conversion. + * + * This is an abstract service which does not make sense to be instantiated. + * @since OOo 1.1.2 + */ + type TextConversion = XExtendedTextConversion; + + type Transliteration = XExtendedTransliteration; + + /** Direction properties returned by {@link XCharacterClassification.getCharacterDirection()} . */ + const enum DirectionProperty { + ARABIC_NUMBER = 5, + BLOCK_SEPARATOR = 7, + BOUNDARY_NEUTRAL = 18, + COMMON_NUMBER_SEPARATOR = 6, + DIR_NON_SPACING_MARK = 17, + EUROPEAN_NUMBER = 2, + EUROPEAN_NUMBER_SEPARATOR = 3, + EUROPEAN_NUMBER_TERMINATOR = 4, + LEFT_TO_RIGHT = 0, + LEFT_TO_RIGHT_EMBEDDING = 11, + LEFT_TO_RIGHT_OVERRIDE = 12, + OTHER_NEUTRAL = 10, + POP_DIRECTIONAL_FORMAT = 16, + RIGHT_TO_LEFT = 1, + RIGHT_TO_LEFT_ARABIC = 13, + RIGHT_TO_LEFT_EMBEDDING = 14, + RIGHT_TO_LEFT_OVERRIDE = 15, + SEGMENT_SEPARATOR = 8, + WHITE_SPACE_NEUTRAL = 9, + } + + /** + * Old transliteration module enumeration. + * + * Use with {@link XTransliteration.loadModule()} and {@link com.sun.star.util.SearchOptions.transliterateFlags()} + * + * Note that values >=0x100 are logically or'ed with other values! + */ + const enum TransliterationModules { + END_OF_MODULE = 0, + FULLWIDTH_HALFWIDTH = 4, + HALFWIDTH_FULLWIDTH = 3, + HIRAGANA_KATAKANA = 6, + IGNORE_CASE = 256, + IGNORE_KANA = 512, + IGNORE_MASK = -256, + /** Ignore full width and half width characters when comparing strings by transliteration service. */ + IGNORE_WIDTH = 1024, + ignoreBaFa_ja_JP = 262144, + ignoreHyuByu_ja_JP = 1048576, + /** Ignore Katakana YA/A following the character in either I or E row in Japanese fuzzy search. */ + ignoreIandEfollowedByYa_ja_JP = 4194304, + ignoreIterationMark_ja_JP = 32768, + /** Ignore Katakana KI/KU following the character in SA column in Japanese fuzzy search. */ + ignoreKiKuFollowedBySa_ja_JP = 8388608, + ignoreMiddleDot_ja_JP = 67108864, + ignoreMinusSign_ja_JP = 16384, + ignoreProlongedSoundMark_ja_JP = 33554432, + ignoreSeparator_ja_JP = 65536, + ignoreSeZe_ja_JP = 2097152, + ignoreSize_ja_JP = 16777216, + ignoreSpace_ja_JP = 134217728, + ignoreTiJi_ja_JP = 524288, + /** Ignore Japanese traditional Katakana and Hiragana characters in Japanese fuzzy search. */ + ignoreTraditionalKana_ja_JP = 8192, + /** Ignore Japanese traditional Kanji characters in Japanese fuzzy search. */ + ignoreTraditionalKanji_ja_JP = 4096, + ignoreZiZu_ja_JP = 131072, + KATAKANA_HIRAGANA = 5, + largeToSmall_ja_JP = 536870912, + LOWERCASE_UPPERCASE = 2, + NON_IGNORE_MASK = 255, + NumToTextFormalHangul_ko = 11, + NumToTextFormalLower_ko = 12, + NumToTextFormalUpper_ko = 13, + NumToTextLower_zh_CN = 7, + NumToTextLower_zh_TW = 9, + NumToTextUpper_zh_CN = 8, + NumToTextUpper_zh_TW = 10, + smallToLarge_ja_JP = 268435456, + UPPERCASE_LOWERCASE = 1, + } + + /** New transliteration module enumeration to use with {@link XTransliteration.loadModuleNew()} */ + const enum TransliterationModulesNew { + CharToNumHangul_ko = 63, + CharToNumLower_ko = 64, + CharToNumLower_zh_CN = 59, + CharToNumLower_zh_TW = 61, + CharToNumUpper_ko = 65, + CharToNumUpper_zh_CN = 60, + CharToNumUpper_zh_TW = 62, + END_OF_MODULE = 0, + FULLWIDTH_HALFWIDTH = 4, + HALFWIDTH_FULLWIDTH = 3, + HIRAGANA_KATAKANA = 6, + IGNORE_CASE = 256, + IGNORE_KANA = 512, + /** Ignore full width and half width characters when comparing strings by transliteration service. */ + IGNORE_WIDTH = 1024, + ignoreBaFa_ja_JP = 262144, + ignoreHyuByu_ja_JP = 1048576, + /** Ignore Katakana YA/A following the character in either I or E row in Japanese fuzzy search. */ + ignoreIandEfollowedByYa_ja_JP = 4194304, + ignoreIterationMark_ja_JP = 32768, + /** Ignore Katakana KI/KU following the character in SA column in Japanese fuzzy search. */ + ignoreKiKuFollowedBySa_ja_JP = 8388608, + ignoreMiddleDot_ja_JP = 67108864, + ignoreMinusSign_ja_JP = 16384, + ignoreProlongedSoundMark_ja_JP = 33554432, + ignoreSeparator_ja_JP = 65536, + ignoreSeZe_ja_JP = 2097152, + ignoreSize_ja_JP = 16777216, + ignoreSpace_ja_JP = 134217728, + ignoreTiJi_ja_JP = 524288, + /** Ignore Japanese traditional Katakana and Hiragana characters in Japanese fuzzy search. */ + ignoreTraditionalKana_ja_JP = 8192, + /** Ignore Japanese traditional Kanji characters in Japanese fuzzy search. */ + ignoreTraditionalKanji_ja_JP = 4096, + ignoreZiZu_ja_JP = 131072, + KATAKANA_HIRAGANA = 5, + largeToSmall_ja_JP = 536870912, + LOWERCASE_UPPERCASE = 2, + NumToCharFullwidth = 45, + NumToCharHangul_ko = 42, + NumToCharKanjiShort_ja_JP = 46, + NumToCharLower_ko = 43, + NumToCharLower_zh_CN = 38, + NumToCharLower_zh_TW = 40, + NumToCharUpper_ko = 44, + NumToCharUpper_zh_CN = 39, + NumToCharUpper_zh_TW = 41, + NumToTextFormalHangul_ko = 11, + NumToTextFormalLower_ko = 12, + NumToTextFormalUpper_ko = 13, + NumToTextInformalHangul_ko = 35, + NumToTextInformalLower_ko = 36, + NumToTextInformalUpper_ko = 37, + NumToTextLower_zh_CN = 7, + NumToTextLower_zh_TW = 9, + NumToTextUpper_zh_CN = 8, + NumToTextUpper_zh_TW = 10, + smallToLarge_ja_JP = 268435456, + TextToNumFormalHangul_ko = 51, + TextToNumFormalLower_ko = 52, + TextToNumFormalUpper_ko = 53, + TextToNumInformalHangul_ko = 54, + TextToNumInformalLower_ko = 55, + TextToNumInformalUpper_ko = 56, + TextToNumLower_zh_CN = 47, + TextToNumLower_zh_TW = 49, + TextToNumUpper_zh_CN = 48, + TextToNumUpper_zh_TW = 50, + UPPERCASE_LOWERCASE = 1, + } + + /** Unicode script types, returned by {@link XCharacterClassification.getScript()} */ + const enum UnicodeScript { + k_CJKUnifiedIdeographsExtensionA = 69, + kAlphabeticPresentation = 79, + kArabic = 11, + kArabicPresentationA = 80, + kArabicPresentationB = 84, + kArmenian = 9, + kArrow = 45, + kBasicLatin = 0, + kBengali = 15, + kBlockElement = 52, + kBopomofo = 63, + kBopomofoExtended = 66, + kBoxDrawing = 51, + kBraillePatterns = 56, + kCherokee = 31, + kCJKCompatibility = 68, + kCJKCompatibilityForm = 82, + kCJKCompatibilityIdeograph = 78, + kCJKRadicalsSupplement = 57, + kCJKSymbolPunctuation = 60, + kCJKUnifiedIdeograph = 70, + kCombiningDiacritical = 6, + kCombiningHalfMark = 81, + kControlPicture = 48, + kCurrencySymbolScript = 41, + kCyrillic = 8, + kDevanagari = 14, + kDingbat = 55, + kEnclosedAlphanumeric = 50, + kEnclosedCJKLetterMonth = 67, + kEthiopic = 30, + kGeneralPunctuation = 39, + kGeometricShape = 53, + kGeorgian = 28, + kGreek = 7, + kGreekExtended = 38, + kGujarati = 17, + kGurmukhi = 16, + kHalfwidthFullwidthForm = 86, + kHangulCompatibilityJamo = 64, + kHangulJamo = 29, + kHangulSyllable = 73, + kHebrew = 10, + kHighPrivateUseSurrogate = 75, + kHighSurrogate = 74, + kHiragana = 61, + kIdeographicDescriptionCharacters = 59, + kIPAExtension = 4, + kKanbun = 65, + kKangxiRadicals = 58, + kKannada = 21, + kKatakana = 62, + kKhmer = 35, + kLao = 25, + kLatin1Supplement = 1, + kLatinExtendedA = 2, + kLatinExtendedAdditional = 37, + kLatinExtendedB = 3, + kLetterlikeSymbol = 43, + kLowSurrogate = 76, + kMalayalam = 22, + kMathOperator = 46, + kMiscSymbol = 54, + kMiscTechnical = 47, + kMongolian = 36, + kMyanmar = 27, + kNoScript = 85, + kNumberForm = 44, + kOgham = 33, + kOpticalCharacter = 49, + kOriya = 18, + kPrivateUse = 77, + kRunic = 34, + kScriptCount = 87, + kSinhala = 23, + kSmallFormVariant = 83, + kSpacingModifier = 5, + kSuperSubScript = 40, + kSymbolCombiningMark = 42, + kSyriac = 12, + kTamil = 19, + kTelugu = 20, + kThaana = 13, + kThai = 24, + kTibetan = 26, + kUnifiedCanadianAboriginalSyllabics = 32, + kYiRadicals = 72, + kYiSyllables = 71, + } + + /** + * contains start and end position of a word. + * + * It is used in word break iterator and text conversion. + * @see XBreakIterator + * @see XTextConversion + */ + interface Boundary { + endPos: number; + startPos: number; + } + + /** + * A calendar as returned in a sequence by {@link XLocaleData.getAllCalendars()} . + * @see XLocaleData for links to DTD of XML locale data files. + */ + interface Calendar { + Days: SafeArray; + Default: boolean; + Eras: SafeArray; + MinimumNumberOfDaysForFirstWeek: number; + Months: SafeArray; + Name: string; + StartOfWeek: string; + } + + /** + * {@link Calendar} items as returned in a sequence by {@link XLocaleData3.getAllCalendars2()} . + * + * Similar to {@link com.sun.star.i18n.Calendar} this provides additional members with a sequence of possessive (genitive case) and partitive case month + * names for locales that use them, for example Slavic locales. If a locale does not provide the possessive form in {@link GenitiveMonths} , the names + * are identical to the nominative case nouns in {@link Calendar.Months} . If a locale does not provide the partitive case in {@link PartitiveMonths} , + * the names are identical to {@link GenitiveMonths} . + * + * The sequences are of type {@link com.sun.star.i18n.CalendarItem2} instead of {@link com.sun.star.i18n.CalendarItem} , with the additional NarrowName + * member. + * @see XLocaleData for links to DTD of XML locale data files. + * @since LibreOffice 3.5 + */ + interface Calendar2 { + Days: SafeArray; + Default: boolean; + Eras: SafeArray; + GenitiveMonths: SafeArray; + MinimumNumberOfDaysForFirstWeek: number; + Months: SafeArray; + Name: string; + PartitiveMonths: SafeArray; + StartOfWeek: string; + } + + /** + * One entry in a calendar, for example, a day of week or a month or an era. + * + * A sequence of CalendarItems is contained in {@link Calendar.Days} , {@link Calendar.Months} , {@link Calendar.Eras} + */ + interface CalendarItem { + AbbrevName: string; + FullName: string; + + /** A unique ID for an entry of this type, usually the lower case abbreviated English name, for example, **"sun"** for Sunday. */ + ID: string; + } + + /** + * One entry in a calendar, for example, a day of week or a month or an era. + * + * Derived from {@link com.sun.star.i18n.CalendarItem} this provides an additional member for narrow names. + * @since LibreOffice 3.5 + */ + interface CalendarItem2 extends CalendarItem { + /** The narrow name, for example, **"S"** for Sunday or **"J"** for January. */ + NarrowName: string; + } + + /** + * Symbols, names, and attributes of a specific currency, returned in a sequence by {@link XLocaleData.getAllCurrencies()} . + * @see XLocaleData for links to DTD of XML locale data files. + */ + interface Currency { + /** + * {@link Currency} abbreviation used by banks and in money exchange, for example, **EUR** or **USD** . This usually should be identical to the ISO 4217 + * currency code also used in the {@link ID} , but doesn't necessarily have to be. + */ + BankSymbol: string; + + /** The number of decimal places, for example, **2** for US Dollar or **0** for Italian Lira. */ + DecimalPlaces: number; + + /** If this currency is the default currency for a given locale. */ + Default: boolean; + + /** ISO 4217 currency code identifier, for example, **EUR** or **USD** . */ + ID: string; + + /** Name of the currency, for example, **Euro** or **US Dollar** . Should be the localized name. */ + Name: string; + + /** {@link Currency} symbol, for example, **$** . */ + Symbol: string; + + /** + * If this currency is the one used in compatible number format codes with {@link FormatElement.formatIndex()} values in the range 12..17. Those format + * codes are used to generate some old style currency format codes for compatibility with StarOffice5 and StarOffice4. + * @see com.sun.star.i18n.NumberFormatIndex + */ + UsedInCompatibleFormatCodes: boolean; + } + + /** + * Symbols, names, and attributes of a specific currency, returned in a sequence by {@link XLocaleData2.getAllCurrencies2()} . + * + * It is derived from {@link com.sun.star.i18n.Currency} and provides an additional flag for currency entries that are available only for legacy reasons + * in context of loaded documents that use them, but otherwise should not be offered to the user to be selectable. + * @see XLocaleData for links to DTD of XML locale data files. + */ + interface Currency2 extends Currency { + /** + * If set, the currency and/or its symbol is only to be used in legacy context. + * @since OOo 2.0.3 + */ + LegacyOnly: boolean; + } + + /** + * Locale (mostly CJK) dependent characters that are forbidden at the start or end of a line. + * + * Returned by {@link XLocaleData.getForbiddenCharacters()} and used with {@link XForbiddenCharacters} methods. + */ + interface ForbiddenCharacters { + beginLine: string; + endLine: string; + } + + /** + * One number format code and its attributes, returned in a sequence by {@link XLocaleData.getAllFormats()} . + * + * Contains raw data defined in the XML locale data files. + * @see XLocaleData for links to DTD of XML locale data files. + */ + interface FormatElement { + /** The format code, for example, "YYYY-MM-DD". */ + formatCode: string; + + /** The index used by the number formatter, predefined values corresponding with {@link NumberFormatIndex} values. */ + formatIndex: number; + + /** A unique (within one locale) identifier. */ + formatKey: string; + + /** A name or description that is displayed in the number formatter dialog. */ + formatName: string; + + /** Type may be one of "short", "medium", "long". */ + formatType: string; + + /** Usage category, for example, "DATE" or "FIXED_NUMBER", corresponding with {@link KNumberFormatUsage} values. */ + formatUsage: string; + + /** If a format code is the default code of a **formatType** group. */ + isDefault: boolean; + } + + /** + * {@link Implementation} name details returned in a sequence by {@link XLocaleData.getCollatorImplementations()} . + * @see XLocaleData for links to DTD of XML locale data files. + */ + interface Implementation { + isDefault: boolean; + unoID: string; + } + + /** + * The language and country identifiers and descriptive names of the loaded locale data returned by {@link XLocaleData.getLanguageCountryInfo()} . + * @see XLocaleData for links to DTD of XML locale data files. + */ + interface LanguageCountryInfo { + Country: string; + CountryDefaultName: string; + Language: string; + LanguageDefaultName: string; + Variant: string; + } + + /** Hyphenation options passed in calls to {@link XBreakIterator.getLineBreak()} . */ + interface LineBreakHyphenationOptions { + /** Sequence of property values to be used by the hyphenator - can be empty if the default values (from the property set) should be used. */ + aHyphenationOptions: beans.PropertyValues; + + /** The first character not fitting to the current line, considering an additional "-" for hyphenation */ + hyphenIndex: number; + rHyphenator: linguistic2.XHyphenator; + } + + /** Results of method {@link XBreakIterator.getLineBreak()} . */ + interface LineBreakResults { + breakIndex: number; + breakType: number; + rHyphenatedWord: linguistic2.XHyphenatedWord; + } + + /** Line break options passed in calls to {@link XBreakIterator.getLineBreak()} . */ + interface LineBreakUserOptions { + allowHyphenateEnglish: boolean; + + /** + * If punctuation characters are allowed at the end of the line if outside of the margins, resulting in a line not being wrapped if only the punctuation + * would wrap. + */ + allowPunctuationOutsideMargin: boolean; + applyForbiddenRules: boolean; + forbiddenBeginCharacters: string; + forbiddenEndCharacters: string; + } + + /** + * Locale specific data, for example, separators, quotation marks. + * @see XLocaleData for links to DTD of XML locale data files. + */ + interface LocaleDataItem { + dateSeparator: string; + decimalSeparator: string; + doubleQuotationEnd: string; + doubleQuotationStart: string; + listSeparator: string; + LongDateDayOfWeekSeparator: string; + LongDateDaySeparator: string; + LongDateMonthSeparator: string; + LongDateYearSeparator: string; + measurementSystem: string; + quotationEnd: string; + quotationStart: string; + thousandSeparator: string; + time100SecSeparator: string; + timeAM: string; + timePM: string; + timeSeparator: string; + unoID: string; + } + + /** + * Attributes describing a native number mode for a specific locale, stored in XML file format. + * + * Used with {@link XNativeNumberSupplier.convertToXmlAttributes()} and {@link XNativeNumberSupplier.convertFromXmlAttributes()} + * @since OOo 1.1.2 + */ + interface NativeNumberXmlAttributes { + Format: string; + Locale: lang.Locale; + + /** The type of the number string, for example, "short" or "medium" or "long". */ + Style: string; + } + + /** Number format code information returned by various {@link XNumberFormatCode} methods. */ + interface NumberFormatCode { + Code: string; + Default: boolean; + DefaultName: string; + Index: number; + NameID: string; + Type: number; + Usage: number; + } + + /** Parser results returned by {@link XCharacterClassification.parseAnyToken()} and {@link XCharacterClassification.parsePredefinedToken()} . */ + interface ParseResult { + /** Number of code points (not UTF-16 code units) of the parsed token, not including leading whitespace. */ + CharLen: number; + + /** {@link KParseTokens} flags of remaining characters of actual token matched. */ + ContFlags: number; + + /** If a quoted name or string is encountered the dequoted result goes here. */ + DequotedNameOrString: string; + + /** UTF-16 code unit index of first unprocessed character. */ + EndPos: number; + + /** Count of ignored leading whitespace, in UTF-16 code units, not Unicode code points. */ + LeadingWhiteSpace: number; + + /** + * {@link KParseTokens} flags of first character of actual token matched. If **TokenType** is a {@link KParseType.SINGLE_QUOTE_NAME} or a {@link + * KParseType.DOUBLE_QUOTE_STRING} the first character is the first character inside the quotes, not the quote itself. + */ + StartFlags: number; + + /** {@link KParseType} token type like {@link KParseType.IDENTNAME} . */ + TokenType: number; + + /** Value of token in case of numeric. */ + Value: number; + } + + /** + * Text conversion result to be used with {@link XTextConversion} . + * @since OOo 1.1.2 + */ + interface TextConversionResult { + /** + * The boundary of the first convertible word in the given text. + * + * If there is no convertible word found in the text, **startPos** and **endPos** for {@link Boundary} equal 0. + */ + Boundary: Boundary; + + /** A list of replacement candidates for the first convertible word found in the given text. */ + Candidates: SafeArray; + } + + /** + * contains the base routines for iteration in Unicode string. Iterates over characters, words, sentences and line breaks. + * + * Assumption: StartPos is inclusive and EndPos is exclusive. + */ + interface XBreakIterator extends uno.XInterface { + /** + * Traverses in Text from **nStartPos** to the beginning of the specified character type. + * @param aText The input text. + * @param nStartPos The start index in aText. + * @param aLocale The locale of the character preceding **nStartPos** . + * @param nCharType One of {@link CharType} + * @returns The position where the character type starts + */ + beginOfCharBlock(aText: string, nStartPos: number, aLocale: lang.Locale, nCharType: number): number; + + /** + * Traverses in Text from **nStartPos** to the beginning of the specified script type. + * @param aText The input text. + * @param nStartPos The start index in aText. + * @param nScriptType One of {@link ScriptType} . + * @returns The position where the script type starts. + */ + beginOfScript(aText: string, nStartPos: number, nScriptType: number): number; + + /** + * Traverses in Text from **nStartPos** to the start of a sentence. + * @param aText The input text. + * @param nStartPos The start index in aText. + * @param aLocale The locale of the character preceding **nStartPos** . + * @returns The position where the sentence starts. + */ + beginOfSentence(aText: string, nStartPos: number, aLocale: lang.Locale): number; + + /** + * Traverses in Text from **nStartPos** to the end of the specified character type. + * @param aText The input text. + * @param nStartPos The start index in aText. + * @param aLocale The locale of the character preceding **nStartPos** . + * @param nCharType One of {@link CharType} + * @returns The position where the character type ends. + */ + endOfCharBlock(aText: string, nStartPos: number, aLocale: lang.Locale, nCharType: number): number; + + /** + * Traverses in Text from **nStartPos** to the end of the specified script type. + * @param aText The input text. + * @param nStartPos The start index in aText. + * @param nScriptType One of {@link ScriptType} . + * @returns The position where the script type ends. + */ + endOfScript(aText: string, nStartPos: number, nScriptType: number): number; + + /** + * Traverses in Text from **nStartPos** to the end of a sentence. + * @param aText The input text. + * @param nStartPos The start index in aText. + * @param aLocale The locale of the character preceding **nStartPos** . + * @returns The position where the sentence ends. + */ + endOfSentence(aText: string, nStartPos: number, aLocale: lang.Locale): number; + + /** + * Calculate the line break position in the Text from the specified **nStartPos** . + * @param aText The input text. + * @param nStartPos The start index in aText. + * @param aLocale The locale of the character preceding **nStartPos** . + * @param nMinBreakPos Defines a minimum break position for hyphenated line break. When the position for hyphenated line break is less than **nMinBreakPos* + * @param aHyphOptions Defines if the hyphenator is to be used. + * @param aUserOptions Defines how to handle hanging punctuations and forbidden characters at the start/end of a line. + * @returns The {@link LineBreakResults} contain the break position of the line, {@link BreakType} and {@link com.sun.star.linguistic2.XHyphenatedWord} + */ + getLineBreak(aText: string, nStartPos: number, aLocale: lang.Locale, nMinBreakPos: number, aHyphOptions: LineBreakHyphenationOptions, aUserOptions: LineBreakUserOptions): LineBreakResults; + + /** + * Get the script type of the character at position **nPos** . + * @param aText The input text. + * @param nPos The index in aText. + * @returns One of {@link ScriptType} . + */ + getScriptType(aText: string, nPos: number): number; + + /** + * Identifies StartPos and EndPos of current word. + * + * If **nPos** is the boundary of a word, it is StartPos of one word and EndPos of previous word. In this situation, the outcome of the algorithm can be + * indeterminate. In this situation the **bPreferForward** flag is used. If bPreferForward == `FALSE` , **nPos** is considered to be the end of the word + * and we look backwards for beginning of word, otherwise **nPos** is considered to be the start of the next word and we look forwards for the end of the + * word. + * @param aText The input text. + * @param nPos The start index in aText. + * @param aLocale The locale of the character preceding **nStartPos** . + * @param nWordType One of {@link WordType} . + * @param bPreferForward If `TRUE` , nPos should be considered the start of the next word and search proceeds forwards. If `FALSE` , nPos should be conside + * @returns The {@link Boundary} of the current word. + */ + getWordBoundary(aText: string, nPos: number, aLocale: lang.Locale, nWordType: number, bPreferForward: boolean): Boundary; + + /** @deprecated DeprecatedGet the WordType of the word that starts at position nPos. This method is mis-defined, since {@link WordType} is not an attribute of a */ + getWordType(aText: string, nPos: number, aLocale: lang.Locale): number; + + /** + * If a word starts at position **nPos** . + * + * It is possible that both of this method and following method **isEndWord** all return `TRUE` , since StartPos of a word is inclusive while EndPos of a + * word is exclusive. + */ + isBeginWord(aText: string, nPos: number, aLocale: lang.Locale, nWordType: number): boolean; + + /** If a word ends at position **nPos** . */ + isEndWord(aText: string, nPos: number, aLocale: lang.Locale, nWordType: number): boolean; + + /** + * Traverses specified number of characters/cells in Text from **nStartPos** forwards. {@link CharacterIteratorMode} can be cell based or character + * based. A cell is made of more than one character. + * @param aText The input text. + * @param nStartPos The start index in aText. + * @param aLocale The locale of the character preceding **nStartPos** . + * @param nCharacterIteratorMode A constant from {@link CharacterIteratorMode} + * @param nCount Number of characters to traverse, it should not be less than 0. If you want to traverse in the opposite direction use {@link XBreakIterato + * @param nDone Out parameter to receive the number of cells/Unicode characters traversed. + */ + nextCharacters(aText: string, nStartPos: number, aLocale: lang.Locale, nCharacterIteratorMode: number, nCount: number, nDone: [number]): number; + + /** + * Traverses in Text from **nStartPos** to the next start of the specified character type. + * @param aText The input text. + * @param nStartPos The start index in aText. + * @param aLocale The locale of the character preceding **nStartPos** . + * @param nCharType One of {@link CharType} + * @returns The position where the next character type starts. + */ + nextCharBlock(aText: string, nStartPos: number, aLocale: lang.Locale, nCharType: number): number; + + /** + * Traverses in Text from **nStartPos** to the next start of the specified script type. + * @param aText The input text. + * @param nStartPos The start index in aText. + * @param nScriptType One of {@link ScriptType} . + * @returns The position where the next script type starts. + */ + nextScript(aText: string, nStartPos: number, nScriptType: number): number; + + /** + * Traverses one word in Text from **nStartPos** forwards. + * @param aText The input text. + * @param nStartPos The start index in aText. + * @param aLocale The locale of the character preceding **nStartPos** . + * @param nWordType One of {@link WordType} , specifies the type of traveling. + * @returns The {@link Boundary} of the found word. Normally used for CTRL-Right. + */ + nextWord(aText: string, nStartPos: number, aLocale: lang.Locale, nWordType: number): Boundary; + + /** + * Traverses specified number of characters/cells in Text from **nStartPos** backwards. {@link CharacterIteratorMode} can be cell based or character + * based. A cell is made of more than one character. + * @param aText The input text. + * @param nStartPos The start index in aText. + * @param aLocale The locale of the character preceding **nStartPos** . + * @param nCharacterIteratorMode A constant from {@link CharacterIteratorMode} + * @param nCount Number of characters to traverse, it should not be less than 0. If you want to traverse in the opposite direction use {@link XBreakIterato + * @param nDone Out parameter to receive the number of cells/Unicode characters traversed. + */ + previousCharacters(aText: string, nStartPos: number, aLocale: lang.Locale, nCharacterIteratorMode: number, nCount: number, nDone: [number]): number; + + /** + * Traverses in Text from **nStartPos** to the previous start of the specified character type. + * @param aText The input text. + * @param nStartPos The start index in aText. + * @param aLocale The locale of the character preceding **nStartPos** . + * @param nCharType One of {@link CharType} + * @returns The position where the previous character type starts. + */ + previousCharBlock(aText: string, nStartPos: number, aLocale: lang.Locale, nCharType: number): number; + + /** + * Traverses in Text from **nStartPos** to the previous start of the specified script type. + * @param aText The input text. + * @param nStartPos The start index in aText. + * @param nScriptType One of {@link ScriptType} . + * @returns The position where the previous script type starts. + */ + previousScript(aText: string, nStartPos: number, nScriptType: number): number; + + /** + * Traverses one word in Text from **nStartPos** backwards. + * @param aText The input text. + * @param nStartPos The start index in aText. + * @param aLocale The locale of the character preceding **nStartPos** . If the previous character is a space character and **nWordType** indicates spaces + * @param nWordType One of {@link WordType} , specifies the type of traveling. + * @returns The {@link Boundary} of the found word. Normally used for CTRL-Left. + */ + previousWord(aText: string, nStartPos: number, aLocale: lang.Locale, nWordType: number): Boundary; + } + + /** Access to locale specific calendar systems. */ + interface XCalendar extends uno.XInterface { + /** + * Add an amount to a field. + * @param nCalendarFieldIndex One of {@link CalendarFieldIndex} values. + * @param nAmount The amount to add. + */ + addValue(nCalendarFieldIndex: number, nAmount: number): void; + + /** + * Get the UTC date/time as an offset to the start of the calendar at 1-Jan-1970 00:00. The integer part represents the number of days passed since start + * date. The fractional part represents fractions of a day, thus 0.5 means 12 hours. + */ + DateTime: number; + + /** returns a sequence of {@link CalendarItem} describing the day names. */ + readonly Days: SafeArray; + + /** returns the first day of a week, one of {@link Weekdays} values. */ + FirstDayOfWeek: number; + getAllCalendars(rLocale: lang.Locale): SafeArray; + + /** + * Get the UTC date/time as an offset to the start of the calendar at 1-Jan-1970 00:00. The integer part represents the number of days passed since start + * date. The fractional part represents fractions of a day, thus 0.5 means 12 hours. + */ + getDateTime(): number; + + /** returns a sequence of {@link CalendarItem} describing the day names. */ + getDays(): SafeArray; + + /** + * Returns a string (name to display) matching the given parameters. + * @param nCalendarDisplayIndex One of {@link CalendarDisplayIndex} values + * @param nIdx A value matching the **nCalendarDisplayIndex** type: **CalendarDisplayIndex::AM_PM**: one of {@link AmPmValue}**CalendarDisplayIndex::DAY**: + * @param nNameType A value indicating whether to return the abbreviated or the full name, or the narrow name for some {@link CalendarDisplayIndex} values. + * @since LibreOffice 3.5 This parameter is not used if the **nCalendarDisplayIndex** argument equals {@link CalendarDisplayIndex.AM_PM} + */ + getDisplayName(nCalendarDisplayIndex: number, nIdx: number, nNameType: number): string; + + /** returns the first day of a week, one of {@link Weekdays} values. */ + getFirstDayOfWeek(): number; + getLoadedCalendar(): Calendar; + + /** returns how many days of a week must reside in the first week of a year. */ + getMinimumNumberOfDaysForFirstWeek(): number; + + /** returns a sequence of {@link CalendarItem} describing the month names. */ + getMonths(): SafeArray; + getNumberOfDaysInWeek(): number; + getNumberOfMonthsInYear(): number; + + /** Returns the ID string of the loaded calendar, for example, **"Gregorian"** */ + getUniqueID(): string; + + /** + * Get the value of a field. + * @param nCalendarFieldIndex One of {@link CalendarFieldIndex} values. + */ + getValue(nCalendarFieldIndex: number): number; + + /** + * Verify if the date fields set by a combination of {@link XCalendar.setValue()} calls is valid. It has a side-effect because it will internally + * calculate the final value for the date fields + */ + isValid(): boolean; + loadCalendar(uniqueID: string, rLocale: lang.Locale): void; + loadDefaultCalendar(rLocale: lang.Locale): void; + readonly LoadedCalendar: Calendar; + + /** returns how many days of a week must reside in the first week of a year. */ + MinimumNumberOfDaysForFirstWeek: number; + + /** returns a sequence of {@link CalendarItem} describing the month names. */ + readonly Months: SafeArray; + readonly NumberOfDaysInWeek: number; + readonly NumberOfMonthsInYear: number; + + /** + * Set the UTC date/time as an offset to the start of the calendar at 1-Jan-1970 00:00. The integer part represents the number of days passed since start + * date. The fractional part represents fractions of a day, thus 0.5 means 12 hours. + */ + setDateTime(nTimeInDays: number): void; + + /** Set the first day of a week, one of {@link Weekdays} values. */ + setFirstDayOfWeek(nDay: number): void; + + /** Set how many days of a week must reside in the first week of a year. */ + setMinimumNumberOfDaysForFirstWeek(nDays: number): void; + + /** + * Set the value of a field. + * @param nCalendarFieldIndex One of {@link CalendarFieldIndex} values. + * @param nValue A value of the allowed range for the field index. + */ + setValue(nCalendarFieldIndex: number, nValue: number): void; + + /** Returns the ID string of the loaded calendar, for example, **"Gregorian"** */ + readonly UniqueID: string; + } + + /** + * This interface provides access to locale specific calendar systems. + * + * It is derived from {@link com.sun.star.i18n.XExtendedCalendar} and provides additional methods to obtain {@link Calendar2} items that include the + * possessive genitive case month names and sequences of {@link CalendarItem2} items.. + * @since LibreOffice 3.5 + */ + interface XCalendar3 extends XExtendedCalendar { + /** returns a sequence of {@link CalendarItem2} describing the day names. */ + readonly Days2: SafeArray; + + /** returns a sequence of {@link CalendarItem2} describing the genitive case month names. */ + readonly GenitiveMonths2: SafeArray; + + /** returns a sequence of {@link CalendarItem2} describing the day names. */ + getDays2(): SafeArray; + + /** returns a sequence of {@link CalendarItem2} describing the genitive case month names. */ + getGenitiveMonths2(): SafeArray; + getLoadedCalendar2(): Calendar2; + + /** returns a sequence of {@link CalendarItem2} describing the month names. */ + getMonths2(): SafeArray; + + /** returns a sequence of {@link CalendarItem2} describing the partitive case month names. */ + getPartitiveMonths2(): SafeArray; + readonly LoadedCalendar2: Calendar2; + + /** returns a sequence of {@link CalendarItem2} describing the month names. */ + readonly Months2: SafeArray; + + /** returns a sequence of {@link CalendarItem2} describing the partitive case month names. */ + readonly PartitiveMonths2: SafeArray; + } + + /** + * This interface provides access to locale specific calendar systems. + * + * It is derived from {@link com.sun.star.i18n.XCalendar3} and provides additional methods to set and get the local time. + * @since LibreOffice 5.0 + */ + interface XCalendar4 extends XCalendar3 { + /** + * Get the local date/time as an offset to the start of the calendar at 1-Jan-1970 00:00. The integer part represents the number of days passed since + * start date. The fractional part represents fractions of a day, thus 0.5 means 12 hours. + * + * The actual timezone and daylight saving time offsets effective at the given date and time are considered and added to the UTC time at the calendar. + */ + getLocalDateTime(): number; + + /** + * Get the local date/time as an offset to the start of the calendar at 1-Jan-1970 00:00. The integer part represents the number of days passed since + * start date. The fractional part represents fractions of a day, thus 0.5 means 12 hours. + * + * The actual timezone and daylight saving time offsets effective at the given date and time are considered and added to the UTC time at the calendar. + */ + LocalDateTime: number; + + /** + * Set the local date/time as an offset to the start of the calendar at 1-Jan-1970 00:00. The integer part represents the number of days passed since + * start date. The fractional part represents fractions of a day, thus 0.5 means 12 hours. + * + * The actual timezone and daylight saving time offsets effective at the given date and time are considered and subtracted before setting the UTC time at + * the calendar. + */ + setLocalDateTime(TimeInDays: number): void; + } + + /** Character classification (upper, lower, digit, letter, number, ...) and generic Unicode enabled parser. */ + interface XCharacterClassification extends uno.XInterface { + /** Get DirectionProperty of character at position **nPos** . */ + getCharacterDirection(aText: string, nPos: number): number; + getCharacterType(aText: string, nPos: number, aLocale: lang.Locale): number; + getScript(aText: string, nPos: number): number; + + /** + * Get accumulated KCharacterTypes of string starting at position **nPos** of length **nCount** code points. + * @returns A number with appropriate flags set to indicate what type of characters the string contains, each flag value being one of {@link KCharacterType} + */ + getStringType(aText: string, nPos: number, nCount: number, aLocale: lang.Locale): number; + getType(aText: string, nPos: number): number; + + /** + * Parse a string for a token starting at position **nPos** . + * + * A name or identifier must match the {@link KParseTokens} criteria passed in **nStartCharFlags** and **nContCharFlags** and may additionally contain + * characters of **aUserDefinedCharactersStart** and/or **aUserDefinedCharactersCont** . + * @param aText Text to be parsed. + * @param nPos Position where parsing starts. + * @param aLocale The locale, for example, for decimal and group separator or character type determination. + * @param nStartCharFlags A set of {@link KParseTokens} constants determining the allowed characters a name or identifier may start with. + * @param aUserDefinedCharactersStart A set of additionally allowed characters a name or identifier may start with. + * @param nContCharFlags A set of {@link KParseTokens} constants determining the allowed characters a name or identifier may continue with. + * @param aUserDefinedCharactersCont A set of additionally allowed characters a name or identifier may continue with.{{program example here, see documentation}} + * @returns A filled {@link ParseResult} structure. If no unambiguous token could be parsed, {@link ParseResult.TokenType} will be set to **0** (zero), other + */ + parseAnyToken( + aText: string, nPos: number, aLocale: lang.Locale, nStartCharFlags: number, aUserDefinedCharactersStart: string, nContCharFlags: number, + aUserDefinedCharactersCont: string): ParseResult; + + /** + * Parse a string for a token of type **nTokenType** starting at position **nPos** . + * + * Other parameters are the same as in {@link parseAnyToken()} . If the actual token does not match the passed **nTokenType** a {@link + * ParseResult.TokenType} set to **0** (zero) is returned. + * @param nTokenType One or more of the {@link KParseType} constants. + * @param aText See {@link parseAnyToken} + * @param nPos See {@link parseAnyToken} + * @param aLocale See {@link parseAnyToken} + * @param nStartCharFlags See {@link parseAnyToken} + * @param aUserDefinedCharactersStart See {@link parseAnyToken} + * @param nContCharFlags See {@link parseAnyToken} + * @param aUserDefinedCharactersCont See {@link parseAnyToken}{{program example here, see documentation}} + */ + parsePredefinedToken( + nTokenType: number, aText: string, nPos: number, aLocale: lang.Locale, nStartCharFlags: number, aUserDefinedCharactersStart: string, + nContCharFlags: number, aUserDefinedCharactersCont: string): ParseResult; + + /** Convert upper case alpha to lower case alpha, starting at position **nPos** for **nCount** code points. */ + toLower(aText: string, nPos: number, nCount: number, aLocale: lang.Locale): string; + + /** Convert to title case, starting at position **nPos** for **nCount** code points. */ + toTitle(aText: string, nPos: number, nCount: number, aLocale: lang.Locale): string; + + /** Convert lower case alpha to upper case alpha, starting at position **nPos** for **nCount** code points. */ + toUpper(aText: string, nPos: number, nCount: number, aLocale: lang.Locale): string; + } + + /** provides locale-sensitive collation algorithms for string comparison. */ + interface XCollator extends uno.XInterface { + /** + * Compare 2 strings in specific locale and algorithm. + * @param aStr1 First string. + * @param aStr2 Second string. + * @returns 1 if the first string is greater than the second string ; 0 if the first string is equal to the second string ; -1 if the first string is less + */ + compareString(aStr1: string, aStr2: string): number; + + /** + * Compare 2 substrings in specific locale and algorithm. + * @param aStr1 First string. + * @param nOff1 Offset (from 0) of the first string. + * @param nLen1 Length (from offset) of the first substring. + * @param aStr2 Second string + * @param nOff2 Offset (from 0) of the second string. + * @param nLen2 Length (from offset) of the second substring. + * @returns 1 if the first string is greater than the second string ; 0 if the first string is equal to the second string ; -1 if the first string is less + */ + compareSubstring(aStr1: string, nOff1: number, nLen1: number, aStr2: string, nOff2: number, nLen2: number): number; + + /** + * List all collator algorithms for a given locale. + * @param aLocale The locale for which to list algorithms. + * @returns A sequence of algorithm names. + */ + listCollatorAlgorithms(aLocale: lang.Locale): SafeArray; + + /** + * List all end user collator options for a given algorithm. + * @param aAlgorithmName The algorithm name for this collator. + * @returns An array of end user options available for the algorithm. + */ + listCollatorOptions(aAlgorithmName: string): SafeArray; + + /** + * Load a particular collator algorithm for the locale. + * @param aAlgorithmName The algorithm to load. + * @param aLocale The locale for this collator. + * @param nCollatorOptions A mask of {@link CollatorOptions} . + * @returns Returns 0 when loading was successful, otherwise throws runtime exception. + */ + loadCollatorAlgorithm(aAlgorithmName: string, aLocale: lang.Locale, nCollatorOptions: number): number; + + /** + * Load a collator algorithm with options chosen by end user. + * @param aAlgorithmName The algorithm name to load. + * @param aLocale The locale for this collator. + * @param aCollatorOptions A sequence of end user collator options like those returned by {@link XCollator.listCollatorOptions()} . + */ + loadCollatorAlgorithmWithEndUserOption(aAlgorithmName: string, aLocale: lang.Locale, aCollatorOptions: LibreOffice.SeqEquiv): void; + + /** + * Load the collator with default algorithm defined in locale data. + * @param aLocale The locale for this collator. + * @param nCollatorOptions A mask of {@link CollatorOptions} . + * @returns Returns 0 when loading was successful, otherwise throws runtime exception. In fact the return value should be ignored and the exception be caught + */ + loadDefaultCollator(aLocale: lang.Locale, nCollatorOptions: number): number; + } + + /** + * This interface provides access to locale specific calendar systems. + * + * It is derived from {@link com.sun.star.i18n.XCalendar} and provides additional functionality to display parts of the date currently set at the + * calendar. + * @since OOo 1.1.2 + */ + interface XExtendedCalendar extends XCalendar { + /** + * Returns a string (number or name to display) matching the given code constant. + * + * Note that the string returned depends completely on the locale's calendar. It is not predictable if the string will be numeric or a name, or if in + * case it returns a numeric string how many digits that will have. For example, a short year display string will normally be two digits with a Gregorian + * calendar, but with a Jewish calendar it will have three digits. + * @param nCalendarDisplayCode One of {@link CalendarDisplayCode} + * @param nNativeNumberMode One of {@link NativeNumberMode} . ; This argument designates the basic transliteration mode as if specified for the year repre + */ + getDisplayString(nCalendarDisplayCode: number, nNativeNumberMode: number): string; + } + + /** + * This interface provides information for creating "Table of Index" + * + * It is derived from {@link com.sun.star.i18n.XIndexEntrySupplier} and provides following additional functionalities. + * + * Provide supported language/locale list.Provide supported algorithm list.Provide phonetic entry support for CJK language.Provide method to compare + * index entry. + * @since OOo 1.1.2 + */ + interface XExtendedIndexEntrySupplier extends XIndexEntrySupplier { + /** + * Compares index entries + * + * Note that loadAlgorithm should be called before calling this function. + * @param aIndexEntry1 + * @param aIndexEntry2 Index entries to be compared + * @param aPhoneticEntry1 + * @param aPhoneticEntry2 Phonetic entries to be compared + * @param aLocale1 + * @param aLocale2 Language attribute for index and phonetic entry. ; aLocale and the locale in loadAlgorithm may be different. In the case they are diffe + */ + compareIndexEntry(aIndexEntry1: string, aPhoneticEntry1: string, aLocale1: lang.Locale, aIndexEntry2: string, aPhoneticEntry2: string, aLocale2: lang.Locale): number; + + /** Returns index algorithm list for specific locale */ + getAlgorithmList(aLocale: lang.Locale): SafeArray; + + /** + * Returns index key. + * + * Note that loadAlgorithm should be called before calling this function. + * @param aIndexEntry Index entry + * @param aPhoneticEntry Phonetic entry + * @param aLocale Language attribute for index and phonetic entry. ; aLocale and the locale in loadAlgorithm may be different. In the case they are differ + */ + getIndexKey(aIndexEntry: string, aPhoneticEntry: string, aLocale: lang.Locale): string; + + /** Returns locale list for which the {@link IndexEntrySupplier} provides service. */ + getLocaleList(): SafeArray; + + /** Returns phonetic candidate for index entry for the locale. */ + getPhoneticCandidate(aIndexEntry: string, aLocale: lang.Locale): string; + + /** + * Loads index algorithm for the locale. + * @param aLocale The locale. + * @param aIndexAlgorithm Index algorithm to be loaded. + * @param nCollatorOptions Sorting option of {@link com.sun.star.i18n.CollatorOptions} for comparing index entries + * @returns `TRUE` if algorithm successfully loaded, `FALSE` else. + */ + loadAlgorithm(aLocale: lang.Locale, aIndexAlgorithm: string, nCollatorOptions: number): boolean; + + /** Returns locale list for which the {@link IndexEntrySupplier} provides service. */ + readonly LocaleList: SafeArray; + + /** Checks if Phonetic Entry should be used for the locale. */ + usePhoneticEntry(aLocale: lang.Locale): boolean; + } + + /** + * This interface perform input sequence correction for the languages like Thai and Hindi + * + * It is derived from {@link com.sun.star.i18n.XInputSequenceChecker} and provides additional functionality to correct input sequence. + * @since OOo 2.0.1 + */ + interface XExtendedInputSequenceChecker extends XInputSequenceChecker { + /** + * @param aText Text to be checked and corrected. + * @param nPos Index in aText where checking starts. + * @param cInputChar The input character. Or at least, a UTF16 code unit thereof. It looks like this interface was not designed with non-BMP characters in + * @param nInputCheckMode One of {@link InputSequenceCheckMode} constants. + * @returns Next nPos, or length of aText if nothing is corrected. + */ + correctInputSequence(aText: [string], nPos: number, cInputChar: string, nInputCheckMode: number): number; + } + + /** + * This interface provides Text Conversion service. + * + * It is derived from {@link com.sun.star.i18n.XTextConversion} and provides a new conversion function containing position map (offset) between original + * and converted string. + * @since OOo 2.0 + */ + interface XExtendedTextConversion extends XTextConversion { + /** + * The functionality of this method is same as {@link com.sun.star.i18n.XTextConversion.getConversion()} , except an additional output parameter rOffset. + * @param aText See {@link com.sun.star.i18n.XTextConversion.getConversion()} + * @param nStartPos See {@link com.sun.star.i18n.XTextConversion.getConversion()} + * @param nLength See {@link com.sun.star.i18n.XTextConversion.getConversion()} + * @param aLocale See {@link com.sun.star.i18n.XTextConversion.getConversion()} + * @param nTextConversionType See {@link com.sun.star.i18n.XTextConversion.getConversion()} + * @param nTextConversionOptions See {@link com.sun.star.i18n.XTextConversion.getConversion()} + * @param rOffset To find the grapheme of input string corresponding to the grapheme of output string, rOffset provides the offset array whose index is the + */ + getConversionWithOffset( + aText: string, nStartPos: number, nLength: number, aLocale: lang.Locale, nTextConversionType: number, nTextConversionOptions: number, rOffset: [LibreOffice.SeqEquiv]): string; + } + + /** + * This interface provides character conversions like case folding or Hiragana to Katakana. + * + * It is derived from {@link com.sun.star.i18n.XTransliteration} and provides additional functionality for character to character and string to string + * without offset parameter transliteration. These should be used for performance reason if their full-blown counterparts aren't needed. + * @since OOo 1.1.2 + */ + interface XExtendedTransliteration extends XTransliteration { + /** + * Transliterate a character to a character. + * + * If the output contains multiple characters, for example when transliterating German sharp "s" (the one that looks like a Greek Beta) to upper case + * "SS", {@link MultipleCharsOutputException} will be thrown, the caller must catch the exception and then call + * XTransliteration::transliterateChar2String() to obtain the correct result. + * @param cChar The input character. + */ + transliterateChar2Char(cChar: string): string; + + /** + * Transliterate a character to a string. + * @param cChar The input character. + */ + transliterateChar2String(cChar: string): string; + + /** + * Transliterate a substring. The functionality is the same as {@link com.sun.star.i18n.XTransliteration.transliterate()} but omits the offset parameter + * to improve performance. + * @param aStr The input string. + * @param nStartPos Start position within aStr from where transliteration starts. + * @param nCount Number of code points to be transliterated. + */ + transliterateString2String(aStr: string, nStartPos: number, nCount: number): string; + } + + /** + * provides access to forbidden character settings in a document. + * + * In some languages, particular characters are not allowed to be placed at the beginning or at the end of a text line. + */ + interface XForbiddenCharacters extends uno.XInterface { + /** returns the forbidden characters for a given locale. */ + getForbiddenCharacters(aLocale: lang.Locale): ForbiddenCharacters; + + /** determines if forbidden characters are set for a given locale. */ + hasForbiddenCharacters(aLocale: lang.Locale): boolean; + + /** removes the setting of forbidden characters for a given locale. */ + removeForbiddenCharacters(aLocale: lang.Locale): void; + + /** sets the forbidden characters for a given Locale. */ + setForbiddenCharacters(aLocale: lang.Locale, aForbiddenCharacters: ForbiddenCharacters): void; + } + + /** supplies information on index entries to generate a "table of; alphabetical index" for a given locale. */ + interface XIndexEntrySupplier extends uno.XInterface { + /** + * returns the capital index key for sorting a table of indexes, to a given index entry, to a given {@link com.sun.star.lang.Locale} and to a given sort + * algorithm. + * + * For example, in English locale it returns **"K"** for "keyboard" + */ + getIndexCharacter(aIndexEntry: string, aLocale: lang.Locale, aSortAlgorithm: string): string; + + /** + * returns the page number word of an index entry, where one page or more pages are combined to one page number entry, for a given {@link + * com.sun.star.lang.Locale} . + * + * For example, in English locale it returns ; **"p."** for **bMorePages** == `FALSE`; **"pp."** for **bMorePages** == `TRUE` + */ + getIndexFollowPageWord(bMorePages: boolean, aLocale: lang.Locale): string; + } + + /** + * contains the routine to check Thai input sequence checking + * @since OOo 1.1.2 + */ + interface XInputSequenceChecker extends uno.XInterface { + /** + * @param aText Text to be checked. + * @param nPos Index in aText where checking starts. + * @param cInputChar The input character. Or at least, a UTF16 code unit thereof. It looks like this interface was not designed with non-BMP characters in + * @param nInputCheckMode One of {@link InputSequenceCheckMode} constants. + * @returns true/false for the input check + */ + checkInputSequence(aText: string, nPos: number, cInputChar: string, nInputCheckMode: number): boolean; + } + + /** + * Access locale specific data as it is defined in XML locale data files compiled into the binary data libraries liblocaledata*.so respectively + * localedata*.dll. + * + * For XML locale data files definitions see [the DTD file]{@link + * url="http://cgit.freedesktop.org/libreoffice/core/tree/i18npool/source/localedata/data/locale.dtd"} . + */ + interface XLocaleData extends uno.XInterface { + /** returns all available locales. */ + readonly AllInstalledLocaleNames: SafeArray; + + /** returns all LC_CALENDAR calendars for a locale. */ + getAllCalendars(aLocale: lang.Locale): SafeArray; + + /** returns all LC_CURRENCY currencies for a locale. */ + getAllCurrencies(aLocale: lang.Locale): SafeArray; + + /** returns all LC_FORMAT format elements for a locale. */ + getAllFormats(aLocale: lang.Locale): SafeArray; + + /** returns all available locales. */ + getAllInstalledLocaleNames(): SafeArray; + + /** returns all LC_COLLATION collation options for a locale. */ + getCollationOptions(aLocale: lang.Locale): SafeArray; + + /** returns all LC_COLLATION collators for a locale. */ + getCollatorImplementations(aLocale: lang.Locale): SafeArray; + + /** returns all LC_MISC forbidden characters for a locale. */ + getForbiddenCharacters(aLocale: lang.Locale): ForbiddenCharacters; + + /** returns the LC_INFO locale information. */ + getLanguageCountryInfo(aLocale: lang.Locale): LanguageCountryInfo; + + /** returns LC_CTYPE separators and markers. */ + getLocaleItem(aLocale: lang.Locale): LocaleDataItem; + + /** + * returns all LC_MISC reserved words for a locale. + * @see reservedWords + */ + getReservedWord(aLocale: lang.Locale): SafeArray; + + /** returns all LC_SEARCH search options for a locale. */ + getSearchOptions(aLocale: lang.Locale): SafeArray; + + /** returns all LC_TRANSLITERATION transliterations for a locale. */ + getTransliterations(aLocale: lang.Locale): SafeArray; + } + + /** + * Access locale specific data. + * + * Derived from {@link com.sun.star.i18n.XLocaleData} and provides an additional method to return a sequence of all {@link com.sun.star.i18n.Currency2} + * elements available for that locale. + * @since OOo 2.0.3 + */ + interface XLocaleData2 extends XLocaleData { + /** returns all LC_CURRENCY currencies for a locale. */ + getAllCurrencies2(aLocale: lang.Locale): SafeArray; + } + + /** + * Access locale specific data. + * + * Derived from {@link com.sun.star.i18n.XLocaleData2} this provides an additional method to return a sequence of all {@link com.sun.star.i18n.Calendar2} + * elements available for that locale. + * @since LibreOffice 3.5 + */ + interface XLocaleData3 extends XLocaleData2 { + /** returns all LC_CALENDAR calendars for a locale. */ + getAllCalendars2(aLocale: lang.Locale): SafeArray; + } + + /** + * Access locale specific data. + * + * Derived from {@link com.sun.star.i18n.XLocaleData3} this provides an additional method to return a sequence of date acceptance patterns for a locale. + * @since LibreOffice 3.6 + */ + interface XLocaleData4 extends XLocaleData3 { + /** + * returns a sequence of date acceptance patterns for a locale + * + * Patterns with input combinations that are accepted as incomplete date input, such as **M/D** or **D.M.** + */ + getDateAcceptancePatterns(aLocale: lang.Locale): SafeArray; + } + + /** + * Methods to convert between strings of ASCII Arabic digits and native numeral strings. + * @since OOo 1.1.2 + */ + interface XNativeNumberSupplier extends uno.XInterface { + /** + * Convert XML attributes to a NatNum value. + * @returns One of {@link NativeNumberMode} + */ + convertFromXmlAttributes(aAttr: NativeNumberXmlAttributes): number; + + /** + * Convert a specific NatNum/Locale combination to attributes used in the XML file format. + * @param nNativeNumberMode One of {@link NativeNumberMode} values. + * @param aLocale The locale. + */ + convertToXmlAttributes(aLocale: lang.Locale, nNativeNumberMode: number): NativeNumberXmlAttributes; + + /** + * Returns native number string for given number string. + * @param aNumberString The input string. + * @param nNativeNumberMode One of {@link NativeNumberMode} values. + * @param aLocale The locale. + */ + getNativeNumberString(aNumberString: string, aLocale: lang.Locale, nNativeNumberMode: number): string; + + /** + * Check if the NatNum is valid for the given locale. + * @param nNativeNumberMode One of {@link NativeNumberMode} values. + * @param aLocale The locale. + */ + isValidNatNum(aLocale: lang.Locale, nNativeNumberMode: number): boolean; + } + + /** Access number format codes defined in locale data. */ + interface XNumberFormatCode extends uno.XInterface { + /** + * returns all format codes for a given **nFormatUsage** and locale. + * @param nFormatUsage one of {@link KNumberFormatUsage} values + * @param rLocale The locale for which the format codes are requested. + */ + getAllFormatCode(nFormatUsage: number, rLocale: lang.Locale): SafeArray; + + /** + * returns all format codes for a given locale. + * @param rLocale The locale for which the format codes are requested. + */ + getAllFormatCodes(rLocale: lang.Locale): SafeArray; + + /** + * returns the default number format code of a specific category (usage group) for a given locale and format length type. + * @param nFormatType one of the constants listed in {@link KNumberFormatType} + * @param nFormatUsage one of {@link KNumberFormatUsage} values + * @param rLocale The locale for which the format code is requested. + */ + getDefault(nFormatType: number, nFormatUsage: number, rLocale: lang.Locale): NumberFormatCode; + + /** + * returns the number format pointed to by **nFormatIndex** for a given locale. + * @param nFormatIndex one of {@link NumberFormatIndex} values + * @param rLocale The locale for which the format code is requested. + */ + getFormatCode(nFormatIndex: number, rLocale: lang.Locale): NumberFormatCode; + } + + /** + * provides access to locale specific ordinal suffix systems. + * @since OOo 2.2 + */ + interface XOrdinalSuffix extends uno.XInterface { + /** + * Returns all the possible ordinal suffixes for the number. + * + * This method will provide "st", "nd", "rd", "th" for an English locale, depending on the provided number. In some locales + * like French, Italian or Spanish it ca return several suffixes for one number. + * + * Examples: for the number '1', the values will be **st** in English, but **er** and **re** in French. All these values may depend on the underlying + * version of ICU. + */ + getOrdinalSuffix(nNumber: number, aLocale: lang.Locale): SafeArray; + } + + /** + * contains the help routines for layouting complex text + * + * Assumption - StartPos is inclusive and EndPos is exclusive. + * + * The **nScriptDirection** parameters are of type {@link ScriptDirection} + * @since OOo 1.1.2 + */ + interface XScriptTypeDetector extends uno.XInterface { + /** @returns the position where the specified CTL Script Type starts. */ + beginOfCTLScriptType(aText: string, nPos: number): number; + + /** @returns the position where the specified Script Direction starts. */ + beginOfScriptDirection(aText: string, nPos: number, nScriptDirection: number): number; + + /** @returns the position where the specified CTL Script Type ends. */ + endOfCTLScriptType(aText: string, nPos: number): number; + + /** @returns the position where the specified Script Direction ends. */ + endOfScriptDirection(aText: string, nPos: number, nScriptDirection: number): number; + + /** @returns the CTL script type of the current position. ; One of {@link CTLScriptType} constants. */ + getCTLScriptType(aText: string, nPos: number): number; + + /** @returns the Script Direction of the current position. */ + getScriptDirection(aText: string, nPos: number, nDefaultScriptDirection: number): number; + } + + /** + * Method to convert text from one type to another + * @since OOo 1.1.2 + */ + interface XTextConversion extends uno.XInterface { + /** + * Method to search dictionaries for the conversion candidate, if there are multiple candidates, it will return first one. This is for the conversion in + * non-interactive mode. + * @param aText Text string to be converted. + * @param nStartPos The start position in aText for the conversion + * @param nLength The length of the portion in aText for the conversion + * @param Locale Locale the conversion is referring to. + * @param nTextConversionType One of {@link TextConversionType} values. + * @param nTextConversionOptions Combination of {@link TextConversionOption} values. + * @returns Converted text + * @throws NoSupportException when **nConversionDictionaryType** is not known by the implementation, or when the locale is not supported. + */ + getConversion(aText: string, nStartPos: number, nLength: number, Locale: lang.Locale, nTextConversionType: number, nTextConversionOptions: number): string; + + /** + * Method to search dictionaries for the conversion candidates. + * @param aText Text string to be converted. + * @param nStartPos The start position in aText for the conversion + * @param nLength The length of the portion in aText for the conversion + * @param Locale Locale the conversion is referring to. + * @param nTextConversionType One of {@link TextConversionType} values. + * @param nTextConversionOptions Combination of {@link TextConversionOption} values. + * @returns {@link TextConversionResult} + * @throws NoSupportException when **nConversionDictionaryType** is not known by the implementation, or when the locale is not supported. + */ + getConversions(aText: string, nStartPos: number, nLength: number, Locale: lang.Locale, nTextConversionType: number, nTextConversionOptions: number): TextConversionResult; + + /** + * Method to query if the conversion type should be interactive or non-interactive mode. + * @param Locale Locale the conversion is referring to. + * @param nTextConversionType One of {@link TextConversionType} values. + * @param nTextConversionOptions Combination of {@link TextConversionOption} values. + * @returns `TRUE` if the entry is a valid entry for the dictionary `FALSE` otherwise. + * @throws NoSupportException when **nConversionDictionaryType** is not known by the implementation, or when the locale is not supported. + */ + interactiveConversion(Locale: lang.Locale, nTextConversionType: number, nTextConversionOptions: number): boolean; + } + + /** + * Character conversions like case folding or Hiragana to Katakana. + * + * {@link Transliteration} is a character to character conversion but it is not always a one to one mapping between characters. {@link Transliteration} + * modules are primarily used by collation, and search and replace modules to perform approximate search. It can also be used to format the numbers in + * different numbering systems. + * + * In order to select transliteration modules for different purposes, they are classified with attributes of {@link TransliterationType} . + * + * For Western languages there would be three transliteration modules available to compare two mixed case strings: upper to lower, lower to upper, and + * ignore case. + * + * A typical calling sequence of transliteration is 1. {@link getAvailableModules()} 2. {@link loadModulesByImplNames()} 3. {@link equals()} or another + * one is 1. {@link loadModule()} 2. {@link transliterate()} + */ + interface XTransliteration extends uno.XInterface { + /** + * Compare 2 strings as per this transliteration. It translates both strings before comparing them. + * @returns 1 if the first string is greater than the second string ; 0 if the first string is equal to the second string ; -1 if the first string is less + */ + compareString(aStr1: string, aStr2: string): number; + + /** + * Compare 2 substrings as per this transliteration. It translates both substrings before comparing them. + * @param aStr1 First string. + * @param nOff1 Offset (from 0) of the first substring. + * @param nLen1 Length (from offset) of the first substring. + * @param aStr2 Second string. + * @param nOff2 Offset (from 0) of the second substring. + * @param nLen2 Length (from offset) of the second substring. + * @returns 1 if the first substring is greater than the second substring ; 0 if the first substring is equal to the second substring ; -1 if the first sub + */ + compareSubstring(aStr1: string, nOff1: number, nLen1: number, aStr2: string, nOff2: number, nLen2: number): number; + + /** + * Match two substrings and find if they are equivalent as per this transliteration. + * + * This method can be called if the object has {@link TransliterationType} IGNORE attribute. + * + * Returns the number of matched code points in any case, even if strings are not equal, for example: ; equals( "a", 0, 1, nMatch1, "aaa", 0, 3, nMatch2 + * ) ; returns `FALSE` and nMatch:=1 and nMatch2:=1 ; equals( "aab", 0, 3, nMatch1, "aaa", 0, 3, nMatch2 ) ; returns `FALSE` and nMatch:=2 and + * nMatch2:=2 ; + * @param aStr1 First string to match. + * @param nPos1 Start position within aStr1. + * @param nCount1 Number of code points to use of aStr1. + * @param rMatch1 Returns number of matched code points in aStr1. + * @param aStr2 Second string to match. + * @param nPos2 Start position within aStr2. + * @param nCount2 Number of code points to use of aStr2. + * @param rMatch2 Returns number of matched code points in aStr2. + * @returns `TRUE` if the substrings are equal per this transliteration ; `FALSE` else. + */ + equals(aStr1: string, nPos1: number, nCount1: number, rMatch1: [number], aStr2: string, nPos2: number, nCount2: number, rMatch2: [number]): boolean; + + /** @deprecated DeprecatedFor internal use, this method is supported to get the "transliteration", which equals() is based on. */ + folding(aInStr: string, nStartPos: number, nCount: number, rOffset: [LibreOffice.SeqEquiv]): string; + + /** + * List the available transliteration modules for a given locale. It can be filtered based on its type. + * @param nType A bitmask field of values defined in {@link TransliterationType} + * @param aLocale The locale for which the modules are requested. + */ + getAvailableModules(aLocale: lang.Locale, nType: number): SafeArray; + + /** + * Unique ASCII name to identify a module. This name is used to get its localized name for menus, dialogs etc. The behavior is undefined for {@link + * TransliterationType.CASCADE} modules. + */ + getName(): string; + + /** + * Return the attribute(s) associated with this transliteration object, as defined in {@link TransliterationType} . The value is determined by the + * transliteration modules. For example, for UPPERCASE_LOWERCASE, a ONE_TO_ONE is returned, for IGNORE_CASE, IGNORE is returned. + */ + getType(): number; + + /** Load instance of predefined module - old style method. */ + loadModule(eModType: TransliterationModules, aLocale: lang.Locale): void; + + /** + * Load instance of UNO registered module. + * + * Each transliteration module is registered under a different service name. The convention for the service name is + * com.sun.star.i18n.Transliteration.l10n.{implName}. The {implName} is a unique name used to identify a module. The implName is used to get a localized + * name for the transliteration module. The implName is used in locale data to list the available transliteration modules for the locale. There are some + * transliteration modules that are always available. The names of those modules are listed as enum TransliterationModules names. For modules not listed + * there it is possible to load them directly by their implName. + * @param aImplName The module's {implName} under which it is registered with com.sun.star.i18n.Transliteration.l10n.{implName}. + * @param aLocale The locale for which the module is requested. + */ + loadModuleByImplName(aImplName: string, aLocale: lang.Locale): void; + + /** Load a sequence of instances of predefined modules - supersedes method {@link XTransliteration.loadModule()} . */ + loadModuleNew(aModType: LibreOffice.SeqEquiv, aLocale: lang.Locale): void; + + /** + * Load a sequence of instances of transliteration modules. Output of one module is fed as input to the next module in the sequence. The object created + * by this call has {@link TransliterationType} CASCADE and IGNORE types. + * @param aImplNameList Only IGNORE type modules can be specified. + * @param aLocale The locale for which the modules are requested. + */ + loadModulesByImplNames(aImplNameList: LibreOffice.SeqEquiv, aLocale: lang.Locale): void; + + /** + * Unique ASCII name to identify a module. This name is used to get its localized name for menus, dialogs etc. The behavior is undefined for {@link + * TransliterationType.CASCADE} modules. + */ + readonly Name: string; + + /** + * Transliterate a substring. This method can be called if the object doesn't have {@link TransliterationType} IGNORE attribute. + * @param aInStr The input string. + * @param nStartPos Start position within aInStr from where transliteration starts. + * @param nCount Number of code points to be transliterated. + * @param rOffset To find the grapheme of input string corresponding to the grapheme of output string, rOffset provides the offset array whose index is the + */ + transliterate(aInStr: string, nStartPos: number, nCount: number, rOffset: [LibreOffice.SeqEquiv]): string; + + /** + * Transliterate one set of characters to another. + * + * This method is intended for getting corresponding ranges and can be called if the object has {@link TransliterationType} IGNORE attribute. + * + * For example: generic CASE_IGNORE transliterateRange( "a", "i" ) returns {"A","I","a","i"}, transliterateRange( "a", "a" ) returns {"A","A","a","a"}. + * + * Use this transliteration to create regular expressions like [a-i] - > [A-Ia-i]. + * @returns String sequence containing corresponding transliterated pairs of characters to represent a range. + */ + transliterateRange(aStr1: string, aStr2: string): SafeArray; + + /** + * Return the attribute(s) associated with this transliteration object, as defined in {@link TransliterationType} . The value is determined by the + * transliteration modules. For example, for UPPERCASE_LOWERCASE, a ONE_TO_ONE is returned, for IGNORE_CASE, IGNORE is returned. + */ + readonly Type: number; + } + + namespace AmPmValue { + const enum Constants { + AM = 0, + PM = 1, + } + } + + namespace BreakType { + const enum Constants { + HANGINGPUNCTUATION = 3, + HYPHENATION = 2, + WORDBOUNDARY = 1, + } + } + + namespace CalendarDisplayCode { + const enum Constants { + LONG_DAY = 2, + LONG_DAY_NAME = 4, + LONG_ERA = 12, + LONG_GENITIVE_MONTH_NAME = 18, + LONG_MONTH = 6, + LONG_MONTH_NAME = 8, + LONG_PARTITIVE_MONTH_NAME = 21, + LONG_QUARTER = 16, + LONG_YEAR = 10, + LONG_YEAR_AND_ERA = 14, + NARROW_DAY_NAME = 23, + NARROW_GENITIVE_MONTH_NAME = 19, + NARROW_MONTH_NAME = 24, + NARROW_PARTITIVE_MONTH_NAME = 22, + SHORT_DAY = 1, + SHORT_DAY_NAME = 3, + SHORT_ERA = 11, + SHORT_GENITIVE_MONTH_NAME = 17, + SHORT_MONTH = 5, + SHORT_MONTH_NAME = 7, + SHORT_PARTITIVE_MONTH_NAME = 20, + SHORT_QUARTER = 15, + SHORT_YEAR = 9, + SHORT_YEAR_AND_ERA = 13, + } + } + + namespace CalendarDisplayIndex { + const enum Constants { + AM_PM = 0, + DAY = 1, + ERA = 4, + GENITIVE_MONTH = 5, + MONTH = 2, + PARTITIVE_MONTH = 6, + YEAR = 3, + } + } + + namespace CalendarFieldIndex { + const enum Constants { + AM_PM = 0, + DAY_OF_MONTH = 1, + DAY_OF_WEEK = 2, + DAY_OF_YEAR = 3, + DST_OFFSET = 4, + DST_OFFSET_SECOND_MILLIS = 16, + ERA = 13, + FIELD_COUNT = 15, + FIELD_COUNT2 = 17, + HOUR = 5, + MILLISECOND = 8, + MINUTE = 6, + MONTH = 12, + SECOND = 7, + WEEK_OF_MONTH = 9, + WEEK_OF_YEAR = 10, + YEAR = 11, + ZONE_OFFSET = 14, + ZONE_OFFSET_SECOND_MILLIS = 15, + } + } + + namespace CharacterIteratorMode { + const enum Constants { + SKIPCELL = 1, + SKIPCHARACTER = 0, + SKIPCONTROLCHARACTER = 2, + } + } + + namespace CharType { + const enum Constants { + ANY_CHAR = 0, + COMBINING_SPACING_MARK = 8, + CONNECTOR_PUNCTUATION = 22, + CONTROL = 15, + CURRENCY_SYMBOL = 25, + DASH_PUNCTUATION = 19, + DECIMAL_DIGIT_NUMBER = 9, + ENCLOSING_MARK = 7, + END_PUNCTUATION = 21, + FINAL_PUNCTUATION = 29, + FORMAT = 16, + GENERAL_TYPES_COUNT = 30, + INITIAL_PUNCTUATION = 28, + LETTER_NUMBER = 10, + LINE_SEPARATOR = 13, + LOWERCASE_LETTER = 2, + MATH_SYMBOL = 24, + MODIFIER_LETTER = 4, + MODIFIER_SYMBOL = 26, + NON_SPACING_MARK = 6, + OTHER_LETTER = 5, + OTHER_NUMBER = 11, + OTHER_PUNCTUATION = 23, + OTHER_SYMBOL = 27, + PARAGRAPH_SEPARATOR = 14, + PRIVATE_USE = 17, + SPACE_SEPARATOR = 12, + START_PUNCTUATION = 20, + SURROGATE = 18, + TITLECASE_LETTER = 3, + UPPERCASE_LETTER = 1, + } + } + + namespace CollatorOptions { + const enum Constants { + CollatorOptions_IGNORE_CASE = 1, + CollatorOptions_IGNORE_CASE_ACCENT = 8, + CollatorOptions_IGNORE_KANA = 2, + CollatorOptions_IGNORE_WIDTH = 4, + } + } + + namespace CTLScriptType { + const enum Constants { + CTL_ARABIC = 2, + CTL_HEBREW = 1, + CTL_INDIC = 4, + CTL_THAI = 3, + CTL_UNKNOWN = 0, + } + } + + namespace InputSequenceCheckMode { + const enum Constants { + BASIC = 1, + PASSTHROUGH = 0, + STRICT = 2, + } + } + + namespace KCharacterType { + const enum Constants { + ALPHA = 14, + BASE_FORM = 64, + CONTROL = 16, + DIGIT = 1, + LETTER = 128, + LOWER = 4, + PRINTABLE = 32, + TITLE_CASE = 8, + UPPER = 2, + } + } + + namespace KNumberFormatType { + const enum Constants { + LONG = 3, + MEDIUM = 2, + SHORT = 1, + } + } + + namespace KNumberFormatUsage { + const enum Constants { + CURRENCY = 8, + DATE = 1, + DATE_TIME = 3, + FIXED_NUMBER = 4, + FRACTION_NUMBER = 5, + PERCENT_NUMBER = 6, + SCIENTIFIC_NUMBER = 7, + TIME = 2, + } + } + + namespace KParseTokens { + const enum Constants { + ASC_ANY_BUT_CONTROL = 1024, + ASC_COLON = 64, + ASC_CONTROL = 512, + ASC_DIGIT = 4, + ASC_DOLLAR = 16, + ASC_DOT = 32, + ASC_LOALPHA = 2, + ASC_OTHER = 2048, + ASC_UNDERSCORE = 8, + ASC_UPALPHA = 1, + IGNORE_LEADING_WS = 1073741824, + TWO_DOUBLE_QUOTES_BREAK_STRING = 268435456, + UNI_DIGIT = 16384, + UNI_LETTER_NUMBER = 262144, + UNI_LOALPHA = 8192, + UNI_MODIFIER_LETTER = 65536, + UNI_OTHER = 536870912, + UNI_OTHER_LETTER = 131072, + UNI_OTHER_NUMBER = 524288, + UNI_TITLE_ALPHA = 32768, + UNI_UPALPHA = 4096, + } + } + + namespace KParseType { + const enum Constants { + ASC_NUMBER = 32, + BOOLEAN = 2, + DOUBLE_QUOTE_STRING = 16, + IDENTNAME = 4, + MISSING_QUOTE = 1073741824, + ONE_SINGLE_CHAR = 1, + SINGLE_QUOTE_NAME = 8, + UNI_NUMBER = 64, + } + } + + namespace LocaleItem { + const enum Constants { + COUNT = 17, + DATE_SEPARATOR = 0, + DECIMAL_SEPARATOR = 2, + DOUBLE_QUOTATION_END = 9, + DOUBLE_QUOTATION_START = 8, + LIST_SEPARATOR = 5, + LONG_DATE_DAY_OF_WEEK_SEPARATOR = 13, + LONG_DATE_DAY_SEPARATOR = 14, + LONG_DATE_MONTH_SEPARATOR = 15, + LONG_DATE_YEAR_SEPARATOR = 16, + MEASUREMENT_SYSTEM = 10, + SINGLE_QUOTATION_END = 7, + SINGLE_QUOTATION_START = 6, + THOUSAND_SEPARATOR = 1, + TIME_100SEC_SEPARATOR = 4, + TIME_AM = 11, + TIME_PM = 12, + TIME_SEPARATOR = 3, + } + } + + namespace Months { + const enum Constants { + APRIL = 3, + AUGUST = 7, + DECEMBER = 11, + FEBURARY = 1, + JANUARY = 0, + JULY = 6, + JUNE = 5, + MARCH = 2, + MAY = 4, + NOVEMBER = 10, + OCTOBER = 9, + SEPTEMBER = 8, + } + } + + namespace NativeNumberMode { + const enum Constants { + NATNUM0 = 0, + NATNUM1 = 1, + NATNUM10 = 10, + NATNUM11 = 11, + NATNUM2 = 2, + NATNUM3 = 3, + NATNUM4 = 4, + NATNUM5 = 5, + NATNUM6 = 6, + NATNUM7 = 7, + NATNUM8 = 8, + NATNUM9 = 9, + } + } + + namespace NumberFormatIndex { + const enum Constants { + NUMBER_START = 0, + } + } + + namespace reservedWords { + const enum Constants { + ABOVE_WORD = 6, + BELOW_WORD = 7, + COUNT = 12, + FALSE_WORD = 1, + QUARTER1_ABBREVIATION = 8, + QUARTER1_WORD = 2, + QUARTER2_ABBREVIATION = 9, + QUARTER2_WORD = 3, + QUARTER3_ABBREVIATION = 10, + QUARTER3_WORD = 4, + QUARTER4_ABBREVIATION = 11, + QUARTER4_WORD = 5, + TRUE_WORD = 0, + } + } + + namespace ScriptDirection { + const enum Constants { + LEFT_TO_RIGHT = 1, + NEUTRAL = 0, + RIGHT_TO_LEFT = 2, + } + } + + namespace ScriptType { + const enum Constants { + ASIAN = 2, + COMPLEX = 3, + LATIN = 1, + WEAK = 4, + } + } + + namespace TextConversionOption { + const enum Constants { + CHARACTER_BY_CHARACTER = 1, + IGNORE_POST_POSITIONAL_WORD = 2, + NONE = 0, + USE_CHARACTER_VARIANTS = 2, + } + } + + namespace TextConversionType { + const enum Constants { + TO_HANGUL = 1, + TO_HANJA = 2, + TO_SCHINESE = 3, + TO_TCHINESE = 4, + } + } + + namespace TransliterationModulesExtra { + const enum Constants { + END_OF_MODULE = 0, + IGNORE_DIACRITICS_CTL = 1073741824, + IGNORE_KASHIDA_CTL = 2048, + SENTENCE_CASE = 200, + TITLE_CASE = 201, + TOGGLE_CASE = 202, + } + } + + namespace TransliterationType { + const enum Constants { + CASCADE = 8, + IGNORE = 4, + NONE = 0, + NUMERIC = 2, + ONE_TO_ONE = 1, + ONE_TO_ONE_NUMERIC = 3, + } + } + + namespace UnicodeType { + const enum Constants { + COMBINING_SPACING_MARK = 8, + CONNECTOR_PUNCTUATION = 22, + CONTROL = 15, + CURRENCY_SYMBOL = 25, + DASH_PUNCTUATION = 19, + DECIMAL_DIGIT_NUMBER = 9, + ENCLOSING_MARK = 7, + END_PUNCTUATION = 29, + FINAL_PUNCTUATION = 21, + FORMAT = 16, + GENERAL_TYPES_COUNT = 30, + INITIAL_PUNCTUATION = 20, + LETTER_NUMBER = 10, + LINE_SEPARATOR = 13, + LOWERCASE_LETTER = 2, + MATH_SYMBOL = 24, + MODIFIER_LETTER = 4, + MODIFIER_SYMBOL = 26, + NON_SPACING_MARK = 6, + OTHER_LETTER = 5, + OTHER_NUMBER = 11, + OTHER_PUNCTUATION = 23, + OTHER_SYMBOL = 27, + PARAGRAPH_SEPARATOR = 14, + PRIVATE_USE = 17, + SPACE_SEPARATOR = 12, + START_PUNCTUATION = 28, + SURROGATE = 18, + TITLECASE_LETTER = 3, + UNASSIGNED = 0, + UPPERCASE_LETTER = 1, + } + } + + namespace Weekdays { + const enum Constants { + FRIDAY = 5, + MONDAY = 1, + SATURDAY = 6, + SUNDAY = 0, + THURSDAY = 4, + TUESDAY = 2, + WEDNESDAY = 3, + } + } + + namespace WordType { + const enum Constants { + ANY_WORD = 0, + ANYWORD_IGNOREWHITESPACES = 1, + DICTIONARY_WORD = 2, + WORD_COUNT = 3, + } + } + } + + namespace image { + /** This service specifies a HTML image map. */ + interface ImageMap extends container.XNamed, container.XIndexContainer { } + + /** + * this service describes a circular-shaped region inside a HTML image map. + * @see ImageMap + * @see ImageMapObject + */ + interface ImageMapCircleObject extends ImageMapObject { + /** This is the center point of the circle in pixels */ + Center: awt.Point; + + /** This is the radius of the circle in pixels */ + Radius: number; + } + + /** + * this is a base service for objects inside a image maps. + * @see ImageMap + * @see ImageMapRectangleObject + * @see ImageMapCircleObject + * @see ImageMapPolygonObject + */ + interface ImageMapObject extends beans.XPropertySet, document.XEventsSupplier { + /** This is an optional description text for the link. */ + Description: string; + + /** If an object is not active, it is ignored when the user clicks on the {@link ImageMap} . */ + IsActive: boolean; + + /** Optionally, objects could be named. */ + Name: string; + + /** This is the target frame */ + Target: string; + + /** This is the URL for this object */ + URL: string; + } + + /** + * this service describes a polygon-shaped region inside a HTML image map. + * @see ImageMap + * @see ImageMapObject + */ + interface ImageMapPolygonObject extends ImageMapObject { + /** This sequence of points outlines the click area of this image map object. */ + Polygon: drawing.PointSequence; + } + + /** + * this service describes a rectangular-shaped region inside a HTML image map. + * @see ImageMap + * @see ImageMapObject + */ + interface ImageMapRectangleObject extends ImageMapObject { + /** This is the boundary of this rectangle object */ + Boundary: awt.Rectangle; + } + } + + namespace inspection { + /** + * implements a general-purpose {@link XPropertyHandler} + * + * The property handler implemented by this service will do an introspection on the provided components, and expose the properties obtained via + * XIntrospectionAccess::getProperties. + * + * The handler will automatically determine the best type of property control to represent a certain property, depending on the property type. This + * includes, for example, list box controls to represent enumeration properties. + * @see XPropertyHandler + * @see scom.sun.star.beans.XIntrospectionAccess + * @see XPropertyControl + * @since OOo 2.0.3 + */ + type GenericPropertyHandler = XPropertyHandler; + + /** + * describes possible results of an interactive selection of a property value in an object inspector + * @see XPropertyHandler.onInteractivePropertySelection + * @since OOo 2.0.3 + */ + const enum InteractiveSelectionResult { + /** The interactive selection of a property value was canceled. */ + Cancelled = 0, + /** + * The interactive selection of a property value succeeded, a new property value has been obtained, but not yet set at the inspected component. + * + * In this case, the obtained value is passed to the caller of {@link XPropertyHandler.onInteractivePropertySelection()} , which is responsible for + * forwarding this value to the inspected component. + */ + ObtainedValue = 2, + /** The interactive selection of a property value is still pending.

This is usually used when this selection involves non-modal user interface.

*/ + Pending = 3, + /** + * The interactive selection of a property value succeeded, and the new property value chosen by the user has already been set at the inspected + * component. + */ + Success = 1, + } + + /** + * implements a component which can default-fill the help section of an {@link ObjectInspector} . + * + * The component registers a {@link XPropertyControlObserver} at an XObjectInspectoryUI interface. Whenever it then is notified of a {@link + * XPropertyControl} getting the focus, it will try to deduce the extended help text of this control's window, and set this help text at the object + * inspector's help section. + */ + interface DefaultHelpProvider extends uno.XInterface { + /** + * creates a help provider instance + * @param InspectorUI provides access to the UI of the {@link ObjectInspector} which should be observed. Must not be `NULL` . + * @throws com::sun::star::lang::IllegalArgumentException if the given inspector UI is `NULL` . + */ + create(InspectorUI: XObjectInspectorUI): void; + } + + /** + * describes the appearance of a line representing a single property in an {@link ObjectInspector} . + * + * Such a line consists of a label with a human-readable name for the propertya control which is used for user interaction - i.e. it displays the current + * property value, and allows the user entering a new one.(optional) one or two buttons which, when clicked, can start a more complex, interactive + * property value input. For instance, if you have a property whose value is a path in the file system, such a button could be used to let the user + * browse for a path with a usual file picker. + * @see XPropertyHandler.describePropertyLine + * @see PropertyLineElement + * @since OOo 2.0.3 + */ + interface LineDescriptor { + /** + * describes the category into which the property should be sorted by the {@link ObjectInspector} . + * + * An {@link ObjectInspector} can visually group properties which semantically belong together (for instance using tab pages). The decision which + * properties actually belong together is made using this {@link Category} attribute. + * + * For your implementation of {@link XPropertyHandler} , it's recommended that you document the programmatic names used for property categories. This + * way, your handler might be re-used in different contexts, where only the {@link XObjectInspectorModel} needs to provide consistent UI names for the + * categories. + * @see XObjectInspectorModel.describeCategories + */ + Category: string; + + /** + * denotes the control which should be used to represent the property at the UI. + * @see XPropertyControlFactory + */ + Control: XPropertyControl; + + /** denotes the human-readable display name used to present a property to the user */ + DisplayName: string; + + /** + * determines whether a button exists which can be used for a more complex, interactive property value input. + * + * If no image for the primary button is specified, but a primary button is present, the three dots will be displayed on the button. + * @see XPropertyHandler.onInteractivePropertySelection + * @see HasSecondaryButton + * @see PrimaryButtonImageURL + * @see PrimaryButtonImage + */ + HasPrimaryButton: boolean; + + /** + * determines whether a secondary button exists which can be used for a more complex, interactive property value input. + * + * A secondary button subordinated to the primary button. If no primary button exists ( {@link HasPrimaryButton} ), this member is ignored. + * @see XPropertyHandler.onInteractivePropertySelection + * @see HasSecondaryButton + */ + HasSecondaryButton: boolean; + + /** specifies the URL to the help topic to be associated with the property */ + HelpURL: string; + + /** + * describes the indent level for the property + * + * If a given property semantically depends on another one, the indent level can be used to visually represent this fact. For this, the dependent + * property's indent level would be one larger than the indent level of the other property. + * + * Normally, XPropertyHandlers will set this to `0` when describing the UI for a normal property. + */ + IndentLevel: number; + + /** + * describes a unique id to associate with the primary button + * + * In OpenOffice.org, UI elements sometimes require a so-called UniqueID, which can be used to uniquely (within the whole application) identify this UI + * element. For instance, automating the OpenOffice.org UI via a dedicated separate application ("TestTool") requires such IDs. + * + * If a primary button exists for a property's UI representation ( {@link HasPrimaryButton} ), it gets the ID specified herein. + */ + PrimaryButtonId: string; + + /** + * describes a graphics to display at the primary button, if any. + * + * The property will be ignored if {@link HasPrimaryButton} is `FALSE` , or if {@link PrimaryButtonImageURL} is a non-empty string. + * @see HasPrimaryButton + * @see PrimaryButtonImageURL + */ + PrimaryButtonImage: graphic.XGraphic; + + /** + * describes the URL of an image to display on the primary button, if any. + * + * This URL will be used to obtain an actual {@link com.sun.star.graphic.XGraphic} object from an {@link com.sun.star.graphic.GraphicProvider} . + * + * The property will be ignored if {@link HasPrimaryButton} is `FALSE` . + * + * If you need to specify a graphic which does not have an URL, but is available as {@link com.sun.star.graphic.XGraphic} only, then you must leave + * `PrimaryButtonImageURL` empty, and use the {@link PrimaryButtonImage} property. + * @see PrimaryButtonImage + */ + PrimaryButtonImageURL: string; + + /** + * describes a unique id to associate with the primary button + * + * If a secondary button exists for a property's UI representation ( {@link HasSecondaryButton} ), it gets the ID specified herein. + * @see PrimaryButtonId + */ + SecondaryButtonId: string; + + /** + * describes a graphics to display at the secondary button, if any. + * + * The property will be ignored if {@link HasSecondaryButton} is `FALSE` , or if {@link SecondaryButtonImageURL} is a non-empty string. + * @see HasSecondaryButton + * @see SecondaryButtonImageURL + */ + SecondaryButtonImage: graphic.XGraphic; + + /** + * describes the URL of an image to display on the secondary button, if any. + * + * This URL will be used to obtain an actual {@link com.sun.star.graphic.XGraphic} object from an {@link com.sun.star.graphic.GraphicProvider} . + * + * The property will be ignored if {@link HasSecondaryButton} is `FALSE` . + * + * If you need to specify a graphic which does not have an URL, but is available as {@link com.sun.star.graphic.XGraphic} only, then you must leave + * `SecondaryButtonImageURL` empty, and use the {@link SecondaryButtonImage} property. + * @see SecondaryButtonImage + */ + SecondaryButtonImageURL: string; + } + + /** + * describes an {@link com.sun.star.frame.Controller} which can be used to browse and modify properties of components. + * + * The controller can be plugged into an {@link com.sun.star.frame.XFrame} , and will provide a visual component for inspecting and modifying component + * properties. ; Note that "property" here is a generic term - any aspect of a component can be considered a property, as long as some property handler + * is able to describe this aspect in a property-like way. + * + * The basic idea is that one facet of the inspected component is represented by a single line of controls: A label, an input control, and optionally one + * or two buttons which, when pressed, trigger additional user interaction (e.g. a more sophisticated dialog to enter a property value). + * + * Additionally, property lines can be grouped into different categories. A usual implementation of such categories would be tab pages, but other + * implementations are possible, too. + * + * Even more, the inspector can optionally display a help section at the bottom of its window, which can display arbitrary (context-sensitive) help + * texts. + * + * An {@link ObjectInspector} needs one or more property handlers which describe the facets of an inspected component - without such handlers, the + * inspector window will simply stay empty. + * + * The property handlers, as well as more information about the layout of the inspector, are provided by a inspector model, which has to be implemented + * by the user of the inspector. + * + * Since property handlers might have the need to raise UI, they will be created with a context value named "DialogParentWindow", which contains an + * XWindow which should be used as parent of any windows to raise. ; If the {@link com.sun.star.uno.XComponentContext} in which the {@link + * ObjectInspector} was created already contains such a value, it is not overwritten. Only if it doesn't, the inspector will add an own value - which + * contains the inspector's main window - to the context when creating handlers. + * @see XPropertyHandler + * @see LineDescriptor + * @see PropertyControlType + * @see ObjectInspectorModel + * @see com.sun.star.uno.XComponentContext + * @see com.sun.star.lang.XMultiComponentFactory + * @since OOo 2.0.3 + */ + interface ObjectInspector extends XObjectInspector { + /** + * creates a default instance of the {@link ObjectInspector} + * @since OOo 2.2 + */ + createDefault(): void; + + /** + * creates an instance of the {@link ObjectInspector} , using a given {@link ObjectInspectorModel} + * @since OOo 2.2 + * @throws com::sun::star::lang::IllegalArgumentException if Model is `NULL` . + */ + createWithModel(Model: XObjectInspectorModel): void; + } + + /** + * describes a default implementation of an {@link ObjectInspectorModel} + * + * This service simplifies usage of an {@link ObjectInspector} . + * + * The {@link XObjectInspectorModel} implemented by this service will not provide any property categories, nor apply any particular order to the + * properties provided by its handler(s). + * @see ObjectInspector + * @see XObjectInspectorModel + * @see XObjectInspectorModel.describeCategories + * @see XObjectInspectorModel.getPropertyOrderIndex + * @since OOo 2.0.3 + */ + interface ObjectInspectorModel extends XObjectInspectorModel { + /** creates a default {@link ObjectInspectorModel} , whose one and only handler factory creates a {@link GenericPropertyHandler} . */ + createDefault(): void; + + /** + * creates a default {@link ObjectInspectorModel} , using an externally provided sequence of property handler factories. + * @param handlerFactories a sequence of handler factories, as to be provided in the {@link XObjectInspectorModel.HandlerFactories} method. + * @see XObjectInspectorModel.HandlerFactories + * @throws com::sun::star::lang::IllegalArgumentException if the given sequence is empty. + */ + createWithHandlerFactories(handlerFactories: LibreOffice.SeqEquiv): void; + + /** + * creates a default {@link ObjectInspectorModel} , using an externally provided sequence of property handler factories, and describing an {@link + * ObjectInspector} which has a help section. + * @param handlerFactories a sequence of handler factories, as to be provided in the {@link XObjectInspectorModel.HandlerFactories} method. + * @param minHelpTextLines denotes the minimum number of lines of text to be reserved for the help section. + * @param maxHelpTextLines denotes the maximum number of lines of text to be reserved for the help section. + * @see XObjectInspectorModel.HandlerFactories + * @see XObjectInspectorModel.HasHelpSection + * @see XObjectInspectorModel.MinHelpTextLines + * @see XObjectInspectorModel.MaxHelpTextLines + * @since OOo 2.2 + * @throws com::sun::star::lang::IllegalArgumentException if handlerFactories is empty. + * @throws com::sun::star::lang::IllegalArgumentException if minHelpTextLines or maxHelpTextLines are negative, or if minHelpTextLines is greater than maxHe + */ + createWithHandlerFactoriesAndHelpSection(handlerFactories: LibreOffice.SeqEquiv, minHelpTextLines: number, maxHelpTextLines: number): void; + } + + /** + * describes a category of properties + * @see ObjectInspector + * @see XObjectInspectorModel.describeCategory + * @see LineDescriptor.Category + * @since OOo 2.0.3 + */ + interface PropertyCategoryDescriptor { + /** provides a help URL to be associated with a category */ + HelpURL: string; + + /** + * contains the programmatic name of the category. + * + * This programmatic name is used internally: {@link XPropertyHandler.describePropertyLine()} sets a programmatic category name at {@link + * LineDescriptor.Category} , and an object inspector uses this to find the proper {@link PropertyCategoryDescriptor} . + */ + ProgrammaticName: string; + + /** provides a human-readable name (which can be presented at the UI) for a category. */ + UIName: string; + } + + interface StringRepresentation extends XStringRepresentation { + create(TypeConverter: script.XTypeConverter): void; + createConstant(TypeConverter: script.XTypeConverter, Constant: string, Values: LibreOffice.SeqEquiv): void; + } + + /** + * defines the interface for an {@link XPropertyControl} which displays its value in a hyperlink-like way + * + * Hyperlink controls exchange their value ( {@link XPropertyControl.Value} ) as strings. + * @since OOo 2.0.3 + */ + interface XHyperlinkControl extends XPropertyControl { + /** + * adds a listener which will be notified when the user clicked the hyperlink text in the control + * @param listener the listener to notify of hyperlink clicks + */ + addActionListener(listener: awt.XActionListener): void; + + /** + * removes a listener which was previously added via {@link addActionListener()} + * @param listener the listener to revoke + */ + removeActionListener(listener: awt.XActionListener): void; + } + + /** + * defines the interface for an {@link XPropertyControl} which supports displaying and entering numerical values. + * @since OOo 2.0.3 + */ + interface XNumericControl extends XPropertyControl { + /** describes the number of decimal digits to use for the value */ + DecimalDigits: number; + + /** + * describes a {@link com.sun.star.util.MeasureUnit} to be applied for displaying values. + * + * Only a certain set of {@link com.sun.star.util.MeasureUnit} values is supported. In particular, every value which denotes a fraction of another unit + * (like 100th millimeters) cannot be used as DisplayUnit. + * @throws com::sun::star::lang::IllegalArgumentException if the caller attempts to set an unsupported {@link com.sun.star.util.MeasureUnit} + */ + DisplayUnit: number; + + /** describes the maximum value which is allowed to be entered in the control */ + MaxValue: com.sun.star.beans.Optional; + + /** describes the minimum value which is allowed to be entered in the control */ + MinValue: com.sun.star.beans.Optional; + + /** + * describes a {@link com.sun.star.util.MeasureUnit} to be applied for transferring values. + * + * The core measurement unit for a property value might differ from the unit which is used by the control to display it. For instance, your property + * value might require that your values denote 100th millimeters, but to the user, you want to present the value as, say, inches. In this case, a numeric + * control can automatically handle the value conversion for you, if you give it a ValueUnit different from the DisplayUnit. + * @see XPropertyControl.Value + */ + ValueUnit: number; + } + + /** + * describes the main interface of an {@link ObjectInspector} . + * @see ObjectInspector + * @since OOo 2.0.3 + */ + interface XObjectInspector extends frame.XController, frame.XDispatchProvider { + /** + * inspects a new collection of one or more objects. + * + * If the sequence is empty, the UI of the {@link ObjectInspector} will be cleared. + * + * If the sequence contains more than one object, the {@link XObjectInspector} will create a complete set of property handlers (as indicated by {@link + * XObjectInspectorModel.HandlerFactories} ) for **every** of the objects, and compose their output. + * @see XPropertyHandler.isComposable + * @see XPropertyHandler.onInteractivePropertySelection + * @see XPropertyHandler.suspend + * @throws com::sun::star::util::VetoException if the inspector cannot switch to another object set. This typically happens if one of the active {@link XPro + */ + inspect(Objects: LibreOffice.SeqEquiv): void; + + /** + * provides access to the current model of the inspector + * + * The model is mainly responsible for providing the property handlers. Additionally, it can provide user interface names and help URLs for property + * categories. + * + * Note that there are two ways of setting or retrieving the current model: You can either use com::sun::star::frame::XModel::setModel(), or, if you do + * not want or need to implement the full-blown {@link com.sun.star.frame.XModel} interface, you can use this property directly. Both approaches are + * semantically equivalent. + * + * If a new model is set at the inspector, the complete UI will be rebuilt to reflect the change, using the new property handlers provided by the new + * model. + */ + InspectorModel: XObjectInspectorModel; + + /** + * provides access to the user interface of the object inspector. + * + * This interface can be used to access and manipulate various aspects of the user interface. For instance, you can enable and disable certain property + * controls (or parts thereof), or register observers for all property controls. + * @since OOo 2.2 + */ + InspectorUI: XObjectInspectorUI; + } + + /** + * describes the model of an {@link ObjectInspector} + * @see ObjectInspector + * @since OOo 2.0.3 + */ + interface XObjectInspectorModel { + /** + * describes the property categories used by the property handlers. + * + * Properties can be sorted into different categories, described by the {@link LineDescriptor.Category} attribute, which is filled in {@link + * XPropertyHandler.describePropertyLine()} method of your property handler. ; Those names provided by the handlers are programmatic names. All other + * information about categories is part of the {@link PropertyCategoryDescriptor} , and {@link describeCategories()} assembles information about all + * categories which all property handlers provided by the model use. + * @returns a sequence of category descriptors. Their relative ordering also describes the relative ordering of the categories in the {@link ObjectInspector} + * @see PropertyCategoryDescriptor + * @see LineDescriptor.Category + */ + describeCategories(): SafeArray; + + /** + * retrieves an index in a global property ordering, for a given property name + * + * In the user interface of an {@link ObjectInspector} , single properties are represented by single lines, and those lines are displayed successively. + * To determine an order of the property lines, the inspector model can associate an "order index" with each property. The {@link ObjectInspector} will + * then sort the property lines in a way that they have the same relative ordering as the "order indexes" of their properties. + * + * Note that the concrete value the model returns for a given property does not matter. All what matters is that if you want a certain property `Foo` to + * be displayed after another property `Bar` , then the order index of `Foo` should be greater than the order index of `Bar` . + * + * If for two different properties the same order index is returned, the {@link ObjectInspector} will assume the order in which those properties were + * provided by the respective property handler ( {@link XPropertyHandler.getSupportedProperties()} ). ; If two such properties originate from different + * handlers, they will be ordered according to the order of the handlers, as provided in the {@link HandlerFactories} attribute. + * @param PropertyName the property whose global order index should be retrieved + * @returns the global order index of PropertyName. + */ + getPropertyOrderIndex(PropertyName: string): number; + + /** + * describes a set of factories for creating XPropertyHandlers + * + * Every element of the sequence must contain information to create a {@link XPropertyHandler} instance. Two ways are currently supported: A service + * name: ; If a sequence element contains a string, this string is interpreted as service name, and an {@link com.sun.star.lang.XMultiComponentFactory} + * is asked to create an instance of this service.A factory: ; If a sequence element contains an instance implementing the {@link + * com.sun.star.lang.XSingleComponentFactory} interface, this factory is used to create a property handler. + * + * This attribute is usually only evaluated by the {@link ObjectInspector} instance which the model is currently bound to. + * + * The order of factories is important: If two property handlers declare themselves responsible for the same property, the one whose factory is listed + * **last** wins. Also, if a handler `B` wants to supersede a property of another handler `A` , `A` 's factory must precede the factory of `B` . + * @see XPropertyHandler.getSupportedProperties + * @see XPropertyHandler.getSupersededProperties + */ + HandlerFactories: SafeArray; + + /** + * indicates that the object inspector should have a help section. + * + * The object inspector displays lines of property/values, optionally grouped into categories, as described by the property handlers. ; Additionally, + * the inspector can optionally display a section dedicated to help texts. Clients could use this section to display context-sensitive help, for instance + * short texts explaining the currently selected property. + * @since OOo 2.2 + */ + HasHelpSection: boolean; + + /** + * determines whether the object inspector's UI should be read-only. + * + * In this case, the user is able to browse through all properties, but cannot change any of them. + * + * In a read-only object inspector, the property controls are readonly or disabled themselves, and the primary and secondary buttons of a property line + * are both disabled. + * @see XPropertyControl + * @see LineDescriptor + */ + IsReadOnly: boolean; + + /** + * denotes the maximum number of lines of text to be reserved for the help section. + * + * This property is ignored by the {@link ObjectInspector} if {@link HasHelpSection} is `FALSE` . + * + * The layout of the {@link ObjectInspector} is undefined if {@link MaxHelpTextLines} is smaller than {@link MinHelpTextLines} . + * @since OOo 2.2 + */ + MaxHelpTextLines: number; + + /** + * denotes the minimum number of lines of text to be reserved for the help section. + * + * This property is ignored by the {@link ObjectInspector} if {@link HasHelpSection} is `FALSE` . + * + * The layout of the {@link ObjectInspector} is undefined if {@link MinHelpTextLines} is larger than {@link MaxHelpTextLines} . + * @since OOo 2.2 + */ + MinHelpTextLines: number; + } + + /** + * grants access to certain aspects of the user interface of an object inspector + * + * This interface is used as callback for XPropertyHandlers. + * + * As a consequence, methods operating on the UI for a property, and taking the name of this property, are tolerant against properties which do not + * exist. For instance, if a property handler tries to disable the UI for property `Foo` , but another handler has superseded this property, then the + * {@link ObjectInspector} will not **have** any UI for it. In this case, the call to `enablePropertyUI( "Foo" )` will simply be ignored. + * @since OOo 2.0.3 + */ + interface XObjectInspectorUI { + /** + * enables or disables all components belonging to the UI representation of a property + * + * This is usually used by an {@link XPropertyHandler} if it handles properties, where one does only make sense if another one has a certain value. + * @param PropertyName denotes the name of the property whose UI is to be enabled or disabled. + * @param Enable `TRUE` if and only if the UI should be disabled, `FALSE` otherwise. + */ + enablePropertyUI(PropertyName: string, Enable: boolean): void; + + /** + * enables or disables the single elements which can be part of the UI representation of a property + * + * Note that the complete UI for the property must be enabled in order for these settings to be evaluated. That is, {@link enablePropertyUIElements()} + * does not have any effect if somebody previously disabled the complete UI for this property with {@link enablePropertyUI()} . + * @param PropertyName the name of the property whose user interface elements are to be enabled or disabled + * @param Elements a combination of {@link PropertyLineElement} flags specifying which elements are to be enabled or disabled. ; Note that if you don't se + * @param Enable `TRUE` if the elements denoted by _nElements should be enabled, `FALSE` if they should be disabled. + */ + enablePropertyUIElements(PropertyName: string, Elements: number, Enable: boolean): void; + + /** + * retrieves the control currently used to display a given property + * @param PropertyName the name of the property whose control should be retrieved + * @returns the {@link XPropertyControl} representing the given property, or `NULL` if there is no such property control. + */ + getPropertyControl(PropertyName: string): XPropertyControl; + + /** + * hides the UI for a given property + * @param PropertyName the name of the property whose UI is to be hidden + */ + hidePropertyUI(PropertyName: string): void; + + /** + * completely rebuilds the UI for the given property. + * + * This method might be used by an {@link XPropertyHandler} if it wants to change the type of control (see {@link PropertyControlType} ) used to display + * a certain property. + * + * The object inspector will then call describePropertyLine again, and update its UI accordingly. + * + * Note that the property whose UI should be rebuilt must not necessarily be (though usually **is** ) in the responsibility of the handler which calls + * this method. The object inspector will look up the handler with the responsibility for PropertyName and call its {@link + * XPropertyHandler.describePropertyLine()} + * @param PropertyName the name of the property whose UI is to be completely rebuilt. + */ + rebuildPropertyUI(PropertyName: string): void; + + /** + * registers an observer for all property controls + * + * The given {@link XPropertyControlObserver} will be notified of all changes in all property controls. + * @see revokeControlObserver + * @since OOo 2.2 + */ + registerControlObserver(Observer: XPropertyControlObserver): void; + + /** + * revokes a previously registered control observer + * @see registerControlObserver + * @since OOo 2.2 + */ + revokeControlObserver(Observer: XPropertyControlObserver): void; + + /** + * sets the text of the help section, if the object inspector contains one. + * @since OOo 2.2 + * @throws NoSupportException if the {@link XObjectInspectorModel.HasHelpSection} property requires the help section to be unavailable. + */ + setHelpSectionText(HelpText: string): void; + + /** + * shows or hides all properties belonging to a given category + * @see LineDescriptor.Category + * @see XObjectInspectorModel.describeCategories + */ + showCategory(Category: string, Show: boolean): void; + + /** + * shows the UI for a given property + * @param PropertyName the name of the property whose UI is to be shown + */ + showPropertyUI(PropertyName: string): void; + } + + /** + * defines the interface for a single control in an {@link ObjectInspector} + * @since OOo 2.0.3 + */ + interface XPropertyControl { + /** + * specifies the context of the control within the {@link ObjectInspector} . + * + * The property control should actively notify its state changes to the context. In particular, changes in the focus and the value of the control must be + * notified. + */ + ControlContext: XPropertyControlContext; + + /** denotes the type of the control, as one of the {@link PropertyControlType} constants */ + ControlType: number; + + /** + * denotes the window which is the real UI representation of the property control. + * + * The {@link ObjectInspector} will automatically position and size this control as needed, care for its Z-order, and so on. + * + * This Window must not be `NULL` , else the whole control is not usable. + */ + ControlWindow: awt.XWindow; + + /** + * determines whether the control content is currently modified + * + * An {@link XPropertyControl} internally manages a flag indicating whether its content is modified. This flag is reset to `FALSE` every time our {@link + * ControlContext} is notified of our current value. Also, the control implementation must set this flag to `TRUE` if and only if the user changed the + * control content. + * @see notifyModifiedValue + * @see ControlContext + * @see XPropertyControlContext.valueChanged + */ + isModified(): boolean; + + /** + * notifies the context in which the control lives of the current control value, if this value is currently modified + * @see isModified + * @see ControlContext + * @see XPropertyControlListener.valueChanged + */ + notifyModifiedValue(): void; + + /** + * denotes the current content of the control. + * + * At every point in time, this value is either `VOID` , or of the type described by {@link ValueType} . + * @throws com::sun::star::beans::IllegalTypeException if an attempt is made to set a value which is not `VOID` and whose type does not equal {@link ValueType} . + */ + Value: any; + + /** + * denotes the value type of the control. + * @see Value + */ + ValueType: type; + } + + /** + * specifies the interface of the context of an {@link XPropertyControl} . + * @see XPropertyControl.ControlContext + * @since OOo 2.0.3 + */ + interface XPropertyControlContext extends XPropertyControlObserver { + /** + * instructs the {@link XPropertyControlContext} to active the next control + * @param CurrentControl denotes the control which initiated the request. + */ + activateNextControl(CurrentControl: XPropertyControl): void; + } + + /** + * a factory for XPropertyControls + * @since OOo 2.0.3 + */ + interface XPropertyControlFactory { + /** + * creates a {@link XPropertyControl} + * + * A {@link XPropertyControlFactory} can create any of the control types denoted by the {@link PropertyControlType} constants. + * @param ControlType the type of the requested control + * @param CreateReadOnly determines whether the newly created control should be readonly. If this argument is `TRUE` , this does not necessarily mean that + * @returns a control of the given type. + * @throws com::sun::star::lang::IllegalArgumentException if the given ControlType is not a value {@link PropertyControlType} + */ + createPropertyControl(ControlType: number, CreateReadOnly: boolean): XPropertyControl; + } + + /** + * specifies an interface for components to observer certain aspects of an {@link XPropertyControl} . + * @since OOo 2.2 + */ + interface XPropertyControlObserver { + /** + * notifies the observer that a certain {@link XPropertyControl} 's UI representation gained the focus. + * @param Control denotes the control whose UI representation gained the focus + */ + focusGained(Control: XPropertyControl): void; + + /** + * notifies the observer that a certain {@link XPropertyControl} 's value changed. + * @param Control denotes the control whose value changed. + * @see XPropertyControl.Value + */ + valueChanged(Control: XPropertyControl): void; + } + + /** + * is the basic interface for object inspection. + * + * The {@link ObjectInspector} itself does not know anything about the object it is inspecting, all information is obtained via XPropertyHandlers. Also, + * property handlers are responsible for describing the user interface which should be used to interact with the user, with respect to a given aspect of + * the inspected component. + * @see ObjectInspector + * @see LineDescriptor + * @since OOo 2.0.3 + */ + interface XPropertyHandler extends lang.XComponent { + /** + * retrieve the actuating properties which this handler is interested in + * + * In general, properties can be declared as "actuating", that is, when their value changes, the UI for other properties needs to be updated (e.g. + * enabled or disabled). + * + * With this method, a handler can declare that it feels responsible for some/all of the depending properties of certain actuating properties. + * + * Whenever the value of an actuating property changes, all handlers which expressed their interest in this particular actuating properties are called + * with their {@link actuatingPropertyChanged()} method. + * + * If {@link getSupportedProperties()} returned an empty sequence, this method will not be called + */ + readonly ActuatingProperties: SafeArray; + + /** + * updates the UI of dependent properties when the value of a certain actuating property changed + * + * This method is called whenever a property value changes, limited to those properties whose changes the handler expressed interest in (see {@link + * getActuatingProperties()} ). + * @param ActuatingPropertyName the id of the actuating property. + * @param NewValue the new value of the property + * @param OldValue the old value of the property + * @param InspectorUI a callback for updating the object inspector UI + * @param FirstTimeInit If `TRUE` , the method is called for the first-time update of the respective property, that is, when the property browser is just i + * @throws com::sun::star::lang::NullPointerException if InspectorUI is `NULL` + */ + actuatingPropertyChanged(ActuatingPropertyName: string, NewValue: any, OldValue: any, InspectorUI: XObjectInspectorUI, FirstTimeInit: boolean): void; + + /** + * registers a listener for notification about property value changes + * + * An {@link XPropertyHandler} implementation might decide to ignore this call. However, in this case property value changes made by third party + * components are not reflected in the object inspector. + * + * If a handler implementation supports property change listeners, it must be able to cope with a call to {@link addPropertyChangeListener()} even if + * currently no component is being inspected. In this case, the listener must become active as soon as a new introspection is set in the next {@link + * inspect()} call. + * @param Listener the listener to notify about property changes + * @see removePropertyChangeListener + * @throws com::sun::star::lang::NullPointerException if the listener is `NULL` + */ + addPropertyChangeListener(Listener: beans.XPropertyChangeListener): void; + + /** + * converts a given property value to a control-compatible value + * + * In {@link describePropertyLine()} , a property handler declared which type of control should be used to display the value of a certain property. To + * allow to use the same control type for different properties, and in particular, for properties of different type, conversions between controls values + * and property values are needed. + * + * This method converts a property value, which has previously been obtained using {@link getPropertyValue()} , into a control-compatible value, which + * can be used with {@link XPropertyControl} 's {@link XPropertyControl.Value} attribute. + * + * A usual application of this method are list boxes: There is a generic list box implementation, which is able to display a simple list of strings. + * Usually, every string represents one possible property value. To translate between those property values and the displayed strings, {@link + * convertToControlValue()} and {@link convertToPropertyValue()} are used. + * + * The method is not invoked if the control's value type ( {@link XPropertyControl.ValueType} equals the property's value type. + * @param PropertyName The name of the property whose value is to be converted. + * @param PropertyValue The to-be-converted property value. + * @param ControlValueType The target type of the conversion. This type is determined by the control which is used to display the property, which in turn i + * @see convertToPropertyValue + * @see describePropertyLine + * @see XPropertyControl + * @see getPropertyValue + * @throws com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler + */ + convertToControlValue(PropertyName: string, PropertyValue: any, ControlValueType: type): any; + + /** + * converts a given control-compatible value to a property value + * + * In {@link describePropertyLine()} , a property handler declared which type of control should be used to display the value of a certain property. To + * allow to use the same control type for different properties, and in particular, for properties of different type, conversions between controls values + * and property values are needed. + * + * This method converts a control value into a property value, which subsequently can be used in conjunction with {@link setPropertyValue()} . + * @param PropertyName The name of the conversion's target property. + * @param ControlValue The to-be-converted control value. This value has been obtained from an {@link XPropertyControl} , using its {@link XPropertyControl + * @see convertToControlValue + * @see describePropertyLine + * @see XPropertyControl + * @see getPropertyValue + * @throws com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler + */ + convertToPropertyValue(PropertyName: string, ControlValue: any): any; + + /** + * describes the UI to be used to represent the property + * @param PropertyName the name of the property whose user interface is to be described implementation + * @param ControlFactory a factory for creating {@link XPropertyControl} instances. Must not be `NULL` . + * @returns the descriptor of the property line. + * @see PropertyControlType + * @see LineDescriptor + * @throws com::sun::star::beans::UnknownPropertyException if the given property is not supported by this handler + * @throws com::sun::star::lang::NullPointerException if ControlFactory is `NULL` . + */ + describePropertyLine(PropertyName: string, ControlFactory: XPropertyControlFactory): LineDescriptor; + + /** + * retrieve the actuating properties which this handler is interested in + * + * In general, properties can be declared as "actuating", that is, when their value changes, the UI for other properties needs to be updated (e.g. + * enabled or disabled). + * + * With this method, a handler can declare that it feels responsible for some/all of the depending properties of certain actuating properties. + * + * Whenever the value of an actuating property changes, all handlers which expressed their interest in this particular actuating properties are called + * with their {@link actuatingPropertyChanged()} method. + * + * If {@link getSupportedProperties()} returned an empty sequence, this method will not be called + */ + getActuatingProperties(): SafeArray; + + /** + * returns the state of a property + * @param PropertyName the name of the property whose state is to be retrieved + * @throws com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler + */ + getPropertyState(PropertyName: string): beans.PropertyState; + + /** + * retrieves the current value of a property + * @param PropertyName the name of the property whose value is to be retrieved + * @throws com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler + */ + getPropertyValue(PropertyName: string): any; + + /** + * returns the properties which are to be superseded by this handler + * + * Besides defining an own set of properties (see {@link getSupportedProperties()} ), a property handler can also declare that foreign properties (which + * it is **not** responsible for) are superseded by its own properties. + * + * This is usually used if your handler is used with another, more generic one, which should continue to be responsible for all properties, except a few + * which your handler handles more elegantly. + * + * In such a case, simply return those properties here. + * + * There is a precedence in the property handlers used by an {@link ObjectInspector} , which also is important for the superseded properties. This + * precedence is implied by the precedence of factories to create the property handlers, as denoted in the {@link XObjectInspectorModel.HandlerFactories} + * attribute. + * + * With this in mind, property handlers can only supersede properties which are supported by a handler preceding them, but not properties of handlers + * succeeding them. + * + * For instance, imaging an {@link XObjectInspectorModel} which provides three factories, for handler `A` , `B` , and `C` - in this order. Now if `A` + * supports the property `Foo` , `C` supports `Bar` , and `B` supersedes both `Foo` and `Bar` , them the result is `Bar` is still present. This is + * because `B` precedes `C` , so it cannot, by definition, supersede properties which are supported by `C` . + * + * If {@link getSupportedProperties()} returned an empty sequence, this method will not be called. + * @see XObjectInspectorModel.HandlerFactories + */ + getSupersededProperties(): SafeArray; + + /** + * returns the properties which the handler can handle + * + * A handler is allowed to return an empty sequence here, indicating that for the given introspection, no properties handling can be provided. This might + * happen when a fixed set of property handlers is used for a variety of components to inspect, where not all handlers can really cope with all + * components. + * + * In the case of returning an empty sequence here, the property handler is ignored by all further processing in the object inspector. + */ + getSupportedProperties(): SafeArray; + + /** + * binds the property handler to a new component + * @param Component the component to inspect. Must not be `NULL` + * @throws com::sun::star::lang::NullPointerException if the component is `NULL` + */ + inspect(Component: uno.XInterface): void; + + /** + * determines whether a given property, which the handler is responsible for, is composable. + * + * An object inspector can inspect multiple components at once, displaying the **intersection** of their properties. For this, all components are + * examined for their properties, and all properties which exist for all components, **and** are declared to be composable by their respective handler, + * are displayed in the inspector UI. + * @param PropertyName the name of the property whose composability is to be determined + * @throws com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler + */ + isComposable(PropertyName: string): boolean; + + /** + * called when a browse button belonging to a property UI representation has been clicked + * + * Property handlers can raise a dedicated UI for entering or somehow changing a property value. Usually, this will be a modal dialog, but it can also be + * a non-modal user interface component. + * + * Availability of this feature is indicated by the {@link LineDescriptor.HasPrimaryButton} and {@link LineDescriptor.HasSecondaryButton} members of a + * {@link LineDescriptor} , which the {@link XPropertyHandler} fills in its {@link describePropertyLine()} method. + * + * When this method is called, the property handler should raise the UI needed to enter the property value, and return the result of this (see + * InteractiveSelectionResult). + * + * It is recommended that property handlers do not directly set the property value which has been obtained from the user, but store it in the + * output-parameter Data, and return InteractiveSelectionResult::ObtainedValue. + * + * If a handler sets the new property value directly, and returns InteractiveSelectionResult::ObtainedValue, this implies that the property cannot + * properly be handled in case the object inspector is inspecting an intersection of multiple components, since in this case {@link + * onInteractivePropertySelection()} will be called at one handler only, however the new property would have to be forwarded to all handlers. + * + * If a property is not composable, directly setting the new property value does not yield any problem, as long as property listeners are properly + * notified of the change. + * @param PropertyName The name of the property whose browse button has been clicked + * @param Primary `TRUE` if and only if the primary button has been clicked, `FALSE` otherwise + * @param outData If the method returns InteractiveSelectionResult::ObtainedValue, then outData contains the value which has been interactively obtained fr + * @param InspectorUI provides access to the object inspector UI. Implementations should use this if the property selection requires non-modal user input. + * @returns the result of the interactive property value selection. + * @see describePropertyLine + * @see addPropertyChangeListener + * @see isComposable + * @throws com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler + * @throws com::sun::star::lang::NullPointerException if InspectorUI is `NULL` + */ + onInteractivePropertySelection(PropertyName: string, Primary: boolean, outData: [any], InspectorUI: XObjectInspectorUI): InteractiveSelectionResult; + + /** + * revokes a listener for notification about property value changes + * @see addPropertyChangeListener + */ + removePropertyChangeListener(Listener: beans.XPropertyChangeListener): void; + + /** + * sets the value of a property + * @param PropertyName the name of the property whose value is to be set + * @param Value the property value to set + * @throws com::sun::star::beans::UnknownPropertyException if the given property is not supported by the property handler + */ + setPropertyValue(PropertyName: string, Value: any): void; + + /** + * returns the properties which are to be superseded by this handler + * + * Besides defining an own set of properties (see {@link getSupportedProperties()} ), a property handler can also declare that foreign properties (which + * it is **not** responsible for) are superseded by its own properties. + * + * This is usually used if your handler is used with another, more generic one, which should continue to be responsible for all properties, except a few + * which your handler handles more elegantly. + * + * In such a case, simply return those properties here. + * + * There is a precedence in the property handlers used by an {@link ObjectInspector} , which also is important for the superseded properties. This + * precedence is implied by the precedence of factories to create the property handlers, as denoted in the {@link XObjectInspectorModel.HandlerFactories} + * attribute. + * + * With this in mind, property handlers can only supersede properties which are supported by a handler preceding them, but not properties of handlers + * succeeding them. + * + * For instance, imaging an {@link XObjectInspectorModel} which provides three factories, for handler `A` , `B` , and `C` - in this order. Now if `A` + * supports the property `Foo` , `C` supports `Bar` , and `B` supersedes both `Foo` and `Bar` , them the result is `Bar` is still present. This is + * because `B` precedes `C` , so it cannot, by definition, supersede properties which are supported by `C` . + * + * If {@link getSupportedProperties()} returned an empty sequence, this method will not be called. + * @see XObjectInspectorModel.HandlerFactories + */ + readonly SupersededProperties: SafeArray; + + /** + * returns the properties which the handler can handle + * + * A handler is allowed to return an empty sequence here, indicating that for the given introspection, no properties handling can be provided. This might + * happen when a fixed set of property handlers is used for a variety of components to inspect, where not all handlers can really cope with all + * components. + * + * In the case of returning an empty sequence here, the property handler is ignored by all further processing in the object inspector. + */ + readonly SupportedProperties: SafeArray; + + /** + * suspends the handler + * + * A {@link XPropertyHandler} is used by a {@link XObjectInspector} instance, which implements the XController interface. By definition, a {@link + * XObjectInspector} always forwards all suspend requests ( {@link com.sun.star.frame.XController.suspend()} ) to all its handlers. + * + * The usual use case for this method are non-modal user interface components used for property value input. Such a component might have been opened + * during {@link onInteractivePropertySelection()} . If a property handler receives a {@link suspend()} call, it should forward the suspension request to + * the UI component, and veto suspension of the {@link XObjectInspector} as appropriate. + * + * If suspension is not to be vetoed, then all non-modal UI components opened by the handler should have been closed when it returns from the {@link + * suspend()} call. + * @param Suspend Whether the handler is to be suspended `TRUE` or reactivated ( `FALSE` ). The latter happens if a handler was successfully suspended, but + * @returns `TRUE` if the handler does allow suspension, `FALSE` if it vetoes it. + */ + suspend(Suspend: boolean): boolean; + } + + /** + * defines the interface for an {@link XPropertyControl} which, additionally to the basic behavior, supports a list of strings interpreted as possible + * property values. + * + * A control which would canonically implement this interface is a list box control: The string list defined by {@link XStringListControl} would in the + * control be represented as drop-down list containing all the strings. + * @since OOo 2.0.3 + */ + interface XStringListControl extends XPropertyControl { + /** appends a new entry to the end of the list */ + appendListEntry(NewEntry: string): void; + + /** clears the whole list */ + clearList(): void; + + /** gets all list entries */ + getListEntries(): SafeArray; + + /** gets all list entries */ + readonly ListEntries: SafeArray; + + /** prepends a new entry to the beginning of the list */ + prependListEntry(NewEntry: string): void; + } + + /** + * handles string representations of property values. + * @see + */ + interface XStringRepresentation { + /** + * converts a into a string. + * @param PropertyValue The to-be-converted property value. + * @returns The converted string representation of the property value. + * @see XPropertyHandler.convertToControlValue() + */ + convertToControlValue(PropertyValue: any): string; + + /** + * converts a string into an any with the type defined by the target type. + * @param ControlValue The to-be-converted control value. + * @param ControlValueType The target type of the conversion. + * @see XPropertyHandler.convertToPropertyValue() + */ + convertToPropertyValue(ControlValue: string, ControlValueType: type): any; + } + + namespace PropertyControlType { + const enum Constants { + CharacterField = 5, + ColorListBox = 7, + ComboBox = 2, + DateField = 9, + DateTimeField = 11, + HyperlinkField = 12, + ListBox = 1, + MultiLineTextField = 4, + NumericField = 8, + StringListField = 6, + TextField = 3, + TimeField = 10, + Unknown = 13, + } + } + + namespace PropertyLineElement { + const enum Constants { + All = 255, + InputControl = 1, + PrimaryButton = 2, + SecondaryButton = 4, + } + } + } + + namespace io { + /** is thrown when a client tries to connect to a resource to which he is already connected. */ + type AlreadyConnectedException = IOException; + + /** + * is thrown by instances which need to buffer data. + * + * It indicates that not enough system resources are available for extending the buffer. (May also indicate that the internal buffer has grown to a + * larger size than 2G. Some current implementations do not support larger buffers.) + */ + type BufferSizeExceededException = IOException; + + /** + * Signals that an error occurred while attempting to connect a socket to a remote address and port. Typically, the connection was refused remotely + * (e.g., no process is listening on the remote address/port). + */ + type ConnectException = SocketException; + + /** is thrown when an input or output error has occurred. */ + type IOException = uno.Exception; + + /** + * Signals that an error occurred while attempting to connect a socket to a remote address and port. Typically, the remote host cannot be reached because + * of an intervening firewall, or if an intermediate router is down. + */ + type NoRouteToHostException = SocketException; + + /** is thrown when a read/write operation is tried on an instance that has not been chained properly. */ + type NotConnectedException = IOException; + + /** + * the implementation of an output stream and an input stream. + * + * All data written through the outputstream is buffered until it is read again from the input stream. Often two different threads access input and + * outputstream. + * + * With the pipe-service, an outputstream can be converted into an input stream at the cost of an additional buffer. + */ + type Pipe = XPipe; + + /** This service allows to wrap a sequence of bytes with a output stream object. */ + type SequenceOutputStream = XSequenceOutputStream; + + /** Thrown to indicate that there is an error in the underlying protocol, such as a TCP error. */ + type SocketException = IOException; + + /** This service allows to get access to temp files. */ + type TempFile = XTempFile; + + /** + * provides functionality to read text data from a {@link com.sun.star.io.XInputStream} that initially has to be passed to the method {@link + * XActiveDataSink.setInputStream()} . + * + * For details about the text functionality see {@link com.sun.star.io.XTextInputStream} . + */ + type TextInputStream = XTextInputStream2; + + /** + * provides functionality to write text data to a {@link com.sun.star.io.XOutputStream} that initially has to be passed to the method {@link + * XActiveDataSource.setOutputStream()} . + * + * For details about the text functionality see {@link com.sun.star.io.XTextOutputStream} . + */ + type TextOutputStream = XTextOutputStream2; + + /** is thrown when the `EOF` is reached during reading a datatype ( `long` , `string` , etc.). */ + type UnexpectedEOFException = IOException; + + /** is thrown when the IP address of a host could not be determined. */ + type UnknownHostException = IOException; + + /** is thrown when inconsistent data comes up while reading a complex data type ( `string` or object). */ + type WrongFormatException = IOException; + + /** + * reads structured data from a chained {@link XInputStream} . + * + * An implementation of this service in general does not need to buffer data itself. + * @see com.sun.star.io.ObjectInputStream + */ + interface DataInputStream extends XDataInputStream, XActiveDataSink, XConnectable { } + + /** + * writes structured data to a chained {@link XOutputStream} . + * + * An implementation of this service in general does not need to buffer data itself. + */ + interface DataOutputStream extends XDataOutputStream, XActiveDataSource { } + + /** + * is broadcast by a filter. + * @see XDataTransferEventListener + */ + interface DataTransferEvent extends lang.EventObject { + /** specifies an occurred exception. */ + aException: any; + } + + /** + * This permission represents access to a file or directory. A {@link FilePermission} consists of a file url and a set of actions valid for that url. + * + * The path of the file url that ends in `"/*"` indicates all the files and directories contained in that directory. A path that ends with `"/-"` + * indicates (recursively) all files and subdirectories contained in that directory. A file url string consisting of the special token `"<>"` + * matches any file. ; Note: A file url string consisting of a single `"*"` indicates all the files in the current directory, while a string consisting + * of a single `"-"` indicates all the files in the current directory and (recursively) all files and subdirectories contained in the current directory. + * ; The actions to be granted is a list of one or more comma-separated keywords. The possible keywords are `"read"` , `"write"` , `"execute"` , and + * `"delete"` . Their meaning is defined as follows: `read` - read permission`write` - write permission`execute` - execute permission`delete` - + * delete permission; The actions string is processed case-insensitive. + * @since OOo 1.1.2 + */ + interface FilePermission { + /** comma separated actions list */ + Actions: string; + + /** target file url */ + URL: string; + } + + /** + * allows to set marks in an inputstream and to later jump back to these marks. + * + * The implementation reads the original data from the input stream, that has been set previously at the {@link XActiveDataSink} interface. In general + * the implementation must buffer the data. + */ + interface MarkableInputStream extends XInputStream, XMarkableStream, XActiveDataSink, XConnectable { } + + /** + * allows to set marks in an outputstream and to later jump back to these marks. + * + * The implementation stores the data as long as marks exists and later writes these data into the output stream, that has been set previously at the + * {@link XActiveDataSource} interface. + */ + interface MarkableOutputStream extends XOutputStream, XMarkableStream, XActiveDataSource, XConnectable { } + + /** + * is a stream which allows reading the data of persistent objects. + * + * Implementations of this service must fulfill the specifications of the {@link DataInputStream} service. It must be chained to an {@link + * XMarkableStream} . Therefore, it provides the {@link XMarkableStream} interface, and delegates the calls to the chained object. + * + * The written objects are held until this instance is destroyed. The references to the objects are read as four-byte integers. Data format reads: + * + * `; short InfoLength; long ObjectReference // 0 indicates no object; UTF ServiceName // length of 0 indicates this is only a reference; + * long ObjectLength // 0 if it is a reference or no object, otherwise the len of the object data; Object ObjectData // the data of the + * object; ... // skipping additional data; ` + */ + interface ObjectInputStream extends XObjectInputStream, XActiveDataSink, XConnectable, XMarkableStream { } + + /** + * is a stream which allows writing the data of persistent objects. + * + * Implementations of this service must fulfill the specifications of the {@link DataOutputStream} service; furthermore, the stream needs to be chained + * to a {@link XMarkableStream} . Therefore, it also provides the {@link XMarkableStream} interface, but it delegates the calls to the chained object. + * The written objects are held until this instance is destroyed. The references to the objects are written as four-byte integers and begin at 1. Data + * format is written: + * + * `; short InfoLength; long ObjectReference // 0 indicates no object; UTF ServiceName // length of 0 indicates this is only a reference; + * long ObjectLength // 0 if it is a reference or no object, otherwise the len of the object data; Object ObjectData // the data of the + * object; ` + */ + interface ObjectOutputStream extends XObjectOutputStream, XActiveDataSource, XConnectable { } + + /** + * the implementation of a data source and a data sink. + * + * A thread will be created that reads from the input stream and writes the data to the connected output stream. Data will not be buffered by this + * service. + */ + interface Pump extends XActiveDataSource, XActiveDataSink, XActiveDataControl { } + + /** This service allows to wrap a sequence of bytes with a stream object. */ + interface SequenceInputStream extends XSeekableInputStream { + /** allows to create a stream based on the sequence. */ + createStreamFromSequence(aData: LibreOffice.SeqEquiv): void; + } + + /** + * makes it possible to control an active data source. + * + * This interface should be supported by objects which implement {@link XActiveDataSource} or {@link XActiveDataSink} . + */ + interface XActiveDataControl extends uno.XInterface { + /** + * registers an object to receive events from this data source. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + */ + addListener(aListener: XStreamListener): void; + + /** + * unregisters an object to receive events from this data source. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + */ + removeListener(aListener: XStreamListener): void; + + /** + * starts I/O. + * + * Either XActiveDataControl::setInputStream() or XActiveDataControl::setOutputStream() must be called beforehand. + * + * This method does not block the thread, so reading is generally not finished when the method returns. + */ + start(): void; + + /** + * does a weak abort. + * + * It closes all connected resources and calls XInputStream::close() or XOutputStream::close() and fires the {@link XStreamListener.terminated()} -event. + */ + terminate(): void; + } + + /** + * makes it possible to read the corresponding object from an input stream. + * + * If you want to allow control from outside, also implement the {@link XActiveDataControl} interface. + */ + interface XActiveDataSink extends uno.XInterface { + /** @returns the plugged stream. */ + getInputStream(): XInputStream; + + /** @returns the plugged stream. */ + InputStream: XInputStream; + + /** + * plugs the input stream. + * + * If {@link XConnectable} is also implemented, this method should query **aStream** for an {@link XConnectable} and connect both. + */ + setInputStream(aStream: XInputStream): void; + } + + /** + * has to be implemented if the class should be able to write into an output stream. + * @see XActiveDataControl. + */ + interface XActiveDataSource extends uno.XInterface { + /** @returns the plugged stream. */ + getOutputStream(): XOutputStream; + + /** @returns the plugged stream. */ + OutputStream: XOutputStream; + + /** + * plugs the output stream. + * + * If {@link XConnectable} is also implemented, this method should query **aStream** for a {@link XConnectable} and connect both. + */ + setOutputStream(aStream: XOutputStream): void; + } + + /** + * makes it possible to read and write the corresponding stream. + * + * If you want to allow control from outside, also implement the {@link XActiveDataControl} interface. + */ + interface XActiveDataStreamer extends uno.XInterface { + /** @returns the plugged stream. */ + getStream(): XStream; + + /** + * plugs the input/output stream. + * + * If {@link XConnectable} is also implemented, this method should query **aStream** for a {@link XConnectable} and connect both. + */ + setStream(aStream: XStream): void; + + /** @returns the plugged stream. */ + Stream: XStream; + } + + /** + * An optional companion interface to {@link com.sun.star.io.XOutputStream} that supports scenarios where {@link + * com.sun.star.io.XOutputStream.writeBytes()} operates asynchronously and does not necessarily report any errors. + * + * A typical scenario where this interface is useful is when an {@link com.sun.star.io.XOutputStream} is used to write to a file via NFS. Normally, any + * calls to {@link com.sun.star.io.XOutputStream.writeBytes()} will execute asynchronously then, in that any potential errors might only be reported by + * later calls to {@link com.sun.star.io.XOutputStream.writeBytes()} or {@link com.sun.star.io.XOutputStream.closeOutput()} . If such an output stream + * shall not be closed immediately after one or more calls to {@link com.sun.star.io.XOutputStream.writeBytes()} , but the client wants to know as soon + * as possible whether writing was successful, then {@link com.sun.star.io.XAsyncOutputMonitor.waitForCompletion()} should be called after the series of + * calls to {@link com.sun.star.io.XOutputStream.writeBytes()} . + * @since OOo 2.0 + */ + interface XAsyncOutputMonitor { + /** + * waits for the completion of any previous calls to {@link com.sun.star.io.XOutputStream.writeBytes()} , and reports potentially pending errors. + * + * Calling this method is potentially expensive (even if the associated {@link com.sun.star.io.XOutputStream} represents a local file not accessed via + * NFS, for example). This method has a similar description to {@link com.sun.star.io.XOutputStream.flush()} . However, where the semantics of `flush` + * are rather vague, `waitForCompletion` has very specific semantics -- it just blocks long enough so that any errors encountered during previous calls + * to {@link com.sun.star.io.XOutputStream.writeBytes()} can reliably be reported. It specificially does not guarantee that any data have safely been + * stored on a stable physical medium, like a hard disk (and it is completely unspecified whether `flush` should give this guarantee). + * @throws com::sun::star::io::IOException if any previous call to {@link com.sun.star.io.XOutputStream.writeBytes()} encountered such an error, but has not + */ + waitForCompletion(): void; + } + + /** + * makes it possible to connect data sinks and sources. + * + * The predecessor-member is the element in the connection that is nearer to the source of the data. The successor-member is the element that is further + * away from the source of the data. (Note that this classification does not depend on whether the class implements {@link XInputStream} or {@link + * XOutputStream} ; it only depends on the direction of data flow.) + * + * This interface allows generic services to navigate between arbitrary elements of a connection. + */ + interface XConnectable extends uno.XInterface { + /** @returns the predecessor of this object. */ + getPredecessor(): XConnectable; + + /** @returns the successor of this object. */ + getSuccessor(): XConnectable; + + /** @returns the predecessor of this object. */ + Predecessor: XConnectable; + + /** sets the source of the data flow for this object. */ + setPredecessor(aPredecessor: XConnectable): void; + + /** sets the sink of the data flow for this object. */ + setSuccessor(aSuccessor: XConnectable): void; + + /** @returns the successor of this object. */ + Successor: XConnectable; + } + + /** + * makes it possible to export data from a component into a data sink. + * + * Exporter objects are registered for specific components and data types. + */ + interface XDataExporter extends uno.XInterface { + /** cancels the export process. */ + cancel(): void; + + /** exports data for a component into an output stream. */ + exportData(aOutputStream: XOutputStream, Component: lang.XComponent, aListener: XDataTransferEventListener): void; + } + + /** + * makes it possible to import data from a data source into a component. + * + * Importer objects are registered for specific components and data types. + */ + interface XDataImporter extends uno.XInterface { + /** cancels the import process. */ + cancel(): void; + + /** imports data for a component from an active data source. */ + importData(aActiveSource: XActiveDataSource, Component: lang.XComponent, aListener: XDataTransferEventListener): void; + } + + /** + * makes it possible to read machine-independent simple data types from a stream. + * @see com.sun.star.io.XDataOutputStream + */ + interface XDataInputStream extends XInputStream { + /** reads in a boolean. It is an 8-bit value. 0 means FALSE; all other values mean TRUE. */ + readBoolean(): number; + + /** reads an 8-bit byte. */ + readByte(): number; + + /** reads a 16-bit unicode character. */ + readChar(): string; + + /** reads a 64-bit IEEE double. */ + readDouble(): number; + + /** reads a 32-bit IEEE float. */ + readFloat(): number; + + /** reads a 64-bit big endian integer. */ + readHyper(): number; + + /** reads a 32-bit big endian integer. */ + readLong(): number; + + /** reads a 16-bit big endian integer. */ + readShort(): number; + + /** reads a string of UTF encoded characters. */ + readUTF(): string; + } + + /** + * makes it possible to write machine-independent simple data types to a stream. + * @see com.sun.star.io.XDataInputStream + */ + interface XDataOutputStream extends XOutputStream { + /** writes a boolean. It is an 8-bit value. 0 means FALSE; all other values mean TRUE. */ + writeBoolean(Value: boolean): void; + + /** writes an 8-bit byte. */ + writeByte(Value: number): void; + + /** writes a 16-bit character. */ + writeChar(Value: string): void; + + /** writes a 64-bit IEEE double. */ + writeDouble(Value: number): void; + + /** writes a 32-bit IEEE float. */ + writeFloat(Value: number): void; + + /** writes a 64-bit big endian integer. */ + writeHyper(Value: number): void; + + /** writes a 32-bit big endian integer. */ + writeLong(Value: number): void; + + /** writes a 16-bit big endian integer. */ + writeShort(Value: number): void; + + /** writes a string in UTF format. */ + writeUTF(Value: string): void; + } + + /** is used to receive callbacks from an importer or exporter. */ + interface XDataTransferEventListener extends lang.XEventListener { + /** is called when an import or export process has been cancelled. */ + cancelled(aEvent: DataTransferEvent): void; + + /** is called when an import or export process has finished. */ + finished(aEvent: DataTransferEvent): void; + } + + /** + * This is the basic interface to read data from a stream. + * + * See the [streaming document]{@link url="http://udk.openoffice.org/common/man/concept/streams.html"} for further information on chaining and piping + * streams. + */ + interface XInputStream extends uno.XInterface { + /** + * states how many bytes can be read or skipped without blocking. + * + * Note: This method offers no information on whether the EOF has been reached. + */ + available(): number; + + /** + * closes the stream. + * + * Users must close the stream explicitly when no further reading should be done. (There may exist ring references to chained objects that can only be + * released during this call. Thus not calling this method would result in a leak of memory or external resources.) + */ + closeInput(): void; + + /** + * reads the specified number of bytes in the given sequence. + * + * The return value specifies the number of bytes which have been put into the sequence. A difference between **nBytesToRead** and the return value + * indicates that EOF has been reached. This means that the method blocks until the specified number of bytes are available or the EOF is reached. + * @param aData after the call, the byte sequence contains the requested number of bytes (or less as a sign of EOF). ; C++ only : Note that for unbridged + * @param nBytesToRead the total number of bytes to read + */ + readBytes(aData: [LibreOffice.SeqEquiv], nBytesToRead: number): number; + + /** + * reads the available number of bytes, at maximum **nMaxBytesToRead** . + * + * This method is very similar to the readBytes method, except that it has different blocking behaviour. The method blocks as long as at least 1 byte is + * available or EOF has been reached. EOF has only been reached, when the method returns 0 and the corresponding byte sequence is empty. Otherwise, after + * the call, aData contains the available, but no more than nMaxBytesToRead, bytes. + * @param aData contains the data read from the stream. + * @param nMaxBytesToRead The maximum number of bytes to be read from this stream during the call. + * @see com.sun.star.io.XInputStream.readBytes + */ + readSomeBytes(aData: [LibreOffice.SeqEquiv], nMaxBytesToRead: number): number; + + /** + * skips the next **nBytesToSkip** bytes (must be positive). + * + * It is up to the implementation whether this method is blocking the thread or not. + * @param nBytesToSkip number of bytes to skip + */ + skipBytes(nBytesToSkip: number): void; + } + + /** + * Interface for providing an input stream. + * + * Every time {@link createInputStream()} is called a new input stream is returned, always pointing to the begin of the same data. All input streams + * returned by {@link createInputStream()} are completely independent from each other. + */ + interface XInputStreamProvider extends uno.XInterface { + /** + * Creates a new input stream, every time providing the same data. + * @returns a new input stream + */ + createInputStream(): XInputStream; + } + + /** makes it possible to set and remove seekable marks to a stream. */ + interface XMarkableStream extends uno.XInterface { + /** creates a mark of the current position and returns an identifier to it. */ + createMark(): number; + + /** + * deletes the mark that you previously created with {@link XMarkableStream.createMark()} . + * + * It is an error to delete a mark if other marks after this exist. In this case, for reasons of robustness, the implementation must delete this mark and + * all others after this mark. + */ + deleteMark(Mark: number): void; + + /** + * jumps to the furthest position of the stream. + * + * In the inputstream case, a subsequent read call returns data, that was never read or skipped over before. In the outputstream case, a subsequent write + * call will add new data at the end of the stream without overwriting existing data. + */ + jumpToFurthest(): void; + + /** jumps to a previously created mark. */ + jumpToMark(nMark: number): void; + + /** + * @param nMark identifies the mark which is used as a base to calculate the offset of the current position. + * @returns the offset from the current stream position to the mark ("current position" - "mark position"). + * @throws IllegalArgumentException if the mark does not exist or is deleted. + * @throws IOException if an I/O error has occurred. + */ + offsetToMark(nMark: number): number; + } + + /** reads {@link XPersistObject} implementations from a stream */ + interface XObjectInputStream extends XDataInputStream { + /** + * reads an object from the stream. In general, it reads the service name, instantiaties the object and calls read on the {@link XPersistObject} + * interface with itself as argument. + */ + readObject(): XPersistObject; + } + + /** + * stores {@link XPersistObject} implementations into the stream + * + * An implementation of the type {@link XPersistObject} uses this interface to write its internal state into a stream. Have a look there for the + * explanation of the concept. + * @see com.sun.star.io.XPersistObject + */ + interface XObjectOutputStream extends XDataOutputStream { + /** + * writes an object to the stream. + * @param Object the object, which shall serialize itself into the stream. + */ + writeObject(Object: XPersistObject): void; + } + + /** + * This is the basic interface to write data to a stream. + * + * See the [streaming document]{@link url="http://udk.openoffice.org/common/man/concept/streams.html"} for further information on chaining and piping + * streams. + */ + interface XOutputStream extends uno.XInterface { + /** + * gets called to indicate that all data has been written. + * + * If this method has not yet been called, no attached {@link XInputStream} receives an EOF signal. No further bytes may be written after this method has + * been called. + */ + closeOutput(): void; + + /** + * flushes out of the stream any data that may exist in buffers. + * + * The semantics of this method are rather vague. See {@link com.sun.star.io.XAsyncOutputMonitor.waitForCompletion()} for a similar method with very + * specific semantics, that is useful in certain scenarios. + */ + flush(): void; + + /** writes the whole sequence to the stream. (blocking call) */ + writeBytes(aData: LibreOffice.SeqEquiv): void; + } + + /** makes it possible to write this object to an URL or read it from an URL. */ + interface XPersist extends uno.XInterface { + /** reads all the persistent data of the object from the URL. */ + read(URL: string): void; + + /** writes all the persistent data of the object to the URL. */ + write(URL: string): void; + } + + /** + * allows to make UNO objects persistent + * + * Every UNO object, that wants to be serializable, should implement this interface. The object stores stores itself, when the write method is called. + * + * The object needs to be created before it deserializes itself again (by using the read method). Therefore it must be creatable by name via a factory, + * which is in general the global service manager. The create and read mechanism is implemented by the {@link com.sun.star.io.ObjectInputStream} . + * + * The serialization format (the series of strings, integers, objects) must be specified at the specification of the concrete service. + * + * The interface does not support any special versioning mechanism. + * @see com.sun.star.io.XObjectOutputStream + * @see com.sun.star.io.XObjectInputStream + */ + interface XPersistObject extends uno.XInterface { + /** + * gives the service name of the object + * + * This name is used to create such an object by a factory during deserialization. + * @returns the service name that specifies the behavior and the persistent data format of this implementation. + * @see com.sun.star.lang.XMultiComponentFactory.getAvailableServiceNames() + */ + getServiceName(): string; + + /** + * reads all the persistent data of the object from the stream. + * + * In case other XPersistObjects are read from the stream, the implementation uses a factory to create these objects (in general the global service + * manager). + * + * The implementation must read the data in the order documented at the service specification. + * @param InStream the stream, the data shall be read from. + */ + read(InStream: XObjectInputStream): void; + + /** + * gives the service name of the object + * + * This name is used to create such an object by a factory during deserialization. + * @returns the service name that specifies the behavior and the persistent data format of this implementation. + * @see com.sun.star.lang.XMultiComponentFactory.getAvailableServiceNames() + */ + readonly ServiceName: string; + + /** + * writes all the persistent data of the object to the stream. + * + * The implementation must write the data in the order documented in the service specification. + * @param OutStream the stream, the data shall be written to. The stream supports simple types and other {@link XPersistObject} implementations. + */ + write(OutStream: XObjectOutputStream): void; + } + + /** + * The implementation of an output stream and an input stream. + * + * All data written through the outputstream is buffered until it is read again from the input stream. Often two different threads access input and + * outputstream. + * + * With the pipe-service, an outputstream can be converted into an input stream at the cost of an additional buffer. + * @since LibreOffice 4.0 + */ + interface XPipe extends XOutputStream, XInputStream { } + + /** + * makes it possible to seek to a certain position within a stream. + * + * This interface should be supported, if it is possible to access the data at the new position quickly. You should not support this interface, if you + * have a continuous stream, for example, a video stream. + */ + interface XSeekable extends uno.XInterface { + /** + * returns the length of the stream. + * @returns the length of the storage medium on which the stream works. + */ + getLength(): number; + + /** + * returns the current offset of the stream. + * @returns the current offset in this stream. + */ + getPosition(): number; + + /** + * returns the length of the stream. + * @returns the length of the storage medium on which the stream works. + */ + readonly Length: number; + + /** + * returns the current offset of the stream. + * @returns the current offset in this stream. + */ + readonly Position: number; + + /** + * changes the seek pointer to a new location relative to the beginning of the stream. + * + * This method changes the seek pointer so subsequent reads and writes can take place at a different location in the stream object. It is an error to + * seek before the beginning of the stream or after the end of the stream. + * @throws com::sun::star::lang::IllegalArgumentException in case location is negative or greater than {@link XSeekable.getLength()} . + */ + seek(location: number): void; + } + + /** This interface can be used to represent a seekable input stream. */ + interface XSeekableInputStream extends XInputStream, XSeekable { } + + /** This interface offers access to the written bytes */ + interface XSequenceOutputStream extends XOutputStream { + /** allows to get access to the written data */ + getWrittenBytes(): SafeArray; + + /** allows to get access to the written data */ + readonly WrittenBytes: SafeArray; + } + + /** offers read and write access to the same stream. */ + interface XStream extends uno.XInterface { + /** @returns the {@link XInputStream} part of the stream. Closing the returned {@link XInputStream} also closes any {@link XOutputStream} part. */ + getInputStream(): XInputStream; + + /** @returns the {@link XInputStream} part of the stream. Closing the returned {@link XOutputStream} also closes the {@link XInputStream} part. */ + getOutputStream(): XOutputStream; + + /** @returns the {@link XInputStream} part of the stream. Closing the returned {@link XInputStream} also closes any {@link XOutputStream} part. */ + readonly InputStream: XInputStream; + + /** @returns the {@link XInputStream} part of the stream. Closing the returned {@link XOutputStream} also closes the {@link XInputStream} part. */ + readonly OutputStream: XOutputStream; + } + + /** makes it possible to receive events from an active data control. */ + interface XStreamListener extends lang.XEventListener { + /** + * gets called when data transfer terminates normally or when data transfer is terminated from outside. + * + * The termination could be done using the method {@link XActiveDataControl.terminate()} . + */ + closed(): void; + + /** + * gets called when an internal error in source or sink has occurred. + * + * After the method is called, the close is called on the connected streams. + */ + error(aException: any): void; + + /** gets called as soon as data transfer has started. */ + started(): void; + + /** gets called when {@link XActiveDataControl.terminate()} is called. */ + terminated(): void; + } + + /** This interface offers access to temp files. */ + interface XTempFile extends XStream, XSeekable { + /** This attribute controls whether the file will be automatically removed on object destruction. */ + RemoveFile: boolean; + + /** This attribute specifies the temp file name. */ + ResourceName: string; + + /** This attribute specifies the URL of the temp file. */ + Uri: string; + } + + /** + * Interface to read strings from a stream. + * + * This interfaces allows to read strings separated by delimiters and to read lines. The character encoding to be used can be set by {@link + * setEncoding()} . Default encoding is "utf8". + */ + interface XTextInputStream extends XInputStream { + /** + * Returns the EOF status. + * + * This method has to be used to detect if the end of the stream is reached. + * + * **Important:** This cannot be detected by asking for an empty string because that can be a valid return value of {@link readLine()} (if the line is + * empty) and {@link readString()} (if a delimiter is directly followed by the next one). + * @returns `TRUE` , if the end of file is reached, so that no next string can be read. `FALSE` otherwise + */ + isEOF(): boolean; + + /** + * reads text until a line break (CR, LF, or CR/LF) or EOF is found and returns it as string (without CR, LF). + * + * The read characters are converted according to the encoding defined by {@link setEncoding()} . If EOF is already reached before calling this method an + * empty string is returned. + * @see setEncoding + * @see isEOF + */ + readLine(): string; + + /** + * reads text until one of the given delimiter characters or EOF is found and returns it as string (without delimiter). + * + * **Important:** CR/LF is not used as default delimiter! So if no delimiter is defined or none of the delimiters is found, the stream will be read to + * EOF. The read characters are converted according to the encoding defined by {@link setEncoding()} . If EOF is already reached before calling this + * method an empty string is returned. + * @see setEncoding + * @see isEOF + */ + readString(Delimiters: LibreOffice.SeqEquiv, bRemoveDelimiter: boolean): string; + + /** + * sets character encoding. + * @param Encoding sets the character encoding that should be used. The character encoding names refer to the document [http://www.iana.org/assignments/cha + */ + setEncoding(Encoding: string): void; + } + + /** + * Provides a unified interface for the new-style service {@link TextInputStream} . + * @since LibreOffice 4.1 + */ + interface XTextInputStream2 extends XTextInputStream, XActiveDataSink { } + + /** + * Interface to write strings to a stream using a special character encoding. + * + * This interfaces allows to write strings to a stream. The character encoding to be used can be set by {@link setEncoding()} . Default encoding is + * "utf8". + */ + interface XTextOutputStream extends XOutputStream { + /** + * sets character encoding. + * @param Encoding sets the character encoding that should be used. The character encoding names refer to the document [http://www.iana.org/assignments/cha + */ + setEncoding(Encoding: string): void; + + /** + * writes a string to the stream using the encoding defined by {@link setEncoding()} . + * + * Line breaks or delimiters that may be necessary to support {@link XTextInputStream.readLine()} and {@link XTextInputStream.readString()} have to be + * added manually to the parameter string. + * @see setEncoding + * @see XTextInputStream.readLine + * @see XTextInputStream.readString + */ + writeString(aString: string): void; + } + + /** + * Provides a unified interface for the new-style service {@link TextOutputStream} . + * @since LibreOffice 4.1 + */ + interface XTextOutputStream2 extends XTextOutputStream, XActiveDataSource { } + + /** makes it possible to set the size of the underlying data of a stream to zero. */ + interface XTruncate extends uno.XInterface { + /** sets the size of the underlying data of the stream to zero. */ + truncate(): void; + } + + /** offers the capability to extract the XML document stream from a document storage. */ + interface XXMLExtractor extends uno.XInterface { + /** + * extracts the XML stream from the document storage. + * @returns the extracted XML stream. + */ + extract(aStream: XInputStream): XInputStream; + } + } + + namespace java { + /** + * indicates a the Java settings have been modified. + * + * The Java framework uses a configuration file, which can be used by distributors to determine what versions are supported. If this file is modified, + * then the current settings are regarded as invalid. + * @since OOo 2.0 + */ + type InvalidJavaSettingsException = JavaInitializationException; + + /** + * indicates that Java could not be initialized because it has been switched off. + * + * The user has switched off Java in the configuration of the office, for example by means of the options dialog. + * @since OOo 1.1.2 + */ + type JavaDisabledException = JavaInitializationException; + + /** + * indicates that there is no Java available + * + * It is presumed that Java is a vital part of an office installation. That is, if Java does work for some reason, it is not guaranteed that the office + * is functional. A {@link JavaInitializationException} is therefore caused by some misconfiguration of Java which is closer described by other + * exceptions in this namespace which inherit {@link JavaInitializationException} . These are: + * + * {@link com.sun.star.java.JavaDisabledException}; {@link com.sun.star.java.JavaNotConfiguredException}; {@link + * com.sun.star.java.MissingJavaRuntimeException}; {@link com.sun.star.java.JavaVMCreationFailureException}; + * @since OOo 1.1.2 + */ + type JavaInitializationException = uno.DeploymentException; + + /** + * indicates that the user did not configure Java for an Office installation. + * + * This exception occurs if there is no java.ini or javarc available. This usually happens if a user cancels the Java configuration which of the office. + * @since OOo 1.1.2 + */ + type JavaNotConfiguredException = JavaInitializationException; + + /** + * indicates that no suitable JRE was found. + * @since OOo 2.0 + */ + type JavaNotFoundException = JavaInitializationException; + + /** + * Exports interfaces to handle a Java VM. + * @deprecated DeprecatedA UNO service seems to be at the wrong abstraction level for this functionality. This should probably be replaced by an appropriate C/C + */ + type JavaVirtualMachine = XJavaVM; + + /** + * indicates that the office must be restarted before a JRE can be used. + * @since OOo 2.0 + */ + type RestartRequiredException = JavaInitializationException; + + /** + * indicates that the Java Virtual Machine could not be created + * + * This exception can be thrown when the creation of the Java Virtual Machine failed, even if the runtime library could be loaded. Possible reasons for a + * failure are that JNI_CreateJavaVM returns an error code that reflects a failure, JNI_CreateJavaVM does not return because it tries to quit the process + * ( _exit), the shared library is corrupted, so that the symbols for JNI_GetDefaultVMInitArgs or JNI_CreateJavaVM cannot be found, etc. + * @since OOo 1.1.2 + */ + interface JavaVMCreationFailureException extends JavaInitializationException { + /** + * contains an error code that reflects the returned error code of JNI_CreateJavaVM or other errors. A negative value represents the returned error code + * of JNI_CreateJavaVM. All other values indicate a different cause. + */ + ErrorCode: number; + } + + /** + * indicates that the Java runtime library could not be found. + * + * This happens when a user moves or deletes a Java installation after the office has been configured to use that Java installation. + * @since OOo 1.1.2 + */ + interface MissingJavaRuntimeException extends JavaInitializationException { + /** contains the path to the runtime lib as file URL. */ + URLRuntimeLib: string; + } + + /** indicates that an operation involving Java (probably executing Java code) failed due to a wrong Java version. */ + interface WrongJavaVersionException extends uno.Exception { + /** contains the Java version that has been detected, or is left empty if this is unknown. */ + DetectedVersion: string; + + /** contains the highest Java version for which the operation would succeed, or is left empty if this is unknown. */ + HighestSupportedVersion: string; + + /** contains the lowest Java version for which the operation would succeed, or is left empty if this is unknown. */ + LowestSupportedVersion: string; + } + + /** + * must be implemented by the user of the {@link XJavaThreadRegister_11} . + * @deprecated Deprecated + */ + interface XJavaThreadRegister_11 extends uno.XInterface { + /** returns `TRUE` if the current thread is already attached to the VM otherwise `FALSE` . */ + isThreadAttached(): boolean; + + /** + * registers the current thread. + * + * This method should be called every time a JNI function is called from Java. + */ + registerThread(): void; + + /** + * revokes the current thread from the list of registered threads. + * + * This method should be called at the end of every JNI call from Java. + */ + revokeThread(): void; + } + + /** + * must be implemented by the user of the {@link XJavaVM} . + * @deprecated DeprecatedA UNO interface seems to be at the wrong abstraction level for this functionality (also, the C++ classes jvmaccess::VirtualMachine and + */ + interface XJavaVM extends uno.XInterface { + /** + * returns the address of the Java Virtual Machine. + * + * If the VM is not already instantiated, it will be now. + * + * If the `processID` is a normal 16-byte ID, the returned `any` contains a JNI `JavaVM` pointer as a `long` or `hyper` integer (depending on the + * platform). If the `processID` does not match the current process, or if the VM cannot be instantiated for whatever reason, a `VOID``any` is returned. + * + * If the `processID` has an additional 17th byte of value `0` , the returned `any` contains a non - reference-counted pointer to a + * (reference-counted) instance of the C++ `jvmaccess::VirtualMachine` class, always represented as a `hyper` integer. The pointer is guaranteed to be + * valid as long as the reference to this {@link com.sun.star.java.XJavaVM} is valid (but the pointer should be converted into a reference-counted + * reference as soon as possible). Again, if the first 16 bytes of the `processID` do not match the current process, or if the VM cannot be instantiated + * for whatever reason, a `VOID``any` is returned. + * + * If the `processID` has an additional 17th byte of value `1` , the returned `any` contains a non - reference-counted pointer to a + * (reference-counted) instance of the C++ `jvmaccess::UnoVirtualMachine` class, always represented as a `hyper` integer. The pointer is guaranteed to be + * valid as long as the reference to this {@link com.sun.star.java.XJavaVM} is valid. Again, if the first 16 bytes of the `processID` do not match the + * current process, or if the VM cannot be instantiated for whatever reason, a `VOID``any` is returned. + * + * The first form (returning a JNI `JavaVM` pointer) is mainly for backwards compatibility, new code should use the second form (returning a pointer to a + * `jvmaccess::VirtualMachine` ) if it does not want to use the Java UNO environment, and it should use the third form (returning a pointer to a + * `jvmaccess::UnoVirtualMachine` ) if it wants to use the Java UNO environment. For example, one advantage of using `jvmaccess::VirtualMachine` instead + * of the raw `JavaVM` pointer is that whenever you attach a native thread to the Java virtual machine, that thread's context `ClassLoader` (see + * `java.lang.Thread.getContextClassLoader` ) will automatically be set to a meaningful value. + * @param processID The process ID of the caller's process, possibly extended by a 17th byte of value `0` or `1` . + * @returns On success, the `any` contains a pointer represented as `long` or `hyper` , otherwise the `any` is `VOID` . + */ + getJavaVM(processID: LibreOffice.SeqEquiv): any; + + /** + * Returns `TRUE` if the VM is enabled. + * + * It is only possible to get the VM, if this method return 0. + */ + isVMEnabled(): boolean; + + /** returns `TRUE` if the VM is started successfully, otherwise `FALSE` . */ + isVMStarted(): boolean; + } + } + + namespace lang { + /** + * This exception is thrown to indicate that an array has been accessed with an illegal index. + * + * The index is either negative or greater than or equal to the size of the array. + */ + type ArrayIndexOutOfBoundsException = IndexOutOfBoundsException; + + /** This exception is thrown when an application tries to load the information on the type through its string name. */ + type ClassNotFoundException = uno.Exception; + + /** + * This exception occurs if the object behind this interface has been disposed before and can't uphold its method specification anymore. + * + * The implementation normally should implement the {@link com.sun.star.lang.XComponent} interface to indicate this possibility. + */ + type DisposedException = uno.RuntimeException; + + /** This exception is thrown when an application tries to change a constant property. */ + type IllegalAccessException = uno.Exception; + + /** + * This exception is thrown to indicate that a container has been accessed with an illegal index. + * + * The index is either negative or greater than or equal to the count of the elements. + */ + type IndexOutOfBoundsException = uno.Exception; + + /** + * is thrown by the XConnectionPoint::advice() method to indicate that the listener has not supplied the necessary interface. + * @see XConnectionPoint + */ + type InvalidListenerException = uno.Exception; + + /** + * is thrown by the {@link XConnectionPoint.advise()} method to indicate that there is only one listener allowed. + * @see XConnectionPoint + */ + type ListenerExistException = uno.Exception; + + /** signals that the class does not have a field of a specified name. */ + type NoSuchFieldException = uno.Exception; + + /** signals that the interface does not have a method of a specified name. */ + type NoSuchMethodException = uno.Exception; + + /** + * This exception is thrown when a feature of an interface is not supported. + * + * An example is a `setParent(...)` method and the object does not allow the change. + * @see XEnumeration + * @see com.sun.star.container.XChild.setParent + */ + type NoSupportException = uno.Exception; + + /** is thrown when a component is attempted to be used before it was completely constructed. */ + type NotInitializedException = uno.RuntimeException; + + /** + * This exception is thrown when an application attempts to use `NULL` in a case where an object is required. + * + * Applications should throw instances of this class to indicate other illegal uses of the `NULL` object. + * @see com.sun.star.reflection.XIdlReflection.forName + */ + type NullPointerException = uno.Exception; + + /** + * This exception is thrown when a needed service is not found. + * + * Applications should throw instances of this class to indicate that a needed service is not registered. + */ + type ServiceNotRegisteredException = uno.Exception; + + /** specifies the base for all event objects and identifies the source of the event. */ + interface EventObject { + /** refers to the object that fired the event. */ + Source: uno.XInterface; + } + + /** This exception is thrown to indicate that a method has passed an illegal or inappropriate argument. */ + interface IllegalArgumentException extends uno.RuntimeException { + /** + * identifies the position of the illegal argument. + * + * This field is -1 if the position is not known. + */ + ArgumentPosition: number; + } + + /** + * object represents a specific geographical, political, or cultural region. + * + * An operation that requires a `Locale` to perform its task is called **locale-sensitive** and uses the `Locale` to tailor information for the user. For + * example, displaying a number is a locale-sensitive operation; the number should be formatted according to the customs/conventions of the user's native + * country, region, or culture. + * + * Because a `Locale` object is just an identifier for a region, no validity check is performed. If you want to see whether particular resources are + * available for the `Locale` , use the {@link com.sun.star.resource.XLocale.getAvailableLocales()} method to ask for the locales it supports. + * + * **Note:** When you ask for a resource for a particular locale, you get the best available match, not necessarily precisely what you asked for. For + * more information, see {@link com.sun.star.resource.XResourceBundle} . + * + * Each implementation that performs locale-sensitive operations allows you to get all the available objects of that type. Use the {@link + * com.sun.star.resource.XLocale} interface to set the locale. + */ + interface Locale { + /** + * specifies an **ISO 3166 Country Code** . + * + * These codes are the upper-case two-letter codes as defined by ISO 3166-1. You can find a full list of these codes at a number of sites, such as: ; + * [`http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm`]{@link + * url="http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm"} . + * + * If this field contains an empty string, the meaning depends on the context. + */ + Country: string; + + /** + * specifies an **ISO 639 Language Code** . + * + * These codes are preferably the lower-case two-letter codes as defined by ISO 639-1, or three-letter codes as defined by ISO 639-3. You can find a full + * list of these codes at a number of sites, such as: ; [`http://sil.org/iso639-3/codes.asp`]{@link url="http://sil.org/iso639-3/codes.asp"} . + * + * If this field contains an empty string, the meaning depends on the context. + * + * Since LibreOffice 4.2, if the locale can not be represented using only ISO 639 and ISO 3166 codes this field contains the ISO 639-3 reserved for local + * use code "qlt" and a **BCP 47** language tag is present in the Variant field. + */ + Language: string; + + /** + * specifies a **BCP 47** Language Tag. + * + * Since LibreOffice 4.2, **if** the Language field is the code "qlt" this field contains the full BCP 47 language tag. If the Language + * field is not "qlt" this field is empty. + * + * You can find BCP 47 language tag resources at ; [`http://www.langtag.net/`]{@link url="http://www.langtag.net/"} . + * + * Earlier versions of the documentation mentioned "vendor and; browser-specific" codes but that was never supported. Use of any arbitrary strings in the + * Variant field that do not form a valid BCP 47 language tag is **strongly deprecated** . + */ + Variant: string; + } + + /** + * Provides a collection of implementations of services. + * + * The factories for instantiating objects of implementations are accessed via a service name. + * + * The {@link com.sun.star.container.XContentEnumerationAccess} interface can be supported optionally. If it is supported, it is possible to enumerate + * all implementations that support the service specified with the argument of {@link + * com.sun.star.container.XContentEnumerationAccess.createContentEnumeration()} . The enumerator returns interfaces. The type of the interface is not + * specified. Commonly this is {@link XSingleComponentFactory} . + */ + interface MultiServiceFactory extends XMultiServiceFactory, XMultiComponentFactory { + getAvailableServiceNames(): SafeArray; + } + + /** + * Provides a collection of implementations for services reading from a persistent registry storage. + * + * For usage of the service manager have a look at service description of {@link ServiceManager} . + * @see ServiceManager + */ + interface RegistryServiceManager extends ServiceManager, XInitialization, beans.XPropertySet { + /** Specifies the current registry to be read from. */ + Registry: registry.XSimpleRegistry; + } + + /** + * Provides a collection of implementations for services. This is a singleton you commonly find in your component context under key + * `/singletons/com.sun.star.lang.theServiceManager` . + * + * The factories are accessed with a service name. It is possible to access the factories with their implementation names, but you should avoid this. + * + * Service factories added via {@link com.sun.star.container.XSet} should support the following interfaces: + * + * **XServiceInfo**: supported interfaces/ implementation name; + * + * **XSingleComponentFactory(optional) **: is used to create instances of the implementation.; + * + * **XComponent (optional) **: The service manager calls the method {@link com.sun.star.lang.XComponent.dispose()} on the factory when going down (i.e. + * it is commonly disposed by the component context). + * + * + * + * Since LibreOffice 3.6, in addition to instances of {@link XServiceInfo} et al, the {@link com.sun.star.container.XSet} of at least the default C++ + * service manager implementation now also supports sequences of {@link com.sun.star.beans.NamedValue} in `insert` and `remove` . The sequence elements + * must each have a `Name` of `uri` and a string `Value` that is the URI of a service rdb. It is legal for there to be no such `uri` elements. For + * `insert` , there can additionally be an optional element with a `Name` of `component-context` and a value that is a non-null reference of type {@link + * com.sun.star.uno.XComponentContext} that shall be used instead of this service manager's default component context when loading the corresponding + * implementations. + * @see com.sun.star.uno.XComponentContext + */ + interface ServiceManager extends MultiServiceFactory, XComponent, container.XSet, container.XContentEnumerationAccess, beans.XPropertySet { + /** specifies the default component context to be used, if instanciating services via {@link XMultiServiceFactory} */ + DefaultContext: uno.XComponentContext; + getAvailableServiceNames(): SafeArray; + } + + /** + * This is a checked exception that wraps an exception thrown by the original target. + * + * Normally this exception is declared for generic methods. + * @see com.sun.star.container.XIndexAccess + * @see com.sun.star.container.XNameAccess + * @see com.sun.star.beans.XPropertySet + */ + interface WrappedTargetException extends uno.Exception { + /** The exception is thrown by the target. */ + TargetException: any; + } + + /** + * This is a runtime exception that wraps any other exception thrown by the original target. + * + * This exception should not be declared at interfaces, use {@link WrappedTargetException} instead. It was defined to transport an exception via + * interface-methods, that do not specify the appropriate exceptions (so using this exception should in general be avoided). + */ + interface WrappedTargetRuntimeException extends uno.RuntimeException { + /** The exception is thrown by the target. */ + TargetException: any; + } + + /** + * allows to exclicitly free resources and break cyclic references. + * + * Actually the real lifetime of an UNO object is controlled by references kept on interfaces of this object. But there are two distinct meanings in + * keeping a reference to an interface: 1st to own the object and 2nd to know the object. + * + * You are only allowed to keep references of interfaces to UNO objects if you are by definition the owner of that object or your reference is very + * temporary or you have registered an EventListener at that object and release the reference when "disposing" is called. + */ + interface XComponent extends uno.XInterface { + /** + * adds an event listener to the object. + * + * The broadcaster fires the disposing method of this listener if the {@link XComponent.dispose()} method is called. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + * + * If this {@link XComponent} is already disposed when {@link XComponent.addEventListener()} is called, the call will not fail with a {@link + * DisposedException} , but the caller will be notified via the {@link XEventListener.disposing()} callback. This callback can occur synchronously within + * the {@link addEventListener()} call. + * @see XComponent.removeEventListener + */ + addEventListener(xListener: XEventListener): void; + + /** + * The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references. + * + * Only the owner of this object is allowed to call this method. The object should release all resources and references in the easiest possible manner ( + * for instance no serialization should take place anymore ). + * + * The object must notify all registered listeners using the method {@link XEventListener.disposing()} . All notfied objects should release there + * references to this object without calling {@link XComponent.removeEventListener()} (the disposed object will release the listeners eitherway). + * + * After this method has been called, the object should behave as passive as possible, thus it should ignore all calls in case it can comply with its + * specification (for instance {@link addEventListener()} ). Often the object can't fulfill its specification anymore, in this case it must throw the + * {@link DisposedException} (which is derived from {@link com.sun.star.uno.RuntimeException} ) when it gets called. + * + * For some objects no real owner can be identified, thus it can be disposed from multiple reference holders. In this case the object should be able to + * cope with multiple {@link dispose()} -calls (which are inevitable in a multithreaded environment). + */ + dispose(): void; + + /** + * removes an event listener from the listener list. + * + * It is a "noop" if the specified listener is not registered. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + * + * If this {@link XComponent} is already disposed when {@link XComponent.removeEventListener()} is called, the call will not fail with a {@link + * DisposedException} , but will rather be ignored silently. + * @see XComponent.addEventListener + */ + removeEventListener(aListener: XEventListener): void; + } + + /** + * supports connection points for connectable objects. + * + * Connectable objects support the following features: + * + * outgoing interfaces, such as event sets;the ability to enumerate the types of the outgoing interfaces;the ability to connect and disconnect sinks to + * the object for those outgoing types;the ability to enumerate the connections that exist to a particular outgoing interface. + * + * **When to Implement?** + * + * To create a connectable object, you need to implement objects that provide two related interfaces: + * + * {@link XConnectionPointContainer}{@link XConnectionPoint} + * + * The {@link XConnectionPointContainer} interface is implemented on the connectable object to indicate the existence of the outgoing interfaces. It + * provides a sequence of sub-objects. It also provides access to all the connection point sub-objects, each of which implements the {@link + * XConnectionPoint} interface. The {@link XConnectionPoint} interface provides a sequence of sub-objects. + * + * Each connection point is a separate sub-object to avoid circular reference counting problems. A connection point controls how many connections (one or + * more) it will allow in its implementation of {@link XConnectionPoint.advise()} . + * + * **When to use?** + * + * A client can use the {@link XConnectionPointContainer} interface: + * + * to get a sequence of connection points for each outgoing type.to obtain access to connection point sub-objects with the {@link XConnectionPoint} + * interface for each outgoing type. Through the {@link XConnectionPoint} interface, a client starts or terminates an advisory loop with the connectable + * object and the client's own sink. The client can also use the {@link XConnectionPoint} interface to get a sequence of the connections that it knows + * about. + * @see XConnectionPointContainer + */ + interface XConnectionPoint extends uno.XInterface { + /** + * creates a connection between a connection point and a client's sink, where the sink implements the outgoing interface supported by this connection + * point. + * + * A few `add...Listener` methods need additional parameters to add listeners or throw exceptions. One of these methods is {@link + * com.sun.star.beans.XPropertySet.addPropertyChangeListener()} . We ignore the problem in this interface. A solution must be provided in an additional + * {@link XConnectionPoint} interface. + * @param xListener specifies the listener interface on the client's advise sink. The client's sink receives outgoing calls from the connection point container. + * @see com.sun.star.beans.XPropertySet.addPropertyChangeListener + * @throws ListenerExistException if it is a unicast broadcaster and a listener is already set. + * @throws InvalidListenerException if the listener does not supply the needed interfaces. + */ + advise(xListener: uno.XInterface): void; + + /** + * @returns the {@link XConnectionPointContainer} interface on the parent connectable object. + * @see XConnectionPointContainer + */ + readonly ConnectionPointContainer: XConnectionPointContainer; + + /** @returns a sequence of all currently advised connections. */ + readonly Connections: SafeArray; + + /** + * @returns the type of the outgoing interface managed by this connection point. Using the XConnectionPointContainer::getConnectionPoints() method, a client + * @see XConnectionPointContainer.findConnectionPoint + */ + readonly ConnectionType: type; + + /** + * @returns the {@link XConnectionPointContainer} interface on the parent connectable object. + * @see XConnectionPointContainer + */ + getConnectionPointContainer(): XConnectionPointContainer; + + /** @returns a sequence of all currently advised connections. */ + getConnections(): SafeArray; + + /** + * @returns the type of the outgoing interface managed by this connection point. Using the XConnectionPointContainer::getConnectionPoints() method, a client + * @see XConnectionPointContainer.findConnectionPoint + */ + getConnectionType(): type; + + /** + * terminates a notification previously set up with advise. + * + * A few `remove...Listener` methods need additional parameters to add listeners or throw exceptions. One of these methods is {@link + * com.sun.star.beans.XPropertySet.removePropertyChangeListener()} . We ignore the problem in this interface. A solution must be provided in an + * additional {@link XConnectionPoint} interface. + * @param xListener specifies the listener interface on the client's advise sink. + * @see com.sun.star.beans.XPropertySet.removePropertyChangeListener + */ + unadvise(xListener: uno.XInterface): void; + } + + /** + * makes it possible to locate a specific connection point for a specified UIK and manages a sequence of connections points. + * + * An implementation of this interface **must** support the {@link com.sun.star.uno.XWeak} interface. Look at the language binding for a superclass or + * something else. + * @see XConnectionPoint + * @see com.sun.star.uno.XWeak + */ + interface XConnectionPointContainer extends uno.XInterface { + /** + * creates a connection between this object and a client's sink, where the sink implements the outgoing interface specified with ID. + * + * The interface is advised under the connection point you get with `queryConnectionPoint( id )` . + * + * Use this method instead of the advise method at the connection point, only if you know that the broadcaster supports the outgoing interface, or if it + * does not matter that the outgoing interface is not supported. + * @see XConnectionPoint.advise + */ + advise(aType: type, xListener: uno.XInterface): void; + + /** @returns a sequence of all outgoing types; specifies which are supported by this connectable object. */ + readonly ConnectionPointTypes: SafeArray; + + /** @returns a sequence of all outgoing types; specifies which are supported by this connectable object. */ + getConnectionPointTypes(): SafeArray; + + /** + * @param aType specifies the connection point's type. + * @returns an {@link XConnectionPoint} interface of a connection point for a specified type if that type describes a supported outgoing interface. It is NUL + */ + queryConnectionPoint(aType: type): XConnectionPoint; + + /** + * terminates a notification previously set up with advise at the container or at the suitable connection point. + * @see XConnectionPoint.unadvise + */ + unadvise(aType: type, xListener: uno.XInterface): void; + } + + /** base interface for all event listeners interfaces. */ + interface XEventListener extends uno.XInterface { + /** + * gets called when the broadcaster is about to be disposed. + * + * All listeners and all other objects, which reference the broadcaster should release the reference to the source. No method should be invoked anymore + * on this object ( including {@link XComponent.removeEventListener()} ). + * + * This method is called for every listener registration of derived listener interfaced, not only for registrations at {@link XComponent} . + */ + disposing(Source: EventObject): void; + } + + /** + * initializes an object directly after its creation. + * + * This interface works together with factories. If you want to initialize the object after creation, you should support this interface and you may + * support other interfaces which offer type-safe initialization methods. + * + * Instead of calling {@link XSingleComponentFactory.createInstanceWithContext()} and later {@link initialize()} , you should call {@link + * XSingleComponentFactory.createInstanceWithArgumentsAndContext()} to pass the arguments to the instance. The reason is, that a component may want to + * return the same instance for the same set of parameters, and it can do so by implementing the factory itself. + */ + interface XInitialization extends uno.XInterface { + /** + * initializes the object. + * + * It should be called directly after the object is created. + */ + initialize(aArguments: LibreOffice.SeqEquiv): void; + } + + /** makes it possible to set a {@link Locale} to be used by the object. */ + interface XLocalizable extends uno.XInterface { + /** @returns the locale, which is used by this object. */ + getLocale(): Locale; + + /** @returns the locale, which is used by this object. */ + Locale: Locale; + + /** sets the locale to be used by this object. */ + setLocale(eLocale: Locale): void; + } + + /** + * Executing interface for executable components run by the uno executable loader. This is an application to run components passing the command line + * arguments. + */ + interface XMain extends uno.XInterface { + /** + * This method is called to run the component. + * @param aArguments arguments passed to the component, i.e. the command line arguments + * @returns return value passed to be returned by main() + */ + run(aArguments: LibreOffice.SeqEquiv): number; + } + + /** + * Factory interface for creating component instances giving a context from which to retrieve deployment values. + * @see XInitialization + */ + interface XMultiComponentFactory extends uno.XInterface { + /** + * Gets the names of all supported services. + * @returns sequence of all service names + */ + readonly AvailableServiceNames: SafeArray; + + /** + * Creates an instance of a component which supports the services specified by the factory, and initializes the new instance with the given arguments and + * context. + * @param ServiceSpecifier service name + * @param Arguments arguments + * @param Context context the component instance gets its deployment values from + * @returns component instance + */ + createInstanceWithArgumentsAndContext(ServiceSpecifier: string, Arguments: LibreOffice.SeqEquiv, Context: uno.XComponentContext): uno.XInterface; + + /** + * Creates an instance of a component which supports the services specified by the factory. + * @param aServiceSpecifier service name + * @param Context context the component instance gets its deployment values from + * @returns component instance + */ + createInstanceWithContext(aServiceSpecifier: string, Context: uno.XComponentContext): uno.XInterface; + + /** + * Gets the names of all supported services. + * @returns sequence of all service names + */ + getAvailableServiceNames(): SafeArray; + } + + /** Allows creating instances specified by a string name. */ + interface XMultiServiceFactory extends uno.XInterface { + /** + * Provides the available names of the factory to be used to create instances. + * @returns sequence of all names + */ + readonly AvailableServiceNames: SafeArray; + createInstance(aServiceSpecifier: K): LibreOffice.ServicesNameMap[K]; + + /** + * Creates an instance classified by the specified name. + * @param aServiceSpecifier classified name of instance + * @returns instance + */ + createInstance(aServiceSpecifier: string): uno.XInterface; + createInstanceWithArguments(ServiceSpecifier: K, Arguments: LibreOffice.SeqEquiv): LibreOffice.ServicesNameMap[K]; + + /** + * Creates an instance classified by the specified name and passes the arguments to that instance. + * @param ServiceSpecifier classified name of instance + * @param Arguments arguments passed to the instance + * @returns instance + */ + createInstanceWithArguments(ServiceSpecifier: string, Arguments: LibreOffice.SeqEquiv): uno.XInterface; + + /** + * Provides the available names of the factory to be used to create instances. + * @returns sequence of all names + */ + getAvailableServiceNames(): SafeArray; + } + + /** + * provides a name for the service to be used in displays. + * + * This name can be used in displays (dialogs, menus, etc.) to provide a more memorable / meaningful name than the service name or its implementation + * name. It should not be used to identify / select a specific service / implementation. + */ + interface XServiceDisplayName extends uno.XInterface { + /** + * returns the display name of the service for a given language. + * + * The caller may specify a {@link com.sun.star.lang.Locale} for the preferred language of the resulting string. However, if that locale is not supported + * the resulting string may be given in a different language. Usually this should be English. + * @param aLocale the preferred language for the resulting display name. + * @returns the string to be used for the service in displays. + */ + getServiceDisplayName(aLocale: Locale): string; + } + + /** Provides information regarding the implementation: which services are implemented and the name of the implementation. */ + interface XServiceInfo extends uno.XInterface { + /** + * Provides the implementation name of the service implementation. + * @returns unique name of the implementation + */ + getImplementationName(): string; + + /** + * Provides the supported service names of the implementation, including also indirect service names. + * @returns sequence of service names that are supported + */ + getSupportedServiceNames(): SafeArray; + + /** + * Provides the implementation name of the service implementation. + * @returns unique name of the implementation + */ + readonly ImplementationName: string; + + /** + * Provides the supported service names of the implementation, including also indirect service names. + * @returns sequence of service names that are supported + */ + readonly SupportedServiceNames: SafeArray; + + /** + * Tests whether the specified service is supported, i.e. implemented by the implementation. + * @param ServiceName name of service to be tested + * @returns true, if service is supported, false otherwise + */ + supportsService(ServiceName: string): boolean; + } + + /** identifies the object with a service name which can be used to create such an object by a factory. */ + interface XServiceName extends uno.XInterface { + /** + * @returns the service name that can be used to create such an object by a factory. + * @see com.sun.star.io.XPersistObject.getServiceName + */ + getServiceName(): string; + + /** + * @returns the service name that can be used to create such an object by a factory. + * @see com.sun.star.io.XPersistObject.getServiceName + */ + readonly ServiceName: string; + } + + /** + * Factory interface to create instances of an implementation of a service specification. + * @see XInitialization + */ + interface XSingleComponentFactory extends uno.XInterface { + /** + * Creates an instance of a component and initializes the new instance with the given arguments and context. + * @param Arguments arguments passed to implementation + * @param Context the instance gets its deployment values from this + * @returns component instance + */ + createInstanceWithArgumentsAndContext(Arguments: LibreOffice.SeqEquiv, Context: uno.XComponentContext): uno.XInterface; + + /** + * Creates an instance of a service implementation. + * @param Context the instance gets its deployment values from this + * @returns component instance + */ + createInstanceWithContext(Context: uno.XComponentContext): uno.XInterface; + } + + /** + * Factory interface to produce instances of an implementation of a service specification. + * + * This interface is deprecated. Please use {@link XSingleComponentFactory} . + * @deprecated Deprecated + * @see XInitialization + */ + interface XSingleServiceFactory extends uno.XInterface { + /** + * Creates an instance of a service implementation. + * @returns service instance + */ + createInstance(): uno.XInterface; + + /** + * Creates an instance of a service implementation initialized with some arguments. + * @param aArguments arguments passed to implementation + * @returns service instance + */ + createInstanceWithArguments(aArguments: LibreOffice.SeqEquiv): uno.XInterface; + } + + /** interface to get information about the types (usually interface types) supported by an object. */ + interface XTypeProvider extends uno.XInterface { + /** + * Obsolete unique identifier. + * + * Originally returned a sequence of bytes which, when non-empty, was used as an ID to distinguish unambiguously between two sets of types, for example + * to realise hashing functionality when the object is introspected. Two objects that returned the same non-empty ID had to return the same set of types + * in {@link getTypes()} . (If a unique ID could not be provided, this method was always allowed to return an empty sequence, though). + * @deprecated DeprecatedThis feature should no longer be used, and implementations are encouraged to always return an empty sequence. + */ + getImplementationId(): SafeArray; + + /** returns a sequence of all types (usually interface types) provided by the object. */ + getTypes(): SafeArray; + + /** + * Obsolete unique identifier. + * + * Originally returned a sequence of bytes which, when non-empty, was used as an ID to distinguish unambiguously between two sets of types, for example + * to realise hashing functionality when the object is introspected. Two objects that returned the same non-empty ID had to return the same set of types + * in {@link getTypes()} . (If a unique ID could not be provided, this method was always allowed to return an empty sequence, though). + * @deprecated DeprecatedThis feature should no longer be used, and implementations are encouraged to always return an empty sequence. + */ + readonly ImplementationId: SafeArray; + + /** returns a sequence of all types (usually interface types) provided by the object. */ + readonly Types: SafeArray; + } + + /** + * An interface to tunnel UNO. This means providing access to data or something else, which is not specified by UNO-IDL. + * + * + * + * Common usage: Getting a C++ object pointer in the same process, thus to use an implementation directly, most often because of a design flaw. + */ + interface XUnoTunnel extends uno.XInterface { + /** + * Call this method to get something which is not specified in UNO, e.g. an address to some C++ object. + * @param aIdentifier identifier + * @returns something + */ + getSomething(aIdentifier: LibreOffice.SeqEquiv): number; + } + + namespace SystemDependent { + const enum Constants { + SYSTEM_ANDROID = 8, + SYSTEM_IOS = 7, + SYSTEM_JAVA = 3, + SYSTEM_MAC = 5, + SYSTEM_OS2 = 4, + SYSTEM_WIN16 = 2, + SYSTEM_WIN32 = 1, + SYSTEM_XWINDOW = 6, + } + } + } + + namespace ldap { + /** + * Indicates failure to connect to an LDAP server, usually because of wrong parameters (host/port) or down server. + * @since OOo 1.1.2 + */ + type LdapConnectionException = uno.Exception; + + /** + * Generic exception occurring during access to an LDAP server. The actual LDAP error code is provided for more refined error management. + * @since OOo 1.1.2 + */ + interface LdapGenericException extends uno.Exception { + /** LDAP error code, see LDAP SDK documentation for complete list of possible values and their meaning. */ + ErrorCode: number; + } + } + + namespace linguistic2 { + /** + * represents a list of available conversion dictionaries. + * + * There will be only one list that may hold different types of conversion dictionaries. That is e.g. it may hold dictionaries for Korean Hangul/Hanja + * conversion along with ones for Chinese traditional/simplified conversion or conversion between different Indic script types. + * + * The list will be used by the text conversion service to check for user supplied text conversions. + * @see com.sun.star.linguistic2.ConversionDictionary + * @see com.sun.star.linguistic2.HangulHanjaConversionDictionary + * @see com.sun.star.i18n.TextConversion + * @since OOo 1.1.2 + */ + type ConversionDictionaryList = XConversionDictionaryList; + + /** + * is the list of personal dictionaries. + * + * The active dictionaries of this list will be used for spell checking and hyphenation. + * @see com.sun.star.linguistic2.XDictionary + * @see com.sun.star.linguistic2.XDictionaryList + * @see com.sun.star.linguistic2.XSearchableDictionaryList + */ + type DictionaryList = XSearchableDictionaryList; + + /** + * represents a dictionary for Hangul/Hanja text conversion. + * + * A dictionary implementing this service will be used for Hangul/Hanja conversion. Therefore the locale of the dictionary has to be Korean, and the + * conversion type {@link com.sun.star.linguistic2.ConversionDictionaryType.HANGUL_HANJA} . + * + * Also for a pair (entry) to be added the left part has to be in Hangul and the right in Hanja, and the number of characters for the left part has to be + * the same as for the right part. + * @since OOo 1.1.2 + */ + type HangulHanjaConversionDictionary = ConversionDictionary; + + type LanguageGuessing = XLanguageGuessing; + + /** the set of linguistic relevant properties. */ + type LinguProperties = XLinguProperties; + + /** offers linguistic functionality. Is to be used to access spell checker, hyphenator and thesaurus. */ + type LinguServiceManager = XLinguServiceManager2; + + /** + * provides a proofreader (often known as grammar checker) for text + * + * An implementation of this service will receive text and has to identify the sentence end and report all errors found. + * + * An implementation of this service is not limited to grammar checking at all. It might also check style, used terms etc. Basically it can check every + * aspect of a single sentence. Since the text provided is always the complete paragraph it can also choose to analyze the context of the sentence + * currently required to be checked. However error reports need to be limited to the current sentence. + * @since OOo 3.0.1 + */ + type Proofreader = XProofreader; + + /** + * provides a proofreading iterator + * + * An implementation of this service acts as a mediator between documents and proofreaders (often called just grammar checkers). It is responsible to + * process requests for proofreading text portions. + * @since OOo 3.0.1 + */ + type ProofreadingIterator = XProofreadingIterator; + + /** + * Conversion direction to be used with {@link XConversionDictionary} when looking for conversions. + * @since OOo 1.1.2 + */ + const enum ConversionDirection { + /** the text to be looked for should match the left part of a dictionary entry. */ + FROM_LEFT = 0, + /** the text to be looked for should match the right part of a dictionary entry. */ + FROM_RIGHT = 1, + } + + /** + * describes the type of a personal dictionary. + * + * This defines the type of a dictionary. It may be positive or negative. A positive dictionary may hold only positive entries (words defined to be + * correct for spell checking) and a negative one only negative entries (words defined to be reported as incorrect by the spell checker). + * @see com.sun.star.linguistic2.XDictionary + * @see com.sun.star.linguistic2.XDictionaryEntry + */ + const enum DictionaryType { + /** @deprecated Deprecated */ + MIXED = 2, + /** all entries in the dictionary are negative. */ + NEGATIVE = 1, + /** all entries in the dictionary are positive. */ + POSITIVE = 0, + } + + /** + * represents a dictionary used in a conversion dictionary list. + * + * Specific implementations may put some restrictions for the dictionary or it's entries. Namely usually the order for the string pairs within a single + * entry will be defined. + * @see com.sun.star.linguistic2.ConversionDictionaryList + * @see com.sun.star.linguistic2.HangulHanjaConversionDictionary + * @see com.sun.star.linguistic2.XConversionDictionary + * @see com.sun.star.linguistic2.XConversionPropertyType + * @since OOo 1.1.2 + */ + interface ConversionDictionary extends XConversionDictionary, util.XFlushable, XConversionPropertyType { } + + /** + * represents a dictionary used for spell checking and hyphenation. + * @see com.sun.star.linguistic2.DictionaryList + * @see com.sun.star.linguistic2.XSearchableDictionaryList + * @since OOo 3.0.1 + */ + interface Dictionary extends XDictionary, XSearchableDictionary, frame.XStorable { } + + /** + * represents a dictionary event. + * + * This type of event is used by a dictionary to inform its listeners about changes in its properties or its entry list. It consists of an event type and + * may supply an affected dictionary entry. + * @see com.sun.star.linguistic2.XDictionary + * @see com.sun.star.linguistic2.XDictionaryEventListener + * @see com.sun.star.lang.EventObject + */ + interface DictionaryEvent extends lang.EventObject { + /** + * is the type of event. + * + * This must be the value of a single flag. No combinations are allowed. + * @see com.sun.star.linguistic2.DictionaryEventFlags + */ + nEvent: number; + + /** + * is the affected dictionary entry (if any). + * + * It must be set if an entry was added or deleted, otherwise it should be empty. + * @see com.sun.star.linguistic2.XDictionaryEntry + */ + xDictionaryEntry: XDictionaryEntry; + } + + /** + * structure representing a dictionary-list event. + * + * This structure is used by the dictionary-list to inform its listeners about certain events. Since the dictionary-list is able to collect several + * single events before broadcasting them to its listeners the integer argument may be a combination (logical or) of several event types. If more + * specific information about the events is requested by a listener, a sequence of all dictionary-list events since the last broadcasting will be + * supplied. Otherwise, that list will be empty. + * @see com.sun.star.linguistic2.DictionaryList + * @see com.sun.star.linguistic2.XDictionaryListEventListener + * @see com.sun.star.lang.EventObject + */ + interface DictionaryListEvent extends lang.EventObject { + /** + * list of accumulated dictionary events. + * + * It will be empty if all {@link com.sun.star.linguistic2.XDictionaryListEventListener} are satisfied with the condensed representation of the {@link + * com.sun.star.linguistic2.DictionaryListEvent.nCondensedEvent()} . + * @see com.sun.star.linguistic2.DictionaryEvent + */ + aDictionaryEvents: SafeArray; + + /** + * the combined type of the accumulated events. + * + * The value can be the combination of multiple {@link com.sun.star.linguistic2.DictionaryListEventFlags} by applying the logical OR to them. + * @see com.sun.star.linguistic2.DictionaryListEventFlags + */ + nCondensedEvent: number; + } + + /** offers hyphenation functionality. */ + interface Hyphenator extends XHyphenator, XLinguServiceEventBroadcaster, lang.XInitialization, lang.XComponent, lang.XServiceDisplayName { } + + /** + * represents a linguistic service event. + * + * This type of event may be broadcast by a spell checker or hyphenator service implementation to inform its listeners (clients) that the results of + * previous function calls may be different now. It is possible to suggest that hyphenation should be done again and/or the spelling of previously + * incorrect or correct words should be checked again. + * @see com.sun.star.linguistic2.XLinguServiceEventBroadcaster + * @see com.sun.star.linguistic2.XLinguServiceEventListener + * @see com.sun.star.linguistic2.SpellChecker + * @see com.sun.star.linguistic2.Hyphenator + * @see com.sun.star.lang.EventObject + */ + interface LinguServiceEvent extends lang.EventObject { + /** + * The type of event. + * + * The value may be combined via logical OR from those values defined in {@link com.sun.star.linguistic2.LinguServiceEventFlags} + */ + nEvent: number; + } + + /** + * holds the results from proofreading a sentence. + * @since OOo 3.0.1 + */ + interface ProofreadingResult { + aDocumentIdentifier: string; + aErrors: SafeArray; + aLocale: lang.Locale; + aProperties: SafeArray; + aText: string; + nBehindEndOfSentencePosition: number; + nStartOfNextSentencePosition: number; + nStartOfSentencePosition: number; + xFlatParagraph: text.XFlatParagraph; + xProofreader: XProofreader; + } + + /** + * holds a single error found by the proofreader. + * @since OOo 3.0.1 + */ + interface SingleProofreadingError { + aFullComment: string; + aProperties: SafeArray; + aRuleIdentifier: string; + aShortComment: string; + aSuggestions: SafeArray; + nErrorLength: number; + nErrorStart: number; + nErrorType: number; + } + + /** offers spell checking functionality. */ + interface SpellChecker extends XSpellChecker, XLinguServiceEventBroadcaster, lang.XInitialization, lang.XComponent, lang.XServiceDisplayName { } + + /** offers thesaurus functionality. */ + interface Thesaurus extends XThesaurus, lang.XInitialization, lang.XComponent, lang.XServiceDisplayName { } + + /** retrieves the list of available languages. */ + interface XAvailableLocales extends uno.XInterface { + /** + * retrieve the list of supported languages (Locales). + * @param aServiceName the name of the service to get the list of available Locales for. + * @returns the list of locales supported by the whole of all registered implementations of that service. The sequence will be empty if there is no such lang + * @see com.sun.star.linguistic2.XSupportedLocales + */ + getAvailableLocales(aServiceName: string): SafeArray; + } + + /** + * Allows the user to access a conversion dictionary. + * + * The dictionary consists of entries (pairs) of the form ( aLeftText, aRightText ). Those pairs can be added and removed. Also it can be looked for all + * entries where the left text or the right text matches a given text. Thus it can be used for conversions in both directions. + * + * Restrictions to what has to be the left and right text are usually given by specific services implementing this interface. + * @see com.sun.star.linguistic2.ConversionDictionary + * @see com.sun.star.linguistic2.HangulHanjaConversionDictionary + * @since OOo 1.1.2 + */ + interface XConversionDictionary extends uno.XInterface { + /** + * is used to add a conversion pair to the dictionary. + * @param aLeftText the left text of the pair to be added. + * @param aRightText the right text of the pair to be added. + * @throws com::sun::star::lang::IllegalArgumentException if the arguments are invalid. For example if the specifications defined by the service implementin + * @throws com::sun::star::container::ElementExistException if such an entry already exists. + */ + addEntry(aLeftText: string, aRightText: string): void; + + /** removes all entries from the dictionary. */ + clear(): void; + + /** + * @returns the conversion type supported by the dictionary. + * @see com.sun.star.linguistic2.ConversionDictionaryType + */ + readonly ConversionType: number; + + /** + * @param eDirection specifies if all left or all right parts of the entries should be returned. + * @returns a list of all left or right parts of the dictionaries entries. + */ + getConversionEntries(eDirection: ConversionDirection): SafeArray; + + /** + * searches for entries or conversions that match the given text. + * + * The exact string to be looked for is the substring from the aText parameter that starts at position nStartPos and has the length nLength. + * @param aText the text where the substring to be looked for will be taken from. Depending on the conversion direction parameter it specifies either the l + * @param nStartPos the starting pos of the substring to be looked for. + * @param nLength the length of the substring to be looked for. + * @param eDirection specifies the direction of the conversion to look for. It is one of {@link com.sun.star.linguistic2.ConversionDirection} . + * @param nTextConversionOptions Combination of {@link com.sun.star.i18n.TextConversionOption} values. + * @returns the list of conversions found for the supplied text. If no nothing was found, it is empty. + * @throws com::sun::star::lang::IllegalArgumentException if the locale is not supported by the dictionary or if nTextConversionOptions is invalid for the g + */ + getConversions(aText: string, nStartPos: number, nLength: number, eDirection: ConversionDirection, nTextConversionOptions: number): SafeArray; + + /** + * @returns the conversion type supported by the dictionary. + * @see com.sun.star.linguistic2.ConversionDictionaryType + */ + getConversionType(): number; + + /** + * @returns the language supported by the dictionary. + * @see com.sun.star.lang.Locale + */ + getLocale(): lang.Locale; + + /** + * returns the maximum number of characters used as left or right text in entries. + * @param eDirection specifies if the left text or the right text of entries will be used. + * @see com.sun.star.linguistic2.ConversionDirection + */ + getMaxCharCount(eDirection: ConversionDirection): number; + + /** @returns the name of the dictionary. */ + getName(): string; + + /** @returns `TRUE` if the dictionary is active, `FALSE` otherwise. */ + isActive(): boolean; + + /** + * @returns the language supported by the dictionary. + * @see com.sun.star.lang.Locale + */ + readonly Locale: lang.Locale; + + /** @returns the name of the dictionary. */ + readonly Name: string; + + /** + * removes a conversion pair from the dictionary. + * @param aLeftText the left text of the pair to be removed. + * @param aRightText the right text of the pair to be removed. + * @throws com::sun::star::container::NoSuchElementException if there is no such entry. + */ + removeEntry(aLeftText: string, aRightText: string): void; + + /** + * specifies whether the dictionary should be used or not . + * @param bActivate `TRUE` if the dictionary should be used, `FALSE` otherwise. + */ + setActive(bActivate: boolean): void; + } + + /** + * is used to manage and maintain a list of conversion dictionaries. + * + * The dictionaries added to the list may or may not support the {@link com.sun.star.util.XFlushable} interface. If they do those dictionaries have to be + * flushed upon termination of the dictionary list. + * @since OOo 1.1.2 + */ + interface XConversionDictionaryList extends uno.XInterface { + /** + * creates a new dictionary and adds it to the dictionary list. + * + * The dictionary will be empty and active. + * @param aName is the name of the dictionary (should be unique). + * @param aLocale defines the language of the dictionary. + * @param nConversionDictionaryType One of {@link com.sun.star.linguistic2.ConversionDictionaryType} values. + * @returns an empty dictionary with the given name, locale and conversion type. `NULL` on failure. + * @throws NoSupportException when **nConversionDictionaryType** is not known by the implementation. + * @throws ElementExistException when a dictionary with the specified name already exists. + */ + addNewDictionary(aName: string, aLocale: lang.Locale, nConversionDictionaryType: number): XConversionDictionary; + + /** @returns the name container interface to the dictionaries in the list. The interface can be used to add, remove or retrieve dictionaries from the list by */ + readonly DictionaryContainer: container.XNameContainer; + + /** @returns the name container interface to the dictionaries in the list. The interface can be used to add, remove or retrieve dictionaries from the list by */ + getDictionaryContainer(): container.XNameContainer; + + /** + * searches for entries that match the given text. + * + * All active dictionaries with matching locales and conversion type will be searched for entries matching the given text. + * + * The exact string to be looked for is the substring from the aText parameter that starts at position nStartPos and has the length nLength. + * @param aText the text where the substring to be looked for will be taken from. + * @param nStartPos the starting pos of the substring to be looked for. + * @param nLength the length of the substring to be looked for. + * @param aLocale Locale the conversion is referred to. + * @param nConversionDictionaryType specifies the type of conversion the dictionary can be used for. It is one of {@link com.sun.star.linguistic2.Conversio + * @param eDirection specifies the direction of the conversion to look for. It is one of {@link com.sun.star.linguistic2.ConversionDirection} . + * @param nTextConversionOptions Combination of {@link com.sun.star.i18n.TextConversionOption} values. + * @returns the list of entries found. If no entry was found, it is empty. + * @throws com::sun::star::lang::IllegalArgumentException if the nTextConversionOptions parameter is invalid for the given locale. + * @throws NoSupportException when **nConversionDictionaryType** is not known by the implementation, or when the locale is not supported (i.e. there are no + */ + queryConversions( + aText: string, nStartPos: number, nLength: number, aLocale: lang.Locale, nConversionDictionaryType: number, eDirection: ConversionDirection, + nTextConversionOptions: number): SafeArray; + + /** + * returns the maximum number of characters used as left or right text in entries. + * + * All active dictionaries of the specified locale and type will be looked up to get the result. + * + * The parameter eDirection specifies if only the left text or the right text from entries should be considered. + * @param aLocale Locale the conversion is referred to. + * @param nConversionDictionaryType specifies the type of conversion dictionaries to be looked up. It is one of {@link com.sun.star.linguistic2.ConversionD + * @param eDirection specifies if the left text or the right text of entries will be used. + * @see com.sun.star.linguistic2.ConversionDirection + */ + queryMaxCharCount(aLocale: lang.Locale, nConversionDictionaryType: number, eDirection: ConversionDirection): number; + } + + /** + * allows set and retrieve the property type of an entry in a conversion dictionary + * + * The property type must be one of {@link com.sun.star.linguistic2.ConversionPropertyType} + * @see com.sun.star.linguistic2.XConversionDictionary + * @see com.sun.star.linguistic2.ConversionPropertyType + * @since OOo 2.0 + */ + interface XConversionPropertyType extends uno.XInterface { + /** + * returns the property type for the specified entry. + * + * The conversion entry is specified by the pair ( aLeftText, aRightText ). + * @param aLeftText the left text of the dictionary entry. + * @param aRightText the right text of the dictionary entry. + * @returns returns the property type for the entry with the specified left text. + */ + getPropertyType(aLeftText: string, aRightText: string): number; + + /** + * sets the property type for the specified entry. + * + * The conversion entry is specified by the pair ( aLeftText, aRightText ). + * @param aLeftText the left text of the dictionary entry. + * @param aRightText the right text of the dictionary entry. + * @param nPropertyType the property type to be set for the entry + */ + setPropertyType(aLeftText: string, aRightText: string, nPropertyType: number): void; + } + + /** + * This interfaces enables the object to access personal dictionaries. + * + * Personal dictionaries are used to supply additional information for spell checking and hyphenation (see {@link + * com.sun.star.linguistic2.XDictionaryEntry} ). Only active dictionaries with an appropriate language are used for that purpose. The entries of an + * active, positive dictionary are words that are required to be recognized as correct during the spell checking process. Additionally, they will be used + * for hyphenation. Entries of a negative dictionary are required to be recognized as negative words, for example, words that should not be used, during + * SPELLCHECK. An entry in a negative dictionary may supply a proposal for a word to be used instead of the one being used. + * @see com.sun.star.linguistic2.XDictionaryEvent + * @see com.sun.star.container.XNamed + */ + interface XDictionary extends container.XNamed { + /** + * is used to make an entry in the dictionary. + * + * If an entry already exists, the dictionary remains unchanged and `FALSE` will be returned. + * + * In positive dictionaries only positive entries can be made, and in negative ones only negative entries. + * @param aWord the word to be added. + * @param bIsNegative specifies whether the entry will be a negative one or not. + * @param aRplcText in the case of a negative entry, this is the replacement text to be used when replacing aWord. Otherwise, it is undefined. + * @returns `TRUE` if the entry was successfully added, `FALSE` otherwise. + * @see com.sun.star.linguistic2.DictionaryType + */ + add(aWord: string, bIsNegative: boolean, aRplcText: string): boolean; + + /** + * adds an entry to the list of dictionary event listeners. + * + * On dictionary events, each entry in the listener list will be notified via a call to {@link + * com.sun.star.linguistic2.XDictionaryEventListener.processDictionaryEvent()} . + * @param xListener the entry to be made, that is, the object that wants notifications. + * @returns `TRUE` if the entry was successfully made, `FALSE` otherwise. If {@link com.sun.star.lang.XEventListener.disposing()} was called before, it will + * @see com.sun.star.linguistic2.XDictionary.removeDictionaryEventListener() + * @see com.sun.star.linguistic2.XDictionaryEventListener + */ + addDictionaryEventListener(xListener: XDictionaryEventListener): boolean; + + /** + * is used to add an entry to the dictionary. + * + * If an entry already exists, the dictionary remains unchanged and `FALSE` will be returned. + * + * In positive dictionaries only positive entries can be made, and in negative ones only negative entries. + * @param xDicEntry the entry to be added. + * @returns `TRUE` if the entry was successfully added `FALSE` otherwise. + * @see com.sun.star.linguistic2.XDictionaryEntry + * @see com.sun.star.linguistic2.DictionaryType + */ + addEntry(xDicEntry: XDictionaryEntry): boolean; + + /** removes all entries from the dictionary. */ + clear(): void; + + /** @returns the number of entries in the dictionary. */ + readonly Count: number; + + /** + * returns the type of the dictionary. + * @returns the type of the dictionary. + * @see com.sun.star.linguistic2.DictionaryType + */ + readonly DictionaryType: DictionaryType; + + /** + * This function should no longer be used since with the expansion of the maximum number of allowed entries the result may become unreasonable large! + * @deprecated Deprecated + * @returns a sequence with all the entries of the dictionary. + * @see com.sun.star.linguistic2.XDictionaryEntry + * @see com.sun.star.linguistic2.XSearchableDictionary + */ + readonly Entries: SafeArray; + + /** @returns the number of entries in the dictionary. */ + getCount(): number; + + /** + * returns the type of the dictionary. + * @returns the type of the dictionary. + * @see com.sun.star.linguistic2.DictionaryType + */ + getDictionaryType(): DictionaryType; + + /** + * This function should no longer be used since with the expansion of the maximum number of allowed entries the result may become unreasonable large! + * @deprecated Deprecated + * @returns a sequence with all the entries of the dictionary. + * @see com.sun.star.linguistic2.XDictionaryEntry + * @see com.sun.star.linguistic2.XSearchableDictionary + */ + getEntries(): SafeArray; + + /** + * searches for an entry that matches the given word. + * @param aWord the word to be looked for. + * @returns the reference to the entry found. If no entry was found, it is NULL. + * @see com.sun.star.linguistic2.XDictionaryEntry + */ + getEntry(aWord: string): XDictionaryEntry; + + /** + * @returns the language of the dictionary. + * @see com.sun.star.lang.Locale + */ + getLocale(): lang.Locale; + + /** @returns `TRUE` if the dictionary is active, `FALSE` otherwise. */ + isActive(): boolean; + + /** @returns `TRUE` if the dictionary is full and no further entry can be made, `FALSE` otherwise. */ + isFull(): boolean; + + /** + * @returns the language of the dictionary. + * @see com.sun.star.lang.Locale + */ + Locale: lang.Locale; + + /** + * removes an entry from the dictionary. + * @param aWord the word matching the entry to be removed. + * @returns `TRUE` if the entry was successfully removed, `FALSE` otherwise (especially if the entry was not found). + */ + remove(aWord: string): boolean; + + /** + * removes an entry from the list of dictionary event listeners. + * @param xListener the reference to the listening object to be removed. + * @returns `TRUE` if the object to be removed was found and removed, `FALSE` if the object was not found in the list. + * @see com.sun.star.linguistic2.XDictionary.addDictionaryEventListener() + * @see com.sun.star.linguistic2.XDictionaryEventListener + */ + removeDictionaryEventListener(xListener: XDictionaryEventListener): boolean; + + /** + * specifies whether the dictionary should be used or not . + * @param bActivate `TRUE` if the dictionary should be used, `FALSE` otherwise. + */ + setActive(bActivate: boolean): void; + + /** + * is used to set the language of the dictionary. + * @param aLocale the new language of the dictionary. + * @see com.sun.star.lang.Locale + */ + setLocale(aLocale: lang.Locale): void; + } + + /** @deprecated Deprecated */ + interface XDictionary1 extends container.XNamed { + add(aWord: string, bIsNegative: boolean, aRplcText: string): boolean; + addDictionaryEventListener(xListener: XDictionaryEventListener): boolean; + addEntry(xDicEntry: XDictionaryEntry): boolean; + clear(): void; + readonly Count: number; + readonly DictionaryType: DictionaryType; + readonly Entries: SafeArray; + getCount(): number; + getDictionaryType(): DictionaryType; + getEntries(): SafeArray; + getEntry(aWord: string): XDictionaryEntry; + getLanguage(): number; + isActive(): boolean; + isFull(): boolean; + Language: number; + remove(aWord: string): boolean; + removeDictionaryEventListener(xListener: XDictionaryEventListener): boolean; + setActive(bActivate: boolean): void; + setLanguage(nLang: number): void; + } + + /** + * This interfaces gives access to a dictionary entry. + * + * A dictionary entry can supply a word and its hyphenation and indicate if it is a negative word. If it is a negative entry it may supply a replacement + * text to be used instead of the entry word. + * + * Hyphenation positions are represented by an "=" in the word. If the "=" is the last character of the word this means it should not be hyphenated. If + * there is no "=" charter in the word, hyphenation positions will be determined automatically (i.e., from the hyphenator service alone). + * + * Entries whose words only differ in hyphenation are considered to be equal. Also a "." at the end of the word will make no difference. + * @see com.sun.star.linguistic2.XDictionary + * @see com.sun.star.uno.XInterface + */ + interface XDictionaryEntry extends uno.XInterface { + /** @returns the word defining this entry. */ + readonly DictionaryWord: string; + + /** @returns the word defining this entry. */ + getDictionaryWord(): string; + + /** + * is the suggested replacement text for negative words. + * + * It is undefined if the entry is not negative. + * @returns the replacement text for a negative entry. An empty string indicates that no replacement text is provided. + */ + getReplacementText(): string; + + /** @returns `TRUE` if the word (entry) is a negative one and should not be used, `FALSE` otherwise. */ + isNegative(): boolean; + + /** + * is the suggested replacement text for negative words. + * + * It is undefined if the entry is not negative. + * @returns the replacement text for a negative entry. An empty string indicates that no replacement text is provided. + */ + readonly ReplacementText: string; + } + + /** + * This interfaces allows the object to act according to dictionary events. + * + * The single method is used by a dictionary to notify its listeners about com::sun::star::linguistic2::DictionaryEvents. + * @see com.sun.star.linguistic2.XDictionary + * @see com.sun.star.lang.XEventListener + */ + interface XDictionaryEventListener extends lang.XEventListener { + /** + * is used to get notification of dictionary events. + * @param aDicEvent the event to be notified of. + * @see com.sun.star.lang.DictionaryEvent + */ + processDictionaryEvent(aDicEvent: DictionaryEvent): void; + } + + /** + * is used to manage and maintain a list of dictionaries. + * + * A dictionary-list may be given to a spell checker or hyphenator service implementation on their creation in order to supply a set of dictionaries and + * additional information to be used for those purposes. + * @see com.sun.star.linguistic2.XDictionary + * @see com.sun.star.uno.XInterface + */ + interface XDictionaryList extends uno.XInterface { + /** + * adds a dictionary to the list. + * + * Additionally, the dictionary-list will add itself to the list of dictionary event listeners of that dictionary. + * @param xDictionary the dictionary to be added. + * @returns `TRUE` if the dictionary was added successfully, `FALSE` otherwise. + * @see com.sun.star.linguistic2.XDictionary + */ + addDictionary(xDictionary: XDictionary): boolean; + + /** + * adds an entry to the list of dictionary-list event listeners. + * + * On dictionary-list events, each entry in the listener list will be notified via a call to {@link + * com.sun.star.linguistic2.XDictionaryListEventListener.processDictionaryListEvent()} . + * @param xListener the object to be notified of dictionary-list events. + * @param bReceiveVerbose `TRUE` if the listener requires more detailed event notification than usual. + * @returns `TRUE` if the entry was made, `FALSE` otherwise. If {@link com.sun.star.lang.XEventListener.disposing()} was called before, it will always fail. + * @see com.sun.star.linguistic2.XDictionaryListEventListener + * @see com.sun.star.linguistic2.XDictionaryListEvent + */ + addDictionaryListEventListener(xListener: XDictionaryListEventListener, bReceiveVerbose: boolean): boolean; + + /** + * increases request level for event buffering by one. + * + * The request level for event buffering is an integer counter that is initially set to 0. As long as the request level is not 0, events will be buffered + * until the next flushing of the buffer. + * @returns the current request level for event buffering. + * @see com.sun.star.linguistic2.XDictionaryListEvent + * @see com.sun.star.linguistic2.XDictionaryListEventListener + * @see com.sun.star.linguistic2.XDictionaryList.endCollectEvents() + * @see com.sun.star.linguistic2.XDictionaryList.flushEvents() + */ + beginCollectEvents(): number; + + /** @returns the number of dictionaries in the list. */ + readonly Count: number; + + /** + * creates a new dictionary. + * @param aName is the name of the dictionary (should be unique). + * @param aLocale defines the language of the dictionary. Use an empty aLocale for dictionaries which may contain entries of all languages. + * @param eDicType specifies the type of the dictionary. + * @param aURL is the URL of the location where the dictionary is persistent, if the XStorable interface is supported. It may be empty, which means the dic + * @returns an empty dictionary with the given name, language and type. `NULL` on failure. + * @see com.sun.star.linguistic2.XDictionary + * @see com.sun.star.lang.Locale + * @see com.sun.star.linguistic2.DictionaryType + */ + createDictionary(aName: string, aLocale: lang.Locale, eDicType: DictionaryType, aURL: string): XDictionary; + + /** + * @returns a sequence with an entry for every dictionary in the list. + * @see com.sun.star.linguistic2.XDictionary + */ + readonly Dictionaries: SafeArray; + + /** + * flushes the event buffer and decreases the request level for event buffering by one. + * + * There should be one matching endCollectEvents call for every beginCollectEvents call. Usually you will group these around some code where you do not + * wish to get notified of every single event. + * @returns the current request level for event buffering. + * @see com.sun.star.linguistic2.XDictionaryListEvent + * @see com.sun.star.linguistic2.XDictionaryListEventListener + * @see com.sun.star.linguistic2.XDictionaryList.beginCollectEvents() + * @see com.sun.star.linguistic2.XDictionaryList.flushEvents() + */ + endCollectEvents(): number; + + /** + * notifies the listeners of all buffered events and then clears that buffer. + * @returns the current request level for event buffering. + * @see com.sun.star.linguistic2.XDictionaryListEvent + * @see com.sun.star.linguistic2.XDictionaryListEventListener + * @see com.sun.star.linguistic2.XDictionaryList.beginCollectEvents() + * @see com.sun.star.linguistic2.XDictionaryList.endCollectEvents() + */ + flushEvents(): number; + + /** @returns the number of dictionaries in the list. */ + getCount(): number; + + /** + * @returns a sequence with an entry for every dictionary in the list. + * @see com.sun.star.linguistic2.XDictionary + */ + getDictionaries(): SafeArray; + + /** + * searches the list for a dictionary with a given name. + * @param aDictionaryName specifies the name of the dictionary to look for. + * @returns the {@link XDictionary} with the specified name. If no such dictionary exists, `NULL` will be returned. + * @see com.sun.star.linguistic2.XDictionary + */ + getDictionaryByName(aDictionaryName: string): XDictionary; + + /** + * removes a single dictionary from the list. + * + * If the dictionary is still active, it will be deactivated first. The dictionary-list will remove itself from the list of dictionary event listeners of + * the dictionary. + * @param xDictionary dictionary to be removed from the list of dictionaries. + * @returns `TRUE` if the dictionary was removed successfully, `FALSE` otherwise. + * @see com.sun.star.linguistic2.XDictionary + */ + removeDictionary(xDictionary: XDictionary): boolean; + + /** + * removes an entry from the list of dictionary-list event listeners. + * @param xListener the object to be removed from the listener list. + * @returns `TRUE` if the object to be removed was found and removed, `FALSE` otherwise. + * @see com.sun.star.linguistic2.XDictionaryListEventListener + * @see com.sun.star.linguistic2.XDictionaryListEvent + */ + removeDictionaryListEventListener(xListener: XDictionaryListEventListener): boolean; + } + + /** + * This interfaces allows the object to act according to dictionary-list events. + * + * This interface is the base class for all dictionary-list event listeners. Its single function will be called by the broadcasting dictionary-list in + * order to notify its registered listeners. + * @see com.sun.star.linguistic2.DictionaryListEvent + * @see com.sun.star.linguistic2.XDictionaryList + */ + interface XDictionaryListEventListener extends lang.XEventListener { + /** + * is used to notify the object about dictionary-list events. + * @param aDicListEvent the event to be notified of. + * @see com.sun.star.linguistic2.DictionaryListEvent + */ + processDictionaryListEvent(aDicListEvent: DictionaryListEvent): void; + } + + /** + * gives information obtained by a successful hyphenation attempt. + * + * This interface is used as a return value for some of the hyphenator functions. + * @see com.sun.star.linguistic2.XHyphenator + */ + interface XHyphenatedWord extends uno.XInterface { + /** @returns the hyphenated word as it should be written (without the hyphen character). */ + getHyphenatedWord(): string; + + /** @returns the position where hyphenation was applied in the word. The value has to be in the range from 0 (after the first character) to n-2 (before the l */ + getHyphenationPos(): number; + + /** @returns the position of the hyphen in the hyphenated word. The value has to be in the range from 0 (after the first character) to m-2 (before the last c */ + getHyphenPos(): number; + + /** + * @returns the language of the hyphenated word. + * @see com.sun.star.lang.Locale + */ + getLocale(): lang.Locale; + + /** @returns the word that was hyphenated. */ + getWord(): string; + + /** @returns the hyphenated word as it should be written (without the hyphen character). */ + readonly HyphenatedWord: string; + + /** @returns the position where hyphenation was applied in the word. The value has to be in the range from 0 (after the first character) to n-2 (before the l */ + readonly HyphenationPos: number; + + /** @returns the position of the hyphen in the hyphenated word. The value has to be in the range from 0 (after the first character) to m-2 (before the last c */ + readonly HyphenPos: number; + + /** + * is used to query if the hyphenation result is an alternative spelling. + * + * A hyphenation result is an alternative spelling if the hyphenated word is different from the word that was hyphenated. + * @returns `TRUE` if it is an alternative spelling, `FALSE` otherwise. + */ + isAlternativeSpelling(): boolean; + + /** + * @returns the language of the hyphenated word. + * @see com.sun.star.lang.Locale + */ + readonly Locale: lang.Locale; + + /** @returns the word that was hyphenated. */ + readonly Word: string; + } + + /** + * provides functionality for hyphenation of single words. + * + * Its three main functionalities are to provide a suitable position for breaking lines within a word, query about the existence of an alternative + * spelling at a specific position of a word and provide a list of possible hyphenation positions within a word. + * + * A hyphenation position for a word with n characters is represented by a value in the range from 0 to n-2, indicating the position of the character + * after which the hyphenation is done. That is, it is after the first and before the last character. + * + * A valid hyphenation position is a hyphenation position that fulfills all the restrictions implied by the properties MinLeading, MinTrailing and + * MinWordLength. + * @see com.sun.star.linguistic2.LinguProperties + * @see com.sun.star.linguistic2.XSupportedLocales + */ + interface XHyphenator extends XSupportedLocales { + /** + * returns information about all possible hyphenation positions of a word. + * @param aWord is the word for which information about the possible hyphenation positions is to be retrieved. + * @param aLocale defines the language of the word. If the language is not supported, an IllegalArgumentException exception is raised. + * @param aProperties provides property values to be used for this function call only. It is usually empty in order to use the default values supplied with + * @returns an {@link com.sun.star.linguistic2.XPossibleHyphens} for the given word and language if there are any hyphenation positions. `NULL` otherwise. + * @see com.sun.star.linguistic2.XPossibleHyphens + * @see com.sun.star.lang.Locale + */ + createPossibleHyphens(aWord: string, aLocale: lang.Locale, aProperties: beans.PropertyValues): XPossibleHyphens; + + /** + * tries to find a valid hyphenation position relative to the beginning of a word. + * + * Note: Some languages, for example Arabic, are written from right to left. + * @param aWord is the word to be hyphenated. + * @param aLocale defines the language to be used. If the language is not supported, an IllegalArgumentException exception is raised. + * @param nMaxLeading specifies the maximum number of characters to remain before the hyphen in the hyphenated word. It has to be greater than or equal to 0. + * @param aProperties provides property values to be used for this function call only. It is usually empty in order to use the default values supplied with + * @returns the {@link XHyphenatedWord} for the last valid hyphenation position that is less than or equal to nMaxLeading - 1. If there is no such valid hyph + * @see com.sun.star.linguistic2.XHyphenatedWord + * @see com.sun.star.lang.Locale + */ + hyphenate(aWord: string, aLocale: lang.Locale, nMaxLeading: number, aProperties: beans.PropertyValues): XHyphenatedWord; + + /** + * checks whether hyphenation at a position in a word will result in an alternative spelling or not. + * + * An alternative spelling position is a hyphen position where, if hyphenation is done here, the writing of the word changes. Example: "Bäcker" in + * German pre spelling-reform becomes "Bäkker" if hyphenation is done after the "c". + * + * The hyphenation position does not need to be a valid one to be an alternative spelling position. + * @param aWord is the original word to be looked at for having an alternative spelling, if hyphenation is done at position nIndex. + * @param aLocale specifies the language to be used. If the language is not supported, an IllegalArgumentException exception is raised. + * @param nIndex is the position in the word to be looked at. If the length of the word is n, the value of this parameter has to be in the range from 0 to n-2. + * @param aProperties provides property values to be used for this function call only. It is usually empty in order to use the default values supplied with + * @returns the information about the alternative spelling found at the specified position. Otherwise, if no alternative spelling was found, `NULL` is returned. + * @see com.sun.star.linguistic2.XHyphenatedWord + * @see com.sun.star.lang.Locale + */ + queryAlternativeSpelling(aWord: string, aLocale: lang.Locale, nIndex: number, aProperties: beans.PropertyValues): XHyphenatedWord; + } + + /** + * This interface allows to guess the language of a text + * + * The current set of supported languages is: af : Afrikaansam : Amharicar : Arabicbe : Belarusbr : Bretonbs : Bosnianca : Catalancs : Czechcy : Welshda + * : Danishde : Germandrt : Drentsel : Greeken : Englisheo : Esperantoes : Spanishet : Estonianeu : Basquefa : Persianfi : Finnishfr : Frenchfy : + * Frisianga : Irish Gaelicgd : Scots Gaelicgv : Manx Gaeliche : Hebrewhi : Hindihr : Croatianhu : Hungarianhy : Armenianid : Indonesianis : Icelandicit + * : Italianja : Japaneseka : Georgianko : Koreanla : Latinlb : Luxembourgish (added with OOo 3.3)lt : Lithuanianlv : Latvianmr : Marathims : Malayne : + * Nepalinl : Dutchnb : Norwegian (Bokmal)pl : Polishpt-PT : Portuguese (Portugal)qu : Quechuarm : Romanshro : Romanianru : Russiansa : Sanskritsco : + * Scotssh : Serbian (written with latin characters)sk-SK : Slovak (written with Latin characters)sl : Sloveniansq : Albaniansr : Serbian (written with + * cyrillic characters) (added with OOo 3.4)sv : Swedishsw : Swahilita : Tamilth : Thaitl : Tagalogtr : Turkishuk : Ukrainianvi : Vietnameseyi : + * Yiddishzh-CN : Chinese (simplified)zh-TW : Chinese (traditional) + * @since OOo 2.2 + */ + interface XLanguageGuessing { + /** + * returns a list of all supported languages. + * + * This should be the same as the mathematical union of all enabled and disabled languages. + */ + readonly AvailableLanguages: SafeArray; + + /** returns the list of all disabled languages */ + readonly DisabledLanguages: SafeArray; + + /** + * allows to explicitly discard some languages from the set of languages possibly returned. + * + * By default all languages are enabled. + */ + disableLanguages(aLanguages: LibreOffice.SeqEquiv): void; + + /** returns the list of all enabled languages */ + readonly EnabledLanguages: SafeArray; + + /** + * allows to explicitly re-enable some languages that got previously disabled. + * + * By default all languages are enabled. + */ + enableLanguages(aLanguages: LibreOffice.SeqEquiv): void; + + /** + * returns a list of all supported languages. + * + * This should be the same as the mathematical union of all enabled and disabled languages. + */ + getAvailableLanguages(): SafeArray; + + /** returns the list of all disabled languages */ + getDisabledLanguages(): SafeArray; + + /** returns the list of all enabled languages */ + getEnabledLanguages(): SafeArray; + + /** + * determines the single most probable language of a sub-string. + * + * Please note that because statistical analysis is part of the algorithm the likelihood to get the correct result increases with the length of the + * sub-string. A word is much less likely guessed correctly compared to a sentence or even a whole paragraph. + * + * Also note that some languages are that "close" to each other that it will be quite unlikely to find a difference in them, e.g. English (UK), English + * (IE) and English (AUS) and most likely English (US) as well. And thus the result may be arbitrary. + * @param aText all the text including the part that should checked. + * @param nStartPos specifies the starting index of the sub-string to be checked The value must met 0 <= nStartPos < (length of text - 1). + * @param nLen specifies the length of the sub-string to be checked. The value must met 0 <= nLen <= (length of text). + * @returns the locale for the language identified. If no language could be identified the locale will be empty. + * @see com.sun.star.lang.Locale + */ + guessPrimaryLanguage(aText: string, nStartPos: number, nLen: number): lang.Locale; + } + + /** + * Interface for {@link LinguProperties} service. + * @since LibreOffice 4.1 + */ + interface XLinguProperties extends beans.XPropertySet { + /** the default western language for new documents. */ + DefaultLocale: lang.Locale; + + /** the default language for CJK languages. */ + DefaultLocale_CJK: lang.Locale; + + /** the default language for CTL languages. */ + DefaultLocale_CTL: lang.Locale; + + /** the minimum number of characters of a word to remain before the hyphen when doing hyphenation. */ + HyphMinLeading: number; + + /** the minimum number of characters of a word to remain after the hyphen when doing hyphenation. */ + HyphMinTrailing: number; + + /** the minimum length of a word in order to be hyphenated. */ + HyphMinWordLength: number; + + /** + * defines whether interactive hyphenation should be performed without requiring the user to select every hyphenation position after the user has + * triggered the hyphenation. + */ + IsHyphAuto: boolean; + + /** defines whether hyphenation should be done in special regions of documents or not. */ + IsHyphSpecial: boolean; + + /** defines if control characters should be ignored or not, by the linguistic (i.e., spell checker, hyphenator and thesaurus). */ + IsIgnoreControlCharacters: boolean; + + /** indicates whether spell checking should be done automatically or not. */ + IsSpellAuto: boolean; + + /** + * defines if the capitalization of words should be checked or not. + * @deprecated Deprecated + */ + IsSpellCapitalization: boolean; + + /** defines whether spell checking should be done in special regions of documents or not. */ + IsSpellSpecial: boolean; + + /** defines if words with only uppercase letters should be subject to spell checking or not. */ + IsSpellUpperCase: boolean; + + /** defines if words containing digits (or numbers) should be subject to spell checking or not. */ + IsSpellWithDigits: boolean; + + /** defines if the dictionary-list should be used for spell checking and hyphenation or not. */ + IsUseDictionaryList: boolean; + + /** defines whether spell checking should be done in reverse direction or not. */ + IsWrapReverse: boolean; + } + + /** + * is used to register a listener for LinguServiceEvents. + * + * This interface may be used by spell checker or hyphenator implementations to allow clients to be registered and informed about + * com::sun::star::linguistic2::LinguServiceEvents. + * + * Note: The {@link LinguServiceManager} forwards the com::sun::star::linguistic2::LinguServiceEvents it receives (from spell checkers or hyphenators) to + * its own listeners. Thus, there should be no need to register as a listener for a specific implementation./P> + * @see com.sun.star.linguistic2.XLinguServiceManager + * @see com.sun.star.linguistic2.XLinguServiceEventListener + */ + interface XLinguServiceEventBroadcaster extends uno.XInterface { + /** + * @param xLstnr the listener to be added. + * @returns `TRUE` if the listener was successfully added, `FALSE` otherwise. + */ + addLinguServiceEventListener(xLstnr: XLinguServiceEventListener): boolean; + + /** + * @param xLstnr the listener to be removed. + * @returns `TRUE` if the listener was successfully removed, `FALSE` otherwise. + */ + removeLinguServiceEventListener(xLstnr: XLinguServiceEventListener): boolean; + } + + /** + * is used to inform listeners about LinguServiceEvents. + * + * The function of this interface is used by the {@link com.sun.star.linguistic2.XLinguServiceEventBroadcaster} to inform its listeners about the + * com::sun::star::linguistic2::LinguServiceEvents. + * @see com.sun.star.linguistic2.XLinguServiceManager + */ + interface XLinguServiceEventListener extends lang.XEventListener { + /** @param aLngSvcEvent the event the listener will be informed about. */ + processLinguServiceEvent(aLngSvcEvent: LinguServiceEvent): void; + } + + /** + * the basic interface to be used to access linguistic functionality. + * + * This interface is used to access spell checker, hyphenator, and thesaurus functionality. Additionally, it can query what implementations of those + * services are available (for specific languages or in general). It can select and query which of those implementations should be used for a specific + * language. + * + * For spell checking and thesaurus, the order in the list defines the order of creation/usage of those services. That is, if the first spell checker + * implementation does not recognize the given word as correct, the second service implementation for that language is created and gets queried. If that + * one fails, the third one gets created and queried and so on. This chain stops if an implementation reports the word as correct or the end of the list + * is reached, in which case the word is reported as incorrect. + * + * For the thesaurus, the behavior is the same when no meaning was found. + * @see com.sun.star.linguistic2.SpellChecker + * @see com.sun.star.linguistic2.Hyphenator + * @see com.sun.star.linguistic2.Thesaurus + */ + interface XLinguServiceManager extends uno.XInterface { + /** + * adds a listener to the list of event listeners. + * + * The listeners may support one or both of {@link com.sun.star.linguistic2.XDictionaryEventListener} and {@link + * com.sun.star.linguistic2.XLinguServiceEventListener} interfaces. + * @param xListener the listener to be added. + * @returns `TRUE` if the listener was successfully added, `FALSE` otherwise. + */ + addLinguServiceManagerListener(xListener: lang.XEventListener): boolean; + + /** + * @param aServiceName the name of the service requesting the list of available implementations. + * @param aLocale the language used to query the list of available implementations. + * @returns the list of implementation names of the available services. + */ + getAvailableServices(aServiceName: string, aLocale: lang.Locale): SafeArray; + + /** + * queries the list of service implementations to be used for a given service and language. + * @param aServiceName the name of the service to get queried. + * @param aLocale the language to get queried. + * @returns the list of implementation names of the services to be used. + */ + getConfiguredServices(aServiceName: string, aLocale: lang.Locale): SafeArray; + + /** @returns the {@link com.sun.star.linguistic2.XHyphenator} interface to be used for hyphenation. */ + getHyphenator(): XHyphenator; + + /** @returns the {@link com.sun.star.linguistic2.XSpellChecker} interface to be used for spell checking. */ + getSpellChecker(): XSpellChecker; + + /** @returns the {@link com.sun.star.linguistic2.XThesaurus} interface to be used for thesaurus functionality. */ + getThesaurus(): XThesaurus; + + /** @returns the {@link com.sun.star.linguistic2.XHyphenator} interface to be used for hyphenation. */ + readonly Hyphenator: XHyphenator; + + /** + * removes a listener from the list of event listeners. + * @param xListener the listener to be removed. + * @returns `TRUE` if the listener was successfully removed, `FALSE` otherwise. + */ + removeLinguServiceManagerListener(xListener: lang.XEventListener): boolean; + + /** + * sets the list of service implementations to be used for a given service and language. + * @param aServiceName the name of the service to set the list of implementations to be used. + * @param aLocale the language to set the list. + * @param aServiceImplNames the name of the service to set the list. + */ + setConfiguredServices(aServiceName: string, aLocale: lang.Locale, aServiceImplNames: LibreOffice.SeqEquiv): void; + + /** @returns the {@link com.sun.star.linguistic2.XSpellChecker} interface to be used for spell checking. */ + readonly SpellChecker: XSpellChecker; + + /** @returns the {@link com.sun.star.linguistic2.XThesaurus} interface to be used for thesaurus functionality. */ + readonly Thesaurus: XThesaurus; + } + + /** + * Provides a unified interface for the {@link LinguServiceManager} service to implement. + * @since LibreOffice 4.0 + */ + interface XLinguServiceManager2 extends XLinguServiceManager, XAvailableLocales, lang.XComponent { } + + /** + * one of the possible meanings for a word. + * + * Represents one of the possible meanings that may be returned from a {@link com.sun.star.linguistic2.XThesaurus.queryMeanings()} call and allows for + * retrieval of its synonyms. + * @see com.sun.star.linguistic2.XThesaurus + */ + interface XMeaning extends uno.XInterface { + /** @returns the meaning represented by this object. */ + getMeaning(): string; + + /** @returns the meaning represented by this object. */ + readonly Meaning: string; + + /** @returns a sequence of strings where each entry is a synonym of the current objects meaning. */ + querySynonyms(): SafeArray; + } + + /** + * Gives information about a word's possible hyphenation points. + * + * Example: In German pre-spelling-reform you may have the following: getWord: Dampfschiffahrt getPossibleHyphens: Dampf=schiff=fahrt + * getOrigHyphensPositions: 4, 9 That is "Dampfschiffahrt" can be hyphenated after the "pf" (4) and between the double "ff" (9). And if you are going to + * hyphenate it at position 9 you will get an additional "f" before the hyphen character. + * @see com.sun.star.linguistic2.XHyphenator + */ + interface XPossibleHyphens extends uno.XInterface { + /** @returns an ascending sequence of numbers where each number is an offset within the original word which denotes a hyphenation position corresponding to on */ + getHyphenationPositions(): SafeArray; + + /** + * @returns the language of the hyphenated word. + * @see com.sun.star.lang.Locale + */ + getLocale(): lang.Locale; + + /** @returns a string depicting the word with all hyphen positions which are represented by "=" characters. If there are any alternative spellings, the word w */ + getPossibleHyphens(): string; + + /** @returns the word for which the information of possible hyphenation points was obtained. */ + getWord(): string; + + /** @returns an ascending sequence of numbers where each number is an offset within the original word which denotes a hyphenation position corresponding to on */ + readonly HyphenationPositions: SafeArray; + + /** + * @returns the language of the hyphenated word. + * @see com.sun.star.lang.Locale + */ + readonly Locale: lang.Locale; + + /** @returns a string depicting the word with all hyphen positions which are represented by "=" characters. If there are any alternative spellings, the word w */ + readonly PossibleHyphens: string; + + /** @returns the word for which the information of possible hyphenation points was obtained. */ + readonly Word: string; + } + + /** + * API for proofreading a text + * @since OOo 3.0.1 + */ + interface XProofreader extends XSupportedLocales { + /** + * start checking + * @param aDocumentIdentifier the Document ID. + * @param aText the flat text to be checked. + * @param aLocale Language used in the text. + * @param nStartOfSentencePosition Start Index of the text. + * @param nSuggestedBehindEndOfSentencePosition Probable end position of the text. + * @param aProperties additional properties of the text. Currently the following properties may be supported: {{table here, see documentation}} + * @throws IllegalArgumentException when any argument is wrong. + */ + doProofreading( + aDocumentIdentifier: string, aText: string, aLocale: lang.Locale, nStartOfSentencePosition: number, nSuggestedBehindEndOfSentencePosition: number, + aProperties: LibreOffice.SeqEquiv): ProofreadingResult; + + /** + * disables a specific rule for a given locale. + * + * If the locale is empty the rule should be ignored for all languages. + */ + ignoreRule(aRuleIdentifier: string, aLocale: lang.Locale): void; + + /** + * whether is the text checked by the spell checker + * @returns true if it is also a spell checker + */ + isSpellChecker(): boolean; + + /** sets all rules back to their default settings. */ + resetIgnoreRules(): void; + } + + /** + * API for the proofreading iterator that mediates between the document and the proofreader. + * @since OOo 3.0.1 + */ + interface XProofreadingIterator extends uno.XInterface { + /** + * start proofreading from a given position + * @param xDocument the document. + * @param xFlatParagraph the single flat paragraph to be checked. + * @param aText the text of the paragraph to be checked. + * @param aLocale currently unused parameter. + * @param nStartOfSentencePosition the start position of the current sentence. + * @param nSuggestedBehindEndOfSentencePosition currently unused parameter. + * @param nErrorPositionInParagraph the given index. + * @throws IllegalArgumentException when any argument is wrong. + */ + checkSentenceAtPosition( + xDocument: uno.XInterface, xFlatParagraph: text.XFlatParagraph, aText: string, aLocale: lang.Locale, nStartOfSentencePosition: number, + nSuggestedBehindEndOfSentencePosition: number, nErrorPositionInParagraph: number): ProofreadingResult; + + /** + * checks if the given document is currently being checked + * @param xDocument the document. + * @returns if the document is currently being checked. + */ + isProofreading(xDocument: uno.XInterface): boolean; + + /** clears the list of ignored rules for each proofreader */ + resetIgnoreRules(): void; + + /** + * start proofreading and automatically process the whole text + * @param xDocument the text document. + * @param xIteratorProvider the flat paragraph iterator provider. + * @throws IllegalArgumentException when any argument is wrong. + */ + startProofreading(xDocument: uno.XInterface, xIteratorProvider: text.XFlatParagraphIteratorProvider): void; + } + + /** This interfaces allows to retrieve suggestions for spell checking from a dictionary. */ + interface XSearchableDictionary extends XDictionary { + /** + * search for similar entries in the dictionary. + * @param aWord the word to find similar written entries for. + * @returns the list of similar entries found. + * @see com.sun.star.linguistic2.XDictionaryEntry + * @see com.sun.star.linguistic2.XSearchableDictionaryList + * @since OOo 3.0.1 + */ + searchSimilarEntries(aWord: string): SafeArray; + } + + /** + * allows searching for an entry in all dictionaries of the dictionary-list. + * + * Only active dictionaries of a suitable language will be searched for the entry. The language is suitable if it is the same as the dictionary's + * language or the dictionary may hold entries of all languages. + * @see com.sun.star.linguistic2.XDictionaryList + */ + interface XSearchableDictionaryList extends XDictionaryList { + /** + * looks for an entry for a given word in the list of dictionaries. + * @param aWord the word (entry) to be looked for. + * @param aLocale the language of the word to be looked for. + * @param bSearchPosDics `TRUE` if only positive dictionaries should be searched. `FALSE` if only negative dictionaries should be searched. + * @param bSpellEntry `TRUE` if entries for purposes of spell checking are required. `FALSE` if only entries for hyphenation purposes are required. + * @returns the dictionary entry that was found, `NULL` otherwise. + */ + queryDictionaryEntry(aWord: string, aLocale: lang.Locale, bSearchPosDics: boolean, bSpellEntry: boolean): XDictionaryEntry; + } + + /** + * allows to modify the suggestion list returned by a spell checker. + * + * Basically this is needed to post-add further suggestions while keeping the originally returned reference from the spell checker. E.g. from the user + * dictionaries. + * @see com.sun.star.linguistic2.XSpellAlternatives + */ + interface XSetSpellAlternatives extends uno.XInterface { + /** + * set the list of suggestions to be returned. + * @since OOo 3.0.1 + */ + setAlternatives(aAlternatives: LibreOffice.SeqEquiv): void; + + /** + * set the type of error found. + * @see com.sun.star.linguistic2.SpellFailure + * @since OOo 3.0.1 + */ + setFailureType(nFailureType: number): void; + } + + /** + * Gives access to the results of failed spell checking attempts and may provide spelling alternatives. + * + * This is used by the {@link com.sun.star.linguistic2.XSpellChecker.spell()} function when the word was not found to be correct. Suggestions for other + * words to be used may be provided along with a failure-type that may specify why the word was not correct. + * @see com.sun.star.linguistic2.SpellFailure + */ + interface XSpellAlternatives extends uno.XInterface { + /** @returns the sequence of suggested spelling alternatives. */ + readonly Alternatives: SafeArray; + + /** @returns the number of suggested spelling alternatives available. */ + readonly AlternativesCount: number; + + /** + * @returns the type (reason) for spell checking to have failed verification. + * @see com.sun.star.linguistic2.SpellFailure + */ + readonly FailureType: number; + + /** @returns the sequence of suggested spelling alternatives. */ + getAlternatives(): SafeArray; + + /** @returns the number of suggested spelling alternatives available. */ + getAlternativesCount(): number; + + /** + * @returns the type (reason) for spell checking to have failed verification. + * @see com.sun.star.linguistic2.SpellFailure + */ + getFailureType(): number; + + /** @returns the Locale which specifies the language of the misspelled word. */ + getLocale(): lang.Locale; + + /** @returns the word that was misspelled. */ + getWord(): string; + + /** @returns the Locale which specifies the language of the misspelled word. */ + readonly Locale: lang.Locale; + + /** @returns the word that was misspelled. */ + readonly Word: string; + } + + /** + * This interface allows for spell checking. + * + * It is possible to simply check if a word, in a specified language, is correct or additionally, if it was misspelled, some proposals how it might be + * correctly written. + * @see com.sun.star.linguistic2.XSupportedLocales + */ + interface XSpellChecker extends XSupportedLocales { + /** + * checks if a word is spelled correctly in a given language. + * @param aWord the word to be checked. + * @param aLocale the Locale (language) to be used. If the Locale is empty, the word is spelled correctly by definition. If **aLocale** is not supported a + * @param aProperties provides property values to be used for this function call only. It is usually empty in order to use the default values supplied with + * @returns `TRUE` if the word is spelled correctly using the specified language, `FALSE` otherwise. + * @see com.sun.star.lang.Locale + */ + isValid(aWord: string, aLocale: lang.Locale, aProperties: beans.PropertyValues): boolean; + + /** + * This method checks if a word is spelled correctly in a given language. + * @param aWord the word to be checked. + * @param aLocale the language to be used. If the language is not supported an IllegalArgumentException exception is raised. + * @param aProperties provides property values to be used for this function call only. It is usually empty in order to use the default values supplied with + * @returns `NULL` if **aWord** is spelled correctly using **aLocale** . Otherwise, an {@link XSpellAlternatives} object with information about the reason of + * @see com.sun.star.linguistic2.XSpellAlternatives + * @see com.sun.star.lang.Locale + */ + spell(aWord: string, aLocale: lang.Locale, aProperties: beans.PropertyValues): XSpellAlternatives; + } + + /** @deprecated Deprecated */ + interface XSpellChecker1 extends XSupportedLanguages { + isValid(aWord: string, nLanguage: number, aProperties: beans.PropertyValues): boolean; + spell(aWord: string, nLanguage: number, aProperties: beans.PropertyValues): XSpellAlternatives; + } + + /** @deprecated Deprecated */ + interface XSupportedLanguages extends uno.XInterface { + getLanguages(): SafeArray; + hasLanguage(nLanguage: number): boolean; + readonly Languages: SafeArray; + } + + /** + * Offers information about which languages are supported by the object. + * + * This interface has to be implemented by {@link com.sun.star.linguistic2.SpellChecker} , {@link com.sun.star.linguistic2.Hyphenator} and {@link + * com.sun.star.linguistic2.Thesaurus} implementations in order to be queried for the languages they can use. + * @see com.sun.star.lang.Locale + * @see com.sun.star.uno.XInterface + */ + interface XSupportedLocales extends uno.XInterface { + /** @returns the sequence of all supported languages. */ + getLocales(): SafeArray; + + /** + * @param aLocale specifies the language being checked for support by the object. + * @returns `TRUE` if the language is supported, otherwise `FALSE` . + */ + hasLocale(aLocale: lang.Locale): boolean; + + /** @returns the sequence of all supported languages. */ + readonly Locales: SafeArray; + } + + /** + * allows for the retrieval of possible meanings for a given word and language. + * + * The meaning of a word is in essence a descriptive text for that word. Each meaning may have several synonyms where a synonym is a word (or small text) + * with the same or similar meaning. + * @see com.sun.star.linguistic2.XSupportedLocales + */ + interface XThesaurus extends XSupportedLocales { + /** + * @param aTerm the word to query for its meanings. + * @param aLocale specifies the language of the word. If the language is not supported, an {@link com.sun.star.lang.IllegalArgumentException} exception is + * @param aProperties provides property values to be used for this function call only. It is usually empty in order to use the default values supplied with + * @returns a list of meanings for the given word and language. + * @see com.sun.star.lang.Locale + * @see com.sun.star.linguistic2.XMeaning + */ + queryMeanings(aTerm: string, aLocale: lang.Locale, aProperties: beans.PropertyValues): SafeArray; + } + + namespace ConversionDictionaryType { + const enum Constants { + HANGUL_HANJA = 1, + SCHINESE_TCHINESE = 2, + } + } + + namespace ConversionPropertyType { + const enum Constants { + ABBREVIATION = 11, + ADJECTIVE = 9, + BRAND_NAME = 15, + BUSINESS = 8, + FIRST_NAME = 3, + FOREIGN = 2, + IDIOM = 10, + LAST_NAME = 4, + NOT_DEFINED = 0, + NOUN = 13, + NUMERICAL = 12, + OTHER = 1, + PLACE_NAME = 7, + STATUS = 6, + TITLE = 5, + VERB = 14, + } + } + + namespace DictionaryEventFlags { + const enum Constants { + ACTIVATE_DIC = 32, + ADD_ENTRY = 1, + CHG_LANGUAGE = 8, + CHG_NAME = 4, + DEACTIVATE_DIC = 64, + DEL_ENTRY = 2, + ENTRIES_CLEARED = 16, + } + } + + namespace DictionaryListEventFlags { + const enum Constants { + ACTIVATE_NEG_DIC = 64, + ACTIVATE_POS_DIC = 16, + ADD_NEG_ENTRY = 4, + ADD_POS_ENTRY = 1, + DEACTIVATE_NEG_DIC = 128, + DEACTIVATE_POS_DIC = 32, + DEL_NEG_ENTRY = 8, + DEL_POS_ENTRY = 2, + } + } + + namespace LinguServiceEventFlags { + const enum Constants { + HYPHENATE_AGAIN = 4, + PROOFREAD_AGAIN = 8, + SPELL_CORRECT_WORDS_AGAIN = 1, + SPELL_WRONG_WORDS_AGAIN = 2, + } + } + + namespace SpellFailure { + const enum Constants { + CAPTION_ERROR = 3, + IS_NEGATIVE_WORD = 2, + SPELLING_ERROR = 4, + } + } + } + + namespace loader { + /** + * indicates an error during component activation + * + * This exception is thrown when an application tries to activate a component factory using the {@link XImplementationLoader.activate()} method, but the + * component factory can not be activated. + * + * Possible reasons for this error is a missing shared library or .jar file, a badly linked library, a wrong LD_LIBRARY_PATH or PATH, an incomplete + * classpath, or a missing java installation. The Message should contain some more detailed explanations. + */ + type CannotActivateFactoryException = uno.Exception; + + /** + * Makes it possible to access services accessible via a `UnoUrlResolver` E.g., instantiation of services in another process. This service is still in an + * experimental state and should not be used in a production environment. + * + * Is used to write persistent information into the given registry for accessing a `SingleServiceFactory` and for activating this implementation. + * + * Allows registration and activation of described service. The url parameter has to be a comma-separated list of attributes. The following attribute + * types are understood: servicename = the service name to register this component under link = a parameter given to a resolver to get a + * `SingleServiceFactory` resolver = a `UnoUrlResolver` service, which is used to resolve the link + */ + type Dynamic = XImplementationLoader; + + /** + * Allows to access a java component stored with a .jar file. + * + * Is used for writing persistent information in the registry for external implementation and for activating this implementation. The locationUrls must + * be absolute file urls. + */ + type Java = XImplementationLoader; + + /** + * the same as {@link com.sun.star.loader.Java} . + * + * This service was introduced for UNO 3 components. The then {@link com.sun.star.loader.Java} service was intended for UNO 2 components. Since UNO 2 is + * not supported anymore, the service name is reused again. + * @deprecated Deprecated + */ + type Java2 = XImplementationLoader; + + /** + * Allows to access a native component stored in a shared library. + * + * Is used for writing persistent information in the registry for an external implementation and for activating this implementation. + */ + type SharedLibrary = XImplementationLoader; + + /** + * handles activation (loading) of a UNO component. + * @see com.sun.star.registry.XImplementationRegistration + */ + interface XImplementationLoader extends uno.XInterface { + /** + * activates a concrete implementation within a component. + * @param implementationName The name of the implementation, which shall be instantiated. The method {@link XImplementationLoader.writeRegistryInfo()} writ + * @param implementationLoaderUrl specification bug, ignore this parameter, please pass an empty string. + * @param locationUrl Points to the location of the file containing the component (for instance a .jar-file or a shared library). This parameter should be + * @param xKey A registry which may be used to read static data previously written via {@link XImplementationLoader.writeRegistryInfo()} . The use of this + * @returns returns a factory interface, which allows to create an instance of the concrete implementation. In general, the object supports a {@link com.sun. + */ + activate(implementationName: string, implementationLoaderUrl: string, locationUrl: string, xKey: registry.XRegistryKey): uno.XInterface; + + /** + * writes a list of all implementations hosted by this component into a registry key. + * + * This method is called during registering a component. + * @param xKey The registry key, which shall be used to write for each implementation the implementation name plus a list of supported services. + * @param implementationLoaderUrl specification bug, ignore this parameter, please pass an empty string. + * @param locationUrl Points to the location of the file containing the component (for instance a .jar-file or a shared library). This parameter should be + * @see com.sun.star.registry.XImplementationRegistration + */ + writeRegistryInfo(xKey: registry.XRegistryKey, implementationLoaderUrl: string, locationUrl: string): boolean; + } + } + + namespace logging { + /** + * This singleton is intended to log the IO events related to loading/storing of documents. + * + * Please do not use the singleton without communication with source owner! + * @since OOo 3.2 + */ + type DocumentIOLogRing = XSimpleLogRing; + + /** + * the global pool of named {@link XLogger} instances + * + * The one and only `LoggerPool` instance is available at a component context as value with the key `/singletons/com.sun.star.logging.LoggerPool` . + * + * the global pool of named {@link XLogger} instances + * + * The one and only `LoggerPool` instance is available at a component context as value with the key `/singletons/com.sun.star.logging.LoggerPool` . + * @since OOo 2.3 + */ + type LoggerPool = XLoggerPool; + + /** + * specifies a component implementing a log handler whose output channel is the processes console. + * @since OOo 2.3 + */ + interface ConsoleHandler extends XConsoleHandler { + create(): void; + + /** + * creates an instance of the log handler, using generic settings + * @param Settings contains the initial settings for the log handler The following settings are recognized and supported: `Encoding` - denotes the initial + * @throws com::sun::star::lang::IllegalArgumentException if `Settings` contains arguments with names other than in the list above, or settings whose value + */ + createWithSettings(Settings: LibreOffice.SeqEquiv): void; + } + + /** + * specifies a service which formats log records for RFC4180-style CSV-Files + * + * Every log record, as passed to {@link XCsvLogFormatter.format()} , will be formatted into a single row for a CSV file. The sequence number, the thread + * ID, the time of the logged event, the source class/method name will get logged alongside the message, if this is not disabled. The Formatter also + * supports logging an arbitrary number of user-defined columns. If the Formatter is configured to have more than one (user-defined) column the data to + * log has to be preformatted with the formatMultiColumn method. + * @since OOo 3.0 + */ + interface CsvLogFormatter extends XCsvLogFormatter { + create(): void; + } + + /** + * specifies a component implementing a log handler whose output channel is a file. + * + * The handler will use the `Encoding` attribute of {@link XLogHandler} to determine how to encode strings before actually writing them to the output + * file. + * @see XLogHandler.Encoding + * @since OOo 2.3 + */ + interface FileHandler extends XLogHandler { + /** + * creates a log handler whose output is directed to a file given by URL. + * @param FileURL the URL of the file to be created. This URL is resolved using the {@link com.sun.star.util.PathSubstitution} service. That is, it is allo + */ + create(FileURL: string): void; + + /** + * creates an instance of the log handler, using generic settings + * @param Settings contains the initial settings for the log handler The following settings are recognized and supported: `Encoding` - denotes the initial + * @throws com::sun::star::lang::IllegalArgumentException if `Settings` contains settings whose value is of the wrong type. + */ + createWithSettings(Settings: LibreOffice.SeqEquiv): void; + } + + /** + * assembles the complete information about a to-be-logged event + * @see XLogger + * @since OOo 2.3 + */ + interface LogRecord { + /** + * specifies the level of the log event + * @see LogLevel + */ + Level: number; + LoggerName: string; + LogTime: util.DateTime; + Message: string; + + /** + * specifies the number of the log event. + * + * Subsequent events get assigned increasing sequence numbers by the {@link XLogger} at which they're logged. + */ + SequenceNumber: number; + + /** + * specifies the name of the class, in which the record was logged. + * + * This name might be empty, in case the caller to one of the various `log` methods of {@link XLogger} did not specify it. + */ + SourceClassName: string; + + /** + * specifies the name of the method, in which the record was logged. + * + * This name might be empty, in case the caller to one of the various `log` methods of {@link XLogger} did not specify it. + */ + SourceMethodName: string; + ThreadID: string; + } + + /** + * specifies a service which formats log records as single line plain text + * + * Every log record, as passed to {@link XLogFormatter.format()} , will be formatted into a single text line, assembling the sequence number, the thread + * ID, the time of the logged event, the source class/method name (if applicable), and the log message. + * @since OOo 2.3 + */ + interface PlainTextFormatter extends XLogFormatter { + create(): void; + } + + /** + * This service allows to log the events in a ring of specified size. + * @since OOo 3.2 + */ + interface SimpleLogRing extends XSimpleLogRing { + /** creates a ring of default size - 256 messages */ + create(): void; + + /** + * creates a ring of specified size + * @param nSize the number of messages in a ring + */ + createWithSize(nSize: number): void; + } + + /** + * implemented by a log handler whose output channel is the processes console. + * + * Note that a console handler will ignore its formatter's head and tail, since it cannot decided whether they should be emitted on `stdout` or `stderr` + * . + * @since OOo 2.3 + */ + interface XConsoleHandler extends XLogHandler { + /** + * denotes the {@link LogLevel} threshold used to determine to which console the events should be logged. + * + * Events with a level greater or equal to `Threshold` will be logged to `stderr` , all others to `stdout` . + * + * The default value for this attribute is {@link LogLevel.SEVERE} . + */ + Threshold: number; + } + + /** + * specifies the interface used for formatting log records for RFC4180 CSV output + * @see XLogFormatter, XLogHandler + * @since OOo 3.0 + */ + interface XCsvLogFormatter extends XLogFormatter { + /** + * Defines the names of the additional columns this defaults to only one row titled "message". if this is set to more than one column, the messages need + * to be preformatted using `formatMultiColumn` + */ + Columnnames: SafeArray; + + /** + * if the {@link CsvLogFormatter} is set to have more than one column, any logged information has to be send through this method before calling log(). + * E.g.: + * + * `XLoggerInstance.log(1000, XCsvLogFormatterInstance.formatMultiColumn(columnData))` + */ + formatMultiColumn(columnData: LibreOffice.SeqEquiv): string; + + /** Defines if the EventNo should be logged */ + LogEventNo: boolean; + + /** Defines if the Source should be logged */ + LogSource: boolean; + + /** Defines if the ThreadId should be logged */ + LogThread: boolean; + + /** Defines if the Timestamp should be logged */ + LogTimestamp: boolean; + } + + /** + * specifies the interface to be used for formatting log records + * @see XLogHandler + * @since OOo 2.3 + */ + interface XLogFormatter { + /** + * formats the given log record for output + * + * A {@link XLogHandler} will call this method to format a given log record. The resulting string will be emitted to the handler's output channel, + * without processing it any further (except possibly encoding it with the handler's `Encoding` ). + */ + format(Record: LogRecord): string; + + /** + * returns the header string for the log + * + * This can be used to generate a header string, which by the {@link XLogHandler} is emitted to its output channel before actually logging any concrete + * {@link LogRecord} . + * + * For instance, a formatter might produce table-like plain text output, and could return a table-head string (potentially including line breaks) here. + */ + getHead(): string; + + /** + * returns the footer string for the log + * + * This can be used to generate a footer string, which by the {@link XLogHandler} is emitted to its output channel before it is finally being closed. + */ + getTail(): string; + + /** + * returns the header string for the log + * + * This can be used to generate a header string, which by the {@link XLogHandler} is emitted to its output channel before actually logging any concrete + * {@link LogRecord} . + * + * For instance, a formatter might produce table-like plain text output, and could return a table-head string (potentially including line breaks) here. + */ + readonly Head: string; + + /** + * returns the footer string for the log + * + * This can be used to generate a footer string, which by the {@link XLogHandler} is emitted to its output channel before it is finally being closed. + */ + readonly Tail: string; + } + + /** + * implemented by a component which is able to log events. + * + * This interface is roughly designed after the [Java Logging API]{@link + * url="http://java.sun.com/javase/6/docs/api/java/util/logging/package-summary.html"} . However, there are some differences, the major ones being: + * There's no support (yet) for filtering log events.There ain't no convenience methods for logging.There's no localization support.Logger instances do + * not form a hierarchy. + * @since OOo 2.3 + */ + interface XLogger { + /** + * adds the given handler to the list of handlers. + * + * When an event is logged, the logger will create a {@link LogRecord} for this event, and pass this record to all registered handlers. Single handlers + * might or might not log those records at their own discretion, and depending on additional restrictions such as filters specified at handler level. + * + * Note: The log level of the given handler ( {@link XLogHandler.Level} ) will not be touched. In particular, it will not be set to the logger's log + * level. It's the responsibility of the component which knits a logger with one or more log handlers to ensure that all loggers have appropriate levels + * set. + * @param LogHandler the handler to add to the list of handlers. The call is ignored if this parameter is `NULL` . + */ + addLogHandler(LogHandler: XLogHandler): void; + + /** + * determines whether logger instance would produce any output for the given level. + * + * The method can be used to optimize performance as maybe complex parameter evaluation in the `log` calls can be omitted if `isLoggable` evaluates to + * false. + * @param Level level to be checked against + * @returns `TRUE` if there would be some output for this {@link XLogger} for the given level, `FALSE` otherwise. Note that a return value of `FALSE` could a + * @see addLogHandler + * @see removeLogHandler + */ + isLoggable(Level: number): boolean; + + /** + * specifies which log events are logged or ignored. + * @see LogLevel + */ + Level: number; + + /** + * logs a given message + * @param Level the log level of this message. If this level is smaller than the logger's {@link Level} attribute, then the call will be ignored. + * @param Message the message to log + */ + log(Level: number, Message: string): void; + + /** + * logs a given message, detailing the source class and method at which the logged event occurred. + * @param Level the log level of this message. If this level is smaller than the logger's {@link Level} attribute, then the call will be ignored. + * @param SourceClass the source class at which the logged event occurred. + * @param SourceMethod the source class at which the logged event occurred. + * @param Message the message to log + */ + logp(Level: number, SourceClass: string, SourceMethod: string, Message: string): void; + + /** denotes the name of the logger. */ + Name: string; + + /** + * removes the given handler from the list of handlers. + * @param LogHandler the handler to remove from the list of handlers. The call is ignored if this parameter is `NULL` , or if the handler has not previousl + */ + removeLogHandler(LogHandler: XLogHandler): void; + } + + /** + * implements a pool for named {@link XLogger} instances + * @since OOo 2.3 + */ + interface XLoggerPool { + /** + * retrieves a logger with the default name "org.openoffice.logging.DefaultLogger". + * + * Calling this method is equivalent to calling `getNamedLogger( "org.openoffice.logging.DefaultLogger" )` . + */ + readonly DefaultLogger: XLogger; + + /** + * retrieves a logger with the default name "org.openoffice.logging.DefaultLogger". + * + * Calling this method is equivalent to calling `getNamedLogger( "org.openoffice.logging.DefaultLogger" )` . + */ + getDefaultLogger(): XLogger; + + /** + * retrieves a logger with the given name + * + * Multiple attempts to retrieve a logger with the same name will return the same instance. + * + * Newly created logger instances are initialized via configuration. See the configuration module `/org.openoffice.Office.Logging` for an explanation of + * the initialization pattern. + */ + getNamedLogger(Name: string): XLogger; + } + + /** + * provides possibilities to send LogRecords to an arbitrary output channel. + * @see XLogger + * @since OOo 2.3 + */ + interface XLogHandler extends lang.XComponent { + /** + * specifies MIME charset name for the encoding to be used by this handler + * + * It depends on the concrete handler implementation whether or not this parameter is needed. + * @see http://www.iana.org/assignments/character-sets + */ + Encoding: string; + + /** + * flushes all buffered output of the handler + * + * Log handlers are allowed to buffer their output. Upon `flush` being called, they must flush all their buffers. + */ + flush(): void; + + /** specifies the formatter to be used by this handler. */ + Formatter: XLogFormatter; + + /** + * specifies the log level of this handler + * + * Different handlers can have different log levels, which again might be different from the log level of the {@link XLogger} for which the handlers are + * used. + */ + Level: number; + + /** + * publish the given log record at the handler's output channel. + * @returns `TRUE` if and only if the record was actually published. A handler will not publish a record if its log level doesn't meet the handler's log leve + */ + publish(Record: LogRecord): boolean; + } + + /** + * a simple log ring allowing to collect a limited number of last events + * + * The intention of this interface is to provide a simple possibility for developer to collect the most important events without affecting the + * performance. For this reasons the messages related API is quite simple, the strings should be produced by the preprocessor mainly. + * @since OOo 3.2 + */ + interface XSimpleLogRing { + /** + * allows to get the collected messages from the logger + * + * It is up to logger implementation to provide only the limited number of last messages. + */ + readonly CollectedLog: SafeArray; + + /** + * allows to get the collected messages from the logger + * + * It is up to logger implementation to provide only the limited number of last messages. + */ + getCollectedLog(): SafeArray; + + /** allows to add a message to the logger */ + logString(aMessage: string): void; + } + + namespace LogLevel { + const enum Constants { + ALL = -2147483648, + CONFIG = 700, + FINE = 500, + FINER = 400, + FINEST = 300, + INFO = 800, + OFF = 2147483647, + SEVERE = 1000, + WARNING = 900, + } + } + } + + namespace mail { + /** + * An {@link MailException} is the base of all mail related exceptions. + * @since OOo 2.0 + */ + type MailException = uno.Exception; + + /** + * A {@link NoMailServiceProviderException} will be thrown if an appropriate provider for requested mail service could not be found or could not be + * created. + * @see com.sun.star.mail.MailService + * @since OOo 2.0 + */ + type NoMailServiceProviderException = MailException; + + /** + * A {@link NoMailTransportProviderException} will be thrown if an appropriate provider for sending mail messages could not be found or could not be + * created. + * @see com.sun.star.mail.MailServer + * @since OOo 2.0 + */ + type NoMailTransportProviderException = MailException; + + /** @since OOo 2.0 */ + const enum MailServiceType { + /** A IMAP service */ + IMAP = 2, + /** A POP3 service */ + POP3 = 1, + /** A SMTP service */ + SMTP = 0, + } + + /** + * A {@link MailAttachment} specifies a mail message attachment. + * @see com.sun.star.mail.XMailMessage + * @since OOo 2.0 + */ + interface MailAttachment { + /** + * The actual data which should be attached to a mail message. It is expected that the transferable delivers the data as sequence of bytes. Although a + * transferable may support multiple data flavors only the first data flavor supplied will be used to retrieve the data and it is expected that the type + * of the data is a sequence of bytes. + * @see com.sun.star.datatransfer.XTransferable + */ + Data: datatransfer.XTransferable; + + /** The name of the attachment as seen by the recipient of the mail message. ReadableName must not be empty. */ + ReadableName: string; + } + + /** @since OOo 2.0 */ + interface MailMessage extends XMailMessage { + /** + * Constructs an instance of a mail message. + * @param sTo [in] the e-mail address of the recipient. The e-mail address has to conform to [RFC 822]{@link url="http://www.ietf.org/rfc/rfc822.txt"} . + * @param sFrom [in] the e-mail address of the sender of this mail message. The e-mail address has to conform to [RFC 822]{@link url="http://www.ietf.org + * @param sSubject [in] the subject of the mail message. + * @param xBody [in] the body of the mail message. It is expected that the transferable delivers the data as a string. Although a transferable may support + * @see com.sun.star.mail.XMailMessage + * @see com.sun.star.datatransfer.XTransferable + */ + create(sTo: string, sFrom: string, sSubject: string, xBody: datatransfer.XTransferable): void; + + /** + * Constructs an instance of a mail message. + * @param sTo [in] the e-mail address of the recipient. The e-mail address has to conform to [RFC 822]{@link url="http://www.ietf.org/rfc/rfc822.txt"} . + * @param sFrom [in] the e-mail address of the sender of this mail message. The e-mail address has to conform to [RFC 822]{@link url="http://www.ietf.org + * @param sSubject [in] the subject of the mail message. + * @param xBody [in] the body of the mail message. It is expected that the transferable delivers the data as a string. Although a transferable may support + * @param aMailAttachment [in] specifies an attachment which should be send with this mail message. + * @see com.sun.star.mail.XMailMessage + * @see com.sun.star.datatransfer.XTransferable + * @see com.sun.star.mail.MailAttachment + */ + createWithAttachment(sTo: string, sFrom: string, sSubject: string, xBody: datatransfer.XTransferable, aMailAttachment: MailAttachment): void; + } + + /** @since OOo 2.0 */ + interface MailServiceProvider extends XMailServiceProvider { + create(aType: MailServiceType): XMailService; + + /** + * Creation method. + * @see com.sun.star.mail.XMailServiceProvider + */ + create(): void; + } + + /** + * A SendFailedException will be thrown if a mail message could not be sent because the e-mail addresses of some recipients are invalid. E-mail addresses + * have to conform to [RFC 822]{@link url="http://www.ietf.org/rfc/rfc822.txt"} . + * @see com.sun.star.mail.XMailService + * @since OOo 2.0 + */ + interface SendMailMessageFailedException extends MailException { + /** The addresses which are invalid because they do not conform to [RFC 822]{@link url="http://www.ietf.org/rfc/rfc822.txt"} . */ + InvalidAddresses: SafeArray; + + /** The addresses to which the mail message was sent successfully. */ + ValidSentAddresses: SafeArray; + + /** The addresses which are valid but to which the message was not sent. */ + ValidUnsentAddresses: SafeArray; + } + + /** + * Represents an interface that will be used to query for user information which are necessary to login to a network resource. An implementation of this + * interface may for instance show a dialog to query the user for the necessary data. + * @since OOo 2.0 + */ + interface XAuthenticator extends uno.XInterface { + /** + * Will be called when the password of the user is needed. + * @returns the password of the user. + */ + getPassword(): string; + + /** + * Will be called when the user name is needed. + * @returns the user name. + */ + getUserName(): string; + + /** + * Will be called when the password of the user is needed. + * @returns the password of the user. + */ + readonly Password: string; + + /** + * Will be called when the user name is needed. + * @returns the user name. + */ + readonly UserName: string; + } + + /** + * The listener interface for connection events. + * @see com.sun.star.mail.XMailService + * @since OOo 2.0 + */ + interface XConnectionListener extends lang.XEventListener { + /** + * Invoked when the connection to the mail server is established. + * @param aEvent [in] specific information regarding this event. + * @see com.sun.star.lang.EventObject + */ + connected(aEvent: lang.EventObject): void; + + /** + * Invoked when the connection to the mail server is closed. + * @param aEvent [in] specific information regarding this event. + * @see com.sun.star.lang.EventObject + */ + disconnected(aEvent: lang.EventObject): void; + } + + /** + * Represents a mail message. + * @see com.sun.star.mail.XMailService + * @since OOo 2.0 + */ + interface XMailMessage extends uno.XInterface { + /** + * Add a file attachment to a mail message. + * + * param aMailAttachment [in] specifies a file which should be attached to this mail message. + * @see com.sun.star.mail.MailAttachment + */ + addAttachment(aMailAttachment: MailAttachment): void; + + /** + * Add an BCC recipients e-mail address to the list of recipients of this mail message. If the e-mail address doesn't conform to [RFC 822]{@link + * url="http://www.ietf.org/rfc/rfc822.txt"} sending the mail message will fail. + * @param sRecipientAddress [in] the e-mail address of the BCC recipient. + */ + addBccRecipient(sRecipientAddress: string): void; + + /** + * Add an Cc recipients e-mail address to the list of recipients of this mail message. If the e-mail address doesn't conform to [RFC 822]{@link + * url="http://www.ietf.org/rfc/rfc822.txt"} sending the mail message will fail. + * @param sRecipientAddress [in] the e-mail address of the Cc recipient. + */ + addCcRecipient(sRecipientAddress: string): void; + + /** + * Add an recipients e-mail address to the list of recipients of this mail message. If the e-mail address doesn't conform to [RFC 822]{@link + * url="http://www.ietf.org/rfc/rfc822.txt"} sending the mail message will fail. + * @param sRecipientAddress [in] the e-mail address of the recipient. + */ + addRecipient(sRecipientAddress: string): void; + + /** + * Return a sequence of {@link MailAttachment} 's that will be attached to this mail message. + * @see com.sun.star.mail.MailAttachment + */ + readonly Attachments: SafeArray; + + /** Return a sequence of the e-mail addresses of all the BCC recipients of this mail message. */ + readonly BccRecipients: SafeArray; + + /** + * The body of the mail message. It is expected that the transferable delivers the data as a string. Although a transferable may support multiple data + * flavors only the first data flavor supplied will be used to retrieve the data and it is expected that the data will be provided as a string. + * @see com.sun.star.datatransfer.XTransferable + */ + Body: datatransfer.XTransferable; + + /** Return a sequence of the e-mail addresses of all the Cc recipients of this mail message. */ + readonly CcRecipients: SafeArray; + + /** + * Return a sequence of {@link MailAttachment} 's that will be attached to this mail message. + * @see com.sun.star.mail.MailAttachment + */ + getAttachments(): SafeArray; + + /** Return a sequence of the e-mail addresses of all the BCC recipients of this mail message. */ + getBccRecipients(): SafeArray; + + /** Return a sequence of the e-mail addresses of all the Cc recipients of this mail message. */ + getCcRecipients(): SafeArray; + + /** Return a sequence of the e-mail addresses of all recipients of this mail message. */ + getRecipients(): SafeArray; + + /** Return a sequence of the e-mail addresses of all recipients of this mail message. */ + readonly Recipients: SafeArray; + + /** + * The e-mail address where replies on this mail message should be sent to. If the e-mail address doesn't conform to [RFC 822]{@link + * url="http://www.ietf.org/rfc/rfc822.txt"} sending the mail message later will fail. If no ReplyToAddress is set replies go to the SenderAddress. + */ + ReplyToAddress: string; + + /** + * The e-mail address of the sender of this mail message. The e-mail address has to conform to [RFC 822]{@link + * url="http://www.ietf.org/rfc/rfc822.txt"} . + */ + SenderAddress: string; + + /** The display name of the sender of this mail message. */ + SenderName: string; + + /** The subject of a mail message. */ + Subject: string; + } + + /** + * Represents a mail server abstraction. + * @since OOo 2.0 + */ + interface XMailService extends uno.XInterface { + /** + * Register a connection listener. + * @param xListener [in] a listener that will be informed about connection events. + * @see com.sun.star.mail.XConnectionListener + */ + addConnectionListener(xListener: XConnectionListener): void; + + /** + * Connect to a mail service. Only one connection to a mail service can be established at a time. + * @param xConnectionContext [in] an interface used to query for connection related information. The context must contain the following values: **ServerNam + * @param xAuthenticator [in] an interface used to query for the necessary user information needed to login to the mail server. If no authentication is req + * @see com.sun.star.uno.XCurrentContext + * @see com.sun.star.mail.XAuthenticator + * @see com.sun.star.lang.IllegalArgumentException + * @see com.sun.star.io.AlreadyConnectedException + * @see com.sun.star.io.UnknownHostException + * @see com.sun.star.io.NoRouteToHostException + * @see com.sun.star.io.ConnectException + * @see com.sun.star.auth.AuthenticationException + * @see com.sun.star.mail.IllegalStateException + * @see com.sun.star.mail.MailException + * @throws com::sun::star::lang::IllegalArgumentException if the provided connection context contains invalid values or misses required connection parameters. + * @throws com::sun::star::io::AlreadyConnectedException on a try to connect to an already connect mail server. + * @throws com::sun::star::io::UnknownHostException usually if the IP address of the mail server could not be determined. Possible causes are a broken netwo + * @throws com::sun::star::io::NoRouteToHostException if an error occurred to connect to the remote mail server. Typically the remote mail server cannot be + * @throws com::sun::star::io::ConnectException if an error occurred while attempting to connect to the remote mail server. Typically the connection was ref + * @throws com::sun::star::auth::AuthenticationException if the specified user could not be logged in. + * @throws com::sun::star::mail::MailException for other errors during login. + */ + connect(xConnectionContext: uno.XCurrentContext, xAuthenticator: XAuthenticator): void; + + /** + * Return the context of the current connection. The context contains information like the server name, port, connection type etc. + * + * + * + * **Precondition**: `isConnected` returns true. + * @returns the current connection context. + * @see com.sun.star.mail.connectUser + * @see com.sun.star.io.NotConnectedException + * @throws com::sun::star::io::NotConnectedException if no connection is currently established. + */ + readonly CurrentConnectionContext: uno.XCurrentContext; + + /** + * Disconnect from a mail service. + * @throws com::sun::star::mail::MailException if errors occur during disconnecting. + */ + disconnect(): void; + + /** + * Return the context of the current connection. The context contains information like the server name, port, connection type etc. + * + * + * + * **Precondition**: `isConnected` returns true. + * @returns the current connection context. + * @see com.sun.star.mail.connectUser + * @see com.sun.star.io.NotConnectedException + * @throws com::sun::star::io::NotConnectedException if no connection is currently established. + */ + getCurrentConnectionContext(): uno.XCurrentContext; + + /** + * Returns all connection types which are supported to connect to the mail service. At least support insecure connections must be supported. Currently + * defined connection types are (the values should be handled case insensitive): "Insecure" - insecure connections "SSL" - Secure Socket Layer 2.0/3.0 + * based connection + * @returns a sequence of supported connection types. + */ + getSupportedConnectionTypes(): SafeArray; + + /** + * Returns whether a connection to a mail service currently exist or not. + * @returns `TRUE` if a connection to a mail service is established. + */ + isConnected(): boolean; + + /** + * Unregister a connection listener. + * @param xListener [in] a listener that no longer need to be informed about connection events. + * @see com.sun.star.mail.XConnectionListener + */ + removeConnectionListener(xListener: XConnectionListener): void; + + /** + * Returns all connection types which are supported to connect to the mail service. At least support insecure connections must be supported. Currently + * defined connection types are (the values should be handled case insensitive): "Insecure" - insecure connections "SSL" - Secure Socket Layer 2.0/3.0 + * based connection + * @returns a sequence of supported connection types. + */ + readonly SupportedConnectionTypes: SafeArray; + } + + /** + * A factory for creating different mail services. + * @since OOo 2.0 + */ + interface XMailServiceProvider extends uno.XInterface { + /** + * A factory method. + * @param aType [in] the type of the requested mail service. + * @returns A {@link XMailService} interface. + * @see com.sun.star.mail.XMailServiceProvider + * @see com.sun.star.mail.MailServiceType + */ + create(aType: MailServiceType): XMailService; + } + + /** + * Represents a SMTP service abstraction. + * @see com.sun.star.mail.XMailService + * @see com.sun.star.mail.XMailMessage + * @since OOo 2.0 + */ + interface XSmtpService extends XMailService { + /** + * Send a mail message to its recipients. + * @param xMailMessage [in] the mail message to be sent. + * @see com.sun.star.mail.XMailMessage + * @see com.sun.star.io.NotConnectedException + * @see com.sun.star.mail.SendMailMessageFailedException + * @see com.sun.star.mail.MailException + * @see com.sun.star.datatransfer.UnsupportedFlavorException + * @throws com::sun::star::io::NotConnectedException if no user is currently connected to the mail server. + * @throws com::sun::star::mail::SendMailMessageFailedException if the message could not be sent because of invalid recipient addresses. The e-mail addresse + * @throws com::sun::star::mail::MailException is thrown on other errors that may happen during sending. A possible reason may be for instance that a file a + * @throws com::sun::star::datatransfer::UnsupportedFlavorException is thrown when the body of the mail message is provided in an unsupported mime content t + */ + sendMailMessage(xMailMessage: XMailMessage): void; + } + } + + namespace media { + /** a {@link com.sun.star.media.XPlayer} factory. This helps creating new players. */ + type Manager = XManager; + + const enum ZoomLevel { + /** specifies that the video should be zoomed to window size */ + FIT_TO_WINDOW = 2, + /** specifies that the video should be zoomed to window size with using a fixed aspect ratio */ + FIT_TO_WINDOW_FIXED_ASPECT = 3, + /** specifies that the video should be displayed in fullscreen mode, if available */ + FULLSCREEN = 4, + /** specifies that the video window itself is not available at all, e.g. in cases of pure audio playback */ + NOT_AVAILABLE = 0, + /** specifies that the video should be displayed with its original size */ + ORIGINAL = 1, + /** specifies that the video should be zoomed to a factor of 1:2 */ + ZOOM_1_TO_2 = 6, + /** specifies that the video should be zoomed to a factor of 1:4 */ + ZOOM_1_TO_4 = 5, + /** specifies that the video should be zoomed to a factor of 2:1 */ + ZOOM_2_TO_1 = 7, + /** specifies that the video should be zoomed to a factor of 4:1 */ + ZOOM_4_TO_1 = 8, + } + + /** This interface provides an easy access to a stream images using their position in the time. */ + interface XFrameGrabber { + /** + * returns the image of the underlying stream at a given position + * @param fMediaTime the time in seconds of the image to get. This time has to be a positive value inferior to the stream duration. + */ + grabFrame(fMediaTime: number): graphic.XGraphic; + } + + /** the {@link com.sun.star.media.XPlayer} factory interface */ + interface XManager { + /** + * creates a new media player + * @param aURL the URL of the media to play + */ + createPlayer(aURL: string): XPlayer; + } + + /** is the multimedia stream handling interface. This allows to perform every basic operation on videos and sounds. */ + interface XPlayer { + /** gets a frame grabber for this stream. */ + createFrameGrabber(): XFrameGrabber; + + /** + * gets a new player window for this stream control + * @param aArguments arguments passed to the window during its creation. + */ + createPlayerWindow(aArguments: LibreOffice.SeqEquiv): XPlayerWindow; + + /** + * gets the stream length + * @returns the stream length in second + */ + readonly Duration: number; + + /** + * gets the stream length + * @returns the stream length in second + */ + getDuration(): number; + + /** + * gets the current position of the cursor in the stream + * @returns the cursor position in seconds + */ + getMediaTime(): number; + + /** + * gets the preferred window size + * @returns the {@link com.sun.star.awt.Size} + */ + getPreferredPlayerWindowSize(): awt.Size; + + /** + * gets the current audio volume in decibel + * @returns the volume in decibel + */ + getVolumeDB(): number; + + /** + * gets whether the volume is temporarily down to `0` or not. + * @returns `TRUE` if the volume is temporarily set to `0` , `FALSE` otherwise. + */ + isMute(): boolean; + + /** + * indicates whether the stream reading will restart after the end of the stream. + * @returns `TRUE` if the stream will loop, `FALSE` otherwise. + */ + isPlaybackLoop(): boolean; + + /** + * indicates whether the stream is played or not. + * @returns `TRUE` if the stream is played, `FALSE` otherwise + */ + isPlaying(): boolean; + + /** + * gets the current position of the cursor in the stream + * @returns the cursor position in seconds + */ + MediaTime: number; + + /** + * gets the preferred window size + * @returns the {@link com.sun.star.awt.Size} + */ + readonly PreferredPlayerWindowSize: awt.Size; + + /** + * sets the new cursor position in the media stream. After using this method the stream is stopped. + * @param fTime the new position to set in seconds + */ + setMediaTime(fTime: number): void; + + /** + * sets the volume to `0` or to its previous value. + * @param bSet sets the volume to `0` if `TRUE` , and switch to the previous non-null value if `FALSE` + */ + setMute(bSet: boolean): void; + + /** + * sets whether the stream reading should restart at the stream start after the end of the stream. + * @param bSet loops if set to `TRUE` , otherwise stops at the end of the stream. + */ + setPlaybackLoop(bSet: boolean): void; + + /** + * sets the audio volume in decibel. + * @param nDB the new volume in Decibel + */ + setVolumeDB(nDB: number): void; + + /** starts reading the stream from the current position. */ + start(): void; + + /** stops reading the stream and leave the cursor at its current position. */ + stop(): void; + + /** + * gets the current audio volume in decibel + * @returns the volume in decibel + */ + VolumeDB: number; + } + + /** interacts with the media player window */ + interface XPlayerWindow extends awt.XWindow { + /** gets the current media ratio. */ + getZoomLevel(): ZoomLevel; + + /** + * changes the pointer for the player window. + * @param SystemPointerType a {@link com.sun.star.awt.SystemPointer} + */ + setPointerType(SystemPointerType: number): void; + + /** changes the zoom of the media played by the window. */ + setZoomLevel(ZoomLevel: ZoomLevel): boolean; + + /** redraws the player window */ + update(): void; + + /** gets the current media ratio. */ + ZoomLevel: ZoomLevel; + } + } + + namespace mozilla { + /** Allows to execute dispatch for a menu item and handles listeners for changes in menu items. */ + type MenuProxy = XMenuProxy; + + /** Listens for changes in menu items. */ + type MenuProxyListener = XMenuProxyListener; + + /** + * Allow to discover Mozilla/Thunderbird profiles Allow init Mozilla XPCOM using selected profile and switch profiles. + * @see XMozillaBootstrap + */ + type MozillaBootstrap = XMozillaBootstrap; + + /** Mozilla Product Types */ + const enum MozillaProductType { + /** Any product */ + Default = 0, + /** Mozilla's next generation web browser. */ + Firefox = 2, + /** Mozilla browse and mail suite */ + Mozilla = 1, + /** Mozilla's next generation e-mail client. */ + Thunderbird = 3, + } + + /** Explains properties of a menu item */ + interface MenuMultipleChange { + /** unique ID of the group this menu item belongs to */ + GroupID: number; + + /** unique ID of this menu item */ + ID: number; + + /** sequence of bytes representing a possible image */ + Image: SafeArray; + + /** true if active, so clickable */ + IsActive: boolean; + + /** true if checkable, so there can be a checkmark */ + IsCheckable: boolean; + + /** true if there is a checkmark */ + IsChecked: boolean; + + /** true if visible */ + IsVisible: boolean; + + /** text of the menu item */ + ItemText: string; + + /** unique ID of the item directly above this menu item, used for fuzzy placement */ + PreItemID: number; + } + + /** Explains a change for a menu item */ + interface MenuSingleChange { + /** value of change */ + Change: any; + + /** ID identifying the type of change in the any type change */ + ChangeID: number; + + /** unique ID of this menu item */ + ID: number; + } + + /** Listener for closing of the corresponding session. */ + interface XCloseSessionListener extends uno.XInterface { + /** + * Notifies a closesession listener that the corresponding session was logged out + * @param sessionData [in]: the data identifying the session that was closed + */ + sessionClosed(sessionData: any): void; + } + + /** + * is the interface to run Mozilla XPCOM code to run Mozilla XPCOM code in OOo,you should first implement this interface, then pass this object to + * xProxyRunner->Run + * @see XProxyRunner + * @see XMozillaBootstrap + */ + interface XCodeProxy extends uno.XInterface { + /** which Mozilla product this code is write for */ + getProductType(): MozillaProductType; + + /** which Mozilla profile this code will use */ + getProfileName(): string; + + /** which Mozilla product this code is write for */ + readonly ProductType: MozillaProductType; + + /** which Mozilla profile this code will use */ + readonly ProfileName: string; + + /** all Mozilla XPCOM code must be called in {@link run()} or functions called by {@link run()} */ + run(): number; + } + + /** Allows to execute dispatch for a menu item and handles listeners for changes in menu items. */ + interface XMenuProxy extends lang.XComponent { + /** + * Registers an event listener, which will be called when the menu changes + * @param xListener [in]: the listener to be set + */ + addMenuProxyListener(xListener: XMenuProxyListener): void; + + /** + * Executes dispatch for the given menu id + * @param ID [in]: the menu item + */ + executeMenuItem(ID: number): void; + + /** + * Unregisters an event listener which was registered with {@link XMenuProxy.addMenuProxyListener()} . + * @param xListener [in]: the listener to be removed + */ + removeMenuProxyListener(xListener: XMenuProxyListener): void; + } + + /** Listens for changes in menu items. */ + interface XMenuProxyListener extends uno.XInterface { + /** is called, if the content or graphical representation/state of the menu changes completely, for one or more menu items */ + menuChangedMultiple(MenuMultipleChanges: LibreOffice.SeqEquiv): void; + + /** is called, if the content or graphical representation/state of the menu changes, by one property for one or more menu items */ + menuChangedSingle(MenuSingleChanges: LibreOffice.SeqEquiv): void; + + /** + * is called, if one menu item designated by the ID, is deleted. + * @param ID [in]: the menu item + */ + menuItemDeleted(ID: number): void; + } + + /** + * @see com.sun.star.mozilla.XProfileDiscover + * @see com.sun.star.mozilla.XProfileManager + * @see com.sun.star.mozilla.XProxyRunner + * @see com.sun.star.mozilla.MozillaBootstrap + */ + interface XMozillaBootstrap extends XProfileDiscover, XProfileManager, XProxyRunner { } + + /** + * is the interface used to list and get information for Mozilla/Thunderbird profiles + * @see com.sun.star.mozilla.XProfileManager + * @see com.sun.star.mozilla.MozillaBootstrap + */ + interface XProfileDiscover extends uno.XInterface { + /** + * attempts to get the default profile name for the given product. + * @param product is the product name to get default profile.Currently support "Mozilla" and "Thunderbird". + * @returns the default profile name for the given product. + */ + getDefaultProfile(product: MozillaProductType): string; + + /** + * attempts to get the profiles count. + * @param product is the product name to get profiles count.Currently support "Mozilla" and "Thunderbird". + * @returns the profiles count of selected product. + */ + getProfileCount(product: MozillaProductType): number; + + /** + * return true if the given profile exists + * @param product is the product name to get profile path.Currently support "Mozilla" and "Thunderbird". + * @param profileName the profile name to check. + * @returns whether given profile exists + */ + getProfileExists(product: MozillaProductType, profileName: string): boolean; + + /** + * attempts to get the profile list for the given product. + * @param product is the product name to get profile list.Currently support "Mozilla" and "Thunderbird". + * @param list is a list of all profile of the given product. + * @returns the profile count for the given product. + */ + getProfileList(product: MozillaProductType, list: [LibreOffice.SeqEquiv]): number; + + /** + * attempts to get the full path for the given profile. + * @param product is the product name to get profile path.Currently support "Mozilla" and "Thunderbird". + * @param profileName the profile name to get full path. + * @returns the full path of the given profile. + */ + getProfilePath(product: MozillaProductType, profileName: string): string; + + /** + * attempts to get whether profile is locked by other applications. + * @param product is the product name to get profile path.Currently support "Mozilla" and "Thunderbird". + * @param profileName the profile name to check. + * @returns true is the given profile is locked. + */ + isProfileLocked(product: MozillaProductType, profileName: string): boolean; + } + + /** + * is the interface to boot up and switch Mozilla/Thunderbird profiles + * @see com.sun.star.mozilla.MozillaProductType + * @see com.sun.star.mozilla.XProfileDiscover + * @see com.sun.star.mozilla.MozillaBootstrap + */ + interface XProfileManager extends uno.XInterface { + /** + * attempts to init XPCOM runtime using given profile. + * @param product is the product to start up. + * @param profileName the profile name to be used. + * @returns the current reference count for the given profile. + */ + bootupProfile(product: MozillaProductType, profileName: string): number; + + /** + * attempts to get the current product. + * @returns the current used product. + */ + readonly CurrentProduct: MozillaProductType; + + /** + * attempts to get the current profile name. + * @returns the current used profile. + */ + readonly CurrentProfile: string; + + /** + * attempts to get the current product. + * @returns the current used product. + */ + getCurrentProduct(): MozillaProductType; + + /** + * attempts to get the current profile name. + * @returns the current used profile. + */ + getCurrentProfile(): string; + + /** + * attempts to check whether the current profile locked or not + * @returns return sal_True is current profile is locked + */ + isCurrentProfileLocked(): boolean; + + /** + * attempts to set the current used profile name for the given product. + * @param product is the product to be used. + * @param profileName the profile name to be used. + * @returns the current used profile name for the given product. + */ + setCurrentProfile(product: MozillaProductType, profileName: string): string; + + /** + * attempts to shutdown the current profile. + * @returns the current reference count for the current profile. + */ + shutdownProfile(): number; + } + + /** + * is the interface run Mozilla XPCOM code in a managed environment + * @see com.sun.star.mozilla.XProfileDiscover + * @see com.sun.star.mozilla.MozillaBootstrap + */ + interface XProxyRunner extends uno.XInterface { + /** + * attempts to Run XPCOM code in a managed environment + * @param aCode is a com:sun:star:mozilla: {@link XCodeProxy} object to be run. + * @returns the error code, is 0 when no error happened. + */ + Run(aCode: XCodeProxy): number; + } + } + + namespace office { + /** @since LibreOffice 4.2 */ + interface Quickstart extends beans.XFastPropertySet { + /** The first two parameters are ignored */ + createAndSetVeto(p1: boolean, p2: boolean, DisableVeto: boolean): void; + createAutoStart(bQuickstart: boolean, bAutostart: boolean): void; + createDefault(): void; + createStart(bQuickstart: boolean): void; + } + + /** This interface gives access to an annotation inside a document. */ + interface XAnnotation extends beans.XPropertySet, lang.XComponent { + /** a reference to the document content this annotation is anchored to. */ + Anchor: any; + + /** stores the full name of the author who created this annotation. */ + Author: string; + + /** stores the date and time this annotation was last edited. */ + DateTime: util.DateTime; + + /** stores the initials of the author who created this annotation. */ + Initials: string; + + /** + * this is an optional position that gives the user interface a hint where the annotation should be rendered. This could be an offset to the annotations + * anchor. + */ + Position: geometry.RealPoint2D; + + /** this is an optional size that gives the user interface a hint how large the annotation should be rendered. */ + Size: geometry.RealSize2D; + + /** gives access to the annotations text. */ + TextRange: text.XText; + } + + /** This interface gives access to the annotation for a document content. */ + interface XAnnotationAccess { + /** creates a new annotation and inserts it into the document content. */ + createAndInsertAnnotation(): XAnnotation; + + /** @returns a new enumeration object for this annotation container. It returns NULL if there are no objects in this container. */ + createAnnotationEnumeration(): XAnnotationEnumeration; + + /** removes the annotation from this document content. */ + removeAnnotation(annotation: XAnnotation): void; + } + + /** An enumeration for a set of annotations. */ + interface XAnnotationEnumeration { + /** tests whether this enumeration contains more elements. */ + hasMoreElements(): boolean; + + /** + * @returns the next element of this enumeration. + * @throws NoSuchElementException if no more elements exist. + */ + nextElement(): XAnnotation; + } + } + + namespace packages { + /** This exception can be thrown in case object is encrypted when it is not allowed */ + type EncryptionNotAllowedException = uno.Exception; + + /** This exception can be thrown in case object is not encrypted one as expected. */ + type NoEncryptionException = uno.Exception; + + /** This exception can be thrown in case provided stream is not a raw stream representing encrypted package stream. */ + type NoRawFormatException = io.IOException; + + /** + * This service provides an iterator over the contents of a given instance of a {@link PackageFolder} . This provides a "snapshot" of the contents of the + * {@link PackageFolder} at the time of construction. It is the responsibility of the caller to ensure that any given member of the enumeration refers to + * a valid {@link PackageStream} or {@link PackageFolder} . + */ + type PackageFolderEnumeration = container.XEnumeration; + + /** This exception can be thrown in case wrong password was provided. */ + type WrongPasswordException = uno.Exception; + + /** + * The {@link Package} is a service that provides access to a set of files and folders contained within a {@link Package} . One instance of the {@link + * Package} service exists for each {@link Package} file to be manipulated. + * + * Each instance is created with an argument which specifies the URL of the {@link Package} file to which the user requires access. If the instance is + * created without arguments, it must be initialized with the {@link com.sun.star.lang.XInitialization} service methods before it is a valid instance of + * the service. + */ + interface Package extends lang.XInitialization, container.XHierarchicalNameAccess, lang.XSingleServiceFactory, util.XChangesBatch { } + + /** + * The {@link PackageFolder} service represents a single folder or directory within a {@link Package} . Instances of this service can only be constructed + * by an implementation of the {@link Package} service and not via the service manager. + */ + interface PackageFolder extends container.XNamed, container.XChild, container.XNameContainer, container.XEnumerationAccess, beans.XPropertySet { } + + /** + * This service represents a stream contained within a {@link Package} . Instances of this class can only be constructed by the implementation of the + * {@link Package} service. + */ + interface PackageStream extends container.XNamed, container.XChild, io.XActiveDataSink, beans.XPropertySet { } + + /** Allows to get access to the stream of a {@link PackageStream} . */ + interface XDataSinkEncrSupport extends uno.XInterface { + /** + * Allows to get access to the data of the {@link PackageStream} . + * + * In case stream is encrypted one and the key for the stream is not set, an exception must be thrown. + * @returns the stream + * @throws com::sun::star::packages::WrongPasswordException no key or a wrong one is set + * @throws com::sun::star::io::IOException in case of io problems during retrieving + */ + DataStream: io.XInputStream; + + /** + * Allows to get access to the data of the {@link PackageStream} . + * + * In case stream is encrypted one and the key for the stream is not set, an exception must be thrown. + * @returns the stream + * @throws com::sun::star::packages::WrongPasswordException no key or a wrong one is set + * @throws com::sun::star::io::IOException in case of io problems during retrieving + */ + getDataStream(): io.XInputStream; + + /** + * Allows to get access to the raw data of the stream as it is stored in the package. + * @returns the plain raw stream as it is stored in the package + * @throws com::sun::star::packages::NoEncryptionException the {@link PackageStream} object is not encrypted + * @throws com::sun::star::io::IOException in case of io problems during retrieving + */ + getPlainRawStream(): io.XInputStream; + + /** + * Allows to get access to the data of the {@link PackageStream} as to raw stream. In case stream is not encrypted an exception will be thrown. + * + * The difference of raw stream is that it contains header for encrypted data, so an encrypted stream can be copied from one {@link PackageStream} to + * another one without decryption. + * @returns the raw representation of stream + * @throws com::sun::star::packages::NoEncryptionException the {@link PackageStream} object is not encrypted + * @throws com::sun::star::io::IOException in case of io problems during retrieving + */ + getRawStream(): io.XInputStream; + + /** + * Allows to get access to the raw data of the stream as it is stored in the package. + * @returns the plain raw stream as it is stored in the package + * @throws com::sun::star::packages::NoEncryptionException the {@link PackageStream} object is not encrypted + * @throws com::sun::star::io::IOException in case of io problems during retrieving + */ + readonly PlainRawStream: io.XInputStream; + + /** + * Allows to get access to the data of the {@link PackageStream} as to raw stream. In case stream is not encrypted an exception will be thrown. + * + * The difference of raw stream is that it contains header for encrypted data, so an encrypted stream can be copied from one {@link PackageStream} to + * another one without decryption. + * @returns the raw representation of stream + * @throws com::sun::star::packages::NoEncryptionException the {@link PackageStream} object is not encrypted + * @throws com::sun::star::io::IOException in case of io problems during retrieving + */ + RawStream: io.XInputStream; + + /** + * Allows to set a data stream for the {@link PackageStream} . + * + * In case {@link PackageStream} is marked as encrypted the data stream will be encrypted on storing. + * @param aStream new data stream + * @throws com::sun::star::io::IOException in case of io problems + */ + setDataStream(aStream: io.XInputStream): void; + + /** + * Allows to set raw stream for the {@link PackageStream} . The {@link PackageStream} object can not be marked as encrypted one, an exception will be + * thrown in such case. + * @param aStream the new raw representation of stream + * @throws com::sun::star::packages::EncryptionNotAllowedException the {@link PackageStream} object is marked as encrypted + * @throws com::sun::star::packages::NoRawFormatException the stream is not a correct raw representation of encrypted package stream + * @throws com::sun::star::io::IOException in case of io problems during retrieving + */ + setRawStream(aStream: io.XInputStream): void; + } + + namespace manifest { + type ManifestReader = XManifestReader; + + type ManifestWriter = XManifestWriter; + + /** + * This interface reads the manifest data from a file. The user must supply an XInputStream when calling {@link readManifestSequence()} to receive a + * sequence of manifest entries. Each manifest entry is represented by a sequence of PropertyValues. + */ + interface XManifestReader extends uno.XInterface { + /** Supplies the {@link XManifestReader} with an XInputStream to read from, reads the data and returns it to the caller. */ + readManifestSequence(rStream: io.XInputStream): SafeArray>; + } + + /** + * This interface writes the manifest data to a file. The user calls {@link writeManifestSequence()} with the XOutputStream to write the data to and the + * sequence of manifest entries to be written passed as parameters. Each manifest entry is represented by a sequence of PropertyValues. + */ + interface XManifestWriter extends uno.XInterface { + /** Writes the supplied sequence of manifest entries to the supplied XOutputStream */ + writeManifestSequence(rStream: io.XOutputStream, rSequence: LibreOffice.SeqEquiv>): void; + } + } + + namespace zip { + /** + * used to indicate that a ZIP exception has occurred. + * + * This interface is an IDL version of the Java interface **java.util.zip.ZipException** with some minor adaptations. + */ + type ZipException = uno.Exception; + + /** + * used to indicate that a ZIP exception has occurred. Usually can be thrown from XInputStream interface implementations. + * + * This interface is an IDL version of the Java interface **java.util.zip.ZipException** with some minor adaptations. + * @since OOo 1.1.2 + */ + type ZipIOException = io.IOException; + + /** allows to get reading access to non-encrypted entries inside zip file. */ + interface XZipFileAccess extends uno.XInterface { + /** + * allows to get stream by specifying a pattern. + * + * The first stream with a name that fits to the pattern will be returned. The pattern allows to use "*" wildcard symbol. If the name contains "*" or "\" + * symbols itself they must guarded with backslash "\". The slashes have no special meaning here so they can be replaced by wildcards also. + */ + getStreamByPattern(aPattern: string): io.XInputStream; + } + + /** + * Merged interface for {@link ZipFileAccess} service. + * @since LibreOffice 4.1 + */ + interface XZipFileAccess2 extends XZipFileAccess, container.XNameAccess { } + + /** + * used to represent a ZIP file entry + * + * This interface is an IDL version of the Java interface **java.util.zip.ZipFile** with some minor adaptations. + */ + interface ZipEntry { + /** optional extra field data for entry */ + extra: SafeArray; + + /** uncompressed size of entry data */ + nCompressedSize: number; + + /** CRC-32 of entry data */ + nCrc: number; + + /** The number of the disk this entry is saved on */ + nDiskNumber: number; + + /** bit flags */ + nFlag: number; + + /** compression method */ + nMethod: number; + + /** offset of LOC header */ + nOffset: number; + + /** uncompressed size of entry data */ + nSize: number; + + /** modification time */ + nTime: number; + + /** version needed to extract */ + nVersion: number; + + /** optional comment */ + sComment: string; + + /** the entry name */ + sName: string; + } + + /** allows to get reading access to non-encrypted entries inside zip file. */ + interface ZipFileAccess extends XZipFileAccess2 { + createWithURL(URL: string): void; + } + + namespace ZipConstants { + const enum Constants { + BEST_COMPRESSION = 9, + BEST_SPEED = 1, + CENATT = 36, + CENATX = 38, + CENCOM = 32, + CENCRC = 16, + CENDAT = 14, + CENDSK = 34, + CENEXT = 30, + CENFLG = 8, + CENHDR = 46, + CENHOW = 10, + CENLEN = 24, + CENNAM = 28, + CENOFF = 42, + CENSIG = 33639248, + CENSIZ = 20, + CENTIM = 12, + CENVEM = 4, + CENVER = 6, + DEF_MEM_LEVEL = 8, + DEFAULT_COMPRESSION = -1, + DEFAULT_STRATEGY = 0, + DEFLATED = 8, + ENDCOM = 20, + ENDHDR = 22, + ENDOFF = 16, + ENDSIG = 101010256, + ENDSIZ = 12, + ENDSUB = 8, + ENDTOT = 10, + EXTCRC = 4, + EXTHDR = 16, + EXTLEN = 12, + EXTSIG = 134695760, + EXTSIZ = 8, + FILTERED = 1, + HUFFMAN_ONLY = 2, + LOCCRC = 14, + LOCEXT = 28, + LOCFLG = 6, + LOCHDR = 30, + LOCHOW = 8, + LOCLEN = 22, + LOCNAM = 26, + LOCSIG = 67324752, + LOCSIZ = 18, + LOCTIM = 10, + LOCVER = 4, + NO_COMPRESSION = 0, + SPANSIG = 134695760, + STORED = 0, + } + } + } + } + + namespace presentation { + /** + * This component integrates a view to a handout page inside a presentation document into the desktop. + * @since OOo 1.1.2 + */ + type HandoutView = drawing.DrawingDocumentDrawView; + + /** + * This component integrates a view to a handout page inside a presentation document into the desktop. + * @since OOo 1.1.2 + */ + type NotesView = drawing.DrawingDocumentDrawView; + + type SlideShow = XSlideShow; + + type TransitionFactory = XTransitionFactory; + + /** specifies the animation effects for animating text or objects. */ + const enum AnimationEffect { + /** use the animation effect "Appear". */ + APPEAR = 48, + /** + * use the animation effect "Clockwise". + * + * use the fade effect "Clockwise". + */ + CLOCKWISE = 13, + /** + * use the animation effect "Close Horizontal". + * + * use the fade effect "Close Horizontal". + */ + CLOSE_HORIZONTAL = 20, + /** + * use the animation effect "Close Vertical". + * + * use the fade effect "Close Vertical". + */ + CLOSE_VERTICAL = 19, + /** + * use the animation effect "Counter Clockwise". + * + * use the fade effect "Counter Clockwise". + */ + COUNTERCLOCKWISE = 14, + /** + * use the animation effect "Spiral Inward Left". + * + * use the fade effect "Dissolve". + */ + DISSOLVE = 32, + /** + * use the animation effect "Fade from Bottom". + * + * use the fade effect "Fade from Bottom". + */ + FADE_FROM_BOTTOM = 4, + /** + * use the animation effect "Fade from Center". + * + * use the fade effect "Fade from Center". + */ + FADE_FROM_CENTER = 6, + /** + * use the animation effect "Fade from Left". + * + * use the fade effect "Fade from Left". + */ + FADE_FROM_LEFT = 1, + /** + * use the animation effect "Fade from Lower Left". + * + * use the fade effect "Fade from Lower Left". + */ + FADE_FROM_LOWERLEFT = 17, + /** + * use the animation effect "Fade from Lower Right". + * + * use the fade effect "Fade from Lower Right". + */ + FADE_FROM_LOWERRIGHT = 18, + /** + * use the animation effect "Fade from Right". + * + * use the fade effect "Fade from Right". + */ + FADE_FROM_RIGHT = 3, + /** + * use the animation effect "Fade from Top". + * + * use the fade effect "Fade from Top". + */ + FADE_FROM_TOP = 2, + /** + * use the animation effect "Fade from Upper Left". + * + * use the fade effect "Fade from Upper Left". + */ + FADE_FROM_UPPERLEFT = 15, + /** + * use the animation effect "Fade from Upper Right". + * + * use the fade effect "Fade from Upper Right". + */ + FADE_FROM_UPPERRIGHT = 16, + /** + * use the animation effect "Fade to Center". + * + * use the fade effect "Fade to Center". + */ + FADE_TO_CENTER = 5, + /** use the animation effect "Hide". */ + HIDE = 49, + /** + * use the animation effect "Horizontal Checkerboard". + * + * use the fade effect "Horizontal Checkerboard". + */ + HORIZONTAL_CHECKERBOARD = 75, + /** + * use the animation effect "Horizontal Lines". + * + * use the fade effect "Horizontal Lines". + */ + HORIZONTAL_LINES = 39, + /** use the animation effect "Horizontal Rotate". */ + HORIZONTAL_ROTATE = 76, + /** use the animation effect "Horizontal Stretch". */ + HORIZONTAL_STRETCH = 78, + /** + * use the animation effect "Horizontal Stripes". + * + * use the fade effect "Horizontal Stripes". + */ + HORIZONTAL_STRIPES = 12, + /** use the animation effect "Laser from Bottom". */ + LASER_FROM_BOTTOM = 43, + /** use the animation effect "Wavy Line from Left". */ + LASER_FROM_LEFT = 40, + /** use the animation effect "Laser from Lower Left". */ + LASER_FROM_LOWERLEFT = 46, + /** use the animation effect "Laser from Lower Right". */ + LASER_FROM_LOWERRIGHT = 47, + /** use the animation effect "Laser from Right". */ + LASER_FROM_RIGHT = 42, + /** use the animation effect "Laser from Top". */ + LASER_FROM_TOP = 41, + /** use the animation effect "Laser from Upper Left". */ + LASER_FROM_UPPERLEFT = 44, + /** use the animation effect "Laser from Upper Right". */ + LASER_FROM_UPPERRIGHT = 45, + /** + * use the animation effect "Move from Bottom". + * + * use the fade effect "Move from Bottom". + */ + MOVE_FROM_BOTTOM = 10, + /** + * use the animation effect "Move from Left". + * + * use the fade effect "Move from Left". + */ + MOVE_FROM_LEFT = 7, + /** + * use the animation effect "Move from Lower Left". + * + * use the fade effect "Move from Lower Left". + */ + MOVE_FROM_LOWERLEFT = 53, + /** + * use the animation effect "Move from Lower Right". + * + * use the fade effect "Move from Lower Right". + */ + MOVE_FROM_LOWERRIGHT = 52, + /** + * use the animation effect "Move from Right". + * + * use the fade effect "Move from Right". + */ + MOVE_FROM_RIGHT = 9, + /** + * use the animation effect "Move from Top". + * + * use the fade effect "Move from Top". + */ + MOVE_FROM_TOP = 8, + /** + * use the animation effect "Move from Upper Left". + * + * use the fade effect "Move from Upper Left". + */ + MOVE_FROM_UPPERLEFT = 50, + /** + * use the animation effect "Move from Upper Right". + * + * use the fade effect "Move from Upper Right". + */ + MOVE_FROM_UPPERRIGHT = 51, + /** use the animation effect "Move Short from Bottom". */ + MOVE_SHORT_FROM_BOTTOM = 64, + /** use the animation effect "Move Short from Left". */ + MOVE_SHORT_FROM_LEFT = 58, + /** use the animation effect "Move Short from Lower Left". */ + MOVE_SHORT_FROM_LOWERLEFT = 65, + /** use the animation effect "Move Short from Lower Right". */ + MOVE_SHORT_FROM_LOWERRIGHT = 63, + /** use the animation effect "Move Short from Right". */ + MOVE_SHORT_FROM_RIGHT = 62, + /** use the animation effect "Move Short from Top". */ + MOVE_SHORT_FROM_TOP = 60, + /** use the animation effect "Move Short from Upper Left". */ + MOVE_SHORT_FROM_UPPERLEFT = 59, + /** use the animation effect "Move Short from Upper Right". */ + MOVE_SHORT_FROM_UPPERRIGHT = 61, + /** use the animation effect "Move Short to Bottom". */ + MOVE_SHORT_TO_BOTTOM = 72, + /** use the animation effect "Move Short to Left". */ + MOVE_SHORT_TO_LEFT = 66, + /** use the animation effect "Move Short to Lower Left". */ + MOVE_SHORT_TO_LOWERLEFT = 73, + /** use the animation effect "Move Short to Lower Right". */ + MOVE_SHORT_TO_LOWERRIGHT = 71, + /** use the animation effect "Move Short to Right". */ + MOVE_SHORT_TO_RIGHT = 70, + /** use the animation effect "Move Short to Top". */ + MOVE_SHORT_TO_TOP = 68, + /** use the animation effect "Move Short to Upper Left". */ + MOVE_SHORT_TO_UPPERLEFT = 67, + /** use the animation effect "Move Short to Upper Right". */ + MOVE_SHORT_TO_UPPERRIGHT = 69, + /** use the animation effect "Move to Bottom". */ + MOVE_TO_BOTTOM = 27, + /** use the animation effect "Move to Left". */ + MOVE_TO_LEFT = 24, + /** use the animation effect "Move to Lower Left". */ + MOVE_TO_LOWERLEFT = 57, + /** use the animation effect "Move to Lower Right". */ + MOVE_TO_LOWERRIGHT = 56, + /** use the animation effect "Move to Right". */ + MOVE_TO_RIGHT = 26, + /** use the animation effect "Move to Top". */ + MOVE_TO_TOP = 25, + /** use the animation effect "Move to Upper Left". */ + MOVE_TO_UPPERLEFT = 54, + /** use the animation effect "Move to Upper Right". */ + MOVE_TO_UPPERRIGHT = 55, + /** + * use no animation effects. + * + * No action is performed on click. + * + * use no fade effects. + */ + NONE = 0, + /** + * use the animation effect "Open Horizontal". + * + * use the fade effect "Open Horizontal". + */ + OPEN_HORIZONTAL = 22, + /** + * use the animation effect "Open Vertical". + * + * use the fade effect "Open Vertical". + */ + OPEN_VERTICAL = 21, + /** use the animation effect "Path". */ + PATH = 23, + /** + * use the animation effect "Random". + * + * use the fade effect "Random". + */ + RANDOM = 37, + /** + * use the animation effect "Spiral Inward Left". + * + * use the fade effect "Spiral Inward Left". + */ + SPIRALIN_LEFT = 28, + /** + * use the animation effect "Spiral Inward Right". + * + * use the fade effect "Spiral Inward Right". + */ + SPIRALIN_RIGHT = 29, + /** + * use the animation effect "Spiral Outward Left". + * + * use the fade effect "Spiral Outward Left". + */ + SPIRALOUT_LEFT = 30, + /** + * use the animation effect "Spiral Outward Right". + * + * use the fade effect "Spiral Outward Right". + */ + SPIRALOUT_RIGHT = 31, + /** + * use the animation effect "Stretch From Bottom". + * + * use the fade effect "Stretch from Bottom". + */ + STRETCH_FROM_BOTTOM = 86, + /** + * use the animation effect "Stretch From Left". + * + * use the fade effect "Stretch from Left". + */ + STRETCH_FROM_LEFT = 80, + /** use the animation effect "Stretch From Lower Left". */ + STRETCH_FROM_LOWERLEFT = 87, + /** use the animation effect "Stretch From Lower Right". */ + STRETCH_FROM_LOWERRIGHT = 85, + /** + * use the animation effect "Stretch From Right". + * + * use the fade effect "Stretch from Right". + */ + STRETCH_FROM_RIGHT = 84, + /** + * use the animation effect "Stretch From Top". + * + * use the fade effect "Stretch from Top". + */ + STRETCH_FROM_TOP = 82, + /** use the animation effect "Stretch From Upper Left". */ + STRETCH_FROM_UPPERLEFT = 81, + /** use the animation effect "Stretch From Upper Right". */ + STRETCH_FROM_UPPERRIGHT = 83, + /** + * use the animation effect "Vertical Checkerboard". + * + * use the fade effect "Vertical Checkerboard". + */ + VERTICAL_CHECKERBOARD = 74, + /** + * use the animation effect "Vertical Lines". + * + * use the fade effect "Vertical Lines". + */ + VERTICAL_LINES = 38, + /** use the animation effect "Vertical Rotate". */ + VERTICAL_ROTATE = 77, + /** use the animation effect "Vertical Stretch". */ + VERTICAL_STRETCH = 79, + /** + * use the animation effect "Vertical Stripes". + * + * use the fade effect "Vertical Stripes". + */ + VERTICAL_STRIPES = 11, + /** + * use the animation effect "Wavy Line from Button". + * + * use the fade effect "Wavy Line from Bottom". + */ + WAVYLINE_FROM_BOTTOM = 36, + /** + * use the animation effect "Wavy Line from Left". + * + * use the fade effect "Wavy Line from Left". + */ + WAVYLINE_FROM_LEFT = 33, + /** + * use the animation effect "Wavy Line from Right". + * + * use the fade effect "Wavy Line from Right". + */ + WAVYLINE_FROM_RIGHT = 35, + /** + * use the animation effect "Wavy Line from Top". + * + * use the fade effect "Wavy Line from Top". + */ + WAVYLINE_FROM_TOP = 34, + /** use the animation effect "Zoom In". */ + ZOOM_IN = 88, + /** use the animation effect "Zoom In From Bottom". */ + ZOOM_IN_FROM_BOTTOM = 100, + /** use the animation effect "Zoom In From Center". */ + ZOOM_IN_FROM_CENTER = 102, + /** use the animation effect "Zoom In From Left". */ + ZOOM_IN_FROM_LEFT = 94, + /** use the animation effect "Zoom In From Lower Left". */ + ZOOM_IN_FROM_LOWERLEFT = 101, + /** use the animation effect "Zoom In From Lower Right". */ + ZOOM_IN_FROM_LOWERRIGHT = 99, + /** use the animation effect "Zoom In From Right". */ + ZOOM_IN_FROM_RIGHT = 98, + /** use the animation effect "Zoom In From Top". */ + ZOOM_IN_FROM_TOP = 96, + /** use the animation effect "Zoom In From Upper Left". */ + ZOOM_IN_FROM_UPPERLEFT = 95, + /** use the animation effect "Zoom In From Upper Right". */ + ZOOM_IN_FROM_UPPERRIGHT = 97, + /** use the animation effect "Zoom In Small". */ + ZOOM_IN_SMALL = 89, + /** use the animation effect "Zoom In Spiral". */ + ZOOM_IN_SPIRAL = 90, + /** use the animation effect "Zoom Out". */ + ZOOM_OUT = 91, + /** use the animation effect "Zoom Out From Bottom". */ + ZOOM_OUT_FROM_BOTTOM = 109, + /** use the animation effect "Zoom Out From Center". */ + ZOOM_OUT_FROM_CENTER = 111, + /** use the animation effect "Zoom Out From Left". */ + ZOOM_OUT_FROM_LEFT = 103, + /** use the animation effect "Zoom Out From Lower Left". */ + ZOOM_OUT_FROM_LOWERLEFT = 110, + /** use the animation effect "Zoom Out From Lower Right". */ + ZOOM_OUT_FROM_LOWERRIGHT = 108, + /** use the animation effect "Zoom Out From Right". */ + ZOOM_OUT_FROM_RIGHT = 107, + /** use the animation effect "Zoom Out From Top". */ + ZOOM_OUT_FROM_TOP = 105, + /** use the animation effect "Zoom Out From Upper Left". */ + ZOOM_OUT_FROM_UPPERLEFT = 104, + /** use the animation effect "Zoom Out From Upper Right". */ + ZOOM_OUT_FROM_UPPERRIGHT = 106, + /** use the animation effect "Zoom Out Small". */ + ZOOM_OUT_SMALL = 92, + /** use the animation effect "Zoom Out Spiral". */ + ZOOM_OUT_SPIRAL = 93, + } + + /** specifies the speed values of animation/fade effects. */ + const enum AnimationSpeed { + /** set the speed from the animation/fade to fast. */ + FAST = 2, + /** set the speed from the animation/fade to medium. */ + MEDIUM = 1, + /** set the speed from the animation/fade to slow. */ + SLOW = 0, + } + + /** This enumeration specifies the actions which can be processed when a user clicks on an object. */ + const enum ClickAction { + /** The presentation jumps to a bookmark. */ + BOOKMARK = 5, + /** The presentation jumps to another document. */ + DOCUMENT = 6, + /** The presentation continues with the first page. */ + FIRSTPAGE = 3, + /** The object renders itself invisible after a click. */ + INVISIBLE = 7, + /** The presentation continues with the last page. */ + LASTPAGE = 4, + /** A star basic macro is executed after the click. */ + MACRO = 12, + /** The presentation jumps to the next page. */ + NEXTPAGE = 2, + /** + * use no animation effects. + * + * No action is performed on click. + * + * use no fade effects. + */ + NONE = 0, + /** The presentation jumps to the previous page. */ + PREVPAGE = 1, + /** Another program is executed after a click. */ + PROGRAM = 11, + /** A sound is played after a click. */ + SOUND = 8, + /** The presentation is stopped after the click. */ + STOPPRESENTATION = 13, + /** The object vanishes with its effect. */ + VANISH = 10, + /** An OLE verb is performed on this object. */ + VERB = 9, + } + + /** specifies the fade effects to fade one page into another. */ + const enum FadeEffect { + /** + * use the animation effect "Clockwise". + * + * use the fade effect "Clockwise". + */ + CLOCKWISE = 17, + /** + * use the animation effect "Close Horizontal". + * + * use the fade effect "Close Horizontal". + */ + CLOSE_HORIZONTAL = 24, + /** + * use the animation effect "Close Vertical". + * + * use the fade effect "Close Vertical". + */ + CLOSE_VERTICAL = 23, + /** + * use the animation effect "Counter Clockwise". + * + * use the fade effect "Counter Clockwise". + */ + COUNTERCLOCKWISE = 18, + /** + * use the animation effect "Spiral Inward Left". + * + * use the fade effect "Dissolve". + */ + DISSOLVE = 31, + /** + * use the animation effect "Fade from Bottom". + * + * use the fade effect "Fade from Bottom". + */ + FADE_FROM_BOTTOM = 4, + /** + * use the animation effect "Fade from Center". + * + * use the fade effect "Fade from Center". + */ + FADE_FROM_CENTER = 6, + /** + * use the animation effect "Fade from Left". + * + * use the fade effect "Fade from Left". + */ + FADE_FROM_LEFT = 1, + /** + * use the animation effect "Fade from Lower Left". + * + * use the fade effect "Fade from Lower Left". + */ + FADE_FROM_LOWERLEFT = 21, + /** + * use the animation effect "Fade from Lower Right". + * + * use the fade effect "Fade from Lower Right". + */ + FADE_FROM_LOWERRIGHT = 22, + /** + * use the animation effect "Fade from Right". + * + * use the fade effect "Fade from Right". + */ + FADE_FROM_RIGHT = 3, + /** + * use the animation effect "Fade from Top". + * + * use the fade effect "Fade from Top". + */ + FADE_FROM_TOP = 2, + /** + * use the animation effect "Fade from Upper Left". + * + * use the fade effect "Fade from Upper Left". + */ + FADE_FROM_UPPERLEFT = 19, + /** + * use the animation effect "Fade from Upper Right". + * + * use the fade effect "Fade from Upper Right". + */ + FADE_FROM_UPPERRIGHT = 20, + /** + * use the animation effect "Fade to Center". + * + * use the fade effect "Fade to Center". + */ + FADE_TO_CENTER = 5, + /** + * use the animation effect "Horizontal Checkerboard". + * + * use the fade effect "Horizontal Checkerboard". + */ + HORIZONTAL_CHECKERBOARD = 56, + /** + * use the animation effect "Horizontal Lines". + * + * use the fade effect "Horizontal Lines". + */ + HORIZONTAL_LINES = 42, + /** + * use the animation effect "Horizontal Stripes". + * + * use the fade effect "Horizontal Stripes". + */ + HORIZONTAL_STRIPES = 16, + /** + * use the animation effect "Move from Bottom". + * + * use the fade effect "Move from Bottom". + */ + MOVE_FROM_BOTTOM = 10, + /** + * use the animation effect "Move from Left". + * + * use the fade effect "Move from Left". + */ + MOVE_FROM_LEFT = 7, + /** + * use the animation effect "Move from Lower Left". + * + * use the fade effect "Move from Lower Left". + */ + MOVE_FROM_LOWERLEFT = 46, + /** + * use the animation effect "Move from Lower Right". + * + * use the fade effect "Move from Lower Right". + */ + MOVE_FROM_LOWERRIGHT = 45, + /** + * use the animation effect "Move from Right". + * + * use the fade effect "Move from Right". + */ + MOVE_FROM_RIGHT = 9, + /** + * use the animation effect "Move from Top". + * + * use the fade effect "Move from Top". + */ + MOVE_FROM_TOP = 8, + /** + * use the animation effect "Move from Upper Left". + * + * use the fade effect "Move from Upper Left". + */ + MOVE_FROM_UPPERLEFT = 43, + /** + * use the animation effect "Move from Upper Right". + * + * use the fade effect "Move from Upper Right". + */ + MOVE_FROM_UPPERRIGHT = 44, + /** + * use no animation effects. + * + * No action is performed on click. + * + * use no fade effects. + */ + NONE = 0, + /** + * use the animation effect "Open Horizontal". + * + * use the fade effect "Open Horizontal". + */ + OPEN_HORIZONTAL = 26, + /** + * use the animation effect "Open Vertical". + * + * use the fade effect "Open Vertical". + */ + OPEN_VERTICAL = 25, + /** + * use the animation effect "Random". + * + * use the fade effect "Random". + */ + RANDOM = 36, + /** use the fade effect "Roll from Bottom". */ + ROLL_FROM_BOTTOM = 14, + /** use the fade effect "Roll from Left". */ + ROLL_FROM_LEFT = 11, + /** use the fade effect "Roll from Right". */ + ROLL_FROM_RIGHT = 13, + /** use the fade effect "Roll from Top". */ + ROLL_FROM_TOP = 12, + /** + * use the animation effect "Spiral Inward Left". + * + * use the fade effect "Spiral Inward Left". + */ + SPIRALIN_LEFT = 27, + /** + * use the animation effect "Spiral Inward Right". + * + * use the fade effect "Spiral Inward Right". + */ + SPIRALIN_RIGHT = 28, + /** + * use the animation effect "Spiral Outward Left". + * + * use the fade effect "Spiral Outward Left". + */ + SPIRALOUT_LEFT = 29, + /** + * use the animation effect "Spiral Outward Right". + * + * use the fade effect "Spiral Outward Right". + */ + SPIRALOUT_RIGHT = 30, + /** + * use the animation effect "Stretch From Bottom". + * + * use the fade effect "Stretch from Bottom". + */ + STRETCH_FROM_BOTTOM = 40, + /** + * use the animation effect "Stretch From Left". + * + * use the fade effect "Stretch from Left". + */ + STRETCH_FROM_LEFT = 37, + /** + * use the animation effect "Stretch From Right". + * + * use the fade effect "Stretch from Right". + */ + STRETCH_FROM_RIGHT = 39, + /** + * use the animation effect "Stretch From Top". + * + * use the fade effect "Stretch from Top". + */ + STRETCH_FROM_TOP = 38, + /** use the fade effect "Uncover to Bottom". */ + UNCOVER_TO_BOTTOM = 53, + /** use the fade effect "Uncover to Left". */ + UNCOVER_TO_LEFT = 47, + /** use the fade effect "Uncover to Lower Left". */ + UNCOVER_TO_LOWERLEFT = 54, + /** use the fade effect "Uncover to Lower Right". */ + UNCOVER_TO_LOWERRIGHT = 52, + /** use the fade effect "Uncover to Right". */ + UNCOVER_TO_RIGHT = 51, + /** use the fade effect "Uncover to Top". */ + UNCOVER_TO_TOP = 49, + /** use the fade effect "Uncover to Upper Left". */ + UNCOVER_TO_UPPERLEFT = 48, + /** use the fade effect "Uncover to Upper Right". */ + UNCOVER_TO_UPPERRIGHT = 50, + /** + * use the animation effect "Vertical Checkerboard". + * + * use the fade effect "Vertical Checkerboard". + */ + VERTICAL_CHECKERBOARD = 55, + /** + * use the animation effect "Vertical Lines". + * + * use the fade effect "Vertical Lines". + */ + VERTICAL_LINES = 41, + /** + * use the animation effect "Vertical Stripes". + * + * use the fade effect "Vertical Stripes". + */ + VERTICAL_STRIPES = 15, + /** + * use the animation effect "Wavy Line from Button". + * + * use the fade effect "Wavy Line from Bottom". + */ + WAVYLINE_FROM_BOTTOM = 35, + /** + * use the animation effect "Wavy Line from Left". + * + * use the fade effect "Wavy Line from Left". + */ + WAVYLINE_FROM_LEFT = 32, + /** + * use the animation effect "Wavy Line from Right". + * + * use the fade effect "Wavy Line from Right". + */ + WAVYLINE_FROM_RIGHT = 34, + /** + * use the animation effect "Wavy Line from Top". + * + * use the fade effect "Wavy Line from Top". + */ + WAVYLINE_FROM_TOP = 33, + } + + /** specifies which part of the presentation is to show. */ + const enum PresentationRange { + /** use all slides. */ + PRESENTATIONRANGE_ALL = 0, + /** use only the active slide. */ + PRESENTATIONRANGE_FROM_PAGE = 1, + /** use an individual choice of slides. */ + PRESENTATIONRANGE_INDIVIDUAL = 2, + } + + /** + * This service is implemented by the chart presentation shape. + * + * {@link Presentation} shapes can be used in a presentation page layouts and their position and size is by default set by the presentation shapes on the + * {@link com.sun.star.drawing.MasterPage} . + */ + interface ChartShape extends Shape, drawing.OLE2Shape { } + + /** + * A custom presentation can show the pages of its presentation in a customized order. + * + * Such a presentation can use certain pages more than once, but it does not necessarily use all of the pages. + */ + interface CustomPresentation extends container.XIndexContainer, container.XNamed { } + + /** This is a container for custom presentations. */ + interface CustomPresentationAccess extends container.XNameContainer, lang.XSingleServiceFactory { } + + /** + * This service is implemented by the date and time presentation shape. + * + * {@link Presentation} shapes can be used in a presentation page layouts and their position and size is by default set by the presentation shapes on the + * {@link com.sun.star.drawing.MasterPage} . + */ + interface DateTimeShape extends Shape, drawing.TextShape { } + + /** describes properties that apply to the whole presentation document. */ + interface DocumentSettings extends document.Settings, document.HeaderFooterSettings, beans.XPropertySet { + /** enables or disables the printing of the drawing pages */ + IsPrintDrawing: boolean; + + /** enables or disables the fitting of the page to the printable area during print */ + IsPrintFitPage: boolean; + + /** enables or disables the printing of the handout pages */ + IsPrintHandout: boolean; + + /** enables or disables the printing of draw pages that are marked hidden */ + IsPrintHiddenPages: boolean; + + /** enables or disables the printing of the notes pages */ + IsPrintNotes: boolean; + + /** enables or disables the printing of the outline pages */ + IsPrintOutline: boolean; + + /** if this is true and the paper size for printing is larger than the paper size of the printer than the content is tiled over multiple pages. */ + IsPrintTilePage: boolean; + + /** is the number format used for page number fields */ + PageNumberFormat: number; + + /** + * If this is true, the distance between two paragraphs is the sum of ParaTopMargin of the previous and ParaBottomMargin of the next paragraph. If false, + * only the greater of the two is chosen. + */ + ParagraphSummation: boolean; + } + + /** + * This is the service provided by a {@link com.sun.star.drawing.DrawPage} inside a {@link PresentationDocument} . + * @see PresentationDocument + */ + interface DrawPage extends drawing.DrawPage, document.LinkTarget { + /** + * specifies how the page change is triggered. + * + * If this is 0, the user must click to start each object animation and to change the page. If set to 1, the page is automatically switched. If it is set + * to 2, all object effects run automatically, but the user has to click on the page to change it. + */ + Change: number; + + /** defines the format that is used to format a date and time text field on this page. This is only used if `IsDateTimeFixed` is `FALSE` . */ + DateTimeFormat: number; + + /** defines the text that is displayed in a date and time textfield rendered on this page. This value is only used if `IsDateTimeFixed` is `TRUE` . */ + DateTimeText: string; + + /** + * If the property com::sun::star::drawing::DrawPage::Change is set to 1, this is the time in seconds this page is shown before switching to the next + * page. + */ + Duration: number; + + /** This is the effect that is used to fade in this page. */ + Effect: FadeEffect; + + /** defines the text that is displayed in a footer textfield rendered on this page. */ + FooterText: string; + + /** defines the text that is displayed in a header textfield rendered on this page. */ + HeaderText: string; + + /** + * If the property com::sun::star::drawing::DrawPage::Change is set to 1, this is the time in seconds this page is shown before switching to the next + * page, also permitting sub-second precision here. + */ + HighResDuration: number; + + /** defines if a date and time text field shows a fixed string value or the current date on this page. */ + IsDateTimeFixed: boolean; + + /** defines if a date and time presentation shape from the master page is visible on this page. */ + IsDateTimeVisible: boolean; + + /** defines if a footer presentation shape from the master page is visible on this page. */ + IsFooterVisible: boolean; + + /** defines if a header presentation shape from the master page is visible on this page. */ + IsHeaderVisible: boolean; + + /** defines if a page number presentation shape from the master page is visible on this page. */ + IsPageNumberVisible: boolean; + + /** If this property is not ZERO, this number specifies a presentation layout for this page. */ + Layout: number; + + /** defines the speed of the fade-in effect of this page. */ + Speed: AnimationSpeed; + } + + /** + * This service is implemented by the footer presentation shape. + * + * {@link Presentation} shapes can be used in a presentation page layouts and their position and size is by default set by the presentation shapes on the + * {@link com.sun.star.drawing.MasterPage} . + */ + interface FooterShape extends Shape, drawing.TextShape { } + + /** + * This service is implemented by the graphic presentation shape. + * + * {@link Presentation} shapes can be used in a presentation page layouts and their position and size is by default set by the presentation shapes on the + * {@link com.sun.star.drawing.MasterPage} . + */ + interface GraphicObjectShape extends Shape, drawing.GraphicObjectShape { } + + /** + * This service is implemented by the handout presentation shape. + * + * {@link Presentation} shapes can be used in a presentation page layouts and their position and size is by default set by the presentation shapes on the + * {@link com.sun.star.drawing.MasterPage} . + */ + interface HandoutShape extends Shape, drawing.PageShape { } + + /** + * This service is implemented by the header presentation shape. + * + * {@link Presentation} shapes can be used in a presentation page layouts and their position and size is by default set by the presentation shapes on the + * {@link com.sun.star.drawing.MasterPage} . + */ + interface HeaderShape extends Shape, drawing.TextShape { } + + /** + * This service is implemented by the notes presentation shape. + * + * {@link Presentation} shapes can be used in a presentation page layouts and their position and size is by default set by the presentation shapes on the + * {@link com.sun.star.drawing.MasterPage} . + */ + interface NotesShape extends Shape, drawing.TextShape { } + + /** + * This service is implemented by the OLE2 presentation shape. + * + * {@link Presentation} shapes can be used in a presentation page layouts and their position and size is by default set by the presentation shapes on the + * {@link com.sun.star.drawing.MasterPage} . + */ + interface OLE2Shape extends Shape, drawing.OLE2Shape { } + + /** + * This service is implemented by the outline presentation shape. + * + * {@link Presentation} shapes can be used in a presentation page layouts and their position and size is by default set by the presentation shapes on the + * {@link com.sun.star.drawing.MasterPage} . + */ + interface OutlinerShape extends Shape, drawing.TextShape { } + + /** + * This component integrates an outline view to a presentation document into the desktop. + * + * In an outline view, the textual contents of presentation text objects from all presentation pages are presented as a continuous outline text. + * @since OOo 1.1.2 + */ + interface OutlineView extends frame.Controller, awt.XWindow, beans.XPropertySet { + /** This is the area that is currently visible. */ + VisibleArea: awt.Rectangle; + } + + /** + * This service is implemented by the page presentation shape. + * + * {@link Presentation} shapes can be used in a presentation page layouts and their position and size is by default set by the presentation shapes on the + * {@link com.sun.star.drawing.MasterPage} . + */ + interface PageShape extends Shape, drawing.PageShape { } + + /** + * an event has a source that causes an event to be fired and a trigger that defines under which condition an event should be raised and an offset if the + * event should be raised a defined amount of time after the event is triggered. + */ + interface ParagraphTarget { + Paragraph: number; + Shape: drawing.XShape; + } + + /** This service is a presentation that is available from a {@link PresentationDocument} via the {@link XPresentationSupplier} interface. */ + interface Presentation extends XPresentation, beans.XPropertySet { + /** enables/disables the shape animations. */ + AllowAnimations: boolean; + + /** If this string is not empty, it contains the name of a customized show that is used for the presentation. */ + CustomShow: string; + + /** If this string is not empty, it contains the name of the page where the presentation is started. */ + FirstPage: string; + + /** If this property is set to `TRUE` , the window of the presentation is always on top of all other windows. */ + IsAlwaysOnTop: boolean; + + /** + * If this property is `TRUE` , all pages are changed automatically. + * + * This overrides the properties of the pages. + */ + IsAutomatic: boolean; + + /** If this property is set to `TRUE` , the presentation is repeated endlessly. */ + IsEndless: boolean; + + /** If this property is set to `TRUE` , the presentation runs in full-screen mode. */ + IsFullScreen: boolean; + + /** + * With this property, you can set the presentation to live mode. + * + * Implementations that have no live mode capability may ignore this property and always return false. + */ + IsLivePresentation: boolean; + + /** If this property is `TRUE` , the mouse is visible during the presentation. */ + IsMouseVisible: boolean; + + /** + * is the duration of the black screen after the presentation has finished. + * + * If this is set to `0` , no black screen is shown. + */ + Pause: number; + + /** If this is set to `TRUE` , the Navigator is opened at the start of the presentation. */ + StartWithNavigator: boolean; + + /** + * If this is `TRUE` , a pen is shown during presentation. + * + * You can draw on the presentation with this pen. + */ + UsePen: boolean; + } + + /** + * enhances the {@link Presentation} service to give access to a {@link XPresentation2} interface. + * @since OOo 3.0 + */ + interface Presentation2 extends Presentation, XPresentation2 { } + + /** This is the service provided by a presentation document. */ + interface PresentationDocument extends drawing.GenericDrawingDocument, XPresentationSupplier, XCustomPresentationSupplier, document.XLinkTargetSupplier { + addEventListener(Listener: document.XEventListener | lang.XEventListener): void; + removeEventListener(Listener: document.XEventListener | lang.XEventListener): void; + } + + /** This component integrates a view to a slide show of a presentation document into the desktop. */ + interface PresentationView extends frame.Controller, awt.XWindow, drawing.XDrawView, beans.XPropertySet { + /** This is the drawing page that is currently visible. */ + CurrentPage: drawing.XDrawPage; + + /** This is the area that is currently visible. */ + VisibleArea: awt.Rectangle; + } + + /** + * This component integrates a preview view to a slide show of a presentation document into the desktop. + * @since OOo 1.1.2 + */ + interface PreviewView extends frame.Controller, awt.XWindow, drawing.XDrawView, beans.XPropertySet { + /** This is the drawing page that is currently visible. */ + CurrentPage: drawing.XDrawPage; + + /** This is the area that is currently visible. */ + VisibleArea: awt.Rectangle; + } + + /** + * this service is supported from all shapes inside a {@link PresentationDocument} . + * + * This usually enhances objects of type {@link com.sun.star.drawing.Shape} with presentation properties. + */ + interface Shape { + /** is a generic URL for the property OnClick. */ + Bookmark: string; + + /** + * This is the color for dimming this shape. + * + * This color is used if the property com::sun::star::drawing::Shape::DimPrev is `TRUE` and com::sun::star::drawing::Shape::DimHide is `FALSE` . + */ + DimColor: util.Color; + + /** If this property and the property com::sun::star::drawing::Shape::DimPrev are both `TRUE` , the shape is hidden instead of dimmed to a color. */ + DimHide: boolean; + + /** + * If this property is `TRUE` , this shape is dimmed to the color of property com::sun::star::drawing::Shape::DimColor after executing its animation + * effect. + */ + DimPrevious: boolean; + + /** selects the animation effect of this shape. */ + Effect: AnimationEffect; + + /** If this is a default presentation object and if it is empty, this property is `TRUE` . */ + IsEmptyPresentationObject: boolean; + + /** + * If this is a presentation object, this property is `TRUE` . + * + * {@link Presentation} objects are objects like {@link TitleTextShape} and {@link OutlinerShape} . + */ + IsPresentationObject: boolean; + + /** selects an action performed after the user clicks on this shape. */ + OnClick: ClickAction; + + /** + * If this property is `TRUE` , the sound of this shape is played in full. + * + * The default behavior is to stop the sound after completing the animation effect. + */ + PlayFull: boolean; + + /** + * This is the position of this shape in the order of the shapes which can be animated on its page. + * + * The animations are executed in this order, starting at the shape with the PresentationOrder "one." You can change the order by changing this number. + * Setting it to "one" makes this shape the first shape in the execution order for the animation effects. + */ + PresentationOrder: number; + + /** This is the URL to a sound file that is played while the animation effect of this shape is running. */ + Sound: string; + + /** If this property is set to `TRUE` , a sound is played while the animation effect is executed. */ + SoundOn: boolean; + + /** This is the speed of the animation effect. */ + Speed: AnimationSpeed; + + /** This is the animation effect for the text inside this shape. */ + TextEffect: AnimationEffect; + + /** specifies an "OLE2" verb for the ClickAction VERB in the property com::sun::star::drawing::Shape::OnClick. */ + Verb: number; + } + + /** + * This service is implemented by the slide number presentation shape. + * + * {@link Presentation} shapes can be used in a presentation page layouts and their position and size is by default set by the presentation shapes on the + * {@link com.sun.star.drawing.MasterPage} . + */ + interface SlideNumberShape extends Shape, drawing.TextShape { } + + /** + * This component integrates a slides view to a presentation document into the desktop. + * + * In a slides view, the pages of a presentation document are displayed to the user as thumbnails and can be arranged and cut/copied to/from the + * clipboard. + * @since OOo 1.1.2 + */ + interface SlidesView extends frame.Controller, awt.XWindow, beans.XPropertySet { + /** This is the area that is currently visible. */ + VisibleArea: awt.Rectangle; + } + + /** + * This service is implemented by the subtitle presentation shape. + * + * {@link Presentation} shapes can be used in a presentation page layouts and their position and size is by default set by the presentation shapes on the + * {@link com.sun.star.drawing.MasterPage} . + */ + interface SubtitleShape extends Shape, drawing.TextShape { } + + /** + * This service is implemented by the title and subtitle presentation shape. + * + * {@link Presentation} shapes can be used in a presentation page layouts and their position and size is by default set by the presentation shapes on the + * {@link com.sun.star.drawing.MasterPage} . + */ + interface TitleTextShape extends Shape, drawing.TextShape { } + + /** + * must be supported to provide access to customized presentations of a presentation document. + * @see XCustomPresentation + * @see XCustomPresentationAccess + */ + interface XCustomPresentationSupplier extends uno.XInterface { + /** @returns the {@link CustomPresentation} . */ + readonly CustomPresentations: container.XNameContainer; + + /** @returns the {@link CustomPresentation} . */ + getCustomPresentations(): container.XNameContainer; + } + + /** returns the handout master page for this document */ + interface XHandoutMasterSupplier extends uno.XInterface { + /** returns the {@link DrawPage} . */ + getHandoutMasterPage(): drawing.XDrawPage; + + /** returns the {@link DrawPage} . */ + readonly HandoutMasterPage: drawing.XDrawPage; + } + + /** With this interface you can control any object that implements a {@link Presentation} . */ + interface XPresentation extends uno.XInterface { + /** The presentation is stopped and the full-screen mode will end. */ + end(): void; + + /** Starts the presentation from the beginning and shows the actual running time to the user. */ + rehearseTimings(): void; + + /** The presentation is shown in full-screen and started from the beginning. */ + start(): void; + } + + /** + * enhances the {@link XPresentation} interface to give access to a {@link XSlideShowController} and to start a presentation with arguments. + * @since OOo 3.0 + */ + interface XPresentation2 extends XPresentation, beans.XPropertySet { + /** if the slide show is running, this returns a controller object to control the running slide show. */ + readonly Controller: XSlideShowController; + + /** if the slide show is running, this returns a controller object to control the running slide show. */ + getController(): XSlideShowController; + + /** returns true if the slide show is currently running */ + isRunning(): boolean; + + /** start the slide show with the given arguments. All arguments override the values from {@link Presentation} . */ + startWithArguments(Arguments: LibreOffice.SeqEquiv): void; + } + + /** + * describes a page from a presentation. + * @see com.sun.star.drawing.DrawPage + */ + interface XPresentationPage extends drawing.XDrawPage { + /** + * return the note page from the current page in the presentation, the name for the note page in the user interface note view, and one of the views from + * a presentation page. + */ + getNotesPage(): drawing.XDrawPage; + + /** + * return the note page from the current page in the presentation, the name for the note page in the user interface note view, and one of the views from + * a presentation page. + */ + readonly NotesPage: drawing.XDrawPage; + } + + /** controls a presentation directly. This supplier will do this. */ + interface XPresentationSupplier extends uno.XInterface { + /** @returns an interface to control a presentation. */ + getPresentation(): XPresentation; + + /** @returns an interface to control a presentation. */ + readonly Presentation: XPresentation; + } + + /** + * Listener interface to receive shape-specific events. + * @since OOo 2.4 + */ + interface XShapeEventListener extends lang.XEventListener { + /** + * Notify a clicked shape. + * + * This method notifies the listener that a shape was clicked. + * @param xShape The shape that was clicked upon. + * @param aOriginalEvent The original mouse click event that generated this notification. + */ + click(xShape: drawing.XShape, aOriginalEvent: awt.MouseEvent): void; + } + + /** + * Slide show interface to perform slide show presentations. + * + * This interface provides the necessary methods to run and control a slide show from a given set of XDrawPage slides. The slide show can be displayed + * simultaneously on multiple targets. + * + * Note: To control a running slide show inside a presentation, please use {@link XPresentation2} and {@link XSlideShowController} . + * @since OOo 3.0 + */ + interface XSlideShow extends uno.XInterface { + /** + * Add a shape event listener. + * + * This method adds a listener to the slide show, which will get notified when a mouse click is performed on the given shape. This can be used by clients + * of the slide show to trigger external actions, such as jumps to different slides. + * @param xListener Listener to add. + * @param xShape {@link Shape} to register a listener for. + */ + addShapeEventListener(xListener: XShapeEventListener, xShape: drawing.XShape): void; + + /** + * Add a slide show listener. + * + * This method adds a listener to the slide show, which will get notified when a registered shape is clicked upon, or a new slide is about to be + * displayed. Note that the listeners will **not** be notified, when the slide change is directly requested by one of the nextSlide(), previousSlide() or + * {@link displaySlide()} methods. + * @param xListener Listener to add. + */ + addSlideShowListener(xListener: XSlideShowListener): void; + + /** + * Add a view to the slide show. + * + * This method adds a view to the slide show. After successful completion of this method, the slide show will be visible on the added view, scaled + * according to the view's output area. + * @param xView The view to add + * @returns `TRUE` , if the view has been successfully added. Otherwise, `FALSE` is returned (e.g. if the view is already added). + */ + addView(xView: XSlideShowView): boolean; + + /** + * Query the currently displayed slide. + * @returns the instance of the current slide. If there's no slide show running at the moment, this method returns an empty reference. + */ + readonly CurrentSlide: drawing.XDrawPage; + + /** + * Jump to the given slide. + * + * This method ends all effects on the current slide, displays a possible slide transition, followed by the given slide. If the current slide is equal to + * the requested slide here, this method does nothing (this especially means, that any currently active effects will remain running). + * @param xSlide The slide to display. + * @param xDrawPages For future use. + * @param AnimationNode The animation node determine the animations to display. + * @param aProperties Sequence of property values, which influence the way the slide is displayed. Currently, the following values are recognized: name: Pr + */ + displaySlide(xSlide: drawing.XDrawPage, xDrawPages: drawing.XDrawPagesSupplier, AnimationNode: animations.XAnimationNode, aProperties: LibreOffice.SeqEquiv): void; + + /** + * Query the currently displayed slide. + * @returns the instance of the current slide. If there's no slide show running at the moment, this method returns an empty reference. + */ + getCurrentSlide(): drawing.XDrawPage; + + /** + * Trigger the next effect of the slide show. + * + * This method triggers the next effect on the currently displayed slide. If there is currently no slide show running, this method does nothing. If there + * are no more effects on the current slide, a possible slide transition effect is issued and the next slide is displayed. + * @returns `TRUE` , if the next effect was successfully triggered. This method returns `FALSE` , if there is no show running, the last effect on the last sl + */ + nextEffect(): boolean; + + /** + * Change the pause state of the slide show. + * + * This method either pauses the slide show (all currently running effects are stopped), or starts a previously stopped show again (all paused effects + * start again). + * @param bPauseShow When `TRUE` , the show is paused. When `FALSE` , and the show was paused, it starts running at the paused position again. + * @returns `TRUE` , if the requested action was successfully performed. + */ + pause(bPauseShow: boolean): boolean; + + /** + * Undo the last effect in the main sequence of the slide show. + * + * The current slide is displayed as if the last user-triggered effect has never been triggered. If there is no previous effect on the current slide then + * slideEnded(true) is called at the registered {@link XSlideShowListener} objects, which can then trigger a change to the previous slide. Note that this + * command is executed asynchronously. Multiple calls to {@link update()} may be necessary to complete its execution. If there is currently no slide show + * running, this method does nothing. + * @returns `TRUE` , if the previous effect was successfully triggered. This method returns `FALSE` , if there is no show running, the first effect on the fi + */ + previousEffect(): boolean; + + /** + * Register drawn polygons in presentation mode + * @param xDocFactory + */ + registerUserPaintPolygons(xDocFactory: lang.XMultiServiceFactory): void; + + /** + * Revoke a previously registered shape event listener. + * @param xListener Listener interface to revoke from being called. + * @param xShape {@link Shape} for which the listener should be revoked. + */ + removeShapeEventListener(xListener: XShapeEventListener, xShape: drawing.XShape): void; + + /** + * Revoke a previously registered slide show listener. + * @param xListener Listener interface to revoke from being called. + */ + removeSlideShowListener(xListener: XSlideShowListener): void; + + /** + * Remove view from the slide show. + * + * This method removes the given view from the slide show. After successful completion of this method, the slide show will cease to display on this view. + * @param xView View to remove + * @returns `TRUE` , if the view was successfully removed, `FALSE` otherwise (e.g. if the view was not added in the first place). + */ + removeView(xView: XSlideShowView): boolean; + + /** + * Change a property of the slide show. + * @param aShowProperty Property values, which influence the way the slides are shown. Note that this might possibly be a subset of what is supported on sh + */ + setProperty(aShowProperty: beans.PropertyValue): boolean; + + /** + * Set a special mouse cursor for a shape. + * + * This method requests the slide show to display a special cursor, whenever the mouse is hovering over the given shape. + * @param xShape {@link Shape} to display a special mouse cursor. + * @param nPointerShape Type of mouse cursor to display. Must be one of the {@link com.sun.star.awt.SystemPointer} values. + */ + setShapeCursor(xShape: drawing.XShape, nPointerShape: number): void; + + /** + * Start a shape-intrinsic animation or activity. + * + * This method starts an animation or activity intrinsic to the given shape. Shape-intrinsic activities are things like video playback for multimedia + * shapes, sounds, GIF animations and drawing layer animations (flipping between shapes in a group, or scroll text). + * @param xShape The shape to start the activity for + */ + startShapeActivity(xShape: drawing.XShape): boolean; + + /** + * Stop a shape-intrinsic animation or activity. + * + * This method stops an animation or activity intrinsic to the given shape. Shape-intrinsic activities are things like video playback for multimedia + * shapes, sounds, GIF animations and drawing layer animations (flipping between shapes in a group, or scroll text). + * @param xShape The shape to stop the activity for + */ + stopShapeActivity(xShape: drawing.XShape): boolean; + + /** + * Update the animations. + * + * This method updates all currently active slide animations. The {@link XSlideShow} implementations do not render animations automatically, but must be + * called from their clients. This allows for various update mechanisms to be employed, ranging from a dedicated rendering thread, over timer-based + * updates, to rendering in an idle function. Either way, the client of this interface decide about the details. + * @param nNextTimeout Via this value, the implementation can return a timeout value, denoting the maximal time span that must not be exceeded from the ret + * @returns `TRUE` , if further update calls are required. If `FALSE` is returned, no further update calls are necessary, until anyone of the other interface + */ + update(nNextTimeout: [number]): boolean; + } + + /** + * interface to control a running slide show. + * @see XPresentation2 + * @since OOo 3.0 + */ + interface XSlideShowController { + /** + * activates the user interface of this slide show. + * @see deactivate() + * @see isActive() + */ + activate(): void; + + /** adds a listener that receives events while the slide show is running. */ + addSlideShowListener(Listener: XSlideShowListener): void; + + /** If this attribute is set to `TRUE` , the window of the slide show is always on top of all other windows. */ + AlwaysOnTop: boolean; + + /** + * pauses the slide show and blanks the screen in the given color. + * + * Change attribute Pause to false to unpause the slide show. + */ + blankScreen(Color: number): void; + + /** returns slide that is currently displayed */ + readonly CurrentSlide: drawing.XDrawPage; + + /** returns the index of the current slide. */ + readonly CurrentSlideIndex: number; + + /** + * can be called to deactivate the user interface of this slide show. + * + * A deactivated + * @see activate() + * @see isActive() + */ + deactivate(): void; + + /** returns slide that is currently displayed */ + getCurrentSlide(): drawing.XDrawPage; + + /** returns the index of the current slide. */ + getCurrentSlideIndex(): number; + + /** the index for the slide that is displayed next. */ + getNextSlideIndex(): number; + + /** + * gives access to the slides that will be shown in this slide show. + * + * Slides are returned in the order they will be displayed in the presentation which can be different than the orders of slides in the document. Not all + * slides must be present and each slide can be used more than once. + * @param Index specifies the position in the list of slides that are displayed in this slide show. The first index is 0. + * @returns the slide at the specified index. + * @throws com::sun::star::lang::IndexOutOfBoundException if the index is not valid. + */ + getSlideByIndex(Index: number): drawing.XDrawPage; + + /** + * @returns the number of slides in this slide show. + * @see getSlideByIndex + */ + getSlideCount(): number; + + /** + * returns the actual {@link XSlideShow} instance that runs the slide show. ; Normally all navigation should be done using this controller and not the + * {@link XSlideShow} itself. + */ + getSlideShow(): XSlideShow; + + /** goto the given textual bookmark */ + gotoBookmark(Bookmark: string): void; + + /** goto and display first slide */ + gotoFirstSlide(): void; + + /** + * goto and display last slide. + * + * Remaining effects on the current slide will be skipped. + */ + gotoLastSlide(): void; + + /** + * start next effects that wait on a generic trigger. + * + * If no generic triggers are waiting the next slide will be displayed. + */ + gotoNextEffect(): void; + + /** + * goto and display next slide. + * + * Remaining effects on the current slide will be skipped. + */ + gotoNextSlide(): void; + + /** + * undo the last effects that where triggered by a generic trigger. + * + * If there is no previous effect that can be undone then the previous slide will be displayed. + */ + gotoPreviousEffect(): void; + + /** + * goto and display previous slide. + * + * Remaining effects on the current slide will be skipped. + */ + gotoPreviousSlide(): void; + + /** + * jumps to the given slide. + * + * The slide can also be a slide that would normally not be shown during the current slide show. + * @throws com::sun::star::lang::IllegalArgumentException if the given page is not a valid slide of the document for which this slide show is started. Also + */ + gotoSlide(Page: drawing.XDrawPage): void; + + /** jumps to the slide at the given index. */ + gotoSlideIndex(Index: number): void; + + /** + * determines if the slide show is active. + * @returns `TRUE` for UI active slide show ; `FALSE` otherwise + */ + isActive(): boolean; + + /** returns `TRUE` if the slide show was started to run endlessly. */ + isEndless(): boolean; + + /** Returns `TRUE` if the slide show was started in full-screen mode. */ + isFullScreen(): boolean; + + /** + * returns `TRUE` if the slide show is currently paused. + * @see pause() + * @see resume() + */ + isPaused(): boolean; + + /** + * returns true if the slide show is still running. If this returns false, this component is already disposed. You can start a new slide show and get a + * new instance of {@link XSlideShowController} from {@link XPresentation2} + */ + isRunning(): boolean; + + /** If this attribute is `TRUE` , the mouse is visible during the slide show. */ + MouseVisible: boolean; + + /** the index for the slide that is displayed next. */ + readonly NextSlideIndex: number; + + /** + * pauses the slide show. All effects are paused. + * + * The slide show continues on next user input or if {@link resume()} is called. + */ + pause(): void; + + /** This attribute changes the color of the pen. */ + PenColor: number; + + /** + * This attribute changes the width of the pen. + * @since LibreOffice 4.2 + */ + PenWidth: number; + + /** removes a listener. */ + removeSlideShowListener(Listener: XSlideShowListener): void; + + /** resumes a paused slide show. */ + resume(): void; + + /** + * @returns the number of slides in this slide show. + * @see getSlideByIndex + */ + readonly SlideCount: number; + + /** + * returns the actual {@link XSlideShow} instance that runs the slide show. ; Normally all navigation should be done using this controller and not the + * {@link XSlideShow} itself. + */ + readonly SlideShow: XSlideShow; + + /** stop all currently played sounds */ + stopSound(): void; + + /** + * If this is `TRUE` , a pen is shown during presentation. + * + * You can draw on the presentation with this pen. + */ + UsePen: boolean; + } + + /** + * Listener interface to receive global slide show events. + * @see XShapeEventListener + * @since OOo 3.0 + */ + interface XSlideShowListener extends animations.XAnimationListener { + /** + * Notifies that a hyperlink has been clicked. + * @param hyperLink hyperlink URL + */ + hyperLinkClicked(hyperLink: string): void; + + /** Notify that the slide show is paused */ + paused(): void; + + /** Notify that the slide show is resumed from a paused state */ + resumed(): void; + + /** Notify that the last animation from the main sequence of the current slide has ended. */ + slideAnimationsEnded(): void; + + /** + * Notify that the current slide has ended, e.g. the user has clicked on the slide. Calling displaySlide() twice will not issue this event. + * @param reverse For the default order (forward) this flag is `FALSE` . When the main sequence was traversed in reverse order then this flag is `TRUE` . + */ + slideEnded(reverse: boolean): void; + + /** Notify that the slide transition of the current slide ended. */ + slideTransitionEnded(): void; + + /** Notify that a new slide starts to become visible. */ + slideTransitionStarted(): void; + } + + /** + * View interface to display slide show presentations on. + * + * This interface provides the necessary methods to enable an {@link XSlideShow} interface to display a presentation. The slide show can be displayed + * simultaneously on multiple views + * @since OOo 2.4 + */ + interface XSlideShowView extends uno.XInterface { + /** + * Add a mouse listener to the view. + * + * This method registers a listener with the view, which will get called every time the mouse is clicked on the view. + * @param xListener Listener interface to call when the mouse is clicked on the view. + */ + addMouseListener(xListener: awt.XMouseListener): void; + + /** + * Add a mouse motion listener to the view. + * + * This method registers a listener with the view, which will get called every time the mouse is moved on the view. + * @param xListener Listener interface to call when the mouse is moved on the view. + */ + addMouseMotionListener(xListener: awt.XMouseMotionListener): void; + + /** + * Add a listener to get notified when this view needs a repaint. + * + * This method registers a listener with the view, which will get called every time the view needs an update of their screen representation. + * @param xListener Listener interface to call when the view needs a repaint. + */ + addPaintListener(xListener: awt.XPaintListener): void; + + /** + * Add a listener to get notified when the transformation matrix changes. + * + * This method registers a listener with the view, which will get called every time the transformation matrix changes. + * @param xListener Listener interface to call when the transformation matrix changes. + */ + addTransformationChangedListener(xListener: util.XModifyListener): void; + + /** + * Get view canvas. + * + * This method gets the underlying XCanvas to display on this view. + * @returns XSpriteCanvas to display on. Must be valid, and the same object, as long as this view is added to any slide show. + */ + readonly Canvas: rendering.XSpriteCanvas; + + /** Get rectangle defining area inside of canvas device which this slide show view uses. */ + readonly CanvasArea: awt.Rectangle; + + /** + * This method clears the whole view area. + * + * The slide show uses this method to fully erase the view content. Since the slide show has no notion of view size, this is the only reliable way to + * wholly clear the view. + */ + clear(): void; + + /** + * Get view canvas. + * + * This method gets the underlying XCanvas to display on this view. + * @returns XSpriteCanvas to display on. Must be valid, and the same object, as long as this view is added to any slide show. + */ + getCanvas(): rendering.XSpriteCanvas; + + /** Get rectangle defining area inside of canvas device which this slide show view uses. */ + getCanvasArea(): awt.Rectangle; + + /** + * Query the current transformation matrix for this view. + * + * This method returns the transformation matrix of the view. When notified via the transformation change listener, the show will be displayed using the + * new transformation. + * @returns the view transformation matrix. Note that the slide show itself will paint all slides as one-by-one boxes, one therefore has to at least provide + */ + getTransformation(): geometry.AffineMatrix2D; + + /** + * Query the current translation offset used to fill the physical screen while keeping aspect ratio. + * + * This method returns the translation offset of the view of the view. + * @returns the slideshowview will be transformed in order to fill the physical screen while keeping the aspect ratio. In order to do so, we need to add a bl + */ + getTranslationOffset(): geometry.IntegerSize2D; + + /** + * Revoke a previously registered mouse listener. + * @param xListener Listener interface to revoke from being called. + */ + removeMouseListener(xListener: awt.XMouseListener): void; + + /** + * Revoke a previously registered mouse move listener. + * @param xListener Listener interface to revoke from being called. + */ + removeMouseMotionListener(xListener: awt.XMouseMotionListener): void; + + /** + * Revoke a previously registered paint listener. + * @param xListener Listener interface to revoke from being called. + */ + removePaintListener(xListener: awt.XPaintListener): void; + + /** + * Revoke a previously registered transformation matrix change listener. + * @param xListener Listener interface to revoke from being called. + */ + removeTransformationChangedListener(xListener: util.XModifyListener): void; + + /** + * Change the mouse cursor currently in effect. + * + * This method changes the mouse cursor currently in effect, for this view. + * @param nPointerShape New mouse cursor shape to display for this view. Must be from the {@link com.sun.star.awt.SystemPointer} constant group. + */ + setMouseCursor(nPointerShape: number): void; + + /** + * Query the current transformation matrix for this view. + * + * This method returns the transformation matrix of the view. When notified via the transformation change listener, the show will be displayed using the + * new transformation. + * @returns the view transformation matrix. Note that the slide show itself will paint all slides as one-by-one boxes, one therefore has to at least provide + */ + readonly Transformation: geometry.AffineMatrix2D; + + /** + * Query the current translation offset used to fill the physical screen while keeping aspect ratio. + * + * This method returns the translation offset of the view of the view. + * @returns the slideshowview will be transformed in order to fill the physical screen while keeping the aspect ratio. In order to do so, we need to add a bl + */ + readonly TranslationOffset: geometry.IntegerSize2D; + } + + /** + * Transition interface to render custom transitions over time. + * @since OOo 2.4 + */ + interface XTransition extends uno.XInterface { + /** + * Update transition on screen to given time state. + * @param t Time on the transition timeline to display. Must be in the [0,1] range. + */ + update(t: number): void; + viewChanged(view: XSlideShowView, leavingBitmap: rendering.XBitmap, enteringBitmap: rendering.XBitmap): void; + } + + /** + * {@link TransitionFactory} interface to request optional custom Transition instances for slide show transitions. + * + * This interface provides the necessary methods to query and create optional transition effects for a {@link SlideShow} + * @since OOo 2.4 + */ + interface XTransitionFactory extends uno.XInterface { + /** + * Actually create a transition for the given transition id + * @param transitionType Main type of transition ( + * @param transitionSubType Subtype for the transition ( + * @param view Slide show view to display on + * @param leavingBitmap Bitmap of the slide that's going to leave the screen + * @param enteringBitmap Bitmap of the slide that's going to enter the screen + * @see com.sun.star.animations.TransitionType) + * @see com.sun.star.animations.TransitionSubType) + */ + createTransition(transitionType: number, transitionSubType: number, view: XSlideShowView, leavingBitmap: rendering.XBitmap, enteringBitmap: rendering.XBitmap): XTransition; + + /** Checks whether this instance provides an implementation for given transition id. */ + hasTransition(transitionType: number, transitionSubType: number): boolean; + } + + namespace EffectCommands { + const enum Constants { + CUSTOM = 0, + PLAY = 2, + STOP = 4, + STOPAUDIO = 5, + TOGGLEPAUSE = 3, + VERB = 1, + } + } + + namespace EffectNodeType { + const enum Constants { + AFTER_PREVIOUS = 3, + DEFAULT = 0, + INTERACTIVE_SEQUENCE = 6, + MAIN_SEQUENCE = 4, + ON_CLICK = 1, + TIMING_ROOT = 5, + WITH_PREVIOUS = 2, + } + } + + namespace EffectPresetClass { + const enum Constants { + CUSTOM = 0, + EMPHASIS = 3, + ENTRANCE = 1, + EXIT = 2, + MEDIACALL = 6, + MOTIONPATH = 4, + OLEACTION = 5, + } + } + + namespace ShapeAnimationSubType { + const enum Constants { + AS_WHOLE = 0, + ONLY_BACKGROUND = 1, + ONLY_TEXT = 2, + } + } + + namespace TextAnimationType { + const enum Constants { + BY_LETTER = 2, + BY_PARAGRAPH = 0, + BY_WORD = 1, + } + } + + namespace textfield { + /** + * specifies service of a presentation date and time text field. + * @see com.sun.star.text.TextField + */ + type DateTime = text.TextField; + + /** + * specifies service of a presentation footer text field. + * @see com.sun.star.text.TextField + */ + type Footer = text.TextField; + + /** + * specifies service of a presentation header text field. + * @see com.sun.star.text.TextField + */ + type Header = text.TextField; + } + } + + namespace qa { + /** Dumps the content into a string. This is an internal interface and should not be used outside of Libreoffice source code */ + interface XDumper extends uno.XInterface { + /** + * dump the content into a string + * @since LibreOffice 3.6 + */ + dump(): string; + } + } + + namespace rdf { + /** + * represents an error condition that is signaled on parsing an RDF file. + * @see XRepository + * @since OOo 3.0 + */ + type ParseException = uno.Exception; + + /** + * represents an error condition that is signaled on evaluating a query against an RDF {@link Repository} . + * @see XRepository + * @since OOo 3.0 + */ + type QueryException = uno.Exception; + + /** + * represents an error condition that is signaled on accessing an RDF {@link Repository} . + * @see XRepository + * @since OOo 3.0 + */ + type RepositoryException = uno.Exception; + + /** + * represents a blank node that may occur in a RDF graph. + * + * Blank nodes are distinct, but have no {@link URI} ; in other words, they are resources that are anonymous. + * @see XRepository + * @since OOo 3.0 + */ + type XBlankNode = XResource; + + /** + * represents a resource node that may occur in a RDF graph. + * + * Note that this interface exists only to separate resources from literals. + * @see XRepository + * @see XBlankNode + * @see XURI + * @since OOo 3.0 + */ + type XResource = XNode; + + /** + * represents a blank node that may occur in a RDF graph. + * @see XRepository + * @since OOo 3.0 + */ + interface BlankNode extends XBlankNode { + /** + * create a blank RDF node. + * + * Be careful! With this constructor you can create a node that aliases another node that already exists in some repository. That may or may not be what + * you want. If you want to create a new blank node that is guaranteed to be unique, use {@link XRepository.createBlankNode()} instead. + * @param NodeID the ID for the blank node. + * @see XRepository.createBlankNode + * @throws com::sun::star::lang::IllegalArgumentException if the argument does not represent a valid blank node ID + */ + create(NodeID: string): void; + } + + /** + * represents a literal that may occur in a RDF graph. + * @see XRepository + * @since OOo 3.0 + */ + interface Literal extends XLiteral { + /** + * creates a plain literal RDF node. + * @param Value the string value of the literal + */ + create(Value: string): void; + + /** + * creates a literal RDF node with a language. + * @param Value the string value of the literal + * @param Language the language of the literal + */ + createWithLanguage(Value: string, Language: string): void; + + /** + * creates a typed literal RDF node. + * @param Value the string value of the literal + * @param Type the data type of the literal + */ + createWithType(Value: string, Type: XURI): void; + } + + /** + * provides access to a set of named RDF graphs. + * @see XRepository + * @see XRepositorySupplier + * @since OOo 3.0 + */ + interface Repository extends XRepository { + /** constructs repository with in-memory storage. */ + create(): void; + } + + /** + * represents a RDF statement, or triple. + * @see XRepository + * @since OOo 3.2 + */ + interface Statement { + Graph: XURI; + Object: XNode; + Predicate: XURI; + Subject: XResource; + } + + /** + * represents an {@link URI} node that may occur in a RDF graph. + * @see XRepository + * @since OOo 3.0 + */ + interface URI extends XURI { + /** + * creates an {@link URI} RDF node. + * @param Value the {@link URI} , represented as `string` . + * @throws com::sun::star::lang::IllegalArgumentException if the argument does not represent a valid {@link URI} + */ + create(Value: string): void; + + /** + * creates an {@link URI} RDF node for a well-known {@link URI} . + * @param Id the {@link URI} , represented as a constant from {@link URIs} . + * @see URIs + * @throws com::sun::star::lang::IllegalArgumentException if the argument is not a valid constant from {@link URIs} + */ + createKnown(Id: number): void; + + /** + * creates an {@link URI} RDF node from namespace prefix and local name. + * @param Namespace the namespace prefix of the {@link URI} , represented as `string` . + * @param LocalName the local name of the {@link URI} , represented as `string` . + * @throws com::sun::star::lang::IllegalArgumentException if the arguments do not represent a valid {@link URI} + */ + createNS(Namespace: string, LocalName: string): void; + } + + /** + * document metadata functionality related to the "manifest.rdf". + * + * This interface contains some methods that create connections between the content and the RDF metadata of an ODF document. The main idea is to make + * querying and manipulating the data in the metadata manifest easier. + * + * Note that this interface inherits from {@link XURI} : the base {@link URI} of the document is the string value of the RDF node. This is so that you + * can easily make RDF statements about the document. + * @see XDocumentRepository + * @since OOo 3.2 + */ + interface XDocumentMetadataAccess extends XURI, XRepositorySupplier { + /** + * add a content or styles file to the manifest. + * + * This convenience method adds the required statements declaring a content or styles file to the manifest graph. If the FileName ends in "content.xml", + * an `odf:ContentFile` is added.If the FileName ends in "styles.xml" , an `odf:StylesFile` is added.Other FileNames are invalid. + * @param FileName the name of the stream in the ODF storage + * @throws com::sun::star::lang::IllegalArgumentException if the FileName is invalid + * @throws com::sun::star::container::ElementExistException if a stream with the given FileName already exists + */ + addContentOrStylesFile(FileName: string): void; + + /** + * add a metadata file to the manifest. + * + * This convenience method does the following: create a new graph with the given name in the repositoryinsert statements declaring the new graph to be a + * metadata file into the manifest graphinsert statements declaring `rdf:type` properties for the new graph into the manifest graph + * @param FileName the name of the stream in the ODF storage where the graph will be stored + * @param Types a list of types that will be inserted as `rdf:type` properties for the graph + * @returns the name of the new graph + * @throws com::sun::star::lang::IllegalArgumentException if the FileName is invalid + * @throws com::sun::star::container::ElementExistException if a stream with the given FileName already exists + */ + addMetadataFile(FileName: string, Types: LibreOffice.SeqEquiv): XURI; + + /** + * get the unique ODF element with the given metadata reference. + * @param MetadataReference a metadata reference, comprising the stream name and the XML ID For example: Pair("content.xml", "foo-element-1") + * @returns the ODF element with the given metadata references if it exists, else `NULL` + */ + getElementByMetadataReference(MetadataReference: beans.StringPair): XMetadatable; + + /** + * get the ODF element that corresponds to an {@link URI} . + * @param URI an {@link URI} that may identify an ODF element + * @returns the ODF element that corresponds to the given {@link URI} , or `NULL` + * @throws com::sun::star::lang::IllegalArgumentException if the given {@link URI} is `NULL` + */ + getElementByURI(URI: XURI): XMetadatable; + + /** + * get the names of all metadata files with a given type. + * @param Type the `rdf:type` property of the requested named graphs + * @returns the names of all metadata graphs that have a `rdf:type` property with the given Type as object + * @throws com::sun::star::lang::IllegalArgumentException if the given Type is `NULL` + */ + getMetadataGraphsWithType(Type: XURI): SafeArray; + + /** + * import a metadata file into the document repository, and add it to the manifest. + * + * This convenience method does the following: 1. import the given file into a graph with the given name in the repository 2. insert statements + * declaring the new graph to be a metadata file into the manifest graph 3. insert statements declaring `rdf:type` properties for the new graph into the + * manifest graph + * @param Format the file format, see {@link FileFormat} + * @param InStream the input stream + * @param FileName the name of the stream in the ODF storage where the graph will be stored + * @param BaseURI a base {@link URI} to resolve relative {@link URI} references + * @param Types a list of types that will be inserted as `rdf:type` properties for the graph + * @returns the name of the new graph + * @see FileFormat + * @throws com::sun::star::lang::IllegalArgumentException if the given stream is `NULL` , or BaseURI is `NULL` and the format requires use of a base {@link + * @throws com::sun::star::datatransfer::UnsupportedFlavorException if the format requested is unknown or not supported + * @throws com::sun::star::container::ElementExistException if a stream with the given FileName already exists + * @throws ParseException if the input does not conform to the specified file format. + * @throws com::sun::star::io::IOException if an I/O error occurs. + */ + importMetadataFile(Format: number, InStream: io.XInputStream, FileName: string, BaseURI: XURI, Types: LibreOffice.SeqEquiv): XURI; + + /** + * loads document metadata from a medium. + * + * If the Medium contains an InteractionHandler, it will be used for error reporting. + * @param Medium the {@link com.sun.star.document.MediaDescriptor} representing the source + * @see com.sun.star.document.MediaDescriptor + * @throws com::sun::star::lang::IllegalArgumentException if the argument does not contain a URL or Stream property + * @throws com::sun::star::lang::WrappedTargetException if an error occurs while loading + */ + loadMetadataFromMedium(Medium: LibreOffice.SeqEquiv): void; + + /** + * initialize document metadata from a storage. + * + * This method re-initializes the document metadata, loads the stream named "manifest.rdf" from the storage, and then loads all metadata streams + * mentioned in the manifest. + * + * Note that it is not an error if the storage does not contain a manifest. In this case, the document metadata will be default initialized. + * + * If an InteractionHandler argument is given, it will be used for error reporting. Otherwise, errors will be reported as exceptions. + * @param Storage a storage, representing e.g. an ODF package file, or sub-document + * @param BaseURI a base {@link URI} to resolve relative {@link URI} references N.B.: when loading from an ODF package, the base {@link URI} is not the {@l + * @param InteractionHandler an InteractionHandler, used for error reporting + * @throws com::sun::star::lang::IllegalArgumentException if any argument is `NULL` + * @throws com::sun::star::lang::WrappedTargetException if an error occurs while loading and no InteractionHandler given + */ + loadMetadataFromStorage(Storage: embed.XStorage, BaseURI: XURI, InteractionHandler: task.XInteractionHandler): void; + + /** + * remove a content or styles file from the manifest. + * + * This convenience method removes the statements declaring a content or styles file from the manifest graph. + * @param FileName the name of the stream in the ODF storage + * @throws com::sun::star::lang::IllegalArgumentException if the FileName is invalid + * @throws com::sun::star::container::NoSuchElementException if a graph with the given GraphName does not exist + */ + removeContentOrStylesFile(FileName: string): void; + + /** + * remove a metadata file from the manifest and the repository. + * + * This convenience method does the following: 1. delete the graph with the given GraphName in the repository 2. remove the statements declaring the + * graph to be a metadata file from the manifest graph + * @param GraphName the name of the graph that is to be removed + * @throws com::sun::star::lang::IllegalArgumentException if the given GraphName is `NULL` + * @throws com::sun::star::container::NoSuchElementException if a graph with the given GraphName does not exist + */ + removeMetadataFile(GraphName: XURI): void; + + /** + * stores document metadata to a medium. + * @param Medium the {@link com.sun.star.document.MediaDescriptor} representing the target + * @see com.sun.star.document.MediaDescriptor + * @throws com::sun::star::lang::IllegalArgumentException if the argument does not contain a URL or Stream property + * @throws com::sun::star::lang::WrappedTargetException if an error occurs while storing + */ + storeMetadataToMedium(Medium: LibreOffice.SeqEquiv): void; + + /** + * store document metadata to a storage. + * + * This method stores all the graphs in the document metadata repository to the given storage. + * + * Note that to be stored correctly, a named graph must have a complete entry in the manifest graph. + * @param Storage a storage, representing e.g. an ODF package file, or sub-document + * @throws com::sun::star::lang::IllegalArgumentException if Storage argument is `NULL` + * @throws com::sun::star::lang::WrappedTargetException if an error occurs while loading + */ + storeMetadataToStorage(Storage: embed.XStorage): void; + } + + /** + * extends {@link XRepository} with document-specific functionality. + * + * This subclass of {@link XRepository} provides some methods which only make sense for repositories that are attached to a document. For example, the + * methods allow for manipulating in-content metadata, which is stored as RDFa. + * @see XRepositorySupplier + * @see XDocumentMetadataAccess + * @since OOo 3.2 + */ + interface XDocumentRepository extends XRepository { + /** + * find the RDFa statement(s) associated with an ODF element. + * @param Element the ODF element for which RDFa statements should be found + * @returns if the element has no RDFa meta-data attributes: the empty sequence.if the element has RDFa meta-data attributes: a sequence with the RDFa-statem + * @see Statement + * @throws com::sun::star::lang::IllegalArgumentException if the given Element is `NULL` , or of a type that can not have RDFa metadata attached. + * @throws RepositoryException if an error occurs when accessing the repository. + */ + getStatementRDFa(Element: XMetadatable): com.sun.star.beans.Pair, boolean>; + + /** + * gets matching RDFa statements from the repository. + * + * This method exists because RDFa statements are not part of any named graph, and thus they cannot be enumerated with {@link + * XNamedGraph.getStatements()} . + * + * Any parameter may be `NULL` , which acts as a wildcard. For example, to get all statements about myURI: `getStatementsRDFa(myURI, null, null)` + * @param Subject the subject of the RDF triple. + * @param Predicate the predicate of the RDF triple. + * @param Object the object of the RDF triple. + * @returns an iterator over all RDFa statements in the repository that match the parameters, represented as an enumeration of {@link Statement} + * @see Statement + * @see XRepository.getStatements + * @see XNamedGraph.getStatements + * @throws RepositoryException if an error occurs when accessing the repository. + */ + getStatementsRDFa(Subject: XResource, Predicate: XURI, Object: XNode): container.XEnumeration; + + /** + * remove the RDFa statement(s) that correspond to an ODF element from the repository. + * + * RDFa statements are handled specially because they are not logically part of any graph. + * @param Element the element whose RDFa statement(s) should be removed + * @throws com::sun::star::lang::IllegalArgumentException if the given Element is `NULL` , or of a type that can not have RDFa metadata attached. + * @throws RepositoryException if an error occurs when accessing the repository. + */ + removeStatementRDFa(Element: XMetadatable): void; + + /** + * update the RDFa statement(s) that correspond to an ODF element in the repository. + * + * This method will do the following steps: 1. Remove all previously set RDFa statements for the Object parameter from the repository 2. If the + * RDFaContent parameter is the empty `string` , for every Predicate in the given list of Predicates, add the following RDF statement to an unspecified + * named graph: `Subject Predicate XLiteral(Object->getText()^^RDFaDatatype)` 3. If the RDFaContent parameter is not the empty `string` , for every + * Predicate in the given list of Predicates, add the following RDF statement to an unspecified named graph: `Subject Predicate + * XLiteral(RDFaContent^^RDFaDatatype)` + * + * RDFa statements are handled specially because they are not logically part of any named graph in the repository. Also, they have rather unusual + * semantics; just using {@link XNamedGraph.addStatement()} would be ambiguous: if the object is a {@link XMetadatable} , do we insert the object itself + * ( {@link URI} ) or its literal content (RDFa)? + * @param Subject the subject of the RDF triple(s). + * @param Predicates the predicates of the RDF triple(s). + * @param Object the object of the RDF triple(s) is the text content of this parameter. + * @param RDFaContent the `rdfa:content` attribute (may be the empty `string` ). + * @param RDFaDatatype the `rdfa:datatype` attribute (may be `NULL` ) + * @throws com::sun::star::lang::IllegalArgumentException if any parameter is `NULL` , Predicates is empty, or Object is of a type that can not have RDFa me + * @throws RepositoryException if an error occurs when accessing the repository. + */ + setStatementRDFa(Subject: XResource, Predicates: LibreOffice.SeqEquiv, Object: XMetadatable, RDFaContent: string, RDFaDatatype: XURI): void; + } + + /** + * represents a literal that may occur in a RDF graph. + * + * RDF literals may come in three varieties: just a string ValueValue and Languagetyped literal: Value and Datatype (represented by an {@link URI} ) Note + * that there is no literal with both Language and Datatype. + * @see XRepository + * @since OOo 3.0 + */ + interface XLiteral extends XNode { + Datatype: XURI; + Language: string; + Value: string; + } + + /** + * marks an object representing an ODF element that may have RDF meta data attached. + * + * To make using ODF elements as part of RDF statements more convenient, this interface inherits from {@link XURI} . The {@link URI} is constructed by + * concatenating the {@link URI} of the document, the stream name, a fragment separator, and the XML ID. + * + * Note that using the {@link XURI} interface on an instance of {@link XMetadatable} may have the side effect of creating a metadata reference for the + * instance. + * @see XRepository + * @see XDocumentMetadataAccess + * @since OOo 3.2 + */ + interface XMetadatable extends XURI { + /** + * creates a metadata reference for this object, if necessary. + * + * If this object already has a metadata reference, do nothing; otherwise, create metadata reference with a fresh, unique XML ID and assign it to the + * MetadataReference attribute. + */ + ensureMetadataReference(): void; + + /** + * a metadata reference, comprising the stream name and the XML ID. + * + * Note that this metadata reference must be unique for the ODF document. This implies that the XML ID part must be unique for every stream. A pair of + * two empty strings signifies "no metadata reference". For example: Pair("content.xml", "foo-element-1") + * @throws com::sun::star::lang::IllegalArgumentException if the given metadata reference is invalid, or not unique + */ + MetadataReference: beans.StringPair; + } + + /** + * represents an RDF named graph that is stored in an RDF {@link Repository} . + * + * Note that this interface inherits from {@link XResource} : the name of the graph is the string value of the RDF node. This is so that you can easily + * make RDF statements about named graphs. + * + * Note that instances may be destroyed via {@link XRepository.destroyGraph()} . If a graph is destroyed, subsequent calls to {@link addStatement()} , + * {@link removeStatements()} will fail with an {@link com.sun.star.container.NoSuchElementException} . + * @see XRepository + * @since OOo 3.2 + */ + interface XNamedGraph extends XURI { + /** + * adds a RDF statement to the graph. + * + * Note that the ODF elements that can have metadata attached all implement the interface {@link XMetadatable} , which inherits from {@link XResource} , + * meaning that you can simply pass them in as arguments here, and it will magically work. + * @param Subject the subject of the RDF triple. + * @param Predicate the predicate of the RDF triple. + * @param Object the object of the RDF triple. + * @throws com::sun::star::lang::IllegalArgumentException if any parameter is `NULL` + * @throws com::sun::star::container::NoSuchElementException if this graph does not exist in the repository any more + * @throws RepositoryException if an error occurs when accessing the repository. + */ + addStatement(Subject: XResource, Predicate: XURI, Object: XNode): void; + + /** + * removes all statements from the graph. + * @throws com::sun::star::container::NoSuchElementException if this graph does not exist in the repository any more + * @throws RepositoryException if an error occurs when accessing the repository. + */ + clear(): void; + + /** + * returns the name of the graph. + * + * The name is unique within the repository. + * @returns the name of the graph + */ + getName(): XURI; + + /** + * gets matching RDF statements from a graph. + * + * Note that the ODF elements that can have metadata attached all implement the interface {@link XMetadatable} , which inherits from {@link XResource} , + * meaning that you can simply pass them in as arguments here, and it will magically work. + * + * Any parameter may be `NULL` , which acts as a wildcard. For example, to get all statements about myURI: `getStatements(myURI, null, null)` + * @param Subject the subject of the RDF triple. + * @param Predicate the predicate of the RDF triple. + * @param Object the object of the RDF triple. + * @returns an iterator over all RDF statements in the graph that match the parameters, represented as an enumeration of {@link Statement} + * @see Statement + * @throws com::sun::star::container::NoSuchElementException if this graph does not exist in the repository any more + * @throws RepositoryException if an error occurs when accessing the repository. + */ + getStatements(Subject: XResource, Predicate: XURI, Object: XNode): container.XEnumeration; + + /** + * returns the name of the graph. + * + * The name is unique within the repository. + * @returns the name of the graph + */ + readonly Name: XURI; + + /** + * removes matching RDF statements from the graph. + * + * Note that the ODF elements that can have metadata attached all implement the interface {@link XMetadatable} , which inherits from {@link XResource} , + * meaning that you can simply pass them in as arguments here, and it will magically work. + * + * Any parameter may be `NULL` , which acts as a wildcard. For example, to remove all statements about myURI: `removeStatement(myURI, null, null)` + * @param Subject the subject of the RDF triple. + * @param Predicate the predicate of the RDF triple. + * @param Object the object of the RDF triple. + * @throws com::sun::star::container::NoSuchElementException if this graph does not exist in the repository any more + * @throws RepositoryException if an error occurs when accessing the repository. + */ + removeStatements(Subject: XResource, Predicate: XURI, Object: XNode): void; + } + + /** + * represents a node that may occur in a RDF graph. + * + * In the RDF data model, there are three distinct types of nodes: {@link URIs} , blank nodes, and literals. + * + * `XNode; |; |---XLiteral; |; XResource; |; |---XBlankNode; |; XURI` + * @see XRepository + * @see Statement + * @see XResource + * @see XBlankNode + * @see XURI + * @see XLiteral + * @since OOo 3.0 + */ + interface XNode { + StringValue: string; + } + + /** + * represents the result of a SPARQL "SELECT" query. + * + * The result consists of: 1. a list of query variable names (column labels) 2. an iterator of query results (rows), each being a list of bindings for + * the above variables Note that each query result retrieved via {@link com.sun.star.container.XEnumeration.nextElement()} has the type {@link XNode} [], + * the length of the sequence being the same as the number of query variables. + * @see XRepository.querySelect + * @see XNode + * @since OOo 3.0 + */ + interface XQuerySelectResult extends container.XEnumeration { + /** get the names of the query variables. */ + readonly BindingNames: SafeArray; + + /** get the names of the query variables. */ + getBindingNames(): SafeArray; + } + + /** + * represents a reified RDF statement. + * @see XRepository + * @since OOo 3.0 + */ + interface XReifiedStatement extends XResource { + Statement: Statement; + } + + /** + * provides access to a set of named RDF graphs. + * + * A repository for storing information according to the data model of the [Resource Description Framework]{@link url="http://www.w3.org/RDF/"} . This + * interface may be used e.g. for repositories that correspond to a loaded ODF document, or for repositories that are backed by some kind of database. + * + * The RDF triples are stored as a set of named RDF graphs. Importing and exporting files in the [RDF/XML]{@link + * url="http://www.w3.org/TR/rdf-syntax-grammar/"} format is supported. Support for other file formats is optional. Support for querying the repository + * with the [SPARQL]{@link url="http://www.w3.org/TR/rdf-sparql-query/"} query language is provided. + * @see XRepositorySupplier + * @see XDocumentRepository + * @since OOo 3.2 + */ + interface XRepository { + /** + * creates a fresh unique blank node. + * @returns a newly generated blank node which is unique in this repository + */ + createBlankNode(): XBlankNode; + + /** + * creates a graph with the given name. + * + * The name must be unique within the repository. + * @param GraphName the name of the graph that is to be created + * @returns the graph with the given name + * @throws com::sun::star::lang::IllegalArgumentException if the given GraphName is invalid + * @throws com::sun::star::container::ElementExistException if a graph with the given GraphName already exists + * @throws RepositoryException if an error occurs when accessing the repository. + */ + createGraph(GraphName: XURI): XNamedGraph; + + /** + * destroys the graph with the given name, and removes it from the repository. + * + * This invalidates any instances of {@link XNamedGraph} for the argument. + * @param GraphName the name of the graph that is to be destroyed + * @throws com::sun::star::lang::IllegalArgumentException if the given GraphName is invalid + * @throws com::sun::star::container::NoSuchElementException if a graph with the given GraphName does not exist + * @throws RepositoryException if an error occurs when accessing the repository. + */ + destroyGraph(GraphName: XURI): void; + + /** + * exports a named graph from the repository. + * + * Implementations must support RDF/XML format. Support for other RDF formats is optional. If the format is not supported by the implementation, an + * {@link com.sun.star.datatransfer.UnsupportedFlavorException} is raised. + * @param Format the format of the output file + * @param OutStream the target output stream + * @param GraphName the name of the graph that is to be exported + * @param BaseURI a base {@link URI} to resolve relative {@link URI} references + * @see FileFormat + * @throws com::sun::star::lang::IllegalArgumentException if the given stream or the GraphName is `NULL` , or BaseURI is `NULL` and the format requires use + * @throws com::sun::star::datatransfer::UnsupportedFlavorException if the format requested is unknown or not supported + * @throws com::sun::star::container::NoSuchElementException if a graph with the given GraphName does not exist + * @throws RepositoryException if an error occurs when accessing the repository. + * @throws com::sun::star::io::IOException if an I/O error occurs. + */ + exportGraph(Format: number, OutStream: io.XOutputStream, GraphName: XURI, BaseURI: XURI): void; + + /** + * gets a graph by its name. + * @param GraphName the name of the graph that is to be returned + * @returns the graph with the given name if it exists, else `NULL` + * @throws com::sun::star::lang::IllegalArgumentException if the given GraphName is invalid + * @throws RepositoryException if an error occurs when accessing the repository. + */ + getGraph(GraphName: XURI): XNamedGraph; + + /** + * gets the names of all the graphs in the repository. + * @returns a list containing the names of the graphs in the repository + * @throws RepositoryException if an error occurs when accessing the repository. + */ + getGraphNames(): SafeArray; + + /** + * gets matching RDF statements from the repository. + * + * Any parameter may be `NULL` , which acts as a wildcard. For example, to get all statements about myURI: `getStatements(myURI, null, null)` + * @param Subject the subject of the RDF triple. + * @param Predicate the predicate of the RDF triple. + * @param Object the object of the RDF triple. + * @returns an iterator over all RDF statements in the repository that match the parameters, represented as an enumeration of {@link Statement} + * @see Statement + * @see XNamedGraph.getStatements + * @throws RepositoryException if an error occurs when accessing the repository. + */ + getStatements(Subject: XResource, Predicate: XURI, Object: XNode): container.XEnumeration; + + /** + * gets the names of all the graphs in the repository. + * @returns a list containing the names of the graphs in the repository + * @throws RepositoryException if an error occurs when accessing the repository. + */ + readonly GraphNames: SafeArray; + + /** + * imports a named graph into the repository. + * + * Implementations must support RDF/XML format. Support for other RDF formats is optional. If the format is not supported by the implementation, an + * {@link com.sun.star.datatransfer.UnsupportedFlavorException} is raised. If the format requires use of a BaseURI, but none is given, an {@link + * com.sun.star.lang.IllegalArgumentException} is raised. + * @param Format the format of the input file + * @param InStream the input stream, containing an RDF file in the specified format + * @param GraphName the name of the graph that is imported + * @param BaseURI a base {@link URI} to resolve relative {@link URI} references + * @returns the imported graph + * @see FileFormat + * @throws com::sun::star::lang::IllegalArgumentException if the given stream or the GraphName is `NULL` , or BaseURI is `NULL` and the format requires use + * @throws com::sun::star::datatransfer::UnsupportedFlavorException if the format requested is unknown or not supported + * @throws com::sun::star::container::ElementExistException if a graph with the given GraphName already exists in the repository + * @throws ParseException if the input does not conform to the specified file format. + * @throws RepositoryException if an error occurs when accessing the repository. + * @throws com::sun::star::io::IOException if an I/O error occurs. + */ + importGraph(Format: number, InStream: io.XInputStream, GraphName: XURI, BaseURI: XURI): XNamedGraph; + + /** + * executes a SPARQL "ASK" query. + * + * This method runs a SPARQL query that computes a boolean, i.e., a query beginning with "ASK". + * @param Query the SPARQL query `string` + * @returns the boolean query result + * @throws QueryException if the query is malformed, or evaluation fails + * @throws RepositoryException if an error occurs when accessing the repository. + */ + queryAsk(Query: string): boolean; + + /** + * executes a SPARQL "CONSTRUCT" query. + * + * This method runs a SPARQL query that constructs a result graph, i.e., a query beginning with "CONSTRUCT". + * @param Query the SPARQL query `string` + * @returns an iterator over the query result graph, represented as an enumeration of {@link Statement} + * @see Statement + * @throws QueryException if the query is malformed, or evaluation fails + * @throws RepositoryException if an error occurs when accessing the repository. + */ + queryConstruct(Query: string): container.XEnumeration; + + /** + * executes a SPARQL "SELECT" query. + * + * This method runs a SPARQL query that returns a list of variable bindings, i.e., a query beginning with "SELECT". The result is basically a + * (rectangular) table with labeled columns, where individual cells may be `NULL` . + * @param Query the SPARQL query `string` + * @returns an enumeration, containing {{ordered list here, see documentation}} + * @see XQuerySelectResult + * @throws QueryException if the query is malformed, or evaluation fails + * @throws RepositoryException if an error occurs when accessing the repository. + */ + querySelect(Query: string): XQuerySelectResult; + } + + /** + * provides access to an RDF {@link Repository} . + * @see XRepository + * @since OOo 3.0 + */ + interface XRepositorySupplier { + /** + * provides the RDF {@link Repository} associated with this object. + * @returns an object of type {@link XRepository} + */ + getRDFRepository(): XRepository; + + /** + * provides the RDF {@link Repository} associated with this object. + * @returns an object of type {@link XRepository} + */ + readonly RDFRepository: XRepository; + } + + /** + * represents an {@link URI} node that may occur in a RDF graph. + * + * Note that this is actually an IRI, but the RDF literature speaks of {@link URIs} only, so we chose to use established terminology. + * + * The {@link URI} is split into a Namespace and a LocalName, using the first applicable of the following criteria: 1. after the first occurrence of the + * fragment separator: "#" 2. after the last occurrence of the path separator: "/" 3. after the last occurrence of the scheme separator: ":" An {@link + * URI} without a ":" is invalid. This implies that the Namespace part of an {@link URI} must not be empty, while the LocalName part may be empty. + * @see XRepository + * @since OOo 3.0 + */ + interface XURI extends XResource { + LocalName: string; + Namespace: string; + } + + namespace FileFormat { + const enum Constants { + N3 = 1, + NTRIPLES = 2, + RDF_XML = 0, + TRIG = 3, + TRIX = 4, + TURTLE = 5, + } + } + + namespace URIs { + const enum Constants { + ODF_CONTENTFILE = 2103, + ODF_ELEMENT = 2102, + ODF_PREFIX = 2100, + ODF_STYLESFILE = 2104, + ODF_SUFFIX = 2101, + OWL_ALLDIFFERENT = 1211, + OWL_ALLVALUESFROM = 1219, + OWL_ANNOTATIONPROPERTY = 1232, + OWL_BACKWARDCOMPATIBLEWITH = 1228, + OWL_CARDINALITY = 1223, + OWL_CLASS = 1200, + OWL_COMPLEMENTOF = 1238, + OWL_DATARANGE = 1235, + OWL_DATATYPEPROPERTY = 1202, + OWL_DEPRECATEDCLASS = 1230, + OWL_DEPRECATEDPROPERTY = 1231, + OWL_DIFFERENTFROM = 1210, + OWL_DISJOINTWITH = 1236, + OWL_DISTINCTMEMBERS = 1212, + OWL_EQUIVALENTCLASS = 1207, + OWL_EQUIVALENTPROPERTY = 1208, + OWL_FUNCTIONALPROPERTY = 1203, + OWL_HASVALUE = 1240, + OWL_IMPORTS = 1225, + OWL_INCOMPATIBLEWITH = 1229, + OWL_INDIVIDUAL = 1206, + OWL_INTERSECTIONOF = 1239, + OWL_INVERSEFUNCTIONALPROPERTY = 1216, + OWL_INVERSEOF = 1213, + OWL_MAXCARDINALITY = 1222, + OWL_MINCARDINALITY = 1221, + OWL_NOTHING = 1205, + OWL_OBJECTPROPERTY = 1201, + OWL_ONEOF = 1234, + OWL_ONPROPERTY = 1218, + OWL_ONTOLOGY = 1224, + OWL_ONTOLOGYPROPERTY = 1233, + OWL_PRIORVERSION = 1227, + OWL_RESTRICTION = 1217, + OWL_SAMEAS = 1209, + OWL_SOMEVALUESFROM = 1220, + OWL_SYMMETRICPROPERTY = 1215, + OWL_THING = 1204, + OWL_TRANSITIVEPROPERTY = 1214, + OWL_UNIONOF = 1237, + OWL_VERSIONINFO = 1226, + PKG_DOCUMENT = 2008, + PKG_ELEMENT = 2005, + PKG_FILE = 2006, + PKG_HASPART = 2000, + PKG_METADATAFILE = 2007, + PKG_MIMETYPE = 2003, + PKG_PACKAGE = 2004, + RDF_1 = 1015, + RDF_ALT = 1011, + RDF_BAG = 1012, + RDF_FIRST = 1007, + RDF_LIST = 1013, + RDF_NIL = 1009, + RDF_OBJECT = 1003, + RDF_PREDICATE = 1002, + RDF_PROPERTY = 1004, + RDF_REST = 1008, + RDF_SEQ = 1014, + RDF_STATEMENT = 1005, + RDF_SUBJECT = 1001, + RDF_TYPE = 1000, + RDF_VALUE = 1006, + RDF_XMLLITERAL = 1010, + RDFS_CLASS = 1111, + RDFS_COMMENT = 1100, + RDFS_CONTAINER = 1113, + RDFS_CONTAINERMEMBERSHIPPROPERTY = 1114, + RDFS_DATATYPE = 1112, + RDFS_DOMAIN = 1102, + RDFS_ISDEFINEDBY = 1108, + RDFS_LABEL = 1101, + RDFS_LITERAL = 1105, + RDFS_MEMBER = 1106, + RDFS_RANGE = 1103, + RDFS_RESOURCE = 1110, + RDFS_SEEALSO = 1109, + RDFS_SUBCLASSOF = 1104, + RDFS_SUBPROPERTYOF = 1107, + XSD_ANYURI = 31, + XSD_BASE64BINARY = 22, + XSD_BOOLEAN = 4, + XSD_BYTE = 16, + XSD_DATE = 25, + XSD_DATETIME = 23, + XSD_DECIMAL = 5, + XSD_DOUBLE = 7, + XSD_DURATION = 36, + XSD_ENTITIES = 44, + XSD_ENTITY = 43, + XSD_FLOAT = 6, + XSD_GDAY = 29, + XSD_GMONTH = 30, + XSD_GMONTHDAY = 28, + XSD_GYEAR = 27, + XSD_GYEARMONTH = 26, + XSD_HEXBINARY = 21, + XSD_ID = 40, + XSD_IDREF = 41, + XSD_IDREFS = 42, + XSD_INT = 14, + XSD_INTEGER = 8, + XSD_LANGUAGE = 33, + XSD_LONG = 13, + XSD_NAME = 35, + XSD_NCNAME = 1, + XSD_NEGATIVEINTEGER = 12, + XSD_NMTOKEN = 34, + XSD_NMTOKENS = 39, + XSD_NONNEGATIVEINTEGER = 9, + XSD_NONPOSITIVEINTEGER = 11, + XSD_NORMALIZEDSTRING = 3, + XSD_NOTATION = 38, + XSD_POSITIVEINTEGER = 10, + XSD_QNAME = 37, + XSD_SHORT = 15, + XSD_STRING = 2, + XSD_TIME = 24, + XSD_TOKEN = 32, + XSD_UNSIGNEDBYTE = 20, + XSD_UNSIGNEDINT = 18, + XSD_UNSIGNEDLONG = 17, + XSD_UNSIGNEDSHORT = 19, + } + } + } + + namespace reflection { + /** + * thrown in case that a certain type name does exist, but does not meet some other criteria. + * @since OOo 1.1.2 + */ + type InvalidTypeNameException = uno.Exception; + + /** + * This exception denotes a checked exception (wrapping an originating exception) and may be thrown upon using invocation API. + * @see XIdlMethod + */ + type InvocationTargetException = lang.WrappedTargetException; + + /** + * thrown in case that a certain type name does not exist. + * @since OOo 1.1.2 + */ + type NoSuchTypeNameException = uno.Exception; + + /** + * Service to create proxy objects acting on behalf of a given target object. ; A proxy delegates calls to a given target object. In addition, it is + * aggregatable, thus it is possible to intercept calls on the proxy's interfaces. + * @deprecated DeprecatedAggregation will no longer be supported as a high-level concept of UNO. You may still have the option to implement an UNO object consis + */ + type ProxyFactory = XProxyFactory; + + /** @since LibreOffice 4.0 */ + type theCoreReflection = XIdlReflection; + + /** Denotes the access possibilities via {@link XIdlField2} to an interface attribute, enum or compound type (struct/exception). */ + const enum FieldAccessMode { + /** + * Deprecated. Not used anymore. + * @deprecated Deprecated + */ + CONST = 3, + /** readable only */ + READONLY = 1, + /** readable and writeable */ + READWRITE = 0, + /** writeable only */ + WRITEONLY = 2, + } + + /** + * MethodMode denotes the mode in which method calls are run, i.e. either oneway or twoway. Mode oneway denotes that a call may be run asynchronously + * (thus having no out parameters or return value) + */ + const enum MethodMode { + /** method may be run asynchronously */ + ONEWAY = 0, + /** method is run The */ + TWOWAY = 1, + } + + /** The parameter mode denotes the transfer between caller and callee of a method. */ + const enum ParamMode { + /** parameter serves as pure input for a called method */ + IN = 0, + /** parameter serves as input as well as output; data can transferred in both directions */ + INOUT = 2, + /** parameter serves as pure output for the callee (in addition to the return value) */ + OUT = 1, + } + + /** + * Defines depths for searching through type description collections. + * @since OOo 1.1.2 + */ + const enum TypeDescriptionSearchDepth { + /** Infinite search depth. Search through all children including direct children, grand children, grand children's children, ... */ + INFINITE = -1, + /** Search only through direct children. */ + ONE = 1, + } + + /** + * This service is the implementation of the reflection API. You can obtain information about types, modify values of reflected types and call on + * objects. + * @deprecated DeprecatedRather use the 'theCoreReflection' singleton. + */ + interface CoreReflection extends XIdlReflection, lang.XComponent { } + + /** Provides information about a formal parameter of a method. */ + interface ParamInfo { + /** parameter mode: in, out, inout */ + aMode: ParamMode; + + /** name of the parameter */ + aName: string; + + /** formal type of the parameter */ + aType: XIdlClass; + } + + /** + * This service manages type descriptions and acts as a central access point to every type description. It delegates calls for demanded types to + * subsequent com::sun::star::reflection::TypeDescriptionProviders and may cache type descriptions. ; Using cppuhelper's bootstrapping routines + * bootstrapping an initial component context, there is a singleton accessible via key "/singletons/com.sun.star.reflection.theTypeDescriptionManager". + * This singleton object is hooked into the C UNO runtime typelib and lives until the context is shut down. ; + * @see com.sun.star.reflection.TypeDescriptionProvider + * @see com.sun.star.reflection.XTypeDescription + */ + interface TypeDescriptionManager extends container.XHierarchicalNameAccess, container.XSet, lang.XComponent, XTypeDescriptionEnumerationAccess { } + + /** + * This service provides type descriptions, i.e. concrete service implementations read from source like the persistent registry database format. ; + * + * This old-style service definition mostly serves documentation purposes. It is not intended that an implementation of this service can be obtained at + * the global service manager using this service identifier. + * @see com.sun.star.reflection.TypeDescriptionManager + * @see com.sun.star.reflection.XTypeDescription + */ + interface TypeDescriptionProvider extends container.XHierarchicalNameAccess, lang.XComponent, XTypeDescriptionEnumerationAccess { } + + /** + * Deprecated, UNOIDL does not have an array concept. + * @deprecated Deprecated + */ + interface XArrayTypeDescription extends XTypeDescription { + /** + * Returns dimensions of array (same length as {@link getNumberOfDimensions()} ). + * @returns dimensions of array + */ + readonly Dimensions: SafeArray; + + /** + * Returns dimensions of array (same length as {@link getNumberOfDimensions()} ). + * @returns dimensions of array + */ + getDimensions(): SafeArray; + + /** + * Returns the number of dimensions of the array. + * @returns dimension of the array + */ + getNumberOfDimensions(): number; + + /** + * Returns the element type of the array. + * @returns element type of the array + */ + getType(): XTypeDescription; + + /** + * Returns the number of dimensions of the array. + * @returns dimension of the array + */ + readonly NumberOfDimensions: number; + + /** + * Returns the element type of the array. + * @returns element type of the array + */ + readonly Type: XTypeDescription; + } + + /** + * Reflects a compound type, i.e. a struct or exception. + * + * For struct types, this type is superseded by {@link XStructTypeDescription} , which supports polymorphic struct types. + */ + interface XCompoundTypeDescription extends XTypeDescription { + /** + * Returns the type of the base type of the compound type. If the compound does not have a base type, the method returns a null interface. + * @returns base interface or null + */ + readonly BaseType: XTypeDescription; + + /** + * Returns the type of the base type of the compound type. If the compound does not have a base type, the method returns a null interface. + * @returns base interface or null + */ + getBaseType(): XTypeDescription; + + /** + * Returns the member names of the struct/exception in IDL declaration order. + * @returns members names of struct/exception + */ + getMemberNames(): SafeArray; + + /** + * Returns the member types of the struct/exception in IDL declaration order. + * + * For a polymorphic struct type template, a member of parameterized type is represented by an instance of {@link + * com.sun.star.reflection.XTypeDescription} whose type class is `UNKNOWN` and whose name is the name of the type parameter. + * @returns members of struct/exception + */ + getMemberTypes(): SafeArray; + + /** + * Returns the member names of the struct/exception in IDL declaration order. + * @returns members names of struct/exception + */ + readonly MemberNames: SafeArray; + + /** + * Returns the member types of the struct/exception in IDL declaration order. + * + * For a polymorphic struct type template, a member of parameterized type is represented by an instance of {@link + * com.sun.star.reflection.XTypeDescription} whose type class is `UNKNOWN` and whose name is the name of the type parameter. + * @returns members of struct/exception + */ + readonly MemberTypes: SafeArray; + } + + /** + * Reflects a constants group. + * + * The type class of this type is com::sun::star::uno::TypeClass::CONSTANTS. + * @since OOo 1.1.2 + */ + interface XConstantsTypeDescription extends XTypeDescription { + /** + * Returns the contstants defined for this constants group. + * @returns a sequence containing constants descriptions. + */ + readonly Constants: SafeArray; + + /** + * Returns the contstants defined for this constants group. + * @returns a sequence containing constants descriptions. + */ + getConstants(): SafeArray; + } + + /** + * Reflects a constant. + * + * The type class of this type is com::sun::star::uno::TypeClass::CONSTANT. + * + * Constants may be contained in constants groups and modules. + * @see XModuleTypeDescription + * @see XConstantsTypeDescription + * @since OOo 1.1.2 + */ + interface XConstantTypeDescription extends XTypeDescription { + /** @returns the value of the constant. Following types are allowed for constants: booleanbyteshortunsigned shortlongunsigned longhyperunsigned hyperfloatdouble */ + readonly ConstantValue: any; + + /** @returns the value of the constant. Following types are allowed for constants: booleanbyteshortunsigned shortlongunsigned longhyperunsigned hyperfloatdouble */ + getConstantValue(): any; + } + + /** Reflects an enum type. */ + interface XEnumTypeDescription extends XTypeDescription { + /** + * Returns the default enum value. + * @returns default enum value + */ + readonly DefaultEnumValue: number; + + /** + * Returns the enum member values. + * @returns enum member values + */ + readonly EnumNames: SafeArray; + + /** + * Returns the enum member names. + * @returns enum member names + */ + readonly EnumValues: SafeArray; + + /** + * Returns the default enum value. + * @returns default enum value + */ + getDefaultEnumValue(): number; + + /** + * Returns the enum member values. + * @returns enum member values + */ + getEnumNames(): SafeArray; + + /** + * Returns the enum member names. + * @returns enum member names + */ + getEnumValues(): SafeArray; + } + + /** + * Reflects an IDL sequence and provides dynamic access to instances of that sequence. This interface supports widening conversion when getting or + * setting elements. + */ + interface XIdlArray extends uno.XInterface { + /** + * Returns element at given index. + * @param aArray sequence instance + * @param nIndex index + * @returns value + * @throws IllegalArgumentException if the specified object is not a sequence or if the specified object is null + * @throws ArrayIndexOutOfBoundsException if the specified index argument is negative, or if it is greater than or equal to the length of the specified sequence. + */ + get(aArray: any, nIndex: number): any; + + /** + * Returns the length of the given sequence. + * @param array sequence instance + * @returns length of sequence + */ + getLen(array: any): number; + + /** + * Rellocates the length of the sequence instance. + * @param array sequence instance + * @param length new length of sequence + */ + realloc(array: [any], length: number): void; + + /** + * Sets a new value at given index. + * @param aArray sequence instance + * @param nIndex index + * @param aNewValue new value to be set + * @throws IllegalArgumentException if the specified object is not a sequence or if the specified object is null + * @throws ArrayIndexOutOfBoundsException if the specified index argument is negative, or if it is greater than or equal to the length of the specified sequence. + */ + set(aArray: [any], nIndex: number, aNewValue: any): void; + } + + /** Provides information reflecting an UNO type. */ + interface XIdlClass extends uno.XInterface { + /** + * If the reflected type is an array, then you get a {@link XIdlArray} interface to modify instances of the array type. ; If the reflected type is not + * an array, then a null-reference is returned. + * @returns interface to modify array instances (or null-reference) + */ + readonly Array: XIdlArray; + + /** + * Deprecated. Do not call. + * @deprecated Deprecated + */ + readonly Classes: SafeArray; + + /** + * If the reflected type is an array or sequence, then this method returns a {@link XIdlClass} interface reflecting the element. + * @returns reflection interface of the element type of an array or sequence type (null-reference otherwise). + */ + readonly ComponentType: XIdlClass; + + /** + * This method creates instances of the reflected type. + * @param obj pure out parameter to pass the created instance + */ + createObject(obj: [T]): void; + + /** + * Tests whether two reflecting objects reflect the same type. + * @returns true, if the objects reflect the same type, false otherwise. + */ + equals(Type: XIdlClass): boolean; + + /** + * If the reflected type is an interface, struct or union, then you get a sequence of {@link XIdlField} interfaces reflecting all fields (/interface + * attributes). This also includes all inherited fields (/interface attributes) of the interface, struct of union. ; If the reflected type is not an + * interface, struct or union or the interface, struct or union does not have any field (/interface attribute), then an empty sequence is returned. + * @returns all field (/interface attribute) reflections (or empty sequence) + */ + readonly Fields: SafeArray; + + /** + * If the reflected type is an array, then you get a {@link XIdlArray} interface to modify instances of the array type. ; If the reflected type is not + * an array, then a null-reference is returned. + * @returns interface to modify array instances (or null-reference) + */ + getArray(): XIdlArray; + + /** + * Deprecated. Do not call. + * @deprecated Deprecated + */ + getClass(aName: string): XIdlClass; + + /** + * Deprecated. Do not call. + * @deprecated Deprecated + */ + getClasses(): SafeArray; + + /** + * If the reflected type is an array or sequence, then this method returns a {@link XIdlClass} interface reflecting the element. + * @returns reflection interface of the element type of an array or sequence type (null-reference otherwise). + */ + getComponentType(): XIdlClass; + + /** + * If the reflected type is an interface, struct or union, then you get a {@link XIdlField} interface reflecting the demanded field (/interface + * attribute) by name. ; If the reflected type is not an interface, struct or union or the interface, struct or union does not have a field (/interface + * attribute) with the demanded name, then a null-reference is returned. + * @param aName name of the demanded field reflection + * @returns demanded field (/interface attribute) reflection (or null-reference) + */ + getField(aName: string): XIdlField; + + /** + * If the reflected type is an interface, struct or union, then you get a sequence of {@link XIdlField} interfaces reflecting all fields (/interface + * attributes). This also includes all inherited fields (/interface attributes) of the interface, struct of union. ; If the reflected type is not an + * interface, struct or union or the interface, struct or union does not have any field (/interface attribute), then an empty sequence is returned. + * @returns all field (/interface attribute) reflections (or empty sequence) + */ + getFields(): SafeArray; + + /** + * Deprecated. Do not call. + * @deprecated Deprecated + */ + getInterfaces(): SafeArray; + + /** + * If the reflected type is an interface, then you get a {@link XIdlMethod} interface reflecting the demanded method by name. ; If the reflected type is + * not an interface or the interface does not have a method with the demanded name (including inherited methods), then a null-reference is returned. + * @param aName name of demanded method reflection + * @returns demanded method reflection (or null-reference) + */ + getMethod(aName: string): XIdlMethod; + + /** + * If the reflected type is an interface, then you get a sequence of {@link XIdlMethod} interfaces reflecting all methods of the interface. This also + * includes the inherited methods of the interface. ; If the reflected type is not an interface or the interface does not have any methods, then a + * null-reference is returned. + * @returns all method reflections (or empty sequence) + */ + getMethods(): SafeArray; + + /** + * Returns the fully-qualified name of the reflected type. + * @returns the fully-qualified name of the type + */ + getName(): string; + + /** + * If the reflected type is an interface, then the returned sequence of {@link XIdlClass} reflect the base interfaces. ; If the reflected type is not an + * interface or an interface that is not derived from another, then an empty sequence is returned. + * @returns all base interfaces of an interface type or an empty sequence. + */ + getSuperclasses(): SafeArray; + + /** + * Returns the {@link com.sun.star.uno.TypeClass} of the reflected type. + * @returns type class of the reflected type. + */ + getTypeClass(): uno.TypeClass; + + /** + * Deprecated. Do not call. + * @deprecated Deprecated + */ + getUik(): uno.Uik; + + /** + * Deprecated. Do not call. + * @deprecated Deprecated + */ + readonly Interfaces: SafeArray; + + /** + * Tests whether values of this reflected type are assignable from values of a second one ( `xType` ). + * @param xType another reflected type + * @returns true, if values of this reflected type are assignable from values of `xType` . + */ + isAssignableFrom(xType: XIdlClass): boolean; + + /** + * If the reflected type is an interface, then you get a sequence of {@link XIdlMethod} interfaces reflecting all methods of the interface. This also + * includes the inherited methods of the interface. ; If the reflected type is not an interface or the interface does not have any methods, then a + * null-reference is returned. + * @returns all method reflections (or empty sequence) + */ + readonly Methods: SafeArray; + + /** + * Returns the fully-qualified name of the reflected type. + * @returns the fully-qualified name of the type + */ + readonly Name: string; + + /** + * If the reflected type is an interface, then the returned sequence of {@link XIdlClass} reflect the base interfaces. ; If the reflected type is not an + * interface or an interface that is not derived from another, then an empty sequence is returned. + * @returns all base interfaces of an interface type or an empty sequence. + */ + readonly Superclasses: SafeArray; + + /** + * Returns the {@link com.sun.star.uno.TypeClass} of the reflected type. + * @returns type class of the reflected type. + */ + readonly TypeClass: uno.TypeClass; + + /** + * Deprecated. Do not call. + * @deprecated Deprecated + */ + readonly Uik: uno.Uik; + } + + /** + * Deprecated interface. Do not use anymore. + * @deprecated Deprecated + */ + interface XIdlClassProvider extends uno.XInterface { + getIdlClasses(): SafeArray; + readonly IdlClasses: SafeArray; + } + + /** + * Deprecated. Use {@link com.sun.star.reflection.XIdlField2} instead. + * @deprecated Deprecated + */ + interface XIdlField extends XIdlMember { + readonly AccessMode: FieldAccessMode; + get(obj: any): any; + getAccessMode(): FieldAccessMode; + getType(): XIdlClass; + set(obj: any, value: any): void; + readonly Type: XIdlClass; + } + + /** Reflects an IDL interface attribute, enum or compound type (i.e. struct/exception) member. */ + interface XIdlField2 extends XIdlMember { + /** + * Returns the access mode of the field, i.e. read-write, read-only or write-only (access mode "const" is deprecated). + * @returns access mode of the field + */ + readonly AccessMode: FieldAccessMode; + + /** + * Gets the value of the reflected field from the given object, i.e. an interface, enum or compound type (struct/exception). For enums, the given object + * is ignored; the returned value reflects the constant enum 32-bit value. + * + * When setting an interface attribute raises a non {@link com.sun.star.uno.RuntimeException} , it is wrapped in a {@link + * com.sun.star.lang.WrappedTargetRuntimeException} . + * @param obj object instance having member of reflected type + * @returns value of field + * @throws IllegalAccessException An {@link com.sun.star.lang.IllegalAccessException} is thrown if the given object is no interface, enum or compound type; + */ + get(obj: any): any; + + /** + * Returns the access mode of the field, i.e. read-write, read-only or write-only (access mode "const" is deprecated). + * @returns access mode of the field + */ + getAccessMode(): FieldAccessMode; + + /** + * Returns the type of the field. + * @returns type of the field + */ + getType(): XIdlClass; + + /** + * Sets the value of the reflected field of the given object, i.e. an interface or compound type (struct/exception). + * + * When setting an interface attribute raises a non {@link com.sun.star.uno.RuntimeException} , it is wrapped in a {@link + * com.sun.star.lang.WrappedTargetRuntimeException} . + * @param obj object instance having member of reflected type + * @param value value to be set + * @throws IllegalAccessException An {@link com.sun.star.lang.IllegalAccessException} is thrown if the given object is no interface or compound type; or the + */ + set(obj: [any], value: any): void; + + /** + * Returns the type of the field. + * @returns type of the field + */ + readonly Type: XIdlClass; + } + + /** Base interface for XIdlField2s and XIdlMethods. */ + interface XIdlMember extends uno.XInterface { + /** + * Returns the declaring type of this field, i.e. the type having the member declared (interface, enum, struct, exception). + * @returns declaring type + */ + readonly DeclaringClass: XIdlClass; + + /** + * Returns the declaring type of this field, i.e. the type having the member declared (interface, enum, struct, exception). + * @returns declaring type + */ + getDeclaringClass(): XIdlClass; + + /** + * Returns the fully-qualified name of the member. + * @returns fully-qualified name of the member + */ + getName(): string; + + /** + * Returns the fully-qualified name of the member. + * @returns fully-qualified name of the member + */ + readonly Name: string; + } + + /** Reflects an IDL interface method. */ + interface XIdlMethod extends XIdlMember { + /** + * Returns the declared exceptions types of the reflected method. + * @returns declared exception types of reflected method + */ + readonly ExceptionTypes: SafeArray; + + /** + * Returns the declared exceptions types of the reflected method. + * @returns declared exception types of reflected method + */ + getExceptionTypes(): SafeArray; + + /** + * Returns the method mode in which calls are run, i.e. either oneway or twoway. Method mode oneway denotes that a call may be run asynchronously (thus + * having no out parameters or return value) + * @returns method mode of reflected method + */ + getMode(): MethodMode; + + /** + * Returns formal parameter information of the reflected method in order of IDL declaration. Parameter information reflects the parameter's access mode + * (in, out, inout), the parameter's name and formal type. + * @returns parameter information of reflected method + */ + getParameterInfos(): SafeArray; + + /** + * Returns the formal parameter types of the reflected method in order of IDL declaration. + * @returns formal parameter types of reflected method + */ + getParameterTypes(): SafeArray; + + /** + * Returns the return type of the reflected method. + * @returns return type of reflected method + */ + getReturnType(): XIdlClass; + + /** + * Invokes the reflected method on a given object with the given parameters. The parameters may be widening converted to fit their exact IDL type, + * meaning no loss of information. + * @param obj object to call on + * @param args arguments passed to the method + * @returns return value of the method call (may be empty for methods returning void) + * @throws IllegalArgumentException if the given object is a nuull reference or does not support the reflected method's interface + * @throws IllegalArgumentException if the given number of arguments differ from the expected number or the given arguments' types differ from the expected + * @throws InvocationTargetException if the reflected method that has been invoked has thrown an exception. The original exception will be wrapped up and si + */ + invoke(obj: any, args: [LibreOffice.SeqEquiv]): any; + + /** + * Returns the method mode in which calls are run, i.e. either oneway or twoway. Method mode oneway denotes that a call may be run asynchronously (thus + * having no out parameters or return value) + * @returns method mode of reflected method + */ + readonly Mode: MethodMode; + + /** + * Returns formal parameter information of the reflected method in order of IDL declaration. Parameter information reflects the parameter's access mode + * (in, out, inout), the parameter's name and formal type. + * @returns parameter information of reflected method + */ + readonly ParameterInfos: SafeArray; + + /** + * Returns the formal parameter types of the reflected method in order of IDL declaration. + * @returns formal parameter types of reflected method + */ + readonly ParameterTypes: SafeArray; + + /** + * Returns the return type of the reflected method. + * @returns return type of reflected method + */ + readonly ReturnType: XIdlClass; + } + + /** + * Interface to reflect types. + * @see CoreReflection + * @see XIdlClass + */ + interface XIdlReflection extends uno.XInterface { + forName(aTypeName: K): XIdlClass; + + /** + * Obtaining a reflection interface for a type. You specify the type by its name. If the given type name can not be reflected, then a null-reference is + * returned. + * @param aTypeName the type's name + * @returns reflection interface for the demanded type (or null) + */ + forName(aTypeName: string): XIdlClass; + + /** + * Obtaining a reflection interface for an object. This method takes the type of the object the any contains into account. If the any contains no object, + * then a null-reference is returned. + * @param aObj an object + * @returns reflection interface of the type of the demanded object (or null) + */ + getType(aObj: any): XIdlClass; + } + + /** Reflects a typedef or sequence type. The type class of this description is TypeClass_TYPEDEF or TypeClass_SEQUENCE. */ + interface XIndirectTypeDescription extends XTypeDescription { + /** + * Returns the typedefed type, if the type is a typedef, or the element type, if the type is a sequence. + * @returns referenced type + */ + getReferencedType(): XTypeDescription; + + /** + * Returns the typedefed type, if the type is a typedef, or the element type, if the type is a sequence. + * @returns referenced type + */ + readonly ReferencedType: XTypeDescription; + } + + /** + * Reflects an interface attribute type. + * + * This type is superseded by {@link XInterfaceAttributeTypeDescription2} , which supports extended attributes. + * + * The type class of this type is TypeClass_INTERFACE_ATTRIBUTE. + */ + interface XInterfaceAttributeTypeDescription extends XInterfaceMemberTypeDescription { + /** + * Returns the type of the attribute. + * @returns type of attribute + */ + getType(): XTypeDescription; + + /** + * Returns true, if this attribute is read-only. + * @returns true, if attribute is read-only + */ + isReadOnly(): boolean; + + /** + * Returns the type of the attribute. + * @returns type of attribute + */ + readonly Type: XTypeDescription; + } + + /** + * Reflects an interface attribute, supporting extended attributes that are bound or raise exceptions. + * + * This type supersedes {@link XInterfaceAttributeTypeDescription} , which does not support extended attributes. + * @since OOo 2.0 + */ + interface XInterfaceAttributeTypeDescription2 extends XInterfaceAttributeTypeDescription { + /** + * Returns the exceptions that can be raised by the attribute's getter. + * @returns the reflections of all the exceptions that are listed in the `raises` specification of the attribute's getter (if any), in no particular order; a + */ + readonly GetExceptions: SafeArray; + + /** + * Returns the exceptions that can be raised by the attribute's getter. + * @returns the reflections of all the exceptions that are listed in the `raises` specification of the attribute's getter (if any), in no particular order; a + */ + getGetExceptions(): SafeArray; + + /** + * Returns the exceptions that can be raised by the attribute's setter. + * @returns the reflections of all the exceptions that are listed in the `raises` specification of the attribute's setter (if any), in no particular order; a + */ + getSetExceptions(): SafeArray; + + /** + * Returns whether this object reflects a bound attribute. + * @returns `TRUE` iff this object reflects a bound attribute + */ + isBound(): boolean; + + /** + * Returns the exceptions that can be raised by the attribute's setter. + * @returns the reflections of all the exceptions that are listed in the `raises` specification of the attribute's setter (if any), in no particular order; a + */ + readonly SetExceptions: SafeArray; + } + + /** + * Base interface for reflected interface members. + * @see XInterfaceAttributeTypeDescription + * @see XInterfaceMethodTypeDescription + */ + interface XInterfaceMemberTypeDescription extends XTypeDescription { + /** + * Returns name of member + * @returns member name + */ + getMemberName(): string; + + /** + * Returns the position the member including all inherited members of base interfaces. + * @returns position of member + */ + getPosition(): number; + + /** + * Returns name of member + * @returns member name + */ + readonly MemberName: string; + + /** + * Returns the position the member including all inherited members of base interfaces. + * @returns position of member + */ + readonly Position: number; + } + + /** Reflects an interface method type. The type class of this type is TypeClass_INTERFACE_METHOD. */ + interface XInterfaceMethodTypeDescription extends XInterfaceMemberTypeDescription { + /** + * Returns declared exceptions that may occur upon invocations of the method. + * @returns declared exceptions of method + */ + readonly Exceptions: SafeArray; + + /** + * Returns declared exceptions that may occur upon invocations of the method. + * @returns declared exceptions of method + */ + getExceptions(): SafeArray; + + /** + * Returns all parameters of the method in order of IDL declaration. + * @returns method parameters + */ + getParameters(): SafeArray; + + /** + * Returns the method's return type. + * @returns method's return type + */ + getReturnType(): XTypeDescription; + + /** + * Returns true, if this method is declared oneway. + * @returns true, if this method is declared oneway + */ + isOneway(): boolean; + + /** + * Returns all parameters of the method in order of IDL declaration. + * @returns method parameters + */ + readonly Parameters: SafeArray; + + /** + * Returns the method's return type. + * @returns method's return type + */ + readonly ReturnType: XTypeDescription; + } + + /** + * Reflects an interface type. + * + * This type is superseded by {@link XInterfaceTypeDescription2} , which supports multiple inheritance. + * @see XInterfaceMemberTypeDescription + */ + interface XInterfaceTypeDescription extends XTypeDescription { + /** + * Returns the base interface or null, if the reflected interface is not inherited from another. + * + * This method is deprecated, as it only supports single inheritance. See {@link XInterfaceTypeDescription2} for a replacement that supports multiple + * inheritance. + * @deprecated Deprecated + * @returns base interface or null + */ + readonly BaseType: XTypeDescription; + + /** + * Returns the base interface or null, if the reflected interface is not inherited from another. + * + * This method is deprecated, as it only supports single inheritance. See {@link XInterfaceTypeDescription2} for a replacement that supports multiple + * inheritance. + * @deprecated Deprecated + * @returns base interface or null + */ + getBaseType(): XTypeDescription; + + /** + * Returns the members of the interfaces, i.e. attributes and methods. + * @returns interface members + */ + getMembers(): SafeArray; + + /** + * Deprecated. UIK are not used anymore, a type is uniquely identified by its name. ; Returns the UIK, i.e. the unique identifier of the interface. + * @deprecated Deprecated + * @returns uik of the interface + */ + getUik(): uno.Uik; + + /** + * Returns the members of the interfaces, i.e. attributes and methods. + * @returns interface members + */ + readonly Members: SafeArray; + + /** + * Deprecated. UIK are not used anymore, a type is uniquely identified by its name. ; Returns the UIK, i.e. the unique identifier of the interface. + * @deprecated Deprecated + * @returns uik of the interface + */ + readonly Uik: uno.Uik; + } + + /** + * Reflects an interface type, supporting multiple inheritance. + * + * This type supersedes {@link XInterfaceTypeDescription} , which only supported single inheritance. + * @since OOo 2.0 + */ + interface XInterfaceTypeDescription2 extends XInterfaceTypeDescription { + /** + * Returns a sequence of all directly inherited (mandatory) base interface types. + * @returns a sequence of all directly inherited (mandatory) base interface types, in the correct order; each element of the returned sequence will be the re + */ + readonly BaseTypes: SafeArray; + + /** + * Returns a sequence of all directly inherited (mandatory) base interface types. + * @returns a sequence of all directly inherited (mandatory) base interface types, in the correct order; each element of the returned sequence will be the re + */ + getBaseTypes(): SafeArray; + + /** + * Returns a sequence of all directly inherited optional base interface types. + * @returns a sequence of all directly inherited optional base interface types, in the correct order; each element of the returned sequence will be the refle + */ + getOptionalBaseTypes(): SafeArray; + + /** + * Returns a sequence of all directly inherited optional base interface types. + * @returns a sequence of all directly inherited optional base interface types, in the correct order; each element of the returned sequence will be the refle + */ + readonly OptionalBaseTypes: SafeArray; + } + + /** + * Reflects a method parameter. + * + * This type is superseded by {@link XParameter} , which supports parameters of service constructors as well as parameters of interface methods. + * @see XInterfaceMethodTypeDescription + */ + interface XMethodParameter extends uno.XInterface { + /** + * Returns the name of the parameter + * @returns name of parameter + */ + getName(): string; + + /** + * Returns the position of the parameter regarding the IDL method declaration. + * @returns position of the parameter + */ + getPosition(): number; + + /** + * Returns the type of the parameter. + * @returns type of parameter + */ + getType(): XTypeDescription; + + /** + * Returns true, if the parameter is declared as [in] or [inout] in IDL. + * @returns true, if declared [in] or [inout] parameter + */ + isIn(): boolean; + + /** + * Returns true, if the parameter is declared as [out] or [inout] in IDL. + * @returns true, if declared [out] or [inout] parameter + */ + isOut(): boolean; + + /** + * Returns the name of the parameter + * @returns name of parameter + */ + readonly Name: string; + + /** + * Returns the position of the parameter regarding the IDL method declaration. + * @returns position of the parameter + */ + readonly Position: number; + + /** + * Returns the type of the parameter. + * @returns type of parameter + */ + readonly Type: XTypeDescription; + } + + /** + * Reflects a module. + * + * The type class of this type is com::sun::star::uno::TypeClass::MODULE. + * @since OOo 1.1.2 + */ + interface XModuleTypeDescription extends XTypeDescription { + /** + * Returns the type descriptions for the members of this module. + * @returns a sequence containing type descriptions. + */ + getMembers(): SafeArray; + + /** + * Returns the type descriptions for the members of this module. + * @returns a sequence containing type descriptions. + */ + readonly Members: SafeArray; + } + + /** + * Reflects a parameter of an interface method or a service constructor. + * + * This type supersedes {@link XMethodParameter} , which only supports parameters of interface methods (which cannot have rest parameters). + * @since OOo 2.0 + */ + interface XParameter extends XMethodParameter { + /** + * Returns whether this is a rest parameter. + * + * A rest parameter must always come last in a parameter list. + * + * Currently, only service constructors can have rest parameters, and those rest parameters must be in parameters of type `any` . + * @returns `TRUE` if and only if this parameter is a rest parameter + */ + isRestParameter(): boolean; + } + + /** + * Reflects a property. + * + * The type class of this type is com::sun::star::uno::TypeClass::PROPERTY. + * @since OOo 1.1.2 + */ + interface XPropertyTypeDescription extends XTypeDescription { + /** @returns the flags defined for this property. The possible values are defined in {@link com.sun.star.beans.PropertyAttribute} */ + getPropertyFlags(): number; + + /** @returns the type description for this property. */ + getPropertyTypeDescription(): XTypeDescription; + + /** @returns the flags defined for this property. The possible values are defined in {@link com.sun.star.beans.PropertyAttribute} */ + readonly PropertyFlags: number; + + /** @returns the type description for this property. */ + readonly PropertyTypeDescription: XTypeDescription; + } + + /** + * Factory interface to produce proxy objects. + * @deprecated DeprecatedAggregation will no longer be supported as a high-level concept of UNO. You may still have the option to implement an UNO object consis + */ + interface XProxyFactory extends uno.XInterface { + /** + * This method creates a new proxy object that acts on behalf of the given target object. ; The proxy delegates calls to the given target object. In + * addition, it is aggregatable, thus it is possible to intercept calls on the proxy's interfaces. + * @param xTarget target object + * @returns proxy object + */ + createProxy(xTarget: uno.XInterface): uno.XAggregation; + } + + /** + * Reflects the " published " status of a UNOIDL entity. + * + * This interface is intended to be supported by objects that also support {@link com.sun.star.reflection.XTypeDescription} . (This interface could have + * been made an optional sub-interface of {@link com.sun.star.reflection.XTypeDescription} , but is instead kept independent for reasons of backwards + * compatibility.) + * + * For the various kinds of UNOIDL entities that are represented by objects supporting {@link com.sun.star.reflection.XTypeDescription} and its subtypes, + * this optional interface should be supported as follows: + * + * Enum types ( {@link com.sun.star.reflection.XEnumTypeDescription} ), plain struct types ( {@link com.sun.star.reflection.XStructTypeDescription} ), + * polymorphic struct type templates ( {@link com.sun.star.reflection.XStructTypeDescription} ), exception types ( {@link + * com.sun.star.reflection.XCompoundTypeDescription} ), interface types ( {@link com.sun.star.reflection.XInterfaceTypeDescription2} ), typedefs ( {@link + * com.sun.star.reflection.XIndirectTypeDescription} ), individual constants ( {@link com.sun.star.reflection.XConstantTypeDescription} ), constant + * groups ( {@link com.sun.star.reflection.XConstantsTypeDescription} ), single-interface - based services ( {@link + * com.sun.star.reflection.XServiceTypeDescription2} ), accumulation-based services ( {@link com.sun.star.reflection.XServiceTypeDescription2} ), + * interface-based singletons ( {@link com.sun.star.reflection.XSingletonTypeDescription2} ), and service-based singletons ( {@link + * com.sun.star.reflection.XSingletonTypeDescription2} ) support the notion of being published. Therefore, for an object that represents any such entity, + * {@link com.sun.star.reflection.XPublished} should be supported. + * + * Sequence types ( {@link com.sun.star.reflection.XIndirectTypeDescription} ), type parameters of polymorphic struct type templates ( {@link + * com.sun.star.reflection.XTypeDescription} ), instantiated polymorphic struct types ( {@link com.sun.star.reflection.XStructTypeDescription} ), + * attributes of interface types ( {@link com.sun.star.reflection.XInterfaceAttributeTypeDescription2} ), methods of interface types ( {@link + * com.sun.star.reflection.XInterfaceMethodTypeDescription} ), properties of accumulation-based services ( {@link + * com.sun.star.reflection.XPropertyTypeDescription} ), deprecated com::sun::star::reflection::XArrayTypeDescriptions, and deprecated + * com::sun::star::reflection::XUnionTypeDescriptions do not support the notion of being published. Therefore, for an object that represents any such + * entity, {@link com.sun.star.reflection.XPublished} should not be supported. + * @since OOo 2.0 + */ + interface XPublished { + /** + * Returns the " published " status of a UNOIDL entity. + * @returns `TRUE` if the UNOIDL entity represented by this object is published + */ + isPublished(): boolean; + } + + /** + * Reflects a service constructor. + * @since OOo 2.0 + */ + interface XServiceConstructorDescription { + /** + * Returns the exceptions that can be raised by the constructor. + * @returns the reflections of all the exceptions that are listed in the constructor's `raises` specification, in no particular order; all elements of the re + */ + readonly Exceptions: SafeArray; + + /** + * Returns the exceptions that can be raised by the constructor. + * @returns the reflections of all the exceptions that are listed in the constructor's `raises` specification, in no particular order; all elements of the re + */ + getExceptions(): SafeArray; + + /** + * Returns the constructor's name. + * @returns the constructor's name; for a default constructor, an empty `string` is returned + */ + getName(): string; + + /** + * Returns the constructor's parameters. + * @returns the reflections of all the constructor's parameters, in their lexical order; for a default constructor, an empty sequence is returned + */ + getParameters(): SafeArray; + + /** + * Returns whether the constructor is a default constructor. + * @returns `TRUE` if the constructor is a default constructor + */ + isDefaultConstructor(): boolean; + + /** + * Returns the constructor's name. + * @returns the constructor's name; for a default constructor, an empty `string` is returned + */ + readonly Name: string; + + /** + * Returns the constructor's parameters. + * @returns the reflections of all the constructor's parameters, in their lexical order; for a default constructor, an empty sequence is returned + */ + readonly Parameters: SafeArray; + } + + /** + * Reflects a service. + * + * This type is superseded by {@link XServiceTypeDescription2} , which supports single-interface - based services, in addition to the obsolete, + * accumulation-based services. + * + * The type class of this type is com::sun::star::uno::TypeClass::SERVICE. + * @since OOo 1.1.2 + */ + interface XServiceTypeDescription extends XTypeDescription { + /** + * Returns the type descriptions of the mandatory interfaces defined for this service. + * @returns a sequence containing interface type descriptions, for an obsolete, accumulation-based service; for a single-interface - based service, an empt + */ + getMandatoryInterfaces(): SafeArray; + + /** + * Returns the type descriptions of the mandatory services defined for this service. + * @returns a sequence containing service type descriptions, for an obsolete, accumulation-based service; for a single-interface - based service, an empty + */ + getMandatoryServices(): SafeArray; + + /** + * Returns the type descriptions of the optional interface defined for this service. + * @returns a sequence containing interface type descriptions, for an obsolete, accumulation-based service; for a single-interface - based service, an empt + */ + getOptionalInterfaces(): SafeArray; + + /** + * Returns the type descriptions of the optional services defined for this service. + * @returns a sequence containing service type descriptions, for an obsolete, accumulation-based service; for a single-interface - based service, an empty + */ + getOptionalServices(): SafeArray; + + /** + * Returns the properties defined for this service. + * @returns a sequence containing property descriptions, for an obsolete, accumulation-based service; for a single-interface - based service, an empty sequ + */ + getProperties(): SafeArray; + + /** + * Returns the type descriptions of the mandatory interfaces defined for this service. + * @returns a sequence containing interface type descriptions, for an obsolete, accumulation-based service; for a single-interface - based service, an empt + */ + readonly MandatoryInterfaces: SafeArray; + + /** + * Returns the type descriptions of the mandatory services defined for this service. + * @returns a sequence containing service type descriptions, for an obsolete, accumulation-based service; for a single-interface - based service, an empty + */ + readonly MandatoryServices: SafeArray; + + /** + * Returns the type descriptions of the optional interface defined for this service. + * @returns a sequence containing interface type descriptions, for an obsolete, accumulation-based service; for a single-interface - based service, an empt + */ + readonly OptionalInterfaces: SafeArray; + + /** + * Returns the type descriptions of the optional services defined for this service. + * @returns a sequence containing service type descriptions, for an obsolete, accumulation-based service; for a single-interface - based service, an empty + */ + readonly OptionalServices: SafeArray; + + /** + * Returns the properties defined for this service. + * @returns a sequence containing property descriptions, for an obsolete, accumulation-based service; for a single-interface - based service, an empty sequ + */ + readonly Properties: SafeArray; + } + + /** + * Reflects a service, supporting single-interface - based services. + * + * This type supersedes {@link XServiceTypeDescription} , which only supports obsolete, accumulation-based services. + * @since OOo 2.0 + */ + interface XServiceTypeDescription2 extends XServiceTypeDescription { + /** + * Returns the constructors of the service. + * @returns the reflections of all constructors of the service, in no particular order + */ + readonly Constructors: SafeArray; + + /** + * Returns the constructors of the service. + * @returns the reflections of all constructors of the service, in no particular order + */ + getConstructors(): SafeArray; + + /** + * Returns the interface type associated with the service. + * @returns the reflection of the interface type associated with the service (of type {@link com.sun.star.reflection.XInterfaceTypeDescription} or, in case o + */ + getInterface(): XTypeDescription; + + /** + * Returns the interface type associated with the service. + * @returns the reflection of the interface type associated with the service (of type {@link com.sun.star.reflection.XInterfaceTypeDescription} or, in case o + */ + readonly Interface: XTypeDescription; + + /** + * Returns whether this object reflects a single-interface - based service. + * @returns `TRUE` if this object reflects a single-interface - based service, and `FALSE` if this object reflects an obsolete, accumulation-based service + */ + isSingleInterfaceBased(): boolean; + } + + /** + * Reflects a singleton. + * + * This type is superseded by {@link XSingletonTypeDescription2} , which supports interface-based singletons, in addition to the obsolete, service-based + * singletons. + * + * The type class of this type is com::sun::star::uno::TypeClass::SINGLETON. + * @since OOo 1.1.2 + */ + interface XSingletonTypeDescription extends XTypeDescription { + /** + * Returns the service associated with the singleton. + * @returns the reflection of the service associated with the singleton, for an obsolete, service-based singleton; for an interface-based singleton, `NULL` i + */ + getService(): XServiceTypeDescription; + + /** + * Returns the service associated with the singleton. + * @returns the reflection of the service associated with the singleton, for an obsolete, service-based singleton; for an interface-based singleton, `NULL` i + */ + readonly Service: XServiceTypeDescription; + } + + /** + * Reflects a singleton, supporting interface-based singletons. + * + * This type supersedes {@link XSingletonTypeDescription} , which only supports obsolete, service-based singletons. + * @since OOo 2.0 + */ + interface XSingletonTypeDescription2 extends XSingletonTypeDescription { + /** + * Returns the interface type associated with the singleton. + * @returns the reflection of the interface type associated with the singleton (of type {@link com.sun.star.reflection.XInterfaceTypeDescription} or, in case + */ + getInterface(): XTypeDescription; + + /** + * Returns the interface type associated with the singleton. + * @returns the reflection of the interface type associated with the singleton (of type {@link com.sun.star.reflection.XInterfaceTypeDescription} or, in case + */ + readonly Interface: XTypeDescription; + + /** + * Returns whether this object reflects an interface-based singleton. + * @returns `TRUE` if this object reflects an interface-based singleton, and `FALSE` if this object reflects an obsolete, service-based singleton + */ + isInterfaceBased(): boolean; + } + + /** + * Reflects a struct type, supporting polymorphic struct types. + * + * This type supersedes {@link XCompoundTypeDescription} , which only supports plain struct types. + * + * This type is used to reflect all of the following: + * + * Polymorphic struct type templates, like `Struct` . For these, {@link com.sun.star.reflection.XStructTypeDescription.getTypeParameters()} returns + * a non-empty sequence, while {@link com.sun.star.reflection.XStructTypeDescription.getTypeArguments()} returns an empty sequence. + * + * Instantiated polymorphic struct types, like `Struct` . For these, {@link + * com.sun.star.reflection.XStructTypeDescription.getTypeParameters()} returns an empty sequence, while {@link + * com.sun.star.reflection.XStructTypeDescription.getTypeArguments()} returns a non-empty sequence. + * + * Plain struct types. For these, both {@link com.sun.star.reflection.XStructTypeDescription.getTypeParameters()} and {@link + * com.sun.star.reflection.XStructTypeDescription.getTypeArguments()} return an empty sequence. + * @since OOo 2.0 + */ + interface XStructTypeDescription extends XCompoundTypeDescription { + /** + * Returns the type arguments of an instantiated polymorphic struct type. + * @returns a sequence of all type arguments, in the correct order; for a plain struct type, or a polymorphic struct type template, an empty sequence is returned + */ + getTypeArguments(): SafeArray; + + /** + * Returns the type parameters of a polymorphic struct type template. + * @returns a sequence of the names of all type parameters, in the correct order; for a plain struct type, or an instantiated polymorphic struct type, an emp + */ + getTypeParameters(): SafeArray; + + /** + * Returns the type arguments of an instantiated polymorphic struct type. + * @returns a sequence of all type arguments, in the correct order; for a plain struct type, or a polymorphic struct type template, an empty sequence is returned + */ + readonly TypeArguments: SafeArray; + + /** + * Returns the type parameters of a polymorphic struct type template. + * @returns a sequence of the names of all type parameters, in the correct order; for a plain struct type, or an instantiated polymorphic struct type, an emp + */ + readonly TypeParameters: SafeArray; + } + + /** + * Reflects a UNOIDL entity. + * @see XPublished + * @see XIndirectTypeDescription + * @see XEnumTypeDescription + * @see XStructTypeDescription + * @see XCompoundTypeDescription + * @see XInterfaceTypeDescription2 + * @see XInterfaceAttributeTypeDescription2 + * @see XInterfaceMethodTypeDescription + * @see XConstantTypeDescription + * @see XConstantsTypeDescription + * @see XServiceTypeDescription2 + * @see XPropertyTypeDescription2 + * @see XSingletonTypeDescription2 + */ + interface XTypeDescription extends uno.XInterface { + /** + * Returns the fully qualified name of the UNOIDL entity. + * @returns fully qualified name of the entity + */ + getName(): string; + + /** + * Returns the type class of the reflected UNOIDL entity. + * @returns type class of the entity + */ + getTypeClass(): uno.TypeClass; + + /** + * Returns the fully qualified name of the UNOIDL entity. + * @returns fully qualified name of the entity + */ + readonly Name: string; + + /** + * Returns the type class of the reflected UNOIDL entity. + * @returns type class of the entity + */ + readonly TypeClass: uno.TypeClass; + } + + /** + * Defines an enumeration for type descriptions. + * @since OOo 1.1.2 + */ + interface XTypeDescriptionEnumeration extends container.XEnumeration { + /** + * Returns the next element of the enumeration. + * @returns the next element of this enumeration. + * @throws com::sun::star::container::NoSuchElementException if no more elements exist. + */ + nextTypeDescription(): XTypeDescription; + } + + /** + * Defines an interface for creating enumerations for type descriptions. + * @since OOo 1.1.2 + */ + interface XTypeDescriptionEnumerationAccess extends uno.XInterface { + /** + * Creates an enumeration for type descriptions. + * + * An enumeration is always created for an UNOIDL module. The enumeration contents can be restricted by specifying type classes. Only types that match + * one of the supplied type classes will be part of the collection. Additionally, it is possible to specify the depth for the search within the + * underlying type description tree. + * @param moduleName contains the name of an UNOIDL module. Modules are separated by a single '.' (i.e., "com.sun.star.reflection"). The root of the module + * @param types restricts the contents of the enumeration. It will only contain type descriptions that match one of the supplied type classes. An empty seq + * @param depth specifies the depth of search in the underlying tree of type descriptions. Clients should be aware of the fact that specifying TypeDescript + * @returns an enumeration of type descriptions. The enumeration returns implementations of {@link XTypeDescription} . Following concrete UNOIDL parts repre + * @throws NoSuchTypeNameException in case that the given module name does not exist. This exception will never be thrown in case moduleName is the empty string. + * @throws InvalidTypeNameException in case that the given module name does exist, but does not specify an UNOIDL module. This exception will never be throw + */ + createTypeDescriptionEnumeration(moduleName: string, types: LibreOffice.SeqEquiv, depth: TypeDescriptionSearchDepth): XTypeDescriptionEnumeration; + } + + /** + * Deprecated, UNOIDL does not have a union concept. + * @deprecated Deprecated + */ + interface XUnionTypeDescription extends XTypeDescription { + /** + * Returns the default discriminant value. + * @returns default discriminant value + */ + readonly DefaultDiscriminant: any; + + /** + * Returns the type of the default value. + * @returns type of the default value + */ + readonly DefaultMemberType: XTypeDescription; + + /** + * Returns discriminants of all members in order of IDL declaration. + * @returns discriminants of all members + */ + readonly Discriminants: SafeArray; + + /** + * Returns the (ordinal) discriminant type. + * @returns type of the discriminant + */ + readonly DiscriminantType: XTypeDescription; + + /** + * Returns the default discriminant value. + * @returns default discriminant value + */ + getDefaultDiscriminant(): any; + + /** + * Returns the type of the default value. + * @returns type of the default value + */ + getDefaultMemberType(): XTypeDescription; + + /** + * Returns discriminants of all members in order of IDL declaration. + * @returns discriminants of all members + */ + getDiscriminants(): SafeArray; + + /** + * Returns the (ordinal) discriminant type. + * @returns type of the discriminant + */ + getDiscriminantType(): XTypeDescription; + + /** + * Returns names of all members in order of IDL declaration. + * @returns names of all members + */ + getMemberNames(): SafeArray; + + /** + * Returns types of all members in order of IDL declaration. + * @returns types of all members + */ + getMemberTypes(): SafeArray; + + /** + * Returns names of all members in order of IDL declaration. + * @returns names of all members + */ + readonly MemberNames: SafeArray; + + /** + * Returns types of all members in order of IDL declaration. + * @returns types of all members + */ + readonly MemberTypes: SafeArray; + } + } + + namespace registry { + /** + * is thrown when an application tries to register a new component (implementation) using the {@link + * XImplementationRegistration.registerImplementation()} method, but the component cannot be registered. The reason for this exception could be: ; ; the + * component cannot be found or cannot be loaded (missing path or classpath)the component doesn't provide the necessary specifactions (exported + * registration functions for a C++ component (shared library) or a named registration class with the appropriate methods for a Java component (normally + * a jar file)).; + */ + type CannotRegisterImplementationException = uno.Exception; + + /** + * implicitly supports a local registry and a read-only system registry for global information. In the context of this service, the functions `open` , + * `close` , and `destroy` from {@link XSimpleRegistry} are not supported and throw an exception if they are used. + * + * Functions of {@link XSimpleRegistry} : **getURL**: returns the name of the local registry. + * + * **isValid**: checks if the local registry is valid. If the interface is not `NULL` the local registry should always be valid. + * + * **isReadOnly**: checks if the local registry has write protection. + * + * **mergeKey**: merges all information from the specified registry in the local registry. + * + * **getRootKey**: returns a virtual rootkey of both registries. + * + * + * + * Functions of {@link XRegistryKey} : **openKey**: returns a virtual key which is specified in the local or the system registry. + * + * **deleteKey**: deletes the key only if it is present in the local registry. + * + * **setLongValue, setAsciiValue, setStringValue, setBinaryValue**: sets the value at the specified key in the local registry. + * + * **getLongValue, getAsciiValue, getStringValue, getBinaryValue**: returns the value at the specified key in the local registry, or if the value is not + * present in the local registry, it will return the value of the system registry. + * + * **openKeys**: returns a sequence of all subkeys in both registries. + * + * **getKeyNames**: returns a sequence with the names of all subkeys in both registries. + * + * **Note: all write functions only work on the local registry.**: + * + * + * + * How to find the registries: **search for the system registry: **: The system registry will always be searched in the same directory as the + * executable. The name of the system registry is "applicat.rdb". If the system registry was not found, then the environment variable STAR_REGISTRY will + * be checked. If this variable was set, it must contain a full path to a valid system registry. + * + * **Search for the user registry using the following rules: **: {{ordered list here, see documentation}} + * + * **Guarantees:** + * + * -thread safe + */ + type DefaultRegistry = XSimpleRegistry; + + /** + * is the implementation of the interface {@link XImplementationRegistration} . This service can be used to install or uninstall components + * (implementations). Further, it is possible to check if all runtime dependencies (needed services) are available to use a specified component. + * + * Guarantees: -thread safe + */ + type ImplementationRegistration = XImplementationRegistration; + + /** signals that the registry is invalid or an operation on the registry failed. */ + type InvalidRegistryException = uno.Exception; + + /** signals that the value of the key is invalid or does not have the appropriate key type. */ + type InvalidValueException = uno.Exception; + + /** is thrown if entries of two registries are contradictory in the context of {@link XSimpleRegistry.mergeKey()} e() method. */ + type MergeConflictException = uno.Exception; + + /** + * makes it possible to create, open, or close a registry. Further, it is possible to merge a registry under a specified key in the open registry. + * + * Guarantees: -thread safe + */ + type SimpleRegistry = XSimpleRegistry; + + /** + * represents all possible types of a key. + * + * A key can be a normal key with a value and subkeys, or it can be a link which references another key. + */ + const enum RegistryKeyType { + KEY = 0, + LINK = 1, + } + + /** + * represents all possible types of a key value. + * + * An ASCII value and a string value will both be handled with type string. But interns will be handled differently. Normally the idl string represents a + * unicode string. + */ + const enum RegistryValueType { + /** the type of the key is ASCII. */ + ASCII = 2, + /** the type of the key is a ASCIILIST. */ + ASCIILIST = 6, + /** the type of the key is binary. */ + BINARY = 4, + /** the type of the key is long. */ + LONG = 1, + /** the type of the key is LONGLIST. */ + LONGLIST = 5, + /** the type of the key is not defined. */ + NOT_DEFINED = 0, + /** the type of the key is a string. */ + STRING = 3, + /** the type of the key is a STRINGLIST. */ + STRINGLIST = 7, + } + + /** + * supports a shared view on two different registries. The registry files will be opened in two different modes, registry1 will be opened with read/write + * rights and registry2 will be opened read-only. In the context of this service, the functions `open` , `close` , and `destroy` from {@link + * XSimpleRegistry} are not supported and throw an exception if they are used. + * + * Functions of {@link XSimpleRegistry} : **getURL**: returns the name of registry1.; + * + * **isValid**: checks if registry1 is valid. If the interface is not `NULL` then registry1 should always be valid.; + * + * **isReadOnly**: checks if registry1 has write protection. + * + * **mergeKey**: merges all information from the specified registry in registry1.; + * + * **getRootKey**: returns a virtual rootkey of both registries. + * + * + * + * Functions of {@link XRegistryKey} : **openKey**: returns a virtual key which is specified in registy1 or registry2.; + * + * **deleteKey**: deletes the key only if it is present in registry1.; + * + * **setLongValue, setAsciiValue, setStringValue, setBinaryValue**: sets the value at the specified key in registry1.; + * + * **getLongValue, getAsciiValue, getStringValue, getBinaryValue**: returns the value at the specified key in registry1, or if the value is not present + * in registry1, it will return the value of registry2.; + * + * **openKeys**: returns a sequence of all subkeys in both registries.; + * + * **getKeyNames**: returns a sequence with the names of all subkeys in both registries.; + * + * **Note: all write functions only work on registry1.**: + * + * + * + * How to initialize the registries: ; Use a sequence of {@link XSimpleRegistry} with two elements. The first element must be the registry which is + * opened with read/write rights and the second element must be the read-only one. ; Two different ways are possible: ; use {@link + * com.sun.star.lang.XMultiServiceFactory.createInstanceWithArguments()} to create an instance of this service where the value of the any parameter must + * be the sequence with the two open registries.use the initialize function of the {@link com.sun.star.lang.XInitialization} interface where the value of + * the any parameter must be the sequence with the two open registries.; + * + * Guarantees: -thread safe + */ + interface NestedRegistry extends XSimpleRegistry, lang.XInitialization { } + + /** offers a registry for implementation objects and provides information about the registered implementations. */ + interface XImplementationRegistration extends uno.XInterface { + /** + * @param implementationName specifies the name of the checked implementation. + * @returns a sequence with names of the missing services to create an instance of this implementation. + */ + checkInstantiation(implementationName: string): SafeArray; + + /** + * @param aImplementationLoader specifies the name of the needed loader for this type of implementation. For example, the loader "com.sun.star.loader.Share + * @param aLocation specifies the location of the component with the URL. + * @returns the names of the implementations registered by the url location. + */ + getImplementations(aImplementationLoader: string, aLocation: string): SafeArray; + + /** + * registers a component which provides one or more implementations. + * @param aImplementationLoader the URL of the implementation loader. + * @param aLocation specifies the location of the component with the URL. + * @param xReg specifies the registry where the component should be installed. If it is a NULL interface, then the component will be installed in the syste + */ + registerImplementation(aImplementationLoader: string, aLocation: string, xReg: XSimpleRegistry): void; + + /** + * revokes a component and all their provided implementations from the registry. + * @param aLocation specifies the location of the component with the URL. + * @param xReg specifies the registry where the component should be installed. If it is a NULL interface, then the component will be revoked from the syste + */ + revokeImplementation(aLocation: string, xReg: XSimpleRegistry): boolean; + } + + /** + * extends the functionality of {@link com.sun.star.registry.XImplementationRegistration} . It can be useful to specify a complete Url to a component but + * register the components name only (library or jar name). + * @since OOo 2.4 + */ + interface XImplementationRegistration2 extends XImplementationRegistration { + /** + * registers a component which provides one or more implementations. + * @param aImplementationLoader the URL of the implementation loader. + * @param aLocation specifies the location of the component with the URL. + * @param aRegisteredLocation the URL with which the component is actually registered. + * @param xReg specifies the registry where the component should be installed. If it is a NULL interface, then the component will be installed in the syste + */ + registerImplementationWithLocation(aImplementationLoader: string, aLocation: string, aRegisteredLocation: string, xReg: XSimpleRegistry): void; + } + + /** + * makes structural information (except regarding tree structures) of a single registry key accessible. + * + * This is the main interface for registry keys. + * @see XSimpleRegistry + */ + interface XRegistryKey extends uno.XInterface { + /** + * @returns a sequence of ascii strings if the key contains an ascii list value. + * @throws InvalidRegistryException if the registry is not open. + * @throws InvalidValueException if the actual value is not of type ascii list. + */ + AsciiListValue: SafeArray; + + /** + * @returns an ascii string value if the key contains one. + * @throws InvalidRegistryException if the registry is not open. + * @throws InvalidValueException if the actual value is not of type ascii. + */ + AsciiValue: string; + + /** + * @returns a binary value if the key contains one. + * @throws InvalidRegistryException if the registry is not open. + * @throws InvalidValueException if the actual value is not of type binary. + */ + BinaryValue: SafeArray; + + /** + * closes a key in the registry. + * @throws InvalidRegistryException if the registry is not open. + */ + closeKey(): void; + + /** + * creates a new key in the registry. + * + * If the key already exists, the function will open the key. + * @param aKeyName specifies the relative path from the current key to the key which will be created. + * @returns a NULL interface if the key could not be created. + * @throws InvalidRegistryException if the registry is not open, the registry is readonly or if the key exists and is of type LINK. + */ + createKey(aKeyName: string): XRegistryKey; + + /** + * creates a new link in the registry. + * @param aLinkName specifies the relative path from the current key to the link which will be created. + * @param aLinkTarget specifies the full path of the key which will be referenced by the link. + * @returns `TRUE` if the link was created. If the link already exists or the link target does not exist, the function returns `FALSE` . + * @throws InvalidRegistryException if the registry is not open or the registry is readonly. + */ + createLink(aLinkName: string, aLinkTarget: string): boolean; + + /** + * deletes a key from the registry. + * @param rKeyName specifies the relative path from the current key to the key which will be deleted. + * @throws InvalidRegistryException if the registry is not open, the registry is readonly, the key does not exists or if the key is of type LINK. + */ + deleteKey(rKeyName: string): void; + + /** + * deletes a link from the registry. + * @param rLinkName specifies the relative path from the current key to the link which will be deleted. + * @throws InvalidRegistryException if the registry is not open, the registry is readonly, or if the link does not exist. + */ + deleteLink(rLinkName: string): void; + + /** + * @returns a sequence of ascii strings if the key contains an ascii list value. + * @throws InvalidRegistryException if the registry is not open. + * @throws InvalidValueException if the actual value is not of type ascii list. + */ + getAsciiListValue(): SafeArray; + + /** + * @returns an ascii string value if the key contains one. + * @throws InvalidRegistryException if the registry is not open. + * @throws InvalidValueException if the actual value is not of type ascii. + */ + getAsciiValue(): string; + + /** + * @returns a binary value if the key contains one. + * @throws InvalidRegistryException if the registry is not open. + * @throws InvalidValueException if the actual value is not of type binary. + */ + getBinaryValue(): SafeArray; + + /** + * @returns a sequence with the names of all subkeys of the key. If the key has no subkeys, the function returns an empty sequence. If a subkey is a link, th + * @throws InvalidRegistryException if the registry is not open. + */ + getKeyNames(): SafeArray; + + /** + * @param rKeyName specifies the relative path from the current key to the key of the type which will be returned. + * @returns the type of the specified key. + * @throws InvalidRegistryException if the registry is not open. + */ + getKeyType(rKeyName: string): RegistryKeyType; + + /** + * @param rLinkName specifies the relative path from the current key to the link which target will be returned. + * @returns the target (complete path of a key) of the link specified by rLinkName. + * @throws InvalidRegistryException if the registry is not open or the link does not exists. + */ + getLinkTarget(rLinkName: string): string; + + /** + * @returns a sequence of longs if the key contains a long list value. + * @throws InvalidRegistryException if the registry is not open. + * @throws InvalidValueException if the actual value is not of type long list. + */ + getLongListValue(): SafeArray; + + /** + * @returns a long value if the key contains one. + * @throws InvalidRegistryException if the registry is not open. + * @throws InvalidValueException if the value is not of type long. + */ + getLongValue(): number; + + /** + * @param aKeyName specifies a relative path from the current key which will be resolved from all links. + * @returns the resolved name of a key. The function resolve the complete name of the key. If a link could not be resolved, the linktarget concatenated with + * @throws InvalidRegistryException if the registry is not open or a recursion was detected. + */ + getResolvedName(aKeyName: string): string; + + /** + * @returns a sequence of unicode strings if the key contains an unicode string list value. + * @throws InvalidRegistryException if the registry is not open. + * @throws InvalidValueException if the actual value is not of type string list. + */ + getStringListValue(): SafeArray; + + /** + * @returns a unicode string value if the key contains one. + * @throws InvalidRegistryException if the registry is not open. + * @throws InvalidValueException if the actual value is not of type string. + */ + getStringValue(): string; + + /** + * @returns the type of the key value or NOT_DEFINED if the key has no value. + * @throws InvalidRegistryException if the registry is not open. + */ + getValueType(): RegistryValueType; + + /** + * checks if the key can be overwritten. + * @throws InvalidRegistryException if the registry is not open. + */ + isReadOnly(): boolean; + + /** checks if the key points to an open valid key in the data-source. */ + isValid(): boolean; + + /** + * This is the key of the entry relative to its parent. + * + * The access path starts with the root "/" and all parent entry names are delimited with slashes "/" too, like in a UNIX (R) file system. Slashes which + * are part of single names are represented as hexadecimals preceded with a "%" like in URL syntax. + */ + KeyName: string; + + /** + * @returns a sequence with the names of all subkeys of the key. If the key has no subkeys, the function returns an empty sequence. If a subkey is a link, th + * @throws InvalidRegistryException if the registry is not open. + */ + readonly KeyNames: SafeArray; + + /** + * @returns a sequence of longs if the key contains a long list value. + * @throws InvalidRegistryException if the registry is not open. + * @throws InvalidValueException if the actual value is not of type long list. + */ + LongListValue: SafeArray; + + /** + * @returns a long value if the key contains one. + * @throws InvalidRegistryException if the registry is not open. + * @throws InvalidValueException if the value is not of type long. + */ + LongValue: number; + + /** + * opens a sub key of the key. + * + * If the sub key does not exist, the function returns a NULL-interface. + * @param aKeyName the relative path from the current key to the key which will be created. + * @returns a NULL interface if the key does not exist. + * @throws InvalidRegistryException if the registry is not open. + */ + openKey(aKeyName: string): XRegistryKey; + + /** + * opens all subkeys of the key. If a subkey is a link, the link will be resolved and the appropriate key will be opened. + * @returns an empty sequence if the key has no subkeys. + * @throws InvalidRegistryException if the registry is not open. + */ + openKeys(): SafeArray; + + /** + * sets an ASCII string list value to the key. + * + * The high byte of the string should be NULL. If not, there is no guarantee that the string will be correctly transported. If the key already has a + * value, the value will be overridden. + * @throws InvalidRegistryException if the registry is not open. + */ + setAsciiListValue(seqValue: LibreOffice.SeqEquiv): void; + + /** + * sets an ASCII string value to the key. + * + * The high byte of the string should be NULL. If not, there is no guarantee that the string will be correctly transported. If the key already has a + * value, the value will be overridden. + * @throws InvalidRegistryException if the registry is not open. + */ + setAsciiValue(value: string): void; + + /** + * sets a binary value to the key. + * + * If the key already has a value, the value will be overridden. + * @throws InvalidRegistryException if the registry is not open. + */ + setBinaryValue(value: LibreOffice.SeqEquiv): void; + + /** + * sets a long list value to the key. + * + * If the key already has a value, the value will be overridden. + * @throws InvalidRegistryException if the registry is not open. + */ + setLongListValue(seqValue: LibreOffice.SeqEquiv): void; + + /** + * sets a long value to the key. + * + * If the key already has a value, the value will be overridden. + * @throws InvalidRegistryException if the registry is not open. + */ + setLongValue(value: number): void; + + /** + * sets a unicode string value to the key. + * + * If the key already has a value, the value will be overridden. + * @throws InvalidRegistryException if the registry is not open. + */ + setStringListValue(seqValue: LibreOffice.SeqEquiv): void; + + /** + * sets a unicode string value to the key. + * + * If the key already has a value, the value will be overridden. + * @throws InvalidRegistryException if the registry is not open. + */ + setStringValue(value: string): void; + + /** + * @returns a sequence of unicode strings if the key contains an unicode string list value. + * @throws InvalidRegistryException if the registry is not open. + * @throws InvalidValueException if the actual value is not of type string list. + */ + StringListValue: SafeArray; + + /** + * @returns a unicode string value if the key contains one. + * @throws InvalidRegistryException if the registry is not open. + * @throws InvalidValueException if the actual value is not of type string. + */ + StringValue: string; + + /** + * @returns the type of the key value or NOT_DEFINED if the key has no value. + * @throws InvalidRegistryException if the registry is not open. + */ + readonly ValueType: RegistryValueType; + } + + /** + * allows access to a registry (a persistent data source). The data is stored in a hierarchical key structure beginning with a root key. Each key can + * store a value and can have multiple subkeys. + * @see XRegistryKey + */ + interface XSimpleRegistry extends uno.XInterface { + /** + * disconnects the registry from the data-source. + * @throws InvalidRegistryException if the registry is not open. + */ + close(): void; + + /** + * destroys the registry and the data source. + * @throws InvalidRegistryException if the registry is not open. + */ + destroy(): void; + + /** + * @returns the root key of the registry. + * @throws InvalidRegistryException if no registry is open + */ + getRootKey(): XRegistryKey; + + /** returns the URL of the current data source of the registry. */ + getURL(): string; + + /** + * checks if the registry is readonly. + * @throws InvalidRegistryException if the registry is not open. + */ + isReadOnly(): boolean; + + /** checks if the registry points to a valid data-source. */ + isValid(): boolean; + + /** + * DEPRECATED: this method lacks a registry key (better than a URL). + * + * merges a registry under the specified key. + * + * If the key does not exist it will be created. Existing keys will be overridden from keys of registry specified by **aUrl** . + * @throws InvalidRegistryException if the registry is not open. + * @throws MergeConflictException if any differences occur during merging + */ + mergeKey(aKeyName: string, aUrl: string): void; + + /** + * connects the registry to a persistent data source represented by an URL. + * + * If a local registry is already open, this function will close the currently open registry. + * @param rURL specifies the complete URL to access the data source. + * @param bReadOnly specifies if the data source should be opened for read only. + * @param bCreate specifies if the data source should be created if it does not already exist. + * @throws InvalidRegistryException if the registry does not exist. + */ + open(rURL: string, bReadOnly: boolean, bCreate: boolean): void; + + /** + * @returns the root key of the registry. + * @throws InvalidRegistryException if no registry is open + */ + readonly RootKey: XRegistryKey; + + /** returns the URL of the current data source of the registry. */ + readonly URL: string; + } + } + + namespace rendering { + type Canvas = XCanvas; + + /** + * The {@link CanvasFactory} is used to create the {@link Canvas} objects, evaluating the user's configuration preferences from + * + * `/org.openoffice.VCL/Settings/Canvas/PreferredServices` . + * + * The latter specifies a string list of service names to use. + * + * Instantiating this service, you can use its {@link com.sun.star.lang.XMultiComponentFactory} interface to create {@link Canvas} objects, passing an + * empty string as service specifier (default). If you want to manually override the configured service list, you can pass a service name to try first. + * @since OOo 2.0 + */ + type CanvasFactory = lang.XMultiComponentFactory; + + type Color = LibreOffice.SeqEquiv; + + type ColorComponent = number; + + /** + * This exception indicates an invalid volatile bitmap content. + * + * When accessing or rendering {@link XVolatileBitmap} data, that has been invalidated by the system, this exception will be thrown. + * @since OOo 2.0 + */ + type VolatileContentDestroyedException = uno.Exception; + + /** + * Determines which algorithm to use when determining inside and outside of filled poly-polygons. + * @since OOo 2.0 + */ + const enum FillRule { + /** Fill every area, where, when traveling along a line, an uneven number of intersections with polygon edges have happened. */ + EVEN_ODD = 1, + /** + * Fill every area, where, when traveling along a line, the summed winding number (that is, -1 for a counter-clockwise-oriented polygon, and +1 for a + * clockwise-oriented) is non-zero. + * + * For example, a poly-polygon consisting of two concentric circles with similar orientation is filled the same way as if only the outer circle would + * exist. If both have opposite orientation, then the filled representation looks the same as if filled with the EVEN_ODD fill rule. + */ + NON_ZERO = 0, + } + + /** + * This structure contains attributes needed to run an animation. + * @since OOo 2.0 + */ + interface AnimationAttributes { + Duration: number; + + /** + * Repeat mode of the animation sequence. + * + * This value determines how the [0,1] parameter space of the animation should be swept through. Permissible values are given in {@link AnimationRepeat} + * . + * @see AnimationRepeat. + */ + RepeatMode: number; + + /** + * Size of the untransformed animation sequence. + * + * This value specifies the size of the animation when rendered with the identity view transform. This permits e.g. {@link XSprite} implementations to + * cache rendered animation content in finite-sized bitmaps. + */ + UntransformedSize: geometry.RealSize2D; + } + + interface ARGBColor { + /** + * Alpha component. + * + * Valid range is [0,1.0], with 0.0 denoting fully transparent, and 1.0 fully opaque. + */ + Alpha: ColorComponent; + Blue: ColorComponent; + Green: ColorComponent; + Red: ColorComponent; + } + + /** This service provides the interfaces for a {@link XBitmapCanvas} */ + interface BitmapCanvas extends XBitmapCanvas, XBitmap { } + + /** + * This structure contains the caret information. + * + * This structure is used from the {@link XTextLayout} interface to transport information regarding a text caret. + * @since OOo 2.0 + */ + interface Caret { + /** + * The angle of the caret. + * + * This member contains the rotation angle of the caret in degrees, with 0 denoting an unrotated caret (the unrotated caret orientation depends on the + * writing mode, horizontally or vertically). The rotation angle is positive for counter-clockwise rotations. + */ + CaretAngle: number; + + /** + * This contains the main caret index. + * + * The main caret index corresponds to the insert position when inserting text in the layout's main text direction. + */ + MainCaretIndex: number; + + /** + * This contains the secondary caret index. + * + * The secondary caret index, when different from the main caret index, corresponds to the insert position when inserting text at a direction change + * opposite to the layout's main text direction. + */ + SecondaryCaretIndex: number; + } + + interface ColorProfile { + dummy: number; + } + + /** + * This structure describes the memory layout of a bitmap having floating point color channels. + * + * This structure collects all necessary information to describe the memory layout of a bitmap having floating point color channels + * @since OOo 2.0 + */ + interface FloatingPointBitmapLayout { + ColorSpace: XColorSpace; + + /** + * Endianness of the pixel values. + * + * This value must be one of the Endianness constants + */ + Endianness: number; + + /** + * Format type of this bitmap. + * + * This value must be one of the {@link FloatingPointBitmapFormat} constants. + */ + Format: number; + + /** + * Number of color components per pixel. + * + * This value must not be negative + */ + NumComponents: number; + + /** + * Byte offset between the start of two consecutive planes. + * + * This value is permitted to be negative. If this value is zero, the bitmap is assumed to be in chunky format, otherwise it is assumed to be planar. The + * difference between chunky and planar layout lies in the way how color channels are interleaved. For a chunky format, all channel data for a single + * pixel lies consecutively in memory. For a planar layout, the first channel of all pixel is stored consecutive, followed by the second channel, and so + * forth. + */ + PlaneStride: number; + + /** + * Number of data bytes per scanline. + * + * This value must not be negative + */ + ScanLineBytes: number; + + /** + * Number of scanlines for this bitmap. + * + * This value must not be negative + */ + ScanLines: number; + + /** + * Byte offset between the start of two consecutive scanlines. + * + * This value is permitted to be negative, denoting a bitmap whose content is flipped at the x axis. + */ + ScanLineStride: number; + } + + /** + * This structure provides information about a specific font. + * @since OOo 2.0 + */ + interface FontInfo { + /** + * The name of the font family. + * + * The family name is the one normally associated to a font, such as Times New Roman, Thorndale, Andale or Arial. + * + * Note: outlined fonts are now specified with "outline" as part of the family name. + */ + FamilyName: string; + + /** + * The PANOSE font classification. + * + * TODO: Document semantics in {@link Panose.idl} + */ + FontDescription: Panose; + + /** + * Specifies whether the font is a symbol font. + * + * If yes, text written in this symbol font does not have a specified meaning. + */ + IsSymbolFont: util.TriState; + + /** + * Set to true, if the font is usable for vertical text output. + * + * Vertical fonts have subtle differences to horizontal ones, e.g. rotated or differently shaped glyphs, or special rotated versions of normally upright + * glyphs (e.g. brackets). + */ + IsVertical: util.TriState; + + /** + * The name of the specific font style within its family. + * + * For example, oblique, italic, or narrow. + */ + StyleName: string; + + /** + * This value specifies which Unicode ranges are supported by this font. + * + * This is to be interpreted as a split-up 128-bit value, see [Adobe's OpenType specification]{@link + * url="http://partners.adobe.com/asn/tech/type/opentype/os2.jsp#ur"} for the specific meaning of each bit. UnicodeRanges0 contains the least significant + * bits, UnicodeRanges3 the most significant ones. + * + * const int128 UNICODE_RANGE_BASIC_LATIN = 1; const int128 UNICODE_RANGE_LATIN_SUPPLEMENT = 2; const int128 UNICODE_RANGE_LATIN_EXTENDED_A = 4; const + * int128 UNICODE_RANGE_LATIN_EXTENDED_B = 4; ... const int128 UNICODE_RANGE_MASK_LATIN = 1; const int128 UNICODE_RANGE_MASK_CJK = (31<<48) + (3<<55) + + * (1<<59); const int128 UNICODE_RANGE_MASK_CTL = (1<<11) + (1<<13) + (0x3FFF<<15) + (0x0FFF<<70); + */ + UnicodeRanges0: number; + UnicodeRanges1: number; + UnicodeRanges2: number; + UnicodeRanges3: number; + } + + /** + * Metrics global to the font, i.e. not specific to single glyphs. The font height is defined as ascent+descent+internalLeading, and therefore not + * explicitly included here. + * + * Please note that when querying {@link FontMetrics} from an {@link XCanvasFont} interface, all values here are given relative to the font cell size. + * That means, the referenceCharWidth and/or ascent+descent+internalLeading will approximately (rounded to integer device resolution, or exactly, if + * fractional font rendering is enabled) match the referenceAdvancement/cellSize members of the {@link FontRequest} for which the {@link XCanvasFont} was + * queried. Please be aware that the values returned in this structure only map one-to-one to device pixel, if the combined rendering transformation for + * text output equals the identity transformation. Otherwise, the text output (and thus the resulting metrics) will be subject to that transformation. + * Depending on the underlying font technology, actual device output might be off by up to one device pixel from the transformed metrics. + * @since OOo 2.0 + */ + interface FontMetrics { + Ascent: number; + Descent: number; + + /** + * Extra space outside the font cells. + * + * It should not contain ink marks and is typically used by the font designer to modify the line distance. + */ + ExternalLeading: number; + InternalLeading: number; + + /** + * This value specifies the reference character width of the font. + * + * It's roughly equivalent to the average width of all characters, and if one needs a font with double character width, the referenceCharSize should be + * doubled. + */ + ReferenceCharSize: number; + + /** Specifies the offset to be added to the baseline when striking through the text. */ + StrikeThroughOffset: number; + + /** Specifies the offset to be added to the baseline when drawing underlined text. */ + UnderlineOffset: number; + } + + /** + * This structure contains all information necessary to describe a font to be queried from {@link XCanvas} . + * + * Note: Outline fonts are to be requested as a special family, set {@link FontInfo.FamilyName} appropriately. Emboss/relief must be emulated by upper + * layers. + * + * Leave the {@link FontInfo.FamilyName} and {@link FontInfo.StyleName} empty, if font selection should only happen via the PANOSE description. + * @since OOo 2.0 + */ + interface FontRequest { + /** + * The size of the font in **device** coordinate space. + * + * This value corresponds to the font height in Western scripts, but is independent of the writing direction (see FontRequest::IsVertical below). That + * means, the value specified here is always measured orthogonal to the text advancement (height for horizontal writing, and width for vertical writing). + * + * When this value is negative, its absolute value is taken as the character size of the font. If this value is positive, it's taken as the cell size of + * the font. + * + * This member and the referenceAdvancement member are mutually exclusive, one of them has to be set to 0 (which means don't care). + * + * For distorted fonts, the render transformation must be used. That is, the size specified here corresponds to device pixel only if the combined render + * transformation during text output equals the identity transform. This also applies to all query methods, for both {@link XCanvasFont} and {@link + * XTextLayout} . + */ + CellSize: number; + + /** + * The description of the font. + * + * This member contains the description of the font as returned by the font listing methods. + */ + FontDescription: FontInfo; + + /** + * The locale this font should be able to render. + * + * This member supplements the FontInfo::UnicodeRange0 entry with a specific locale; this is e.g. important when selecting between traditional and + * simplified Chinese is necessary (since the letters have the same Unicode ranges and character values). + */ + Locale: lang.Locale; + + /** + * This value specifies the size of the font in the writing direction (i.e. width for horizontal writing, and height for vertical writing). + * + * It is equivalent to the referenceCharSize of the {@link FontMetrics} structure. + * + * This member and the cellSize member are mutually exclusive, one of them has to be set to 0 (which means don't care). For distorted fonts, the font + * matrix must be used. + */ + ReferenceAdvancement: number; + } + + /** + * This structure describes the memory layout of a bitmap having integer color channels. + * + * This structure collects all necessary information to describe the memory layout of a bitmap having integer color channels + * @since OOo 2.0 + */ + interface IntegerBitmapLayout { + /** + * Color space the bitmap colors shall be interpreted within. + * + * Note that the actual pixel layout is specified at the color space. If this layout describes a palette bitmap format, this color space describes the + * index format (plus maybe an extra alpha channel). The palette itself references another color space, which describes the layout of the palette + * entries. + * @see XBitmapPalette + */ + ColorSpace: XIntegerBitmapColorSpace; + + /** + * This member determines the bit order (only relevant if a pixel uses less than 8 bits, of course). + * + * When `TRUE` , this member denotes that the leftmost pixel from an 8 bit amount of pixel data consists of the bits starting with the most significant + * bit. When `FALSE` , it's starting with the least significant bit. + * + * Example: for a 1bpp bitmap, each pixel is represented by exactly one bit. If this member is `TRUE` , the first pixel is the MSB of the first byte, and + * the eighth pixel is the LSB of the first byte. If this member is `FALSE` , it's just the opposite. + */ + IsMsbFirst: boolean; + + /** + * This member determines whether the bitmap data are actually indices into a color map. + * + * When set to the nil reference, the bitmap data is assumed to contain direct color values (to be interpreted according to the associated color space). + * If this member references a valid palette, one of the pixel components as returned by the color space referenced from the {@link ColorSpace} is + * required to be of type {@link ColorComponentTag.INDEX} . That component is then used to index the palette. + */ + Palette: XBitmapPalette; + + /** + * Byte offset between the start of two consecutive planes. + * + * This value is permitted to be negative. If this value is zero, the bitmap is assumed to be in chunky format, otherwise it is assumed to be planar. The + * difference between chunky and planar layout lies in the way how color channels are interleaved. For a chunky format, all channel data for a single + * pixel lies consecutively in memory. For a planar layout, the first channel of all pixel is stored consecutive, followed by the second channel, and so + * forth. + */ + PlaneStride: number; + + /** + * Number of data bytes per scanline. + * + * This value must not be negative + */ + ScanLineBytes: number; + + /** + * Number of scanlines for this bitmap. + * + * This value must not be negative + */ + ScanLines: number; + + /** + * Byte offset between the start of two consecutive scanlines. + * + * This value is permitted to be negative, denoting a bitmap whose content is flipped at the x axis. + */ + ScanLineStride: number; + } + + interface MtfRenderer extends XMtfRenderer { + createWithBitmapCanvas(Canvas: XBitmapCanvas): void; + } + + interface Panose { + ArmStyle: number; + Contrast: number; + FamilyType: number; + Letterform: number; + Midline: number; + Proportion: number; + SerifStyle: number; + StrokeVariation: number; + Weight: number; + XHeight: number; + } + + /** + * This structure contains information passed to each {@link XCanvas} render operation. + * + * This structure contains information considered as the render state, i.e. the common setup required to render each individual {@link XCanvas} + * primitive. + * @since OOo 2.0 + */ + interface RenderState { + /** + * The affine transform associated with this render operation. + * + * This is used to transform coordinates of canvas primitives from user space to view space (from which they are subsequently transformed to device space + * by the view transform). + */ + AffineTransform: geometry.AffineMatrix2D; + + /** + * The clipping area associated with this render operation. + * + * This clipping is interpreted in the user coordinate system, i.e. subject to the render state transform followed by the view transform before mapped to + * device coordinate space. + * + * Specifying an empty interface denotes no clipping, i.e. everything rendered to the canvas will be visible (subject to device-dependent constraints, of + * course). Specifying an empty {@link XPolyPolygon2D} , i.e. a poly-polygon containing zero polygons, or an {@link XPolyPolygon2D} with any number of + * empty sub-polygons, denotes the NULL clip. That means, nothing rendered to the canvas will be visible. + */ + Clip: XPolyPolygon2D; + + /** + * The composition mode associated with this render operation. + * + * The composite mode determines in which way the primitive and possibly existing background is combined. The permissible values must be one out of the + * {@link CompositeOperation} constants. + */ + CompositeOperation: number; + + /** + * The device color associated with this render operation. + * + * Note that this need not be RGB here, but depends on the active device color space. + * @see XGraphicDevice + * @see XColorSpace + */ + DeviceColor: SafeArray; + } + + interface RGBColor { + Blue: ColorComponent; + Green: ColorComponent; + Red: ColorComponent; + } + + /** + * Collection of string-related arguments used on all canvas text interfaces. + * + * A possibly much larger string than later rendered is necessary here, because in several languages, glyph selection is context dependent. + * @since OOo 2.0 + */ + interface StringContext { + /** + * Length of the substring to actually use. + * + * Must be within the range [0,INTMAX]. + */ + Length: number; + + /** + * Start position within the string. + * + * The first character has index 0. + */ + StartPosition: number; + + /** The complete text, from which a subset is selected by the parameters below. */ + Text: string; + } + + /** + * This structure contains all attributes required for path stroking. + * + * Path stroking is the process of drawing a polygon with a thick pen. The various attributes contained in this structure can be used to customize that + * process. + */ + interface StrokeAttributes { + /** + * Array of ink on and off lengths, measured in user coordinate space. + * + * The first element specifies the length of the first "on" segment of the dashing, the second element the length of the first "off" segment, and so + * forth. Give zero elements here for solid strokes. This array always have an even number of elements, with zero, as usual, counting as even here. + * Furthermore, each entry in this array must have a value that is positive (or 0.0) + */ + DashArray: SafeArray; + + /** + * The end shape of the stroke. + * + * The end point is the last point of every polygon of the path poly-polygon. + * @see PathCapType + */ + EndCapType: number; + + /** + * The join shape of the stroke. + * + * After every sub-stroke, i.e. after every line or curve segment within a single path polygon, a shape of this type is inserted into the stroke to glue + * the segments together. Please note that distinct polygons within the path poly-polygon are not connected, and therefore also not joined via the shape + * specified here. + * @see PathJoinType + */ + JoinType: number; + + /** + * Array of line widths and spacings for multiple-line strokes. + * + * The entries here are relative to the {@link StrokeAttributes.StrokeWidth} attribute above, i.e. the total width of all lines and spacings will always + * equal {@link StrokeAttributes.StrokeWidth} . The first element specifies the width of the rightmost line, when traveling from the start point of the + * path to the end point. The second element specifies the space between the first line and the second line, and so forth. If the array ends with a + * spacing, this spacing is included in the total width of the multiple-line stroke. That is, the stroke becomes asymmetric. + */ + LineArray: SafeArray; + + /** + * Determines the maximal length of the diagonal in mitered corners. + * + * This attribute is only used when {@link StrokeAttributes.JoinType} is set to {@link PathJoinType.MITER} . Should the length of a corner's diagonal + * exceed this limit, a beveled join is used instead. This value must be positive (or 0.0, which is equivalent to setting {@link + * StrokeAttributes.JoinType} to {@link PathJoinType.BEVEL} . + * + * Before performing the actual comparison, implementations will multiply the MiterLimit with the current StrokeWidth, such that, with phi being the + * angle between the two joining segments, MiterLimit=1/sin(phi/2.0). + */ + MiterLimit: number; + + /** + * The start shape of the stroke. + * + * The start point is the first point of every polygon of the path poly-polygon. + * @see PathCapType + */ + StartCapType: number; + + /** + * Defines the width of the stroke, measured in user coordinate space. + * + * This value must be positive (or 0.0) + */ + StrokeWidth: number; + } + + /** + * This structure contains hit information for {@link XTextLayout} . + * + * This structure is used from the {@link XTextLayout} interface to transport information regarding hit tests. + * @since OOo 2.0 + */ + interface TextHit { + /** + * This contains the entry index. + * + * The entry index is the index of the insertion point in the character sequence. The insertion point denotes positions **between** the actual characters + * in the string, and can thus have values ranging from 0 up to the number of characters in the string. Hereby, an index of 0 denotes an insertion + * position **before** the first character, and an index containing the number of characters denotes an insertion **behind** the last character. + */ + EntryIndex: number; + + /** + * This member denotes whether the hit was on the leading edge. + * + * Each character is divided in two halves, the leading and the trailing part. The leading edge is the part of the glyph encountered first when reading + * text of the corresponding language (i.e. the leading edge of an Arabic glyph is the right half of it, whereas it is the left half of a Latin + * character). If the hit was on the leading edge, this member is set to `TRUE` . + */ + IsLeadingEdge: boolean; + } + + /** + * Contains all information needed to define a texture. + * + * This structure contains all information necessary to define a texture. A texture describes the filled area of polygonal shapes, providing its own + * transformation matrix, repeat mode, and transparency. + * + * To achieve uniformity, if this texture has a bitmap set, it is scaled in such a way that it will cover the same [0,1]x[0,1] box as the hatch and the + * gradient. The transformation member can then be used to scale the complete texture as it fits suit. + * @since OOo 2.0 + */ + interface Texture { + /** + * {@link Texture} transformation from texture to primitive space. + * + * This member allows arbitrary transformations of the texture, relative to the textured primitive. Thus, the total transformation from the [0,1]x[0,1] + * texture space to the device coordinate space is the concatenation of texture, render state, and view state transformation (with only render state and + * view state transformation being applied to the textured primitive). + */ + AffineTransform: geometry.AffineMatrix2D; + + /** + * Overall transparency of the texturing. + * + * The valid range for this value is [0,1], where 0 denotes complete transparency, and 1 denotes fully opaque. + */ + Alpha: number; + + /** + * {@link Texture} bitmap. + * + * This member can be used together with gradient and hatching. + * + * The bitmap is scaled to a one-by-one rectangle, to cover the same area as both the gradient and the hatching. + */ + Bitmap: XBitmap; + + /** + * {@link Texture} gradient. + * + * This member can be used together with bitmap and hatching. The parametric polygons color value is used to fill the returned polygonal outlines. + */ + Gradient: XParametricPolyPolygon2D; + + /** + * Specifies the stroke attributes used for hatching. + * + * Use 0.0 as the strokeWidth here to indicate hair lines. + */ + HatchAttributes: StrokeAttributes; + + /** + * {@link Texture} hatching. + * + * This member can be used together with bitmap and gradient. The parametric polygons color value is used to stroke the returned polygonal outlines. + */ + Hatching: XParametricPolyPolygon2D; + + /** + * Specifies the number of parameterized polygons used for the texture. + * + * This member specifies the number of polygons the parametric polygon interface is queried. The continuous range [0,1] of the + * XParametricPolyPolygon::getOutline() method is divided up into numberOfHatchPolygons equal parts, and for everyone of these parts, the start of the + * interval is plugged into the getOutline method. For example, if numberOfHatchPolygons is 2, then getOutline is called twice, once with 0.0 and once + * with 0.5. Use this parameter to control the density of the hatching. + */ + NumberOfHatchPolygons: number; + + /** + * Repeat mode of the texture, x direction. + * + * The repeat mode is separated into x and y direction, this is the x direction part. Permissible values are from the {@link TexturingMode} constants. + */ + RepeatModeX: number; + + /** + * Repeat mode of the texture, y direction. + * + * The repeat mode is separated into x and y direction, this is the y direction part. Permissible values are from the {@link TexturingMode} constants. + */ + RepeatModeY: number; + } + + /** + * This structure contains information considered the view state. + * + * This structure contains information considered the view state, i.e. the invariant setup used when painting a whole view of something. + * @since OOo 2.0 + */ + interface ViewState { + /** + * The affine transform associated with the view. + * + * This member is used to transform coordinates of draw operations from user space to screen space. + */ + AffineTransform: geometry.AffineMatrix2D; + + /** + * The clipping area associated with the view. + * + * This clipping is interpreted in the view coordinate systems, i.e. subject to the view transform before mapping to the device coordinate space. + * + * Specifying an empty interface denotes no clipping, i.e. everything rendered to the canvas will be visible (subject to device-dependent constraints, of + * course). Specifying an empty {@link XPolyPolygon2D} , i.e. a poly-polygon containing zero polygons, or an {@link XPolyPolygon2D} with any number of + * empty sub-polygons, denotes the NULL clip. That means, nothing rendered to the canvas will be visible. + */ + Clip: XPolyPolygon2D; + } + + /** + * This interface can be used to control an animated sprite object. + * + * This interface can be used to control an animated sprite object on an {@link XSpriteCanvas} . Sprites are moving, animated objects. + * @since OOo 2.0 + */ + interface XAnimatedSprite extends XSprite { + /** + * Reset the animation sequence to start with the first frame. + * + * If the animation is currently running, the next frame that is drawn after this method has finished, will be the first one. Please note that if an + * animation is not started, the associated {@link XSpriteCanvas} does not update changed sprites automatically. + */ + resetAnimation(): void; + + /** + * Changes all of the sprite's attributes at one atomic instance. + * + * This is useful at times where one does not want multiple redraws for every state change. + * + * Please note that if an animation is not started, the associated {@link XSpriteCanvas} does not update changed sprites automatically, but has to be + * told to do so via {@link XSpriteCanvas.updateScreen()} . + * @param aNewPos New left,top output position of the sprite. This position gets transformed by the view and render state. + * @param aViewState New view state of the sprite, and part of the transformation that is applied to aNewPos. The view transformation matrix must not be si + * @param aRenderState New render state of the sprite, and part of the transformation that is applied to aNewPos. The render transformation matrix must not + * @param nAlpha New alpha value of the sprite. This value must be within the [0,1] range. + * @param bUpdateAnimation Whether this method should implicitly call XSpriteCanvas::updateAnimation() or not. + * @throws com::sun::star::lang::IllegalArgumentException if one of the passed parameters does not lie in the specified, permissible range. + */ + setAll(aNewPos: geometry.RealPoint2D, aViewState: ViewState, aRenderState: RenderState, nAlpha: number, bUpdateAnimation: boolean): void; + + /** + * Changes the view state in place for this sprite's animation. + * + * The state given here is used when calling the {@link XAnimation.render()} method, or when drawing the sprite's bitmaps, respectively. There's no need + * to call XSpriteCanvas::updateAnimation() after this method, as it automatically rerenders, if necessary. Please note that if an animation is not + * started, the associated {@link XSpriteCanvas} does not update changed sprites automatically, but has to be told to do so via {@link + * XSpriteCanvas.updateScreen()} . + * @param aViewState The state given here is used when calling the {@link XAnimation.render()} method, or when drawing the sprite's bitmaps, respectively. + * @throws com::sun::star::lang::IllegalArgumentException if the view transformation matrix is singular. + */ + setViewState(aViewState: ViewState): void; + + /** + * Start animation sequence of this sprite. + * + * The speed of the animation is given in cycles per second (where a cycle is defined as one full animation run, i.e. the full [0,1] range of the {@link + * XAnimation.render()} 's t parameter, or a full sequence of sprite bitmaps drawn). Once an animation is running, the associated {@link XSpriteCanvas} + * handles screen updates automatically. That means, changes to position or alpha are reflected on screen automatically. Please note further that sprite + * visibility and animation are unrelated, i.e. a hidden sprite can have a running animation, which then displays in the middle of the animation + * sequence, when a {@link show()} is called later on. + * @param nSpeed The speed of the animation in cycles per second (where a cycle is defined as one full animation run, i.e. the full [0,1] range of the {@li + */ + startAnimation(nSpeed: number): void; + + /** + * Stop the animation sequence. + * + * A subsequent {@link XAnimatedSprite.startAnimation()} will commence the sequence at the point where it was stopped with here. Once an animation is + * stopped, the associated {@link XSpriteCanvas} does not update changed sprites anymore. + */ + stopAnimation(): void; + + /** + * Issue an additional render call to this sprite's animation. + * + * This method has no effect when called for a bitmap-sequence sprite. Please note that if an animation is not started, the associated {@link + * XSpriteCanvas} does not update changed sprites automatically, but has to be told to do so via {@link XSpriteCanvas.updateScreen()} . + */ + updateAnimation(): void; + } + + /** + * This interface defines an animation sequence. + * + * This interface must be implemented by every animation object. It is used by the {@link XCanvas} interface to render generic animations. + * @since OOo 2.0 + */ + interface XAnimation extends uno.XInterface { + /** + * Request the attribute information for this animation. + * + * This method returns the {@link AnimationAttributes} structure, which defines more closely how to play this animation. + * @returns the requested {@link AnimationAttributes} structure. + */ + readonly AnimationAttributes: AnimationAttributes; + + /** + * Request the attribute information for this animation. + * + * This method returns the {@link AnimationAttributes} structure, which defines more closely how to play this animation. + * @returns the requested {@link AnimationAttributes} structure. + */ + getAnimationAttributes(): AnimationAttributes; + + /** + * Render the animation content at time t into the specified canvas. + * + * Note that it is perfectly legal to e.g. map t in a nonlinear fashion to internal frames, for example to achieve acceleration or deceleration effects. + * It is required that the render method has const semantics, i.e. when called with the same parameter set, identical output must be generated. This is + * because e.g. a Sprite might decide arbitrarily to render an animation once and cache the result, or repaint it via {@link XAnimation.render} every + * time. + * + * The rendered content, although, must be exactly the same for identical viewState, canvas and t values. Or, for that matters, must call the same canvas + * methods in the same order with the same parameter sets, for identical viewState and t values. Furthermore, when viewState has the identity + * transformation set, rendered output must be contained in a rectangle with upper left corner at (0,0) and width and height given by the {@link + * AnimationAttributes} ' untransformedSize member. Any content exceeding this box might get clipped off. + * @param canvas The target canvas to render this animation to. + * @param viewState The view state to be used when rendering this animation to the target canvas. The view transformation matrix must not be singular. + * @param t Time instant for which animation content is requested. The range must always be [0,1], where 0 denotes the very beginning, and 1 the end of the + * @throws com::sun::star::lang::IllegalArgumentException if one of the passed parameters does not lie in the specified, permissible range. + */ + render(canvas: XCanvas, viewState: ViewState, t: number): void; + } + + /** + * This is a specialized interface for a 2D poly-polygon containing straight line and Bezier segments. + * + * This poly-polygon can contain polygons consisting of a mixture of cubic Bezier curves and straight lines. As the straight line is a special case of a + * cubic Bezier curve (control points collinear with the line through start and end point), this can be expressed uniformly with a sequence of + * RealBezierSegment2Ds. + * + * By convention, a RealBezierSegment2D is a straight line segment, if all three contained points are strictly equal. + * @since OOo 2.0 + */ + interface XBezierPolyPolygon2D extends XPolyPolygon2D { + /** + * Get a single point from the poly-polygon. + * @param nPolygonIndex The index of the polygon where the point to be extract is contained within. This index must be in the range [0,numPolygons-1]. + * @param nPointIndex The index of the point in the polygon specified by nPolygonIndex, which is to be retrieved. This value must not exceed the number of + * @returns the requested point. + * @throws com::sun::star::lang::IndexOutOfBoundsException if one of the given values exceed the permissible range. + */ + getBezierSegment(nPolygonIndex: number, nPointIndex: number): geometry.RealBezierSegment2D; + + /** + * Query subset of this poly-polygon. + * + * Query subset of this poly-polygon, starting at the given polygon and the given point within that polygon, and containing the specified number of + * polygons and points in the last polygon. + * @param nPolygonIndex The index of the polygon to start point retrieval with. This index must be in the range [0,numPolygons-1]. + * @param nNumberOfPolygons The number of polygons to extract. This value must not exceed numPolygons-nPolygonIndex. + * @param nPointIndex The index of the first point in the first polygon to extract. This value must not exceed the number of points in this polygon minus one. + * @param nNumberOfPoints The number of points to extract from the last polygon. This value must not exceed the number of points in this last polygon minus one. + * @returns the sequence of extracted points. + * @throws com::sun::star::lang::IndexOutOfBoundsException if one of the given values exceed the permissible range. + */ + getBezierSegments(nPolygonIndex: number, nNumberOfPolygons: number, nPointIndex: number, nNumberOfPoints: number): SafeArray>; + + /** + * Set a single point on the poly-polygon. + * + * The remaining points of the poly-polygon will not be changed by this method. Use {@link XBezierPolyPolygon2D.getNumberOfPolygons()} or {@link + * XBezierPolyPolygon2D.getNumberOfPolygonPoints()} to append points or polygons, respectively. + * @param point The point to be set at the poly-polygon. + * @param nPolygonIndex The index of the polygon to insert the point in. This index must be in the range [0,numPolygons]. + * @param nPointIndex The index of the point in the polygon specified by nPolygonIndex, which is to be set. This value must not exceed the number of points + * @throws com::sun::star::lang::IndexOutOfBoundsException if one of the given values exceed the permissible range. + */ + setBezierSegment(point: geometry.RealBezierSegment2D, nPolygonIndex: number, nPointIndex: number): void; + + /** + * Set the specified sequence of Bezier segments to the poly-polygon. + * + * This method can either set the whole poly-polygon to the new data, or insert the segments at the given index + * @param points the points. + * @param nPolygonIndex The index of the polygon to start segment insertion with. This index must be in the range [0,numPolygons], and the insertion will t + * @throws com::sun::star::lang::IndexOutOfBoundsException if one of the given values exceed the permissible range. + */ + setBezierSegments(points: LibreOffice.SeqEquiv>, nPolygonIndex: number): void; + } + + /** + * This is a generic interface to a bitmap. + * + * This interface contains the generic functionality to be used on every {@link XCanvas} bitmap object. More format-specific methods can be found at the + * {@link XIntegerBitmap} , {@link XIeeeDoubleBitmap} , {@link XIeeeFloatBitmap} and {@link XHalfFloatBitmap} interfaces. + * @since OOo 2.0 + */ + interface XBitmap extends uno.XInterface { + /** + * Query a scaled copy of the original bitmap. + * @param newSize Requested size of the new bitmap. Both of the two size components must be greater than zero. + * @param beFast When set to true, this parameter advises getScaledBitmap to use the fastest available algorithm to scale the bitmap, which might cause vis + * @returns the new scaled bitmap. + * @throws com::sun::star::lang::IllegalArgumentException if the size components are outside the specified range. + * @throws VolatileContentDestroyedException if the contents of a volatile bitmap have been destroyed, and thus cannot be read to generate the scaled bitmap. + */ + getScaledBitmap(newSize: geometry.RealSize2D, beFast: boolean): XBitmap; + + /** + * Query the size of the bitmap. + * + * This method queries the bitmap size in pixel. + * @returns the bitmap size in pixel. + */ + getSize(): geometry.IntegerSize2D; + + /** + * Query transparency status of the bitmap. + * + * The method checks, whether the bitmap contains any alpha information. The same information is also available at the {@link XColorSpace} associated + * with this bitmap, though much easier to access here (the color space then has a component flagged {@link ColorComponentTag.ALPHA} ). + * @returns `TRUE` , if the bitmap has alpha data, or `FALSE` if not. + */ + hasAlpha(): boolean; + + /** + * Query the size of the bitmap. + * + * This method queries the bitmap size in pixel. + * @returns the bitmap size in pixel. + */ + readonly Size: geometry.IntegerSize2D; + } + + /** + * This is a specialization of the canvas interface for bitmapped canvases. + * + * This interface is a specialization of the canvas interface for bitmapped canvases, where additional methods for accessing and moving of bitmap content + * are provided. + * @since OOo 2.0 + */ + interface XBitmapCanvas extends XCanvas { + /** + * This method copies a rectangular area from a place of one canvas to a place on another. + * + * This method copies a rectangular area from a place of one canvas to a place on another. Source and destination areas are permitted to overlap. If the + * source view or render state has a clipping set, the regions clipped away from the source rectangle are regarded fully transparent for the copy + * operation. The device color for both source and destination render state is ignored, the compositing mode only for the source render state. + * @param sourceCanvas {@link Canvas} from which to copy the bitmap data. Can be identical to the canvas this method is called on, but must be valid. + * @param sourceRect Rectangle from which to copy the bitmap data. This rectangle is subject to both view and render transformation, before being applied. + * @param sourceViewState The view state to apply to the source of this copy operation. The view transformation must be non-singular. + * @param sourceRenderState The render state to apply to the source of this copy operation. The render transformation must be non-singular, and the composi + * @param destRect Rectangle into which to copy the bitmap data. This rectangle is subject to both view and render transformation, before being applied. Th + * @param destViewState The view state to apply to the destination of this copy operation. The view transformation must be non-singular. + * @param destRenderState The render state to apply to the destination of this copy operation. The render transformation must be non-singular, and the comp + * @throws com::sun::star::lang::IllegalArgumentException if one of the parameters are not within the specified range. + */ + copyRect( + sourceCanvas: XBitmapCanvas, sourceRect: geometry.RealRectangle2D, sourceViewState: ViewState, sourceRenderState: RenderState, + destRect: geometry.RealRectangle2D, destViewState: ViewState, destRenderState: RenderState): void; + } + + /** + * Interface to access the palette of a color-indexed bitmap. + * @since OOo 2.0 + */ + interface XBitmapPalette extends uno.XInterface { + /** + * Query associated color space. + * @returns the color space that is associated with this palette. + */ + readonly ColorSpace: XColorSpace; + + /** + * Query associated color space. + * @returns the color space that is associated with this palette. + */ + getColorSpace(): XColorSpace; + + /** + * Request the color for the given palette entry. + * @param entry Output parameter for the color components at the given palette entry. + * @param nIndex The index of the palette entry to be retrieved. Valid range is [0, {@link getNumberOfEntries()} -1]. + * @returns `TRUE` , if the given palette entry should be displayed opaque, and `FALSE` if the entry should be displayed transparent. This is sometimes used + * @throws com::sun::star::lang::IndexOutOfBoundsException if the index is smaller than zero or larger than {@link XBitmapPalette.getNumberOfEntries()} -1. + */ + getIndex(entry: [LibreOffice.SeqEquiv], nIndex: number): boolean; + + /** + * Request the number of palette entries available. + * @returns the number of entries in this palette. + */ + getNumberOfEntries(): number; + + /** + * Request the number of palette entries available. + * @returns the number of entries in this palette. + */ + readonly NumberOfEntries: number; + + /** + * Set the color for the given palette entry. + * @param color Sequence of device color values in the associated bitmap's device color format. + * @param transparency When `TRUE` , the specified palette entry is displayed as opaque color. When `FALSE` , the given entry displays as fully transparent + * @param nIndex The index of the palette entry to be changed. Valid range is [0, {@link getNumberOfEntries()} -1]. + * @returns whether the palette entry was changed. For read-only entries, this method always returns `FALSE` . + * @throws com::sun::star::lang::IndexOutOfBoundsException if the index is smaller than zero or larger than {@link XBitmapPalette.getNumberOfEntries()} -1. + * @throws com::sun::star::lang::IllegalArgumentException if the given sequence of color components does not match the associated bitmap's device color format. + */ + setIndex(color: LibreOffice.SeqEquiv, transparency: boolean, nIndex: number): boolean; + } + + /** + * Interface providing access to double/multi-buffer facilities of screen devices. + * + * This interface provides methods to enable and control double/multi-buffering facilities on screen devices. + * @since OOo 2.0 + */ + interface XBufferController extends uno.XInterface { + /** + * Create the given number of background buffers. + * + * There's one buffer implicitly available, which is the canvas surface itself. Thus, calling `createBuffers(1)` creates a double-buffered object. + * @param nBuffers The number of background, aFontMatrix: geometry.Matrix2D): XCanvasFont; + + /** + * Request the associated graphic device for this canvas. + * + * A graphic device provides methods specific to the underlying output device capabilities, which are common for all canvases rendering to such a device. + * This includes device resolution, color space, or bitmap formats. + * @returns the associated {@link XGraphicDevice} . + */ + readonly Device: XGraphicDevice; + + /** + * Draw a cubic Bezier curve in device resolution width (i.e. one device pixel wide). + * @param aBezierSegment The start and the two control points of the Bezier curve. + * @param aEndPoint The end point of the Bezier curve. + * @param aViewState The view state to be used when drawing this curve. + * @param aRenderState The render state to be used when drawing this curve. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + */ + drawBezier(aBezierSegment: geometry.RealBezierSegment2D, aEndPoint: geometry.RealPoint2D, aViewState: ViewState, aRenderState: RenderState): void; + + /** + * Render the given bitmap. + * + * This method renders the bitmap, at a position and shape as specified by the combined view and render transformations. For fast render speed, the + * bitmap should be created by the corresponding {@link XGraphicDevice} 's {@link XGraphicDevice.createCompatibleBitmap()} method. + * @param xBitmap The bitmap to render. + * @param aViewState The view state to be used when drawing this text. + * @param aRenderState The render state to be used when drawing this text. + * @returns a handle to the cached rendering output. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + * @throws VolatileContentDestroyedException if a texture bitmap was volatile, and the content was destroyed before the rendering could take place. + */ + drawBitmap(xBitmap: XBitmap, aViewState: ViewState, aRenderState: RenderState): XCachedPrimitive; + + /** + * Render the given bitmap, with a global color modulation. + * + * This method renders the bitmap, at a position and shape as specified by the combined view and render transformations. For fast render speed, the + * bitmap should be created by the corresponding {@link XGraphicDevice} 's {@link XGraphicDevice.createCompatibleBitmap()} method. The bitmap's color + * channel values are multiplied with the device color values as specified in the render state. + * @param xBitmap The bitmap to render. + * @param aViewState The view state to be used when drawing this text. + * @param aRenderState The render state to be used when drawing this text. The device color entry in the render state is multiplied with every pixel color + * @returns a handle to the cached rendering output. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + * @throws VolatileContentDestroyedException if a texture bitmap was volatile, and the content was destroyed before the rendering could take place. + */ + drawBitmapModulated(xBitmap: XBitmap, aViewState: ViewState, aRenderState: RenderState): XCachedPrimitive; + + /** + * Draw a line in device resolution width (i.e. one device pixel wide). + * @param aStartPoint The start point of the line to draw. + * @param aEndPoint The end point of the line to draw. + * @param aViewState The view state to be used when drawing this line. + * @param aRenderState The render state to be used when drawing this line. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + */ + drawLine(aStartPoint: geometry.RealPoint2D, aEndPoint: geometry.RealPoint2D, aViewState: ViewState, aRenderState: RenderState): void; + + /** + * Draw a point in device resolution on the device. + * @param aPoint The point to draw. + * @param aViewState The view state to be used when drawing this point. + * @param aRenderState The render state to be used when drawing this point. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + */ + drawPoint(aPoint: geometry.RealPoint2D, aViewState: ViewState, aRenderState: RenderState): void; + + /** + * Draw a poly-polygon in device resolution line width (i.e. the lines are one device pixel wide). + * @param xPolyPolygon The poly-polygon to draw. + * @param aViewState The view state to be used when drawing this polygon. + * @param aRenderState The render state to be used when drawing this polygon. + * @returns a handle to the cached rendering output. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + */ + drawPolyPolygon(xPolyPolygon: XPolyPolygon2D, aViewState: ViewState, aRenderState: RenderState): XCachedPrimitive; + + /** + * Draw the text given by the substring of the specified string with the given font. + * + * The local origin of this output operation is either the left end of the text baseline, for textDirection equal LEFT_TO_RIGHT, or the right end of the + * baseline, for textDirection equal to RIGHT_TO_LEFT, respectively. + * @param aText The text to output. + * @param xFont The font retrieved from this canvas to be used when drawing the text. + * @param aViewState The view state to be used when drawing this text. + * @param aRenderState The render state to be used when drawing this text. + * @param nTextDirection A value from the {@link TextDirection} collection, denoting the main writing direction for this string. The main writing direction + * @returns a handle to the cached rendering output. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + */ + drawText(aText: StringContext, xFont: XCanvasFont, aViewState: ViewState, aRenderState: RenderState, nTextDirection: number): XCachedPrimitive; + + /** + * Draw the formatted text given by the text layout. + * + * The glyphs as represented by the text layout are always output with the reference position being the leftmost edge of the layout object's baseline. If + * the layout contains more than one baseline, the baseline of the first strong character in logical order is used here (strong in this context means + * that the character can be unambiguously assigned to a Unicode script). + * @param xLayoutetText An interface to the readily layouted text, obtained from a {@link XCanvasFont} created at this canvas. The text layout already carr + * @param aViewState The view state to be used when drawing this text. + * @param aRenderState The render state to be used when drawing this text. + * @returns a handle to the cached rendering output. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + */ + drawTextLayout(xLayoutetText: XTextLayout, aViewState: ViewState, aRenderState: RenderState): XCachedPrimitive; + + /** + * Fill the given poly-polygon. + * + * This method fills the given poly-polygon according to the {@link RenderState} 's color and the poly-polygon's fill rule. + * @param xPolyPolygon The poly-polygon to render. + * @param aViewState The view state to be used when filling this polygon. + * @param aRenderState The render state to be used when filling this polygon. + * @returns a handle to the cached rendering output. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + */ + fillPolyPolygon(xPolyPolygon: XPolyPolygon2D, aViewState: ViewState, aRenderState: RenderState): XCachedPrimitive; + + /** + * Fill the given poly-polygon with a texture. + * + * This method fills the given poly-polygon according to the {@link RenderState} 's color, the given textures and poly-polygon's fill rule. + * @param xPolyPolygon The poly-polygon to render. + * @param aViewState The view state to be used when filling this polygon. + * @param aRenderState The render state to be used when filling this polygon. + * @param xTextures A sequence of texture definitions, with which to fill the polygonal area. + * @returns a handle to the cached rendering output. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + * @throws VolatileContentDestroyedException if a texture bitmap was volatile, and the content was destroyed before the rendering could take place. + */ + fillTexturedPolyPolygon(xPolyPolygon: XPolyPolygon2D, aViewState: ViewState, aRenderState: RenderState, xTextures: LibreOffice.SeqEquiv): XCachedPrimitive; + + /** + * Fill the given poly-polygon with a mapped texture. + * + * This method fills the given poly-polygon according to the {@link RenderState} 's color, the given textures and poly-polygon's fill rule. The texture + * is mapped to the poly-polygon's interior via the given texture mapping. + * @param xPolyPolygon The poly-polygon to render. + * @param aViewState The view state to be used when filling this polygon. + * @param aRenderState The render state to be used when filling this polygon. + * @param xTextures A sequence of texture definitions, with which to fill the polygonal area. + * @param xMapping A bilinear mapping function which defines the warping of the textures on the output area. + * @returns a handle to the cached rendering output. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + * @throws VolatileContentDestroyedException if a texture bitmap was volatile, and the content was destroyed before the rendering could take place. + */ + fillTextureMappedPolyPolygon( + xPolyPolygon: XPolyPolygon2D, aViewState: ViewState, aRenderState: RenderState, xTextures: LibreOffice.SeqEquiv, xMapping: geometry.XMapping2D): XCachedPrimitive; + + /** + * Request the associated graphic device for this canvas. + * + * A graphic device provides methods specific to the underlying output device capabilities, which are common for all canvases rendering to such a device. + * This includes device resolution, color space, or bitmap formats. + * @returns the associated {@link XGraphicDevice} . + */ + getDevice(): XGraphicDevice; + + /** + * Query font information, specific to this canvas. + * @param aFilter Filter parameter to reduce the list of returned fonts. Every member of {@link FontInfo} that is not the empty string or the "don't care" + * @param aFontProperties This interface can provide additional font properties to filter the list of available fonts against. + * @returns the list of fonts matching the filter set. + * @throws com::sun::star::lang::IllegalArgumentException if one of the font properties are invalid or not recognized, or if one of the {@link FontInfo} mem + */ + queryAvailableFonts(aFilter: FontInfo, aFontProperties: LibreOffice.SeqEquiv): SafeArray; + + /** + * Query the polygonal representation of the stroke outlines, as it would be generated by the strokePolyPolygon methods. + * + * This method can be used to e.g. set a clipping which covers the same area as a stroke. + * @param xPolyPolygon The poly-polygon to render. + * @param aViewState The view state to be used when generating the outline. + * @param aRenderState The render state to be used when generating the outline. + * @param aStrokeAttributes Further attributes used to parameterize the stroking. + * @returns a poly-polygon describing the outline of the stroked area. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + */ + queryStrokeShapes(xPolyPolygon: XPolyPolygon2D, aViewState: ViewState, aRenderState: RenderState, aStrokeAttributes: StrokeAttributes): XPolyPolygon2D; + + /** + * Stroke each polygon of the provided poly-polygon with the specified stroke attributes. + * + * This method considers the stroking of all polygons as an atomic operation in relation to the {@link RenderState} 's CompositeOperationy operation. + * That means, overlapping strokes from distinct polygons will look exactly as overlapping segments of the same polygon, even with transparency. + * @param xPolyPolygon The poly-polygon to render. + * @param aViewState The view state to be used when stroking this polygon. + * @param aRenderState The render state to be used when stroking this polygon. + * @param aStrokeAttributes Further attributes used to parameterize the stroking. + * @returns a handle to the cached rendering output. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + */ + strokePolyPolygon(xPolyPolygon: XPolyPolygon2D, aViewState: ViewState, aRenderState: RenderState, aStrokeAttributes: StrokeAttributes): XCachedPrimitive; + + /** + * Stroke each polygon of the provided poly-polygon with the specified stroke attributes, fill the stroked outline with the specified texture graphics. + * + * This method considers the stroking of all polygons as an atomic operation in relation to the {@link RenderState} 's CompositeOp operation. That means, + * overlapping strokes from distinct polygons will look exactly as overlapping segments of the same polygon, even with transparency. + * @param xPolyPolygon The poly-polygon to render. + * @param aViewState The view state to be used when strokes this polygon. + * @param aRenderState The render state to be used when stroking this polygon. + * @param aTextures A sequence of texture definitions, with which to fill the stroked area. + * @param aStrokeAttributes Further attributes used to parameterize the stroking. + * @returns a handle to the cached rendering output. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + * @throws VolatileContentDestroyedException if a texture bitmap was volatile, and the content was destroyed before the rendering could take place. + */ + strokeTexturedPolyPolygon( + xPolyPolygon: XPolyPolygon2D, aViewState: ViewState, aRenderState: RenderState, aTextures: LibreOffice.SeqEquiv, aStrokeAttributes: StrokeAttributes): XCachedPrimitive; + + /** + * Stroke each polygon of the provided poly-polygon with the specified stroke attributes, fill the stroked outline with the specified texture graphics, + * map the texture to the outline via the specified texture mapping. + * + * This method considers the stroking of all polygons as an atomic operation in relation to the {@link RenderState} 's CompositeOp operation. That means, + * overlapping strokes from distinct polygons will look exactly as overlapping segments of the same polygon, even with transparency. + * @param xPolyPolygon The poly-polygon to render. + * @param aViewState The view state to be used when stroking this polygon. + * @param aRenderState The render state to be used when stroking this polygon. + * @param aTextures A sequence of texture definitions, with which to fill the stroked area. + * @param xMapping A bilinear mapping function which defines the warping of the textures on the output area. + * @param aStrokeAttributes Further attributes used to parameterize the stroking. + * @returns a handle to the cached rendering output. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + * @throws VolatileContentDestroyedException if a texture bitmap was volatile, and the content was destroyed before the rendering could take place. + */ + strokeTextureMappedPolyPolygon( + xPolyPolygon: XPolyPolygon2D, aViewState: ViewState, aRenderState: RenderState, aTextures: LibreOffice.SeqEquiv, xMapping: geometry.XMapping2D, + aStrokeAttributes: StrokeAttributes): XCachedPrimitive; + } + + /** + * This interface provides access to a specific, XCanvas-dependent font incarnation. This font is not universally usable, but belongs to the {@link + * XCanvas} it was queried from. + */ + interface XCanvasFont extends uno.XInterface { + /** + * Query the list of available font sizes. + * + * This method queries the list of available font sizes (in device units) for this font. For scalable fonts that are not restricted to discrete sizes, + * this list is **empty** , meaning that every size is possible. Fonts that **do** restrict the device size to certain discrete values, setting an + * overall transformation that scales the {@link FontRequest.CellSize} to something not contained in the list returned by this method can lead to visible + * disturbances. + */ + readonly AvailableSizes: SafeArray; + + /** + * Create a text layout interface. + * + * Create a text layout interface for the given string, using this font to generate the glyphs from. + * @param aText The text to layout. + * @param nDirection Main text direction for the string specified. The main text direction is e.g. important for characters that are not strong, i.e. that + * @param nRandomSeed Optional random seed for OpenType glyph variations. + */ + createTextLayout(aText: StringContext, nDirection: number, nRandomSeed: number): XTextLayout; + + /** Query the list of additional font properties. */ + readonly ExtraFontProperties: SafeArray; + + /** + * Query metric information about the font, that is generic to all its glyphs. + * + * Note that the metric values in the returned result are in the font coordinate system, i.e. relative to the corresponding size of this font. That is, + * when this font was created with a cell size of 20 units, the metrics returned are calculated relative to this size. + */ + readonly FontMetrics: FontMetrics; + + /** Query the {@link FontRequest} that was used to generate this object. */ + readonly FontRequest: FontRequest; + + /** + * Query the list of available font sizes. + * + * This method queries the list of available font sizes (in device units) for this font. For scalable fonts that are not restricted to discrete sizes, + * this list is **empty** , meaning that every size is possible. Fonts that **do** restrict the device size to certain discrete values, setting an + * overall transformation that scales the {@link FontRequest.CellSize} to something not contained in the list returned by this method can lead to visible + * disturbances. + */ + getAvailableSizes(): SafeArray; + + /** Query the list of additional font properties. */ + getExtraFontProperties(): SafeArray; + + /** + * Query metric information about the font, that is generic to all its glyphs. + * + * Note that the metric values in the returned result are in the font coordinate system, i.e. relative to the corresponding size of this font. That is, + * when this font was created with a cell size of 20 units, the metrics returned are calculated relative to this size. + */ + getFontMetrics(): FontMetrics; + + /** Query the {@link FontRequest} that was used to generate this object. */ + getFontRequest(): FontRequest; + } + + /** + * Information how to interpret certain color data. + * + * This interface encapsulates all information that is necessary to interpret color data, by defining a describing color space, like for example CMYK or + * sRGB. You can either convert between this and an arbitrary other color space, or into the standard RGB or ARGB formats (because those are so + * overwhelmingly common in computer graphics). + * + * All canvas interfaces standardize to sequences of IEEE doubles for color representation. As this is overly verbose when used for bitmap data, derived + * interfaces exist, e.g. {@link XIntegerBitmapColorSpace} , which use sequences of integers for color representation. + */ + interface XColorSpace { + /** + * Query the kind for each color component. + * + * Color space components tend to correspond to physical attributes like the amount of one specific colorant contained in the final output color. This + * method returns a sequence of tags, specifying for each component of a color value, to what color attribute (if any) it corresponds. The values must be + * one of the {@link ColorComponentTag} constants. + * + * At the same time, the number of elements in this sequence corresponds to the number of color channels for this color space. + * + * + * + * **Remark**: For the standard RGB color space, ComponentTags consists of three elements, containing RGB_RED, RGB_GREEN and RGB_BLUE tags, respectively + */ + readonly ComponentTags: SafeArray; + + /** + * Convert to color of another color space. + * @param deviceColor Sequence of device color components. Is permitted to contain more than one device color element, therefore, batch conversion of multi + * @param targetColorSpace the color space to convert to. + * @returns the corresponding sequence of device colors in the target color space (e.g. `sequence` or `sequence` ). + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the input sequence does not match the device color format (e.g. if the number of compon + */ + convertColorSpace(deviceColor: LibreOffice.SeqEquiv, targetColorSpace: XColorSpace): SafeArray; + + /** + * Convert sRGB color with linear alpha into this color space. + * + * If this color space does not convey alpha information, the specified alpha value is silently ignored. + * @param rgbColor Sequence of sRGB color components. Is permitted to contain more than one color element, therefore, batch conversion of multiple color va + * @returns the corresponding sequence of device colors. + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the input sequence does not match the device color format. + */ + convertFromARGB(rgbColor: LibreOffice.SeqEquiv): SafeArray; + + /** + * Convert premultiplied sRGB color with linear alpha into this color space. + * + * If this color space does not convey alpha information, the specified alpha value is silently ignored. + * @param rgbColor Sequence of sRGB color components. Is permitted to contain more than one color element, therefore, batch conversion of multiple color va + * @returns the corresponding sequence of device colors. + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the input sequence does not match the device color format. + */ + convertFromPARGB(rgbColor: LibreOffice.SeqEquiv): SafeArray; + + /** + * Convert sRGB color to a representation in this color space. + * + * If this color space conveys alpha information, it is assumed be fully opaque for the given RGB color value. + * @param rgbColor Sequence of sRGB color components. Is permitted to contain more than one color element, therefore, batch conversion of multiple color va + * @returns the corresponding sequence of device colors. + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the input sequence does not match the device color format. + */ + convertFromRGB(rgbColor: LibreOffice.SeqEquiv): SafeArray; + + /** + * Convert color value in this color space to sRGB color values, with linear alpha. + * + * If the given input color does not carry alpha information, an alpha value of 1.0 (fully opaque) is assumed. + * @param deviceColor Sequence of device color components. Is permitted to contain more than one device color element, therefore, batch conversion of multi + * @returns the corresponding sequence of colors in the sRGB color space. + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the input sequence does not match the device color format. + */ + convertToARGB(deviceColor: LibreOffice.SeqEquiv): SafeArray; + + /** + * Convert color value in this color space to premultiplied sRGB color values, with linear alpha. + * + * If the given input color does not carry alpha information, an alpha value of 1.0 (fully opaque) is assumed. The resulting individual RGB color values + * are premultiplied by the alpha value (e.g. if alpha is 0.5, each color value has only half of the original intensity). + * @param deviceColor Sequence of device color components. Is permitted to contain more than one device color element, therefore, batch conversion of multi + * @returns the corresponding sequence of colors in the sRGB color space. + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the input sequence does not match the device color format. + */ + convertToPARGB(deviceColor: LibreOffice.SeqEquiv): SafeArray; + + /** + * Convert color value in this color space to sRGB color values. + * + * Any information not representable in the {@link RGBColor} struct is discarded during the conversion. This includes alpha information. + * @param deviceColor Sequence of device color components. Is permitted to contain more than one device color element, therefore, batch conversion of multi + * @returns the corresponding sequence of colors in the sRGB color space. + * @see convertToARGB() + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the input sequence does not match the device color format. + */ + convertToRGB(deviceColor: LibreOffice.SeqEquiv): SafeArray; + + /** + * Query the kind for each color component. + * + * Color space components tend to correspond to physical attributes like the amount of one specific colorant contained in the final output color. This + * method returns a sequence of tags, specifying for each component of a color value, to what color attribute (if any) it corresponds. The values must be + * one of the {@link ColorComponentTag} constants. + * + * At the same time, the number of elements in this sequence corresponds to the number of color channels for this color space. + * + * + * + * **Remark**: For the standard RGB color space, ComponentTags consists of three elements, containing RGB_RED, RGB_GREEN and RGB_BLUE tags, respectively + */ + getComponentTags(): SafeArray; + + /** + * Query various optional properties from the color space. + * + * If this color space has an ICC color profile, the sequence contains an element named ICCProfile. Some color spaces also have properties Gamma, + * Whitepoint and Blackpoint. Background information for these is available [here]{@link url="http://en.wikipedia.org/wiki/Color_temperature"} . + */ + getProperties(): SafeArray; + + /** + * Query rendering intent of this color space. + * @returns a value from the {@link RenderingIntent} constant group. + */ + getRenderingIntent(): number; + + /** + * Query type of this color space. + * @returns a value from the {@link ColorSpaceType} constant group. + */ + getType(): number; + + /** + * Query various optional properties from the color space. + * + * If this color space has an ICC color profile, the sequence contains an element named ICCProfile. Some color spaces also have properties Gamma, + * Whitepoint and Blackpoint. Background information for these is available [here]{@link url="http://en.wikipedia.org/wiki/Color_temperature"} . + */ + readonly Properties: SafeArray; + + /** + * Query rendering intent of this color space. + * @returns a value from the {@link RenderingIntent} constant group. + */ + readonly RenderingIntent: number; + + /** + * Query type of this color space. + * @returns a value from the {@link ColorSpaceType} constant group. + */ + readonly Type: number; + } + + /** + * Interface to control a custom sprite object on a {@link XSpriteCanvas} . + * + * Every change performed on {@link XCustomSprite} objects is only visible after a {@link XSpriteCanvas.updateScreen()} call, to facilitate synchronized + * screen updates. + * + * TODO: Maybe more than alpha has to be overridden from render state. TODO: Provide means to change the output area + */ + interface XCustomSprite extends XSprite { + /** + * Query a render canvas for this sprite's content. + * + * Whatever is rendered to this canvas will become visible on the screen only after a {@link XSpriteCanvas.updateScreen()} call at the associated sprite + * canvas. This canvas is not equivalent to the host canvas of the sprite. At the very least, all output happens relative to the sprite's upper left + * corner, i.e. the origin of the sprite's canvas device coordinate system will move with the sprite across the screen. + * @returns the canvas the sprite content can be rendered into. + */ + readonly ContentCanvas: XCanvas; + + /** + * Query a render canvas for this sprite's content. + * + * Whatever is rendered to this canvas will become visible on the screen only after a {@link XSpriteCanvas.updateScreen()} call at the associated sprite + * canvas. This canvas is not equivalent to the host canvas of the sprite. At the very least, all output happens relative to the sprite's upper left + * corner, i.e. the origin of the sprite's canvas device coordinate system will move with the sprite across the screen. + * @returns the canvas the sprite content can be rendered into. + */ + getContentCanvas(): XCanvas; + } + + /** + * This interface provides access to a graphic device, such as a printer, or a screen device. Every canvas ( + * @see XCanvas) has exactly one associated graphic device, into which its output is rendered. For a typical windowing system, the graphic device is equi + */ + interface XGraphicDevice extends uno.XInterface { + /** + * Query the controller for multi buffering functionality on this graphic device. + * + * If there is no such functionality available, the NULL reference is returned. + */ + readonly BufferController: XBufferController; + + /** + * Create a bitmap with alpha channel whose memory layout and sample model is compatible to the graphic device. + * @param size Size of the requested bitmap in pixel. Both components of the size must be greater than 0 + */ + createCompatibleAlphaBitmap(size: geometry.IntegerSize2D): XBitmap; + + /** + * Create a Bezier poly-polygon which can internally use device-optimized representations already. + * @param points The points of the poly-polygon, in a separate array for every polygon. + */ + createCompatibleBezierPolyPolygon(points: LibreOffice.SeqEquiv>): XBezierPolyPolygon2D; + + /** + * Create a bitmap whose memory layout and sample model is compatible to the graphic device. + * @param size Size of the requested bitmap in pixel. Both components of the size must be greater than 0 + */ + createCompatibleBitmap(size: geometry.IntegerSize2D): XBitmap; + + /** + * Create a line poly-polygon which can internally use device-optimized representations already. + * @param points The points of the poly-polygon, in a separate array for every polygon. + */ + createCompatibleLinePolyPolygon(points: LibreOffice.SeqEquiv>): XLinePolyPolygon2D; + + /** + * Create a volatile bitmap with alpha channel that is usable with this graphic device. + * + * A volatile bitmap's difference in comparison to a plain bitmap (e.g. generated via {@link createCompatibleBitmap()} ) is the fact that its content + * might vanish at any point in time (making any operation with them produce a {@link VolatileContentDestroyedException} ). The benefit, on the other + * hand, is that they might be easy to hardware-accelerate on certain platforms, without the need to keep a safety copy of the content internally. + * @param size Size of the requested bitmap in pixel. Both components of the size must be greater than 0 + */ + createVolatileAlphaBitmap(size: geometry.IntegerSize2D): XVolatileBitmap; + + /** + * Create a volatile bitmap that is usable with this graphic device. + * + * A volatile bitmap's difference in comparison to a plain bitmap (e.g. generated via {@link createCompatibleBitmap()} ) is the fact that its content + * might vanish at any point in time (making any operation with them produce a {@link VolatileContentDestroyedException} ). The benefit, on the other + * hand, is that they might be easy to hardware-accelerate on certain platforms, without the need to keep a safety copy of the content internally. + * @param size Size of the requested bitmap in pixel. Both components of the size must be greater than 0 + */ + createVolatileBitmap(size: geometry.IntegerSize2D): XVolatileBitmap; + + /** + * Query the color space interface for this graphic device. + * + * This is to be used when interpreting or setting device color values. + */ + readonly DeviceColorSpace: XColorSpace; + + /** Enter or leave the fullscreen mode, if possible. The return value denotes the success of the operation. */ + enterFullScreenMode(bEnter: boolean): boolean; + + /** + * Query the controller for multi buffering functionality on this graphic device. + * + * If there is no such functionality available, the NULL reference is returned. + */ + getBufferController(): XBufferController; + + /** + * Query the color space interface for this graphic device. + * + * This is to be used when interpreting or setting device color values. + */ + getDeviceColorSpace(): XColorSpace; + + /** + * Get a reference to this device's parametric polygon factory. + * @returns a reference to this device's parametric polygon factory. Although it is possible to use parametric polygons on all canvases, regardless of the as + */ + getParametricPolyPolygonFactory(): lang.XMultiServiceFactory; + + /** + * Query the physical resolution of the device in pixel per millimeter. + * + * A special floating point value of +infinity here indicates "unknown", i.e. at the time of rendering undetermined or possibly infinite resolution along + * the corresponding direction. + */ + getPhysicalResolution(): geometry.RealSize2D; + + /** + * Query the physical dimensions of the device in millimeter. + * + * A special floating point value of +infinity here indicates "unknown", i.e. at the time of rendering undetermined or possibly infinite resolution along + * the corresponding direction. + * @see XBitmap.getSize() + */ + getPhysicalSize(): geometry.RealSize2D; + + /** Tells whether this graphic device has a full screen mode, i.e. whether a window can cover the whole screen exclusively. */ + hasFullScreenMode(): boolean; + + /** + * Get a reference to this device's parametric polygon factory. + * @returns a reference to this device's parametric polygon factory. Although it is possible to use parametric polygons on all canvases, regardless of the as + */ + readonly ParametricPolyPolygonFactory: lang.XMultiServiceFactory; + + /** + * Query the physical resolution of the device in pixel per millimeter. + * + * A special floating point value of +infinity here indicates "unknown", i.e. at the time of rendering undetermined or possibly infinite resolution along + * the corresponding direction. + */ + readonly PhysicalResolution: geometry.RealSize2D; + + /** + * Query the physical dimensions of the device in millimeter. + * + * A special floating point value of +infinity here indicates "unknown", i.e. at the time of rendering undetermined or possibly infinite resolution along + * the corresponding direction. + * @see XBitmap.getSize() + */ + readonly PhysicalSize: geometry.RealSize2D; + } + + /** + * Specialized interface for bitmaps containing half floats as their color components. + * + * Half floats are 16 bit wide, and newer GPUs already have them as supported frame buffer format. + */ + interface XHalfFloatBitmap extends XHalfFloatReadOnlyBitmap { + /** + * Set raw data of a bitmap. + * + * Set raw data of a bitmap, in the format as defined by {@link getMemoryLayout()} . With the given rectangle, a subset of the bitmap can be changed. + * When setting subsets of the bitmap, the same scanline padding takes place as when the whole bitmap is changed. + */ + setData(data: LibreOffice.SeqEquiv, bitmapLayout: FloatingPointBitmapLayout, rect: geometry.IntegerRectangle2D): void; + + /** + * Set a single pixel of the bitmap with the given color value. + * + * When setting data on volatile bitmaps, always call isValid() before, and retrieve a new memory layout via {@link getMemoryLayout()} . At least under + * Windows, the memory layout can change for the same bitmap, if the user e.g. switches the screen resolution. Thus, this method will throw an + * IllegalArgumentException, if the memory layout changed between a call to {@link getMemoryLayout()} and {@link setData()} . + */ + setPixel(color: LibreOffice.SeqEquiv, bitmapLayout: FloatingPointBitmapLayout, pos: geometry.IntegerPoint2D): void; + } + + /** + * Specialized interface for bitmaps containing half floats as their color components. Half floats are 16 bit wide, and some high-end GPUs already have + * them as supported frame buffer format. In contrast to {@link XHalfFloatBitmap} , this interface only permits read-only access. + * + * Use this interface for e.g. bitmaps that are calculated on-the-fly, or that are pure functional, and thus cannot be modified. + * + * If you get passed an instance of {@link XHalfFloatReadOnlyBitmap} that also supports the {@link XVolatileBitmap} interface, things become a bit more + * complicated. When reading data, one has to check for both {@link VolatileContentDestroyedException} and mismatching {@link FloatingPointBitmapLayout} + * return values. If either of them occurs, the whole bitmap read operation should be repeated. + */ + interface XHalfFloatReadOnlyBitmap extends XBitmap { + /** + * Query the raw data of this bitmap. + * + * Query the raw data of this bitmap, in the format as defined by {@link getMemoryLayout()} . With the given rectangle, a subset of the whole bitmap can + * be queried. When querying subsets of the bitmap, the same scanline padding takes place as when the whole bitmap is requested. Note: as we currently + * have no 16 bit float UNO data type, the values are transported as 16 bit integers across the API (which requires casting on both sides). + * @throws VolatileContentDestroyedException if the bitmap is volatile, and the content has been destroyed by the system. + */ + getData(rect: geometry.IntegerRectangle2D): SafeArray; + + /** Query the memory layout for this bitmap. */ + getMemoryLayout(): FloatingPointBitmapLayout; + + /** + * Get a single pixel of the bitmap, returning its color value. + * @throws VolatileContentDestroyedException if the bitmap is volatile, and the content has been destroyed by the system. + */ + getPixel(pos: geometry.IntegerPoint2D): SafeArray; + + /** Query the memory layout for this bitmap. */ + readonly MemoryLayout: FloatingPointBitmapLayout; + } + + /** This is a specialized interface for bitmaps containing IEEE doubles for their color components. */ + interface XIeeeDoubleBitmap extends XIeeeDoubleReadOnlyBitmap { + /** + * Set raw data of a bitmap. + * + * Set raw data of a bitmap, in the format as defined by {@link getMemoryLayout()} . With the given rectangle, a subset of the bitmap can be changed. + * When setting subsets of the bitmap, the same scanline padding takes place as when the whole bitmap is changed. + * + * When setting data on volatile bitmaps, always call isValid() before, and retrieve a new memory layout via {@link getMemoryLayout()} . At least under + * Windows, the memory layout can change for the same bitmap, if the user e.g. switches the screen resolution. Thus, this method will throw an + * IllegalArgumentException, if the memory layout changed between a call to {@link getMemoryLayout()} and {@link setData()} . + * @param data Data to set + * @param bitmapLayout Layout of the data to set. Must match this bitmap's current layout. + * @param rect Destination rectangle, within the bounds of the bitmap, to set the data in. + * @throws com::sun::star::lang::IndexOutOfBoundsException if parts of the given rectangle are outside the permissible bitmap area. + * @throws com::sun::star::lang::IllegalArgumentException if the given memory layout does not match this bitmap's layout, or if the given data sequence has + */ + setData(data: LibreOffice.SeqEquiv, bitmapLayout: FloatingPointBitmapLayout, rect: geometry.IntegerRectangle2D): void; + + /** + * Set a single pixel of the bitmap with the given color value. + * + * When setting data on volatile bitmaps, always call isValid() before, and retrieve a new memory layout via {@link getMemoryLayout()} . At least under + * Windows, the memory layout can change for the same bitmap, if the user e.g. switches the screen resolution. Thus, this method will throw an + * IllegalArgumentException, if the memory layout changed between a call to {@link getMemoryLayout()} and {@link setPixel()} . + * @param color The color value(s) to set + * @param bitmapLayout Layout of the color elements to set. Must match this bitmap's current layout. + * @param pos Pixel position with the bounds of the bitmap to set. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the given point is outside the permissible bitmap area. + * @throws com::sun::star::lang::IllegalArgumentException if the given memory layout does not match this bitmap's layout, or if the given data sequence has + */ + setPixel(color: LibreOffice.SeqEquiv, bitmapLayout: FloatingPointBitmapLayout, pos: geometry.IntegerPoint2D): void; + } + + /** + * This is a specialized interface for bitmaps containing IEEE doubles for their color components. In contrast to {@link XIeeeDoubleBitmap} , this + * interface only permits read-only access. + * + * Use this interface for e.g. bitmaps that are calculated on-the-fly, or that are pure functional, and thus cannot be modified. + * + * If you get passed an instance of {@link XHalfFloatReadOnlyBitmap} that also supports the {@link XVolatileBitmap} interface, things become a bit more + * complicated. When reading data, one has to check for both {@link VolatileContentDestroyedException} and mismatching {@link FloatingPointBitmapLayout} + * return values. If either of them occurs, the whole bitmap read operation should be repeated. + */ + interface XIeeeDoubleReadOnlyBitmap extends XBitmap { + /** + * Query the raw data of this bitmap. + * + * Query the raw data of this bitmap, in the format as defined by {@link getMemoryLayout()} . With the given rectangle, a subset of the whole bitmap can + * be queried. When querying subsets of the bitmap, the same scanline padding takes place as when the whole bitmap is requested. + * + * Note that the bitmap memory layout might change for volatile bitmaps. + * @param bitmapLayout The memory layout the returned data is in. + * @param rect A rectangle, within the bounds of the bitmap, to retrieve the consent from. + * @throws VolatileContentDestroyedException if the bitmap is volatile, and the content has been destroyed by the system. + * @throws com::sun::star::lang::IndexOutOfBoundsException if parts of the given rectangle are outside the permissible bitmap area. + */ + getData(bitmapLayout: [FloatingPointBitmapLayout], rect: geometry.IntegerRectangle2D): SafeArray; + + /** + * Query the memory layout for this bitmap. + * + * Please note that for volatile bitmaps, the memory layout might change between subsequent calls. + */ + getMemoryLayout(): FloatingPointBitmapLayout; + + /** + * Get a single pixel of the bitmap, returning its color value. + * + * Note that the bitmap memory layout might change for volatile bitmaps. + * @param bitmapLayout The memory layout the returned data is in. + * @param pos A position, within the bounds of the bitmap, to retrieve the color from. + * @throws VolatileContentDestroyedException if the bitmap is volatile, and the content has been destroyed by the system. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the given position is outside the permissible bitmap area. + */ + getPixel(bitmapLayout: [FloatingPointBitmapLayout], pos: geometry.IntegerPoint2D): SafeArray; + + /** + * Query the memory layout for this bitmap. + * + * Please note that for volatile bitmaps, the memory layout might change between subsequent calls. + */ + readonly MemoryLayout: FloatingPointBitmapLayout; + } + + /** Specialized interface for bitmaps containing IEEE floats as their color components. */ + interface XIeeeFloatBitmap extends XIeeeFloatReadOnlyBitmap { + /** + * Set raw data of a bitmap. + * + * Set raw data of a bitmap, in the format as defined by {@link getMemoryLayout()} . With the given rectangle, a subset of the bitmap can be changed. + * When setting subsets of the bitmap, the same scanline padding takes place as when the whole bitmap is changed. + * + * When setting data on volatile bitmaps, always call isValid() before, and retrieve a new memory layout via {@link getMemoryLayout()} . At least under + * Windows, the memory layout can change for the same bitmap, if the user e.g. switches the screen resolution. Thus, this method will throw an + * IllegalArgumentException, if the memory layout changed between a call to {@link getMemoryLayout()} and {@link setData()} . + * @param data Data to set + * @param bitmapLayout Layout of the data to set. Must match this bitmap's current layout. + * @param rect Destination rectangle, within the bounds of the bitmap, to set the data in. + * @throws com::sun::star::lang::IndexOutOfBoundsException if parts of the given rectangle are outside the permissible bitmap area. + * @throws com::sun::star::lang::IllegalArgumentException if the given memory layout does not match this bitmap's layout, or if the given data sequence has + */ + setData(data: LibreOffice.SeqEquiv, bitmapLayout: FloatingPointBitmapLayout, rect: geometry.IntegerRectangle2D): void; + + /** + * Set a single pixel of the bitmap with the given color value. + * + * When setting data on volatile bitmaps, always call isValid() before, and retrieve a new memory layout via {@link getMemoryLayout()} . At least under + * Windows, the memory layout can change for the same bitmap, if the user e.g. switches the screen resolution. Thus, this method will throw an + * IllegalArgumentException, if the memory layout changed between a call to {@link getMemoryLayout()} and {@link setPixel()} . + * @param color The color value(s) to set + * @param bitmapLayout Layout of the color elements to set. Must match this bitmap's current layout. + * @param pos Pixel position with the bounds of the bitmap to set. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the given point is outside the permissible bitmap area. + * @throws com::sun::star::lang::IllegalArgumentException if the given memory layout does not match this bitmap's layout, or if the given data sequence has + */ + setPixel(color: LibreOffice.SeqEquiv, bitmapLayout: FloatingPointBitmapLayout, pos: geometry.IntegerPoint2D): void; + } + + /** + * Specialized interface for bitmaps containing IEEE floats as their color components. In contrast to {@link XIeeeFloatBitmap} , this interface only + * permits read-only access. + * + * Use this interface for e.g. bitmaps that are calculated on-the-fly, or that are pure functional, and thus cannot be modified. + * + * If you get passed an instance of {@link XHalfFloatReadOnlyBitmap} that also supports the {@link XVolatileBitmap} interface, things become a bit more + * complicated. When reading data, one has to check for both {@link VolatileContentDestroyedException} and mismatching {@link FloatingPointBitmapLayout} + * return values. If either of them occurs, the whole bitmap read operation should be repeated. + */ + interface XIeeeFloatReadOnlyBitmap extends XBitmap { + /** + * Query the raw data of this bitmap. + * + * Query the raw data of this bitmap, in the format as defined by {@link getMemoryLayout()} . With the given rectangle, a subset of the whole bitmap can + * be queried. When querying subsets of the bitmap, the same scanline padding takes place as when the whole bitmap is requested. + * + * Note that the bitmap memory layout might change for volatile bitmaps. + * @param bitmapLayout The memory layout the returned data is in. + * @param rect A rectangle, within the bounds of the bitmap, to retrieve the consent from. + * @throws VolatileContentDestroyedException if the bitmap is volatile, and the content has been destroyed by the system. + * @throws com::sun::star::lang::IndexOutOfBoundsException if parts of the given rectangle are outside the permissible bitmap area. + */ + getData(bitmapLayout: [FloatingPointBitmapLayout], rect: geometry.IntegerRectangle2D): SafeArray; + + /** + * Query the memory layout for this bitmap. + * + * Please note that for volatile bitmaps, the memory layout might change between subsequent calls. + */ + getMemoryLayout(): FloatingPointBitmapLayout; + + /** + * Get a single pixel of the bitmap, returning its color value. + * + * Note that the bitmap memory layout might change for volatile bitmaps. + * @param bitmapLayout The memory layout the returned data is in. + * @param pos A position, within the bounds of the bitmap, to retrieve the color from. + * @throws VolatileContentDestroyedException if the bitmap is volatile, and the content has been destroyed by the system. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the given position is outside the permissible bitmap area. + */ + getPixel(bitmapLayout: [FloatingPointBitmapLayout], pos: geometry.IntegerPoint2D): SafeArray; + + /** + * Query the memory layout for this bitmap. + * + * Please note that for volatile bitmaps, the memory layout might change between subsequent calls. + */ + readonly MemoryLayout: FloatingPointBitmapLayout; + } + + /** + * This is a specialized interface for bitmaps having integer color channels. + * @since OOo 2.0 + */ + interface XIntegerBitmap extends XIntegerReadOnlyBitmap { + /** + * Set raw data of a bitmap. + * + * Set raw data of a bitmap, in the format as defined by {@link getMemoryLayout()} . With the given rectangle, a subset of the bitmap can be changed. If + * the internal data format's pixel are not integer multiples of bytes (i.e. if one pixel occupies less than a byte), the leftover content of the bytes + * at the right of each scanline is ignored and left unchanged in the bitmap. When setting subsets of the bitmap, the same scanline padding takes place + * as when the whole bitmap is changed. + * + * When setting data on volatile bitmaps, always call isValid() before, and retrieve a new memory layout via {@link getMemoryLayout()} . At least under + * Windows, the memory layout can change for the same bitmap, if the user e.g. switches the screen resolution. Thus, this method will throw an + * IllegalArgumentException, if the memory layout changed between a call to {@link getMemoryLayout()} and {@link setData()} . + * @param data Data to set + * @param bitmapLayout Layout of the data to set. Must match this bitmap's current layout. + * @param rect Destination rectangle, within the bounds of the bitmap, to set the data in. + * @throws com::sun::star::lang::IndexOutOfBoundsException if parts of the given rectangle are outside the permissible bitmap area. + * @throws com::sun::star::lang::IllegalArgumentException if the given memory layout does not match this bitmap's layout, or if the given data sequence has + */ + setData(data: LibreOffice.SeqEquiv, bitmapLayout: IntegerBitmapLayout, rect: geometry.IntegerRectangle2D): void; + + /** + * Set a single pixel of the bitmap with the given color value. + * + * If the internal data format's pixel are not integer multiples of bytes (i.e. if one pixel occupies less than a byte), the color value is expected in + * the least significant bits of the single byte given as the color. + * + * When setting data on volatile bitmaps, always call isValid() before, and retrieve a new memory layout via {@link getMemoryLayout()} . At least under + * Windows, the memory layout can change for the same bitmap, if the user e.g. switches the screen resolution. Thus, this method will throw an + * IllegalArgumentException, if the memory layout changed between a call to {@link getMemoryLayout()} and {@link setPixel()} . + * @param color The color value(s) to set + * @param bitmapLayout Layout of the color elements to set. Must match this bitmap's current layout. + * @param pos Pixel position with the bounds of the bitmap to set. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the given point is outside the permissible bitmap area. + * @throws com::sun::star::lang::IllegalArgumentException if the given memory layout does not match this bitmap's layout, or if the given data sequence has + */ + setPixel(color: LibreOffice.SeqEquiv, bitmapLayout: IntegerBitmapLayout, pos: geometry.IntegerPoint2D): void; + } + + /** + * A color space for integer bitmap formats + * + * This interface encapsulates all information specific to a certain integer bitmap color space, like for example 1555 ARGB. Note that the individual + * elements of the integer color representation sequence need not correspond to the color space's components - instead, the color components might be + * packed back-to-back into those bytes, as they appear in the raw bitmap data. + */ + interface XIntegerBitmapColorSpace extends XColorSpace { + /** + * Query number of bits used per bitmap pixel. + * + * This method yields the total number of bits used for a color value. At the associated {@link XIntegerBitmap} , the {@link XIntegerBitmap.setPixel()} + * method will expect a sequence of ceil(BitsPerPixel/8) bytes, and the {@link XIntegerReadOnlyBitmap.getPixel()} will return that number of bytes. + * Similarly, the color conversion expect input data in multiples of ceil(BitsPerPixel/8), and also return converted data in chunks of this. + */ + readonly BitsPerPixel: number; + + /** + * Query the number of bits used for each component. + * + * This method returns a sequence of integers, each denoting the number of bits occupied by the respective component. The sum of all component bits must + * be less or equal than the value returned from {@link getBitsPerPixel()} . If the sum is less, excess bits are always kept in the most significant bits + * of a pixel. Color components will appear in the byte sequences returned from the {@link XIntegerBitmap} methods in the order defined here, with the + * first element starting from the least significant bits of the pixel, etc. + * + * + * + * **Remark**: For the typical 32 bit RGBA color data, the four values would all contain the value eight. For a 16 bit 1555 ARGB format, with mask values + * 0x8000 for alpha, 0x7C for red, 0x3E for green and 0x1F for blue, the values would be 5, 5, 5, 1, in that order. + */ + readonly ComponentBitCounts: SafeArray; + + /** + * Convert integer bitmap color to generic IEEE double device color of another color space. + * + * Color values are properly rounded and clipped, to be valid in the target color space. + * @param deviceColor Sequence of device color components. Is permitted to contain more than one device color element, therefore, batch conversion of multi + * @param targetColorSpace the color space to convert to. + * @returns the corresponding sequence of device colors in the target color space + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the input sequence does not match the device color format. + */ + convertFromIntegerColorSpace(deviceColor: LibreOffice.SeqEquiv, targetColorSpace: XColorSpace): SafeArray; + + /** + * Convert sRGB color with linear alpha into this color space. + * + * If this color space does not convey alpha information, the specified alpha value is silently ignored. Color values are properly rounded and clipped, + * to be valid in the target color space. + * @param rgbColor Sequence of sRGB color components. Is permitted to contain more than one color element, therefore, batch conversion of multiple color va + * @returns the corresponding sequence of device colors. + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the input sequence does not match the device color format. + */ + convertIntegerFromARGB(rgbColor: LibreOffice.SeqEquiv): SafeArray; + + /** + * Convert premultiplied sRGB color with linear alpha into this color space. + * + * If this color space does not convey alpha information, the specified alpha value is silently ignored. Color values are properly rounded and clipped, + * to be valid in the target color space. + * @param rgbColor Sequence of sRGB color components. Is permitted to contain more than one color element, therefore, batch conversion of multiple color va + * @returns the corresponding sequence of device colors. + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the input sequence does not match the device color format. + */ + convertIntegerFromPARGB(rgbColor: LibreOffice.SeqEquiv): SafeArray; + + /** + * Convert sRGB color to an integer representation in this color space. + * + * If this color space conveys alpha information, it is assumed be fully opaque for the given RGB color value. Color values are properly rounded and + * clipped, to be valid in the target color space. + * @param rgbColor Sequence of sRGB color components. Is permitted to contain more than one color element, therefore, batch conversion of multiple color va + * @returns the corresponding sequence of device colors. + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the input sequence does not match the device color format. + */ + convertIntegerFromRGB(rgbColor: LibreOffice.SeqEquiv): SafeArray; + + /** + * Convert color value in this color space to sRGB color values, with linear alpha. + * + * If the given input color does not carry alpha information, an alpha value of 1.0 (fully opaque) is assumed. Color values are properly rounded and + * clipped, to be valid in the target color space. + * @param deviceColor Sequence of device color components. Is permitted to contain more than one device color element, therefore, batch conversion of multi + * @returns the corresponding sequence of sRGB colors. + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the input sequence does not match the device color format. + */ + convertIntegerToARGB(deviceColor: LibreOffice.SeqEquiv): SafeArray; + + /** + * Convert color value in this color space to premultiplied sRGB color values, with linear alpha. + * + * If the given input color does not carry alpha information, an alpha value of 1.0 (fully opaque) is assumed. Color values are properly rounded and + * clipped, to be valid in the target color space. The resulting individual RGB color values are premultiplied by the alpha value (e.g. if alpha is 0.5, + * each color value has only half of the original intensity). + * @param deviceColor Sequence of device color components. Is permitted to contain more than one device color element, therefore, batch conversion of multi + * @returns the corresponding sequence of sRGB colors. + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the input sequence does not match the device color format. + */ + convertIntegerToPARGB(deviceColor: LibreOffice.SeqEquiv): SafeArray; + + /** + * Convert color value in this color space to sRGB color values. + * + * Any information not representable in the {@link RGBColor} struct is discarded during the conversion. This includes alpha information. Color values are + * properly rounded and clipped, to be valid in the target color space. + * @param deviceColor Sequence of device color components. Is permitted to contain more than one device color element, therefore, batch conversion of multi + * @returns the corresponding sequence of sRGB colors. + * @see XIntegerBitmapColorSpace.convertIntegerToARGB() + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the input sequence does not match the device color format. + */ + convertIntegerToRGB(deviceColor: LibreOffice.SeqEquiv): SafeArray; + + /** + * Convert integer bitmap color to integer bitmap color of another integer bitmap color space. + * + * Color values are properly rounded and clipped, to be valid in the target color space. + * @param deviceColor Sequence of device color components. Is permitted to contain more than one device color element, therefore, batch conversion of multi + * @param targetColorSpace the color space to convert to. + * @returns the corresponding sequence of device colors in the target color space + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the input sequence does not match the device color format. + */ + convertToIntegerColorSpace(deviceColor: LibreOffice.SeqEquiv, targetColorSpace: XIntegerBitmapColorSpace): SafeArray; + + /** + * Query whether color data bytes need to be swapped. + * @returns `TRUE` , This method returns the endianness of the color data. The value is one of the Endianness constants. If color data is represented using m + */ + readonly Endianness: number; + + /** + * Query number of bits used per bitmap pixel. + * + * This method yields the total number of bits used for a color value. At the associated {@link XIntegerBitmap} , the {@link XIntegerBitmap.setPixel()} + * method will expect a sequence of ceil(BitsPerPixel/8) bytes, and the {@link XIntegerReadOnlyBitmap.getPixel()} will return that number of bytes. + * Similarly, the color conversion expect input data in multiples of ceil(BitsPerPixel/8), and also return converted data in chunks of this. + */ + getBitsPerPixel(): number; + + /** + * Query the number of bits used for each component. + * + * This method returns a sequence of integers, each denoting the number of bits occupied by the respective component. The sum of all component bits must + * be less or equal than the value returned from {@link getBitsPerPixel()} . If the sum is less, excess bits are always kept in the most significant bits + * of a pixel. Color components will appear in the byte sequences returned from the {@link XIntegerBitmap} methods in the order defined here, with the + * first element starting from the least significant bits of the pixel, etc. + * + * + * + * **Remark**: For the typical 32 bit RGBA color data, the four values would all contain the value eight. For a 16 bit 1555 ARGB format, with mask values + * 0x8000 for alpha, 0x7C for red, 0x3E for green and 0x1F for blue, the values would be 5, 5, 5, 1, in that order. + */ + getComponentBitCounts(): SafeArray; + + /** + * Query whether color data bytes need to be swapped. + * @returns `TRUE` , This method returns the endianness of the color data. The value is one of the Endianness constants. If color data is represented using m + */ + getEndianness(): number; + } + + /** + * This is a specialized interface for bitmaps having integer color channels. In contrast to {@link XIntegerBitmap} , this interface only permits + * read-only access. + * + * Use this interface for e.g. bitmaps that are calculated on-the-fly, or that are pure functional, and thus cannot be modified. + * + * If you get passed an instance of {@link XIntegerReadOnlyBitmap} that also supports the {@link XVolatileBitmap} interface, things become a bit more + * complicated. When reading data, one has to check for both {@link VolatileContentDestroyedException} and mismatching {@link IntegerBitmapLayout} return + * values. If either of them occurs, the whole bitmap read operation should be repeated, if you need consistent information. + */ + interface XIntegerReadOnlyBitmap extends XBitmap { + /** + * Query the raw data of this bitmap. + * + * Query the raw data of this bitmap, in the format as defined by {@link getMemoryLayout()} . With the given rectangle, a subset of the whole bitmap can + * be queried. If the internal data format's pixel are not integer multiples of bytes (i.e. if one pixel occupies less than a byte), the leftover content + * of the bytes at the right of each scanline is filled with zeros. The details of the scanline padding are to be retrieved from the passed bitmap + * layout. + * + * Note that the bitmap memory layout might change over time for volatile bitmaps. + * @param bitmapLayout The memory layout the returned data is in. Note that the color space returned therein needs to always match the current color space + * @param rect A rectangle, within the bounds of the bitmap, to retrieve the consent from. + * @throws VolatileContentDestroyedException if the bitmap is volatile, and the content has been destroyed by the system. + * @throws com::sun::star::lang::IndexOutOfBoundsException if parts of the given rectangle are outside the permissible bitmap area. + */ + getData(bitmapLayout: [IntegerBitmapLayout], rect: geometry.IntegerRectangle2D): SafeArray; + + /** + * Query the memory layout for this bitmap. + * + * Please note that for volatile bitmaps, the memory layout might change between subsequent calls. + */ + getMemoryLayout(): IntegerBitmapLayout; + + /** + * Get a single pixel of the bitmap, returning its color value. + * + * If the internal data format's pixel are not integer multiples of bytes (i.e. if one pixel occupies less than a byte - the case of more than one byte + * per pixel is not specified), the color value is returned in the least significant bits of the single byte returned as the color. The details of the + * returned pixel data are to be retrieved from the passed bitmap layout. + * + * Note that the bitmap memory layout might change for volatile bitmaps. + * @param bitmapLayout The memory layout the returned data is in. Note that the color space returned therein needs to always match the current color space + * @param pos A position, within the bounds of the bitmap, to retrieve the color from. + * @throws VolatileContentDestroyedException if the bitmap is volatile, and the content has been destroyed by the system. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the given position is outside the permissible bitmap area. + */ + getPixel(bitmapLayout: [IntegerBitmapLayout], pos: geometry.IntegerPoint2D): SafeArray; + + /** + * Query the memory layout for this bitmap. + * + * Please note that for volatile bitmaps, the memory layout might change between subsequent calls. + */ + readonly MemoryLayout: IntegerBitmapLayout; + } + + /** + * Specialized interface for a 2D poly-polygon containing only straight line segments. + * @since OOo 2.0 + */ + interface XLinePolyPolygon2D extends XPolyPolygon2D { + /** Get a single point from the poly-polygon */ + getPoint(nPolygonIndex: number, nPointIndex: number): geometry.RealPoint2D; + + /** + * Query subset of this poly-polygon, starting at the given polygon and the given point within that polygon, and containing the specified number of + * polygons and points in the last polygon. + * @param nPolygonIndex The index number of the polygon to start with extracting points. Set to 0 to start with the first polygon. + * @param nNumberOfPolygons The number of polygons, starting with nPolygonIndex, to extract points from. Set to -1 to extract all polygons, starting with n + * @param nPointIndex The index of the point within the first polygon (that with the index number nPolygonIndex) to start extraction with. Set to 0 to star + * @param nNumberOfPoints The number of points in the last polygon of the extraction sequence, to be extracted. Set to -1 to extract all points from the la + */ + getPoints(nPolygonIndex: number, nNumberOfPolygons: number, nPointIndex: number, nNumberOfPoints: number): SafeArray>; + + /** Set a single point on the poly-polygon. The remaining points of the poly-polygon will not be changed by this method. */ + setPoint(point: geometry.RealPoint2D, nPolygonIndex: number, nPointIndex: number): void; + + /** + * Set the specified sequence of points to the poly-polygon. + * + * This method can either set the whole poly-polygon to the new data, or insert the points at the given index + * @param points the points. + * @param nPolygonIndex The index of the polygon to start point insertion with. This index must be in the range [0,numPolygons], and the insertion will tak + * @throws com::sun::star::lang::IndexOutOfBoundsException if one of the given values exceed the permissible range. + */ + setPoints(points: LibreOffice.SeqEquiv>, nPolygonIndex: number): void; + } + + interface XMtfRenderer extends uno.XInterface { + draw(fScaleX: number, fScaleY: number): void; + setMetafile(aMtf: LibreOffice.SeqEquiv): void; + } + + /** + * Interface to a dynamic poly-polygon generator, that generates poly-polygons depending on a given parameter value. + * + * The returned poly-polygon should normally be contained in the [0,1]x[0,1] rectangle. At least that is the dimension expected at other places. e.g. + * {@link Texture} . + */ + interface XParametricPolyPolygon2D extends uno.XInterface { + /** + * Query the color space employed by this object + * @returns the color space the colors generated by this object are to be interpreted in. + */ + readonly ColorSpace: XColorSpace; + + /** + * Query the color value for the polygonal area at the specified parameter value. + * @param t Parameter value in the range [0,1]. During painting, this range is swept through starting from 0. + */ + getColor(t: number): SafeArray; + + /** + * Query the color space employed by this object + * @returns the color space the colors generated by this object are to be interpreted in. + */ + getColorSpace(): XColorSpace; + + /** + * Query the polygonal outline at the specified value. + * + * The returned outline should be clipped to the [0,1]x[0,1] rectangle. + * @param t Parameter value in the range [0,1]. During painting, this range is swept through starting from 0. When using such a parametric poly-polygon for + */ + getOutline(t: number): XPolyPolygon2D; + + /** + * Query the color for a dedicated point in the plane. + * @param point The permissible parameter range for point is [0,1]x[0,1] + */ + getPointColor(point: geometry.RealPoint2D): SafeArray; + } + + /** + * Generic interface for poly-polygons in 2D. + * @since OOo 2.0 + */ + interface XPolyPolygon2D extends uno.XInterface { + /** + * Add the specified poly-polygon at the given position. + * + * One can do symbolic path construction with this method. The poly-polygons added by this method are not joined in the sense that they participate in + * mutual fill rule calculations like the polygons inside a single poly-polygon do. When rendering such a poly-polygon without transparency, it will look + * like the constituting poly-polygons rendered separately on top of another. Alas, when rendering with transparency, separate rendering will combine the + * alpha of overlapping areas, whereas addPolyPolygon results in constant alpha, regardless how many internal poly-polygons overlap at a single place. + * @param position The poly-polygon will be added at the given position, i.e. the upper, left edge of the referenced poly-polygon will be at this position + * @param polyPolygon The poly-polygon to add. Note that the content of this poly-polygon is copied, later changes to polyPolygon will have no effect on th + * @throws a {@link com.sun.star.lang.IllegalArgumentException} , if the {@link XPolyPolygon2D} parameter does not support one of the data-providing derivat + */ + addPolyPolygon(position: geometry.RealPoint2D, polyPolygon: XPolyPolygon2D): void; + + /** Query the rule used to determine inside and outside of the poly-polygon. */ + FillRule: FillRule; + + /** Query the rule used to determine inside and outside of the poly-polygon. */ + getFillRule(): FillRule; + + /** + * Query number of points inside given polygon + * @param polygon The index of the polygon to query the number of points for. Must be in the range [0, {@link getNumberOfPolygons()} -1]. + */ + getNumberOfPolygonPoints(polygon: number): number; + + /** Query number of polygons inside this poly-polygon */ + getNumberOfPolygons(): number; + + /** Query whether the specified polygon outline is closed. */ + isClosed(index: number): boolean; + + /** Query number of polygons inside this poly-polygon */ + readonly NumberOfPolygons: number; + + /** Set the close state of the specified polygon outline. Use -1 as the index to affect all polygons of this poly-polygon. */ + setClosed(index: number, closedState: boolean): void; + + /** Set the rule used to determine inside and outside of the poly-polygon. */ + setFillRule(fillRule: FillRule): void; + } + + /** + * Provides the basic graphical output operations for a canvas. + * + * This interface is a simplified version of the {@link XCanvas} interface. It holds explicit state, i.e. the pen and fill color, the current + * transformation, clip and font are persistently remembered. + * + * In contrast to the {@link XCanvas} interface, {@link XSimpleCanvas} does not distinguish between stroke and fill operations; instead, switching + * between stroke and fill (or taking both) works by setting appropriate pen and fill colors. + */ + interface XSimpleCanvas extends uno.XInterface { + /** + * Query the underlying {@link XCanvas} . + * @returns the canvas interface this object is internally based on. + */ + readonly Canvas: XCanvas; + + /** Retrieve current clip rect */ + readonly CurrentClipRect: geometry.RealRectangle2D; + + /** Retrieve color currently used for fills */ + readonly CurrentFillColor: util.Color; + + /** + * Retrieve currently selected font. + * @returns the font instance that's currently used for rendering text. + */ + readonly CurrentFont: XCanvasFont; + + /** Retrieve color currently used for lines. */ + readonly CurrentPenColor: util.Color; + + /** Retrieve current transformation matrix */ + readonly CurrentTransformation: geometry.AffineMatrix2D; + + /** + * Retrieve view state. + * @returns the view state, that would generate matching output, when rendering to an {@link XCanvas} instead. + */ + readonly CurrentViewState: ViewState; + + /** + * Request the associated graphic device for this canvas. + * + * A graphic device provides methods specific to the underlying output device capabilities, which are common for all canvases rendering to such a device. + * This includes device resolution, color space, or bitmap formats. + * @returns the associated {@link XGraphicDevice} . + */ + readonly Device: XGraphicDevice; + + /** + * Draws the bitmap on the canvas. + * @param xBitmap Bitmap to render + * @param aLeftTop Left, top position of the bitmap on the destination canvas. + */ + drawBitmap(xBitmap: XBitmap, aLeftTop: geometry.RealPoint2D): void; + + /** Draws a line on the canvas. */ + drawLine(aStartPoint: geometry.RealPoint2D, aEndPoint: geometry.RealPoint2D): void; + + /** Sets a single pixel on the canvas. */ + drawPixel(aPoint: geometry.RealPoint2D): void; + + /** Draws a poly-polygon on the canvas. */ + drawPolyPolygon(xPolyPolygon: XPolyPolygon2D): void; + + /** Draws a rectangle on the canvas. */ + drawRect(aRect: geometry.RealRectangle2D): void; + + /** + * Draws text on the canvas. + * @param aText Text to render. The text color is the current pen color. + * @param aOutPos Output position of the text. This is the left or right edge, depending on nTextDirection. Output position is always relative to the font + * @param nTextDirection A value from the {@link TextDirection} collection, denoting the main writing direction for this string. The main writing direction + */ + drawText(aText: StringContext, aOutPos: geometry.RealPoint2D, nTextDirection: number): void; + + /** + * Request the font metrics of the current font. + * @returns the font metrics of the currently selected font. + */ + readonly FontMetrics: FontMetrics; + + /** + * Query the underlying {@link XCanvas} . + * @returns the canvas interface this object is internally based on. + */ + getCanvas(): XCanvas; + + /** Retrieve current clip rect */ + getCurrentClipRect(): geometry.RealRectangle2D; + + /** Retrieve color currently used for fills */ + getCurrentFillColor(): util.Color; + + /** + * Retrieve currently selected font. + * @returns the font instance that's currently used for rendering text. + */ + getCurrentFont(): XCanvasFont; + + /** Retrieve color currently used for lines. */ + getCurrentPenColor(): util.Color; + + /** + * Retrieve render state. + * @param bUseFillColor When true, the Color member of the {@link RenderState} is initialized with the current fill color; when false, the current pen colo + * @returns the render state, that would generate matching output, when rendering to an {@link XCanvas} instead. + */ + getCurrentRenderState(bUseFillColor: boolean): RenderState; + + /** Retrieve current transformation matrix */ + getCurrentTransformation(): geometry.AffineMatrix2D; + + /** + * Retrieve view state. + * @returns the view state, that would generate matching output, when rendering to an {@link XCanvas} instead. + */ + getCurrentViewState(): ViewState; + + /** + * Request the associated graphic device for this canvas. + * + * A graphic device provides methods specific to the underlying output device capabilities, which are common for all canvases rendering to such a device. + * This includes device resolution, color space, or bitmap formats. + * @returns the associated {@link XGraphicDevice} . + */ + getDevice(): XGraphicDevice; + + /** + * Request the font metrics of the current font. + * @returns the font metrics of the currently selected font. + */ + getFontMetrics(): FontMetrics; + + /** + * Select a font. + * + * This method selects the specified font (or a close substitute) as the current font for text output. + * @param sFontName The name of the font (like e.g. Arial) + * @param size The size of the font (note that this is not the usual points unit, but in the same coordinate system as the other rendering operations - usu + * @param bold When true, selected font is bold. + * @param italic When true, selected font is italic + */ + selectFont(sFontName: string, size: number, bold: boolean, italic: boolean): void; + + /** + * Sets the fill color. + * + * To disable filling, simply set this color to something with zero alpha (i.e. fully transparent). + * @param nsRgbaColor RGBA color tuple, interpreted in the sRGB color space. + */ + setFillColor(nsRgbaColor: util.Color): void; + + /** + * Sets the color used by line and text operations. + * + * To disable stroking, simply set this color to something with zero alpha (i.e. fully transparent). + * @param nsRgbaColor RGBA color tuple, interpreted in the sRGB color space. + */ + setPenColor(nsRgbaColor: util.Color): void; + + /** Sets the clip to the specified rectangle. */ + setRectClip(aRect: geometry.RealRectangle2D): void; + + /** Set the current transform matrix. */ + setTransformation(aTransform: geometry.AffineMatrix2D): void; + } + + /** + * Interface to control a sprite object. + * + * This is the basic interface to control a sprite object on a {@link XSpriteCanvas} . Sprites are moving, back-buffered objects. + */ + interface XSprite extends uno.XInterface { + /** + * Apply a clipping to the shape output. + * + * The given clip poly-polygon is always interpreted in device coordinate space. As the sprite has its own local coordinate system, with its origin on + * screen being equal to its current position, the clip poly-polygon's origin will always coincide with the sprite's origin. Furthermore, if any sprite + * transformation is set via {@link transform()} , the clip is subject to this transformation, too. The implementation is free, if it has a cached + * representation of the sprite at hand, to clip-output only this cached representation (e.g. a bitmap), instead of re-rendering the sprite from first + * principles. This is usually the case for an implementation of a {@link XCustomSprite} interface, since it typically has no other cached pictorial + * information at hand. + * + * Please note that if this sprite is not animated, the associated {@link XSpriteCanvas} does not update changed sprites automatically, but has to be + * told to do so via {@link XSpriteCanvas.updateScreen()} . + * + * Specifying an empty interface denotes no clipping, i.e. everything contained in the sprite will be visible (subject to device-dependent constraints, + * of course). Specifying an empty {@link XPolyPolygon2D} , i.e. a poly-polygon containing zero polygons, or an {@link XPolyPolygon2D} with any number of + * empty sub-polygons, denotes the NULL clip. That means, nothing from the sprite will be visible. + * @param aClip The clip poly-polygon to apply. + */ + clip(aClip: XPolyPolygon2D): void; + + /** + * Make the sprite invisible. + * + * This method makes the sprite invisible. + */ + hide(): void; + + /** + * Move sprite to the specified position. + * + * The position specified here is first transformed by the combined view and render transformation. The resulting position is then used as the output + * position (also in device coordinates) of the rendered sprite content. + * + * Please note that if this sprite is not animated, the associated XSpriteCanva does not update changed sprites automatically, but has to be told to do + * so via {@link XSpriteCanvas.updateScreen()} . + * @param aNewPos The new position, in user coordinate space, to move the sprite to. + * @param aViewState The view state to be used when interpreting aNewPos. + * @param aRenderState The render state to be used when interpreting aNewPos. + * @throws com::sun::star::lang::IllegalArgumentException if one of the view and render state parameters are outside the specified range. + */ + move(aNewPos: geometry.RealPoint2D, aViewState: ViewState, aRenderState: RenderState): void; + + /** + * Set overall transparency of the sprite. + * + * This method is useful for e.g. fading in/out of animations. + * + * Please note that if this sprite is not animated, the associated {@link XSpriteCanvas} does not update changed sprites automatically, but has to be + * told to do so via {@link XSpriteCanvas.updateScreen()} . + * @param nAlpha New global alpha value to composite this sprite with the background. Valid range is [0,1]. + * @throws com::sun::star::lang::IllegalArgumentException if nAlpha is not within the permissible range. + */ + setAlpha(nAlpha: number): void; + + /** + * Set sprite priority. + * + * The sprite priority determines the order of rendering relative to all other sprites of the associated canvas. The higher the priority, the later will + * the sprite be rendered, or, in other words, the closer to the screen surface the sprite is shown. + * @param nPriority New sprite priority value to serve as the sort key when determining sprite rendering order. Avoid NaNs and other irregular floating poi + */ + setPriority(nPriority: number): void; + + /** + * Make the sprite visible. + * + * This method makes the sprite visible on the canvas it was created on. + */ + show(): void; + + /** + * Apply a local transformation to the sprite. + * + * The given transformation matrix locally transforms the sprite shape. If this transformation contains translational components, be aware that sprite + * content moved beyond the sprite area (a box from (0,0) to (spriteWidth,spriteHeight)) might (but need not) be clipped. Use {@link XSprite.move()} to + * change the sprite location on screen. The canvas implementations are free, if they have a cached representation of the sprite at hand, to transform + * only this cached representation (e.g. a bitmap), instead of re-rendering the sprite from first principles. This is usually the case for an + * implementation of a {@link XCustomSprite} interface, since it typically has no other cached pictorial information at hand. + * + * Please note that if this sprite is not animated, the associated {@link XSpriteCanvas} does not update changed sprites automatically, but has to be + * told to do so via {@link XSpriteCanvas.updateScreen()} . + * @param aTransformation The transformation to apply to the sprite shape. + * @throws com::sun::star::lang::IllegalArgumentException if the given transformation matrix is singular. + */ + transform(aTransformation: geometry.AffineMatrix2D): void; + } + + /** Specialization of a {@link XCanvas} , where moving, animated objects (called sprites) are supported. */ + interface XSpriteCanvas extends XCanvas { + /** + * Create a cloned version of an already existing sprite object. + * + * The cloned sprite always shows the same content as its original, but of course the sprite position, visibility, alpha etc. can be modified + * independently. + * @param original The original sprite to copy the content from. This sprite must have been created by the same {@link XSpriteCanvas} instance as this meth + * @returns an interface to a sprite object. + */ + createClonedSprite(original: XSprite): XSprite; + + /** + * Create a custom, user-handles-it-all sprite object. + * + * A sprite is a back-buffered object with its own, independent animation. + * @param spriteSize The required size of the sprite in device coordinates. Everything that is rendered outside this area might be clipped on output. Both + * @returns an interface to a custom sprite object. + */ + createCustomSprite(spriteSize: geometry.RealSize2D): XCustomSprite; + + /** Create a sprite object from the specified animation sequence. A sprite is a back-buffered object with its own, independent animation. */ + createSpriteFromAnimation(animation: XAnimation): XAnimatedSprite; + + /** + * Create a sprite object from the specified animation sequence. + * + * A sprite is a back-buffered object with its own, independent animation. + * @param animationBitmaps Sequence of bitmaps. The bitmaps don't need to have the same size, but they are all rendered with their left, top edges aligned. + * @param interpolationMode Value of {@link InterpolationMode} , to determine whether and how to interpolate between the provided bitmaps, if animation run + * @throws VolatileContentDestroyedException if at least one of the bitmap is volatile, and its content has been destroyed by the system. + */ + createSpriteFromBitmaps(animationBitmaps: LibreOffice.SeqEquiv, interpolationMode: number): XAnimatedSprite; + + /** + * Tells the sprite canvas to now update the screen representation. + * + * Required to display rendered changes to the canvas, and updates to stopped animations and XCustomSprites in general. This method will return only + * after the screen update is done, or earlier if an error happened. + * + * If double buffering is enabled via {@link XBufferController} , no explicit call of {@link updateScreen()} is necessary, since the {@link + * XBufferController} methods will automatically notify all associated {@link XSpriteCanvas} instances. + * @param bUpdateAll When `TRUE` , update the whole screen. When `FALSE` , implementation is permitted to restrict update to areas the canvas itself change + * @returns `TRUE` , if the screen update was successfully performed + */ + updateScreen(bUpdateAll: boolean): boolean; + } + + /** + * This is the central interface for text layouting. + * + * This is the central interface for text-related tasks more complicated than simple string rendering. Note that all query methods are subject to the + * current layout state of this object. That is, calls to {@link XTextLayout.justify()} or {@link XTextLayout.applyLogicalAdvancements()} are likely to + * change subsequent output of those query methods. + * + * Similar to {@link XCanvasFont} , all measurements and coordinates accepted and returned by this interface are relative to the font's local coordinate + * system (which only equals device coordinate space, if the combined render transformation used during text output is the identity transformation). + * Conversely, if the combined transformation used during text output is **not** the identity transformation, all measurements returned by this interface + * should be subjected to that transformation, to yield values in device coordinate space. Depending on the underlying font technology, actual device + * output might be off by up to one device pixel from the transformed metrics. + * @since OOo 2.0 + */ + interface XTextLayout extends uno.XInterface { + /** + * Apply explicit advancements for every character in the layout string. + * + * This method applies the specified advancements to every logical character in the input string ( **not** for every glyph. There might be multiple + * glyphs per input character, or multiple input characters per glyph). This is useful to explicitly manipulate the exact output positions of characters, + * e.g. relative to a reference output device. + * @param aAdvancements A sequence of character advancements, in font coordinate space. + * @see XTextLayout.queryLogicalAdvancements() + * @throws com::sun::star::lang::IllegalArgumentException if the size of aAdvancements does not match the number of characters in the text. + */ + applyLogicalAdvancements(aAdvancements: LibreOffice.SeqEquiv): void; + + /** + * This method yields the baseline offset. + * + * This method returns the baseline offset for this layout object, either measured from the top or the left edge, depending on the writing direction + * (horizontally or vertically). Since rendering this layout via {@link XCanvas.drawTextLayout()} outputs relative to the layout object's baseline, this + * method can be used to e.g. output relative to the left, top edge. + * @returns the distance of the main baseline from the top or the left edge of this object, depending on the writing direction. + */ + readonly BaselineOffset: number; + + /** + * Justify a number of text layouts to the given size. + * + * This method can be used to combine the layout of a text line into a single justification run. This is e.g. useful if the line consists of several text + * portions (e.g. because of different fonts or colors), but it is desirable to spread the available space more globally across the different layout + * objects. If, for example, one layout object contains significantly more whitespace or Kashidas than the rest, this method can assign proportionally + * more space to this layout object. + * @param aNextLayouts A sequence of layouts following this one in logical text order. + * @param nSize The requested size of the text for **all** XTextLayouts after justification in font coordinate space (either width or height, depending on + * @returns the actual size of the text after the justification, in font coordinate space. Depending on the font and the script type, this might be somewhat + * @throws com::sun::star::lang::IllegalArgumentException if one of the parameters are not in the valid range. + */ + combinedJustify(aNextLayouts: LibreOffice.SeqEquiv, nSize: number): number; + + /** + * Request the associated font for this layout. + * @returns the associated font for this layout. + */ + readonly Font: XCanvasFont; + + /** + * This method yields the baseline offset. + * + * This method returns the baseline offset for this layout object, either measured from the top or the left edge, depending on the writing direction + * (horizontally or vertically). Since rendering this layout via {@link XCanvas.drawTextLayout()} outputs relative to the layout object's baseline, this + * method can be used to e.g. output relative to the left, top edge. + * @returns the distance of the main baseline from the top or the left edge of this object, depending on the writing direction. + */ + getBaselineOffset(): number; + + /** + * This method converts an insertion index to a caret. + * + * This method generates caret information for a given insertion point in the layout text. + * @param nInsertionIndex The insertion index, as e.g. returned by {@link XTextLayout.getTextHit()} . This value must be in the range 0 up to the number of + * @param bExcludeLigatures Set this to `TRUE` to skip the positions inside ligatures as valid caret placements. For example, this would avoid setting the + * @returns the generated {@link Caret} structure. + * @throws com::sun::star::lang::IndexOutOfBoundsException if nInsertionIndex is outside the permissible range. + */ + getCaret(nInsertionIndex: number, bExcludeLigatures: boolean): Caret; + + /** + * Request the associated font for this layout. + * @returns the associated font for this layout. + */ + getFont(): XCanvasFont; + + /** + * This method returns the main writing direction. + * + * This method returns the main writing direction of this layout, i.e. either LEFT_TO_RIGHT or RIGHT_TO_LEFT. + * @returns the main text direction of this layout. + */ + getMainTextDirection(): number; + + /** + * This method calculates a new insertion index. + * + * This method calculates a new insertion index, given a start index and the number of characters to skip. This is most useful for caret traveling. + * @param nStartIndex The insertion index to start from. + * @param nCaretAdvancement For values greater than 0, the caret is visually moved to the right. For values smaller than 0, the caret is visually moved to + * @param bExcludeLigatures Set this to `TRUE` to skip the positions inside ligatures as valid caret placements. For example, this would avoid setting the + * @returns the new insertion index. + * @throws com::sun::star::lang::IndexOutOfBoundsException if nStartIndex or nCaretAdvancement is outside the permissible range. + */ + getNextInsertionIndex(nStartIndex: number, nCaretAdvancement: number, bExcludeLigatures: boolean): number; + + /** + * Request the text this layout contains. + * @returns the text this layout contains. + */ + getText(): StringContext; + + /** + * This method determines the hit position in the text. + * + * This method determines the index of the character hit at the specified position (in font coordinate space). + * @param aHitPoint The position in font coordinate space to determine the underlying character index for. + */ + getTextHit(aHitPoint: geometry.RealPoint2D): TextHit; + + /** + * Justify the text to the given size. + * + * This method is the core of the {@link XTextLayout} interface, because it layouts the text in a typographically correct way into the available space. + * @param nSize The requested size of the text after justification (either width or height, depending on the writing mode). This parameter is interpreted i + * @returns the actual size of the text after the justification in the font coordinate space. Depending on the font and the script type, this might be somewh + * @throws com::sun::star::lang::IllegalArgumentException if nSize is 0 or negative. + */ + justify(nSize: number): number; + + /** + * This method returns the main writing direction. + * + * This method returns the main writing direction of this layout, i.e. either LEFT_TO_RIGHT or RIGHT_TO_LEFT. + * @returns the main text direction of this layout. + */ + readonly MainTextDirection: number; + + /** + * Query the ink bounding boxes for every glyph in the layouted text. + * + * Ink, or tight bounding boxes in this case means that for e.g. an "a", the bounding box for the {@link XPolyPolygon2D} describing the glyph "a" is + * returned, not the logical dimensions of the character in the font. + * @returns a sequence of rectangles in font coordinate space, specifying the bounds, one for every glyph. + * @see XTextLayout.queryMeasures() + */ + queryInkMeasures(): SafeArray; + + /** + * Query the advancements for every character in the input string. + * + * This method returns a sequence of advancements, one for each character in the input string ( **not** for every glyph. There might be multiple glyphs + * per input character, or multiple input characters per glyph). Adding up all advancements yields the total advancement of this layout. To manipulate + * the layout of a string on the level of characters, this method can be used to query for the layout's default advancements, which can subsequently be + * changed and applied to the layout via {@link XTextLayout.applyLogicalAdvancements()} . + * @returns a sequence of double specifying the advancements per character in font coordinate space. + * @see XTextLayout.applyLogicalAdvancements() + */ + queryLogicalAdvancements(): SafeArray; + + /** + * This method generates a highlight polygon. + * + * This method generates a highlighting polygon from two insertion indices. This polygon will not always be visually continuous, if e.g. the text + * direction changes in the middle of the selection, the might be parts visually between start and end position that are not selected. + * @param nStartIndex Start of the selection range. + * @param nEndIndex End of the selection range. + * @returns the highlight polygon in the font coordinate space. + * @throws com::sun::star::lang::IndexOutOfBoundsException if nStartIndex or nEndIndex are outside the permissible range. + */ + queryLogicalHighlighting(nStartIndex: number, nEndIndex: number): XPolyPolygon2D; + + /** + * Query the logical bounding boxes of every character in the given text string. + * + * Logical bounding boxes means the space that the font allocates for the given character, which, e.g. for a ".", might be significantly broader than the + * bounds returned via {@link XTextLayout.queryInkMeasures()} . + * @returns a sequence of rectangles specifying the bounds in font coordinate space, one for every glyph. + * @see XTextLayout.queryInkMeasures() + */ + queryMeasures(): SafeArray; + + /** + * Query the overall bounding box of the text. + * + * This method is similar to XTextLayout::queryTextMeasures(), only that the overall bounds are returned by this method. + * @returns the overall bounding box for the given layout, in font coordinate space. + */ + queryTextBounds(): geometry.RealRectangle2D; + + /** + * Extract the polygonal shapes of the layouted text. + * + * Each glyph is represented by a separate {@link XPolyPolygon2D} in the returned sequence. + * @returns a sequence of {@link XPolyPolygon2D} in font coordinate space, one for every glyph. + */ + queryTextShapes(): SafeArray; + + /** + * This method generates a highlight polygon. + * + * This method generates a highlighting polygon from two insertion indices. This polygon will be visually continuous, i.e. will not have non-highlighted + * text in between. + * @param nStartIndex Start of the selection range. + * @param nEndIndex End of the selection range. + * @returns the highlight polygon in the font coordinate space. + * @throws com::sun::star::lang::IndexOutOfBoundsException if nStartIndex or nEndIndex are outside the permissible range. + */ + queryVisualHighlighting(nStartIndex: number, nEndIndex: number): XPolyPolygon2D; + + /** + * Request the text this layout contains. + * @returns the text this layout contains. + */ + readonly Text: StringContext; + } + + /** This is a specialized interface to a volatile bitmap (which can become invalid at any point in time). */ + interface XVolatileBitmap extends XBitmap { + /** + * Query whether this volatile bitmap still has valid content. + * + * As the video RAM allocated to this bitmap can be reclaimed at any time, a return value of true here does not imply that the next draw operation with + * this bitmap will succeed. Instead, the exception VolatileContentDestroyed might then be thrown, if lost bitmap data is accessed. + */ + isValid(): boolean; + } + + namespace AnimationRepeat { + const enum Constants { + ONE_SHOT = 0, + ONE_SHOT_PINGPONG = 1, + PINGPONG = 2, + REPEAT = 3, + } + } + + namespace BlendMode { + const enum Constants { + COLOR = 14, + COLOR_BURN = 7, + COLOR_DODGE = 6, + DARKEN = 4, + DIFFERENCE = 10, + EXCLUSION = 11, + HARD_LIGHT = 8, + HUE = 12, + LIGHTEN = 5, + LUMINOSITY = 15, + MULTIPLY = 1, + NORMAL = 0, + OVERLAY = 3, + SATURATION = 13, + SCREEN = 2, + SOFT_LIGHT = 9, + } + } + + namespace ColorComponentTag { + const enum Constants { + ALPHA = 12, + CIELAB_A = 19, + CIELAB_B = 20, + CIELAB_L = 18, + CIEXYZ_X = 15, + CIEXYZ_Y = 16, + CIEXYZ_Z = 17, + CMYK_BLACK = 7, + CMYK_CYAN = 4, + CMYK_MAGENTA = 5, + CMYK_YELLOW = 6, + CMYKOG_GREEN = 9, + CMYKOG_ORANGE = 8, + DEVICE = 0, + GREY = 13, + HSL_H = 24, + HSL_L = 26, + HSL_S = 25, + HSV_H = 21, + HSV_S = 22, + HSV_V = 23, + INDEX = 11, + PREMULTIPLIED_ALPHA = 14, + RGB_BLUE = 3, + RGB_GREEN = 2, + RGB_RED = 1, + SPOT = 10, + YCBCR_CB = 28, + YCBCR_CR = 29, + YCBCR_Y = 27, + } + } + + namespace ColorSpaceType { + const enum Constants { + CIELAB = 6, + CIEXYZ = 5, + CMYK = 3, + CMYKOG = 4, + DEVICE_COLOR = 0, + GREY = 1, + HSL = 9, + HSV = 8, + INDEXED = 11, + RGB = 2, + SRGB = 7, + YCBCR = 10, + } + } + + namespace CompositeOperation { + const enum Constants { + ADD = 12, + ATOP = 9, + ATOP_REVERSE = 10, + CLEAR = 0, + DESTINATION = 2, + INSIDE = 5, + INSIDE_REVERSE = 6, + OUTSIDE = 7, + OUTSIDE_REVERSE = 8, + OVER = 3, + SATURATE = 13, + SOURCE = 1, + UNDER = 4, + XOR = 11, + } + } + + namespace EmphasisMark { + const enum Constants { + ACCENT_ABOVE = 7, + ACCENT_BELOW = 8, + CIRCLE_ABOVE = 3, + CIRCLE_BELOW = 4, + DISC_ABOVE = 5, + DISC_BELOW = 6, + DOT_ABOVE = 1, + DOT_BELOW = 2, + NONE = 0, + } + } + + namespace FloatingPointBitmapFormat { + const enum Constants { + DOUBLE = 2, + FLOAT = 1, + HALFFLOAT = 0, + } + } + + namespace InterpolationMode { + const enum Constants { + BEZIERSPLINE3 = 4, + BEZIERSPLINE4 = 5, + CUBIC = 3, + LINEAR = 2, + NEAREST_NEIGHBOR = 1, + } + } + + namespace PanoseArmStyle { + const enum Constants { + ANYTHING = 0, + BENT_DOUBLE_SERIF = 11, + BENT_HORIZONTAL = 7, + BENT_SINGLE_SERIF = 10, + BENT_VERTICAL = 9, + BENT_WEDGE = 8, + NO_FIT = 1, + STRAIGHT_DOUBLE_SERIF = 6, + STRAIGHT_HORIZONTAL = 2, + STRAIGHT_SINGLE_SERIF = 5, + STRAIGHT_VERTICAL = 4, + STRAIGHT_WEDGE = 3, + } + } + + namespace PanoseContrast { + const enum Constants { + ANYTHING = 0, + HIGH = 8, + LOW = 4, + MEDIUM = 6, + MEDIUM_HIGH = 7, + MEDIUM_LOW = 5, + NO_FIT = 1, + NONE = 2, + VERY_HIGH = 9, + VERY_LOW = 3, + } + } + + namespace PanoseFamilyTypes { + const enum Constants { + ANYTHING = 0, + DECORATIVE = 4, + NO_FIT = 1, + PICTORIAL = 5, + SCRIPT = 3, + TEXT_DISPLAY = 2, + } + } + + namespace PanoseLetterForm { + const enum Constants { + ANYTHING = 0, + NO_FIT = 1, + NORMAL_BOXED = 4, + NORMAL_CONTACT = 2, + NORMAL_FLATTENED = 5, + NORMAL_OFF_CENTER = 7, + NORMAL_ROUNDED = 6, + NORMAL_SQUARE = 8, + NORMAL_WEIGHTED = 3, + OBLIQUE_BOXED = 11, + OBLIQUE_CONTACT = 9, + OBLIQUE_FLATTENED = 12, + OBLIQUE_OFF_CENTER = 14, + OBLIQUE_ROUNDED = 13, + OBLIQUE_SQUARE = 15, + OBLIQUE_WEIGHTED = 10, + } + } + + namespace PanoseMidline { + const enum Constants { + ANYTHING = 0, + CONSTANT_POINTED = 9, + CONSTANT_SERIFED = 10, + CONSTANT_TRIMMED = 8, + HIGH_POINTED = 6, + HIGH_SERIFED = 7, + HIGH_TRIMMER = 5, + LOW_POINTED = 12, + LOW_SERIFED = 13, + LOW_TRIMMED = 11, + NO_FIT = 1, + STANDARD_POINTED = 3, + STANDARD_SERIFED = 4, + STANDARD_TRIMMED = 2, + } + } + + namespace PanoseProportion { + const enum Constants { + ANYTHING = 0, + CONDENSED = 6, + EVEN_WIDTH = 4, + EXPANDED = 5, + MODERN = 3, + MONO_SPACED = 9, + NO_FIT = 1, + OLD_SKOOL = 2, + VERY_CONDENSED = 8, + VERY_EXPANDED = 7, + } + } + + namespace PanoseSerifStyle { + const enum Constants { + ANYTHING = 0, + BONE = 8, + COVE = 2, + EXAGGERATED = 9, + FLARED = 14, + NO_FIT = 1, + NORMAL_SANS = 11, + OBTUSE_COVE = 3, + OBTUSE_SANS = 12, + OBTUSE_SQUARE_COVE = 5, + PERP_SANS = 13, + ROUNDED = 15, + SQUARE = 6, + SQUARE_COVE = 4, + THIN = 7, + TRIANGLE = 10, + } + } + + namespace PanoseStrokeVariation { + const enum Constants { + ANYTHING = 0, + GRADUAL_DIAGONAL = 2, + GRADUAL_HORIZONTAL = 5, + GRADUAL_TRANSITIONAL = 3, + GRADUAL_VERTICAL = 4, + INSTANT_VERTICAL = 8, + NO_FIT = 1, + RAPID_HORIZONTAL = 7, + RAPID_VERTICAL = 6, + } + } + + namespace PanoseWeight { + const enum Constants { + ANYTHING = 0, + BLACK = 10, + BOLD = 8, + BOOK = 5, + DEMI_BOLD = 7, + HEAVY = 9, + LIGHT = 3, + MEDIUM = 6, + NO_FIT = 1, + NORD = 11, + THIN = 4, + VERY_LIGHT = 2, + } + } + + namespace PanoseXHeight { + const enum Constants { + ANYTHING = 0, + CONSTANT_LARGE = 4, + CONSTANT_SMALL = 2, + CONSTANT_STANDARD = 3, + DUCKING_LARGE = 7, + DUCKING_SMALL = 5, + DUCKING_STANDARD = 6, + NO_FIT = 1, + } + } + + namespace PathCapType { + const enum Constants { + BUTT = 0, + ROUND = 1, + SQUARE = 2, + } + } + + namespace PathJoinType { + const enum Constants { + BEVEL = 3, + MITER = 1, + NONE = 0, + ROUND = 2, + } + } + + namespace RenderingIntent { + const enum Constants { + ABSOLUTE_COLORIMETRIC = 3, + PERCEPTUAL = 0, + RELATIVE_COLORIMETRIC = 2, + SATURATION = 1, + } + } + + namespace RepaintResult { + const enum Constants { + DRAFTED = 2, + FAILED = 3, + REDRAWN = 1, + } + } + + namespace TextDirection { + const enum Constants { + STRONG_LEFT_TO_RIGHT = 2, + STRONG_RIGHT_TO_LEFT = 3, + WEAK_LEFT_TO_RIGHT = 0, + WEAK_RIGHT_TO_LEFT = 1, + } + } + + namespace TexturingMode { + const enum Constants { + CLAMP = 1, + NONE = 0, + REPEAT = 2, + } + } + } + + namespace report { + type FixedLine = XFixedLine; + + type FixedText = XFixedText; + + type FormatCondition = XFormatCondition; + + type FormattedField = XFormattedField; + + type Group = XGroup; + + type Groups = XGroups; + + type ImageControl = XImageControl; + + type ReportControlFormat = XReportControlFormat; + + type ReportControlModel = XReportControlModel; + + type ReportDefinition = XReportDefinition; + + /** @since LibreOffice 4.1 */ + type ReportEngine = XReportEngine; + + type Section = XSection; + + type Shape = XShape; + + interface Function extends XFunction { + create(): void; + } + + interface XFixedLine extends XReportControlModel { + /** This property contains the line color. */ + LineColor: util.Color; + + /** This property contains the dash of the line. */ + LineDash: drawing.LineDash; + + /** This property contains the type of the line. */ + LineStyle: drawing.LineStyle; + + /** This property contains the extent of transparency. */ + LineTransparence: number; + + /** This property contains the width of the line in 1/100th mm. */ + LineWidth: number; + + /** + * specifies the orientation of the control. + * + * `; 0: horizontal; 1: vertical (default); ` + */ + Orientation: number; + } + + interface XFixedText extends XReportControlModel { + /** specifies the label of the control. */ + Label: string; + } + + /** specifies a format condition for a control. */ + interface XFormatCondition extends XReportControlFormat, beans.XPropertySet { + /** specifies if the condition is enabled or not. */ + Enabled: boolean; + + /** defines the formula of the format condition. If the formula evaluates to `TRUE` then the format will be applied. */ + Formula: string; + } + + /** + * describes a control which can be used for displaying values with a arbitrary formatting. + * @see com.sun.star.report.XReportControlModel + * @see com.sun.star.util.XNumberFormatsSupplier + */ + interface XFormattedField extends XReportControlModel { + /** + * specifies the format to be used when formatting the field input and output. + * + * This value is meaningful relative to the FormatsSupplier attribute only. + */ + FormatKey: number; + + /** supplies the formats the field should work with. */ + FormatsSupplier: util.XNumberFormatsSupplier; + } + + /** specifies a format condition for a control. */ + interface XFunction extends beans.XPropertySet, lang.XComponent, container.XChild { + /** specifies if sub reports should be traversed as well. */ + DeepTraversing: boolean; + + /** defines the formula of this function */ + Formula: string; + + /** defines the formula for the initial value */ + InitialFormula: com.sun.star.beans.Optional; + + /** defines the name of the function */ + Name: string; + + /** specifies if the function should be evaluated before the report element will be executed. */ + PreEvaluated: boolean; + } + + /** + * This interface specifies the functions collections of the report definition or a group. + * @see XFunction + * @see XReportDefinition + */ + interface XFunctions extends container.XContainer, container.XIndexContainer, container.XChild, lang.XComponent { + /** factory method for {@link XFunction} . */ + createFunction(): XFunction; + } + + /** specifies the functions supplier which are located in a report definition or a group. */ + interface XFunctionsSupplier { + /** access to the functions */ + Functions: XFunctions; + } + + /** + * identifies a {@link XGroup} . A group is always a child of the groups collection in the report. + * @see XReportDefinition + * @see XGroups + */ + interface XGroup extends container.XChild, beans.XPropertySet, lang.XComponent, XFunctionsSupplier { + /** Defines either a column name or an expression. */ + Expression: string; + + /** + * returns the group footer. + * @see XSection + * @throws com::sun::star::container::NoSuchElementException If the group has the footer disabled. + */ + Footer: XSection; + + /** Defines if a group has a footer. */ + FooterOn: boolean; + + /** Defines an interval value that rows are grouped by. */ + GroupInterval: number; + + /** + * Specifies how to group data. + * @see GroupOn + */ + GroupOn: number; + + /** + * Specifies the parent of the group. + * @see XChild + */ + Groups: XGroups; + + /** + * returns the group header. + * @see XSection + * @throws com::sun::star::container::NoSuchElementException If the group has the header disabled. + */ + Header: XSection; + + /** Defines if a group has a header. */ + HeaderOn: boolean; + + /** + * Specifies if a group header, detail, and footer section is printed on the same page. + * @see KeepTogether + */ + KeepTogether: number; + + /** Specifies that the group header should always be printed on a new page and the reset of the page number to zero. */ + ResetPageNumber: boolean; + + /** Defines if the group is sorted ascending or descending. The default is `TRUE` . */ + SortAscending: boolean; + + /** Specifies that the group header should always be printed on a new column. */ + StartNewColumn: boolean; + } + + /** + * This interface specifies the groups collections of the report definition. + * @see XGroup + * @see XReportDefinition + */ + interface XGroups extends container.XContainer, container.XIndexContainer, container.XChild, lang.XComponent { + /** factory method for {@link XGroup} . */ + createGroup(): XGroup; + ReportDefinition: XReportDefinition; + } + + interface XImageControl extends XReportControlModel, form.XImageProducerSupplier { + /** specifies an URL to an image to use for the control. */ + ImageURL: string; + + /** + * Specifies that the IRI given in the data field should be preserved, otherwise the content will be inserted in the resulting report document. If the + * data field contains something different as string then this attribute will be ignored. + */ + PreserveIRI: boolean; + + /** + * defines how to scale the image + * + * If this property is present, it supersedes the ScaleImage property. + * + * The value of this property is one of the {@link com.sun.star.awt.ImageScaleMode} constants. + * @since OOo 3.2 + */ + ScaleMode: number; + } + + /** + * describes a component which may be part of a report. + * @see XReportDefinition + */ + interface XReportComponent extends util.XCloneable, container.XChild, lang.XComponent, drawing.XShape, beans.XPropertySet { + /** + * specifies the border style of the control. + * + * `; 0: No border; 2: simple border; ` + */ + ControlBorder: number; + + /** + * specifies the color of the border, if present + * + * Not every border style (see Border) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting. + */ + ControlBorderColor: number; + + /** + * is used for subreports and contains the names of the columns of the subreport which are related to the master fields of the parent report. + * + * Entries in this sequence can either denote column names in the sub report, or parameter names. ; For instance, you could base the report on the SQL + * statement `SELECT * FROM invoices WHERE cust_ref = :cid` , and add `cid` to the DetailFields property. In this case, the parameter will be filled from + * the corresponding master field. ; Alternatively, you could simply base your report on the table `invoices` , and add the column name `cust_ref` to + * the DetailFields. In this case, and implicit filter clause `WHERE cust_ref = :` will be created, and the artificial parameter will be + * filled from the corresponding master field. ; If a string in this property denotes both a column name and a parameter name, it is undefined which way + * it is interpreted, but implementations of the service are required to either decide for the parameter or the column, and proceed as usual. + * + * The columns specified herein typically represent a part of the primary key fields or their aliases of the detail report. + * + * If the report is no sub report (e.g. its parent is not a report itself), this property is not evaluated. + */ + DetailFields: SafeArray; + + /** specifies the height of the control. */ + Height: number; + + /** + * is used for subreports and contains the names of columns of the parent report. + * + * These columns are typically the foreign key fields of the parent report. The values of theses columns are used to identify the data for the subreport. + * Each time the parent report changes its current row, the subreport requeries it's data based on the values of the master fields. + * + * If the report is no sub report (e.g. its parent is not a report itself), this property is not evaluated. + */ + MasterFields: SafeArray; + + /** the name of the component. */ + Name: string; + + /** specifies the horizontal position of the control. */ + PositionX: number; + + /** specifies the vertical position of the control. */ + PositionY: number; + + /** + * Specifies that recurring values are printed. If set to `TRUE` then the value will be printed every time. If set to `FALSE` then the value will only be + * printed once. The default value is `TRUE` . + */ + PrintRepeatedValues: boolean; + + /** + * Specifies the section where the control belongs to. This is a shortcut to get control hierarchy up. This value is `NULL` when the control was not + * inserted in any section. + */ + Section: XSection; + + /** specifies the width of the control. */ + Width: number; + } + + /** specifies a format condition for a control. */ + interface XReportControlFormat { + /** + * optional property to determine whether the kerning tables from the current font are used. + * + * Automatic **kerning** applies a spacing in between certain pairs of characters to make the text look better. + */ + CharAutoKerning: boolean; + + /** + * optional property which contains the value of the case-mapping of the text for formatting and displaying. + * @see CaseMap + */ + CharCaseMap: number; + + /** specifies the text color (RGB) of the control. */ + CharColor: util.Color; + + /** + * determines whether text is formatted in two lines. + * + * It is linked to the properties CharCombinePrefix and CharCombineSuffix. + */ + CharCombineIsOn: boolean; + + /** + * contains the prefix (usually parenthesis) before text that is formatted in two lines. + * + * It is linked to the properties CharCombineIsOn and CharCombineSuffix. + */ + CharCombinePrefix: string; + + /** + * contains the suffix (usually parenthesis) after text that is formatted in two lines. + * + * It is linked to the properties CharCombineIsOn and CharCombinePrefix. + */ + CharCombineSuffix: string; + + /** specifies if the characters are formatted and displayed with a contour effect. */ + CharContoured: boolean; + + /** contains the font emphasis value as {@link com.sun.star.text.FontEmphasis} . */ + CharEmphasis: number; + + /** + * specifies the percentage by which to raise/lower superscript/subscript characters. + * + * Negative values denote subscripts and positive values superscripts. + */ + CharEscapement: number; + + /** + * This is the additional height used for subscript or superscript characters in units of percent. For subscript characters the value is negative and for + * superscript characters positive. + */ + CharEscapementHeight: number; + + /** If this optional property is `TRUE` , then the characters are flashing. */ + CharFlash: boolean; + + /** This attribute contains the text encoding of the font as specified in {@link com.sun.star.awt.CharSet} . */ + CharFontCharSet: number; + + /** This property contains the text encoding of the font as specified in {@link com.sun.star.awt.CharSet} . */ + CharFontCharSetAsian: number; + + /** This property contains the text encoding of the font as specified in {@link com.sun.star.awt.CharSet} . */ + CharFontCharSetComplex: number; + + /** This attribute contains font family as specified in {@link com.sun.star.awt.FontFamily} . */ + CharFontFamily: number; + + /** This property contains font family as specified in {@link com.sun.star.awt.FontFamily} . */ + CharFontFamilyAsian: number; + + /** This property contains font family as specified in {@link com.sun.star.awt.FontFamily} . */ + CharFontFamilyComplex: number; + + /** + * This attribute specifies the name of the font style. + * + * It may contain more than one name separated by comma. + */ + CharFontName: string; + + /** + * This property specifies the name of the font style. + * + * It may contain more than one name separated by comma. + */ + CharFontNameAsian: string; + + /** + * This property specifies the name of the font style. + * + * It may contain more than one name separated by comma. + */ + CharFontNameComplex: string; + + /** This attribute contains the font pitch as specified in {@link com.sun.star.awt.FontPitch} . */ + CharFontPitch: number; + + /** This property contains the font pitch as specified in {@link com.sun.star.awt.FontPitch} . */ + CharFontPitchAsian: number; + + /** This property contains the font pitch as specified in {@link com.sun.star.awt.FontPitch} . */ + CharFontPitchComplex: number; + + /** + * This attribute contains the name of the font style. + * + * This attribute may be empty. + */ + CharFontStyleName: string; + + /** + * This property contains the name of the font style. + * + * This property may be empty. + */ + CharFontStyleNameAsian: string; + + /** + * This property contains the name of the font style. + * + * This property may be empty. + */ + CharFontStyleNameComplex: string; + + /** This value contains the height of the characters in point. */ + CharHeight: number; + + /** This value contains the height of the characters in point. */ + CharHeightAsian: number; + + /** This value contains the height of the characters in point. */ + CharHeightComplex: number; + + /** + * If this optional property is `TRUE` , then the characters are invisible. + * @since OOo 2.0 + */ + CharHidden: boolean; + + /** optional property which contains the value of the kerning of the characters. */ + CharKerning: number; + + /** contains the value of the locale. */ + CharLocale: lang.Locale; + + /** contains the value of the locale. */ + CharLocaleAsian: lang.Locale; + + /** contains the value of the locale. */ + CharLocaleComplex: lang.Locale; + + /** + * This attribute contains the value of the posture of the document. + * @see com.sun.star.awt.FontSlant + */ + CharPosture: awt.FontSlant; + + /** + * This property contains the value of the posture of the document. + * @see com.sun.star.awt.FontSlant + */ + CharPostureAsian: awt.FontSlant; + + /** + * This property contains the value of the posture of the document. + * @see com.sun.star.awt.FontSlant + */ + CharPostureComplex: awt.FontSlant; + + /** specifies the {@link com.sun.star.text.FontRelief} value of the text in the control. */ + CharRelief: number; + + /** + * determines the rotation of a character in degree. + * + * Depending on the implementation only certain values may be allowed. + */ + CharRotation: number; + + /** + * determines the percentage value for scaling the width of characters. + * + * The value refers to the original width which is denoted by 100, and it has to be greater than 0. + */ + CharScaleWidth: number; + + /** specifies if the characters are formatted and displayed with a shadow effect. */ + CharShadowed: boolean; + + /** + * determines the type of the strike out of the character. + * @see com.sun.star.awt.FontStrikeout + */ + CharStrikeout: number; + + /** + * This attribute contains the value for the character underline. + * @see com.sun.star.awt.FontUnderline + */ + CharUnderline: number; + + /** specifies the text line color (RGB) of the control. */ + CharUnderlineColor: util.Color; + + /** + * This attribute contains the value of the font weight. + * @see com.sun.star.awt.FontWeight + */ + CharWeight: number; + + /** + * This property contains the value of the font weight. + * @see com.sun.star.awt.FontWeight + */ + CharWeightAsian: number; + + /** + * This property contains the value of the font weight. + * @see com.sun.star.awt.FontWeight + */ + CharWeightComplex: number; + + /** If this attribute is `TRUE` , the underline and strike-through properties are not applied to white spaces. */ + CharWordMode: boolean; + + /** specifies the background color (RGB) of the control. */ + ControlBackground: util.Color; + + /** determines if the back ground color is set to transparent. */ + ControlBackgroundTransparent: boolean; + + /** specifies the {@link com.sun.star.text.FontEmphasis} value of the text in the control. */ + ControlTextEmphasis: number; + + /** specifies the font attributes of the text in the control. */ + FontDescriptor: awt.FontDescriptor; + + /** specifies the font attributes of the text in the control. */ + FontDescriptorAsian: awt.FontDescriptor; + + /** specifies the font attributes of the text in the control. */ + FontDescriptorComplex: awt.FontDescriptor; + + /** contains the name of the hyperlink (if set). */ + HyperLinkName: string; + + /** contains the name of the target for a hyperlink (if set). */ + HyperLinkTarget: string; + + /** contains the URL of a hyperlink (if set). */ + HyperLinkURL: string; + + /** + * specifies the horizontal alignment of the text. + * @see com.sun.star.style.ParagraphAdjust + */ + ParaAdjust: number; + + /** contains the character style name for unvisited hyperlinks. */ + UnvisitedCharStyleName: string; + + /** + * specifies the vertical alignment of the text in the control. + * @see com.sun.star.style.VerticalAlignment + */ + VerticalAlign: style.VerticalAlignment; + + /** contains the character style name for visited hyperlinks. */ + VisitedCharStyleName: string; + } + + interface XReportControlModel extends XReportComponent, XReportControlFormat, container.XContainer, container.XIndexContainer { + /** + * Describes the print expression of the report control model. If the expression evaluates to true than the report control model will be printed + * otherwise not. + */ + ConditionalPrintExpression: string; + + /** + * Creates a format condition. + * @returns report component + */ + createFormatCondition(): XFormatCondition; + + /** + * Specifies which content should be shown. + * + * The value can be + * + * the name of a database column. The format to use is `field:[name]`the name of a function defined in the report or a group. The format to use is + * `rpt:[functionName]`an expression like `rpt:24+24-47` + * @see http://wiki.openoffice.org/wiki/SUN_Report_Builder + * @see http://wiki.openoffice.org/wiki/SUN_Report_Builder#Syntax + * @see http://wiki.openoffice.org/wiki/Base/Reports/Functions + */ + DataField: string; + + /** Specifies that the element gets printed when the group changes. The default value is `TRUE` . */ + PrintWhenGroupChange: boolean; + } + + /** + * identifies a {@link XReportComponent} as being a (sub-) report. + * + * This interface does not really provide an own functionality, it is only for easier runtime identification of report components. + * + * A report fulfills several tasks, like storing the structure of its report components and it provides the event environment for its contained elements. + * @see XReportComponent + */ + interface XReportDefinition extends frame.XModel, frame.XLoadable, embed.XVisualObject, document.XStorageBasedDocument, document.XViewDataSupplier, + util.XCloseable, ui.XUIConfigurationManagerSupplier, document.XDocumentSubStorageSupplier, style.XStyleFamiliesSupplier, util.XModifiable2, XReportComponent, + XFunctionsSupplier { + /** specifies the active connection which is used to create the resulting report. */ + ActiveConnection: sdbc.XConnection; + + /** returns a sequence of the currently supported output formats. */ + readonly AvailableMimeTypes: SafeArray; + + /** Represents the title of the report in print preview. */ + Caption: string; + + /** + * is the command which should be executed, the type of command depends on the CommandType. + * + * In case of a {@link CommandType} of CommandType::COMMAND, means in case the {@link Command} specifies an SQL statement, the inherited {@link + * com.sun.star.sdbc.RowSet.EscapeProcessing} becomes relevant: ; It then can be to used to specify whether the SQL statement should be analyzed on the + * client side before sending it to the database server. ; The default value for {@link com.sun.star.sdbc.RowSet.EscapeProcessing} is `TRUE` . By + * switching it to `FALSE` , you can pass backend-specific SQL statements, which are not standard SQL, to your database. + * @see com.sun.star.sdb.CommandType + */ + Command: string; + + /** + * specifies the type of the command to be executed to retrieve a result set. + * + * {@link Command} needs to be interpreted depending on the value of this property. + * + * This property is only meaningful together with the {@link Command} property, thus either **both** or **none** of them are present. + * @see com.sun.star.sdb.CommandType + */ + CommandType: number; + + /** is the name of the datasource to use, this could be a named datasource or the URL of a data access component. */ + DataSourceName: string; + + /** + * returns the detail section. + * @see XSection + */ + Detail: XSection; + + /** + * specifies if the {@link Command} should be analyzed on the client side before sending it to the database server. + * + * The default value of this property is `TRUE` . By switching it to `FALSE` , you can pass backend-specific SQL statements, which are not standard SQL, + * to your database. + * + * This property is usually present together with the {@link Command} and {@link CommandType} properties, and is evaluated if and only if {@link + * CommandType} equals CommandType::COMMAND. + */ + EscapeProcessing: boolean; + + /** + * makes it possible to register listeners which are called whenever a document event occurs. This is a workaround due to the fact that this interface + * can not be directly inherited from {@link com.sun.star.document.XEventBroadcaster} because the methods addEventListener and removeEventListener are + * already defined in {@link com.sun.star.lang.XComponent} . A queryInterface call is still supported to the {@link + * com.sun.star.document.XEventBroadcaster} interface. + */ + readonly EventBroadcaster: document.XEventBroadcaster; + + /** + * specifies an additional filter to optionally use. + * + * The Filter string has to form a SQL WHERE-clause, **without** the WHERE-string itself. + * + * If a {@link DataSourceName} , {@link Command} and {@link CommandType} are specified, a RowSet can be created with this information. If the results + * provided by the row set are to be additionally filtered, the Filter property can be used. + * + * Note that the Filter property does not make sense if a ResultSet has been specified in the DataAccessDescriptor. + * @see com.sun.star.sdb.RowSet + * @see ResultSet + */ + Filter: string; + + /** returns a sequence of the currently supported output formats. */ + getAvailableMimeTypes(): SafeArray; + + /** + * makes it possible to register listeners which are called whenever a document event occurs. This is a workaround due to the fact that this interface + * can not be directly inherited from {@link com.sun.star.document.XEventBroadcaster} because the methods addEventListener and removeEventListener are + * already defined in {@link com.sun.star.lang.XComponent} . A queryInterface call is still supported to the {@link + * com.sun.star.document.XEventBroadcaster} interface. + */ + getEventBroadcaster(): document.XEventBroadcaster; + + /** + * Specifies whether groups in a multi column report are kept together. + * @see com.sun.star.report.GroupKeepTogether + */ + GroupKeepTogether: number; + + /** Represents the groups of the report. */ + Groups: XGroups; + + /** Represents the output format (media (mime) type) of the resulting document when executing this report. */ + MimeType: string; + + /** + * returns the page footer if the {@link PageFooterOn} is `TRUE` . + * @see XSection + * @throws com::sun::star::container::NoSuchElementException If the report has the page footer disabled. + */ + PageFooter: XSection; + + /** Defines that the page footer is on. Default is `TRUE` . */ + PageFooterOn: boolean; + + /** + * Represents the location of the page footer. + * @see ReportPrintOption + */ + PageFooterOption: number; + + /** + * returns the page header if the {@link PageHeaderOn} is `TRUE` . + * @see XSection + * @throws com::sun::star::container::NoSuchElementException If the report has the page header disabled. + */ + PageHeader: XSection; + + /** Defines that the page header is on. Default is `TRUE` . */ + PageHeaderOn: boolean; + + /** + * Represents the location of the page header. + * @see ReportPrintOption + */ + PageHeaderOption: number; + + /** + * returns the report footer if the {@link ReportFooterOn} is `TRUE` . + * @see XSection + * @throws com::sun::star::container::NullPointerException If the report has the report footer disabled. + */ + ReportFooter: XSection; + + /** Defines that the report footer is on. Default is `FALSE` . */ + ReportFooterOn: boolean; + + /** + * returns the report header if the {@link ReportHeaderOn} is `TRUE` . + * @see XSection + * @throws com::sun::star::container::NoSuchElementException If the report has the report header disabled. + */ + ReportHeader: XSection; + + /** Defines that the report header is on. Default is `FALSE` . */ + ReportHeaderOn: boolean; + } + + /** + * identifies a {@link XReportEngine} which allows the creation of OpenDocument files. + * + * The following events are supported by the report engine. OnPageStarted Is fired when a new page started. OnReportStarted Is fired when a new report + * started. OnGroupStarted Is fired when a new group started. OnGroupEnded Is fired when the group ended. OnReportEnded Is fired when the report ended. + * OnPageEnded Is fired when the page ended. + * @see com.sun.star.document.OfficeDocument + */ + interface XReportEngine extends lang.XComponent, beans.XPropertySet { + /** specifies the active connection which is used to create the resulting report. */ + ActiveConnection: sdbc.XConnection; + + /** + * creates a report document. + * @returns The URL where the new document is located. + * @throws com::sun::star::lang::DisposedException If the report engine is already disposed. + * @throws com::sun::star::lang::IllegalArgumentException If the report definition was not set or is `NULL` . + */ + createDocument(): util.URL; + + /** + * creates a report document. + * @param frame The frame must have a controller set. This controller will be set at the model. + * @throws com::sun::star::lang::DisposedException If the report engine is already disposed. + * @throws com::sun::star::lang::IllegalArgumentException If the report definition was not set or is `NULL` . OJ: Has to be discussed if this method is useful. + */ + createDocumentAlive(frame: frame.XFrame): frame.XModel; + + /** + * creates a report document. + * @throws com::sun::star::lang::DisposedException If the report engine is already disposed. + * @throws com::sun::star::lang::IllegalArgumentException If the report definition was not set or is `NULL` . + */ + createDocumentModel(): frame.XModel; + + /** + * allows to interrupt the creation process of the report document. + * @throws com::sun::star::lang::DisposedException If the report engine is already disposed. + */ + interrupt(): void; + + /** + * defines the maximum number of rows which should be fetched for the report. If the limit is exceeded, the excess rows are silently dropped. ; There is + * no limitation, if set to zero. + */ + MaxRows: number; + + /** specifies the report definition object which is used to create the resulting report. */ + ReportDefinition: XReportDefinition; + + /** specifies the status indicator which shows the progress of the report generation process. */ + StatusIndicator: task.XStatusIndicator; + } + + /** + * identifies a {@link XSection} inside a report. + * + * A section acts like a container of report components. This generic construction allows the definition of hierarchies of reports and their dependent + * subreports. + * @see XReportDefinition + * @see XGroup + */ + interface XSection extends container.XChild, container.XContainer, drawing.XShapes, container.XEnumerationAccess, beans.XPropertySet, lang.XComponent { + /** Defines the back ground color of the section. */ + BackColor: util.Color; + + /** determines if the back ground color is set to transparent. */ + BackTransparent: boolean; + + /** + * Specifies that elements with dynamic state will be expanded vertically when then content of the element is larger than it's container. If this + * property is disabled the content will be truncated when its size is larger than the container. + */ + CanGrow: boolean; + + /** Represents ... */ + CanShrink: boolean; + + /** + * Defines the expression which is executed before printing the section. If the return value of the expression is `TRUE` then the section will be + * printed. + */ + ConditionalPrintExpression: string; + + /** + * Specifies whether the section is printed on a separate page. + * + * Not valid for page header or page footer. + * @see ForceNewPage + */ + ForceNewPage: number; + + /** Specifies the parent of the section if it is a group header or group footer. */ + Group: XGroup; + + /** Defines the height of the section. */ + Height: number; + + /** + * Specifies that the section is printed on one page. + * + * Not valid for page header or page footer. + */ + KeepTogether: boolean; + + /** Defines the name of the section. */ + Name: string; + + /** + * Specifies whether the section is printed in a new row or column within a multi column report. + * + * Not valid for page header or page footer. + * @see ForceNewPage + */ + NewRowOrCol: number; + + /** Defines that the group header should be repeated on the next page when a group spans more than one page. It only applies to group headers. */ + RepeatSection: boolean; + + /** Specifies the parent of the section if it is a page header or page footer. */ + ReportDefinition: XReportDefinition; + + /** Defines if the section should be visible in report. */ + Visible: boolean; + } + + interface XShape extends XReportControlModel { + /** This property can be used to store data that the CustomShapeEngine may use for rendering */ + CustomShapeData: string; + + /** This property contains the CustomShapeEngine service name that has to be used for rendering. */ + CustomShapeEngine: string; + + /** + * This property describes the geometry of the CustomShape. The CustomShapeEngine that is used should be able to get on with the content of this + * property. + * + * If the CustomShapeEngine property is "com.sun.star.drawing.EnhancedCustomShapeEngine", then this property is containing properties as they are + * specified in the service {@link com.sun.star.drawing.EnhancedCustomShapeGeometry} + */ + CustomShapeGeometry: SafeArray; + + /** determines if the object is opaque or transparent for text. */ + Opaque: boolean; + + /** + * this property lets you get and set the transformation matrix for this shape. + * + * The transformation is a 3x3 homogeneous matrix and can contain translation, rotation, shearing and scaling. + */ + Transformation: drawing.HomogenMatrix3; + + /** is used to query or change the ZOrder of this {@link Shape} . */ + ZOrder: number; + } + + namespace Calculation { + const enum Constants { + AVERAGE = 1, + CORRELATION = 2, + COUNT = 3, + COVARIANCE = 4, + DISTINCTCOUNT = 5, + MAXIMUM = 6, + MEDIAN = 7, + MINIMUM = 8, + MODE = 9, + NONE = 0, + NTHLARGEST = 10, + NTHMOSTFREQUENT = 11, + NTHSMALLEST = 12, + PERCENTAGE = 13, + PERCENTILE = 14, + POPSTANDARDDEVIATION = 15, + POPVARIANCE = 16, + SAMPLESTANDARDDEVIATION = 17, + SAMPLEVARIANCE = 18, + SUM = 19, + WEIGHTEDAVG = 20, + } + } + + namespace ForceNewPage { + const enum Constants { + AFTER_SECTION = 2, + BEFORE_AFTER_SECTION = 3, + BEFORE_SECTION = 1, + NONE = 0, + } + } + + namespace GroupKeepTogether { + const enum Constants { + PER_COLUMN = 1, + PER_PAGE = 0, + } + } + + namespace GroupOn { + const enum Constants { + DAY = 6, + DEFAULT = 0, + HOUR = 7, + INTERVAL = 9, + MINUTE = 8, + MONTH = 4, + PREFIX_CHARACTERS = 1, + QUARTAL = 3, + WEEK = 5, + YEAR = 2, + } + } + + namespace inspection { + /** + * implements the default property handler for all known types of com::sun::star::chart2::data::XDataProviders. + * @see com.sun.star.inspection.XPropertyHandler + */ + type DataProviderHandler = com.sun.star.inspection.XPropertyHandler; + + /** + * implements the default property handler for all known types of com::sun::star::report::XReportComponents. + * @see com.sun.star.inspection.XPropertyHandler + */ + type ReportComponentHandler = com.sun.star.inspection.XPropertyHandler; + + /** + * implements a {@link com.sun.star.inspection.XObjectInspectorModel} for inspecting form components, in particular all components implementing the + * ReportComponent service. + * + * A {@link DefaultComponentInspectorModel} provides the following handlers by default: GeometryHandler{@link ReportComponentHandler}{@link + * com.sun.star.form.inspection.EditPropertyHandler} + * @see com.sun.star.inspection.XObjectInspectorModel.HandlerFactories + */ + interface DefaultComponentInspectorModel extends com.sun.star.inspection.XObjectInspectorModel { + /** + * creates a default {@link DefaultComponentInspectorModel} , providing factories for all handlers listed above. + * @since OOo 2.2 + */ + createDefault(): void; + + /** + * creates a default {@link DefaultComponentInspectorModel} , providing factories for all handlers listed above, and describing an ObjectInspector which + * has a help section. + * @param minHelpTextLines denotes the minimum number of lines of text to be reserved for the help section. + * @param maxHelpTextLines denotes the maximum number of lines of text to be reserved for the help section. + * @see XObjectInspectorModel.HasHelpSection + * @see XObjectInspectorModel.MinHelpTextLines + * @see XObjectInspectorModel.MaxHelpTextLines + * @since OOo 2.2 + * @throws com::sun::star::lang::IllegalArgumentException if minHelpTextLines or maxHelpTextLines are negative, or if minHelpTextLines is greater than maxHe + */ + createWithHelpSection(minHelpTextLines: number, maxHelpTextLines: number): void; + } + } + + namespace KeepTogether { + const enum Constants { + NO = 0, + WHOLE_GROUP = 1, + WITH_FIRST_DETAIL = 2, + } + } + + namespace meta { + /** identifies a {@link XFormulaParser} which allows to retrieve the meta data of all supported functions. */ + interface XFormulaParser extends lang.XComponent, sheet.XFormulaParser, beans.XPropertySet { + /** return the mapper for op codes. */ + FormulaOpCodeMapper: sheet.XFormulaOpCodeMapper; + + /** + * The complete mapping of Names to OpCodes. + * + * Names and symbols not defined here lead to a parser/print error. + */ + OpCodeMap: SafeArray; + } + + /** identifies a {@link XFunctionCategory} which allows to retrieve the meta data of all supported functions. */ + interface XFunctionCategory extends beans.XPropertySet, container.XIndexAccess { + /** + * same as getByIndex. + * @see com.sun.star.container.XIndexAccess + */ + getFunction(position: number): XFunctionDescription; + + /** returns the localized category's name. */ + Name: string; + + /** specifies the category number. */ + Number: number; + } + + /** identifies a {@link XFunctionDescription} which allows to retrieve the meta data of all supported functions. */ + interface XFunctionDescription extends beans.XPropertySet { + /** returns a sequence of localized descriptions of the function's arguments (in the order specified by the function). */ + Arguments: SafeArray; + + /** specifies the category number. */ + Category: XFunctionCategory; + createFormula(arguments: LibreOffice.SeqEquiv): string; + + /** returns a localized description of the function. */ + Description: string; + + /** returns the localized function's name. */ + Name: string; + + /** returns the signature of the function. */ + Signature: string; + } + + /** identifies a {@link XFunctionManager} which allows to retrieve the meta data of all supported functions. */ + interface XFunctionManager extends lang.XComponent, container.XIndexAccess { + /** + * same as getByIndex. + * @param position The position. + * @see com.sun.star.container.XIndexAccess + */ + getCategory(position: number): XFunctionCategory; + + /** + * get the function description by name + * @param name the name of the function + */ + getFunctionByName(name: string): XFunctionDescription; + } + } + + namespace ReportPrintOption { + const enum Constants { + ALL_PAGES = 0, + NOT_WITH_REPORT_FOOTER = 2, + NOT_WITH_REPORT_HEADER = 1, + NOT_WITH_REPORT_HEADER_FOOTER = 3, + } + } + + namespace SectionPageBreak { + const enum Constants { + AUTO = 2, + NONE = 0, + SECTION = 1, + } + } + } + + namespace resource { + /** + * is used to signal that a resource is missing. + * @see XResourceBundle + */ + type MissingResourceException = uno.RuntimeException; + + /** + * describes a {@link XResourceBundleLoader} which provides access to the OpenOffice.org resource files. + * + * An OpenOffice.org installation comes with a number of resource files in an proprietary format, located inside the installation's program/resource + * directory. The {@link OfficeResourceLoader} singleton (available at a component context as value with the key + * `/singletons/com.sun.star.resource.OfficeResourceLoader` ), provides access to some types of resources within those files. + * + * Clients have to specify the resource file base name in the call to {@link XResourceBundleLoader.loadBundle()} resp. {@link + * XResourceBundleLoader.loadBundle_Default()} method. The loader will extent this base name so that the resulting name conforms to the OpenOffice.org + * resource file naming conventions, and look up the respective resource file, for the requested locale, in OpenOffice.org's installation. + * + * The lookup process uses the fallback mechanism as described at the {@link XResourceBundle} interface, except that `Locale.getDefault()` is not used. + * + * Resource keys, as passed to the {@link XResourceBundle.getDirectElement()} or {@link com.sun.star.container.XNameAccess.getByName()} , have the + * following format: `:` , where `` specifies the type of the requested resource (see below) and + * `` is the numeric identifier of the resource. + * + * The following resource types are currently supported: **string** : denotes a string resource + * + * Since the numeric resource identifiers are highly build-dependent (e.g. can change with any next OpenOffice.org build), you are **strongly** + * discouraged from using the OfficeResoureLoader service in a component which targets more than one particular OpenOffice.org build. + * @since OOo 2.0.3 + */ + type OfficeResourceLoader = XResourceBundleLoader; + + /** specifies a service providing access to a resource string table implementing the {@link com.sun.star.awt.XDialog} interface. */ + type StringResource = XStringResourcePersistence; + + /** specifies a service providing access to a resource string table implementing the {@link com.sun.star.resource.XStringResourceWithLocation} interface. */ + interface StringResourceWithLocation extends XStringResourceWithLocation { + /** + * is used to initialize the object on its creation. + * @param URL Specifies the location used to load and store - if the ReadOnly state allows it - the string table data. + * @param ReadOnly Specifies if the resource should be read only, see `XStringResourceManager::isReadOnly` + * @param locale Specifies if the locale first to be used as current locale. Internally the `XStringResourceManager::setCurrentLocale` method is called wit + * @param BaseName Base string for the file names used to store the locale data. The locale data is stored in Java properties files also following the corr + * @param Comment Comment stored first in each properties file followed by a line feed character. The line feed character is added automatically and hasn't + * @param Handler a {@link com.sun.star.task.XInteractionHandler} to be passed to ucb. This may be a null interface. + * @throws com::sun::star::lang::IllegalArgumentException if no string or an empty string is passed as URL + */ + create(URL: string, ReadOnly: boolean, locale: lang.Locale, BaseName: string, Comment: string, Handler: task.XInteractionHandler): void; + } + + /** specifies a service providing access to a resource string table implementing the {@link com.sun.star.resource.XStringResourceWithStorage} interface. */ + interface StringResourceWithStorage extends XStringResourceWithStorage { + /** + * is used to initialize the object on its creation. + * @param Storage Specifies the storage used to load and store - if the ReadOnly state allows it - the string table data. + * @param ReadOnly Specifies if the resource should be read only, see `XStringResourceManager::isReadOnly` + * @param locale Specifies if the locale first to be used as current locale. Internally the `XStringResourceManager::setCurrentLocale` method is called wit + * @param BaseName Base string for the file names used to store the locale data. The locale data is stored in Java properties files also following the corr + * @param Comment Comment stored first in each properties file followed by a line feed character. The line feed character is added automatically and hasn't + * @throws com::sun::star::lang::IllegalArgumentException if a null interface is passed as Storage + */ + create(Storage: embed.XStorage, ReadOnly: boolean, locale: lang.Locale, BaseName: string, Comment: string): void; + } + + /** + * offers some operations on {@link com.sun.star.lang.Locale} structures. + * @see XResourceBundle + * @see Locale + */ + interface XLocale extends uno.XInterface { + /** @returns a sequence of all locales which are available in the system. */ + readonly AvailableLocales: SafeArray; + + /** + * creates a locale from language, country, and variant. + * + * NOTE: ISO 639 is not a stable standard; some of the language codes it defines (specifically iw, ji, and in) have changed. This constructor accepts + * both the old codes (iw, ji, and in) and the new codes (he, yi, and id), but all other API on {@link XLocale} will return only the **NEW** codes. + * + * Note: The Java class `Locale` returns the **old** codes. + */ + create(aLanguage: string, aCountry: string, aVariant: string): lang.Locale; + + /** + * the common method of getting the current default locale. + * + * It is used for the presentation (for menus, dialogs, etc.). It is, generally, set once when your applet or application is initialized, then never + * reset. (If you do reset the default locale, you probably want to reload your GUI, so that the change is reflected in your interface.) + * + * More advanced programs allow users to use different locales for different fields, for example, in a spreadsheet. + * + * ; Note that the initial setting will match the host system. + */ + Default: lang.Locale; + + /** @returns `TRUE` if the {@link com.sun.star.lang.Locale}**l1** is equal to the other one. A locale is deemed equal to another locale with identical langua */ + equals(l1: lang.Locale, l2: lang.Locale): boolean; + + /** @returns a sequence of all locales which are available in the system. */ + getAvailableLocales(): SafeArray; + + /** + * the common method of getting the current default locale. + * + * It is used for the presentation (for menus, dialogs, etc.). It is, generally, set once when your applet or application is initialized, then never + * reset. (If you do reset the default locale, you probably want to reload your GUI, so that the change is reflected in your interface.) + * + * More advanced programs allow users to use different locales for different fields, for example, in a spreadsheet. + * + * ; Note that the initial setting will match the host system. + */ + getDefault(): lang.Locale; + + /** + * @param locale the locale. + * @param inLocale specifies the desired user country. + * @returns country code for display of field to user. If the localized name is not found, returns the ISO codes. + */ + getDisplayCountry(locale: lang.Locale, inLocale: lang.Locale): string; + + /** @returns country code for display of field to user. If the localized name is not found, returns the ISO code. The desired user country is from the default */ + getDisplayCountry_Default(locale: lang.Locale): string; + + /** + * @param locale the locale. + * @param inLocale specifies the desired user language. + * @returns language code for display of field to user. If the localized name is not found, returns the ISO codes. + */ + getDisplayLanguage(locale: lang.Locale, inLocale: lang.Locale): string; + + /** @returns language code for display of field to user. If the localized name is not found, returns the ISO code. The desired user language is from the defau */ + getDisplayLanguage_Default(locale: lang.Locale): string; + + /** + * @param locale the locale. + * @param inLocale specifies the desired user locale. + * @returns a string to display the entire locale to user. If the localized name is not found, uses the ISO codes. + */ + getDisplayName(locale: lang.Locale, inLocale: lang.Locale): string; + + /** + * @param locale the locale. + * @returns a string to display the entire locale to user. If the localized name is not found, uses the ISO codes. The default locale is used for the present + */ + getDisplayName_Default(locale: lang.Locale): string; + + /** + * @param locale the locale. + * @param inLocale specifies the desired user variant. + * @returns variant code for display of field to user. If the localized name is not found, returns the ISO codes. + */ + getDisplayVariant(locale: lang.Locale, inLocale: lang.Locale): string; + + /** @returns variant code for display of field to user. The desired user variant is from the default locale. */ + getDisplayVariant_Default(locale: lang.Locale): string; + + /** @returns the ISO country code for the specified locale. */ + getISO3Country(locale: lang.Locale): string; + + /** @returns the ISO language code for the specified locale. */ + getISO3Language(locale: lang.Locale): string; + + /** @returns a sequence of all ISO country codes known to the component. */ + getISOCountries(): SafeArray; + + /** @returns a sequence of all ISO language codes known to the component. */ + getISOLanguages(): SafeArray; + + /** @returns a sequence for language codes which are valid within the given country. */ + getLanguagesForCountry(country: string): SafeArray; + + /** @returns a sequence of all ISO country codes known to the component. */ + readonly ISOCountries: SafeArray; + + /** @returns a sequence of all ISO language codes known to the component. */ + readonly ISOLanguages: SafeArray; + + /** + * sets the default locale for the whole environment. + * + * It is normally set once at the beginning of an application, then never reset. `setDefault` does not reset the host locale. + */ + setDefault(newLocale: lang.Locale): void; + } + + /** + * Resource bundles contain locale-specific objects. + * + * When your program needs a locale-specific resource, such as `String` for example, your program can load it from the resource bundle that is + * appropriate for the current user's locale. In this way, you can write program code that is largely independent of the user's locale, which isolates + * most, if not all, of the locale-specific information in resource bundles. + * + * This allows you to write programs that can: + * + * be easily localized, or translated, into different languages. + * + * handle multiple locales at once. + * + * be easily modified, later, to support even more locales. + * + * + * + * One resource bundle is, conceptually, a set of related services that supports `XResourceBundle` . Each related service of `XResourceBundle` has the + * same base name plus an additional component that identifies its locale. For example, suppose your resource bundle is named `MyResources` . The first + * service you are likely to implement is the default resource bundle, which has the same name as its family - `MyResources` . You can also provide as + * many related locale-specific services as you need. + * + * For example, perhaps you would provide a German one named `MyResources_de` . + * + * Each related implementation of `XResourceBundle` contains the same items, but the items have been translated for the locale represented by that + * `XResourceBundle` implementation. For example, both `MyResources` and `MyResources_de` may have a `String` that is used on a button for confirming + * operations. In `MyResources` the `String` may contain `OK` and in `MyResources_de` it may contain `Gut` . + * + * If there are different resources for different countries, you can make specializations: for example, `MyResources_de_CH` is the German language (de) + * in Switzerland (CH). If you only want to modify some of the resources in the specialization, you can do so. + * + * When your program needs a locale-specific object, it loads + * + * the `XResourceBundle` implementation using the {@link XResourceBundleLoader} service: + * + * {{program example here, see documentation}} + * + * + * + * The first argument specifies the family name of the resource bundle that contains the object in question. The second argument indicates the desired + * locale. `getBundle` uses these two arguments to construct the name of the `ResourceBundle` subclass it should load according to the following + * specifications. + * + * The resource bundle lookup searches for services with various suffixes on the basis of (1) the desired locale and (2) the current default locale as + * returned by Locale.getDefault(), and (3) the root resource bundle (baseclass), in the following order from lower-level (more specific) to parent-level + * (less specific): + * + * baseclass + "_" + language1 + "_" + country1 + "_" + variant1 ; baseclass + "_" + language1 + "_" + country1 ; baseclass + "_" + language1 ; + * baseclass + "_" + language2 + "_" + country2 + "_" + variant2 ; baseclass + "_" + language2 + "_" + country2 ; baseclass + "_" + language2 ; + * baseclass + * + * For example, if the current default locale is `en_US` , the locale that the caller is interested in is `fr_CH` , and the resource bundle name is + * `MyResources` ; resource bundle lookup will search for the following services, in order: ; `MyResources_fr_CH ; MyResources_fr ; MyResources_en_US ; + * MyResources_en ; MyResources` + * + * The result of the lookup is a service, but that service may be backed by a property file on disk. If a lookup fails, `getBundle()` throws a + * `MissingResourceException` . + * + * The base service **must** be fully qualified (for example, `myPackage::MyResources` , not just `MyResources` ). + * + * Resource bundles contain key/value pairs. The keys uniquely identify a locale-specific object in the bundle. Here is an example of a `XResourceBundle` + * implementation that contains two key/value pairs: + * + * {{program example here, see documentation}} + * + * + * + * Keys are always `String` s. In this example, the keys are `OkKey` and `CancelKey` . In the above example, the values are also `String` s - `OK` and + * `Cancel` - but they do not have to be. The values can be any type of object. + * + * You retrieve an object from resource bundle using the appropriate get method. Because `OkKey` and `CancelKey` are both strings, you use `getByName` to + * retrieve them: + * + * {{program example here, see documentation}} + * + * + * + * The get methods all require the key as an argument and return the object if found. If the object is not found, the get methods throw a {@link + * com.sun.star.container.NoSuchElementException} . + * + * **NOTE:** You should always supply a base service with no suffixes. This will be the class of "last resort" if a locale is requested that does not + * exist. In fact, you must provide **all** of the services in any given inheritance chain for which you provide a resource. For example, if you provide + * `MyResources_fr_BE` , you must provide **both**`MyResources`**and**`MyResources_fr` , or the resource bundle lookup will not work right. + * + * You do not have to restrict yourself to using a single family of `ResourceBundle` s. For example, you could have a set of bundles for exception + * messages, `ExceptionResources` ( `ExceptionResources_fr` , `ExceptionResources_de` , ...), and one for widgets, `WidgetResource` ( + * `WidgetResources_fr` , `WidgetResources_de` , ...); breaking up the resources however you like. + * @author Mark Davis + * @author Markus Meyer + * @deprecated Deprecateddraft + * @see MissingResourceException + * @see Locale + * @version 0.1 26 May 1999 + */ + interface XResourceBundle extends container.XNameAccess { + /** + * @param key specifies the element. + * @returns an object from a resource bundle or NULL if no resource exists. It does not look in the parents. + */ + getDirectElement(key: string): any; + + /** @returns the locale for this resource bundle. This function can be used to determine whether the resource bundle that is returned really corresponds to t */ + getLocale(): lang.Locale; + + /** @returns the locale for this resource bundle. This function can be used to determine whether the resource bundle that is returned really corresponds to t */ + readonly Locale: lang.Locale; + + /** + * contains the parent bundle of this bundle. + * + * The parent bundle is searched by the method {@link com.sun.star.container.XNameAccess.getByName()} when this bundle does not contain a particular + * resource. + */ + Parent: XResourceBundle; + } + + /** + * makes it possible to load resource bundles. + * + * The search algorithm is specified in the documentation of {@link XResourceBundle} . The implementations must follow the name scheme, but it is allowed + * to search in several locations. + * @see MissingResourceException + * @see XResourceBundle + * @see Locale + */ + interface XResourceBundleLoader extends uno.XInterface { + /** loads the appropriate resource bundle subclass. */ + loadBundle(abaseName: string, aLocale: lang.Locale): XResourceBundle; + + /** loads the appropriate resource bundle. */ + loadBundle_Default(aBaseName: string): XResourceBundle; + } + + /** + * Interface to manage a resource string table containing a set of strings for different locales. + * + * The interface is derived from {@link com.sun.star.resource.XStringResourceResolver} that allows to access the string table but not to modify it. This + * interface also allows to modify the string table. + * + * It's designed to be used in the context of creating a string table, e.g. from a string table editor or from a Dialog Editor designing localized + * dialogs. + */ + interface XStringResourceManager extends XStringResourceResolver { + /** + * Provides a numeric id that is unique within all Resource IDs used in the string table. + * + * This method takes into account all Resource IDs starting with a decimal number and only evaluates the ID until the first non digit character is + * reached. This allows to extend unique IDs with individual identifiers without breaking the mechanism of this method. + * + * Examples: ID "42" -> numeric id 42 ID "0foo" -> numeric id 0 ID "111.MyId.Something.Else" -> numeric id 111 ID "No Digits" -> not considered for + * numeric id + * + * The id returned will be 0 for an empty string table and it will be reset to 0 if all locales are removed. In all other cases this method returns the + * maximum numeric id used so far at the beginning of a Resource ID incremented by 1. When calling this method more than once always the same number will + * be returned until this number is really used at the beginning of a new Resource ID passed to {@link setString()} or {@link setStringForLocale()} . + * + * As the numeric id is guaranteed to be unique for the complete string table all locales are taken into account. So using this methods will force the + * implementation to load all locale data that may not have been loaded so far. + * @throws com::sun::star::lang::NoSupportException if the next available id exceeds the range of type long. So it's not recommended to use own Resource IDs + */ + getUniqueNumericId(): number; + + /** + * Returns the resource's read only state + * @returns `TRUE` if the resource is read only, otherwise `FALSE` + */ + isReadOnly(): boolean; + + /** + * Creates a new locale. + * + * For each existing ResourceID an empty string will be created. The first locale created will automatically be the first default locale. Otherwise + * strings for all already created IDs will be copied from the default locale. + * @throws com::sun::star::container::ElementExistException if the Locale already has been created. + * @throws com::sun::star::lang::IllegalArgumentException if the Locale is not valid. + * @throws com::sun::star::lang::NoSupportException if the resource is read only, see {@link isReadOnly()} + */ + newLocale(locale: lang.Locale): void; + + /** + * Removes a Resource ID including the corresponding string for the current locale. + * @param ResourceID The Resource ID to be removed for the current locale. + * @throws com::sun::star::resource::MissingResourceException if the Resource ID is not valid. + * @throws com::sun::star::lang::NoSupportException if the resource is read only, see {@link isReadOnly()} + */ + removeId(ResourceID: string): void; + + /** + * Removes a Resource ID including the corresponding string for s specific locale. + * @param ResourceID The Resource ID to be removed. + * @param locale The locale the Resource ID should be removed for. The locale has to match exactly with one of the locales provided by {@link getLocales()} + * @throws com::sun::star::resource::MissingResourceException if the Resource ID is not valid. + * @throws com::sun::star::lang::NoSupportException if the resource is read only, see {@link isReadOnly()} + */ + removeIdForLocale(ResourceID: string, locale: lang.Locale): void; + + /** + * Removes a locale completely including the corresponding strings for each locale. + * @throws com::sun::star::lang::IllegalArgumentException if the Locale to be removed is not supported. + * @throws com::sun::star::lang::NoSupportException if the resource is read only, see {@link isReadOnly()} + */ + removeLocale(locale: lang.Locale): void; + + /** + * Sets the locale to be used + * @param Locale Specifies the current locale to be used. + * @param FindClosestMatch If true: If the exact locale that should be set is not available the method tries to find the closest match. E.g. if en_US is r + */ + setCurrentLocale(Locale: lang.Locale, FindClosestMatch: boolean): void; + + /** + * Sets the default locale to be used + * @param Locale Specifies the default locale to be used. If this locale is not available a {@link com.sun.star.lang.IllegalArgumentException} is thrown. + * @throws com::sun::star::lang::NoSupportException if the resource is read only, see {@link isReadOnly()} + */ + setDefaultLocale(Locale: lang.Locale): void; + + /** + * Associates a String to a Resource ID for the current locale. If an entry for the Resource ID already exists, the string associated with it will be + * overwritten, otherwise a new entry will be created. + * @param ResourceID ID to address the string inside the resource for the current locale. + * @param Str String to be associated with the Resource ID. + * @throws com::sun::star::lang::NoSupportException if the resource is read only, see {@link isReadOnly()} + */ + setString(ResourceID: string, Str: string): void; + + /** + * Associates a String to a Resource ID for a specific locale. If an entry for the Resource ID already exists, the string associated with it will be + * overwritten, otherwise a new entry will be created. + * + * It's not recommended to use this method to get the best performance as the implementation may be optimized for the use of the current locale. + * @param ResourceID ID to address the string inside the resource. + * @param Str String to be associated with the Resource ID. + * @param locale The locale the string should be set for. The locale has to match exactly with one of the locales provided by {@link getLocales()} . A clos + * @throws com::sun::star::lang::NoSupportException if the resource is read only, see {@link isReadOnly()} + */ + setStringForLocale(ResourceID: string, Str: string, locale: lang.Locale): void; + + /** + * Provides a numeric id that is unique within all Resource IDs used in the string table. + * + * This method takes into account all Resource IDs starting with a decimal number and only evaluates the ID until the first non digit character is + * reached. This allows to extend unique IDs with individual identifiers without breaking the mechanism of this method. + * + * Examples: ID "42" -> numeric id 42 ID "0foo" -> numeric id 0 ID "111.MyId.Something.Else" -> numeric id 111 ID "No Digits" -> not considered for + * numeric id + * + * The id returned will be 0 for an empty string table and it will be reset to 0 if all locales are removed. In all other cases this method returns the + * maximum numeric id used so far at the beginning of a Resource ID incremented by 1. When calling this method more than once always the same number will + * be returned until this number is really used at the beginning of a new Resource ID passed to {@link setString()} or {@link setStringForLocale()} . + * + * As the numeric id is guaranteed to be unique for the complete string table all locales are taken into account. So using this methods will force the + * implementation to load all locale data that may not have been loaded so far. + * @throws com::sun::star::lang::NoSupportException if the next available id exceeds the range of type long. So it's not recommended to use own Resource IDs + */ + readonly UniqueNumericId: number; + } + + /** + * Interface derived from {@link XStringResourceManager} containing basic persistence functionality limited to operations that are independent from a + * associated location or storage. + * @see XStringResourceManager. + */ + interface XStringResourcePersistence extends XStringResourceManager { + /** + * Returns a sequence of byte representing the complete string resource in a binary format. + * + * This method is intended to support datatransfer functionality, e.g. provided by {@link com.sun.star.datatransfer.XTransferable} and related + * interfaces. + * + * See {@link importBinary()} ). + * @returns a sequence of byte representing the string resource. + */ + exportBinary(): SafeArray; + + /** + * Initializes the string resource with binary data. This method expects the data format returned by {@link exportBinary()} . + * + * All locales and strings previously added to the string resource will be deleted. So after calling this method the string resource only contains the + * locales and strings specified in the binary data. + * + * This method is intended to support datatransfer functionality, e.g. provided by {@link com.sun.star.datatransfer.XTransferable} and related + * interfaces. + * + * See {@link importBinary()} ). + * @throws com::sun::star::lang::IllegalArgumentException if Data is empty or does not meet the binary format returned by the current or earlier version of + */ + importBinary(Data: LibreOffice.SeqEquiv): void; + + /** + * provides the current modify state of the StringResourceManager instance. + * @returns `TRUE` if the string table has changed since the last call to {@link store()} or, if supported `XStringResourceWithStorage::storeAsStorage` . `FA + */ + isModified(): boolean; + + /** + * Sets the comment stored first in each locale data file. + * + * This interface method can be used to overwrite the comment used during initialization of the services {@link StringResourceWithLocation} or {@link + * StringResourceWithStorage} + * @param Comment Comment stored first in each properties file followed by a line feed character. The line feed character is added automatically and hasn't + */ + setComment(Comment: string): void; + + /** + * Stores all string table data respectively all data modified since the last call to {@link store()} to the location or storage associated with the + * StringResourceManager. Each locale is stored in a single file following the format of Java properties files. + * + * This interface is supported by the services {@link StringResourceWithLocation} and {@link StringResourceWithStorage} + * + * The {@link StringResourceWithLocation} is initialized with an URL specifying a location used to load data from and store data to, see {@link + * StringResourceWithLocation} . + * + * The {@link StringResourceWithStorage} is initialized with an instance of {@link com.sun.star.embed.XStorage} used to load data from and store data to, + * see {@link StringResourceWithStorage} . + * + * If the string table isn't modified (see {@link isModified()} ) this method does nothing. + * + * This method can throw all exceptions thrown by the methods of {@link com.sun.star.embed.XStorage} respectively a {@link + * com.sun.star.ucb.CommandAbortedException} in case of a {@link StringResourceWithLocation} for all exceptions that are not handled by a previously + * specified {@link com.sun.star.task.XInteractionHandler} . The handler to be used for the store operation can be specified during initialization of + * {@link StringResourceWithLocation} . + * @throws com::sun::star::lang::NoSupportException if no URL or no valid storage are provided. + */ + store(): void; + + /** + * Stores all string table data to the provided storage. + * + * Calling this method does not affect the association with a location (in case of a {@link StringResourceWithLocation} instance) respectively with a + * storage (in case of a {@link StringResourceWithStorage} instance). The modified state isn't affected either. + * + * This method can be used to make a copy of the current string table data to a storage. This method can throw all exceptions thrown by the methods of + * {@link com.sun.star.embed.XStorage} + * @param Storage all string table data will be stored to this storage. + * @param BaseName Base string for the file names used to store the locale data. The locale data is stored in Java properties files also following the corr + * @param Comment Comment stored first in each properties file, for a detailed description see {@link setComment()} . This method can throw all exceptions + */ + storeToStorage(Storage: embed.XStorage, BaseName: string, Comment: string): void; + + /** + * Stores all string table data to the location specified by the passed URL string. + * + * Calling this method does not affect the association with a location (in case of a {@link StringResourceWithLocation} instance) respectively with a + * storage (in case of a {@link StringResourceWithStorage} instance). The modified state isn't affected either. + * + * This method can be used to make a copy of the current string table data to a location. + * @param URL the location the string table data should be stored to. + * @param BaseName Base string for the file names used to store the locale data. The locale data is stored in Java properties files also following the corr + * @param Comment Comment stored first in each properties file, for a detailed description see {@link setComment()} . + * @param Handler a {@link com.sun.star.task.XInteractionHandler} . It will be passed to ucb handle exceptions. Exceptions not processed by this handler wi + * @see com.sun.star.task.InteractionHandler + */ + storeToURL(URL: string, BaseName: string, Comment: string, Handler: task.XInteractionHandler): void; + } + + /** + * Interface to access strings in a resource. + * + * The interface is derived from {@link com.sun.star.util.XModifyBroadcaster} + * + * All registered {@link com.sun.star.util.XModifyListener} interfaces will be notified if either the current locale changes or if a string is added, + * changed or removed. This usually will only happen if the implementing object also supports the interface {@link + * com.sun.star.resource.XStringResourceManager} and is used in the design mode of a Dialog or String table editor. But also changing the locale at + * runtime can be supported in this way. + */ + interface XStringResourceResolver extends util.XModifyBroadcaster { + /** + * Returns the current locale specified in the accessed resource. + * + * If no locale is available, the returned Locale structure only contains empty strings. + * @returns the used locale + */ + readonly CurrentLocale: lang.Locale; + + /** + * Returns the default locale of the accessed resource. In many cases this will be the locale of the Office initially used to create the resource. + * @returns the used locale + */ + readonly DefaultLocale: lang.Locale; + + /** + * Returns the current locale specified in the accessed resource. + * + * If no locale is available, the returned Locale structure only contains empty strings. + * @returns the used locale + */ + getCurrentLocale(): lang.Locale; + + /** + * Returns the default locale of the accessed resource. In many cases this will be the locale of the Office initially used to create the resource. + * @returns the used locale + */ + getDefaultLocale(): lang.Locale; + + /** + * Returns a sequence of all supported locales + * @returns a sequence of all supported locales + */ + getLocales(): SafeArray; + + /** + * Returns a sequence of all valid Resource IDs for the current locale + * @returns a sequence of all valid Resource IDs + */ + getResourceIDs(): SafeArray; + + /** + * Returns a sequence of all valid Resource IDs for a specific locale + * + * It's not recommended to use this method to get the best performance as the implementation may be optimized for the use of the current locale. + * @param locale The locale the ResourceIDs should be returned for. The locale has to match exactly with one of the locales provided by {@link getLocales() + * @returns a sequence of all valid Resource IDs + */ + getResourceIDsForLocale(locale: lang.Locale): SafeArray; + + /** + * Checks if the resource contains an entry for the given ResourceID and current locale. + * @param ResourceID ID to specify the string inside the resource. + * @returns `TRUE` if an entry exists, otherwise `FALSE` + */ + hasEntryForId(ResourceID: string): boolean; + + /** + * Checks if the resource contains an entry for the given ResourceID and locale. + * + * It's not recommended to use this method to get the best performance as the implementation may be optimized for the use of the current locale. + * @param ResourceID ID to specify the string inside the resource. + * @param locale The locale the entry should be checked for. The locale has to match exactly with one of the locales provided by {@link getLocales()} . A c + * @returns `TRUE` if an entry exists, otherwise `FALSE` + */ + hasEntryForIdAndLocale(ResourceID: string, locale: lang.Locale): boolean; + + /** + * Returns a sequence of all supported locales + * @returns a sequence of all supported locales + */ + readonly Locales: SafeArray; + + /** + * Resolves the passed ResoureID for the current locale. This locale is set during initialization of the object implementing this interface or - in case + * that also the interface {@link com.sun.star.resource.XStringResourceManager} is supported - by using the `XStringResourceManager::setLocale` method. + * @param ResourceID ID to specify the string inside the resource. The ID can - but not needs to - be a hierarchical name like "foo.nothing.invalid". + * @returns the localized string for the specified ID + * @throws com::sun::star::resource::MissingResourceException if no entry exists for the given ResourceID + */ + resolveString(ResourceID: string): string; + + /** + * Resolves the passed ResoureID for a specific locale. + * + * It's not recommended to use this method to get the best performance as the implementation may be optimized for the use of the current locale. + * @param ResourceID ID to specify the string inside the resource. The ID can - but not needs to - be a hierarchical name like "foo.nothing.invalid". + * @param locale The locale the string should be resolved for. The locale has to match exactly with one of the locales provided by {@link getLocales()} . A + * @returns the localized string for the specified ID and Locale + * @throws com::sun::star::resource::MissingResourceException if no entry exists for the given ResourceID or locale + */ + resolveStringForLocale(ResourceID: string, locale: lang.Locale): string; + + /** + * Returns a sequence of all valid Resource IDs for the current locale + * @returns a sequence of all valid Resource IDs + */ + readonly ResourceIDs: SafeArray; + } + + /** Provides access to a string resource represented by a {@link com.sun.star.resource.XStringResourceResolver} . */ + interface XStringResourceSupplier extends uno.XInterface { + /** + * Provides access to a string resource. Depending on the context the returned object may also support {@link + * com.sun.star.resource.XStringResourceManager} or {@link com.sun.star.resource.XStringResourcePersistence} or {@link + * com.sun.star.resource.XStringResourceWithStorage} + * @returns an interface {@link com.sun.star.resource.XStringResourceResolver} + */ + getStringResource(): XStringResourceResolver; + + /** + * Provides access to a string resource. Depending on the context the returned object may also support {@link + * com.sun.star.resource.XStringResourceManager} or {@link com.sun.star.resource.XStringResourcePersistence} or {@link + * com.sun.star.resource.XStringResourceWithStorage} + * @returns an interface {@link com.sun.star.resource.XStringResourceResolver} + */ + readonly StringResource: XStringResourceResolver; + } + + /** + * Extends {@link XStringResourcePersistence} by methods to handle an associated location. + * @see XStringResourcePersistence. + */ + interface XStringResourceWithLocation extends XStringResourcePersistence { + /** + * Associates a location to the {@link StringResourceWithStorage} instance which is used on subsequent calls of {@link store()} . + * @param URL the location to be associated to the StringResourceManager This call has to be used carefully as it removes the location previously connecte + * @throws com::sun::star::lang::IllegalArgumentException if an empty string is passed as URL + * @throws com::sun::star::lang::NoSupportException if the location is readonly + */ + setURL(URL: string): void; + + /** + * Stores all string table data to a location and associates this location to this instance as if setLocation() was called with this location. The + * modified state will be unmodified after the call. + * @param URL the location the string table data should be stored to. + */ + storeAsURL(URL: string): void; + } + + /** + * Extends {@link XStringResourcePersistence} by methods to handle an associated {@link com.sun.star.embed.XStorage} instance. + * @see XStringResourcePersistence. + */ + interface XStringResourceWithStorage extends XStringResourcePersistence { + /** + * Associates a storage to the {@link StringResourceWithStorage} instance which is used on subsequent calls of {@link store()} . + * @param Storage the storage to be associated to the StringResourceManager This call has to be used carefully as it removes the storage previously connec + * @throws com::sun::star::lang::IllegalArgumentException if a null interface is passed as Storage + */ + setStorage(Storage: embed.XStorage): void; + + /** + * Stores all string table data to a storage and associates this storage to this instance as if {@link setStorage()} was called with this storage. The + * modified state will be unmodified after the call. + * + * This method can throw all exceptions thrown by the methods of {@link com.sun.star.embed.XStorage} + */ + storeAsStorage(Storage: embed.XStorage): void; + } + } + + namespace scanner { + /** {@link ScannerManager} provides a simple method to access scanner devices (or other image producing devices) */ + type ScannerManager = XScannerManager2; + + /** enum ScanError describes error codes of scanner component */ + const enum ScanError { + /** InvalidContext: a device was requested that does not exist */ + InvalidContext = 5, + /** ScanCanceled: the scan was canceled by the user */ + ScanCanceled = 4, + /** ScanErrorNone: no error occurred */ + ScanErrorNone = 0, + /** ScanFailed: an error occurred during scanning */ + ScanFailed = 2, + /** ScanInProgress: a scan is already in progress on this device that has to end before a new one can be started */ + ScanInProgress = 3, + /** ScannerNotAvailable: the requested device could not be opened */ + ScannerNotAvailable = 1, + } + + /** a scanner context is an identifier for a specific scanner device */ + interface ScannerContext { + /** InternalData contains service private data and must not be changed */ + InternalData: number; + + /** ScannerName contains a user readable identification */ + ScannerName: string; + } + + /** A {@link ScannerException} gets thrown if an object of type {@link XScannerManager} could not complete a specific action. */ + interface ScannerException extends uno.Exception { + /** Error: contains the specific reason for failure */ + Error: ScanError; + } + + interface XScannerManager extends uno.XInterface { + /** returns all available scanner devices */ + readonly AvailableScanners: SafeArray; + + /** produce some kind of User Interface to let the user have a preview, configure the scan area, etc., it returns FALSE if user cancelled this process */ + configureScanner(scannerContext: [ScannerContext]): boolean; + + /** returns all available scanner devices */ + getAvailableScanners(): SafeArray; + + /** get the image after completion of scan */ + getBitmap(scannerContext: ScannerContext): awt.XBitmap; + + /** get the state of scanning after completion of scan */ + getError(scannerContext: ScannerContext): ScanError; + + /** + * start the scanning process listener will be called when scan is complete the EventObject of the disposing call will contain the {@link ScannerManager} + * if the scan was successful, an empty interface otherwise + */ + startScan(scannerContext: ScannerContext, listener: lang.XEventListener): void; + } + + /** + * Extension of {@link XScannerManager} . + * @since LibreOffice 3.5 + */ + interface XScannerManager2 extends XScannerManager { + /** + * produce some kind of User Interface to let the user have a preview, configure the scan area, etc., it, and scan it returns FALSE if user cancelled + * this process + */ + configureScannerAndScan(scannerContext: [ScannerContext], listener: lang.XEventListener): boolean; + } + } + + namespace script { + /** makes it possible to generate the adapters from specific interfaces to the interface {@link XAllListener} . */ + type AllListenerAdapter = XAllListenerAdapterService; + + /** + * is thrown by an attacher if an adapter service cannot create the appropriate adapter. + * @see com.sun.star.script.XAllListenerAdapterService + * @see com.sun.star.script.XEventAttacher + * @see com.sun.star.script.XEventAttacherManager + */ + type CannotCreateAdapterException = uno.Exception; + + /** + * This service provides a widening converter converting from one type to another, if possible. + * + * What is possible? byte: byte, (short *1), (long *1), (hyper *1), (float *1), (double *1), (enum *2), (any *3), boolean, (char *4), (string *5)short: + * byte, short, (long *1), (hyper *1), (float *7), (double *7), (enum *2), (any *3), boolean, char, (string *5)long: byte, short, long, (hyper *1), + * (float *7), (double *7), enum, (any *3), boolean, char, (string *5)hyper: byte, short, long, hyper, (float *7), (double *7), enum, (any *3), boolean, + * char, (string *5)float: byte, short, long, hyper, float, (double *7), (enum *8), (any *3), boolean, char, (string *5)double: byte, short, long, hyper, + * float, double, enum, (any *3), boolean, char, (string *5)enum: (byte *9), (short *9), (long *9), (hyper *9), (float *9), (double *9), (enum *10), (any + * *3), (string *11)void: ok for all typesany: ok for all typesboolean: byte, short, long, hyper, float, double, (any *3), boolean, char, (string *12). 0 + * => false, != 0 => truechar: byte, short, (long *1), (hyper *1), (float *7), (double *7), enum, (any *3), boolean, char, (string *13)string: byte, + * short, long, hyper, float, double, enum, (any *3), boolean, char, stringstruct: (any *3), (struct *14)interface: (any *3), (struct *14)exception: (any + * *3), (exception *14)union: (any *3), (union *14)sequence: (any *3), (sequence *15) rules: 1: only converts if the value is in the range of the target + * type.2: only converts if the value, not the position, of the enum is in the range of the target type.3: get value until it is not an any. Then convert + * it with the other rules.4: only converts if the value of the character is between 0 - 255.5: only converts if the value represents a decimal, + * hexadecimal (0x...) or a floating point number. Examples: 10, 0x10, 10.045, 10,555, +10, +10.6e10, -10.6e-10, .16.7: only converts if the value is in + * the range of the target type. The value is rounded to an integer.8: only converts if the float can be converted back to the same enum value.9: only + * converts if the number is one of the enumeration type values. Normally you need reflection information of the enum type.10: only converts if it is the + * same enumeration type.11: only converts if the string contains the name of an enumeration type value. Normally you need core reflection information of + * the enum type.12: only converts if the value of the string is "1", "true" or "0", "false". The comparison is case insensitive.13: only converts if the + * length of the string is 1 or 0.14: only converts if the types are equal or the source type is derived from the destination type.15: only converts if + * each element of the source sequence can be converted to an element of the destination sequence. + */ + type Converter = XTypeConverter; + + /** + * service that any scripting engine must implement. + * + * The implementation of this interface should supply the interfaces com.sun.star.script.XDebugging2 and interface {@link + * com.sun.star.script.XInvocation} . + * @deprecated Deprecated + */ + type Engine = XEngine; + + /** + * factory service that allows construction of {@link Invocation} objects. + * + * Invoke {@link createInstanceWithArguments()} of XSingleServiceFactory to create an {@link Invocation} adapter for the passed object (Invoking {@link + * createInstance()} will fail). + * + * The adapter has to support {@link com.sun.star.script.XInvocation} . The adapter may also support {@link com.sun.star.script.XInvocation2} . + */ + type Invocation = lang.XSingleServiceFactory; + + /** + * Provides functionality to create an adapter that supports (a) special interface type(s) and maps calls to the interface's methods to an invocation + * interface. + * + * An adapter like this allows generic dispatch interfaces to meet interface requirements, e.g. if a specific listener interface has to be passed to an + * add...Listener method. + * + * The adapter has to support {@link com.sun.star.script.XInvocationAdapterFactory} . The adapter may also support {@link + * com.sun.star.script.XInvocationAdapterFactory2} . + */ + type InvocationAdapterFactory = XInvocationAdapterFactory2; + + /** + * service is implementation of a {@link JavaScript} interpreter. + * + * The interpreter should be similar to {@link JavaScript} 1.1. The exact behavior will be specified in future. + * @deprecated Deprecated + */ + type JavaScript = Engine; + + /** + * is thrown when an operation on a unloaded library is attempted which requires the library being loaded. + * @since OOo 3.0 + */ + type LibraryNotLoadedException = uno.Exception; + + /** + * Provides documentation for UNO services + * @since LibreOffice 5.1 + */ + type theServiceDocumenter = XServiceDocumenter; + + /** + * contains the response for a scripting engine termination. + * @deprecated Deprecated + */ + const enum FinishReason { + /** + * script in the engine was cancelled. + * + * script execution was cancelled. + */ + Cancel = 1, + /** error occurred during script execution or compiling. */ + Error = 2, + /** script in the engine terminated normally. */ + OK = 0, + } + + /** + * values used to specify the response for a scripting engine interrupt. + * @deprecated Deprecated + */ + const enum InterruptReason { + /** script stopped at a breakpoint. */ + BreakPoint = 3, + /** + * script in the engine was cancelled. + * + * script execution was cancelled. + */ + Cancel = 0, + /** script has invalid syntax. */ + CompileError = 2, + /** runtime error occurred during script execution. */ + RuntimeError = 1, + /** script stops because only one scripting engine command was executed. */ + Step = 4, + /** script stops because it leaves a function. */ + StepOut = 6, + /** script stops because one step was executed. */ + StepOver = 5, + /** script stop because one step was executed. */ + StepStatement = 7, + } + + /** These values are used to specify a member accessible by {@link XInvocation} . */ + const enum MemberType { + METHOD = 0, + PROPERTY = 1, + UNKNOWN = 2, + } + + /** + * This event is a wrapper for an original event in a forwarding event. + * + * Usually the original event is the first argument in the array of arguments. + */ + interface AllEventObject extends lang.EventObject { + /** The arguments of the original method. */ + Arguments: SafeArray; + + /** + * A helper value for the implementation that can be used arbitrarily. + * + * This field reflects the third parameter of the method {@link XAllListenerAdapterService.createAllListerAdapter()} . + */ + Helper: any; + + /** contains the type of the original listener. */ + ListenerType: type; + + /** The original method name on which the event was fired. */ + MethodName: string; + } + + /** + * Allows an UNO sequence that is passed between different language boundries to indicate it prefers to be represented as a multidimensional array with 0 + * or 1 based indices. UNO does not natively represent Multi-Dimensional arrays, instead a sequence can have elements that are themselves sequences (an + * array of arrays ). + * + * Some languages ( example BASIC ) can natively represent both Multi-Dimensional arrays and array of arrays. Those languages could represent a sequence + * of sequences as either a Multi-Dimensional array or array of arrays. This structure allows a preference for a Multi-Dimensional array representation + * to be specified. + */ + interface ArrayWrapper { + /** + * Contains the Array to be passed. + * + * Multi-dimensional arrays can only be represented as a sequence where the elements of the sequence are themselves sequences. N-Levels of indirection + * are possible, where N is the number of dimensions. Note: its perfectly legal to use this structure with a single dimensioned array just to indicate + * the array indexing. + */ + Array: any; + + /** Indicates whether the Array should be have 1 or 0 based indexing. */ + IsZeroIndex: boolean; + } + + /** + * is thrown in order to transport an error to Basic. + * @since OOo 2.0 + */ + interface BasicErrorException extends uno.Exception { + /** The error code. */ + ErrorCode: number; + + /** Specifies the argument which is used in the localized error message for the placeholder. */ + ErrorMessageArgument: string; + } + + /** This exception is thrown to indicate that a type conversion can not be performed. */ + interface CannotConvertException extends uno.Exception { + /** If the conversion of a method argument fails, this is the index of the value in the "IN" argument list. [optional] */ + ArgumentIndex: number; + + /** This member contains the class of the type to which the value should be converted. */ + DestinationTypeClass: uno.TypeClass; + + /** This member contains the reason that the conversion failed. Have a look at {@link FailReason} . */ + Reason: number; + } + + /** + * provides information about a certain stack frame. + * @deprecated Deprecated + */ + interface ContextInformation { + /** contains the first column in the **EndLine** that is NOT associated with the context. */ + EndColumn: number; + + /** contains the last line in the module's source code associated with the context. */ + EndLine: number; + + /** Get all names of the local variable in this context. */ + LocalVariableNames: SafeArray; + + /** + * Full qualified name to address the module or function associated with the context. If the module or function can't be addressed by name, e.g., in case + * that a runtime generated eval-module is executed, this string is empty + */ + Name: string; + + /** + * Source code of the Module, that is associated with the context. If the source can be accessed using the ModuleName or if the source is unknown + * (executing compiled code) this string can be empty. + */ + SourceCode: string; + + /** contains the first column in the **StartLine** associated with the context. */ + StartColumn: number; + + /** + * contains the first line in the module's source code associated with the context. + * + * If "name" addresses a function, all line and column values are nevertheless given relative to the module's source. If source code is not available, + * this value addresses a binary position in the compiled code. + * @see XLibraryAccess.getModuleCode + * @see XLibraryAccess.getFunctionCode + */ + StartLine: number; + } + + /** + * defines a container of dialog libraries, which is to be made persistent in a sub storage of a document storage. + * @since OOo 2.3 + */ + interface DocumentDialogLibraryContainer extends XStorageBasedLibraryContainer { + /** + * creates an instance of the `DocumentDialogLibraryContainer` , belonging to a document + * + * The current storage of the document will be set as initial root storage (see XPersistentLibraryContainer::RootStorage) of the container. + * + * Usually, you will only create a `DocumentDialogLibraryContainer` within the implementation of the document to which the container should belong. + * @param Document The document to which the container should belong to. Must not be `NULL` . + * @throws com::sun::star::lang::IllegalArgumentException if `Document` does not denote a valid {@link com.sun.star.document.OfficeDocument} . + */ + create(Document: document.XStorageBasedDocument): void; + createWithURL(URL: string): void; + } + + /** + * defines a container of StarBasic script libraries, which is to be made persistent in a sub storage of a document storage. + * @since OOo 2.3 + */ + interface DocumentScriptLibraryContainer extends XStorageBasedLibraryContainer { + /** + * creates an instance of the `DocumentScriptLibraryContainer` , belonging to a document + * + * The current storage of the document will be set as initial root storage (see XPersistentLibraryContainer::RootStorage) of the container. + * + * Usually, you will only create a `DocumentScriptLibraryContainer` within the implementation of the document to which the container should belong. + * @param Document The document to which the container should belong to. Must not be `NULL` . + * @throws com::sun::star::lang::IllegalArgumentException if `Document` does not denote a valid {@link com.sun.star.document.OfficeDocument} . + */ + create(Document: document.XStorageBasedDocument): void; + createWithURL(URL: string): void; + } + + interface EventListener { + AddListenerParam: string; + AllListener: XAllListener; + EventMethod: string; + Helper: any; + ListenerType: string; + } + + /** + * event contains the reasons and the data for the {@link XEngineListener.finished()} method. + * @deprecated Deprecated + */ + interface FinishEngineEvent extends lang.EventObject { + /** + * error message. + * + * Only valid if Reason is RuntimeError or CompileError. + */ + ErrorMessage: string; + + /** specifies why the script terminates. */ + Finish: FinishReason; + + /** + * contains the return value. + * + * This field is only valid if {@link FinishEngineEvent.Finish} is FinishReason::OK. + */ + Return: any; + } + + /** + * describes an interrupt which occurs in the scripting engine. + * @deprecated Deprecated + */ + interface InterruptEngineEvent extends lang.EventObject { + /** contains the first column in the "EndLine" which is NOT affected by the event that took place. */ + EndColumn: number; + + /** contains the last line in the module's source code that is affected by the event that took place. */ + EndLine: number; + + /** + * error message. + * + * Only valid if Reason is RuntimeError or CompileError. + */ + ErrorMessage: string; + + /** + * fully qualified name to address the module or function affected by the event that took place. + * + * If the module or function can't be addressed by name (for example, in case that a runtime-generated eval-module is executed), this string is empty. + */ + Name: string; + + /** contains the interrupt reason. */ + Reason: InterruptReason; + + /** + * source code of the Module affected by the event that took place. + * + * If the source can be accessed using the ModuleName, or if the source is unknown (executing compiled code), this string can be empty. + */ + SourceCode: string; + + /** contains the first column in the "StartLine" that is affected by the event that took place. */ + StartColumn: number; + + /** + * contains the first line in the module's source code that is affected by the event that took place. + * + * If "name" addresses a function, all line and column values are nevertheless given relative to the module's source. If source code is not available, + * this value addresses a binary position in the compiled code. + * @see XLibraryAccess.getModuleCode + * @see XLibraryAccess.getFunctionCode + */ + StartLine: number; + } + + /** + * This struct is used to specify information about object members (methods or properties) accessed via {@link XInvocation} , such as names, types, or + * parameters. + */ + interface InvocationInfo { + /** Name of the method or property. */ + aName: string; + + /** Mode of method parameters (IN, OUT, INOUT), for properties this sequence is empty. */ + aParamModes: SafeArray; + + /** Types method parameters, for properties this sequence is empty */ + aParamTypes: SafeArray; + + /** Type of the member, for methods the return type */ + aType: type; + + /** Kind of the member (method or property). */ + eMemberType: MemberType; + + /** + * Only for property members: This field may contain zero or more constants of the {@link com.sun.star.beans.PropertyAttribute} constants group. It is + * not guaranteed that all necessary constants are set to describe the property completely, but a flag will only be set, if the corresponding charac- + * teristic really exists. Example: If the READONLY flag is set, the property is readonly. If it isn't set, the property nevertheless can be readonly. + * + * For methods this field is irrelevant and is set to 0. + */ + PropertyAttribute: number; + } + + interface ModuleInfo { + ModuleObject: uno.XInterface; + ModuleType: number; + } + + /** Is used for interaction handle in case password protected modules exceed the size that can be stored in OpenOffice 2.x, 1.x formats */ + interface ModuleSizeExceededRequest extends uno.Exception { + /** The name of the modules that exceed size that can be stored */ + Names: SafeArray; + } + + interface NativeObjectWrapper { + ObjectId: any; + } + + /** + * script event that gets delivered whenever a script event takes place. + * + * For that to happen, a "ScriptEventDescriptor" must be registered at and attached to an object by an {@link XEventAttacherManager} . + */ + interface ScriptEvent extends AllEventObject { + /** + * script code as string. + * + * The code has to correspond with the language defined by ScriptType. + */ + ScriptCode: string; + + /** type of the script language as string; for example, "Basic" or "StarScript". */ + ScriptType: string; + } + + /** describes an effect, especially a script to be executed, for a certain event given by the listener type and the name of the event method. */ + interface ScriptEventDescriptor { + /** + * data to be used if the addListener method needs an additional parameter. + * + * If the type of this parameter is different from string, it will be converted, when added. + */ + AddListenerParam: string; + + /** event method as string. */ + EventMethod: string; + + /** listener type as string, same as listener-XIdlClass.getName(). */ + ListenerType: string; + + /** script code as string (the code has to correspond with the language defined by ScriptType). */ + ScriptCode: string; + + /** type of the script language as string; for example, "Basic" or "StarScript". */ + ScriptType: string; + } + + /** + * specifies a listener combining all methods of a listener interface in a single generic call. + * + * Without any output parameters, it is possible to adapt any interface if the {@link XAllListenerAdapterService} can generate an adapter. + */ + interface XAllListener extends lang.XEventListener { + /** + * gets called when a "vetoable event" occurs at the object. + * + * That happens when the listener method raises an exception, or has a return value declared. + */ + approveFiring(aEvent: AllEventObject): any; + + /** gets called when an event occurs at the object. */ + firing(iaEvent: AllEventObject): void; + } + + /** allows the generation of adapters from specific interfaces to the {@link XAllListener} interface. */ + interface XAllListenerAdapterService extends uno.XInterface { + /** + * creates a wrapper from the listener of type **xListenerType** to the {@link XAllListener} listener. + * + * To get the correct listener interface the returned {@link com.sun.star.uno.XInterface} has to be queried for it. + */ + createAllListerAdapter(xListenerType: type, xListener: XAllListener, aHelper: any): uno.XInterface; + } + + interface XAutomationInvocation extends XInvocation { + invokeGetProperty(aFunctionName: string, aParams: LibreOffice.SeqEquiv, aOutParamIndex: [LibreOffice.SeqEquiv], aOutParam: [LibreOffice.SeqEquiv]): any; + invokePutProperty(aFunctionName: string, aParams: LibreOffice.SeqEquiv, aOutParamIndex: [LibreOffice.SeqEquiv], aOutParam: [LibreOffice.SeqEquiv]): any; + } + + /** + * makes it possible to set breakpoints in an interpreter. + * @deprecated Deprecated + */ + interface XDebugging extends uno.XInterface { + /** clears all breakpoints in the module set by "setBreakPoint". */ + clearAllBreakPoints(aModuleName: string): void; + + /** continues the program execution. */ + doContinue(): void; + + /** returns the value of the variable at the given stack position. */ + dumpVariable(aVariableName: string, nCallStackPos: number): string; + + /** + * Evaluates an expression. + * @param aSourceCode the expression to be evaluated. + * @param nCallStackPos Position in the call stack for which the expression should be evaluated. 0 is the top/actual position in the call in the call stack + * @returns the value of the expression as string. + */ + eval(aSourceCode: string, nCallStackPos: number): string; + + /** + * returns more detailed information about a specified stack frame. + * @param nCallStackPos specifies the position in the call stack for the variables that should be delivered. + */ + getContextInformation(nCallStackPos: number): ContextInformation; + + /** Returns the engine's stack trace of the current execute position. Line break is the delimiter. */ + getStackTrace(): SafeArray; + + /** returns whether the given variable exists within the specified stack frame. */ + isVariable(aVariableName: string, nCallStackPos: number): boolean; + + /** + * returns the source code line where the breakpoint was set.

The value can differ from the parameter + * + * nSourceCodeLine when this is not a valid line to + * + * place it. -1 indicates that the breakpoint cannot be set at + * + * this position. + */ + setBreakPoint(aModuleName: string, nSourceCodeLine: number, bOn: boolean): number; + + /** sets the value of the specified variable within the specified stack frame. */ + setVariable(aVariableName: string, aValue: string, nCallStackPos: number): void; + + /** Returns the engine's stack trace of the current execute position. Line break is the delimiter. */ + readonly StackTrace: SafeArray; + + /** + * executes the next and only the next statement. + * + * If the next statement is a function call, only the function entered. + */ + stepIn(): void; + + /** executes the program until the next return from this stack frame. */ + stepOut(): void; + + /** + * executes the next and only the next statement. + * + * If the next statement is a function call, the function is executed completely. + */ + stepOver(): void; + + /** + * stops the execution of the interpreter. + * + * To continue with the execution, call {@link XDebugging.doContinue()} . + */ + stop(): void; + } + + /** + * An object supporting this interface indicates to interested parties or clients the name of the default method for this object. + * + * For example where ExampleObject is an instance of an Object that supports this interface which returns the default method name "defaultMethod".A + * scripting engine could use this information to support syntax like + * + * "ExampleObject( Param1 .... ParamN )" + * + * which would be equivalent to writing + * + * "ExampleObject.defaultMethod( Param1 ... ParamN )" + */ + interface XDefaultMethod extends uno.XInterface { + /** + * Returns the name of the default method + * @returns The `string` name of default method + */ + readonly DefaultMethodName: string; + + /** + * Returns the name of the default method + * @returns The `string` name of default method + */ + getDefaultMethodName(): string; + } + + /** + * An object supporting this interface indicates to interested parties or clients the name of the default propery for this object. + * + * For example where ExampleObject is an instance of an Object that supports this interface which returns the default property name "Value".A scripting + * engine could use this information to support syntax like + * + * ExampleObject = "foo" + * + * which would be equivalent to writing + * + * ExampleObject.Value = "foo" + * + * or + * + * bar = ExampleObject + * + * which would be equivalent to writing + * + * bar = ExampleObject.Value + */ + interface XDefaultProperty extends uno.XInterface { + /** + * Returns the name of the default property + * @returns The `string` name of default property + */ + readonly DefaultPropertyName: string; + + /** + * Returns the name of the default property + * @returns The `string` name of default property + */ + getDefaultPropertyName(): string; + } + + /** provides access to an object's methods and properties. */ + interface XDirectInvocation extends uno.XInterface { + /** + * provides access to methods and properties exposed by an object. + * @param aName the method to invoke + * @param aParams all parameters, out parameters are not supported + */ + directInvoke(aName: string, aParams: LibreOffice.SeqEquiv): any; + + /** returns `TRUE` if the method or property with the specified name exists, else `FALSE` . */ + hasMember(aName: string): boolean; + } + + /** + * makes it possible to control a scripting engine. + * @deprecated Deprecated + */ + interface XEngine extends uno.XInterface { + /** + * adds an engine listener. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + */ + addEngineListener(Listener: XEngineListener): void; + + /** + * terminates the execution of the running script. + * + * The waiting queue is cleared too. + */ + cancel(): void; + + /** compiles a script module in the scope of the root object. */ + compile(ModuleName: string, Script: string, CreateDebugInfo: boolean): boolean; + + /** gets an interface to the object which is the scripting root. */ + getRoot(): uno.XInterface; + + /** + * removes an engine listener. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + */ + removeEngineListener(Listener: XEngineListener): void; + + /** gets an interface to the object which is the scripting root. */ + Root: uno.XInterface; + + /** + * runs a script specified by a string. + * + * The arguments given in **aArgs** can be ignored by the engine. The Script is executed synchronously. + */ + run(aScript: string, xThis: uno.XInterface, aArgs: LibreOffice.SeqEquiv): any; + + /** + * runs the script specified by a string and makes callbacks. + * + * The arguments given in **aArgs** can be ignored by the engine. The script is executed asynchronously. + */ + runAsync(acript: string, xThis: uno.XInterface, args: LibreOffice.SeqEquiv, xCallback: XEngineListener): void; + + /** sets an access object to get external functions. */ + setLibraryAccess(Library: XLibraryAccess): void; + + /** + * sets an interface to an object as a scripting root. + * + * If the root object implements the {@link XInvocation} interface, then the engine uses this interface to set/get properties and call methods. + */ + setRoot(xRoot: uno.XInterface): void; + } + + /** + * makes it possible to receive events from a scripting engine. + * @deprecated Deprecated + */ + interface XEngineListener extends lang.XEventListener { + /** gets fired when the script execution has finished. */ + finished(Evt: FinishEngineEvent): void; + + /** + * gets fired when an interrupt occurs during the script execution. + * + * If you call the method, the execution stops. So in this situation, the stack and variable values are still available by using the appropriate {@link + * XDebugging} methods. + */ + interrupt(Evt: InterruptEngineEvent): void; + + /** gets fired when the script gets into execution state. */ + running(Evt: lang.EventObject): void; + } + + interface XErrorQuery extends uno.XInterface { + /** + * Returns whether this object has an error + * @returns `boolean` indicating an error or not + */ + hasError(): boolean; + } + + /** makes it possible to attach script events given by a sequence of {@link ScriptEventDescriptor} structures to a given interface. */ + interface XEventAttacher extends uno.XInterface { + /** + * registers the given "AllListener" object as a listener at the given interface by creating a suitable listener adapter and calling the "addListener" + * method corresponding to the "ListenerType". + */ + attachListener(xTarget: uno.XInterface, xAllListener: XAllListener, aHelper: any, aListenerType: string, aAddListenerParam: string): lang.XEventListener; + + /** + * registers an object as a listener at the given interface by creating a suitable listener adapter and calling the method which corresponds to the + * listener type. + * + * Only the event corresponding to the given event method will be delegated to **xAllListener** . + */ + attachSingleEventListener(xTarget: uno.XInterface, xAllListener: XAllListener, aHelper: any, aListenerType: string, aAddListenerParam: string, aEventMethod: string): lang.XEventListener; + + /** + * removes a listener object as a listener from the given interface. + * + * This method can and should be used as a contrary method to the two attach methods. + */ + removeListener(xTarget: uno.XInterface, aListenerType: string, aRemoveListenerParam: string, xToRemoveListener: lang.XEventListener): void; + } + + interface XEventAttacher2 extends XEventAttacher { + /** + * Register a multiple set of listeners listening for the same target. Besides passing multiple listeners, the behavior of this method is identical to + * that of {@link attachSingleEventListener()} . + * @see com.sun.star.script.XEventAttacher.attachSingleEventListener + */ + attachMultipleEventListeners(xTarget: uno.XInterface, aListeners: LibreOffice.SeqEquiv): SafeArray; + } + + /** registers listeners for specified events. */ + interface XEventAttacherManager extends uno.XInterface { + /** + * adds an {@link XScriptListener} that will be notified when an event takes place. For that a {@link ScriptEventDescriptor} is registered at and + * attached to an object by an {@link XEventAttacherManager} . + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + * @see removeScriptListener + */ + addScriptListener(xListener: XScriptListener): void; + + /** + * attaches all the ScriptEvents which are registered for the given index to the given object. + * + * Exceptions of type {@link com.sun.star.beans.IntrospectionException} and {@link com.sun.star.script.CannotCreateAdapterException} that can be thrown + * by methods of {@link XEventAttacher} are caught and ignored. + */ + attach(nIndex: number, xObject: uno.XInterface, aHelper: any): void; + + /** + * detaches all the ScriptEvents from the given object which are registered at this object for the given index. + * + * Exceptions of type {@link com.sun.star.beans.IntrospectionException} and {@link com.sun.star.script.CannotCreateAdapterException} that can be thrown + * by methods of {@link XEventAttacher} are caught and ignored. + */ + detach(nIndex: number, xObject: uno.XInterface): void; + + /** + * @param Index an index previously inserted with the method insertEntry. + * @returns all events registered for the given object index. + * @throws IllegalArgumentException if Index is not valid. + */ + getScriptEvents(Index: number): SafeArray; + + /** + * creates an empty entry at the given position. + * + * The index **n** of all entries with `n >= nIndex` will be increased by one. + */ + insertEntry(nIndex: number): void; + + /** + * registers one event for an object identified by its index. + * + * If any object is attached under this index, then this event is attached automatically. + * + * Exceptions of type {@link com.sun.star.beans.IntrospectionException} and {@link com.sun.star.script.CannotCreateAdapterException} that can be thrown + * by methods of {@link XEventAttacher} are caught and ignored. + */ + registerScriptEvent(nIndex: number, aScriptEvent: ScriptEventDescriptor): void; + + /** + * registers several events for an object identified by its index. + * + * The result is the same as if the method {@link registerScriptEvent()} was called once for each {@link ScriptEventDescriptor} in the sequence. + * + * If any object is attached under this index, then this event is attached automatically (see {@link attach()} ) + * + * Exceptions of type {@link com.sun.star.beans.IntrospectionException} and {@link com.sun.star.script.CannotCreateAdapterException} that can be thrown + * by methods of {@link XEventAttacher} are caught and ignored. + * @see registerScriptEvent + * @see attach + */ + registerScriptEvents(nIndex: number, aScriptEvents: LibreOffice.SeqEquiv): void; + + /** + * removes the entry at the given position. + * + * If any events are registered at this index, they will be revoked, too. So if the events at this index have been attached to any object they are + * detached automatically. (see {@link attach()} ). + * @see attach + */ + removeEntry(nIndex: number): void; + + /** + * removes a {@link XScriptListener} from the listener list. + * + * Nothing happens if the listener is not registered. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + * @see addScriptListener + */ + removeScriptListener(Listener: XScriptListener): void; + + /** + * revokes the registration of an event. + * + * The parameters **ListenerType** and **EventMethod** are equivalent to the first two members of the {@link ScriptEventDescriptor} used to register + * events. If this event at this index has been attached to any object, it is detached automatically (see {@link attach()} ). + * + * Exceptions of type {@link com.sun.star.beans.IntrospectionException} and {@link com.sun.star.script.CannotCreateAdapterException} that can be thrown + * by methods of {@link XEventAttacher} are caught and ignored. + * @see attach + */ + revokeScriptEvent(nIndex: number, aListenerType: string, aEventMethod: string, aRemoveListenerParam: string): void; + + /** + * revokes all events which are registered for the given index. + * + * If the events at this index have been attached to any object, they are detached automatically. (see {@link attach()} ). + * @see attach + */ + revokeScriptEvents(nIndex: number): void; + } + + /** + * gives access to an object's methods and properties. Container access is available through {@link com.sun.star.container.XIndexContainer} , {@link + * com.sun.star.container.XNameContainer} and {@link com.sun.star.container.XEnumerationAccess} . + */ + interface XInvocation extends uno.XInterface { + /** returns the introspection from this object or `NULL` if the object does not provide this information. */ + getIntrospection(): beans.XIntrospectionAccess; + + /** + * returns the value of the property with the specified name. + * @param aPropertyName specifies the name of the property. + */ + getValue(aPropertyName: string): any; + + /** + * returns `TRUE` if the method with the specified name exists, else `FALSE` . + * + * This optimizes the calling sequence ( {@link XInvocation.hasMethod()} , {@link XInvocation.invoke()} )! + * @@param aName specifies the name of the method. + */ + hasMethod(aName: string): boolean; + + /** + * returns `TRUE` if the property with the specified name exists, else `FALSE` .

+ * + * PoolConnections are handled by the connection pool. + * + *

+ * + *

+ * + * When the method + * + * com::sun::star::sdbc::XPooledConnection::getConnection() + * + * is called, the PooledConnection returns the connection which is pooled. + * + *

+ * @@see com::sun::star::sdbc::XConnection + */ + interface XPooledConnection extends uno.XInterface { + /** + * return the connection which is pooled + * @returns the pooled {@link Connection} object + * @throws SQLException if a database access error occurs. + */ + readonly Connection: XConnection; + + /** + * return the connection which is pooled + * @returns the pooled {@link Connection} object + * @throws SQLException if a database access error occurs. + */ + getConnection(): XConnection; + } + + /** + * is used for batch execution on PreparedStatements. + * + * A {@link com.sun.star.sdbc.PreparedStatement} uses one precompiled SQL {@link Statement} . In batch execution it is possible to set collection of + * parameter settings, which are executed in one batch job. + */ + interface XPreparedBatchExecution extends uno.XInterface { + /** + * adds a set of parameters to the batch. + * @throws SQLException if a database access error occurs. + */ + addBatch(): void; + + /** + * makes the set of commands in the current batch empty. + * @throws SQLException if a database access error occurs. + */ + clearBatch(): void; + + /** + * submits a batch of commands to the database for execution. + * @returns an array of update counts containing one element for each command in the batch. The array is ordered according to the order in which commands wer + * @throws SQLException if a database access error occurs. + */ + executeBatch(): SafeArray; + } + + /** + * provides the possibility of executing a precompiled SQL statement. + * + * A SQL statement is pre-compiled and stored in a {@link PreparedStatement} object. This object can then be used to efficiently execute this statement + * multiple times. + */ + interface XPreparedStatement extends uno.XInterface { + /** + * returns the {@link com.sun.star.sdbc.Connection} object that produced this {@link com.sun.star.sdbc.Statement} object. + * @returns the {@link Connection} object + * @throws SQLException if a database access error occurs. + */ + readonly Connection: XConnection; + + /** + * executes any kind of SQL statement. + * + * Some prepared statements return multiple results; the execute method handles these complex statements as well as the simpler form of statements + * handled by executeQuery and executeUpdate. + * @returns `TRUE` if successful + * @throws SQLException if a database access error occurs. + */ + execute(): boolean; + + /** + * executes the SQL query in this `PreparedStatement` object and returns the result set generated by the query. + * @returns the {@link ResultSet} object + * @throws SQLException if a database access error occurs. + */ + executeQuery(): XResultSet; + + /** + * executes the SQL INSERT, UPDATE or DELETE statement in this {@link com.sun.star.sdbc.PreparedStatement} object. ; In addition, SQL statements that + * return nothing, such as SQL DDL statements, can be executed. + * @returns either the row count for INSERT, UPDATE or DELETE statements; or 0 for SQL statements that return nothing + * @throws SQLException if a database access error occurs. + */ + executeUpdate(): number; + + /** + * returns the {@link com.sun.star.sdbc.Connection} object that produced this {@link com.sun.star.sdbc.Statement} object. + * @returns the {@link Connection} object + * @throws SQLException if a database access error occurs. + */ + getConnection(): XConnection; + } + + /** + * is the reference to a SQL structured type value in the database. A Ref can be saved to persistent storage. A Ref is dereferenced by passing it as a + * parameter to a SQL statement and executing the statement. + */ + interface XRef extends uno.XInterface { + /** + * gets the fully-qualified SQL structured type name of the referenced item. + * @returns the base type name + * @throws SQLException if a database access error occurs. + */ + readonly BaseTypeName: string; + + /** + * gets the fully-qualified SQL structured type name of the referenced item. + * @returns the base type name + * @throws SQLException if a database access error occurs. + */ + getBaseTypeName(): string; + } + + /** + * provides the navigation on a table of data. A {@link com.sun.star.sdbc.ResultSet} object is usually generated by executing a {@link + * com.sun.star.sdbc.Statement} . + * + * A {@link ResultSet} maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The "next" method + * moves the cursor to the next row. + */ + interface XResultSet extends uno.XInterface { + /** + * moves the cursor to the given row number in the result set. + * + * If the row number is positive, the cursor moves to the given row number with respect to the beginning of the result set. The first row is row 1, the + * second is row 2, and so on. + * + * If the given row number is negative, the cursor moves to an absolute row position with respect to the end of the result set. For example, calling + * `absolute(-1)` positions the cursor on the last row, `absolute(-2)` indicates the next-to-last row, and so on. + * + * An attempt to position the cursor beyond the first/last row in the result set leaves the cursor before/after the first/last row, respectively. + * + * Note: Calling `absolute(1)` is the same as calling {@link com.sun.star.sdbc.XResultSet.first()} . Calling `moveToPosition(-1)` is the same as calling + * `moveToLast()` . + */ + absolute(row: number): boolean; + + /** + * moves the cursor to the end of the result set, just after the last row. Has no effect if the result set contains no rows. + * @throws SQLException if a database access error occurs. + */ + afterLast(): void; + + /** + * moves the cursor to the front of the result set, just before the first row. Has no effect if the result set contains no rows. + * @throws SQLException if a database access error occurs. + */ + beforeFirst(): void; + + /** + * moves the cursor to the first row in the result set. + * @returns `TRUE` if successful + * @throws SQLException if a database access error occurs. + */ + first(): boolean; + + /** + * retrieves the current row number. The first row is number 1, the second number 2, and so on. + * @returns the current position + * @throws SQLException if a database access error occurs. + */ + getRow(): number; + + /** + * returns the {@link Statement} that produced this {@link com.sun.star.sdbc.ResultSet} object. If the result set was generated some other way, such as + * by an {@link com.sun.star.sdbc.XDatabaseMetaData} method, this method returns `NULL` . + * @returns the statement object + * @throws SQLException if a database access error occurs. + */ + getStatement(): uno.XInterface; + + /** + * indicates whether the cursor is after the last row in the result set. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + isAfterLast(): boolean; + + /** + * indicates whether the cursor is before the first row in the result set. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + isBeforeFirst(): boolean; + + /** + * indicates whether the cursor is on the first row of the result set. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + isFirst(): boolean; + + /** + * indicates whether the cursor is on the last row of the result set. + * + * ** Note: ** Calling the method `isAtLast` may be expensive because the SDBC driver might need to fetch ahead one row in order to determine whether the + * current row is the last row in the result set. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + isLast(): boolean; + + /** + * moves the cursor to the last row in the result set. + * @returns `TRUE` if successful + * @throws SQLException if a database access error occurs. + */ + last(): boolean; + + /** + * moves the cursor down one row from its current position. + * + * A {@link ResultSet} cursor is initially positioned before the first row; the first call to next makes the first row the current row; the second call + * makes the second row the current row, and so on. + * + * If an input stream is open for the current row, a call to the method `next` will implicitly close it. The {@link ResultSet} 's warning chain is + * cleared when a new row is read. + * @returns `TRUE` if successful + * @throws SQLException if a database access error occurs. + */ + next(): boolean; + + /** + * moves the cursor to the previous row in the result set. + * + * Note: `previous()` is not the same as `relative(-1)` because it makes sense to call `previous()` when there is no current row. + * @returns `TRUE` if successful + * @throws SQLException if a database access error occurs. + */ + previous(): boolean; + + /** + * refreshes the current row with its most recent value in the database. Cannot be called when on the insert row. The `refreshRow` method provides a way + * for an application to explicitly tell the SDBC driver to refetch a row(s) from the database. An application may want to call `refreshRow` when caching + * or prefetching is being done by the SDBC driver to fetch the latest value of a row from the database. The SDBC driver may actually refresh multiple + * rows at once if the fetch size is greater than one. All values are refetched subject to the transaction isolation level and cursor sensitivity. If + * `refreshRow` is called after calling `updateXXX` , but before calling com::sun::star::sdbc::XResultSet::updateRow() , then the updates made to the row + * are lost. Calling the method `refreshRow` frequently will likely slow performance. + * @throws SQLException if a database access error occurs. + */ + refreshRow(): void; + + /** + * moves the cursor a relative number of rows, either positive or negative. + * + * Attempting to move beyond the first/last row in the result set positions the cursor before/after the first/last row. Calling `relative(0)` is valid, + * but does not change the cursor position. + * + * Note: Calling `relative(1)` is different from calling {@link com.sun.star.sdbc.XResultSet.next()} because is makes sense to call `next()` when there + * is no current row, for example, when the cursor is positioned before the first row or after the last row of the result set. + * @param rows how many rows should be moved relative to the current row + * @returns `TRUE` if successful + * @throws SQLException if a database access error occurs. + */ + relative(rows: number): boolean; + + /** + * retrieves the current row number. The first row is number 1, the second number 2, and so on. + * @returns the current position + * @throws SQLException if a database access error occurs. + */ + readonly Row: number; + + /** + * indicates whether a row has been deleted. A deleted row may leave a visible "hole" in a result set. This method can be used to detect holes in a + * result set. The value returned depends on whether or not the result set can detect deletions. + * @returns `TRUE` if successful + * @throws SQLException if a database access error occurs. + */ + rowDeleted(): boolean; + + /** + * indicates whether the current row has had an insertion. The value returned depends on whether or not the result set can detect visible inserts. + * @returns `TRUE` if successful + * @throws SQLException if a database access error occurs. + */ + rowInserted(): boolean; + + /** + * indicates whether the current row has been updated. The value returned depends on whether or not the result set can detect updates. + * @returns `TRUE` if successful + * @throws SQLException if a database access error occurs. + */ + rowUpdated(): boolean; + + /** + * returns the {@link Statement} that produced this {@link com.sun.star.sdbc.ResultSet} object. If the result set was generated some other way, such as + * by an {@link com.sun.star.sdbc.XDatabaseMetaData} method, this method returns `NULL` . + * @returns the statement object + * @throws SQLException if a database access error occurs. + */ + readonly Statement: uno.XInterface; + } + + /** can be used to find out about the types and properties of the columns in a {@link ResultSet} . */ + interface XResultSetMetaData extends uno.XInterface { + /** + * returns the number of columns in this {@link ResultSet} . + * @returns the column count + * @throws SQLException if a database access error occurs. + */ + readonly ColumnCount: number; + + /** + * gets a column's table's catalog name. + * @param column the first column is 1, the second is 2, + * @returns the catalog name + * @throws SQLException if a database access error occurs. + */ + getCatalogName(column: number): string; + + /** + * returns the number of columns in this {@link ResultSet} . + * @returns the column count + * @throws SQLException if a database access error occurs. + */ + getColumnCount(): number; + + /** + * indicates the column's normal max width in chars. + * @param column the first column is 1, the second is 2, + * @returns the normal maximum number of characters allowed as the width of the designated column + * @throws SQLException if a database access error occurs. + */ + getColumnDisplaySize(column: number): number; + + /** + * gets the suggested column title for use in printouts and displays. + * @param column the first column is 1, the second is 2, + * @returns the suggested column title + * @throws SQLException if a database access error occurs. + */ + getColumnLabel(column: number): string; + + /** + * gets a column's name. + * @param column the first column is 1, the second is 2, + * @returns the column name + * @throws SQLException if a database access error occurs. + */ + getColumnName(column: number): string; + + /** + * returns the fully-qualified name of the service whose instances are manufactured if the method {@link com.sun.star.sdbc.XResultSet} ::.getObject() is + * called to retrieve a value from the column. + * @param column the first column is 1, the second is 2, + * @returns the service name + * @throws SQLException if a database access error occurs. + */ + getColumnServiceName(column: number): string; + + /** + * retrieves a column's SQL type. + * @param column the first column is 1, the second is 2, + * @returns the column type + * @throws SQLException if a database access error occurs. + */ + getColumnType(column: number): number; + + /** + * retrieves a column's database-specific type name. + * @param column the first column is 1, the second is 2, + * @returns the type name + * @throws SQLException if a database access error occurs. + */ + getColumnTypeName(column: number): string; + + /** + * gets a column's number of decimal digits. + * @param column the first column is 1, the second is 2, + * @returns precision + * @throws SQLException if a database access error occurs. + */ + getPrecision(column: number): number; + + /** + * gets a column's number of digits to right of the decimal point. + * @param column the first column is 1, the second is 2, + * @returns scale + * @throws SQLException if a database access error occurs. + */ + getScale(column: number): number; + + /** + * gets a column's table's schema. + * @param column the first column is 1, the second is 2, + * @returns the schema name + * @throws SQLException if a database access error occurs. + */ + getSchemaName(column: number): string; + + /** + * gets a column's table name. + * @param column the first column is 1, the second is 2, + * @returns the table name + * @throws SQLException if a database access error occurs. + */ + getTableName(column: number): string; + + /** + * indicates whether the column is automatically numbered, thus read-only. + * @param column the first column is 1, the second is 2, + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + isAutoIncrement(column: number): boolean; + + /** + * indicates whether a column's case matters. + * @param column the first column is 1, the second is 2, + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + isCaseSensitive(column: number): boolean; + + /** + * indicates whether the column is a cash value. + * @param column the first column is 1, the second is 2, + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + isCurrency(column: number): boolean; + + /** + * indicates whether a write on the column will definitely succeed. + * @param column the first column is 1, the second is 2, + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + isDefinitelyWritable(column: number): boolean; + + /** + * indicates the nullability of values in the designated column. + * @param column the first column is 1, the second is 2, + * @returns `TRUE` if so + * @see com.sun.star.sdbc.ColumnValue + * @throws SQLException if a database access error occurs. + */ + isNullable(column: number): number; + + /** + * indicates whether a column is definitely not writable. + * @param column the first column is 1, the second is 2, + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + isReadOnly(column: number): boolean; + + /** + * indicates whether the column can be used in a where clause. + * @param column the first column is 1, the second is 2, + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + isSearchable(column: number): boolean; + + /** + * indicates whether values in the column are signed numbers. + * @param column the first column is 1, the second is 2, + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + isSigned(column: number): boolean; + + /** + * indicates whether it is possible for a write on the column to succeed. + * @param column the first column is 1, the second is 2, + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + isWritable(column: number): boolean; + } + + /** + * provides access to the meta data of a result set. + * + * The number, types, and properties of a {@link ResultSet} 's columns are provided by the {@link com.sun.star.sdbc.XResultSetMetaData} interface + * returned by the {@link com.sun.star.sdbc.XResultSetMetaDataSupplier.getMetaData()} method. + */ + interface XResultSetMetaDataSupplier extends uno.XInterface { + /** + * retrieves the number, types, and properties of a {@link ResultSet} 's columns. + * @returns the meta data of the {@link ResultSet} . + * @throws SQLException if a database access error occurs. + */ + getMetaData(): XResultSetMetaData; + + /** + * retrieves the number, types, and properties of a {@link ResultSet} 's columns. + * @returns the meta data of the {@link ResultSet} . + * @throws SQLException if a database access error occurs. + */ + readonly MetaData: XResultSetMetaData; + } + + /** provides the possibility to write changes made on a result set back to database. */ + interface XResultSetUpdate extends uno.XInterface { + /** + * cancels the updates made to a row. + * + * This method may be called after calling an `updateXXX` method(s) and before calling {@link com.sun.star.sdbc.XResultSetUpdate.updateRow()} to rollback + * the updates made to a row. If no updates have been made or `updateRow` has already been called, then this method has no effect. + * @throws SQLException if a database access error occurs. + */ + cancelRowUpdates(): void; + + /** + * deletes the current row from the result set and the underlying database. Cannot be called when on the insert row. + * @throws SQLException if a database access error occurs. + */ + deleteRow(): void; + + /** + * inserts the contents of the insert row into the result set and the database. Must be on the insert row when this method is called. + * @throws SQLException if a database access error occurs. + */ + insertRow(): void; + + /** + * moves the cursor to the remembered cursor position, usually the current row. This method has no effect if the cursor is not on the insert row. + * @throws SQLException if a database access error occurs. + */ + moveToCurrentRow(): void; + + /** + * moves the cursor to the insert row. The current cursor position is remembered while the cursor is positioned on the insert row. + * + * The insert row is a special row associated with an updatable result set. It is essentially a buffer where a new row may be constructed by calling the + * `updateXXX` methods prior to inserting the row into the result set. + * + * Only the `updateXXX` , `getXXX` , and {@link com.sun.star.sdbc.XResultSetUpdate.insertRow()} methods may be called when the cursor is on the insert + * row. All of the columns in a result set must be given a value each time this method is called before calling `insertRow` . The method `updateXXX` must + * be called before a `getXXX` method can be called on a column value. + * @throws SQLException if a database access error occurs. + */ + moveToInsertRow(): void; + + /** + * updates the underlying database with the new contents of the current row. Cannot be called when on the insert row. + * @throws SQLException if a database access error occurs. + */ + updateRow(): void; + } + + /** is used to access data which is collected in a row. All methods raise a {@link com.sun.star.sdbc.SQLException} if a database access error occurs. */ + interface XRow extends uno.XInterface { + /** + * gets a SQL ARRAY value from the current row of this `ResultSet` object. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getArray(columnIndex: number): XArray; + + /** + * gets the value of a column in the current row as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is + * particularly suitable for retrieving large LONGVARBINARY values. + * + * **Note:** All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly + * closes the stream. Also, a stream may return 0 when the method {@link com.sun.star.io.XInputStream.available()} is called whether there is data + * available or not. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getBinaryStream(columnIndex: number): io.XInputStream; + + /** + * gets a BLOB value in the current row. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getBlob(columnIndex: number): XBlob; + + /** + * gets the value of a column in the current row as boolean. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getBoolean(columnIndex: number): boolean; + + /** + * get the value of a column in the current row as a byte. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getByte(columnIndex: number): number; + + /** + * gets the value of a column in the current row as a byte array. The bytes represent the raw values returned by the driver. + * @param columnIndex the first column is 1, the second is 2, ... + * @returns the column value; if the value is SQL NULL, the result is empty. + * @throws SQLException if a database access error occurs. + */ + getBytes(columnIndex: number): SafeArray; + + /** + * gets the value of a column in the current row as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is + * particularly suitable for retrieving large LONGVARBINARY or LONGVARCHAR values. + * + * **Note:** All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly + * closes the stream. Also, a stream may return 0 when the method {@link com.sun.star.io.XInputStream.available()} is called whether there is data + * available or not. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getCharacterStream(columnIndex: number): io.XInputStream; + + /** + * gets a CLOB value in the current row of this `ResultSet` object. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getClob(columnIndex: number): XClob; + + /** + * gets the value of a column in the current row as a date object. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getDate(columnIndex: number): util.Date; + + /** + * gets the value of a column in the current row as a double. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getDouble(columnIndex: number): number; + + /** + * gets the value of a column in the current row as a float. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getFloat(columnIndex: number): number; + + /** + * get the value of a column in the current row as an integer. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getInt(columnIndex: number): number; + + /** + * get the value of a column in the current row as a long. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getLong(columnIndex: number): number; + + /** + * returns the value of a column in the current row as an object. This method uses the given `Map` object for the custom mapping of the SQL structure or + * distinct type that is being retrieved. + * @param columnIndex the first column is 1, the second is 2, + * @param typeMap the map of types which should be used to get the column value + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getObject(columnIndex: number, typeMap: container.XNameAccess): any; + + /** + * gets a REF(<structured-type>) column value from the current row. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getRef(columnIndex: number): XRef; + + /** + * gets the value of a column in the current row as a short. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getShort(columnIndex: number): number; + + /** + * gets the value of a column in the current row as a string. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getString(columnIndex: number): string; + + /** + * gets the value of a column in the current row as a time object. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getTime(columnIndex: number): util.Time; + + /** + * gets the value of a column in the current row as a datetime object. + * @param columnIndex the first column is 1, the second is 2, + * @returns the column value; if the value is SQL NULL, the result is null + * @throws SQLException if a database access error occurs. + */ + getTimestamp(columnIndex: number): util.DateTime; + + /** + * reports whether the last column read had a value of SQL NULL. Note that you must first call getXXX on a column to try to read its value and then call + * {@link wasNull()} to see if the value read was SQL NULL. + * @returns `TRUE` if last column read was SQL NULL and `FALSE` otherwise + * @throws SQLException if a database access error occurs. + */ + wasNull(): boolean; + } + + /** + * enhances the functionality of a result set. It allows implementation of a special behavior for a result set and notifies an application on certain row + * set events such as a change in its value. + * + * The {@link XRowSet} interface is unique in that it is intended to be a software layer on top of an SDBC driver. Implementations of the {@link RowSet} + * interface can be provided by anyone. + */ + interface XRowSet extends XResultSet { + /** + * adds the specified listener to receive the events "cursorMoved", "rowChanged", and "rowSetChanged". + * @param listener the listener which should be registered + */ + addRowSetListener(listener: XRowSetListener): void; + + /** + * populates a row set with data. The description of the data source and other important information for filling the row set with data. + * @throws SQLException if a database access error occurs. + */ + execute(): void; + + /** + * removes the specified listener. + * @param listener the listener which should be registered + */ + removeRowSetListener(listener: XRowSetListener): void; + } + + /** is used for receiving "cursorMoved", "rowChanged", and "rowSetChanged" events posted by, for example, a row set. */ + interface XRowSetListener extends lang.XEventListener { + /** + * is called when a row set's cursor is moved. + * @param event contains information about the event + */ + cursorMoved(event: lang.EventObject): void; + + /** + * is called when a row is inserted, updated, or deleted. + * @deprecated Deprecated + * @param event contains information about the event + * @see com.sun.star.sdb.XRowsChangeListener + */ + rowChanged(event: lang.EventObject): void; + + /** + * is called when the row set has changed, or in other words, when the row set has been reexecuted. + * @param event contains information about the event + */ + rowSetChanged(event: lang.EventObject): void; + } + + /** is used to update data which is collected in a row. */ + interface XRowUpdate extends uno.XInterface { + /** + * updates a column with a stream value. + * @param columnIndex the position of the column + * @param x the new column value + * @param length how much data should be read out of the stream + * @throws SQLException if a database access error occurs. + */ + updateBinaryStream(columnIndex: number, x: io.XInputStream, length: number): void; + + /** + * updates a column with a boolean value. + * @param columnIndex the position of the column + * @param x the new column value + * @throws SQLException if a database access error occurs. + */ + updateBoolean(columnIndex: number, x: boolean): void; + + /** + * updates a column with a byte value. + * @param columnIndex the position of the column + * @param x the new column value + * @throws SQLException if a database access error occurs. + */ + updateByte(columnIndex: number, x: number): void; + + /** + * updates a column with a byte array value. + * @param columnIndex the position of the column + * @param x the new column value + * @throws SQLException if a database access error occurs. + */ + updateBytes(columnIndex: number, x: LibreOffice.SeqEquiv): void; + + /** + * updates a column with a stream value. + * @param columnIndex the position of the column + * @param x the new column value + * @param length how much data should be read out of the stream + * @throws SQLException if a database access error occurs. + */ + updateCharacterStream(columnIndex: number, x: io.XInputStream, length: number): void; + + /** + * updates a column with a date value. + * @param columnIndex the position of the column + * @param x the new column value + * @throws SQLException if a database access error occurs. + */ + updateDate(columnIndex: number, x: util.Date): void; + + /** + * updates a column with a double value. + * @param columnIndex the position of the column + * @param x the new column value + * @throws SQLException if a database access error occurs. + */ + updateDouble(columnIndex: number, x: number): void; + + /** + * updates a column with a float value. + * @param columnIndex the position of the column + * @param x the new column value + * @throws SQLException if a database access error occurs. + */ + updateFloat(columnIndex: number, x: number): void; + + /** + * updates a column with an long value. + * @param columnIndex the position of the column + * @param x the new column value + * @throws SQLException if a database access error occurs. + */ + updateInt(columnIndex: number, x: number): void; + + /** + * updates a column with a hyper value. + * @param columnIndex the position of the column + * @param x the new column value + * @throws SQLException if a database access error occurs. + */ + updateLong(columnIndex: number, x: number): void; + + /** + * gives a nullable column a null value. + * @param columnIndex the position of the column + * @throws SQLException if a database access error occurs. + */ + updateNull(columnIndex: number): void; + + /** + * updates a column with an object value. + * @param columnIndex the position of the column + * @param x the new column value + * @param scale defines the scale which should be used to write the numeric value + * @throws SQLException if a database access error occurs. + */ + updateNumericObject(columnIndex: number, x: any, scale: number): void; + + /** + * updates a column with an object value. + * @param columnIndex the position of the column + * @param x the new column value + * @throws SQLException if a database access error occurs. + */ + updateObject(columnIndex: number, x: any): void; + + /** + * updates a column with a short value. + * @param columnIndex the position of the column + * @param x the new column value + * @throws SQLException if a database access error occurs. + */ + updateShort(columnIndex: number, x: number): void; + + /** + * updates a column with a string value. + * @param columnIndex the position of the column + * @param x the new column value + * @throws SQLException if a database access error occurs. + */ + updateString(columnIndex: number, x: string): void; + + /** + * updates a column with a time value. + * @param columnIndex the position of the column + * @param x the new column value + * @throws SQLException if a database access error occurs. + */ + updateTime(columnIndex: number, x: util.Time): void; + + /** + * updates a column with a timestamp value. + * @param columnIndex the position of the column + * @param x the new column value + * @throws SQLException if a database access error occurs. + */ + updateTimestamp(columnIndex: number, x: util.DateTime): void; + } + + /** + * is used for the custom mapping of SQL user-defined types. + * + * This interface must be implemented by a service that is registered in a type mapping. It is expected that this interface will normally be implemented + * by a tool. The methods in this interface are called by the driver and are never called by a programmer directly. + */ + interface XSQLData extends uno.XInterface { + /** + * returns the fully-qualified name of the SQL user-defined type that this object represents. + * + * This method is called by the SDBC driver to get the name of the UDT instance that is being mapped to this instance of SQLData. + * @returns the name of the SQL type. + * @throws SQLException if a database access error occurs. + */ + getSQLTypeName(): string; + + /** + * populates this object with data read from the database. + * + * The implementation of the method must follow this protocol: ; It must read each of the attributes or elements of the SQL type from the given input + * stream. This is done by calling a method of the input stream to read each item, in the order that they appear in the SQL definition of the type. The + * method `readSQL` then assigns the data to appropriate fields or elements (of this or other objects). ; Specifically, it must call the appropriate + * `XSQLInput.readXXX` method(s) to do the following: for a Distinct Type, read its single data element; for a Structured Type, read a value for each + * attribute of the SQL type. + * + * The SDBC driver initializes the input stream with a type map before calling this method, which is used by the appropriate `SQLInput.readXXX` method on + * the stream. + * @param stream the input SQL data stream + * @param typeName the SQL type of the value on the data stream + * @see com.sun.star.sdbc.XSQLInput + * @throws SQLException if a database access error occurs. + */ + readSQL(stream: XSQLInput, typeName: string): void; + + /** + * returns the fully-qualified name of the SQL user-defined type that this object represents. + * + * This method is called by the SDBC driver to get the name of the UDT instance that is being mapped to this instance of SQLData. + * @returns the name of the SQL type. + * @throws SQLException if a database access error occurs. + */ + readonly SQLTypeName: string; + + /** + * writes this object to the given SQL data stream. + * + * The implementation of the method must follow this protocol: ; It must write each of the attributes of the SQL type to the given output stream. This + * is done by calling a method of the output stream to write each item, in the order that they appear in the SQL definition of the type. Specifically, it + * must call the appropriate `XSQLOutput.writeXXX` method(s) to do the following: ; for a Distinct Type, write its single data element; for a Structured + * Type, write a value for each attribute of the SQL type. + * @param stream the output SQL data stream + * @see com.sun.star.sdbc.XSQLOutput + * @throws SQLException if a database access error occurs. + */ + writeSQL(stream: XSQLOutput): void; + } + + /** + * represents an input stream that contains a stream of values representing an instance of a SQL structured or distinct type. + * + * This interface, used only for custom mapping, is used by the driver behind the scenes, and a programmer never directly invokes `SQLInput` methods. + * + * When the method `getObject` is called with an object of a service implementing the interface `SQLData` , the SDBC driver calls the method + * com::sun::star::sdbc::XSQLData::getSQLType() to determine the SQL type of the user-defined type (UDT) being custom mapped. The driver creates an + * instance of {@link com.sun.star.sdbc.XSQLInput} , populating it with the attributes of the UDT. The driver then passes the input stream to the method + * {@link com.sun.star.sdbc.XSQLData.readSQL()} , which in turn calls the `XSQLInput.readXXX` methods in its implementation for reading the attributes + * from the input stream. + */ + interface XSQLInput extends uno.XInterface { + /** + * reads an array from the stream. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readArray(): XArray; + + /** + * reads the next attribute in the stream as sequence of bytes. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readBinaryStream(): io.XInputStream; + + /** + * reads a BLOB from the stream. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readBlob(): XBlob; + + /** + * reads the next attribute in the stream as boolean. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readBoolean(): boolean; + + /** + * reads the next attribute in the stream as byte. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readByte(): number; + + /** + * reads the next attribute in the stream as sequence of bytes. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readBytes(): SafeArray; + + /** + * reads the next attribute in the stream as a Unicode string. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readCharacterStream(): io.XInputStream; + + /** + * reads a CLOB from the stream. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readClob(): XClob; + + /** + * reads the next attribute in the stream as date. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readDate(): util.Date; + + /** + * reads the next attribute in the stream as double. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readDouble(): number; + + /** + * reads the next attribute in the stream as float. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readFloat(): number; + + /** + * reads the next attribute in the stream as long. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readInt(): number; + + /** + * reads the next attribute in the stream as hyper. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readLong(): number; + + /** + * returns the datum at the head of the stream as an any. + * + * The actual type of the any returned is determined by the default type mapping, and any customizations present in this stream's type map. + * + * ; A type map is registered with the stream by the SDBC driver before the stream is passed to the application. + * + * ; When the datum at the head of the stream is a SQL NULL, the method returns `VOID` . If the datum is a SQL structured or distinct type, it + * determines the SQL type of the datum at the head of the stream, constructs an object of the appropriate service, and calls the method {@link + * com.sun.star.sdbc.XSQLData.readSQL()} on that object, which reads additional data from the stream using the protocol described for that method. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readObject(): any; + + /** + * reads a REF(<structured-type>) from the stream. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readRef(): XRef; + + /** + * reads the next attribute in the stream as short. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readShort(): number; + + /** + * reads the next attribute in the stream as string. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readString(): string; + + /** + * reads the next attribute in the stream as time. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readTime(): util.Time; + + /** + * reads the next attribute in the stream as datetime. + * @returns the attribute; if the value is SQL NULL, return null. + * @throws SQLException if a database access error occurs. + */ + readTimestamp(): util.DateTime; + + /** + * determines whether the last value read was null. + * @returns `TRUE` if the most recently gotten SQL value was null; otherwise, `FALSE` + * @throws SQLException if a database access error occurs. + */ + wasNull(): boolean; + } + + /** + * is used as an output stream for writing the attributes of a user-defined type back to the database. This interface, used only for custom mapping, is + * used by the driver, and its methods are never directly invoked by a programmer. + * + * When an object of a class implementing interface {@link com.sun.star.sdbc.XSQLData} is passed as an argument to a SQL statement, the JDBC driver calls + * com::sun::star::sdbc::SQLData::getSQLType() to determine the kind of SQL datum being passed to the database. ; The driver then creates an instance of + * `XSQLOutput` and passes it to the method {@link com.sun.star.sdbc.XSQLData.writeSQL()} . The method `writeSQL` in turn calls the appropriate + * `XSQLOutput.writeXXX` methods to write data from the {@link com.sun.star.sdbc.XSQLData} object to the `XSQLOutput` output stream as the representation + * of a SQL user-defined type. + */ + interface XSQLOutput extends uno.XInterface { + /** + * writes an array to the stream. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeArray(x: XArray): void; + + /** + * writes the next attribute to the stream as a stream of uninterpreted bytes. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeBinaryStream(x: io.XInputStream): void; + + /** + * writes a BLOB to the stream. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeBlob(x: XBlob): void; + + /** + * writes the next attribute to the stream as boolean. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeBoolean(x: boolean): void; + + /** + * writes the next attribute to the stream as byte. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeByte(x: number): void; + + /** + * writes the next attribute to the stream as byte sequence. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeBytes(x: LibreOffice.SeqEquiv): void; + + /** + * writes the next attribute to the stream as a stream of Unicode string. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeCharacterStream(x: io.XInputStream): void; + + /** + * writes a CLOB to the stream. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeClob(x: XClob): void; + + /** + * writes the next attribute to the stream as a date. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeDate(x: util.Date): void; + + /** + * writes the next attribute to the stream as double. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeDouble(x: number): void; + + /** + * writes the next attribute to the stream as float. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeFloat(x: number): void; + + /** + * writes the next attribute to the stream as long. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeInt(x: number): void; + + /** + * writes the next attribute to the stream as hyper. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeLong(x: number): void; + + /** + * writes to the stream the data contained in the given `XSQLData` object. + * + * When the `XSQLData` object is `NULL` , this method writes an SQL NULL to the stream. Otherwise, it calls the {@link + * com.sun.star.sdbc.XSQLData.writeSQL()} method of the given object, which writes the object's attributes to the stream. The implementation of the + * method `XSQLData::writeSQL()` calls the appropriate `XSQLOutput.writeXXX` method(s) for writing each of the object's attributes in order. ; The + * attributes must be read from an {@link com.sun.star.sdbc.XSQLInput} input stream and written to an `XSQLOutput` output stream in the same order in + * which they were listed in the SQL definition of the user-defined type. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeObject(x: XSQLData): void; + + /** + * writes a REF(<structured-type>) to the stream. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeRef(x: XRef): void; + + /** + * writes the next attribute to the stream as short. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeShort(x: number): void; + + /** + * writes the next attribute to the stream as a string. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeString(x: string): void; + + /** + * writes a structured-type to the stream. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeStruct(x: XStruct): void; + + /** + * writes the next attribute to the stream as a time. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeTime(x: util.Time): void; + + /** + * writes the next attribute to the stream as a datetime. + * @param x the value to pass to the database. + * @throws SQLException if a database access error occurs. + */ + writeTimestamp(x: util.DateTime): void; + } + + /** + * is used for executing a static SQL statement and obtaining the results produced by it. + * + * Only one {@link ResultSet} per {@link Statement} can be open at any point in time; therefore, if the reading of one {@link ResultSet} is interleaved + * with the reading of another, each must have been generated by different Statements. All statement `execute` methods implicitly close a statement's + * current {@link ResultSet} if an open one exists. + */ + interface XStatement extends uno.XInterface { + /** + * returns the {@link com.sun.star.sdbc.Connection} object that produced this `Statement` object. + * @returns the connection that produced this statement + * @throws SQLException if a database access error occurs. + */ + readonly Connection: XConnection; + + /** + * executes a SQL statement that may return multiple results. + * + * Under some (uncommon) situations a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you + * are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string. The + * navigation through multiple results is covered by {@link com.sun.star.sdbc.XMultipleResults} . + * + * The `execute` method executes a SQL statement and indicates the form of the first result. You can then use {@link + * com.sun.star.sdbc.XMultipleResults.getResultSet()} or {@link com.sun.star.sdbc.XMultipleResults.getUpdateCount()} to retrieve the result, and {@link + * com.sun.star.sdbc.XMultipleResults.getMoreResults()} to move to any subsequent result(s). + * @param sql any SQL statement + * @returns `TRUE` if the next result is a {@link ResultSet} ; `FALSE` if it is an update count or there are no more results + * @throws SQLException if a database access error occurs. + */ + execute(sql: string): boolean; + + /** + * executes a SQL statement that returns a single {@link ResultSet} . + * @param sql the SQL statement which should be executed + * @returns a {@link ResultSet} that contains the data produced by the query; never `NULL` + * @throws SQLException if a database access error occurs. + */ + executeQuery(sql: string): XResultSet; + + /** + * executes an SQL INSERT, UPDATE, or DELETE statement. In addition, SQL statements that return nothing, such as SQL DDL statements, can be executed. + * @param sql a SQL INSERT, UPDATE or DELETE statement or a SQL statement that returns nothing + * @returns either the row count for INSERT, UPDATE or DELETE or 0 for SQL statements that return nothing + * @throws SQLException if a database access error occurs. + */ + executeUpdate(sql: string): number; + + /** + * returns the {@link com.sun.star.sdbc.Connection} object that produced this `Statement` object. + * @returns the connection that produced this statement + * @throws SQLException if a database access error occurs. + */ + getConnection(): XConnection; + } + + /** + * is used for the standard mapping for a SQL structured type. + * + * A `Struct` object contains a value for each attribute of the SQL structured type that it represents. By default, an instance of `Struct` is valid as + * long as the application has a reference to it. + */ + interface XStruct extends uno.XInterface { + /** + * produces the ordered values of the attributes of the SQL structured type that this `Struct` object represents. + * + * This method uses the given type map for customizations of the type mappings. If there is no entry in the given type map that matches or the given type + * map is `NULL` , the structured type that this `Struct` object represents, the driver uses the connection type mapping. + * @param typeMap is a map object that contains mappings of SQL type names to services. If the `typeMap` is `NULL` , the type-map associated with the conne + * @returns an array containing the ordered attribute values. + * @throws SQLException if a database access error occurs. + */ + getAttributes(typeMap: container.XNameAccess): SafeArray; + + /** + * retrieves the SQL type name of the SQL structured type that this `Struct` object represents. + * @returns the name of the SQL type. + * @throws SQLException if a database access error occurs. + */ + getSQLTypeName(): string; + + /** + * retrieves the SQL type name of the SQL structured type that this `Struct` object represents. + * @returns the name of the SQL type. + * @throws SQLException if a database access error occurs. + */ + readonly SQLTypeName: string; + } + + /** + * should be implemented of objects which may report warnings or non critical errors. + * @see com.sun.star.sdbc.SQLWarning + */ + interface XWarningsSupplier extends uno.XInterface { + /** + * clears all warnings reported for the object implementing the interface. After a call to this method, the method {@link + * com.sun.star.sdbc.XWarningsSupplier.getWarnings()} returns `VOID` until a new warning is reported for the object. + * @throws SQLException if a database access error occurs. + */ + clearWarnings(): void; + + /** + * returns the first warning reported by calls on an object that supports the usage of warnings. + * + * **Note:** Subsequent warnings will be chained to this {@link com.sun.star.sdbc.SQLWarning} . + * @returns the warnings + * @throws SQLException if a database access error occurs. + */ + getWarnings(): any; + + /** + * returns the first warning reported by calls on an object that supports the usage of warnings. + * + * **Note:** Subsequent warnings will be chained to this {@link com.sun.star.sdbc.SQLWarning} . + * @returns the warnings + * @throws SQLException if a database access error occurs. + */ + readonly Warnings: any; + } + + namespace BestRowScope { + const enum Constants { + SESSION = 2, + TEMPORARY = 0, + TRANSACTION = 1, + } + } + + namespace BestRowType { + const enum Constants { + NOT_PSEUDO = 1, + PSEUDO = 2, + UNKNOWN = 0, + } + } + + namespace ChangeAction { + const enum Constants { + DELETE = 3, + INSERT = 1, + UNDO = 4, + UPDATE = 2, + } + } + + namespace ColumnSearch { + const enum Constants { + BASIC = 2, + CHAR = 1, + FULL = 3, + NONE = 0, + } + } + + namespace ColumnType { + const enum Constants { + NOT_PSEUDO = 1, + PSEUDO = 2, + UNKNOWN = 0, + } + } + + namespace ColumnValue { + const enum Constants { + NO_NULLS = 0, + NULLABLE = 1, + NULLABLE_UNKNOWN = 2, + } + } + + namespace DataType { + const enum Constants { + ARRAY = 2003, + BIGINT = -5, + BINARY = -2, + BIT = -7, + BLOB = 2004, + BOOLEAN = 16, + CHAR = 1, + CLOB = 2005, + DATE = 91, + DECIMAL = 3, + DISTINCT = 2001, + DOUBLE = 8, + FLOAT = 6, + INTEGER = 4, + LONGVARBINARY = -4, + LONGVARCHAR = -1, + NUMERIC = 2, + OBJECT = 2000, + OTHER = 1111, + REAL = 7, + REF = 2006, + SMALLINT = 5, + SQLNULL = 0, + STRUCT = 2002, + TIME = 92, + TIMESTAMP = 93, + TINYINT = -6, + VARBINARY = -3, + VARCHAR = 12, + } + } + + namespace Deferrability { + const enum Constants { + INITIALLY_DEFERRED = 5, + INITIALLY_IMMEDIATE = 6, + NONE = 7, + } + } + + namespace FetchDirection { + const enum Constants { + FORWARD = 1000, + REVERSE = 1001, + UNKNOWN = 1002, + } + } + + namespace IndexType { + const enum Constants { + CLUSTERED = 1, + HASHED = 2, + OTHER = 3, + STATISTIC = 0, + } + } + + namespace KeyRule { + const enum Constants { + CASCADE = 0, + NO_ACTION = 3, + RESTRICT = 1, + SET_DEFAULT = 4, + SET_NULL = 2, + } + } + + namespace ProcedureColumn { + const enum Constants { + IN = 1, + INOUT = 2, + OUT = 4, + RESULT = 3, + RETURN = 5, + UNKNOWN = 0, + } + } + + namespace ProcedureResult { + const enum Constants { + NONE = 1, + RETURN = 2, + UNKNOWN = 0, + } + } + + namespace ResultSetConcurrency { + const enum Constants { + READ_ONLY = 1007, + UPDATABLE = 1008, + } + } + + namespace ResultSetType { + const enum Constants { + FORWARD_ONLY = 1003, + SCROLL_INSENSITIVE = 1004, + SCROLL_SENSITIVE = 1005, + } + } + + namespace TransactionIsolation { + const enum Constants { + NONE = 0, + READ_COMMITTED = 2, + READ_UNCOMMITTED = 1, + REPEATABLE_READ = 4, + SERIALIZABLE = 8, + } + } + } + + namespace sdbcx { + /** describes the common properties of a database column. */ + interface Column extends XDataDescriptorFactory, beans.XPropertySet { + /** keeps a default value for a column, is provided as string. */ + DefaultValue: string; + + /** keeps a description of the object. */ + Description: string; + + /** + * indicates whether the column is automatically numbered, thus read-only. + * @see com.sun.star.sdbc.ColumnValue + */ + IsAutoIncrement: boolean; + + /** indicates whether the column is a cash value. */ + IsCurrency: boolean; + + /** + * indicates the nullability of values in the designated column. + * @see com.sun.star.sdbc.ColumnValue + */ + IsNullable: number; + + /** indicates that the column contains some kind of time or date stamp used to track updates. */ + IsRowVersion: boolean; + + /** is the name of the column. */ + Name: string; + + /** gets a column's number of decimal digits. */ + Precision: number; + + /** gets a column's number of digits to right of the decimal point. */ + Scale: number; + + /** is the {@link com.sun.star.sdbc.DataType} of the column. */ + Type: number; + + /** + * is the type name used by the database. If the column type is a user-defined type, then a fully-qualified type name is returned. ** Note: ** May be + * empty. + */ + TypeName: string; + } + + /** + * describes the common properties of a database column. Could be used for the creation of a database columns within a table. + * @see com.sun.star.sdbcx.Column + * @see com.sun.star.sdbcx.Table + */ + interface ColumnDescriptor extends Descriptor { + /** specifies how to create an auto-increment column. */ + AutoIncrementCreation: string; + + /** keeps a default value for a column, is provided as string. */ + DefaultValue: string; + + /** keeps a description of the object. */ + Description: string; + + /** + * indicates whether the column is automatically numbered, thus read-only. + * @see com.sun.star.sdbc.ColumnValue + */ + IsAutoIncrement: boolean; + + /** + * indicates the nullability of values in the designated column. + * @see com.sun.star.sdbc.ColumnValue + */ + IsNullable: number; + + /** indicates that the column contains some kind of time or date stamp used to track updates. */ + IsRowVersion: boolean; + + /** gets a column's number of decimal digits. */ + Precision: number; + + /** gets a column's number of digits to right of the decimal point. */ + Scale: number; + + /** is the {@link com.sun.star.sdbc.DataType} of the column. */ + Type: number; + + /** is the type name used by the database. If the column type is a user-defined type, then a fully-qualified type name is returned. May be empty. */ + TypeName: string; + } + + /** + * describes every container which is used for data definition. Each container must support access to its elements by the element's name or by the + * element's position. + * + * Simple enumeration must be supported as well. + * + * To reflect the changes with the underlying database, a refresh mechanism needs to be supported. + * + * A container may support the possibility to add new elements or to drop existing elements. Additions are always done by descriptors which define the + * properties of the new element. + */ + interface Container extends container.XNameAccess, container.XIndexAccess, container.XEnumerationAccess, util.XRefreshable, XDataDescriptorFactory, XAppend, XDrop { } + + /** + * could be used as an extension for performing data definition tasks on databases, and to control the access rights on database objects. + * + * It may be implemented by a database driver provider, to encapsulate the complexity of data definition, and to give a common way for data definition as + * the DDL of most DBMS differs. + * + * At least, the access to the tables of a database should be implemented. The implementation of other known database objects like views is optional. + * + * To control the access rights of users, there is the possibility to implement objects like users and groups. + */ + interface DatabaseDefinition extends XTablesSupplier, XViewsSupplier, XUsersSupplier, XGroupsSupplier { } + + /** + * is used to create a new object within a database. + * + * A descriptor is commonly created by the container of a specific object, such as, tables or views. After the creation of the descriptor the properties + * have to be filled. Afterwards, you append the descriptor to the container and the container creates a new object based on the information of the + * descriptor. The descriptor can be used to create several objects. + * + * A descriptor contains at least the information of the name of an object. + * @see com.sun.star.sdbcx.XAppend + */ + interface Descriptor extends beans.XPropertySet { + /** is the name for the object to create. */ + Name: string; + } + + /** + * extends the service {@link com.sun.star.sdbc.Driver} by beans for data definition. + * + * This service is optional for each driver. Its purpose is to define a common way for database definition, as the DDL differs between most DBMS. + * + * Definition and deletion of database catalogs can't be defined in a common manner for DBMS, but it should be possible to hide much of the complexity of + * creation and deletion of catalogs. Each driver could provide methods to cover these tasks. + */ + interface Driver extends sdbc.Driver, XDataDefinitionSupplier, XCreateCatalog, XDropCatalog { } + + /** represents a group of users, which has certain access rights for the objects of the database. */ + interface Group extends XUsersSupplier, XAuthorizable, beans.XPropertySet { + /** is the name of the group. */ + Name: string; + } + + /** + * is used to create a new group in a database. + * @see com.sun.star.sdbcx.Group + */ + interface GroupDescriptor extends Descriptor { + /** is the name of the group. */ + Name: string; + } + + /** + * is used to specify the index for a database table. It refers to one or more columns of a table. + * + * ** Note: ** All properties and columns of an index could by modified before they are appended to a table. In that case the service is a data + * descriptor. + */ + interface Index extends XDataDescriptorFactory, XColumnsSupplier, beans.XPropertySet { + /** is the name of the index catalog, may be empty. */ + Catalog: string; + + /** indicates that the index is clustered. */ + IsClustered: boolean; + + /** indicates that the index is used for the primary key. */ + IsPrimaryKeyIndex: boolean; + + /** indicates that the index allow only unique values. */ + IsUnique: boolean; + + /** is the name of the index. */ + Name: string; + } + + /** adds a property to determine the sort order of the column values within the index. Some database drivers may ignore this property. */ + interface IndexColumn extends Column { + /** is the column sorted in ascending order. */ + IsAscending: boolean; + } + + /** adds a property to determine the sort order of the column values within the index. Some database drivers may ignore this property. */ + interface IndexColumnDescriptor extends Descriptor { + /** is the column sorted in ascending order. */ + IsAscending: boolean; + } + + /** + * is used to define a new index for a database table. + * @see com.sun.star.sdbcx.Index + */ + interface IndexDescriptor extends Descriptor, XColumnsSupplier { + /** is the name of the index catalog, may be empty. */ + Catalog: string; + + /** indicates that the index is clustered. */ + IsClustered: boolean; + + /** indicates that the index allow only unique values. */ + IsUnique: boolean; + } + + /** is used to define a new key for a table. */ + interface Key extends XDataDescriptorFactory, XColumnsSupplier, beans.XPropertySet { + /** + * is the rule which is applied for deletions; only used for foreign keys. + * @see com.sun.star.sdbc.KeyRule + */ + DeleteRule: number; + + /** is the name of the key */ + Name: string; + + /** is the name of the referenced table, only used for foreign keys. */ + ReferencedTable: string; + + /** + * indicates the type of the key. + * @see com.sun.star.sdbcx.KeyType + */ + Type: number; + + /** + * is the rule which is applied for updates; only used for foreign keys. + * @see com.sun.star.sdbc.KeyRule + */ + UpdateRule: number; + } + + /** adds a property to specify the referenced column. This is used to specify foreign keys. */ + interface KeyColumn extends Column { + /** is the name of a reference column out of the referenced table. */ + RelatedColumn: string; + } + + /** + * adds a property to specify the referenced column. This is used to specify foreign keys. + * @see com.sun.star.sdbcx.KeyColumn + */ + interface KeyColumnDescriptor extends Descriptor { + /** is the name of a reference column out of the referenced table. */ + RelatedColumn: string; + } + + /** + * is used to define a new key for a table. + * @see com.sun.star.sdbcx.Key + */ + interface KeyDescriptor extends Descriptor, XColumnsSupplier { + /** + * is the rule which is applied for deletions; only used for foreign keys. + * @see com.sun.star.sdbc.KeyRule + */ + DeleteRule: number; + + /** is the name of the referenced table, only used for foreign keys. */ + ReferencedTable: string; + + /** + * indicates the type of the key. + * @see com.sun.star.sdbcx.KeyType + */ + Type: number; + + /** + * is the rule which is applied for updates; only used for foreign keys. + * @see com.sun.star.sdbc.KeyRule + */ + UpdateRule: number; + } + + /** + * extends the definition of the service {@link com.sun.star.sdbc.PreparedStatement} with a flag for the usage of bookmarks. + * @see ResultSet + * @see XRowLocate + */ + interface PreparedStatement extends sdbc.PreparedStatement { + /** returns if a result set should allow the navigation with bookmarks or not. The default is `FALSE` . */ + UseBookmarks: boolean; + } + + /** adds a property to specify the referenced column. This is used to specify foreign keys. */ + interface ReferenceColumn extends Column { + /** is the name of a reference column out of the referenced table. */ + ReferencedColumn: string; + } + + /** extends the SDBC {@link ResultSet} by the possibility of bookmark positioning, canceling the positioning, and updating of rows. */ + interface ResultSet extends sdbc.ResultSet, util.XCancellable, XRowLocate, XDeleteRows { + /** + * returns whether the result set supports updating of newly inserted rows. This may not work, as the result set may contain automatic generated data + * which is used as key information. + */ + CanUpdateInsertedRows: boolean; + + /** returns if the result set supports bookmark navigation. */ + IsBookmarkable: boolean; + } + + /** + * extends the definition of the service {@link com.sun.star.sdbc.Statement} with a flag for the usage of bookmarks. + * @see ResultSet + * @see XRowLocate + */ + interface Statement extends sdbc.Statement { + /** returns `TRUE` if a result set should allow navigation with bookmarks or not. The default is `FALSE` . */ + UseBookmarks: boolean; + } + + /** + * used to specify a table in a database. A table is described by its name and one or more columns. + * + * In addition, it may contain indexes to improve the performance in the retrieval of the table's data and keys, and to define semantic rules for the + * table. + * + * ** Note: ** All properties and columns of a table could by modified before it is appended to a database. In that case, the service is in fact a + * descriptor. On existing tables, a user might alter columns, add or delete columns, indexes, and keys depending on the capabilities of the database and + * on the user's privileges. + * @see com.sun.star.sdbc.XDatabaseMetaData + * @see com.sun.star.sdbcx.Privilege + */ + interface Table extends XDataDescriptorFactory, XColumnsSupplier, XIndexesSupplier, XKeysSupplier, XRename, XAlterTable, beans.XPropertySet { + /** is the name of the table catalog. */ + CatalogName: string; + + /** supplies a comment on the table. Could be empty, if not supported by the driver. */ + Description: string; + + /** is the name of the table. */ + Name: string; + + /** is the name of the table schema. */ + SchemaName: string; + + /** indicates the type of the table like (TABLE, VIEW, SYSTEM TABLE). Could be empty, if not supported by the driver. */ + Type: string; + } + + /** + * is used to define a table of a database. A table is described by its name and one or more columns and the keys for semantic rules. + * + * In addition, it may contain keys, and to define semantic rules for the table. ** Note: ** Indexes can only be appended when the table is already + * appended at the database. + * @see com.sun.star.sdbcx.Table + */ + interface TableDescriptor extends XColumnsSupplier, XKeysSupplier, Descriptor { + /** is the name of the table catalog. */ + CatalogName: string; + + /** supplies a comment on the table, Could be empty if not supported by the driver. */ + Description: string; + + /** is the name of the table schema. */ + SchemaName: string; + } + + /** represents a user of the database, who has certain access rights for the objects of the database. */ + interface User extends XUser, XGroupsSupplier, beans.XPropertySet { + /** is the name of the user. */ + Name: string; + } + + /** + * is used to create a new user in a database. + * @see com.sun.star.sdbcx.User + */ + interface UserDescriptor extends Descriptor { + /** is the password for the user. */ + Password: string; + } + + /** + * is used to specify views on data. A view object is only used for creation and deletion. Inspecting the command of a view is normally not supported. + * + * If a view is going to be added to a database, the view must have a unique name within the view and the table container, as it can be used like a + * table. ** Note: ** After addition, both the containers for views and the container for tables must contain an element for the view. + */ + interface View extends XRename, beans.XPropertySet, XAlterView { + /** is the name of the views catalog, may be empty. */ + CatalogName: string; + + /** + * indicates if a check option should be used for the view. + * @see com.sun.star.sdbcx.CheckOption + */ + CheckOption: number; + + /** + * is the command for creating the view. + * + * This is typically a SQL Select-Statement. + * + * This property might be empty when a backend does not support retrieving the current SQL command of a view. However, if the `View` supports altering + * its command via the {@link XAlterView} interface, then it's required to also provide the current SQL command in the `Command` property. + */ + Command: string; + + /** is the name of the view. */ + Name: string; + + /** is the name of the view's schema, may be empty. */ + SchemaName: string; + } + + /** + * is used to define a new view for a database. + * @see com.sun.star.sdbcx.View + */ + interface ViewDescriptor extends Descriptor { + /** is the name of the views catalog, may be empty. */ + CatalogName: string; + + /** + * indicates if a check option should be used for the view. + * @see com.sun.star.sdbcx.CheckOption + */ + CheckOption: number; + + /** is the command for creating the view. After appending a view to its container, the command may be empty. This is typically a SQL Select-Statement. */ + Command: string; + + /** is the name of the views schema, may be empty. */ + SchemaName: string; + } + + /** is used for creating and appending new objects to a specific container. */ + interface XAlterTable extends uno.XInterface { + /** + * is intended to alter an existing column identified by its position. This operation must be atomic, in that it is done in one step.s + * @param index the position of the column to alter + * @param descriptor the new descriptor for the new column + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + * @throws com::sun::star::lang::IndexOutOfBoundsException if the given index does not denote an existing column. + */ + alterColumnByIndex(index: number, descriptor: beans.XPropertySet): void; + + /** + * is intended to alter an existing column identified by its name. This operation must be atomic, in that it is done in one step.s + * @param colName the column name which to alter + * @param descriptor the new descriptor for the new column + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + alterColumnByName(colName: string, descriptor: beans.XPropertySet): void; + } + + /** + * implements the possibility to alter aspects of a view's definition + * @since OOo 2.4 + */ + interface XAlterView { + /** + * changes the command which constitutes the view + * + * The operation should be atomic. + * @param NewCommand the new command which the view should be based on. Usually an `SELECT` statement. + * @throws com::sun::star::sdbc::SQLException if an error occurs + */ + alterCommand(NewCommand: string): void; + } + + /** is used for creating and appending new objects to a specific container. */ + interface XAppend extends uno.XInterface { + /** + * creates a new object using the given descriptor and appends it to the related container. ** Note: ** The descriptor will not be changed and can be + * used again to append another object. + * @param descriptor the descriptor which should be serve to append a new object + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + appendByDescriptor(descriptor: beans.XPropertySet): void; + } + + /** + * is used for accessing and setting the permissions of a user for a database object. + * @see com.sun.star.sdbcx.PrivilegeObject + * @see com.sun.star.sdbcx.Privilege + */ + interface XAuthorizable extends uno.XInterface { + /** + * retrieves the permissions for a specific object, which could be granted to other users and groups. + * @param objName the name of the object + * @param objType a value of {@link com.sun.star.sdbcx.PrivilegeObject} + * @returns the grant privileges + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getGrantablePrivileges(objName: string, objType: number): number; + + /** + * retrieves the permissions for a specific object. + * @param objName the name of the object + * @param objType a value of {@link com.sun.star.sdbcx.PrivilegeObject} + * @returns the privileges + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getPrivileges(objName: string, objType: number): number; + + /** + * adds additional permissions for a specific object. + * @param objName the name of the object + * @param objType a value from the {@link com.sun.star.sdbcx.PrivilegeObject} constants group + * @param objPrivileges a value from the {@link com.sun.star.sdbcx.Privilege} constants group + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + grantPrivileges(objName: string, objType: number, objPrivileges: number): void; + + /** + * removes permissions for a specific object from a group or user. + * @param objName the name of the object + * @param objType a value from the {@link com.sun.star.sdbcx.PrivilegeObject} constants group + * @param objPrivileges a value from the {@link com.sun.star.sdbcx.Privilege} constants group + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + revokePrivileges(objName: string, objType: number, objPrivileges: number): void; + } + + /** provides the access to a container of columns, typically used for tables and indexes. */ + interface XColumnsSupplier extends uno.XInterface { + /** + * returns the container of columns. + * @returns the columns + */ + readonly Columns: container.XNameAccess; + + /** + * returns the container of columns. + * @returns the columns + */ + getColumns(): container.XNameAccess; + } + + /** may be implemented to hide the complexity of creating a database catalog. */ + interface XCreateCatalog extends uno.XInterface { + /** + * creates the catalog by using a sequence of property values. The kind of properties depends on the provider. + * @param info driver specific information + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + createCatalog(info: LibreOffice.SeqEquiv): void; + } + + /** provides the access to data definition beans from a connected database. */ + interface XDataDefinitionSupplier extends uno.XInterface { + /** + * returns at least the container of tables related to the given connection. + * @param connection the related connection + * @returns the container + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getDataDefinitionByConnection(connection: sdbc.XConnection): XTablesSupplier; + + /** + * returns at least the container of tables related to the given Database URL. + * @param url a database url of the form sdbc:subprotocol:subname + * @param info a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included + * @returns the container + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getDataDefinitionByURL(url: string, info: LibreOffice.SeqEquiv): XTablesSupplier; + } + + /** provides the creation of a descriptor for a definition object. */ + interface XDataDescriptorFactory extends uno.XInterface { + /** + * returns a descriptor of a definition object. + * @returns the descriptor for that kind of objects + */ + createDataDescriptor(): beans.XPropertySet; + } + + /** provides for the deletion of more than one row at a time. */ + interface XDeleteRows extends uno.XInterface { + /** + * deletes one or more rows identified by their bookmarks. + * @param rows list of bookmarks identifying the rows. + * @returns an array of update counts containing one element for each row. The array is ordered according to the order in which bookmarks were given. + * @throws com::sun::star::sdbc::SQLException if a fatal error occurs, for instance, the connection gets lost if bookmarks are used which do not belong to t + */ + deleteRows(rows: LibreOffice.SeqEquiv): SafeArray; + } + + /** provides methods to remove an element of its container and to drop it from the related database. */ + interface XDrop extends uno.XInterface { + /** + * drops an object of the related container identified by its position. + * @param index the position of the element to be dropped + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + dropByIndex(index: number): void; + + /** + * drops an object of the related container identified by its name. + * @param elementName the name of the element to be dropped + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + dropByName(elementName: string): void; + } + + /** + * may be implemented to hide the complexity of dropping a database catalog. Could normally be used only in offline mode, no connection on the database. + * This should be checked by the driver. + */ + interface XDropCatalog extends uno.XInterface { + /** + * drops a catalog identified by its name. + * @param catalogName the catalog name + * @param info driver specific information + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + dropCatalog(catalogName: string, info: LibreOffice.SeqEquiv): void; + } + + /** provides for access to a container of groups, typically used for a database definition object. */ + interface XGroupsSupplier extends uno.XInterface { + /** + * returns the container of groups. + * @returns the groups + */ + getGroups(): container.XNameAccess; + + /** + * returns the container of groups. + * @returns the groups + */ + readonly Groups: container.XNameAccess; + } + + /** provides for access to a container of indexes, typically used for a table definition object. */ + interface XIndexesSupplier extends uno.XInterface { + /** + * returns the container of indexes. + * @returns the indexes + */ + getIndexes(): container.XNameAccess; + + /** + * returns the container of indexes. + * @returns the indexes + */ + readonly Indexes: container.XNameAccess; + } + + /** provides for access to a container of keys, typically used for a table definition object. */ + interface XKeysSupplier extends uno.XInterface { + /** + * returns the container of keys. + * @returns the keys + */ + getKeys(): container.XIndexAccess; + + /** + * returns the container of keys. + * @returns the keys + */ + readonly Keys: container.XIndexAccess; + } + + /** + * supports the renaming of definition objects. ; + * + * This is a very desirable feature which is not supported by all databases. There is no standard SQL statement provided for this feature. + */ + interface XRename extends uno.XInterface { + /** + * is intended to alter the name of a object. + * @param newName the new name + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + rename(newName: string): void; + } + + /** + * is used to identify rows within a result set and to find rows by a bookmark. + * + * Bookmarks are only valid in the scope of the current result set and are not interchangeable between result sets. A bookmark could be a complex data + * structure, so it could not be compared in a safe way. Because of that, a provider has to implement the compare method for bookmarks. + */ + interface XRowLocate extends uno.XInterface { + /** + * returns the bookmark of the current row of a result set. + * @returns the current bookmark + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + readonly Bookmark: any; + + /** + * compares two bookmarks and returns an indication of their relative values. + * + * The bookmarks must apply to the same {@link ResultSet} . You cannot reliably compare bookmarks from different ResultSets, even if they were created + * from the same source or statement. ; A bookmark that is not valid, or incorrectly formed, will cause an exception. + * @param first the first bookmark + * @param second the second bookmark + * @returns a value of {@link com.sun.star.sdbcx.CompareBookmark} + * @see com.sun.star.sdbcx.CompareBookmark + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + compareBookmarks(first: any, second: any): number; + + /** + * returns the bookmark of the current row of a result set. + * @returns the current bookmark + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getBookmark(): any; + + /** + * returns the hash value for a specified bookmark. + * @param bookmark the bookmark to hash + * @returns the hashed value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + hashBookmark(bookmark: any): number; + + /** + * determines whether the bookmarks of a result set are ordered or not. + * @returns `TRUE` if so + * @see com.sun.star.sdbcx.CompareBookmark + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + hasOrderedBookmarks(): boolean; + + /** + * moves the cursor a relative number of rows, either positive or negative starting at a given bookmark position. + * + * If the bookmark could not be located, a result set will be positioned after the last record. ; If the bookmark is invalid, or not generated by the + * current result set, then the behavior is not defined, even an abnormal termination is possible. + * @param bookmark the bookmark where to move + * @param rows count of rows move relative to the bookmark + * @returns `TRUE` if successful + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + moveRelativeToBookmark(bookmark: any, rows: number): boolean; + + /** + * moves the cursor to the row identified by an valid bookmark. + * + * If the bookmark could not be located, a result set will be positioned after the last record. ; If the bookmark is invalid, or not generated by the + * current result set, then the behavior is not defined, even an abnormal termination is possible. + * @param bookmark the bookmark where to move + * @returns `TRUE` if successful + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + moveToBookmark(bookmark: any): boolean; + } + + /** provides for access to a container of tables, typically used for a database definition object. */ + interface XTablesSupplier extends uno.XInterface { + /** + * returns the container of tables. + * @returns the tables + */ + getTables(): container.XNameAccess; + + /** + * returns the container of tables. + * @returns the tables + */ + readonly Tables: container.XNameAccess; + } + + /** allows for changing a users password. */ + interface XUser extends XAuthorizable { + /** + * allows modifying a user password. + * @param oldPassword the old password to be reset + * @param newPassword the new password + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + changePassword(oldPassword: string, newPassword: string): void; + } + + /** provides the access to a container of users, typically used for a database definition object. */ + interface XUsersSupplier extends uno.XInterface { + /** + * returns the container of users. + * @returns the users + */ + getUsers(): container.XNameAccess; + + /** + * returns the container of users. + * @returns the users + */ + readonly Users: container.XNameAccess; + } + + /** provides for access to a container of views, typically used for a database definition object. */ + interface XViewsSupplier extends uno.XInterface { + /** + * returns the container of views. + * @returns the views + */ + getViews(): container.XNameAccess; + + /** + * returns the container of views. + * @returns the views + */ + readonly Views: container.XNameAccess; + } + + namespace CheckOption { + const enum Constants { + CASCADE = 2, + LOCAL = 3, + NONE = 0, + } + } + + namespace CompareBookmark { + const enum Constants { + EQUAL = 0, + GREATER = 1, + LESS = -1, + NOT_COMPARABLE = 3, + NOT_EQUAL = 2, + } + } + + namespace KeyType { + const enum Constants { + FOREIGN = 3, + PRIMARY = 1, + UNIQUE = 2, + } + } + + namespace Privilege { + const enum Constants { + ALTER = 64, + CREATE = 32, + DELETE = 8, + DROP = 256, + INSERT = 2, + READ = 16, + REFERENCE = 128, + SELECT = 1, + UPDATE = 4, + } + } + + namespace PrivilegeObject { + const enum Constants { + COLUMN = 2, + TABLE = 0, + VIEW = 1, + } + } + } + + namespace security { + /** + * This meta service supports the {@link XAccessController} interface for checking security permissions. + * + * Also, it obviously has also to be ensured that the object is process-local to assure that permission checks are not corrupted via insecure + * inter-process communication. + * @since OOo 1.1.2 + */ + type AccessController = XAccessController; + + /** + * the service to be used for {@link XCertificateContainer} . + * @since OOo 2.3.1 + */ + type CertificateContainer = XCertificateContainer; + + type CertificateException = uno.SecurityException; + + type CryptographyException = uno.SecurityException; + + type EncryptionException = CryptographyException; + + type KeyException = uno.SecurityException; + + type NoPasswordException = uno.SecurityException; + + /** + * Service for getting sets of permissions reading from some persistent storage. + * @since OOo 1.1.2 + */ + type Policy = XPolicy; + + type SecurityInfrastructureException = uno.SecurityException; + + /** + * provides conversion services for Serial Numbers. + * + * An implementation of this service enables the conversion of certificate serial number to and from a string + * @since OOo 3.1 + */ + type SerialNumberAdapter = XSerialNumberAdapter; + + type SignatureException = CryptographyException; + + /** Constant definition of a certificate container status. */ + const enum CertificateContainerStatus { + /** The certificate was not found. */ + NOCERT = 0, + /** The certificate was found and is trusted. */ + TRUSTED = 1, + /** The certificate was found but is untrusted. */ + UNTRUSTED = 2, + } + + /** Constant definition of a certificate container status. */ + const enum ExtAltNameType { + /** Currently unsupported. */ + DIRECTORY_NAME = 3, + /** + * The entry contains a dns name. The value of {@link CertAltNameEntry} contains a OUString. + * @see com.sun.star.security.CertAltNameEntry + */ + DNS_NAME = 2, + /** Currently unsupported. */ + EDI_PARTY_NAME = 7, + /** + * The entry contains a ip address. The value of {@link CertAltNameEntry} contains a Sequence of sal_Int8. + * @see com.sun.star.security.CertAltNameEntry + */ + IP_ADDRESS = 5, + /** + * Cutomize name/value pair The value of {@link CertAltNameEntry} contains a NamedValue. + * @see com.sun.star.security.CertAltNameEntry + */ + OTHER_NAME = 0, + /** + * The entry contains a registered id. The value of {@link CertAltNameEntry} contains a OUString. + * @see com.sun.star.security.CertAltNameEntry + */ + REGISTERED_ID = 6, + /** + * The entry contains rfc822 name. The value of {@link CertAltNameEntry} contains a OUString. + * @see com.sun.star.security.CertAltNameEntry + */ + RFC822_NAME = 1, + /** + * The entry contains an url. The value of {@link CertAltNameEntry} contains a OUString. + * @see com.sun.star.security.CertAltNameEntry + */ + URL = 4, + /** Currently unsupported. */ + X400_ADDRESS = 8, + } + + /** + * Exception notifying a lacking permission to access data or execute code thus it is thrown if permission ought to be denied. + * @since OOo 1.1.2 + */ + interface AccessControlException extends uno.SecurityException { + /** lacking permission. */ + LackingPermission: any; + } + + /** + * The {@link AllPermission} is a permission that implies all other permissions. + * @since OOo 1.1.2 + */ + interface AllPermission { + dummy: number; + } + + /** struct contains a single entry within a Subject Alternative Name Extension of a X509 certificate. */ + interface CertAltNameEntry { + /** + * defines the type of the value . With this information you can determine how to interprete the Any value. + * @see com.sun.star.security.ExtAltNameType + */ + Type: ExtAltNameType; + + /** stores the value of entry. */ + Value: any; + } + + /** Service of {@link DocumentDigitalSignatures} */ + interface DocumentDigitalSignatures extends XDocumentDigitalSignatures { + createDefault(): void; + + /** @param ODFVersion the version of the signature */ + createWithVersion(ODFVersion: string): void; + + /** + * @param ODFVersion the version of the signature + * @param HasValidDocumentSignature indicates if the document already contains a document signature. + */ + createWithVersionAndValidSignature(ODFVersion: string, HasValidDocumentSignature: boolean): void; + } + + /** + * Status of digital signatures in a document. + * + * This structure has the information about a digital signature in a document, and the status if the signature is valid. + */ + interface DocumentSignatureInformation { + CertificateStatus: number; + PartialDocumentSignature: boolean; + SignatureDate: number; + SignatureIsValid: boolean; + SignatureTime: number; + Signer: XCertificate; + } + + /** + * This permission grants runtime access to some named functionality. A {@link RuntimePermission} contains a name (also referred to as a "target name") + * but no actions list; you either have the named permission or you don't. + * @since OOo 1.1.2 + */ + interface RuntimePermission { + /** name of permission */ + Name: string; + } + + /** + * An {@link XAccessControlContext} is used to make system resource access decisions based on the context it encapsulates. + * + * More specifically, it encapsulates a context and has methods to check permissions equivalent to {@link XAccessController} interface, with one + * difference: The {@link XAccessControlContext} makes access decisions based on the context it encapsulates, rather than that of the current execution + * thread. + * @since OOo 1.1.2 + */ + interface XAccessControlContext extends uno.XInterface { + /** + * Determines whether the access request indicated by the specified permission should be allowed or denied, based on this context. The semantics are + * equivalent to the security permission classes of the Java platform. + * + * You can also pass a sequence of permissions (sequence< any >) to check a set of permissions, e.g. for performance reasons. This method quietly returns + * if the access request is permitted, or throws a suitable {@link AccessControlException} otherwise. + * @param perm permission to be checked + * @see com.sun.star.security.AccessControlException + * @see com.sun.star.security.AllPermission + * @see com.sun.star.security.RuntimePermission + * @see com.sun.star.io.FilePermission + * @see com.sun.star.connection.SocketPermission + * @throws AccessControlException thrown if access is denied + */ + checkPermission(perm: any): void; + } + + /** + * Interface for checking permissions and invoking privileged or restricted actions. + * @since OOo 1.1.2 + */ + interface XAccessController extends uno.XInterface { + /** + * Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in + * effect. The semantics are equivalent to the security permission classes of the Java platform. + * + * You can also pass a sequence of permissions (sequence< any >) to check a set of permissions, e.g. for performance reasons. This method quietly returns + * if the access request is permitted, or throws a suitable {@link AccessControlException} otherwise. + * @param perm permission to be checked + * @see com.sun.star.security.AccessControlException + * @see com.sun.star.security.AllPermission + * @see com.sun.star.security.RuntimePermission + * @see com.sun.star.io.FilePermission + * @see com.sun.star.connection.SocketPermission + * @throws AccessControlException thrown if access is denied + */ + checkPermission(perm: any): void; + + /** + * This method takes a "snapshot" of the current calling context and returns it. + * + * This context may then be checked at a later point, possibly in another thread. + * @returns snapshot of context + */ + readonly Context: XAccessControlContext; + + /** + * Perform the specified action adding a set of permissions defined by the given {@link XAccessControlContext} . The action is performed with the union + * of the permissions of the currently installed {@link XAccessControlContext} , the given {@link XAccessControlContext} and the security policy + * currently in effect. The latter includes static security, e.g. based on user credentials. + * + * If the given {@link XAccessControlContext} is null, then the action is performed **only** with the permissions of the security policy currently in + * effect. + * @param action action object to be executed + * @param restriction access control context to restrict permission; null for no restriction + * @returns result + * @throws com::sun::star::uno::Exception any UNO exception may be thrown + */ + doPrivileged(action: XAction, restriction: XAccessControlContext): any; + + /** + * Perform the specified action restricting permissions to the given {@link XAccessControlContext} . The action is performed with the intersection of the + * permissions of the currently installed {@link XAccessControlContext} , the given {@link XAccessControlContext} and the security policy currently in + * effect. The latter includes static security, e.g. based on user credentials. + * + * If the specified {@link XAccessControlContext} is null, then the action is performed with unmodified permissions, i.e. the call makes no sense. + * @param action action object to be executed + * @param restriction access control context to restrict permission; null for no restriction + * @returns result + * @throws com::sun::star::uno::Exception any UNO exception may be thrown + */ + doRestricted(action: XAction, restriction: XAccessControlContext): any; + + /** + * This method takes a "snapshot" of the current calling context and returns it. + * + * This context may then be checked at a later point, possibly in another thread. + * @returns snapshot of context + */ + getContext(): XAccessControlContext; + } + + /** + * Interface for running an action. + * @since OOo 1.1.2 + */ + interface XAction extends uno.XInterface { + /** + * Action to be done. + * @returns result + * @throws com::sun::star::uno::Exception any UNO exception may be thrown + */ + run(): any; + } + + /** + * Interface of a PKI Certificate + * + * This interface represents a x509 certificate. + */ + interface XCertificate extends uno.XInterface { + /** + * get the certificate usage. The return value is a set of bits, as defined in RFC3280 for the {@link KeyUsage} BIT STRING. Note the bit and byte order + * used in ASN.1, so for instance the bit dataEncipherment in {@link KeyUsage} , "bit 3", corresponds to CERT_DATA_ENCIPHERMENT_KEY_USAGE in Win32 and + * KU_DATA_ENCIPHERMENT in NSS, both with value 0x10. + */ + readonly CertificateUsage: number; + + /** the DER encoded form of the certificate */ + Encoded: SafeArray; + + /** all extensions of a certificate. */ + Extensions: SafeArray; + + /** Find a extension with a object identifier. */ + findCertificateExtension(oid: LibreOffice.SeqEquiv): XCertificateExtension; + + /** + * get the certificate usage. The return value is a set of bits, as defined in RFC3280 for the {@link KeyUsage} BIT STRING. Note the bit and byte order + * used in ASN.1, so for instance the bit dataEncipherment in {@link KeyUsage} , "bit 3", corresponds to CERT_DATA_ENCIPHERMENT_KEY_USAGE in Win32 and + * KU_DATA_ENCIPHERMENT in NSS, both with value 0x10. + */ + getCertificateUsage(): number; + + /** the issuer name attribute of the certificate. */ + IssuerName: string; + + /** the issuer unique ID attribute of the certificate. */ + IssuerUniqueID: SafeArray; + + /** the MD5 thumbprint */ + MD5Thumbprint: SafeArray; + + /** the validity NotAfter date attribute of the certificate. */ + NotValidAfter: util.DateTime; + + /** the validity NotBefore date attribute of the certificate. */ + NotValidBefore: util.DateTime; + + /** the serial number attribute of the certificate. */ + SerialNumber: SafeArray; + + /** the SHA-1 thumbprint */ + SHA1Thumbprint: SafeArray; + + /** the signature algorithm */ + SignatureAlgorithm: string; + + /** the subject name attribute of the certificate. */ + SubjectName: string; + + /** the algorithm of the subject public key */ + SubjectPublicKeyAlgorithm: string; + + /** the value of the subject public key */ + SubjectPublicKeyValue: SafeArray; + + /** the subject unique ID attribute of the certificate. */ + SubjectUniqueID: SafeArray; + + /** the version number attribute of the certificate. */ + Version: number; + } + + /** + * Manage user certificate for temporary connections. + * @see CertificateContainer + * @since OOo 2.3.1 + */ + interface XCertificateContainer { + /** + * Store the certificate in memory. + * @param url + * @param cert + * @param trust + * @returns boolean + */ + addCertificate(url: string, cert: string, trust: boolean): boolean; + + /** + * Check if a certificate was stored earlier before. + * @param url + * @param cert + * @returns CertificateContainerStatus + */ + hasCertificate(url: string, cert: string): CertificateContainerStatus; + } + + /** + * Interface of a PKI Certificate + * + * This interface represents a x509 certificate. + */ + interface XCertificateExtension extends uno.XInterface { + /** Get the extension object identifier in string. */ + ExtensionId: SafeArray; + + /** Get the extension value */ + ExtensionValue: SafeArray; + + /** Check whether it is a critical extension */ + isCritical(): boolean; + } + + /** + * interface for signing and verifying digital signatures in office documents + * + * This interface can be used to digitally sign different content in a office document. It can also be used to verify digital signatures. + */ + interface XDocumentDigitalSignatures extends uno.XInterface { + addAuthorToTrustedSources(Author: XCertificate): void; + addLocationToTrustedSources(Location: string): void; + + /** + * This method shows CertificateChooser dialog, used by document and PDF signing + * @since LibreOffice 5.3 + */ + chooseCertificate(Description: [string]): XCertificate; + + /** allows to get the default stream name for storing of the signature of the document content. */ + readonly DocumentContentSignatureDefaultStreamName: string; + + /** allows to get the default stream name for storing of the signature of the document content. */ + getDocumentContentSignatureDefaultStreamName(): string; + + /** allows to get the default stream name for storing of the signature of the package. */ + getPackageSignatureDefaultStreamName(): string; + + /** allows to get the default stream name for storing of the signature of the scripting content. */ + getScriptingContentSignatureDefaultStreamName(): string; + isAuthorTrusted(Author: XCertificate): boolean; + isLocationTrusted(Location: string): boolean; + + /** manages trusted sources (Authors and paths ) */ + manageTrustedSources(): void; + + /** allows to get the default stream name for storing of the signature of the package. */ + readonly PackageSignatureDefaultStreamName: string; + + /** allows to get the default stream name for storing of the signature of the scripting content. */ + readonly ScriptingContentSignatureDefaultStreamName: string; + showCertificate(Certificate: XCertificate): void; + + /** shows the digital signatures of the document content */ + showDocumentContentSignatures(xStorage: embed.XStorage, xSignInStream: io.XInputStream): void; + + /** shows the digital signatures of the package */ + showPackageSignatures(xStorage: embed.XStorage, xSignInStream: io.XInputStream): void; + + /** shows the digital signatures of the scripting content */ + showScriptingContentSignatures(xStorage: embed.XStorage, xSignInStream: io.XInputStream): void; + + /** + * signs the content of the document including text and pictures. + * + * Macros will not be signed. + */ + signDocumentContent(xStorage: embed.XStorage, xSignStream: io.XStream): boolean; + + /** signs the full Package, which means everything in the storage except the content of META-INF */ + signPackage(Storage: embed.XStorage, xSignStream: io.XStream): boolean; + + /** + * signs the content of the Scripting including macros and basic dialogs + * + * The rest of document content will not be signed. + */ + signScriptingContent(xStorage: embed.XStorage, xSignStream: io.XStream): boolean; + + /** + * checks for digital signatures and their status. + * + * Only document content will be checked. + */ + verifyDocumentContentSignatures(xStorage: embed.XStorage, xSignInStream: io.XInputStream): SafeArray; + + /** + * checks for digital signatures and their status. + * + * Only Package content will be checked. + */ + verifyPackageSignatures(Storage: embed.XStorage, xSignInStream: io.XInputStream): SafeArray; + + /** + * checks for digital signatures and their status. + * + * Only Scripting content will be checked. + */ + verifyScriptingContentSignatures(xStorage: embed.XStorage, xSignInStream: io.XInputStream): SafeArray; + } + + /** + * Interface for getting sets of permissions of a specified user or the default permissions if no user is given. + * @see com.sun.star.security.Policy + * @since OOo 1.1.2 + */ + interface XPolicy extends uno.XInterface { + /** + * Gets the default permissions granted to all users. + * @returns default permissions + */ + readonly DefaultPermissions: SafeArray; + + /** + * Gets the default permissions granted to all users. + * @returns default permissions + */ + getDefaultPermissions(): SafeArray; + + /** + * Gets the permissions of the specified user excluding the default permissions granted to all users. + * @param userId user id + * @returns permissions of the specified user + */ + getPermissions(userId: string): SafeArray; + + /** Refreshes the policy configuration. */ + refresh(): void; + } + + /** + * Interface of a X509 Subject Alternative Name Certificate Extension + * + * This interface represents a x509 certificate extension. + */ + interface XSanExtension extends XCertificateExtension { + /** Contains the alternative names of a certificate */ + AlternativeNames: SafeArray; + } + + /** + * Interface of Certificate Serial Number Converter + * + * This interface converts a certificate serial number to and from a string + */ + interface XSerialNumberAdapter extends uno.XInterface { + /** Convert the SerialNumber to a sequence */ + toSequence(SerialNumber: string): SafeArray; + + /** Convert the SerialNumber to a string */ + toString(SerialNumber: LibreOffice.SeqEquiv): string; + } + + namespace CertificateCharacters { + const enum Constants { + HAS_PRIVATE_KEY = 4, + SELF_SIGNED = 1, + } + } + + namespace CertificateValidity { + const enum Constants { + CHAIN_INCOMPLETE = 131072, + EXTENSION_INVALID = 128, + EXTENSION_UNKNOWN = 256, + INVALID = 1, + ISSUER_INVALID = 4096, + ISSUER_UNKNOWN = 512, + ISSUER_UNTRUSTED = 1024, + NOT_TIME_NESTED = 8, + REVOKED = 16, + ROOT_INVALID = 65536, + ROOT_UNKNOWN = 8192, + ROOT_UNTRUSTED = 16384, + SIGNATURE_INVALID = 64, + TIME_INVALID = 4, + UNKNOWN_REVOKATION = 32, + UNTRUSTED = 2, + VALID = 0, + } + } + + namespace KeyUsage { + const enum Constants { + CRL_SIGN = 2, + DATA_ENCIPHERMENT = 16, + DIGITAL_SIGNATURE = 128, + KEY_AGREEMENT = 8, + KEY_CERT_SIGN = 4, + KEY_ENCIPHERMENT = 32, + NON_REPUDIATION = 64, + } + } + } + + namespace setup { + /** @since LibreOffice 4.1 */ + type UpdateCheck = task.XJob; + + /** + * This was created from its places of use, so it may be incomplete. + * @since LibreOffice 4.1 + */ + type UpdateCheckConfig = container.XNameReplace; + } + + namespace sheet { + /** + * represents an enumeration of cell annotations in a spreadsheet document. + * @see com.sun.star.sheet.CellAnnotations + */ + type CellAnnotationsEnumeration = container.XEnumeration; + + /** + * represents the shape of a cell annotation object attached to a spreadsheet cell. + * @see com.sun.star.sheet.CellAnnotation + */ + type CellAnnotationShape = drawing.CaptionShape; + + /** + * represents an enumeration of cell area links. + * @see com.sun.star.sheet.CellAreaLink + */ + type CellAreaLinksEnumeration = container.XEnumeration; + + /** + * represents an enumeration of equal-formatted cell ranges. + * @see com.sun.star.sheet.CellFormatRanges + */ + type CellFormatRangesEnumeration = container.XEnumeration; + + /** + * represents a collection of used cells in a spreadsheet document. + * @see com.sun.star.sheet.SheetCell + */ + type Cells = container.XEnumerationAccess; + + /** + * represents an enumeration of spreadsheet cells. + * @see com.sun.star.sheet.Cells + */ + type CellsEnumeration = container.XEnumeration; + + /** + * contains all settings of a data consolidation in a spreadsheet document. + * @see com.sun.star.sheet.XConsolidatable + */ + type ConsolidationDescriptor = XConsolidationDescriptor; + + /** + * represents an enumeration of database ranges. + * @see com.sun.star.sheet.DatabaseRange + */ + type DatabaseRangesEnumeration = container.XEnumeration; + + /** + * represents an enumeration of members in a DataPilot field group. + * @see DataPilotFieldGroupItem + * @see DataPilotFieldGroup + */ + type DataPilotFieldGroupEnumeration = container.XEnumeration; + + /** + * represents the member in a data pilot field group. + * @see com.sun.star.sheet.DataPilotFieldGroup + */ + type DataPilotFieldGroupItem = container.XNamed; + + /** + * represents an enumeration of member groups in a DataPilot field. + * @see DataPilotFieldGroup + * @see DataPilotFieldGroups + */ + type DataPilotFieldGroupsEnumeration = container.XEnumeration; + + /** + * represents an enumeration of data pilot fields. + * @see com.sun.star.sheet.DataPilotField + */ + type DataPilotFieldsEnumeration = container.XEnumeration; + + /** + * represents an enumeration of data pilot items. + * @see com.sun.star.sheet.DataPilotItem + */ + type DataPilotItemsEnumeration = container.XEnumeration; + + /** + * represents the collection of dimensions in a data pilot source. + * @see com.sun.star.sheet.DataPilotSource + */ + type DataPilotSourceDimensions = container.XNameAccess; + + /** + * represents the collection of hierarchies in a data pilot source dimension. + * @see com.sun.star.sheet.DataPilotSourceDimension + * @see com.sun.star.sheet.DataPilotSource + */ + type DataPilotSourceHierarchies = container.XNameAccess; + + /** + * represents the collection of levels in a data pilot source hierarchy. + * @see com.sun.star.sheet.DataPilotSourceHierarchy + * @see com.sun.star.sheet.DataPilotSource + */ + type DataPilotSourceLevels = container.XNameAccess; + + /** + * represents the collection of members in a data pilot source level. + * @see com.sun.star.sheet.DataPilotSourceLevel + * @see com.sun.star.sheet.DataPilotSource + */ + type DataPilotSourceMembers = XMembersAccess; + + /** + * represents an enumeration of data pilot tables. + * @see com.sun.star.sheet.DataPilotTable + */ + type DataPilotTablesEnumeration = container.XEnumeration; + + /** + * represents an enumeration of DDE links. + * @see com.sun.star.sheet.DDELink + */ + type DDELinksEnumeration = container.XEnumeration; + + /** + * Represents a single external document link. + * + * An external document link contains cached data used for external cell and cell range references as well as external range names. + * @see com.sun.star.sheet.XExternalDocLink + * @since OOo 3.1 + */ + type ExternalDocLink = XExternalDocLink; + + /** + * Represents a collection of external document links. + * + * An external document link contains cached data used for external cell and cell range references as well as external range names. + * @see com.sun.star.sheet.ExternalDocLink + * @see com.sun.star.sheet.XExternalDocLinks + * @since OOo 3.1 + */ + type ExternalDocLinks = XExternalDocLinks; + + /** + * A single sheet cache for an external document. + * + * This cached data is used for external cell and cell range references, as well as external range names. An {@link com.sun.star.sheet.ExternalDocLink} + * instance contains a set of these sheet caches. + * @see com.sun.star.sheet.ExternalDocLink + * @see com.sun.star.sheet.XExternalSheetCache + * @since OOo 3.1 + */ + type ExternalSheetCache = XExternalSheetCache; + + /** A service used to implement parsing and printing formula strings in a specific formula language. */ + type FilterFormulaParser = XFilterFormulaParser; + + type FormulaOpCodeMapper = XFormulaOpCodeMapper; + + /** + * represents an enumeration of Function Descriptions. + * @see com.sun.star.sheet.FunctionDescription + */ + type FunctionDescriptionEnumeration = container.XEnumeration; + + /** + * contributes properties to access the settings for all spreadsheets of a spreadsheet document. + * + * For backwards compatibility, the attributes of {@link XGlobalSheetSettings} can still be accessed via {@link com.sun.star.beans.XPropertySet} , too. + */ + type GlobalSheetSettings = XGlobalSheetSettings; + + /** + * represents the contents of a header or footer line in a page style. + * @see com.sun.star.sheet.TablePageStyle + */ + type HeaderFooterContent = XHeaderFooterContent; + + /** + * represents a cell area that contains labels and values related to the labels. + * + * Label ranges can be used in formulas to refer to cells in cell ranges with row or column titles. The formula uses the cell value that is related to + * the specified row or column title. + */ + type LabelRange = XLabelRange; + + /** + * represents an enumeration of label ranges. + * @see com.sun.star.sheet.LabelRange + */ + type LabelRangesEnumeration = container.XEnumeration; + + /** + * represents an enumeration of named ranges. + * @see com.sun.star.sheet.NamedRange + */ + type NamedRangesEnumeration = container.XEnumeration; + + /** + * Thrown by a Calc Add-In function this exception indicates the function's algorithm did not converge to a meaningful result. + * @since OOo 3.3 + */ + type NoConvergenceException = uno.Exception; + + /** contains the list of recently used spreadsheet functions. */ + type RecentFunctions = XRecentFunctions; + + /** + * represents an enumeration of scenarios. + * @see com.sun.star.sheet.Spreadsheet + */ + type ScenariosEnumeration = container.XEnumeration; + + /** + * represents an enumeration of cell ranges in a spreadsheet document. + * @see com.sun.star.sheet.SheetCellRanges + */ + type SheetCellRangesEnumeration = container.XEnumeration; + + /** + * represents an enumeration of sheet links. + * @see com.sun.star.sheet.SheetLink + */ + type SheetLinksEnumeration = container.XEnumeration; + + /** A solver for a model that is defined by spreadsheet cells. */ + type Solver = XSolver; + + /** + * represents an enumeration of spreadsheets in a spreadsheet document. + * @see com.sun.star.sheet.Spreadsheets + */ + type SpreadsheetsEnumeration = container.XEnumeration; + + /** + * represents an enumeration of spreadsheet view panes. + * @see com.sun.star.sheet.SpreadsheetViewPane + */ + type SpreadsheetViewPanesEnumeration = container.XEnumeration; + + /** + * represents a single field in a subtotal descriptor. + * + * A subtotal field contains all columns for which subtotal values will be calculated and the column used to create subtotal groups. + * @see com.sun.star.sheet.SubTotalDescriptor + */ + type SubTotalField = XSubTotalField; + + /** + * represents an enumeration of sub total fields. + * @see com.sun.star.sheet.SubTotalField + */ + type SubTotalFieldsEnumeration = container.XEnumeration; + + /** + * represents an enumeration of AutoFormat fields in an AutoFormat. + * @see com.sun.star.sheet.TableAutoFormat + */ + type TableAutoFormatEnumeration = container.XEnumeration; + + /** + * represents an enumeration of AutoFormats. + * @see com.sun.star.sheet.TableAutoFormats + */ + type TableAutoFormatsEnumeration = container.XEnumeration; + + /** + * represents an enumeration of conditional entries. + * @see com.sun.star.sheet.TableConditionalEntry + */ + type TableConditionalEntryEnumeration = container.XEnumeration; + + /** + * represents an enumeration of equal-formatted cell range collections. + * @see com.sun.star.sheet.UniqueCellFormatRanges + */ + type UniqueCellFormatRangesEnumeration = container.XEnumeration; + + /** + * represents a volatile function result. + * + * A volatile function result can change its value over time. The {@link XVolatileResult} interface allows the addition of listeners which are notified + * when the value changes. + * @see com.sun.star.sheet.AddIn + */ + type VolatileResult = XVolatileResult; + + /** is used to select one of the four borders of a cell range. */ + const enum Border { + /** selects the bottom border. */ + BOTTOM = 1, + /** + * selects the left border. + * + * the cells to the right of the deleted cells are moved left. + */ + LEFT = 3, + /** + * selects the right border. + * + * the cells to the right of the inserted cells are moved right. + */ + RIGHT = 2, + /** selects the top border. */ + TOP = 0, + } + + /** is used to specify how remaining cells are moved when cells are deleted. */ + const enum CellDeleteMode { + /** + * entire columns to the right of the deleted cells are moved left. + * + * entire columns to the right of the inserted cells are moved right. + */ + COLUMNS = 4, + /** + * selects the left border. + * + * the cells to the right of the deleted cells are moved left. + */ + LEFT = 2, + /** + * no cells are moved. + * + * no condition is specified. + * + * nothing is imported. + * + * nothing is calculated. + * + * new values are used without changes. + * + * sheet is not linked. + */ + NONE = 0, + /** + * entire rows below the deleted cells are moved up. + * + * entire rows below the inserted cells are moved down. + */ + ROWS = 3, + /** the cells below the deleted cells are moved up. */ + UP = 1, + } + + /** is used to specify how cells are moved when new cells are inserted. */ + const enum CellInsertMode { + /** + * entire columns to the right of the deleted cells are moved left. + * + * entire columns to the right of the inserted cells are moved right. + */ + COLUMNS = 4, + /** the cells below the inserted cells are moved down. */ + DOWN = 1, + /** + * no cells are moved. + * + * no condition is specified. + * + * nothing is imported. + * + * nothing is calculated. + * + * new values are used without changes. + * + * sheet is not linked. + */ + NONE = 0, + /** + * selects the right border. + * + * the cells to the right of the inserted cells are moved right. + */ + RIGHT = 2, + /** + * entire rows below the deleted cells are moved up. + * + * entire rows below the inserted cells are moved down. + */ + ROWS = 3, + } + + /** is used to specify the type of {@link XSheetCondition} . */ + const enum ConditionOperator { + /** the value has to be between the two specified values. */ + BETWEEN = 7, + /** value has to be equal to the specified value. */ + EQUAL = 1, + /** the specified formula has to give a non-zero result. */ + FORMULA = 9, + /** + * the value has to be greater than the specified value. + * + * value has to be greater than the specified value. + */ + GREATER = 3, + /** + * the value has to be greater than or equal to the specified value. + * + * value has to be greater than or equal to the specified value. + */ + GREATER_EQUAL = 4, + /** + * the value has to be less than the specified value. + * + * value has to be less than the specified value. + */ + LESS = 5, + /** + * the value has to be less than or equal to the specified value. + * + * value has to be less than or equal to the specified value. + */ + LESS_EQUAL = 6, + /** + * no cells are moved. + * + * no condition is specified. + * + * nothing is imported. + * + * nothing is calculated. + * + * new values are used without changes. + * + * sheet is not linked. + */ + NONE = 0, + /** the value has to be outside of the two specified values. */ + NOT_BETWEEN = 8, + /** + * the value must not be equal to the specified value. + * + * value must not be equal to the specified value. + */ + NOT_EQUAL = 2, + } + + /** used to specify which database contents are imported. */ + const enum DataImportMode { + /** + * no cells are moved. + * + * no condition is specified. + * + * nothing is imported. + * + * nothing is calculated. + * + * new values are used without changes. + * + * sheet is not linked. + */ + NONE = 0, + /** the name of a database query is supplied. */ + QUERY = 3, + /** a SQL query string is supplied. */ + SQL = 1, + /** the name of a database table is supplied. */ + TABLE = 2, + } + + /** used to specify where a field in a data pilot table is laid out. */ + const enum DataPilotFieldOrientation { + /** + * the field is used as a column field. + * + * is applied to the columns.

In this mode, the column contains values and the row + * + * contains formulas.

+ */ + COLUMN = 1, + /** the field is used as a data field. */ + DATA = 4, + /** the field is not used in the table. */ + HIDDEN = 0, + /** the field is used as a page field. */ + PAGE = 3, + /** + * the field is used as a row field. + * + * is applied to the rows.

In this mode, the row contains values and the column + * + * contains formulas.

+ */ + ROW = 2, + } + + /** + * used to specify how the DDE server application converts its data into numbers. + * @see com.sun.star.sheet.XDDELinks + * @since OOo 3.0 + */ + const enum DDELinkMode { + /** numbers are converted into the default format. */ + DEFAULT = 0, + /** numbers are converted into the English default format. */ + ENGLISH = 1, + /** numbers are not converted, but treated as text. */ + TEXT = 2, + } + + /** + * used to specify how an arithmetic date series is calculated. + * @see com.sun.star.sheet.FillMode + */ + const enum FillDateMode { + /** for every new value a single day is added. */ + FILL_DATE_DAY = 0, + /** for every new value one month is added (day keeps unchanged). */ + FILL_DATE_MONTH = 2, + /** for every new value a single day is added, but Saturdays and Sundays are skipped. */ + FILL_DATE_WEEKDAY = 1, + /** for every new value one year is added (day and month keep unchanged). */ + FILL_DATE_YEAR = 3, + } + + /** used to specify the direction of filling cells, for example, with a series. */ + const enum FillDirection { + /** specifies that rows are filled from top to bottom. */ + TO_BOTTOM = 0, + /** specifies that columns are filled from right to left. */ + TO_LEFT = 3, + /** specifies that columns are filled from left to right. */ + TO_RIGHT = 1, + /** specifies that rows are filled from bottom to top. */ + TO_TOP = 2, + } + + /** used to specify the series type used to fill cells. */ + const enum FillMode { + /** + * specifies the use of a user-defined list.

The cells are filled using a user-defined series.

+ * + * + * + * function is determined automatically.

If the values are all numerical, SUM is used, otherwise COUNT.

+ */ + AUTO = 4, + /** + * specifies an arithmetic series for date values.

Cell by cell, the value used to fill the cells is increased + * + * by a specified number of days

+ * @@see com::sun::star::sheet::FillDateMode any date value matching the specified condition is valid. + */ + DATE = 3, + /** + * specifies a geometric series.

Cell by cell, the value used to fill the cells is multiplied + * + * by a specified value.

+ */ + GROWTH = 2, + /** + * specifies an arithmetic series.

Cell by cell, the value used to fill the cells is increased + * + * by an additive value.

+ */ + LINEAR = 1, + /** specifies a constant series.

All cells are filled with the same value.

*/ + SIMPLE = 0, + } + + /** used to specify how two conditions in a filter descriptor are connected. */ + const enum FilterConnection { + /** both conditions have to be fulfilled. */ + AND = 0, + /** at least one of the conditions has to be fulfilled. */ + OR = 1, + } + + /** specifies the type of a single condition in a filter descriptor. */ + const enum FilterOperator { + /** selects a specified percentage of entries with the lowest values. */ + BOTTOM_PERCENT = 11, + /** selects a specified number of entries with the lowest values. */ + BOTTOM_VALUES = 10, + /** selects empty entries. */ + EMPTY = 0, + /** value has to be equal to the specified value. */ + EQUAL = 2, + /** + * the value has to be greater than the specified value. + * + * value has to be greater than the specified value. + */ + GREATER = 4, + /** + * the value has to be greater than or equal to the specified value. + * + * value has to be greater than or equal to the specified value. + */ + GREATER_EQUAL = 5, + /** + * the value has to be less than the specified value. + * + * value has to be less than the specified value. + */ + LESS = 6, + /** + * the value has to be less than or equal to the specified value. + * + * value has to be less than or equal to the specified value. + */ + LESS_EQUAL = 7, + /** selects non-empty entries. */ + NOT_EMPTY = 1, + /** + * the value must not be equal to the specified value. + * + * value must not be equal to the specified value. + */ + NOT_EQUAL = 3, + /** selects a specified percentage of entries with the greatest values. */ + TOP_PERCENT = 9, + /** selects a specified number of entries with the greatest values. */ + TOP_VALUES = 8, + } + + /** used to specify a function to be calculated from values. */ + const enum GeneralFunction { + /** + * specifies the use of a user-defined list.

The cells are filled using a user-defined series.

+ * + * + * + * function is determined automatically.

If the values are all numerical, SUM is used, otherwise COUNT.

+ */ + AUTO = 1, + /** average of all numerical values is calculated. */ + AVERAGE = 4, + /** all values, including non-numerical values, are counted. */ + COUNT = 3, + /** numerical values are counted. */ + COUNTNUMS = 8, + /** maximum value of all numerical values is calculated. */ + MAX = 5, + /** minimum value of all numerical values is calculated. */ + MIN = 6, + /** + * no cells are moved. + * + * no condition is specified. + * + * nothing is imported. + * + * nothing is calculated. + * + * new values are used without changes. + * + * sheet is not linked. + */ + NONE = 0, + /** product of all numerical values is calculated. */ + PRODUCT = 7, + /** standard deviation is calculated based on a sample. */ + STDEV = 9, + /** standard deviation is calculated based on the entire population. */ + STDEVP = 10, + /** sum of all numerical values is calculated. */ + SUM = 2, + /** variance is calculated based on a sample. */ + VAR = 11, + /** variance is calculated based on the entire population. */ + VARP = 12, + } + + /** used to specify which operations are carried out when pasting cell values into a cell range. */ + const enum PasteOperation { + /** old and new values are added. */ + ADD = 1, + /** new values are divided by the new values. */ + DIVIDE = 4, + /** old and new values are multiplied. */ + MULTIPLY = 3, + /** + * no cells are moved. + * + * no condition is specified. + * + * nothing is imported. + * + * nothing is calculated. + * + * new values are used without changes. + * + * sheet is not linked. + */ + NONE = 0, + /** new values are subtracted from the old values. */ + SUBTRACT = 2, + } + + /** + * used to specify how a sheet is linked to another sheet. + * @see com.sun.star.sheet.SheetLinks + * @see com.sun.star.sheet.SheetLink + * @see com.sun.star.sheet.XSheetLinkable + */ + const enum SheetLinkMode { + /** + * no cells are moved. + * + * no condition is specified. + * + * nothing is imported. + * + * nothing is calculated. + * + * new values are used without changes. + * + * sheet is not linked. + */ + NONE = 0, + /** all contents (values and formulas) are copied. */ + NORMAL = 1, + /** instead of using formulas, the result values are copied. */ + VALUE = 2, + } + + /** is used to specify the type of {@link SolverConstraint} . */ + const enum SolverConstraintOperator { + BINARY = 4, + /** value has to be equal to the specified value. */ + EQUAL = 1, + /** + * the value has to be greater than or equal to the specified value. + * + * value has to be greater than or equal to the specified value. + */ + GREATER_EQUAL = 2, + INTEGER = 3, + /** + * the value has to be less than or equal to the specified value. + * + * value has to be less than or equal to the specified value. + */ + LESS_EQUAL = 0, + } + + /** used to specify if a table operation is applied to columns, rows, or both columns and rows. */ + const enum TableOperationMode { + /** + * is applied to rows and columns.

In this mode, the row and the column contain values. A formula + * + * using both row and column values is specified separately.

+ */ + BOTH = 2, + /** + * the field is used as a column field. + * + * is applied to the columns.

In this mode, the column contains values and the row + * + * contains formulas.

+ */ + COLUMN = 0, + /** + * the field is used as a row field. + * + * is applied to the rows.

In this mode, the row contains values and the column + * + * contains formulas.

+ */ + ROW = 1, + } + + /** used to specify how invalid cell contents are treated. */ + const enum ValidationAlertStyle { + /** information message is shown and the user is asked whether the change will be accepted (defaulted to "Yes"). */ + INFO = 2, + /** macro is executed. */ + MACRO = 3, + /** error message is shown and the change is rejected. */ + STOP = 0, + /** warning message is shown and the user is asked whether the change will be accepted (defaulted to "No"). */ + WARNING = 1, + } + + /** used to specify which cell contents are treated as valid. */ + const enum ValidationType { + /** any cell content is valid; no conditions are used. */ + ANY = 0, + /** The specified formula determines which contents are valid. */ + CUSTOM = 7, + /** + * specifies an arithmetic series for date values.

Cell by cell, the value used to fill the cells is increased + * + * by a specified number of days

+ * @@see com::sun::star::sheet::FillDateMode any date value matching the specified condition is valid. + */ + DATE = 3, + /** any number matching the specified condition is valid. */ + DECIMAL = 2, + /** Only strings from a specified list are valid. */ + LIST = 6, + /** string is valid if its length matches the specified condition. */ + TEXT_LEN = 5, + /** any time value matching the specified condition is valid. */ + TIME = 4, + /** any whole number matching the specified condition is valid. */ + WHOLE = 1, + } + + /** + * The accessible view of a spreadsheet document + * @since OOo 1.1.2 + */ + interface AccessibleCell extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleValue, accessibility.XAccessibleText { } + + /** + * The accessible object of a cell in the CSV import dialog. + * @see com.sun.star.sheet.AccessibleCsvTable + * @since OOo 1.1.2 + */ + interface AccessibleCsvCell extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleText { } + + /** + * The accessible object of the ruler in the CSV import dialog. + * @see com.sun.star.sheet.AccessibleCsvTable + * @since OOo 1.1.2 + */ + interface AccessibleCsvRuler extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleText { } + + /** + * The accessible object of the data table in the CSV import dialog. + * @see com.sun.star.sheet.AccessibleCsvRuler + * @see com.sun.star.sheet.AccessibleCsvCell + * @since OOo 1.1.2 + */ + interface AccessibleCsvTable extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleTable, + accessibility.XAccessibleSelection { } + + /** + * The accessible view of the Header/Footer in a spreadsheet page preview + * @since OOo 1.1.2 + */ + interface AccessiblePageHeaderFooterAreasView extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleEventBroadcaster { } + + /** + * The accessible view of a spreadsheet document + * @since OOo 1.1.2 + */ + interface AccessibleSpreadsheet extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleTable, + accessibility.XAccessibleSelection, accessibility.XAccessibleEventBroadcaster { } + + /** + * The accessible view of a spreadsheet document + * @since OOo 1.1.2 + */ + interface AccessibleSpreadsheetDocumentView extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleSelection, + accessibility.XAccessibleEventBroadcaster { } + + /** + * The accessible view of a spreadsheet page preview + * @since OOo 1.1.2 + */ + interface AccessibleSpreadsheetPageView extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleEventBroadcaster { } + + /** + * describes a change of the active sheet. The new active sheet is given with this event. + * @since OOo 2.0 + */ + interface ActivationEvent extends lang.EventObject { + /** specifies the new active {@link Spreadsheet} . */ + ActiveSheet: XSpreadsheet; + } + + /** + * is the base for {@link AddIn} services that supply functions which can be called by other components. + * + * Any {@link AddIn} implementation must implement a service describing its specific set of functions. That service must contain the {@link AddIn} + * service, and the functions that are implemented, in one or more interfaces. The {@link com.sun.star.lang.XServiceName} interface must describe that + * service, and the {@link XAddIn} interface must describe the individual functions. + * + * Each {@link AddIn} function can take parameters of the following types: + * + * **long**: for integer values.; + * + * **double**: for floating point values.; + * + * **string**: for text strings.; + * + * **long[][]**: for (two-dimensional) arrays of integer values.; + * + * **double[][]**: for (two-dimensional) arrays of floating point values.; + * + * **string[][]**: for (two-dimensional) arrays of text strings.; + * + * **any[][]**: for (two-dimensional) arrays of mixed contents. Each `any` will contain a `double` or a `string` , depending on the data.; + * + * **any**: Depending on the data, a `double` , a `string` , or an `any[][]` will be passed. If no argument is specified in the function call, `VOID` + * will be passed. This allows for optional parameters.; + * + * **com::sun::star::table::XCellRange**: for a {@link com.sun.star.table.XCellRange} interface to the source data.; + * + * **com::sun::star::beans::XPropertySet**: for a {@link com.sun.star.beans.XPropertySet} interface to the {@link SpreadsheetDocument} making the + * function call. Only one parameter of this type is allowed in each function. It can be used to query document settings like {@link + * SpreadsheetDocumentSettings.NullDate} .; + * + * **any[]**: for varying parameters. Only the last parameter of a function may have this type. It will be filled with the remaining arguments of the + * function call that were not used for the previous parameters. Each element of the sequence will be filled as in the case of `any` above. + * + * + * + * Each {@link AddIn} function must have one of the following return types: + * + * `long``double``string``long[][]``double[][]``string[][]``any[][]`{@link XVolatileResult}`any` + * + * The sequences must contain arrays as described above for the parameter types. An {@link XVolatileResult} return value must contain an object + * implementing the {@link VolatileResult} service, that contains a volatile result. Subsequent calls with the same parameters must return the same + * object. An `any` return value can contain any of the other types. + */ + interface AddIn extends lang.XServiceName, XAddIn, XCompatibilityNames { } + + /** + * represents a cell annotation object attached to a spreadsheet cell. + * @see com.sun.star.sheet.SheetCell + */ + interface CellAnnotation extends XSheetAnnotation, container.XChild, text.XSimpleText, XSheetAnnotationShapeSupplier { } + + /** + * represents a collection of cell annotations. + * @see com.sun.star.sheet.Spreadsheet + */ + interface CellAnnotations extends XSheetAnnotations, container.XEnumerationAccess { } + + /** + * represents a linked cell range. + * + * A linked cell range is a range which is linked to an equal-sized range in an external document. The contents of the external range is copied into the + * range of this document. + * @see com.sun.star.sheet.CellAreaLinks + */ + interface CellAreaLink extends XAreaLink, util.XRefreshable, beans.XPropertySet { + /** specifies the name of the filter used to load the source document. */ + Filter: string; + + /** specifies the filter options needed to load the source document. */ + FilterOptions: string; + + /** + * specifies the delay time between two refresh actions in seconds. + * @deprecated Deprecated + */ + RefreshDelay: number; + + /** + * specifies the time between two refresh actions in seconds. + * @since OOo 2.0 + */ + RefreshPeriod: number; + + /** specifies the URL of the source document. */ + Url: string; + } + + /** + * represents a collection of area links. + * @see com.sun.star.sheet.CellAreaLink + * @see com.sun.star.sheet.SpreadsheetDocument + */ + interface CellAreaLinks extends XAreaLinks, container.XIndexAccess, container.XEnumerationAccess { } + + /** + * represents a collection of equal-formatted cell ranges. + * + * All cells inside a cell range of this collection have the same formatting attributes. + * @see com.sun.star.sheet.SheetCellRange + * @see com.sun.star.sheet.SheetCellRanges + * @see com.sun.star.sheet.UniqueCellFormatRanges + */ + interface CellFormatRanges extends container.XIndexAccess, container.XEnumerationAccess { } + + interface ColorScale extends XConditionEntry { + ColorScaleEntries: SafeArray; + } + + /** contains a reference to a cell range. */ + interface ComplexReference { + /** is the first reference. */ + Reference1: SingleReference; + + /** is the second reference. */ + Reference2: SingleReference; + } + + /** represents a conditional format */ + interface ConditionalFormat extends beans.XPropertySet, XConditionalFormat { + ID: number; + + /** represents the range for the conditional format All ranges have to be in the same sheet. */ + Range: XSheetCellRanges; + } + + interface ConditionFormatEntry extends XConditionEntry { + Formula1: string; + Formula2: string; + + /** See {@link com.sun.star.sheet.ConditionFormatOperator} for valid values */ + Operator: number; + StyleName: string; + } + + interface DataBar extends XConditionEntry { + AxisColor: util.Color; + + /** See {@link com.sun.star.sheet.DataBarAxis} for possible values */ + AxisPosition: number; + Color: util.Color; + DataBarEntries: SafeArray; + + /** + * Maximum databar length in percent of cell width. + * + * Allowed values are (0, 1000) but larger than MinimumLength. + */ + MaximumLength: number; + + /** + * Minimum databar length in percent of cell width. + * + * Allowed values are [0, 100) but smaller than MaximumLength. + */ + MinimumLength: number; + NegativeColor: util.Color; + ShowValue: boolean; + UseGradient: boolean; + UseNegativeColor: boolean; + } + + /** + * represents a description of how data from an external database is imported. + * @see com.sun.star.sheet.XDatabaseRange + */ + interface DatabaseImportDescriptor { + /** + * indicates a connection URL, which locates a database driver. + * @since OOo 2.0 + */ + ConnectionResource: string; + + /** specifies the name of the database from which data is imported. */ + DatabaseName: string; + + /** + * specifies whether the SQL statement is given directly to the database or is parsed before. + * @since OOo 2.0 + */ + IsNative: boolean; + + /** + * specifies the table, query, or statement from which data is imported. + * + * The meaning of this is determined by the {@link DatabaseImportDescriptor.SourceType} attribute. + */ + SourceObject: string; + + /** enables importing and specifies from what type of source data is imported. */ + SourceType: DataImportMode; + } + + /** + * represents a database range in a spreadsheet document. + * + * A database range is a name for a cell range that also stores filtering, sorting, subtotal and data import settings and options. + * @see com.sun.star.sheet.DatabaseRanges + */ + interface DatabaseRange extends XDatabaseRange, XCellRangeReferrer, beans.XPropertySet, container.XNamed, util.XRefreshable { + /** + * specifies whether the AutoFilter is enabled or not. + * @since OOo 1.1.2 + */ + AutoFilter: boolean; + + /** + * specifies whether this range includes a top row of headers. + * @since LibreOffice 5.0 + */ + ContainsHeader: boolean; + + /** + * specifies the range where the filter can find the filter criteria. + * + * This is only used if SheetFilterDescriptor::UseFilterCriteriaSource is `TRUE` . + * @since OOo 1.1.2 + */ + FilterCriteriaSource: table.CellRangeAddress; + + /** + * specifies whether the imported data is only a selection of the database. + * @since OOo 2.0 + */ + FromSelection: boolean; + + /** if this property is set, cell formats are extended when the size of the range is changed by an update operation. */ + KeepFormats: boolean; + + /** if this property is set, columns or rows are inserted or deleted when the size of the range is changed by an update operation. */ + MoveCells: boolean; + + /** + * specifies the time between two refresh actions in seconds. + * @since OOo 2.0 + */ + RefreshPeriod: number; + + /** if this property is set, the cell contents within the database range are left out when the document is saved. */ + StripData: boolean; + + /** + * returns the index used to refer to this range in token arrays. + * + * A token describing a database range shall contain the op-code obtained from the {@link FormulaMapGroupSpecialOffset.DB_AREA} and this index as data + * part. + * @see com.sun.star.sheet.FormulaToken + * @see com.sun.star.sheet.FormulaMapGroupSpecialOffset.DB_AREA + * @since OOo 3.0 + */ + TokenIndex: number; + + /** + * specifies whether this range includes a bottom row of totals. + * @since LibreOffice 5.0 + */ + TotalsRow: boolean; + + /** + * specifies whether the filter criteria should be taken from a CellRange. + * @since OOo 1.1.2 + */ + UseFilterCriteriaSource: boolean; + } + + /** + * represents a collection of database ranges in a spreadsheet document. + * @see com.sun.star.sheet.SpreadsheetDocument + */ + interface DatabaseRanges extends XDatabaseRanges, container.XEnumerationAccess, container.XIndexAccess { } + + /** + * represents the description of the layout of a data pilot table. + * @see com.sun.star.sheet.DataPilotTable + */ + interface DataPilotDescriptor extends XDataPilotDescriptor, beans.XPropertySet, XDataPilotDataLayoutFieldSupplier { + /** specifies if columns for grand total results are created. */ + ColumnGrand: boolean; + + /** specifies whether to drill down to details or go into edit mode. */ + DrillDownOnDoubleClick: boolean; + + /** + * specifies a label for grand total results. + * @since OOo 3.4 + */ + GrandTotalName: string; + + /** specifies if empty rows in the source data are ignored. */ + IgnoreEmptyRows: boolean; + + /** + * specifies parameters to create the data pilot table from a database. + * @see DatabaseImportDescriptor + * @since OOo 3.3 + */ + ImportDescriptor: SafeArray; + + /** specifies if empty category cells in the source data should be treated as repetition of the content from the previous row. */ + RepeatIfEmpty: boolean; + + /** specifies if rows for grand total results are created. */ + RowGrand: boolean; + + /** + * specifies arguments that are passed to the implementation named by {@link SourceServiceName} . + * @since OOo 3.3 + */ + ServiceArguments: SafeArray; + + /** specifies whether the filter button is shown. */ + ShowFilterButton: boolean; + + /** + * specifies the name of a {@link DataPilotSource} implementation for the data pilot table. + * @since OOo 3.3 + */ + SourceServiceName: string; + } + + /** + * represents a single field in a data pilot table. + * + * If the data pilot table is based on a spreadsheet cell range, a field is represented by a column of the range and is named using the topmost cell of + * the column. + */ + interface DataPilotField extends container.XNamed, beans.XPropertySet, XDataPilotField, XDataPilotFieldGrouping { + /** enables the automatic inclusion of only a number of items with the highest or lowest result values. */ + AutoShowInfo: DataPilotFieldAutoShowInfo; + + /** + * specifies the function used to calculate results for this field. + * + * For column and row fields, this is the function for subtotals (GeneralFunction::NONE means no subtotals). For data fields, this is the function shown + * in the data pilot table. + */ + Function: GeneralFunction; + + /** + * specifies the function used to calculate results for this field. + * + * For column and row fields, this is the function for subtotals ( {@link GeneralFunction2.NONE} means no subtotals). For data fields, this is the + * function shown in the data pilot table. + * @since LibreOffice 5.3 + */ + Function2: number; + + /** + * contains the grouping information of the DataPilot field. + * + * By changing the value of this property it is possible to modify the grouping settings of this field. + */ + GroupInfo: DataPilotFieldGroupInfo; + + /** specifies whether this field has auto show information. */ + HasAutoShowInfo: boolean; + + /** specifies whether this field has layout information. */ + HasLayoutInfo: boolean; + + /** specifies whether this field has a reference. */ + HasReference: boolean; + + /** specifies whether this field has sorting information. */ + HasSortInfo: boolean; + + /** specifies whether this field is a group field. */ + IsGroupField: boolean; + + /** controls how the field's items are laid out in the result table. */ + LayoutInfo: DataPilotFieldLayoutInfo; + + /** + * specifies the orientation of the field. + * + * If the orientation of a field has been changed using this property, the field will be moved to the last position in the collection of all fields with + * the specified orientation. + */ + Orientation: DataPilotFieldOrientation; + + /** controls how the results are shown in relation to a selected reference result. */ + Reference: DataPilotFieldReference; + + /** specifies the selected page which is used to filter the data pilot. */ + SelectedPage: string; + + /** specifies whether to show this field also if it is empty or not. */ + ShowEmpty: boolean; + + /** controls how the field's items are sorted. */ + SortInfo: DataPilotFieldSortInfo; + + /** + * specifies the functions used to calculate subtotals for this field. + * + * This property is supported by column and row fields only. + * + * An empty sequence means no subtotals. The same effect can be achieved by setting the property {@link Function} to the value GeneralFunction::NONE. If + * the length of the sequence is greater then 1, then the sequence MUST NOT contain one of the values GeneralFunction::NONE or GeneralFunction::AUTO. + * + * The order of the functions in this sequence is reflected in the DataPilot table. Multiple entries of the same function are ignored when setting the + * property. + */ + Subtotals: SafeArray; + + /** + * specifies the functions used to calculate subtotals for this field. + * + * This property is supported by column and row fields only. + * + * An empty sequence means no subtotals. The same effect can be achieved by setting the property {@link Function2} to the value GeneralFunction::NONE. If + * the length of the sequence is greater then 1, then the sequence MUST NOT contain one of the values {@link GeneralFunction2.NONE} or {@link + * GeneralFunction2.AUTO} . + * + * The order of the functions in this sequence is reflected in the DataPilot table. Multiple entries of the same function are ignored when setting the + * property. + * @since LibreOffice 5.3 + */ + Subtotals2: SafeArray; + + /** + * specifies which hierarchy of the dimension is used. + * @see com.sun.star.sheet.DataPilotSourceHierarchies + */ + UsedHierarchy: string; + + /** specifies whether to use the selected page to filter the data pilot or show all. */ + UseSelectedPage: boolean; + } + + /** + * contains the auto show information of a {@link DataPilotField} . + * + * If enabled, only a number of items with the highest or lowest result values are shown. The other items are hidden automatically. + * @see com.sun.star.sheet.DataPilotField + */ + interface DataPilotFieldAutoShowInfo { + /** specifies the field where the values to show and select are taken from. */ + DataField: string; + + /** specifies whether the AutoShow feature is enabled or not. */ + IsEnabled: boolean; + + /** specifies the number of the items to show. */ + ItemCount: number; + + /** + * specifies the mode which items have to be shown. + * @see com.sun.star.sheet.DataPilotFieldShowItemsMode + */ + ShowItemsMode: number; + } + + interface DataPilotFieldFilter { + /** Field name. */ + FieldName: string; + + /** + * String value that needs to match against, locale independent. + * + * This is the underlying value formatted in a standardized way, for example ISO 8601 YYYY-MM-DD for dates. + */ + MatchValue: string; + + /** + * String value that needs to match against, locale dependent. + * + * This is the value as name/label as also displayed in the filter popup dialog, maybe formatted by user applied number formats. + */ + MatchValueName: string; + } + + /** + * represents a collection of members in a data pilot field group. + * + * The members (also called items) of this collection are instances of {@link DataPilotFieldGroupItem} . + * @see DataPilotField + * @see DataPilotFieldGroups + * @see DataPilotFieldGroupItem + */ + interface DataPilotFieldGroup extends container.XNamed, container.XIndexAccess, container.XEnumerationAccess, container.XNameAccess, container.XNameContainer { } + + /** contains the grouping information of a {@link DataPilotField} . */ + interface DataPilotFieldGroupInfo { + /** specifies the end value for the grouping if {@link HasAutoEnd} is set to `FALSE` . */ + End: number; + + /** + * specifies the grouping of the date values. + * @see DataPilotFieldGroupBy + */ + GroupBy: number; + + /** + * specifies the named groups in this field if there are some. + * + * The returned object is an instance of {@link DataPilotFieldGroups} . The collection of groups can be modified by inserting, removing, replacing, or + * renaming single groups or item names in the groups. When writing back this struct containing such a changed collection of groups to the {@link + * DataPilotField.GroupInfo} property, the modified grouping settings are applied at the DataPilot field. + * @see DataPilotField + * @see DataPilotFieldGroups + */ + Groups: container.XNameAccess; + + /** + * specifies whether the end value for the grouping is taken automatically from the maximum of the item values. + * + * If `FALSE` is set, the value from {@link End} will be used as end value for the grouping.If `TRUE` is set, the end value for the grouping will be + * calculated automatically from the maximum of all member values of the DataPilot field. + */ + HasAutoEnd: boolean; + + /** + * specifies whether the start value for the grouping is taken automatically from the minimum of the item values. + * + * If `FALSE` is set, the value from {@link Start} will be used as start value for the grouping.If `TRUE` is set, the start value for the grouping will + * be calculated automatically from the minimum of all member values of the DataPilot field. + */ + HasAutoStart: boolean; + + /** + * specifies whether date values are grouped by ranges of days. + * + * If `FALSE` is set, and {@link GroupBy} contains zero, grouping is performed inplace on the item values.If `FALSE` is set, and {@link GroupBy} contains + * one or more flags from {@link DataPilotFieldGroupBy} , grouping is performed on date or time.If `TRUE` is set, {@link Step} contains a value greater + * than or equal to 1, and {@link GroupBy} set to {@link DataPilotFieldGroupBy.DAYS} , grouping is performed on ranges of days (see descriptions for + * {@link XDataPilotFieldGrouping.createDateGroup()} for more details about day grouping). + */ + HasDateValues: boolean; + + /** + * contains the source DataPilot field grouping is based on. Will be `NULL` if this field is not grouped or contains numeric grouping. + * @see DataPilotField + */ + SourceField: XDataPilotField; + + /** specifies the start value for the grouping if {@link HasAutoStart} is set to `FALSE` . */ + Start: number; + + /** + * specifies the size of the ranges for numeric or day grouping. + * + * Example: With {@link HasAutoStart} set to `FALSE` , {@link Start} set to 2, and {@link Step} set to 3, the first group will contain all values greater + * than or equal to 2 and less than 5. The second group will contain all values greater than or equal to 5 and less then 8, and so on. + */ + Step: number; + } + + /** + * represents a collection of groups in a data pilot field. + * + * The members of this collection are instances of {@link DataPilotFieldGroup} containing the names of all items in the group. + * @see DataPilotField + * @see DataPilotFieldGroup + * @see DataPilotFieldGroupInfo + */ + interface DataPilotFieldGroups extends container.XIndexAccess, container.XEnumerationAccess, container.XNameAccess, container.XNameContainer { } + + /** contains the layout information of a {@link DataPilotField} . */ + interface DataPilotFieldLayoutInfo { + /** If `TRUE` , an empty row is inserted in the {@link DataPilotTable} result table after the data (including the subtotals) for each item of the field. */ + AddEmptyLines: boolean; + + /** + * specifies the layout mode. + * @see com.sun.star.sheet.DataPilotFieldLayoutMode + */ + LayoutMode: number; + } + + /** + * controls how a data pilot field's results are shown in relation to a selected reference result. + * @see com.sun.star.sheet.DataPilotField + */ + interface DataPilotFieldReference { + /** contains the reference field */ + ReferenceField: string; + + /** contains the name of the reference item, when the {@link DataPilotFieldReference.ReferenceItemType} is NAMED otherwise is empty */ + ReferenceItemName: string; + + /** + * selects between a named reference item and using the previous or next item for each item from the reference field. + * @see com.sun.star.sheet.DataPilotFieldReferenceItemType + */ + ReferenceItemType: number; + + /** + * contains the type of the reference. + * @see com.sun.star.sheet.DataPilotFieldReferenceType + */ + ReferenceType: number; + } + + /** + * represents a collection of fields in a data pilot table. + * + * If the data pilot table is based on a spreadsheet cell range, the fields are represented by the columns of the range and are named using the first row + * of the range. + * @see com.sun.star.sheet.DataPilotField + */ + interface DataPilotFields extends container.XIndexAccess, container.XEnumerationAccess, container.XNameAccess { } + + /** describes how to sort a single {@link DataPilotField} */ + interface DataPilotFieldSortInfo { + /** contains the data field to sort by if the Mode is DATA */ + Field: string; + + /** `TRUE` if data are sorted in ascending order, `FALSE` if in descending order. */ + IsAscending: boolean; + + /** + * contains the sort mode + * @see com.sun.star.sheet.DataPilotFieldSortMode + */ + Mode: number; + } + + /** represents a single item in a data pilot field. */ + interface DataPilotItem extends container.XNamed, beans.XPropertySet { + /** specifies whether the item is hidden. */ + IsHidden: boolean; + + /** + * specifies the item's position in its field if sorting is manual. + * @since OOo 2.4 + */ + Position: number; + + /** specifies whether the item is showing detail. */ + ShowDetail: boolean; + } + + /** + * represents a collection of items in a data pilot field. + * @see DataPilotItem + */ + interface DataPilotItems extends container.XIndexAccess, container.XEnumerationAccess, container.XNameAccess { } + + /** + * represents a data pilot source. + * + * A component that implements this service can be used as data source for a data pilot table in a spreadsheet document. + */ + interface DataPilotSource extends XDimensionsSupplier, XDataPilotResults, util.XRefreshable, beans.XPropertySet { + /** + * specifies the number of column fields. + * @since OOo 3.0 + */ + ColumnFieldCount: number; + + /** specifies if grand totals for the columns are inserted. */ + ColumnGrand: boolean; + + /** + * specifies the number of data fields. + * @since OOo 3.0 + */ + DataFieldCount: number; + + /** + * specifies the number of row fields. + * @since OOo 3.0 + */ + RowFieldCount: number; + + /** specifies if grand totals for the rows are inserted. */ + RowGrand: boolean; + } + + /** + * represents a dimension in a data pilot source. + * + * A dimension is equivalent to a column of a cell range in a spreadsheet used for a data pilot field. + * + * In more complex data sources, a dimension may contain several hierarchies, which consolidate items of a complex data type, called levels. + * + * Example: In a database, a column contains date values. This column will be a dimension of the data pilot source. One hierarchy may contain the 3 + * levels year, month, day. Another hierarchy may contain the 2 levels year and week number. + * @see com.sun.star.sheet.DataPilotSource + * @see com.sun.star.sheet.DataPilotTable + */ + interface DataPilotSourceDimension extends container.XNamed, XHierarchiesSupplier, util.XCloneable, beans.XPropertySet { + /** specifies which values are used. */ + Filter: SafeArray; + + /** + * contains flags that control the usage of the dimension. + * @see com.sun.star.sheet.DimensionFlags + */ + Flags: number; + + /** specifies how data are aggregated. */ + Function: GeneralFunction; + + /** + * specifies how data are aggregated. + * @since LibreOffice 5.3 + */ + Function2: number; + + /** contains `TRUE` if this is the dimension used to layout the different data dimensions. */ + IsDataLayoutDimension: boolean; + + /** specifies where the dimension is used. */ + Orientation: DataPilotFieldOrientation; + + /** returns the name of the dimension from which this dimension was cloned, or `NULL` if it was not cloned. */ + Original: container.XNamed; + + /** specifies the position of the dimension within its orientation. */ + Position: number; + + /** + * specifies which hierarchy of the dimension is used. + * @see com.sun.star.sheet.DataPilotSourceHierarchies + */ + UsedHierarchy: number; + } + + /** + * represents a hierarchy in a data pilot source dimension. + * @see com.sun.star.sheet.DataPilotSourceDimension + * @see com.sun.star.sheet.DataPilotSource + */ + interface DataPilotSourceHierarchy extends container.XNamed, XLevelsSupplier { } + + /** + * represents a level in a data pilot source hierarchy. + * @see com.sun.star.sheet.DataPilotSourceHierarchy + * @see com.sun.star.sheet.DataPilotSource + */ + interface DataPilotSourceLevel extends container.XNamed, XMembersSupplier, XDataPilotMemberResults, beans.XPropertySet { + /** specifies whether empty members are shown. */ + ShowEmpty: boolean; + + /** + * specifies the subtotals that are inserted for the level. + * + * The subtotals are calculated with the members of this level. + */ + SubTotals: SafeArray; + + /** + * specifies the subtotals that are inserted for the level. + * + * The subtotals are calculated with the members of this level. + * @since LibreOffice 5.3 + */ + SubTotals2: SafeArray; + } + + /** + * represents a member in a data pilot source level. + * + * Members are the data items that will appear in a data pilot table as row headers and column headers of the data range (if used in row or column + * dimensions), or to calculate the values of the data range (if used in data dimensions). + * @see com.sun.star.sheet.DataPilotSourceLevel + * @see com.sun.star.sheet.DataPilotSource + */ + interface DataPilotSourceMember extends container.XNamed, beans.XPropertySet { + /** specifies whether the member is visible. */ + IsVisible: boolean; + + /** + * specifies the member's position in its hierarchy level if sorting is manual. + * @since OOo 2.4 + */ + Position: boolean; + + /** specifies whether details for the member are shown. */ + ShowDetails: boolean; + } + + /** represents a data pilot table on a spreadsheet. */ + interface DataPilotTable extends XDataPilotDescriptor, XDataPilotTable, util.XModifyBroadcaster { } + + /** + * information about a cell within the column or row header area of a DataPilot table. + * + * This struct contains information about a particular cell located within the column or row header area of a DataPilot table. This is the type that is + * contained in {@link DataPilotTablePositionData.PositionData} when the value of {@link DataPilotTablePositionData.PositionType} is either {@link + * DataPilotTablePositionType.ROW_HEADER} or {@link DataPilotTablePositionType.COLUMN_HEADER} . + * @see com.sun.star.sheet.DataPilotTablePositionData + * @see com.sun.star.sheet.DataPilotTablePositionType + * @see com.sun.star.sheet.DataPilotFieldFilter + * @see com.sun.star.sheet.DataResult + * @since OOo 3.0 + */ + interface DataPilotTableHeaderData { + /** number of dimensions */ + Dimension: number; + + /** flag */ + Flags: number; + + /** hierarchy */ + Hierarchy: number; + + /** level */ + Level: number; + + /** member name */ + MemberName: string; + } + + /** + * This structure contains information on a cell within a DataPilot table. + * + * This structure contains information on a particular cell within a DataPilot table, and is used to retrieve its metadata. The {@link PositionType} + * member specifies in which sub-area of the table the cell is positioned, which in turn determines the type of metadata contained in the {@link + * PositionData} member. + * @see com.sun.star.sheet.DataPilotTablePositionType + * @see com.sun.star.sheet.DataPiotTableResultData + * @see com.sun.star.sheet.DataPiotTableHeaderData + * @since OOo 3.0 + */ + interface DataPilotTablePositionData { + /** + * This member contains a structure of different types depending on the position type specified in {@link PositionType} member. + * + * When the value of {@link PositionType} is {@link DataPilotTablePositionType.RESULT} , {@link DataPilotTablePositionData.PositionData} contains an + * instance of type {@link DataPilotTableResultData} , whereas when the value of {@link DataPilotTablePositionData.PositionType} is either {@link + * DataPilotTablePositionType.ROW_HEADER} or {@link DataPilotTablePositionType.COLUMN_HEADER} , then the {@link PositionData} member contains an instance + * of type {@link DataPilotTableHeaderData} . + * @see com.sun.star.sheet.DataPiotTableResultData + * @see com.sun.star.sheet.DataPiotTableHeaderData + */ + PositionData: any; + + /** + * This parameter specifies which sub-area of a DataPilot table a given cell is positioned. See {@link DataPilotTablePositionType} for how to interpret + * the value of this parameter. + * @see com.sun.star.sheet.DataPilotTablePositionType + */ + PositionType: number; + } + + /** + * information about a cell positioned within the result area of a DataPilot table. + * + * {@link DataPilotTableResultData} contains information about a particular cell positioned within the result area of a DataPilot table. + * @see com.sun.star.sheet.DataPilotTablePositionData + * @see com.sun.star.sheet.DataPilotTablePositionType + * @see com.sun.star.sheet.DataPilotFieldFilter + * @see com.sun.star.sheet.DataResult + * @since OOo 3.0 + */ + interface DataPilotTableResultData { + /** + * This is a 0-based index that specifies which data field the data displayed in the cell is for; the value of 0 means the cell is for the first data + * field, 1 for the second, and so on. + */ + DataFieldIndex: number; + + /** + * This is a set of filter criteria that can be used to re-create those data rows that contribute to the value shown in the cell. + * @see com.sun.star.sheet.DataPilotFieldFilter + */ + FieldFilters: SafeArray; + + /** + * more information about the result contained in the {@link DataResult} type. + * @see com.sun.star.sheet.DataResult + */ + Result: DataResult; + } + + /** represents a collection of data pilot tables. */ + interface DataPilotTables extends XDataPilotTables, container.XEnumerationAccess, container.XIndexAccess { } + + /** + * contains the result of one element in the data pilot data array. + * @see com.sun.star.sheet.XDataPilotResults + */ + interface DataResult { + /** + * contains boolean flags describing the result. + * @see com.sun.star.sheet.DataResultFlags + */ + Flags: number; + + /** contains the result value. */ + Value: number; + } + + interface DateCondition extends XConditionEntry { + /** See {@link com.sun.star.sheet.DateType} for possible values */ + DateType: number; + StyleName: string; + } + + /** + * describes an item of a DDE connection. + * + * A DDE connection consists of the DDE service name, the DDE topic and a list of DDE items which may contain cached result sets. + * @since OOo 3.1 + */ + interface DDEItemInfo { + /** The name of the DDE item. */ + Item: string; + + /** The results of the item cached from the last update of the DDE link if available. This sequence may be empty. */ + Results: SafeArray; + } + + /** + * represents a DDE link. + * + * A DDE link controls the results of a DDE spreadsheet formula. + */ + interface DDELink extends container.XNamed, XDDELink, util.XRefreshable, XDDELinkResults { } + + /** + * describes all items of a DDE connection used in formulas. + * + * A DDE connection consists of the DDE service name, the DDE topic and a list of DDE items which may contain results cached from the last update. + * + * The formula that would need this information for example would contain `=[1]!'R1C1'` or `=[2]!'Sheet1.A1'` where **[1]** is an external link with DDE + * service name "excel" and the topic "X:\PATH\[FILE.XLSX]Sheet1", and **[2]** contains service "soffice" and topic "file:///X:/PATH/FILE.ODS". The + * service name is stored in {@link DDELinkInfo.Service} , the topic is stored in {@link DDELinkInfo.Topic} . Note that if the DDE item contains single + * quotes they are escaped by doubling them, as usual, for example `=[2]!'''Sheet name''.A1'` in a "soffice" service. + * @since OOo 3.1 + */ + interface DDELinkInfo { + /** A list of DDE items. Each item may contain its results from the last update. */ + Items: SafeArray; + + /** The DDE service name. */ + Service: string; + + /** The DDE topic. */ + Topic: string; + } + + /** + * represents a collection of DDE links. + * @see com.sun.star.sheet.DDELink + * @see com.sun.star.sheet.SpreadsheetDocument + */ + interface DDELinks extends container.XNameAccess, container.XIndexAccess, container.XEnumerationAccess, XDDELinks { } + + /** + * describes properties that apply to the whole spreadsheet document. + * + * For settings that affect view properties, these settings apply to subsequently created views and are saved with the document, while {@link + * SpreadsheetViewSettings} can be used to alter a specific view that is already open. + */ + interface DocumentSettings extends document.Settings, beans.XPropertySet { + /** specifies the color in which the cell grid is displayed. */ + GridColor: util.Color; + + /** enables the column and row headers of the view. */ + HasColumnRowHeaders: boolean; + + /** enables the sheet tabs of the view. */ + HasSheetTabs: boolean; + + /** enables the display of outline symbols. */ + IsOutlineSymbolsSet: boolean; + + /** enables the synchronization of horizontal and vertical grid settings in the user interface. */ + IsRasterAxisSynchronized: boolean; + + /** enables the restriction of object movement and resizing of drawing objects to the raster. */ + IsSnapToRaster: boolean; + + /** enables the display of the drawing object raster. */ + RasterIsVisible: boolean; + + /** specifies the distance between horizontal grid elements in 1/100 mm. */ + RasterResolutionX: number; + + /** specifies the distance between vertical grid elements in 1/100 mm. */ + RasterResolutionY: number; + + /** specifies the number of subdivisions between two horizontal grid elements. */ + RasterSubdivisionX: number; + + /** specifies the number of subdivisions between two vertical grid elements. */ + RasterSubdivisionY: number; + + /** enables the display of the cell grid. */ + ShowGrid: boolean; + + /** controls whether a marker is shown for notes in cells. */ + ShowNotes: boolean; + + /** enables display of page breaks. */ + ShowPageBreaks: boolean; + + /** enables display of zero-values. */ + ShowZeroValues: boolean; + } + + /** + * describes an external link in a formula. + * @since OOo 3.1 + */ + interface ExternalLinkInfo { + /** + * Location of this link type. + * + * Modes used: + * + * 1. If {@link Type} is ExternalLinkType::EXTERNAL, this member shall contain a `string` with the **URI** of a document. The formula that would need + * this information for example would contain `=[1]Sheet1!A1` or `='[1]Sheet name'!A1` where **[1]** does resolve to the URI contained in the member + * {@link Data} . Note that the quotes cover both, the document name and the sheet name. + * + * 2. If {@link Type} is {@link ExternalLinkType.DDE} , this member shall contain a {@link DDELinkInfo} describing service name, topic, and all known + * items of a DDE link. + */ + Data: any; + + /** Link type, one of {@link ExternalLinkType} constants. */ + Type: number; + } + + /** + * Data structure to store information about an external reference. An external reference can be either a single cell reference, a cell range reference, + * or a named range. + * @see FormulaMapGroupSpecialOffset.PUSH + * @since OOo 3.1 + */ + interface ExternalReference { + /** + * Index of an externally linked document. Each externally-linked document has a unique index value. + * + * You can get the index value of an external document from the corresponding {@link com.sun.star.sheet.ExternalDocLink} instance through its attribute + * {@link com.sun.star.sheet.ExternalDocLink.TokenIndex} . + * @see com.sun.star.sheet.ExternalDocLink + * @see com.sun.star.sheet.ExternalDocLink.TokenIndex + */ + Index: number; + + /** + * Name of the sheet that the external reference points to. + * + * In case of a cell range reference that spans across multiple sheets, this is the name of the first sheet in that range. + * + * Note that an external range name ignores this value at the moment, but **it may make use of this data in the future when Calc supports a + * sheet-specific range name.** + * + * Reference data. + * + * This can store either {@link SingleReference} for a single cell reference, {@link ComplexReference} for a cell range reference, or simply a string for + * a defined name. + * + * The {@link SingleReference.Sheet} member shall contain the index of the external sheet cache containing the values of the externally referenced cells. + * @see com.sun.star.sheet.SingleReference + * @see com.sun.star.sheet.ComplexReference + */ + Reference: any; + } + + /** @since LibreOffice 3.5 */ + interface FilterFieldValue { + /** selects whether the TableFilterFieldValue::NumericValue or the TableFilterFieldValue::StringValue is used. */ + IsNumeric: boolean; + + /** specifies a numeric value for the condition. */ + NumericValue: number; + + /** specifies a string value for the condition. */ + StringValue: string; + } + + /** contains a mapping from a formula name (function name, operator, ...) to the OpCode used by the formula compiler. */ + interface FormulaOpCodeMapEntry { + /** The function name, or operator. */ + Name: string; + + /** The corresponding mapping. */ + Token: FormulaToken; + } + + interface FormulaParser extends beans.PropertySet, XFormulaParser { + /** + * specifies whether to use English parser and formatter. + * + * Note: When changing this, an already existing {@link OpCodeMap} needs to be recreated internally, so for performance reasons set this **before** + * setting the {@link OpCodeMap} . + */ + CompileEnglish: boolean; + + /** + * contains a list of external links referenced in formulas. + * + * Use of this property depends on the FormulaConvention in use. It is relevant only for {@link AddressConvention.XL_OOX} to map indices to external + * documents. The sequence must be in the order of indices used. Note that indices are 1-based, the sequence must start with an empty element. + * @since OOo 3.1 + */ + ExternalLinks: SafeArray; + + /** + * specifies which address reference style convention to use when parsing a formula string. + * @see AddressConvention + */ + FormulaConvention: number; + IgnoreLeadingSpaces: boolean; + + /** + * contains the complete mapping of names to op-codes. + * + * Names and symbols not defined here lead to a parser/print error. + */ + OpCodeMap: SafeArray; + ParameterSeparator: string; + setPropertyValues(aProps: LibreOffice.SeqEquiv | LibreOffice.SeqEquiv): void; + } + + /** contains a single token within a formula. */ + interface FormulaToken { + /** + * is additional data in the token, depending on the OpCode. + * @see com.sun.star.sheet.NamedRange.TokenIndex + * @see com.sun.star.sheet.DatabaseRange.TokenIndex + */ + Data: any; + + /** + * is the OpCode of the token. + * @see com.sun.star.sheet.XFormulaOpCodeMapper + */ + OpCode: number; + } + + /** allows generic access to all spreadsheet functions. */ + interface FunctionAccess extends SpreadsheetDocumentSettings, XFunctionAccess { + /** + * specifies whether the function call is performed as array function call. + * + * If set to `TRUE` , the result of the function call will be calculated similar to array formulas in a spreadsheet document. The return value of the + * function call will usually be a sequence of sequences containing the values of the resulting array. Example: If the function ABS is called for a 3x2 + * cell range, the result will be a 3x2 array containing the absolute values of the numbers contained in the specified cell range. + * + * If set to `FALSE` , the result of the function call will be calculated similar to simple cell formulas in a spreadsheet document. The return value of + * the function call will usually be a single value. Of course, some functions always return an array, for example the MUNIT function. + * + * For compatibility with older versions, the default value of this property is `TRUE` . + * @since OOo 3.3 + */ + IsArrayFunction: boolean; + } + + /** + * contains the description of a single argument within a spreadsheet function. + * @see com.sun.star.sheet.FunctionDescription + */ + interface FunctionArgument { + /** a description of the argument. */ + Description: string; + + /** determines whether the argument is optional. */ + IsOptional: boolean; + + /** the name of the argument. */ + Name: string; + } + + /** + * collects all properties used to describe a function. + * @see com.sun.star.sheet.FunctionDescriptions + */ + interface FunctionDescription { + /** returns a sequence of localized descriptions of the function's arguments (in the order specified by the function). */ + Arguments: SafeArray; + + /** + * returns the function's category. + * @see com.sun.star.sheet.FunctionCategory + */ + Category: number; + + /** returns a localized description of the function. */ + Description: string; + + /** + * returns the function's unique identifier. + * @see com.sun.star.sheet.XFunctionDescriptions + */ + Id: number; + + /** returns the localized function's name. */ + Name: string; + } + + /** + * represents a collection of function descriptions for all built-in functions as well as add-in functions available in the spreadsheet application. + * + * All container access methods return a sequence of {@link com.sun.star.beans.PropertyValue} structs. The properties contained in the sequence are + * collected in the service {@link FunctionDescription} . + */ + interface FunctionDescriptions extends XFunctionDescriptions, container.XNameAccess, container.XEnumerationAccess { } + + /** is the result of a goal seek operation. */ + interface GoalResult { + /** the amount by which the result changed in the last iteration. */ + Divergence: number; + + /** the resulting value. */ + Result: number; + } + + interface IconSet extends XConditionEntry { + /** See {@link com.sun.star.sheet.IconSetType} for possible values. */ + Icons: number; + IconSetEntries: SafeArray; + Reverse: boolean; + ShowValue: boolean; + } + + /** + * represents a collection of label ranges in a spreadsheet document. + * @see com.sun.star.sheet.LabelRange + * @see com.sun.star.sheet.SpreadsheetDocument + */ + interface LabelRanges extends XLabelRanges, container.XIndexAccess, container.XEnumerationAccess { } + + /** + * A name that is valid for a specified locale. + * @see com.sun.star.sheet.XCompatibilityNames + */ + interface LocalizedName { + /** The locale for which this name is valid. */ + Locale: lang.Locale; + + /** The name itself. */ + Name: string; + } + + /** + * describes a result of a DataPilot member. + * @see com.sun.star.sheet.XDataPilotMemberResults + */ + interface MemberResult { + /** the visible name of the field. */ + Caption: string; + + /** + * contains flags describing the result. + * @see com.sun.star.sheet.MemberResultFlags + */ + Flags: number; + + /** the internal name of the field. */ + Name: string; + + /** + * the underlying numeric value of the field **if** Flags indicate so by having {@link com.sun.star.sheet.MemberResultFlags.NUMERIC} set. + * + * May be NaN if value is not available or unknown. + * @since LibreOffice 5.3 + */ + Value: number; + } + + /** + * represents a named range in a spreadsheet document. + * + * In fact a named range is a named formula expression. A cell range address is one possible content of a named range. + * @see com.sun.star.sheet.NamedRanges + */ + interface NamedRange extends XNamedRange, XCellRangeReferrer { + /** + * Determines if this defined name represents a shared formula. + * + * This special property shall not be used externally. It is used by import and export filters for compatibility with spreadsheet documents containing + * shared formulas. Shared formulas are shared by several cells to save memory and to decrease file size. + * + * A defined name with this property set will not appear in the user interface of Calc, and its name will not appear in cell formulas. A formula + * referring to this defined name will show the formula definition contained in the name instead. + * @since OOo 3.0 + */ + IsSharedFormula: boolean; + + /** + * returns the index used to refer to this name in token arrays. + * + * A token describing a defined name shall contain the op-code obtained from the {@link FormulaMapGroupSpecialOffset.NAME} offset and this index as data + * part. + * @see com.sun.star.sheet.FormulaToken + * @see com.sun.star.sheet.FormulaMapGroupSpecialOffset.NAME + * @since OOo 3.0 + */ + TokenIndex: number; + } + + /** + * represents a collection of named ranges in a spreadsheet document. + * + * In fact a named range is a named formula expression. A cell range address is one possible content of a named range. + * @see com.sun.star.sheet.SpreadsheetDocument + */ + interface NamedRanges extends XNamedRanges, container.XIndexAccess, container.XEnumerationAccess, document.XActionLockable { } + + /** contains the information regarding named tokens */ + interface NameToken { + Index: number; + Sheet: number; + } + + /** + * contains the arguments for starting the range selection. + * @see com.sun.star.sheet.XRangeSelection + */ + interface RangeSelectionArguments { + /** specifies if the range selection is finished when the mouse button is released, after selecting cells. */ + CloseOnMouseRelease: boolean; + + /** contains the initial value for the range descriptor. */ + InitialValue: string; + + /** + * specifies if the range selection is limited to a single cell only. + * + * If `TRUE` , the selection is restricted to a single cell. If `FALSE` , multiple adjoining cells can be selected. The default value is `FALSE` . + * @since OOo 2.0.3 + */ + SingleCellMode: boolean; + + /** contains a title for the operation. */ + Title: string; + } + + /** + * specifies an event from range selection. + * @see com.sun.star.sheet.XRangeSelectionListener + * @see com.sun.star.sheet.XRangeSelectionChangeListener + */ + interface RangeSelectionEvent extends lang.EventObject { + /** contains a textual representation of the selected range. */ + RangeDescriptor: string; + } + + /** + * contains the new value of a volatile function result. + * @see com.sun.star.sheet.XVolatileResult + */ + interface ResultEvent extends lang.EventObject { + /** + * contains the value. + * + * This can be any of the possible return types described for the {@link AddIn} service, except {@link XVolatileResult} . + */ + Value: any; + } + + /** represents a scenario in a spreadsheet document. */ + interface Scenario extends XScenario, XScenarioEnhanced, beans.XPropertySet, container.XNamed { + /** specifies the color of the border of the scenario. */ + BorderColor: number; + + /** specifies if the data should be copied back into the scenario. */ + CopyBack: boolean; + + /** specifies if the formulas are copied or only the results. */ + CopyFormulas: boolean; + + /** specifies if the styles are copied. */ + CopyStyles: boolean; + + /** specifies if the scenario is active. */ + IsActive: boolean; + + /** specifies if the scenario prints a border. */ + PrintBorder: boolean; + + /** specifies if the scenario is protected. */ + Protected: boolean; + + /** specifies if the scenario shows a border. */ + ShowBorder: boolean; + } + + /** represents a collection of scenarios. */ + interface Scenarios extends XScenarios, container.XEnumerationAccess, container.XIndexAccess { } + + /** specifies the service of shapes in a spreadsheet document */ + interface Shape extends drawing.Shape { + /** + * contains the object where this shape is anchored on. + * + * Possible objects are {@link XSpreadsheet} and XCell. + */ + Anchor: uno.XInterface; + + /** + * contains the horizontal position of the object (1/100 mm). + * + * The position is relative to the anchor object. + * + * If the underlying table layout direction is left to right the position is the difference of the left top edge of the anchor object and the left top + * edge of the drawing object. + * + * If the underlying table layout direction is right to left the position is the difference of the right top edge of the anchor object and the right top + * edge of the drawing object. + */ + HoriOrientPosition: number; + + /** + * contains the vertical position of the object (1/100 mm). + * + * The position is relative to the anchor object. + * + * If the underlying table layout direction is left to right the position is the difference of the left top edge of the anchor object and the left top + * edge of the drawing object. + * + * If the underlying table layout direction is right to left the position is the difference of the right top edge of the anchor object and the right top + * edge of the drawing object. + */ + VertOrientPosition: number; + } + + /** represents a single addressable cell in a spreadsheet document. */ + interface SheetCell extends table.Cell, text.Text, style.CharacterProperties, style.CharacterPropertiesAsian, style.CharacterPropertiesComplex, + style.ParagraphProperties, style.ParagraphPropertiesAsian, style.ParagraphPropertiesComplex, SheetRangesQuery, document.XActionLockable, util.XReplaceable, + util.XIndent, table.XColumnRowRange, XCellAddressable, XSheetAnnotationAnchor, text.XTextFieldsSupplier, beans.XTolerantMultiPropertySet, + util.XModifyBroadcaster { + /** Returns the absolute address of the range as string, e.g. "$Sheet1.$B$2". */ + AbsoluteName: string; + + /** + * contains the conditional formatting settings for this cell. + * + * After a conditional format has been changed it has to be reinserted into the property set. + * @see com.sun.star.sheet.TableConditionalFormat + */ + ConditionalFormat: XSheetConditionalEntries; + + /** + * contains the conditional formatting settings for this cell, using localized formulas. + * + * After a conditional format has been changed it has to be reinserted into the property set. + * @see com.sun.star.sheet.TableConditionalFormat + */ + ConditionalFormatLocal: XSheetConditionalEntries; + + /** + * contains the formula string with localized function names. + * + * This property can also be used to set a new localized formula. + */ + FormulaLocal: string; + + /** + * contains the result type of a formula. + * @see com.sun.star.sheet.FormulaResult + */ + FormulaResultType: number; + + /** + * contains the position of this cell in the sheet (in 1/100 mm). + * + * This property contains the absolute position in the whole sheet, not the position in the visible area. + */ + Position: awt.Point; + + /** contains the size of this cell (in 1/100 mm). */ + Size: awt.Size; + + /** + * contains the data validation settings for this cell. + * + * After the data validation settings have been changed the validation has to be reinserted into the property set. + * @see com.sun.star.sheet.TableValidation + */ + Validation: beans.XPropertySet; + + /** + * contains the data validation settings for this cell, using localized formulas. + * + * After the data validation settings have been changed the validation has to be reinserted into the property set. + * @see com.sun.star.sheet.TableValidation + */ + ValidationLocal: beans.XPropertySet; + } + + /** + * represents a cursor in a spreadsheet. + * + * A cursor is a cell range which provides additional methods to move through the table (i.e. to find specific cell ranges). + */ + interface SheetCellCursor extends table.CellCursor, SheetCellRange, XSheetCellCursor, XUsedAreaCursor { } + + /** + * represents a rectangular range of cells in a spreadsheet document. + * + * This service is an extension of the CellRange service for use in spreadsheet documents. + */ + interface SheetCellRange extends table.CellRange, style.CharacterProperties, style.CharacterPropertiesAsian, style.CharacterPropertiesComplex, + style.ParagraphProperties, SheetRangesQuery, util.XReplaceable, util.XMergeable, util.XIndent, table.XColumnRowRange, table.XAutoFormattable, XSheetCellRange, + XCellRangeData, XCellRangeFormula, XCellRangeAddressable, XSheetOperation, XCellSeries, XArrayFormulaRange, XMultipleOperation, util.XSortable, + util.XImportable, XSubTotalCalculatable, XSheetFilterableEx, XCellFormatRangesSupplier, XUniqueCellFormatRangesSupplier, chart.XChartDataArray, + beans.XTolerantMultiPropertySet, util.XModifyBroadcaster { + /** Returns the absolute address of the range as string, e.g. "$Sheet1.$B$2:$D$5". */ + AbsoluteName: string; + + /** + * contains the conditional formatting settings for this cell. + * + * After a conditional format has been changed it has to be reinserted into the property set. + * @see com.sun.star.sheet.TableConditionalFormat + */ + ConditionalFormat: XSheetConditionalEntries; + + /** + * contains the conditional formatting settings for this cell, using localized formulas. + * + * After a conditional format has been changed it has to be reinserted into the property set. + * @see com.sun.star.sheet.TableConditionalFormat + */ + ConditionalFormatLocal: XSheetConditionalEntries; + + /** + * contains the position of the top left cell of this range in the sheet (in 1/100 mm). + * + * This property contains the absolute position in the whole sheet, not the position in the visible area. + */ + Position: awt.Point; + + /** contains the size of this range (in 1/100 mm). */ + Size: awt.Size; + + /** + * contains the data validation settings for this cell. + * + * After the data validation settings have been changed the validation has to be reinserted into the property set. + * @see com.sun.star.sheet.TableValidation + */ + Validation: beans.XPropertySet; + + /** + * contains the data validation settings for this cell, using localized formulas. + * + * After the data validation settings have been changed the validation has to be reinserted into the property set. + * @see com.sun.star.sheet.TableValidation + */ + ValidationLocal: beans.XPropertySet; + } + + /** + * represents a collection of cell ranges in a spreadsheet document. + * @see com.sun.star.sheet.SheetCellRange + */ + interface SheetCellRanges extends table.CellProperties, style.CharacterProperties, style.CharacterPropertiesAsian, style.CharacterPropertiesComplex, + style.ParagraphProperties, SheetRangesQuery, util.XReplaceable, util.XIndent, XSheetOperation, chart.XChartDataArray, XSheetCellRangeContainer, + container.XEnumerationAccess, container.XNameContainer { + /** Returns the absolute address of the ranges as string, e.g. "$Sheet1.$B$2:$D$5". */ + AbsoluteName: string; + + /** + * contains the conditional formatting settings for this cell. + * + * After a conditional format has been changed it has to be reinserted into the property set. + * @see com.sun.star.sheet.TableConditionalFormat + */ + ConditionalFormat: XSheetConditionalEntries; + + /** + * contains the conditional formatting settings for this cell, using localized formulas. + * + * After a conditional format has been changed it has to be reinserted into the property set. + * @see com.sun.star.sheet.TableConditionalFormat + */ + ConditionalFormatLocal: XSheetConditionalEntries; + + /** + * contains the data validation settings for this cell. + * + * After the data validation settings have been changed the validation has to be reinserted into the property set. + * @see com.sun.star.sheet.TableValidation + */ + Validation: beans.XPropertySet; + + /** + * contains the data validation settings for this cell, using localized formulas. + * + * After the data validation settings have been changed the validation has to be reinserted into the property set. + * @see com.sun.star.sheet.TableValidation + */ + ValidationLocal: beans.XPropertySet; + } + + /** + * represents a description of how a cell range is to be filtered. + * + * The descriptor contains properties and a collection of filter conditions (filter fields) which control the behavior of a filter operation. + */ + interface SheetFilterDescriptor extends XSheetFilterDescriptor, XSheetFilterDescriptor2, beans.XPropertySet { + /** specifies if the first row (or column) contains headers which should not be filtered. */ + ContainsHeader: boolean; + + /** specifies if the filtered data should be copied to another position in the document. */ + CopyOutputData: boolean; + + /** specifies if the case of letters is important when comparing entries. */ + IsCaseSensitive: boolean; + + /** + * returns the maximum number of filter fields in the descriptor. + * + * This read-only property indicates the maximum count of fields the current implementation supports. + */ + MaxFieldCount: number; + + /** specifies if columns or rows are filtered. */ + Orientation: table.TableOrientation; + + /** + * specifies the position where filtered data are to be copied. + * + * This is only used if {@link SheetFilterDescriptor.CopyOutputData} is `TRUE` . + */ + OutputPosition: table.CellAddress; + + /** + * specifies if the {@link SheetFilterDescriptor.OutputPosition} position is saved for future calls. + * + * This is only used if {@link SheetFilterDescriptor.CopyOutputData} is `TRUE` . + */ + SaveOutputPosition: boolean; + + /** specifies if duplicate entries are left out of the result. */ + SkipDuplicates: boolean; + + /** specifies if the {@link TableFilterField.StringValue} strings are interpreted as regular expressions. */ + UseRegularExpressions: boolean; + } + + /** + * represents a sheet link. + * + * A sheet link contains the source data of linked sheets, i.e. the URL and sheet name of the external document. + * + * To create a linked sheet, the sheet which will be used as linked sheet has to exist already. The method {@link XSheetLinkable.link()} creates a {@link + * SheetLink} object in the document's {@link SheetLinks} collection and links the sheet to the specified external sheet. + */ + interface SheetLink extends container.XNamed, util.XRefreshable, beans.XPropertySet { + /** specifies the name of the filter needed to load the source document. */ + Filter: string; + + /** specifies the filter options needed to load the source document. */ + FilterOptions: string; + + /** specifies the URL of the source document. */ + Url: string; + } + + /** + * represents a collection of sheet links. + * @see com.sun.star.sheet.SheetLink + * @see com.sun.star.sheet.SpreadsheetDocument + */ + interface SheetLinks extends container.XIndexAccess, container.XNameAccess, container.XEnumerationAccess { } + + /** provides interfaces to find cells with specific properties. */ + interface SheetRangesQuery extends XCellRangesQuery, XFormulaQuery { } + + /** + * a description of how a cell range is to be sorted. + * + * This service extends the {@link com.sun.star.table.TableSortDescriptor} service with spreadsheet specific properties. + */ + interface SheetSortDescriptor extends table.TableSortDescriptor { + /** specifies if cell formats are moved with the contents they belong to. */ + BindFormatsToContent: boolean; + + /** specifies if the sorted data should be copied to another position in the document. */ + CopyOutputData: boolean; + + /** specifies if a user defined sorting list is used. */ + IsUserListEnabled: boolean; + + /** + * specifies the position where sorted data are to be copied. + * + * This property is only used, if {@link SheetSortDescriptor.CopyOutputData} is `TRUE` . + */ + OutputPosition: table.CellAddress; + + /** + * specifies which user defined sorting list is used. + * + * This property is only used, if {@link SheetSortDescriptor.IsUserListEnabled} is `TRUE` . + */ + UserListIndex: number; + } + + /** + * a description of how a cell range is to be sorted. + * + * This service extends the {@link com.sun.star.table.TableSortDescriptor2} service with spreadsheet specific properties. + * @since OOo 1.1.2 + */ + interface SheetSortDescriptor2 extends table.TableSortDescriptor2 { + /** specifies if cell formats are moved with the contents they belong to. */ + BindFormatsToContent: boolean; + + /** + * specifies whether the first row or column (depending on {@link com.sun.star.table.TableSortDescriptor.Orientation} ) is a header which should not be + * sorted. + */ + ContainsHeader: boolean; + + /** specifies if the sorted data should be copied to another position in the document. */ + CopyOutputData: boolean; + + /** specifies if a user defined sorting list is used. */ + IsUserListEnabled: boolean; + + /** + * specifies the position where sorted data are to be copied. + * + * This property is only used, if {@link SheetSortDescriptor.CopyOutputData} is `TRUE` . + */ + OutputPosition: table.CellAddress; + + /** + * specifies which user defined sorting list is used. + * + * This property is only used, if {@link SheetSortDescriptor.IsUserListEnabled} is `TRUE` . + */ + UserListIndex: number; + } + + /** contains a reference to a single cell. */ + interface SingleReference { + /** is the absolute column number. */ + Column: number; + + /** + * contains flags. + * @see ReferenceFlags + */ + Flags: number; + + /** is the relative column number. */ + RelativeColumn: number; + + /** is the relative row number. */ + RelativeRow: number; + + /** is the relative sheet number. */ + RelativeSheet: number; + + /** is the absolute row number. */ + Row: number; + + /** is the absolute sheet number. */ + Sheet: number; + } + + /** is used to specify a constraint for a solver model. */ + interface SolverConstraint { + Left: table.CellAddress; + Operator: SolverConstraintOperator; + + /** The comparison value, of type `double` or {@link com.sun.star.table.CellAddress} . */ + Right: any; + } + + /** + * represents a complete spreadsheet in a spreadsheet document. + * + * This service extents the service {@link SheetCellRange} . A spreadsheet is nothing else than a cell range with extended functionality. + * @see com.sun.star.sheet.SpreadsheetDocument + */ + interface Spreadsheet extends SheetCellRange, Scenario, XSpreadsheet, container.XNamed, util.XProtectable, XDataPilotTablesSupplier, XScenariosSupplier, + XSheetAnnotationsSupplier, drawing.XDrawPageSupplier, table.XTableChartsSupplier, XCellRangeMovement, XPrintAreas, XSheetPageBreak, XSheetOutline, + XSheetAuditing, XSheetLinkable, XExternalSheetName { + /** + * specifies whether the sheet has an automatic print area. + * + * The automatic print area is used to print a sheet without explicit print areas, also if other sheets have print areas. + * + * If the property is true, and there are print areas on other sheets, the used area of this sheet is also printed. + * + * If the property is false, and there are print areas on other sheets, only these specified print areas are printed. + * + * If there are no print areas on the other sheets it does not matter whether property is true or false. + * + * This property can only be true, if there are no print areas given on this sheet. If the property is set to true the print areas of this sheet will be + * removed. + * @see XPrintAreas + */ + AutomaticPrintArea: boolean; + + /** specifies all conditional formats of that sheet */ + ConditionalFormats: XConditionalFormats; + + /** specifies if the sheet is visible. */ + IsVisible: boolean; + + /** specifies the page style of the sheet. */ + PageStyle: string; + + /** specifies the color of the sheet tab, if any. */ + TabColor: util.Color; + + /** + * specifies the direction of the columns in the spreadsheet. + * + * Possible values are {@link com.sun.star.text.WritingMode2.LR_TB} to order the columns from left to right, and {@link + * com.sun.star.text.WritingMode2.RL_TB} to order the columns from right to left. + * @see com.sun.star.text.WritingMode2 + */ + TableLayout: number; + } + + /** represents a model component which consists of some settings and one or more spreadsheets. */ + interface SpreadsheetDocument extends document.OfficeDocument, SpreadsheetDocumentSettings, lang.XMultiServiceFactory, frame.XModel, document.XActionLockable, + document.XLinkTargetSupplier, util.XProtectable, XSpreadsheetDocument, XCalculatable, XDocumentAuditing, XConsolidatable, XGoalSeek, + drawing.XDrawPagesSupplier, style.XStyleFamiliesSupplier, util.XNumberFormatsSupplier { + addEventListener(Listener: document.XEventListener | lang.XEventListener): void; + + /** contains the collection of area links in the document. */ + AreaLinks: XAreaLinks; + + /** contains the collection of column label ranges in the document. */ + ColumnLabelRanges: XLabelRanges; + + /** contains the collection of database ranges in the document. */ + DatabaseRanges: XDatabaseRanges; + + /** contains the collection of DDE links in the document. */ + DDELinks: container.XNameAccess; + + /** contains the collection of named ranges in the document. */ + NamedRanges: XNamedRanges; + removeEventListener(Listener: document.XEventListener | lang.XEventListener): void; + + /** contains the collection of row label ranges in the document. */ + RowLabelRanges: XLabelRanges; + + /** contains the collection of sheet links in the document. */ + SheetLinks: container.XNameAccess; + } + + /** + * contributes properties to control the configuration which is global for all views of a spreadsheet document. + * @deprecated Deprecated + * @see com.sun.star.sheet.SpreadsheetDocument + */ + interface SpreadsheetDocumentSettings extends beans.XPropertySet { + /** + * specifies whether calculations are performed with the rounded values displayed in cells (set to `TRUE` ) instead of the internal values (set to + * `FALSE` ). + */ + CalcAsShown: boolean; + + /** contains the standard document language for Western text. */ + CharLocale: lang.Locale; + + /** contains the standard document language for Asian text. */ + CharLocaleAsian: lang.Locale; + + /** contains the standard document language for Complex text. */ + CharLocaleComplex: lang.Locale; + + /** specifies the width of default tabulators. */ + DefaultTabStop: number; + + /** contains the interface XForbiddenCharacters. */ + ForbiddenCharacters: i18n.XForbiddenCharacters; + + /** + * If this property is set the document has DrawPages. Use this property to find out, whether the document has DrawPages or not, because the getDrawPage + * method on the XDrawPageSupplier and the getDrawPages method on the XDrawPagesSupplier always creates the DrawPages if there are none; and this is very + * slow and needs more memory. + */ + HasDrawPages: boolean; + + /** specifies whether upper and lower cases are treated as equal when comparing cells. */ + IgnoreCase: boolean; + + /** + * specifies whether the automatic adjustment of the row height is enabled. + * @since OOo 3.0 + */ + IsAdjustHeightEnabled: boolean; + + /** + * specifies whether the automatic execution of links is enabled. + * @since OOo 3.0 + */ + IsExecuteLinkEnabled: boolean; + + /** enables iterated calculation of circular references. */ + IsIterationEnabled: boolean; + + /** + * specifies whether the document data are already loaded. + * @since OOo 3.0 + */ + IsLoaded: boolean; + + /** + * specifies whether changes record is protected. + * @since LibreOffice 5.0 + */ + IsRecordChangesProtected: boolean; + + /** + * specifies whether the undo command is enabled. + * @since OOo 3.0 + */ + IsUndoEnabled: boolean; + + /** + * specifies how many iterations are carried out. + * + * This setting is only used, if iteration is enabled using {@link SpreadsheetDocumentSettings.IsIterationEnabled} . + */ + IterationCount: number; + + /** + * specifies the point at which a change in results will stop the iteration. + * + * More exactly it specifies a difference in the change of the result between two iterations. If the result difference is less than or equal to this + * epsilon-value, the iteration is stopped. + * + * This setting is only used, if iteration is enabled using {@link SpreadsheetDocumentSettings.IsIterationEnabled} . + */ + IterationEpsilon: number; + + /** + * specifies whether column or row labels are looked up from anywhere on the sheet. + * + * Explicitly defined label ranges are used even if this property is set to `FALSE` . + * @see com.sun.star.sheet.LabelRanges + */ + LookUpLabels: boolean; + + /** specifies whether filter criteria must match entire cell contents. */ + MatchWholeCell: boolean; + + /** specifies the date that is represented by the value zero. */ + NullDate: util.Date; + + /** + * specifies whether changes record is enabled. + * + * No modification applied if the record changes protection is activated information given by {@link + * SpreadsheetDocumentSettings.IsRecordChangesProtected} + * @since LibreOffice 5.0 + */ + RecordChanges: boolean; + + /** + * contains the reference device used for formatting the document. + * @since OOo 3.0 + */ + ReferenceDevice: awt.XDevice; + + /** + * specifies whether regular expressions in formulas are enabled, e.g., for functions which look up spreadsheet contents. + * + * RegularExpressions and Wildcards are mutually exclusive, only one can have the value `TRUE` . If both are set to `TRUE` via API calls then the last + * one set takes precedence. + */ + RegularExpressions: boolean; + + /** enables online spell checking. */ + SpellOnline: boolean; + + /** specifies the number of decimals in the default number format. */ + StandardDecimals: number; + + /** + * specifies whether wildcards in formulas are enabled, e.g., for functions which look up spreadsheet contents. + * + * Wildcards and RegularExpressions are mutually exclusive, only one can have the value `TRUE` . If both are set to `TRUE` via API calls then the last + * one set takes precedence. + * @since LibreOffice 5.2 + */ + Wildcards: boolean; + } + + /** + * This abstract service is implemented by every page of a {@link SpreadsheetDocument} . + * + * Example: create and insert a couple of com::sun::star::drawing::LineShapes: + * + * {{program example here, see documentation}} + * @since OOo 1.1.2 + */ + interface SpreadsheetDrawPage extends drawing.XDrawPage, drawing.XShapeGrouper { } + + /** + * represents the collection of spreadsheets in a spreadsheet document. + * @see com.sun.star.sheet.SpreadsheetDocument + */ + interface Spreadsheets extends XSpreadsheets, container.XIndexAccess, container.XEnumerationAccess, XCellRangesAccess { } + + /** represents a view of a spreadsheet document. */ + interface SpreadsheetView extends frame.Controller, SpreadsheetViewSettings, SpreadsheetViewPane, XSpreadsheetView, container.XIndexAccess, + container.XEnumerationAccess, view.XSelectionSupplier, XViewSplitable, XViewFreezable, XRangeSelection, XEnhancedMouseClickBroadcaster, XActivationBroadcaster { } + + /** represents a single pane in a view of a spreadsheet document. */ + interface SpreadsheetViewPane extends XViewPane, XCellRangeReferrer, view.XControlAccess { } + + /** contains settings which are specific to each view of a spreadsheet */ + interface SpreadsheetViewSettings extends beans.XPropertySet { + /** specifies the color in which the cell grid is displayed. */ + GridColor: util.Color; + + /** enables the column and row headers of the view. */ + HasColumnRowHeaders: boolean; + + /** enables the horizontal scroll bar of the view. */ + HasHorizontalScrollBar: boolean; + + /** enables the sheet tabs of the view. */ + HasSheetTabs: boolean; + + /** enables the vertical scroll bar of the view. */ + HasVerticalScrollBar: boolean; + + /** disables the display of marks from online spelling. */ + HideSpellMarks: boolean; + + /** enables the display of outline symbols. */ + IsOutlineSymbolsSet: boolean; + + /** controls whether strings, values, and formulas are displayed in different colors. */ + IsValueHighlightingEnabled: boolean; + + /** enables display of anchor symbols when drawing objects are selected. */ + ShowAnchor: boolean; + + /** + * enables the display of charts in the view. + * @see SpreadsheetViewObjectsMode + */ + ShowCharts: number; + + /** + * enables the display of drawing objects in the view. + * @see SpreadsheetViewObjectsMode + */ + ShowDrawing: number; + + /** controls whether formulas are displayed instead of their results. */ + ShowFormulas: boolean; + + /** enables the display of the cell grid. */ + ShowGrid: boolean; + + /** enables display of help lines when moving drawing objects. */ + ShowHelpLines: boolean; + + /** controls whether a marker is shown for notes in cells. */ + ShowNotes: boolean; + + /** + * enables display of embedded objects in the view. + * @see SpreadsheetViewObjectsMode + */ + ShowObjects: number; + + /** enables display of page breaks. */ + ShowPageBreaks: boolean; + + /** enables display of zero-values. */ + ShowZeroValues: boolean; + + /** + * This property defines the zoom type for the document. + * @see com.sun.star.view.DocumentZoomType + */ + ZoomType: number; + + /** Defines the zoom value to use. Valid only if the ZoomType is set to {@link com.sun.star.view.DocumentZoomType.BY_VALUE} . */ + ZoomValue: number; + } + + /** + * describes how a single data column is treated when creating subtotals. + * @see com.sun.star.sheet.SubTotalDescriptor + */ + interface SubTotalColumn { + /** the index of the column inside the source data area. */ + Column: number; + + /** specifies what kind of subtotals are calculated. */ + Function: GeneralFunction; + } + + /** + * represents a description of how subtotals are created. + * + * The descriptor contains properties and a collection of subtotal fields which control the behavior of operation. + */ + interface SubTotalDescriptor extends XSubTotalDescriptor, container.XEnumerationAccess, container.XIndexAccess, beans.XPropertySet { + /** specifies if cell formats are moved with the contents they belong to. */ + BindFormatsToContent: boolean; + + /** specifies if the contents of the fields will be sorted to groups while performing a subtotal operation. */ + EnableSort: boolean; + + /** specifies if a user defined sorting list is used. */ + EnableUserSortList: boolean; + + /** specifies if page breaks are inserted after each group change. */ + InsertPageBreaks: boolean; + + /** specifies if the case of letters is important when comparing entries. */ + IsCaseSensitive: boolean; + + /** + * returns the maximum number of subtotal fields the descriptor can hold. + * + * This read-only property indicates the maximum count of fields the current implementation supports. + */ + MaxFieldCount: number; + + /** specifies the sorting order if {@link SubTotalDescriptor.EnableSort} is set to `TRUE` . */ + SortAscending: boolean; + + /** + * specifies which user defined sorting list is used. + * + * This property is only used if {@link SubTotalDescriptor.EnableUserSortList} is `TRUE` . + */ + UserSortListIndex: number; + } + + /** + * represents an AutoFormat, containing exactly 16 AutoFormat fields. + * + * Each of the 16 fields contain formatting properties for a table cell at a specific position in the AutoFormat range. The rows of the range are divided + * into a header row, a footer row and 2 data rows (repeated in turn between header and footer row). The columns are divided similar. This results in 16 + * different types of cells in the range. The AutoFormats are numbered row by row, then column by column. + * @see com.sun.star.sheet.TableAutoFormatField + */ + interface TableAutoFormat extends beans.XPropertySet, container.XIndexAccess, container.XEnumerationAccess, container.XNamed { + /** specifies whether the background settings from the fields are used. */ + IncludeBackground: boolean; + + /** specifies whether the border settings from the fields are used. */ + IncludeBorder: boolean; + + /** specifies whether the font settings from the fields are used. */ + IncludeFont: boolean; + + /** specifies whether the justification settings from the fields are used. */ + IncludeJustify: boolean; + + /** specifies whether the number format settings from the fields are used. */ + IncludeNumberFormat: boolean; + + /** specifies whether the column widths and row heights should be updated after applying the format. */ + IncludeWidthAndHeight: boolean; + } + + /** represents a field in an AutoFormat. A field contains all cell properties for a specific position in an AutoFormat. */ + interface TableAutoFormatField extends beans.XPropertySet { + /** contains the cell background color. */ + CellBackColor: util.Color; + + /** contains the value of the text color. */ + CharColor: util.Color; + + /** is `TRUE` if the characters are contoured. */ + CharContoured: boolean; + + /** is `TRUE` if the characters are crossed out. */ + CharCrossedOut: boolean; + + /** contains the value of the character set of the western font. */ + CharFontCharSet: string; + + /** contains the value of the character set of the Asian font. */ + CharFontCharSetAsian: string; + + /** contains the value of the character set of the complex font. */ + CharFontCharSetComplex: string; + + /** contains the value of the western font family. */ + CharFontFamily: string; + + /** contains the value of the Asian font family. */ + CharFontFamilyAsian: string; + + /** contains the value of the complex font family. */ + CharFontFamilyComplex: string; + + /** specifies the name of the western font. */ + CharFontName: string; + + /** specifies the name of the Asian font. */ + CharFontNameAsian: string; + + /** specifies the name of the complex font. */ + CharFontNameComplex: string; + + /** contains the value of the pitch of the western font. */ + CharFontPitch: string; + + /** contains the value of the pitch of the Asian font. */ + CharFontPitchAsian: string; + + /** contains the value of the pitch of the complex font. */ + CharFontPitchComplex: string; + + /** specifies the name of the western font style. */ + CharFontStyleName: string; + + /** specifies the name of the Asian font style. */ + CharFontStyleNameAsian: string; + + /** specifies the name of the complex font style. */ + CharFontStyleNameComplex: string; + + /** contains the height of characters of the western font in point. */ + CharHeight: number; + + /** contains the height of characters of the Asian font in point. */ + CharHeightAsian: number; + + /** contains the height of characters of the complex font in point. */ + CharHeightComplex: number; + + /** contains the value of the posture of characters of the western font. */ + CharPosture: awt.FontSlant; + + /** contains the value of the posture of characters of the Asian font. */ + CharPostureAsian: awt.FontSlant; + + /** contains the value of the posture of characters of the complex font. */ + CharPostureComplex: awt.FontSlant; + + /** is `TRUE` if the characters are shadowed. */ + CharShadowed: boolean; + + /** contains the value for the character underline. */ + CharUnderline: number; + + /** contains the value for the weight of characters of the western font. */ + CharWeight: number; + + /** contains the value for the weight of characters of the Asian font. */ + CharWeightAsian: number; + + /** contains the value for the weight of characters of the complex font. */ + CharWeightComplex: number; + + /** specifies the horizontal alignment of the cell contents. */ + HoriJustify: table.CellHoriJustify; + + /** + * is `TRUE` if the cell background is transparent. + * + * In this case the {@link TableAutoFormatField.CellBackColor} value is not used. + */ + IsCellBackgroundTransparent: boolean; + + /** is `TRUE` if text breaks automatically at cell borders. */ + IsTextWrapped: boolean; + + /** contains the orientation of the cell contents (i.e. top-to-bottom or stacked). */ + Orientation: table.CellOrientation; + + /** contains the margin between cell contents and bottom border (in 1/100 mm). */ + ParaBottomMargin: number; + + /** contains the margin between cell contents and left border (in 1/100 mm). */ + ParaLeftMargin: number; + + /** contains the margin between cell contents and right border (in 1/100 mm). */ + ParaRightMargin: number; + + /** contains the margin between cell contents and top border (in 1/100 mm). */ + ParaTopMargin: number; + + /** contains the rotation angle of the cell contents. */ + RotateAngle: number; + + /** + * contains the reference edge of the cell rotation. + * + * changed from {@link com.sun.star.table.CellVertJustify} to long in LibO 3.5 + * @see com.sun.star.table.CellVertJustify2 + */ + RotateReference: number; + + /** contains a description of the shadow. */ + ShadowFormat: table.ShadowFormat; + + /** + * property containing a description of the cell border. + * @since OOo 1.1.2 + */ + TableBorder: table.TableBorder; + + /** + * property containing a description of the cell border. Preferred over {@link com.sun.star.table.TableBorder}{@link TableBorder} . + * @since LibreOffice 3.6 + */ + TableBorder2: table.TableBorder2; + + /** + * specifies the vertical alignment of the cell contents. + * + * changed from {@link com.sun.star.table.CellVertJustify} to long in LibO 3.5 + * @see com.sun.star.table.CellVertJustify2 + */ + VertJustify: number; + } + + /** + * represents the collection of AutoFormats. + * + * There is only one instance of this collection, containing all AutoFormats usable in spreadsheet and text tables. + */ + interface TableAutoFormats extends container.XNameContainer, container.XIndexAccess, container.XEnumerationAccess { } + + /** + * contains the properties of a table cell style. + * + * This service extends the service {@link com.sun.star.style.CellStyle} with spreadsheet specific properties. + */ + interface TableCellStyle extends table.CellProperties, style.CellStyle, style.CharacterProperties, style.CharacterPropertiesAsian, + style.CharacterPropertiesComplex, style.ParagraphProperties { } + + /** + * represents a single condition in a conditional format. + * @see com.sun.star.sheet.TableConditionalFormat + */ + interface TableConditionalEntry extends XSheetCondition, XSheetConditionalEntry { } + + /** + * represents a collection of conditional formatting settings for a cell or cell range. + * + * The style of the first fulfilled condition (in index order) will be applied to the cell(s). + * @see com.sun.star.sheet.SheetCell + * @see com.sun.star.sheet.SheetCellRange + * @see com.sun.star.sheet.SheetCellRanges + */ + interface TableConditionalFormat extends XSheetConditionalEntries, container.XNameAccess, container.XEnumerationAccess, container.XIndexAccess { } + + /** + * describes a single condition in a filter descriptor. + * @see SheetFilterDescriptor + */ + interface TableFilterField { + /** specifies how the condition is connected to the previous condition. */ + Connection: FilterConnection; + + /** specifies which field (column) is used for the condition. */ + Field: number; + + /** selects whether the {@link TableFilterField.NumericValue} or the {@link TableFilterField.StringValue} is used. */ + IsNumeric: boolean; + + /** specifies a numeric value for the condition. */ + NumericValue: number; + + /** specifies the type of the condition. */ + Operator: FilterOperator; + + /** specifies a string value for the condition. */ + StringValue: string; + } + + /** + * describes a single condition in a filter descriptor. + * + * This struct has the {@link FilterOperator2} constants group as member, whereas the {@link TableFilterField} struct uses the FilterOperator enum. + * @see SheetFilterDescriptor + * @since OOo 3.2 + */ + interface TableFilterField2 { + /** specifies how the condition is connected to the previous condition. */ + Connection: FilterConnection; + + /** specifies which field (column) is used for the condition. */ + Field: number; + + /** selects whether the {@link TableFilterField2.NumericValue} or the {@link TableFilterField2.StringValue} is used. */ + IsNumeric: boolean; + + /** specifies a numeric value for the condition. */ + NumericValue: number; + + /** specifies the type of the condition as defined in {@link FilterOperator2} . */ + Operator: number; + + /** specifies a string value for the condition. */ + StringValue: string; + } + + /** @since LibreOffice 3.5 */ + interface TableFilterField3 { + /** specifies how the condition is connected to the previous condition. */ + Connection: FilterConnection; + + /** specifies which field (column) is used for the condition. */ + Field: number; + + /** specifies the type of the condition as defined in {@link FilterOperator2} . */ + Operator: number; + + /** specifies values to match against. Each filter field may have one or more values. */ + Values: SafeArray; + } + + /** + * describes a page break in a spreadsheet. + * @see com.sun.star.sheet.XSheetPageBreak + */ + interface TablePageBreakData { + /** is `TRUE` for a manual page break, `FALSE` for an automatic one. */ + ManualBreak: boolean; + + /** the position (column or row index) of the page break. */ + Position: number; + } + + /** + * represents a page style for a spreadsheet. + * + * This service extends the service {@link com.sun.star.style.PageStyle} with spreadsheet specific properties. + */ + interface TablePageStyle extends style.PageStyle { + /** determines whether the table is centered horizontally on the page. */ + CenterHorizontally: boolean; + + /** determines whether the table is centered vertically on the page. */ + CenterVertically: boolean; + + /** + * contains the page number applied to the first page for this sheet. + * + * The value 0 indicates that the page numbers are continued from the previous sheet. + */ + FirstPageNumber: number; + + /** + * contains the content of the footer for left pages. + * + * After changing the footer text contents, this property has to be reinserted into the property set. + * @see com.sun.star.sheet.HeaderFooterContent + */ + LeftPageFooterContent: XHeaderFooterContent; + + /** + * contains the content of the header for left pages. + * + * After changing the header text contents, this property has to be reinserted into the property set. + * @see com.sun.star.sheet.HeaderFooterContent + */ + LeftPageHeaderContent: XHeaderFooterContent; + + /** contains the scaling factor (in percent) for printing the sheet. */ + PageScale: number; + + /** enables printing of cell annotations. */ + PrintAnnotations: boolean; + + /** enables printing of charts. */ + PrintCharts: boolean; + + /** + * specifies the print order for the pages within each sheet. + * + * If `TRUE` , the order for printing pages begins with top-to-bottom, then continues with the next set of cell columns to the right. If `FALSE` , the + * order for printing pages begins with left-to-right, then continues with the next set of cell rows to the bottom. + */ + PrintDownFirst: boolean; + + /** enables printing of drawing objects. */ + PrintDrawing: boolean; + + /** enables printing of formulas instead of their results. */ + PrintFormulas: boolean; + + /** enables printing of the cell grid. */ + PrintGrid: boolean; + + /** enables printing of column and row headers. */ + PrintHeaders: boolean; + + /** enables printing of embedded objects. */ + PrintObjects: boolean; + + /** enables printing of zero-values. */ + PrintZeroValues: boolean; + + /** + * contains the content of the footer for right pages. + * + * After changing the footer text contents, this property has to be reinserted into the property set. + * @see com.sun.star.sheet.HeaderFooterContent + */ + RightPageFooterContent: XHeaderFooterContent; + + /** + * contains the content of the header for right pages. + * + * After changing the header text contents, this property has to be reinserted into the property set. + * @see com.sun.star.sheet.HeaderFooterContent + */ + RightPageHeaderContent: XHeaderFooterContent; + + /** contains the number of pages the sheet will printed. */ + ScaleToPages: number; + + /** + * contains the number of horizontal pages the sheet will printed on. + * @since OOo 2.0 + */ + ScaleToPagesX: number; + + /** + * contains the number of vertical pages the sheet will printed on. + * @since OOo 2.0 + */ + ScaleToPagesY: number; + } + + /** represents the data validation settings for a cell or cell range. */ + interface TableValidation extends beans.XPropertySet, XSheetCondition { + /** + * specifies the style of the error message. + * + * This is used only if {@link TableValidation.ShowErrorMessage} is set to `TRUE` . + */ + ErrorAlertStyle: ValidationAlertStyle; + + /** + * specifies the text of the error message. + * + * This is only used if {@link TableValidation.ShowErrorMessage} is set to `TRUE` . + */ + ErrorMessage: string; + + /** + * specifies the title of the window showing the error message. + * + * This is only used if {@link TableValidation.ShowErrorMessage} is set to `TRUE` . + */ + ErrorTitle: string; + + /** specifies if blank cells should be allowed. */ + IgnoreBlankCells: boolean; + + /** + * specifies the text of the input message. + * + * This is only used if {@link TableValidation.ShowInputMessage} is set to `TRUE` . + */ + InputMessage: string; + + /** + * specifies the title of the window showing the input message. + * + * This is only used if {@link TableValidation.ShowInputMessage} is set to `TRUE` . + */ + InputTitle: string; + + /** specifies if an error message is displayed when invalid data is entered. */ + ShowErrorMessage: boolean; + + /** specifies if an input message is shown when the cursor is in a cell with these validation settings. */ + ShowInputMessage: boolean; + + /** + * specifies if the list of possible values should be shown on the cell and how. + * + * See also {@link TableValidationVisibility} + */ + ShowList: number; + + /** specifies the type of validation. */ + Type: ValidationType; + } + + /** + * represents a collection of equal-formatted cell range collections. + * + * All cells inside a cell range collection (a member of this collection) have the same formatting attributes. + * @see com.sun.star.sheet.SheetCellRange + * @see com.sun.star.sheet.SheetCellRanges + * @see com.sun.star.sheet.CellFormatRanges + */ + interface UniqueCellFormatRanges extends container.XIndexAccess, container.XEnumerationAccess { } + + /** + * provides methods to add and remove {@link XActivationEventListener} + * @since OOo 2.0 + */ + interface XActivationBroadcaster extends uno.XInterface { + /** + * allows a component supporting the {@link XActivationEventListener} interface to register as listener. The component will be notified with a {@link + * ActivationEvent} every time the active sheet changes. + * @param aListener the component that is to be added as listener + * @see XActivationEventListener + * @see ActivationEvent + */ + addActivationEventListener(aListener: XActivationEventListener): void; + + /** + * removes a previously registered listener. + * @param aListener the component that is to be removed + */ + removeActivationEventListener(aListener: XActivationEventListener): void; + } + + /** makes it possible to receive events when the active spreadsheet changes. */ + interface XActivationEventListener extends lang.XEventListener { + /** + * is called whenever data or a selection changed. + * + * This interface must be implemented by components that wish to get notified of changes of the active {@link Spreadsheet} . They can be registered at an + * XSpreadsheetViewEventProvider component. + * @param aEvent the event that gives further information on which {@link Spreadsheet} is active now. + * @see ActivationEvent + * @see XSpreadsheetViewEventProvider + * @since OOo 2.0 + */ + activeSpreadsheetChanged(aEvent: ActivationEvent): void; + } + + /** gives access to function descriptions and user-visible names. */ + interface XAddIn extends lang.XLocalizable { + /** + * returns the description of the specified argument. + * + * The argument description is shown to the user when prompting for arguments. It may be translated to the current language of the {@link AddIn} . + * @param aProgrammaticFunctionName is the exact name of a method within its interface. + * @param nArgument the index of the argument (0-based). + * @returns the description of the specified argument. + */ + getArgumentDescription(aProgrammaticFunctionName: string, nArgument: number): string; + + /** + * returns the user-visible name of the specified argument. + * + * The argument name is shown to the user when prompting for arguments. It should be a single word and may be translated to the current language of the + * {@link AddIn} . + * @param aProgrammaticFunctionName is the exact name of a method within its interface. + * @param nArgument the index of the argument (0-based). + * @returns the user-visible name of the specified argument. + */ + getDisplayArgumentName(aProgrammaticFunctionName: string, nArgument: number): string; + + /** + * returns the user-visible name of the category the function belongs to. + * + * This is used when category names are shown to the user. + * @param aProgrammaticFunctionName is the exact name of a method within its interface. + * @returns the user-visible category name the specified function belongs to. + */ + getDisplayCategoryName(aProgrammaticFunctionName: string): string; + + /** + * returns the user-visible function name for an internal name. + * + * The user-visible name of a function is the name shown to the user. It may be translated to the current language of the {@link AddIn} , so it is never + * stored in files. It should be a single word and is used when entering or displaying formulas. + * @param aProgrammaticName is the exact name of a method within its interface. + * @returns the user-visible name of the specified function. + */ + getDisplayFunctionName(aProgrammaticName: string): string; + + /** + * returns the description of a function. + * + * The description is shown to the user when selecting functions. It may be translated to the current language of the {@link AddIn} . + * @param aProgrammaticName is the exact name of a method within its interface. + * @returns the description of the specified function. + */ + getFunctionDescription(aProgrammaticName: string): string; + + /** + * returns the programmatic name of the category the function belongs to. + * + * The category name is used to group similar functions together. The programmatic category name should always be in English, it is never shown to the + * user. It should be one of the following names if the function falls into the corresponding category. + * + * **Database **: for functions that operate with data organized in tabular form like databases.; + * + * **Date&Time **: for functions that deal with date or time values.; + * + * **Financial **: for functions that solve financial problems.; + * + * **Information **: for functions that provide information about cells.; + * + * **Logical **: for functions that deal with logical expressions.; + * + * **Mathematical **: for mathematical functions.; + * + * **Matrix **: for matrix functions.; + * + * **Statistical **: for statistical functions.; + * + * **Spreadsheet**: for functions that deal with cell ranges.; + * + * **Text **: for functions that deal with text strings.; + * + * **Add-In **: for additional functions. + * @param aProgrammaticFunctionName is the exact name of a method within its interface. + * @returns the category name the specified function belongs to. + */ + getProgrammaticCategoryName(aProgrammaticFunctionName: string): string; + + /** + * returns the internal function name for an user-visible name. + * + * The user-visible name of a function is the name shown to the user. It may be translated to the current language of the {@link AddIn} , so it is never + * stored in files. It should be a single word and is used when entering or displaying formulas. + * + * Attention: The method name contains a spelling error. Due to compatibility reasons the name cannot be changed. + * @param aDisplayName the user-visible name of a function. + * @returns the exact name of the method within its interface. + */ + getProgrammaticFuntionName(aDisplayName: string): string; + } + + /** + * provides methods to change the settings of a linked cell range. + * @see com.sun.star.sheet.CellAreaLink + */ + interface XAreaLink extends uno.XInterface { + /** returns the position of the linked range in the destination document. */ + DestArea: table.CellRangeAddress; + + /** returns the position of the linked range in the destination document. */ + getDestArea(): table.CellRangeAddress; + + /** + * returns the source of the range within the source document. + * + * This can be the address of a cell or range in the form "Sheet1.A1:C5", or the name of a named range or database range. + */ + getSourceArea(): string; + + /** sets the position of the linked range in the destination document. */ + setDestArea(aDestArea: table.CellRangeAddress): void; + + /** + * sets the source of the range within the source document. + * + * This can be the address of a cell or range in the form "Sheet1.A1:C5", or the name of a named range or database range. + */ + setSourceArea(aSourceArea: string): void; + + /** + * returns the source of the range within the source document. + * + * This can be the address of a cell or range in the form "Sheet1.A1:C5", or the name of a named range or database range. + */ + SourceArea: string; + } + + /** + * provides access via index to a collection of area links and inserting and removing area links. + * @see com.sun.star.sheet.CellAreaLinks + * @see com.sun.star.sheet.CellAreaLink + */ + interface XAreaLinks extends container.XIndexAccess { + /** + * creates an area link and adds it to the collection. + * @param aDestPos the address of the first cell of the range inside the current document. + * @param aFileName the URL of the source document. + * @param aSourceArea the name of the range in the source document. This can be the address of a cell or range in the form "Sheet1.A1:C5", or the name of + * @param aFilter the name of the filter used to load the source document. + * @param aFilterOptions optional filter options for the specified filter. + */ + insertAtPosition(aDestPos: table.CellAddress, aFileName: string, aSourceArea: string, aFilter: string, aFilterOptions: string): void; + + /** removes an area link from the collection. */ + removeByIndex(nIndex: number): void; + } + + /** provides handling of array formulas in a cell range. */ + interface XArrayFormulaRange extends uno.XInterface { + /** returns the array formula of the range or an empty string, if the range does not contain an array formula. */ + ArrayFormula: string; + + /** returns the array formula of the range or an empty string, if the range does not contain an array formula. */ + getArrayFormula(): string; + + /** + * applies the array formula to the entire cell range. + * @param aFormula the formula that will be applied as array formula. Passing an empty string erases an existing array formula. + */ + setArrayFormula(aFormula: string): void; + } + + /** gives access to an array formula as token sequence. */ + interface XArrayFormulaTokens { + /** returns the array formula as sequence of tokens. */ + ArrayTokens: SafeArray; + + /** returns the array formula as sequence of tokens. */ + getArrayTokens(): SafeArray; + + /** sets the array formula as sequence of tokens. */ + setArrayTokens(aTokens: LibreOffice.SeqEquiv): void; + } + + /** represents something that can recalculate. */ + interface XCalculatable extends uno.XInterface { + /** + * recalculates all dirty cells. + * + * This calculates all formula cells which have not yet been calculated after their precedents have changed. + */ + calculate(): void; + + /** recalculates all cells. */ + calculateAll(): void; + + /** + * enables automatic calculation. + * + * With automatic calculation, each formula cell is recalculated whenever its value is needed after its precedents have changed. The value is needed if + * the cell is displayed or used in another calculation. + * @param bEnabled `TRUE` to enable automatic calculation, `FALSE` to disable. + */ + enableAutomaticCalculation(bEnabled: boolean): void; + + /** + * returns whether automatic calculation is enabled. + * + * With automatic calculation, each formula cell is recalculated whenever its value is needed after its precedents have changed. The value is needed if + * the cell is displayed or used in another calculation. + * @returns `TRUE` , if automatic calculation is enabled. + */ + isAutomaticCalculationEnabled(): boolean; + } + + /** represents a cell which can be addressed with a {@link com.sun.star.table.CellAddress} . */ + interface XCellAddressable extends uno.XInterface { + /** + * returns the address of the cell in the spreadsheet document. + * + * The {@link com.sun.star.table.CellAddress} can be used to address the cell within its document. + */ + readonly CellAddress: table.CellAddress; + + /** + * returns the address of the cell in the spreadsheet document. + * + * The {@link com.sun.star.table.CellAddress} can be used to address the cell within its document. + */ + getCellAddress(): table.CellAddress; + } + + /** + * provides access to a collection of equal-formatted cell ranges. + * @see com.sun.star.sheet.SheetCellRange + * @see com.sun.star.sheet.SheetCellRanges + */ + interface XCellFormatRangesSupplier extends uno.XInterface { + /** + * returns a collection of equal-formatted cell ranges. + * + * Each cell of the original range is contained in one of the ranges (even unformatted cells). If there is a non-rectangular equal-formatted cell area, + * it will be split into several rectangular ranges. + * @returns the collection of equal-formatted cell ranges. + * @see com.sun.star.sheet.CellFormatRanges + */ + readonly CellFormatRanges: container.XIndexAccess; + + /** + * returns a collection of equal-formatted cell ranges. + * + * Each cell of the original range is contained in one of the ranges (even unformatted cells). If there is a non-rectangular equal-formatted cell area, + * it will be split into several rectangular ranges. + * @returns the collection of equal-formatted cell ranges. + * @see com.sun.star.sheet.CellFormatRanges + */ + getCellFormatRanges(): container.XIndexAccess; + } + + /** represents a cell which can be addressed with a {@link com.sun.star.table.CellRangeAddress} . */ + interface XCellRangeAddressable extends uno.XInterface { + /** + * returns the address of the cell range in the spreadsheet document. + * + * The {@link com.sun.star.table.CellRangeAddress} can be used to address the range within its document. + */ + getRangeAddress(): table.CellRangeAddress; + + /** + * returns the address of the cell range in the spreadsheet document. + * + * The {@link com.sun.star.table.CellRangeAddress} can be used to address the range within its document. + */ + readonly RangeAddress: table.CellRangeAddress; + } + + /** + * allows to get and set an array of data from a cell range. + * + * The outer sequence represents the rows and the inner sequence the columns of the array. + */ + interface XCellRangeData extends uno.XInterface { + /** + * gets an array from the contents of the cell range. + * + * Each element of the result contains a `double` or a `string` . + */ + readonly DataArray: SafeArray; + + /** + * gets an array from the contents of the cell range. + * + * Each element of the result contains a `double` or a `string` . + */ + getDataArray(): SafeArray; + + /** + * fills the cell range with values from an array. + * + * The size of the array must be the same as the size of the cell range. Each element of the array must contain a `double` or a `string` . + * @throws com::sun::star::uno::RuntimeException If the size of the array is different from the current size. + */ + setDataArray(aArray: LibreOffice.SeqEquiv): void; + } + + /** + * allows to get and set cell contents (values, text or formulas) for a cell range. + * + * The outer sequence represents the rows and the inner sequence the columns of the array. + * @since OOo 1.1.2 + */ + interface XCellRangeFormula extends uno.XInterface { + /** + * gets an array from the contents of the cell range. + * + * Each element of the result contains the same string that would be returned by {@link com.sun.star.table.XCell.getFormula()} for the corresponding + * cell. + */ + FormulaArray: SafeArray>; + + /** + * gets an array from the contents of the cell range. + * + * Each element of the result contains the same string that would be returned by {@link com.sun.star.table.XCell.getFormula()} for the corresponding + * cell. + */ + getFormulaArray(): SafeArray>; + + /** + * fills the cell range with values from an array. + * + * The size of the array must be the same as the size of the cell range. Each element of the array is interpreted the same way as the argument to a + * {@link com.sun.star.table.XCell.setFormula()} call for the corresponding cell. + * @throws com::sun::star::uno::RuntimeException If the size of the array is different from the current size. + */ + setFormulaArray(aArray: LibreOffice.SeqEquiv>): void; + } + + /** provides methods for moving ranges of cells in a sheet. */ + interface XCellRangeMovement extends uno.XInterface { + /** + * copies a cell range to another position in the document. + * + * The source cell range keeps unchanged. + * @param aDestination the address of the top left cell of the destination range. + * @param aSource the cell range which will be copied. + */ + copyRange(aDestination: table.CellAddress, aSource: table.CellRangeAddress): void; + + /** + * inserts cells, moving other cells down or right. + * + * Non-empty cells cannot be moved off the sheet. + * @param aRange the cell range in which empty cells will be inserted. + * @param nMode describes how to move existing cells. + */ + insertCells(aRange: table.CellRangeAddress, nMode: CellInsertMode): void; + + /** + * moves a cell range to another position in the document. + * + * After copying the contents of the cell range, all cells will be cleared. + * @param aDestination the address of the top left cell of the destination range. + * @param aSource the cell range which will be copied. + */ + moveRange(aDestination: table.CellAddress, aSource: table.CellRangeAddress): void; + + /** + * deletes cells, moving other cells up or left. + * @param aRange the cell range to remove. + * @param nMode describes how to move following cells. + */ + removeRange(aRange: table.CellRangeAddress, nMode: CellDeleteMode): void; + } + + /** + * allows direct access to the cells in a named range or to the cells which are visible in a view, without the need to get the document object first. + * @see com.sun.star.sheet.NamedRange + * @see com.sun.star.sheet.DatabaseRange + * @see com.sun.star.sheet.SpreadsheetViewPane + */ + interface XCellRangeReferrer extends uno.XInterface { + /** returns the cell range object that is represented. */ + getReferredCells(): table.XCellRange; + + /** returns the cell range object that is represented. */ + readonly ReferredCells: table.XCellRange; + } + + /** + * provides access to the cells or to sub-ranges of all sheets. + * @see com.sun.star.sheet.Spreadsheets + */ + interface XCellRangesAccess extends uno.XInterface { + /** + * Returns a single cell within the range. + * @param nColumn is the column index of the cell inside the sheet. + * @param nRow is the row index of the cell inside the sheet. + * @param nSheet is the sheet index of the sheet inside the document. + * @returns the specified cell. + * @see com.sun.star.table.Cell + * @throws com::sun::star::lang::IndexOutOfBoundsException if an index is outside the dimensions of this range. + */ + getCellByPosition(nColumn: number, nRow: number, nSheet: number): table.XCell; + + /** + * Returns a sub-range of cells within the range. + * @param nLeft is the column index of the first cell inside the range. + * @param nTop is the row index of the first cell inside the range. + * @param nRight is the column index of the last cell inside the range. + * @param nBottom is the row index of the last cell inside the range. + * @param nSheet is the sheet index of the sheet inside the document. + * @returns the specified cell range. + * @see com.sun.star.table.CellRange + * @throws com::sun::star::lang::IndexOutOfBoundsException if an index is outside the dimensions of this range. + */ + getCellRangeByPosition(nLeft: number, nTop: number, nRight: number, nBottom: number, nSheet: number): table.XCellRange; + + /** + * Returns a sub-range of cells within the range. + * + * The sub-range is specified by its name. The format of the range name is dependent of the context of the table. In spreadsheets valid names may be + * "Sheet1.A1:C5" or "$Sheet1.$B$2" or even defined names for cell ranges such as "MySpecialCell". + * @param aRange the name of the sub-range. + * @returns the specified cell ranges. + * @see com.sun.star.table.CellRange + */ + getCellRangesByName(aRange: string): SafeArray; + } + + /** + * provides methods to query for cell ranges with specific contents. + * + * All methods return a collection of cell ranges. + * @see com.sun.star.sheet.SheetRangesQuery + * @see com.sun.star.sheet.SheetCellRanges + */ + interface XCellRangesQuery extends uno.XInterface { + /** + * queries all cells with different values in a specified row. + * + * This method takes each column of the current cell range(s) and compares all cells with the cell in the specified row. All cells which are different to + * this comparison cell will be returned. + * @param aCompare contains a cell address with the row index used for comparison. Only this row index is of interest. + * @returns all cells of the current cell range(s) which are different to the comparison cell of each column. + */ + queryColumnDifferences(aCompare: table.CellAddress): XSheetCellRanges; + + /** + * queries all cells with the specified content type(s). + * @param nContentFlags a combination of {@link CellFlags} flags. Attention: Despite the {@link CellFlags} flags are `long` values, this method expects a + * @returns all cells of the current cell range(s) with the specified content type(s). + */ + queryContentCells(nContentFlags: number): XSheetCellRanges; + + /** + * queries all empty cells. + * @returns the empty cells of the current cell range(s). + */ + queryEmptyCells(): XSheetCellRanges; + + /** + * queries all formula cells with the specified result type. + * @param nResultFlags a combination of {@link FormulaResult} flags. + * @returns all formula cells of the current cell range(s) with the specified result type(s). + */ + queryFormulaCells(nResultFlags: number): XSheetCellRanges; + + /** + * intersects the current cell range(s) with the specified cell range. + * @param aRange contains the cell range for intersection. + * @returns all cells of the current cell range(s) which are contained in the passed cell range. + */ + queryIntersection(aRange: table.CellRangeAddress): XSheetCellRanges; + + /** + * queries all cells with different values in a specified column. + * + * This method takes each row of the current cell range(s) and compares all cells with the cell in the specified column. All cells which are different to + * this comparison cell will be returned. + * @param aCompare contains a cell address with the column index used for comparison. Only this column index is of interest. + * @returns all cells of the current cell range(s) which are different to the comparison cell of each row. + */ + queryRowDifferences(aCompare: table.CellAddress): XSheetCellRanges; + + /** + * queries all visible cells. + * @returns the visible (not hidden) cells of the current cell range(s). + */ + queryVisibleCells(): XSheetCellRanges; + } + + /** + * provides methods to fill out a cell range automatically with values based on a start value, step count and fill mode. + * @see com.sun.star.sheet.SheetCellRange + */ + interface XCellSeries extends uno.XInterface { + /** + * fills all cells in the range in a way that is specified by the first cell(s) in the range. + * @param nFillDirection specifies the direction to fill the rows/columns of the range. + * @param nSourceCount contains the number of cells in each row/column used to constitute the fill algorithm. + */ + fillAuto(nFillDirection: FillDirection, nSourceCount: number): void; + + /** + * fills all cells in the range based on the specified settings. + * @param nFillDirection specifies the direction to fill the rows/columns of the range. + * @param nFillMode specifies the type of the series. + * @param nFillDateMode specifies the calculation mode for date values. + * @param fStep contains the value used to increase/decrease the series values. + * @param fEndValue contains the threshold value on which the calculation of the current series stops. + */ + fillSeries(nFillDirection: FillDirection, nFillMode: FillMode, nFillDateMode: FillDateMode, fStep: number, fEndValue: number): void; + } + + interface XColorScaleEntry { + Color: util.Color; + Formula: string; + getColor(): util.Color; + getFormula(): string; + + /** See {@link com.sun.star.sheet.ColorScaleEntryType} for possible values */ + getType(): number; + setColor(Color: util.Color): void; + setFormula(Formula: string): void; + + /** See {@link com.sun.star.sheet.ColorScaleEntryType} for possible values */ + setType(Type: number): void; + + /** See {@link com.sun.star.sheet.ColorScaleEntryType} for possible values */ + Type: number; + } + + /** gives access to the sequence of compatibility names for an Addin function. */ + interface XCompatibilityNames extends uno.XInterface { + /** + * returns the compatibility names of the specified function. + * + * Compatibility names are localized names of {@link AddIn} functions that are used to import files from other applications. + * + * If on import a localized function name is read, this list of compatibility names is used to find the internal name of the function. The current locale + * may differ from the locale used in the imported file, so the method {@link XAddIn.getProgrammaticFuntionName()} cannot be used here. + * + * The order inside the sequence of compatibility names is used to prioritize the names. Initially the first compatibility name of each function is + * compared to the imported name (each function may provide a sequence of compatibility names - the first entry of all sequences is used). If no entry is + * equal, the second entry of each sequence is used and so on. + * + * If a locale is not present in the sequence of compatibility names, the first entry of the sequence is used. So the method should return a sequence + * which contains first the entry representing the current locale. `TRUE` + * @param aProgrammaticName is the exact name of a method within its interface. + */ + getCompatibilityNames(aProgrammaticName: string): SafeArray; + } + + interface XConditionalFormat extends container.XIndexAccess { + /** + * Creates a new conditional format entry and insert its at the position. + * @param Type a com.sun.star.sheet.ConditionFormatEntryType specifying the type of the new entry + * @param Position the position in the conditional format + */ + createEntry(Type: number, Position: number): void; + removeByIndex(Index: number): void; + } + + interface XConditionalFormats extends uno.XInterface { + readonly ConditionalFormats: SafeArray; + + /** adds a conditional format to the existing list returns the id of the inserted conditional format */ + createByRange(range: XSheetCellRanges): number; + getConditionalFormats(): SafeArray; + getLength(): number; + readonly Length: number; + removeByID(ID: number): void; + } + + /** + * Abstract base interface for any conditional format + * + * Is extended by any conditional format entry, e.g. color scale, data bar, icon set, date formats, condition formats + */ + interface XConditionEntry extends uno.XInterface { + getType(): number; + readonly Type: number; + } + + /** + * provides methods to consolidate ranges in a spreadsheet document. + * + * Consolidation combines the cells of multiple cell ranges, using a specific function. + * @deprecated Deprecated + */ + interface XConsolidatable extends uno.XInterface { + /** + * consolidates data from several cell ranges, using the settings in the passed descriptor. + * @param xDescriptor the descriptor used to perform the consolidation. + * @see com.sun.star.sheet.ConsolidationDescriptor + */ + consolidate(xDescriptor: XConsolidationDescriptor): void; + + /** + * creates a consolidation descriptor. + * @param bEmpty `TRUE` leaves the descriptor empty, `FALSE` fills it with the settings from the last consolidation action. + * @see com.sun.star.sheet.ConsolidationDescriptor + */ + createConsolidationDescriptor(bEmpty: boolean): XConsolidationDescriptor; + } + + /** + * provides access to the settings of a consolidation descriptor. + * @deprecated Deprecated + * @see com.sun.star.sheet.ConsolidationDescriptor + */ + interface XConsolidationDescriptor extends uno.XInterface { + /** returns the function by which the ranges are consolidated. */ + Function: GeneralFunction; + + /** returns the function by which the ranges are consolidated. */ + getFunction(): GeneralFunction; + + /** returns, whether links to the original data are inserted in the output area or not. */ + getInsertLinks(): boolean; + + /** returns the cell ranges which are consolidated. */ + getSources(): SafeArray; + + /** returns the position of the top left cell of the cell range where the consolidated data are copied. */ + getStartOutputPosition(): table.CellAddress; + + /** returns, whether column headers from the cell ranges are used to find matching data or not. */ + getUseColumnHeaders(): boolean; + + /** returns, whether row headers from the cell ranges are used to find matching data or not. */ + getUseRowHeaders(): boolean; + + /** returns, whether links to the original data are inserted in the output area or not. */ + InsertLinks: boolean; + + /** sets the function by which the ranges are consolidated. */ + setFunction(nFunction: GeneralFunction): void; + + /** specifies if links to the original data are inserted in the output area. */ + setInsertLinks(bInsertLinks: boolean): void; + + /** sets the cell ranges which are consolidated. */ + setSources(aSources: LibreOffice.SeqEquiv): void; + + /** sets the position of the top left cell of the cell range where the consolidated data are copied. */ + setStartOutputPosition(aStartOutputPosition: table.CellAddress): void; + + /** specifies if column headers from the cell ranges are used to find matching data. */ + setUseColumnHeaders(bUseColumnHeaders: boolean): void; + + /** specifies if row headers from the cell ranges are used to find matching data. */ + setUseRowHeaders(bUseRowHeaders: boolean): void; + + /** returns the cell ranges which are consolidated. */ + Sources: SafeArray; + + /** returns the position of the top left cell of the cell range where the consolidated data are copied. */ + StartOutputPosition: table.CellAddress; + + /** returns, whether column headers from the cell ranges are used to find matching data or not. */ + UseColumnHeaders: boolean; + + /** returns, whether row headers from the cell ranges are used to find matching data or not. */ + UseRowHeaders: boolean; + } + + interface XDataBarEntry { + Formula: string; + getFormula(): string; + + /** See {@link com.sun.star.sheet.DataBarEntryType} for possible values */ + getType(): number; + setFormula(Formula: string): void; + + /** See {@link com.sun.star.sheet.DataBarEntryType} for possible values */ + setType(Type: number): void; + + /** See {@link com.sun.star.sheet.DataBarEntryType} for possible values */ + Type: number; + } + + /** + * provides access to the settings and options of a database range. + * @see com.sun.star.sheet.DatabaseRange + */ + interface XDatabaseRange extends uno.XInterface { + /** returns the data area of the database range in the spreadsheet document. */ + DataArea: table.CellRangeAddress; + + /** + * returns the filter descriptor stored with the database range. + * + * If the filter descriptor is modified, the new filtering is carried out when {@link XDatabaseRange.refresh()} is called. + * @see SheetFilterDescriptor + */ + readonly FilterDescriptor: XSheetFilterDescriptor; + + /** returns the data area of the database range in the spreadsheet document. */ + getDataArea(): table.CellRangeAddress; + + /** + * returns the filter descriptor stored with the database range. + * + * If the filter descriptor is modified, the new filtering is carried out when {@link XDatabaseRange.refresh()} is called. + * @see SheetFilterDescriptor + */ + getFilterDescriptor(): XSheetFilterDescriptor; + + /** + * returns the database import descriptor stored with this database range. + * @see DatabaseImportDescriptor + */ + getImportDescriptor(): SafeArray; + + /** + * returns the sort descriptor stored with the database range. + * @see SheetSortDescriptor2 + */ + getSortDescriptor(): SafeArray; + + /** + * returns the subtotal descriptor stored with the database range. + * + * If the subtotal descriptor is modified, the new subtotals are inserted when {@link XDatabaseRange.refresh()} is called. + * @see SubTotalDescriptor + */ + getSubTotalDescriptor(): XSubTotalDescriptor; + + /** + * returns the database import descriptor stored with this database range. + * @see DatabaseImportDescriptor + */ + readonly ImportDescriptor: SafeArray; + + /** executes the stored import, filter, sorting, and subtotals descriptors again. */ + refresh(): void; + + /** sets the data area of the database range. */ + setDataArea(aDataArea: table.CellRangeAddress): void; + + /** + * returns the sort descriptor stored with the database range. + * @see SheetSortDescriptor2 + */ + readonly SortDescriptor: SafeArray; + + /** + * returns the subtotal descriptor stored with the database range. + * + * If the subtotal descriptor is modified, the new subtotals are inserted when {@link XDatabaseRange.refresh()} is called. + * @see SubTotalDescriptor + */ + readonly SubTotalDescriptor: XSubTotalDescriptor; + } + + /** + * provides functions to manage a collection of database ranges. + * @see com.sun.star.sheet.DatabaseRanges + */ + interface XDatabaseRanges extends container.XNameAccess { + /** adds a new database range to the collection. */ + addNewByName(aName: string, aRange: table.CellRangeAddress): void; + + /** removes a database range from the collection. */ + removeByName(aName: string): void; + } + + /** + * Provides access to the {@link DataPilotField} used to layout multiple data fields. + * + * This data field can be inserted into the rows dimension or columns dimension by changing its {@link DataPilotField.Orientation} property. This + * interface can be used to access the data layout field before multiple data fields are inserted into the DataPilot table. It remains invisible as long + * as the DataPilot table contains at most one data field. + * @see com.sun.star.sheet.DataPilotDescriptor + * @see com.sun.star.sheet.DataPilotTable + */ + interface XDataPilotDataLayoutFieldSupplier { + /** + * Returns the {@link DataPilotField} used to layout multiple data fields. + * + * If the field does not exist yet, it will be created. It is possible to insert this field into the rows or columns dimension by changing its {@link + * DataPilotField.Orientation} property. + */ + readonly DataLayoutField: XDataPilotField; + + /** + * Returns the {@link DataPilotField} used to layout multiple data fields. + * + * If the field does not exist yet, it will be created. It is possible to insert this field into the rows or columns dimension by changing its {@link + * DataPilotField.Orientation} property. + */ + getDataLayoutField(): XDataPilotField; + } + + /** + * provides access to the layout settings of a data pilot table. + * + * This interface extends the interface {@link com.sun.star.container.XNamed} which provides access to the name of the data pilot table used e.g. in + * collections. + * @see com.sun.star.sheet.DataPilotDescriptor + * @see com.sun.star.sheet.DataPilotTable + */ + interface XDataPilotDescriptor extends container.XNamed { + /** + * returns the collection of the data pilot fields used as column fields. + * @see com.sun.star.sheet.DataPilotFields + */ + readonly ColumnFields: container.XIndexAccess; + + /** + * returns the collection of the data pilot fields used as data fields. + * @see com.sun.star.sheet.DataPilotFields + */ + readonly DataFields: container.XIndexAccess; + + /** returns the collection of all the data pilot fields. */ + readonly DataPilotFields: container.XIndexAccess; + + /** returns the filter descriptor specifying which data from the source cell range are used for the data pilot table. */ + readonly FilterDescriptor: XSheetFilterDescriptor; + + /** + * returns the collection of the data pilot fields used as column fields. + * @see com.sun.star.sheet.DataPilotFields + */ + getColumnFields(): container.XIndexAccess; + + /** + * returns the collection of the data pilot fields used as data fields. + * @see com.sun.star.sheet.DataPilotFields + */ + getDataFields(): container.XIndexAccess; + + /** returns the collection of all the data pilot fields. */ + getDataPilotFields(): container.XIndexAccess; + + /** returns the filter descriptor specifying which data from the source cell range are used for the data pilot table. */ + getFilterDescriptor(): XSheetFilterDescriptor; + + /** + * returns the collection of the data pilot fields not used as column, row, page, or data fields. + * @see com.sun.star.sheet.DataPilotFields + */ + getHiddenFields(): container.XIndexAccess; + + /** + * returns the collection of the data pilot fields used as page fields. + * @see com.sun.star.sheet.DataPilotFields + */ + getPageFields(): container.XIndexAccess; + + /** + * returns the collection of the data pilot fields used as row fields. + * @see com.sun.star.sheet.DataPilotFields + */ + getRowFields(): container.XIndexAccess; + + /** returns the cell range containing the data for the data pilot table. */ + getSourceRange(): table.CellRangeAddress; + + /** returns an additional string stored in the data pilot table. */ + getTag(): string; + + /** + * returns the collection of the data pilot fields not used as column, row, page, or data fields. + * @see com.sun.star.sheet.DataPilotFields + */ + readonly HiddenFields: container.XIndexAccess; + + /** + * returns the collection of the data pilot fields used as page fields. + * @see com.sun.star.sheet.DataPilotFields + */ + readonly PageFields: container.XIndexAccess; + + /** + * returns the collection of the data pilot fields used as row fields. + * @see com.sun.star.sheet.DataPilotFields + */ + readonly RowFields: container.XIndexAccess; + + /** sets the cell range containing the data for the data pilot table. */ + setSourceRange(aSourceRange: table.CellRangeAddress): void; + + /** sets an additional string stored in the data pilot table. */ + setTag(aTag: string): void; + + /** returns the cell range containing the data for the data pilot table. */ + SourceRange: table.CellRangeAddress; + + /** returns an additional string stored in the data pilot table. */ + Tag: string; + } + + /** + * provides methods to control a data pilot field which has already been created. + * @see com.sun.star.sheet.DataPilotField + */ + interface XDataPilotField extends uno.XInterface { + /** + * returns the collection of the data pilot items. + * @see com.sun.star.sheet.DataPilotItems + */ + getItems(): container.XIndexAccess; + + /** + * returns the collection of the data pilot items. + * @see com.sun.star.sheet.DataPilotItems + */ + readonly Items: container.XIndexAccess; + } + + /** + * Provides methods to create new DataPilot fields where some or all items of this DataPilot field are grouped in some way. + * @see DataPilotField + */ + interface XDataPilotFieldGrouping extends uno.XInterface { + /** + * Groups the members of this field by dates, according to the passed settings. + * + * If this field is already grouped by dates, a new DataPilot field will be created and returned. If this field is not grouped at all, the date grouping + * is performed inside of this field (no new field will be created). There must not be any other grouping (by member names or by numeric ranges), + * otherwise an exception is thrown. + * @param aInfo contains the information how to group the items of the field. The members of this struct have to fulfill the following requirements:If the + * @returns the new created field if there is one created. `NULL` is returned, if date grouping is performed inside this field (i.e. this field was not group + * @see DataPilotField + * @throws com::sun::star::lang::IllegalArgumentException if the passed struct does not contain valid settings as described, or if this field is already gro + */ + createDateGroup(aInfo: DataPilotFieldGroupInfo): XDataPilotField; + + /** + * Creates a new DataPilot field which contains a group containing the given DataPilot field items (members). + * + * It is possible to create multiple groups by calling this method several times at the same DataPilot field. On subsequent calls, the DataPilot field + * created at the first call is used to insert the new groups. + * + * The collection of groups can be accessed via the {@link DataPilotField.GroupInfo} property. The returned struct contains the sequence of groups in its + * member {@link DataPilotFieldGroupInfo.Groups} . + * @param aItems a sequence containing the names of the items (members) which will be part of the new group. Must be names of items contained in the curren + * @returns the new created field if there is one created on the first call of this method. `NULL` is returned on subsequent calls. + * @see DataPilotField + * @see DataPilotFieldGroupInfo + */ + createNameGroup(aItems: LibreOffice.SeqEquiv): XDataPilotField; + } + + /** + * provides access to a sequence of results of a data pilot source level. + * + * These results are used to fill the data area for the level in a data pilot table. + * @see com.sun.star.sheet.DataPilotSourceLevel + * @see com.sun.star.sheet.DataPilotSource + * @see com.sun.star.sheet.XDataPilotResults + */ + interface XDataPilotMemberResults extends uno.XInterface { + /** returns the sequence of results for the regarding data pilot source level. */ + getResults(): SafeArray; + + /** returns the sequence of results for the regarding data pilot source level. */ + readonly Results: SafeArray; + } + + /** + * provides access to a table of results of a data pilot source. + * + * These results are used to fill the data area of a data pilot table. + * @see com.sun.star.sheet.DataPilotSource + * @see com.sun.star.sheet.XDataPilotMemberResults + */ + interface XDataPilotResults extends uno.XInterface { + getFilteredResults(aFilters: LibreOffice.SeqEquiv): SafeArray; + + /** + * returns the result array. + * + * The outer sequence contains the value rows. The inner sequences contain the values for one row. + */ + getResults(): SafeArray>; + + /** + * returns the result array. + * + * The outer sequence contains the value rows. The inner sequences contain the values for one row. + */ + readonly Results: SafeArray>; + } + + /** + * provides methods to control a data pilot table which has already been created. + * @see com.sun.star.sheet.DataPilotTable + */ + interface XDataPilotTable extends uno.XInterface { + /** returns the address of the cell range that contains the data pilot table. */ + getOutputRange(): table.CellRangeAddress; + + /** returns the address of the cell range that contains the data pilot table. */ + readonly OutputRange: table.CellRangeAddress; + + /** recreates the data pilot table with current data from the source cell range. */ + refresh(): void; + } + + /** + * additional methods to extend {@link com.sun.star.sheet.XDataPilotTable} . + * + * {@link com.sun.star.sheet.XDataPilotTable2} extends the old {@link com.sun.star.sheet.XDataPilotTable} interface with additional methods. + * @see com.sun.star.sheet.XDataPilotTable + * @since OOo 3.0 + */ + interface XDataPilotTable2 extends XDataPilotTable { + /** + * When the address of a cell within the result area is given, {@link XDataPilotTable2.getDrillDownData()} returns its drill-down output table that + * includes only those rows that contribute to the value of that cell. + * @param aAddr cell address within the result area of a DataPilot table. + * @returns drill-down output as 2-dimensional sequence, including the header row. + * @see XDataPilotTable2.insertDrillDownSheet() + */ + getDrillDownData(aAddr: table.CellAddress): SafeArray; + + /** + * This method returns a different output range of a DataPilot table per specified output range type. + * @returns {@link com.sun.star.table.CellRangeAddress} depicting the range specified. See {@link DataPilotOutputRangeType} for a set of possible output rang + * @see com.sun.star.sheet.DataPilotOutputRangeType + */ + getOutputRangeByType(nType: number): table.CellRangeAddress; + + /** + * Given a cell address, it returns the information about that cell. The type of information returned depends upon whether the cell is within the result + * area or column/row header area. + * @param aAddr address of the cell whose information is to be returned. + * @returns {@link DataPilotTablePositionData} which contains the position type and the information for that cell position. + * @see com.sun.star.sheet.DataPilotTablePositionData + * @see com.sun.star.sheet.DataPilotTableHeaderData + * @see com.sun.star.sheet.DataPilotTableResultData + */ + getPositionData(aAddr: table.CellAddress): DataPilotTablePositionData; + + /** + * This method inserts a new sheet to display the drill-down data for a specified result cell. A drill-down data for a result cell consists of a subset + * of rows from the original data source that contribute to the value displayed in that cell. + * + * The new sheet is always inserted to the immediate left of the current sheet where the DataPilot table is. Note that when the drill-down data is empty, + * no new sheet is inserted. + * @param aAddr address of a result cell + * @returns `VOID` + */ + insertDrillDownSheet(aAddr: table.CellAddress): void; + } + + /** + * provides access to the data pilot tables via name and inserting and removing data pilot tables. + * + * This interface extends the interface {@link com.sun.star.container.XNameAccess} which provides access to existing data pilot tables in the collection. + * @see com.sun.star.sheet.DataPilotTables + * @see com.sun.star.sheet.DataPilotTable + */ + interface XDataPilotTables extends container.XNameAccess { + /** + * creates a data pilot descriptor. + * + * This descriptor can be used with XDataPilotTables::addTable(). + * @see com.sun.star.sheet.DataPilotDescriptor + */ + createDataPilotDescriptor(): XDataPilotDescriptor; + + /** + * creates a new data pilot table and adds it to the collection. + * @param aName the name of the data pilot table used in the collection. + * @param OutputAddress the top left cell of the location of the data pilot table in the spreadsheet document. + * @param xDescriptor the descriptor containing the settings of the data pilot table. + * @see com.sun.star.sheet.DataPilotDescriptor + */ + insertNewByName(aName: string, OutputAddress: table.CellAddress, xDescriptor: XDataPilotDescriptor): void; + + /** deletes a data pilot table from the collection. */ + removeByName(aName: string): void; + } + + /** + * grants access to a collection of data pilot tables. + * @see com.sun.star.sheet.Spreadsheet + */ + interface XDataPilotTablesSupplier extends uno.XInterface { + /** + * Returns the collection of data pilot tables. + * @see com.sun.star.sheet.DataPilotTables + */ + readonly DataPilotTables: XDataPilotTables; + + /** + * Returns the collection of data pilot tables. + * @see com.sun.star.sheet.DataPilotTables + */ + getDataPilotTables(): XDataPilotTables; + } + + /** + * provides methods to change the settings of a DDE link. + * @deprecated Deprecated + * @see com.sun.star.sheet.DDELink + */ + interface XDDELink extends uno.XInterface { + /** returns the application from which data are requested (the DDE server application). */ + readonly Application: string; + + /** returns the application from which data are requested (the DDE server application). */ + getApplication(): string; + + /** returns the DDE item from which data are requested. */ + getItem(): string; + + /** returns the DDE topic from which data are requested. */ + getTopic(): string; + + /** returns the DDE item from which data are requested. */ + readonly Item: string; + + /** returns the DDE topic from which data are requested. */ + readonly Topic: string; + } + + /** + * provides access to the DDE link results. + * @see com.sun.star.sheet.DDELink + * @since OOo 3.0 + */ + interface XDDELinkResults extends uno.XInterface { + /** + * returns the DDE link results. + * @returns the DDE link results. The outer sequence contains the value rows. The inner sequences contain the result values for one row. + */ + getResults(): SafeArray; + + /** + * returns the DDE link results. + * @returns the DDE link results. The outer sequence contains the value rows. The inner sequences contain the result values for one row. + */ + readonly Results: SafeArray; + + /** + * sets the DDE link results. + * @param aResults the DDE link results. The outer sequence contains the value rows. The inner sequences contain the result values for one row. If the oute + */ + setResults(aResults: LibreOffice.SeqEquiv): void; + } + + /** + * provides a method to add a DDE link to a spreadsheet. + * @see com.sun.star.sheet.DDELinks + * @since OOo 3.0 + */ + interface XDDELinks extends container.XNameAccess { + /** + * adds a DDE link to the spreadsheet without updating it. + * + * If a DDE link with the specified parameters already exists, the existing DDE link will be returned. Otherwise a new DDE link will be created. + * @param aApplication the DDE server application from which data are requested. + * @param aTopic the DDE topic from which data are requested. + * @param aItem the DDE item from which data are requested. + * @param nMode the DDE link mode. + * @returns the DDE link. + */ + addDDELink(aApplication: string, aTopic: string, aItem: string, nMode: DDELinkMode): XDDELink; + } + + /** + * provides access to the collection of dimensions of a data pilot source. + * @see com.sun.star.sheet.DataPilotSource + */ + interface XDimensionsSupplier extends uno.XInterface { + /** + * returns the collection of dimensions. + * @see com.sun.star.sheet.DataPilotSourceDimensions + */ + readonly Dimensions: container.XNameAccess; + + /** + * returns the collection of dimensions. + * @see com.sun.star.sheet.DataPilotSourceDimensions + */ + getDimensions(): container.XNameAccess; + } + + /** provides auditing functions of a document. */ + interface XDocumentAuditing extends uno.XInterface { + /** + * refreshes all existing auditing arrows on all sheets of the document. + * + * Dependencies are marked for all the cells that were marked before, but using current formulas. + */ + refreshArrows(): void; + } + + /** + * supplies a filtered subset of the original data source based on filtering criteria. + * + * A service that acts as a DataPilot data source can optionally implement this interface to allow drill-down of result data. The method this interface + * provides is used internally when calling {@link XDataPilotTable2.getDrillDownData()} or {@link XDataPilotTable2.insertDrillDownSheet()} . If the data + * source service does not implement this interface, then the aforementioned two methods will have no effect. + * @see com.sun.star.sheet.DataPilotSource + * @since OOo 3.0 + */ + interface XDrillDownDataSupplier extends uno.XInterface { + /** + * This method returns filtered subset of the original source data based on a given set of filtering criteria. + * @param aFilters filtering criteria + * @returns a filtered subset of the original source data as 2-dimensional sequences of `any` . The first row must be the header row. Each `any` instance mus + * @see com.sun.star.sheet.DataPilotFieldFilter + * @see com.sun.star.sheet.XDataPilotTable2 + */ + getDrillDownData(aFilters: LibreOffice.SeqEquiv): SafeArray; + } + + /** + * provides methods to add and remove EnhancedMouseClickHandler + * @since OOo 2.0 + */ + interface XEnhancedMouseClickBroadcaster extends uno.XInterface { + /** + * allows a component supporting the XEnhancedMouseClickHandler interface to register as listener. The component will be notified with a + * EnhancedMouseEvent every time the mouse is clicked in the spreadsheet + * @param aListener the component that is to be added as listener + * @see XEnhancedMouseClickHandler + * @see EnhancedMouseEvent The interfaces in the EnhancedMouseEvent can be XCell or XShape + * @see XShape + * @see XCell + */ + addEnhancedMouseClickHandler(aListener: awt.XEnhancedMouseClickHandler): void; + + /** + * removes a previously registered listener. + * @param aListener the component that is to be removed + */ + removeEnhancedMouseClickHandler(aListener: awt.XEnhancedMouseClickHandler): void; + } + + /** + * Primary interface for the {@link com.sun.star.sheet.ExternalDocLink} service. + * @see com.sun.star.sheet.ExternalDocLink + * @since OOo 3.1 + */ + interface XExternalDocLink extends container.XNameAccess, container.XIndexAccess, container.XEnumerationAccess { + /** + * This method adds a new sheet cache instance to the external document link for a specified sheet name. If a sheet cache instance already exists for the + * specified name, then the existing instance is returned. + * + * Note that a sheet name lookup is performed in a case-insensitive fashion. + * @param aSheetName sheet name + * @param DynamicCache specify whether or not the cache can grow when non-cached regions are queried. If `TRUE` , querying a non-cached cell in this sheet + * @returns {@link com.sun.star.sheet.XExternalSheetCache} sheet cache instance + */ + addSheetCache(aSheetName: string, DynamicCache: boolean): XExternalSheetCache; + + /** + * Index corresponding to the external document link. + * + * This index value corresponds with the external document represented by an instance of {@link com.sun.star.sheet.ExternalDocLink} . This value is + * stored within a formula token instance. + * + * Each external document cache instance has a unique index value, and this index value can be used to retrieve the corresponding external document cache + * from the parent {@link com.sun.star.sheet.ExternalDocLinks} instance. + * @see com.sun.star.sheet.ExternalDocLinks + * @see com.sun.star.sheet.FormulaToken + * @see com.sun.star.sheet.ExternalReference + */ + TokenIndex: number; + } + + /** + * Primary interface for the {@link com.sun.star.sheet.ExternalDocLinks} service. + * @see com.sun.star.sheet.ExternalDocLinks + * @since OOo 3.1 + */ + interface XExternalDocLinks extends container.XNameAccess, container.XIndexAccess, container.XEnumerationAccess { + /** + * This method adds a new external document link by its URL, and returns its instance. If a document instance already exists for the specified URL, then + * that instance gets returned instead of creating a new one. + * @param aDocName document URL (e.g. [file:///path/to/document.ods]{@link url="file:///path/to/document.ods"} ) + * @returns {@link com.sun.star.sheet.XExternalDocLink} external document link instance + */ + addDocLink(aDocName: string): XExternalDocLink; + } + + /** + * Primary interface for the {@link com.sun.star.sheet.ExternalSheetCache} service. + * @see com.sun.star.sheet.ExternalSheetCache + * @since OOo 3.1 + */ + interface XExternalSheetCache { + /** + * It returns a list of all row numbers where a cached cell or cells exist. The row numbers are sorted in ascending order. + * @returns sequence list of all row numbers with cached cell(s) + */ + readonly AllRows: SafeArray; + + /** + * Given a row number, this method returns a list of all columns numbers that store cached cell values in that row. The column numbers are sorted in + * ascending order. + * @returns sequence list of all columns numbers with cached cell values + */ + getAllColumns(nRow: number): SafeArray; + + /** + * It returns a list of all row numbers where a cached cell or cells exist. The row numbers are sorted in ascending order. + * @returns sequence list of all row numbers with cached cell(s) + */ + getAllRows(): SafeArray; + + /** + * It retrieves a cached value from a specified cell position. The cached value can be either string or double. + * @returns any cached cell value + */ + getCellValue(nColumn: number, nRow: number): any; + + /** + * It sets a cached value for a specified cell position. The value is expected to be either of type string or of type double. No other data types are + * supported. + * @param nRow row position (0-based) + * @param nColumn column position (0-based) + * @param aValue cell value to be cached + */ + setCellValue(nColumn: number, nRow: number, aValue: any): void; + + /** + * Index corresponding to this instance of an external sheet cache for usage in formula tokens. + * + * This index to the external sheet cache is expected in the {@link SingleReference.Sheet} member if it is part of an external reference token. + * + * Each external sheet cache has a unique index value inside the {@link ExternalDocLink} instance. + * @see FormulaToken + * @see ExternalReference + */ + TokenIndex: number; + } + + /** + * provides a method to set an external name at the sheet. + * + * An external reference in a cell formula is implemented using a hidden sheet which is linked to the sheet in the external document. The name of the + * hidden sheet is composed of the URL of the external document and the external sheet name. + * @since OOo 3.0 + */ + interface XExternalSheetName extends uno.XInterface { + /** + * sets an external name at the sheet. + * + * This method allows to compose the sheet name from the URL of the external document and the name of the external sheet. + * @param aUrl the URL of the external document. + * @param aSheetName the name of the sheet in the external document. + * @throws com::sun::star::container::ElementExistException a sheet with that external name already exists in this document + */ + setExternalName(aUrl: string, aSheetName: string): void; + } + + /** @deprecated Deprecated */ + interface XFillAcrossSheet extends uno.XInterface { + /** copies data between ranges onto different sheets in the document. */ + fillAcrossSheets(nContentFlags: number): void; + } + + /** Extends the interface {@link XFormulaParser} by an attribute that specifies the namespace URL of the supported formula language. */ + interface XFilterFormulaParser extends XFormulaParser { + /** Specifies the namespace URL of the formula language supported by this implementation. */ + SupportedNamespace: string; + } + + /** gives access to spreadsheet compiler token interns. */ + interface XFormulaOpCodeMapper { + /** + * returns a sequence of map entries for all available elements of a given formula language. + * @param Language Formula language to be used, one of {@link FormulaLanguage} constants. If a constant unknown to the implementation is passed, {@link com + * @param Groups Group of mappings to be returned, a bit mask of {@link FormulaMapGroup} constants. + * @returns Sequence of {@link FormulaOpCodeMapEntry} . Each element of the formula language in parameter Language is mapped to a {@link FormulaToken} conta + */ + getAvailableMappings(Language: number, Groups: number): SafeArray; + + /** + * returns a sequence of tokens matching the input sequence of strings in order. + * @param Names Sequence of names to be mapped. These can be function names, operators, separators and other symbols the formula compiler knows. + * @param Language Formula language to be used, one of {@link FormulaLanguage} constants. If a constant unknown to the implementation is passed, {@link com + * @returns a sequence of {@link FormulaToken} matching the input sequence in order. Each string element in parameter Names according to the formula languag + */ + getMappings(Names: LibreOffice.SeqEquiv, Language: number): SafeArray; + + /** + * OpCode value used for external Add-In functions. + * + * Needed to be able to identify which of the function names map to an Add-In implementation where this OpCode is used in the returned mapping and the + * programmatic name is available as additional information. + */ + OpCodeExternal: number; + + /** + * OpCode value used for unknown functions. + * + * Used to identify which of the function names queried with {@link getMappings()} are unknown to the implementation. + */ + OpCodeUnknown: number; + } + + /** converts between text and token representations of formulas. */ + interface XFormulaParser { + /** parses a formula into a sequence of tokens. */ + parseFormula(aFormula: string, aReferencePos: table.CellAddress): SafeArray; + + /** converts a formula into a string. */ + printFormula(aTokens: LibreOffice.SeqEquiv, aReferencePos: table.CellAddress): string; + } + + /** + * provides methods to query cells for dependencies in formulas. + * + * All methods return a collection of cell ranges. + * @see com.sun.star.sheet.SheetRangesQuery + * @see com.sun.star.sheet.SheetCellRanges + */ + interface XFormulaQuery extends uno.XInterface { + /** + * queries all dependent formula cells. + * + * Dependent cells are cells containing formulas with references to the original cell. + * @param bRecursive `FALSE` = queries cells dependent from the original range(s), `TRUE` = repeats query with all found cells (finds dependents of depende + * @returns all dependent cells of any formula cell of the current cell range(s). + */ + queryDependents(bRecursive: boolean): XSheetCellRanges; + + /** + * queries all precedent cells. + * + * Precedent cells are cells which are referenced from a formula cell. + * @param bRecursive `FALSE` = queries precedent cells of the original range(s), `TRUE` = repeats query with all found cells (finds precedents of precedent + * @returns all precedent cells of any formula cell of the current cell range(s). + */ + queryPrecedents(bRecursive: boolean): XSheetCellRanges; + } + + /** gives access to a formula as token sequence. */ + interface XFormulaTokens { + /** returns the formula as sequence of tokens. */ + getTokens(): SafeArray; + + /** sets the formula as sequence of tokens. */ + setTokens(aTokens: LibreOffice.SeqEquiv): void; + + /** returns the formula as sequence of tokens. */ + Tokens: SafeArray; + } + + /** + * allows generic access to all spreadsheet functions. + * @see com.sun.star.sheet.FunctionAccess + */ + interface XFunctionAccess extends uno.XInterface { + /** + * calls a function and returns the result of the call. + * @param aName the (programmatic) name of the function. + * @param aArguments the arguments for the function call. Each element must be of one of the following types: **long or double**: for a numeric value.; + * @returns the result of the function call. Possible types for the result are: **VOID**: if no result is available.; **double**: for a numeric result.; + * @throws com::sun::star::container::NoSuchElementException if the named function does not exist. + * @throws com::sun::star::lang::IllegalArgumentException if the function can not be called with these arguments. + */ + callFunction(aName: string, aArguments: LibreOffice.SeqEquiv): any; + } + + /** + * provides access to the property sequence of a function description via function index or identifier. + * + * The container access methods return a sequence of {@link com.sun.star.beans.PropertyValue} structs. The properties contained in the sequence are + * collected in the service {@link FunctionDescription} . + * @see com.sun.star.sheet.FunctionDescriptions + */ + interface XFunctionDescriptions extends container.XIndexAccess { + /** + * finds a function description by the identifier of the function. + * @param nId is the identifier of the function description (the same that is used in the service {@link RecentFunctions} . + * @returns the sequence of property values (described in {@link FunctionDescription} ). + */ + getById(nId: number): SafeArray; + } + + /** @since LibreOffice 4.1 */ + interface XGlobalSheetSettings { + /** specifies whether automatic completion of text in a cell is used. */ + DoAutoComplete: boolean; + + /** specifies whether the enter key can be used to start editing a cell. */ + EnterEdit: boolean; + + /** specifies whether formula references are extended when cells are inserted below or to the right of them. */ + ExpandReferences: boolean; + + /** specifies whether cell formatting is extended when entering data. */ + ExtendFormat: boolean; + + /** + * specifies the update mode for external linked data. + * + * 0 = always + * + * 1 = never + * + * 2 = on demand + */ + LinkUpdateMode: number; + + /** specifies whether the current selection is highlighted in column and row headers. */ + MarkHeader: boolean; + + /** + * contains the metric for all spreadsheet documents. + * @see com.sun.star.util.MeasureUnit + */ + Metric: number; + + /** + * contains the direction the cursor moves after entering cells. + * @see com.sun.star.sheet.MoveDirection + */ + MoveDirection: number; + + /** specifies whether the cursor is moved after entering into cells. */ + MoveSelection: boolean; + + /** specifies whether all sheets or only selected sheets are printed. */ + PrintAllSheets: boolean; + + /** specifies whether empty pages are printed. */ + PrintEmptyPages: boolean; + + /** specifies whether ranges are highlighted on the sheet when editing a formula. */ + RangeFinder: boolean; + + /** specifies whether a warning is shown before replacing cells (i.e. when pasting from clipboard). */ + ReplaceCellsWarning: boolean; + + /** + * contains the default scale for new spreadsheet documents (in percent). + * + * There are several special values: + * + * -1 = Optimal width + * + * -2 = Show whole page + * + * -3 = Page width + */ + Scale: number; + + /** + * contains the function that is displayed in the status bar. + * @see com.sun.star.sheet.StatusBarFunction + */ + StatusBarFunction: number; + + /** specifies whether printer metrics are used for display. */ + UsePrinterMetrics: boolean; + + /** + * contains the string lists used for sorting and filling. + * + * Each string contains the members of a list, separated by commas. + */ + UserLists: SafeArray; + + /** specifies whether the enter key moves the cursor to the column it was in before using the tab key to change columns. */ + UseTabCol: boolean; + } + + /** provides seeking a goal value for a cell. */ + interface XGoalSeek extends uno.XInterface { + /** + * calculates a value which gives a specified result in a formula. + * @param aFormulaPosition is the address of the formula cell used for the calculation. + * @param aVariablePosition is the address of the cell that is used in the formula as variable. + * @param aGoalValue is the value which should be reached during the goal seek. + * @returns the result of the goal seek, including the value that results in the specified goal, using the specified formula. + */ + seekGoal(aFormulaPosition: table.CellAddress, aVariablePosition: table.CellAddress, aGoalValue: string): GoalResult; + } + + /** + * provides access to the text contents of a header or footer on a page. + * @see com.sun.star.sheet.HeaderFooterContent + * @see com.sun.star.sheet.TablePageStyle + */ + interface XHeaderFooterContent extends uno.XInterface { + /** + * returns the text which is printed in the center part of the header or footer. + * @see com.sun.star.text.Text + */ + readonly CenterText: text.XText; + + /** + * returns the text which is printed in the center part of the header or footer. + * @see com.sun.star.text.Text + */ + getCenterText(): text.XText; + + /** + * returns the text which is printed in the left part of the header or footer. + * @see com.sun.star.text.Text + */ + getLeftText(): text.XText; + + /** + * returns the text which is printed in the right part of the header or footer. + * @see com.sun.star.text.Text + */ + getRightText(): text.XText; + + /** + * returns the text which is printed in the left part of the header or footer. + * @see com.sun.star.text.Text + */ + readonly LeftText: text.XText; + + /** + * returns the text which is printed in the right part of the header or footer. + * @see com.sun.star.text.Text + */ + readonly RightText: text.XText; + } + + /** + * provides access to the collection of hierarchies of a data pilot source dimension. + * @see com.sun.star.sheet.DataPilotSourceDimension + * @see com.sun.star.sheet.DataPilotSource + */ + interface XHierarchiesSupplier extends uno.XInterface { + /** + * returns the collection of hierarchies. + * @see com.sun.star.sheet.DataPilotSourceHierarchies + */ + getHierarchies(): container.XNameAccess; + + /** + * returns the collection of hierarchies. + * @see com.sun.star.sheet.DataPilotSourceHierarchies + */ + readonly Hierarchies: container.XNameAccess; + } + + interface XIconSetEntry { + Formula: string; + getFormula(): string; + + /** See com.sun.star.sheet.IconSetEntryType for possible values. */ + getType(): number; + setFormula(Formula: string): void; + + /** See com.sun.star.sheet.IconSetEntryType for possible values. */ + setType(Type: number): void; + + /** See com.sun.star.sheet.IconSetEntryType for possible values. */ + Type: number; + } + + /** + * provides access to the settings of a label range in a spreadsheet document. + * + * These can be column or row labels, depending on where they are used. + * @see com.sun.star.sheet.LabelRange + */ + interface XLabelRange extends uno.XInterface { + /** returns the cell range address for which the labels are valid. */ + DataArea: table.CellRangeAddress; + + /** returns the cell range address for which the labels are valid. */ + getDataArea(): table.CellRangeAddress; + + /** returns the cell range address that contains the labels. */ + getLabelArea(): table.CellRangeAddress; + + /** returns the cell range address that contains the labels. */ + LabelArea: table.CellRangeAddress; + + /** sets the cell range address for which the labels are valid. */ + setDataArea(aDataArea: table.CellRangeAddress): void; + + /** sets the cell range address that contains the labels. */ + setLabelArea(aLabelArea: table.CellRangeAddress): void; + } + + /** + * provides methods to access the members of a label range collection and to insert and remove them. + * @see com.sun.star.sheet.LabelRanges + * @see com.sun.star.sheet.LabelRange + */ + interface XLabelRanges extends container.XIndexAccess { + /** + * adds a new label range to the collection. + * @param aLabelArea the cell range containing the titles of the label range. + * @param aDataArea the cell range containing the values of the label range. + */ + addNew(aLabelArea: table.CellRangeAddress, aDataArea: table.CellRangeAddress): void; + + /** removes a label range from the collection. */ + removeByIndex(nIndex: number): void; + } + + /** + * provides access to the collection of levels of a data pilot source hierarchy. + * @see com.sun.star.sheet.DataPilotSourceHierarchy + * @see com.sun.star.sheet.DataPilotSource + */ + interface XLevelsSupplier extends uno.XInterface { + /** + * returns the collection of levels. + * @see com.sun.star.sheet.DataPilotSourceLevels + */ + getLevels(): container.XNameAccess; + + /** + * returns the collection of levels. + * @see com.sun.star.sheet.DataPilotSourceLevels + */ + readonly Levels: container.XNameAccess; + } + + /** + * is used to access named members in a data pilot source level collection. + * @see com.sun.star.sheet.DataPilotSourceMember + */ + interface XMembersAccess extends container.XNameAccess { + /** + * returns names of data pilot members in a locale independent notation. + * + * Specifically date values are represented in an ISO 8601 YYYY-MM-DD notation and date+time as YYYY-MM-DD HH:MM:SS, whereas the strings returned by + * {@link com.sun.star.container.XNameAccess.getElementNames()} may represent these in a locale dependent or user formatted notation such as MM/DD/YY or + * DD.MM.YYYY or other. + * + * The names returned by this function can NOT be used in calls to {@link com.sun.star.container.XNameAccess.getByName()} . However, the order returned + * in two immediately consecutive calls to {@link getElementNames()} and {@link getLocaleIndependentElementNames()} maps to the same elements in order. + * @returns a sequence of all element names in this container. + */ + getLocaleIndependentElementNames(): SafeArray; + + /** + * returns names of data pilot members in a locale independent notation. + * + * Specifically date values are represented in an ISO 8601 YYYY-MM-DD notation and date+time as YYYY-MM-DD HH:MM:SS, whereas the strings returned by + * {@link com.sun.star.container.XNameAccess.getElementNames()} may represent these in a locale dependent or user formatted notation such as MM/DD/YY or + * DD.MM.YYYY or other. + * + * The names returned by this function can NOT be used in calls to {@link com.sun.star.container.XNameAccess.getByName()} . However, the order returned + * in two immediately consecutive calls to {@link getElementNames()} and {@link getLocaleIndependentElementNames()} maps to the same elements in order. + * @returns a sequence of all element names in this container. + */ + readonly LocaleIndependentElementNames: SafeArray; + } + + /** + * provides access to the collection of members of a data pilot source level. + * @see com.sun.star.sheet.DataPilotSourceLevel + * @see com.sun.star.sheet.DataPilotSource + */ + interface XMembersSupplier extends uno.XInterface { + /** + * returns the collection of members. + * @see com.sun.star.sheet.DataPilotSourceMembers + */ + getMembers(): XMembersAccess; + + /** + * returns the collection of members. + * @see com.sun.star.sheet.DataPilotSourceMembers + */ + readonly Members: XMembersAccess; + } + + /** + * gives access to multiple sets of formula tokens. + * + * A service implementing this interface can internally set an arbitrary number of formula token sequences. The number of allowed formula token sequences + * must be returned by the {@link com.sun.star.sheet.XMultiFormulaTokens.getCount()} method. When the client code tries to access formula tokens at index + * that is outside the allowed index range, the implementation shall return an {@link com.sun.star.lang.IndexOutOfBoundsException} . + */ + interface XMultiFormulaTokens { + /** + * returns the number of formulas allowed in this formula token set. + * @returns the number of formulas the implementation supports. + */ + readonly Count: number; + + /** + * returns the number of formulas allowed in this formula token set. + * @returns the number of formulas the implementation supports. + */ + getCount(): number; + + /** + * returns the formula at specified index as sequence of tokens. + * @throws IndexOutOfBoundsException If the given index lies not in the valid range then an {@link com.sun.star.lang.IndexOutOfBoundsException} exception is + */ + getTokens(nIndex: number): SafeArray; + + /** + * sets the formula at specified index as sequence of tokens. + * @throws IndexOutOfBoundsException If the given index lies not in the valid range then an {@link com.sun.star.lang.IndexOutOfBoundsException} exception is + */ + setTokens(nIndex: number, aTokens: LibreOffice.SeqEquiv): void; + } + + /** provides a method to apply a Multiple Operations Table to the cell range. */ + interface XMultipleOperation extends uno.XInterface { + /** + * creates a table of formulas (a "Multiple Operations Table"). + * + * The specified formulas are repeated, with references to the specified cells replaced by references to values in the first column and/or row of the + * range. + * @param aFormulaRange the range that contains formula cells (modes TableOperationMode::ROW or TableOperationMode::COLUMN) or a single formula cell (mode + * @param nMode specifies the calculation mode to fill the cells. + * @param aColumnCell contains the address of the cell that is referenced by formulas in a row (mode TableOperationMode::ROW) or by the formula cell used f + * @param aRowCell contains the address of the cell that is referenced by formulas in a column (mode TableOperationMode::COLUMN) or by the formula cell use + */ + setTableOperation(aFormulaRange: table.CellRangeAddress, nMode: TableOperationMode, aColumnCell: table.CellAddress, aRowCell: table.CellAddress): void; + } + + /** + * provides access to the settings of a named range in a spreadsheet document. + * @see com.sun.star.sheet.NamedRange + */ + interface XNamedRange extends container.XNamed { + /** + * returns the content of the named range. + * + * The content can be a reference to a cell or cell range or any formula expression. + */ + Content: string; + + /** + * returns the content of the named range. + * + * The content can be a reference to a cell or cell range or any formula expression. + */ + getContent(): string; + + /** returns the position in the document which is used as a base for relative references in the content. */ + getReferencePosition(): table.CellAddress; + + /** + * returns the type of the named range. + * + * This is a combination of flags as defined in {@link NamedRangeFlag} . + */ + getType(): number; + + /** returns the position in the document which is used as a base for relative references in the content. */ + ReferencePosition: table.CellAddress; + + /** + * sets the content of the named range. + * + * The content can be a reference to a cell or cell range or any formula expression. + */ + setContent(aContent: string): void; + + /** sets the position in the document which is used as a base for relative references in the content. */ + setReferencePosition(aReferencePosition: table.CellAddress): void; + + /** + * sets the type of the named range. + * @param nType a combination of flags that specify the type of a named range, as defined in {@link NamedRangeFlag} . + */ + setType(nType: number): void; + + /** + * returns the type of the named range. + * + * This is a combination of flags as defined in {@link NamedRangeFlag} . + */ + Type: number; + } + + /** + * provides access to the members in a collection of named ranges and to insert and remove them. + * @see com.sun.star.sheet.NamedRanges + * @see com.sun.star.sheet.NamedRange + */ + interface XNamedRanges extends container.XNameAccess { + /** + * adds a new named range to the collection. + * @param aName the new name of the named range. + * @param aContent the formula expression. A cell range address is one possible content of a named range. + * @param aPosition specifies the base address for relative cell references. + * @param nType a combination of flags that specify the type of a named range, as defined in {@link NamedRangeFlag} . This parameter will be zero for any + */ + addNewByName(aName: string, aContent: string, aPosition: table.CellAddress, nType: number): void; + + /** + * creates named cell ranges from titles in a cell range. + * + * The names for the named ranges are taken from title cells in the top or bottom row, or from the cells of the left or right column of the range + * (depending on the parameter aBorder. The named ranges refer to single columns or rows in the inner part of the original range, excluding the labels. + * + * Example: The source range is A1:B3. The named ranges shall be created using row titles. This requires Border::TOP for the second parameter. The method + * creates two named ranges. The name of the first is equal to the content of cell A1 and contains the range $Sheet.$A$2:$A$3 (excluding the title cell). + * The latter named range is named using cell B1 and contains the cell range address $Sheet.$B$2:$B$3. + * @param aSource the cell range used to create the named ranges. + * @param aBorder specifies the location of the title cells. + */ + addNewFromTitles(aSource: table.CellRangeAddress, aBorder: Border): void; + + /** + * writes a list of all named ranges into the document. + * + * The first column of the list contains the names. The second column contains the contents of the named ranges. + * @param aOutputPosition specifies the top left cell of the output range. + */ + outputList(aOutputPosition: table.CellAddress): void; + + /** removes a named range from the collection. */ + removeByName(aName: string): void; + } + + /** represents a sheet which has print areas. */ + interface XPrintAreas extends uno.XInterface { + /** returns a sequence containing all print areas of the sheet. */ + getPrintAreas(): SafeArray; + + /** returns, whether the title columns are repeated on all subsequent print pages to the right. */ + getPrintTitleColumns(): boolean; + + /** returns, whether the title rows are repeated on all subsequent print pages to the bottom. */ + getPrintTitleRows(): boolean; + + /** + * returns the range that is specified as title columns range. + * + * Title columns can be automatically repeated on all subsequent print pages to the right, using {@link XPrintAreas.setPrintTitleColumns()} . + * @returns the range of columns that is specified as title columns range. + */ + getTitleColumns(): table.CellRangeAddress; + + /** + * returns the range that is specified as title rows range. + * + * Title rows can be automatically repeated on all subsequent print pages to the bottom, using {@link XPrintAreas.setPrintTitleRows()} . + * @returns the range of rows that is specified as title rows range. + */ + getTitleRows(): table.CellRangeAddress; + + /** returns a sequence containing all print areas of the sheet. */ + PrintAreas: SafeArray; + + /** returns, whether the title columns are repeated on all subsequent print pages to the right. */ + PrintTitleColumns: boolean; + + /** returns, whether the title rows are repeated on all subsequent print pages to the bottom. */ + PrintTitleRows: boolean; + + /** + * sets the print areas of the sheet. + * + * If none of the sheets in a document have print areas, the whole sheets are printed. If any sheet contains print areas, other sheets without print + * areas are not printed. + * @param aPrintAreas a sequence containing all print areas for this sheet. + */ + setPrintAreas(aPrintAreas: LibreOffice.SeqEquiv): void; + + /** + * specifies whether the title columns are repeated on all subsequent print pages to the right. + * @param bPrintTitleColumns if `TRUE` , title columns are repeated on each page. + */ + setPrintTitleColumns(bPrintTitleColumns: boolean): void; + + /** + * specifies whether the title rows are repeated on all subsequent print pages to the bottom. + * @param bPrintTitleRows if `TRUE` , title rows are repeated on each page. + */ + setPrintTitleRows(bPrintTitleRows: boolean): void; + + /** + * specifies a range of columns as title columns range. + * + * The rows of the passed range are ignored. + * + * Title columns can be automatically repeated on all subsequent print pages to the right, using {@link XPrintAreas.setPrintTitleColumns()} . + * @param aTitleColumns the title columns range. + */ + setTitleColumns(aTitleColumns: table.CellRangeAddress): void; + + /** + * specifies a range of rows as title rows range. + * + * The columns of the passed range are ignored. + * + * Title rows can be automatically repeated on all subsequent print pages to the bottom, using {@link XPrintAreas.setPrintTitleRows()} . + * @param aTitleRows the title rows range. + */ + setTitleRows(aTitleRows: table.CellRangeAddress): void; + + /** + * returns the range that is specified as title columns range. + * + * Title columns can be automatically repeated on all subsequent print pages to the right, using {@link XPrintAreas.setPrintTitleColumns()} . + * @returns the range of columns that is specified as title columns range. + */ + TitleColumns: table.CellRangeAddress; + + /** + * returns the range that is specified as title rows range. + * + * Title rows can be automatically repeated on all subsequent print pages to the bottom, using {@link XPrintAreas.setPrintTitleRows()} . + * @returns the range of rows that is specified as title rows range. + */ + TitleRows: table.CellRangeAddress; + } + + /** + * allows to let the user to select a cell range. + * @see com.sun.star.sheet.SpreadsheetView + */ + interface XRangeSelection extends uno.XInterface { + /** aborts the range selection. */ + abortRangeSelection(): void; + + /** adds a listener that is notified when the selected range is changed. */ + addRangeSelectionChangeListener(aListener: XRangeSelectionChangeListener): void; + + /** adds a listener that is notified when range selection is completed or aborted. */ + addRangeSelectionListener(aListener: XRangeSelectionListener): void; + + /** removes the specified listener. */ + removeRangeSelectionChangeListener(aListener: XRangeSelectionChangeListener): void; + + /** removes the specified listener. */ + removeRangeSelectionListener(aListener: XRangeSelectionListener): void; + + /** + * starts the range selection. + * @param aArguments the {@link RangeSelectionArguments} that specify how the range selection is done. + */ + startRangeSelection(aArguments: LibreOffice.SeqEquiv): void; + } + + /** + * allows notification when the selected range is changed. + * @see com.sun.star.sheet.XRangeSelection + */ + interface XRangeSelectionChangeListener extends lang.XEventListener { + /** is called when the selected range is changed while range selection is active. */ + descriptorChanged(aEvent: RangeSelectionEvent): void; + } + + /** + * allows notification when range selection is completed or aborted. + * @see com.sun.star.sheet.XRangeSelection + */ + interface XRangeSelectionListener extends lang.XEventListener { + /** is called when range selection is aborted. */ + aborted(aEvent: RangeSelectionEvent): void; + + /** is called when range selection is completed. */ + done(aEvent: RangeSelectionEvent): void; + } + + /** + * provides access to a list of recently used functions. + * @see com.sun.star.sheet.RecentFunctions + */ + interface XRecentFunctions extends uno.XInterface { + /** returns the maximum number of entries that will be stored as recently used functions. */ + getMaxRecentFunctions(): number; + + /** + * returns a sequence of those functions that were most recently used. + * + * The functions are represented by their identifiers. + * @returns the sequence of function identifiers most recently used. + */ + getRecentFunctionIds(): SafeArray; + + /** returns the maximum number of entries that will be stored as recently used functions. */ + readonly MaxRecentFunctions: number; + + /** + * returns a sequence of those functions that were most recently used. + * + * The functions are represented by their identifiers. + * @returns the sequence of function identifiers most recently used. + */ + RecentFunctionIds: SafeArray; + + /** + * sets the list of those functions that were most recently used. + * + * The functions are represented by their identifiers. + * @param aRecentFunctionIds the sequence of function identifiers most recently used. + */ + setRecentFunctionIds(aRecentFunctionIds: LibreOffice.SeqEquiv): void; + } + + /** + * allows notification when a new volatile function result is available. + * @see com.sun.star.sheet.XVolatileResult + */ + interface XResultListener extends lang.XEventListener { + /** is called when a new value is available. */ + modified(aEvent: ResultEvent): void; + } + + /** + * provides access to the settings of a scenario sheet. + * @see com.sun.star.sheet.Spreadsheet + */ + interface XScenario extends uno.XInterface { + /** adds more ranges to the scenario. */ + addRanges(aRanges: LibreOffice.SeqEquiv): void; + + /** + * applies the scenario. + * + * The contents of the scenario ranges are copied into the first non-scenario sheet which is in front of the sheet containing the scenario by itself. + */ + apply(): void; + + /** returns `TRUE` if the current object is a scenario. */ + getIsScenario(): boolean; + + /** returns the comment for the scenario. */ + getScenarioComment(): string; + + /** returns `TRUE` if the current object is a scenario. */ + readonly IsScenario: boolean; + + /** returns the comment for the scenario. */ + ScenarioComment: string; + + /** sets a new comment for the scenario. */ + setScenarioComment(aScenarioComment: string): void; + } + + /** + * provides enhanced access to the settings of a scenario sheet. + * @see com.sun.star.sheet.Spreadsheet + * @see com.sun.star.sheet.Scenario + * @see com.sun.star.sheet.XScenario + * @since OOo 2.0 + */ + interface XScenarioEnhanced extends uno.XInterface { + /** gets the ranges to the scenario. */ + getRanges(): SafeArray; + + /** gets the ranges to the scenario. */ + readonly Ranges: SafeArray; + } + + /** + * provides access via name to the scenarios in a collection and inserting and removing scenarios. + * @see com.sun.star.sheet.Scenarios + * @see com.sun.star.sheet.Spreadsheet + */ + interface XScenarios extends container.XNameAccess { + /** + * creates a new scenario and adds it to the collection. + * @param aName the name of the scenario (used i.e. for collection access). + * @param aRanges the cell ranges contained in the scenario. + * @param aComment the user defined comment for the scenario. + */ + addNewByName(aName: string, aRanges: LibreOffice.SeqEquiv, aComment: string): void; + + /** removes a scenario from the collection. */ + removeByName(aName: string): void; + } + + /** provides access to a collection of scenarios. */ + interface XScenariosSupplier extends uno.XInterface { + /** + * returns the collection of scenarios. + * @see com.sun.star.sheet.Scenarios + */ + getScenarios(): XScenarios; + + /** + * returns the collection of scenarios. + * @see com.sun.star.sheet.Scenarios + */ + readonly Scenarios: XScenarios; + } + + /** @since LibreOffice 3.5 */ + interface XSelectedSheetsSupplier extends uno.XInterface { + /** returns the indices of currently selected sheets. Sheet indices are 0-based. */ + getSelectedSheets(): SafeArray; + + /** returns the indices of currently selected sheets. Sheet indices are 0-based. */ + readonly SelectedSheets: SafeArray; + } + + /** + * provides methods to query data of the annotation and to show and hide it. + * @see com.sun.star.sheet.CellAnnotation + */ + interface XSheetAnnotation extends uno.XInterface { + /** returns the name of the user who last changed the annotation. */ + readonly Author: string; + + /** returns a formatted string representing the date when the annotation was last changed. */ + readonly Date: string; + + /** returns the name of the user who last changed the annotation. */ + getAuthor(): string; + + /** returns a formatted string representing the date when the annotation was last changed. */ + getDate(): string; + + /** returns, whether the annotation is permanently visible. */ + getIsVisible(): boolean; + + /** returns the position of cell in the spreadsheet document that contains this annotation. */ + getPosition(): table.CellAddress; + + /** returns, whether the annotation is permanently visible. */ + IsVisible: boolean; + + /** returns the position of cell in the spreadsheet document that contains this annotation. */ + readonly Position: table.CellAddress; + + /** specifies whether the annotation is permanently visible. */ + setIsVisible(bIsVisible: boolean): void; + } + + /** + * provides access to a cell annotation attached to a spreadsheet cell. + * @see com.sun.star.sheet.SheetCell + * @see com.sun.star.sheet.CellAnnotation + */ + interface XSheetAnnotationAnchor extends uno.XInterface { + /** returns the annotation at this anchor. */ + readonly Annotation: XSheetAnnotation; + + /** returns the annotation at this anchor. */ + getAnnotation(): XSheetAnnotation; + } + + /** + * provides methods to access cell annotations via index and to insert and remove annotations. + * @see com.sun.star.sheet.CellAnnotation + * @see com.sun.star.sheet.SheetCell + */ + interface XSheetAnnotations extends container.XIndexAccess { + /** + * creates a new annotation. + * + * This method creates a new annotation object, attaches it to the specified cell and inserts it into the collection. + * @param aPosition contains the address of the cell that will contain the annotation. + * @param aText contains the annotation text. + */ + insertNew(aPosition: table.CellAddress, aText: string): void; + + /** + * removes a cell annotation from the collection. + * + * This method removes the annotation from its cell and from the collection. + * @param nIndex is the index of the annotation in the collection. + */ + removeByIndex(nIndex: number): void; + } + + /** + * provides methods to get the shape of o annotation + * @see com.sun.star.sheet.CellAnnotation + * @see com.sun.star.sheet.CellAnnotationShape + */ + interface XSheetAnnotationShapeSupplier extends uno.XInterface { + /** returns the shape of the annotation */ + readonly AnnotationShape: drawing.XShape; + + /** returns the shape of the annotation */ + getAnnotationShape(): drawing.XShape; + } + + /** provides access to a collection of cell annotations. */ + interface XSheetAnnotationsSupplier extends uno.XInterface { + /** + * returns the collection of cell annotations. + * @see com.sun.star.sheet.CellAnnotations + */ + readonly Annotations: XSheetAnnotations; + + /** + * returns the collection of cell annotations. + * @see com.sun.star.sheet.CellAnnotations + */ + getAnnotations(): XSheetAnnotations; + } + + /** provides methods to access auditing (detective) features in a spreadsheet. */ + interface XSheetAuditing extends uno.XInterface { + /** removes all auditing arrows from the spreadsheet. */ + clearArrows(): void; + + /** + * removes arrows for one level of dependents of a formula cell. + * + * If the method is executed again for the same cell, the previous level of dependent cells is removed. + * @param aPosition the address of the formula cell. + */ + hideDependents(aPosition: table.CellAddress): boolean; + + /** + * removes arrows for one level of precedents of a formula cell. + * + * If the method is executed again for the same cell, the previous level of dependent cells is removed. + * @param aPosition the address of the formula cell. + */ + hidePrecedents(aPosition: table.CellAddress): boolean; + + /** + * draws arrows between a formula cell and its dependents. + * + * If the method is executed again for the same cell, the next level of dependent cells is marked. + * @param aPosition the address of the formula cell. + */ + showDependents(aPosition: table.CellAddress): boolean; + + /** draws arrows between a formula cell containing an error and the cells causing the error. */ + showErrors(aPosition: table.CellAddress): boolean; + + /** marks all cells containing invalid values. */ + showInvalid(): boolean; + + /** + * draws arrows between a formula cell and its precedents. + * + * If the method is executed again for the same cell, the next level of dependent cells is marked. + * @param aPosition the address of the formula cell. + */ + showPrecedents(aPosition: table.CellAddress): boolean; + } + + /** + * provides advanced methods to control the position of a cursor in a spreadsheet. + * @see com.sun.star.sheet.SheetCellCursor + */ + interface XSheetCellCursor extends XSheetCellRange { + /** + * collapses the cursor into the range of the array formula to which it is currently pointing. + * + * To get the correct result, the top left cell of the original cursor must point to any cell containing an array formula. If not, the cursor is left + * unchanged. + */ + collapseToCurrentArray(): void; + + /** + * expands the cursor into the region containing the cells to which it currently points. + * + * A region is a cell range bounded by empty cells. + */ + collapseToCurrentRegion(): void; + + /** + * expands the cursor to merged cell ranges. + * + * Expands the current cursor range in a way so that all merged cell ranges intersecting the current range will fit completely. If the cursor does not + * point to any range with merged cells, it is left unchanged. + */ + collapseToMergedArea(): void; + + /** + * changes the size of a cursor range. + * + * The top left cell of the cursor keeps unmodified. + * @param nColumns the number of columns of the new cursor range. + * @param nRows the number of rows of the new cursor range. + */ + collapseToSize(nColumns: number, nRows: number): void; + + /** expands the cursor to include the entire columns of the cells to which it is currently pointing. */ + expandToEntireColumns(): void; + + /** expands the cursor to include the entire rows of the cells to which it is currently pointing. */ + expandToEntireRows(): void; + } + + /** + * provides access to the spreadsheet that contains a cell range. + * @see com.sun.star.sheet.SheetCellRange + */ + interface XSheetCellRange extends table.XCellRange { + /** + * returns the spreadsheet interface which contains the cell range. + * @returns a {@link Spreadsheet} object. + * @see com.sun.star.sheet.SheetCellRange + * @see com.sun.star.sheet.SheetCellRanges + */ + getSpreadsheet(): XSpreadsheet; + + /** + * returns the spreadsheet interface which contains the cell range. + * @returns a {@link Spreadsheet} object. + * @see com.sun.star.sheet.SheetCellRange + * @see com.sun.star.sheet.SheetCellRanges + */ + readonly Spreadsheet: XSpreadsheet; + } + + /** + * provides methods to access cell ranges in a collection via index and to add and remove cell ranges. + * @see com.sun.star.sheet.SheetCellRanges + */ + interface XSheetCellRangeContainer extends XSheetCellRanges { + /** + * adds the given range to the collection of cell ranges. + * @param aCellRangeAddress contains the address of the new range. + * @param bMergeRanges defines how the range should be added. To merge the ranges takes more time, but the memory usage is lower. + */ + addRangeAddress(aCellRangeAddress: table.CellRangeAddress, bMergeRanges: boolean): void; + + /** + * adds the given ranges to the collection of cell ranges. + * @param aCellRangeAddresses contains a sequence of addresses of all new ranges. + * @param bMergeRanges defines how the ranges should be added. To merge the ranges takes more time, but the memory usage is lower. + */ + addRangeAddresses(aCellRangeAddresses: LibreOffice.SeqEquiv, bMergeRanges: boolean): void; + + /** + * removes the given range from the collection of cell ranges. + * @param aCellRangeAddress contains the address of the range to be removed. The specified range must fit exactly to an element of the collection. The met + * @throws com::sun::star::container::NoSuchElementException if the collection does not contain the specified range. + */ + removeRangeAddress(aCellRangeAddress: table.CellRangeAddress): void; + + /** + * removes the given ranges from the collection of cell ranges. + * @param aCellRangeAddresses contains a sequence of addresses of all ranges to be removed. All specified ranges must fit exactly to elements of the colle + * @throws com::sun::star::container::NoSuchElementException if the collection does not contain any of the specified ranges. + */ + removeRangeAddresses(aCellRangeAddresses: LibreOffice.SeqEquiv): void; + } + + /** + * provides methods to access cell ranges in a collection via index and other helper methods. + * @see com.sun.star.sheet.SheetCellRanges + */ + interface XSheetCellRanges extends container.XIndexAccess { + /** + * returns the collection of all used cells. + * @see com.sun.star.sheet.Cells + */ + readonly Cells: container.XEnumerationAccess; + + /** + * returns the collection of all used cells. + * @see com.sun.star.sheet.Cells + */ + getCells(): container.XEnumerationAccess; + + /** + * creates a sequence with addresses of all contained cell ranges. + * @returns a sequence with the addresses of all cell ranges. + */ + getRangeAddresses(): SafeArray; + + /** + * creates a string with addresses of all contained cell ranges. + * + * The range addresses are separated with semicolons. For instance the string could have the form "Sheet1.A1:C3;Sheet2.D5:F8". + * @returns a string containing the addresses of all cell ranges. + */ + getRangeAddressesAsString(): string; + + /** + * creates a sequence with addresses of all contained cell ranges. + * @returns a sequence with the addresses of all cell ranges. + */ + readonly RangeAddresses: SafeArray; + + /** + * creates a string with addresses of all contained cell ranges. + * + * The range addresses are separated with semicolons. For instance the string could have the form "Sheet1.A1:C3;Sheet2.D5:F8". + * @returns a string containing the addresses of all cell ranges. + */ + readonly RangeAddressesAsString: string; + } + + /** + * provides methods to access the settings of a condition in a conditional format or data validation. + * @see com.sun.star.sheet.TableConditionalEntry + * @see com.sun.star.sheet.TableValidation + */ + interface XSheetCondition extends uno.XInterface { + /** + * returns either the comparison value, which is used in the condition, or the first value if two values are needed for the operator. + * @returns a formula, a numeric constant, or a string constant in quotes. + */ + Formula1: string; + + /** + * if two values are needed for the operator, this method returns the second one. + * @returns a formula, a numeric constant, or a string constant in quotes. + */ + Formula2: string; + + /** + * returns either the comparison value, which is used in the condition, or the first value if two values are needed for the operator. + * @returns a formula, a numeric constant, or a string constant in quotes. + */ + getFormula1(): string; + + /** + * if two values are needed for the operator, this method returns the second one. + * @returns a formula, a numeric constant, or a string constant in quotes. + */ + getFormula2(): string; + + /** returns the operator in the condition. */ + getOperator(): ConditionOperator; + + /** returns the position in the document which is used as a base for relative references in the formulas. */ + getSourcePosition(): table.CellAddress; + + /** returns the operator in the condition. */ + Operator: ConditionOperator; + + /** + * sets either the comparison value, which is used in the condition, or the first value if two values are needed for the operator. + * @param aFormula1 a formula, a numeric constant, or a string constant in quotes. + */ + setFormula1(aFormula1: string): void; + + /** + * if two values are needed for the operator, this method sets the second one. + * @param aFormula2 a formula, a numeric constant, or a string constant in quotes. + */ + setFormula2(aFormula2: string): void; + + /** sets the operator in the condition. */ + setOperator(nOperator: ConditionOperator): void; + + /** sets the position in the document which is used as a base for relative references in the formulas. */ + setSourcePosition(aSourcePosition: table.CellAddress): void; + + /** returns the position in the document which is used as a base for relative references in the formulas. */ + SourcePosition: table.CellAddress; + } + + /** + * provides methods to access the settings of a condition in a conditional format or data validation. + * @see com.sun.star.sheet.TableConditionalEntry + * @see com.sun.star.sheet.TableValidation + * @see com.sun.star.sheet.XSheetCondition + */ + interface XSheetCondition2 extends XSheetCondition { + /** returns the operator in the condition (new interface). */ + ConditionOperator: number; + + /** returns the operator in the condition (new interface). */ + getConditionOperator(): number; + + /** sets the operator in the condition (new interface). */ + setConditionOperator(nOperator: number): void; + } + + /** + * provides methods to add and remove conditions of a conditional format. + * @see com.sun.star.sheet.TableConditionalFormat + * @see com.sun.star.sheet.TableConditionalEntry + */ + interface XSheetConditionalEntries extends container.XIndexAccess { + /** + * adds a conditional entry to the format. + * + * Supported properties are: + * + * **ConditionOperator Operator **: contains the operation to perform for this condition.; + * + * **string Formula1 **: contains the value or formula for the operation.; + * + * **string Formula2 **: contains the second value or formula for the operation (used with ConditionOperator::BETWEEN or ConditionOperator::NOT_BETWEEN + * operations).; + * + * **com::sun::star::table::CellAddress SourcePosition **: contains the base address for relative cell references in formulas.; + * + * **string StyleName **: contains the name of the cell style used by this condition. + * @see com.sun.star.sheet.TableConditionalFormat + */ + addNew(aConditionalEntry: LibreOffice.SeqEquiv): void; + + /** clears all condition entries. */ + clear(): void; + + /** removes a conditional entry from the format. */ + removeByIndex(nIndex: number): void; + } + + /** + * provides methods to access the cell style name for a condition in a conditional format. + * @see com.sun.star.sheet.TableConditionalEntry + */ + interface XSheetConditionalEntry extends uno.XInterface { + /** returns the name of the cell style that is used when the condition is fulfilled. */ + getStyleName(): string; + + /** sets the name of the cell style that is used when the condition is fulfilled. */ + setStyleName(aStyleName: string): void; + + /** returns the name of the cell style that is used when the condition is fulfilled. */ + StyleName: string; + } + + /** + * represents something that can be filtered using an {@link XSheetFilterDescriptor} . + * @see com.sun.star.sheet.XSheetFilterableEx + */ + interface XSheetFilterable extends uno.XInterface { + /** + * creates a filter descriptor. + * @param bEmpty if set to `TRUE` , creates an empty filter descriptor. If set to `FALSE` , fills the filter descriptor with previous settings of the curre + */ + createFilterDescriptor(bEmpty: boolean): XSheetFilterDescriptor; + + /** + * performs a filter operation, using the settings of the passed filter descriptor. + * @param xDescriptor the settings for the filter operation. + */ + filter(xDescriptor: XSheetFilterDescriptor): void; + } + + /** + * represents something from which criteria for filtering can be read. + * + * In general the current object will be used only to create the descriptor to filter another object, i.e. the advanced filter feature in a spreadsheet. + * @see com.sun.star.sheet.SheetCellRange + */ + interface XSheetFilterableEx extends XSheetFilterable { + /** creates a filter descriptor for the specified filterable object from the contents of this object. */ + createFilterDescriptorByObject(xObject: XSheetFilterable): XSheetFilterDescriptor; + } + + /** + * provides access to a collection of filter conditions (filter fields). + * @see SheetFilterDescriptor + */ + interface XSheetFilterDescriptor extends uno.XInterface { + /** returns the collection of filter fields. */ + FilterFields: SafeArray; + + /** returns the collection of filter fields. */ + getFilterFields(): SafeArray; + + /** sets a new collection of filter fields. */ + setFilterFields(aFilterFields: LibreOffice.SeqEquiv): void; + } + + /** + * provides access to a collection of filter conditions (filter fields). + * + * This interface uses the {@link TableFilterField2} struct, whereas the {@link XSheetFilterDescriptor} interface uses the {@link TableFilterField} + * struct. + * @see SheetFilterDescriptor + * @since OOo 3.2 + */ + interface XSheetFilterDescriptor2 extends uno.XInterface { + /** returns the collection of filter fields. */ + FilterFields2: SafeArray; + + /** returns the collection of filter fields. */ + getFilterFields2(): SafeArray; + + /** sets a new collection of filter fields. */ + setFilterFields2(aFilterFields: LibreOffice.SeqEquiv): void; + } + + /** + * provides access to a collection of filter conditions (filter fields). + * + * This interface uses the {@link TableFilterField3} struct. whereas the {@link XSheetFilterDescriptor2} interface uses the {@link TableFilterField2} + * struct. + * @see SheetFilterDescriptor2 + * @since LibreOffice 3.5 + */ + interface XSheetFilterDescriptor3 extends uno.XInterface { + /** returns the collection of filter fields. */ + FilterFields3: SafeArray; + + /** returns the collection of filter fields. */ + getFilterFields3(): SafeArray; + + /** sets a new collection of filter fields. */ + setFilterFields3(aFilterFields: LibreOffice.SeqEquiv): void; + } + + /** + * enables a sheet to refer to another sheet in a different document. + * + * To insert a sheet link, the sheet used as linked sheet has to exist already. The method {@link XSheetLinkable.link()} creates a {@link SheetLink} + * object in the document's {@link SheetLinks} collection and links the sheet to the specified external sheet. + * @deprecated Deprecated + * @see com.sun.star.sheet.SheetLinks + * @see com.sun.star.sheet.SheetLink + */ + interface XSheetLinkable extends uno.XInterface { + /** + * returns the link mode of the spreadsheet. + * + * If the returned value is SheetLinkMode::NORMAL, formulas are copied. With SheetLinkMode::VALUE, only results of formulas are used. + */ + getLinkMode(): SheetLinkMode; + + /** returns the sheet name of the sheet in the source document. */ + getLinkSheetName(): string; + + /** returns the target URL of the link. */ + getLinkUrl(): string; + + /** + * links the sheet to another sheet in another document. + * + * A {@link SheetLink} object is created if it does not exist, and the link mode, the URL of the linked document and the linked sheet name are set. + */ + link(aUrl: string, aSheetName: string, aFilterName: string, aFilterOptions: string, nMode: SheetLinkMode): void; + + /** + * returns the link mode of the spreadsheet. + * + * If the returned value is SheetLinkMode::NORMAL, formulas are copied. With SheetLinkMode::VALUE, only results of formulas are used. + */ + LinkMode: SheetLinkMode; + + /** returns the sheet name of the sheet in the source document. */ + LinkSheetName: string; + + /** returns the target URL of the link. */ + LinkUrl: string; + + /** + * enables the linking of the sheet and controls whether formulas are copied. + * @param nLinkMode the value specifying the link mode for this spreadsheet. If the value is SheetLinkMode::NORMAL, formulas are copied. With SheetLinkMod + */ + setLinkMode(nLinkMode: SheetLinkMode): void; + + /** + * sets the name of the linked sheet in the source document. + * + * This method sets the sheet name in the {@link SheetLink} object, it does not modify the sheet name in the source document. + */ + setLinkSheetName(aLinkSheetName: string): void; + + /** + * sets the target URL of the link. + * + * A {@link SheetLink} object with the same file name must exist already or the link will not work. + */ + setLinkUrl(aLinkUrl: string): void; + } + + /** + * provides methods to execute operations on a cell range or ranges. + * @see com.sun.star.sheet.SheetCellRange + * @see com.sun.star.sheet.SheetCellRanges + */ + interface XSheetOperation extends uno.XInterface { + /** + * clears the specified contents of the current cell range(s). + * @param nContentFlags a combination of {@link CellFlags} flags selecting the contents to be deleted. + */ + clearContents(nContentFlags: number): void; + + /** + * computes a general function based on all cells in the current cell range(s). + * @param nFunction is the function used to compute the result. + * @returns the result of the calculation. + */ + computeFunction(nFunction: GeneralFunction): number; + } + + /** provides methods to access the outlines of a sheet. */ + interface XSheetOutline extends uno.XInterface { + /** + * creates outline groups from formula references in a range. + * @param aRange the cell range for which outlines are generated. + */ + autoOutline(aRange: table.CellRangeAddress): void; + + /** removes all outline groups from the sheet. */ + clearOutline(): void; + + /** + * creates an outline group. + * @param aRange contains the range of rows or columns, depending on the parameter nOrientation. + * @param nOrientation the orientation of the new outline (columns or rows). + */ + group(aRange: table.CellRangeAddress, nOrientation: table.TableOrientation): void; + + /** + * collapses an outline group. + * @param aRange the cell range for which the outlines are collapsed. + */ + hideDetail(aRange: table.CellRangeAddress): void; + + /** + * reopens an outline group. + * @param aRange the cell range for which the outlines are reopened. + */ + showDetail(aRange: table.CellRangeAddress): void; + + /** + * shows all outlined groups below a specific level. + * @param nLevel all outline levels from 1 to this value will be opened and the higher levels will be closed. + * @param nOrientation the orientation of the outlines (columns or rows). + */ + showLevel(nLevel: number, nOrientation: table.TableOrientation): void; + + /** + * removes outline groups. + * + * In the specified range, all outline groups on the innermost level are removed. + * @param aRange contains the range of rows or columns, depending on the parameter nOrientation. + * @param nOrientation the orientation of the outlines to remove (columns or rows). + */ + ungroup(aRange: table.CellRangeAddress, nOrientation: table.TableOrientation): void; + } + + /** + * provides access to page breaks in a sheet. + * @deprecated Deprecated + */ + interface XSheetPageBreak extends uno.XInterface { + /** + * returns a sequence of descriptions of all horizontal page breaks on the sheet. + * + * This includes manual and automatic page breaks. To add or remove manual breaks, use the {@link com.sun.star.table.TableColumn.IsStartOfNewPage} + * property of the column. + * @returns a sequence of structs containing column page break data. + */ + readonly ColumnPageBreaks: SafeArray; + + /** + * returns a sequence of descriptions of all horizontal page breaks on the sheet. + * + * This includes manual and automatic page breaks. To add or remove manual breaks, use the {@link com.sun.star.table.TableColumn.IsStartOfNewPage} + * property of the column. + * @returns a sequence of structs containing column page break data. + */ + getColumnPageBreaks(): SafeArray; + + /** + * returns a sequence of descriptions of all vertical page breaks on the sheet. + * + * This includes manual and automatic page breaks. To add or remove manual breaks, use the {@link com.sun.star.table.TableRow.IsStartOfNewPage} property + * of the row. + * @returns a sequence of structs containing row page break data. + */ + getRowPageBreaks(): SafeArray; + + /** removes all manual page breaks on the sheet. */ + removeAllManualPageBreaks(): void; + + /** + * returns a sequence of descriptions of all vertical page breaks on the sheet. + * + * This includes manual and automatic page breaks. To add or remove manual breaks, use the {@link com.sun.star.table.TableRow.IsStartOfNewPage} property + * of the row. + * @returns a sequence of structs containing row page break data. + */ + readonly RowPageBreaks: SafeArray; + } + + /** + * represents a sheet into which contents of the clipboard can be pasted. + * @deprecated Deprecated + */ + interface XSheetPastable extends uno.XInterface { + /** pastes the contents of the clipboard at the specified position on the sheet. */ + paste(aDestination: table.CellAddress): void; + + /** + * pastes clipboard data from a cell range into another cell range. + * + * The contents of the clipboard must be from a cell range. + */ + pasteCellRange( + aDestination: table.CellRangeAddress, nOperation: PasteOperation, nContents: number, bSkipEmpty: boolean, bTranspose: boolean, bAsLink: boolean, nInsert: CellInsertMode): void; + + /** pastes the contents of the clipboard at the specified position on the sheet, using the specified format. */ + pasteFormat(aDestination: table.CellAddress, aFormat: string): void; + } + + /** allows to call a solver for a model that is defined by spreadsheet cells. */ + interface XSolver extends uno.XInterface { + Constraints: SafeArray; + Document: XSpreadsheetDocument; + Maximize: boolean; + Objective: table.CellAddress; + ResultValue: number; + + /** contains the solution's value for each of the variables, if a solution was found. */ + Solution: SafeArray; + solve(): void; + Success: boolean; + Variables: SafeArray; + } + + /** gives access to user-visible strings for a solver. */ + interface XSolverDescription extends uno.XInterface { + /** A user-visible name of the component. */ + ComponentDescription: string; + + /** returns a short description for a property in the component's {@link com.sun.star.beans.XPropertySet} interface. */ + getPropertyDescription(aPropertyName: string): string; + + /** After calling solve, a message describing the status (explaining why no solution was found). */ + StatusDescription: string; + } + + /** provides methods to create a cell range cursor. */ + interface XSpreadsheet extends XSheetCellRange { + /** + * creates a cell cursor including the whole spreadsheet. + * @see com.sun.star.sheet.SheetCellCursor + */ + createCursor(): XSheetCellCursor; + + /** + * creates a cell cursor to travel in the given range context. + * @param aRange the cell range for the cursor. + * @see com.sun.star.sheet.SheetCellCursor + */ + createCursorByRange(aRange: XSheetCellRange): XSheetCellCursor; + } + + /** + * provides access to a collection of spreadsheets. + * @see com.sun.star.sheet.SpreadsheetDocument + */ + interface XSpreadsheetDocument extends uno.XInterface { + /** + * returns the collection of sheets in the document. + * @see com.sun.star.sheet.Spreadsheets + */ + getSheets(): XSpreadsheets; + + /** + * returns the collection of sheets in the document. + * @see com.sun.star.sheet.Spreadsheets + */ + readonly Sheets: XSpreadsheets; + } + + /** + * provides methods to access the spreadsheets by name and to insert, copy, remove and rearrange spreadsheets. + * @see com.sun.star.sheet.Spreadsheets + */ + interface XSpreadsheets extends container.XNameContainer { + /** + * copies a sheet within the collection. + * @param aName the name of the spreadsheet to copy. + * @param aCopy the name of the copy of the spreadsheet. + * @param nDestination the index of the copy in the collection. + */ + copyByName(aName: string, aCopy: string, nDestination: number): void; + + /** + * inserts a new sheet into the collection. + * @param aName the name of the new spreadsheet. + * @param nPosition the index of the new spreadsheet in the collection. + */ + insertNewByName(aName: string, nPosition: number): void; + + /** + * moves a sheet within the collection. + * @param aName the name of the spreadsheet to move. + * @param nDestination the new index of the spreadsheet in the collection. + */ + moveByName(aName: string, nDestination: number): void; + } + + /** + * extends {@link XSpreadsheets} interface to import external sheets. + * @see com.sun.star.sheet.Spreadsheets + */ + interface XSpreadsheets2 extends XSpreadsheets { + /** + * copies a sheet from a source document. + * @param srcDoc a valid {@link XSpreadsheetDocument} reference to source doc + * @param srcName the source sheet name. Throw IllegalArgumentException if not valid + * @param nDestPosition the destination sheet position. Throw IndexOutOfBoundsException if not valid + * @returns the position of the imported sheet + * @since LibreOffice 3.5 + * @throws com::sun::star::lang::IllegalArgumentException + * @throws com::sun::star::lang::IndexOutOfBoundsException + */ + importSheet(srcDoc: XSpreadsheetDocument, srcName: string, nDestPosition: number): number; + } + + /** is the main interface of a {@link SpreadsheetView} . It manages the active sheet within this view. */ + interface XSpreadsheetView extends uno.XInterface { + /** returns the sheet that is shown in the view. */ + ActiveSheet: XSpreadsheet; + + /** returns the sheet that is shown in the view. */ + getActiveSheet(): XSpreadsheet; + + /** sets the sheet that is shown in the view. */ + setActiveSheet(xActiveSheet: XSpreadsheet): void; + } + + /** + * contains methods to handle a subtotal descriptor. + * + * The subtotal descriptor provides properties to set up the subtotal function. + * @see com.sun.star.sheet.SheetCellRange + * @see com.sun.star.sheet.SubTotalDescriptor + */ + interface XSubTotalCalculatable extends uno.XInterface { + /** + * creates subtotals using the settings of the passed descriptor. + * @param xDescriptor the subtotal descriptor with the settings used for the subtotal operation. + * @param bReplace if set to `TRUE` , replaces previous subtotal results. + */ + applySubTotals(xDescriptor: XSubTotalDescriptor, bReplace: boolean): void; + + /** + * creates a subtotal descriptor. + * @param bEmpty if set to `TRUE` , creates an empty descriptor. If set to `FALSE` , fills the descriptor with previous settings of the current object (i.e + */ + createSubTotalDescriptor(bEmpty: boolean): XSubTotalDescriptor; + + /** removes the subtotals from the current object. */ + removeSubTotals(): void; + } + + /** + * provides access to the collection of subtotal fields in a subtotal descriptor. + * @see com.sun.star.sheet.SubTotalDescriptor + */ + interface XSubTotalDescriptor extends uno.XInterface { + /** + * adds a subtotal field definition to the descriptor. + * @param aSubTotalColumns a sequence of all columns used to calculate subtotal values. + * @param nGroupColumn specifies which column of the source range is used to group the contents of the source data. + */ + addNew(aSubTotalColumns: LibreOffice.SeqEquiv, nGroupColumn: number): void; + + /** removes all subtotal field definitions from the descriptor. */ + clear(): void; + } + + /** + * provides access to the settings of a field in a subtotal descriptor. + * @see com.sun.star.sheet.SubTotalField + * @see com.sun.star.sheet.SubTotalDescriptor + */ + interface XSubTotalField extends uno.XInterface { + /** returns the column by which entries are grouped. */ + getGroupColumn(): number; + + /** returns the definitions of which columns should have subtotals added to them. */ + getSubTotalColumns(): SafeArray; + + /** returns the column by which entries are grouped. */ + GroupColumn: number; + + /** sets the column by which entries are grouped. */ + setGroupColumn(nGroupColumn: number): void; + + /** sets the definitions of which columns should have subtotals added to them. */ + setSubTotalColumns(aSubTotalColumns: LibreOffice.SeqEquiv): void; + + /** returns the definitions of which columns should have subtotals added to them. */ + SubTotalColumns: SafeArray; + } + + /** + * provides access to a collection of collections of equal-formatted cell ranges. + * @see com.sun.star.sheet.SheetCellRange + * @see com.sun.star.sheet.SheetCellRanges + */ + interface XUniqueCellFormatRangesSupplier extends uno.XInterface { + /** + * returns a collection of equal-formatted cell range collections. + * + * Each cell of the original range is contained in one of the ranges (even unformatted cells). If there is a non-rectangular equal-formatted cell area, + * it will be split into several rectangular ranges. + * + * All equal-formatted ranges are consolidated into one collection. These collections are the members contained in a {@link UniqueCellFormatRanges} + * collection. + * @returns the collection of equal-formatted cell range collections. + * @see com.sun.star.sheet.UniqueCellFormatRanges + */ + getUniqueCellFormatRanges(): container.XIndexAccess; + + /** + * returns a collection of equal-formatted cell range collections. + * + * Each cell of the original range is contained in one of the ranges (even unformatted cells). If there is a non-rectangular equal-formatted cell area, + * it will be split into several rectangular ranges. + * + * All equal-formatted ranges are consolidated into one collection. These collections are the members contained in a {@link UniqueCellFormatRanges} + * collection. + * @returns the collection of equal-formatted cell range collections. + * @see com.sun.star.sheet.UniqueCellFormatRanges + */ + readonly UniqueCellFormatRanges: container.XIndexAccess; + } + + /** + * provides functions to manage the sheet local databases + * @since LibreOffice 3.5 + */ + interface XUnnamedDatabaseRanges extends uno.XInterface { + getByTable(nTab: number): any; + hasByTable(nTab: number): boolean; + setByTable(aRange: table.CellRangeAddress): void; + } + + /** + * provides methods to find the used area of the entire sheet. + * + * The used area is the smallest cell range that contains all cells of the spreadsheet with any contents (values, text, formulas) or visible formatting + * (borders and background color). + * @see com.sun.star.sheet.SheetCellCursor + */ + interface XUsedAreaCursor extends uno.XInterface { + /** + * points the cursor to the end of the used area. + * @param bExpand `TRUE` = expands the current cursor range, `FALSE` = sets size of the cursor to a single cell. + */ + gotoEndOfUsedArea(bExpand: boolean): void; + + /** + * points the cursor to the start of the used area. + * @param bExpand `TRUE` = expands the current cursor range, `FALSE` = sets size of the cursor to a single cell. + */ + gotoStartOfUsedArea(bExpand: boolean): void; + } + + /** enables a {@link SpreadsheetView} to freeze columns and rows of the view. */ + interface XViewFreezable extends uno.XInterface { + /** + * freezes panes with the specified number of columns and rows. + * + * To freeze only horizontally, specify nRows as 0. To freeze only vertically, specify nColumns as 0. + */ + freezeAtPosition(nColumns: number, nRows: number): void; + + /** + * returns `TRUE` if the view has frozen panes. + * + * Only one of {@link XViewSplitable.getIsWindowSplit()} and {@link XViewFreezable.hasFrozenPanes()} can be `TRUE` . + */ + hasFrozenPanes(): boolean; + } + + /** + * represents a pane in a view of a spreadsheet document. + * @see com.sun.star.sheet.SpreadsheetViewPane + */ + interface XViewPane extends uno.XInterface { + /** returns the first column that is visible in the pane. */ + FirstVisibleColumn: number; + + /** returns the first row that is visible in the pane. */ + FirstVisibleRow: number; + + /** returns the first column that is visible in the pane. */ + getFirstVisibleColumn(): number; + + /** returns the first row that is visible in the pane. */ + getFirstVisibleRow(): number; + + /** returns the address of the cell range that consists of the cells which are visible in the pane. */ + getVisibleRange(): table.CellRangeAddress; + + /** sets the first column that is visible in the pane. */ + setFirstVisibleColumn(nFirstVisibleColumn: number): void; + + /** sets the first row that is visible in the pane. */ + setFirstVisibleRow(nFirstVisibleRow: number): void; + + /** returns the address of the cell range that consists of the cells which are visible in the pane. */ + readonly VisibleRange: table.CellRangeAddress; + } + + /** + * enables access to the panes in a view. + * @deprecated Deprecated + */ + interface XViewPanesSupplier extends uno.XInterface { + /** returns the collection of panes in the view. */ + getViewPanes(): container.XIndexAccess; + + /** returns the collection of panes in the view. */ + readonly ViewPanes: container.XIndexAccess; + } + + /** + * enables a {@link SpreadsheetView} to split the view. + * @deprecated Deprecated + */ + interface XViewSplitable extends uno.XInterface { + /** + * returns `TRUE` if the view is split into individual panes. + * + * Only one of {@link XViewSplitable.getIsWindowSplit()} and {@link XViewFreezable.hasFrozenPanes()} can be `TRUE` . + */ + getIsWindowSplit(): boolean; + + /** returns the column before which the view is split. */ + getSplitColumn(): number; + + /** returns the horizontal position in pixels where the view is split. */ + getSplitHorizontal(): number; + + /** returns the row before which the view is split. */ + getSplitRow(): number; + + /** returns the vertical position in pixels where the view is split. */ + getSplitVertical(): number; + + /** + * returns `TRUE` if the view is split into individual panes. + * + * Only one of {@link XViewSplitable.getIsWindowSplit()} and {@link XViewFreezable.hasFrozenPanes()} can be `TRUE` . + */ + readonly IsWindowSplit: boolean; + + /** + * splits the view at the specified position. + * + * To split only horizontally, specify **nPixelY** as 0. To split only vertically, specify **nPixelX** as 0. + */ + splitAtPosition(nPixelX: number, nPixelY: number): void; + + /** returns the column before which the view is split. */ + readonly SplitColumn: number; + + /** returns the horizontal position in pixels where the view is split. */ + readonly SplitHorizontal: number; + + /** returns the row before which the view is split. */ + readonly SplitRow: number; + + /** returns the vertical position in pixels where the view is split. */ + readonly SplitVertical: number; + } + + /** + * provides methods to handle a volatile function result. + * @see com.sun.star.sheet.VolatileResult + * @see com.sun.star.sheet.ResultEvent + */ + interface XVolatileResult extends uno.XInterface { + /** adds a listener to be notified when a new value is available. */ + addResultListener(aListener: XResultListener): void; + + /** removes the specified listener. */ + removeResultListener(aListener: XResultListener): void; + } + + namespace AddressConvention { + const enum Constants { + LOTUS_A1 = 4, + OOO = 0, + UNSPECIFIED = -1, + XL_A1 = 1, + XL_OOX = 3, + XL_R1C1 = 2, + } + } + + namespace CellFlags { + const enum Constants { + ANNOTATION = 8, + DATETIME = 2, + EDITATTR = 256, + FORMATTED = 512, + FORMULA = 16, + HARDATTR = 32, + OBJECTS = 128, + STRING = 4, + STYLES = 64, + VALUE = 1, + } + } + + namespace ColorScaleEntryType { + const enum Constants { + COLORSCALE_FORMULA = 5, + COLORSCALE_MAX = 1, + COLORSCALE_MIN = 0, + COLORSCALE_PERCENT = 4, + COLORSCALE_PERCENTILE = 2, + COLORSCALE_VALUE = 3, + } + } + + namespace ConditionEntryType { + const enum Constants { + COLORSCALE = 1, + CONDITION = 0, + DATABAR = 2, + DATE = 4, + ICONSET = 3, + } + } + + namespace ConditionFormatOperator { + const enum Constants { + ABOVE_AVERAGE = 14, + ABOVE_EQUAL_AVERAGE = 16, + BEGINS_WITH = 20, + BELOW_AVERAGE = 15, + BELOW_EQUAL_AVERAGE = 17, + BETWEEN = 6, + BOTTOM_N_ELEMENTS = 11, + BOTTOM_N_PERCENT = 13, + CONTAINS = 22, + DUPLICATE = 8, + ENDS_WITH = 21, + EQUAL = 0, + ERROR = 18, + EXPRESSION = 24, + GREATER = 2, + GREATER_EQUAL = 4, + LESS = 1, + LESS_EQUAL = 3, + NO_ERROR = 19, + NOT_BETWEEN = 7, + NOT_CONTAINS = 23, + NOT_EQUAL = 5, + TOP_N_ELEMENTS = 10, + TOP_N_PERCENT = 12, + UNIQUE = 9, + } + } + + namespace ConditionOperator2 { + const enum Constants { + BETWEEN = 7, + DUPLICATE = 10, + EQUAL = 1, + FORMULA = 9, + GREATER = 3, + GREATER_EQUAL = 4, + LESS = 5, + LESS_EQUAL = 6, + NONE = 0, + NOT_BETWEEN = 8, + NOT_DUPLICATE = 11, + NOT_EQUAL = 2, + } + } + + namespace DataBarAxis { + const enum Constants { + AXIS_AUTOMATIC = 2, + AXIS_MIDDLE = 1, + AXIS_NONE = 0, + } + } + + namespace DataBarEntryType { + const enum Constants { + DATABAR_AUTO = 1, + DATABAR_FORMULA = 6, + DATABAR_MAX = 2, + DATABAR_MIN = 1, + DATABAR_PERCENT = 5, + DATABAR_PERCENTILE = 3, + DATABAR_VALUE = 4, + } + } + + namespace DataPilotFieldGroupBy { + const enum Constants { + DAYS = 8, + HOURS = 4, + MINUTES = 2, + MONTHS = 16, + QUARTERS = 32, + SECONDS = 1, + YEARS = 64, + } + } + + namespace DataPilotFieldLayoutMode { + const enum Constants { + OUTLINE_SUBTOTALS_BOTTOM = 2, + OUTLINE_SUBTOTALS_TOP = 1, + TABULAR_LAYOUT = 0, + } + } + + namespace DataPilotFieldReferenceItemType { + const enum Constants { + NAMED = 0, + NEXT = 2, + PREVIOUS = 1, + } + } + + namespace DataPilotFieldReferenceType { + const enum Constants { + COLUMN_PERCENTAGE = 6, + INDEX = 8, + ITEM_DIFFERENCE = 1, + ITEM_PERCENTAGE = 2, + ITEM_PERCENTAGE_DIFFERENCE = 3, + NONE = 0, + ROW_PERCENTAGE = 5, + RUNNING_TOTAL = 4, + TOTAL_PERCENTAGE = 7, + } + } + + namespace DataPilotFieldShowItemsMode { + const enum Constants { + FROM_BOTTOM = 1, + FROM_TOP = 0, + } + } + + namespace DataPilotFieldSortMode { + const enum Constants { + DATA = 3, + MANUAL = 1, + NAME = 2, + NONE = 0, + } + } + + namespace DataPilotOutputRangeType { + const enum Constants { + RESULT = 2, + TABLE = 1, + WHOLE = 0, + } + } + + namespace DataPilotTablePositionType { + const enum Constants { + COLUMN_HEADER = 3, + NOT_IN_TABLE = 0, + OTHER = 4, + RESULT = 1, + ROW_HEADER = 2, + } + } + + namespace DataResultFlags { + const enum Constants { + ERROR = 4, + HASDATA = 1, + SUBTOTAL = 2, + } + } + + namespace DateType { + const enum Constants { + LAST7DAYS = 3, + LASTMONTH = 8, + LASTWEEK = 5, + LASTYEAR = 11, + NEXTMONTH = 9, + NEXTWEEK = 6, + NEXTYEAR = 12, + THISMONTH = 7, + THISWEEK = 4, + THISYEAR = 10, + TODAY = 0, + TOMORROW = 2, + YESTERDAY = 1, + } + } + + namespace DimensionFlags { + const enum Constants { + NO_COLUMN_ORIENTATION = 1, + NO_DATA_ORIENTATION = 8, + NO_PAGE_ORIENTATION = 4, + NO_ROW_ORIENTATION = 2, + } + } + + namespace ExternalLinkType { + const enum Constants { + DDE = 2, + DOCUMENT = 1, + SELF = 3, + SPECIAL = 4, + UNKNOWN = 0, + } + } + + namespace FilterOperator2 { + const enum Constants { + BEGINS_WITH = 14, + BOTTOM_PERCENT = 11, + BOTTOM_VALUES = 10, + CONTAINS = 12, + DOES_NOT_BEGIN_WITH = 15, + DOES_NOT_CONTAIN = 13, + DOES_NOT_END_WITH = 17, + EMPTY = 0, + ENDS_WITH = 16, + EQUAL = 2, + GREATER = 4, + GREATER_EQUAL = 5, + LESS = 6, + LESS_EQUAL = 7, + NOT_EMPTY = 1, + NOT_EQUAL = 3, + TOP_PERCENT = 9, + TOP_VALUES = 8, + } + } + + namespace FormulaLanguage { + const enum Constants { + API = 6, + ENGLISH = 2, + NATIVE = 3, + ODF_11 = 1, + ODFF = 0, + OOXML = 5, + XL_ENGLISH = 4, + } + } + + namespace FormulaMapGroup { + const enum Constants { + ALL_EXCEPT_SPECIAL = 2147483647, + ARRAY_SEPARATORS = 2, + BINARY_OPERATORS = 8, + FUNCTIONS = 16, + SEPARATORS = 1, + SPECIAL = 0, + UNARY_OPERATORS = 4, + } + } + + namespace FormulaMapGroupSpecialOffset { + const enum Constants { + BAD = 7, + CALL = 1, + COL_ROW_NAME = 12, + DB_AREA = 10, + EXTERNAL = 3, + MACRO = 11, + MAT_REF = 9, + MISSING = 6, + NAME = 4, + NO_NAME = 5, + PUSH = 0, + SPACES = 8, + STOP = 2, + } + } + + namespace FormulaResult { + const enum Constants { + ERROR = 4, + STRING = 2, + VALUE = 1, + } + } + + namespace FunctionCategory { + const enum Constants { + ADDIN = 11, + DATABASE = 1, + DATETIME = 2, + FINANCIAL = 3, + INFORMATION = 4, + LOGICAL = 5, + MATHEMATICAL = 6, + MATRIX = 7, + SPREADSHEET = 9, + STATISTICAL = 8, + TEXT = 10, + } + } + + namespace GeneralFunction2 { + const enum Constants { + AUTO = 1, + AVERAGE = 4, + COUNT = 3, + COUNTNUMS = 8, + MAX = 5, + MEDIAN = 13, + MIN = 6, + NONE = 0, + PRODUCT = 7, + STDEV = 9, + STDEVP = 10, + SUM = 2, + VAR = 11, + VARP = 12, + } + } + + namespace IconSetFormatEntry { + const enum Constants { + ICONSET_FORMULA = 4, + ICONSET_MIN = 0, + ICONSET_PERCENT = 3, + ICONSET_PERCENTILE = 1, + ICONSET_VALUE = 2, + } + } + + namespace IconSetType { + const enum Constants { + ICONSET_3ARROWS = 0, + ICONSET_3ARROWS_GRAY = 1, + ICONSET_3COLOR_SIMILIES = 9, + ICONSET_3FLAGS = 2, + ICONSET_3SIGNS = 5, + ICONSET_3SMILIES = 8, + ICONSET_3SYMBOLS = 6, + ICONSET_3SYMBOLS2 = 7, + ICONSET_3TRAFFICLIGHTS1 = 3, + ICONSET_3TRAFFICLIGHTS2 = 4, + ICONSET_4ARROWS = 10, + ICONSET_4ARROWS_GRAY = 11, + ICONSET_4RATING = 13, + ICONSET_4RED_TO_BLACK = 12, + ICONSET_4TRAFFICLIGHTS = 14, + ICONSET_5ARROWS = 15, + ICONSET_5ARROWS_GRAY = 16, + ICONSET_5QUARTERS = 18, + ICONSET_5RATINGS = 17, + } + } + + namespace MemberResultFlags { + const enum Constants { + CONTINUE = 4, + GRANDTOTAL = 8, + HASMEMBER = 1, + NUMERIC = 16, + SUBTOTAL = 2, + } + } + + namespace MoveDirection { + const enum Constants { + DOWN = 0, + LEFT = 3, + RIGHT = 1, + UP = 2, + } + } + + namespace NamedRangeFlag { + const enum Constants { + COLUMN_HEADER = 4, + FILTER_CRITERIA = 1, + PRINT_AREA = 2, + ROW_HEADER = 8, + } + } + + namespace opencl { + interface OpenCLDevice { + /** The driver version as returned by OpenCL */ + Driver: string; + + /** The name of the device as returned by OpenCL */ + Name: string; + + /** The vendor of the device as returned by OpenCL */ + Vendor: string; + } + + interface OpenCLPlatform { + Devices: SafeArray; + + /** The name of the platform as returned by OpenCL */ + Name: string; + Vendor: string; + } + + interface XOpenCLSelection extends uno.XInterface { + /** + * returns the index of the currently selected device. This is an index into the sequence of devices in the OpenCLPLatform object the device is part of + * in the current instance of LibreOffice (and not some a priori defined identifier for a specific model of device accessed through a specific platform). + */ + readonly DeviceID: number; + + /** Disables automatic OpenCL Device Selection */ + disableAutomaticDeviceSelection(): void; + disableOpcodeSubsetTest(): void; + + /** + * Enables automatic OpenCL Device Selection + * @param force forces a new evaluation of the best device + */ + enableAutomaticDeviceSelection(force: boolean): void; + enableOpcodeSubsetTest(): void; + + /** + * Enables or disables use of OpenCL for calculations. When using this API to enable OpenCL the configuration parameters are set to their built-in + * default values, not ones read from the installation of user-specific configuration. + */ + enableOpenCL(enable: boolean): void; + FormulaCellNumberLimit: number; + + /** + * returns the index of the currently selected device. This is an index into the sequence of devices in the OpenCLPLatform object the device is part of + * in the current instance of LibreOffice (and not some a priori defined identifier for a specific model of device accessed through a specific platform). + */ + getDeviceID(): number; + getFormulaCellNumberLimit(): number; + + /** lists all OpenCL devices and platforms */ + getOpenCLPlatforms(): SafeArray; + + /** + * returns the index of the platform of the currently selected device. This is an index into the sequence that getOpenCLPlatforms returns in the current + * instance of LibreOffice (and not some a priori defined identifier for an OpenCL platform). + */ + getPlatformID(): number; + isOpcodeSubsetTested(): boolean; + + /** + * Returns true if calculation with OpenCL is enabled (at all). The actual use of OpenCL for a formula is also affected by the configuration settings + * specifying whether OpenCL is used for all opcodes or just for a subset, and the black- and whitelists of OpenCL implementations that are in use. + */ + isOpenCLEnabled(): boolean; + + /** lists all OpenCL devices and platforms */ + readonly OpenCLPlatforms: SafeArray; + + /** + * returns the index of the platform of the currently selected device. This is an index into the sequence that getOpenCLPlatforms returns in the current + * instance of LibreOffice (and not some a priori defined identifier for an OpenCL platform). + */ + readonly PlatformID: number; + + /** + * Select the OpenCL device with the given platform and device number. The platform number corresponds to an index into the sequence returned by + * getOpenCLPlatforms, and the device number corresponds to an index into the sequence of devices in that platform. + */ + selectOpenCLDevice(platform: number, device: number): void; + setFormulaCellNumberLimit(number: number): void; + } + } + + namespace ReferenceFlags { + const enum Constants { + COLUMN_DELETED = 2, + COLUMN_RELATIVE = 1, + RELATIVE_NAME = 128, + ROW_DELETED = 8, + ROW_RELATIVE = 4, + SHEET_3D = 64, + SHEET_DELETED = 32, + SHEET_RELATIVE = 16, + } + } + + namespace SpreadsheetViewObjectsMode { + const enum Constants { + HIDE = 1, + SHOW = 0, + } + } + + namespace StatusBarFunction { + const enum Constants { + AVERAGE = 1, + COUNT = 3, + COUNTNUMS = 2, + MAX = 4, + MIN = 5, + NONE = 0, + SUM = 9, + } + } + + namespace TableValidationVisibility { + const enum Constants { + INVISIBLE = 0, + SORTEDASCENDING = 2, + UNSORTED = 1, + } + } + } + + namespace smarttags { + /** + * provides one or more actions for smart tags. + * + * An implementation of this service defines one or more actions that can be performed for a smart tag which has been recognized by a {@link + * SmartTagRecognizer} service. + * @since OOo 2.3 + */ + type SmartTagAction = XSmartTagAction; + + /** + * recognizes smart tags. + * + * Implementations of this service are used to scan the document text for smart tags. Smart tags are pieces of text that can be associated with specific + * actions which are defined by implementations of the {@link SmartTagAction} service. + * @since OOo 2.3 + */ + type SmartTagRecognizer = XSmartTagRecognizer; + + /** + * specifies the which type of text is passed to {@link XSmartTagRecognizer.recognize()} + * @since OOo 2.3 + */ + const enum SmartTagRecognizerMode { + CELL = 3, + CHAR = 0, + PARAGRAPH = 2, + SINGLE_WORD = 1, + } + + /** provides access to a range based smart tag recognizer. */ + interface XRangeBasedSmartTagRecognizer extends lang.XInitialization { + /** + * recognizes smart tags. + * @param xRange The text that should be scanned by the recognizer. + * @param eDataType This value indicates the type of the passed text. + * @param xTextMarkup This object is used to submit any recognized smart tags to the calling application. + * @param aApplicationName A string containing the name of the calling application. + * @param xController The current controller of the document. + */ + recognizeTextRange(xRange: text.XTextRange, eDataType: SmartTagRecognizerMode, xTextMarkup: text.XTextMarkup, aApplicationName: string, xController: frame.XController): void; + } + + /** + * provides access to smart tag actions. + * @since OOo 2.3 + */ + interface XSmartTagAction extends lang.XInitialization { + /** + * obtains a caption for a specified action for use in user interfaces. + * @param nActionID The identifier of the requested action. + * @param aApplicationName A string containing the name of the calling application. + * @param aLocale Is used for localization of the caption. + * @param xProperties Contains additional smart tag properties collected by the smart tag recognizer. + * @param aText The calling application can pass the text of the smart tag to the action component. + * @param aXML A string that is a XML representation of the smart tag. + * @param xController The current controller of the document. + * @param xTarget A text range representing the smart tag in the document. + * @returns the caption of the requested action. + * @throws com::sun::star::lang::IllegalArgumentException if the ActionID is not recognized. + */ + getActionCaptionFromID( + nActionID: number, aApplicationName: string, aLocale: lang.Locale, xProperties: container.XStringKeyMap, aText: string, aXML: string, + xController: frame.XController, xTarget: text.XTextRange): string; + + /** + * obtains the number of actions provided for a specified smart tag type. + * @param aSmartTagName Name of the wanted smart tag type. This is one of the names obtained by {@link getSmartTagName()} + * @param xController The current controller of the document. + * @param xProperties Contains the smart tag properties collected by the smart tag recognizer. + * @returns the number of actions available for the given smart tag type. + */ + getActionCount(aSmartTagName: string, xController: frame.XController, xProperties: container.XStringKeyMap): number; + + /** + * obtains a unique integer identifier for an action. + * @param aSmartTagName Name of the wanted smart tag type. This is one of the names obtained by {@link getSmartTagName()} + * @param nActionIndex The index of the action for the given smart tag type. + * @param xController The current controller of the document. + * @returns the unique integer identifier for the requested action. + * @throws com::sun::star::lang::IllegalArgumentException if the specified nActionIndex is greater than the number of available actions for the specified sm + */ + getActionID(aSmartTagName: string, nActionIndex: number, xController: frame.XController): number; + + /** + * obtains a language independent name of an action. + * @param nActionID The identifier of the requested action. + * @param xController The current controller of the document. + * @returns the language independent name of the specified action. + * @throws com::sun::star::lang::IllegalArgumentException if the ActionID is not recognized. + */ + getActionNameFromID(nActionID: number, xController: frame.XController): string; + + /** + * obtains a detailed description of this action component. + * @param aLocale Is used for localization of the description. + * @returns the description of the action component. + */ + getDescription(aLocale: lang.Locale): string; + + /** + * obtains a name that describes this action component. + * @param aLocale Is used for localization of the name. + * @returns the name describing the action component. + */ + getName(aLocale: lang.Locale): string; + + /** + * obtains the caption of the smart tag type for using in user interfaces. + * @param nSmartTagIndex Index of the wanted smart tag type. Value needs to be between 0 and the number of smarttags available (exclusively). + * @param aLocale Is used for localization of the caption. + * @returns the caption associated with the smart tag type. + * @throws com::sun::star::lang::IndexOutOfBoundsException if nSmartTagIndex is greater than SmartTagCount + */ + getSmartTagCaption(nSmartTagIndex: number, aLocale: lang.Locale): string; + + /** + * obtains the name of one specific smart tag type supported by this action component. + * @param nSmartTagIndex Index of the wanted smart tag type. Value needs to be between 0 and the number of smarttags available (exclusively). + * @returns an unique name of the smart tag type. Smart tag type names are always in the format of namespaceURI::tagname. + * @throws com::sun::star::lang::IndexOutOfBoundsException if nSmartTagIndex is greater than SmartTagCount. + */ + getSmartTagName(nSmartTagIndex: number): string; + + /** + * invokes an action. + * @param nActionID The identifier of the requested action. + * @param aApplicationName A string containing the name of the calling application. + * @param xController The current controller of the document. + * @param xTarget A text range representing the smart tag in the document. + * @param xProperties Contains the smart tag properties collected by the smart tag recognizer. + * @param aText The calling application can pass the text of the smart tag to the action component. + * @param aXML A string that is a XML representation of the smart tag. + * @param aLocale Is used for localization of the action. + * @throws com::sun::star::lang::IllegalArgumentException if the ActionID is not recognized. + */ + invokeAction( + nActionID: number, aApplicationName: string, xController: frame.XController, xTarget: text.XTextRange, xProperties: container.XStringKeyMap, aText: string, + aXML: string, aLocale: lang.Locale): void; + + /** + * determines whether a caption is dynamic. + * @param nActionID The identifier of the requested action. + * @param aApplicationName A string containing the name of the calling application. + * @param xController The current controller of the document. + * @param aLocale Is used for localization. + * @returns a boolean indicating whether the caption is dynamic. + * @throws com::sun::star::lang::IllegalArgumentException if the ActionID is not recognized. + */ + isCaptionDynamic(nActionID: number, aApplicationName: string, xController: frame.XController, aLocale: lang.Locale): boolean; + + /** + * determines whether the smart tag indicator should be visible. + * @param nActionID The identifier of the requested action. + * @param aApplicationName A string containing the name of the calling application. + * @param xController The current controller of the document. + * @param aLocale Is used for localization. + * @returns a boolean indicating whether the smart tag indicator should be visible. + * @throws com::sun::star::lang::IllegalArgumentException if the ActionID is not recognized. + */ + isShowSmartTagIndicator(nActionID: number, aApplicationName: string, xController: frame.XController, aLocale: lang.Locale): boolean; + + /** the number of smart tag types supported by this action component. */ + SmartTagCount: number; + } + + /** + * provides access to a smart tag recognizer. + * @since OOo 2.3 + */ + interface XSmartTagRecognizer extends lang.XInitialization { + /** + * launches the property page for a smart tag type. + * @param nSmartTagIndex Index of the wanted smart tag type. Value needs to be between 0 and the number of smarttags available (exclusively). + * @param aLocale Is used for localization of the property page. + * @throws com::sun::star::lang::IndexOutOfBoundsException if nSmartTagIndex is greater than SmartTagCount + */ + displayPropertyPage(nSmartTagIndex: number, aLocale: lang.Locale): void; + + /** + * obtains a detailed description of this recognizer component. + * @param aLocale Is used for localization of the description. + * @returns the description of the recognizer component. + */ + getDescription(aLocale: lang.Locale): string; + + /** + * obtains a name that describes this recognizer component. + * @param aLocale Is used for localization of the name. + * @returns the name of the recognizer component. + */ + getName(aLocale: lang.Locale): string; + + /** + * obtains the URL that can be used to download new or updated recognizers. + * @param nSmartTagIndex Index of the wanted smart tag type. Value needs to be between 0 and the number of smarttags available (exclusively). + * @returns the download URL. + * @throws com::sun::star::lang::IndexOutOfBoundsException if nSmartTagIndex is greater than SmartTagCount + */ + getSmartTagDownloadURL(nSmartTagIndex: number): string; + + /** + * obtains the name of one specific smart tag type supported by this recognizer component. + * @param nSmartTagIndex Index of the wanted smart tag type. Value needs to be between 0 and the number of smarttags available (exclusively). + * @returns the unique name of the smart tag type. Smart tag type names are always in the format of namespaceURI::tagname. + * @throws com::sun::star::lang::IndexOutOfBoundsException if nSmartTagIndex is greater than SmartTagCount + */ + getSmartTagName(nSmartTagIndex: number): string; + + /** + * indicates whether there is a property page for a smart tag type. + * @param nSmartTagIndex Index of the wanted smart tag type. Value needs to be between 0 and the number of smarttags available (exclusively). + * @param aLocale Is used for localization of the property page. + * @returns true if there is a property page matching the requested smart tag type and locale. + * @throws com::sun::star::lang::IndexOutOfBoundsException if nSmartTagIndex is greater than SmartTagCount + */ + hasPropertyPage(nSmartTagIndex: number, aLocale: lang.Locale): boolean; + + /** + * recognizes smart tags. + * @param aText The text that should be scanned by the recognizer. aText is UTF-16 encoded. + * @param nStart Denotes the start position of the region to scan. + * @param nLength Denotes the length of the text to scan. + * @param eDataType This value indicates the type of the passed text. + * @param aLocale Is used to indicate the language of the passed text. + * @param xTextMarkup This object is used to submit any recognized smart tags to the calling application. + * @param aApplicationName A string containing the name of the calling application. + * @param xController The current controller of the document. + * @param xTokenizer This can be used to tokenize the string to recognize. + */ + recognize( + aText: string, nStart: number, nLength: number, eDataType: SmartTagRecognizerMode, aLocale: lang.Locale, xTextMarkup: text.XTextMarkup, + aApplicationName: string, xController: frame.XController, xTokenizer: i18n.XBreakIterator): void; + + /** The number of smart tag types supported by this recognizer component. */ + SmartTagCount: number; + } + } + + namespace style { + /** + * is a common service for table cell styles. + * @see com.sun.star.sheet.TableCellStyle + */ + type CellStyle = Style; + + /** These enumeration values are used to specify if and how a page or column break is applied. */ + const enum BreakType { + /** + * A column break is applied after the object to which it belongs. + * + *

This implies that the object to which it belongs is the last + * + * in its column.

+ */ + COLUMN_AFTER = 2, + /** + * A column break is applied before the object to which it belongs. + * + *

This implies that the object to which it belongs is the + * + * first in its column.

+ */ + COLUMN_BEFORE = 1, + /** + * A column break is applied before and after the object to which it belongs. + * + *

This implies that this object is the only one in its column.

+ */ + COLUMN_BOTH = 3, + /** + * No column or page break is applied. + * + * This value specifies that a location is not yet assigned. + */ + NONE = 0, + /** + * A page break is applied after the object to which it belongs. + * + *

This implies that the object to which it belongs is the last + * + * on its page.

+ */ + PAGE_AFTER = 5, + /** + * A page break is applied before the object to which it belongs. + * + *

This implies that the object to which it belongs is the + * + * first on its page.

+ */ + PAGE_BEFORE = 4, + /** + * A page break is applied before and after the object to which it belongs. + * + *

This implies that this object is the only one on its page.

+ */ + PAGE_BOTH = 6, + } + + /** These enumeration values are used to specify the location of a graphic object within its surroundings. */ + const enum GraphicLocation { + /** The graphic is scaled to fill the whole surrounding area. */ + AREA = 10, + /** The graphic is located in the bottom left corner. */ + LEFT_BOTTOM = 7, + /** The graphic is located in the middle of the left edge. */ + LEFT_MIDDLE = 4, + /** The graphic is located in the top left corner. */ + LEFT_TOP = 1, + /** The graphic is located in the middle of the bottom edge. */ + MIDDLE_BOTTOM = 8, + /** The graphic is located at the center of the surrounding object. */ + MIDDLE_MIDDLE = 5, + /** The graphic is located in the middle of the top edge. */ + MIDDLE_TOP = 2, + /** + * No column or page break is applied. + * + * This value specifies that a location is not yet assigned. + */ + NONE = 0, + /** The graphic is located in the bottom right corner. */ + RIGHT_BOTTOM = 9, + /** The graphic is located in the middle of the right edge. */ + RIGHT_MIDDLE = 6, + /** The graphic is located in the top right corner. */ + RIGHT_TOP = 3, + /** The graphic is repeatedly spread over the surrounding object like tiles. */ + TILED = 11, + } + + /** values specify the horizontal alignment of an object within a container object. */ + const enum HorizontalAlignment { + /** + * set the horizontal alignment to the center between the margins from the container object + * + * adjusted to the center + * + * The text range is centered between the previous tabulator (or the left border, if none) and this tabulator. + */ + CENTER = 1, + /** + * set the horizontal alignment to the left margin from the container object + * + * The page style is only used for left pages. + * + * adjusted to the left border + * + * The text range is left-aligned between the previous tabulator (or the left border, if none) and this tabulator. + */ + LEFT = 0, + /** + * set the horizontal alignment to the right margin from the container object + * + * The page style is only used for right pages. + * + * adjusted to the right border + * + * The text range is right-aligned between the previous tabulator (or the left border, if none) and this tabulator. + */ + RIGHT = 2, + } + + /** specifies the pages for which a page layout is valid. */ + const enum PageStyleLayout { + /** The page style is identically used for left and right pages. */ + ALL = 0, + /** + * set the horizontal alignment to the left margin from the container object + * + * The page style is only used for left pages. + * + * adjusted to the left border + * + * The text range is left-aligned between the previous tabulator (or the left border, if none) and this tabulator. + */ + LEFT = 1, + /** The page style is used unchanged for left pages and mirrored for right pages. */ + MIRRORED = 3, + /** + * set the horizontal alignment to the right margin from the container object + * + * The page style is only used for right pages. + * + * adjusted to the right border + * + * The text range is right-aligned between the previous tabulator (or the left border, if none) and this tabulator. + */ + RIGHT = 2, + } + + /** These enumeration values describe the formatting of a text paragraph. */ + const enum ParagraphAdjust { + /** adjusted to both borders / stretched, except for last line */ + BLOCK = 2, + /** + * set the horizontal alignment to the center between the margins from the container object + * + * adjusted to the center + * + * The text range is centered between the previous tabulator (or the left border, if none) and this tabulator. + */ + CENTER = 3, + /** + * set the horizontal alignment to the left margin from the container object + * + * The page style is only used for left pages. + * + * adjusted to the left border + * + * The text range is left-aligned between the previous tabulator (or the left border, if none) and this tabulator. + */ + LEFT = 0, + /** + * set the horizontal alignment to the right margin from the container object + * + * The page style is only used for right pages. + * + * adjusted to the right border + * + * The text range is right-aligned between the previous tabulator (or the left border, if none) and this tabulator. + */ + RIGHT = 1, + /** adjusted to both borders / stretched, including last line */ + STRETCH = 4, + } + + /** These enumeration values are used to specify the alignment of the text range delimited by a tabulator. */ + const enum TabAlign { + /** + * set the horizontal alignment to the center between the margins from the container object + * + * adjusted to the center + * + * The text range is centered between the previous tabulator (or the left border, if none) and this tabulator. + */ + CENTER = 1, + /** The decimal point of the text range to the left of this tabulator is aligned to the position of this tabulator. */ + DECIMAL = 3, + /** The default alignment for tabulators is applied. */ + DEFAULT = 4, + /** + * set the horizontal alignment to the left margin from the container object + * + * The page style is only used for left pages. + * + * adjusted to the left border + * + * The text range is left-aligned between the previous tabulator (or the left border, if none) and this tabulator. + */ + LEFT = 0, + /** + * set the horizontal alignment to the right margin from the container object + * + * The page style is only used for right pages. + * + * adjusted to the right border + * + * The text range is right-aligned between the previous tabulator (or the left border, if none) and this tabulator. + */ + RIGHT = 2, + } + + /** specify the horizontal alignment of an object within a container object. */ + const enum VerticalAlignment { + /** set the vertical alignment to the bottom margin from the container object. */ + BOTTOM = 2, + /** set the vertical alignment to the top margin from the container object. */ + MIDDLE = 1, + /** set the vertical alignment to the center between the top and bottom margins from the container object. */ + TOP = 0, + } + + /** + * This is a set of properties to describe the style of characters. + * @see ParagraphProperties + */ + interface CharacterProperties { + /** + * This optional property determines whether the kerning tables from the current font are used. + * + * Automatic **kerning** applies a spacing in between certain pairs of characters to make the text look better. + */ + CharAutoKerning: boolean; + + /** This optional property contains the text background color. */ + CharBackColor: util.Color; + + /** This property determines if the text background color is set to transparent. */ + CharBackTransparent: boolean; + + /** + * This property contains the distance from the border to the object. + * @since LibreOffice 4.2 + */ + CharBorderDistance: number; + + /** + * This property contains the bottom border of the object. + * @since LibreOffice 4.2 + */ + CharBottomBorder: table.BorderLine2; + + /** + * This property contains the distance from the bottom border to the object. + * @since LibreOffice 4.2 + */ + CharBottomBorderDistance: number; + + /** + * This optional property contains the value of the case-mapping of the text for formatting and displaying. + * @see CaseMap + */ + CharCaseMap: number; + + /** This property contains the value of the text color. */ + CharColor: util.Color; + + /** + * This optional property determines whether text is formatted in two lines. + * + * It is linked to the properties CharCombinePrefix and CharCombineSuffix. + */ + CharCombineIsOn: boolean; + + /** + * This optional property contains the prefix (usually parenthesis) before text that is formatted in two lines. + * + * It is linked to the properties CharCombineIsOn and CharCombineSuffix. + */ + CharCombinePrefix: string; + + /** + * This optional property contains the suffix (usually parenthesis) after text that is formatted in two lines. + * + * It is linked to the properties CharCombineIsOn and CharCombinePrefix. + */ + CharCombineSuffix: string; + + /** This optional property specifies if the characters are formatted and displayed with a contour effect. */ + CharContoured: boolean; + + /** This property is `TRUE` if the characters are crossed out. */ + CharCrossedOut: boolean; + + /** + * This optional property contains the font emphasis value. + * @see com.sun.star.text.FontEmphasis + */ + CharEmphasis: number; + + /** + * specifies the percentage by which to raise/lower superscript/subscript characters. + * + * Negative values denote subscripts and positive values superscripts. + * @see CharEscapementHeight + */ + CharEscapement: number; + + /** + * This is the relative height used for subscript or superscript characters in units of percent. + * + * The value 100 denotes the original height of the characters. + * @see CharEscapement + */ + CharEscapementHeight: number; + + /** If this optional property is `TRUE` , then the characters are flashing. */ + CharFlash: boolean; + + /** + * This property contains the text encoding of the font. + * @see com.sun.star.awt.CharSet + */ + CharFontCharSet: number; + + /** + * This property contains font family. + * @see com.sun.star.awt.FontFamily + */ + CharFontFamily: number; + + /** + * This property specifies the name of the font style. + * + * It may contain more than one name separated by comma. + */ + CharFontName: string; + + /** + * This property contains the font pitch. + * @see com.sun.star.awt.FontPitch + */ + CharFontPitch: number; + + /** + * This property contains the name of the font style. + * + * This property may be empty. + */ + CharFontStyleName: string; + + /** + * This optional property specifies the fundamental technology of the font. + * @see com.sun.star.awt.FontType + */ + CharFontType: number; + + /** This value contains the height of the characters in point. */ + CharHeight: number; + + /** + * If this optional property is `TRUE` , then the characters are invisible. + * @since OOo 2.0 + */ + CharHidden: boolean; + + /** + * Determines the color of the highlight. + * @since LibreOffice 4.2 + */ + CharHighlight: util.Color; + + /** + * Grab bag of character properties, used as a string-any map for interim interop purposes. + * @since LibreOffice 4.3 This property is intentionally not handled by the ODF filter. Any member that should be handled there should be first moved out + */ + CharInteropGrabBag: SafeArray; + + /** + * This optional property marks a range of characters to prevent it from being broken into two lines. + * + * A line break is applied before the range of characters if the layout makes a break necessary within the range. + */ + CharKeepTogether: boolean; + + /** This optional property contains the value of the kerning of the characters. */ + CharKerning: number; + + /** + * This property contains the left border of the object. + * @since LibreOffice 4.2 + */ + CharLeftBorder: table.BorderLine2; + + /** + * This property contains the distance from the left border to the object. + * @since LibreOffice 4.2 + */ + CharLeftBorderDistance: number; + + /** This property contains the value of the locale. */ + CharLocale: lang.Locale; + + /** This optional property determines if the word can be hyphenated at the character. */ + CharNoHyphenation: boolean; + + /** + * This optional property marks a range of characters to ignore a line break in this area. + * + * A line break is applied behind the range of characters if the layout makes a break necessary within the range. That means that the text may go through + * the border. + */ + CharNoLineBreak: boolean; + + /** + * This property contains the value of the posture of the document. + * @see com.sun.star.awt.FontSlant + */ + CharPosture: awt.FontSlant; + + /** + * This optional property contains the relief style of the characters. + * @see com.sun.star.text.FontRelief + */ + CharRelief: number; + + /** + * This property contains the right border of the object. + * @since LibreOffice 4.2 + */ + CharRightBorder: table.BorderLine2; + + /** + * This property contains the distance from the right border to the object. + * @since LibreOffice 4.2 + */ + CharRightBorderDistance: number; + + /** + * This optional property determines the rotation of a character in tenths of a degree. + * + * Depending on the implementation only certain values may be allowed. + */ + CharRotation: number; + + /** This optional property determines whether the text formatting tries to fit rotated text into the surrounded line height. */ + CharRotationIsFitToLine: boolean; + + /** + * This optional property determines the percentage value for scaling the width of characters. + * + * The value refers to the original width which is denoted by 100, and it has to be greater than 0. + */ + CharScaleWidth: number; + + /** This optional property contains the text shading value. */ + CharShadingValue: number; + + /** This optional property specifies if the characters are formatted and displayed with a shadow effect. */ + CharShadowed: boolean; + + /** + * Determines the type, color, and width of the shadow. + * @since LibreOffice 4.2 + */ + CharShadowFormat: table.ShadowFormat; + + /** + * This property determines the type of the strike out of the character. + * @see com.sun.star.awt.FontStrikeout + */ + CharStrikeout: number; + + /** This optional property specifies the name of the style of the font. */ + CharStyleName: string; + + /** + * This optional property specifies the names of the all styles applied to the font. + * + * It is not guaranteed that the order in the sequence reflects the order of the evaluation of the character style attributes. + * @since OOo 1.1.2 + */ + CharStyleNames: SafeArray; + + /** + * This property contains the top border of the object. + * @since LibreOffice 4.2 + */ + CharTopBorder: table.BorderLine2; + + /** + * This property contains the distance from the top border to the object. + * @since LibreOffice 4.2 + */ + CharTopBorderDistance: number; + + /** + * This property contains the value for the character underline. + * @see com.sun.star.awt.FontUnderline + */ + CharUnderline: number; + + /** + * This property contains the color of the underline for the characters. + * @see CharUnderlineHasColor + */ + CharUnderlineColor: util.Color; + + /** + * This property specifies if the property CharUnderlineColor is used for an underline. + * @see CharUnderlineColor + */ + CharUnderlineHasColor: boolean; + + /** + * This property contains the value of the font weight. + * @see com.sun.star.awt.FontWeight + */ + CharWeight: number; + + /** If this property is `TRUE` , the underline and strike-through properties are not applied to white spaces. */ + CharWordMode: boolean; + + /** This optional property contains the name of the hyperlink. */ + HyperLinkName: string; + + /** This optional property contains the name of the target for a hyperlink. */ + HyperLinkTarget: string; + + /** This optional property contains the URL of a hyperlink. */ + HyperLinkURL: string; + + /** + * This optional property determines the adjustment of the ruby . + * @see com.sun.star.text.RubyAdjust + */ + RubyAdjust: number; + + /** This optional property contains the name of the character style that is applied to RubyText. */ + RubyCharStyleName: string; + + /** This optional property determines whether the ruby text is printed above/left or below/right of the text. */ + RubyIsAbove: boolean; + + /** This optional property contains the text that is set as ruby. */ + RubyText: string; + + /** + * This property stores XML attributes. They will be saved to and restored from automatic styles inside XML files. + * @see com.sun.star.xml.AttributeContainer + */ + TextUserDefinedAttributes: container.XNameContainer; + + /** This optional property contains the character style name for unvisited hyperlinks. */ + UnvisitedCharStyleName: string; + + /** This optional property contains the character style name for visited hyperlinks. */ + VisitedCharStyleName: string; + } + + /** This is a set of properties to describe the style of characters in Asian texts. */ + interface CharacterPropertiesAsian { + /** This property contains the text encoding of the font as specified in {@link com.sun.star.awt.CharSet} . */ + CharFontCharSetAsian: number; + + /** This property contains font family as specified in {@link com.sun.star.awt.FontFamily} . */ + CharFontFamilyAsian: number; + + /** + * This property specifies the name of the font style. + * + * It may contain more than one name separated by comma. + */ + CharFontNameAsian: string; + + /** This property contains the font pitch as specified in {@link com.sun.star.awt.FontPitch} . */ + CharFontPitchAsian: number; + + /** + * This property contains the name of the font style. + * + * This property may be empty. + */ + CharFontStyleNameAsian: string; + + /** This value contains the height of the characters in point. */ + CharHeightAsian: number; + + /** contains the value of the locale. */ + CharLocaleAsian: lang.Locale; + + /** + * This property contains the value of the posture of the document. + * @see com.sun.star.awt.FontSlant + */ + CharPostureAsian: awt.FontSlant; + + /** + * This property contains the value of the font weight. + * @see com.sun.star.awt.FontWeight + */ + CharWeightAsian: number; + } + + /** This is a set of properties to describe the style of characters in complex texts. */ + interface CharacterPropertiesComplex { + /** This property contains the text encoding of the font as specified in {@link com.sun.star.awt.CharSet} . */ + CharFontCharSetComplex: number; + + /** This property contains font family as specified in {@link com.sun.star.awt.FontFamily} . */ + CharFontFamilyComplex: number; + + /** + * This property specifies the name of the font style. + * + * It may contain more than one name separated by comma. + */ + CharFontNameComplex: string; + + /** This property contains the font pitch as specified in {@link com.sun.star.awt.FontPitch} . */ + CharFontPitchComplex: number; + + /** + * This property contains the name of the font style. + * + * This property may be empty. + */ + CharFontStyleNameComplex: string; + + /** This value contains the height of the characters in point. */ + CharHeightComplex: number; + + /** contains the value of the locale. */ + CharLocaleComplex: lang.Locale; + + /** + * This property contains the value of the posture of the document. + * @see com.sun.star.awt.FontSlant + */ + CharPostureComplex: awt.FontSlant; + + /** + * This property contains the value of the font weight. + * @see com.sun.star.awt.FontWeight + */ + CharWeightComplex: number; + } + + /** specifies a style sheet for characters within a {@link com.sun.star.text.Text} . */ + interface CharacterStyle extends Style, CharacterProperties { + /** This value contains the character height as difference in point to the height of the character in the parent style. */ + CharDiffHeight: number; + + /** This value contains the character height as difference in point to the height of the character in the parent style in Asian text. */ + CharDiffHeightAsian: number; + + /** This value contains the character height as difference in point to the height of the character in the parent style in complex text. */ + CharDiffHeightComplex: number; + + /** This value contains the character height as percentage value relative to the height of the character in the parent style. */ + CharPropHeight: number; + + /** This value contains the character height as percentage value relative to the height of the character in the parent style in Asian text. */ + CharPropHeightAsian: number; + + /** This value contains the character height as percentage value relative to the height of the character in the parent style in complex text. */ + CharPropHeightComplex: number; + } + + /** This struct describes drop caps at a paragraph object. */ + interface DropCapFormat { + /** This is the number of characters in the drop cap. */ + Count: number; + + /** This is the distance between the drop cap in the following text. */ + Distance: number; + + /** This is the number of lines used for a drop cap. */ + Lines: number; + } + + /** + * This structure is used to specify the height of a text line. + * @see LineSpacingMode + */ + interface LineSpacing { + /** This value specifies the height in regard to **Mode** . */ + Height: number; + + /** This value specifies the way the height is specified. */ + Mode: number; + } + + /** specify the alignment of a numbering level. */ + interface NumberingAlignment { + /** set the alignment from the numbering. Use the {@link com.sun.star.style.HorizontalAlignment} enum to change the alignment. */ + Alignment: HorizontalAlignment; + + /** the distance between the numbering symbol and text. */ + Insertion: number; + + /** the minimum distance between the numbering symbol and the following text. */ + TextMarginDistance: number; + + /** the distance between left margin and the numbering symbol. */ + TextNumberingDistance: number; + } + + /** + * These properties describe the numbering of a paragraph. + * + * NumberType determines the type of the numbering symbol. Depending on this setting, some of the following values will be ignored. + */ + interface NumberingLevel { + /** This is the name of the font that is used for the bullet. */ + BulletFontName: string; + + /** The bullet symbol with this code in the assigned font is used. */ + BulletId: number; + + /** This is the name of the character style that is used for the symbol(s). */ + CharStyleName: string; + + /** This is the URL of a graphic file to use as a symbol. */ + GraphicURL: string; + + /** + * specifies the type of numbering. + * @see NumberingType + */ + NumberingType: number; + + /** specifies the number of higher numbering levels that are included in the representation of the current number. */ + ParentNumbering: number; + + /** This prefix is inserted in front of the numbering symbol(s). */ + Prefix: string; + + /** This specifies the start value for the numbering. */ + StartWith: number; + + /** This suffix is inserted after the numbering symbol(s). */ + Suffix: string; + } + + /** + * specifies a rule to format numberings. + * + * It is normally represented by a sequence of {@link com.sun.star.beans.PropertyValues} . + */ + interface NumberingRule extends NumberingAlignment, NumberingLevel { } + + /** describes the style of pages. */ + interface PageProperties { + /** contains the background color of the page. */ + BackColor: util.Color; + + /** contains the filter name of the background graphic. */ + BackGraphicFilter: string; + + /** determines the location of the background graphic. */ + BackGraphicLocation: GraphicLocation; + + /** contains the URL of the background graphic. */ + BackGraphicURL: string; + + /** + * determines if the background color is transparent. + * + * If this property is set to `TRUE` , {@link PageStyle.BackColor} will not be used. + */ + BackTransparent: boolean; + + /** determines the distance of all borders of the page. */ + BorderDistance: number; + + /** determines the style of the bottom border line of the page. */ + BottomBorder: table.BorderLine; + + /** determines the bottom border distance of the page. */ + BottomBorderDistance: number; + + /** determines the bottom margin of the page. */ + BottomMargin: number; + + /** + * determines if the header/footer content on the first page and remaining pages is the same. + * @since LibreOffice 4.0 + */ + FirstIsShared: boolean; + + /** contains the color of the background of the footer. */ + FooterBackColor: util.Color; + + /** contains the filter name of the background graphic in the footer. */ + FooterBackGraphicFilter: string; + + /** determines the location of the background graphic in the footer. */ + FooterBackGraphicLocation: GraphicLocation; + + /** contains the URL of the background graphic in the footer. */ + FooterBackGraphicURL: string; + + /** determines if the background of the footer is transparent. */ + FooterBackTransparent: boolean; + + /** determines the distance between the footer and the body text area. */ + FooterBodyDistance: number; + + /** contains the distance of all borders of the footer. */ + FooterBorderDistance: number; + + /** contains the style of the bottom border line of the footer. */ + FooterBottomBorder: table.BorderLine; + + /** contains the bottom border distance of the footer. */ + FooterBottomBorderDistance: number; + + /** determines whether to use dynamic spacing in footer or not. */ + FooterDynamicSpacing: boolean; + + /** determines the height of the footer. */ + FooterHeight: number; + + /** determines if the height of the footer depends on the content. */ + FooterIsDynamicHeight: boolean; + + /** determines if a footer is used on the page. */ + FooterIsOn: boolean; + + /** determines if the footer content on left and right pages is the same. */ + FooterIsShared: boolean; + + /** contains the style of the left border line of the footer. */ + FooterLeftBorder: table.BorderLine; + + /** contains the left border distance of the footer. */ + FooterLeftBorderDistance: number; + + /** determines the left margin of the footer. */ + FooterLeftMargin: number; + + /** contains the style of the right border line of the footer. */ + FooterRightBorder: table.BorderLine; + + /** contains the right border distance of the footer. */ + FooterRightBorderDistance: number; + + /** determines the right margin of the footer. */ + FooterRightMargin: number; + + /** determines the shadow of the footer. */ + FooterShadowFormat: table.ShadowFormat; + + /** contains the interface to the text of the footer. */ + FooterText: text.XText; + + /** contains the interface to the text of the footer of a left page. */ + FooterTextLeft: text.XText; + + /** contains the interface to the text of the footer of a right page.contains . */ + FooterTextRight: text.XText; + + /** contains the style of the top border line of the footer. */ + FooterTopBorder: table.BorderLine; + + /** contains the top border distance of the footer. */ + FooterTopBorderDistance: number; + + /** contains the maximum height of the footnote area. If set to zero then the height of the current page is used as limit. */ + FootnoteHeight: number; + + /** + * contains the adjustment of the separator line between the text and the footnote area. + * + * com::sun::star::text::HorizontalAdjusts. + */ + FootnoteLineAdjust: number; + + /** contains the color of the separator line between the text and the footnote area. */ + FootnoteLineColor: util.Color; + + /** contains the distance between the footnote area and the separator line between the text and the footnote area. */ + FootnoteLineDistance: number; + + /** contains the relative width of the separator line between the text and the footnote area. */ + FootnoteLineRelativeWidth: number; + + /** + * contains the style of the separator line between the text and the footnote area. + * @see com.sun.star.style.FootnoteLineStyle for the possible values. + */ + FootnoteLineStyle: number; + + /** contains the distance between the text and the separator line between the text and the footnote area. */ + FootnoteLineTextDistance: number; + + /** contains the weight of the separator line between the text and the footnote area. */ + FootnoteLineWeight: number; + + /** contains the height of the base text line inside the text grid */ + GridBaseHeight: number; + + /** contains the display color of the text grid */ + GridColor: util.Color; + + /** determines whether the text grid lines are visible or not */ + GridDisplay: boolean; + + /** contains the number of lines in the text grid */ + GridLines: number; + + /** contains the mode of the text grid (none, lines, ...), as represented by {@link com.sun.star.text.TextGridMode} constants */ + GridMode: number; + + /** determines whether the text grid lines are printed */ + GridPrint: boolean; + + /** determines whether the text grid's ruby line is located below or above the base line */ + GridRubyBelow: boolean; + + /** contains the height of the ruby text line inside the text grid */ + GridRubyHeight: number; + + /** contains the color of the background of the header. */ + HeaderBackColor: util.Color; + + /** contains the filter name of the background graphic of the header. */ + HeaderBackGraphicFilter: string; + + /** determines the location of the background graphic of the header. */ + HeaderBackGraphicLocation: GraphicLocation; + + /** contains the URL of the background graphic of the header. */ + HeaderBackGraphicURL: string; + + /** + * determines if the background color of the header is transparent. + * + * If this property is set to `TRUE` , {@link PageStyle.HeaderBackColor} will not be used. + */ + HeaderBackTransparent: boolean; + + /** determines the distance between the header and the body text area. */ + HeaderBodyDistance: number; + + /** determines the distance of all borders of the header. */ + HeaderBorderDistance: number; + + /** determines the style of the bottom border line of the header. */ + HeaderBottomBorder: table.BorderLine; + + /** determines the bottom border distance of the header. */ + HeaderBottomBorderDistance: number; + + /** determines whether to use dynamic spacing in header or not. */ + HeaderDynamicSpacing: boolean; + + /** contains the height of the header. */ + HeaderHeight: number; + + /** determines if the height of the header depends on the content. */ + HeaderIsDynamicHeight: boolean; + + /** determines if a header is used on the page. */ + HeaderIsOn: boolean; + + /** determines if the header content on left and right pages is the same. */ + HeaderIsShared: boolean; + + /** determines the style of the left border line of the header. */ + HeaderLeftBorder: table.BorderLine; + + /** determines the left border distance of the header. */ + HeaderLeftBorderDistance: number; + + /** contains the left margin of the header. */ + HeaderLeftMargin: number; + + /** determines the style of the right border line of the header. */ + HeaderRightBorder: table.BorderLine; + + /** determines the right border distance of the header. */ + HeaderRightBorderDistance: number; + + /** contains the right margin of the header. */ + HeaderRightMargin: number; + + /** determines the shadow of the header. */ + HeaderShadowFormat: table.ShadowFormat; + + /** contains the interface to the text of the header. */ + HeaderText: text.XText; + + /** contains the interface to the text of the header of left pages. */ + HeaderTextLeft: text.XText; + + /** contains the interface to the text of the header of right pages. */ + HeaderTextRight: text.XText; + + /** determines the style of the top border line of the header. */ + HeaderTopBorder: table.BorderLine; + + /** determines the top border distance of the header. */ + HeaderTopBorderDistance: number; + + /** contains the height of the page. */ + Height: number; + + /** determines if the page format is landscape. */ + IsLandscape: boolean; + + /** determines the style of the left border line of the page. */ + LeftBorder: table.BorderLine; + + /** determines the left border distance of the page. */ + LeftBorderDistance: number; + + /** determines the left margin of the page. */ + LeftMargin: number; + + /** determines the default numbering type for this page. */ + NumberingType: number; + + /** determines the layout of the page. */ + PageStyleLayout: PageStyleLayout; + + /** contains the name of a paper tray of the selected printer. */ + PrinterPaperTray: string; + + /** determines if the register mode is active on that page. */ + RegisterModeActive: boolean; + + /** contains the name of the paragraph style that is used as reference of the register mode. */ + RegisterParagraphStyle: string; + + /** determines the style of the right border line of the page. */ + RightBorder: table.BorderLine; + + /** determines the right border distance of the page. */ + RightBorderDistance: number; + + /** determines the right margin of the page. */ + RightMargin: number; + + /** determines the shadow of the page. */ + ShadowFormat: table.ShadowFormat; + + /** contains the paper size of the page. */ + Size: awt.Size; + + /** contains the column settings of the page. */ + TextColumns: text.XTextColumns; + + /** determines the style of the top border line of the page. */ + TopBorder: table.BorderLine; + + /** determines the top border distance of the page. */ + TopBorderDistance: number; + + /** determines the top margin of the page. */ + TopMargin: number; + + /** + * contains user defined attributes. + * + * This {@link com.sun.star.container.XNameContainer} supports the service {@link com.sun.star.xml.AttributeContainer} . + */ + UserDefinedAttributes: container.XNameContainer; + + /** contains the width of the page. */ + Width: number; + + /** contains the writing direction, as represented by the {@link com.sun.star.text.WritingMode2} constants */ + WritingMode: number; + } + + /** + * contributes common properties of page styles. + * @see com.sun.star.text.TextPageStyle + * @see com.sun.star.sheet.TablePageStyle + */ + interface PageStyle extends Style, PageProperties { } + + /** describes the style of paragraphs. */ + interface ParagraphProperties { + /** contains the distance from the border to the object. */ + BorderDistance: number; + + /** contains the bottom border of the object. */ + BottomBorder: table.BorderLine; + + /** contains the distance from the bottom border to the object. */ + BottomBorderDistance: number; + + /** + * determines the type of break that is applied at the beginning of the table. + * @see com.sun.star.style.BreakType + */ + BreakType: BreakType; + + /** specifies the character style name for drop caps. */ + DropCapCharStyleName: string; + + /** specifies whether the first characters of the paragraph are displayed in capital letters and how they are formatted. */ + DropCapFormat: DropCapFormat; + + /** specifies if the property **DropCapFormat** is applied to the whole first word. */ + DropCapWholeWord: boolean; + + /** contains the left border of the object. */ + LeftBorder: table.BorderLine; + + /** contains the distance from the left border to the object. */ + LeftBorderDistance: number; + + /** specifies the id of the list to which the paragraph belongs */ + ListId: string; + + /** + * returns `FALSE` if the paragraph is part of a numbering, but has no numbering label. + * + * A paragraph is part of a numbering, if a style for a numbering is set - see NumberingStyleName. + * + * If the paragraph is not part of a numbering the property is void. + */ + NumberingIsNumber: boolean; + + /** specifies the numbering level of the paragraph. */ + NumberingLevel: number; + + /** contains the numbering rules applied to this paragraph. */ + NumberingRules: container.XIndexReplace; + + /** specifies the start value for numbering if a new numbering starts at this paragraph. */ + NumberingStartValue: number; + + /** + * specifies the name of the style for the numbering. + * + * The name must be one of the names which are available via {@link XStyleFamiliesSupplier} . + */ + NumberingStyleName: string; + + /** + * specifies the outline level to which the paragraph belongs + * @since OOo 3.1 Value 0 indicates that the paragraph belongs to the body text. Values [1..10] indicates that the paragraph belongs to the corresponding + */ + OutlineLevel: number; + + /** + * If this property is set, it creates a page break before the paragraph it belongs to and assigns the value as the name of the new page style sheet to + * use. + */ + PageDescName: string; + + /** If a page break property is set at a paragraph, this property contains the new value for the page number. */ + PageNumberOffset: number; + + /** contains the name of the current page style. */ + PageStyleName: string; + + /** determines the adjustment of a paragraph. */ + ParaAdjust: ParagraphAdjust; + + /** contains the paragraph background color. */ + ParaBackColor: util.Color; + + /** contains the name of the graphic filter for the background graphic of a paragraph. */ + ParaBackGraphicFilter: string; + + /** + * contains the value for the position of a background graphic. + * @see com.sun.star.style.GraphicLocation + */ + ParaBackGraphicLocation: GraphicLocation; + + /** contains the value of a link for the background graphic of a paragraph. */ + ParaBackGraphicURL: string; + + /** This value is `TRUE` if the paragraph background color is set to transparent. */ + ParaBackTransparent: boolean; + + /** + * determines the bottom margin of the paragraph in 100th mm. + * + * The distance between two paragraphs is specified by: + * + * either the bottom margin of the previous paragraphor the top margin of the following paragraph. The greater one is chosen. + */ + ParaBottomMargin: number; + + /** + * determines if contextual spacing is used. + * @since LibreOffice 3.6 If true, the top and bottom margins of the paragraph should not be applied when the previous and next paragraphs have the same style. + */ + ParaContextMargin: boolean; + + /** + * determines if single words are stretched. + * + * It is only valid if {@link ParagraphProperties.ParaAdjust} and {@link ParagraphProperties.ParaLastLineAdjust} are also valid. + */ + ParaExpandSingleWord: boolean; + + /** specifies the indent for the first line. */ + ParaFirstLineIndent: number; + + /** specifies the maximum number of consecutive hyphens. */ + ParaHyphenationMaxHyphens: number; + + /** specifies the maximum number of characters to remain before the hyphen character (when hyphenation is applied). */ + ParaHyphenationMaxLeadingChars: number; + + /** specifies the maximum number of characters to remain after the hyphen character (when hyphenation is applied). */ + ParaHyphenationMaxTrailingChars: number; + + /** + * Grab bag of paragraph properties, used as a string-any map for interim interop purposes. + * @since LibreOffice 4.2 This property is intentionally not handled by the ODF filter. Any member that should be handled there should be first moved out + */ + ParaInteropGrabBag: SafeArray; + + /** determines if the first line should be indented automatically. */ + ParaIsAutoFirstLineIndent: boolean; + + /** + * the property determines if borders set at a paragraph are merged with the next paragraph. + * + * Borders are only merged if they are identical. + */ + ParaIsConnectBorder: boolean; + + /** specifies if automatic hyphenation is applied. */ + ParaIsHyphenation: boolean; + + /** determines if the numbering rules restart, counting at the current paragraph. */ + ParaIsNumberingRestart: boolean; + + /** + * Setting this property to `TRUE` prevents page or column breaks between this and the following paragraph. + * + * This feature is useful for preventing title paragraphs to be the last line on a page or column. + */ + ParaKeepTogether: boolean; + + /** + * determines the adjustment of the last line. + * + * It is only valid if {@link ParagraphProperties.ParaAdjust} is set to ParagraphAdjust::BLOCK. + */ + ParaLastLineAdjust: number; + + /** determines the left margin of the paragraph in 100th mm. */ + ParaLeftMargin: number; + + /** determines if the paragraph is included in the line numbering. */ + ParaLineNumberCount: boolean; + + /** contains the start value for the line numbering. */ + ParaLineNumberStartValue: number; + + /** contains the type of the line spacing of a paragraph. */ + ParaLineSpacing: LineSpacing; + + /** specifies the minimum number of lines of the paragraph that have to be at bottom of a page if the paragraph is spread over more than one page. */ + ParaOrphans: number; + + /** + * determines if the register mode is applied to a paragraph. + * + * Remark: Register mode is only used if the register mode property of the page style is switched on. + */ + ParaRegisterModeActive: boolean; + + /** determines the right margin of the paragraph in 100th mm. */ + ParaRightMargin: number; + + /** + * determines the type, color, and size of the shadow. + * @see com.sun.star.table.ShadowFormat + */ + ParaShadowFormat: table.ShadowFormat; + + /** Setting this property to `FALSE` prevents the paragraph from getting split into two pages or columns. */ + ParaSplit: boolean; + + /** contains the name of the current paragraph style. */ + ParaStyleName: string; + + /** specifies the positions and kinds of the tab stops within this paragraph. */ + ParaTabStops: SafeArray; + + /** + * determines the top margin of the paragraph in 100th mm. + * + * The distance between two paragraphs is specified by: + * + * either the bottom margin of the previous paragraph.or the top margin of the following paragraph. The greater one is chosen. + */ + ParaTopMargin: number; + + /** + * this property stores xml attributes. They will be saved to and restored from automatic styles inside xml files. + * @see com.sun.star.xml.AttributeContainer + */ + ParaUserDefinedAttributes: container.XNameContainer; + + /** + * specifies the vertical alignment of a paragraph. + * @see com.sun.star.text.ParagraphVertAlign + */ + ParaVertAlignment: number; + + /** specifies the minimum number of lines of the paragraph that have to be at top of a page if the paragraph is spread over more than one page. */ + ParaWidows: number; + + /** contains the right border of the object. */ + RightBorder: table.BorderLine; + + /** contains the distance from the right border to the object. */ + RightBorderDistance: number; + + /** contains the top border of the object. */ + TopBorder: table.BorderLine; + + /** contains the distance from the top border to the object. */ + TopBorderDistance: number; + } + + /** contains settings for the style of paragraphs with complex text layout. */ + interface ParagraphPropertiesAsian { + /** determines if a distance between Asian text, western text or complex text is set. */ + ParaIsCharacterDistance: boolean; + + /** determines if the rules for forbidden characters at the start or end of text lines are considered. */ + ParaIsForbiddenRules: boolean; + + /** determines if hanging punctuation is allowed. */ + ParaIsHangingPunctuation: boolean; + } + + /** contains settings for the style of paragraphs with complex text layout. */ + interface ParagraphPropertiesComplex { + /** contains the writing direction, as represented by the {@link com.sun.star.text.WritingMode2} constants */ + WritingMode: number; + } + + /** specifies a style sheet for paragraphs within a {@link com.sun.star.text.Text} . */ + interface ParagraphStyle extends Style, xml.ParaUserDefinedAttributesSupplier, ParagraphProperties { + /** + * determines the category of a paragraph style. + * @see com.sun.star.style.ParagraphStyleCategory + */ + Category: number; + CharDiffHeight: number; + + /** This value contains the character height as difference in point to the height of the character in the parent style in Asian text. */ + CharDiffHeightAsian: number; + + /** This value contains the character height as difference in point to the height of the character in the parent style in complex text. */ + CharDiffHeightComplex: number; + + /** This value contains the character height as percentage value relative to the height of the character in the parent style. */ + CharPropHeight: number; + + /** This value contains the character height as percentage value relative to the height of the character in the parent style in Asian text. */ + CharPropHeightAsian: number; + + /** This value contains the character height as percentage value relative to the height of the character in the parent style in complex text. */ + CharPropHeightComplex: number; + + /** + * returns the name of the page style in use + * + * For setting the page style you have to use the com::sun::star::text::PageDescName properties. + */ + PageStyleName: string; + + /** + * determines the Bottom margin of the paragraph relative to the ParaBottomMargin of the parent style. + * + * If the value of ParaBottomMarginRelative is 100 the current ParaBottomMargin value is used. + */ + ParaBottomMarginRelative: number; + + /** + * determines the left margin of the paragraph relative to the ParaLeftMargin of the parent style. + * + * If the value of ParaLeftMarginRelative is 100 the current ParaLeftMargin value is used. + */ + ParaLeftMarginRelative: number; + + /** + * determines the right margin of the paragraph relative to the ParaRightMargin of the parent style. + * + * If the value of ParaRightMarginRelative is 100 the current ParaRightMargin value is used. + */ + ParaRightMarginRelative: number; + + /** + * determines the top margin of the paragraph relative to the ParaTopMargin of the parent style. + * + * If the value of ParaTopMarginRelative is 100 the current ParaTopMargin value is used. + */ + ParaTopMarginRelative: number; + } + + /** This service specifies a single style sheet. */ + interface Style extends xml.UserDefinedAttributesSupplier, XStyle, beans.XPropertySet, beans.XMultiPropertySet, beans.XMultiPropertyStates { + /** + * contains the name of the style as it is displayed in the user interface. + * + * The names of the styles at the API are language independent. The user interface names are localized. + */ + DisplayName: string; + + /** + * contains the name of the style that is applied to the next paragraph. + * + * This property is usually available at paragraph styles only. + */ + FollowStyle: string; + + /** + * Flag indicating whether to hide the style in the UI. + * @since LibreOffice 4.0 + */ + Hidden: boolean; + + /** + * determines if a style is automatically updated, if the properties of an object that the style is applied to are changed. + * + * For example, if the style is applied to a paragraph and the properties of the paragraph are changed then the style will be updated accordingly. + */ + IsAutoUpdate: string; + + /** + * determines if a style is physically created. + * + * Built in styles may not be created until they are needed. To prevent standard style properties from being exported, it may be useful to check if the + * style is created first. + */ + IsPhysical: boolean; + + /** + * defines the context and styles for conditional paragraphs. + * + * This property is only available if the style is a conditional paragraph style. + * + * The sequence consists of pairs where the name part of the pair defines the context where it should be applied and the value part is a string naming + * the style to be used in that context. + * + * Assigning an empty string to the style name will disable the conditional style for that context. + * + * The allowed strings (contexts) for the name part of an entry of the sequence are: + * + * umberingLevel1NumberingLevel2NumberingLevel3NumberingLevel4NumberingLevel5NumberingLevel6NumberingLevel7NumberingLevel8NumberingLevel9NumberingLevel10 + * @since OOo 2.0.1 + */ + ParaStyleConditions: SafeArray; + + /** + * Grab bag of style properties, used as a string-any map for interim interop purposes. + * @since LibreOffice 4.2 This property is intentionally not handled by the ODF filter. Any member that should be handled there should be first moved out + */ + StyleInteropGrabBag: SafeArray; + } + + /** + * This service contains the collection of style families within the container document. + * + * Examples of style families may be: **CharacterStyles **: the container of style sheets for sequences of characters within a text; + * + * **ParagraphStyles **: the container of style sheets for text paragraphs; + * + * **FrameStyles **: the container of style sheets for text frames; + * + * **PageStyles **: the container of style sheets for pages; + * + * **NumberingStyles **: the container for style sheets for numbering; + * + * **CellStyles **: the container for style sheets for cells; + * + * **ShapeStyles **: the container for style sheets for shapes + */ + interface StyleFamilies extends container.XNameAccess, container.XIndexAccess { } + + /** + * This service is a container of style sheets of the same style family. + * @see StyleFamilies + */ + interface StyleFamily extends container.XNameAccess, container.XNameContainer, container.XIndexAccess { } + + /** This structure is used to specify a single tabulator stop. */ + interface TabStop { + /** This field specifies the alignment of the text range before the tabulator. */ + Alignment: TabAlign; + + /** This field specifies which delimiter is used for the decimal. */ + DecimalChar: string; + + /** This field specifies the character that is used to fill up the space between the text in the text range and the tabulators. */ + FillChar: string; + + /** This field specifies the position of the tabulator in relation to the left border. */ + Position: number; + } + + /** This interface allows access to a single automatic style. */ + interface XAutoStyle extends beans.XMultiPropertySet, beans.XMultiPropertyStates { + /** returns a sequence of all properties that are set in the style */ + getProperties(): beans.PropertyValues; + + /** returns a sequence of all properties that are set in the style */ + readonly Properties: beans.PropertyValues; + } + + /** This service contains the collection of automatic style families within the container document. */ + interface XAutoStyleFamily extends container.XEnumerationAccess { + insertStyle(Values: beans.PropertyValues): XAutoStyle; + } + + /** This service contains the collection of automatic style families within the container document. */ + interface XAutoStyles extends container.XNameAccess, container.XIndexAccess { } + + /** This interface provides access to the style families within the container document. */ + interface XAutoStylesSupplier extends uno.XInterface { + /** + * This method returns the collection of automatic style families available in the container document. + * @see AutoStyles + */ + readonly AutoStyles: XAutoStyles; + + /** + * This method returns the collection of automatic style families available in the container document. + * @see AutoStyles + */ + getAutoStyles(): XAutoStyles; + } + + /** + * This interface provides access to an XPropertySet of defaults. This can either be the parent of an XPropertySet or the global property defaults for a + * document. + */ + interface XDefaultsSupplier extends uno.XInterface { + /** This method returns an XPropertySet of defaults. */ + readonly Defaults: beans.XPropertySet; + + /** This method returns an XPropertySet of defaults. */ + getDefaults(): beans.XPropertySet; + } + + /** specifies a template for a style (aka style sheet). */ + interface XStyle extends container.XNamed { + /** @returns the name of the parent style, probably empty. */ + getParentStyle(): string; + + /** @returns `TRUE` if this type is used in the document. */ + isInUse(): boolean; + + /** identifies a style as defined by the user. */ + isUserDefined(): boolean; + + /** @returns the name of the parent style, probably empty. */ + ParentStyle: string; + + /** sets the name of the parent style. */ + setParentStyle(aParentStyle: string): void; + } + + /** This interface provides access to the style families within the container document. */ + interface XStyleFamiliesSupplier extends uno.XInterface { + /** + * This method returns the collection of style families available in the container document. + * @see StyleFamilies + */ + getStyleFamilies(): container.XNameAccess; + + /** + * This method returns the collection of style families available in the container document. + * @see StyleFamilies + */ + readonly StyleFamilies: container.XNameAccess; + } + + /** enables the object to import styles from documents. */ + interface XStyleLoader extends uno.XInterface { + /** @returns a sequence of the supported properties as declared in {@link XStyleLoader.loadStylesFromURL()} with their current values. */ + getStyleLoaderOptions(): SafeArray; + + /** + * loads styles from a document at the given URL. + * + * If **OverwriteStyles** is `TRUE` , then all styles will be loaded. Otherwise, only styles which are not already defined in this document are loaded. + * @param URL The directory and the filename from document with the styles + * @param aOptions Specifies which of the {@link Style} families the method should load. The `sequence` has the following, optional items: b + */ + loadStylesFromURL(URL: string, aOptions: LibreOffice.SeqEquiv): void; + + /** @returns a sequence of the supported properties as declared in {@link XStyleLoader.loadStylesFromURL()} with their current values. */ + readonly StyleLoaderOptions: SafeArray; + } + + /** + * extends {@link XStyleLoader} interface to import styles from an already opened component. + * @see com.sun.star.style.XStyleLoader + * @since LibreOffice 4.4 + */ + interface XStyleLoader2 extends XStyleLoader { + /** + * loads styles from a given document + * @param aSourceComponent a valid XComponent reference to source document + * @param aOptions Specifies which of the {@link Style} families the method should load. The `sequence` has the following, optional items: b + */ + loadStylesFromDocument(aSourceComponent: lang.XComponent, aOptions: LibreOffice.SeqEquiv): void; + } + + interface XStyleSupplier extends uno.XInterface { + /** + * get the currently set style. + * @returns the style. If no style was set, the returned object may be empty (null). Otherwise, the returned object must support the service PropertyTemplate. + */ + getStyle(): XStyle; + + /** @param xStyle If you want to remove an existing style, you can set an empty (null) object. Otherwise, the object given must support the service Property */ + setStyle(xStyle: XStyle): void; + + /** + * get the currently set style. + * @returns the style. If no style was set, the returned object may be empty (null). Otherwise, the returned object must support the service PropertyTemplate. + */ + Style: XStyle; + } + + namespace CaseMap { + const enum Constants { + LOWERCASE = 2, + NONE = 0, + SMALLCAPS = 4, + TITLE = 3, + UPPERCASE = 1, + } + } + + namespace FootnoteLineStyle { + const enum Constants { + DASHED = 3, + DOTTED = 2, + NONE = 0, + SOLID = 1, + } + } + + namespace LineNumberPosition { + const enum Constants { + INSIDE = 2, + LEFT = 0, + OUTSIDE = 3, + RIGHT = 1, + } + } + + namespace LineSpacingMode { + const enum Constants { + FIX = 3, + LEADING = 2, + MINIMUM = 1, + PROP = 0, + } + } + + namespace NumberingType { + const enum Constants { + AIU_FULLWIDTH_JA = 21, + AIU_HALFWIDTH_JA = 22, + ARABIC = 4, + BITMAP = 8, + CHAR_SPECIAL = 6, + CHARS_ARABIC = 31, + CHARS_ARABIC_ABJAD = 54, + CHARS_CYRILLIC_LOWER_LETTER_BG = 39, + CHARS_CYRILLIC_LOWER_LETTER_N_BG = 41, + CHARS_CYRILLIC_LOWER_LETTER_N_RU = 45, + CHARS_CYRILLIC_LOWER_LETTER_N_SR = 51, + CHARS_CYRILLIC_LOWER_LETTER_RU = 43, + CHARS_CYRILLIC_LOWER_LETTER_SR = 49, + CHARS_CYRILLIC_UPPER_LETTER_BG = 38, + CHARS_CYRILLIC_UPPER_LETTER_N_BG = 40, + CHARS_CYRILLIC_UPPER_LETTER_N_RU = 44, + CHARS_CYRILLIC_UPPER_LETTER_N_SR = 50, + CHARS_CYRILLIC_UPPER_LETTER_RU = 42, + CHARS_CYRILLIC_UPPER_LETTER_SR = 48, + CHARS_GREEK_LOWER_LETTER = 53, + CHARS_GREEK_UPPER_LETTER = 52, + CHARS_HEBREW = 33, + CHARS_KHMER = 35, + CHARS_LAO = 36, + CHARS_LOWER_LETTER = 1, + CHARS_LOWER_LETTER_N = 10, + CHARS_MYANMAR = 47, + CHARS_NEPALI = 34, + CHARS_PERSIAN = 46, + CHARS_PERSIAN_WORD = 55, + CHARS_THAI = 32, + CHARS_TIBETAN = 37, + CHARS_UPPER_LETTER = 0, + CHARS_UPPER_LETTER_N = 9, + CIRCLE_NUMBER = 14, + DI_ZI_ZH = 19, + FULLWIDTH_ARABIC = 13, + HANGUL_CIRCLED_JAMO_KO = 29, + HANGUL_CIRCLED_SYLLABLE_KO = 30, + HANGUL_JAMO_KO = 27, + HANGUL_SYLLABLE_KO = 28, + IROHA_FULLWIDTH_JA = 23, + IROHA_HALFWIDTH_JA = 24, + NATIVE_NUMBERING = 12, + NUMBER_HANGUL_KO = 26, + NUMBER_LOWER_ZH = 15, + NUMBER_NONE = 5, + NUMBER_TRADITIONAL_JA = 20, + NUMBER_UPPER_KO = 25, + NUMBER_UPPER_ZH = 16, + NUMBER_UPPER_ZH_TW = 17, + PAGE_DESCRIPTOR = 7, + ROMAN_LOWER = 3, + ROMAN_UPPER = 2, + TIAN_GAN_ZH = 18, + TRANSLITERATION = 11, + } + } + + namespace ParagraphStyleCategory { + const enum Constants { + CHAPTER = 1, + EXTRA = 4, + HTML = 5, + INDEX = 3, + LIST = 2, + TEXT = 0, + } + } + } + + namespace svg { + /** @deprecated Deprecated */ + interface XSVGPrinter extends uno.XInterface { + endJob(): void; + printPage(aPrintPage: LibreOffice.SeqEquiv): void; + startJob(aHandler: xml.sax.XDocumentHandler, aJobSetup: LibreOffice.SeqEquiv, aJobName: string, nCopies: number, bCollate: boolean): boolean; + } + + /** @deprecated Deprecated */ + interface XSVGWriter extends uno.XInterface { + write(aHandler: xml.sax.XDocumentHandler, aMtf: LibreOffice.SeqEquiv): void; + } + } + + namespace system { + /** + * Specifies a {@link SimpleCommandMail} service. Implementations of such a service, do implement an interface to send mail messages via the current + * configured command line mail application. + * @see com.sun.star.system.XSimpleMailClient + */ + type SimpleCommandMail = XSimpleMailClientSupplier; + + /** + * Specifies a {@link SimpleSystemMail} service. Implementations of such a service implement an interface to send mail messages via the currently + * configured system mail client. + * @see com.sun.star.system.XSimpleMailClient + */ + type SimpleSystemMail = XSimpleMailClientSupplier; + + /** + * Specifies a system executer service. Such a service makes it possible to execute an arbitrary system command. + * @see com.sun.star.system.XSystemShellExecute + */ + type SystemShellExecute = XSystemShellExecute; + + /** + * May be thrown in cases of errors executing a command using the {@link SystemShellExecute} service. {@link com.sun.star.uno.Exception.Message} may + * contain a system error message, but it is not mandatory. The member PosixError specifies a POSIX conforming error code or -1 for unknown errors. + */ + interface SystemShellExecuteException extends uno.Exception { + /** A POSIX conforming error code or -1 for unknown errors. */ + PosixError: number; + } + + /** Specifies an interface for creating and sending email messages. */ + interface XSimpleMailClient extends uno.XInterface { + /** + * Create a simple mail message object that implements the interface {@link XSimpleMailMessage} . + * @returns An object that implements the {@link XSimpleMailMessage} interface. + */ + createSimpleMailMessage(): XSimpleMailMessage; + + /** + * Sends a given simple mail message object that implements the interface {@link XSimpleMailMessage} . + * @param xSimpleMailMessage Specifies a configured mail object to be sent. + * @param aFlag Specifies different flags that control the send process if the flag NO_USER_INTERFACE is specified. A recipient address must have been spec + * @see com.sun.star.system.XSimpleMailMessage + * @see com.sun.star.system.SimpleMailClientFlags + * @throws com::sun::star::lang::IllegalArgumentException If invalid or excluding flags have been specified.The flag NO_USER_INTERFACE is specified and no r + * @throws com::sun::star::uno::Exception if an error occurs while sending the mail. The Message member of the exception may contain an error description. + */ + sendSimpleMailMessage(xSimpleMailMessage: XSimpleMailMessage, aFlag: number): void; + } + + /** + * Implementations of this interface do provide access to a simple mail client if there is one available + * @see com.sun.star.system.XSimpleMailClient + */ + interface XSimpleMailClientSupplier extends uno.XInterface { + /** + * Allows a client to query for an object that implements {@link XSimpleMailClient} . + * @returns An interface to a simple mail client if there is one available on the system or an empty reference else. + * @see com.sun.star.system.XSimpleMailClient + */ + querySimpleMailClient(): XSimpleMailClient; + } + + /** This interface lets a client set or get the information of a simple mail message. */ + interface XSimpleMailMessage extends uno.XInterface { + /** + * To get the attachment of a simple mail message. + * @returns A sequence of file URLs specifying the files that should be attached to the mail or an empty sequence if no attachments have been specified. The + */ + Attachement: SafeArray; + + /** + * To get the BCC recipients of a simple mail message. + * @returns A sequence with the email addresses of one or more BCC recipients. If no BCC recipients have been specified an empty sequence will be returned. + */ + BccRecipient: SafeArray; + + /** + * To get the cc recipients of a simple mail message. + * @returns A sequence with the email addresses of one or more cc recipients. If no cc recipients have been specified an empty sequence will be returned. + */ + CcRecipient: SafeArray; + + /** + * To get the attachment of a simple mail message. + * @returns A sequence of file URLs specifying the files that should be attached to the mail or an empty sequence if no attachments have been specified. The + */ + getAttachement(): SafeArray; + + /** + * To get the BCC recipients of a simple mail message. + * @returns A sequence with the email addresses of one or more BCC recipients. If no BCC recipients have been specified an empty sequence will be returned. + */ + getBccRecipient(): SafeArray; + + /** + * To get the cc recipients of a simple mail message. + * @returns A sequence with the email addresses of one or more cc recipients. If no cc recipients have been specified an empty sequence will be returned. + */ + getCcRecipient(): SafeArray; + + /** + * To get the email address of the originator of a simple mail message. + * @returns The email address of the originator of the mail. If no originator has been specified an empty string will be returned. + */ + getOriginator(): string; + + /** + * To get the recipient of the simple mail message. + * @returns The specified email address of a recipient if any has been specified or an empty string. + */ + getRecipient(): string; + + /** + * To get the subject of a simple mail message. + * @returns The subject of the simple mail message. If no subject has been specified an empty string will be returned. + */ + getSubject(): string; + + /** + * To get the email address of the originator of a simple mail message. + * @returns The email address of the originator of the mail. If no originator has been specified an empty string will be returned. + */ + Originator: string; + + /** + * To get the recipient of the simple mail message. + * @returns The specified email address of a recipient if any has been specified or an empty string. + */ + Recipient: string; + + /** + * To set an attachment of a simple mail message. + * @param aAttachement Sets a sequence of file URLs specifying the files that should be attached to the mail. The given file URLs must conform to [Rfc1738] + * @throws com::sun::star::lang::IllegalArgumentException if at least one of the given file URLs is invalid (doesn't conform to [Rfc1738]{@link url="http:// + */ + setAttachement(aAttachement: LibreOffice.SeqEquiv): void; + + /** + * To set the BCC recipient of a simple mail message. + * @param aBccRecipient A sequence with the email addresses of one or more BCC recipients. An empty sequence means there are no BCC recipients. + */ + setBccRecipient(aBccRecipient: LibreOffice.SeqEquiv): void; + + /** + * To set the cc recipients of a simple mail message. + * @param aCcRecipient Sets a sequence with the email addresses of one or more cc recipients. The method does not check if the given addresses are valid. A + */ + setCcRecipient(aCcRecipient: LibreOffice.SeqEquiv): void; + + /** + * To set the email address of the originator of a simple mail message. + * @param aOriginator Sets the email address of the originator of the mail. + */ + setOriginator(aOriginator: string): void; + + /** + * To set the recipient of the simple mail message. + * @param aRecipient The email address of a recipient. The method doesn't check if the given email address is valid. + */ + setRecipient(aRecipient: string): void; + + /** + * To set the subject of a simple mail message. + * @param aSubject Sets the subject of the simple mail message. + */ + setSubject(aSubject: string): void; + + /** + * To get the subject of a simple mail message. + * @returns The subject of the simple mail message. If no subject has been specified an empty string will be returned. + */ + Subject: string; + } + + /** + * This interface extends {@link XSimpleMailMessage} + * @since LibreOffice 4.2 + */ + interface XSimpleMailMessage2 extends XSimpleMailMessage { + Body: string; + } + + /** Specifies an interface for executing a system command. */ + interface XSystemShellExecute extends uno.XInterface { + /** + * Executes an arbitrary system command. + * @param aCommand Specifies the command to execute. This may be an executable file or a document which is registered with an application on a specific pla + * @param aParameter Specifies a list of space separated parameters. The method does not validate the given parameters, but only passes it as a parameter t + * @param nFlags Specifies different flags to control the execution of this method, for example, avoid showing system error messages, in case of failures, etc. + * @see com.sun.star.system.SystemShellExecuteFlags + * @throws com::sun::star::lang::IllegalArgumentException when the specified flags are wrong or exclude each other; also thrown, with an ArgumentPosition of + * @throws com::sun::star::system::SystemShellExecuteException in the case of errors when trying to executed the specified command. + */ + execute(aCommand: string, aParameter: string, nFlags: number): void; + } + + namespace SimpleMailClientFlags { + const enum Constants { + DEFAULTS = 0, + NO_LOGON_DIALOG = 2, + NO_USER_INTERFACE = 1, + } + } + + namespace SystemShellExecuteFlags { + const enum Constants { + DEFAULTS = 0, + NO_SYSTEM_ERROR_MESSAGE = 1, + URIS_ONLY = 2, + } + } + } + + namespace table { + /** + * represents a cell cursor in a table. + * + * A cell cursor is simply a cell range which provides methods to move through the table (i.e. relative to the current position). + */ + type CellCursor = XCellCursor; + + /** defines the binding to a single cell in a table document, which can be used to transfer a list position into the cell. */ + type ListPositionCellBinding = CellValueBinding; + + /** + * represents an enumeration of table charts. + * @see com.sun.star.table.TableCharts + */ + type TableChartsEnumeration = container.XEnumeration; + + /** + * represents an enumeration of table columns. + * @see com.sun.star.table.TableColumns + */ + type TableColumnsEnumeration = container.XEnumeration; + + /** + * represents an enumeration of table rows. + * @see com.sun.star.table.TableRows + */ + type TableRowsEnumeration = container.XEnumeration; + + /** is used to determine the type of contents in a cell. */ + const enum CellContentType { + /** cell is empty. */ + EMPTY = 0, + /** cell contains a formula. */ + FORMULA = 3, + /** cell contains text. */ + TEXT = 2, + /** cell contains a constant value. */ + VALUE = 1, + } + + /** specifies how cell contents are aligned horizontally. */ + const enum CellHoriJustify { + /** contents are justified to the cell width. */ + BLOCK = 4, + /** + * contents are horizontally centered. + * + * contents are aligned to the vertical middle of the cell. + */ + CENTER = 2, + /** contents are aligned to the left edge of the cell. */ + LEFT = 1, + /** contents are repeated to fill the cell. */ + REPEAT = 5, + /** contents are aligned to the right edge of the cell. */ + RIGHT = 3, + /** + * default alignment is used (left for numbers, right for text). + * + * contents are printed from left to right. + * + * default alignment is used. + */ + STANDARD = 0, + } + + /** specifies the orientation of a cell. */ + const enum CellOrientation { + /** contents are printed from bottom to top. */ + BOTTOMTOP = 2, + /** contents are printed from top to bottom with individual characters in normal (horizontal) orientation. */ + STACKED = 3, + /** + * default alignment is used (left for numbers, right for text). + * + * contents are printed from left to right. + * + * default alignment is used. + */ + STANDARD = 0, + /** contents are printed from top to bottom. */ + TOPBOTTOM = 1, + } + + /** specifies how cell contents are aligned vertically. */ + const enum CellVertJustify { + /** contents are aligned to the lower edge of the cell. */ + BOTTOM = 3, + /** + * contents are horizontally centered. + * + * contents are aligned to the vertical middle of the cell. + */ + CENTER = 2, + /** + * default alignment is used (left for numbers, right for text). + * + * contents are printed from left to right. + * + * default alignment is used. + */ + STANDARD = 0, + /** contents are aligned with the upper edge of the cell. */ + TOP = 1, + } + + /** specifies the location of the shadow in a {@link ShadowFormat} . */ + const enum ShadowLocation { + /** shadow is located along the lower and left sides. */ + BOTTOM_LEFT = 3, + /** shadow is located along the lower and right sides. */ + BOTTOM_RIGHT = 4, + /** no shadow. */ + NONE = 0, + /** shadow is located along the upper and left sides. */ + TOP_LEFT = 1, + /** shadow is located along the upper and right sides. */ + TOP_RIGHT = 2, + } + + /** used to select whether operations are carried out on columns or rows. */ + const enum TableOrientation { + /** operations are carried out on columns. */ + COLUMNS = 0, + /** operations are carried out on rows. */ + ROWS = 1, + } + + /** + * enumeration used to specify the type of contents in a sort field (row/column) of a table. + * @since OOo 1.1.2 + */ + const enum TableSortFieldType { + /** sort field contains text data. */ + ALPHANUMERIC = 2, + /** type is determined automatically. */ + AUTOMATIC = 0, + /** sort field contains numerical data. */ + NUMERIC = 1, + } + + /** + * The accessible view of a cell in a text document or in the page preview of a spreadsheet document. See {@link com.sun.star.sheet.AccessibleCell} for + * cells in the edit view of a spreadsheet. + * @since OOo 1.1.2 + */ + interface AccessibleCellView extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleValue, + accessibility.XAccessibleSelection, accessibility.XAccessibleEventBroadcaster { } + + /** + * The accessible view of a table in a text document or in the page preview of a spreadsheet document. See {@link + * com.sun.star.sheet.AccessibleSpreadsheet} for tables in the edit view of a spreadsheet. + * @since OOo 1.1.2 + */ + interface AccessibleTableView extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleTable, + accessibility.XAccessibleSelection, accessibility.XAccessibleEventBroadcaster { } + + /** describes the line type for a single cell edge. */ + interface BorderLine { + /** contains the color value of the line. */ + Color: util.Color; + + /** + * contains the width of the inner part of a double line (in 1/100 mm). + * + * If this value is zero, only a single line is drawn. + */ + InnerLineWidth: number; + + /** contains the distance between the inner and outer parts of a double line (in 1/100 mm). */ + LineDistance: number; + + /** + * contains the width of a single line or the width of outer part of a double line (in 1/100 mm). + * + * If this value is zero, no line is drawn. + */ + OuterLineWidth: number; + } + + /** + * A border line, extended with line style. + * @since LibreOffice 3.4 + */ + interface BorderLine2 extends BorderLine { + /** + * Style of the border. + * @see BorderLineStyle + */ + LineStyle: number; + + /** + * Width of the border, this is the base to compute all the lines and gaps widths. These widths computations are based on the LineStyle property + * + * This property is prevailing on the old Out, In and Dist width from {@link BorderLine} . If this property is set to 0, then the other widths will be + * used to guess the border width. + */ + LineWidth: number; + } + + /** represents a singe cell within a table. */ + interface Cell extends CellProperties, XCell, text.XText { } + + /** contains a cell address within a spreadsheet document. */ + interface CellAddress { + /** is the index of the column where the cell is located. */ + Column: number; + + /** is the index of the row where the cell is located. */ + Row: number; + + /** is the index of the sheet that contains the cell. */ + Sheet: number; + } + + /** + * contains the properties of a table cell. + * @see com.sun.star.table.Cell + * @see com.sun.star.table.CellRange + */ + interface CellProperties extends beans.XPropertySet { + /** + * selects Asian character orientation in vertical orientation. + * + * If the {@link CellProperties.Orientation} property is CellOrientation::STACKED, in Asian mode only Asian characters are printed in horizontal + * orientation instead of all characters. For other values of {@link CellProperties.Orientation} , this value is not used. + */ + AsianVerticalMode: boolean; + + /** contains a description of the bottom border line of each cell. */ + BottomBorder: BorderLine; + + /** + * contains a description of the bottom border line of each cell. Preferred over {@link BorderLine}{@link BottomBorder} . + * @since LibreOffice 3.6 + */ + BottomBorder2: BorderLine2; + + /** contains the cell background color. */ + CellBackColor: util.Color; + + /** + * Grab bag of cell properties, used as a string-any map for interim interop purposes. + * @since LibreOffice 4.3 This property is intentionally not handled by the ODF filter. Any member that should be handled there should be first moved out + */ + CellInteropGrabBag: SafeArray; + + /** + * contains a description of the cell protection. + * + * {@link Cell} protection is active only if the sheet is protected. + */ + CellProtection: util.CellProtection; + + /** contains the name of the style of the cell. */ + CellStyle: string; + + /** contains a description of the bottom left to top right diagonal line of each cell. */ + DiagonalBLTR: BorderLine; + + /** + * contains a description of the bottom left to top right diagonal line of each cell. Preferred over {@link BorderLine}{@link DiagonalBLTR} . + * @since LibreOffice 3.6 + */ + DiagonalBLTR2: BorderLine2; + + /** contains a description of the top left to bottom right diagonal line of each cell. */ + DiagonalTLBR: BorderLine; + + /** + * contains a description of the top left to bottom right diagonal line of each cell. Preferred over {@link BorderLine}{@link DiagonalTLBR} . + * @since LibreOffice 3.6 + */ + DiagonalTLBR2: BorderLine2; + + /** contains the horizontal alignment of the cell contents. */ + HoriJustify: CellHoriJustify; + + /** + * is `TRUE` , if the cell background is transparent. + * + * In this case the {@link CellProperties.CellBackColor} value is not used. + */ + IsCellBackgroundTransparent: boolean; + + /** is `TRUE` , if text in the cells will be wrapped automatically at the right border. */ + IsTextWrapped: boolean; + + /** contains a description of the left border line of each cell. */ + LeftBorder: BorderLine; + + /** + * contains a description of the left border line of each cell. Preferred over {@link BorderLine}{@link LeftBorder} . + * @since LibreOffice 3.6 + */ + LeftBorder2: BorderLine2; + + /** + * contains the index of the number format that is used in the cells. + * + * The proper value can be determined by using the {@link com.sun.star.util.NumberFormatter} interface of the document. + */ + NumberFormat: number; + + /** + * contains the orientation of the cell contents. + * + * If the {@link CellProperties.RotateAngle} property is non-zero, this value is not used. + */ + Orientation: CellOrientation; + + /** defines the indentation of the cell contents (in 1/100 mm). */ + ParaIndent: number; + + /** contains a description of the right border line of each cell. */ + RightBorder: BorderLine; + + /** + * contains a description of the right border line of each cell. Preferred over {@link BorderLine}{@link RightBorder} . + * @since LibreOffice 3.6 + */ + RightBorder2: BorderLine2; + + /** defines how much the content of cells is rotated (in 1/100 degrees). */ + RotateAngle: number; + + /** + * defines at which edge rotated cells are aligned. + * + * changed from {@link com.sun.star.table.CellVertJustify} to long in LibO 3.5 + * @see com.sun.star.table.CellVertJustify2 + */ + RotateReference: number; + + /** contains a description of the shadow. */ + ShadowFormat: ShadowFormat; + + /** is `TRUE` , if the cell content will be shrunk to fit in the cell. */ + ShrinkToFit: boolean; + + /** + * contains a description of the cell or cell range border. + * + * If used with a cell range, the top, left, right, and bottom lines are at the edges of the entire range, not at the edges of the individual cell. + */ + TableBorder: TableBorder; + + /** + * contains a description of the cell or cell range border. Preferred over {@link TableBorder}{@link TableBorder} . + * + * If used with a cell range, the top, left, right, and bottom lines are at the edges of the entire range, not at the edges of the individual cell. + * @since LibreOffice 3.6 + */ + TableBorder2: TableBorder2; + + /** contains a description of the top border line of each cell. */ + TopBorder: BorderLine; + + /** + * contains a description of the top border line of each cell. Preferred over {@link BorderLine}{@link TopBorder} . + * @since LibreOffice 3.6 + */ + TopBorder2: BorderLine2; + + /** + * stores additional attributes. + * + * This property is used i.e. by the XML filters to load and restore unknown attributes. + */ + UserDefinedAttributes: container.XNameContainer; + + /** + * contains the vertical alignment of the cell contents. + * + * changed from {@link com.sun.star.table.CellVertJustify} to long in LibO 3.5 + * @see com.sun.star.table.CellVertJustify2 + */ + VertJustify: number; + } + + /** represents a range of cells within a table. */ + interface CellRange extends CellProperties, XCellRange { } + + /** contains a cell range address within a spreadsheet document. */ + interface CellRangeAddress { + /** is the index of the column of the right edge of the range. */ + EndColumn: number; + + /** is the index of the row of the bottom edge of the range. */ + EndRow: number; + + /** is the index of the sheet that contains the cell range. */ + Sheet: number; + + /** is the index of the column of the left edge of the range. */ + StartColumn: number; + + /** is the index of the row of the top edge of the range. */ + StartRow: number; + } + + /** + * defines the a source of list entries coming from a cell range in a table document + * + * The component cannot be instantiated at a global service factory, instead it's usually provided by a document instance. + * @see com.sun.star.document.OfficeDocument + */ + interface CellRangeListSource extends form.binding.ListEntrySource, lang.XInitialization { + /** specifies the cell range within a document to which the component is bound. */ + CellRange: CellRangeAddress; + } + + /** + * defines the binding to a single cell in a table document + * + * Read/Write access to the cell represented by this component is supported, as well as active broadcasting of value changes. + * + * The binding supports exchanging **double** values, **string** values. + * + * The component cannot be instantiated at a global service factory, instead it's usually provided by a document instance. + * @see com.sun.star.document.OfficeDocument + */ + interface CellValueBinding extends form.binding.ValueBinding, util.XModifyBroadcaster, lang.XInitialization { + /** specifies the cell within a document whose value is reflected by the binding. */ + BoundCell: CellAddress; + } + + /** describes the settings of a cell shadow. */ + interface ShadowFormat { + /** contains the color value of the shadow. */ + Color: util.Color; + + /** is `TRUE` , if shadow is transparent. */ + IsTransparent: boolean; + + /** contains the location of the shadow. */ + Location: ShadowLocation; + + /** contains the size of the shadow. */ + ShadowWidth: number; + } + + /** + * contains the style settings of the border lines of all cells in a cell range. + * + * In a queried structure, the flags in TableBorder::Is...LineValid indicate that not all lines of the boxes have the same values. + * + * In a structure which is used for setting, these flags determine if the corresponding line should be set or if the old value should be kept. + */ + interface TableBorder { + /** determines the line style at the bottom edge. */ + BottomLine: BorderLine; + + /** contains the distance between the lines and other contents. */ + Distance: number; + + /** determines the line style of horizontal lines for the inner part of a cell range. */ + HorizontalLine: BorderLine; + + /** specifies whether the value of {@link TableBorder.BottomLine} is used. */ + IsBottomLineValid: boolean; + + /** specifies whether the value of {@link TableBorder.Distance} is used. */ + IsDistanceValid: boolean; + + /** specifies whether the value of {@link TableBorder.HorizontalLine} is used. */ + IsHorizontalLineValid: boolean; + + /** specifies whether the value of {@link TableBorder.LeftLine} is used. */ + IsLeftLineValid: boolean; + + /** specifies whether the value of {@link TableBorder.RightLine} is used. */ + IsRightLineValid: boolean; + + /** specifies whether the value of {@link TableBorder.TopLine} is used. */ + IsTopLineValid: boolean; + + /** specifies whether the value of {@link TableBorder.VerticalLine} is used. */ + IsVerticalLineValid: boolean; + + /** determines the line style at the left edge. */ + LeftLine: BorderLine; + + /** determines the line style at the right edge. */ + RightLine: BorderLine; + + /** determines the line style at the top edge. */ + TopLine: BorderLine; + + /** determines the line style of vertical lines for the inner part of a cell range. */ + VerticalLine: BorderLine; + } + + /** + * contains the style settings of the border lines of all cells in a cell range. + * + * {@link TableBorder2} is nearly identical to {@link TableBorder} , except that it has members of {@link BorderLine2} instead of {@link BorderLine} . + * + * In a queried structure, the flags in TableBorder2::Is...LineValid indicate that not all lines of the boxes have the same values. + * + * In a structure which is used for setting, these flags determine if the corresponding line should be set or if the old value should be kept. + * @since LibreOffice 3.6 + */ + interface TableBorder2 { + /** determines the line style at the bottom edge. */ + BottomLine: BorderLine2; + + /** contains the distance between the lines and other contents. */ + Distance: number; + + /** determines the line style of horizontal lines for the inner part of a cell range. */ + HorizontalLine: BorderLine2; + + /** specifies whether the value of {@link TableBorder2.BottomLine} is used. */ + IsBottomLineValid: boolean; + + /** specifies whether the value of {@link TableBorder2.Distance} is used. */ + IsDistanceValid: boolean; + + /** specifies whether the value of {@link TableBorder2.HorizontalLine} is used. */ + IsHorizontalLineValid: boolean; + + /** specifies whether the value of {@link TableBorder2.LeftLine} is used. */ + IsLeftLineValid: boolean; + + /** specifies whether the value of {@link TableBorder2.RightLine} is used. */ + IsRightLineValid: boolean; + + /** specifies whether the value of {@link TableBorder2.TopLine} is used. */ + IsTopLineValid: boolean; + + /** specifies whether the value of {@link TableBorder2.VerticalLine} is used. */ + IsVerticalLineValid: boolean; + + /** determines the line style at the left edge. */ + LeftLine: BorderLine2; + + /** determines the line style at the right edge. */ + RightLine: BorderLine2; + + /** determines the line style at the top edge. */ + TopLine: BorderLine2; + + /** determines the line style of vertical lines for the inner part of a cell range. */ + VerticalLine: BorderLine2; + } + + /** + * contains the distance settings of the border lines of all cells in a cell range. + * + * In a queried structure, the flags in TableBorderDistances::Is...DistanceValid indicate that not all lines of the boxes have the same values. + * + * In a structure which is used for setting, these flags determine if the corresponding distance should be set or if the old value should be kept. + */ + interface TableBorderDistances { + /** contains the distance between the bottom lines and other contents. */ + BottomDistance: number; + + /** specifies whether the value of TableBorder::BottomDistance is used. */ + IsBottomDistanceValid: boolean; + + /** specifies whether the value of TableBorder::LeftDistance is used. */ + IsLeftDistanceValid: boolean; + + /** specifies whether the value of TableBorder::RightDistance is used. */ + IsRightDistanceValid: boolean; + + /** specifies whether the value of TableBorder::TopDistance is used. */ + IsTopDistanceValid: boolean; + + /** contains the distance between the left lines and other contents. */ + LeftDistance: number; + + /** contains the distance between the right lines and other contents. */ + RightDistance: number; + + /** contains the distance between the top lines and other contents. */ + TopDistance: number; + } + + /** + * represents a chart based on data in a table or spreadsheet. + * + * This service does not represent the chart document model itself, but the object in the table that contains this chart document. + */ + interface TableChart extends XTableChart, document.XEmbeddedObjectSupplier, container.XNamed { } + + /** + * represents a collection of all charts based on data in a table. + * @see com.sun.star.table.TableChart + */ + interface TableCharts extends XTableCharts, container.XIndexAccess, container.XEnumerationAccess { } + + /** represents a special cell range containing all cells of a single specific column in a table or spreadsheet. */ + interface TableColumn extends XCellRange, beans.XPropertySet, container.XNamed { + /** is `TRUE` , if there is a manual horizontal page break attached to the column. */ + IsStartOfNewPage: boolean; + + /** is `TRUE` , if the column is visible. */ + IsVisible: boolean; + + /** is `TRUE` , if the column always keeps its optimal width. */ + OptimalWidth: boolean; + + /** + * contains the width of the column (in 1/100th mm). + * + * When hidden, it returns the width which the column would have, if it were visible. + */ + Width: number; + } + + /** + * represents a collection of all columns of a table or spreadsheet. + * @see com.sun.star.table.TableColumn + */ + interface TableColumns extends XTableColumns, container.XEnumerationAccess, container.XNameAccess { } + + /** represents a special cell range containing all cells of a single specific row in a table or spreadsheet. */ + interface TableRow extends XCellRange, beans.XPropertySet { + /** + * contains the height of the row (in 1/100 mm). + * + * When hidden, it returns the height which the row would have, if it were visible. + */ + Height: number; + + /** is `TRUE` , if there is a manual vertical page break attached to the row. */ + IsStartOfNewPage: boolean; + + /** is `TRUE` , if the row is visible. */ + IsVisible: boolean; + + /** is `TRUE` , if the row always keeps its optimal height. */ + OptimalHeight: boolean; + } + + /** + * represents a collection of all rows of a table or spreadsheet. + * @see com.sun.star.table.TableRow + */ + interface TableRows extends XTableRows, container.XEnumerationAccess { } + + /** + * contains properties which describe sorting of rows or columns in a table. + * + * It extends the general {@link com.sun.star.util.SortDescriptor} with table-specific properties. + * @deprecated Deprecated + */ + interface TableSortDescriptor extends util.SortDescriptor { + /** specifies whether the first row or column (depending on {@link com.sun.star.util.SortDescriptor.SortColumns} ) is a header which should not be sorted. */ + ContainsHeader: boolean; + + /** contains the maximum number of sort fields the descriptor can hold. */ + MaxFieldCount: number; + + /** + * specifies the sorting orientation (sort rows or columns). + * + * Some implementations may not support sorting columns. + * @deprecated Deprecateduse the property com::sun::star::util::SortDescriptor::SortColumns instead. + */ + Orientation: TableOrientation; + + /** specifies the descriptions of the individual sort fields. */ + SortFields: SafeArray; + } + + /** + * specifies properties which describe sorting of fields (rows or columns) in a table. + * @since OOo 1.1.2 + */ + interface TableSortDescriptor2 extends util.SortDescriptor2 { + /** + * specifies if the columns or rows are to be sorted. + * + * **TRUE**: The columns are to be sorted. + * + * **FALSE**: The rows are to be sorted. + */ + IsSortColumns: boolean; + + /** contains the maximum number of sort fields the descriptor can hold. */ + MaxSortFieldsCount: number; + + /** + * specifies a list of individual sort fields. + * + * Each entry specifies properties that state the row/column to be sorted and how that should be done. + */ + SortFields: SafeArray; + } + + /** + * describes how to sort a single field (row/column) in a tables sort descriptor. + * @see com.sun.star.table.TableSortDescriptor2 + * @since OOo 1.1.2 + */ + interface TableSortField { + /** + * the algorithm used by the collator when comparing/sorting text. + * + * This property will not be used when the "FieldType" is com::sun::star::table::TableSortFieldType::NUMERIC + * @see com.sun.star.i18n.XCollator + */ + CollatorAlgorithm: string; + + /** + * the locale used by the collator when comparing/sorting text. + * + * This property will not be used when the "FieldType" is com::sun::star::table::TableSortFieldType::NUMERIC + * @see com.sun.star.i18n.XCollator + */ + CollatorLocale: lang.Locale; + + /** index of the row or column in the table to be sorted; 0-based. */ + Field: number; + + /** + * type of contents in the field. + * + * If the value is com::sun::star::table::TableSortFieldType::AUTOMATIC the algorithm used for sorting is application specific. Especially it may or may + * not use the values given by "CollatorLocale" and "CollatorAlgorithm". + */ + FieldType: TableSortFieldType; + + /** `TRUE` if data are sorted in ascending order, `FALSE` if in descending order. */ + IsAscending: boolean; + + /** specifies if the case of letters is important when comparing entries. */ + IsCaseSensitive: boolean; + } + + /** provides a method to apply TableAutoFormats to a cell range. */ + interface XAutoFormattable extends uno.XInterface { + /** + * applies an AutoFormat to the cell range of the current context. + * @param aName is the name of the AutoFormat to apply. + * @throws com::sun::star::lang::IllegalArgumentException if the specified AutoFormat does not exist. + */ + autoFormat(aName: string): void; + } + + /** + * provides methods to access the contents of a cell in a table. + * @see com.sun.star.table.Cell + */ + interface XCell extends uno.XInterface { + /** + * returns the error value of the cell. + * + * If the cell does not contain a formula, the error is always zero. + */ + readonly Error: number; + + /** + * returns the formula string of a cell. + * + * Even if the cell does not contain a formula, an assignment of this attribute's value to another cell's formula attribute would create the same cell + * content. This is because this attribute contains the original text value of a string cell. The value of a **value cell** will be formatted using the + * number format's default format or the formula string, including "=", of a formula cell. + */ + Formula: string; + + /** + * returns the error value of the cell. + * + * If the cell does not contain a formula, the error is always zero. + */ + getError(): number; + + /** + * returns the formula string of a cell. + * + * Even if the cell does not contain a formula, an assignment of this attribute's value to another cell's formula attribute would create the same cell + * content. This is because this attribute contains the original text value of a string cell. The value of a **value cell** will be formatted using the + * number format's default format or the formula string, including "=", of a formula cell. + */ + getFormula(): string; + + /** returns the type of the cell. */ + getType(): CellContentType; + + /** + * returns the floating point value of the cell. + * + * For a **value cell** the value is returned, for a **string cell** zero is returned and for a **formula cell** the result value of a formula is + * returned. + */ + getValue(): number; + + /** + * sets a formula into the cell. + * + * When assigned, the string will be interpreted and a value, text or formula cell is created, depending on the text and the number format. + */ + setFormula(aFormula: string): void; + + /** + * sets a floating point value into the cell. + * + * After a call to this method the type of the cell is CellContentType::VALUE. + */ + setValue(nValue: number): void; + + /** returns the type of the cell. */ + readonly Type: CellContentType; + + /** + * returns the floating point value of the cell. + * + * For a **value cell** the value is returned, for a **string cell** zero is returned and for a **formula cell** the result value of a formula is + * returned. + */ + Value: number; + } + + /** + * extends {@link XCell} methods to access the contents of a cell in a table. + * @see com.sun.star.table.Cell + */ + interface XCell2 extends XCell { + /** + * sets a formula result into the cell. + * + * When assigned, the formula cell's result will be set to this value and will not be calculated - unless a HardRecalc is executed. + */ + setFormulaResult(nValue: number): void; + + /** + * sets a formula string into the cell. + * + * When assigned, the formula is set into the string. But is not compiled, tokenized or calculated. Its useful when loading a document and {@link + * setFormulaResult()} is used. Otherwise it is compiled on trying to fetch a result value. + */ + setFormulaString(aFormula: string): void; + } + + /** + * provides methods to control the position of a cell cursor. + * @see com.sun.star.table.CellCursor + */ + interface XCellCursor extends XCellRange { + /** points the cursor to a single cell which is the end of a contiguous series of (filled) cells. */ + gotoEnd(): void; + + /** + * points the cursor to the next unprotected cell. + * + * If the sheet is not protected, this is the next cell to the right. + */ + gotoNext(): void; + + /** + * moves the origin of the cursor relative to the current position. + * @param nColumnOffset is the count of columns to move. A negative value moves the cursor to the left. + * @param nRowOffset is the count of rows to move. A negative value moves the cursor to the top. + */ + gotoOffset(nColumnOffset: number, nRowOffset: number): void; + + /** + * points the cursor to the previous unprotected cell. + * + * If the sheet is not protected, this is the next cell to the left. + */ + gotoPrevious(): void; + + /** points the cursor to a single cell which is the beginning of a contiguous series of (filled) cells. */ + gotoStart(): void; + } + + /** + * provides access to the cells or to sub-ranges of a cell range. + * @see com.sun.star.table.CellRange + */ + interface XCellRange extends uno.XInterface { + /** + * Returns a single cell within the range. + * @param nColumn is the column index of the cell inside the range. + * @param nRow is the row index of the cell inside the range. + * @returns the specified cell. + * @see com.sun.star.table.Cell + * @throws com::sun::star::lang::IndexOutOfBoundsException if an index is outside the dimensions of this range. + */ + getCellByPosition(nColumn: number, nRow: number): XCell; + + /** + * Returns a sub-range of cells within the range. + * + * The sub-range is specified by its name. The format of the range name is dependent of the context of the table. In spreadsheets valid names may be + * "A1:C5" or "$B$2" or even defined names for cell ranges such as "MySpecialCell". + * @param aRange the name of the sub-range. + * @returns the specified cell range. + * @see com.sun.star.table.CellRange + */ + getCellRangeByName(aRange: string): XCellRange; + + /** + * Returns a sub-range of cells within the range. + * @param nLeft is the column index of the first cell inside the range. + * @param nTop is the row index of the first cell inside the range. + * @param nRight is the column index of the last cell inside the range. + * @param nBottom is the row index of the last cell inside the range. + * @returns the specified cell range. + * @see com.sun.star.table.CellRange + * @throws com::sun::star::lang::IndexOutOfBoundsException if an index is outside the dimensions of this range. + */ + getCellRangeByPosition(nLeft: number, nTop: number, nRight: number, nBottom: number): XCellRange; + } + + /** + * provides methods to access the collections of columns and rows of a cell range. + * @see com.sun.star.table.CellRange + */ + interface XColumnRowRange extends uno.XInterface { + /** + * returns the collection of columns in the range. + * @see com.sun.star.table.TableColumns + */ + readonly Columns: XTableColumns; + + /** + * returns the collection of columns in the range. + * @see com.sun.star.table.TableColumns + */ + getColumns(): XTableColumns; + + /** + * returns the collection of rows in the range. + * @see com.sun.star.table.TableRows + */ + getRows(): XTableRows; + + /** + * returns the collection of rows in the range. + * @see com.sun.star.table.TableRows + */ + readonly Rows: XTableRows; + } + + /** + * provides methods to access information about a cell that is mergeable with other sells. + * @see com.sun.star.table.Cell + */ + interface XMergeableCell extends XCell { + /** returns the number of rows this cell spans. */ + readonly ColumnSpan: number; + + /** returns the number of rows this cell spans. */ + getColumnSpan(): number; + + /** returns the number of columns this cell spans. */ + getRowSpan(): number; + + /** returns `TRUE` if this cell is merged with another cell. */ + isMerged(): boolean; + + /** returns the number of columns this cell spans. */ + readonly RowSpan: number; + } + + /** represents a range of cells that can possibly be merged or unmerged. */ + interface XMergeableCellRange extends uno.XInterface { + /** @returns `TRUE` if all cells from this range can be merged to one or `FALSE` otherwise. */ + isMergeable(): boolean; + + /** + * merges the area specified by this range. + * @throws com::sun::star::lang::NoSupportException if a merge is not possible for this range. You can use {@link isMergeable()} to check if a merge is possible. + */ + merge(): void; + + /** + * splits the cells in this range. This will be done by inserting rows and columns if needed or unmerging cells that are already split. + * @param Columns this is the number of columns that will be added to each cell. Zero means no new columns + * @param Rows this is the number of rows that will be added to each cell. Zero means no new rows + * @throws com::sun::star::lang::IllegalArgumentException if at least one of the parameters is less than zero. + * @throws com::sun::star::lang::NoSupportException if a split is not possible for this range. + */ + split(Columns: number, Rows: number): void; + } + + interface XTable extends lang.XComponent, XCellRange, XColumnRowRange, util.XModifiable, beans.XPropertySet, beans.XFastPropertySet { + /** stores the current column count of this table */ + ColumnCount: number; + + /** + * creates a cell cursor including the whole table + * @see com.sun.star.table.CellCursor + */ + createCursor(): XCellCursor; + + /** + * creates a cell cursor to travel in the given range context. + * @param Range the cell range for the cursor. + * @see com.sun.star.table.CellCursor + * @throws com::sun::star::lang::IllegalArgumentException if the given reference is empty or not a range from this table. + */ + createCursorByRange(Range: XCellRange): XCellCursor; + + /** stores the current row count of this table */ + RowCount: number; + } + + /** + * provides access to the settings of a chart object in a table or spreadsheet. + * @see com.sun.star.table.TableChart + */ + interface XTableChart extends uno.XInterface { + /** returns, whether the cells of the topmost row of the source data are interpreted as column headers. */ + getHasColumnHeaders(): boolean; + + /** returns, whether the cells of the leftmost column of the source data are interpreted as row headers. */ + getHasRowHeaders(): boolean; + + /** returns the cell ranges that contain the data for the chart. */ + getRanges(): SafeArray; + + /** returns, whether the cells of the topmost row of the source data are interpreted as column headers. */ + HasColumnHeaders: boolean; + + /** returns, whether the cells of the leftmost column of the source data are interpreted as row headers. */ + HasRowHeaders: boolean; + + /** returns the cell ranges that contain the data for the chart. */ + Ranges: SafeArray; + + /** specifies whether the cells of the topmost row of the source data are interpreted as column headers. */ + setHasColumnHeaders(bHasColumnHeaders: boolean): void; + + /** specifies whether the cells of the leftmost column of the source data are interpreted as row headers. */ + setHasRowHeaders(bHasRowHeaders: boolean): void; + + /** sets the cell ranges that contain the data for the chart. */ + setRanges(aRanges: LibreOffice.SeqEquiv): void; + } + + /** + * provides methods to access charts via name and to insert and remove charts. + * @see com.sun.star.table.TableCharts + */ + interface XTableCharts extends container.XNameAccess { + /** + * creates a chart and adds it to the collection. + * @param aName is the name of the chart. This name is used to reference the chart in the collection. + * @param aRect contains the rectangular location of the chart within the table (in 1/100th mm). + * @param aRanges all cell ranges containing the source data of the chart. + * @param bColumnHeaders if set to `TRUE` , the topmost row of the source data will be used to set labels for the category axis or the legend. + * @param bRowHeaders if set to `TRUE` , the leftmost column of the source data will be used to set labels for the category axis or the legend. + */ + addNewByName(aName: string, aRect: awt.Rectangle, aRanges: LibreOffice.SeqEquiv, bColumnHeaders: boolean, bRowHeaders: boolean): void; + + /** + * removes a chart from the collection. + * @param aName is the name of the chart to remove. + */ + removeByName(aName: string): void; + } + + /** provides a method to access a collection of charts in a table or spreadsheet. */ + interface XTableChartsSupplier extends uno.XInterface { + /** + * returns the collection of charts. + * @see com.sun.star.table.TableCharts + */ + readonly Charts: XTableCharts; + + /** + * returns the collection of charts. + * @see com.sun.star.table.TableCharts + */ + getCharts(): XTableCharts; + } + + /** + * provides methods to access columns via index and to insert and remove columns. + * @see com.sun.star.table.TableColumns + */ + interface XTableColumns extends container.XIndexAccess { + /** + * inserts new columns. + * @param nIndex is the index the first inserted column will have. + * @param nCount is the number of columns to insert. + */ + insertByIndex(nIndex: number, nCount: number): void; + + /** + * deletes columns. + * @param nIndex is the index of the first column to delete. + * @param nCount is the number of columns to delete. + */ + removeByIndex(nIndex: number, nCount: number): void; + } + + /** + * provides methods to access rows via index and to insert and remove rows. + * @see com.sun.star.table.TableRows + */ + interface XTableRows extends container.XIndexAccess { + /** + * inserts new rows. + * + * When the index or combination of index and count is out of bounds an exception will be thrown. + * @param nIndex is the index the first inserted row will have. + * @param nCount is the number of rows to insert. + */ + insertByIndex(nIndex: number, nCount: number): void; + + /** + * deletes rows. + * + * When the index or combination of index and count is out of bounds an exception will be thrown. + * @param nIndex is the index of the first row to delete. + * @param nCount is the number of rows to delete. + */ + removeByIndex(nIndex: number, nCount: number): void; + } + + namespace BorderLineStyle { + const enum Constants { + BORDER_LINE_STYLE_MAX = 17, + DASH_DOT = 16, + DASH_DOT_DOT = 17, + DASHED = 2, + DOTTED = 1, + DOUBLE = 3, + DOUBLE_THIN = 15, + EMBOSSED = 10, + ENGRAVED = 11, + FINE_DASHED = 14, + INSET = 13, + NONE = 32767, + OUTSET = 12, + SOLID = 0, + THICKTHIN_LARGEGAP = 9, + THICKTHIN_MEDIUMGAP = 8, + THICKTHIN_SMALLGAP = 7, + THINTHICK_LARGEGAP = 6, + THINTHICK_MEDIUMGAP = 5, + THINTHICK_SMALLGAP = 4, + } + } + + namespace CellJustifyMethod { + const enum Constants { + AUTO = 0, + DISTRIBUTE = 1, + } + } + + namespace CellVertJustify2 { + const enum Constants { + BLOCK = 4, + BOTTOM = 3, + CENTER = 2, + STANDARD = 0, + TOP = 1, + } + } + } + + namespace task { + type InteractionRequestStringResolver = XInteractionRequestStringResolver; + + /** + * A legacy (single-instance) service-variant of {@link theJobExecutor} singleton. + * @deprecated DeprecatedUse theJobExecutor singleton instead. + */ + type JobExecutor = XJobExecutor; + + /** + * this request specifies the mode in which the password should be asked + * + * It is supported by {@link InteractionHandler} service, and can be used to interact for a master password. Continuations for using with the mentioned + * service are Abort and Approve. + * @since OOo 1.1.2 + */ + type MasterPasswordRequest = PasswordRequest; + + /** + * This singleton is intended to allow to restart the office asynchronously. + * @since OOo 3.3 + */ + type OfficeRestartManager = XRestartManager; + + /** + * this service is kind of storage that allows to store passwords and to retrieve already stored. + * + * A password can be stored for the session period or persistently. The persistent way is only possible if configuration allows to use storage. It stores + * passwords encrypted with a super password. An interaction is used to ask a user for a super password. To allow such an interaction, an object that + * implements {@link XInteractionHandler} interface should be provided. For this purpose {@link InteractionHandler} service can be used. + * + * In case no interaction handler is provided all passwords are stored for the session period. In case an interaction handler is provided, but the super + * password interaction does not return super password ( for any reason ), {@link NoMasterException} exception is thrown to let user use non-persistent + * way explicitly. + */ + type PasswordContainer = XPasswordContainer2; + + /** + * An interaction request handler that uses the {@link com.sun.star.task.PasswordContainer} service to handle {@link + * com.sun.star.ucb.AuthenticationRequest} . + * + * If the password container contains credentials matching the authentication request, the service implementation selects the {@link + * com.sun.star.ucb.XInteractionSupplyAuthentication} continuation, that should be supplied with the interaction request. + * + * If the password container does not contain credentials matching the authentication request, the service implementation selects no continuation. + * @since OOo 3.3 + */ + type PasswordContainerInteractionHandler = XInteractionHandler; + + /** + * Generic job execution singleton + * + * Can start registered uno services on triggered events and handle there own configuration and there lifetime. Such events are simple strings which + * meaning doesn't matter for any real service implementation of this specification. But triggered events must be available inside the configuration and + * some Jobs or AsyncJobs must be registered for that. + * + * Prior to LibreOffice 4.3, this singleton was only available as a (single-instance) {@link JobExecutor} service. + * @see Job + * @see AsyncJob + * @since LibreOffice 4.3 + */ + type theJobExecutor = XJobExecutor; + + /** An interaction continuation specifing to abort executing the process that issued the request. */ + type XInteractionAbort = XInteractionContinuation; + + /** An interaction continuation specifying "approval". */ + type XInteractionApprove = XInteractionContinuation; + + /** specifies a continuation where the user does not actually decide the question she was confronted with, but postpones the decision to a later time. */ + type XInteractionAskLater = XInteractionContinuation; + + /** An interaction continuation specifying "disapproval". */ + type XInteractionDisapprove = XInteractionContinuation; + + /** An interaction continuation specifing to try to re-execute the process that issued the request. */ + type XInteractionRetry = XInteractionContinuation; + + /** + * A classification of interaction requests. + * @see com.sun.star.task.ClassifiedInteractionRequest This is the base of classified interaction requests. + */ + const enum InteractionClassification { + /** An error. */ + ERROR = 0, + /** Some information for the client/user (which will typically lead to the selection of an {@link com.sun.star.task.XInteractionApprove} continuation). */ + INFO = 2, + /** + * A query for the client/user (which will typically lead to the selection of an {@link com.sun.star.task.XInteractionApprove} or {@link + * com.sun.star.task.XInteractionDisapprove} continuation). + */ + QUERY = 3, + /** A warning, less severe than an error. */ + WARNING = 1, + } + + /** + * the mode in which a password should be asked + * @see PasswordRequest + */ + const enum PasswordRequestMode { + /** + * Password creation.

+ * + * The password is asked for the first time, + * + * so it should be entered twice. + * + *

+ */ + PASSWORD_CREATE = 0, + /** + * Ask for a password.

+ * + * Just ask for a password. + * + *

+ */ + PASSWORD_ENTER = 1, + /** + * Wrong password was entered, ask again.

+ * + * A wrong password was entered, notify user + * + * and ask again. + * + *

+ */ + PASSWORD_REENTER = 2, + } + + /** + * Represent an asynchronous job, which can be executed by the global {@link theJobExecutor} instance. + * @see Job + * @since OOo 1.1.2 + */ + interface AsyncJob extends XAsyncJob, util.XCloseable { } + + /** A classified interaction request. */ + interface ClassifiedInteractionRequest extends uno.Exception { + /** The classification of the request. */ + Classification: InteractionClassification; + } + + /** describes the request to approve or deny the execution of macros contained in a document. */ + interface DocumentMacroConfirmationRequest extends ClassifiedInteractionRequest { + /** contains information about the signatures in the document */ + DocumentSignatureInformation: SafeArray; + + /** + * refers to the storage related to the last committed version of the document. + * + * This storage is necessary e.g. for displaying the existing signatures to the user, to allow him a decision whether or not to trust those signatures + * and thus the signed macros. + * @see com.sun.star.security.XDocumentDigitalSignatures.showScriptingContentSignatures + */ + DocumentStorage: embed.XStorage; + + /** specifies the URL of the document which contains macros whose execution should be approved or rejected. */ + DocumentURL: string; + + /** contains information about the ODF version of the document */ + DocumentVersion: string; + } + + /** + * this request specifies the mode in which the password for Microsoft Office file format encryption should be asked + * + * It is supported by {@link InteractionHandler} service, and can be used to interact for a document password. Continuations for using with the mentioned + * service are Abort and Approve. + * @since OOo 3.2 + */ + interface DocumentMSPasswordRequest extends PasswordRequest { + /** the name of the document (more properly, the URL of the document) */ + Name: string; + } + + /** + * this request specifies if a password for opening or modifying of an encrypted Microsoft Office document is requested. + * + * It is supported by {@link InteractionHandler} service, and can be used to interact for a document password. Continuations for using with the mentioned + * service are Abort and Approve. + * @see com.sun.star.task.PasswordRequest + * @see com.sun.star.task.DocumentMSPasswordRequest + * @since OOo 3.3 + */ + interface DocumentMSPasswordRequest2 extends DocumentMSPasswordRequest { + /** specifies if the requested password is for opening a document or for modifying it. */ + IsRequestPasswordToModify: boolean; + } + + /** + * this request specifies the mode in which the password should be asked + * + * It is supported by {@link InteractionHandler} service, and can be used to interact for a document password. Continuations for using with the mentioned + * service are Abort and Approve. + * @since OOo 1.1.2 + */ + interface DocumentPasswordRequest extends PasswordRequest { + /** the name of the document (more properly, the URL of the document) */ + Name: string; + } + + /** + * this request specifies if a password for opening or modifying a document is requested. + * + * It is supported by {@link InteractionHandler} service, and can be used to interact for a document password. Continuations for using with the mentioned + * service are Abort and Approve. + * @see com.sun.star.task.PasswordRequest + * @see com.sun.star.task.DocumentPasswordRequest + * @since OOo 3.3 + */ + interface DocumentPasswordRequest2 extends DocumentPasswordRequest { + /** specifies if the requested password is for opening a document or for modifying it. */ + IsRequestPasswordToModify: boolean; + } + + /** IOException that carries a legacy error code (not only I/O related). */ + interface ErrorCodeIOException extends io.IOException { + /** specifies the error code; see tools/errcode.hxx for details. */ + ErrCode: number; + } + + /** + * represents a general error exception. It can be used to transport the error code information. E.g. that can be useful for interactions. + * @since OOo 1.1.2 + */ + interface ErrorCodeRequest extends uno.Exception { + /** specifies the error code. */ + ErrCode: number; + } + + /** + * An interaction request handler that lets the user handle requests via GUI dialogs. + * + * The interaction handler service has a number of [built-in handlers]{@link url="#built_in_handler"} , responsible for a lot of well known interactions. + * Additionally, there's a configuration module which allows to [configure additional handlers]{@link url="#configuring_handlers"} , responsible for + * arbitrary requests. + * + * **Built-in Handlers** + * + * The following well-known requests can be dealt with by the built-in handlers: {@link com.sun.star.ucb.AuthenticationRequest}{@link + * com.sun.star.ucb.CertificateValidationRequest}{@link com.sun.star.ucb.InteractiveAugmentedIOException} *{@link + * com.sun.star.ucb.InteractiveFileIOException} *{@link com.sun.star.ucb.InteractiveIOException} *{@link + * com.sun.star.ucb.InteractiveNetworkConnectException} *{@link com.sun.star.ucb.InteractiveNetworkException} *{@link + * com.sun.star.ucb.InteractiveNetworkGeneralException} *{@link com.sun.star.ucb.InteractiveNetworkOffLineException} *{@link + * com.sun.star.ucb.InteractiveNetworkReadException} *{@link com.sun.star.ucb.InteractiveNetworkResolveNameException} *{@link + * com.sun.star.ucb.InteractiveNetworkWriteException} *{@link com.sun.star.ucb.InteractiveWrongMediumException} *{@link + * com.sun.star.task.PasswordRequest}{@link com.sun.star.java.WrongJavaVersionException} *{@link com.sun.star.task.DocumentMacroConfirmationRequest} The + * requests marked with an asterisk are only handled if (a) their continuations match certain restrictions (see below), and (b) the necessary resource + * strings are available (this can be exploited by applications that carry only a subset of all resource files with them). + * + * The continuation restrictions are as follows: Let **C** be the subset of the provided continuations that are of type {@link + * com.sun.star.task.XInteractionApprove} , {@link com.sun.star.task.XInteractionDisapprove} , {@link com.sun.star.task.XInteractionRetry} , or {@link + * com.sun.star.task.XInteractionAbort} (or of a derived type). All other continuations are ignored for these requests. The request is only handled if + * the set **C** is any of the following: AbortRetry, AbortApproveApprove, AbortApprove, DisapproveApprove, Disapprove, Abort + * + * An {@link com.sun.star.ucb.InteractiveAugmentedIOException} carries with it a sequence of arguments, which should be {@link + * com.sun.star.beans.PropertyValues} . The following details which properties are interpreted by the interaction handler, depending on the request's + * {@link com.sun.star.ucb.IOErrorCode} : **"Uri"**: All error codes except com::sun::star::ucb::IOErrorCode::DIFFERENT_DEVICES. The URI of the involved + * resource (a `string` ).; + * + * **"ResourceName"**: All error codes except com::sun::star::ucb::IOErrorCode::DIFFERENT_DEVICES. A name for the involved resource (a `string` ) that + * might be more meaningful to the user than the URI. For example, a (platform-dependent) path notation for file system resources.; + * + * **"ResourceType"**: com::sun::star::ucb::IOErrorCode::DEVICE_NOT_READY and com::sun::star::ucb::IOErrorCode::NOT_EXISTING only. An identifier for the + * type of resource involved (a `string` ). Currently understood values are `"volume"` (e.g., a file system volume) and `"folder"` (i.e., a resource that + * contains other resources).; + * + * **"Removable"**: com::sun::star::ucb::IOErrorCode::NOT_EXISTING only. A flag indicating whether the resource resides on a storage medium that can be + * removed by the user (a `boolean` ).; + * + * **"Folder"**: com::sun::star::ucb::IOErrorCode::CANT_CREATE only. The name of the folder in which a resource cannot be created (a `string` ).; + * + * **"Volume" and "OtherVolume"**: com::sun::star::ucb::IOErrorCode::DIFFERENT_DEVICES only. The names of the two volumes involved (two `string` s). + * + * + * + * **Configuring additional Handlers** + * + * It is possible to configure additional interaction handlers, to which certain requests can be delegated. The configuration node + * `/org.openoffice.Interaction/InteractionHandlers` is evaluated and respected by the `InteractionHandler` implementation. + * + * A custom interaction handler can declare itself responsible for an arbitrary number of UNO types, specified by full-qualified type name. Also, for + * each type, it can specify whether it is responsible for only this particular type, or all possibly existent derived types. + * + * Whenever the `InteractionHandler` encounters a request it cannot fulfill itself, it will examine the configuration, to find a handler implementation + * for the request, and delegate it to the first matching handler. + * + * If multiple custom interaction handlers declare themselves responsible for the same request type, it is not defined which handler will actually be + * invoked. Thus, when deploying a custom interaction handler, ensure that the types you specify are general enough to cover all requests you want to + * handle, but also specific enough to not cover requests which other handlers might be interested in. + */ + interface InteractionHandler extends XInteractionHandler2 { + /** + * Creates an instance. + * @param parent denotes the parent window for any GUI dialogs the interaction handler pops up; may be null. + */ + createWithParent(parent: awt.XWindow): void; + + /** + * Creates an instance with an additional context. + * @param parent denotes the parent window for any GUI dialogs the interaction handler pops up; may be null. + * @param context is a textual description of the current context (used, e.g., as a first line of text in error boxes). + */ + createWithParentAndContext(parent: awt.XWindow, context: string): void; + } + + /** + * Represent a synchronous job, which can be executed by the global {@link theJobExecutor} instance. + * @see AsyncJob + * @since OOo 1.1.2 + */ + interface Job extends XJob, util.XCloseable { } + + /** is thrown when a master password is needed but not available/correct. */ + interface NoMasterException extends uno.RuntimeException { + /** specifies the mode in which password should be queried. */ + Mode: PasswordRequestMode; + } + + /** + * this request specifies the mode in which the password should be asked + * + * It is supported by {@link InteractionHandler} service, and can be used to interact for a password. Continuations for using with the mentioned service + * are Abort and Approve. + */ + interface PasswordRequest extends ClassifiedInteractionRequest { + /** + * the mode in which password should be asked + * @see com.sun.star.task.PasswordRequestMode + */ + Mode: PasswordRequestMode; + } + + /** is an exception that provides information on an error during PDF export. */ + interface PDFExportException extends uno.Exception { + /** contains a number of errors that occurred during PDFExport */ + ErrorCodes: SafeArray; + } + + /** @since LibreOffice 4.1 */ + interface StatusIndicatorFactory extends XStatusIndicatorFactory { + createWithFrame(Frame: frame.XFrame, DisableReschedule: boolean, AllowParentShow: boolean): void; + createWithWindow(ParentWindow: awt.XWindow, DisableReschedule: boolean, AllowParentShow: boolean): void; + } + + /** + * this request is used in case a content can't keep files from overwriting + * + * It is supported by {@link InteractionHandler} service, and can be used in case a content can not keep files from overwriting and user specifies to do + * so. Continuations for using with the mentioned service are Abort and Approve. + * @since OOo 1.1.2 + */ + interface UnsupportedOverwriteRequest extends ClassifiedInteractionRequest { + /** the name of the target that might be overwritten, can be empty. */ + Name: string; + } + + interface UrlRecord { + Url: string; + UserList: SafeArray; + } + + interface UserRecord { + Passwords: SafeArray; + UserName: string; + } + + /** Use this interface to abort a command asynchronously. For example, have a look at {@link com.sun.star.deployment.XPackageManager} . */ + interface XAbortChannel { + /** sends an abort notification to all commands associated with this channel. */ + sendAbort(): void; + } + + /** + * specifies a job which must be executed asynchronously + * + * Instead of {@link XJob} the implementation of this interface must be aware, that execution can be made real asynchronous (e.g. by using threads). + * Because the environment wish to have creation and using of threads under control, it's not allowed for a real job implementation to use such mechanism + * by itself. The outside code decide, if it's possible and how it can be made asynchronous. In some special cases it can be, that asynchronous jobs will + * be executed synchronously. + * @see XJob + */ + interface XAsyncJob extends uno.XInterface { + /** + * executes the job asynchronously + * @param Arguments are arguments for executing the job. Their semantics is completely implementation dependent. Usually, a concrete implementation of a jo + * @param Listener specifies a listener which should be notified on events. May be `NULL` . + * @throws com::sun::star::lang::IllegalArgumentException if some of given arguments doesn't fill out the service specification or was corrupt so the servic + */ + executeAsync(Arguments: LibreOffice.SeqEquiv, Listener: XJobListener): void; + } + + /** + * Specifies a way of how to continue from an {@link com.sun.star.task.XInteractionRequest} . + * + * Different sub-interfaces of this interface specify different ways of continuing. + */ + interface XInteractionContinuation extends uno.XInterface { + /** + * Select this way of continuing from an {@link com.sun.star.task.XInteractionRequest} (given a choice of various instances of {@link + * com.sun.star.task.XInteractionContinuation} ). + */ + select(): void; + } + + /** An interaction request handler. */ + interface XInteractionHandler extends uno.XInterface { + /** Handle an interaction request. */ + handle(Request: XInteractionRequest): void; + } + + /** + * An interaction request handler. + * + * This interface extends the interface {@link XInteractionHandler} the way that a caller can determine whether an interaction request was actually + * handled by the interaction handler. + * @since OOo 3.2 + */ + interface XInteractionHandler2 extends XInteractionHandler { + /** + * Handle an interaction request. + * @param Request the inteaction request to handle. + * @returns `TRUE` , if the handler handled the request, `FALSE` otherwise. + */ + handleInteractionRequest(Request: XInteractionRequest): boolean; + } + + /** + * A continuation to get a password from interaction helper. + * @since OOo 1.1.2 + */ + interface XInteractionPassword extends XInteractionContinuation { + /** + * Get result password from the continuation. + * @returns the stored password. + */ + getPassword(): string; + + /** + * Get result password from the continuation. + * @returns the stored password. + */ + Password: string; + + /** + * Store result password to the continuation. + * @param aPasswd the result password. + */ + setPassword(aPasswd: string): void; + } + + /** + * A continuation to get a password from interaction helper, extends {@link XInteractionPassword} with possibility to provide password to modify. + * @since OOo 3.3 + */ + interface XInteractionPassword2 extends XInteractionPassword { + /** gets "password to modify" from the continuation. */ + getPasswordToModify(): string; + + /** gets "recommend readonly" from the continuation. It specifies whether the document should be loaded readonly per default. */ + getRecommendReadOnly(): boolean; + + /** gets "password to modify" from the continuation. */ + PasswordToModify: string; + + /** gets "recommend readonly" from the continuation. It specifies whether the document should be loaded readonly per default. */ + RecommendReadOnly: boolean; + + /** stores "password to modify" to the continuation. */ + setPasswordToModify(aPasswd: string): void; + + /** stores "recommend readonly" to the continuation. It specifies whether the document should be loaded readonly per default. */ + setRecommendReadOnly(bReadOnly: boolean): void; + } + + /** The description of an interaction request. */ + interface XInteractionRequest extends uno.XInterface { + /** Get the set of com::sun::star::task::XInteractionContinuations the client supports for this request. */ + readonly Continuations: SafeArray; + + /** Get the set of com::sun::star::task::XInteractionContinuations the client supports for this request. */ + getContinuations(): SafeArray; + + /** + * Get information about the request itself. + * @returns an {@link com.sun.star.uno.Exception} , wrapped as an `any` . + */ + getRequest(): any; + + /** + * Get information about the request itself. + * @returns an {@link com.sun.star.uno.Exception} , wrapped as an `any` . + */ + readonly Request: any; + } + + /** Obtains human readable strings from an {@link XInteractionRequest} . */ + interface XInteractionRequestStringResolver extends uno.XInterface { + /** + * Obtains a string containing a human readable message from an informational interaction request. + * + * An informational interaction request contains not more than one interaction continuation (user has no choice; request is just informational). The + * supplies continuation must either be a {@link XInteractionAbort} or {@link XInteractionApprove} + * @param Request the interaction request for that the message shall be obtained. + * @returns the message string or an empty com::sun::star::beans::Optional. + */ + getStringFromInformationalRequest(Request: XInteractionRequest): com.sun.star.beans.Optional; + } + + /** + * specifies a job which is to be executed synchronously + * + * Instead of {@link XAsyncJob} the implementation of this interface will be executed synchronously every time. That means: they can be sure that the + * current stack context will be blocked till this job finish it's work. + * @see XAsyncJob + */ + interface XJob extends uno.XInterface { + /** + * executes the job synchronously + * @param Arguments are arguments for executing the job. Their semantics is completely implementation dependent. Usually, a concrete implementation of a jo + * @returns the result of the job. The concrete semantics is service-dependent. But it should be possible to deregister the joblet him registered although ex + * @throws com::sun::star::lang::IllegalArgumentException if some of given arguments doesn't fill out the service specification or was corrupt so the servic + * @throws com::sun::star::uno::Exception to notify the executor about failed operation; otherwise the return value indicates a successful finishing. + */ + execute(Arguments: LibreOffice.SeqEquiv): any; + } + + /** + * starts action for any triggered event from outside + * + * If somewhere from outside trigger an event on this interface it will be used to find any registered service inside configuration of this executor. If + * somewhere could be found it will be started and controlled by this instance. After it finish his work it's possible to deactivate further startups or + * let him run again if a new event will be detected later. + * @see theJobExecutor + */ + interface XJobExecutor extends uno.XInterface { + /** + * trigger event to start registered jobs + * + * Jobs are registered in configuration and will be started by executor automatically, if they are registered for triggered event. The meaning of given + * string **Event** mustn't be known. Because for the executor it's enough to use it for searching a registered job inside his own configuration. So no + * special events will be defined here. + * @param Event describe the event for which jobs can be registered and should be started + */ + trigger(Event: string): void; + } + + /** listener on finish states of asynchronous job execution */ + interface XJobListener extends lang.XEventListener { + /** + * indicates that the job is done + * @param Job identifies the asynchronous job so that {@link theJobExecutor} can differ between more than ones. + * @param Result should be the same like for the synchronous mode on {@link XJob.execute()} . It provides information about success or failure of job execu + */ + jobFinished(Job: XAsyncJob, Result: any): void; + } + + /** allows to change the master password, or let it be requested and checked. */ + interface XMasterPasswordHandling extends uno.XInterface { + /** + * allows to specify whether persistent storing of passwords is allowed + * + * After the storing is forbidden the master password and all the stored passwords are removed. + */ + allowPersistentStoring(bAllow: boolean): boolean; + + /** + * allows to check the user authorization. + * + * This call let the master password be requested from user using the provided interaction handler. + * + * The call will use the standard interaction handler service {@link InteractionHandler} if no handler is provided. + */ + authorizateWithMasterPassword(xHandler: XInteractionHandler): boolean; + + /** + * allows to change the master password. + * + * If there is still no master password, the user will be asked to provide the new one. + * + * The call will use the standard interaction handler service {@link InteractionHandler} if no handler is provided. + */ + changeMasterPassword(xHandler: XInteractionHandler): boolean; + + /** allows to detect whether there is already a master password */ + hasMasterPassword(): boolean; + + /** allows to detect whether persistent storing of passwords is allowed */ + isPersistentStoringAllowed(): boolean; + + /** let the master password and all the related stored passwords be removed. */ + removeMasterPassword(): void; + } + + /** allows to change the master password, or let it be requested and checked. */ + interface XMasterPasswordHandling2 extends XMasterPasswordHandling { + /** allows to detect whether the default master password is used */ + isDefaultMasterPasswordUsed(): boolean; + + /** + * allows to let the default password be used + * + * Please use this method with care. Using of default master password let the passwords be stored non-encrypted. If a master password is predefined in + * the algorithm it is no more an encryption, it is just an encoding. + */ + useDefaultMasterPassword(xHandler: XInteractionHandler): boolean; + } + + /** Allows to save passwords with URL-pattern, to use them later. */ + interface XPasswordContainer extends uno.XInterface { + /** + * Save passwords in to the container. + * @param Url URL-pattern, that will be used later to retrieve passwords. + * @param UserName The username. + * @param Passwords The password-list. + * @param Handler The handler to get super password to en/decrypt passwords + */ + add(Url: string, UserName: string, Passwords: LibreOffice.SeqEquiv, Handler: XInteractionHandler): void; + + /** + * Save passwords in to the container, and store them in the file. + * @param Url URL-pattern, that will be used later to retrieve passwords. + * @param UserName The username. + * @param Passwords The password-list. + * @param Handler The handler to get super password to en/decrypt passwords + */ + addPersistent(Url: string, UserName: string, Passwords: LibreOffice.SeqEquiv, Handler: XInteractionHandler): void; + + /** + * Find users with passwords for the url pattern. + * @param Url URL-pattern to retrieve password for. + * @param Handler The handler to get super password to en/decrypt passwords + * @returns Best matched url-pattern with user-records list. + */ + find(Url: string, Handler: XInteractionHandler): UrlRecord; + + /** + * Find passwords for the url pattern and username. + * @param Url URL-pattern to retrieve passwords for. + * @param UserName Username to retrieve passwords for. + * @param Handler The handler to get super password to en/decrypt passwords + * @returns Best matched url-pattern for the username. + */ + findForName(Url: string, UserName: string, Handler: XInteractionHandler): UrlRecord; + + /** + * Get all records from the file. + * @returns List of url-records. + */ + getAllPersistent(Handler: XInteractionHandler): SafeArray; + + /** + * Remove passwords for the url pattern and username. + * @param Url URL-pattern to remove passwords for. + * @param UserName Username to remove passwords for. + */ + remove(Url: string, UserName: string): void; + + /** Clean the file. */ + removeAllPersistent(): void; + + /** + * Remove passwords for the url pattern and username from the file. + * @param Url URL-pattern to remove passwords for. + * @param UserName Username to remove passwords for. + */ + removePersistent(Url: string, UserName: string): void; + } + + /** + * Provides a unified interface for the {@link PasswordContainer} service to implement. + * @since LibreOffice 4.0 + */ + interface XPasswordContainer2 extends XPasswordContainer, XMasterPasswordHandling2, XUrlContainer { } + + /** + * allows to try to restart the office. + * @since OOo 3.3 + */ + interface XRestartManager extends uno.XInterface { + /** + * allows to get info whether the restart has been requested and provide the initialization status. + * + * The office has to call this method just before the main loop has been started, with the `TRUE` as argument, so that the implementation knows that the + * office is initialized. If the method returns `TRUE` , the office should restart without starting the main loop. + * @param bInitialized specifies whether the office process is initialized already, if the caller does not have this information, he should provide `FALSE` . + * @returns `TRUE` if the office restart has been requested, `FALSE` otherwise + * @throws com::sun::star::uno::Exception to notify the caller about possible failures + */ + isRestartRequested(bInitialized: boolean): boolean; + + /** + * let the office restart asynchronously + * @param xInteractionHandler the {@link com.sun.star.task.InteractionHandler} service implementation, that is used in case a problem is detected during re + * @throws com::sun::star::uno::Exception to notify the caller about possible failures + */ + requestRestart(xInteractionHandler: XInteractionHandler): void; + } + + /** + * controls a status indicator which displays progress of longer actions to the user + * + * Such objects are provided by a {@link XStatusIndicatorFactory} . + * @see XStatusIndicatorFactory + */ + interface XStatusIndicator extends uno.XInterface { + /** + * stop the progress + * + * Further calls of {@link XStatusIndicator.setText()} , {@link XStatusIndicator.setValue()} or {@link XStatusIndicator.reset()} must be ignored. Only + * {@link XStatusIndicator.start()} can reactivate this indicator. It's not allowed to destruct the indicator inside this method. The instance must be + * gone by using ref count or disposing. + */ + end(): void; + + /** + * clear progress value and description + * + * Calling of setValue(0) and setText("") should do the same. Stopped indicators must ignore this call. + */ + reset(): void; + + /** + * update progress description + * + * Initial value can be set during starting of the progress by calling {@link XStatusIndicator.start()} . Stopped indicators must ignore this call. + * @param Text new value for progress description which should be shown now + */ + setText(Text: string): void; + + /** + * update progress value + * + * Wrong values must be ignored and stopped indicators must ignore this call generally. + * @param Value new value for progress which should be shown now Must fit the range [0..Range] which was set during {@link XStatusIndicator.start()} . + */ + setValue(Value: number): void; + + /** + * initialize and start the progress + * + * It activates a new created or reactivate an already used indicator (must be finished by calling {@link XStatusIndicator.end()} before!). By the way + * it's possible to set first progress description and the possible range of progress value. That means that a progress can runs from 0 to **Range** . + * @param Text initial value for progress description for showing Value can be updated by calling {@link XStatusIndicator.setText()} . + * @param Range means the maximum value of the progress which can be set by calling {@link XStatusIndicator.setValue()} . + */ + start(Text: string, Range: number): void; + } + + /** + * provides multiple, probably parallel running, status indicator objects + * + * A possible factory is the {@link com.sun.star.frame.Frame} service. + * @see com.sun.star.frame.Frame + */ + interface XStatusIndicatorFactory extends uno.XInterface { + /** + * create a new status indicator instance + * @returns the new indicator + */ + createStatusIndicator(): XStatusIndicator; + } + + /** + * use {@link XStatusIndicatorFactory} instead of this + * @deprecated Deprecated + */ + interface XStatusIndicatorSupplier extends uno.XInterface { + /** + * use {@link XStatusIndicatorFactory.createStatusIndicator()} instead of this + * @deprecated Deprecated + */ + getStatusIndicator(): XStatusIndicator; + + /** + * use {@link XStatusIndicatorFactory.createStatusIndicator()} instead of this + * @deprecated Deprecated + */ + readonly StatusIndicator: XStatusIndicator; + } + + /** + * Allows to store and retrieve URLs. URLs can be stored persistently or until end of OOo session. + * @since OOo 3.2 + */ + interface XUrlContainer extends uno.XInterface { + /** + * Add a URL to the container. + * @param Url URL to add to the container + * @param MakePersistent indicates whether the URL shall be stored persistently or just in memory (until end of OOo session) + */ + addUrl(Url: string, MakePersistent: boolean): void; + + /** + * Lookup a URL in the container. + * @param Url URL to lookup. + * @returns Best matched URL or empty string. + */ + findUrl(Url: string): string; + + /** + * Get all URLs. + * @param OnlyPersistent Only URLs that are stored persistently shall be returned. + * @returns List of URLs. + */ + getUrls(OnlyPersistent: boolean): SafeArray; + + /** + * Remove a URL from the container. + * @param Url URL to remove. + */ + removeUrl(Url: string): void; + } + } + + namespace text { + /** provides access to groups of text blocks. */ + type AutoTextContainer = XAutoTextContainer2; + + /** provides access to language dependent numbering types and supports formatting of those numberings. */ + type DefaultNumberingProvider = XDefaultNumberingProvider; + + /** + * This service provides access to the structure of the levels of document indexes. + * + * The element type is Sequence< PropertyValues >. Each element in this sequence represents a member of an index line. The following properties are part + * of such an element. + * + * + * + * TokenType + * + * + * + * Values: + * + * + * + * TokenEntryNumber - chapter number, used in content indexes only + * + * + * + * TokenEntryText - text of the entry + * + * + * + * TokenTabStop - tab stop + * + * + * + * TokenText - user defined text + * + * + * + * TokenPageNumber - page number + * + * + * + * TokenChapterInfo - chapter info, in illustration indexes, table indexes, user indexes, table of objects and alphabetical indexes only + * + * + * + * TokenHyperlinkStart - start of a hyperlink + * + * + * + * TokenHyperlinkEnd - end of a hyperlink + * + * + * + * TokenBibliographyDataField - bibliographic data field + * + * + * + * CharacterStyleName + * + * + * + * Name of the character style applied to the element. Invalid in tab stops. + * + * + * + * TabStopRightAligned + * + * + * + * Tab stop is right aligned. Only valid for tab stops. + * + * + * + * TabStopPosition + * + * + * + * Position of the tab stop. Only valid for tab stops. + * + * + * + * TabStopFillCharacter + * + * + * + * Fill character in tab stops. Only valid for tab stops. + * + * + * + * WithTab + * + * + * + * If true insert tab character. + * + * + * + * {@link Text} + * + * + * + * {@link Text} . Only valid in user defined text. + * + * + * + * {@link ChapterFormat} + * + * + * + * Valid in chapter info and entry number only. See {@link ChapterFormat} . + * + * + * + * Other information. + * + * + * + * In chapter info only {@link com.sun.star.text.ChapterFormat.NUMBER} , {@link com.sun.star.text.ChapterFormat.NAME} , and {@link + * com.sun.star.text.ChapterFormat.NAME_NUMBER} constants are allowed. + * + * + * + * In entry number only {@link com.sun.star.text.ChapterFormat.NUMBER} and {@link com.sun.star.text.ChapterFormat.DIGIT} constants are allowed. + * + * + * + * ChapterLevel + * + * + * + * Valid in chapter info and entry number only. Denotes the level up to which the chapter information is given. Values permitted 1 to 10 inclusive. + */ + type DocumentIndexLevelFormat = container.XIndexReplace; + + /** provides access to the names of paragraph styles that are included in content indexes of user defined indexes. The element type is sequence of string. */ + type DocumentIndexParagraphStyles = container.XIndexReplace; + + /** This service specifies a an endnote in a {@link TextDocument} . */ + type Endnote = Footnote; + + /** provides access to the settings of footnotes or endnotes in a (text) document. */ + type EndnoteSettings = FootnoteSettings; + + /** provides access to the footnotes or endnotes of a (text) document. */ + type Footnotes = container.XIndexAccess; + + /** + * Specify the document service of the global text module. + * @deprecated Deprecated + */ + type GlobalDocument = GenericTextDocument; + + /** @since LibreOffice 4.1 */ + type ModuleDispatcher = frame.XDispatchProvider; + + /** provides access to the paragraphs of an {@link XText} interface. */ + type ParagraphEnumeration = container.XEnumeration; + + /** + * represents a collection of all columns of a table. + * @see com.sun.star.table.TableColumn + * @see com.sun.star.text.TextTable + * @since OOo 1.1.2 + */ + type TableColumns = table.XTableColumns; + + /** + * represents a collection of all rows of a text table. + * @see com.sun.star.table.TableRow + * @see com.sun.star.text.TextTable + * @since OOo 1.1.2 + */ + type TableRows = table.XTableRows; + + type TextColumnSequence = LibreOffice.SeqEquiv; + + /** Specify the document service of the text module. */ + type TextDocument = GenericTextDocument; + + /** This interface creates an enumeration of all text fields within a text document. */ + type TextFieldEnumeration = container.XEnumeration; + + /** This is a collection of instances of {@link TextFieldMaster} , defined in a context (e.g. in a document). */ + type TextFieldMasters = container.XNameAccess; + + /** + * This interface creates an enumeration of paragraph within a text document. The elements created by this enumeration contains either parts of text with + * equal properties or text content elements like text fields, reference marks or bookmarks. + */ + type TextPortionEnumeration = container.XEnumeration; + + /** provides a container for {@link XTextRange} objects. */ + type TextRanges = container.XIndexAccess; + + /** + * provides an interface for sorting. + * @deprecated Deprecated + * @since OOo 1.1.2 + */ + type TextSortable = util.XSortable; + + /** + * Specify the document service of the web module. + * @deprecated Deprecated + */ + type WebDocument = GenericTextDocument; + + /** enumeration values define the horizontal adjustments of objects. */ + const enum HorizontalAdjust { + /** + * the object is adjusted to the center. + * + * centric adjusted. + */ + CENTER = 1, + /** + * the object is left adjusted. + * + * adjusted to the left. + * + * text flows to the left side of the object. + */ + LEFT = 0, + /** + * the object is right adjusted. + * + * adjusted to the right. + * + * text flows to the right side of the object. + */ + RIGHT = 2, + } + + /** enumeration values are used to define the printing of notes in a document. */ + const enum NotePrintMode { + /** Notes are collected at the end of the document. */ + DOC_END = 2, + /** Notes are not printed. */ + NOT = 0, + /** Only notes are printed. */ + ONLY = 1, + /** Notes are collected at the end of a page and printed on an inserted page. */ + PAGE_END = 3, + } + + /** determines which page number is displayed in a page number text field. */ + const enum PageNumberType { + /** The number of the current page is displayed. */ + CURRENT = 1, + /** The number of the next page is displayed if there is any, otherwise the field is empty. */ + NEXT = 2, + /** The number of the previous page is displayed if there is any, otherwise the field is empty. */ + PREV = 0, + } + + /** These enumeration values describe the adjustment of ruby text. */ + const enum RubyAdjust { + /** adjusted to both borders / stretched */ + BLOCK = 3, + /** + * the object is adjusted to the center. + * + * centric adjusted. + */ + CENTER = 1, + /** adjusted to both borders except for a small indent on both sides */ + INDENT_BLOCK = 4, + /** + * the object is left adjusted. + * + * adjusted to the left. + * + * text flows to the left side of the object. + */ + LEFT = 0, + /** + * the object is right adjusted. + * + * adjusted to the right. + * + * text flows to the right side of the object. + */ + RIGHT = 2, + } + + /** specify how the text content is attached to its surrounding text. */ + const enum TextContentAnchorType { + /** + * The object is anchored instead of a character. + * + *

The size of the object influences the height of the text line.

+ */ + AS_CHARACTER = 1, + /** + * The object is anchored to a character. + * + *

The position of the object changes if the position of this + * + * character is changed. + * + *

+ */ + AT_CHARACTER = 4, + /** The object is anchored to a text frame. */ + AT_FRAME = 3, + /** + * The object is anchored to the page. + * + *

The position does not change if the content of the document is changed.

+ */ + AT_PAGE = 2, + /** The anchor of the object is set at the top left position of the paragraph. */ + AT_PARAGRAPH = 0, + } + + /** enumeration values specify the text wrap around objects in a text. */ + const enum WrapTextMode { + /** text flow depends on the situation. The text formatting decides the best way. */ + DYNAMIC = 3, + /** + * the object is left adjusted. + * + * adjusted to the left. + * + * text flows to the left side of the object. + */ + LEFT = 4, + /** text does not flow around the object. */ + NONE = 0, + /** text flows to the left and right of the object. */ + PARALLEL = 2, + /** + * the object is right adjusted. + * + * adjusted to the right. + * + * text flows to the right side of the object. + */ + RIGHT = 5, + /** text flow ignores the object. */ + THROUGHT = 1, + } + + /** + * this enum covers the different writing directions + * @deprecated DeprecatedUse WritingMode2 instead + */ + const enum WritingMode { + /** + * text within lines is written left-to-right. lines and blocks are placed top-to-bottom. + * + * Typically, this is the writing mode for normal "alphabetic" text. + */ + LR_TB = 0, + /** + * text within a line are written right-to-left. Lines and blocks are placed top-to-bottom. + * + * Typically, this writing mode is used in Arabic and Hebrew text. + */ + RL_TB = 1, + /** + * text within a line is written top-to-bottom. Lines and blocks are placed right-to-left. + * + * Typically, this writing mode is used in Chinese and Japanese text. + */ + TB_RL = 2, + } + + /** + * The accessible view of endnotes. + * @since OOo 1.1.2 + */ + interface AccessibleEndnoteView extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleEventBroadcaster { } + + /** + * The accessible view of footnotes. + * @since OOo 1.1.2 + */ + interface AccessibleFootnoteView extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleEventBroadcaster { } + + /** + * The accessible view of headers and footers. + * @since OOo 1.1.2 + */ + interface AccessibleHeaderFooterView extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleEventBroadcaster { } + + /** + * The accessible view of pages. + * @since OOo 1.1.2 + */ + interface AccessiblePageView extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleEventBroadcaster { } + + /** + * The accessible view of a paragraph fragment. + * @since OOo 1.1.2 + */ + interface AccessibleParagraphView extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleEditableText, + accessibility.XAccessibleText, accessibility.XAccessibleSelection, accessibility.XAccessibleEventBroadcaster, accessibility.XAccessibleTextAttributes { } + + /** + * The accessible page preview of a text document. + * @since OOo 1.1.2 + */ + interface AccessibleTextDocumentPageView extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleEventBroadcaster { } + + /** + * The accessible view of a text document. + * @since OOo 1.1.2 + */ + interface AccessibleTextDocumentView extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleSelection, + accessibility.XAccessibleEventBroadcaster { } + + /** + * The accessible view of an inactive embedded object. If an embedded object gets active, the active document gets an accessible object tree of its own. + * This tree is not a subtree of the object that supports this service but of the document service itself. The tree exist only until the object is + * deactivated. + * @since OOo 1.1.2 + */ + interface AccessibleTextEmbeddedObject extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleImage, + accessibility.XAccessibleEventBroadcaster { } + + /** + * The accessible view of text frames. + * @since OOo 1.1.2 + */ + interface AccessibleTextFrameView extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleEventBroadcaster { } + + /** + * The accessible view of graphics. + * @since OOo 1.1.2 + */ + interface AccessibleTextGraphicObject extends accessibility.XAccessibleContext, accessibility.XAccessibleComponent, accessibility.XAccessibleImage, + accessibility.XAccessibleEventBroadcaster { } + + /** + * provides access to a text block in a group of an {@link AutoTextContainer} . + * @see com.sun.star.text.AutoTextContainer + * @see com.sun.star.text.AutoTextGroup + */ + interface AutoTextEntry extends XAutoTextEntry, XText { } + + /** + * provides access to text blocks in a group. + * @see com.sun.star.text.AutoTextContainer + */ + interface AutoTextGroup extends XAutoTextGroup, container.XIndexAccess, container.XNamed { + /** The path to the file containing the {@link AutoTextEntry} 's in this group */ + FilePath: string; + + /** The title of this {@link AutoTextGroup} */ + Title: string; + } + + /** specifies the base service of text frames, graphic objects, and embedded objects */ + interface BaseFrame extends BaseFrameProperties, TextContent, drawing.XShape, beans.XPropertySet, container.XNamed { + /** contains the name of the frame style that is applied to this object. */ + FrameStyleName: string; + } + + /** specifies the properties that are provided by all text frames, graphic objects, embedded objects and frame styles. */ + interface BaseFrameProperties extends xml.UserDefinedAttributesSupplier { + /** + * contains the text frame the current frame is anchored to. + * + * The value is valid only if the AnchorType is TextContentAnchorType::AT_FRAME. + */ + AnchorFrame: XTextFrame; + + /** + * contains the number of the page where the objects are anchored. + * + * The value is valid only if the AnchorType is TextContentAnchorType::AT_PAGE. + */ + AnchorPageNo: number; + + /** contains the color of the background of the object. */ + BackColor: util.Color; + + /** contains the name of the file filter for the background graphic. */ + BackGraphicFilter: string; + + /** determines the position of the background graphic. */ + BackGraphicLocation: style.GraphicLocation; + + /** contains the URL for the background graphic. */ + BackGraphicURL: string; + + /** If TRUE, the "BackColor" is ignored. */ + BackTransparent: boolean; + + /** contains the distance from the border to the object. */ + BorderDistance: number; + + /** + * contains the bottom border of the object. + * @see BaseFrame.com.sun.star.table.BorderLine + */ + BottomBorder: table.BorderLine; + + /** contains the distance from the bottom border to the object. */ + BottomBorderDistance: number; + + /** contains the bottom margin of the object. */ + BottomMargin: number; + + /** determines if the content is protected. */ + ContentProtected: boolean; + + /** + * contains description for the object + * + * The long description text can be entered to describe a object in more detail to users with screen reader software. The description is visible as an + * alternative tag for accessibility tools. + * @since OOo 3.2 + */ + Description: string; + + /** + * If the property {@link FillStyle} is set to FillStyle::GRADIENT, this describes the gradient used. + * @since LibreOffice 4.1 + */ + FillGradient: awt.Gradient; + + /** + * If the property {@link FillStyle} is set to FillStyle::GRADIENT, this is the name of the gradient used. + * @since LibreOffice 4.1 + */ + FillGradientName: string; + + /** + * This enumeration selects the style the area will be filled with. + * + * Currently only set for gradients. + * @since LibreOffice 4.1 + */ + FillStyle: drawing.FillStyle; + + /** + * Grab bag of frame properties, used as a string-any map for interim interop purposes. + * @since LibreOffice 4.2 This property is intentionally not handled by the ODF filter. Any member that should be handled there should be first moved out + */ + FrameInteropGrabBag: SafeArray; + + /** + * contains the height of the object (1/100 mm). + * + * It is only valid if {@link TextEmbeddedObject.RelativeHeight} is zero. + */ + Height: number; + + /** + * determines the horizontal orientation of the object. + * @see BaseFrame.HoriOrientation + */ + HoriOrient: number; + + /** + * contains the horizontal position of the object (1/100 mm). + * + * It is only valid if "HoriOrient" is HoriOrientation_NONE. + */ + HoriOrientPosition: number; + + /** + * determines the environment of the object to which the orientation is related. + * @see BaseFrame.RelOrientation + */ + HoriOrientRelation: number; + + /** contains the name of the hyperlink that is set at the object. */ + HyperLinkName: string; + + /** contains the name of the target for a hyperlink that is set at the object. */ + HyperLinkTarget: string; + + /** contains the URL of a hyperlink that is set at the object. */ + HyperLinkURL: string; + + /** determines whether the height follows the width. */ + IsSyncHeightToWidth: boolean; + + /** determines whether the width follows the height. */ + IsSyncWidthToHeight: boolean; + + /** + * returns the actual size of the object. + * + * Since to obtain the correct actual size of the object not only the layouting for the frame needs to be finished but the whole document needs to be + * formatted as well. Thus if that was not done previously it may take some while to retrieve this value. + * @since OOo 2.0.4 + */ + LayoutSize: awt.Size; + + /** + * contains the left border of the object. + * @see BaseFrame.com.sun.star.table.BorderLine + */ + LeftBorder: table.BorderLine; + + /** contains the distance from the left border to the object. */ + LeftBorderDistance: number; + + /** contains the left margin of the object. */ + LeftMargin: number; + + /** determines if the object is opaque or transparent for text. */ + Opaque: boolean; + + /** determines if the object is mirrored on even pages. */ + PageToggle: boolean; + + /** determines if the position is protected. */ + PositionProtected: boolean; + + /** determines if the object is included in printing. */ + Print: boolean; + + /** + * contains the relative height of the object. + * + * It is only valid if it is greater than zero. + */ + RelativeHeight: number; + + /** + * contains the relation of the relative height of the object. + * + * It is only valid if RelativeHeight is greater than zero. + * @see com.sun.star.text.RelOrientation + * @since LibreOffice 4.3 + */ + RelativeHeightRelation: number; + + /** + * contains the relative width of the object. + * + * It is only valid if it is greater than zero. + */ + RelativeWidth: number; + + /** + * contains the relation of the relative width of the object. + * + * It is only valid if RelativeWidth is greater than zero. + * @see com.sun.star.text.RelOrientation + * @since LibreOffice 4.3 + */ + RelativeWidthRelation: number; + + /** + * contains the right border of the object. + * @see BaseFrame.com.sun.star.table.BorderLine + */ + RightBorder: table.BorderLine; + + /** contains the distance from the right border to the object. */ + RightBorderDistance: number; + + /** contains the right margin of the object. */ + RightMargin: number; + + /** determines if the object gets an image map from a server. */ + ServerMap: boolean; + + /** contains the type of the shadow of the object. */ + ShadowFormat: table.ShadowFormat; + + /** + * This defines the degree of transparence of the shadow in percent. + * + * This is the same as setting the Color member of the {@link ShadowFormat} property to an ARGB color. + * @since LibreOffice 4.2 + */ + ShadowTransparence: number; + + /** + * contains the size of the object. + * @see BaseFrame.Height + * @see BaseFrame.Width + */ + Size: awt.Size; + + /** determines if the size is protected. */ + SizeProtected: boolean; + + /** + * determines the type of the surrounding text. + * @deprecated Deprecated + */ + Surround: WrapTextMode; + + /** determines if the text of the paragraph in which the object is anchored, wraps around the object. */ + SurroundAnchorOnly: boolean; + + /** + * contains short title for the object + * + * This short title is visible as an alternative tag in HTML format. Accessibility tools can read this text. + * @since OOo 3.2 + */ + Title: string; + + /** + * contains the top border of the object. + * @see BaseFrame.com.sun.star.table.BorderLine + */ + TopBorder: table.BorderLine; + + /** contains the distance from the top border to the object. */ + TopBorderDistance: number; + + /** contains the top margin of the object. */ + TopMargin: number; + + /** + * determines the vertical orientation of the object. + * @see BaseFrame.VertOrientation + */ + VertOrient: number; + + /** + * contains the vertical position of the object (1/100 mm). + * + * It is only valid if {@link TextEmbeddedObject.VertOrient} is {@link VertOrientation.NONE} . + */ + VertOrientPosition: number; + + /** + * determines the environment of the object to which the orientation is related. + * @see BaseFrame.RelOrientation + */ + VertOrientRelation: number; + + /** + * contains the width of the object (1/100 mm). + * + * It is only valid if {@link TextEmbeddedObject.RelativeWidth} is zero. + */ + Width: number; + + /** + * determines the influence of the text wrap on the positioning of the shape + * + * The value of this property is only evaluated for the positioning of the shape, if the text document setting ConsiderTextWrapOnObjPos is `TRUE` . Valid + * values are given by {@link WrapInfluenceOnPosition} + * @since OOo 2.0 + */ + WrapInfluenceOnPosition: number; + } + + /** + * specifies the basic service of different indexes within a document. + * @see com.sun.star.text.DocumentIndex + * @see com.sun.star.text.ContentIndex + * @see com.sun.star.text.UserDefinedIndex + * @see com.sun.star.text.IllustrationsIndex + * @see com.sun.star.text.TableIndex + * @see com.sun.star.text.ObjectIndex + */ + interface BaseIndex extends XDocumentIndex, util.XRefreshable { + /** specifies the color of the background. */ + BackColor: util.Color; + + /** contains the name of the filter of the graphic file that is displayed as background graphic */ + BackGraphicFilter: string; + + /** + * determines the position of the background graphic. + * @see GraphicLocation + */ + BackGraphicLocation: style.GraphicLocation; + + /** contains the URL of a graphic file that is displayed as background graphic */ + BackGraphicURL: string; + + /** If `TRUE` , the background color value in "BackColor" is not visible. */ + BackTransparent: boolean; + + /** the text section containing the content of the index */ + ContentSection: XTextSection; + + /** + * determines if the content of the document index is created from the complete document content or from the current chapter only. + * + * It is not available in the bibliography + */ + CreateFromChapter: boolean; + + /** the text section containing the header of the index */ + HeaderSection: XTextSection; + + /** determines if the index is protected. */ + IsProtected: boolean; + + /** + * returns the interface of the level format of the index. + * + * The description of the format of the levels depends on the type of the document index. + * @see DocumentIndexLevelFormat + */ + LevelFormat: container.XIndexReplace; + + /** contains the name of the paragraph style that is applied to the heading. */ + ParaStyleHeading: string; + + /** contains the name of the paragraph style that is applied to the 1st level. */ + ParaStyleLevel1: string; + + /** contains the name of the paragraph style that is applied to the 10th level. */ + ParaStyleLevel10: string; + + /** contains the name of the paragraph style that is applied to the 2nd level. */ + ParaStyleLevel2: string; + + /** contains the name of the paragraph style that is applied to the 3rd level. */ + ParaStyleLevel3: string; + + /** contains the name of the paragraph style that is applied to the 4th level. */ + ParaStyleLevel4: string; + + /** contains the name of the paragraph style that is applied to the 5th level. */ + ParaStyleLevel5: string; + + /** contains the name of the paragraph style that is applied to the 6th level. */ + ParaStyleLevel6: string; + + /** contains the name of the paragraph style that is applied to the 7th level. */ + ParaStyleLevel7: string; + + /** contains the name of the paragraph style that is applied to the 8th level. */ + ParaStyleLevel8: string; + + /** contains the name of the paragraph style that is applied to the 9th level. */ + ParaStyleLevel9: string; + + /** contains the name of the paragraph style that is applied to the separator level. */ + ParaStyleSeparator: string; + + /** contains the column interface. */ + TextColumns: XTextColumns; + + /** contains the title of the index. */ + Title: string; + } + + /** + * is a {@link TextRange} which is explicitly marked as an index entry. This is the base service of index marks for {@link DocumentIndex} , {@link + * ContentIndex} , and {@link UserIndex} . + */ + interface BaseIndexMark extends TextContent { + /** + * the string that will be inserted into the corresponding index. If AlternativeText is empty then the string that is marked by the {@link TextRange} is + * inserted into the index. + */ + AlternativeText: string; + } + + /** + * specifies service of bibliography within a text document. + * @see com.sun.star.text.BaseIndex + */ + interface Bibliography extends BaseIndex { + /** contains the locale of the index. */ + Locale: lang.Locale; + + /** contains the name of the sort algorithm that is used to sort the entries. */ + SortAlgorithm: string; + } + + /** A bookmark is a {@link TextContent} , which is like a jump target or a label. */ + interface Bookmark extends TextContent, container.XNamed { } + + /** This service specifies a collection of {@link Bookmarks} . */ + interface Bookmarks extends container.XNameAccess, container.XIndexAccess { } + + /** + * represents a singe cell within a text table. + * @see com.sun.star.text.TextTable + */ + interface Cell extends CellProperties, table.CellProperties, table.XCell, XText { } + + /** + * service that holds all cell properties of a text table cell in a text document. + * @see com.sun.star.text.Cell + */ + interface CellProperties extends xml.UserDefinedAttributesSupplier, beans.XPropertySet { + /** contains the background color. */ + BackColor: util.Color; + + /** contains the name of the graphic filter of the background graphic. */ + BackGraphicFilter: string; + + /** determines the position of the background graphic. */ + BackGraphicLocation: style.GraphicLocation; + + /** contains the URL to the background graphic. */ + BackGraphicURL: string; + + /** determines whether the background is transparent. */ + BackTransparent: boolean; + + /** contains the bottom border line. */ + BottomBorder: table.BorderLine; + + /** contains the distance of the bottom border. */ + BottomBorderDistance: number; + + /** contains the cell name, see SwXTextTable::getCellByName for more information */ + CellName: string; + + /** determines whether the cell is write protected or not. */ + IsProtected: boolean; + + /** contains the left border line. */ + LeftBorder: table.BorderLine; + + /** contains the distance of the left border. */ + LeftBorderDistance: number; + + /** contains the number format. */ + NumberFormat: number; + + /** contains the right border line. */ + RightBorder: table.BorderLine; + + /** contains the distance of the right border. */ + RightBorderDistance: number; + + /** contains the text section the text table is contained in if there is any. */ + TextSection: XTextSection; + + /** contains the top border line. */ + TopBorder: table.BorderLine; + + /** contains the distance of the top border. */ + TopBorderDistance: number; + + /** + * the vertical orientation of the text inside of the table cells in this row. + * @see VertOrientation + */ + VertOrient: number; + } + + /** + * area of cells within a text table. + * @see com.sun.star.text.TextTable + */ + interface CellRange extends style.CharacterProperties, style.CharacterPropertiesAsian, style.CharacterPropertiesComplex, style.ParagraphProperties, + style.ParagraphPropertiesAsian, style.ParagraphPropertiesComplex, table.XCellRange, sheet.XCellRangeData, chart.XChartDataArray { + /** contains color of the background. */ + BackColor: util.Color; + + /** contains the filter name of the background graphic. */ + BackGraphicFilter: string; + + /** determines the location of the background graphic. */ + BackGraphicLocation: style.GraphicLocation; + + /** contains the URL of the background graphic. */ + BackGraphicURL: string; + + /** determines if the background color is transparent. */ + BackTransparent: boolean; + + /** determines if the first column of the table should be treated as axis labels when a chart is to be created. */ + ChartColumnAsLabel: boolean; + + /** determines if the first row of the table should be treated as axis labels when a chart is to be created. */ + ChartRowAsLabel: boolean; + + /** contains the number format. */ + NumberFormat: number; + } + + /** + * extends a {@link TextFrame} which shares the same {@link Text} with other {@link ChainedTextFrame} instances that will make the text flow through the + * chained frames. The text flows in the next frame if there is no space left in the current frame. + */ + interface ChainedTextFrame extends TextFrame { + /** + * name of the previous frame in the chain + * + * An empty string indicates that there is no previous frame. + */ + ChainNextName: string; + + /** + * name of the next frame in the chain + * + * An empty string indicates that there is no next frame. + */ + ChainPrevName: string; + } + + /** + * describes the rules for chapter numbering in a text document. + * + * Some of the properties that are available in the interface are ignored here. + * + * The type of numbering can only be: NUM_CHARS_UPPER_LETTER, NUM_CHARS_LOWER_LETTER, NUM_ROMAN_UPPER, NUM_ROMAN_LOWER, NUM_ARABIC, or NUM_NUMBER_NONE + * + * In the {@link com.sun.star.style.NumberingAlignment} only the field {@link com.sun.star.style.NumberingAlignment.Alignment} is applied. + * + * Depending on the numbering types, the parameters for bullets or bit maps may be ignored. The character style name for the numbering symbol is also + * ignored. + */ + interface ChapterNumberingRule extends style.NumberingRule { + /** + * contains the name of the paragraph style that marks this heading level. + * + * It is necessary that each style name appears only once in the sequence of numbering rules. + */ + HeadingStyleName: string; + } + + /** + * specifies service of content indexes within a document. + * @see com.sun.star.text.BaseIndex + */ + interface ContentIndex extends BaseIndex { + /** contains `TRUE` if the document index marks are included in this index. */ + CreateFromMarks: boolean; + + /** determines if the document index is created from outlines. */ + CreateFromOutline: boolean; + + /** determines the depth of outline levels that are included into the content index. */ + Level: number; + + /** + * contains the interface to access the paragraph style names that are included in this index. + * @see DocumentIndexParagraphStyles + */ + LevelParagraphStyles: container.XIndexReplace; + } + + /** is a {@link TextRange} which is explicitly marked as an index entry for a {@link ContentIndex} . */ + interface ContentIndexMark extends TextContent, BaseIndexMark { + /** contains the level into which the index mark will be inserted into the content index. */ + Level: number; + } + + /** provides default settings of a text component for paragraph and character properties. */ + interface Defaults extends style.CharacterProperties, style.ParagraphProperties, style.CharacterPropertiesAsian, style.CharacterPropertiesComplex, + style.ParagraphPropertiesAsian, style.ParagraphPropertiesComplex, beans.XPropertySet { + /** default tab-distance to be used. */ + TabStopDistance: number; + } + + /** + * is a {@link TextField} which is not specified by itself, but dependent on a {@link TextFieldMaster} . + * @see TextFieldMaster + */ + interface DependentTextField extends TextField, XDependentTextField { } + + /** + * specifies service of content indexes within a document. + * @see com.sun.star.text.BaseIndex + */ + interface DocumentIndex extends BaseIndex { + /** contains all index marks that are related to this index. */ + DocumentIndexMarks: SafeArray; + + /** determines if the similarity of index entries is checked case sensitively. */ + IsCaseSensitive: boolean; + + /** contains the locale of the index. */ + Locale: lang.Locale; + + /** determines the name of the character style that is applied to the number of a page where main index entry is located. */ + MainEntryCharacterStyleName: string; + + /** contains the name of the sort algorithm that is used to sort the entries. */ + SortAlgorithm: string; + + /** determines if alphabetical separators are generated. */ + UseAlphabeticalSeparators: boolean; + + /** determines if same entries on different pages are combined into one index entry. */ + UseCombinedEntries: boolean; + + /** determines if following page numbers are displayed using a dash. */ + UseDash: boolean; + + /** determines if a index entry is generated for each primary/secondary key. */ + UseKeyAsEntry: boolean; + + /** determines if following page numbers are displayed using a "pp.". */ + UsePP: boolean; + + /** determines if all entries start with a capital letter. */ + UseUpperCase: boolean; + } + + /** provides access to all indexes in a document. */ + interface DocumentIndexes extends container.XNameAccess, container.XIndexAccess { } + + /** is a {@link TextRange} which is explicitly marked as an index entry for a {@link DocumentIndex} . */ + interface DocumentIndexMark extends TextContent, BaseIndexMark { + /** determines if this entry is a main entry. In a document index this entry will be emphasized by assigning a character style to it. */ + IsMainEntry: boolean; + + /** contains the primary key of the index entry. It is used to build a hierarchical document index. */ + PrimaryKey: string; + + /** contains the secondary key of the index entry. It is used to build a hierarchical document index. */ + SecondaryKey: string; + } + + /** + * is a {@link TextRange} which is explicitly marked as an index entry for a {@link DocumentIndex} . For Asian languages the user can provide an + * additional string which is used for sorting. If the user does not provide these strings, they are not considered for sorting. + * @since OOo 1.1.2 + */ + interface DocumentIndexMarkAsian { + /** contains the reading of the primary key of the index entry. It is used to build a hierarchical document index. */ + PrimaryKeyReading: string; + + /** contains the reading the secondary key of the index entry. It is used to build a hierarchical document index. */ + SecondaryKeyReading: string; + + /** contains the reading of the string which has been chosen for the index entry. */ + TextReading: string; + } + + /** describes properties that apply to the whole text document. */ + interface DocumentSettings extends document.Settings, PrintSettings, beans.XPropertySet { + /** + * specifies if paragraph and table spacing is added at the bottom of table cells + * + * This property controls, if the spacing of the last paragraph respectively table of a table cell is added at the bottom of this table cells If `TRUE` + * (default for documents since OpenOffice.org 2.0), the spacing of the last paragraph respectively table of a table cell is added at the bottom of this + * table cell. If `FALSE` (typically for documents till OpenOffice.org 1.1), the spacing of the last paragraph respectively table of a table cell isn't + * added at the bottom of this table cell. + * @since OOo 2.0 + */ + AddParaSpacingToTableCells: boolean; + + /** + * specifies if spacing between paragraphs and tables is to be added. + * + * If between two paragraphs, two tables, or a paragraph and a table, you have defined spacing above and below each object, usually only the larger one + * of the two spaces is used. If the spacing between the objects are to be added this property has to be `TRUE` . + */ + AddParaTableSpacing: boolean; + + /** + * specifies if top paragraph spacing is applied to paragraphs on the first page of text documents. + * + * If `TRUE` , the paragraph or table spacing to the top will also be effective at the beginning of a page or column if the paragraph or table is + * positioned on the first page of the document. The same applies for a page break. + */ + AddParaTableSpacingAtStart: boolean; + + /** + * specifies the alignment of tab stops in text documents. + * + * If `TRUE` centered and right-aligned paragraphs containing tabs are formatted as a whole in the center or aligned to the right. If `FALSE` , only the + * text to the right of the last tab, for example, is aligned to the right, while the text to the left remains where it is. + */ + AlignTabStopPosition: boolean; + + /** + * specifies if charts in text documents are updated automatically. + * + * This has no effect if "FieldAutoUpdate" is `FALSE` . + */ + ChartAutoUpdate: boolean; + + /** + * specifies if the text wrap of floating screen objects are considered in a specified way in the positioning algorithm. + * + * This property controls how floating screen objects (Writer fly frames and drawing objects) are positioned. If `TRUE` , the object positioning + * algorithm will consider the text wrap style, set at the floating screen object. The attribute {@link BaseFrameProperties.WrapInfluenceOnPosition} + * specifies how the text wrap is considered. If `FALSE` (default value), the former object positioning algorithm (known from OpenOffice.org 1.1) is + * applied. + * @since OOo 2.0 + */ + ConsiderTextWrapOnObjPos: boolean; + + /** + * specifies if the document has been created as a label document. + * + * This property indicates that the document contains multiple text frames and that the content of one frame is duplicated into the other frames by + * internally linked text sections. + */ + IsLabelDocument: boolean; + + /** + * specifies if Math objects should automatically vertically aligned to match the baseline of the surrounding text. + * + * If activated formula object that are anchored 'As Character' will be vertically aligned to have their baseline match with the one from the text. + * @since OOo 3.4 + */ + MathBaselineAlignment: boolean; + + /** + * specifies if the contents of links in the global document are saved or not. + * + * This property applies only for master documents. + * + * **Note** : This name is a bit misleading, it should be something like `SaveLinkedDocumentContent` . + */ + SaveGlobalDocumentLinks: boolean; + + /** + * specifies if the former (till OpenOffice.org 1.1) or the new line spacing formatting is applied. + * + * This property controls how a set line spacing at a paragraph influences the formatting of the text lines and the spacing between paragraphs. If `TRUE` + * , the formatting till OpenOffice.org 1.1 is applied. This means, that a proportional line spacing is applied above and below a text line and that the + * maximum of the line spacing value between two paragraph is added respectively reckoned up with the paragraph spacing (adding or reckoning up is + * controlled by document option AddParaTableSpacing). If `FALSE` (default for documents since OpenOffice.org 2.0), a proportional line spacing is only + * applied below a text line and it's always added to the paragraph spacing between two paragraphs. + * @since OOo 2.0 + */ + UseFormerLineSpacing: boolean; + + /** + * specifies if the former (till OpenOffice.org 1.1) or the new object positioning is applied. + * + * This property controls how floating screen objects (Writer fly frames and drawing objects are positioned. If `TRUE` , the object positioning till + * OpenOffice.org 1.1 is applied. This means, that the top of a paragraph, at which a floating screen object orients its vertical position, includes the + * lower spacing and the line spacing of the previous paragraph. If `FALSE` (default for documents since OpenOffice.org 2.0), the top of a paragraph, at + * which a floating screen object orients its vertical position, doesn't include the lower spacing and the line spacing of the previous paragraph. + * @since OOo 2.0 + */ + UseFormerObjectPositioning: boolean; + } + + /** This service specifies a footnote or an endnote in a {@link TextDocument} . */ + interface Footnote extends XFootnote, XText { + /** + * contains an internal identifier for the use as SequenceNumber property in reference fields. + * @see com.sun.star.text.textfield.GetReference. + */ + ReferenceId: number; + } + + /** provides access to the settings of footnotes or endnotes in a (text) document. */ + interface FootnoteSettings { + /** + * contains the name of the character style that is used for footnote/endnote anchor in the text. + * @since OOo 2.0 + */ + AnchorCharStyleName: string; + + /** + * contains the string at the restart of the footnote text after a break. + * + * For footnotes only. + */ + BeginNotice: string; + + /** contains the name of the character style that is used for the label in front of the footnote/endnote text. */ + CharStyleName: string; + + /** + * contains the string at the end of a footnote part in front of a break. + * + * For footnotes only. + */ + EndNotice: string; + + /** + * contains the type of the counting of the footnote numbers. + * + * For footnotes only. + * @see FootnoteNumbering + */ + FootnoteCounting: number; + + /** contains the numbering type for the numbering of the footnotes/endnotes. */ + NumberingType: number; + + /** contains the page style that is used for the page that contains the footnote/endnote texts */ + PageStyleName: string; + + /** contains the paragraph style that is used for the footnote/endnote text. */ + ParaStyleName: string; + + /** + * If `TRUE` , the footnote text is shown at the end of the document. + * + * For footnotes only. + */ + PositionEndOfDoc: boolean; + + /** contains the prefix for the footnote/endnote symbol. */ + Prefix: string; + + /** contains the first number of the automatic numbering of footnotes/endnotes. */ + StartAt: number; + + /** contains the suffix for the footnote/endnote symbol. */ + Suffix: string; + } + + /** + * A text document is a model component which contains text structured by paragraphs. + * + * Each paragraph and each portion of text can be fitted with some attributes (technically properties). + * + * Its declared as generic text document, because its function is needed by different derived services (TextDocument/WebDocument/GlobalDocument). + * + * In addition, all text objects can be searched. + */ + interface GenericTextDocument extends document.OfficeDocument, lang.XMultiServiceFactory, XTextDocument, util.XSearchable, util.XRefreshable, + tiledrendering.XTiledRenderable, XFootnotesSupplier, XEndnotesSupplier, util.XReplaceable, XPagePrintable, XReferenceMarksSupplier, XChapterNumberingSupplier, + beans.XPropertySet, XTextGraphicObjectsSupplier, XTextEmbeddedObjectsSupplier, XTextTablesSupplier, style.XStyleFamiliesSupplier, XBookmarksSupplier, + XDocumentIndexesSupplier, XTextFieldsSupplier, XTextFramesSupplier, XTextSectionsSupplier, util.XNumberFormatsSupplier { + addEventListener(Listener: document.XEventListener | lang.XEventListener): void; + + /** contains the count of all characters in the document. */ + CharacterCount: number; + + /** contains the identifier of the default locale of the document. */ + CharLocale: lang.Locale; + + /** + * specifies the concordance file taken into account when creating an index. + * + * When no concordance file should be used the string is empty. Used for text documents only. + * @since OOo 1.1.2 + */ + IndexAutoMarkFileURL: string; + + /** contains the count of all paragraphs in the document. */ + ParagraphCount: number; + + /** + * specifies if change recording is active. + * @since OOo 1.1.2 + */ + RecordChanges: boolean; + removeEventListener(Listener: document.XEventListener | lang.XEventListener): void; + + /** + * specifies the first 4 digit year to be used when years are given in 2 digits. + * + * Example: if set to 1930 Oct-12-29 will be interpreted as Oct-12-2029 Oct-12-30 will be interpreted as Oct-12-1930 Oct-12-02 will be interpreted as + * Oct-12-2002 + * @since OOo 1.1.2 + */ + TwoDigitYear: number; + + /** + * contains the count of all words in the document. + * @see WordSeparator + */ + WordCount: number; + + /** + * contains a string that consists of characters that mark the separation of words in counting the words in a document. + * + * I.e. slash and backslash. Whitespace (tab stop, space, paragraph break, line break) always separate words. + * @see WordCount + */ + WordSeparator: string; + } + + /** specifies a service that provides access to the settings of a text module. */ + interface GlobalSettings extends view.XPrintSettingsSupplier, view.XViewSettingsSupplier { } + + /** + * describes the cropping of graphic objects. Cropping means to show only parts of the object. + * + * Negative values cut the visible area; positive values extend the visible area by filling it with background color. The absolute sum of top and bottom + * crop must be smaller than the objects original height. The absolute sum of the left and right crop must be smaller than the object's original width. + * + * If this property is applied to a graphic object, then this object will correct these values if necessary. + */ + interface GraphicCrop { + /** contains the bottom value to cut (if negative) or to extend (if positive) */ + Bottom: number; + + /** contains the left value to cut (if negative) or to extend (if positive) */ + Left: number; + + /** contains the right value to cut (if negative) or to extend (if positive) */ + Right: number; + + /** contains the top value to cut (if negative) or to extend (if positive) */ + Top: number; + } + + /** + * describes the horizontal orientation of an object. + * + * If `HorizontalOrientation == HORI_NONE` , then the value "XPos" describes the distance from the left border of the context. Otherwise "XPos" is + * ignored. + * + * The following flags are used to adapt the position of the object to odd and even pages. If "PositionToggle" is set, then the horizontal position is + * mirrored. + */ + interface HoriOrientationFormat { + /** determines the horizontal alignment of an object. The values refer to com::sun::star::HoriOrientation. */ + HorizontalOrientation: number; + + /** + * determines the reference position of the horizontal alignment. + * @see com.sun.star.text.RelOrientation + */ + HorizontalRelation: number; + + /** determines if the orientation toggles between left and right pages. */ + PositionToggle: boolean; + + /** contains the distance from the left border. Only valid if the property HorizontalOrientation contains the value HORI_NONE. */ + XPos: number; + } + + /** + * specifies service of illustration indexes within a document. + * @see com.sun.star.text.BaseIndex + */ + interface IllustrationsIndex extends BaseIndex { + CreateFromLabels: boolean; + LabelCategory: string; + LabelDisplayType: number; + } + + /** + * is a {@link TextContent} that can be used to attach RDF metadata to a range of text. + * @since OOo 3.2 + */ + interface InContentMetadata extends TextContent, rdf.XMetadatable, container.XEnumerationAccess, container.XChild { } + + /** is thrown whenever a method gets a {@link TextContent} as an actual argument when the text content cannot be used for that operation. */ + interface InvalidTextContentException extends uno.Exception { + /** contains the interface of the text content that caused the exception. */ + TextContent: XTextContent; + } + + /** provides access to the settings of the line numbering. */ + interface LineNumberingProperties { + /** The name of the character style that is used for the line number. */ + CharStyleName: string; + + /** If `TRUE` , empty lines are counted. */ + CountEmptyLines: boolean; + + /** If `TRUE` , lines in frames are included in counting. */ + CountLinesInFrames: boolean; + + /** specifies the distance between the line number and the start or end of the text area. */ + Distance: number; + + /** Line numbers are shown on every **Interval** th line. */ + Interval: number; + + /** If `TRUE` , line numbering is used. */ + IsOn: boolean; + + /** specifies the type of the numbering. */ + NumberingType: number; + + /** specifies the position of the line number (constant LineNumberPositions left/right/inside/outside). */ + NumberPosition: number; + + /** + * specifies if the line numbering should start from the beginning at each page. + * + * If set to `FALSE` the line numbering will be continuous. + * @since OOo 2.0 + */ + RestartAtEachPage: boolean; + + /** The line separator is shown every **SeparatorInterval** th line. */ + SeparatorInterval: number; + + /** specifies the string that is used for the line separator. */ + SeparatorText: string; + } + + /** + * Gives access to mail merge functionality. + * @since OOo 1.1.2 + */ + interface MailMerge extends task.XJob, util.XCancellable, beans.XPropertySet, XMailMergeBroadcaster, sdb.DataAccessDescriptor { + /** + * contains the connection to the database. + * + * For the interaction of this property with other data access relevant properties, see the {@link com.sun.star.sdb.DataAccessDescriptor} service. + */ + ActiveConnection: sdbc.XConnection; + + /** + * contains the name of the data base column that contains the e-Mail address to the e-Mail to. + * + * This property is only evaluated for e-Mail output. + * @since OOo 2.0 + */ + AddressFromColumn: string; + + /** + * contains the name of the document filter to save the attached mail merge document. This property is only valid if "SendAsAttachment" is set to `TRUE` + * . + * + * This property is only evaluated for e-Mail output. + * @since OOo 2.0 + */ + AttachmentFilter: string; + + /** + * contains the name of the attachment. This property is only valid if "SendAsAttachment" is set to `TRUE` . + * + * This property is only evaluated for e-Mail output. + * @since OOo 2.0 + */ + AttachmentName: string; + + /** + * This property is only evaluated for e-Mail output. + * @since OOo 2.0 + */ + BlindCopiesTo: SafeArray; + + /** + * contains the database command. + * + * For the interaction of this property with other data access relevant properties, see the {@link com.sun.star.sdb.DataAccessDescriptor} service. + */ + Command: string; + + /** + * determines the type of the database command as described in {@link com.sun.star.sdb.CommandType} + * + * For the interaction of this property with other data access relevant properties, see the {@link com.sun.star.sdb.DataAccessDescriptor} service. + */ + CommandType: number; + + /** + * contains a list of e-Mail addresses to + * + * This property is only evaluated for e-Mail output. + * @since OOo 2.0 + */ + CopiesTo: SafeArray; + + /** + * contains the name of the data source that is to be used for merging. + * + * For the interaction of this property with other data access relevant properties, see the {@link com.sun.star.sdb.DataAccessDescriptor} service. + */ + DataSourceName: string; + + /** + * contains the URL of a text document that is to be processed. + * + * If this property is not set an empty document is created. + */ + DocumentURL: string; + + /** + * returns if escape processing is on or off. + * + * For the interaction of this property with other data access relevant properties, see the {@link com.sun.star.sdb.DataAccessDescriptor} service. + */ + EscapeProcessing: boolean; + + /** + * determines whether file names of created files are generated using the content of a database column. + * + * This property is only evaluated for file output. + */ + FileNameFromColumn: boolean; + + /** + * contains the name of the column to generate the output file names. + * + * If FileNameFromColumn is true the content of the related column is added to the OutputURL. + * + * If "OutputURL" or "FileNamePrefix" are empty the missing value is generated from the location or title of the source documents. + * + * This property is only evaluated for file output. + */ + FileNamePrefix: string; + + /** + * contains a filter expression for an SQL statement. + * + * For the interaction of this property with other data access relevant properties, see the {@link com.sun.star.sdb.DataAccessDescriptor} service. + */ + Filter: string; + + /** + * Contains the password of the incoming mail server. It is necessary to set this if the mail server configuration is set to "SMTP after POP" + * authentication and the password is not already stored in the configuration for security reasons. + * + * This property is only evaluated for e-Mail output. + * @since OOo 2.0 + */ + InServerPassword: string; + + /** + * contains the text of the mail body. This property is only valid if the property "SendAsAttachment" is set to `TRUE` + * + * This property is only evaluated for e-Mail output. + * @since OOo 2.0 + */ + MailBody: string; + + /** + * provides access to the model of the document to be processed. + * + * This property will automatically be set to the documents model if a document URL was set. + */ + Model: frame.XModel; + + /** + * determines the destination of the mail merge action. + * @see com.sun.star.text.MailMergeType + */ + OutputType: number; + + /** + * contains the path where generated files are created. + * + * If "OutputURL" or "FileNamePrefix" are empty the missing value is generated from the location or title of the source documents. + * + * This property is only evaluated for file output. + */ + OutputURL: string; + + /** + * Contains the password of the outgoing mail server. It is necessary to set this if the password is not already stored in the configuration for security + * reasons. + * + * This property is only evaluated for e-Mail output. + * @since OOo 2.0 + */ + OutServerPassword: string; + + /** + * contains the properties that are defined in < {@link com.sun.star.view.PrintOptions} >. + * + * This property is only evaluated for printer output. + * @since OOo 2.0 + */ + PrintOptions: SafeArray; + + /** + * provides access to a {@link com.sun.star.sdbc.XResultSet} of a {@link com.sun.star.sdbc.ResultSet} service. + * + * Note that any superservices of {@link com.sun.star.sdbc.ResultSet} are also allowed. Especially, this member can denote an instance of the {@link + * com.sun.star.sdb.RowSet} , or an instance obtained by calling {@link com.sun.star.sdb.XResultSetAccess.createResultSet()} on such a {@link + * com.sun.star.sdb.RowSet} . This becomes important in conjunction with the {@link Selection} property. + * + * For the interaction of this property with other data access relevant properties, see the {@link com.sun.star.sdb.DataAccessDescriptor} service. + */ + ResultSet: sdbc.XResultSet; + + /** + * determines that the output of the mail merge is save in one single file. + * + * This property is only evaluated for file output. + * @since OOo 2.0 + */ + SaveAsSingleFile: boolean; + + /** + * contains the name of the document filter to save the output file(s). + * + * This property is only evaluated for file output. + * @since OOo 2.0 + */ + SaveFilter: string; + + /** + * contains a selection that refers to bookmarks of the ResultSet. + * + * This property is relevant in conjunction with the {@link ResultSet} only. A single element of this array describes a bookmark relative to the result + * set. ; Note that this implies that the {@link ResultSet} needs to support the {@link com.sun.star.sdbcx.XRowLocate} interface. + * + * If this array is empty, the whole result set, as described by {@link ResultSet} respectively the triple ( {@link DataSourceName} , {@link CommandType} + * , {@link Command} ). + * + * For the interaction of this property with other data access relevant properties, see the {@link com.sun.star.sdb.DataAccessDescriptor} service. + */ + Selection: SafeArray; + + /** + * determines that the created mail merge document is sent as attachment. + * + * This property is only evaluated for e-Mail output. + * @since OOo 2.0 + */ + SendAsAttachment: boolean; + + /** + * determines that the created mail merge document is sent as body in HTML format. This property is only valid if the property "SendAsAttachment" is set + * to `FALSE` . + * + * This property is only evaluated for e-Mail output. + * @since OOo 2.0 + */ + SendAsHTML: boolean; + + /** + * determines whether single print jobs will be generated per output document. + * + * This property is only evaluated for printer output. + */ + SinglePrintJobs: boolean; + + /** + * contains the subject of the e-Mail message. + * + * This property is only evaluated for e-Mail output. + * @since OOo 2.0 + */ + Subject: string; + } + + /** + * represents a mail merge event. + * + * This type of event is being send by the mail merge service right before the merging of the next document to be processed. This allows for example to + * modify the document specifically before it gets merged. + * @see com.sun.star.text.MailMerge + * @since OOo 1.1.2 + */ + interface MailMergeEvent extends lang.EventObject { + /** The model of the document to be processed next. */ + Model: frame.XModel; + } + + /** provides access to a numbering level as part of the Numbering Rules. */ + interface NumberingLevel { + /** adjusts the numbering (HoriOrientation_LEFT/RIGHT/CENTER) */ + Adjust: number; + + /** contains the symbol in the given font. This is only valid if the numbering type is {@link com.sun.star.style.NumberingType.CHAR_SPECIAL} . */ + BulletChar: string; + + /** contains the color for the symbol. This is only valid if the numbering type is {@link com.sun.star.style.NumberingType.CHAR_SPECIAL} . */ + BulletColor: util.Color; + + /** the font used to paint the bullet. */ + BulletFont: awt.FontDescriptor; + + /** the name of the font for the symbol. This is only valid if the numbering type is {@link com.sun.star.style.NumberingType.CHAR_SPECIAL} . */ + BulletFontName: string; + + /** + * the ID of the symbol in the given font. This is only valid if the numbering type is {@link com.sun.star.style.NumberingType.CHAR_SPECIAL} . + * @deprecated Deprecated + */ + BulletId: number; + + /** + * contains the size of the symbol relative to the high of the paragraph. This is only valid if the numbering type is {@link + * com.sun.star.style.NumberingType.CHAR_SPECIAL} . + */ + BulletRelSize: number; + + /** Name of the character style that is used for the numbering symbol. */ + CharStyleName: string; + + /** + * additional line indent for the first text line

+ * + * Specifies the first line indent. + * + * Only of relevance, if PositionAndSpaceMode equals LABEL_ALIGNMENT. + * + *

+ * @@since OOo 3.0 + */ + FirstLineIndent: number; + + /** specifies the offset between the beginning of the first line and the beginning of the following lines of the paragraph. */ + FirstLineOffset: number; + + /** the bitmap containing the bullet. */ + GraphicBitmap: awt.XBitmap; + + /** size of the graphic that is used as bullet. */ + GraphicSize: awt.Size; + + /** + * the URL of the graphic file that is used as the numbering symbol. + * + * This is only valid if the numbering type is {@link com.sun.star.style.NumberingType.BITMAP} . + */ + GraphicURL: string; + + /** + * contains the name of the paragraph style that is interpreted as the header of this level. It is only contained in the levels of chapter numbering + * rules. + */ + HeadingStyleName: string; + + /** + * indentation of the text lines

+ * + * Specifies the indent of the text lines + * + * Only of relevance, if PositionAndSpaceMode equals LABEL_ALIGNMENT. + * + *

+ * @@since OOo 3.0 + */ + IndentAt: number; + + /** + * character following the list label

+ * + * Specifies the character following the list label. + * + * For valid values see com::sun::star::text::LabelFollow. + * + * Only of relevance, if PositionAndSpaceMode equals LABEL_ALIGNMENT. + * + *

+ * @@since OOo 3.0 + */ + LabelFollowedBy: number; + + /** specifies the left margin of the numbering */ + LeftMargin: number; + + /** + * list tab position

+ * + * Specifies the position of the list tab stop - only non-negative + * + * values are allowed. + * + * Only of relevance, if PositionAndSpaceMode equals LABEL_ALIGNMENT + * + * and LabelFollowedBy equal LABELFOLLOW_LISTTAB + * + *

+ * @@since OOo 3.0 + */ + ListtabStopPosition: number; + + /** specifies the type of numbering. */ + NumberingType: number; + + /** + * contains the name of the paragraph style that should use this numbering. This is ignored for chapter numbering rules, use HeadingStyleName. + * @since LibreOffice 3.6 + */ + ParagraphStyleName: string; + + /** number of upper levels that are included in the current numbering symbol. */ + ParentNumbering: number; + + /** + * position and space mode

+ * + * Specifies the position and space mode of the numbering level. + * + * For valid values see com::sun::star::text::PositionAndSpaceMode. + * + * If it equals LABEL_WIDTH_AND_POSITION, properties Adjust, + * + * LeftMargin, SymbolTextDistance and FirstLineOffset are used. + * + * If it equals LABEL_ALIGNMENT, properties Adjust, LabelFollowedBy, + * + * ListtabStopPosition, FirstLineIndent, IndentAt are used. + * + *

+ * @@since OOo 3.0 + */ + PositionAndSpaceMode: number; + + /** the prefix of the numbering symbol. */ + Prefix: string; + + /** + * specifies the start value for the numbering. + * + * This property is only valid if the numbering type is not {@link com.sun.star.style.NumberingType.BITMAP} or {@link + * com.sun.star.style.NumberingType.CHAR_SPECIAL} . + */ + StartWith: number; + + /** the suffix of the numbering symbol. */ + Suffix: string; + + /** specifies the distance between the numbering symbol and the text of the paragraph. */ + SymbolTextDistance: number; + + /** + * contains the vertical orientation of a graphic. + * + * It is set using {@link com.sun.star.text.VertOrientation} . + */ + VertOrient: number; + } + + /** + * provides access to the numbering rules. + * + * Numbering rules may be set at a {@link Paragraph} object. The numbering rules are levels of property values. Each level contains equal properties. + */ + interface NumberingRules extends container.XIndexReplace, beans.XPropertySet { + /** id of default list for the numbering rules instance */ + DefaultListId: string; + + /** determines if the margins are absolute or relative to the preceding numbering level. */ + IsAbsoluteMargins: boolean; + + /** determines if the numbering rules are automatically created as opposed to numbering rules that are part of a numbering style. */ + IsAutomatic: boolean; + + /** determines if the numbering levels are counted continuously or if each numbering level is counted separately. */ + IsContinuousNumbering: boolean; + + /** contains the name of the numbering rules. It is used to identify a certain numbering rules property */ + Name: string; + + /** This numbering is used in the outline of the document (e.g. headings). */ + NumberingIsOutline: boolean; + + /** the type of numbering (Arabic, characters, roman numbers, etc.). */ + NumberingType: number; + } + + /** specifies a style sheet numberings within a {@link com.sun.star.text.Text} . */ + interface NumberingStyle extends style.Style, NumberingRules { } + + /** + * specifies service of object indexes within a document. + * @see com.sun.star.text.BaseIndex + */ + interface ObjectIndex extends BaseIndex { + /** Determines if external embedded objects are included in the office. */ + CreateFromOtherEmbeddedObjects: boolean; + + /** Determines if star office calc objects are included in the office. */ + CreateFromStarCalc: boolean; + + /** Determines if star office chart objects are included in the office. */ + CreateFromStarChart: boolean; + + /** Determines if star office draw objects are included in the office. */ + CreateFromStarDraw: boolean; + + /** Determines if star office image objects are included in the office. */ + CreateFromStarImage: boolean; + + /** Determines if star office math objects are included in the office. */ + CreateFromStarMath: boolean; + } + + /** specifies the properties of the footnote area of a page or a page style. */ + interface PageFootnoteInfo { + /** contains the distance between the separator line and the footnote section. */ + FootnoteBottomDistance: number; + + /** + * contains the maximum height of the footnote section. + * + * If 0, the maximum is the height of the page. + */ + FootnoteHeight: number; + + /** contains the adjustment of the footnote separator line. */ + FootnoteSeparatorLineAdjust: HorizontalAdjust; + + /** contains the width of the pen for the footnote separator line. */ + FootnoteSeparatorLinePenWidth: number; + + /** contains the relative width of the footnote separator line. */ + FootnoteSeparatorLineWidth: number; + + /** contains the relative width of the footnote separator line. */ + FootnoteSeparatorLineWidthPercent: number; + + /** contains the distance between the text and footnote section. */ + FootnoteTopDistance: number; + } + + /** These properties describe the way the {@link XPagePrintable} interface prints the page on one printer page. */ + interface PagePrintSettings { + /** contains the right margin of the printer page. */ + BottomMargin: number; + + /** contains the margin between the rows of printed pages. */ + HoriMargin: number; + + /** defines if the printer page is used in landscape format. */ + IsLandscape: boolean; + + /** contains the left margin of the printer page. */ + LeftMargin: number; + + /** contains the number of pages per printed row of pages. */ + PageColumns: number; + + /** contains the number of pages per printed column of pages. */ + PageRows: number; + + /** contains the right margin of the printer page. */ + RightMargin: number; + + /** contains the top margin of the printer page. */ + TopMargin: number; + + /** contains the margin between the columns of printed pages. */ + VertMargin: number; + } + + /** is a piece of text which can take its own paragraph-specific attributes (technically, properties). */ + interface Paragraph extends style.ParagraphProperties, style.ParagraphPropertiesAsian, style.ParagraphPropertiesComplex, style.CharacterProperties, + style.CharacterPropertiesAsian, style.CharacterPropertiesComplex, TextTable, TextContent, beans.XPropertySet, beans.XPropertyState, + container.XEnumerationAccess, beans.XTolerantMultiPropertySet { } + + /** These properties describe the printing of the content of a text document. */ + interface PrintSettings { + /** + * determines how notes are printed. + * @see NotePrintMode + */ + PrintAnnotationMode: NotePrintMode; + + /** determines if characters are always printed in black. */ + PrintBlackFonts: boolean; + + /** determines if control shapes are printed. */ + PrintControls: boolean; + + /** determines if shapes are printed. */ + PrintDrawings: boolean; + + /** determines if automatically inserted empty pages are printed. */ + PrintEmptyPages: boolean; + + /** contains the name of the fax. */ + PrintFaxName: string; + + /** determines if graphic objects are printed */ + PrintGraphics: boolean; + + /** determines if left pages are printed. */ + PrintLeftPages: boolean; + + /** determines if the background color / background graphic of pages is printed. */ + PrintPageBackground: boolean; + + /** + * specifies if the printer paper tray selection of the system printer is used. + * + * If com::sun::star::view::PrintSettings::PaperFromSetup is `FALSE` , then the paper tray selection of the page styles is used. + */ + PrintPaperFromSetup: boolean; + + /** determines if prospect printing is used. */ + PrintProspect: boolean; + + /** determines if the pages are printed in the reverse order, starting with the last page. */ + PrintReversed: boolean; + + /** determines if right pages are printed. */ + PrintRightPages: boolean; + + /** determines if text tables are printed. */ + PrintTables: boolean; + } + + /** A {@link RedlinePortion} is a {@link TextPortion} that marks a change that has been recorded by the change tracking. */ + interface RedlinePortion extends TextPortion { + /** determines whether the portion is member of a header or footer text. */ + IsInHeaderFooter: boolean; + + /** determines whether the last paragraph of a redline text has to be merged with a possible following text content (i.e. a text table) */ + MergeLastPara: boolean; + + /** contains the name of the author of the change. */ + RedlineAuthor: string; + + /** contains a comment for the change. */ + RedlineComment: string; + + /** contains the date and time of the change. */ + RedlineDateTime: util.DateTime; + + /** + * contains a unique identifier for the redline. This is necessary for file export filters to able to recognize redline portions that point to the same + * redline. + */ + RedlineIdentifier: string; + + /** + * contains the data of a second level redline data + * + * The elements of the sequence are: + * + * + * + * string RedlineAuthor; + * + * + * + * {@link com.sun.star.util.DateTime} RedlineDateTime; + * + * + * + * string RedlineComment; + * + * + * + * string RedlineType; + */ + RedlineSuccessorData: beans.PropertyValues; + + /** + * provides access to the text of the redline. This interface is only provided if the change is not visible. The visibility depends on the redline + * display options that are set at the documents property set (RedlineDisplayType). + */ + RedlineText: XText; + + /** + * contains the type of the change + * + * Valid type names are: + * + * + * + * Insert - marks an insertion + * + * + * + * Delete - marks an deletion + * + * + * + * Format - marks an attribute change + * + * + * + * {@link TextTable} - marks a text table + * + * + * + * Style - marks an applied style + */ + RedlineType: string; + } + + /** is used for cross references in text documents. */ + interface ReferenceMark extends XTextContent, container.XNamed { } + + /** provides access to the reference marks in a document. */ + interface ReferenceMarks extends container.XIndexAccess, container.XNameAccess { } + + /** + * describes the link for a text section. + * + * If the URL is an empty string, then the section is not linked. + * + * The bookmark of the URL (after the "#") is the name of a bookmark or a section name in the linked document. If a bookmark or section with this name + * exists in the document, then only this part is linked into the given text section. + * + * {@link SectionFileLink.FilterName} is the internal name of the document filter. To use this struct, it is not necessary to set {@link + * SectionFileLink.FilterName} . It will be automatically assigned. + */ + interface SectionFileLink { + /** contains the URL of the linked file. */ + FileURL: string; + + /** contains the name of the file filter that is used to load the linked file. */ + FilterName: string; + } + + /** specifies the service of shapes in a text document */ + interface Shape extends drawing.Shape { + /** + * contains the text frame the current frame is anchored to. + * + * The value is valid only if the AnchorType is TextContentAnchorType::AT_FRAME. + */ + AnchorFrame: XTextFrame; + + /** + * contains the number of the page where the objects are anchored. + * + * The value is valid only if the AnchorType is TextContentAnchorType::AT_PAGE. + */ + AnchorPageNo: number; + + /** specifies how the text content is attached to its surrounding {@link Text} . */ + AnchorType: TextContentAnchorType; + + /** contains the bottom margin of the object. */ + BottomMargin: number; + + /** the text flows only around the contour of the object. */ + ContourOutside: boolean; + + /** + * determines the end position of the shape in horizontal left-to-right layout + * + * This property is needed for the export of the OASIS Open Office file format to the OpenOffice.org file format. It provides the end position property + * of the included service {@link com.sun.star.drawing.Shape} converted to the horizontal left-to-right layout. + * @since OOo 2.0 + */ + EndPositionInHoriL2R: awt.Point; + + /** + * determines the horizontal orientation of the object. + * @see BaseFrame.HoriOrientation + */ + HoriOrient: number; + + /** + * contains the horizontal position of the object (1/100 mm). + * + * It is only valid if "HoriOrient" is HoriOrientation_NONE. + */ + HoriOrientPosition: number; + + /** + * determines the environment of the object to which the orientation is related. + * @see BaseFrame.RelOrientation + */ + HoriOrientRelation: number; + + /** contains the left margin of the object. */ + LeftMargin: number; + + /** determines if the object is opaque or transparent for text. */ + Opaque: boolean; + + /** + * determines layout direction the position attributes of the shape is given + * + * Valid values are given by {@link PositionLayoutDir} + * @since OOo 2.0 + */ + PositionLayoutDir: number; + + /** contains the right margin of the object. */ + RightMargin: number; + + /** + * determines the start position of the shape in horizontal left-to-right layout + * + * This property is needed for the export of the OASIS Open Office file format to the OpenOffice.org file format. It provides the start position property + * of the included service {@link com.sun.star.drawing.Shape} converted to the horizontal left-to-right layout. + * @since OOo 2.0 + */ + StartPositionInHoriL2R: awt.Point; + + /** + * determines the type of the surrounding text. + * @deprecated Deprecated + */ + Surround: WrapTextMode; + + /** determines if the text of the paragraph in which the object is anchored, wraps around the object. */ + SurroundAnchorOnly: boolean; + + /** determines if the text wraps around the contour of the object. */ + SurroundContour: boolean; + + /** + * contains a text range where the shape should be anchored to. + * + * There are two different ways to get newly created shapes into the text document. One of them is to use the insertTextContent() method of the {@link + * com.sun.star.text.XSimpleText} . The other is to call the add() method of the {@link com.sun.star.drawing.XShapes} interface. To be able to determine + * an anchor position for shape that are anchored at a certain text position the property {@link TextRange} is used. + * + * This property is used when the shape gets inserted/added and becomes invalid after that. + */ + TextRange: XTextRange; + + /** contains the top margin of the object. */ + TopMargin: number; + + /** + * determines the transformation of the shape in horizontal left-to-right layout + * + * This property is needed for the export of the OASIS Open Office file format to the OpenOffice.org file format. It provides the transformation property + * of the included service {@link com.sun.star.drawing.Shape} converted to the horizontal left-to-right layout. + * @since OOo 2.0 + */ + TransformationInHoriL2R: drawing.HomogenMatrix3; + + /** + * determines the vertical orientation of the object. + * @see BaseFrame.VertOrientation + */ + VertOrient: number; + + /** + * contains the vertical position of the object (1/100 mm). + * + * It is only valid if {@link TextEmbeddedObject.VertOrient} is {@link VertOrientation.NONE} . + */ + VertOrientPosition: number; + + /** + * determines the environment of the object to which the orientation is related. + * @see BaseFrame.RelOrientation + */ + VertOrientRelation: number; + + /** + * determines the influence of the text wrap on the positioning of the shape + * + * The value of this property is only evaluated for the positioning of the shape, if the text document setting ConsiderTextWrapOnObjPos is `TRUE` . Valid + * values are given by {@link WrapInfluenceOnPosition} + * @since OOo 2.0 + */ + WrapInfluenceOnPosition: number; + } + + /** + * The width of the cells of a text table is defined by the position of the separator between neighboring cells. + * + * If cells of the table are merged, this separator is not removed, but it is hidden. + * + * A text table or a text table row provides the separators in a sequence of TableColumnSeparators. If the table only consists of one column, then this + * sequence is empty. + * + * The real width of a table depends on the environment (page style and number of text columns at the table's position, alignment, and left and right + * margins). For that reason, the table column separator does not contain metric values for the column widths. The values are relative to the value of + * the property {@link TextTable.TableColumnRelativeSum} . + * + * A table provides this property only if all rows have the same structure. If the table does not provide the property, then it cannot be set using. + * + * The state of {@link TableColumnSeparator.IsVisible} and the count of the sequence must be the same in as it was in. Hidden separators cannot be moved + * and they cannot be overtaken by visible separators. + * @see com.sun.star.text.TextTable + */ + interface TableColumnSeparator { + /** determines if the separator is visible. */ + IsVisible: boolean; + + /** contains the position of the separator. */ + Position: number; + } + + /** + * specifies service of table indexes within a document. + * @see com.sun.star.text.BaseIndex + */ + interface TableIndex extends BaseIndex { + /** determines if the name or the label of an object is used to create the index. */ + CreateFromLabels: boolean; + + /** determines the name of the sequence field that is evaluated to create the index. */ + LabelCategory: string; + + /** + * determines the way the paragraph containing a label is included in the index. + * @see ReferenceFieldPart allowed constant values: only TEXT, CATEGORY_AND_NUMBER and ONLY_CAPTION + */ + LabelDisplayType: number; + } + + /** + * is an independent piece of text which consists of a series of one or more paragraphs. + * + * This service is used, for example, for the text of a {@link TextDocument} or the text in a cell or {@link TextFrame} . + * @see com.sun.star.text.TextDocument + * @see com.sun.star.text.TextFrame + * @see com.sun.star.table.Cell + */ + interface Text extends container.XEnumerationAccess, XText, XTextRangeCompare, XTextRangeMover, XRelativeTextContentInsert { + /** + * contains the properties of a redline at the start of the document. The sequence contains the following properties + * + * string RedlineAuthor + * + * + * + * {@link com.sun.star.util.DateTime} RedlineDate_Time + * + * + * + * string RedlineComment + * + * + * + * string RedlineType + * + * + * + * string RedlineIdentifier + * + * + * + * boolean IsCollapsed + * + * + * + * boolean IsStart + * + * + * + * boolean MergeLastPara + * + * + * + * [maybevoid] {@link com.sun.star.text.XText} RedlineText (maybevoid) + * + * + * + * {@link com.sun.star.beans.PropertyValues} RedlineSuccessorData (contains the same properties except for the RedlineSuccessorData) + * @see StartRedline + */ + EndRedline: beans.PropertyValues; + + /** + * contains the properties of a redline at the start of the document. ; The sequence contains the following properties + * + * string RedlineAuthor + * + * + * + * {@link com.sun.star.util.DateTime} RedlineDate_Time + * + * + * + * string RedlineComment + * + * + * + * string RedlineType + * + * + * + * string RedlineIdentifier + * + * + * + * boolean IsCollapsed + * + * + * + * boolean IsStart + * + * + * + * boolean MergeLastPara + * + * + * + * [maybevoid] {@link com.sun.star.text.XText} RedlineText (maybevoid) + * + * + * + * {@link com.sun.star.beans.PropertyValues} RedlineSuccessorData (contains the same properties except for the RedlineSuccessorData) + * @see EndRedline + */ + StartRedline: beans.PropertyValues; + } + + /** defines a single text column. */ + interface TextColumn { + /** + * contains the left margin of the column. + * + * This is a metric value. + */ + LeftMargin: number; + + /** + * contains the right margin of the column. + * + * This is a metric value. + */ + RightMargin: number; + + /** + * contains the relative width of the column, including both margins. + * + * Width isn't a metric value, it's a relative value to the sum of the width of all columns. + */ + Width: number; + } + + /** provides access to columns in text (e.g., in {@link TextFrames} ). */ + interface TextColumns extends XTextColumns { + /** + * contains the distance between the columns. It is valid if the property IsAutomatic is set. Half of this distance is set to the left and right margins + * of all columns, except for the left margin of the first column, and the right margin of the last column. + */ + AutomaticDistance: number; + + /** + * determines whether the columns all have equal width. This flag is set if {@link XTextColumns.setColumnCount()} is called and it is reset if {@link + * XTextColumns.setColumns()} is called. + */ + IsAutomatic: boolean; + + /** determines the color of the separator lines between the columns. */ + SeparatorLineColor: util.Color; + + /** determines whether separator lines are on. */ + SeparatorLineIsOn: boolean; + + /** determines the relative height of the separator lines between the columns. */ + SeparatorLineRelativeHeight: number; + + /** + * determines the style of the separator lines between the columns. + * @see com.sun.star.text:ColumnSeparatorStyle for the possible values. + */ + SeparatorLineStyle: number; + + /** determines the vertical alignment of the separator lines between the columns. */ + SeparatorLineVerticalAlignment: style.VerticalAlignment; + + /** determines the width of the separator lines between the columns. */ + SeparatorLineWidth: number; + } + + /** + * is an object which can be anchored in a text, like instances of {@link TextFrame} or {@link TextField} . + * + * If the concrete {@link TextContent} has a textual representation which fades into the surrounding text, then {@link XTextField} is used. + * + * If the concrete {@link TextContent} has a "floating" object, like a graphic, {@link com.sun.star.drawing.XShape} is used. + * @see TextField + * @see TextTable + * @see TextFrame + * @see TextSection + * @see TextGraphicObject + * @see TextEmbeddedObject + */ + interface TextContent extends XTextContent { + /** specifies how the text content is attached to its surrounding {@link Text} . */ + AnchorType: TextContentAnchorType; + + /** + * contains the anchor type of the text content. + * @see com.sun.star.text.TextContentAnchorType + */ + AnchorTypes: SafeArray; + + /** specifies if the text content is a shape and how the text is wrapped around the shape. */ + TextWrap: WrapTextMode; + } + + /** + * Objects of this type are collections of text contents of the same type. + * @see Text + */ + interface TextContentCollection extends container.XNameAccess, container.XContainer { } + + /** + * A {@link TextCursor} is a {@link TextRange} which can be moved within a {@link Text} object. + * @see TextRange + */ + interface TextCursor extends TextRange, XTextCursor, XWordCursor, XSentenceCursor, XParagraphCursor, beans.XPropertySet, beans.XPropertyState, + beans.XMultiPropertyStates, document.XDocumentInsertable, util.XSortable { + getPropertyStates(aPropertyName: LibreOffice.SeqEquiv): SafeArray; + } + + /** specifies the view of a {@link TextDocument} . */ + interface TextDocumentView extends view.OfficeDocumentView, view.XViewSettingsSupplier, XTextViewCursorSupplier, beans.XPropertySet { + /** + * specifies if spell checking should be done while typing. + * @since OOo 2.0 + */ + IsConstantSpellcheck: boolean; + + /** + * specifies if the marks for misspelled text should be displayed. + * @since OOo 2.0 + */ + IsHideSpellMarks: boolean; + + /** + * returns the number of lines in the document + * + * Since the document needs to be formatted to get the result obtaining this value may take some time. + * + * Empty paragraphs are not counted. + * @since OOo 2.0 + */ + LineCount: number; + + /** + * returns the number of pages in the document + * + * Since the document needs to be formatted to get the result obtaining this value may take some time. + * @since OOo 2.0 + */ + PageCount: number; + } + + /** provides access to the properties and methods of an embedded object. */ + interface TextEmbeddedObject extends BaseFrame, document.XEmbeddedObjectSupplier { + CLSID: string; + + /** This is the component for the OLE2 object. */ + Component: lang.XComponent; + + /** + * This is the model for the OLE2 object. + * + * This property if void if the OLE2 is not an Office component. + */ + Model: frame.XModel; + } + + /** provides access to all embedded objects in a document. */ + interface TextEmbeddedObjects extends container.XNameAccess, container.XIndexAccess { } + + /** A {@link TextField} is a {@link TextContent} which fades its textual representation into the text range to which it is anchored. */ + interface TextField extends TextContent, XTextField, beans.XPropertySet { + /** + * specifies if the text field is actually displayed. + * + * Not all available text fields are actually displayed even when they are used. For example hidden fields or fields in hidden text are used in the + * document but get not displayed. + * @since OOo 2.0.1 + */ + IsFieldDisplayed: boolean; + + /** + * specifies if the text field is actually used in the document. + * + * Not all available text fields are used, for example fields that are part of unused styles. + * @since OOo 2.0.1 + */ + IsFieldUsed: boolean; + } + + /** A {@link TextFieldMaster} specifies important data for its DependentTextFields. */ + interface TextFieldMaster extends beans.XPropertySet { + /** contains a sequence of all fields that depend on this master. */ + DependentTextFields: SafeArray; + + /** contains the instance name as it is used in the {@link com.sun.star.text.XTextFieldsSupplier} . */ + InstanceName: string; + + /** + * determines the name of the field master. The name is void as long as the instance is not member of the document structure. When the value is being set + * the instance is inserted into the document and the name cannot be changed afterwards. That does not apply to the Database text field master. + */ + Name: string; + } + + /** This is a collection of {@link TextField} instances. */ + interface TextFields extends container.XEnumerationAccess, util.XRefreshable { } + + /** + * specifies a rectangular shape which contains a {@link Text} object and is attached to a piece of surrounding {@link Text} . + * @see Text This example shows how to create a {@link TextFrame} and insert it at the very beginning of {@link Text} component. The macro is ready to r + */ + interface TextFrame extends BaseFrame, XTextFrame { + /** determines if the text frame should be editable in a read-only document. (This is usually used in forms.) */ + EditInReadonly: boolean; + + /** contains the metric height value of the frame. */ + FrameHeightAbsolute: number; + + /** + * specifies a width relative to the width of the surrounding text. + * + * If the value for "HeightPercent" is 0, the absolute value from is used. + */ + FrameHeightPercent: number; + + /** If "AutomaticHeight" is set, then the object grows if it is required by the frame content. */ + FrameIsAutomaticHeight: boolean; + + /** contains the metric width value of the frame. */ + FrameWidthAbsolute: number; + + /** + * specifies a width relative to the width of the surrounding text. + * + * If the value for "WidthPercent" is 0, the absolute value from is used. + */ + FrameWidthPercent: number; + + /** + * controls, if the frame follows the text flow or can leave its layout environment + * + * If set, the frame follows the text flow and doesn't leaves the layout environment, which is given by its anchor, above and below. E.g.: Anchor resides + * in the document body then the frame doesn't leave the document body above and below and follows the text flow through the document bodies of the + * different pages. + * + * If not set, the frame doesn't follow the text flow and stays on the page, on which its anchor is found, but it may leave the layout environment, which + * is given by its anchor. E.g.: Anchor resides in the document body then the frame stays on page, where this document body is, but it could leave the + * document body above and below, e.g. overlapping with the page header. + * + * Note: The areas for the vertical orientation relation at page areas are interpreted in dependence to this property ( + * @see BaseFrameProperties.VertOrientRelation). If property is set, the page area is interpreted as the layout environment, given by its anchor. E.g.: A + */ + IsFollowingTextFlow: boolean; + + /** + * determines the interpretation of the height and relative height properties. + * @@see SizeType + */ + SizeType: number; + + /** + * adjusts the vertical position of the text inside of the frame. + * @see com.sun.star.drawing.TextVerticalAdjust + * @since LibreOffice 4.3 + */ + TextVerticalAdjust: drawing.TextVerticalAdjust; + + /** + * determines the interpretation of the width and relative width properties. + * @see SizeType + * @since OOo 2.4 + */ + WidthType: number; + + /** contains the writing direction, as represented by the {@link com.sun.star.text.WritingMode2} constants */ + WritingMode: number; + } + + /** This is the collection of all {@link TextFrame} instances within a context (e.g. a document). */ + interface TextFrames extends container.XNameAccess, container.XIndexAccess, container.XContainer { } + + /** specifies a graphic which can be embedded in {@link Text} . */ + interface TextGraphicObject extends BaseFrame { + /** contains the original size of the bitmap in the graphic object. */ + ActualSize: awt.Size; + + /** changes the display of the blue color channel. It contains percentage values between -100 and +100. */ + AdjustBlue: number; + + /** changes the display of contrast. It contains percentage values between -100 and +100. */ + AdjustContrast: number; + + /** changes the display of the green color channel. It contains percentage values between -100 and +100. */ + AdjustGreen: number; + + /** changes the display of the luminance. It contains percentage values between -100 and +100. */ + AdjustLuminance: number; + + /** changes the display of the red color channel. It contains percentage values between -100 and +100. */ + AdjustRed: number; + + /** determines if the content is protected against changes from the user interface. */ + ContentProtected: boolean; + + /** the text flows only around the contour of the object. */ + ContourOutside: boolean; + + /** contains the contour of the object as PolyPolygon. */ + ContourPolyPolygon: drawing.PointSequenceSequence; + + /** determines the gamma value of the graphic. */ + Gamma: number; + + /** contains the graphic. */ + Graphic: graphic.XGraphic; + + /** contains the ColorMode as {@link com.sun.star.drawing.ColorMode} . */ + GraphicColorMode: drawing.ColorMode; + + /** + * contains the cropping of the object. + * @see GraphicCrop + */ + GraphicCrop: GraphicCrop; + + /** contains the name of the filter of the background graphic of the object. */ + GraphicFilter: string; + + /** determines if the graphic is display in inverted colors. It contains percentage values between -100 and +100. */ + GraphicIsInverted: boolean; + + /** contains the URL of the background graphic of the object */ + GraphicURL: string; + + /** determines if the object is horizontally mirrored on even pages. */ + HoriMirroredOnEvenPages: boolean; + + /** determines if the object is horizontally mirrored on odd pages. */ + HoriMirroredOnOddPages: boolean; + + /** returns the client-side image map if one is assigned to the object. */ + ImageMap: container.XIndexContainer; + + /** determines if the text wraps around the contour of the object. */ + SurroundContour: boolean; + + /** contains percentage values between -100 and +100. */ + Transparency: number; + + /** determines if the object is mirrored vertically. */ + VertMirrored: boolean; + } + + /** This is the collection of all {@link TextGraphicObject} instances within a context (e.g. a document). */ + interface TextGraphicObjects extends container.XNameAccess, container.XIndexAccess { } + + /** A {@link TextLayoutCursor} is a {@link TextRange} which can travel within a layout of a {@link Text} object. */ + interface TextLayoutCursor extends TextCursor, XPageCursor { } + + /** + * A descriptor for a single text markup. + * @since OOo 3.0.1 + */ + interface TextMarkupDescriptor { + aIdentifier: string; + nLength: number; + nOffset: number; + nType: number; + xMarkupInfoContainer: container.XStringKeyMap; + } + + /** + * represents a page style for a text document. + * + * This service extends the service {@link com.sun.star.style.PageStyle} with specific properties for text documents. + */ + interface TextPageStyle { + /** + * contains the interface to the text of the footer. + * @see com.sun.star.text.Text + */ + FooterText: XText; + + /** + * contains the interface to the text of the footer of a first page. + * @see com.sun.star.text.Text + * @since LibreOffice 4.0 + */ + FooterTextFirst: XText; + + /** + * contains the interface to the text of the footer of a left page. + * @see com.sun.star.text.Text + */ + FooterTextLeft: XText; + + /** + * contains the interface to the text of the footer of a right page. + * @see com.sun.star.text.Text + */ + FooterTextRight: XText; + + /** + * contains the maximum height of the footnote area (in 1/100 mm). + * + * If set to zero, the height of the current page is used as limit. + */ + FootnoteHeight: number; + + /** + * contains the adjustment of the separator line between the text and the footnote area. + * @see com.sun.star.text.HorizontalAdjust + */ + FootnoteLineAdjust: number; + + /** contains the color of the separator line between the text and the footnote area. */ + FootnoteLineColor: util.Color; + + /** contains the distance between the footnote area and the separator line between the text and the footnote area (in 1/100 mm). */ + FootnoteLineDistance: number; + + /** contains the relative width of the separator line between the text and the footnote area (in percent). */ + FootnoteLineRelativeWidth: number; + + /** contains the distance between the text and the separator line between the text and the footnote area (in 1/100 mm). */ + FootnoteLineTextDistance: number; + + /** contains the weight of the separator line between the text and the footnote area (in 1/100 mm). */ + FootnoteLineWeight: number; + + /** + * contains the interface to the text of the header. + * @see com.sun.star.text.Text + */ + HeaderText: XText; + + /** + * contains the interface to the text of the header of first pages. + * @see com.sun.star.text.Text + * @since LibreOffice 4.0 + */ + HeaderTextFirst: XText; + + /** + * contains the interface to the text of the header of left pages. + * @see com.sun.star.text.Text + */ + HeaderTextLeft: XText; + + /** + * contains the interface to the text of the header of right pages. + * @see com.sun.star.text.Text + */ + HeaderTextRight: XText; + + /** determines whether the register mode is active on that page. */ + RegisterModeActive: boolean; + + /** contains the name of the paragraph style that is used as reference of the register mode. */ + RegisterParagraphStyle: string; + + /** contains the column settings of the page. */ + TextColumns: XTextColumns; + } + + /** + * A {@link TextPortion} is a piece of text within a paragraph that does not contain changes of its attributes inside. + * + * It is created by an enumeration implemented in a paragraph service. It may be used to export the content of the paragraph to an external document + * format. + * @see com.sun.star.text.TextPortionEnumeration + * @see com.sun.star.text.XTextPortionEnumeration + */ + interface TextPortion extends TextRange, container.XContentEnumerationAccess, beans.XTolerantMultiPropertySet { + /** contains the bookmark of a text portion of type {@link Bookmark} . */ + Bookmark: XTextContent; + + /** + * contains the control character of a text portion of type {@link ControlCharacter} . + * @deprecated Deprecatedtype ControlCharacter no longer implemented + */ + ControlCharacter: number; + + /** contains the document index mark of a text portion of type {@link DocumentIndexMark} . */ + DocumentIndexMark: XTextContent; + + /** contains the footnote of a text portion of type {@link Footnote} . */ + Footnote: XFootnote; + + /** + * contains the text range of a text portion of type {@link InContentMetadata} . + * @since OOo 3.2 + */ + InContentMetadata: XTextContent; + + /** contains whether the portion is a point only. */ + IsCollapsed: boolean; + + /** + * contains whether the portion is the start of the portion. + * + * This is used for portions which are represented by 2 {@link TextPortion} objects (e.g., DocmentIndexMark). + */ + IsStart: boolean; + + /** contains the bookmark of a text portion of type {@link ReferenceMark} . */ + ReferenceMark: XTextContent; + + /** contains the text field of a text portion of type {@link TextField} . */ + TextField: XTextField; + + /** + * contains the type of the text portion. + * + * Valid content type names are: + * + * **Text**: string content + * + * **TextField**: a text field + * + * **TextContent**: text content - supplied via the interface {@link com.sun.star.container.XContentEnumerationAccess} + * + * **ControlCharacter**: a control character + * + * **Footnote**: a footnote or an endnote + * + * **ReferenceMark**: a reference mark + * + * **DocumentIndexMark**: a document index mark + * + * **Bookmark**: a bookmark + * + * **Redline**: a redline portion which is a result of the change tracking feature + * + * **Ruby**: a ruby attribute which is used in Asian text + * + * **Frame**: a frame + * + * **SoftPageBreak**: a soft page break + * + * **InContentMetadata**: a text range with attached metadata + * + * + * + * For Reference marks, document index marks, etc., 2 text portions will be generated, one for the start position and one for the end position. + */ + TextPortionType: string; + } + + interface TextPosition { + Paragraph: number; + PositionInParagraph: number; + } + + /** + * points to a sequence of characters within a {@link Text} . + * + * The service provides access to the string content and the properties of this range of text and the {@link TextContent} instances which are bound to + * this text range. + * + * A {@link TextRange} is also used for a **text portion** which is returned by the {@link com.sun.star.container.XEnumeration} for a single paragraph. + * Because this is the mechanism to use to export data, all formatting attributes and contents bound to this range have to be available from + * implementations of this service. + * @see Text + */ + interface TextRange extends XTextRange, beans.XPropertySet, beans.XPropertyState, container.XContentEnumerationAccess, style.CharacterProperties, + style.CharacterPropertiesAsian, style.CharacterPropertiesComplex, style.ParagraphProperties, style.ParagraphPropertiesAsian, style.ParagraphPropertiesComplex { } + + /** + * describes the structural properties to retrieve text contents. + * @since OOo 3.3 + */ + interface TextRangeContentProperties { + /** may contain a table cell. */ + Cell: table.XCell; + + /** may contain a document index. */ + DocumentIndex: XDocumentIndex; + + /** may contain a document index mark. */ + DocumentIndexMark: XDocumentIndexMark; + + /** may contain a endnote. */ + Endnote: XFootnote; + + /** may contain a footnote. */ + Footnote: XFootnote; + + /** + * may contain a nested text content. + * + * For example, may contain an {@link InContentMetadata} or a {@link com.sun.star.text.textfield.MetadataField} . + */ + NestedTextContent: XTextContent; + + /** may contain a reference mark. */ + ReferenceMark: XTextContent; + + /** may contain a text frame. */ + TextFrame: XTextFrame; + + /** may contain a text section. */ + TextSection: XTextSection; + + /** may contain a text table. */ + TextTable: XTextTable; + } + + interface TextRangeSelection { + End: TextPosition; + Start: TextPosition; + } + + /** + * A {@link TextSection} is a range of complete paragraphs within a text. + * + * The content of the section may be the content of a link into another document, a link from the same document, or the result of a DDE operation. + * + * {@link TextSection} instances can be linked from and to other texts. + */ + interface TextSection extends TextContent, xml.UserDefinedAttributesSupplier, XTextSection, container.XNamed, beans.XPropertySet, beans.XPropertyState { + /** contains the name of the file filter for the background graphic. */ + BackGraphicFilter: string; + + /** + * determines the position of the background graphic. + * @see GraphicLocation + */ + BackGraphicLocation: style.GraphicLocation; + + /** contains the URL for the background graphic. */ + BackGraphicURL: string; + + /** + * This property contains a conditional expression. + * + * If the result of the conditional expression is `TRUE` and the property {@link TextSection.IsVisible} is `FALSE` , then the section is hidden. + */ + Condition: string; + + /** + * specifies the source element of the command string for a DDE operation. + * + * The element can be i.e. a name of a cell in a sheet or a bookmark. + */ + DDECommandElement: string; + + /** specifies the source file name of the command string for a DDE operation. */ + DDECommandFile: string; + + /** + * specifies the type of the command string for a DDE operation. + * + * The type can be the name of the application that provides a DDE source. + */ + DDECommandType: string; + + /** determines whether endnotes inside the section are displayed at the end of the section text. */ + EndnoteIsCollectAtTextEnd: boolean; + + /** determines whether the endnotes within the section use an own numbering format. This is only valid if `EndnoteIsRestartNumbering` is set. */ + EndnoteIsOwnNumbering: boolean; + + /** determines whether the endnotes numbering restarts within the section. This is only valid if `EndnoteIsRestartNumbering` is set. */ + EndnoteIsRestartNumbering: boolean; + + /** determines the prefix that is display before the endnote number. This is only valid if `EndnoteIsOwnNumbering` is set. */ + EndnoteNumberingPrefix: string; + + /** determines the suffix that is display after the endnote number. This is only valid if `EndnoteIsOwnNumbering` is set. */ + EndnoteNumberingSuffix: string; + + /** + * determines the numbering type of the endnote numbering as a value of {@link com.sun.star.style.NumberingType} . This is only valid if + * `EndoteIsOwnNumbering` is set. + */ + EndnoteNumberingType: number; + + /** determines at which number the endnote numbering inside of the section starts. This is only valid if `EndnoteIsRestartNumbering` is set. */ + EndnoteRestartNumberingAt: number; + + /** If this property is set, then the content of the section is read from the specified document. */ + FileLink: SectionFileLink; + + /** determines whether footnotes inside the section are displayed at the end of the section text. */ + FootnoteIsCollectAtTextEnd: boolean; + + /** determines whether the footnotes within the section use an own numbering format. This is only valid if `FootnoteIsRestartNumbering` is set. */ + FootnoteIsOwnNumbering: boolean; + + /** determines whether the footnotes numbering restarts within the section. This is only valid if `FootnoteIsRestartNumbering` is set. */ + FootnoteIsRestartNumbering: boolean; + + /** determines the prefix that is display before the footnote number. This is only valid if `FootnoteIsOwnNumbering` is set. */ + FootnoteNumberingPrefix: string; + + /** determines the suffix that is display after of the footnote number. This is only valid if `FootnoteIsOwnNumbering` is set. */ + FootnoteNumberingSuffix: string; + + /** + * determines the numbering type of the footnote numbering as a value of {@link com.sun.star.style.NumberingType} . This is only valid if + * `FootnoteIsOwnNumbering` is set. + */ + FootnoteNumberingType: number; + + /** determines at which number the footnote numbering inside of the section starts. This is only valid if `FootnoteIsRestartNumbering` is set. */ + FootnoteRestartNumberingAt: number; + + /** determines if a DDE link is updated automatically. */ + IsAutomaticUpdate: boolean; + + /** If this property is `TRUE` , the text section is protected and cannot be modified from the user interface. */ + IsProtected: boolean; + + /** If this property is `FALSE` , the text section is hidden. */ + IsVisible: boolean; + + /** + * specifies the source of a file link in the document that is specified in {@link TextSection.FileLink} . + * + * The source may be a text section or a bookmark. If {@link TextSection.FileLink} is empty, then the current document is searched for the source. If + * this property is empty and {@link TextSection.FileLink} is set, then the complete document content is linked into this section. + */ + LinkRegion: string; + + /** determines the left margin of the section */ + SectionLeftMargin: number; + + /** determines the left margin of the section */ + SectionRightMargin: number; + + /** allows columns to be set into the text section */ + TextColumns: XTextColumns; + } + + /** provides access to the text sections in a text document. */ + interface TextSections extends container.XIndexAccess, container.XNameAccess { } + + /** + * describes sort criteria for sorting text. + * @deprecated Deprecated + */ + interface TextSortDescriptor extends util.SortDescriptor { + /** contains the character that marks the separation of columns. */ + Delimiter: string; + + /** determines if the sorting in the first search key is done in ascending or descending order. */ + IsSortAscending0: boolean; + + /** determines if the sorting in the second search key is done in ascending or descending order. */ + IsSortAscending1: boolean; + + /** determines if the sorting in the third search key is done in ascending or descending order. */ + IsSortAscending2: boolean; + + /** determines if the content of a table is to be sorted. */ + IsSortInTable: boolean; + + /** determines if the sorting in the first search key is done numeric or alphanumeric order. */ + IsSortNumeric0: boolean; + + /** determines if the sorting in the second search key is done in numeric or alphanumeric order. */ + IsSortNumeric1: boolean; + + /** determines if the sorting in the third search key is done in numeric or alphanumeric order. */ + IsSortNumeric2: boolean; + + /** contains the row or column index used in the first search key. */ + SortRowOrColumnNo0: number; + + /** contains the row or column index used in the second search key. */ + SortRowOrColumnNo1: number; + + /** contains the row or column index used in the third search key. */ + SortRowOrColumnNo2: number; + } + + /** + * describes sort criteria for sorting paragraphs or table contents in a text document. + * @since OOo 1.1.2 + */ + interface TextSortDescriptor2 extends table.TableSortDescriptor2 { + /** contains the character that marks the column separator when a selection of paragraphs is to be sorted. */ + Delimiter: string; + + /** determines if the content of a table or a selection of paragraphs is to be sorted. */ + IsSortInTable: boolean; + } + + /** + * is a table of text cells which is anchored to a surrounding text. + * + * Note: The anchor of the actual implementation for text tables does not have a position in the text. Thus that anchor can not be used for some + * operation like {@link XTextContent.attach()} or {@link XText.insertTextContent()} or other function that require the object to have a position in the + * text. + * + * The reason why a text table still needs an anchor is that for example tables should be insertable via {@link XText.insertTextContent()} and that + * interface uses a parameter of that type. + * + * Example: Create and insert a {@link TextTable} : + * + * {{program example here, see documentation}} + * @see com.sun.star.text.Cell + * @see com.sun.star.text.CellRange + * @see com.sun.star.text.TableColumns + * @see com.sun.star.text.TableRows + * @see com.sun.star.text.TextTableCursor + */ + interface TextTable extends TextContent, xml.UserDefinedAttributesSupplier, XTextTable, container.XNamed, table.XCellRange, chart.XChartDataArray, + table.XAutoFormattable, util.XSortable, sheet.XCellRangeData { + /** contains the color of the background. */ + BackColor: util.Color; + + /** contains the name of the file filter for the background graphic. */ + BackGraphicFilter: string; + + /** + * determines the position of the background graphic. + * @see GraphicLocation + */ + BackGraphicLocation: style.GraphicLocation; + + /** contains the URL for the background graphic. */ + BackGraphicURL: string; + + /** determines if the background color is transparent. */ + BackTransparent: boolean; + + /** determines the bottom margin. */ + BottomMargin: number; + + /** + * determines the type of break that is applied at the beginning of the table. + * @see com.sun.star.style.BreakType + */ + BreakType: style.BreakType; + + /** determines if the first column of the table should be treated as axis labels when a chart is to be created. */ + ChartColumnAsLabel: boolean; + + /** determines if the first row of the table should be treated as axis labels when a chart is to be created. */ + ChartRowAsLabel: boolean; + + /** determines whether borders of neighboring table cells are collapsed into one */ + CollapsingBorders: boolean; + + /** determines the number of rows of the table repeated on every new page. */ + HeaderRowCount: number; + + /** + * contains the horizontal orientation. + * @see com.sun.star.text.HoriOrientation + */ + HoriOrient: number; + + /** determines if the value of the relative width is valid. */ + IsWidthRelative: boolean; + + /** Setting this property to TRUE prevents page or column breaks between this table and the following paragraph or text table. */ + KeepTogether: boolean; + + /** contains the left margin of the table. */ + LeftMargin: number; + + /** If this property is set, it creates a page break before the table and assigns the value as the name of the new page style sheet to use. */ + PageDescName: string; + + /** If a page break property is set at the table, this property contains the new value for the page number. */ + PageNumberOffset: number; + + /** determines the width of the table relative to its environment. */ + RelativeWidth: number; + + /** determines if the first row of the table is repeated on every new page. */ + RepeatHeadline: boolean; + + /** contains the right margin of the table. */ + RightMargin: number; + + /** + * determines the type, color and size of the shadow. + * @see com.sun.star.table.ShadowFormat + */ + ShadowFormat: table.ShadowFormat; + + /** Setting this property to FALSE prevents the table from getting spread on two pages. */ + Split: boolean; + + /** + * contains the description of the table borders. + * @see com.sun.star.table.TableBorder + */ + TableBorder: table.TableBorder; + + /** contains the sum of the column width values used in TableColumnSeparators. */ + TableColumnRelativeSum: number; + + /** + * contains the column description of the table. + * @see com.sun.star.text.TableColumnSeparator + */ + TableColumnSeparators: SafeArray; + + /** + * Grab bag of table properties, used as a string-any map for interim interop purposes. + * @since LibreOffice 4.3 This property is intentionally not handled by the ODF filter. Any member that should be handled there should be first moved out + */ + TableInteropGrabBag: SafeArray; + + /** + * contains the name of table style used by the table. + * @since LibreOffice 5.3 + */ + TableTemplateName: string; + + /** determines the top margin. */ + TopMargin: number; + + /** + * contains the absolute table width. + * + * As this is only a describing property the value of the actual table may vary depending on the environment the table is located in and the settings of + * LeftMargin, RightMargin and HoriOrient. + */ + Width: number; + } + + /** + * specifies a cursor in text tables. + * + * This cursor can be used to: + * + * travel through text table cellsselect text table cellsget property values from the selected cellsset property values in the selected cells + * @see com.sun.star.text.TextTable + */ + interface TextTableCursor extends XTextTableCursor, beans.XPropertySet, style.CharacterProperties, style.CharacterPropertiesAsian, + style.CharacterPropertiesComplex, style.ParagraphProperties, xml.UserDefinedAttributesSupplier { } + + /** + * specifies the properties of a text table row. + * @see com.sun.star.TextTable + */ + interface TextTableRow extends beans.XPropertySet { + /** specifies the color of the background. */ + BackColor: util.Color; + + /** contains the name of the file filter of a background graphic. */ + BackGraphicFilter: string; + + /** + * determines the position of the background graphic. + * @see GraphicLocation + */ + BackGraphicLocation: style.GraphicLocation; + + /** contains the URL of a background graphic. */ + BackGraphicURL: string; + + /** If `TRUE` , the background color value in "BackColor" is not visible. */ + BackTransparent: boolean; + + /** contains the height of the table row. */ + Height: number; + + /** If the value of this property is `TRUE` , the height of the table row depends on the content of the table cells. */ + IsAutoHeight: boolean; + + /** + * If `TRUE` , the row is allowed to be split at page or column breaks. + * @@since OOo 2.0 + */ + IsSplitAllowed: boolean; + + /** + * Grab bag of row properties, used as a string-any map for interop purposes. + * @since LibreOffice 4.4 This property is intentionally not handled by the ODF filter. Any member that should be handled there should be first moved out + */ + RowInteropGrabBag: SafeArray; + + /** contains the description of the columns in the table row. */ + TableColumnSeparators: SafeArray; + } + + /** provides access to all tables in a document. */ + interface TextTables extends container.XIndexAccess, container.XNameAccess { } + + /** + * A {@link TextViewCursor} is a {@link TextRange} which can travel within a view of a {@link Text} object. + * @see TextDocumentView + */ + interface TextViewCursor extends TextLayoutCursor, view.XScreenCursor { } + + /** + * specifies service of user defined indexes within a document. + * @see com.sun.star.text.BaseIndex + */ + interface UserDefinedIndex extends BaseIndex { + /** determines if embedded objects are included in the index. */ + CreateFromEmbeddedObjects: boolean; + + /** determines if graphic objects are included in the index. */ + CreateFromGraphicObjects: boolean; + + /** determines if the document index marks are included in this index. */ + CreateFromMarks: boolean; + + /** determines if tables are included in the index. */ + CreateFromTables: boolean; + + /** determines if text frames are included in the index. */ + CreateFromTextFrames: boolean; + + /** contains all index marks that are related to this index. */ + DocumentIndexMarks: SafeArray; + + /** + * contains the interface to access the paragraph style names that are included in this index. + * @see DocumentIndexParagraphStyles + */ + LevelParagraphStyles: container.XIndexReplace; + + /** determines if the outline level of the location of the indexed object is used as index level of the index entry. */ + UseLevelFromSource: boolean; + } + + /** + * specifies service of user defined indexes within a document. + * @see com.sun.star.text.BaseIndex + */ + interface UserIndex extends BaseIndex { + /** determines if embedded objects are included in the index. */ + CreateFromEmbeddedObjects: boolean; + + /** determines if graphic objects are included in the index. */ + CreateFromGraphicObjects: boolean; + + /** determines if the document index marks are included in this index. */ + CreateFromMarks: boolean; + + /** determines if tables are included in the index. */ + CreateFromTables: boolean; + + /** determines if text frames are included in the index. */ + CreateFromTextFrames: boolean; + + /** + * contains the interface to access the paragraph style names that are included in this index. + * @see DocumentIndexParagraphStyles + */ + LevelParagraphStyles: container.XIndexReplace; + + /** determines if the outline level of the location of the indexed object is used as index level of the index entry. */ + UseLevelFromSource: boolean; + + /** contains the name of the user index. */ + UserIndexName: string; + } + + /** is a {@link TextRange} which is explicitly marked as an index entry for a {@link UserIndex} . */ + interface UserIndexMark extends TextContent, BaseIndexMark { + /** contains the name of the user index it belongs to. */ + UserIndexName: string; + } + + /** + * describes the vertical orientation of an object. + * + * If `VerticalOrientation == VERT_NONE` , then the value "YPos" describes the distance from the top of the context. Otherwise "YPos" is ignored. + */ + interface VertOrientationFormat { + /** determines the vertical alignment of an object. The values refer to com::sun::star::VertOrientation. */ + VerticalOrientation: number; + + /** + * determines the reference position of the vertical alignment. + * @see com.sun.star.text.RelOrientation + */ + VerticalRelation: number; + + /** contains the distance from top. Only valid if the property VerticalOrientation contains the value VERT_NONE. */ + YPos: number; + } + + /** provides access to the settings of the controller of a text document. */ + interface ViewSettings extends beans.XPropertySet { + /** + * If this property is `TRUE` , whitespaces around pages are hidden. + * @since LibreOffice 5.1 + */ + HideWhitespace: boolean; + + /** + * metric unit of the horizontal ruler + * + * Uses values {@link com.sun.star.awt.FieldUnit} + * @since OOo 3.1 + */ + HorizontalRulerMetric: number; + + /** If this property is `TRUE` hyperlinks in the document are executed (loaded) on mouse click. Otherwise they are handled like normal text. */ + IsExecuteHyperlinks: boolean; + + /** + * Specifies whether to display the grid or not + * @since OOo 2.0 + */ + IsRasterVisible: boolean; + + /** + * Specifies whether to move frames, drawing elements, and form functions only between grid points. + * @since OOo 2.0 + */ + IsSnapToRaster: boolean; + + /** If this property is `TRUE` , the vertical ruler is aligned to the right side of the view and the vertical scrollbar is on the left. */ + IsVertRulerRightAligned: boolean; + + /** + * Defines the unit of measure for the spacing between grid points on the X-axis. + * + * The value must be greater than 0. The application may enforce more restricting bounds for the value. + * @since OOo 2.0 + * @throws com::sun::star::lang::IllegalArgumentException if the value is out of bounds. + */ + RasterResolutionX: number; + + /** + * Defines the unit of measure for the spacing between grid points on the Y-axis. + * + * The value must be greater than 0. The application may enforce more restricting bounds for the value. + * @since OOo 2.0 + * @throws com::sun::star::lang::IllegalArgumentException if the value is out of bounds. + */ + RasterResolutionY: number; + + /** + * Specifies the number of intervals between grid points on the X-axis. + * + * The value must be greater or equal to 0, and the application may enforce an upper bound for the value. + * @since OOo 2.0 + * @throws com::sun::star::lang::IllegalArgumentException if the value is out of bounds. + */ + RasterSubdivisionX: number; + + /** + * Specifies the number of intervals between grid points on the Y-axis. + * + * The value must be greater or equal to 0, and the application may enforce an upper bound for the value. + * @since OOo 2.0 + * @throws com::sun::star::lang::IllegalArgumentException if the value is out of bounds. + */ + RasterSubdivisionY: number; + + /** If this property is `TRUE` , annotations (notes) are visible. */ + ShowAnnotations: boolean; + + /** If this property is `TRUE` , paragraph line breaks are visible. */ + ShowBreaks: boolean; + + /** + * If this property is `TRUE` , tips for document content are shown, typically in a help balloon when the mouse is over the content. + * @since LibreOffice 4.1 + */ + ShowContentTips: boolean; + + /** If this property is `TRUE` , shapes are visible. */ + ShowDrawings: boolean; + + /** If this property is `TRUE` , text fields are shown with their commands; otherwise the content is visible. */ + ShowFieldCommands: boolean; + + /** If this property is `TRUE` , footnotes symbols are displayed with gray background. */ + ShowFootnoteBackground: boolean; + + /** If this property is `TRUE` , graphic objects are visible. */ + ShowGraphics: boolean; + + /** + * If this property is `TRUE` , hidden characters are displayed + * @since OOo 3.0 + */ + ShowHiddenCharacters: boolean; + + /** If this property is `TRUE` , hidden paragraphs are displayed. */ + ShowHiddenParagraphs: boolean; + + /** If this property is `TRUE` , hidden text is displayed. */ + ShowHiddenText: boolean; + + /** If this property is `TRUE` and the property ShowRulers is `TRUE` , the horizontal ruler is displayed. */ + ShowHoriRuler: boolean; + + /** If this property is `TRUE` and the property ShowRulers is `TRUE` , the horizontal scroll bar is displayed. */ + ShowHoriScrollBar: boolean; + + /** If this property is `TRUE` , index marks are displayed with gray background. */ + ShowIndexMarkBackground: boolean; + + /** + * If this property is `TRUE` , the settings of non-printing characters are applied. + * + * This option controls the use of the settings ShowHiddenCharacters, ShowTabstops, ShowSpaces, ShowBreaks and ShowParaBreaks + * @since OOo 3.0 + */ + ShowNonprintingCharacters: boolean; + + /** If this property is `TRUE` the document will be displayed as if it were a HTML document. */ + ShowOnlineLayout: boolean; + + /** If this property is `TRUE` , paragraph breaks are visible. */ + ShowParaBreaks: boolean; + + /** If this property is `TRUE` , protected spaces (hard spaces) are displayed with gray background. */ + ShowProtectedSpaces: boolean; + + /** ShowHoriRuler and ShowVertRuler determine whether a ruler is visible. */ + ShowRulers: boolean; + + /** + * If this property is `TRUE` , and the scroll bar is shown, a tool tip is displayed while scrolling. + * @since LibreOffice 4.2 + */ + ShowScrollBarTips: boolean; + + /** If this property is `TRUE` , soft hyphens are displayed with gray background. */ + ShowSoftHyphens: boolean; + + /** If this property is `TRUE` , spaces are displayed with dots. */ + ShowSpaces: boolean; + + /** If this property is `TRUE` , table boundaries are displayed. */ + ShowTableBoundaries: boolean; + + /** If this property is `TRUE` , tables are visible. */ + ShowTables: boolean; + + /** If this property is `TRUE` , tab stops are visible. */ + ShowTabstops: boolean; + + /** If this property is `TRUE` , text boundaries are displayed. */ + ShowTextBoundaries: boolean; + + /** If this property is `TRUE` , text fields are displayed with gray background. */ + ShowTextFieldBackground: boolean; + + /** If this property is `TRUE` , the vertical ruler is displayed. */ + ShowVertRuler: boolean; + + /** If this property is `TRUE` , the vertical scroll bar is displayed. */ + ShowVertScrollBar: boolean; + + /** If this property is `TRUE` , smooth scrolling is active. */ + SmoothScrolling: boolean; + + /** + * metric unit of the vertical ruler + * + * Uses values from {@link com.sun.star.awt.FieldUnit} + * @since OOo 3.1 + */ + VerticalRulerMetric: number; + + /** + * This property defines the zoom type for the document. + * @see com.sun.star.view.DocumentZoomType + */ + ZoomType: number; + + /** Defines the zoom value to use. Valid only if the ZoomType is set to {@link com.sun.star.view.DocumentZoomType.BY_VALUE} . */ + ZoomValue: number; + } + + /** + * handles blocks of {@link AutoTextEntry} . + * @see AutoTextContainer + */ + interface XAutoTextContainer extends container.XNameAccess { + /** + * creates a new AutoText group. + * @param aGroupName the name of the {@link AutoTextContainer} The name must follow the pattern `groupname*pathid` , where: `groupname` should contain on + */ + insertNewByName(aGroupName: string): XAutoTextGroup; + + /** + * deletes the specified AutoText group. + * @param aGroupName see the documentation for {@link XAutoTextContainer.insertNewByName()} + */ + removeByName(aGroupName: string): void; + } + + /** @since LibreOffice 4.1 */ + interface XAutoTextContainer2 extends XAutoTextContainer, container.XIndexAccess { } + + /** + * identifies an autotext entry. + * @deprecated Deprecated + */ + interface XAutoTextEntry extends uno.XInterface { + /** inserts the contents represented by this auto text entry at the specified text range. */ + applyTo(xRange: XTextRange): void; + } + + /** The interface provide methods to insert, rename and delete autotext entries from the current autotext group. */ + interface XAutoTextGroup extends container.XNameAccess { + /** returns the titles of all autotext entries. The order of the entries corresponds to the output of the function {@link getElementNames()} . */ + getTitles(): SafeArray; + + /** creates a new {@link AutoTextEntry} entry. */ + insertNewByName(aName: string, aTitle: string, xTextRange: XTextRange): XAutoTextEntry; + + /** removes the specified autotext entry. */ + removeByName(aEntryName: string): void; + + /** + * renames an entry in the autotext group. + * + * The position of the autotext entry is not changed. + */ + renameByName(aElementName: string, aNewElementName: string, aNewElementTitle: string): void; + + /** returns the titles of all autotext entries. The order of the entries corresponds to the output of the function {@link getElementNames()} . */ + readonly Titles: SafeArray; + } + + /** + * offers an easy way to insert bookmarks by name. + * @see Text + */ + interface XBookmarkInsertTool extends uno.XInterface { + /** inserts a bookmark at the specified text position. */ + insertNewBookmark(xTextRange: XTextRange, aName: string): XTextContent; + } + + /** provides access to the collection of all bookmarks within this text container. */ + interface XBookmarksSupplier extends uno.XInterface { + /** @returns the collection of all {@link Bookmark} instances which are within this context and which support the {@link Bookmarks} service. */ + readonly Bookmarks: container.XNameAccess; + + /** @returns the collection of all {@link Bookmark} instances which are within this context and which support the {@link Bookmarks} service. */ + getBookmarks(): container.XNameAccess; + } + + /** contains the settings of the chapter numbering in a text document. */ + interface XChapterNumberingSupplier extends uno.XInterface { + /** @returns the collection of numbering rules for this document. This interface allows access to the properties of the numbering level via a sequence of {@l */ + readonly ChapterNumberingRules: container.XIndexReplace; + + /** @returns the collection of numbering rules for this document. This interface allows access to the properties of the numbering level via a sequence of {@l */ + getChapterNumberingRules(): container.XIndexReplace; + } + + /** + * provides access to default {@link com.sun.star.text.NumberingRules} according to a given locale information. + * @author Oliver Specht + * @see com.sun.star.text.NumberingRules + * @see com.sun.star.lang.Locale + * @version 1.0 + */ + interface XDefaultNumberingProvider extends uno.XInterface { + /** + * provides access to outline numberings according to a given {@link com.sun.star.lang.Locale} . + * + * In contrast to outline numberings the continuous numberings consist of level using the equal settings in all numbering levels. + * @see com.sun.star.text.NumberingLevel + * @see com.sun.star.lang.Locale + */ + getDefaultContinuousNumberingLevels(aLocale: lang.Locale): SafeArray; + + /** + * provides access to outline numberings according to a given {@link com.sun.star.lang.Locale} . + * + * Outline numberings usually consist of levels with different settings. + * @see com.sun.star.text.NumberingLevel + */ + getDefaultOutlineNumberings(aLocale: lang.Locale): SafeArray; + } + + /** makes it possible to attach this {@link TextField} to a {@link TextFieldMaster} . */ + interface XDependentTextField extends XTextField { + /** + * method must be called to attach the {@link TextFieldMaster} to this {@link TextField} . + * + * A {@link TextFieldMaster} can only be assigned once. + * + * Example: Create and insert a user field (with a `UserField` ): + * + * {{program example here, see documentation}} + */ + attachTextFieldMaster(xFieldMaster: beans.XPropertySet): void; + + /** @returns the previously attached {@link TextFieldMaster} */ + getTextFieldMaster(): beans.XPropertySet; + + /** @returns the previously attached {@link TextFieldMaster} */ + readonly TextFieldMaster: beans.XPropertySet; + } + + /** + * This is the main interface for a document index. + * + * Use {@link com.sun.star.util.XRefreshable} and {@link com.sun.star.lang.XServiceInfo} instead, if available. + * @deprecated Deprecated + * @see com.sun.star.util.XRefreshable + * @see com.sun.star.lang.XServiceInfo + */ + interface XDocumentIndex extends XTextContent { + /** returns the service name that was used to create this document index type. */ + getServiceName(): string; + + /** returns the service name that was used to create this document index type. */ + readonly ServiceName: string; + + /** initiates an update to the document index. */ + update(): void; + } + + /** + * gives access to the collection of document indexes. + * + * In general this interface is supported by a {@link TextDocument} . + */ + interface XDocumentIndexesSupplier extends uno.XInterface { + /** @returns the collection of "DocumentIndexes" currently contained in the object. */ + readonly DocumentIndexes: container.XIndexAccess; + + /** @returns the collection of "DocumentIndexes" currently contained in the object. */ + getDocumentIndexes(): container.XIndexAccess; + } + + /** + * gives access to the mark of a document index entry. + * @see DocumentIndexMark + */ + interface XDocumentIndexMark extends XTextContent { + /** + * @returns the explicitly set string for the index mark. + * @see setMarkEntry + */ + getMarkEntry(): string; + + /** + * @returns the explicitly set string for the index mark. + * @see setMarkEntry + */ + MarkEntry: string; + + /** + * sets an explicit string for this index mark to use in the index. + * + * If empty, the string of the {@link TextRange} to which the {@link TextContent} refers is used in the index. + */ + setMarkEntry(aIndexEntry: string): void; + } + + /** makes it possible to access the {@link FootnoteSettings} within the context (e.g. document). */ + interface XEndnotesSettingsSupplier extends uno.XInterface { + /** @returns {@link EndnoteSettings} of the object. */ + readonly EndnotesSettings: beans.XPropertySet; + + /** @returns {@link EndnoteSettings} of the object. */ + getEndnotesSettings(): beans.XPropertySet; + } + + /** makes it possible to access the endnotes within the context (e.g. document). */ + interface XEndnotesSupplier extends uno.XInterface { + /** @returns a collection of endnotes. */ + readonly Endnotes: container.XIndexAccess; + + /** @returns the endnote settings of the document. */ + readonly EndnoteSettings: beans.XPropertySet; + + /** @returns a collection of endnotes. */ + getEndnotes(): container.XIndexAccess; + + /** @returns the endnote settings of the document. */ + getEndnoteSettings(): beans.XPropertySet; + } + + /** + * provides functionality to ... + * @since OOo 3.0 + */ + interface XFlatParagraph extends XTextMarkup { + /** + * replace the attributes of the specific text with the given set of attributes. + * @param nPos start index of the text. + * @param nLen the length of the text. + * @param aAttributes the given set of attributes e.g. Language. + * @throws IllegalArgumentException when any argument is wrong. + */ + changeAttributes(nPos: number, nLen: number, aAttributes: LibreOffice.SeqEquiv): void; + + /** + * replace the specific text with new text. + * @param nPos start index of the text. + * @param nLen the length of the text. + * @param NewText new text. + * @param aAttributes the given set of attributes e.g. Language + * @throws IllegalArgumentException when any argument is wrong. + */ + changeText(nPos: number, nLen: number, NewText: string, aAttributes: LibreOffice.SeqEquiv): void; + + /** + * get the language of the specific text + * @param nPos start index of the text. + * @param nLen the length of the text. + * @returns the locale for the language identified. If no language could be identified, the locale will be empty. + * @throws IllegalArgumentException when any argument is wrong. + */ + getLanguageOfText(nPos: number, nLen: number): lang.Locale; + + /** + * get a list of indexes that separate each two different languages + * @returns a list of indices. + */ + getLanguagePortions(): SafeArray; + + /** + * get the single most probable language of the specific text, especially after getLanguageOfText fails + * @param nPos start index of the text. + * @param nLen the length of the text. + * @returns the locale for the language identified. + * @throws IllegalArgumentException when any argument is wrong. + */ + getPrimaryLanguageOfText(nPos: number, nLen: number): lang.Locale; + + /** + * get the content of the paragraph + * @returns the content of the paragraph. + */ + getText(): string; + + /** + * returns whether the respective text node has already been processed + * @param nType type, see {@link TextMarkupType} . + * @returns `TRUE` if the respective text node has been checked `FALSE` otherwise. + */ + isChecked(nType: number): boolean; + + /** + * check whether the content has been modified + * @returns `TRUE` if the content has been modified, `FALSE` otherwise. + */ + isModified(): boolean; + + /** + * get a list of indexes that separate each two different languages + * @returns a list of indices. + */ + readonly LanguagePortions: SafeArray; + + /** + * change the "checked" flag of the respective text node, i.e., mark the text node as "processed" + * @param nType type, see {@link TextMarkupType} . + * @param bVal `TRUE` the respective text node has been processed `FALSE` the respective text node needs to be processed again later + */ + setChecked(nType: number, bVal: boolean): void; + + /** + * get the content of the paragraph + * @returns the content of the paragraph. + */ + readonly Text: string; + } + + /** + * provides functionality to ... + * @since OOo 3.0 + */ + interface XFlatParagraphIterator extends uno.XInterface { + /** + * get the first flat paragraph to be checked or an empty reference if there are no more paragraphs to check. + * @returns the paragraph. + */ + readonly FirstPara: XFlatParagraph; + + /** + * get the first flat paragraph to be checked or an empty reference if there are no more paragraphs to check. + * @returns the paragraph. + */ + getFirstPara(): XFlatParagraph; + + /** + * get the last flat paragraph + * @returns the paragraph. + */ + getLastPara(): XFlatParagraph; + + /** + * get the next flat paragraph to be checked or an empty reference if there are no more paragraphs to check. + * @returns the paragraph. + */ + getNextPara(): XFlatParagraph; + + /** + * get the flat paragraph just following this one + * @param xPara the current flat paragraph + * @returns the flat paragraph. + * @throws IllegalArgumentException if any argument is wrong. + */ + getParaAfter(xPara: XFlatParagraph): XFlatParagraph; + + /** + * get the flat paragraph before this one + * @param xPara the current flat paragraph + * @returns the flat paragraph. + * @throws IllegalArgumentException if any argument is wrong. + */ + getParaBefore(xPara: XFlatParagraph): XFlatParagraph; + + /** + * get the last flat paragraph + * @returns the paragraph. + */ + readonly LastPara: XFlatParagraph; + + /** + * get the next flat paragraph to be checked or an empty reference if there are no more paragraphs to check. + * @returns the paragraph. + */ + readonly NextPara: XFlatParagraph; + } + + /** + * provides functionality to ... + * @since OOo 3.0 + */ + interface XFlatParagraphIteratorProvider extends uno.XInterface { + /** + * get {@link XFlatParagraphIterator} + * @param nType Type of text markup see {@link TextMarkupType} . + * @param bAutomatic Automatic or interactive checking. + * @returns the iterator. + * @throws IllegalArgumentException if any argument is wrong. + */ + getFlatParagraphIterator(nType: number, bAutomatic: boolean): XFlatParagraphIterator; + } + + /** + * specifies a footnote within a {@link Text} . + * @see Footnote + */ + interface XFootnote extends XTextContent { + /** + * @returns the label of the footnote. + * @see XFootnote.setLabel + */ + getLabel(): string; + + /** + * @returns the label of the footnote. + * @see XFootnote.setLabel + */ + Label: string; + + /** sets the label of the footnote. */ + setLabel(aLabel: string): void; + } + + /** makes it possible to access the {@link FootnoteSettings} with the context (e.g. document). */ + interface XFootnotesSettingsSupplier extends uno.XInterface { + /** @returns {@link FootnoteSettings} of the object. */ + readonly FootnotesSettings: beans.XPropertySet; + + /** @returns {@link FootnoteSettings} of the object. */ + getFootnotesSettings(): beans.XPropertySet; + } + + /** makes it possible to access the footnotes within the context (e.g. document). */ + interface XFootnotesSupplier extends uno.XInterface { + /** returns a collection of footnotes. */ + readonly Footnotes: container.XIndexAccess; + + /** @returns the footnotes settings of the document. */ + readonly FootnoteSettings: beans.XPropertySet; + + /** returns a collection of footnotes. */ + getFootnotes(): container.XIndexAccess; + + /** @returns the footnotes settings of the document. */ + getFootnoteSettings(): beans.XPropertySet; + } + + /** @deprecated Deprecated */ + interface XFormField extends uno.XInterface { + FieldType: string; + getFieldType(): string; + getParameters(): container.XNameContainer; + readonly Parameters: container.XNameContainer; + setFieldType(fieldType: string): void; + } + + /** contains the settings of the line numbering in a text document. */ + interface XLineNumberingProperties extends uno.XInterface { + /** @returns the {@link LineNumberingProperties} of the object. */ + getLineNumberingProperties(): beans.XPropertySet; + + /** @returns the {@link LineNumberingProperties} of the object. */ + readonly LineNumberingProperties: beans.XPropertySet; + } + + /** + * allows for adding/removing of mail merge event listeners. + * + * Registered listeners will be notified with a {@link com.sun.star.text.MailMergeEvent} when a document is about to get merged. + * @see com.sun.star.text.MailMergeEvent + * @see com.sun.star.text.MailMerge + * @since OOo 1.1.2 + */ + interface XMailMergeBroadcaster extends uno.XInterface { + /** + * Adds an entry to the list of mail merge listeners. + * @param xListener The listener to be added. + */ + addMailMergeEventListener(xListener: XMailMergeListener): void; + + /** + * Removes an entry to the list of mail merge listeners. + * @param xListener The listener to be removed. + */ + removeMailMergeEventListener(xListener: XMailMergeListener): void; + } + + /** + * used to notify listeners about mail merge events. + * + * Registered listeners will be notified with a {@link com.sun.star.text.MailMergeEvent} when a document is about to get merged. + * @see com.sun.star.text.MailMerge + * @see com.sun.star.text.MailMergeEvent + * @since OOo 1.1.2 + */ + interface XMailMergeListener extends uno.XInterface { + /** + * Notifies the listener about mail merge events. + * @param aEvent The Event containing the model of the document to be merged that is send to the listener. + */ + notifyMailMergeEvent(aEvent: MailMergeEvent): void; + } + + /** extends a text range by method to modify its position. */ + interface XMarkingAccess { + invalidateMarkings(nType: number): void; + } + + /** + * provides functionality to apply multiple text markups in one call. + * @since OOo 3.0.1 + */ + interface XMultiTextMarkup { + /** + * submits multiple new markup ranges. + * + * The main use of this function will probably be for proofreading to allow for setting the markup of all found errors in a sentence in a single call. + * For this the sequence needs to provide the markups for all errors along with the markup for the identified sentence boundaries. The order of those + * entries is arbitrary. + * @param aMarkups a sequence of single text markups. + * @see com.sun.star.text.XTextMarkup + * @see com.sun.star.text.TextMarkupType + */ + commitMultiTextMarkup(aMarkups: LibreOffice.SeqEquiv): void; + } + + /** + * supports the formatting of numberings in various language environments. + * @author Oliver Specht + * @see com.sun.star.text.NumberingRules + * @see com.sun.star.text.NumberingLevel + * @version 1.0 + */ + interface XNumberingFormatter extends uno.XInterface { + /** @returns the formatted numbering string according to the given {@link com.sun.star.text.NumberingLevel} and the given {@link com.sun.star.lang.Locale} . */ + makeNumberingString(aProperties: LibreOffice.SeqEquiv, aLocale: lang.Locale): string; + } + + /** + * This interface enables the object to handle numbering rules. + * @see com.sun.star.text.NumberingRules + */ + interface XNumberingRulesSupplier extends uno.XInterface { + /** @returns the collection of "NumberingRules" currently contained in the object. */ + getNumberingRules(): container.XIndexAccess; + + /** @returns the collection of "NumberingRules" currently contained in the object. */ + readonly NumberingRules: container.XIndexAccess; + } + + /** + * provides access to the numbering types that are supported by a component. + * + * To be able to store unknown numbering types in a file format the numbering types correspond to an identifier. + * @author Oliver Specht + * @see com.sun.star.text.NumberingRules + * @see com.sun.star.style.NumberingType + * @version 1.0 + */ + interface XNumberingTypeInfo extends uno.XInterface { + /** returns the corresponding identifier to a numbering type. */ + getNumberingIdentifier(NumberingType: number): string; + + /** returns the corresponding numbering type to an identifier. */ + getNumberingType(NumberingIdentifier: string): number; + + /** + * returns the numbering type values that are supported by the component. + * @see + */ + getSupportedNumberingTypes(): SafeArray; + + /** determines whether an identifier is supported. */ + hasNumberingType(NumberingIdentifier: string): boolean; + + /** + * returns the numbering type values that are supported by the component. + * @see + */ + readonly SupportedNumberingTypes: SafeArray; + } + + /** makes it possible to perform cursor movements between pages. */ + interface XPageCursor extends uno.XInterface { + /** @returns the number of the page within the document of this cursor. */ + getPage(): number; + + /** + * moves the cursor to the end of the current page. + * @see XPageCursor.jumpToEndOfPreviousPage + */ + jumpToEndOfPage(): boolean; + + /** moves the cursor to the first page. */ + jumpToFirstPage(): boolean; + + /** moves the cursor to the last page. */ + jumpToLastPage(): boolean; + + /** + * moves the cursor to the next page. + * @see XPageCursor.jumpToPreviousPage + */ + jumpToNextPage(): boolean; + + /** moves the cursor to the specified page. */ + jumpToPage(nPage: number): boolean; + + /** + * moves the cursor to the previous page. + * @see XPageCursor.jumpToNextPage + */ + jumpToPreviousPage(): boolean; + + /** moves the cursor to the start of the current page. */ + jumpToStartOfPage(): boolean; + + /** @returns the number of the page within the document of this cursor. */ + readonly Page: number; + } + + /** Print several pages on one printer page. */ + interface XPagePrintable extends uno.XInterface { + /** @returns the settings of printing of pages. These settings contains: short PageRows - number of rows of pages printed to one page short PageColumns - */ + getPagePrintSettings(): SafeArray; + + /** @returns the settings of printing of pages. These settings contains: short PageRows - number of rows of pages printed to one page short PageColumns - */ + PagePrintSettings: SafeArray; + + /** + * prints the pages according to the {@link PagePrintSettings} . + * @see com.sun.star.view.PrintOptions + */ + printPages(xOptions: LibreOffice.SeqEquiv): void; + + /** + * adjusts the settings of the page printing. + * @see getPagePrintSettings + */ + setPagePrintSettings(aSettings: LibreOffice.SeqEquiv): void; + } + + /** allows inserting and appending paragraphs. */ + interface XParagraphAppend extends uno.XInterface { + /** + * appends a new and empty paragraph at the end of the text. + * + * The properties are applied to the last paragraph before the new paragraph is inserted. + * @param CharacterAndParagraphProperties can contain all the properties defined by the service {@link Paragraph} . + */ + finishParagraph(CharacterAndParagraphProperties: beans.PropertyValues): XTextRange; + + /** + * inserts a new and empty paragraph to the text at a given position. + * + * The properties are applied to the last paragraph before the new paragraph is inserted. + * @param CharacterAndParagraphProperties can contain all the properties defined by the service {@link Paragraph} . + * @param TextRange specifies the position of the insertion. + * @since LibreOffice 4.0 + */ + finishParagraphInsert(CharacterAndParagraphProperties: beans.PropertyValues, TextRange: XTextRange): XTextRange; + } + + /** makes it possible to move paragraph by paragraph. */ + interface XParagraphCursor extends XTextCursor { + /** + * moves the cursor to the end of the current paragraph. + * @returns `TRUE` if the cursor is now at the end of a paragraph, `FALSE` otherwise. If `FALSE` was returned the cursor will remain at its original position. + */ + gotoEndOfParagraph(bExpand: boolean): boolean; + + /** + * moves the cursor to the next paragraph. + * @returns `TRUE` if the cursor was moved. It returns `FALSE` it the cursor can not advance further. + */ + gotoNextParagraph(bExpand: boolean): boolean; + + /** + * moves the cursor to the previous paragraph. + * @returns `TRUE` if the cursor was moved. It returns `FALSE` it the cursor can not advance further. + */ + gotoPreviousParagraph(bExpand: boolean): boolean; + + /** + * moves the cursor to the start of the current paragraph. + * @returns `TRUE` if the cursor is now at the start of a paragraph, `FALSE` otherwise. If `FALSE` was returned the cursor will remain at its original position. + */ + gotoStartOfParagraph(bExpand: boolean): boolean; + + /** determines if the cursor is positioned at the end of a paragraph. */ + isEndOfParagraph(): boolean; + + /** determines if the cursor is positioned at the start of a paragraph. */ + isStartOfParagraph(): boolean; + } + + /** enables creation of redlines (change tracking). */ + interface XRedline { + /** + * @param RedlineType Valid type names are: Insert - marks an insertion Delete - marks an deletion Format - marks an attribute change {@link T + * @param RedlineProperties contains the following parameters [readonly, property] string RedlineAuthor; [readonly, property] {@link com.sun.star.util.Date + */ + makeRedline(RedlineType: string, RedlineProperties: beans.PropertyValues): void; + } + + /** + * provides access to the reference marks within this context (i.e. document). + * + * A reference mark is used to refer to text positions in a text document. + */ + interface XReferenceMarksSupplier extends uno.XInterface { + /** @returns the collection of reference marks. */ + getReferenceMarks(): container.XNameAccess; + + /** @returns the collection of reference marks. */ + readonly ReferenceMarks: container.XNameAccess; + } + + /** + * makes it possible to insert new text contents before or after existing text contents. + * @deprecated Deprecated + */ + interface XRelativeTextContentInsert extends uno.XInterface { + /** + * inserts text the new text content after the predecessor argument. + * + * This is helpful to insert paragraphs after text tables especially in headers, footers or text frames. + */ + insertTextContentAfter(xNewContent: XTextContent, xPredecessor: XTextContent): void; + + /** + * inserts text the new text content before of the successor argument. + * + * This is helpful to insert paragraphs before of text tables. + */ + insertTextContentBefore(xNewContent: XTextContent, xSuccessor: XTextContent): void; + } + + /** + * makes it possible to remove text contents before or after existing text contents. + * @deprecated Deprecated + */ + interface XRelativeTextContentRemove extends uno.XInterface { + /** + * removes the text content that follows the argument. + * + * This is helpful to remove empty paragraphs following text tables especially in headers, footers or text frames. + */ + removeTextContentAfter(xPredecessor: XTextContent): void; + + /** + * removes the text content that precedes the argument. + * + * This is helpful to remove empty paragraphs before text tables. + */ + removeTextContentBefore(xSuccessor: XTextContent): void; + } + + /** This interface enables the object to handle list of ruby lines (aka Furigana lines). */ + interface XRubySelection extends uno.XInterface { + /** + * returns a sequence of ruby elements. + * + * Each element contains at least a string that contains the selected text and the ruby text. Additional parameters can be the ruby adjustment, the name + * of a character style. + * @param Automatic if Automatic is set the selection is parsed for words and applied ruby attributes + * @returns a sequence of ruby properties + */ + getRubyList(Automatic: boolean): SafeArray; + + /** + * applies the RubyList to the current selection. The number of elements must be equal to the number of elements that are returned by getRubyList. + * Automatic must be set equally, too. + */ + setRubyList(RubyList: LibreOffice.SeqEquiv, Automatic: boolean): void; + } + + /** makes it possible to perform cursor movements through sentences. */ + interface XSentenceCursor extends XTextCursor { + /** + * moves the cursor to the end of the current sentence. + * @returns `TRUE` if the cursor is now at the end of a sentence, `FALSE` otherwise. If `FALSE` was returned the cursor will remain at its original position. + */ + gotoEndOfSentence(Expand: boolean): boolean; + + /** + * moves the cursor to the start of the next sentence. + * @returns `TRUE` if the cursor was moved. It returns `FALSE` it the cursor can not advance further. + */ + gotoNextSentence(Expand: boolean): boolean; + + /** + * moves the cursor to the start of the previous sentence. + * @returns `TRUE` if the cursor was moved. It returns `FALSE` it the cursor can not advance further. + */ + gotoPreviousSentence(Expand: boolean): boolean; + + /** + * moves the cursor to the start of the current sentence. + * @returns `TRUE` if the cursor is now at the start of a sentence, `FALSE` otherwise. If `FALSE` was returned the cursor will remain at its original position. + */ + gotoStartOfSentence(Expand: boolean): boolean; + + /** determines if the cursor is positioned at the end of a sentence. */ + isEndOfSentence(): boolean; + + /** determines if the cursor is positioned at the start of a sentence. */ + isStartOfSentence(): boolean; + } + + /** + * is the main interface for a distinct text unit, i.e. the main text of a document, the text for headers and footers or for single cells of a table. + * @see XText + */ + interface XSimpleText extends XTextRange { + /** + * @returns a new instance of a {@link TextCursor} service which can be used to travel in the given text context. + * @see com.sun.star.text.TextCursor + */ + createTextCursor(): XTextCursor; + + /** + * @param aTextPosition specifies the start position for the new {@link TextCursor} . + * @returns a new instance of a {@link TextCursor} which is located at the specified {@link TextRange} to travel in the given text context. The initial posi + * @see com.sun.star.text.TextCursor + */ + createTextCursorByRange(aTextPosition: XTextRange): XTextCursor; + + /** + * inserts a control character (like a paragraph break or a hard space) into the text. + * @see com.sun.star.text.ControlCharacter + */ + insertControlCharacter(xRange: XTextRange, nControlCharacter: number, bAbsorb: boolean): void; + + /** + * inserts a string of characters into the text. + * + * The string may contain the following white spaces: + * + * blanktabcr (which will insert a paragraph break)lf (which will insert a line break) + * @param xRange specifies the position of insertion. For example, {@link XSimpleText.createTextCursor()} can be used to get an {@link XTextRange} for this + * @param aString specifies the string to insert. + * @param bAbsorb specifies whether the text spanned by **xRange** will be replaced. If `TRUE` then the content of **xRange** will be replaced by **aString + */ + insertString(xRange: XTextRange, aString: string, bAbsorb: boolean): void; + } + + /** extends a {@link XSimpleText} by the capability of inserting XTextContents. */ + interface XText extends XSimpleText { + /** + * inserts a content, such as a text table, text frame or text field. + * + * Which contents are accepted is implementation-specific. Some implementations may only accept contents which were created by the factory that supplied + * the same text or the document which contains the text. + * @param xRange specifies the position of insertion. + * @param xContent the text content to be inserted. + * @param bAbsorb specifies whether the text spanned by **xRange** will be replaced. If `TRUE` then the content of **xRange** will be replaced by **xConten + */ + insertTextContent(xRange: XTextRange, xContent: XTextContent, bAbsorb: boolean): void; + + /** + * removes the specified content from the text object. + * @param xContent the content that is to be removed. + */ + removeTextContent(xContent: XTextContent): void; + } + + /** is a meta-interface for manipulating and inserting text. */ + interface XTextAppend extends XText, XParagraphAppend, XTextPortionAppend { } + + /** merges the functions of {@link XTextAppend} , {@link XTextContentAppend} and {@link XTextConvert} . */ + interface XTextAppendAndConvert extends XTextAppend, XTextContentAppend, XTextConvert { } + + /** + * manages columns within the object. + * + * The values used are relative. So it is not necessary to know the width of the object. The sum of the relative width values depends on the object and + * is defined in "ReferenceValue." + */ + interface XTextColumns extends uno.XInterface { + /** @returns the number of columns. */ + ColumnCount: number; + + /** + * returns the column description of the object. + * @see TextColumn + */ + Columns: SafeArray; + + /** @returns the number of columns. */ + getColumnCount(): number; + + /** + * returns the column description of the object. + * @see TextColumn + */ + getColumns(): SafeArray; + + /** @returns the sum of all values. As described above, the width values are relative. */ + getReferenceValue(): number; + + /** @returns the sum of all values. As described above, the width values are relative. */ + readonly ReferenceValue: number; + + /** + * sets the number of columns. + * + * The minimum is 1 column. + */ + setColumnCount(nColumns: number): void; + + /** + * sets the descriptors of all columns. + * + * The number of members in the sequence must be the same as the number of columns of the object. + * @see TextColumn + */ + setColumns(Columns: LibreOffice.SeqEquiv): void; + } + + /** enables objects to be inserted into a text and to provide their location in a text once they are inserted into it. */ + interface XTextContent extends lang.XComponent { + /** @returns the text range to which the content is attached. Note: The anchor of the actual implementation for text tables does not have a position in the t */ + readonly Anchor: XTextRange; + + /** + * is called when this object gets embedded in a text. + * + * This acts like a multi-phase construction, thus the object may be invalid until it is attached to a text position. Usually this method is called from + * within {@link XText.insertTextContent()} . + * + * Both text objects and text content objects may only be connected to each other if they are created by the same component. When implementing new + * components, this behavior is deprecated. + */ + attach(xTextRange: XTextRange): void; + + /** @returns the text range to which the content is attached. Note: The anchor of the actual implementation for text tables does not have a position in the t */ + getAnchor(): XTextRange; + } + + /** allows inserting and appending text content. */ + interface XTextContentAppend extends uno.XInterface { + /** + * appends a text content at the end of the text.

The sequence can contain all the properties defined by the service + * + * Paragraph. + * @param TextContent contains the object to be inserted. + * @param CharacterAndParagraphProperties can contain all the properties defined by the service {@link Paragraph} . + * @returns the anchor text range of the inserted text content. + */ + appendTextContent(TextContent: XTextContent, CharacterAndParagraphProperties: beans.PropertyValues): XTextRange; + + /** + * inserts a text content at the given position. + * @param TextContent contains the object to be inserted. + * @param CharacterAndParagraphProperties can contain all the properties defined by the service {@link Paragraph} . + * @param TextRange insert position + * @returns the anchor text range of the inserted text content. + * @since LibreOffice 4.0 + */ + insertTextContentWithProperties(TextContent: XTextContent, CharacterAndParagraphProperties: beans.PropertyValues, TextRange: XTextRange): XTextRange; + } + + /** allows converting selections of text to frames or tables. */ + interface XTextConvert extends uno.XInterface { + /** + * converts the paragraphs marked in TableRanges into a table. + * @param TableRanges contains the {@link TextRange} interfaces of the paragraphs, cells and rows of the table. The inner sequence contains the start and e + * @param CellProperties contains the properties of each cell. + * @param RowProperties contains the properties of each table row. + * @param TableProperties contains the properties of the table. + * @returns the created table. + */ + convertToTable( + TableRanges: LibreOffice.SeqEquiv>>, + CellProperties: LibreOffice.SeqEquiv>, RowProperties: LibreOffice.SeqEquiv, + TableProperties: beans.PropertyValues): XTextTable; + + /** + * moves the paragraphs from Start to End into a text frame. + * @param Start start position of frame content + * @param End end position of frame content + * @param FrameProperties contains the properties of the to-be-created text frame + * @returns the newly created text frame + */ + convertToTextFrame(Start: XTextRange, End: XTextRange, FrameProperties: beans.PropertyValues): XTextContent; + } + + /** enables a text object to copy attributed text from another text object. */ + interface XTextCopy extends uno.XInterface { + /** + * copies the content from another text object. + * @param xSource specifies the source text object. + */ + copyText(xSource: XTextCopy): void; + } + + /** extends a text range by method to modify its position. */ + interface XTextCursor extends XTextRange { + /** sets the start of the position to the end. */ + collapseToEnd(): void; + + /** sets the end of the position to the start. */ + collapseToStart(): void; + + /** + * moves the cursor the specified number of characters to the left. + * @param nCount the number of characters to move. + * @param bExpand specifies if the current selection of the cursor should be expanded or not. + * @returns `TRUE` if the command was successfully completed. `FALSE` otherwise. Note: Even if the command was not completed successfully it may be complete + */ + goLeft(nCount: number, bExpand: boolean): boolean; + + /** + * moves the cursor the specified number of characters to the right. + * @param nCount the number of characters to move. + * @param bExpand specifies if the current selection of the cursor should be expanded or not. + * @returns `TRUE` if the command was successfully completed. `FALSE` otherwise. Note: Even if the command was not completed successfully it may be complete + */ + goRight(nCount: number, bExpand: boolean): boolean; + + /** moves the cursor to the end of the text. */ + gotoEnd(bExpand: boolean): void; + + /** moves or expands the cursor to a specified {@link TextRange} . */ + gotoRange(xRange: XTextRange, bExpand: boolean): void; + + /** moves the cursor to the start of the text. */ + gotoStart(bExpand: boolean): void; + + /** determines if the start and end positions are the same. */ + isCollapsed(): boolean; + } + + /** + * is the main interface of a text document. + * @see com.sun.star.text.TextDocument + */ + interface XTextDocument extends frame.XModel { + /** @returns the major {@link com.sun.star.text.Text} of the text document. This text does not contain texts in {@link TextFrames} , or cells of {@link TextT */ + getText(): XText; + + /** reformats the contents of the document. */ + reformat(): void; + + /** @returns the major {@link com.sun.star.text.Text} of the text document. This text does not contain texts in {@link TextFrames} , or cells of {@link TextT */ + readonly Text: XText; + } + + /** provides the collection of all embedded objects within this context (i.e. this document). */ + interface XTextEmbeddedObjectsSupplier extends uno.XInterface { + /** @returns the collection of embedded objects. */ + readonly EmbeddedObjects: container.XNameAccess; + + /** @returns the collection of embedded objects. */ + getEmbeddedObjects(): container.XNameAccess; + } + + /** + * is the base interface for all text fields. + * + * A text field is embedded in text and expands to a sequence of characters. + * @see TextField + */ + interface XTextField extends XTextContent { + /** + * @param bShowCommand if `TRUE` the command of the field will be returned + * @returns the display string of the text field either as the command of the field or as the output string. + */ + getPresentation(bShowCommand: boolean): string; + } + + /** + * makes it possible to access the text fields used in this context (e.g. this document). + * @see com.sun.star.sheet.SpreadsheetDocument + * @see TextDocument + */ + interface XTextFieldsSupplier extends uno.XInterface { + /** @returns the collection of {@link TextFieldMaster} instances which are defined in this context (i.e. this document). */ + getTextFieldMasters(): container.XNameAccess; + + /** @returns the collection of {@link TextField} instances in this context (i.e. this document). */ + getTextFields(): container.XEnumerationAccess; + + /** @returns the collection of {@link TextFieldMaster} instances which are defined in this context (i.e. this document). */ + readonly TextFieldMasters: container.XNameAccess; + + /** @returns the collection of {@link TextField} instances in this context (i.e. this document). */ + readonly TextFields: container.XEnumerationAccess; + } + + /** + * provides access to the {@link Text} of a {@link TextFrame} . + * @see TextFrame + */ + interface XTextFrame extends XTextContent { + /** @returns the text within this frame. The returned interface belongs to an object which implements the service {@link Text} . */ + getText(): XText; + + /** @returns the text within this frame. The returned interface belongs to an object which implements the service {@link Text} . */ + readonly Text: XText; + } + + /** makes it possible to access the {@link TextFrame} instances in this context (e.g. document). */ + interface XTextFramesSupplier extends uno.XInterface { + /** returns a collection of text frames. */ + getTextFrames(): container.XNameAccess; + + /** returns a collection of text frames. */ + readonly TextFrames: container.XNameAccess; + } + + /** provides access to the collection of all embedded and linked graphics within this context (i.e. within this document). */ + interface XTextGraphicObjectsSupplier extends uno.XInterface { + /** @returns the collection of graphic objects in this object (document). */ + getGraphicObjects(): container.XNameAccess; + + /** @returns the collection of graphic objects in this object (document). */ + readonly GraphicObjects: container.XNameAccess; + } + + /** + * provides functionality to markup text. + * @since OOo 2.3 + */ + interface XTextMarkup { + /** + * submits a new markup range. + * @param nType Type of text markup see {@link TextMarkupType} . + * @param aIdentifier A string used to identify the caller. + * @param nStart Start of the markup range. + * @param nLength Length of the markup range. + * @param xMarkupInfoContainer contains additional information about the markup. + */ + commitStringMarkup(nType: number, aIdentifier: string, nStart: number, nLength: number, xMarkupInfoContainer: container.XStringKeyMap): void; + commitTextRangeMarkup(nType: number, aIdentifier: string, xRange: XTextRange, xMarkupInfoContainer: container.XStringKeyMap): void; + + /** + * obtains a container to store additional user defined text markup information. + * @returns a container to store additional user defined text markup information. + */ + getMarkupInfoContainer(): container.XStringKeyMap; + + /** + * obtains a container to store additional user defined text markup information. + * @returns a container to store additional user defined text markup information. + */ + readonly MarkupInfoContainer: container.XStringKeyMap; + } + + /** allows inserting and appending formatted text portions. */ + interface XTextPortionAppend extends uno.XInterface { + /** + * appends a new text portion to the paragraph at the end of the text.

The sequence can contain all the properties defined by the service + * TextPortion. + * @param Text contains the text to be appended. + * @param CharacterAndParagraphProperties can contain all the properties defined by the service {@link Paragraph} . + */ + appendTextPortion(Text: string, CharacterAndParagraphProperties: beans.PropertyValues): XTextRange; + + /** + * inserts a new text portion to the paragraph at a given position.

The sequence can contain all the properties defined by the service TextPortion. + * @param Text contains the text to be inserted. + * @param CharacterAndParagraphProperties can contain all the properties defined by the service {@link Paragraph} . + * @param TextRange specifies the position of the insert. + * @since LibreOffice 4.0 + */ + insertTextPortion(Text: string, CharacterAndParagraphProperties: beans.PropertyValues, TextRange: XTextRange): XTextRange; + } + + /** + * describes the object's position in a text. + * + * It represents a text range. The beginning and end of the range may be identical. + */ + interface XTextRange extends uno.XInterface { + /** @returns a text range which contains only the end of this text range. */ + readonly End: XTextRange; + + /** @returns a text range which contains only the end of this text range. */ + getEnd(): XTextRange; + + /** @returns a text range which contains only the start of this text range. */ + getStart(): XTextRange; + + /** @returns the string that is included in this text range. */ + getString(): string; + + /** @returns the text interface in which the text position is contained. */ + getText(): XText; + + /** + * the whole string of characters of this piece of text is replaced. + * + * All styles are removed when applying this method. + */ + setString(aString: string): void; + + /** @returns a text range which contains only the start of this text range. */ + readonly Start: XTextRange; + + /** @returns the string that is included in this text range. */ + String: string; + } + + /** + * compares the positions of two {@link TextRanges} within a {@link Text} . + * + * Only {@link TextRange} instances within the same {@link Text} can be compared. + */ + interface XTextRangeCompare extends uno.XInterface { + /** + * @returns 1, if **xR1** ends before **xR2** , 0, if **xR1** ends at the same position as **xR2** and -1, if **xR1** ends behind **xR2** . + * @throws com::sun::star::lang::IllegalArgumentException if either **xR1** or **xR2** is not within this text. + */ + compareRegionEnds(xR1: XTextRange, xR2: XTextRange): number; + + /** + * @returns 1 if **xR1** starts before **xR2** , 0 if **xR1** starts at the same position as **xR2** and -1 if **xR1** starts behind **xR2** . + * @throws com::sun::star::lang::IllegalArgumentException if either **xR1** or **xR2** is not within this text. + */ + compareRegionStarts(xR1: XTextRange, xR2: XTextRange): number; + } + + /** + * makes it possible to move a text range (e.g. a paragraph by itself) within this text. + * + * The movement is specified by the number of paragraphs within the order of paragraphs. + * @see Text + */ + interface XTextRangeMover extends uno.XInterface { + /** moves the contents to which **xRange** refers forward or backward. */ + moveTextRange(xRange: XTextRange, nParagraphs: number): void; + } + + /** + * provide special data of a {@link TextSection} . + * @see TextSection + */ + interface XTextSection extends XTextContent { + /** @returns all text sections that are children of this text section (recursive). */ + readonly ChildSections: SafeArray; + + /** @returns all text sections that are children of this text section (recursive). */ + getChildSections(): SafeArray; + + /** If the object is a child section, then this method returns the parent text section. */ + getParentSection(): XTextSection; + + /** If the object is a child section, then this method returns the parent text section. */ + readonly ParentSection: XTextSection; + } + + /** manages the text sections within the context (i.e. the document). */ + interface XTextSectionsSupplier extends uno.XInterface { + /** @returns the collection of text sections. */ + getTextSections(): container.XNameAccess; + + /** @returns the collection of text sections. */ + readonly TextSections: container.XNameAccess; + } + + /** provides the collection of com::sun::star::drawing::TextShapes. */ + interface XTextShapesSupplier extends uno.XInterface { + /** + * returns the collection of shapes. + * @see com.sun.star.drawing.DrawPage + */ + getShapes(): container.XIndexAccess; + + /** + * returns the collection of shapes. + * @see com.sun.star.drawing.DrawPage + */ + readonly Shapes: container.XIndexAccess; + } + + /** + * manages a text table. + * @see com.sun.star.text.TextTable + * @see com.sun.star.text.Cell + */ + interface XTextTable extends XTextContent { + /** @returns the names of all cells of this text table. */ + readonly CellNames: SafeArray; + + /** + * @returns the access object for the text table columns. + * @see com.sun.star.table.XTableColumns + */ + readonly Columns: table.XTableColumns; + + /** + * creates a text table cursor and returns the {@link XTextTableCursor} interface. + * + * Initially the cursor is positioned in the cell with the specified name. + * @see com.sun.star.text.TextTableCursor + */ + createCursorByCellName(aCellName: string): XTextTableCursor; + + /** + * @param aCellName is a concatenation of the alphanumeric column name and the index of the row. Example: The cell in the 4th column and third row has the + * @returns the {@link com.sun.star.table.XCell} interface of the cell with the specified name. + * @see com.sun.star.table.Cell + * @see com.sun.star.table.XCell + */ + getCellByName(aCellName: string): table.XCell; + + /** @returns the names of all cells of this text table. */ + getCellNames(): SafeArray; + + /** + * @returns the access object for the text table columns. + * @see com.sun.star.table.XTableColumns + */ + getColumns(): table.XTableColumns; + + /** + * @returns the access object for the text table rows. + * @see com.sun.star.table.XTableRows + */ + getRows(): table.XTableRows; + + /** + * determines the numbers of rows and columns of the text table. + * + * This method must be called after the object is created and before the object is insert or attached elsewhere. + */ + initialize(nRows: number, nColumns: number): void; + + /** + * @returns the access object for the text table rows. + * @see com.sun.star.table.XTableRows + */ + readonly Rows: table.XTableRows; + } + + /** + * The {@link TextTableCursor} provide methods to navigate through the table structure, to merge and split cells + * @see com.sun.star.text.TextTable + * @see com.sun.star.text.TextTableCursor + * @see com.sun.star.text.Cell + * @see com.sun.star.text.XTextTable + */ + interface XTextTableCursor extends uno.XInterface { + /** + * @returns the name of the cell range that is selected by this cursor. The name is the cell name of the top left table cell of the range concatenated by ":" + * @see com.sun:star.text.CellRange + */ + getRangeName(): string; + + /** + * moves the cursor to the bottom neighbor cell. + * @param nCount the number of cells to move. + * @param bExpand determines whether the selection is to be expanded. + */ + goDown(nCount: number, bExpand: boolean): boolean; + + /** + * moves the cursor to the left neighbor. + * @param nCount the number of cells to move. + * @param bExpand determines whether the selection is to be expanded. + */ + goLeft(nCount: number, bExpand: boolean): boolean; + + /** + * moves the cursor to the right neighbor. + * @param nCount the number of cells to move. + * @param bExpand determines whether the selection is to be expanded. + */ + goRight(nCount: number, bExpand: boolean): boolean; + + /** + * moves the cursor to the cell with the specified name. + * @param aCellName specifies the name of the cell to go to. + * @param bExpand determines whether the selection is to be expanded. + * @see com.sun.star.text.Cell + */ + gotoCellByName(aCellName: string, bExpand: boolean): boolean; + + /** + * moves the cursor to the bottom right cell of the table. + * @param bExpand determines whether the selection is to be expanded. + */ + gotoEnd(bExpand: boolean): void; + + /** + * moves the cursor to the top left cell of the table. + * @param bExpand determines whether the selection is to be expanded. + */ + gotoStart(bExpand: boolean): void; + + /** + * moves the cursor to the top neighbor. + * @param nCount the number of cells to move. + * @param bExpand determines whether the selection is to be expanded. + */ + goUp(nCount: number, bExpand: boolean): boolean; + + /** + * merges the selected range of cells. + * @see com.sun.star.CellRange + */ + mergeRange(): boolean; + + /** + * @returns the name of the cell range that is selected by this cursor. The name is the cell name of the top left table cell of the range concatenated by ":" + * @see com.sun:star.text.CellRange + */ + readonly RangeName: string; + + /** + * splits the range of cells. + * @param nCount specifies the number of new cells that will be created for each cell contained in the range. + * @param bHorizontal `TRUE` if the range should be split vertically. Otherwise it will be split horizontally. + * @see com.sun.star.Cell + * @see com.sun.star.CellRange + */ + splitRange(nCount: number, bHorizontal: boolean): boolean; + } + + /** enables the object to handle text tables. */ + interface XTextTablesSupplier extends uno.XInterface { + /** + * @returns the collection of "TextTables" currently contained in the object. + * @see com.sun.star.text.TextTables + * @see com.sun.star.text.TextTable + */ + getTextTables(): container.XNameAccess; + + /** + * @returns the collection of "TextTables" currently contained in the object. + * @see com.sun.star.text.TextTables + * @see com.sun.star.text.TextTable + */ + readonly TextTables: container.XNameAccess; + } + + /** describes a cursor in a text document's view. */ + interface XTextViewCursor extends XTextCursor { + /** @returns the cursor's coordinates relative to the top left position of the first page of the document. */ + getPosition(): awt.Point; + + /** @returns `TRUE` if this cursor is visible for the user. */ + isVisible(): boolean; + + /** @returns the cursor's coordinates relative to the top left position of the first page of the document. */ + readonly Position: awt.Point; + + /** shows or hides this cursor for the user. */ + setVisible(bVisible: boolean): void; + } + + /** + * supplies access to the cursor in the view. + * + * This cursor is the same instance that is available in the user interface. + * @see TextDocumentView + */ + interface XTextViewCursorSupplier extends uno.XInterface { + /** @returns the cursor of the document view. */ + getViewCursor(): XTextViewCursor; + + /** @returns the cursor of the document view. */ + readonly ViewCursor: XTextViewCursor; + } + + /** makes it possible to move a cursor word by word. */ + interface XWordCursor extends XTextCursor { + /** + * moves the cursor to the end of the current word. + * @returns `TRUE` if the cursor is now at the end of a word, `FALSE` otherwise. If `FALSE` was returned the cursor will remain at its original position. + */ + gotoEndOfWord(bExpand: boolean): boolean; + + /** + * moves the cursor to the next word. + * + * Note: the function returning `TRUE` does not necessarily mean that the cursor is located at the next word, or any word at all! This may happen for + * example if it travels over empty paragraphs. + * @returns `TRUE` if the cursor was moved. It returns `FALSE` it the cursor can not advance further. + */ + gotoNextWord(bExpand: boolean): boolean; + + /** + * moves the cursor to the previous word. + * + * Note: the function returning `TRUE` does not necessarily mean that the cursor is located at the previous word, or any word at all! This may happen for + * example if it travels over empty paragraphs. + * @returns `TRUE` if the cursor was moved. It returns `FALSE` it the cursor can not advance further. + */ + gotoPreviousWord(bExpand: boolean): boolean; + + /** + * moves the cursor to the start of the current word. + * @returns `TRUE` if the cursor is now at the start of a word, `FALSE` otherwise. If `FALSE` was returned the cursor will remain at its original position. + */ + gotoStartOfWord(bExpand: boolean): boolean; + + /** determines if the cursor is positioned at the end of a word. */ + isEndOfWord(): boolean; + + /** determines if the cursor is positioned at the start of a word. */ + isStartOfWord(): boolean; + } + + namespace AuthorDisplayFormat { + const enum Constants { + FIRST_NAME = 2, + FULL = 0, + INITIALS = 3, + LAST_NAME = 1, + } + } + + namespace BibliographyDataField { + const enum Constants { + ADDRESS = 2, + ANNOTE = 3, + AUTHOR = 4, + BIBILIOGRAPHIC_TYPE = 1, + BOOKTITLE = 5, + CHAPTER = 6, + CUSTOM1 = 25, + CUSTOM2 = 26, + CUSTOM3 = 27, + CUSTOM4 = 28, + CUSTOM5 = 29, + EDITION = 7, + EDITOR = 8, + HOWPUBLISHED = 9, + IDENTIFIER = 0, + INSTITUTION = 10, + ISBN = 30, + JOURNAL = 11, + MONTH = 12, + NOTE = 13, + NUMBER = 14, + ORGANIZATIONS = 15, + PAGES = 16, + PUBLISHER = 17, + REPORT_TYPE = 21, + SCHOOL = 18, + SERIES = 19, + TITLE = 20, + URL = 24, + VOLUME = 22, + YEAR = 23, + } + } + + namespace BibliographyDataType { + const enum Constants { + ARTICLE = 0, + BOOK = 1, + BOOKLET = 2, + CONFERENCE = 3, + CUSTOM1 = 17, + CUSTOM2 = 18, + CUSTOM3 = 19, + CUSTOM4 = 20, + CUSTOM5 = 21, + EMAIL = 15, + INBOOK = 4, + INCOLLECTION = 5, + INPROCEEDINGS = 6, + JOURNAL = 7, + MANUAL = 8, + MASTERSTHESIS = 9, + MISC = 10, + PHDTHESIS = 11, + PROCEEDINGS = 12, + TECHREPORT = 13, + UNPUBLISHED = 14, + WWW = 16, + } + } + + namespace ChapterFormat { + const enum Constants { + DIGIT = 4, + NAME = 0, + NAME_NUMBER = 2, + NO_PREFIX_SUFFIX = 3, + NUMBER = 1, + } + } + + namespace CharacterCompressionType { + const enum Constants { + NONE = 0, + PUNCTUATION_AND_KANA = 2, + PUNCTUATION_ONLY = 1, + } + } + + namespace ColumnSeparatorStyle { + const enum Constants { + DASHED = 3, + DOTTED = 2, + NONE = 0, + SOLID = 1, + } + } + + namespace ControlCharacter { + const enum Constants { + APPEND_PARAGRAPH = 5, + HARD_HYPHEN = 2, + HARD_SPACE = 4, + LINE_BREAK = 1, + PARAGRAPH_BREAK = 0, + SOFT_HYPHEN = 3, + } + } + + namespace DateDisplayFormat { + const enum Constants { + DDMMMMYYYY = 5, + DDMMMYYYY = 4, + MMDDYY = 2, + MMDDYYYY = 3, + NNDDMMMMYYYY = 6, + NNNNDDMMMMYYYY = 7, + STANDARD_LONG = 1, + STANDARD_SHORT = 0, + } + } + + namespace DocumentStatistic { + const enum Constants { + CHARS = 3, + PAGES = 0, + PARAS = 1, + WORDS = 2, + } + } + + namespace fieldmaster { + /** + * specifies service of a {@link Bibliography} field master. + * @see com.sun.star.text.TextField + */ + interface Bibliography extends TextFieldMaster { + /** determines the closing bracket used to display the bibliography text fields. */ + BracketAfter: string; + + /** determines the opening bracket used to display the bibliography text fields. */ + BracketBefore: string; + + /** determines whether the bibliography text fields are numbered. If `FALSE` the short name of the bibliography entry is displayed instead. */ + IsNumberEntries: boolean; + + /** + * determines whether the bibliography entries in a bibliography index are sorted by the document position. If `FALSE` the SortKey property determines + * the sorting of the entries. + */ + IsSortByPosition: boolean; + + /** contains the locale of the field master */ + Locale: lang.Locale; + + /** contains the name of the sort algorithm that is used to sort the text fields. */ + SortAlgorithm: string; + + /** + * determines the sorting of the bibliography entries in a bibliography index. This property is used if the property IsSortByPosition is not set. Each + * contained element of the sequence is a sequence of the following two properties: + * + * [property] short SortKey; + * + * + * + * Determines the bibliography field that is used to sort by. + * + * + * + * [property] boolean IsSortAscending; + * + * + * + * Determines whether the sorting is ascending or descending. It uses the type {@link com.sun.star.text.BibliographyDataField} + */ + SortKeys: SafeArray; + } + + /** + * specifies service of a {@link Database} field master. + * @see com.sun.star.text.TextField Only one of the properties {@link DataBaseName} , {@link DataBaseURL} and {@link DataBaseResource} should be set. If + */ + interface Database extends TextFieldMaster { + /** contains the CommandType this can be the name of a data base table, a data query or a statement. (0 = table, 1 = query, 2 = statement) */ + CommandType: number; + + /** specifies the database name. */ + DataBaseName: string; + + /** + * indicates a connection URL, which locates a database driver. + * @since OOo 2.0 + */ + DataBaseResource: string; + + /** + * indicates the URL of a database file. + * @since OOo 2.0 + */ + DataBaseURL: string; + + /** contains the name of the data base table. */ + DataColumnName: string; + + /** contains the command string. Depending on the CommandType property this can be the name of a data base table, a data query or a statement. */ + DataTableName: string; + + /** + * contains the DataColumnName but it enables the fieldmaster and its depending fields to work without setting DataSourceName, DataTableName and + * CommandType + * @since OOo 2.3 + */ + Name: string; + } + + /** + * specifies service of a {@link DDE} field master. + * @see com.sun.star.text.TextField + */ + interface DDE extends TextFieldMaster { + /** contains the content. */ + Content: string; + + /** contains the element string of the {@link DDE} command. */ + DDECommandElement: string; + + /** contains the file string of the {@link DDE} command. */ + DDECommandFile: string; + + /** contains the type string of the {@link DDE} command. */ + DDECommandType: string; + + /** determines whether {@link DDE} link is updated automatically. */ + IsAutomaticUpdate: boolean; + } + + /** + * Specifies the service of a set expression field master. + * @see com.sun.star.text.TextFieldMaster + */ + interface SetExpression extends TextFieldMaster { + /** determines the number of the chapter. This values is used if the field master is set as number sequence. */ + ChapterNumberingLevel: number; + + /** determines the numbering separator string if the field master is set as number sequence. */ + NumberingSeparator: string; + + /** determines the type of the field as {@link com.sun.star.text.SetVariableType} */ + SubType: number; + } + + /** + * Specifies the service of a user field master. + * @see com.sun.star.text.TextFieldMaster + */ + interface User extends TextFieldMaster { + /** contains the content. */ + Content: string; + + /** determines whether the field contains an expression. */ + IsExpression: boolean; + + /** contains the value. */ + Value: number; + } + } + + namespace FilenameDisplayFormat { + const enum Constants { + FULL = 0, + NAME = 2, + NAME_AND_EXT = 3, + PATH = 1, + } + } + + namespace FontEmphasis { + const enum Constants { + ACCENT_ABOVE = 4, + ACCENT_BELOW = 14, + CIRCLE_ABOVE = 2, + CIRCLE_BELOW = 12, + DISK_ABOVE = 3, + DISK_BELOW = 13, + DOT_ABOVE = 1, + DOT_BELOW = 11, + NONE = 0, + } + } + + namespace FontRelief { + const enum Constants { + EMBOSSED = 1, + ENGRAVED = 2, + NONE = 0, + } + } + + namespace FootnoteNumbering { + const enum Constants { + PER_CHAPTER = 1, + PER_DOCUMENT = 2, + PER_PAGE = 0, + } + } + + namespace HoriOrientation { + const enum Constants { + CENTER = 2, + FULL = 6, + INSIDE = 4, + LEFT = 3, + LEFT_AND_WIDTH = 7, + NONE = 0, + OUTSIDE = 5, + RIGHT = 1, + } + } + + namespace LabelFollow { + const enum Constants { + LISTTAB = 0, + NOTHING = 2, + SPACE = 1, + } + } + + namespace MailMergeType { + const enum Constants { + FILE = 2, + MAIL = 3, + PRINTER = 1, + SHELL = 4, + } + } + + namespace ParagraphVertAlign { + const enum Constants { + AUTOMATIC = 0, + BASELINE = 1, + BOTTOM = 4, + CENTER = 3, + TOP = 2, + } + } + + namespace PlaceholderType { + const enum Constants { + GRAPHIC = 3, + OBJECT = 4, + TABLE = 1, + TEXT = 0, + TEXTFRAME = 2, + } + } + + namespace PositionAndSpaceMode { + const enum Constants { + LABEL_ALIGNMENT = 1, + LABEL_WIDTH_AND_POSITION = 0, + } + } + + namespace PositionLayoutDir { + const enum Constants { + PositionInHoriL2R = 1, + PositionInLayoutDirOfAnchor = 2, + } + } + + namespace ReferenceFieldPart { + const enum Constants { + CATEGORY_AND_NUMBER = 5, + CHAPTER = 1, + NUMBER = 8, + NUMBER_FULL_CONTEXT = 10, + NUMBER_NO_CONTEXT = 9, + ONLY_CAPTION = 6, + ONLY_SEQUENCE_NUMBER = 7, + PAGE = 0, + PAGE_DESC = 4, + TEXT = 2, + UP_DOWN = 3, + } + } + + namespace ReferenceFieldSource { + const enum Constants { + BOOKMARK = 2, + ENDNOTE = 4, + FOOTNOTE = 3, + REFERENCE_MARK = 0, + SEQUENCE_FIELD = 1, + } + } + + namespace RelOrientation { + const enum Constants { + CHAR = 2, + FRAME = 0, + FRAME_LEFT = 5, + FRAME_RIGHT = 6, + PAGE_FRAME = 7, + PAGE_LEFT = 3, + PAGE_PRINT_AREA = 8, + PAGE_RIGHT = 4, + PRINT_AREA = 1, + TEXT_LINE = 9, + } + } + + namespace SetVariableType { + const enum Constants { + FORMULA = 2, + SEQUENCE = 1, + STRING = 3, + VAR = 0, + } + } + + namespace SizeType { + const enum Constants { + FIX = 1, + MIN = 2, + VARIABLE = 0, + } + } + + namespace TemplateDisplayFormat { + const enum Constants { + AREA = 4, + FULL = 0, + NAME = 2, + NAME_AND_EXT = 3, + PATH = 1, + TITLE = 5, + } + } + + namespace textfield { + /** + * specifies service of text field that visualizes a {@link DDE} connection. + * @@see com::sun::star::text::TextFieldMaster::DDE + * @since OOo 1.1.2 + */ + type DDE = TextField; + + /** + * specifies service of an annotation text field. + * @see com.sun.star.text.TextField + */ + interface Annotation extends TextField { + /** contains the name of the author of the annotation. */ + Author: string; + + /** contains the annotation's content */ + Content: string; + + /** contains the creation date. */ + Date: util.Date; + + /** contains the creation date. */ + DateTimeValue: util.DateTime; + + /** + * contains the initials of the author of the annotation. + * @since LibreOffice 4.0 + */ + Initials: string; + + /** + * contains the name of the annotation. + * @since LibreOffice 4.0 + */ + Name: string; + } + + /** + * specifies service of an author text field. + * @see com.sun.star.text.TextField + */ + interface Author extends TextField { + /** + * this is the display format for this field + * @see com.sun.star.text.AuthorDisplayFormat + */ + AuthorFormat: number; + + /** the is the content of this field */ + Content: string; + + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** determines whether the full name of the author is displayed rather than the initials. */ + FullName: boolean; + + /** If this flag is set to false the author will be overridden by the current author each time the document is saved. */ + IsFixed: boolean; + } + + /** + * specifies service of a bibliography text field. + * @see com.sun.star.text.TextField + */ + interface Bibliography extends DependentTextField { + /** contains the bibliography fields of the text field. */ + Fields: SafeArray; + } + + /** + * specifies service of a chapter text field. + * @see com.sun.star.text.TextField + */ + interface Chapter extends TextField { + /** determines how the chapter should be displayed as described in {@link com.sun.star.text.ChapterFormat} . */ + ChapterFormat: number; + + /** determines which chapter level should be used. The highest chapter level has the value 0. */ + Level: number; + } + + /** + * specifies service of a text field that displays the number of characters contained in the document. + * @see com.sun.star.text.TextField + */ + interface CharacterCount extends TextField { + /** specifies the type of the numbering as {@link com.sun.star.style.NumberingType} */ + NumberingType: number; + } + + /** + * specifies service of a text field to combine 1 to 6 characters that are treated as one normal character. + * @see com.sun.star.text.TextField + */ + interface CombinedCharacters extends TextField { + /** contains the characters to be combined. */ + Content: string; + } + + /** + * specifies service of a conditional text field. + * @see com.sun.star.text.TextField + */ + interface ConditionalText extends TextField { + /** contains the condition. */ + Condition: string; + + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** contains the text that is displayed if the condition evaluates to `FALSE` . */ + FalseContent: string; + + /** + * contains the result of the last evaluation of the condition. + * + * This property has to be read/written in file export/import to save and restore the result without initiation of a new evaluation. + */ + IsConditionTrue: boolean; + + /** contains the text that is displayed if the condition evaluates to `TRUE` . */ + TrueContent: string; + } + + /** + * specifies service of a database text field which is used as mail merge field. + * @see com.sun.star.text.TextField + */ + interface Database extends DependentTextField { + /** contains the database content that was merged in the last database merge action. Initially it contains the column name in parenthesis (<>). */ + Content: string; + + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** determines whether the number format is number display format is read from the database settings. */ + DataBaseFormat: boolean; + + /** + * this is the number format for this field. + * @see com.sun.star.util.NumberFormatter + */ + NumberFormat: number; + } + + /** + * specifies service of text field that displays the name of a database. + * @see com.sun.star.text.TextField Only one of the properties {@link DataBaseName} , {@link DataBaseURL} and {@link DataBaseResource} should be set. If + */ + interface DatabaseName extends DependentTextField { + /** specifies the database name. */ + DataBaseName: string; + + /** + * indicates a connection {@link URL} , which locates a database driver. + * @since OOo 2.0 + */ + DataBaseResource: string; + + /** + * indicates the {@link URL} of a database file. + * @since OOo 2.0 + */ + DataBaseURL: string; + + /** + * determines the interpretation of the property DataTableName. + * @see com.sun.star.sdb.CommandType + */ + DataCommandType: number; + + /** contains the name of the database table, query or a statement depending on the DataCommandType property. */ + DataTableName: string; + } + + /** + * specifies service of a text field that increments a database selection. + * @see com.sun.star.text.TextField Only one of the properties {@link DataBaseName} , {@link DataBaseURL} and {@link DataBaseResource} should be set. If + */ + interface DatabaseNextSet extends DependentTextField { + /** determines whether the database selection is set to the next position or not. */ + Condition: string; + + /** specifies the database name. */ + DataBaseName: string; + + /** + * indicates a connection {@link URL} , which locates a database driver. + * @since OOo 2.0 + */ + DataBaseResource: string; + + /** + * indicates the {@link URL} of a database file. + * @since OOo 2.0 + */ + DataBaseURL: string; + + /** + * determines the interpretation of the property DataTableName. + * @see com.sun.star.sdb.CommandType + */ + DataCommandType: number; + + /** contains the name of the database table, query or a statement depending on the DataCommandType property. */ + DataTableName: string; + } + + /** + * specifies service of text field that conditionally set the selection of a database cursor. + * @see com.sun.star.text.TextField Only one of the properties {@link DataBaseName} , {@link DataBaseURL} and {@link DataBaseResource} should be set. If + */ + interface DatabaseNumberOfSet extends DependentTextField { + /** contains the conditions that determines whether the SetNumber is applied or not. */ + Condition: string; + + /** specifies the database name. */ + DataBaseName: string; + + /** + * indicates a connection {@link URL} , which locates a database driver. + * @since OOo 2.0 + */ + DataBaseResource: string; + + /** + * indicates the {@link URL} of a database file. + * @since OOo 2.0 + */ + DataBaseURL: string; + + /** + * determines the interpretation of the property DataTableName. + * @see com.sun.star.sdb.CommandType + */ + DataCommandType: number; + + /** contains the name of the database table, query or a statement depending on the DataCommandType property. */ + DataTableName: string; + + /** contains the set number that is to be applied. */ + SetNumber: number; + } + + /** + * specifies service of a text field that displays the current set number of a database. + * @see com.sun.star.text.TextField Only one of the properties {@link DataBaseName} , {@link DataBaseURL} and {@link DataBaseResource} should be set. If + */ + interface DatabaseSetNumber extends DependentTextField { + /** specifies the database name. */ + DataBaseName: string; + + /** + * indicates a connection {@link URL} , which locates a database driver. + * @since OOo 2.0 + */ + DataBaseResource: string; + + /** + * indicates the {@link URL} of a database file. + * @since OOo 2.0 + */ + DataBaseURL: string; + + /** + * determines the interpretation of the property DataTableName. + * @see com.sun.star.sdb.CommandType + */ + DataCommandType: number; + + /** contains the name of the database table, query or a statement depending on the DataCommandType property. */ + DataTableName: string; + + /** specifies the type of the numbering as {@link com.sun.star.style.NumberingType} */ + NumberingType: number; + + /** contains the number of the database set. */ + SetNumber: number; + } + + /** + * specifies service of a date or time text field. + * @see com.sun.star.text.TextField + */ + interface DateTime extends TextField { + /** contains an offset to the date or time value in minutes. */ + Adjust: number; + + /** + * this is the display format for this field. Depending on {@link IsDate} , this is either a {@link com.sun.star.text.DateDisplayFormat} or {@link + * com.sun.star.text.TimeDisplayFormat} . + * + * This property is deprecated and is here only for components that do not support a {@link com.sun.star.util.NumberFormatter} . + * @deprecated Deprecated + * @see com.sun.star.text.DateDisplayFormat + * @see com.sun.star.text.TimeDisplayFormat + */ + DateTimeFormat: number; + + /** the is the content of this field. */ + DateTimeValue: util.DateTime; + + /** If this flag is set to `TRUE` this field represents a date with an optional time. If it is set to `FALSE` only the time is used here. */ + IsDate: boolean; + + /** + * If this flag is set to `FALSE` the date or time is always displayed as the current date or time. + * @since OOo 1.1.2 + */ + IsFixed: boolean; + + /** + * determines whether changes in language attributes at the position the text field is located also change the number format as appropriate for this + * language. + */ + IsFixedLanguage: boolean; + + /** + * this is the number format for this field + * @see com.sun.star.util.NumberFormatter + */ + NumberFormat: number; + } + + /** + * specifies service of an author text field. + * @see com.sun.star.text.TextField + */ + interface DropDown extends TextField { + /** The items of the dropdown field. */ + Items: SafeArray; + + /** The name of the drop down field. */ + Name: string; + + /** + * The selected item. If no item is selected this property contains an empty string. If this property is set to a value not present in the items of the + * dropdown field it is invalidated, i.e. it is set to an empty string. + */ + SelectedItem: string; + } + + /** + * specifies service of a text field that displays the number of embedded objects contained in the document. + * @see com.sun.star.text.TextField + */ + interface EmbeddedObjectCount extends TextField { + /** specifies the type of the numbering as {@link com.sun.star.style.NumberingType} */ + NumberingType: number; + } + + /** + * specifies service of a text field that shows and element of the user data (name, address, phone, ...) + * @see com.sun.star.text.TextField + */ + interface ExtendedUser extends TextField { + /** contains the content. */ + Content: string; + + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** If this flag is set to `FALSE` the content is regularly updated. */ + IsFixed: boolean; + + /** specifies which part of the user data is displayed as described in {@link com.sun.star.text.UserDataPart} . */ + UserDataType: number; + } + + /** + * specifies service of text field that displays the file name ( {@link URL} ) of the document. + * @see com.sun.star.text.TextField + */ + interface FileName extends TextField { + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** determines the format the file name is displayed as specified in {@link com.sun.star.text.FilenameDisplayFormat} . */ + FileFormat: number; + + /** If this flag is set to `FALSE` the content is regularly updated. */ + IsFixed: boolean; + } + + /** + * specifies service of a get expression text field. + * @see com.sun.star.text.TextField + */ + interface GetExpression extends TextField { + /** contains the textual content of the field. */ + Content: string; + + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** + * determines whether changes in language attributes at the position the text field is located also change the number format as appropriate for this + * language. + * @since OOo 1.1.2 + */ + IsFixedLanguage: boolean; + + /** determines whether the content is displayed or evaluated. */ + IsShowFormula: boolean; + + /** + * this is the number format for this field. + * @see com.sun.star.util.NumberFormatter + */ + NumberFormat: number; + + /** determines the type of the variable as described in {@link com.sun.star.text.SetVariableType} */ + SubType: number; + + /** contains the numerical value of the field. */ + Value: number; + + /** deprecated */ + VariableSubtype: number; + } + + /** + * specifies service of a reference field. + * @see com.sun.star.text.TextField + */ + interface GetReference extends TextField { + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** + * contains the type of the reference. + * @see com.sun.star.text.ReferenceFieldPart + */ + ReferenceFieldPart: number; + + /** + * contains the source of the reference. + * @see com.sun.star.text.ReferenceFieldSource + */ + ReferenceFieldSource: number; + + /** + * contains the sequence number of a set expression field that is used as sequence field or the value of the ReferenceId property of a footnote or + * endnote. + * @see com.sun.star.text.Footnote + */ + SequenceNumber: number; + + /** + * contains the name of the source. + * + * Depending on the property {@link ReferenceFieldSource} it may be the name of a bookmark, a reference mark. + */ + SourceName: string; + } + + /** + * specifies service of a text field that displays the number of graphic objects contained in the document. + * @see com.sun.star.text.TextField + */ + interface GraphicObjectCount extends TextField { + /** specifies the type of the numbering as {@link com.sun.star.style.NumberingType} */ + NumberingType: number; + } + + /** + * specifies service of a hidden paragraph field. + * @see com.sun.star.text.TextField + */ + interface HiddenParagraph extends TextField { + /** contains the condition. */ + Condition: string; + + /** + * contains the result of the last evaluation of the condition. + * + * This property has to be read/written in file export/import to save and restore the result without initiation of a new evaluation. + */ + IsHidden: boolean; + } + + /** + * specifies service of a hidden text field. + * @see com.sun.star.text.TextField + */ + interface HiddenText extends TextField { + /** contains the condition. */ + Condition: string; + + /** + * contains the text content of the hidden text field. + * + * The content is displayed if the condition evaluates to `FALSE` . + */ + Content: string; + + /** + * contains the result of the last evaluation of the condition. + * + * This property has to be read/written in file export/import to save and restore the result without initiation of a new evaluation. + */ + IsHidden: boolean; + } + + /** + * specifies service of a text input field. + * @see com.sun.star.text.TextField + */ + interface Input extends TextField { + /** + * contains the text content of the text field. + * + * The field displays the text content. + */ + Content: string; + + /** + * contains an internal-use-only multi purpose string. + * + * This is an internal multi purpose string used in WW8 import/export. Usually it holds the help text for form fields. + * + * It's content must NEVER be modified by the user. + */ + Help: string; + + /** + * contains a hint text. + * + * This hint may be used as help tip or as headline of a corresponding dialog to edit the field content. + */ + Hint: string; + } + + /** + * specifies service of an input field that is used to change the content of a corresponding field master of a user defined text field. + * @see com.sun.star.text.TextField + */ + interface InputUser extends TextField { + /** contains the name of the corresponding field master. */ + Content: string; + + /** + * contains a hint text. + * + * This hint may be used as help tip or as headline of a corresponding dialog to edit the field content. + */ + Hint: string; + } + + /** + * specifies service of a place holder text field. + * @see com.sun.star.text.TextField + */ + interface JumpEdit extends TextField { + /** determines a hint that is displayed at the user interface as tip. */ + Hint: string; + + /** determines the text of the place holder. */ + PlaceHolder: string; + + /** determines the type of the place holder as described in {@link com.sun.star.text.PlaceholderType} . */ + PlaceHolderType: number; + } + + /** + * specifies service of a macro text field. + * @see com.sun.star.text.TextField + */ + interface Macro extends TextField { + /** contains a tip that is displayed at the user interface. */ + Hint: string; + + /** contains the library name of a StarBASIC macro. */ + MacroLibrary: string; + + /** contains the macro name of a StarBASIC macro. */ + MacroName: string; + } + + /** + * is a {@link com.sun.star.text.TextField} whose content is specified by RDF metadata. + * @see com.sun.star.rdf + * @since OOo 3.2 + */ + interface MetadataField extends TextField, rdf.XMetadatable, XText, container.XEnumerationAccess, container.XChild { + /** determines whether changes in language attributes at the position of the text field also change the number format as appropriate for this language. */ + IsFixedLanguage: boolean; + + /** + * this is the number format for this field. + * @see com.sun.star.util.NumberFormatter + */ + NumberFormat: number; + } + + /** + * specifies service of a text field that displays the number of pages contained in the document. + * @see com.sun.star.text.TextField + */ + interface PageCount extends TextField { + /** specifies the type of the numbering as {@link com.sun.star.style.NumberingType} */ + NumberingType: number; + } + + /** + * specifies service of a page number text field. + * @see com.sun.star.text.TextField + */ + interface PageNumber extends TextField { + /** + * determines the type of the numbering. + * @see com.sun.star.style.NumberingType + */ + NumberingType: number; + + /** determines an offset value to show a different page number. */ + Offset: number; + + /** + * determines which page the field refers to. + * @see com.sun.star.text.PageNumberType + */ + SubType: PageNumberType; + + /** if the user text string is set then it is displayed when the value of NumberingType is set to {@link com.sun.star.style.NumberingType.CHAR_SPECIAL} */ + UserText: string; + } + + /** + * specifies service of a text field that displays the number of paragraphs contained in the document. + * @see com.sun.star.text.TextField + */ + interface ParagraphCount extends TextField { + /** specifies the type of the numbering as {@link com.sun.star.style.NumberingType} */ + NumberingType: number; + } + + /** + * specifies service of a text field that displays the page number with respect to a reference point. The reference point is determined by a {@link + * ReferencePageSet} text field. + * @see com.sun.star.text.TextField + * @see com.sun.star.text.textfield.ReferencePageSet + */ + interface ReferencePageGet extends TextField { + /** specifies the type of the numbering as {@link com.sun.star.style.NumberingType} */ + NumberingType: number; + } + + /** + * specifies service of a text field that inserts additional page numbers. + * @see com.sun.star.text.TextField + * @see com.sun.star.text.textfield.ReferencePageGet + */ + interface ReferencePageSet extends TextField { + /** determines whether the {@link ReferencePageGet} text fields are displayed or not. */ + NameOn: boolean; + + /** determines an offset value to change the displayed value of a {@link ReferencePageGet} text field. */ + Offset: number; + } + + /** + * specifies service of a text field . + * @see com.sun.star.text.TextField + */ + interface Script extends TextField { + /** contains the script text or a {@link URL} that points to a script depending on the URLContent property. */ + Content: string; + + /** contains the name of the script type (i.e. JavaScript) */ + ScriptType: string; + + /** determines whether the property Content contains a {@link URL} or a script. */ + URLContent: boolean; + } + + /** + * specifies service of an expression text field. + * @see com.sun.star.text.TextField + */ + interface SetExpression extends DependentTextField { + /** contains the textual content of the field. */ + Content: string; + + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** contains an informational text that is displayed at the user interface if it's an input field. */ + Hint: string; + + /** + * determines whether changes in language attributes at the position the text field is located also change the number format as appropriate for this + * language. + * @since OOo 1.1.2 + */ + IsFixedLanguage: boolean; + + /** determines whether this field is an input field. */ + IsInput: boolean; + + /** determines whether the content is displayed or evaluated. */ + IsShowFormula: boolean; + + /** determines whether the field is visible. */ + IsVisible: boolean; + + /** + * this is the number format for this field. + * @see com.sun.star.util.NumberFormatter + */ + NumberFormat: number; + + /** specifies the type of the numbering as {@link com.sun.star.style.NumberingType} */ + NumberingType: number; + + /** contains the sequence value when this field is used as sequence field. */ + SequenceValue: number; + + /** determines the type of the variable as described in {@link com.sun.star.text.SetVariableType} */ + SubType: number; + + /** contains the numerical value of the field. */ + Value: number; + + /** contains the name of the set expression field master this field is connected to. */ + VariableName: string; + } + + /** + * specifies service of a text field that displays the number of tables contained in the document. + * @see com.sun.star.text.TextField + */ + interface TableCount extends TextField { + /** specifies the type of the numbering as {@link com.sun.star.style.NumberingType} */ + NumberingType: number; + } + + /** + * specifies service of a table formula text field. + * @deprecated Deprecated + * @see com.sun.star.text.TextField + */ + interface TableFormula extends TextField { + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** contains the formula. */ + Formula: string; + + /** determines whether the formula displayed as text or evaluated. */ + IsShowFormula: boolean; + + /** + * this is the number format for this field. + * @see com.sun.star.util.NumberFormatter + */ + NumberFormat: number; + } + + /** + * specifies service text field that displays the name of the template the document has been created from. + * @see com.sun.star.text.TextField + */ + interface TemplateName extends TextField { + /** determines the format the template file name is displayed as specified in {@link com.sun.star.text.FilenameDisplayFormat} . */ + FileFormat: number; + } + + /** + * specifies service of text field that displays a {@link URL} + * @see com.sun.star.text.TextField + */ + interface URL extends TextField { + /** Specifies how the {@link URL} is formatted on output. */ + Format: number; + + /** + * contains the content that will be displayed to the user. + * + * If this string is empty, the `URL` will be shown. + */ + Representation: string; + + /** Specifies the frame name in that the {@link URL} will be opened */ + TargetFrame: string; + + /** + * contains the unparsed original {@link URL} , for example, [http://me:pass@www.sun.de:8080/pub/test/foo.txt?a=b#xyz]{@link + * url="http://me:pass@www.sun.de:8080/pub/test/foo.txt?a=b#xyz"} + */ + URL: string; + } + + /** + * specifies service of a user defined field. + * @see com.sun.star.text.TextField + */ + interface User extends DependentTextField { + /** + * determines whether changes in language attributes at the position the text field is located also change the number format as appropriate for this + * language. + * @since OOo 1.1.2 + */ + IsFixedLanguage: boolean; + + /** determines if the content is shown as text rather than as value. */ + IsShowFormula: boolean; + + /** determines if the field is visible. */ + IsVisible: boolean; + + /** + * this is the number format for this field. + * @see com.sun.star.util.NumberFormatter + */ + NumberFormat: number; + } + + /** + * specifies service of a text field that displays the number of words contained in the document. + * @see com.sun.star.text.TextField + */ + interface WordCount extends TextField { + /** specifies the type of the numbering as {@link com.sun.star.style.NumberingType} */ + NumberingType: number; + } + + namespace docinfo { + /** + * specifies service of a text field that provides information about the author of the last change. + * @see com.sun.star.text.TextField + */ + interface ChangeAuthor extends TextField { + /** contains the name of the author. */ + Author: string; + + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** If this flag is set to false the author will be overridden by the current author each time the document is saved. */ + IsFixed: boolean; + } + + /** + * specifies service of a text field that provides information about the date and time the document was last changed. + * @see com.sun.star.text.TextField + */ + interface ChangeDateTime extends TextField { + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** contains the date and time as double value. */ + DateTimeValue: number; + + /** If this flag is set to `TRUE` this field represents, a date with an optional time. If it is set to `FALSE` only the time is used here. */ + IsDate: boolean; + + /** + * If this flag is set to false the author will be overridden by the current author each time the document is saved.If this flag is set to `FALSE` the + * date or time is always displayed as the current date or time. + * @since OOo 1.1.2 + */ + IsFixed: boolean; + + /** + * determines whether changes in language attributes at the position the text field is located also change the number format as appropriate for this + * language. + */ + IsFixedLanguage: boolean; + + /** + * this is the number format for this field. + * @see com.sun.star.util.NumberFormatter + */ + NumberFormat: number; + } + + /** + * specifies service of a text field that provides information about the author who created the document. + * @see com.sun.star.text.TextField + */ + interface CreateAuthor extends TextField { + /** contains the name of the author. */ + Author: string; + + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** If this flag is set to false the author will be overridden by the current author each time the document is saved. */ + IsFixed: boolean; + } + + /** + * specifies service of a text field that provides information about the date and time of the document creation. + * @see com.sun.star.text.TextField + */ + interface CreateDateTime extends TextField { + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** contains the date and time as double value. */ + DateTimeValue: number; + + /** If this flag is set to `TRUE` this field represents, a date with an optional time. If it is set to `FALSE` only the time is used here. */ + IsDate: boolean; + + /** + * If this flag is set to false the author will be overridden by the current author each time the document is saved. If this flag is set to `FALSE` the + * date or time is always displayed as the current date or time. + * @since OOo 1.1.2 + */ + IsFixed: boolean; + + /** + * determines whether changes in language attributes at the position the text field is located also change the number format as appropriate for this + * language. + */ + IsFixedLanguage: boolean; + + /** + * this is the number format for this field. + * @see com.sun.star.util.NumberFormatter + */ + NumberFormat: number; + } + + /** + * specifies service of a text field that refers to the content of a user-defined field in the document information. + * @see com.sun.star.text.TextField + * @since OOo 3.0 + */ + interface Custom extends TextField { + /** + * contains the current content of the text field. + * + * This property is useful for import/export purposes. + */ + CurrentPresentation: string; + + /** If this flag is set to `FALSE` , the content is updated when the document information changes. */ + IsFixed: boolean; + + /** the name of the user-defined property that this field refers to. */ + Name: string; + } + + /** + * specifies service of a text field that provides the description that is contained in the document information. + * @see com.sun.star.text.TextField + */ + interface Description extends TextField { + /** contains content information. */ + Content: string; + + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** If this flag is set to `FALSE` the content updated every time the document information is changed. */ + IsFixed: boolean; + } + + /** + * specifies service of a text field that provides information about the duration the document has been edited. + * @see com.sun.star.text.TextField + */ + interface EditTime extends TextField { + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** contains the date and time as double value. */ + DateTimeValue: number; + + /** + * If this flag is set to false the author will be overridden by the current author each time the document is saved. If this flag is set to `FALSE` the + * date or time is always displayed as the current date or time. + * @since OOo 1.1.2 + */ + IsFixed: boolean; + + /** + * determines whether changes in language attributes at the position the text field is located also change the number format as appropriate for this + * language. + */ + IsFixedLanguage: boolean; + + /** + * this is the number format for this field. + * @see com.sun.star.util.NumberFormatter + */ + NumberFormat: number; + } + + /** + * specifies service of a text field that provides the keywords that are contained in the document information. + * @see com.sun.star.text.TextField + */ + interface Keywords extends TextField { + /** contains content information. */ + Content: string; + + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** If this flag is set to `FALSE` the content updated every time the document information is changed. */ + IsFixed: boolean; + } + + /** + * specifies service of a text field that provides information about the author of the last print operation. + * @see com.sun.star.text.TextField + */ + interface PrintAuthor extends TextField { + /** contains the name of the author. */ + Author: string; + + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** If this flag is set to false the author will be overridden by the current author each time the document is saved. */ + IsFixed: boolean; + } + + /** + * specifies service of a text field that provides information about the date and time the document was last printed. + * @see com.sun.star.text.TextField + */ + interface PrintDateTime extends TextField { + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** contains the date and time as double value. */ + DateTimeValue: number; + + /** If this flag is set to `TRUE` this field represents, a date with an optional time. If it is set to `FALSE` only the time is used here. */ + IsDate: boolean; + + /** + * If this flag is set to false the author will be overridden by the current author each time the document is saved. If this flag is set to `FALSE` the + * date or time is always displayed as the current date or time. + * @since OOo 1.1.2 + */ + IsFixed: boolean; + + /** + * determines whether changes in language attributes at the position the text field is located also change the number format as appropriate for this + * language. + */ + IsFixedLanguage: boolean; + + /** + * this is the number format for this field. + * @see com.sun.star.util.NumberFormatter + */ + NumberFormat: number; + } + + /** + * specifies service of a text field that provides the revision that is contained in the document information. + * @see com.sun.star.text.TextField + */ + interface Revision extends TextField { + /** contains content information. */ + Content: string; + + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** If this flag is set to `FALSE` the content updated every time the document information is changed. */ + IsFixed: boolean; + } + + /** + * specifies service of a text field that provides the subject that is contained in the document information. + * @see com.sun.star.text.TextField + */ + interface Subject extends TextField { + /** contains content information. */ + Content: string; + + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** If this flag is set to `FALSE` the content updated every time the document information is changed. */ + IsFixed: boolean; + } + + /** + * specifies service of a text field that provides the title that is contained in the document information. + * @see com.sun.star.text.TextField + */ + interface Title extends TextField { + /** contains content information. */ + Content: string; + + /** + * contains the current content of the text field. + * + * This property is especially useful for import/export purposes. + */ + CurrentPresentation: string; + + /** If this flag is set to `FALSE` the content updated every time the document information is changed. */ + IsFixed: boolean; + } + } + + namespace Type { + const enum Constants { + AUTHOR = 8, + DATE = 0, + DOCINFO_TITLE = 10, + EXTENDED_FILE = 7, + EXTENDED_TIME = 6, + MEASURE = 9, + PAGE = 2, + PAGE_NAME = 14, + PAGES = 3, + PRESENTATION_DATE_TIME = 13, + PRESENTATION_FOOTER = 12, + PRESENTATION_HEADER = 11, + TABLE = 5, + TIME = 4, + UNSPECIFIED = -1, + URL = 1, + } + } + } + + namespace TextGridMode { + const enum Constants { + LINES = 1, + LINES_AND_CHARS = 2, + NONE = 0, + } + } + + namespace TextMarkupType { + const enum Constants { + PROOFREADING = 2, + SENTENCE = 4, + SMARTTAG = 3, + SPELLCHECK = 1, + TRACK_CHANGE_DELETION = 6, + TRACK_CHANGE_FORMATCHANGE = 7, + TRACK_CHANGE_INSERTION = 5, + } + } + + namespace TimeDisplayFormat { + const enum Constants { + HHMM = 1, + HHMMAMPM = 4, + HHMMSS = 2, + HHMMSS00 = 3, + HHMMSS00AMPM = 6, + HHMMSSAMPM = 5, + STANDARD = 0, + } + } + + namespace UserDataPart { + const enum Constants { + CITY = 7, + COMPANY = 0, + COUNTRY = 5, + EMAIL = 13, + FAX = 12, + FIRSTNAME = 1, + NAME = 2, + PHONE_COMPANY = 11, + PHONE_PRIVATE = 10, + POSITION = 9, + SHORTCUT = 3, + STATE = 14, + STREET = 4, + TITLE = 8, + ZIP = 6, + } + } + + namespace UserFieldFormat { + const enum Constants { + NUM = 2, + SYSTEM = 0, + TEXT = 1, + } + } + + namespace VertOrientation { + const enum Constants { + BOTTOM = 3, + CENTER = 2, + CHAR_BOTTOM = 6, + CHAR_CENTER = 5, + CHAR_TOP = 4, + LINE_BOTTOM = 9, + LINE_CENTER = 8, + LINE_TOP = 7, + NONE = 0, + TOP = 1, + } + } + + namespace WrapInfluenceOnPosition { + const enum Constants { + ITERATIVE = 3, + ONCE_CONCURRENT = 2, + ONCE_SUCCESSIVE = 1, + } + } + + namespace WritingMode2 { + const enum Constants { + CONTEXT = 4, + LR_TB = 0, + PAGE = 4, + RL_TB = 1, + TB_LR = 3, + TB_RL = 2, + } + } + } + + namespace tiledrendering { + /** tiled rendering using a system-specific handle to a window */ + interface XTiledRenderable extends uno.XInterface { + /** + * paint a tile to a system-specific window + * @param Parent a system-specific handle to a window. You must check the machine ID and the process ID. ; WIN32: HWND. ; WIN16: HWND. ; JAVA: global + * @param nOutputWidth horizontal output parameter measured in pixels. + * @param nOutputHeight vertical output parameter measured in pixels. + * @param nTilePosX logical X position of the top left corner of the rendered rectangle, in TWIPs. + * @param nTilePosY logical Y position of the top left corner of the rendered rectangle, in TWIPs. + * @param nTileWidth logical width of the rendered rectangle, in TWIPs. + * @param nTileHeight logical height of the rendered rectangle, in TWIPs. + * @since LibreOffice 5.0 + */ + paintTile(Parent: any, nOutputWidth: number, nOutputHeight: number, nTilePosX: number, nTilePosY: number, nTileWidth: number, nTileHeight: number): void; + } + } + + namespace ucb { + /** + * This exception is thrown to indicate that an attempt was made to reinitialize an object that can only be initialized once. + * @author Kai Sommerfeld + * @version 1.0 + */ + type AlreadyInitializedException = uno.Exception; + + /** is a factory for {@link CachedContentResultSet} implementations. */ + type CachedContentResultSetFactory = XCachedContentResultSetFactory; + + /** is a factory for {@link CachedContentResultSetStub} implementations. */ + type CachedContentResultSetStubFactory = XCachedContentResultSetStubFactory; + + /** is a factory for {@link CachedDynamicResultSet} implementations. */ + type CachedDynamicResultSetFactory = XCachedDynamicResultSetFactory; + + /** is a factory for {@link CachedDynamicResultSetStub} implementations. */ + type CachedDynamicResultSetStubFactory = XCachedDynamicResultSetStubFactory; + + /** + * The Cmis {@link Content} Provider implements a {@link ContentProvider} for the {@link UniversalContentBroker} (UCB). + * + * The served contents enable access to directories and files on a cmis-enabled server. + * @see com.sun.star.ucb.Content + * @since LibreOffice 3.5 + */ + type CmisContentProvider = XContentProvider; + + /** + * This exception is thrown to indicate that a command was aborted. + * @author Kai Sommerfeld + * @see XCommandProcessor + * @version 1.0 + */ + type CommandAbortedException = uno.Exception; + + /** is a factory for {@link ContentProviderProxy} implementations. */ + type ContentProviderProxyFactory = XContentProviderFactory; + + /** + * A {@link ContentTransmitter} is a service that provides + * @deprecated Deprecated + */ + type ContentTransmitter = XContentTransmitter; + + /** + * is a concrete implementation of service {@link HierarchyDataSource} , which uses the service {@link com.sun.star.configuration.ConfigurationProvider} + * for reading and writing hierarchy data. + */ + type DefaultHierarchyDataSource = HierarchyDataSource; + + /** + * is thrown by {@link XCommandProcessor.execute()} to indicate that the same command identifier was used for two threads. + * + * Each thread must use its own command identifier, which must be obtained using {@link XCommandProcessor.createCommandIdentifier()} . {@link Command} + * identifier `0` , which indicates that the command shall never be aborted by a client, can be used by any thread. + * @author Kai Sommerfeld + * @see XCommandProcessor + * @version 1.0 + */ + type DuplicateCommandIdentifierException = uno.Exception; + + /** + * is thrown to indicate that a content provider with the same identifier already was registered with a content provider manager. + * @author Kai Sommerfeld + * @see XContentProviderManager + * @version 1.0 + */ + type DuplicateProviderException = uno.Exception; + + /** + * provides read access to a static or dynamically changing {@link ContentResultSet} . + * + * For example, a {@link DynamicResultSet} is returned from the open-command executed by an {@link XCommandProcessor} of the service {@link Content} . + */ + type DynamicResultSet = XDynamicResultSet; + + /** + * The Expand {@link Content} Provider implements a {@link ContentProvider} for the {@link UniversalContentBroker} (UCB). + * + * It provides access to content via macrofied URLs, e.g. vnd.sun.star.expand://$UNO_USER_PACKAGES/abc. + * + * Macros which will be expanded using the singleton /singletons/com. {@link sun.star.util.theMacroExpander} of the process's initial component context. + * @see Content + */ + type ExpandContentProvider = ContentProvider; + + /** + * The FTP {@link Content} Provider (FCP) implements a {@link ContentProvider} for the {@link UniversalContentBroker} (UCB). + * + * The served contents enable access to directories and files on a ftp-server. + * @see com.sun.star.ucb.Content + * @since OOo 1.1.2 + */ + type FTPContentProvider = XContentProvider; + + type GIOContentProvider = XContentProvider; + + type GnomeVFSContentProvider = XContentProvider; + + /** + * The Help {@link Content} Provider (HCP) implements a {@link ContentProvider} for the {@link UniversalContentBroker} (UCB). + * + * The served contents enable access to the help contents and to the search engine. + * @see com.sun.star.ucb.Content + */ + type HelpContentProvider = XContentProvider; + + /** + * The Hierarchy {@link Content} Provider (HCP) implements a {@link ContentProvider} for the {@link UniversalContentBroker} (UCB). + * + * It provides access to a persistent, customizable hierarchy of contents (folders and links). + * @see com.sun.star.ucb.Content + */ + type HierarchyContentProvider = XContentProvider; + + /** + * This exception is thrown to indicate an illegal content identifier. + * @author Kai Sommerfeld + * @see XContent + * @see XContentIdentifier + * @version 1.0 + */ + type IllegalIdentifierException = uno.Exception; + + /** + * An interaction request to inform the client of a "transfer" command that the supplied source URL is not supported. + * @see XCommandProcessor + */ + type InteractiveBadTransferURLException = uno.Exception; + + /** + * An error indicating that a lock that has been previously obtained by this OOo session has expired. + * @since OOo 3.3 + */ + type InteractiveLockingLockExpiredException = InteractiveLockingException; + + /** + * An error indicating that the resource is not locked. + * + * This error for instance can occur when trying to unlock a resource that is not locked. + * @since OOo 3.3 + */ + type InteractiveLockingNotLockedException = InteractiveLockingException; + + /** + * An error related to network operations. + * + * Various meaningful errors are derived from this exception. + */ + type InteractiveNetworkException = task.ClassifiedInteractionRequest; + + /** A network error specifying a general failure. */ + type InteractiveNetworkGeneralException = InteractiveNetworkException; + + /** A network error specifying an off line condition. */ + type InteractiveNetworkOffLineException = InteractiveNetworkException; + + /** This exception is thrown to indicate that a Listener is already set while only one is allowed. */ + type ListenerAlreadySetException = uno.Exception; + + /** + * This exception is used to indicate that there is an {@link com.sun.star.io.XInputStream} missing. + * + * For example, the command "insert" may fail, if the implementation expects that an input stream is supplied with the given {@link + * InsertCommandArgument} . + * @author Kai Sommerfeld + * @see Content + * @version 1.0 + */ + type MissingInputStreamException = uno.Exception; + + /** + * The ODMA {@link Content} Provider (OCP) implements a {@link ContentProvider} for the {@link UniversalContentBroker} (UCB). + * + * It provides access to a document structure stored on a Document Management System (DMS). + * @see com.sun.star.ucb.ContentProvider + * @see com.sun.star.ucb.Content + * @see com.sun.star.ucb.ODMAContent + * @since OOo 1.1.2 + */ + type ODMAContentProvider = XContentProvider; + + /** + * The Package {@link Content} Provider (PCP) implements a {@link ContentProvider} for the {@link UniversalContentBroker} (UCB). + * + * It provides access to packages ( zip / jar archive files ) containing folders and streams. + * @see com.sun.star.ucb.Content + */ + type PackageContentProvider = XContentProvider; + + /** + * This service provides access to the meta data of the well known (predefined) UCB properties. + * @see com.sun.star.ucb.UniversalContentBroker + * @see com.sun.star.ucb.ContentProvider + * @see com.sun.star.ucb.Content + */ + type PropertiesManager = beans.XPropertySetInfo; + + /** + * This exception is thrown to propagate exceptions thrown by operations on ContentResultSets. + * @author Kai Sommerfeld + * @version 1.0 + */ + type ResultSetException = sdbc.SQLException; + + /** This exception is thrown to indicate that a needed service was not registered. */ + type ServiceNotFoundException = uno.Exception; + + /** + * Offers a simple access to resources, like files and folders located in a local file system or on an WebDAV server. + * @@author Andreas Bregas + * @@version 1.0 07/25/2000 + */ + type SimpleFileAccess = XSimpleFileAccess3; + + /** is a factory for {@link DynamicResultSet} implementations, which will be sorted according to the given sorting options. */ + type SortedDynamicResultSetFactory = XSortedDynamicResultSetFactory; + + /** creates instances of the service {@link PropertySetRegistry} . */ + type Store = XPropertySetRegistryFactory; + + /** + * The Transient Documents {@link Content} Provider (TDCP) implements a {@link ContentProvider} for the {@link UniversalContentBroker} (UCB). + * + * It provides access to the hierarchical structure of the documents that are active in a running OpenOffice.org process. As long as a document was not + * closed, the TDCP can access it. All documents that have been loaded - regardless of their persistent document format (sxw, doc, sxc, xls, ...) or that + * have been created but not yet saved to any storage medium, are supported. The TDCP is not able to load any documents itself. This is exclusively done + * by the OpenOffice.org document handling framework. The document contents provided by the TDCP represent live data, which may differ from any + * persistent representation of the document, for instance, because the user modified the document after loading, but did not yet save it. + * @see TransientDocumentsRootContent + * @see TransientDocumentsDocumentContent + * @see TransientDocumentsFolderContent + * @see TransientDocumentsStreamContent + * @since OOo 2.0 + */ + type TransientDocumentsContentProvider = XContentProvider; + + /** + * is thrown to indicate that the a command is not known by the implementation of an interface. + * @author Kai Sommerfeld + * @see XCommandProcessor + * @version 1.0 + */ + type UnsupportedCommandException = uno.Exception; + + /** + * The WebDAV {@link Content} Provider (DCP) implements a {@link ContentProvider} for the {@link UniversalContentBroker} (UCB). + * + * It provides access to WebDAV and standard HTTP servers. The DCP communicates with the server using the WebDAV protocol which is an extension to the + * HTTP protocol or using the plain HTTP protocol in case the server is not WebDAV enabled. + * @see com.sun.star.ucb.Content + */ + type WebDAVContentProvider = XContentProvider; + + /** + * is an interaction continuation used to instruct the requester to replace existing data. + * + * For example, this continuation can be selected when handling a {@link NameClashResolveRequest} in order to instruct the requester to overwrite the + * clashing data. + * @author Kai Sommerfeld + * @version 1.0 + */ + type XInteractionReplaceExistingData = task.XInteractionContinuation; + + /** Codes for content creation errors. */ + const enum ContentCreationError { + /** Provider was unable to create the content instance. */ + CONTENT_CREATION_FAILED = 5, + /** Creation of content identifier failed. */ + IDENTIFIER_CREATION_FAILED = 3, + /** @deprecated Deprecated */ + NO_CONTENT_BROKER = 1, + /** No {@link Content} Provider for given content identifier available. */ + NO_CONTENT_PROVIDER = 4, + /** @deprecated Deprecated */ + NO_IDENTIFIER_FACTORY = 2, + /** + * Unknown. + * + * An unknown I/O error has occurred. + */ + UNKNOWN = 0, + } + + /** + * These are the possible values for the property "DocumentStoreMode". + * @see XCommandProcessor + * @see Content + */ + const enum DocumentStoreMode { + /** Document contents are stored locally. */ + LOCAL = 1, + /** Document contents are not stored locally. */ + REMOTE = 0, + } + + /** + * The various commands to process on a list of folders. + * @see FolderList + */ + const enum FolderListCommand { + /** + * Get a list of all folders. + * + * HTTP request method as defined in [RFC 2616: Hypertext Transfer Protocol - HTTP/1.1]{@link url="http://tools.ietf.org/html/rfc2616#section-9.3"} + */ + GET = 0, + /** Get a list of subscribed folders. */ + GET_SUBSCRIBED = 1, + /** Set a list of folders. */ + SET = 2, + } + + /** + * Types of input/output errors. + * + * See {@link com.sun.star.task.InteractionHandler} for a description of what kinds of arguments {@link InteractiveAugmentedIOException} should use with + * each of these error codes. + */ + const enum IOErrorCode { + /** An operation was aborted. */ + ABORT = 0, + /** An object cannot be accessed due to insufficient user rights. */ + ACCESS_DENIED = 1, + /** An object already exists. */ + ALREADY_EXISTING = 2, + /** A bad checksum. */ + BAD_CRC = 3, + /** An object could not be created. */ + CANT_CREATE = 4, + /** Data could not be read from a file. */ + CANT_READ = 5, + /** A seek operation could not be run. */ + CANT_SEEK = 6, + /** A tell operation could not be run. */ + CANT_TELL = 7, + /** Data could not be written to a file. */ + CANT_WRITE = 8, + /** A function is not possible because the path contains the current directory. */ + CURRENT_DIRECTORY = 9, + /** A device (drive) not ready. */ + DEVICE_NOT_READY = 10, + /** A function is not possible because the devices (drives) are not identical. */ + DIFFERENT_DEVICES = 11, + /** A general input/output error. */ + GENERAL = 12, + /** An invalid attempt was made to access an object. */ + INVALID_ACCESS = 13, + /** A file name contains invalid characters. */ + INVALID_CHARACTER = 14, + /** A specified device is invalid. */ + INVALID_DEVICE = 15, + /** Invalid data length. */ + INVALID_LENGTH = 16, + /** An operation was started with an invalid parameter. */ + INVALID_PARAMETER = 17, + /** An operation cannot be run on file names containing wildcards. */ + IS_WILDCARD = 18, + /** A locking problem. */ + LOCKING_VIOLATION = 19, + /** An invalid file name. */ + MISPLACED_CHARACTER = 20, + /** A file name is too long. */ + NAME_TOO_LONG = 21, + /** An object is not a directory. */ + NO_DIRECTORY = 25, + /** An object is not a file. */ + NO_FILE = 26, + /** A nonexistent object. */ + NOT_EXISTING = 22, + /** The path to a file does not exist. */ + NOT_EXISTING_PATH = 23, + /** An action is not supported. */ + NOT_SUPPORTED = 24, + /** No more space on a device. */ + OUT_OF_DISK_SPACE = 27, + /** No more file handles available. */ + OUT_OF_FILE_HANDLES = 28, + /** An operation could not be run due to insufficient memory. */ + OUT_OF_MEMORY = 29, + /** An operation is still pending. */ + PENDING = 30, + /** An object cannot be copied into itself. */ + RECURSIVE = 31, + /** + * Unknown. + * + * An unknown I/O error has occurred. + */ + UNKNOWN = 32, + /** A function is not possible because the object is write protected. */ + WRITE_PROTECTED = 33, + /** An incorrect file format. */ + WRONG_FORMAT = 34, + /** An incorrect file version. */ + WRONG_VERSION = 35, + } + + /** + * defines a depth for a lock. + * @see Lock + */ + const enum LockDepth { + /** Infinity (includes children and children's children and ...). */ + INFINITY = 2, + /** One (includes children). */ + ONE = 1, + /** Zero (includes no children). */ + ZERO = 0, + } + + /** + * defines the scope of a lock. + * @see LockEntry + */ + const enum LockScope { + /** the lock is exclusive. */ + EXCLUSIVE = 0, + /** the lock is shared. */ + SHARED = 1, + } + + /** + * specifies the access type of a lock. + * @see LockEntry + */ + const enum LockType { + /** specifies a write lock.read lock.read-write lock. */ + WRITE = 0, + } + + /** These are the possible values for {@link RecipientInfo.State} . */ + const enum OutgoingMessageState { + /** Message has been sent upstream to all recipients. */ + COMPLETELY_LOCALLY_SENT = 2, + /** Recipient confirmed reading. */ + CONFIRMED = 7, + /** Global fatal error (e.g. last member in SMTP chain could not deliver the message). */ + EXTERNAL_ERROR = 5, + /** Local fatal error (e.g. first SMTP server upstream did not accept the message). */ + NONRECOVERABLE_LOCAL_ERROR = 4, + /** Message has been sent upstream to some recipients. */ + PARTIALLY_LOCALLY_SENT = 1, + /** Local, non-fatal error (e.g. network temporarily not available). */ + RECOVERABLE_LOCAL_ERROR = 3, + /** Message was sent; we are waiting for confirmation. */ + WAITING_CONFIRMATION = 6, + /** Message has just been placed into the out tray. */ + WRITTEN = 0, + } + + /** + * These are the possible values for the property "Priority". + * @see XCommandProcessor + * @see Content + */ + const enum Priority { + /** High priority. */ + HIGH = 1, + /** Highest priority. */ + HIGHEST = 0, + /** Low priority. */ + LOW = 3, + /** Lowest priority. */ + LOWEST = 4, + /** Normal priority. */ + NORMAL = 2, + } + + /** + * defines the states of a property value in the process of obtaining the value (asynchronously). + * @see PropertyValueInfo + */ + const enum PropertyValueState { + /** The given property name/handle is invalid. */ + INVALID_NAME = 2, + /** The given property type is invalid. */ + INVALID_TYPE = 3, + /** The value was obtained.

The value is stored in PropertyValueInfo::Value. */ + PROCESSED = 1, + /** The property value was not obtained yet. */ + UNPROCESSED = 0, + } + + /** A specification of how long to remember some authentication data. */ + const enum RememberAuthentication { + /** Do not remember the authentication data (use it once and immediately forget about it). */ + NO = 0, + /** Remember the authentication data "forever". */ + PERSISTENT = 2, + /** Remember the authentication data, but only until the end of the current session. */ + SESSION = 1, + } + + /** + * An indication used in a {@link com.sun.star.ucb.RemoteContentProviderChangeEvent} to specify whether a remote content provider has been added to or + * removed from an {@link com.sun.star.ucb.XRemoteContentProviderSupplier} . + * @author Stephan Bergmann + * @version 1.0 + */ + const enum RemoteContentProviderChangeAction { + /** The indicator that a remote content provider has been added. */ + ADDED = 0, + /** The indicator that a remote content provider has been removed. */ + REMOVED = 1, + } + + /** + * the various modes of recursion when searching through a hierarchical object. + * @see SearchInfo + */ + const enum SearchRecursion { + /** Searches through the complete hierarchy of all sub-objects. */ + DEEP = 2, + /** Does not search through any sub-objects. */ + NONE = 0, + /** Only searches through sub-objects of the first hierarchy level. */ + ONE_LEVEL = 1, + } + + /** + * These are the possible values for the property "SynchronizePolicy". + * @see XCommandProcessor + * @see Content + */ + const enum SynchronizePolicy { + /** Client is master. */ + CLIENT_IS_MASTER = 1, + /** None is master. */ + NONE_IS_MASTER = 2, + /** Server is master. */ + SERVER_IS_MASTER = 0, + } + + /** These are the possible values for {@link GlobalTransferCommandArgument.Operation} . */ + const enum TransferCommandOperation { + /** + * Copy the source to the target folder. + * + * WebDAV methods as defined in [HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)]{@link + * url="http://tools.ietf.org/html/rfc4918#section-9.8"} + */ + COPY = 0, + /** Create a link in the target folder. The link's target is the source object. */ + LINK = 2, + /** + * Move the source to the target folder. + * + * WebDAV methods as defined in [HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)]{@link + * url="http://tools.ietf.org/html/rfc4918#section-9.9"} + */ + MOVE = 1, + } + + /** + * These are the possible values for the property "VerificationMode". + * @see XCommandProcessor + * @see Content + */ + const enum VerificationMode { + /** Always. */ + ALWAYS = 0, + /** Never. */ + NEVER = 2, + /** Once. */ + ONCE = 1, + } + + /** + * Standard WebDAV/HTTP methods. + * @since Apache OpenOffice 4.0, LibreOffice 4.2 + */ + const enum WebDAVHTTPMethod { + /** HTTP request method as defined in [RFC 2616: Hypertext Transfer Protocol - HTTP/1.1]{@link url="http://tools.ietf.org/html/rfc2616#section-9.9"} */ + CONNECT = 7, + /** + * Copy the source to the target folder. + * + * WebDAV methods as defined in [HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)]{@link + * url="http://tools.ietf.org/html/rfc4918#section-9.8"} + */ + COPY = 12, + /** HTTP request method as defined in [RFC 2616: Hypertext Transfer Protocol - HTTP/1.1]{@link url="http://tools.ietf.org/html/rfc2616#section-9.7"} */ + DELETE = 4, + /** + * Get a list of all folders. + * + * HTTP request method as defined in [RFC 2616: Hypertext Transfer Protocol - HTTP/1.1]{@link url="http://tools.ietf.org/html/rfc2616#section-9.3"} + */ + GET = 0, + /** HTTP request method as defined in [RFC 2616: Hypertext Transfer Protocol - HTTP/1.1]{@link url="http://tools.ietf.org/html/rfc2616#section-9.4"} */ + HEAD = 1, + /** + * WebDAV methods as defined in [HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)]{@link + * url="http://tools.ietf.org/html/rfc4918#section-9.10"} + */ + LOCK = 14, + /** + * WebDAV methods as defined in [HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)]{@link + * url="http://tools.ietf.org/html/rfc4918#section-9.3"} + */ + MKCOL = 11, + /** + * Move the source to the target folder. + * + * WebDAV methods as defined in [HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)]{@link + * url="http://tools.ietf.org/html/rfc4918#section-9.9"} + */ + MOVE = 13, + /** HTTP request method as defined in [RFC 2616: Hypertext Transfer Protocol - HTTP/1.1]{@link url="http://tools.ietf.org/html/rfc2616#section-9.2"} */ + OPTIONS = 6, + /** HTTP request method as defined in [RFC 5789: PATCH Method for HTTP]{@link url="http://tools.ietf.org/html/rfc5789"} */ + PATCH = 8, + /** HTTP request method as defined in [RFC 2616: Hypertext Transfer Protocol - HTTP/1.1]{@link url="http://tools.ietf.org/html/rfc2616#section-9.5"} */ + POST = 2, + /** + * WebDAV methods as defined in [HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)]{@link + * url="http://tools.ietf.org/html/rfc4918#section-9.1"} + */ + PROPFIND = 9, + /** + * WebDAV methods as defined in [HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)]{@link + * url="http://tools.ietf.org/html/rfc4918#section-9.2"} + */ + PROPPATCH = 10, + /** HTTP request method as defined in [RFC 2616: Hypertext Transfer Protocol - HTTP/1.1]{@link url="http://tools.ietf.org/html/rfc2616#section-9.6"} */ + PUT = 3, + /** HTTP request method as defined in [RFC 2616: Hypertext Transfer Protocol - HTTP/1.1]{@link url="http://tools.ietf.org/html/rfc2616#section-9.8"} */ + TRACE = 5, + /** + * WebDAV methods as defined in [HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)]{@link + * url="http://tools.ietf.org/html/rfc4918#section-9.11"} + */ + UNLOCK = 15, + } + + /** + * is a factory to get {@link XAnyCompare} service implementations. + * @since OOo 1.1.2 + */ + interface AnyCompareFactory extends XAnyCompareFactory { + createWithLocale(aLocale: lang.Locale): void; + } + + /** + * An interaction continuation handing back some authentication data + * @since LibreOffice 4.4 + */ + interface AuthenticationFallbackRequest extends task.ClassifiedInteractionRequest { + /** Instructions to be followed by the user */ + instructions: string; + + /** url to be opened in browser */ + url: string; + } + + /** An error specifying lack of correct authentication data (e.g., to log into an account). */ + interface AuthenticationRequest extends task.ClassifiedInteractionRequest { + /** + * Any already specified account. + * + * If HasAccount is false, this member should be ignored. + */ + Account: string; + + /** Any diagnostic message about the failure to log in (if applicable; it will typically be an English phrase or sentence). */ + Diagnostic: string; + + /** Specifies if the authentication involves an "account" (as can be the case for FTP). */ + HasAccount: boolean; + + /** Specifies if the authentication involves a "password" (as is almost always the case). */ + HasPassword: boolean; + + /** Specifies if the authentication involves a "realm" (as can be the case for HTTP). */ + HasRealm: boolean; + + /** Specifies if the authentication involves a "user name" (as is almost always the case). */ + HasUserName: boolean; + + /** + * Any already specified password. + * + * If HasPassword is false, this member should be ignored. + */ + Password: string; + + /** + * Any already specified realm. + * + * If HasRealm is false, this member should be ignored. + */ + Realm: string; + + /** The name of the server (if applicable). */ + ServerName: string; + + /** + * Any already specified user name. + * + * If HasUserName is false, this member should be ignored. + */ + UserName: string; + } + + /** + * is used on client side to access a {@link ContentResultSet} remote optimized. + * + * The {@link CachedContentResultSet} will not load every single property or even row just in that moment you ask for it, but load the data for some rows + * beforehand. + * + * Every time when a new package of data is loaded, the so far loaded data will be released, so the cash will not grow and grow and grow. + */ + interface CachedContentResultSet extends ContentResultSet { + /** + * contains the direction for fetching rows from an underlying database. + * + * The value can be one of the {@link com.sun.star.sdbc.FetchDirection} constants group. + * + * The default value is implementation specific. + * + * If you set the value to {@link com.sun.star.sdbc.FetchDirection.UNKNOWN} an implementation specific direction will be used. + */ + FetchDirection: number; + + /** + * contains the number of result set rows that should be fetched from an underlying database. + * + * The default fetch size is implementation specific. + * + * Every negative value for parameter {@link FetchSize} will force an implementation specific value to be set. + */ + FetchSize: number; + } + + /** is used on provider side to access a {@link ContentResultSet} remote optimized. */ + interface CachedContentResultSetStub extends ContentResultSet, XFetchProvider, XFetchProviderForContentAccess { } + + /** + * provides read access to a static or dynamically changing {@link ContentResultSet} . + * + * For example, a {@link DynamicResultSet} is returned from the open-command executed by an {@link XCommandProcessor} of the service {@link Content} . + */ + interface CachedDynamicResultSet extends XDynamicResultSet, XSourceInitialization { } + + /** + * provides read access to a static or dynamically changing {@link ContentResultSet} . + * + * For example, a {@link DynamicResultSet} is returned from the open-command executed by an {@link XCommandProcessor} of the service {@link Content} . + */ + interface CachedDynamicResultSetStub extends XDynamicResultSet, XSourceInitialization { } + + /** An error specifying an invalid certificate. */ + interface CertificateValidationRequest extends task.ClassifiedInteractionRequest { + /** The certificate himself. */ + Certificate: security.XCertificate; + + /** This value describes the validity of the certificate. */ + CertificateValidity: number; + + /** The host name. */ + HostName: string; + } + + /** + * contains information needed to checkin a document. + * + * The checkin command is always called on the target private working copy document. + */ + interface CheckinArgument { + /** Tells whether to create a new major or minor version during the checkin. */ + MajorVersion: boolean; + + /** contains the Mime-Type of the content to check-in as it may be different from the original one. */ + MimeType: string; + + /** + * contains the title of the transferred object, if it is different from the original one. + * + * If this field is filled, for example, a file will be renamed while it is being checked in. + */ + NewTitle: string; + + /** contains the URL of the source of the action (e.g. the URL of the temporary file to checkin). */ + SourceURL: string; + + /** contains the URL of the private working copy to checkin. */ + TargetURL: string; + + /** Contains the version comment to set during the checkin. */ + VersionComment: string; + } + + /** + * contains a command. + * @see XCommandProcessor + */ + interface Command { + /** contains the argument of the command */ + Argument: any; + + /** + * contains an implementation specific handle for the command. + * + * It must be `-1` if the implementation has no handle. `0` is a valid command handle. + */ + Handle: number; + + /** contains the name of the command. */ + Name: string; + } + + interface CommandEnvironment extends XCommandEnvironment { + /** + * Constructor. + * @param InteractionHandler the interaction handler instance that will be returned by this service's implementation of XCommandEnvironemt::getInteractionH + * @param ProgressHandler the progress handler instance that will be returned by this service's implementation of XCommandEnvironemt::getProgressHandler() + */ + create(InteractionHandler: task.XInteractionHandler, ProgressHandler: XProgressHandler): void; + } + + /** + * This exception is thrown if an exception situation occurred during the processing of a command and an {@link com.sun.star.task.XInteractionHandler} + * was able to handle the request for the error condition and the requesting code decided to abort the command execution according to the selection made + * by the interaction handler. + * @author Kai Sommerfeld + * @see XCommandProcessor + * @version 1.0 + */ + interface CommandFailedException extends uno.Exception { + /** contains the exception that was passed to the {@link com.sun.star.task.XInteractionHandler} . */ + Reason: any; + } + + /** + * describes a command. + * @see XCommandProcessor + */ + interface CommandInfo { + /** contains the type of the command's argument. */ + ArgType: type; + + /** + * contains an implementation specific handle for the command. + * + * It may be `-1` if the implementation has no handle. + */ + Handle: number; + + /** contains the name of a command. */ + Name: string; + } + + /** + * This event gets delivered whenever a {@link XCommandInfo} is changed. + * + * A {@link CommandInfoChangeEvent} object is sent to XCommandInfoChangeListeners. + */ + interface CommandInfoChangeEvent extends lang.EventObject { + /** + * contains the implementation handle for the command. + * + * May be `-1` if the implementation has no handle. + */ + Handle: number; + + /** contains the name of the command. */ + Name: string; + + /** + * contains the reason for the event. + * + * The value can be one of the {@link CommandInfoChange} constants. + */ + Reason: number; + } + + /** A {@link Content} is a service that provides access to data of a content provided by an implementation of the service {@link ContentProvider} . */ + interface Content extends XContent, lang.XComponent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, beans.XPropertyContainer, + beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, XContentCreator, container.XChild { } + + /** + * This exception is thrown to indicate that the creation of a UCB content failed. + * @author Kai Sommerfeld + * @version 1.0 + */ + interface ContentCreationException extends uno.Exception { + /** An error code. */ + eError: ContentCreationError; + } + + /** A structure for content events. */ + interface ContentEvent extends lang.EventObject { + /** + * The action. + * + * The value can be one of the {@link ContentAction} constants. + */ + Action: number; + + /** + * The content to that the action is related (e.g., the content that was just physically destroyed, the content that was just inserted into a folder + * content). + * + * This member must be filled as follows: + * + * {{table here, see documentation}} + */ + Content: XContent; + + /** + * A content identifier, which must be filled according to the action notified (e.g., the id of the folder content into which another content was + * inserted). + * + * This member must be filled as follows: + * + * {{table here, see documentation}} + */ + Id: XContentIdentifier; + } + + /** + * A structure for information about contents. + * @see XContentCreator + * @see XCommandProcessor + */ + interface ContentInfo { + /** + * Additional attributes. + * + * These flags contain extra information on the content, like its kind (KIND_FOLDER, KIND_DOCUMENT, KIND_LINK). + * + * It is highly recommended to fill these flags very accurately, as they are very important when transferring contents between different + * ContentProviders. + * + * The value can be one of the {@link ContentInfoAttribute} constants. + */ + Attributes: number; + + /** + * This field contains a list with the properties which must be set at a content that was just created using {@link XContentCreator.createNewContent()} + * before it can be committed (by executing the command "insert" at the new content). + * + * If one of the properties is missing, the insert command will fail. + * + * In example, a new file system folder content will need a title. The Properties member of the {@link ContentInfo} provided for this kind of content + * must include the property "Title". + * + * **Important:** The required properties must have one of the following basic data types (in order to make it possible to implement client applications + * with a small set of generic input methods for the values): + * + * booleancharbytestringshortlonghyperfloatdouble + */ + Properties: SafeArray; + + /** + * A type identifier string for a content. + * + * This is an implementation specific string characterizing the kind of a content (e.g. "application/vnd.sun.star.hierarchy-link"). The value of this + * member should match the value returned by {@link XContent.getContentType()} of an appropriate content. + */ + Type: string; + } + + /** provides access to a set of Contents. */ + interface ContentProvider extends XContentProvider, XContentIdentifierFactory, XParameterizedContentProvider { } + + /** + * A structure for content provider information. + * @see XContentProviderManager + */ + interface ContentProviderInfo { + /** The content provider. */ + ContentProvider: XContentProvider; + + /** The scheme the Provider is registered for. */ + Scheme: string; + } + + /** + * is a proxy for a content provider. + * + * Implementing a content provider proxy can be useful if the creation of the real content provider object shall be deferred for some reason (i.e. + * performance) until the first method gets called on it. Instead of instantiating and registering the real provider at the UCB, a proxy for the real + * provider can be created and registered at the UCB. + * @see XContentProviderProxyFactory + */ + interface ContentProviderProxy extends uno.XInterface, XContentProviderSupplier, XContentProvider, XParameterizedContentProvider { } + + /** + * provides access to the children of a folder content. + * + * It can be understand as a table containing a row for each child. The table columns may contain values of properties of the children. + */ + interface ContentResultSet extends lang.XComponent, sdbc.XResultSetMetaDataSupplier, sdbc.XResultSet, sdbc.XRow, sdbc.XCloseable, beans.XPropertySet, + XContentAccess, sdbc.ResultSet { + /** + * controls the travel mode of the result set cursor. + * + * There are two possible travel modes: + * + * {{table here, see documentation}} + * + * The following pseudo-code illustrates the usage of a non-blocking cursor: + * + * {{program example here, see documentation}} + * + * + * + * If this property is not supported, the implementation needs to provide a blocking cursor. + * + * The implementation initially needs to set the value of this property to CursorTravelMode::BLOCKING. + * @see CursorTravelMode + */ + CursorTravelMode: number; + + /** indicates that all rows of the result set have been obtained. */ + IsRowCountFinal: boolean; + + /** contains the number of rows obtained (so far) from the data source. */ + RowCount: number; + } + + /** + * This struct contains information describing a cross reference. + * + * Such references are kept by news servers for managing articles contained in multiple groups. An article can have a sequence of cross references. + */ + interface CrossReference { + /** The name of a news group. */ + Group: string; + + /** The unique identifier (relative to the server) of an article in the given group. */ + Id: number; + } + + /** This struct contains a name-value pair of a document header (i.e. the "subject" field and the appropriate value of a MIME message). */ + interface DocumentHeaderField { + /** The name of the header field. */ + Name: string; + + /** The value of the header field. */ + Value: string; + } + + /** information needed to export an object in mbx format (supplying an output stream to export into). */ + interface ExportStreamInfo { + /** tries hard to make message (document) bodies available for export. */ + ForceBodies: boolean; + + /** the output stream to export into. */ + Target: io.XOutputStream; + } + + /** + * contains data of several rows of a {@link ContentResultSet} . + * + * This struct is returned from {@link XFetchProvider.fetch()} , for example. + */ + interface FetchResult { + /** + * indicates whether and which error has occurred, while fetching. + * + * The value may contain zero or more constants of the {@link FetchError} constants group. + */ + FetchError: number; + + /** + * indicates the orientation in which the rows are fetched and set into the sequence {@link FetchResult.Rows} . + * + * When {@link FetchResult.Orientation} equals `TRUE` , the rows in {@link FetchResult.Rows} are ordered in the same way as in the original result set. + */ + Orientation: boolean; + + /** + * contains the demanded data. + * + * One any contains the data of one whole row. Those methods which use this struct have to specify, what the any has to contain. + */ + Rows: SafeArray; + + /** + * indicates the index of the first row contained in {@link FetchResult.Rows} in the original result set. So if {@link FetchResult.StartIndex} equals `3` + * , the first element in the sequence {@link FetchResult.Rows} contains the data of the index `3` in the original result set. + * + * The following rows are one after the other, but the direction depends on the value of FetchResult::Direction + */ + StartIndex: number; + } + + /** + * A File {@link Content} represents either a directory or a file in the local file system. + * + * Whether a content represents a folder or a file can be determined by inspecting its property **IsFolder** or **IsDocument** . + * @see com.sun.star.ucb.FileContentProvider + */ + interface FileContent extends lang.XComponent, XContent, XContentCreator, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, + beans.XPropertyContainer, beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild { } + + /** + * The File {@link Content} Provider (FCP) implements a {@link ContentProvider} for the {@link UniversalContentBroker} (UCB). + * + * The served contents enable access to the local file system. + * + * The FCP is able to restrict access to the local file system to a number of directories shown to the client under configurable alias names. + * @see com.sun.star.ucb.Content + */ + interface FileContentProvider extends XContentProvider, XContentIdentifierFactory, beans.XPropertySet, XFileIdentifierConverter { } + + /** A list of folders. */ + interface FolderList { + /** The command to process on this list of folders. */ + Command: FolderListCommand; + + /** The list of folders (only used in conjunction with FolderListCommand::SET). */ + List: SafeArray; + } + + /** Information about a single folder in a {@link FolderList} . */ + interface FolderListEntry { + /** + * A (unique) identifier for the folder (used by IMAP, where different folders with equal human-readable titles may exist; otherwise, it may be left + * empty). + */ + ID: string; + + /** The folder is new. */ + New: boolean; + + /** The folder shall be purged (only used in conjunction with the FolderListCommand::SET). */ + Purge: boolean; + + /** The folder has been removed. */ + Removed: boolean; + + /** The folder is subscribed. */ + Subscribed: boolean; + + /** The title of the folder. */ + Title: string; + } + + /** + * A {@link FTPContent} provides an object representing either a (ftp-server-side) directory object allowing listing of children or a content object + * providing access to a (ftp-server-side) file. + * @see com.sun.star.ucb.FTPContentProvider + * @since OOo 1.1.2 + */ + interface FTPContent extends lang.XComponent, XContent, XContentCreator, XCommandProcessor, beans.XPropertiesChangeNotifier, beans.XPropertyContainer, + beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild { } + + /** This struct contains information needed to transfer objects from one location to another. */ + interface GlobalTransferCommandArgument { + /** + * describes how to act in case of title clashes while transferring the data. + * + * A title clash for instance occurs, if a file named "foo.txt" is to be transferred to a folder already containing another file named "foo.txt". Refer + * to {@link NameClash} for possible values for this field. + */ + NameClash: number; + + /** + * contains the title of the transferred object, if it is different from the original one. + * + * If this field is filled, for example, a file will be renamed while it is being transferred. + */ + NewTitle: string; + + /** contains the action to perform ( COPY, MOVE, LINK ). */ + Operation: TransferCommandOperation; + + /** contains the URL of the source object. */ + SourceURL: string; + + /** contains the URL of the target folder. */ + TargetURL: string; + } + + /** This struct extends the one for transfers arguments by adding a Mime type and a Document Id property to it. */ + interface GlobalTransferCommandArgument2 extends GlobalTransferCommandArgument { + /** contains the DocumentId of the source object. */ + DocumentId: string; + + /** contains the MIME type of the source object. */ + MimeType: string; + } + + interface GnomeVFSDocumentContent extends lang.XComponent, XContent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, + beans.XPropertyContainer, beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild { } + + /** + * A DCP Folder is a container for other DCP Folders or Documents. + * @see com.sun.star.ucb.GnomeVFSContentProvider + * @see com.sun.star.ucb.GnomeVFSDocumentContent + */ + interface GnomeVFSFolderContent extends lang.XComponent, XContent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, + beans.XPropertyContainer, beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild, XContentCreator { } + + /** + * A Help {@link Content} represents either a directory object allowing access to a search engine and to index information for the respective module, or + * an object allowing access to the concrete written help content. + * @see com.sun.star.ucb.HelpContentProvider + */ + interface HelpContent extends lang.XComponent, XContent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, beans.XPropertyContainer, + beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild { } + + /** + * provides read access to a fragment of the hierarchy data. + * + * A hierarchy data source provides access to a tree of hierarchy data nodes. Each hierarchy data node, except the root node, has a parent that is a + * hierarchy data node too. A hierarchy data node has a name. + * + * Each hierarchy data node has three data members: + * + * "Title", which is of type `string` . It contains a title for the node. This value must not be empty."TargetURL", which is of type `string` It may + * contain any URL, which will be treated as the target of a hierarchy link."Children", which is of type {@link HierarchyDataReadAccess} or of type + * {@link HierarchyDataReadWriteAccess} , depending on the type of the node. This member provides access to the children of a node. + */ + interface HierarchyDataReadAccess extends container.XNameAccess, container.XHierarchicalNameAccess, util.XChangesNotifier, lang.XComponent { } + + /** provides read and write access to a fragment of the hierarchy data. */ + interface HierarchyDataReadWriteAccess extends HierarchyDataReadAccess, container.XNameContainer, lang.XSingleServiceFactory, util.XChangesBatch { } + + /** + * manages one or more complete sets of hierarchy data and serves as a factory for objects that provide access to a subset of the data. + * + * **Note:** This is an abstract service. This means, that there should never be implementations that can be instantiated using the service name + * `com.sun.star.ucb.HierarchyDataSource` . Each implementation must provide its own service name that can be used to create instances of that service + * implementation. Important for those service specifications is also to specify which of the optional parts are supported by the implementation. + */ + interface HierarchyDataSource extends lang.XMultiServiceFactory, lang.XComponent { } + + /** + * A HCP Folder is a container for other HCP Folders and HCP Links. + * @see com.sun.star.ucb.HierarchyContentProvider + * @see com.sun.star.ucb.HierarchyRootFolderContent + * @see com.sun.star.ucb.HierarchyLinkContent + */ + interface HierarchyFolderContent extends lang.XComponent, XContent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, + beans.XPropertyContainer, beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild, XContentCreator { } + + /** + * A HCP {@link Link} is a content which points to another location. + * + * It is always contained in HCP Folder. A HCP {@link Link} has no children. + * @see com.sun.star.ucb.HierarchyContentProvider + * @see com.sun.star.ucb.HierarchyRootFolderContent + * @see com.sun.star.ucb.HierarchyFolderContent + */ + interface HierarchyLinkContent extends lang.XComponent, XContent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, + beans.XPropertyContainer, beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild { } + + /** + * A HCP Root Folder is the root container for all other HCP Folders and HCP Links. + * + * It always has the URL "vnd.sun.star.hier:/". A HCP Root Folder neither can't be created nor deleted by a UCB client. + * @see com.sun.star.ucb.HierarchyContentProvider + * @see com.sun.star.ucb.HierarchyFolderContent + * @see com.sun.star.ucb.HierarchyLinkContent + */ + interface HierarchyRootFolderContent extends lang.XComponent, XContent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, + beans.XPropertyContainer, beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild, XContentCreator { } + + /** + * The argument for the command "insert". + * @see XCommandProcessor + */ + interface InsertCommandArgument { + /** + * A stream containing document data. + * + * This member can be left blank, if no (new) document data shall be written by the implementation of the "insert" command. + */ + Data: io.XInputStream; + + /** + * A flag indicating whether a possibly existing content (and its data) shall be overwritten. + * + * Implementations that are not able to detect whether there are previous data may ignore this parameter and will always write the new data. + */ + ReplaceExisting: boolean; + } + + /** The argument for the command "insert" augmented with some properties */ + interface InsertCommandArgument2 extends InsertCommandArgument { + /** contains the Document Id of the document to insert */ + DocumentId: string; + + /** contains the MIME type of the document to insert */ + MimeType: string; + } + + /** + * An application error. + * @since OOo 1.1.2 + */ + interface InteractiveAppException extends task.ClassifiedInteractionRequest { + /** The type of application error. */ + Code: number; + } + + /** An input/output error with arguments. */ + interface InteractiveAugmentedIOException extends InteractiveIOException { + /** + * Additional arguments. + * + * See {@link com.sun.star.task.InteractionHandler} for a description of well-known arguments. + */ + Arguments: SafeArray; + } + + /** + * An input/output error while processing a file. + * + * This exception is deprecated. Use {@link InteractiveAugmentedIOException} instead. + * @deprecated Deprecated + */ + interface InteractiveFileIOException extends InteractiveIOException { + /** The file url where the i/o error occurred */ + FileName: string; + } + + /** An input/output error. */ + interface InteractiveIOException extends task.ClassifiedInteractionRequest { + /** The type of input/output error. */ + Code: IOErrorCode; + } + + /** + * An error related to locking operations. + * + * Various meaningful errors are derived from this exception. + * @since OOo 3.3 + */ + interface InteractiveLockingException extends task.ClassifiedInteractionRequest { + /** The Url of the resource this exception is related to. */ + Url: string; + } + + /** + * An error indicating that the resource is locked. + * @since OOo 3.3 + */ + interface InteractiveLockingLockedException extends InteractiveLockingException { + /** + * The owner of the lock. + * + * `TRUE` , the lock has been obtained by this OOo session. `FALSE` the lock has been obtained by another principal. + */ + SelfOwned: boolean; + } + + /** A network error specifying a connection failure. */ + interface InteractiveNetworkConnectException extends InteractiveNetworkException { + /** The name of the server to which connecting failed. */ + Server: string; + } + + /** A network error specifying a read failure. */ + interface InteractiveNetworkReadException extends InteractiveNetworkException { + /** Any diagnostic message about the failure (which will typically be an English phrase or sentence). */ + Diagnostic: string; + } + + /** A network error specifying a name resolution failure. */ + interface InteractiveNetworkResolveNameException extends InteractiveNetworkException { + /** The server name for which resolution failed. */ + Server: string; + } + + /** A network error specifying a write failure. */ + interface InteractiveNetworkWriteException extends InteractiveNetworkException { + /** Any diagnostic message about the failure (which will typically be an English phrase or sentence). */ + Diagnostic: string; + } + + /** is thrown when the wrong medium is inserted into a removable drive during an operation. */ + interface InteractiveWrongMediumException extends task.ClassifiedInteractionRequest { + /** identifies the medium thats needed to continue with the pending operation. */ + Medium: any; + } + + /** + * defines a link. + * @see XCommandProcessor + */ + interface Link { + /** contains the destination URI of the link. */ + Destination: string; + + /** contains the source URI of the link. */ + Source: string; + } + + /** + * This struct contains information needed in the notifications of a {@link XDynamicResultSet} . + * @see ListEvent + */ + interface ListAction { + /** + * depending on the content of {@link ListAction.ListActionType} the {@link ListAction.ActionInfo} could contain additional information about the changes + * happened (see table above). + */ + ActionInfo: any; + + /** The count of involved rows. */ + Count: number; + + /** + * specifies the kind of modification happened to all assigned rows. + * + * The value of the other members of this struct depend on the value of this member: + * + * {{table here, see documentation}} + */ + ListActionType: number; + + /** + * The position where something has happened (index begins with `1` as usual with JDBC ). + * + * Its value does not necessary indicate the new position in the new {@link com.sun.star.sdbc.XResultSet} , but a position while doing the changes step + * by step beginning with the old {@link com.sun.star.sdbc.XResultSet} . + */ + Position: number; + } + + /** specifies the type of event fired by an {@link XDynamicResultSet} */ + interface ListEvent extends lang.EventObject { + /** + * If you apply the given ListActions one after the other to the old version of an result set in given order, you will get the positions in the new + * version. + */ + Changes: SafeArray; + } + + /** defines a lock. */ + interface Lock extends LockEntry { + /** defines the lock's depth. */ + Depth: LockDepth; + + /** + * the lock tokens. + * + * Each lock token is a URI. + */ + LockTokens: SafeArray; + + /** + * the owner of the lock. + * + * This element provides information sufficient for either directly contacting a principal (such as a telephone number or email URI), or for discovering + * the principal (such as the URL of a homepage) who owns the lock. + */ + Owner: any; + + /** + * a timeout value for the lock. + * + * This element specifies the number of seconds between granting of the lock and the automatic removal of that lock. The value must not be greater than + * `2^32-1` . A value of `-1` stands for an infinite lock, that will never be removed automatically. + */ + Timeout: number; + } + + /** defines the types of locks that can be used with a resource. */ + interface LockEntry { + /** defines the lock's scope. */ + Scope: LockScope; + + /** defines the type of the lock. */ + Type: LockType; + } + + /** + * This exception is used to indicate that there are properties missing. + * + * For example, to create a new resource, usually one ore more property values must be set prior to executing the command "insert", which makes the new + * resource persistent. + * @author Kai Sommerfeld + * @see Content + * @version 1.0 + */ + interface MissingPropertiesException extends uno.Exception { + /** contains the names of the missing properties. */ + Properties: SafeArray; + } + + /** An exception used to notify a name clash. */ + interface NameClashException extends task.ClassifiedInteractionRequest { + /** contains the clashing name. */ + Name: string; + } + + /** + * This request is used to indicate a name clash. + * + * For example, when copying a file there might be another file in the target folder that has the same file name as the source file. + * + * If this exception is passed to an {@link com.sun.star.task.XInteractionHandler} an {@link XInteractionSupplyName} and an {@link + * XInteractionReplaceExistingData} should be supplied with the {@link com.sun.star.task.XInteractionRequest} . On return the {@link + * XInteractionSupplyName} , if selected, will contain a new name supposed to resolve the name clash. The {@link XInteractionReplaceExistingData} will be + * selected if the clashing resource shall be overwritten. + * @author Kai Sommerfeld + * @version 1.0 + */ + interface NameClashResolveRequest extends task.ClassifiedInteractionRequest { + /** contains the clashing name. */ + ClashingName: string; + + /** + * contains a proposal for a new new, non-clashing name. + * + * This field may be left empty if the implementation is not able to suggest a new name. + */ + ProposedNewName: string; + + /** contains the URL of the folder that contains the clashing resource. */ + TargetFolderURL: string; + } + + /** + * contains information for sorting a {@link ContentResultSet} . + * + * In contrast to the struct {@link SortingInfo} this struct is used to be on the safe side, that no one asks for sorting by a property which is not + * contained in a {@link ContentResultSet} . + */ + interface NumberedSortingInfo { + /** contains a flag indicating the sort mode (ascending or descending). */ + Ascending: boolean; + + /** sort the result set by this column. Index starts with `1` . */ + ColumnIndex: number; + } + + /** + * A OCP content is representation of a document saved in a DMS. + * + * The document {@link Content} corresponds to a document stored in a Document Management System. + * @see com.sun.star.ucb.ODMAContentProvider + * @see com.sun.star.ucb.Content + * @since OOo 1.1.2 + */ + interface ODMAContent extends lang.XComponent, XContent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, beans.XPropertyContainer, + beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild { } + + /** + * The argument for commands like "open", "update", and "synchronize". + * @see XCommandProcessor + */ + interface OpenCommandArgument { + /** + * A mode. + * + * The value can be one of the {@link OpenMode} constants. + */ + Mode: number; + + /** The command's priority, in the range `0` (highest) to `65535` (lowest). */ + Priority: number; + + /** The properties, for that the values shall be provided by the {@link DynamicResultSet} returned by the command). */ + Properties: SafeArray; + + /** + * The data sink to write the contents into (supporting either {@link com.sun.star.io.XActiveDataSink} , {@link com.sun.star.io.XOutputStream} or {@link + * com.sun.star.io.XActiveDataStreamer} ). + * + * XActiveDataSink and XOutputStream give the caller read-only access to the contents. XActiveDataStreamer offers both read and write access to the + * contents. + * + * If an XActiveDataSink is supplied, the implementation of the command needs to provide an implementation of an object implementing the interface {@link + * com.sun.star.io.XInputStream} . It is highly recommended that this object also implements the interface {@link com.sun.star.io.XSeekable} , if this + * can be done without wasting resources (i.e. allocating huge memory buffers). The implementation object has to be supplied to the data sink. + */ + Sink: uno.XInterface; + } + + /** + * The argument for commands like "open", "update", and "synchronize". + * + * This struct extends the original {@link OpenCommandArgument} , which must not be changed for compatibility reasons. + * @see XCommandProcessor + */ + interface OpenCommandArgument2 extends OpenCommandArgument { + /** + * The sort criteria for the rows of the returned {@link ContentResultSet} . + * + * The result set implementation may ignore this parameter, if it cannot sort the data by the given criteria in an efficient way (i.e. directly using the + * underlying data source -> SQL-database -> ORDER BY). + */ + SortingInfo: SafeArray; + } + + /** + * Extended argument for commands like "open" + * + * We're extending {@link OpenCommandArgument} even more, to provide some opening flags on to webdav. + * @see XCommandProcessor + */ + interface OpenCommandArgument3 extends OpenCommandArgument2 { + /** + * Flags to use for opening. + * + * WebDav e.g. uses "KeepAlive" to enable/disable the respective http feature. + */ + OpeningFlags: SafeArray; + } + + /** + * A PCP Folder is a container for other PCP Folders and PCP Streams. + * @see com.sun.star.ucb.PackageContentProvider + * @see com.sun.star.ucb.PackageStreamContent + */ + interface PackageFolderContent extends lang.XComponent, XContent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, + beans.XPropertyContainer, beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild, XContentCreator { } + + /** + * A PCP Stream is a content which represents a file inside a package. + * + * It is always contained in a PCP Folder. A PCP Stream has no children. + * @see com.sun.star.ucb.PackageContentProvider + * @see com.sun.star.ucb.PackageFolderContent + */ + interface PackageStreamContent extends lang.XComponent, XContent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, + beans.XPropertyContainer, beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild { } + + /** This service contains the interfaces to implement by objects returned by {@link XPropertySetRegistry.openPropertySet()} . */ + interface PersistentPropertySet extends XPersistentPropertySet, container.XNamed, beans.XPropertyContainer, beans.XPropertyAccess { } + + /** + * The argument for the command "post". + * @see XCommandProcessor + */ + interface PostCommandArgument { + /** The data sink receiving the returned contents (supporting either {@link com.sun.star.io.XActiveDataSink} or {@link com.sun.star.io.XOutputStream} ). */ + Sink: uno.XInterface; + + /** The data source containing the data to post. */ + Source: io.XInputStream; + } + + /** + * The argument for the command "post". + * @see XCommandProcessor + * @see WebDAVDocumentContent + */ + interface PostCommandArgument2 extends PostCommandArgument { + /** The media type (mime type) for the data to post. */ + MediaType: string; + + /** The URL of the referrer. */ + Referer: string; + } + + /** + * The argument for the "addProperty" command. + * @see XCommandProcessor + * @since Apache OpenOffice 4.0, LibreOffice 4.2 + */ + interface PropertyCommandArgument { + /** The default value of the property. */ + DefaultValue: any; + + /** The property that the command has to add. */ + Property: beans.Property; + } + + /** This service contains the interfaces to implement by objects returned by XPropertySetRegistryFactory::createRegistry(). */ + interface PropertySetRegistry extends XPropertySetRegistry, container.XNameAccess { } + + /** contains value and state of a {@link com.sun.star.beans.Property} . */ + interface PropertyValueInfo extends beans.PropertyValue { + /** the state of the property value. */ + ValueState: PropertyValueState; + } + + /** + * contains all information needed to send a message using one send protocol. + * + * To send one message via two different protocols, two RecipientInfos are needed - to send one message to different users with one protocol, one {@link + * RecipientInfo} can be used. + */ + interface RecipientInfo { + /** + * the recipient(s) of "blind carbon copy" (e.g. e-mail address/es). + * + * Multiple addresses are separated by commas. + */ + BCC: string; + + /** + * the recipient(s) of a "carbon copy" (e.g. e-mail address/es). + * + * Multiple addresses are separated by commas. + */ + CC: string; + + /** + * the newsgroup(s) to which an article is be posted. + * + * Multiple addresses are separated by commas. + */ + Newsgroups: string; + + /** the password to be used for authorizing on the send server. */ + Password: string; + + /** the number representing the last error (generated by send server). */ + ProtocolErrorNumber: number; + + /** string representing the last error (generated by send server). */ + ProtocolErrorString: string; + + /** the protocol to use for sending (i.e. "NNTP", "SMTP", "VIM"). */ + ProtocolType: string; + + /** the count of tries to send a message. This count is `1` if the message was sent with the first try and increases with every unsuccessful retry. */ + SendTries: number; + + /** the name of the server to be used for sending the message. */ + Server: string; + + /** the current state of the message. */ + State: OutgoingMessageState; + + /** + * the recipient(s) (e.g. e-mail address/es). + * + * Multiple addresses are separated by commas. + */ + To: string; + + /** the user name to be used for authorizing on the send server. */ + Username: string; + + /** the Post Office Path (VIM only). */ + VIMPostOfficePath: string; + } + + /** A {@link RemoteAccessContentProvider} is a {@link ContentProvider} that provides access to contents available at other (remote) UCBs. */ + interface RemoteAccessContentProvider extends ContentProvider, XParameterizedContentProvider { } + + /** allows content providers running in remote processes to be registered at the local content provider broker. */ + interface RemoteContentProviderAcceptor extends XRemoteContentProviderAcceptor, XRemoteContentProviderActivator { } + + /** + * The description of a change to a {@link com.sun.star.ucb.XRemoteContentProviderSupplier} . + * @author Stephan Bergmann + * @version 1.0 + */ + interface RemoteContentProviderChangeEvent extends lang.EventObject { + /** An indicator whether a remote content provider has been added or removed. */ + Action: RemoteContentProviderChangeAction; + + /** The identifier with which the remote content provider is registered at the {@link com.sun.star.ucb.XRemoteContentProviderSupplier} . */ + Identifier: string; + } + + /** + * A {@link ContentProvider} that wraps remote content providers that (potentially) have been distributed to a UCB. + * + * Before trying to pass a request to a "real", underlying content provider (which will most likely be a remote content provider distributed to this + * UCB), this proxy first activates any remote content providers that have been distributed here, but are still inactive (see {@link + * RemoteContentProviderAcceptor} and {@link XRemoteContentProviderActivator} for more information). + * + * The way this works might change, therefore this interface is marked as deprecated. + * @deprecated Deprecated + */ + interface RemoteProxyContentProvider extends XContentProvider, XContentIdentifierFactory, XParameterizedContentProvider { } + + /** + * describes a rule that can be applies to a number of objects. + * + * A rule consists of a sequence of RuleTerms describing the objects to which the rule should be applied, the {@link RuleAction} which should be used on + * the matching objects, and a parameter. + */ + interface Rule { + /** + * the action to perform on the matching objects. + * + * The value can be one of the {@link RuleAction} constants. + */ + Action: number; + + /** + * Some RuleActions require a parameter. + * + * {{table here, see documentation}} + */ + Parameter: string; + + /** the rule terms describing the objects to which the rule should be applied. */ + Terms: SafeArray; + } + + /** + * describes a set of Rules. + * + * A {@link RuleSet} is applied to a folder. It consists of a sequence of rules. Each rule consists of a sequence of RuleTerms describing the objects to + * which the rule should by applied and the {@link RuleAction} which should be performed on the matching objects. + */ + interface RuleSet { + /** is a flag indicating whether the rules apply to folders, too. */ + HandleFolder: boolean; + + /** contains a number of rules. */ + Rules: SafeArray; + } + + /** + * describes a term. + * + * A term is used to select objects to which a rule should apply. + */ + interface RuleTerm { + /** this flag indicates whether a string "operand" shall be compared case sensitive. */ + CaseSensitive: boolean; + + /** the value of the property used to compare with the document property. */ + Operand: any; + + /** + * the operator used to compare the property of the document with the given value (e.g. "contains" or "greater equal"). + * + * The value can be one of the {@link RuleOperator} constants. + */ + Operator: number; + + /** the name of the property used to match the term. */ + Property: string; + + /** this flag indicates whether a string "operand" shall be treated as a regular expression. */ + RegularExpression: boolean; + } + + /** + * The argument for the command "search". + * @see XCommandProcessor + */ + interface SearchCommandArgument { + /** the search criteria. */ + Info: SearchInfo; + + /** the properties for which values shall be provided through the {@link ContentResultSet} returned by the search command. */ + Properties: SafeArray; + } + + /** a criterion describing how an object must match some rules that specify (part of) a search. */ + interface SearchCriterium { + /** a number of rule terms. */ + Terms: SafeArray; + } + + /** information needed to (recursively) search an object. */ + interface SearchInfo { + /** the search criteria. */ + Criteria: SafeArray; + + /** whether to follow indirections (link objects) and search through their respective targets also. */ + FollowIndirections: boolean; + + /** whether to include the object itself in the search or only (some of) its sub-objects. */ + IncludeBase: boolean; + + /** the mode of recursion to use. */ + Recursion: SearchRecursion; + + /** + * whether to respect the "view restrictions" specified for the documents hierarchically contained within an object (e.g., only searches through marked + * documents). + */ + RespectDocViewRestrictions: boolean; + + /** + * whether to respect the "view restrictions" specified for the folders hierarchically contained within an object (e.g., only searches through subscribed + * folders). + */ + RespectFolderViewRestrictions: boolean; + } + + /** + * contains information related to a send protocol. + * + * It can contain any string values (server names, user names, passwords, ...). + */ + interface SendInfo { + /** the protocol to which the info is related (i.e. "NNTP", "SMTP", "VIM"). */ + ProtocolType: string; + + /** the value. */ + Value: string; + } + + /** contains a list of Internet media types (like "text/plain" and "text/html"), that are related to a send protocol. */ + interface SendMediaTypes { + /** the protocol to which the information is related (i.e. "NNTP", "SMTP", "VIM"). */ + ProtocolType: string; + + /** a list of Internet media types */ + Value: SafeArray; + } + + /** contains a sorting info. */ + interface SortingInfo { + /** contains a flag indicating the sort mode (ascending or descending). */ + Ascending: boolean; + + /** specifies the name of a property to use for sorting ( e.g. "Title" ). */ + PropertyName: string; + } + + /** + * contains information needed to transfer objects from one location to another. + * + * The transfer command is always called on the target folder. For a details description of the transfer command refer to the documentation of service + * {@link Content} . + */ + interface TransferInfo { + /** contains the flags describing whether the data shall be moved instead of copied. */ + MoveData: boolean; + + /** + * describes how to act in case of title clashes while transferring the data. + * + * A title clash for instance occurs, if a file named "foo.txt" is to be transferred to a folder already containing another file named "foo.txt". + * + * The value can be one of the {@link NameClash} constants. + * + * Implementations that are not able to detect whether there is a clashing resource may ignore {@link NameClash.ERROR} and {@link NameClash.RENAME} + * always write the new data. + */ + NameClash: number; + + /** + * contains the title of the transferred object, if it is different from the original one. + * + * If this field is filled, for example, a file will be renamed while it is being transferred. + */ + NewTitle: string; + + /** contains the URL of the source of the action (e.g. the URL of a file to move). */ + SourceURL: string; + } + + /** extends {@link TransferInfo} structure to give some additional parameters for transfers. */ + interface TransferInfo2 extends TransferInfo { + /** contains the MIME type of the source of the action */ + MimeType: string; + } + + /** Information about a transfer activity. */ + interface TransferResult { + /** Either void if the transfer has been carried out successfully, or an exception indicating the kind of failure. */ + Result: any; + + /** The URL of the source object. */ + Source: string; + + /** The URL of the target folder into which to transfer (a copy of) the source object. */ + Target: string; + } + + /** + * A TDCP Document represents the root folder of a transient document. + * + * It is a container for other TDCP Folders and TDCP Streams. It is always a child of the TDCP Root. + * @see TransientDocumentsContentProvider + * @see TransientDocumentsRootContent + * @see TransientDocumentsFolderContent + * @see TransientDocumentsStreamContent + * @since OOo 2.0 + */ + interface TransientDocumentsDocumentContent extends lang.XComponent, XContent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, + beans.XPropertyContainer, beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild, XContentCreator { } + + /** + * A TDCP Folder is a container for other TDCP Folders and TDCP Streams. + * + * It may be contained in another TDCP Folder or in a TDCP Document. + * @see TransientDocumentsContentProvider + * @see TransientDocumentsRootContent + * @see TransientDocumentsDocumentContent + * @see TransientDocumentsStreamContent + * @since OOo 2.0 + */ + interface TransientDocumentsFolderContent extends lang.XComponent, XContent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, + beans.XPropertyContainer, beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild, XContentCreator { } + + /** + * A TDCP Root Folder is the root container for all other TDCP contents. + * + * There is at most one instance of a TDCP Root at a time. All other TDCP contents are children of this folder. The TDCP Root Folder can contain only + * TDCP Documents. It has the fixed URL "vnd.sun.star.tdoc:/". + * @see TransientDocumentsContentProvider + * @see TransientDocumentsDocumentContent + * @see TransientDocumentsFolderContent + * @see TransientDocumentsStreamContent + * @since OOo 2.0 + */ + interface TransientDocumentsRootContent extends lang.XComponent, XContent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, + beans.XPropertyContainer, beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild { } + + /** + * A TDCP Stream is a content which represents a data stream of an Office document. + * + * It is contained in a TDCP Folder or TDCP Document. A TDCP Stream has no children. + * @see TransientDocumentsContentProvider + * @see TransientDocumentsRootContent + * @see TransientDocumentsDocumentContent + * @see TransientDocumentsFolderContent + * @since OOo 2.0 + */ + interface TransientDocumentsStreamContent extends lang.XComponent, XContent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, + beans.XPropertyContainer, beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild { } + + /** + * is a one-instance service that provides access to a set of Contents via ContentProviders. + * + * Traditionally, this service implements {@link com.sun.star.lang.XInitialization} and needed to be instantiated once with two arguments via {@link + * com.sun.star.lang.XMultiComponentFactory.createInstanceWithArgumentsAndContext()} for configuration before it could be obtained via plain {@link + * com.sun.star.lang.XMultiComponentFactory.createInstanceWithContext()} . + * + * However, the only pair of initialization arguments used in practice is `"Local"` / `"Office"` , so this service is simplified now to automatically + * configure itself with that argument pair upon first instantiation. + * + * (For backwards compatibility, the service implementation still supports {@link com.sun.star.lang.XInitialization} and can still explicitly be + * initialized via {@link com.sun.star.lang.XMultiComponentFactory.createInstanceWithArgumentsAndContext()} with two arguments of type string. These + * strings are used as a pair of keys to retrieve a set of content provider descriptions from the configuration management (stored at + * `org.openoffice.ucb.Configuration.ContentProviders.key1.SecondaryKeys.key2.ProviderData` within the configuration management's hierarchy). The + * retrieved descriptions are in turn used to register the corresponding content provider services at the broker.) + */ + interface UniversalContentBroker extends XUniversalContentBroker { + /** + * The (default) constructor. + * + * (This default constructor is only mentioned explicitly for technical reasons, so that its implementation calls the service implementation's {@link + * com.sun.star.lang.XInitialization.initialize()} .) + */ + create(): void; + } + + /** + * This exception is used to indicate that the requested type of data sink is not supported. + * + * For example, each {@link OpenCommandArgument} supplied as argument of the command "open" contains such a data sink. + * @author Kai Sommerfeld + * @see Content + * @version 1.0 + */ + interface UnsupportedDataSinkException extends uno.Exception { + /** contains the data sink that is not supported. */ + Sink: uno.XInterface; + } + + /** + * This exception must be thrown in case the requested name clash directive is not supported, because it is not possible to implement it or if it is just + * not (yet) implemented. + * + * {@link Command} "transfer": Used if the name clash directive specified in parameter {@link NameClash} of the supplied {@link TransferInfo} is not + * supported. For example, if the {@link NameClash} was set to {@link NameClash.ERROR} , to {@link NameClash.RENAME} or to {@link NameClash.ASK} , the + * implementation must be able determine whether there are existing data. This exception must also be used if {@link NameClash.RENAME} was specified and + * the implementation is unable to create a valid new name after a suitable number of tries. + * + * {@link Command} "insert": Used if the parameter ReplaceExisting of the supplied {@link InsertCommandArgument} was set to `FALSE` and the + * implementation is unable to determine whether there are existing data. The member {@link NameClash} of the exception must be set to {@link + * NameClash.ERROR} + * @author Kai Sommerfeld + * @see Content + * @version 1.0 + */ + interface UnsupportedNameClashException extends uno.Exception { + /** contains the {@link NameClash} that is not supported. */ + NameClash: number; + } + + /** + * This exception is used to indicate that the requested {@link OpenMode} is not supported. + * + * For example, each {@link OpenCommandArgument} supplied as argument of the command "open" contains such an open mode. + * @author Kai Sommerfeld + * @see Content + * @version 1.0 + */ + interface UnsupportedOpenModeException extends uno.Exception { + /** contains the {@link OpenMode} that is not supported. */ + Mode: number; + } + + /** + * An error specifying lack of correct authentication data (e.g., to log into an account). + * @since OOo 3.2 + */ + interface URLAuthenticationRequest extends AuthenticationRequest { + /** The URL for which authentication is requested. */ + URL: string; + } + + /** + * A DCP Document is a container for Document data/content. + * + * The data/content may be anything, a WebDAV server, like an HTTP server, does not necessarily mandate what type of data/content may be contained within + * Documents. The type of data/content is defined by the MediaType property which is different from the content type returned from the {@link + * XContent.getContentType()} method. The MediaType property is mapped to the equivalent WebDAV property and the WebDAV server calculates the value. + * @see com.sun.star.ucb.WebDAVContentProvider + * @see com.sun.star.ucb.WebDAVFolderContent + */ + interface WebDAVDocumentContent extends lang.XComponent, XContent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, + beans.XPropertyContainer, beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild { } + + /** + * A DCP Folder is a container for other DCP Folders or Documents. + * @see com.sun.star.ucb.WebDAVContentProvider + * @see com.sun.star.ucb.WebDAVDocumentContent + */ + interface WebDAVFolderContent extends lang.XComponent, XContent, XCommandProcessor, XCommandProcessor2, beans.XPropertiesChangeNotifier, beans.XPropertyContainer, + beans.XPropertySetInfoChangeNotifier, XCommandInfoChangeNotifier, container.XChild, XContentCreator { } + + /** + * This struct is to be contained in the first notification of an {@link XDynamicResultSet} . + * @see XDynamicResultSet + * @see ListEvent + * @see ListAction + * @see ListActionType + */ + interface WelcomeDynamicResultSetStruct { + /** The static result set containing the new version of result set data. */ + New: sdbc.XResultSet; + + /** The static result set containing the previous version of result set data. */ + Old: sdbc.XResultSet; + } + + /** compares two `any` s. */ + interface XAnyCompare extends uno.XInterface { + /** + * allows comparison of two `any` s. + * @param Any1 is the first compare value + * @param Any2 is the second compare value + * @returns `-1` , if the first any is less than the second ( Any1 < Any2 )`0` , if the first any is equal to the second ( Any1 == Any2 )`+1` , if the first + */ + compare(Any1: any, Any2: any): number; + } + + /** creates an {@link XAnyCompare} instance. */ + interface XAnyCompareFactory extends uno.XInterface { + /** + * creates an {@link XAnyCompare} instance. + * @param PropertyName is the name of a property + * @returns a compare interface + */ + createAnyCompareByName(PropertyName: string): XAnyCompare; + } + + /** creates a {@link CachedContentResultSet} . */ + interface XCachedContentResultSetFactory extends uno.XInterface { + /** + * creates a remote optimized {@link com.sun.star.sdbc.XResultSet} . + * @param xSource must be an instance of service {@link CachedContentResultSetStub} . + * @param xMapping can be used for optimization of remote access via the interface {@link XContentAccess} of the {@link CachedContentResultSet} . This para + * @returns an instance of service {@link CachedContentResultSet} . + */ + createCachedContentResultSet(xSource: sdbc.XResultSet, xMapping: XContentIdentifierMapping): sdbc.XResultSet; + } + + /** creates a {@link CachedContentResultSetStub} . */ + interface XCachedContentResultSetStubFactory extends uno.XInterface { + /** + * creates a remote optimized {@link com.sun.star.sdbc.XResultSet} . + * @param xSource must be an instance of service {@link ContentResultSet} . + * @returns an instance of service {@link CachedContentResultSetStub} . + */ + createCachedContentResultSetStub(xSource: sdbc.XResultSet): sdbc.XResultSet; + } + + /** + * creates a {@link CachedDynamicResultSet} . + * + * Pay attention to instantiate this helper on client side where your want to read the data respectively where you have instantiated the listener to the + * {@link XDynamicResultSet} . + * + * The needed stub on server side can be created using {@link XCachedDynamicResultSetStubFactory} . + */ + interface XCachedDynamicResultSetFactory extends uno.XInterface { + /** + * creates a remote optimizes {@link XDynamicResultSet} . + * @param SourceStub must be an instance of service {@link CachedDynamicResultSetStub} . It can be `NULL` . In this case you can use the interface {@link X + * @param ContentIdentifierMapping is not required, but can be set if it is necessary to change the identity of the contents accessible via the interface { + * @returns an instance of service {@link CachedDynamicResultSet} . + */ + createCachedDynamicResultSet(SourceStub: XDynamicResultSet, ContentIdentifierMapping: XContentIdentifierMapping): XDynamicResultSet; + } + + /** + * creates a {@link CachedDynamicResultSetStub} and connects a non-remote optimized {@link DynamicResultSet} to a remote optimized {@link + * CachedDynamicResultSet} . + * + * Pay attention to instantiate this helper on server side where your source {@link DynamicResultSet} was instantiated. + * + * Method {@link XCachedDynamicResultSetStubFactory.createCachedDynamicResultSetStub()} can be used to create a stub on server side. + * + * If you have instantiated a {@link CachedDynamicResultSet} on client side already, use method {@link connectToCache()} to connect your given {@link + * DynamicResultSet} with this Cache. + * + * The needed cache on server side you can create using {@link XCachedDynamicResultSetFactory} . + */ + interface XCachedDynamicResultSetStubFactory extends uno.XInterface { + /** + * If you have instantiated a {@link CachedDynamicResultSet} on client side already, use this to connect your given Source on server side to the + * TargetCache. + * @param Source is an instance of service {@link DynamicResultSet} . + * @param TargetCache is an instance of service {@link CachedDynamicResultSet} . + * @param SortingInfo can be an empty sequence. Otherwise, Source will be sorted according to the given sorting data. + * @param CompareFactory will be ignored unless {@link SortingInfo} is not empty. Then the supplied factory will be used to instantiate objects used to com + * @throws ListenerAlreadySetException if `Source` is already in use. + * @throws AlreadyInitializedException if `TargetCache` already has been initialized. + */ + connectToCache(Source: XDynamicResultSet, TargetCache: XDynamicResultSet, SortingInfo: LibreOffice.SeqEquiv, CompareFactory: XAnyCompareFactory): void; + + /** + * creates a remote optimizes {@link XDynamicResultSet} . + * @param Source must be an instance of service {@link DynamicResultSet} . + * @returns an instance of service {@link CachedDynamicResultSetStub} . + */ + createCachedDynamicResultSetStub(Source: XDynamicResultSet): XDynamicResultSet; + } + + /** + * defines the environment for a command. + * @author Kai Sommerfeld + * @see XCommandProcessor + * @version 1.0 + */ + interface XCommandEnvironment extends uno.XInterface { + /** + * returns the command's interaction handler. + * + * If called multiple times, this method should consistently return the same value (to allow caching). + * @returns an interaction handler + */ + getInteractionHandler(): task.XInteractionHandler; + + /** + * returns the command's progress handler. + * + * If called multiple times, this method should consistently return the same value (to allow caching). + * @returns a progress handler + */ + getProgressHandler(): XProgressHandler; + + /** + * returns the command's interaction handler. + * + * If called multiple times, this method should consistently return the same value (to allow caching). + * @returns an interaction handler + */ + readonly InteractionHandler: task.XInteractionHandler; + + /** + * returns the command's progress handler. + * + * If called multiple times, this method should consistently return the same value (to allow caching). + * @returns a progress handler + */ + readonly ProgressHandler: XProgressHandler; + } + + /** + * provides access to information on a set of commands. + * @author Kai Sommerfeld + * @version 1.0 + */ + interface XCommandInfo extends uno.XInterface { + /** + * obtains information for all supported commands. + * @returns a sequence with information for all supported commands. + */ + readonly Commands: SafeArray; + + /** + * returns information for a specific command. + * @param Handle specifies the handle of the requested command. + * @returns the information for the requested command. + * @throws UnsupportedCommandException if the command is not supported. + */ + getCommandInfoByHandle(Handle: number): CommandInfo; + + /** + * returns information for a specific command. + * @param Name specifies the name of the requested command. + * @returns the information for the requested command. + * @throws UnsupportedCommandException if the command is not supported. + */ + getCommandInfoByName(Name: string): CommandInfo; + + /** + * obtains information for all supported commands. + * @returns a sequence with information for all supported commands. + */ + getCommands(): SafeArray; + + /** + * checks whether a specific command is supported. + * @param Handle specifies the handle of the requested command. + * @returns `TRUE` if a command with the specified handle is supported; otherwise `FALSE` is returned. + */ + hasCommandByHandle(Handle: number): boolean; + + /** + * checks whether a command specific is supported. + * @param Name specifies the name of the requested command. + * @returns `TRUE` if a command with the specified name is supported; otherwise `FALSE` is returned. + */ + hasCommandByName(Name: string): boolean; + } + + /** + * a listener for events related to changing XCommandInfos. + * @author Kai Sommerfeld + * @see CommandInfoChangeEvent + * @see XCommandInfoChangeNotifier + * @version 1.0 + */ + interface XCommandInfoChangeListener extends lang.XEventListener { + /** + * gets called whenever changes of a {@link XCommandInfo} shall be propagated. + * @param evt the event. + */ + commandInfoChange(evt: CommandInfoChangeEvent): void; + } + + /** + * a notifier for changes of XCommandInfos. + * @author Kai Sommerfeld + * @see CommandInfoChangeEvent + * @see XCommandInfoChangeListener + * @version 1.0 + */ + interface XCommandInfoChangeNotifier extends uno.XInterface { + /** + * registers a listener for CommandInfoChangeEvents. + * @param Listener the listener to add. + */ + addCommandInfoChangeListener(Listener: XCommandInfoChangeListener): void; + + /** + * removes a listener for CommandInfoChangeEvents. + * @param Listener the listener to remove. + */ + removeCommandInfoChangeListener(Listener: XCommandInfoChangeListener): void; + } + + /** + * defines a processor for synchronous commands, which are executed in a specific execution environment. + * @author Kai Sommerfeld + * @see com.sun.star.ucb.XCommandProcessor2 for the improved version of this interface. + * @see Command + * @see XCommandEnvironment + * @see XContent + * @version 1.0 + */ + interface XCommandProcessor extends uno.XInterface { + /** + * ends the command associated with the given id. + * + * Not every command can be aborted. It's up to the implementation to decide whether this method will actually end the processing of the command or + * simply do nothing. + * @param CommandId is a unique id for the command to abort. This must be the identifier passed to {@link XCommandProcessor.execute()} for the command to abort. + */ + abort(CommandId: number): void; + + /** + * creates a unique identifier for a command. + * + * This identifier can be used to abort the execution of the command associated with that identifier. Note that it is generally not necessary to obtain a + * new id for each command, because commands are executed synchronously. So the id for a command is valid again after a command previously associated + * with this id has finished. In fact you only should get one identifier per thread and assign it to every command executed by that thread. + * + * Also, after a call to {@link XCommandProcessor.abort()} , an identifier should not be used any longer (and instead be released by a call to {@link + * XCommandProcessor2.releaseCommandIdentifier()} ), because it may well abort **all** further calls to {@link XCommandProcessor.execute()} . + * + * To avoid ever-increasing resource consumption, the identifier should be released via {@link XCommandProcessor2.releaseCommandIdentifier()} when it is + * no longer used. + * @returns a command identifier. + */ + createCommandIdentifier(): number; + + /** + * executes a command. + * + * Common command definitions can be found in the specification of the service {@link Content} . + * @param aCommand is the command to execute. + * @param CommandId is a unique id for the command. This identifier was obtained by calling {@link XCommandProcessor.createCommandIdentifier()} . A value o + * @param Environment is the execution environment. + * @returns the result according to the specification of the command. + * @throws CommandAbortedException to indicate that the command was aborted. + * @throws DuplicateCommandIdentifierException to indicate that two threads tried to use the same command identifier + * @throws Exception if an error occurred during the execution of the command. + */ + execute(aCommand: Command, CommandId: number, Environment: XCommandEnvironment): any; + } + + /** An improved version of a {@link com.sun.star.ucb.XCommandProcessor} that helps avoid ever-increasing resource consumption. */ + interface XCommandProcessor2 extends XCommandProcessor { + /** + * releases a command identifier obtained through {@link XCommandProcessor.createCommandIdentifier()} when it is no longer used. + * + * After this call the command identifier cannot be used any longer in calls to {@link XCommandProcessor.execute()} and {@link XCommandProcessor.abort()} + * . (But it can happen that a call to {@link XCommandProcessor.createCommandIdentifier()} reuses this identifier.) + * @param CommandId A command identifier obtained through {@link XCommandProcessor.createCommandIdentifier()} . If the identifier is zero, the request is s + */ + releaseCommandIdentifier(CommandId: number): void; + } + + /** + * specifies a content with a type and an identifier, which is able to manage listeners for events that are related to contents. + * @author Kai Sommerfeld + * @see XContentIdentifier + * @see XContentEventListener + * @version 1.0 + */ + interface XContent extends uno.XInterface { + /** + * adds a listener for content events. + * @param Listener the listener to add. + * @see ContentEvent + */ + addContentEventListener(Listener: XContentEventListener): void; + + /** + * returns a type string, which is unique for that type of content (e.g. "application/vnd.sun.star.hierarchy-folder"). + * @returns the content type string. + */ + readonly ContentType: string; + + /** + * returns a type string, which is unique for that type of content (e.g. "application/vnd.sun.star.hierarchy-folder"). + * @returns the content type string. + */ + getContentType(): string; + + /** + * returns the identifier of the content. + * @returns the identifier. + */ + getIdentifier(): XContentIdentifier; + + /** + * returns the identifier of the content. + * @returns the identifier. + */ + readonly Identifier: XContentIdentifier; + + /** + * removes a listener for content events. + * @param Listener the listener to remove. + * @see ContentEvent + */ + removeContentEventListener(Listener: XContentEventListener): void; + } + + /** + * specifies methods for obtaining information on a content in different levels. + * + * For example, if there is a cursor which points to XContents, this interface could be used to give the user access to the content under the cursor. If + * the client only needs the identifier string of the content, there is no need to first create the content object, then to obtain the string from it and + * after that to release the content. + * @author Kai Sommerfeld + * @see XContent + * @see XContentIdentifier + * @version 1.0 + */ + interface XContentAccess extends uno.XInterface { + /** + * returns the content ( "most expensive method" ). + * @returns the content. + */ + queryContent(): XContent; + + /** + * returns the identifier object of the content. + * @returns the identifier object. + */ + queryContentIdentifier(): XContentIdentifier; + + /** + * returns the identifier string of the content ( "cheap method" ). + * + * Note that this string can be used later to recreate the content. + * @returns the identifier string. + */ + queryContentIdentifierString(): string; + } + + /** + * A creator for new (persistent) contents, like file system folders. + * + * Creation of a new (persistent) content: 1. creatabletypes = creator.queryCreatableContentsInfo() 2. choose a suitable type from creatabletypes 3. + * newObject = creator.createNewContent( type ) 4. initialize the new object (i.e. newObject.Property1 = ...) 5. let the new content execute the command + * "insert". That command commits the data and makes the new content persistent. + * @author Kai Sommerfeld + * @deprecated Deprecated This interface is deprecated. Use {@link Content} property "CreatableContentsInfo" and command "createNewContent" instead. + * @see XContent + * @see XCommandProcessor + * @version 1.0 + */ + interface XContentCreator extends uno.XInterface { + /** + * creates a new content of given type. + * @param Info the content information. + * @returns the new content, if operation was successful. + */ + createNewContent(Info: ContentInfo): XContent; + + /** + * returns a list with information about the creatable contents. + * @returns the list with information about the creatable contents. + */ + queryCreatableContentsInfo(): SafeArray; + } + + /** + * a listener for events related to XContents. + * @author Kai Sommerfeld + * @see XContent + * @version 1.0 + */ + interface XContentEventListener extends lang.XEventListener { + /** + * gets called whenever a content wishes to notify changes. + * @param evt the event. + */ + contentEvent(evt: ContentEvent): void; + } + + /** + * An identifier for contents. + * @author Kai Sommerfeld + * @see XContent + * @version 1.0 + */ + interface XContentIdentifier extends uno.XInterface { + /** + * returns the content identifier string. + * @returns the content identifier string. This must be a valid URI (Uniform Resource Identifier, see RFC 2396). This string is required. If a content provid + */ + readonly ContentIdentifier: string; + + /** + * returns the content provider scheme string. + * + * This string will be calculated from the content identifier string and must be lower-cased(!). It is the "scheme" the content provider is registered + * for. In example, a provider for FTP contents will use ftp-URLs as content identifiers. The content provider scheme for all contents provided by that + * provider will be "ftp". + * @returns the content provider scheme string. + */ + readonly ContentProviderScheme: string; + + /** + * returns the content identifier string. + * @returns the content identifier string. This must be a valid URI (Uniform Resource Identifier, see RFC 2396). This string is required. If a content provid + */ + getContentIdentifier(): string; + + /** + * returns the content provider scheme string. + * + * This string will be calculated from the content identifier string and must be lower-cased(!). It is the "scheme" the content provider is registered + * for. In example, a provider for FTP contents will use ftp-URLs as content identifiers. The content provider scheme for all contents provided by that + * provider will be "ftp". + * @returns the content provider scheme string. + */ + getContentProviderScheme(): string; + } + + /** + * A factory for content identifiers. + * @author Kai Sommerfeld + * @see XContentIdentifier + * @version 1.0 + */ + interface XContentIdentifierFactory extends uno.XInterface { + /** + * creates an identifier. + * @param ContentId the content identifier string. + * @returns the identifier. + */ + createContentIdentifier(ContentId: string): XContentIdentifier; + } + + /** + * A mapping from a (source) set of XContentIdentifiers to another (target) set of XContentIdentifiers. + * + * For convenience and performance, mapping between the string representations of source/target XContentIdentifiers, as well as mapping between XContents + * identified by source/target XContentIdentifiers is also supported. + * + * This interface can be useful in cases where the identifiers (and associated contents) returned by the various methods of an {@link XContentAccess} + * need to be mapped to some other space of identifiers (and associated contents). + * @see XContent + * @see XContentAccess + * @see XContentIdentifier + */ + interface XContentIdentifierMapping extends uno.XInterface { + /** + * Map the {@link XContent} identified by an {@link XContentIdentifier} . + * @param Source The {@link XContent} identified by an {@link XContentIdentifier} from the source set. + * @returns The {@link XContent} identified by the target set's {@link XContentIdentifier} corresponding to the source identifier. The returned {@link XConte + */ + mapContent(Source: XContent): XContent; + + /** + * Map an {@link XContentIdentifier} . + * @param Source An {@link XContentIdentifier} from the source set. + * @returns The target set's {@link XContentIdentifier} corresponding to the source identifier. The returned {@link XContentIdentifier} may be null if either + */ + mapContentIdentifier(Source: XContentIdentifier): XContentIdentifier; + + /** + * Map the string representation of an {@link XContentIdentifier} . + * @param Source The string representation of an {@link XContentIdentifier} from the source set. + * @returns The string representation of the target set's {@link XContentIdentifier} corresponding to the source identifier. The returned string may be empty + */ + mapContentIdentifierString(Source: string): string; + + /** + * Map the content identifiers (or related data) contained in the columns of a {@link com.sun.star.sdbc.XRow} . + * @param Value On input, a sequence of anys corresponding to the columns of the XRow (the first column goes into the zeroth position of the sequence, and + * @returns `TRUE` if any of the columns contain data that (potentially) needs mapping (though maybe no mapping occurred for the concrete input data of this + */ + mapRow(Value: [LibreOffice.SeqEquiv]): boolean; + } + + /** + * a content provider which creates and manages XContents. + * @author Kai Sommerfeld + * @see XContent + * @see XContentIdentifier + * @version 1.0 + */ + interface XContentProvider extends uno.XInterface { + /** + * compares two XContentIdentifiers. + * @param Id1 first content identifier. + * @param Id2 second content identifier. + * @returns `0` is returned, if the identifiers are equal. A value less than `0` indicates, that the Id1 is less than Id2. A value greater than `0` is return + */ + compareContentIds(Id1: XContentIdentifier, Id2: XContentIdentifier): number; + + /** + * creates a new {@link XContent} instance, if the given {@link XContentIdentifier} matches a content provided by the implementation of this interface. + * @param Identifier an identifier for the content to query. + * @returns the content. + * @throws IllegalIdentifierException if the given identifier does not match a content provided by the implementation of this interface + */ + queryContent(Identifier: XContentIdentifier): XContent; + } + + /** + * a factory for a {@link XContentProvider} . + * @author Kai Sommerfeld + * @see XContentProvider + * @version 1.0 + */ + interface XContentProviderFactory extends uno.XInterface { + /** + * creates a {@link XContentProvider} implementation object. + * @param Service the name of the UNO service to be used to create the implementation of the content provider. + * @returns a content provider. + */ + createContentProvider(Service: string): XContentProvider; + } + + /** + * makes it possible to query/register/deregister content providers. + * @author Kai Sommerfeld + * @see XContentProvider + * @version 1.0 + */ + interface XContentProviderManager extends uno.XInterface { + /** + * deregisters a content provider. + * @param Provider a content provider to deregister. + * @param Scheme the URL scheme for the provided contents. More generally, this may not only be a URL scheme, but a URL template (see {@link registerConten + */ + deregisterContentProvider(Provider: XContentProvider, Scheme: string): void; + + /** + * returns the currently active content provider for a content identifier. + * @param Identifier a content identifier (i.e., a URL). + * @returns a content provider, or null. + */ + queryContentProvider(Identifier: string): XContentProvider; + + /** + * returns a list of information on all registered content providers. + * @returns a list information on content providers. + */ + queryContentProviders(): SafeArray; + + /** + * registers a content provider for a specific URL template. + * @param Provider the content provider to register. This may be `NULL` , in which case a later {@link XContentProvider.queryContent()} with an {@link XCo + * @param Scheme the URL scheme for the provided contents. More generally, this may not only be a URL scheme, but a URL template. A URL template is a regu + * @param ReplaceExisting `TRUE` : replace the provider possibly registered for the given URL template. The replaced provider will not be deregistered auto + * @returns the replaced content provider, if there was one. + * @see XContentIdentifier + */ + registerContentProvider(Provider: XContentProvider, Scheme: string, ReplaceExisting: boolean): XContentProvider; + } + + /** + * a supplier for a content provider. + * @author Kai Sommerfeld + * @see XContentProvider + * @version 1.0 + */ + interface XContentProviderSupplier extends uno.XInterface { + /** + * returns a content provider. + * @returns a content provider. + */ + readonly ContentProvider: XContentProvider; + + /** + * returns a content provider. + * @returns a content provider. + */ + getContentProvider(): XContentProvider; + } + + /** + * @author Dirk Voelzke + * @deprecated Deprecated + * @see + * @version 1.0 + */ + interface XContentTransmitter extends uno.XInterface { + transmit(Source: string, Destination: string, Flags: number): void; + } + + /** + * specifies a container for (binary) data. + * + * A data container may contain data and/or other data containers. A typical container with children is a MIME message with attachments. + * @author Kai Sommerfeld + * @deprecated Deprecated + * @version 1.0 + */ + interface XDataContainer extends container.XIndexContainer { + /** + * returns the content type (MIME Type) of the data container. + * @returns the content type + */ + ContentType: string; + + /** + * returns the data of the data container. + * @returns the data + */ + Data: SafeArray; + + /** + * Deprecated. Do not use! + * @deprecated Deprecated + */ + DataURL: string; + + /** + * returns the content type (MIME Type) of the data container. + * @returns the content type + */ + getContentType(): string; + + /** + * returns the data of the data container. + * @returns the data + */ + getData(): SafeArray; + + /** + * Deprecated. Do not use! + * @deprecated Deprecated + */ + getDataURL(): string; + + /** + * sets the content type (MIME Type) of the data container. + * @param aType the content type + */ + setContentType(aType: string): void; + + /** + * sets the data of the data container. + * @param aData the data + */ + setData(aData: LibreOffice.SeqEquiv): void; + + /** + * Deprecated. Do not use! + * @deprecated Deprecated + */ + setDataURL(aURL: string): void; + } + + /** + * Provides read access to a {@link ContentResultSet} . + * + * You can either get a simple static {@link ContentResultSet} or you can listen to change-notifications and than swap from the old to a new {@link + * ContentResultSet} . + * + * The following describes the dynamic use: + * + * {@link XDynamicResultSet} provides the possibility to get notifications about changes on a {@link ContentResultSet} and have an listener-controlled + * update from one version to the next version. Two {@link ContentResultSet} implementations were given to the listener in the first notification as + * interface {@link com.sun.star.sdbc.XResultSet} . + * + * To get notifications the listener has to be of type {@link XDynamicResultSetListener} . + * + * After registration you will get notifications for events of type {@link ListEvent} . + * + * The calling of {@link XDynamicResultSetListener.notify()} has to happen in an own thread, because it could take a longer time and any actions ??? + * until the listener returns the call. So don't block the notify-causing action. + * + * While one notify-call is going on: + * + * 1. The listener is allowed to access both ContentResultSets, they must be both valid. 2. It is not allowed to start a second notify-call. 3. All + * additional things we want to send as notification are to be queued. 4. Any other calls are to be accepted and treated. + * + * After the listener has returned the notify-call: + * + * 1. The listener is allowed to access the new {@link ContentResultSet} . The new one is first assigned in the WELCOME-event and than the ResultSets + * are always swapped. 2. The listener is not allowed to access the old {@link ContentResultSet} . + */ + interface XDynamicResultSet extends lang.XComponent { + /** + * Using this method you can get information, whether the offered ContentResultSets are sorted or filtered etc correctly as demanded during the creation + * of the {@link XDynamicResultSet} . + * @returns zero or more constants of the {@link ContentResultSetCapability} constants group. + */ + readonly Capabilities: number; + + /** + * Connects this to a {@link CachedDynamicResultSet} for optimized remote data transport. + * + * This method creates a {@link CachedDynamicResultSetStub} and sets it as Source to the given cache. + * + * After this method has returned you can and have to use the given result set cache for further access. + * @param Cache has to be an implementation of the service {@link CachedDynamicResultSet} . In particular it has to support the interface {@link XSourceIni + * @throws ListenerAlreadySetException if someone already has fetched the {@link ContentResultSet} via {@link XDynamicResultSet.getStaticResultSet()} . + * @throws AlreadyInitializedException if **Cache** was already initialized with another source. + * @throws ServiceNotFoundException + */ + connectToCache(Cache: XDynamicResultSet): void; + + /** + * Using this method you can get information, whether the offered ContentResultSets are sorted or filtered etc correctly as demanded during the creation + * of the {@link XDynamicResultSet} . + * @returns zero or more constants of the {@link ContentResultSetCapability} constants group. + */ + getCapabilities(): number; + + /** + * Call this, if you don't care about any changes. + * @returns an {@link com.sun.star.sdbc.XResultSet} that is implemented as {@link ContentResultSet} . Its content will never change. + * @throws ListenerAlreadySetException if someone already has registered as listener via {@link XDynamicResultSet.setListener()} or if someone has establish + */ + getStaticResultSet(): sdbc.XResultSet; + + /** + * Call this, if you want to get notifications about changes. + * + * The implementor has to call {@link com.sun.star.lang.XComponent.addEventListener()} in this method, so that we can call {@link + * com.sun.star.lang.XEventListener.disposing()} at the listener + * @param Listener a listener for result set notifications + * @throws ListenerAlreadySetException if this method is called more than once during the life of the implementation object or if this method is called if s + */ + setListener(Listener: XDynamicResultSetListener): void; + + /** + * Call this, if you don't care about any changes. + * @returns an {@link com.sun.star.sdbc.XResultSet} that is implemented as {@link ContentResultSet} . Its content will never change. + * @throws ListenerAlreadySetException if someone already has registered as listener via {@link XDynamicResultSet.setListener()} or if someone has establish + */ + readonly StaticResultSet: sdbc.XResultSet; + } + + /** used to receive notifications from an {@link XDynamicResultSet} . */ + interface XDynamicResultSetListener extends lang.XEventListener { + /** + * A method used to propagate changes of a result set. + * + * In the first notify-call the listener gets two(!) com::sun::star::sdbc::XResultSets and has to hold them. The com::sun::star::sdbc::XResultSets are + * implementations of the service {@link ContentResultSet} . + * + * The notified new {@link com.sun.star.sdbc.XResultSet} will stay valid after returning from this method. The old one will become invalid after + * returning. + * + * While in notify-call the listener is allowed to read from old and new result set, except in the first call, where only the new result set is valid. + * + * The Listener is allowed to stay (block) this call, until he really wants to use the new result set. The only situation, where the listener has to + * return immediately is while he disposes his broadcaster or while he is removing himself as listener (otherwise you deadlock)!!! + * @param Changes the changes to notify. + */ + notify(Changes: ListEvent): void; + } + + /** provides the possibility to get the contents of the columns of several rows of a {@link ContentResultSet} with a single function call. */ + interface XFetchProvider extends uno.XInterface { + /** + * returns the contents of the columns of the indicated rows + * @param nRowStartPosition the starting row of the result set + * @param nRowCount the count of rows + * @param bDirection `TRUE` , if you want the rows to be read in the same order, as they are contained in the result set ( `TRUE` <-> forward step; `FALSE` + * @returns {@link FetchResult.Rows} contains a sequence of anys. Each of these anys contains a sequence of anys. + */ + fetch(nRowStartPosition: number, nRowCount: number, bDirection: boolean): FetchResult; + } + + /** + * provides the possibility to load information offered by a {@link XContentAccess} for several rows of a {@link ContentResultSet} with a single function + * call. + */ + interface XFetchProviderForContentAccess extends uno.XInterface { + /** + * returns the XContentIdentifiers of the columns of the indicated rows + * @param nRowStartPosition the starting row of the result set + * @param nRowCount the count of rows + * @param bDirection `TRUE` , if you want the rows to be read in the same order, as they are contained in the result set ( `TRUE` <-> forward step; `FALSE` + * @returns {@link FetchResult.Rows} contains a sequence of anys. Each of these anys contains an {@link XContentIdentifier} . + */ + fetchContentIdentifiers(nRowStartPosition: number, nRowCount: number, bDirection: boolean): FetchResult; + + /** + * returns the content identifier strings of the columns of the indicated rows + * @param nRowStartPosition the starting row of the result set + * @param nRowCount the count of rows + * @param bDirection `TRUE` , if you want the rows to be read in the same order, as they are contained in the result set ( `TRUE` <-> forward step; `FALSE` + * @returns {@link FetchResult.Rows} contains a sequence of anys. Each of these anys contains a string. + */ + fetchContentIdentifierStrings(nRowStartPosition: number, nRowCount: number, bDirection: boolean): FetchResult; + + /** + * returns the {@link XContent} s of the columns of the indicated rows + * @param nRowStartPosition the starting row of the result set + * @param nRowCount the count of rows + * @param bDirection `TRUE` , if you want the rows to be read in the same order, as they are contained in the result set ( `TRUE` <-> forward step; `FALSE` + * @returns {@link FetchResult.Rows} contains a sequence of anys. Each of these anys contains an {@link XContent} . + */ + fetchContents(nRowStartPosition: number, nRowCount: number, bDirection: boolean): FetchResult; + } + + /** + * specifies methods to convert between (file) URLs and file paths in system dependent notation. + * @author Andreas Bille + * @version 1.0 + */ + interface XFileIdentifierConverter extends uno.XInterface { + /** + * Get information about the "locality" of a file content provider. + * + * The returned information can be used to chose the "best" among a number of file content providers implementing this interface. + * @param BaseURL the base (file) URL used to specify a file content provider. + * @returns an appropriate value representing the "locality" of the specified file content provider. Generally, higher (non-negative) numbers denote file con + */ + getFileProviderLocality(BaseURL: string): number; + + /** + * converts a file path in system dependent notation to a (file) URL. + * @param BaseURL the base (file) URL relative to which the file path shall be interpreted. + * @param SystemPath a file path in system dependent notation. + * @returns the URL corresponding to the file path, or an empty string if the file path cannot be converted into a URL. + */ + getFileURLFromSystemPath(BaseURL: string, SystemPath: string): string; + + /** + * converts a (file) URL to a file path in system dependent notation. + * @param URL a (file) URL. + * @returns the file path corresponding to the URL, or an empty string if the URL cannot be converted into a file path. + */ + getSystemPathFromFileURL(URL: string): string; + } + + /** + * An interaction continuation specifying authentication success. + * @since LibreOffice 4.4 + */ + interface XInteractionAuthFallback extends task.XInteractionContinuation { + setCode(code: string): void; + } + + /** + * This interface should be implemented by an internal {@link XCommandEnvironment} that can not supply an {@link com.sun.star.task.XInteractionHandler} , + * but instead wants interaction requests to be handled by other internal error handling mechanism. + */ + interface XInteractionHandlerSupplier extends uno.XInterface { + /** + * Returns whether an {@link com.sun.star.task.XInteractionHandler} can be supplied. + * @returns `TRUE` , if an {@link com.sun.star.task.XInteractionHandler} can be supplied, `FALSE` otherwise. + */ + hasInteractionHandler(): boolean; + } + + /** + * An interaction continuation handing back some authentication data. + * + * This continuation is typically used in conjunction with {@link AuthenticationRequest} . + */ + interface XInteractionSupplyAuthentication extends task.XInteractionContinuation { + /** Specifies if an "account" value can be handed back. */ + canSetAccount(): boolean; + + /** Specifies if a "password" value can be handed back. */ + canSetPassword(): boolean; + + /** Specifies if a new "realm" value can be handed back. */ + canSetRealm(): boolean; + + /** Specifies if a "user name" value can be handed back. */ + canSetUserName(): boolean; + + /** + * Specifies the available modes of how long to remember the account. + * @param Default Returns the default mode (to be initially displayed to the user). + * @returns A sequence of available modes to hand back. Each individual mode should appear at most once in the sequence. If the sequence is empty, a new mode + */ + getRememberAccountModes(Default: [RememberAuthentication]): SafeArray; + + /** + * Specifies the available modes of how long to remember the password. + * @param Default Returns the default mode (to be initially displayed to the user). + * @returns A sequence of available modes to hand back. Each individual mode should appear at most once in the sequence. If the sequence is empty, a new mode + */ + getRememberPasswordModes(Default: [RememberAuthentication]): SafeArray; + + /** + * Set a new "account" value to hand back. + * + * This method should be called before {@link com.sun.star.task.XInteractionContinuation.select()} , and should only be called if {@link + * XInteractionSupplyAuthentication.canSetAccount()} returned `TRUE` . + */ + setAccount(Account: string): void; + + /** + * Set a new "password" value to hand back. + * + * This method should be called before {@link com.sun.star.task.XInteractionContinuation.select()} , and should only be called if {@link + * XInteractionSupplyAuthentication.canSetPassword()} returned `TRUE` . + */ + setPassword(Password: string): void; + + /** + * Set a new "realm" value to hand back. + * + * This method should be called before {@link com.sun.star.task.XInteractionContinuation.select()} , and should only be called if {@link + * XInteractionSupplyAuthentication.canSetRealm()} returned `TRUE` . + */ + setRealm(Realm: string): void; + + /** + * Set a new mode of how long to remember the account. + * + * This method should be called before {@link com.sun.star.task.XInteractionContinuation.select()} , and should only be called if {@link + * XInteractionSupplyAuthentication.setAccount()} is also called. + * @param Remember The mode to hand back, should be contained in the sequence returned by {@link XInteractionSupplyAuthentication.getRememberAccountModes()} . + */ + setRememberAccount(Remember: RememberAuthentication): void; + + /** + * Set a new mode of how long to remember the password. + * + * This method should be called before {@link com.sun.star.task.XInteractionContinuation.select()} , and should only be called if {@link + * XInteractionSupplyAuthentication.setPassword()} is also called. + * @param Remember The mode to hand back, should be contained in the sequence returned by {@link XInteractionSupplyAuthentication.getRememberPasswordModes()} . + */ + setRememberPassword(Remember: RememberAuthentication): void; + + /** + * Set a new "user name" value to hand back. + * + * This method should be called before {@link com.sun.star.task.XInteractionContinuation.select()} , and should only be called if {@link + * XInteractionSupplyAuthentication.canSetUserName()} returned `TRUE` . + */ + setUserName(UserName: string): void; + } + + /** + * An interaction continuation handing back some authentication data. + * + * This continuation is typically used in conjunction with {@link AuthenticationRequest} . + * @since OOo 3.2 + */ + interface XInteractionSupplyAuthentication2 extends XInteractionSupplyAuthentication { + /** + * Specifies if "system credentials" can be obtained and used by the issuer of the authentication request. + * @param Default Returns the default behavior for system credentials handling (to be initially displayed to the user). + * @returns `TRUE` if the issuer is able to obtain and use system credentials. `FALSE` otherwise. + */ + canUseSystemCredentials(Default: [boolean]): boolean; + + /** + * Set a new "use system credentials" value to hand back. + * @param UseSystemCredentials `TRUE` means the request issuer shall obtain and use system credentials. + */ + setUseSystemCredentials(UseSystemCredentials: boolean): void; + } + + /** + * is an interaction continuation used to hand back a new name for something. + * + * For example, this continuation can be selected when handling a {@link NameClashResolveRequest} in order to supply a new name for a clashing resource. + * @author Kai Sommerfeld + * @version 1.0 + */ + interface XInteractionSupplyName extends task.XInteractionContinuation { + /** + * sets the name to supply. + * @param Name contains the name to supply. + */ + setName(Name: string): void; + } + + /** + * Register specially adjusted instances of content providers on URL templates and supplementary arguments. + * @author Stephan Bergmann + * @version 1.0 + */ + interface XParameterizedContentProvider extends uno.XInterface { + /** + * Deregisters a content provider. + * @param Template A URL template. If the input is malformed or too complex, an IllegalArgumentException may be raised. + * @param Arguments Any supplementary arguments required by this {@link XContentProvider} , represented as a single string. If the input is malformed, an { + * @returns Either this {@link XContentProvider} , or another, specially adjusted version of this {@link XContentProvider} (this flexibility allows for diffe + */ + deregisterInstance(Template: string, Arguments: string): XContentProvider; + + /** + * Register a content provider on a URL template and supplementary arguments. + * @param Template A URL template. If the input is malformed or too complex, an {@link com.sun.star.lang.IllegalArgumentException} may be raised. + * @param Arguments Any supplementary arguments required by this {@link XContentProvider} , represented as a single string. If the input is malformed, an { + * @param ReplaceExisting If true, and if the given Template conflicts with an already registered instance, the old registration is replaced by the new one + * @returns Either this {@link XContentProvider} , or another, specially adjusted version of this {@link XContentProvider} (this flexibility allows for diffe + */ + registerInstance(Template: string, Arguments: string, ReplaceExisting: boolean): XContentProvider; + } + + /** + * A persistent property set, which can be saved in and restored from a {@link XPropertySetRegistry} . + * @author Kai Sommerfeld + * @version 1.0 + */ + interface XPersistentPropertySet extends beans.XPropertySet { + /** + * returns the key used to address the set in the property set registry. + * @returns The key. + */ + getKey(): string; + + /** + * returns the registry used to store the property set. + * @returns The registry. + */ + getRegistry(): XPropertySetRegistry; + + /** + * returns the key used to address the set in the property set registry. + * @returns The key. + */ + readonly Key: string; + + /** + * returns the registry used to store the property set. + * @returns The registry. + */ + readonly Registry: XPropertySetRegistry; + } + + /** Handle a tasks notification that it has made some progress. */ + interface XProgressHandler extends uno.XInterface { + /** The task notifies the handler that it has finished its current activity. */ + pop(): void; + + /** + * The task notifies the handler that it has started some new activity (possibly a sub-activity of another activity already making progress; therefore, + * these notifications behave in a stack-like manner). + * @param Status An object representing the new activity. There has to be an agreement between caller and callee of methods {@link XProgressHandler.push()} + */ + push(Status: any): void; + + /** + * The task notifies the handler that its current activity is making progress. + * @param Status An object representing the progress made. See the documentation of {@link XProgressHandler.push()} for more information. + */ + update(Status: any): void; + } + + /** + * Checks whether a set of properties matches a set of search criteria. + * @see XPropertyMatcherFactory. + */ + interface XPropertyMatcher extends uno.XInterface { + /** + * Checks whether a set of properties matches the given search criteria. + * @param Properties A {@link Command} Processor through which the set of properties is accessible. + * @param Environment The environment to use when accessing the property set via the given {@link Command} Processor. It may be null. + * @returns `TRUE` if the properties match, `FALSE` otherwise. + */ + matches(Properties: XCommandProcessor, Environment: XCommandEnvironment): boolean; + } + + /** Creates an {@link XPropertyMatcher} , given a set of search criteria. */ + interface XPropertyMatcherFactory extends uno.XInterface { + /** + * Creates an {@link XPropertyMatcher} . + * @param Criteria The set of search criteria the returned {@link XPropertyMatcher} will use. + * @returns An {@link XPropertyMatcher} with the given search criteria. + */ + createPropertyMatcher(Criteria: LibreOffice.SeqEquiv): XPropertyMatcher; + } + + /** + * A registry (storage medium) for persistent property sets. + * @author Kai Sommerfeld + * @see XPersistentPropertySet + * @version 1.0 + */ + interface XPropertySetRegistry extends uno.XInterface { + /** + * creates a new or opens an existing property set in the registry. + * @param key The key to use for addressing the property set. + * @param create Indicates whether a new set shall be created in case there does not already exist one for the given key. + * @returns The property set. + */ + openPropertySet(key: string, create: boolean): XPersistentPropertySet; + + /** + * removes a property set from the registry. + * @param key The key to use for addressing the property set. + */ + removePropertySet(key: string): void; + } + + /** + * A factory for property set registries. + * @author Kai Sommerfeld + * @version 1.0 + */ + interface XPropertySetRegistryFactory extends uno.XInterface { + /** + * creates a property set registry. + * @param URL The identifier of the registry to create ( e.g. file-URL ). The value can be an empty string. + * @returns The registry. + */ + createPropertySetRegistry(URL: string): XPropertySetRegistry; + } + + /** + * Allows an {@link XContent} to delete itself into the trash can. + * + * This is an additional interface the {@link XContent} representing the trash can (URL: "vnd.sun.staroffice.trashcan:///") should support. + */ + interface XRecycler extends uno.XInterface { + /** + * Notify the trash can that an {@link XContent} is deleting itself into it. + * @param Properties The trash can uses this interface to access the properties of the content being deleted, to copy them for later display etc. The trash + * @param Identifier When the deleted content is later restored or ultimately deleted, the trash can will use this identifier to query an {@link XContent} + */ + trashContent(Properties: XCommandProcessor, Identifier: XContentIdentifier): void; + } + + /** + * Accept remote content providers that want to make themselves known to the local process. + * @author Stephan Bergmann + * @version 1.0 + */ + interface XRemoteContentProviderAcceptor extends uno.XInterface { + /** + * Add a remote content provider. + * @param Identifier An arbitrary identifier uniquely identifying the remote content provider. + * @param Factory A factory through which the remote content provider's {@link UniversalContentBroker} service can be instantiated. + * @param Templates A sequence of URL templates the remote content provider is willing to handle. + * @param DoneListener If not null, the implementation of this interface can -- through this callback -- tell the calling side that the implementation + * @returns true if the remote content provider has successfully been added. + */ + addRemoteContentProvider(Identifier: string, Factory: lang.XMultiServiceFactory, Templates: LibreOffice.SeqEquiv, DoneListener: XRemoteContentProviderDoneListener): boolean; + + /** + * Remove a remote content provider. + * @param Identifier An arbitrary identifier uniquely identifying the remote content provider. + * @returns true if the remote content provider has successfully been removed. + */ + removeRemoteContentProvider(Identifier: string): boolean; + } + + /** + * This interface should be implemented together with {@link XRemoteContentProviderAcceptor} and allows for a lazy implementation of {@link + * XRemoteContentProviderAcceptor.addRemoteContentProvider()} . + * + * The way this works might change, therefore this interface is marked as deprecated. + * @deprecated Deprecated + */ + interface XRemoteContentProviderActivator extends uno.XInterface { + /** + * Activate (i.e., register at the broker) the remote content providers that until now have only been remembered by {@link + * XRemoteContentProviderAcceptor.addRemoteContentProvider()} , but not registered. + * + * This allows for {@link XRemoteContentProviderAcceptor.addRemoteContentProvider()} to be implemented in a lazy fashion (remember the remote content + * providers, but do not register them right away), which can increase performance in certain situations. But it is not required that an implementation + * of {@link XRemoteContentProviderAcceptor} uses this lazy strategy (and thus also implements this interface). + * @returns the broker at which the remote content providers have been registered. + */ + activateRemoteContentProviders(): XContentProviderManager; + } + + /** + * A listener interested in changes to a {@link com.sun.star.ucb.XRemoteContentProviderSupplier} . + * @author Stephan Bergmann + * @version 1.0 + */ + interface XRemoteContentProviderChangeListener extends lang.XEventListener { + /** + * gets called whenever changes to a {@link com.sun.star.ucb.XRemoteContentProviderSupplier} occur. + * @param Event describes the change that has occurred. + */ + remoteContentProviderChange(Event: RemoteContentProviderChangeEvent): void; + } + + /** + * Notify about changes to a {@link XRemoteContentProviderSupplier} . + * @author Stephan Bergmann + * @version 1.0 + */ + interface XRemoteContentProviderChangeNotifier extends uno.XInterface { + /** + * Add a listener. + * @param Listener Some listener. + */ + addRemoteContentProviderChangeListener(Listener: XRemoteContentProviderChangeListener): void; + + /** + * Remove a listener. + * @param Listener Some listener previously added via {@link XRemoteContentProviderChangeNotifier.addRemoteContentProviderChangeListener()} . + */ + removeRemoteContentProviderChangeListener(Listener: XRemoteContentProviderChangeListener): void; + } + + /** + * A simple mechanism to find out if the connection between a remote content provider distributor and acceptor gets lost. + * + * This interface should be supported by the **DoneListener** parameter of {@link XRemoteContentProviderAcceptor.addRemoteContentProvider()} . + * @author Stephan Bergmann + * @version 1.0 + */ + interface XRemoteContentProviderConnectionControl extends uno.XInterface { + /** + * Enable connection control, using as a token some object implemented on the remote content provider acceptor's side. + * + * The implementation of this interface must hold a reference to the supplied token. If the connection gets lost, the reference count of the token will + * drop, which the remote content provider acceptor can observe. + * @param Acceptor The remote content provider acceptor on the other side of the connection. + * @param Token Some object implemented on the remote content provider acceptor's side of the connection. + */ + enableConnectionControl(Acceptor: XRemoteContentProviderAcceptor, Token: uno.XInterface): void; + } + + /** + * Distribute a content broker to various XRemoteContentProviderAcceptors. + * @author Stephan Bergmann + * @see XRemoteContentProviderAcceptor + * @version 1.0 + */ + interface XRemoteContentProviderDistributor extends uno.XInterface { + /** + * Offer the local content broker to a remote content provider acceptor. + * + * The Uno Url is handed to the {@link com.sun.star.bridge.UnoUrlResolver} service, which is responsible for raising any of the advertised exceptions. + * @param Url A Uno Url to address the {@link XRemoteContentProviderAcceptor} . + * @param Identifier An identifier handed to the {@link XRemoteContentProviderAcceptor} . + * @returns success indicator. Especially, if there's already a connection to the given Url, the call will fail, no matter whether that connection uses the s + */ + connectToRemoteAcceptor(Url: string, Identifier: string): boolean; + + /** Undo the offering of the local content broker to all remote content provider acceptors. */ + disconnectFromAll(): void; + + /** + * Undo the offering of the local content broker to a specific remote content provider acceptor. + * @param Url A Uno Url to address the {@link XRemoteContentProviderAcceptor} . + * @returns success indicator. + */ + disconnectFromRemoteAcceptor(Url: string): boolean; + } + + /** + * A notification mechanism that a {@link XRemoteContentProviderAcceptor} no longer needs a remote content provider. + * @author Stephan Bergmann + * @version 1.0 + */ + interface XRemoteContentProviderDoneListener extends uno.XInterface { + /** + * A notification that all remote content providers added to the given {@link XRemoteContentProviderAcceptor} should be removed, because the acceptor no + * longer needs them. + * @param Acceptor If null, all remote content providers added to any acceptor shall be removed. + */ + doneWithRemoteContentProviders(Acceptor: XRemoteContentProviderAcceptor): void; + } + + /** + * Provide access to a collection of remote content providers. + * @author Stephan Bergmann + * @see XRemoteContentProviderAcceptor + * @version 1.0 + */ + interface XRemoteContentProviderSupplier extends uno.XInterface { + /** + * Get a factory through which a remote content provider's {@link UniversalContentBroker} service can be instantiated. + * @param Identifier An arbitrary identifier uniquely identifying a remote content provider. + * @returns the appropriate factory, or null if none is available. + */ + queryRemoteContentProvider(Identifier: string): lang.XMultiServiceFactory; + } + + /** This is the basic interface to read data from a stream. */ + interface XSimpleFileAccess extends uno.XInterface { + /** + * Copies a file + * @param SourceURL URL of the file to be copied + * @param DestURL URL of the location the file should be copied to + * @see move + */ + copy(SourceURL: string, DestURL: string): void; + + /** + * Creates a new Folder + * @param NewFolderURL URL describing the location of the new folder + */ + createFolder(NewFolderURL: string): void; + + /** + * Checks if a file exists + * @param FileURL URL to be checked + * @returns true, if the File exists, false otherwise + */ + exists(FileURL: string): boolean; + + /** + * Returns the content type of a file. + * @param FileURL URL of the file + * @returns {@link Content} type of the file + * @see XContent.getContentType + */ + getContentType(FileURL: string): string; + + /** + * Returns the last modified date for the file + * @param FileURL URL of the file + * @returns Last modified date for the file + */ + getDateTimeModified(FileURL: string): util.DateTime; + + /** + * Returns the contents of a folder + * @param FolderURL URL of the folder + * @param bIncludeFolders true: Subfolders are included, false: No subfolders + * @returns The content of a folder, each file as one string in a string sequence + */ + getFolderContents(FolderURL: string, bIncludeFolders: boolean): SafeArray; + + /** + * Returns the size of a file. + * @param FileURL URL of the file + * @returns Size of the file in bytes + */ + getSize(FileURL: string): number; + + /** + * Checks if an URL represents a folder + * @param FileURL URL to be checked + * @returns true, if the given URL represents a folder, otherwise false + */ + isFolder(FileURL: string): boolean; + + /** + * Checks if a file is "read only" + * @param FileURL URL to be checked + * @returns true, if the given File is "read only", false otherwise + */ + isReadOnly(FileURL: string): boolean; + + /** + * Removes a file. If the URL represents a folder, the folder will be removed, even if it's not empty. + * @param FileURL File/folder to be removed + * @see move + */ + kill(FileURL: string): void; + + /** + * Moves a file + * @param SourceURL URL of the file to be moved + * @param DestURL URL of the location the file should be moved to + * @see move + */ + move(SourceURL: string, DestURL: string): void; + + /** + * Opens file to read + * @param FileURL File to open + * @returns An XInputStream, if the file can be opened for reading + */ + openFileRead(FileURL: string): io.XInputStream; + + /** + * Opens file to read and write + * @param FileURL File to open + * @returns An XStream, if the file can be opened for reading and writing + * @throws UnsupportedDataSinkException the file cannot be opened for random write access. Some resources do not allow random write access. To write data fo + */ + openFileReadWrite(FileURL: string): io.XStream; + + /** + * Opens file to write. + * @param FileURL File to open + * @returns An XOutputStream, if the file can be opened for writing + * @throws UnsupportedDataSinkException the file cannot be opened for random write access. Some resources do not allow random write access. To write data fo + */ + openFileWrite(FileURL: string): io.XOutputStream; + + /** + * Sets an interaction handler to be used for further operations. + * + * A default interaction handler is available as service {@link com.sun.star.task.InteractionHandler} . The documentation of this service also contains + * further information about the interaction handler concept. + * @param Handler The interaction handler to be set + * @see com.sun.star.task.InteractionHandler + */ + setInteractionHandler(Handler: task.XInteractionHandler): void; + + /** + * Sets the "read only" of a file according to the boolean parameter, if the actual process has the right to do so. + * @param FileURL URL of the file + * @param bReadOnly true; "read only" flag will be set, false; "read only" flag will be reset + */ + setReadOnly(FileURL: string, bReadOnly: boolean): void; + } + + /** This is an extension to the interface {@link XSimpleFileAccess} . */ + interface XSimpleFileAccess2 extends XSimpleFileAccess { + /** + * Overwrites the file content with the given data. + * + * If the file does not exist, it will be created. + * @param FileURL File to write + * @param data A stream containing the data for the file to be (over-)written + */ + writeFile(FileURL: string, data: io.XInputStream): void; + } + + /** + * This is an extension to the interface {@link XSimpleFileAccess2} . + * @since OOo 1.1.2 + */ + interface XSimpleFileAccess3 extends XSimpleFileAccess2 { + /** + * Checks if a file is "hidden" + * @param FileURL URL to be checked + * @returns true, if the given File is "hidden", false otherwise + */ + isHidden(FileURL: string): boolean; + + /** + * Sets the "hidden" of a file according to the boolean parameter, if the actual process has the right to do so and the used operation system supports + * this operation. + * @param FileURL URL of the file + * @param bHidden true; "hidden" flag will be set, false; "hidden" flag will be reset + */ + setHidden(FileURL: string, bHidden: boolean): void; + } + + /** Provides a method to create an {@link XDynamicResultSet} which will be sorted according to the given sorting options. */ + interface XSortedDynamicResultSetFactory extends uno.XInterface { + /** + * creates a sorted {@link XDynamicResultSet} depending on internal data, an (unsorted) {@link XDynamicResultSet} and the sorting info. + * @param Source the (unsorted) source result set + * @param Info the sort criteria + * @param CompareFactory a factory for compare objects. + * @returns a sorted result set. + */ + createSortedDynamicResultSet(Source: XDynamicResultSet, Info: LibreOffice.SeqEquiv, CompareFactory: XAnyCompareFactory): XDynamicResultSet; + } + + /** provides the initialization of a component with any source object. */ + interface XSourceInitialization extends uno.XInterface { + /** + * provides the initialization of a component with any source object. + * + * The service description has to specify which type of interface must be set as parameter. + * + * Hopefully you will only use this, when **Source** is an {@link com.sun.star.lang.XComponent} and this is an {@link com.sun.star.lang.XEventListener} . + * Than you should call {@link com.sun.star.lang.XComponent.addEventListener()} from inside the implementation of this method. + * @param Source the source. + * @throws AlreadyInitializedException if this method is called more than once during the lifetime of the object implementing this interface. + */ + setSource(Source: uno.XInterface): void; + } + + /** @since LibreOffice 4.0 */ + interface XUniversalContentBroker extends lang.XComponent, XContentProvider, XContentProviderManager, XContentIdentifierFactory, XCommandProcessor2 { } + + /** A command environment that can be used to deal with WebDAV/HTTP specific commands. */ + interface XWebDAVCommandEnvironment extends XCommandEnvironment { + /** + * This method gets called while assembling an WebDAV/HTTP request. The returned headername-headervalue pairs will be appended to the list of request + * headers before the request is dispatched. + * @param aURI The request URI. + * @param eMethod The WebDAV/HTTP method ("GET","PUT","MKCOL",...) as defined in WebDAVHTTPMethod. + * @returns A sequence of header name, header value pairs. The header names must be the plain names and contain no trailing ":". + */ + getUserRequestHeaders(aURI: string, eMethod: WebDAVHTTPMethod): SafeArray; + } + + namespace CommandInfoChange { + const enum Constants { + COMMAND_INSERTED = 0, + COMMAND_REMOVED = 1, + } + } + + namespace ConnectionMode { + const enum Constants { + OFFLINE = 1, + ONLINE = 0, + } + } + + namespace ContentAction { + const enum Constants { + DELETED = 2, + EXCHANGED = 4, + INSERTED = 0, + REMOVED = 1, + SEARCH_MATCHED = 128, + } + } + + namespace ContentInfoAttribute { + const enum Constants { + INSERT_WITH_INPUTSTREAM = 1, + KIND_DOCUMENT = 2, + KIND_FOLDER = 4, + KIND_LINK = 8, + NONE = 0, + } + } + + namespace ContentResultSetCapability { + const enum Constants { + SORTED = 1, + } + } + + namespace Error { + const enum Constants { + ACCOUNT_SYNTAX = 122977, + BAD_CCMAIL_EXPORT_PASSWORD = 122909, + BAD_INET = 122965, + CCMAIL_EXPORT_ERROR = 122905, + CCMAIL_EXPORT_NOT_TERMINATING = 122957, + CCMAIL_EXPORT_TOO_LONG = 122910, + CNTOUT_NO_FROM = 122890, + CONFIRM_EMPTY_TRASH = 122952, + CONNECT_FAILURE = 122883, + COULD_NOT_INIT_COMPONENT = 122961, + DELETE_ABORTED = 122892, + DO_LOG = 122947, + EMPTY_SERVERNAME = 122963, + EMPTY_USERNAME = 122964, + EXTERNAL_COMMAND_FAILED = 122958, + FILE_EXISTS = 122921, + FILE_NOT_EXISTS = 122922, + FOLDER_EXISTS = 122911, + FOLDER_INVALID = 122896, + FOLDER_NOT_EXISTS = 122912, + FSYS_ACCESS_DENIED = 122926, + FSYS_CACHE_INCONSISTENT = 122940, + FSYS_CANT_ITERATE = 122937, + FSYS_CANT_RESOLVE_CONFLICT = 122936, + FSYS_DELETE = 122944, + FSYS_INSERT_MEDIUM = 122955, + FSYS_INVALID_CHAR = 122924, + FSYS_INVALID_DEVICE = 122925, + FSYS_IS_MARKED = 122945, + FSYS_IS_WILDCARD = 122933, + FSYS_LOCK = 122942, + FSYS_LOCK_VIOLATION = 122927, + FSYS_LOST_ROOT = 122949, + FSYS_MISPLACED_CHAR = 122923, + FSYS_NO_TARGET = 122953, + FSYS_NOT_A_DIRECTORY = 122932, + FSYS_NOT_A_FILE = 122931, + FSYS_NOT_SUPPORTED = 122929, + FSYS_READONLY = 122941, + FSYS_RECURSIVE = 122954, + FSYS_ROOT_DELETE = 122920, + FSYS_UNKNOWN = 122930, + FSYS_UNLOCK = 122943, + FSYS_UPDATE_NEEDED = 122935, + FSYS_VOLUME_FULL = 122928, + FTP_DCONFAILURE = 122901, + FTP_GENERAL_FAILURE = 122946, + FTP_NETWORKERROR = 122898, + FTP_NOTNECESSARYCMD = 122899, + FTP_PROXY = 122950, + FTP_RESOLVERERROR = 122897, + FTP_SERVICEUNAVAILABLE = 122900, + FTP_TRANSFERABORTED = 122902, + HTTP_COOKIE_REQUEST = 122948, + ILLEGAL_CCMAIL_EXPORT_FILE = 122907, + ILLEGAL_MESSAGE_ID = 122914, + IMAP_BAD_SERVER = 122969, + IMAP_BAD_TITLE = 122971, + IMAP_CONNECTION_CLOSED = 122967, + IMAP_NOT_IMAP4 = 122968, + IMAP_SERVER_MSG = 122966, + IS_RESCHEDULED = 122918, + LOGIN_FAILURE_ACCOUNT = 122976, + LOGIN_FAILURE_MAILSEND = 122882, + LOGIN_FAILURE_NEWSSEND = 122881, + LOGIN_FAILURE_RECEIVE = 122880, + MESSAGE_NOT_FOUND = 122908, + MULTIPLE_NOT_SEARCHABLE = 122939, + NO_CCMAIL_EXPORT_FILE = 122906, + NO_DOCINFO = 122956, + NO_VIM_BBOARDLIST = 122913, + NO_VIM_LIBRARY = 122903, + NONE = 0, + NOT_HANDLED = 122960, + NOTAVAILABLE = 122894, + ONE_NOT_SEARCHABLE = 122938, + PASSWORD_SYNTAX = 122973, + QUERY_DELETE = 122893, + QUERY_DELETE_CACHE = 122974, + RENAME_FAILED = 122959, + RENAMED_WRONG_FILE_FORMAT = 122934, + REORGANIZE_FILE_LOCKED = 122970, + REORGANIZE_NO_DISKSPACE = 122975, + SERVER_CONNECT_FAILURE = 122972, + SERVER_PORT_SYNTAX = 122915, + SERVERNAME_SYNTAX = 122916, + SOURCE_SAME_AS_TARGET = 122951, + STORAGE_KILLED = 122887, + STORAGE_READONLY = 122886, + TOO_MANY_GROUPS = 122891, + TRANSFER_URL_NOT_SUPPORTED = 122962, + UCB_OFFLINE = 122884, + UCB_SERVER_ERROR = 122885, + UNSUPPORTED_URL = 122889, + USERNAME_SYNTAX = 122917, + VIM_LIBRARY_CORRUPTED = 122904, + VIM_LIBRARY_ERROR = 122895, + VIM_NO_FAKE_MESSAGE_ID = 122919, + WRONG_FILE_FORMAT = 122888, + } + } + + namespace FetchError { + const enum Constants { + ENDOFDATA = 1, + EXCEPTION = 2, + SUCCESS = 0, + } + } + + namespace FileSystemNotation { + const enum Constants { + DOS_NOTATION = 2, + MAC_NOTATION = 3, + UNIX_NOTATION = 1, + UNKNOWN_NOTATION = 0, + } + } + + namespace ListActionType { + const enum Constants { + CLEARED = 23, + COMPLETED = 27, + INSERTED = 21, + MOVED = 24, + PROPERTIES_CHANGED = 25, + REMOVED = 22, + WELCOME = 20, + } + } + + namespace NameClash { + const enum Constants { + ASK = 4, + ERROR = 0, + KEEP = 3, + OVERWRITE = 1, + RENAME = 2, + } + } + + namespace OpenMode { + const enum Constants { + ALL = 0, + DOCUMENT = 2, + DOCUMENT_SHARE_DENY_NONE = 4, + DOCUMENT_SHARE_DENY_WRITE = 5, + DOCUMENTS = 3, + FOLDERS = 1, + } + } + + namespace RuleAction { + const enum Constants { + COPY = 8, + DELETE = 9, + FORWARD = 11, + HIDE = 2, + LINK = 10, + MARK = 3, + MARKREAD = 5, + MARKUNREAD = 6, + MOVE = 7, + NONE = 0, + SHOW = 1, + UNMARK = 4, + } + } + + namespace RuleOperator { + const enum Constants { + CONTAINS = 1, + CONTAINSNOT = 2, + EQUAL = 5, + GREATEREQUAL = 3, + LESSEQUAL = 4, + NOTEQUAL = 6, + VALUE_FALSE = 8, + VALUE_TRUE = 7, + } + } + } + + namespace ui { + /** + * Multiplex events for context changes. + * + * A typical listener for context changes is the sidebar. + */ + type ContextChangeEventMultiplexer = XContextChangeEventMultiplexer; + + /** + * provides access to the global accelerator (aka shortcut) configuration set. + * @since OOo 2.0 + */ + type GlobalAcceleratorConfiguration = XAcceleratorConfiguration; + + /** @since LibreOffice 4.1 */ + type ImageManager = XImageManager; + + /** + * a service which provides information about the user interface command categories of a single module. + * + * Every OpenOffice.org module has an amount of commands that can be used by user interface elements. This service provides access to the user interface + * commands that are part of a single OpenOffice.org module, like Writer or Calc. + * @since OOo 2.0 + */ + type ModuleUICategoryDescription = container.XNameAccess; + + /** + * a service which provides information about the user interface commands of a single module. + * + * Every OpenOffice.org module has an amount of commands that can be used by user interface elements. This service provides access to the user interface + * commands that are part of a single OpenOffice.org module, like Writer or Calc. + * @since OOo 2.0 + */ + type ModuleUICommandDescription = container.XNameAccess; + + /** + * a service which provides window based information about user interface elements of a single application module. + * + * Every OpenOffice.org module has an amount of user interface elements that can be positioned, resized, closed and their style can be changed. This + * service provides access to the window based information of available user interface elements which are part of a single OpenOffice.org module, like + * Writer or Calc. + * @since OOo 2.0 + */ + type ModuleWindowStateConfiguration = container.XNameContainer; + + /** + * specifies a central user interface configuration provider which gives access to module based user interface configuration managers. + * + * Controls module based user interface configuration managers. + * + * There can only exist one user interface configuration manager for a module. A user interface configuration manager supports to get and set user + * interface configuration data for configurable user interface elements. + * @see ConfigurableUIElement + * @see XUIConfigurationManager Prior to LibreOffice 4.3, this singleton was only available as a (single-instance) ModuleUIConfigurationManagerSupplier + * @since LibreOffice 4.3 + */ + type theModuleUIConfigurationManagerSupplier = XModuleUIConfigurationManagerSupplier; + + /** + * a singleton which provides information about user interface command categories. + * + * OpenOffice.org has an amount of commands that can be used by user interface elements. Every command is member of a single category. Categories makes + * it easier to handle to huge amount of commands provided by OpenOffice.org. This singleton is normally used by UI implementations which provides all + * commands to a user. + * + * Provides access to user interface command categories of the installed modules. + * + * To access the user interface command categories of a module, a unique module specifier must be provided to {@link + * com.sun.star.container.XNameAccess.getByName()} function. The module specifier can be retrieved from the {@link com.sun.star.frame.ModuleManager} + * service. The interface provides references to com::sun:star:: {@link ui.ModuleUICommandDescription} . + * @see com.sun.star.frame.ModuleManager Prior to LibreOffice 4.3, this singleton was only available as a (single-instance) {@link UICategoryDescription} + * @since LibreOffice 4.3 + */ + type theUICategoryDescription = container.XNameAccess; + + /** + * specifies a user interface factory manager that controls all registered user interface element factories. + * + * Prior to LibreOffice 4.3, this singleton was only available as a (single-instance) {@link UIElementFactoryManager} service. + * @since LibreOffice 4.3 + */ + type theUIElementFactoryManager = XUIElementFactoryManager; + + /** + * This interface could be incomplete since I derived it from its sole place of use. + * + * Prior to LibreOffice 4.3, this singleton was only available as a (single-instance) {@link WindowContentFactoryManager} service. + * @since LibreOffice 4.3 + */ + type theWindowContentFactoryManager = lang.XSingleComponentFactory; + + /** + * a singleton which provides window based information about user interface elements. + * + * OpenOffice.org has an amount of user interface elements that can be positioned, resized, closed and their style can be changed. This singleton + * provides access to the window based information of available user interface elements which are part of OpenOffice.org modules, like Writer or Calc. + * + * Provides access to window based information about user interface elements of all installed application modules. + * + * To access the window based information of a module, a unique module specifier must be provided to {@link + * com.sun.star.container.XNameAccess.getByName()} function. The module specifier can be retrieved from the {@link com.sun.star.frame.ModuleManager} + * service. The interface provides references to a com::sun:star:: {@link ui.ModuleWindowStateConfiguration} . + * + * Prior to LibreOffice 4.3, this singleton was only available as a (single-instance) {@link WindowStateConfiguration} service. + * @see com.sun.star.frame.ModuleManager + * @since LibreOffice 4.3 + */ + type theWindowStateConfiguration = container.XNameAccess; + + /** + * A legacy (single-instance) service-variant of {@link theUICategoryDescription} singleton. + * @deprecated DeprecatedUse theUICategoryDescription singleton instead. + * @since OOo 2.0 + */ + type UICategoryDescription = container.XNameAccess; + + /** + * specifies a user interface configuration manager which controls all customizable user interface elements of an object. + * @since OOo 2.0 + */ + type UIConfigurationManager = XUIConfigurationManager2; + + /** + * specifies a user interface element factory that can create and initialize a user interface element type. + * + * It depends on the implementation which user interface element types can be created. It is also possible that a factory is only able to create one + * special user interface element. User interface element factories must be registered at the single instance {@link UIElementFactoryManager} service to + * provide access to itself. + * @since OOo 2.0 + */ + type UIElementFactory = XUIElementFactory; + + /** + * A legacy (single-instance) service-variant of {@link theUIElementFactoryManager} singleton. + * @deprecated DeprecatedUse theUIElementFactoryManager singleton instead. + * @since OOo 2.0 + */ + type UIElementFactoryManager = XUIElementFactoryManager; + + /** + * specifies a factory which creates a window that is a container for user interface elements. Dependent on the provided arguments different window types + * can be created. This container window must be capable of being integrated into another window (e.g. docking or floating windows). + * + * The specific type of the created window depends on the provided arguments. + * @since OOo 3.1 + */ + type WindowContentFactory = lang.XSingleComponentFactory; + + /** + * A legacy (single-instance) service-variant of {@link theWindowContentFactoryManager} singleton. + * @deprecated DeprecatedUse theWindowContentFactoryManager singleton instead. + * @since LibreOffice 4.1 + */ + type WindowContentFactoryManager = lang.XSingleComponentFactory; + + /** + * A legacy (single-instance) service-variant of {@link theWindowStateConfiguration} singleton. + * @deprecated DeprecatedUse theWindowStateConfiguration singleton instead. + * @since OOo 2.0 + */ + type WindowStateConfiguration = container.XNameAccess; + + /** determines the action that is requested from the {@link XContextMenuInterceptor} . */ + const enum ContextMenuInterceptorAction { + /** the context menu must not be executed. The next registered {@link XContextMenuInterceptor} should not be notified. */ + CANCELLED = 1, + /** the menu has been modified and the next registered {@link XContextMenuInterceptor} should be notified. */ + CONTINUE_MODIFIED = 3, + /** the menu has been modified and should be executed without notifying the next registered {@link XContextMenuInterceptor} . */ + EXECUTE_MODIFIED = 2, + /** the {@link XContextMenuInterceptor} has ignored the call. The next registered {@link XContextMenuInterceptor} should be notified. */ + IGNORED = 0, + } + + /** + * specifies different docking areas a frame based layout manager supports. + * + * A frame based layout manager supports four different docking areas where dockable user interface elements can be docked. + * @see com.sun.star.frame.XLayoutManager + * @since OOo 2.0 + */ + const enum DockingArea { + /** the bottom docking area above the status bar. */ + DOCKINGAREA_BOTTOM = 1, + /** a default docking area. It depends on the implementation how to treat this value. */ + DOCKINGAREA_DEFAULT = 4, + /** the left side docking area. */ + DOCKINGAREA_LEFT = 2, + /** the right side docking area. */ + DOCKINGAREA_RIGHT = 3, + /** the top docking area below the menu bar. */ + DOCKINGAREA_TOP = 0, + } + + /** + * describes a trigger for an (user inter-)action. + * + * Common examples for such triggers are menu entries or toolbar icons. + */ + interface ActionTrigger { + /** contains the command URL for the menu entry. */ + CommandURL: string; + + /** contains the a URL that points to a help text. */ + HelpURL: string; + + /** contains the menu item image. */ + Image: awt.XBitmap; + + /** contains a sub menu. */ + SubContainer: container.XIndexContainer; + + /** contains the text of the menu entry. */ + Text: string; + } + + /** + * describes a container of user actions. + * + * No assumption is made about any graphical representation: You could have a menu or a toolbox working with the same container describing their entries. + * + * Possible elements of the {@link ActionTriggerContainer} are {@link ActionTrigger} - represents a simply clickable menu entry{@link + * ActionTriggerSeparator} - represents a separator between two entries ; This entry type is of interest for components rendering a an {@link + * ActionTriggerContainer}{@link ActionTriggerContainer} - represents a sub container + */ + interface ActionTriggerContainer extends container.XIndexContainer, lang.XMultiServiceFactory, container.XEnumerationAccess, container.XContainer { } + + /** describes a separator entry. Such entries are of interest for components rendering an {@link ActionTriggerContainer} . */ + interface ActionTriggerSeparator { + /** determines the type of the separator using constants from {@link ActionTriggerSeparatorType} . */ + SeparatorType: number; + } + + /** + * This interface could be incomplete since I derived it from its places of use. + * @since LibreOffice 4.1 + */ + interface AddressBookSourceDialog extends dialogs.XExecutableDialog { + createWithDataSource(ParentWindow: awt.XWindow, DataSource: beans.XPropertySet, DataSourceName: string, Command: string, Title: string): void; + } + + /** + * specifies a configurable user interface element that supports persistence. + * + * Configurable user interface elements are: menubarpopupmenutoolbarstatusbar + * @since OOo 2.0 + */ + interface ConfigurableUIElement extends UIElement, XUIElementSettings { + /** + * specifies the configuration source of this user interface element. + * + * If the property {@link Persistent} is `TRUE` changes on the structure of the user interface element are written back to configuration source. When + * this property is changed, afterwards {@link XUIElementSettings.updateSettings()} must be called so the user interface element tries to retrieve its + * settings from the new user interface configuration manager. + */ + ConfigurationSource: XUIConfigurationManager; + + /** specifies if the user interface element stores changes of its structure to its creator source defined by the property {@link ConfigurationSource} . */ + Persistent: boolean; + } + + /** + * this event is broadcasted by a configuration manager whenever the state of user interface element has changed. + * @since OOo 2.0 + */ + interface ConfigurationEvent extends container.ContainerEvent { + /** contains additional information about this configuration event. The type depends on the specific implementation. */ + aInfo: any; + + /** contains the resource URL of the user interface element or a configuration manager, which has been changed, inserted or replaced. */ + ResourceURL: string; + } + + interface ContextChangeEventObject extends lang.EventObject { + /** Return the name of the application. */ + ApplicationName: string; + + /** Return the application specific context name. */ + ContextName: string; + } + + /** contains all information about the requested context menu. */ + interface ContextMenuExecuteEvent { + /** enables the access to the menu content. The implementing object has to support the service {@link com.sun.star.ui.ActionTriggerContainer} ; */ + ActionTriggerContainer: container.XIndexContainer; + + /** contains the position the context menu will be executed at. */ + ExecutePosition: awt.Point; + + /** provides the current selection inside the source window. */ + Selection: view.XSelectionSupplier; + + /** contains the window where the context menu has been requested */ + SourceWindow: awt.XWindow; + } + + /** @since LibreOffice 4.2 */ + interface DocumentAcceleratorConfiguration extends XAcceleratorConfiguration { + createWithDocumentRoot(DocumentRoot: embed.XStorage): void; + } + + /** + * describes a user interface item that is part of a user interface element. + * + * Common examples for such elements are: menustool barsstatus bars No assumption is made about any graphical representation: You could have a menu or a + * toolbox working with the same item descriptor. + * @since OOo 2.0 + */ + interface ItemDescriptor { + /** contains the command URL which specifies which action should be accomplished. */ + CommandURL: string; + + /** contains the a URL that points to a help text. */ + HelpURL: string; + + /** + * specifies if this item is visible or not. + * + * This property is only valid if the item describes a toolbar or statusbar item. + */ + IsVisible: boolean; + + /** + * specifies an optional sub container. + * + * This property is valid for menus only. It can be used to define sub menus. + */ + ItemDescriptorContainer: container.XIndexAccess; + + /** the text of the user interface item. */ + Label: string; + + /** + * specifies the pixel distance by which the text of the item is shifted on the x-axis. + * + * This property is only valid if the item describes a statusbar item. + */ + Offset: number; + + /** + * different styles which influence the appearance of the item and its behavior. + * + * This property is only valid if the item describes a toolbar or statusbar item. See {@link ItemStyle} for more information about possible styles. + */ + Style: number; + + /** + * specifies which type this item descriptor belongs to. + * + * See constant definition {@link ItemType} . + */ + Type: number; + + /** + * specifies a pixel width for this item inside the user interface element. + * + * This property is only valid if the item describes a toolbar or statusbar item. + */ + Width: number; + } + + /** + * Size used for layouting windows. It specifies a range of valid values and a preferred value. The values must not violate the relation 0 <= Minimum + * <= Preferred <= Maximum. + * @param Minimum Zero or positive. The value itself is included in the valid range. + * @param Maximum A value larger than or equal to Minimum. The special value -1 means that there is no upper bound. Every value larger than or equal to Min + * @param Preferred The preferred size inside the valid range. + */ + interface LayoutSize { + Maximum: number; + Minimum: number; + Preferred: number; + } + + /** @since LibreOffice 4.2 */ + interface ModuleAcceleratorConfiguration extends XAcceleratorConfiguration { + createWithModuleIdentifier(ModuleIdentifier: string): void; + } + + /** + * specifies a user interface configuration manager which gives access to user interface configuration data of a module. + * + * A module user interface configuration manager supports two layers of configuration settings data: ; 1. Layer: A module default user interface + * configuration which describe all user interface elements settings that are used by OpenOffice. It is not possible to insert, remove or change elements + * settings in this layer through the interfaces. ; 2. Layer: A module user interface configuration which only contains customized user interface + * elements and user-defined ones. All changes on user interface element settings are done on this layer. + * @since OOo 2.0 + */ + interface ModuleUIConfigurationManager extends XModuleUIConfigurationManager2 { + /** + * provides a function to initialize a module user interface configuration manager instance. + * + * A module user interface configuration manager instance needs the following arguments as {@link com.sun.star.beans.PropertyValue} to be in a working + * state: **DefaultConfigStorage** a reference to a {@link com.sun.star.embed.Storage} that contains the default module user interface configuration + * settings.**UserConfigStorage** a reference to a {@link com.sun.star.embed.Storage} that contains the user-defined module user interface configuration + * settings.**ModuleIdentifier** string that provides the module identifier.**UserRootCommit** a reference to a {@link + * com.sun.star.embed.XTransactedObject} which represents the customizable root storage. Every implementation must use this reference to commit its + * changes also at the root storage. A non-initialized module user interface configuration manager cannot be used, it is treated as a read-only + * container. + */ + createDefault(ModuleShortName: string, ModuleIdentifier: string): void; + } + + /** + * specifies a user interface element. + * + * A user interface element consists of a unique identifier and a type specifier. It provides an interface to retrieve a special purpose interface which + * depends on the specific user interface element type. Every user interface must be initialized before it can be used. + * @since OOo 2.0 + */ + interface UIElement extends XUIElement, lang.XInitialization, util.XUpdatable, lang.XComponent { } + + /** + * describes the internal structure of a configurable user interface element. + * + * No assumption is made about any graphical representation: You could have a menu or a toolbar working with the same {@link UIElementSettings} although + * limitations based on the real user interface element may be visible. + * @since OOo 2.0 + */ + interface UIElementSettings extends container.XIndexAccess, lang.XSingleComponentFactory { + /** + * determine an optional user interface name of the user interface element. + * + * A toolbar can show a its user interface name on the window title, when it is in floating mode. + */ + UIName: string; + } + + /** + * provides read/write access to an accelerator configuration set. + * + * Such configuration set base on: ; Key events structureand Commands, which are represented as URLs; describing a function, which and can be executed + * using the dispatch API. + * + * Note further: ; All changes you made on this configuration access modify the the configuration set inside memory only. You have to use the {@link + * com.sun.star.util.XFlushable} interface (which must be available at the same implementation object too), to make it persistent. + * @see AcceleratorConfiguration + * @see dom.sun.star.util.XFlushable + * @since OOo 2.0 + */ + interface XAcceleratorConfiguration extends XUIConfigurationPersistence, XUIConfigurationStorage, XUIConfiguration { + /** + * return the list of all key events, which are available at this configuration set. + * + * The key events are the "primary keys" of this configuration sets. Means: Commands are registered for key events. + * + * Such key event can be mapped to its bound command, using the method getCommandForKeyEvent(). + * @returns A list of key events. + * @see getCommandForKeyEvent(). + */ + readonly AllKeyEvents: SafeArray; + + /** + * return the list of all key events, which are available at this configuration set. + * + * The key events are the "primary keys" of this configuration sets. Means: Commands are registered for key events. + * + * Such key event can be mapped to its bound command, using the method getCommandForKeyEvent(). + * @returns A list of key events. + * @see getCommandForKeyEvent(). + */ + getAllKeyEvents(): SafeArray; + + /** + * return the registered command for the specified key event. + * + * This function can be used to: ; by a generic service, which can execute commands if a keyboard event occurs.or to iterate over the whole container and + * change some accelerator bindings. + * @param aKeyEvent the key event, where the registered command is searched for. + * @returns The registered command for the specified key event. + * @throws com::sun::star::container::NoSuchElementException if the key event is an invalid one or does not exists inside this configuration set. + */ + getCommandByKeyEvent(aKeyEvent: awt.KeyEvent): string; + + /** + * optimized access to the relation "command-key" instead of "key-command" which is provided normally by this interface. + * + * It can be used to implement collision handling, if more than one key event match to the same command. The returned list contains all possible key + * events - and the outside code can select an possible one. Of course - mostly this list will contain only one key event ... + * @param sCommand the command, where key bindings are searched for. + * @returns A list of {@link com.sun.star.awt.KeyEvent} structures, where the specified command is registered for. + * @throws com::sun::star::lang::IllegalArgumentException if the specified command is empty. It can't be checked, if a command is valid - because every URL + * @throws com::sun::star::container::NoSuchElementException if the specified command isn't empty but does not occur inside this configuration set. + */ + getKeyEventsByCommand(sCommand: string): SafeArray; + + /** + * optimized function to map a list of commands to a corresponding list of key events. + * + * It provides a fast mapping, which is e.g. needed by a menu or toolbar implementation. E.g. a sub menu is described by a list of commands - and the + * implementation of the menu must show the corresponding shortcuts. Iteration over all items of this configuration set can be very expensive. + * + * Instead to the method getKeyEventsForCommand() the returned list contains only one(!) key event bound to one(!) requested command. If more than one + * key event is bound to a command - a selection is done inside this method. This internal selection can't be influenced from outside. + * @param lCommandList a list of commands + * @returns A (non packed!) list of key events, where every item match by index directly to a command of the specified **CommandList** . If a command does no + * @throws com::sun::star::lang::IllegalArgumentException if at least one of the specified commands is empty. It can't be checked, if a command is valid - b + */ + getPreferredKeyEventsForCommandList(lCommandList: LibreOffice.SeqEquiv): SafeArray; + + /** + * search for an key-command-binding inside this configuration set, where the specified command is used. + * + * If such binding could be located, the command will be removed from it. If as result of that the key binding will be empty, if will be removed too. + * + * This is an optimized method, which can perform removing of commands from this configuration set. Because normally Commands are "foreign keys" and key + * identifier the "primary keys" - it needs some work to remove all commands outside this container ... + * @param sCommand the command, which should be removed from any key binding. + * @throws com::sun::star::lang::IllegalArgumentException if the specified command is empty. + * @throws com::sun::star::container::NoSuchElementException if the specified command isn't used inside this configuration set. + */ + removeCommandFromAllKeyEvents(sCommand: string): void; + + /** + * remove a key-command-binding from this configuration set. + * @param aKeyEvent the key event, which should be removed. + * @throws com::sun::star::container::NoSuchElementException if the key event does not exists inside this configuration set. + */ + removeKeyEvent(aKeyEvent: awt.KeyEvent): void; + + /** + * modify or create a key - command - binding. + * + * If the specified key event does not already exists inside this configuration access, it will be created and the command will be registered for it. + * + * If the specified key event already exists, its command will be overwritten with the new command. There is no warning nor any error about that! The + * outside code has to use the method getCommandForKeyEvent() to check for possible collisions. + * + * Note: This method can't be used to remove entities from the configuration set. Empty parameters will result into an exception! Use the method {@link + * removeKeyEvent()} instead. + * @param aKeyEvent specify the key event, which must be updated or new created. + * @param sCommand the new command for the specified key event. + * @see removeKeyEvent() + * @throws com::sun::star::lang::IllegalArgumentException if the key event isn't a valid one. Commands can be checked only, if they are empty. Because every + */ + setKeyEvent(aKeyEvent: awt.KeyEvent, sCommand: string): void; + } + + interface XContextChangeEventListener extends lang.XEventListener { + notifyContextChangeEvent(event: ContextChangeEventObject): void; + } + + /** + * Provide a central access point for a group of events. + * + * Listeners can be added with a simple restriction on the event source. They are only called for events that originate at the specified source. + * + * Event providers can broadcast an event to all interested listeners. + * + * The XEventMultiplexer interface is typically implemented as a singleton + */ + interface XContextChangeEventMultiplexer extends uno.XInterface { + /** + * Add an event listener that is called only when events are broadcast for the specified event focus. + * @param xListener An empty reference results in an InvalidArgumentException. One listener may be added more than once for different event foci. Adding a + * @param xEventFocus An empty reference is a valid value. In this case the registered listener will be called for every event broadcast, regardless of its + * @throws com::sun::star::lang::IllegalArgumentException + */ + addContextChangeEventListener(xListener: XContextChangeEventListener, xEventFocus: uno.XInterface): void; + + /** Call all event listeners that where added for the specified event focus. */ + broadcastContextChangeEvent(aEvent: ContextChangeEventObject, xEventFocus: uno.XInterface): void; + + /** + * Remove an event listener for all event foci. + * @param xListener An empty reference results in an InvalidArgumentException. It is not an error when the listener is not registered for any event focus. + * @throws com::sun::star::lang::IllegalArgumentException + */ + removeAllContextChangeEventListeners(xListener: XContextChangeEventListener): void; + + /** + * Remove an event listener for the specified event focus. + * + * When the same listener was added for other event foci then these associations remain unmodified. + * @param xListener An empty reference results in an InvalidArgumentException. When the listener is not registered for the given event focus then an Invali + * @param xEventFocus The listener is only removed for this event focus. An empty reference is a valid value. + * @throws com::sun::star::lang::IllegalArgumentException + */ + removeContextChangeEventListener(xListener: XContextChangeEventListener, xEventFocus: uno.XInterface): void; + } + + /** This interface enables an object to get interceptors registered that change context menus or prevent them from being executed. */ + interface XContextMenuInterception extends uno.XInterface { + /** registers an {@link XContextMenuInterceptor} , which will become the first interceptor in the chain of registered interceptors. */ + registerContextMenuInterceptor(Interceptor: XContextMenuInterceptor): void; + + /** + * removes an {@link XContextMenuInterceptor} which was previously registered using {@link XContextMenuInterception.registerContextMenuInterceptor()} . + * + * The order of removals is arbitrary. It is not necessary to remove the last registered interceptor first. + */ + releaseContextMenuInterceptor(Interceptor: XContextMenuInterceptor): void; + } + + /** This interface enables the object to be registered as interceptor to change context menus or prevent them from being executed. */ + interface XContextMenuInterceptor extends uno.XInterface { + /** + * notifies the interceptor about the request to execute a ContextMenu. The interceptor has to decide whether the menu should be executed with or without + * being modified or may ignore the call. + */ + notifyContextMenuExecute(aEvent: ContextMenuExecuteEvent): ContextMenuInterceptorAction; + } + + /** + * provides access to Deck + * @since LibreOffice 5.1 + */ + interface XDeck { + /** + * Activate the deck and display its content + * @param bActivate The requested state for the deck TRUE sets the deck as the active oneFALSE hide the deck and defaults to the first deck of the sidebar + */ + activate(bActivate: boolean): void; + + /** The deck identifier */ + getId(): string; + + /** Get the ordering index of the deck button in sidebar */ + getOrderIndex(): number; + + /** Panels collection attached to the deck */ + getPanels(): XPanels; + + /** Get the deck title string */ + getTitle(): string; + + /** The deck identifier */ + readonly Id: string; + + /** Is the deck the active one */ + isActive(): boolean; + + /** Move deck one step down in the sidebar */ + moveDown(): void; + + /** Move deck button at first position in sidebar */ + moveFirst(): void; + + /** Move deck button at last position in sidebar */ + moveLast(): void; + + /** Move deck one step up in the sidebar */ + moveUp(): void; + + /** Get the ordering index of the deck button in sidebar */ + OrderIndex: number; + + /** Panels collection attached to the deck */ + readonly Panels: XPanels; + + /** + * Set the ordering index of the deck button in sidebar + * @param newOrderIndex The new position + */ + setOrderIndex(newOrderIndex: number): void; + + /** + * Set the deck title string + * @param newTitle The new title string + */ + setTitle(newTitle: string): void; + + /** Get the deck title string */ + Title: string; + } + + /** + * provides access to Decks of a Sidebar. + * @since LibreOffice 5.1 + */ + interface XDecks extends container.XIndexAccess, container.XNameAccess { } + + /** + * this interface enables developer to implement different docking area acceptors which are used by the frame based layout manager. + * + * A docking area acceptor is responsible to control the docking area of a container window. As OLE for example supports inplace and outplace editing, + * there are different parts of code responsible for the container window. This interface enables developer to make support implementations for these + * scenarios. + * @see com.sun.star.frame.XFrame + * @since OOo 2.0 + */ + interface XDockingAreaAcceptor extends uno.XInterface { + /** + * provide the container window where the layout manager can request border space for docking windows. + * + * Additionally the layout manager uses this window to create its own child windows for docking purposes. + */ + readonly ContainerWindow: awt.XWindow; + + /** + * provide the container window where the layout manager can request border space for docking windows. + * + * Additionally the layout manager uses this window to create its own child windows for docking purposes. + */ + getContainerWindow(): awt.XWindow; + + /** + * method to ask an implementation if the provided space for docking windows is available or not. + * + * The {@link com.sun.star.awt.Rectangle} parameter is filled by the caller with pixel data. The members of {@link com.sun.star.awt.Rectangle} must be + * filled as following: X = requested area on left side (in pixel)Y = requested area on top side (in pixel)Width = requested area on right side (in + * pixel)Height = requested area on bottom side (in pixel) + */ + requestDockingAreaSpace(RequestedSpace: awt.Rectangle): boolean; + + /** + * method to brief an implementation that we need new border space. + * + * The callee must size its document window so that we have the amount of space we have provided. The {@link com.sun.star.awt.Rectangle} parameter is + * filled by the caller with pixel data. The members of {@link com.sun.star.awt.Rectangle} must be filled as following: X = new area on left side (in + * pixel)Y = new area on top side (in pixel)Width = new area on right side (in pixel)Height = new area on bottom side (in pixel) + */ + setDockingAreaSpace(BorderSpace: awt.Rectangle): void; + } + + /** + * specifies access functions to an images manager interface to add, replace and remove images associations to command URLs. + * + * An image manager controls a number of image sets which are specified by a {@link ImageType} . + */ + interface XImageManager extends XUIConfigurationPersistence, XUIConfiguration, lang.XComponent, lang.XInitialization { + /** + * retrieves the list of command URLs which have images associated. + * @param nImageType specifies the image type for this operation. + * @returns all command URLs within the images manager that have an image associated. + */ + getAllImageNames(nImageType: number): SafeArray; + + /** + * retrieves the associated images of command URLs. + * @param nImageType specifies the image type for this association operation. + * @param aCommandURLSequence a sequence of command URLs for which the images are requested. + * @returns a sequence of graphics object which are associated with the provided command URLs. If an unknown command URL is provided or a command URL has no + */ + getImages(nImageType: number, aCommandURLSequence: LibreOffice.SeqEquiv): SafeArray; + + /** + * determines if a command URL has an associated image. + * @param nImageType specifies the image type for this operation. + * @param CommandURL a command URL that should be checked for an associated image. + * @returns `TRUE` if an image is associated, otherwise `FALSE` . + */ + hasImage(nImageType: number, CommandURL: string): boolean; + + /** + * inserts new image/command associations to a image manager. + * @param nImageType specifies the image type for this association operation. + * @param aCommandURLSequence a sequence of command URLs which specify which commands get an new image. + * @param aGraphicSequence a sequence of graphic objects which should be associated with the provided command URLs. If an association is already present i + */ + insertImages(nImageType: number, aCommandURLSequence: LibreOffice.SeqEquiv, aGraphicSequence: LibreOffice.SeqEquiv): void; + + /** + * removes associated images to a command URL. + * @param nImageType specifies the image type for this association operation. + * @param CommandURLs a sequence of command URLs for which the images should be removed. If the **aCommandURLSequence** contains an invalid command URL a + */ + removeImages(nImageType: number, CommandURLs: LibreOffice.SeqEquiv): void; + + /** + * replaces the associated images of command URLs. + * @param nImageType specifies the image type for this association operation. + * @param aCommandURLSequence a sequence of command URLs for which images should be replaced. + * @param aGraphicsSequence a sequence of graphic objects which should replace the old images of the provided command URLs. If a command URL cannot be fou + */ + replaceImages(nImageType: number, aCommandURLSequence: LibreOffice.SeqEquiv, aGraphicsSequence: LibreOffice.SeqEquiv): void; + + /** + * resets the image manager to default data. + * + * This means that all user images of the instance will be removed. + */ + reset(): void; + } + + /** + * specifies specific functions of a module based user interface configuration manager interface. + * + * A module user interface configuration manager supports, unlike a document based ui configuration manager, two layers of configuration settings data: ; + * 1. Layer: A module default user interface configuration which describe all user interface elements settings that are used by OpenOffice. It is not + * possible to insert, remove or change elements settings in this layer through the interfaces. ; 2. Layer: A module user interface configuration which + * only contains customized user interface elements and user-defined ones. All changes on user interface element settings are done on this layer. This + * layer is the same as the document ui configuration manager uses. + * @since OOo 2.0 + */ + interface XModuleUIConfigurationManager extends uno.XInterface { + /** + * retrieves the settings from the default layer of the user interface configuration manager if it has a default layer. + * @param ResourceURL a resource URL which identifies the user interface element. A resource URL must meet the following syntax: "private:resource/$type/$n + * @returns `TRUE` if default settings have been found in the default layer, otherwise `FALSE` . + */ + getDefaultSettings(ResourceURL: string): container.XIndexAccess; + + /** + * determine if the settings of a user interface element is part of the default layer of the user interface configuration manager. + * @param ResourceURL a resource URL which identifies the user interface element. A resource URL must meet the following syntax: "private:resource/$type/$n + * @returns `TRUE` if settings have been found in the default layer, otherwise `FALSE` . + */ + isDefaultSettings(ResourceURL: string): boolean; + } + + /** + * Provides a unified interface for the {@link ModuleUIConfigurationManager} service. + * @since LibreOffice 4.2 + */ + interface XModuleUIConfigurationManager2 extends XUIConfigurationPersistence, XUIConfigurationManager, XModuleUIConfigurationManager, XUIConfiguration { } + + /** + * allows to retrieve user interface configuration managers related to OpenOffice.org modules. + * @since OOo 2.0 + */ + interface XModuleUIConfigurationManagerSupplier extends uno.XInterface { + /** + * returns the requested module based user interface configuration manager. + * @param ModuleIdentifier a module identifier which identifies an OpenOffice.org module. The module identifier can be retrieved from the {@link com.sun.st + * @returns an object implementing {@link com.sun.star.ui.ModuleUIConfigurationManager} service. If the provided module identifier is unknown a {@link com.su + */ + getUIConfigurationManager(ModuleIdentifier: string): XUIConfigurationManager; + } + + /** + * provides access to Panel + * @since LibreOffice 5.1 + */ + interface XPanel { + /** Collapse the panel to only show its title bar */ + collapse(): void; + + /** Get the panel dialog element */ + readonly Dialog: awt.XWindow; + + /** + * Expand and display the panel + * @param bCollapseOther TRUE collapse all other panels of the deckFALSE do not change other panels state + */ + expand(bCollapseOther: boolean): void; + + /** Get the panel dialog element */ + getDialog(): awt.XWindow; + + /** The panel identifier */ + getId(): string; + + /** Get the ordering index of the panel in the deck */ + getOrderIndex(): number; + + /** Get the panel title string */ + getTitle(): string; + + /** The panel identifier */ + readonly Id: string; + + /** Is the panel expanded */ + isExpanded(): boolean; + + /** Move the panel one step down in the deck */ + moveDown(): void; + + /** Move panel as first item of the deck */ + moveFirst(): void; + + /** Move panel as last item of the deck */ + moveLast(): void; + + /** Move panel one step up in the deck */ + moveUp(): void; + + /** Get the ordering index of the panel in the deck */ + OrderIndex: number; + + /** Set the ordering index of the panel in the deck */ + setOrderIndex(newOrderIndex: number): void; + + /** + * Set the panel title string + * @param newTitle The new title string + */ + setTitle(newTitle: string): void; + + /** Get the panel title string */ + Title: string; + } + + /** + * provides access to Panels of a Deck. + * @since LibreOffice 5.1 + */ + interface XPanels extends container.XIndexAccess, container.XNameAccess { + /** The deck Id that contains the Panels */ + readonly DeckId: string; + + /** The deck Id that contains the Panels */ + getDeckId(): string; + } + + /** Interface of the sidebar that allows its elements like panels to eg request layouts. */ + interface XSidebar { + /** + * Request layout of the sidebar. Call this method when one of the panels wants to change its size due to late initilization or different content after a + * context change. + */ + requestLayout(): void; + } + + /** Optional interface of sidebar panels. */ + interface XSidebarPanel { + /** + * For a given width of the container the layouter asks every ui element for its optimal height. + * + * The height to which a ui element is set may differ from the returned value. + * + * The height is set via the XWindow interface. + */ + getHeightForWidth(nWidth: number): LayoutSize; + + /** Minimal possible width of this panel. */ + getMinimalWidth(): number; + + /** Minimal possible width of this panel. */ + readonly MinimalWidth: number; + } + + /** + * Interface of the sidebar + * @since LibreOffice 5.1 + */ + interface XSidebarProvider extends uno.XInterface { + readonly Decks: XDecks; + + /** Get the XFrame owner */ + readonly Frame: frame.XFrame; + getDecks(): XDecks; + + /** Get the XFrame owner */ + getFrame(): frame.XFrame; + + /** Returns the sidebar object */ + getSidebar(): XSidebar; + + /** Is the sidebar visible */ + isVisible(): boolean; + + /** + * Display the sidebar + * @param bVisible the requested visible state + */ + setVisible(bVisible: boolean): void; + + /** + * Decks container visibility + * @param bVisible the requested visible state FALSE collapses the deck container horizontally. Then Only shows the deck TabBar selectorTRUE expands the de + */ + showDecks(bVisible: boolean): void; + + /** Returns the sidebar object */ + readonly Sidebar: XSidebar; + } + + /** + * Represents an item in a status bar + * @see com.sun.star.frame.XStatusbarController + * @since LibreOffice 4.1 + */ + interface XStatusbarItem { + /** the accessible name of the status bar item */ + AccessibleName: string; + + /** the command of the status bar item */ + Command: string; + + /** the help text of the status bar item when extended help tips are on */ + HelpText: string; + + /** the unique ID of the control within the status bar */ + ItemId: number; + + /** + * the rectangle on the status bar device onto which the item is drawn + * @see com.sun.star.frame.XStatusbarController.paint() + */ + ItemRect: awt.Rectangle; + + /** the offset between this status bar item and the following */ + Offset: number; + + /** the help text of the status bar item when help tips are on */ + QuickHelpText: string; + + /** + * forces repainting the item onto the status bar device + * @see com.sun.star.frame.XStatusbarController.paint() + */ + repaint(): void; + + /** + * the style of the status bar item + * + * The following values apply for a status bar item: + * + * Alignment {@link com.sun.star.ui.ItemStyle.ALIGN_LEFT}{@link com.sun.star.ui.ItemStyle.ALIGN_CENTER}{@link + * com.sun.star.ui.ItemStyle.ALIGN_RIGHT}Drawing {@link com.sun.star.ui.ItemStyle.DRAW_OUT3D}{@link com.sun.star.ui.ItemStyle.DRAW_IN3D}{@link + * com.sun.star.ui.ItemStyle.DRAW_FLAT}{@link com.sun.star.ui.ItemStyle.AUTO_SIZE}{@link com.sun.star.ui.ItemStyle.OWNER_DRAW} + * @see com.sun.star.ui.ItemStyle + */ + Style: number; + + /** the text of status bar item */ + Text: string; + + /** whether the item is visible or not */ + Visible: boolean; + + /** the width of the status bar item */ + Width: number; + } + + /** describes the basic interface to be implemented by a tool panel */ + interface XToolPanel { + /** + * creates the root of the Accessibility object tree for the tool panel + * @param ParentAccessible the parent object in the Accessibility object tree + */ + createAccessible(ParentAccessible: accessibility.XAccessible): accessibility.XAccessible; + + /** + * provides access to the tool panel's main window. + * + * It is allowed for an implementation to return `NULL` here, but in this case some functionality, for instance automatic positioning of the tool panel, + * might not be available, and must be implemented by the tool panel itself. + */ + Window: awt.XWindow; + } + + /** + * supports to notify other implementations about changes of a user interface configuration manager. + * + * The {@link XUIConfiguration} interface is provided for user interface configuration managers which need to broadcast changes within the container; + * that means the actions of adding, replacing and removing elements are broadcast to listeners. + * + * This can be useful for UI to enable/disable some functions without actually accessing the data. + * @since OOo 2.0 + */ + interface XUIConfiguration extends uno.XInterface { + /** + * adds the specified listener to receive events when elements are changed, inserted or removed. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + * @see XUIConfigurationListener + */ + addConfigurationListener(Listener: XUIConfigurationListener): void; + + /** + * removes the specified listener so it does not receive any events from this user interface configuration manager. + * + * It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. + * @see XUIConfigurationListener + */ + removeConfigurationListener(Listener: XUIConfigurationListener): void; + } + + /** + * supplies information about changes of a user interface configuration manager. + * @since OOo 2.0 + */ + interface XUIConfigurationListener extends lang.XEventListener { + /** + * is invoked when a configuration has inserted an user interface element. + * @param Event provides information about the element which has been inserted. + */ + elementInserted(Event: ConfigurationEvent): void; + + /** + * is invoked when a configuration has removed an user interface element. + * @param Event provides information about the element which has been removed. + */ + elementRemoved(Event: ConfigurationEvent): void; + + /** + * is invoked when a configuration has replaced an user interface element. + * @param Event provides information about the element which has been inserted/replaced. + */ + elementReplaced(Event: ConfigurationEvent): void; + } + + /** + * specifies a user interface configuration manager interface which controls the structure of all customizable user interface elements. + * @since OOo 2.0 + */ + interface XUIConfigurationManager extends uno.XInterface { + /** + * creates an empty settings data container. + * @returns an empty user interface element settings data container, which implements {@link UIElementSettings} . + */ + createSettings(): container.XIndexContainer; + + /** + * retrieves the events manager from the user interface configuration manager. + * + * Every user interface configuration manager has one events manager instance which controls the mapping of events to script URLs of a module or + * document. + * @returns the events manager of the user interface configuration manager, if one exists. + */ + readonly EventsManager: uno.XInterface; + + /** + * retrieves the events manager from the user interface configuration manager. + * + * Every user interface configuration manager has one events manager instance which controls the mapping of events to script URLs of a module or + * document. + * @returns the events manager of the user interface configuration manager, if one exists. + */ + getEventsManager(): uno.XInterface; + + /** + * retrieves the image manager from the user interface configuration manager. + * + * Every user interface configuration manager has one image manager instance which controls all images of a module or document. + * @returns the image manager of the user interface configuration manager. + */ + getImageManager(): uno.XInterface; + + /** + * retrieves the settings of a user interface element. + * @param ResourceURL a resource URL which identifies the user interface element. A resource URL must meet the following syntax: "private:resource/$type/$n + * @param bWriteable must be `TRUE` if the retrieved settings should be a writable. Otherwise `FALSE` should be provided to get a shareable reference to th + * @returns settings data of an existing user interface element, which implements {@link UIElementSettings} . If the settings data cannot be found a {@link c + */ + getSettings(ResourceURL: string, bWriteable: boolean): container.XIndexAccess; + + /** + * retrieves the keyboard short cut manager from the user interface configuration manager. + * + * Every user interface configuration manager has one keyboard short cut manager instance which controls all short cuts of a module or document. + * @returns the short cut manager of the user interface configuration manager. + */ + getShortCutManager(): XAcceleratorConfiguration; + + /** + * retrieves information about all user interface elements within the user interface configuration manager. + * @param ElementType makes it possible to narrow the result set to only one type of user interface elements. If all user interface element types should be + * @returns returns all user interface elements within the user interface configuration manager that meet the given ElementType specification. The following + * @see UIElementType + */ + getUIElementsInfo(ElementType: number): SafeArray>; + + /** + * determines if the settings of a user interface element is part the user interface configuration manager. + * @param ResourceURL a resource URL which identifies the user interface element. A resource URL must meet the following syntax: "private:resource/$type/$n + * @returns `TRUE` if settings have been found, otherwise `FALSE` . + */ + hasSettings(ResourceURL: string): boolean; + + /** + * retrieves the image manager from the user interface configuration manager. + * + * Every user interface configuration manager has one image manager instance which controls all images of a module or document. + * @returns the image manager of the user interface configuration manager. + */ + readonly ImageManager: uno.XInterface; + + /** + * inserts the settings of a new user interface element. + * @param NewResourceURL a resource URL which identifies the new user interface element. + * @param aNewData the settings data of the new user interface element, which implements {@link UIElementSettings} . If the settings data is already prese + */ + insertSettings(NewResourceURL: string, aNewData: container.XIndexAccess): void; + + /** + * removes the settings of an existing user interface element. + * @param ResourceURL a resource URL which identifies the user interface element settings to be removed. If the settings data cannot be found a {@link com + */ + removeSettings(ResourceURL: string): void; + + /** + * replaces the settings of a user interface element with new settings. + * @param ResourceURL a resource URL which identifies the user interface element to be replaced. If no element with the given resource URL exists a {@link + * @param aNewData the new settings data of an existing user interface element, which implements {@link UIElementSettings} . If the settings data cannot b + */ + replaceSettings(ResourceURL: string, aNewData: container.XIndexAccess): void; + + /** + * resets the configuration manager to the default user interface configuration data. + * + * This means that all user interface configuration data of the instance will be removed. A module based user interface configuration manager removes + * user defined elements, but set all other elements back to default. It is not possible to remove default elements from a module user interface + * configuration manager. + */ + reset(): void; + + /** + * retrieves the keyboard short cut manager from the user interface configuration manager. + * + * Every user interface configuration manager has one keyboard short cut manager instance which controls all short cuts of a module or document. + * @returns the short cut manager of the user interface configuration manager. + */ + readonly ShortCutManager: XAcceleratorConfiguration; + } + + /** @since LibreOffice 4.1 */ + interface XUIConfigurationManager2 extends XUIConfigurationStorage, XUIConfigurationPersistence, XUIConfigurationManager, XUIConfiguration, lang.XComponent { } + + /** + * allows to retrieve the user interface configuration manager related to an object. + * @since OOo 2.0 + */ + interface XUIConfigurationManagerSupplier extends uno.XInterface { + /** + * returns the user interface configuration manager related to the object. + * @returns an object implementing {@link com.sun.star.ui.UIConfigurationManager} service. + */ + getUIConfigurationManager(): XUIConfigurationManager; + + /** + * returns the user interface configuration manager related to the object. + * @returns an object implementing {@link com.sun.star.ui.UIConfigurationManager} service. + */ + readonly UIConfigurationManager: XUIConfigurationManager; + } + + /** + * specifies a persistence interface which supports to load/store user interface configuration data to a storage and to retrieve information about the + * current state. + * @since OOo 2.0 + */ + interface XUIConfigurationPersistence extends uno.XInterface { + /** + * provides the current modify state of the configuration manager instance. + * @returns `TRUE` if the configuration manager has changed since the last {@link store()} call. `FALSE` if the configuration manager has not been changed. + */ + isModified(): boolean; + + /** + * provides the current read-only state of the user configuration manager. Storing a user interface configuration to a read-only storage is not possible. + * A read-only configuration manager instance will also not support any changes to its configuration settings. + * @returns `TRUE` if the configuration manager storage is read-only otherwise `FALSE` . + */ + isReadOnly(): boolean; + + /** + * reloads the configuration data from the storage and reinitialize the user interface configuration manager instance with this data. + * + * It is up to the implementation if it defers the first loading process until the first data request using {@link XUIConfigurationManager} interface. + */ + reload(): void; + + /** + * stores the configuration data to the storage provided by setStorage() from the storage and initialize the user interface configuration manager + * instance with the newly data. This call can throw an {@link com.sun.star.io.IOException} if {@link store()} cannot store its data into the internal + * storage. + */ + store(): void; + + /** + * stores the configuration data to the provided storage, ignoring the previously set storage by setStorage(). Can be used to make copy of the current + * user interface configuration data to another storage. This call will throw an {@link com.sun.star.io.IOException} if the provided storage is in + * read-only mode. + * @param Storage all configuration data will be stored to this storage. + */ + storeToStorage(Storage: embed.XStorage): void; + } + + /** + * supplies functions to change or get information about the storage of a user interface configuration manager. + * @since OOo 2.0 + */ + interface XUIConfigurationStorage extends uno.XInterface { + /** + * checks if an instance has already a storage to load/store its data. + * @returns `TRUE` if the instance has a storage otherwise `FALSE` . + */ + hasStorage(): boolean; + + /** + * connects a storage to the user interface configuration manager which is used on subsequent calls of load() and store(). + * @param Storage all configuration data is loaded/stored from/into this storage. If the storage is in read/write mode load() and store() can be used other + */ + setStorage(Storage: embed.XStorage): void; + } + + /** + * provides a function to retrieve a special purpose interface dependent on the user interface element type. + * + * The type of the interface depends on the real type of the user interface element. A menubar user interface element provides access to its + * com::sun::star::awt::XSystemDependentMenuBarPeer which supports to retrieve the system dependent menu handle. A floating window or a toolbar user + * interface element return a {@link com.sun.star.awt.XWindow} interface. + */ + interface XUIElement extends uno.XInterface { + /** + * determines the document frame to which this element is bound to. + * + * The life time of a user interface element does not explicitly depend on the frame itself but on the visible component attached to the frame. It is + * possible to exchange the visible component of a frame and that will lead to the end of life of all user interface elements. + */ + Frame: frame.XFrame; + + /** + * returns an interface to get access to user interface type specific functions. + * @returns a special purpose interface which depends on the type of the user interface element. + */ + getRealInterface(): uno.XInterface; + + /** + * returns an interface to get access to user interface type specific functions. + * @returns a special purpose interface which depends on the type of the user interface element. + */ + readonly RealInterface: uno.XInterface; + + /** a resource URL which is a unique identifier of a user interface element. */ + ResourceURL: string; + + /** + * determines the type of the user interface element. + * @see UIElementType + */ + Type: number; + } + + /** + * specifies a user interface element factory that can create and initialize user interface elements. + * + * User interface element factories must be registered at a {@link UIElementFactoryManager} service to provide access to itself. + * + * Currently the following user interface element types are defined: **menubar** A configurable user interface element.**popupmenu** A configurable user + * interface element.**toolbar** A configurable user interface element.**statusbar** A configurable user interface element.**floater** A basic user + * interface element. + * @since OOo 2.0 + */ + interface XUIElementFactory extends uno.XInterface { + /** + * creates a new instances of a specific user interface element. + * @param ResourceURL specifies which unique user interface element should be created by the factory. A resource URL must meet the following syntax: "priva + * @param Args The following arguments are supported: **Frame**; specifies the {@link com.sun.star.frame.XFrame} instance to which the user interface elem + * @see ConfigurableUIElement + * @see UIElement + */ + createUIElement(ResourceURL: string, Args: LibreOffice.SeqEquiv): XUIElement; + } + + /** + * Provides a unified interface for the new-style service {@link XUIElementFactoryManager} . + * @since LibreOffice 4.1 + */ + interface XUIElementFactoryManager extends XUIElementFactory, XUIElementFactoryRegistration { } + + /** + * is used to query, register and deregister user interface element factories. + * + * A user interface element factory is registered for a set of three properties. **Type** a string that identifies a type of a user interface + * element.**Name** a string that identifies a single user interface element within a type class.**Module** a string that identifies a single module of + * OpenOffice. A combination of these three property values can uniquely identify every user interface element within OpenOffice. + * + * Currently the following user interface element types are defined: **menubar****popupmenu****toolbar****statusbar****floater** + * @since OOo 2.0 + */ + interface XUIElementFactoryRegistration extends uno.XInterface { + /** + * function to remove a previously defined user interface element factory. + * @param aType a string that identifies a type of a user interface element. Currently the following types are supported: **menubar****toolbar****statusbar** + * @param aName an optional name of a single user interface element. This name must be unique within a user interface element type class. This value can re + * @param ModuleIdentifier an optional module name that can be used to deregister a factory only for a single module. This value can remain empty if not a + */ + deregisterFactory(aType: string, aName: string, ModuleIdentifier: string): void; + + /** + * function to retrieve a previously registered user interface element factory. + * @param ResourceURL a resource URL which identifies a user interface element. A resource URL uses the following syntax: "private:resource/$type/$name". I + * @param ModuleIdentifier an optional module identifier. This value can remain empty, if a generic factory is requested. The module identifier can be retr + * @returns a reference to a registered user interface element factory if a factory has been found. An empty reference when no factory has been found. **The + */ + getFactory(ResourceURL: string, ModuleIdentifier: string): XUIElementFactory; + + /** + * function to retrieve a list of all registered user interface element factories + * @returns a sequence of sequence of property values which describe every registered user interface element factory. ; The following properties are defined + */ + getRegisteredFactories(): SafeArray>; + + /** + * function to retrieve a list of all registered user interface element factories + * @returns a sequence of sequence of property values which describe every registered user interface element factory. ; The following properties are defined + */ + readonly RegisteredFactories: SafeArray>; + + /** + * function to register a user interface element factory. + * @param aType a string that identifies a type of a user interface element. Currently the following types are supported: **menubar****toolbar****statusbar** + * @param aName an optional name of a single user interface element. This name must be unique within a user interface element type class. This value can re + * @param aModuleIdentifier an optional module identifier that can be used to register a factory only for a single module. This value can remain empty if n + * @param aFactoryImplementationName a UNO implementation name that can be used by an implementation to create a factory instance. + */ + registerFactory(aType: string, aName: string, aModuleIdentifier: string, aFactoryImplementationName: string): void; + } + + /** + * provides functions to retrieve and change user interface element structure data and to update its visible representation. + * @since OOo 2.0 + */ + interface XUIElementSettings extends uno.XInterface { + /** + * provides a {@link UIElementSettings} instance that provides access to the structure of user interface element if the user interface element type + * supports it. + * @param bWriteable must be `TRUE` if the retrieved settings should be a writable. Otherwise `FALSE` should be provided to get a shareable reference to th + * @returns the current settings of the user interface element. + */ + getSettings(bWriteable: boolean): container.XIndexAccess; + + /** + * set changes to the structure of the user interface element. + * @param UISettings new data settings for the configurable user interface element. User interface elements cannot be changed directly. The changed struct + * @see com.sun.star.ui.UIElementSettings + */ + setSettings(UISettings: container.XIndexAccess): void; + + /** + * forces the user interface element to retrieve new settings from its configuration source. + * + * This is not done automatically as configurable user interface elements are controlled by layout managers. It is more efficient to let the responsible + * layout manager to control the update process in a single task. + */ + updateSettings(): void; + } + + /** + * special interface to receive notification that a user interface element will execute a function. + * @since OOo 2.0 + */ + interface XUIFunctionListener extends lang.XEventListener { + /** + * gets called to notify a component that a user interface element wants to execute a function. + * @param aUIElementName a string which identifies the user interface element that wants to execute a function. + * @param aCommand a string which identifies the function that has been selected by a user. + */ + functionExecute(aUIElementName: string, aCommand: string): void; + } + + /** + * Internal interface to update the used css::frame::XModel + * @since LibreOffice 5.1 + */ + interface XUpdateModel extends uno.XInterface { + updateModel(xModel: frame.XModel): void; + } + + namespace ActionTriggerSeparatorType { + const enum Constants { + LINE = 0, + LINEBREAK = 2, + SPACE = 1, + } + } + + namespace dialogs { + /** Base class of all {@link XExecutableDialog} related exceptions. */ + type ExecutableDialogException = uno.Exception; + + /** A {@link FolderPicker} service. */ + type FolderPicker = XFolderPicker2; + + /** @since LibreOffice 4.1 */ + type XSLTFilterDialog = XExecutableDialog; + + /** @since LibreOffice 4.1 */ + interface AddressBookSourcePilot extends XExecutableDialog { + createWithParent(ParentWindow: awt.XWindow): void; + } + + /** + * Information of a closed dialog. + * + * The broadcaster who sends such event, must send the dialog as the source. + * @see com.sun.star.lang.EventObject + */ + interface DialogClosedEvent extends lang.EventObject { + /** + * @param DialogResult Identifies the result of a dialog. + * @see ExecutableDialogResults + */ + DialogResult: number; + } + + /** + * A {@link FilePicker} . + * + * It is **NOT** recommended to cache a reference to a file picker instance. Due to restrictions by the underlying system there can be specific + * limitations possible. To overcome these problems it's recommended to create a new instance on demand. + * @see XFilePicker + */ + interface FilePicker extends XFilePicker3 { + /** + * Provides the ability to choose between different custom templates that do extend the subset of common controls a {@link FilePicker} usually supports. + * Implementers may omit this interface if the FileOpen dialog doesn't support custom templates. In this case a createInstance will create an ordinary + * FileOpen dialog with only the common {@link FilePicker} elements. The client has to provide one of the specified constants in {@link + * TemplateDescription} . ; ; + * + * **Notes for the implementation of a FileSave dialog:** The implementation of a FileSave dialog should automatically check for existence of a file and + * issue a warning if a file with the same name already exist. + * @see com.sun.star.ui.dialogs.TemplateDescription + */ + createWithMode(Mode: number): void; + } + + /** Context information in case of a {@link FilePicker} event. */ + interface FilePickerEvent extends lang.EventObject { + /** + * @param ElementId Identifies the affected element + * @see com.sun.star.ui.dialogs.CommonFilePickerElementIds + * @see com.sun.star.ui.dialogs.ExtendedFilePickerElementIds + */ + ElementId: number; + } + + /** + * This service enables a filter developer to register a dialog to query for user options before the filter operation is performed. + * + * The user options are stored inside the {@link com.sun.star.document.MediaDescriptor} and can be queried from the {@link + * com.sun.star.document.MediaDescriptor} by the component that implements {@link com.sun.star.document.XFilter} . + * + * The application will set the {@link com.sun.star.document.MediaDescriptor} using the interface {@link com.sun.star.beans.XPropertyAccess} and then + * call {@link XExecutableDialog.execute()} . + * + * If that method returns `ExecutableDialogResults::OK` , the application will retrieve the changed {@link com.sun.star.document.MediaDescriptor} back + * using the interface {@link com.sun.star.beans.XPropertyAccess} . The filter operation is than continued, using the new {@link + * com.sun.star.document.MediaDescriptor} . + * + * Otherwise, the filter operation is canceled. + * @since OOo 1.1.2 + */ + interface FilterOptionsDialog extends beans.XPropertyAccess, XExecutableDialog { } + + /** + * provides a framework for implementing a wizard dialog. + * @since OOo 3.3 + */ + interface Wizard extends XWizard { + /** + * creates a wizard with a multiple possible execution paths + * @param PageIds the IDs of the pages which constitute the execution paths. IDs in each path must be in ascending order. + * @param Controller the wizard controller. + */ + createMultiplePathsWizard(PageIds: LibreOffice.SeqEquiv>, Controller: XWizardController): void; + + /** + * creates a wizard with a single execution path + * @param PageIds the IDs of the pages which constitute the execution path. IDs must be in ascending order. + * @param Controller the wizard controller. + */ + createSinglePathWizard(PageIds: LibreOffice.SeqEquiv, Controller: XWizardController): void; + } + + /** Specifies an interface for an executable dialog in asynchronous mode. */ + interface XAsynchronousExecutableDialog extends uno.XInterface { + /** + * Sets the title of the dialog. + * @param aTitle Set an arbitrary title for the dialog, may be an empty string if the dialog should not have a title. + */ + setDialogTitle(aTitle: string): void; + + /** + * Executes (shows) the dialog and returns immediately. + * @param xListener This listener will be called when the dialog is closed. + */ + startExecuteModal(xListener: XDialogClosedListener): void; + } + + /** + * Generic control access interface. + * + * Use this interface to access user interface controls supported by the implementing service. The supported controls, control properties and the + * appropriate values are documented in the description of the implementing service. + * @see com.sun.star.ui.dialogs.FilePicker + * @see com.sun.star.ui.dialogs.FilePicker + * @since OOo 1.1.2 + */ + interface XControlAccess extends uno.XInterface { + /** + * Query for a control property. + * @param aControlName The name of the control. Common control names are for instance "OkButton" or "CancelButton". + * @param aControlProperty The requested control property. Common control properties are for instance "Label" or "State". + * @returns the requested value. + * @throws com::sun::star::lang::IllegalArgumentException when the control is not supported or the control property is invalid. + */ + getControlProperty(aControlName: string, aControlProperty: string): any; + + /** + * Change a control property. + * @param aControlName The name of the control. Common control names are for instance "OkButton" or "CancelButton". + * @param aControlProperty The control property to manipulate. Common control properties are for instance "Label" or "State". + * @param aValue A value appropriated for the property. + * @throws com::sun::star::lang::IllegalArgumentException when the control is not supported, the control property is invalid or the value fits not the contr + */ + setControlProperty(aControlName: string, aControlProperty: string, aValue: any): void; + } + + /** + * Interface to query for controls and control properties supported by the implementing instance. + * @since OOo 1.1.2 + */ + interface XControlInformation extends uno.XInterface { + /** + * Returns a sequence with properties supported by the specified control. + * @param aControlName The name of the control. Common control names are for instance "OkButton" or "CancelButton". + * @returns a sequence of control properties supported by the specified control. + * @throws com::sun::star::lang::IllegalArgumentException when the specified control is not supported. + */ + getSupportedControlProperties(aControlName: string): SafeArray; + + /** + * Query for the supported controls of a service instance. + * @returns a sequence with the names of the supported controls. + */ + getSupportedControls(): SafeArray; + + /** + * Returns whether control property is supported by a control. + * @param aControlName The name of the control. + * @param aControlProperty The control property to query for. + * @returns `TRUE` if the specified control action is supported. `FALSE` if the specified control action is not supported. + * @throws com::sun::star::lang::IllegalArgumentException when the specified control is not supported. + */ + isControlPropertySupported(aControlName: string, aControlProperty: string): boolean; + + /** + * Returns whether the specified control is supported or not. + * @param aControlName The name of the control. Common control names are for instance "OkButton" or "CancelButton". + * @returns `TRUE` if the specified control is supported. `FALSE` if the specified control is not supported. + */ + isControlSupported(aControlName: string): boolean; + + /** + * Query for the supported controls of a service instance. + * @returns a sequence with the names of the supported controls. + */ + readonly SupportedControls: SafeArray; + } + + /** + * Used to notify listeners about dialog-closed events. + * + * Registered listeners will be notified with a {@link DialogClosedEvent} when a {@link XAsynchronousExecutableDialog} is closed. + * @see XAsynchronousExecutableDialog + * @see DialogClosedEvent + */ + interface XDialogClosedListener extends lang.XEventListener { + /** + * A client receives this event if a dialog is closed. + * @param aEvent of type {@link DialogClosedEvent} that describes the event + * @see EndDialogEvent + */ + dialogClosed(aEvent: DialogClosedEvent): void; + } + + /** Specifies an interface for an executable dialog. */ + interface XExecutableDialog extends uno.XInterface { + /** + * Executes (shows) the dialog. + * @returns A status code of type {@link ExecutableDialogResults} . + */ + execute(): number; + + /** + * Sets the title of the dialog. + * @param aTitle Set an arbitrary title for the dialog, may be an empty string if the dialog should not have a title. + */ + setTitle(aTitle: string): void; + } + + /** Specifies an interface for a {@link FilePicker} */ + interface XFilePicker extends XExecutableDialog { + /** + * Returns the directory that the file dialog is currently showing or was last showing before closing the dialog with Ok. If the user did cancel the + * dialog, the returned value is undefined. + * @returns The directory in URL format, must conform to [Rfc1738]{@link url="http://www.w3.org/Addressing/rfc1738.txt"} . + */ + DisplayDirectory: string; + + /** + * Returns a sequence of the selected files including path information in URL format, conforming to [Rfc1738]{@link + * url="http://www.w3.org/Addressing/rfc1738.txt"} . + * + * If the user closed the dialog with cancel an empty sequence will be returned. + * + * ; + * + * If the dialog is in execution mode and a single file is selected the complete URL of this file will be returned. + * + * If the dialog is in execution mode and the selected file name is false or any other error occurs an empty sequence will be returned. + * @deprecated Deprecateduse com::sun::star::ui::dialogs::XFilePicker2::getSelectedFiles instead + * @returns The complete path of the file or directory currently selected in URL format. This always returns only the first entry of the sequence. ; **Note + */ + readonly Files: SafeArray; + + /** + * Returns the directory that the file dialog is currently showing or was last showing before closing the dialog with Ok. If the user did cancel the + * dialog, the returned value is undefined. + * @returns The directory in URL format, must conform to [Rfc1738]{@link url="http://www.w3.org/Addressing/rfc1738.txt"} . + */ + getDisplayDirectory(): string; + + /** + * Returns a sequence of the selected files including path information in URL format, conforming to [Rfc1738]{@link + * url="http://www.w3.org/Addressing/rfc1738.txt"} . + * + * If the user closed the dialog with cancel an empty sequence will be returned. + * + * ; + * + * If the dialog is in execution mode and a single file is selected the complete URL of this file will be returned. + * + * If the dialog is in execution mode and the selected file name is false or any other error occurs an empty sequence will be returned. + * @deprecated Deprecateduse com::sun::star::ui::dialogs::XFilePicker2::getSelectedFiles instead + * @returns The complete path of the file or directory currently selected in URL format. This always returns only the first entry of the sequence. ; **Note + */ + getFiles(): SafeArray; + + /** + * Sets the default string that appears in the file name box of a {@link FilePicker} . + * @param aName Specifies the default file name, displayed when the {@link FilePicker} is shown. The implementation may accept any string, and does not ha + */ + setDefaultName(aName: string): void; + + /** + * Sets the directory that the file dialog initially displays. + * @param aDirectory Specifies the initial directory in URL format. The given URL must conform to [Rfc1738]{@link url="http://www.w3.org/Addressing/rfc1738 + * @throws com::sun::star::lang::IllegalArgumentException if the URL is invalid (doesn't conform to [Rfc1738]{@link url="http://www.w3.org/Addressing/rfc173 + */ + setDisplayDirectory(aDirectory: string): void; + + /** + * Enable/disable multi-selection mode + * + * If the multi-selection mode is enabled, multiple files may be selected by the user else only one file selection at a time is possible + * @param bMode A value of `TRUE` enables the multi-selection mode. A value of `FALSE` disables the multi-selection mode, this is the default. + */ + setMultiSelectionMode(bMode: boolean): void; + } + + /** extends file picker interface to workaround some design problems. */ + interface XFilePicker2 extends XFilePicker { + /** + * Returns a sequence of the selected files including path information in URL format, conforming to [Rfc1738]{@link + * url="http://www.w3.org/Addressing/rfc1738.txt"} . + * + * If the user closed the dialog with cancel an empty sequence will be returned. + * + * ; + * + * If the user closed the dialog with OK a list of all selected files will be returned. + * + * Instead to the method {@link getFiles()} of base interface {@link XFilePicker} the new method return full qualified URLs for every selected file. + * @returns A list of all selected file as complete URLs. ; **Notes for the implementation of a FileSave dialog:** If there exists a checkbox "Automatic F + */ + getSelectedFiles(): SafeArray; + + /** + * Returns a sequence of the selected files including path information in URL format, conforming to [Rfc1738]{@link + * url="http://www.w3.org/Addressing/rfc1738.txt"} . + * + * If the user closed the dialog with cancel an empty sequence will be returned. + * + * ; + * + * If the user closed the dialog with OK a list of all selected files will be returned. + * + * Instead to the method {@link getFiles()} of base interface {@link XFilePicker} the new method return full qualified URLs for every selected file. + * @returns A list of all selected file as complete URLs. ; **Notes for the implementation of a FileSave dialog:** If there exists a checkbox "Automatic F + */ + readonly SelectedFiles: SafeArray; + } + + /** + * Provides unified interface for {@link FilePicker} service. + * @since LibreOffice 4.1 + */ + interface XFilePicker3 extends XFilePicker2, XFilePickerNotifier, XFilterManager, XFilePreview, XFilterGroupManager, util.XCancellable, lang.XComponent { } + + /** + * Provides access to the controls of a {@link FilePicker} . + * + * A {@link FilePicker} may contain additional elements according to the needs of the different applications. These additional elements can be addressed + * by this interface. + * @see com.sun.star.ui.dialogs.FilePicker + */ + interface XFilePickerControlAccess extends XFilePicker { + /** + * Enables or disables a control. + * @param ControlId Identifies the control. + * @param bEnable If `TRUE` the specified control will be enabled. If `FALSE` the specified control will be disabled. + * @see com.sun.star.ui.dialogs.CommonFilePickerElementIds + * @see com.sun.star.ui.dialogs.ExtendedFilePickerElementIds + */ + enableControl(ControlId: number, bEnable: boolean): void; + + /** + * Returns the label of the specified element. + * @param aControlId Identifies the element for which the label should be returned. + * @returns The label of the specified element or an empty string if the specified element has no or supports no label or the specified element doesn't exist. + * @see com.sun.star.ui.dialogs.CommonFilePickerElementIds + * @see com.sun.star.ui.dialogs.ExtendedFilePickerElementIds + */ + getLabel(aControlId: number): string; + + /** + * Get the value of an additional element within a {@link FilePicker} + * @param aControlId Identifies the element for which value is requested. + * @param aControlAction Specifies which value to retrieve. aControlAction has to be one of the values defined in {@link ControlActions} . Not all of the v + * @returns The value of the specified element. If the specified control is a checkbox the returned value is a boolean that is `TRUE` if the checkbox is chec + * @see com.sun.star.ui.dialogs.CommonFilePickerElementIds + * @see com.sun.star.ui.dialogs.ExtendedFilePickerElementIds + * @see com.sun.star.ui.dialogs.ControlActions + */ + getValue(aControlId: number, aControlAction: number): any; + + /** + * Set the label of the specified element. If the specified element doesn't support setting a label, this method has no effect. + * @param aControlId Identifies the element for which the label should be set. + * @param aLabel The label to be set. + * @see com.sun.star.ui.dialogs.CommonFilePickerElementIds + * @see com.sun.star.ui.dialogs.ExtendedFilePickerElementIds + */ + setLabel(aControlId: number, aLabel: string): void; + + /** + * Set the value of an additional element within a {@link FilePicker} . + * @param ControlId Identifies the element which value is to be set. + * @param aControlAction Specifies an action to perform with the given value. aControlAction has to be one of the values defined in {@link ControlActions} + * @param aValue The value to set. For checkboxes aValue should be a boolean value that should be `TRUE` if the checkbox should be checked and `FALSE` othe + * @see com.sun.star.ui.dialogs.CommonFilePickerElementIds + * @see com.sun.star.ui.dialogs.ExtendedFilePickerElementIds + * @see com.sun.star.ui.dialogs.ControlActions + */ + setValue(ControlId: number, aControlAction: number, aValue: any): void; + } + + /** + * Interface to be implemented by a {@link FilePicker} listener. + * + * The {@link XFilePickerListener} interface must be implemented by the clients of the {@link FilePicker} service which need to be informed about events + * while the {@link FilePicker} service is displayed. + */ + interface XFilePickerListener extends lang.XEventListener { + /** + * A client receives this event if the state of a control within the {@link FilePicker} service dialog changes. + * @param aEvent of type {@link FilePickerEvent} that describes the event. + * @see com.sun.star.ui.dialogs.FilePickerEvent + */ + controlStateChanged(aEvent: FilePickerEvent): void; + + /** + * A client receives this event if the size of the {@link FilePicker} dialog has changed. If the {@link FilePicker} dialog contains a preview the client + * may ask for the new dimension of the preview area. + */ + dialogSizeChanged(): void; + + /** + * A client receives this event if the directory selection within the {@link FilePicker} dialog changes. + * @param aEvent Of type {@link FilePickerEvent} that describes the event. + * @see com.sun.star.ui.dialogs.FilePickerEvent + */ + directoryChanged(aEvent: FilePickerEvent): void; + + /** + * A client receives this event if the file selection within the {@link FilePicker} service dialog changes. + * @param aEvent of type {@link FilePickerEvent} that describes the event + * @see com.sun.star.ui.dialogs.FilePickerEvent + */ + fileSelectionChanged(aEvent: FilePickerEvent): void; + + /** + * A client receives this event if the F1 key or the help button was pressed. + * @param aEvent of type {@link FilePickerEvent} that describes the event + * @returns A help string which the {@link FilePicker} dialog should use to display a help for a specific control. If the returned string is empty it is unde + * @see com.sun.star.ui.dialogs.FilePickerEvent + */ + helpRequested(aEvent: FilePickerEvent): string; + } + + /** Interface to be implemented in order to support listener management. */ + interface XFilePickerNotifier extends uno.XInterface { + /** + * Interface for clients to register as {@link XFilePickerListener} + * @param xListener The {@link XFilePickerListener} interface of the listener that wants to receive events of type {@link FilePickerEvent} . Invalid interf + */ + addFilePickerListener(xListener: XFilePickerListener): void; + + /** + * Interface for clients to unregister as {@link XFilePickerListener} . + * @param xListener The {@link XFilePickerListener} interface of the listener that wants to receive events of type {@link FilePickerEvent} . Invalid interf + */ + removeFilePickerListener(xListener: XFilePickerListener): void; + } + + /** {@link FilePicker} that support the preview of various file formats should implement this interface. */ + interface XFilePreview extends uno.XInterface { + /** + * The method returns the available height of the preview window even if the window is invisible or could not be created. If a service implementation + * doesn't support a file preview 0 will be returned. + * @returns The height of the preview window in pixel. + */ + readonly AvailableHeight: number; + + /** + * The method returns the available width of the preview window even if the window is invisible or could not be created. If a service implementation + * doesn't support a file preview 0 will be returned. + * @returns The width of the preview window in pixel. + */ + readonly AvailableWidth: number; + + /** + * The method returns the available height of the preview window even if the window is invisible or could not be created. If a service implementation + * doesn't support a file preview 0 will be returned. + * @returns The height of the preview window in pixel. + */ + getAvailableHeight(): number; + + /** + * The method returns the available width of the preview window even if the window is invisible or could not be created. If a service implementation + * doesn't support a file preview 0 will be returned. + * @returns The width of the preview window in pixel. + */ + getAvailableWidth(): number; + + /** + * Returns the current show state of the preview. + * @returns A value of `TRUE` if the preview window is visible. A value of `FALSE` if the preview window is invisible. + */ + getShowState(): boolean; + + /** + * The method returns all image formats that the preview supports. + * @returns A sequence of all supported preview formats + * @see com.sun.star.ui.dialogs.FilePreviewImageFormats + */ + getSupportedImageFormats(): SafeArray; + + /** + * The method returns the supported color depth of the target device. + * @returns The color depth in bit, e.g. 8 bit, 16 bit, 32 bit. + */ + getTargetColorDepth(): util.Color; + + /** + * Sets a new image. If the preview is currently hidden the image will be ignored. An empty any will clear the preview window. + * @param aImageFormat Specifies the format of the data that will be delivered + * @param aImage The image data, the image format defines how the image data have to be delivered + * @see com.sun.star.ui.dialogs.FilePreviewImageFormats + * @throws com::sun::star::lang::IllegalArgumentException If the specified image format is invalid or not supported by the preview implementation + */ + setImage(aImageFormat: number, aImage: any): void; + + /** + * Optionally sets the current show state of the preview. It is possible that the preview implementation doesn't support hiding the preview. + * @param bShowState A value of `TRUE` shows the preview window. A value of `FALSE` hides the preview window. + * @returns A value of `TRUE` on success. A value of `FALSE` if the operation fails for any reason or the preview implementation doesn't support hiding the p + */ + setShowState(bShowState: boolean): boolean; + + /** + * Returns the current show state of the preview. + * @returns A value of `TRUE` if the preview window is visible. A value of `FALSE` if the preview window is invisible. + */ + ShowState: boolean; + + /** + * The method returns all image formats that the preview supports. + * @returns A sequence of all supported preview formats + * @see com.sun.star.ui.dialogs.FilePreviewImageFormats + */ + readonly SupportedImageFormats: SafeArray; + + /** + * The method returns the supported color depth of the target device. + * @returns The color depth in bit, e.g. 8 bit, 16 bit, 32 bit. + */ + readonly TargetColorDepth: util.Color; + } + + /** Specifies an interface which allows manipulation of groups of filters for the {@link FilePicker} service. */ + interface XFilterGroupManager extends uno.XInterface { + /** + * Appends a group of filters to the current filter list. + * + * It is implementation dependent how the filter groups are presented to the user. ; It is not even guaranteed that the groups are visualized: + * implementations are free to simply append all the filters separately, with ignoring the group title. + * @param sGroupTitle The title of the filter group. Usually, the caller should localize this title, as it is to be presented to the user. + * @param aFilters The filters which form a group. Every filter consists of two strings, where the first one is a display name (as for sGroupTitle, it hold + * @see com.sun.star.ui.dialogs.XFilterManager + * @see com.sun.star.ui.dialogs.FilePicker + * @throws com::sun::star::lang::IllegalArgumentException if one or more filters in the given filter list already exist. + */ + appendFilterGroup(sGroupTitle: string, aFilters: LibreOffice.SeqEquiv): void; + } + + /** Specifies a filter manager interface for a {@link FilePicker} */ + interface XFilterManager extends uno.XInterface { + /** + * Adds a filter identified by a title. + * @param aTitle Specifies the name of the filter as shown in the filter box of the {@link FilePicker} dialog. + * @param aFilter Specifies the extensions of the filter. Multiple filters should be semicolon separated. The semicolon may not be used as character in a f + * @throws com::sun::star::lang::IllegalArgumentException If a filter with the specified title already exists. + */ + appendFilter(aTitle: string, aFilter: string): void; + + /** + * Returns the currently selected filter. + * @returns The name of the selected filter or an empty string if there is no filter or no filter is currently selected. + */ + CurrentFilter: string; + + /** + * Returns the currently selected filter. + * @returns The name of the selected filter or an empty string if there is no filter or no filter is currently selected. + */ + getCurrentFilter(): string; + + /** + * Sets the current filter. + * @param aTitle Specifies the name of the filter to be set. + * @throws com::sun::star::lang::IllegalArgumentException If the specified filter was not found. + */ + setCurrentFilter(aTitle: string): void; + } + + /** Specifies a {@link FolderPicker} interface. */ + interface XFolderPicker extends XExecutableDialog { + /** + * Returns the selected directory as url conforming to [Rfc1738]{@link url="http://www.w3.org/Addressing/rfc1738.txt"} . + * @returns The selected directory as url if the user did close the dialog with Ok else the returned value is undefined. + */ + readonly Directory: string; + + /** + * Returns the root directory that the {@link FolderPicker} is showing. The return value is undefined if the client did not choose a root directory or + * the previously specified root directory doesn't exist. + * @returns The directory in url format. + */ + DisplayDirectory: string; + + /** + * Returns the selected directory as url conforming to [Rfc1738]{@link url="http://www.w3.org/Addressing/rfc1738.txt"} . + * @returns The selected directory as url if the user did close the dialog with Ok else the returned value is undefined. + */ + getDirectory(): string; + + /** + * Returns the root directory that the {@link FolderPicker} is showing. The return value is undefined if the client did not choose a root directory or + * the previously specified root directory doesn't exist. + * @returns The directory in url format. + */ + getDisplayDirectory(): string; + + /** + * The implementation may optionally show the given text as a description for the user within the dialog, e.g. "Please select a directory". If the client + * doesn't set a description the dialog may show a default description. + */ + setDescription(aDescription: string): void; + + /** + * Sets the root directory that the {@link FolderPicker} should display. It is not specified which root directory the {@link FolderPicker} chooses if the + * specified root directory doesn't exist. + * @param aDirectory Specifies the root directory in url format, conforming to [Rfc1738]{@link url="http://www.w3.org/Addressing/rfc1738.txt"} . + * @throws com::sun::star::lang::IllegalArgumentException if the given url is invalid. + */ + setDisplayDirectory(aDirectory: string): void; + } + + /** + * Provides a unified interface for the new-style {@link FolderPicker} service to implement. + * @since LibreOffice 4.0 + */ + interface XFolderPicker2 extends XFolderPicker, util.XCancellable { } + + /** + * is the main interface implemented by the {@link Wizard} services. + * + * A wizard is a dialog which guides the user through a number of tasks (usually input of data), which the user can accomplish either sequentially or + * out-of-order. For this, a wizard is comprised of a number of tab pages, each page representing a single **step** . + * + * Sequential navigation in a wizard is done via a **Next** and a **Back** button. Non-sequential navigation is done via a roadmap, which is displayed on + * the left hand side of the wizard dialog, lists all available steps, and allows jumping to a certain step (where the creator of the wizard can restrict + * the available steps depending on the current situation in the wizard, see below). + * + * A sequence of steps in a wizard dialog is called a **path** . A given wizard can support one or multiple paths, which are declared at the time of + * construction of the wizard. + * + * In the simplest case, where the wizard supports only one path, all available steps are displayed in the roadmap, and the user can simply travel + * through them as desired. + * + * If the wizard is more complex, and supports multiple paths, things become more complicated. In a given situation of the wizard, where the user is at + * step **k** of the current path, the **potential** or **conflicting** paths are those whose first **k** steps are the same as in the current path. + * Obviously, there's at least one potential path in every situation: the current one. If there is more than one, then the future steps in the dialog are + * not finally decided. In such a case, the roadmap will display future steps up to the point where the potential paths diverge, and then an item **...** + * indicating that the order of steps is undecided. + * + * An {@link XWizardController} can declare a certain path as active path by calling the {@link activatePath()} method. Usually, this is done depending + * on user input. For instance, your wizard could have radio buttons on the first page which effectively decide about which path to take in the wizard. + * + * Single steps in the wizard can be freely enabled and disabled, using the {@link enablePage()} method. Disabled pages are skipped during sequential + * traveling, and not selectable in the roadmap. + * + * The state of the **Next** button in the dialog will be automatically maintained in most situations, depending on the results of calls to the {@link + * XWizardController.canAdvance()} and {@link XWizardPage.canAdvance()} methods. More sophisticated wizard logic, however, will need manual calls to the + * {@link enableButton()} method. Also, the **Finish** button needs to be maintained by the wizard's controller, too, as it cannot be decided generically + * in which situations it should be enabled or disabled. + * @see XWizardController + * @see XWizardPage + * @since OOo 3.3 + */ + interface XWizard extends XExecutableDialog { + /** + * activates a path + * + * If the wizard has been created with multiple paths of control flow, then this method allows switching to another path. + * + * You can only activate a path which shares the first `k` pages with the path which is previously active (if any), where `k` is the index of the current + * page within the current path. + * + * **Example** : Say you have paths, `(0,1,2,5)` and `(0,1,4,5)` (with the numbers denoting page IDs). This means that after page `1` , you either + * continue with page `2` or state `4` ,and after this, you finish in state `5` . ; Now if the first path is active, and your current state is `1` , + * then you can easily switch to the second path, since both paths start with `(0,1)` . ; However, if your current state is `2` , then you can not + * switch to the second path anymore. + * @param PathIndex the index of the path, as used in the {@link Wizard.createMultiplePathsWizard()} constructor. + * @param Final If `TRUE` , the path will be completely activated, even if it is a conflicting path (i.e. there is another path which shares the first `k` + * @throws com::sun::star::container::NoSuchElementException if there is no path with the given index + * @throws com::sun::star::util::InvalidStateException if the path cannot be activated in the current state of the wizard. + */ + activatePath(PathIndex: number, Final: boolean): void; + + /** + * advances to the given page, if possible. + * + * Calling this method is equivalent to the user repeatedly pressing the **Next** button, until the given page is reached. Consequently, the method will + * fail if one of the intermediate pages does not allow advancing to the next page. + */ + advanceTo(PageId: number): boolean; + + /** provides access to the current page of the wizard */ + readonly CurrentPage: XWizardPage; + DialogWindow: awt.XWindow; + + /** + * enables or disables a certain button in the wizard + * + * Normally, you will want to use this method for the **Finish** button only: The **Next** and **Back** buttons are usually maintained automatically, the + * **Help** and **Cancel** buttons are unlikely to ever being disabled. + * @param WizardButton denotes the button to enable or disable, as one of the {@link WizardButton} constants. Must not be {@link WizardButton.NONE} . + * @param Enable specifies whether the button should be enabled ( `TRUE` ) or disabled ( `FALSE` ) + */ + enableButton(WizardButton: number, Enable: boolean): void; + + /** + * enables or disables the given page + * + * You can use this method when not all pages of your wizard are necessarily needed in all cases. For instance, assume that your first wizard page + * contains a check box, which the user can check to enter additional data. If you place this data on the second page, then you will want to enable this + * second page if and only if the checkbox is checked. + * + * If a page is disabled, it can reached neither by clicking the respective item in the wizard's roadmap, nor by sequential traveling. Still, the page's + * item is displayed in the roadmap, though disabled. + * @throws com::sun::star::container::NoSuchElementException if there is no page with the given ID + * @throws com::sun::star::util::InvalidStateException if the page shall be disabled, but is active currently. + */ + enablePage(PageID: number, Enable: boolean): void; + + /** provides access to the current page of the wizard */ + getCurrentPage(): XWizardPage; + + /** + * goes back to the given page, if possible. + * + * Calling this method is equivalent to the user repeatedly pressing the **Back** button, until the given page is reached. + */ + goBackTo(PageId: number): boolean; + + /** is the help URL of the wizard's main window. */ + HelpURL: string; + + /** + * sets a button in the wizard as default button + * + * In general, the default button in a wizard is the one which is activated when the user presses the **return** key while the focus is in a control + * which does not handle this key itself (such as ordinary input controls). + * + * You can use this method, for instance, to make the **Next** button the default button on all pages except the last one, where **Finish** should be + * defaulted. + */ + setDefaultButton(WizardButton: number): void; + + /** + * travels to the next page, if possible + * + * Calling this method is equivalent to the user pressing the **Next** button in the wizard. Consequently, the method will fail if in the current state + * of the wizard, it is not allowed to advance to a next page. + */ + travelNext(): boolean; + + /** + * travels to the next page, if possible + * + * Calling this method is equivalent to the user pressing the **Back** button in the wizard. + */ + travelPrevious(): boolean; + + /** + * updates the wizard elements which are related to traveling. + * + * For instance, the **Next** button is disabled if the current page's {@link XWizardPage.canAdvance()} method returns `FALSE` . + * + * You usually call this method from within a wizard page whose state changed in a way that it affects the user's ability to reach other pages. + */ + updateTravelUI(): void; + } + + /** + * is the interface of a client-provided controller of a custom {@link Wizard} . + * @since OOo 3.3 + */ + interface XWizardController { + canAdvance(): boolean; + + /** + * called when the wizard is about to be finished. + * + * This method allows the controller to do any final checks, and ultimately veto finishing the wizard. + */ + confirmFinish(): boolean; + + /** + * creates a page + * + * {@link Wizard} pages are created on demand, when the respective page is reached during traveling through the wizard. Effectively, this means the + * method is called at most once for each possible page ID. + * @param ParentWindow the parent window to use for the page window + * @param PageId the ID of the page. + * @returns the requested page. + */ + createPage(ParentWindow: awt.XWindow, PageId: number): XWizardPage; + + /** + * provides the title of a page given by ID + * + * The page titles are displayed in the wizard's roadmap. + */ + getPageTitle(PageId: number): string; + + /** called when a new page in the wizard is being activated */ + onActivatePage(PageId: number): void; + + /** called when a page in the wizard is being deactivated */ + onDeactivatePage(PageId: number): void; + } + + /** + * is a single page of a {@link Wizard} + * @since OOo 3.3 + */ + interface XWizardPage extends lang.XComponent { + /** called when the page is activated */ + activatePage(): void; + + /** + * determines whether it is allowed to travel to a later page in the wizard + * + * You should base this decision on the state of the page only, not on a global state of the wizard. Usually, you return `FALSE` here if and only if not + * all necessary input on the page has been provided by the user, or the provided input is not valid. + * + * If checked for validity is expensive, or if you prefer giving your user more detailed feedback on validity than a disabled `Next` button in the + * wizard, then move your checks to the {@link commitPage()} method. + */ + canAdvance(): boolean; + + /** + * is called when the page is about to be left + * + * An implementation can veto the leave by returning `FALSE` here. Usually, the decision about this depends on the current state of the page. + * @param Reason is one of the {@link WizardTravelType} constants denoting the reason why the page should be committed. + */ + commitPage(Reason: number): boolean; + + /** + * denotes the ID of the page. + * + * Within a wizard, no two pages are allowed to have the same ID. + */ + PageId: number; + + /** provides read-only access to the window of the page */ + Window: awt.XWindow; + } + + namespace CommonFilePickerElementIds { + const enum Constants { + CONTROL_FILEVIEW = 4, + EDIT_FILEURL = 5, + EDIT_FILEURL_LABEL = 7, + LISTBOX_FILTER = 3, + LISTBOX_FILTER_LABEL = 6, + PUSHBUTTON_CANCEL = 2, + PUSHBUTTON_OK = 1, + } + } + + namespace ControlActions { + const enum Constants { + ADD_ITEM = 1, + ADD_ITEMS = 2, + DELETE_ITEM = 3, + DELETE_ITEMS = 4, + GET_HELP_URL = 101, + GET_ITEMS = 6, + GET_SELECTED_ITEM = 7, + GET_SELECTED_ITEM_INDEX = 8, + SET_HELP_URL = 100, + SET_SELECT_ITEM = 5, + } + } + + namespace ExecutableDialogResults { + const enum Constants { + CANCEL = 0, + OK = 1, + } + } + + namespace ExtendedFilePickerElementIds { + const enum Constants { + CHECKBOX_AUTOEXTENSION = 100, + CHECKBOX_FILTEROPTIONS = 102, + CHECKBOX_LINK = 104, + CHECKBOX_PASSWORD = 101, + CHECKBOX_PREVIEW = 105, + CHECKBOX_READONLY = 103, + CHECKBOX_SELECTION = 110, + LISTBOX_FILTER_SELECTOR = 210, + LISTBOX_IMAGE_TEMPLATE = 109, + LISTBOX_IMAGE_TEMPLATE_LABEL = 209, + LISTBOX_TEMPLATE = 108, + LISTBOX_TEMPLATE_LABEL = 208, + LISTBOX_VERSION = 107, + LISTBOX_VERSION_LABEL = 207, + PUSHBUTTON_PLAY = 106, + } + } + + namespace FilePreviewImageFormats { + const enum Constants { + BITMAP = 1, + } + } + + namespace ListboxControlActions { + const enum Constants { + ADD_ITEM = 1, + ADD_ITEMS = 2, + DELETE_ITEM = 3, + DELETE_ITEMS = 4, + GET_ITEMS = 6, + GET_SELECTED_ITEM = 7, + SET_SELECT_ITEM = 5, + } + } + + namespace TemplateDescription { + const enum Constants { + FILEOPEN_LINK_PLAY = 12, + FILEOPEN_LINK_PREVIEW = 9, + FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE = 6, + FILEOPEN_PLAY = 7, + FILEOPEN_PREVIEW = 11, + FILEOPEN_READONLY_VERSION = 8, + FILEOPEN_SIMPLE = 0, + FILESAVE_AUTOEXTENSION = 10, + FILESAVE_AUTOEXTENSION_PASSWORD = 2, + FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS = 3, + FILESAVE_AUTOEXTENSION_SELECTION = 4, + FILESAVE_AUTOEXTENSION_TEMPLATE = 5, + FILESAVE_SIMPLE = 1, + } + } + + namespace WizardButton { + const enum Constants { + CANCEL = 4, + FINISH = 3, + HELP = 5, + NEXT = 1, + NONE = 0, + PREVIOUS = 2, + } + } + + namespace WizardTravelType { + const enum Constants { + BACKWARD = 2, + FINISH = 3, + FORWARD = 1, + } + } + } + + namespace ImageType { + const enum Constants { + COLOR_HIGHCONTRAST = 4, + COLOR_NORMAL = 0, + SIZE_32 = 2, + SIZE_DEFAULT = 0, + SIZE_LARGE = 1, + } + } + + namespace ItemStyle { + const enum Constants { + ALIGN_CENTER = 2, + ALIGN_LEFT = 1, + ALIGN_RIGHT = 3, + AUTO_SIZE = 32, + DRAW_FLAT = 12, + DRAW_IN3D = 8, + DRAW_OUT3D = 4, + DROP_DOWN = 256, + DROPDOWN_ONLY = 1024, + ICON = 128, + OWNER_DRAW = 16, + RADIO_CHECK = 64, + REPEAT = 512, + TEXT = 2048, + } + } + + namespace ItemType { + const enum Constants { + DEFAULT = 0, + SEPARATOR_LINE = 1, + SEPARATOR_LINEBREAK = 3, + SEPARATOR_SPACE = 2, + } + } + + namespace test { + type UITest = XUITest; + + interface XUIObject { + readonly Children: SafeArray; + executeAction(action: string, propValues: beans.PropertyValues): void; + getChild(id: string): XUIObject; + getChildren(): SafeArray; + getState(): beans.PropertyValues; + getType(): string; + readonly State: beans.PropertyValues; + readonly Type: string; + } + + interface XUITest { + executeCommand(command: string): void; + getTopFocusWindow(): XUIObject; + readonly TopFocusWindow: XUIObject; + } + } + + namespace UIElementType { + const enum Constants { + COUNT = 8, + DOCKINGWINDOW = 7, + FLOATINGWINDOW = 5, + MENUBAR = 1, + POPUPMENU = 2, + PROGRESSBAR = 6, + STATUSBAR = 4, + TOOLBAR = 3, + TOOLPANEL = 7, + UNKNOWN = 0, + } + } + } + + namespace uno { + /** + * {@link Exception} signalling a deployment error. + * @since OOo 1.1.2 + */ + type DeploymentException = RuntimeException; + + /** a simple named object container. */ + type NamingService = XNamingService; + + /** + * This exception or a subclass can occur at every interface method. + * + * It shall signal an error, which was not covered by the interface method specification. This exception (or a derived one) is thrown, when for instance + * an interprocess bridge to the object broke down, some explicitly forbidden invalid parameters were passed ( e.g. null references ) or the called + * object has been disposed before. + */ + type RuntimeException = Exception; + + /** Base exception for all security related exceptions. */ + type SecurityException = RuntimeException; + + /** + * This enum describes all type classes of UNO. Every specific type has a type class specifying the general context of the reflected type. + * + * Example: A type reflecting the interface {@link XInterface} is of type class INTERFACE and its name is "com.sun.star.uno.XInterface". + */ + const enum TypeClass { + /** reflecting the any type; anys can carry any UNO value except of any values */ + ANY = 14, + /** + * Deprecated, UNOIDL does not have an array concept. + * @deprecated Deprecated + */ + ARRAY = 21, + /** reflecting the boolean type; true and false */ + BOOLEAN = 2, + /** reflecting the 8-bit ordinal type */ + BYTE = 3, + /** reflecting the 16-bit unicode character type */ + CHAR = 1, + /** reflecting constants */ + CONSTANT = 29, + /** reflecting constants groups */ + CONSTANTS = 30, + /** reflecting the 64-bit floating point type */ + DOUBLE = 11, + /** reflecting enum types */ + ENUM = 15, + /** reflecting exception types */ + EXCEPTION = 19, + /** reflecting the 32-bit floating point type */ + FLOAT = 10, + /** reflecting the signed 64-bit ordinal type */ + HYPER = 8, + /** reflecting interface types */ + INTERFACE = 22, + /** reflecting interface attributes */ + INTERFACE_ATTRIBUTE = 26, + /** reflecting interface methods */ + INTERFACE_METHOD = 25, + /** reflecting the signed 32-bit ordinal type */ + LONG = 6, + /** reflecting modules */ + MODULE = 24, + /** reflecting properties */ + PROPERTY = 28, + /** reflecting sequence types */ + SEQUENCE = 20, + /** reflecting services */ + SERVICE = 23, + /** reflecting the signed 16-bit ordinal type */ + SHORT = 4, + /** reflecting singletons */ + SINGLETON = 31, + /** reflecting the string type; strings of unicode characters */ + STRING = 12, + /** reflecting compound types */ + STRUCT = 17, + /** reflecting the meta type */ + TYPE = 13, + /** reflecting typedefed types referencing other types */ + TYPEDEF = 16, + /** + * Deprecated, UNOIDL does not have a union concept. + * @deprecated Deprecated + */ + UNION = 18, + /** reflecting the unreflectable type */ + UNKNOWN = 27, + /** reflecting the unsigned 64-bit ordinal type */ + UNSIGNED_HYPER = 9, + /** reflecting the unsigned 32-bit type */ + UNSIGNED_LONG = 7, + /** reflecting the unsigned 16-bit ordinal type */ + UNSIGNED_SHORT = 5, + /** reflecting the void type; denotes no type */ + VOID = 0, + } + + /** + * the base of all UNO exceptions + * + * All exceptions defined in UNO idl should derive from this exception. + */ + interface Exception { + /** + * should contain a reference to the original, which raised the exception. + * + * May be NULL. + */ + Context: XInterface; + + /** + * gives a detailed description of the reason, why the exception was thrown. + * + * The description should be as detailed as possible. + */ + Message: string; + } + + /** + * Specifies an universal interface key (globally unique). + * + * This struct is deprecated. Uiks are not used anymore. + * @deprecated Deprecated + */ + interface Uik { + /** specifies a 4 byte data block. */ + Data1: number; + + /** specifies a 2 byte data block. */ + Data2: number; + + /** specifies a 2 byte data block. */ + Data3: number; + + /** specifies a 4 byte data block. */ + Data4: number; + + /** specifies a 4 byte data block. */ + Data5: number; + } + + /** + * This is the server-side interface to a weak adapter. + * + * The implementation of {@link XAdapter} must know but not hold the adapted object, because it must not affect the lifetime of the adapted object. + * @see XWeak for description of concepts. + */ + interface XAdapter extends XInterface { + /** + * adds a reference to the adapter. + * + * All added references are called when the adapted object dies. + */ + addReference(xRef: XReference): void; + + /** queries the adapted object if it is alive. */ + queryAdapted(): XInterface; + + /** removes a reference from the adapter. */ + removeReference(xRef: XReference): void; + } + + /** + * Objects which implement this interface can become aggregates of a delegator. + * + * That means if an object "A" aggregates "B", "A" can provide all or some of the interfaces of "B". Whenever the method {@link + * XInterface.queryInterface()} is called on either of the objects, the call will be forwarded to object "A". Object "A" now can determine whether to use + * the interfaces of "A" or "B" or neither. Actually, any number of aggregates can be used, even nested ones (aggregated objects which are delegators by + * themselves). + * + * The following rules are to be observed: 1. All calls to {@link XInterface.acquire()} which are made before the delegator was set (using the method + * {@link XAggregation.setDelegator()} ) must not be taken back (using the method {@link XInterface.release()} ) before the delegation is removed by + * calling `xAggregation->setDelegator(NULL)` . + * + * 2. The constructor of a delegator has to increment its own reference count by calling its method {@link XInterface.acquire()} before it sets itself + * to any aggregate using the method {@link XAggregation.setDelegator()} . After that call it has to reset its own reference count without the destructor + * getting called. + * + * 3. The destructor of a delegator has to reset the delegator in its aggregated objects by calling their method {@link XAggregation.setDelegator()} + * with NULL before it releases its reference to its aggregated objects. + * @deprecated DeprecatedAggregation will no longer be supported as a high-level concept of UNO. You may still have the option to implement an UNO object consis + */ + interface XAggregation extends XInterface { + /** + * is similar to {@link XInterface.queryInterface()} , but it is to be processed directly without being forwarded to the delegator. + * + * This method is only called from within an implementation of {@link XInterface.queryInterface()} or {@link XAggregation.queryAggregation()} . This + * method is to be called by the delegator if it does not implement the interface itself. An object which got aggregated cannot depend on getting its own + * interface when it calls the method {@link XInterface.queryInterface()} . + * @see XAggregation.setDelegator + */ + queryAggregation(aType: type): any; + + /** + * sets the object to which all calls to the method {@link XInterface.queryInterface()} have to be forwarded. + * @param pDelegator specifies the object which handles the calls to {@link XInterface.queryInterface()} . If **pDelegator** is NULL, the delegator is remo + * @see XAggregation.queryAggregation + */ + setDelegator(pDelegator: XInterface): void; + } + + /** + * Component context to be passed to a component via {@link com.sun.star.lang.XSingleComponentFactory} . Arbitrary values (e.g. deployment values) can be + * retrieved from the context. + */ + interface XComponentContext extends XInterface { + /** + * Gets the service manager instance to be used from key `/singletons/com.sun.star.lang.theServiceManager` . This method has been added for convenience, + * because the service manager is used very often. + * @returns service manager; throws {@link DeploymentException} in case service manager is null + */ + getServiceManager(): lang.XMultiComponentFactory; + + /** + * Gets a value from the context. + * @param Name name of value + * @returns value + */ + getValueByName(Name: string): any; + + /** + * Gets the service manager instance to be used from key `/singletons/com.sun.star.lang.theServiceManager` . This method has been added for convenience, + * because the service manager is used very often. + * @returns service manager; throws {@link DeploymentException} in case service manager is null + */ + readonly ServiceManager: lang.XMultiComponentFactory; + } + + /** + * Task (thread) local execution context for UNO. Arbitrary values can be retrieved from the context. + * + * You have to use UNO runtime functions to obtain the current context in your target language. + */ + interface XCurrentContext extends XInterface { + /** + * Gets a value from the context. + * @param Name name of value + * @returns value + */ + getValueByName(Name: string): any; + } + + /** + * base interface of all UNO interfaces + * + * It provides lifetime control by reference counting and the possibility of querying for other interfaces of the same logical object. + * + * "Logical Object" in this case means that the interfaces actually can be supported by internal (e.g. aggregated) physical objects. + * + * Deriving from this interface is mandatory for all UNO interfaces. + * + * Each language binding (Java, C++, StarBasic, Python, ... ) may provide a different mapping of this interface, please look into the language dependent + * documentation. + * + * The UNO object does not export the state of the reference count ( {@link acquire()} and {@link release()} do not have return values). In general, also + * the UNO object itself should not make any assumption on the concrete value of the reference count (except on the transition from one to zero ). + */ + interface XInterface { + /** + * increases the reference counter by one. + * + * When you have called {@link acquire()} on the UNO object, it is often said, that you have a reference or a hard reference to the object. + * + * It is only allowed to invoke a method on an UNO object, when you keep a hard reference to it. + * + * Every call to acquire must be followed by a corresponding call to release some time later, which may eventually lead to the destruction of the object. + */ + acquire(): void; + + /** + * queries for a new interface to an existing UNO object. + * + * The {@link queryInterface()} method is the entry point to obtain other interfaces which are exported by the object. The caller asks the implementation + * of the object, if it supports the interface specified by the type argument. The call may either return with a interface reference of the requested + * type or with a void any. + * + * There are certain specifications, a {@link queryInterface()} implementation must not violate. + * + * 1) If queryInterface on a specific object has once returned a valid interface reference for a given type, it must return a valid reference for any + * successive queryInterface calls on this object for the same type. + * + * 2) If queryInterface on a specific object has once returned a null reference for a given type, it must always return a null reference for the same + * type. + * + * 3) If queryInterface on a reference A returns reference B, queryInterface on B for Type A must return interface reference A or calls made on the + * returned reference must be equivalent to calls made on reference A. + * + * 4) If queryInterface on a reference A returns reference B, queryInterface on A and B for {@link XInterface} must return the same interface reference + * (object identity). + * + * The reason for the strong specification is, that a Uno Runtime Environment (URE) may choose to cache {@link queryInterface()} calls. + * + * As mentioned above, certain language bindings may map this function differently also with different specifications, please visit the language + * dependent specification for it. The current C++ binding sticks to the specification state + * + * The rules mentioned above are basically identical to the rules of QueryInterface in MS COM. + * @param aType a UNO interface type, for which an object reference shall be obtained. + * @returns an interface reference in case the requested interface is supported by the object, a void any otherwise. + */ + queryInterface(aType: type): any; + + /** + * decreases the reference counter by one. + * + * When the reference counter reaches 0, the object gets deleted. + * + * Calling {@link release()} on the object is often called releasing or clearing the reference to an object. + */ + release(): void; + } + + /** allows to insert, remove and access named objects. */ + interface XNamingService extends XInterface { + /** provides a previous registered object. */ + getRegisteredObject(Name: string): XInterface; + + /** + * registers one object under the specified name. + * + * If any object is registered before, then this object is revoked automatically. + */ + registerObject(Name: string, Object: XInterface): void; + + /** + * revokes the registration of an object. + * + * If the object was not previously registered, then this call does nothing. + */ + revokeObject(Name: string): void; + } + + /** + * must be implemented by anyone who holds the adapter on the client side. + * @see XWeak for description af concepts. + */ + interface XReference extends XInterface { + /** + * removes all references to the adapter. + * + * This method is called when the adapted object dies. The implementation of the client-side's weak reference must include removal of all references to + * the adapter. Otherwise, the adapted object will be destroyed, but the adapter will be alive. + */ + dispose(): void; + } + + /** + * Backwards-compatibility remainder of a removed library unloading feature. + * @deprecated DeprecatedDo not use. + */ + interface XUnloadingPreference extends XInterface { + releaseOnNotification(): boolean; + } + + /** + * the server-side interface to a weak object. + * + * This interface is proxy to the adapted object. In order to make it possible to have weak references to objects, the {@link XAdapter} interface must be + * implemented to provide a weak adapter for the clients. + * + * **Concept of weak referencing:** + * + * This module specifies the interfaces for implementing and using weak references. + * + * The sense of weak references is to hold a reference to an object without affecting the lifetime of the object. That means that a weak reference may + * become invalid, at any time, if the referenced object dies. + * + * The following interfaces describe one way to handle weak references by providing a weak adapter. The weak object has to provide this adapter if anyone + * wants to hold a weak reference. To separate their lifetimes, the adapter and the original object must not share the same reference counter. The weak + * reference is in fact only a hard reference to the adapter, which knows - but does not hold - the original object. That means that the implementation + * and synchronization of weak referencing is the responsibility of the object. The following interfaces are involved in the concept of weak referencing: + * + * **XWeak**: is the server-side interface of the referred object. This referred object must support the {@link XAdapter} interface.; + * + * **XReference**: is a client-side interface which must be implemented by the holder of any weak reference. It is used for notification when the adapted + * object dies.; + */ + interface XWeak extends XInterface { + /** + * queries the weak adapter. + * + * It is important that the adapter must know, but not hold the adapted object. If the adapted object dies, all references to the adapter have to be + * notified to release the adapter. + */ + queryAdapter(): XAdapter; + } + } + + namespace uri { + /** + * translates between external and internal URI references. + * @since OOo 2.0 + */ + type ExternalUriReferenceTranslator = XExternalUriReferenceTranslator; + + /** + * creates URI references. + * + * See [RFC 2396]{@link url="http://www.ietf.org/rfc/rfc2396.txt"} for a description of URI references and related terms. + * + * For parsing absolute URI references, this service tries to use a scheme-specific parser. Such a scheme-specific parser will typically enforce + * additional restrictions during parsing, and will typically return objects that support extra, scheme-specific interfaces in addition to {@link + * com.sun.star.uri.XUriReference} . If no such parser is found, and for relative URI references, a generic parser is used, which returns objects that + * only support {@link com.sun.star.uri.XUriReference} . + * + * Locating a scheme-specific parser works as follows: A scheme consists of Latin capital letters "`A`" - "`Z`" , Latin small letters "`a`" - "`z`" , + * digits "`0`" - "`9`" , "`+`" , "`-`" , and "`.`" . A scheme **s** is transformed into a string **s**' character-by-character, by translating Latin + * capital letters to their small counterparts, translating "`+`" to "`PLUS`" , "`-`" to "`HYPHEN`" , "`.`" to "`DOT`" , and copying Latin small letters + * and digits unchanged. If the component context used while creating this `UriReferenceFactory` instance offers a service manager, and there is a + * service available at that service manager whose name is the concatenation of "`com.sun.star.uri.UriSchemeParser_`" and **s**' , then that service is + * used. It is an error if that service does not support {@link com.sun.star.uri.XUriSchemeParser} . + * @since OOo 2.0 + */ + type UriReferenceFactory = XUriReferenceFactory; + + /** + * parses textual representations of absolute " vnd.sun.star.expand " URLs. + * + * The argument `scheme` of method {@link com.sun.star.uri.XUriSchemeParser.parse()} must always be equal to the `string``"vnd.sun.star.expand"` , + * ignoring case. The objects returned by {@link com.sun.star.uri.XUriSchemeParser.parse()} implement {@link + * com.sun.star.uri.XVndSunStarExpandUrlReference} . + * + * This service is not intended to be instantiated directly by client code. Rather, it should be used indirectly through the {@link + * com.sun.star.uri.UriReferenceFactory} service. + * @since OOo 2.3 + */ + type UriSchemeParser_vndDOTsunDOTstarDOTexpand = XUriSchemeParser; + + /** + * parses textual representations of absolute " vnd.sun.star.script " URLs. + * + * The argument `scheme` of method {@link com.sun.star.uri.XUriSchemeParser.parse()} must always be equal to the `string``"vnd.sun.star.script"` , + * ignoring case. The objects returned by {@link com.sun.star.uri.XUriSchemeParser.parse()} implement {@link + * com.sun.star.uri.XVndSunStarScriptUrlReference} . + * + * This service is not intended to be instantiated directly by client code. Rather, it should be used indirectly through the {@link + * com.sun.star.uri.UriReferenceFactory} service. + * @since OOo 2.0 + */ + type UriSchemeParser_vndDOTsunDOTstarDOTscript = XUriSchemeParser; + + /** + * creates " vnd.sun.star.pkg " URL references. + * @since OOo 2.0 + */ + type VndSunStarPkgUrlReferenceFactory = XVndSunStarPkgUrlReferenceFactory; + + /** + * details how excess special parent segments ( "`..`" ) are handled when resolving a relative URI reference to absolute form. + * @see com.sun.star.uri.XUriReferenceFactory.makeAbsolute for a method that uses this enumeration. + * @since OOo 2.0 + */ + const enum RelativeUriExcessParentSegments { + /** causes excess special parent segments to be treated as an error. */ + ERROR = 0, + /** causes excess special parent segments to be removed. */ + REMOVE = 2, + /** causes excess special parent segments to be retained, treating them like ordinary segments. */ + RETAIN = 1, + } + + /** + * translates between external and internal URI references. + * + * Some URI schemes leave unspecified important aspects of how to interpret URIs of those schemes. For example, it is unspecified for " file " URLs how + * to map the byte sequences that constitute the path segments of a " file " URL to filenames on a given platform: The UNO environment always assumes + * that path segments of " file " URLs represent UTF-8 - encoded strings (which have to be mapped to filenames in a platform-specific way), while other + * applications typically assume that path segments of " file " URLs directly represent a platform's byte-sequence filenames. This interface offers + * methods to translate between such `internal` URIs (e.g., UTF-8 - encoded " file " URLs used within the UNO environment) and `external` URIs (e.g., + * byte-sequence - oriented " file " URLs used by other applications). Typically, only " file " URLs are affected by this translation. + * + * Since the translation process is based on URI schemes, relative URI references (that do not include a scheme) are left unmodified by the translation + * process. + * @since OOo 2.0 + */ + interface XExternalUriReferenceTranslator { + /** + * returns the external counterpart of an internal URI reference. + * @param internalUriReference an internal URI reference. + * @returns the external counterpart of the given internal URI reference. An empty string is returned if the given internal URI reference either is an empty + */ + translateToExternal(internalUriReference: string): string; + + /** + * returns the internal counterpart of an external URI reference. + * @param externalUriReference an external URI reference. + * @returns the internal counterpart of the given external URI reference. An empty string is returned if the given external URI reference either is an empty + */ + translateToInternal(externalUriReference: string): string; + } + + /** + * represents generic, mutable URI references. + * + * See [RFC 2396]{@link url="http://www.ietf.org/rfc/rfc2396.txt"} for a description of URI references and related terms. + * + * This interface only handles generic URI references (both absolute and relative). For specific URI schemes, there will be additional interfaces that + * offer extra, scheme-specific functionality. + * @see com.sun.star.uri.UriReferenceFactory which allows to create URI reference objects that support com.sun.star.uri.XUriReference and additional, sch + * @since OOo 2.0 + */ + interface XUriReference extends uno.XInterface { + /** + * returns the authority part of this (hierarchical) URI reference. + * @returns the textual representation of the authority part (with the exact spelling retained), if this is a hierarchical URI reference that has an authorit + */ + readonly Authority: string; + + /** clears the fragment part of this URI reference. */ + clearFragment(): void; + + /** + * returns the fragment part of this URI reference. + * @returns the textual representation of the fragment part (with the exact spelling retained; without the delimiting "`#`" ), if this is a URI reference tha + */ + Fragment: string; + + /** + * returns the authority part of this (hierarchical) URI reference. + * @returns the textual representation of the authority part (with the exact spelling retained), if this is a hierarchical URI reference that has an authorit + */ + getAuthority(): string; + + /** + * returns the fragment part of this URI reference. + * @returns the textual representation of the fragment part (with the exact spelling retained; without the delimiting "`#`" ), if this is a URI reference tha + */ + getFragment(): string; + + /** + * returns the path part of this URI reference. + * @returns the textual representation of the path part (with the exact spelling retained), if this is a hierarchical URI reference; for an opaque URI refere + */ + getPath(): string; + + /** + * returns a given path segment of this (hierarchical) URI reference. + * @param index the index of the path segment, starting at zero. + * @returns the textual representation of the given path segment (with the exact spelling retained, without any delimiting "`/`" ), if this URI reference is + */ + getPathSegment(index: number): string; + + /** + * returns the number of path segments of this (hierarchical) URI reference. + * + * For an opaque URI reference, and for a hierarchical URI reference with an empty path, the number of path segments is zero. For a hierarchical URI + * reference with an absolute, non-empty path, the number of path segments equals the number of "`/`" delimiters. For a hierarchical URI reference with a + * relative, non-empty path, the number of path segments equals the number of "`/`" delimiters, plus one. + * @returns the number of path segments. + */ + getPathSegmentCount(): number; + + /** + * returns the query part of this (hierarchical) URI reference. + * @returns the textual representation of the query part (with the exact spelling retained; without the delimiting "`?`" ), if this is a hierarchical URI ref + */ + getQuery(): string; + + /** + * returns the scheme part of this (absolute) URI reference. + * @returns the textual representation of the scheme part (with the exact spelling retained; without the delimiting "`:`" ), if this is an absolute URI refer + */ + getScheme(): string; + + /** + * returns the scheme-specific part of this URI reference. + * + * For an absolute URI reference, the scheme-specific part is everything after the scheme part and the delimiting "`:`" , and before the optional "`#`" + * and fragment part. For a relative URI reference, the scheme-specific part is everything before the optional "`#`" and fragment part. + * @returns the textual representation of the scheme-specific part (with the exact spelling retained). + */ + getSchemeSpecificPart(): string; + + /** + * returns the textual representation of the complete URI reference. + * @returns the textual representation of the complete URI reference. The exact spelling of the URI reference is retained. + */ + getUriReference(): string; + + /** + * returns whether this (hierarchical) URI reference has an authority part. + * @returns `TRUE` if this URI reference is hierarchical and has an authority part. + */ + hasAuthority(): boolean; + + /** + * returns whether this URI reference has a fragment part. + * @returns `TRUE` if this URI reference has a fragment part. + */ + hasFragment(): boolean; + + /** + * returns whether this (hierarchical) URI reference has a query part. + * @returns `TRUE` if this URI reference is hierarchical and has a query part. + */ + hasQuery(): boolean; + + /** + * returns whether this (relative) URI reference has a relative path. + * @returns `TRUE` if this URI reference is relative and has a relative path. + */ + hasRelativePath(): boolean; + + /** + * returns whether this URI reference is absolute or relative. + * @returns `TRUE` if this URI reference is absolute, `FALSE` if it is relative. + */ + isAbsolute(): boolean; + + /** + * returns whether this URI reference is hierarchical or opaque. + * + * An absolute URI reference is hierarchical if its scheme-specific part starts with "`/`" . A relative URI reference is always hierarchical. + * @returns `TRUE` if this URI reference is hierarchical, `FALSE` if it is opaque. + */ + isHierarchical(): boolean; + + /** + * returns the path part of this URI reference. + * @returns the textual representation of the path part (with the exact spelling retained), if this is a hierarchical URI reference; for an opaque URI refere + */ + readonly Path: string; + + /** + * returns the number of path segments of this (hierarchical) URI reference. + * + * For an opaque URI reference, and for a hierarchical URI reference with an empty path, the number of path segments is zero. For a hierarchical URI + * reference with an absolute, non-empty path, the number of path segments equals the number of "`/`" delimiters. For a hierarchical URI reference with a + * relative, non-empty path, the number of path segments equals the number of "`/`" delimiters, plus one. + * @returns the number of path segments. + */ + readonly PathSegmentCount: number; + + /** + * returns the query part of this (hierarchical) URI reference. + * @returns the textual representation of the query part (with the exact spelling retained; without the delimiting "`?`" ), if this is a hierarchical URI ref + */ + readonly Query: string; + + /** + * returns the scheme part of this (absolute) URI reference. + * @returns the textual representation of the scheme part (with the exact spelling retained; without the delimiting "`:`" ), if this is an absolute URI refer + */ + readonly Scheme: string; + + /** + * returns the scheme-specific part of this URI reference. + * + * For an absolute URI reference, the scheme-specific part is everything after the scheme part and the delimiting "`:`" , and before the optional "`#`" + * and fragment part. For a relative URI reference, the scheme-specific part is everything before the optional "`#`" and fragment part. + * @returns the textual representation of the scheme-specific part (with the exact spelling retained). + */ + readonly SchemeSpecificPart: string; + + /** + * sets the fragment part of this URI reference. + * @param fragment the textual representation of the new fragment part. The exact spelling will be preserved, and no escaping is performed. + */ + setFragment(fragment: string): void; + + /** + * returns the textual representation of the complete URI reference. + * @returns the textual representation of the complete URI reference. The exact spelling of the URI reference is retained. + */ + readonly UriReference: string; + } + + /** + * creates URI references. + * + * See [RFC 2396]{@link url="http://www.ietf.org/rfc/rfc2396.txt"} for a description of URI references and related terms. + * @since OOo 2.0 + */ + interface XUriReferenceFactory extends uno.XInterface { + /** + * resolves a relative URI reference to absolute form. + * @param baseUriReference the base URI reference. If the given `uriReference` is a same-document reference, `baseUriReference` is used as a reference to t + * @param uriReference any URI reference. Backwards-compatible relative URI references starting with a scheme component (see RFC 2396, Section 5.2, ste + * @param processSpecialBaseSegments if `TRUE` , special segments ( "`.`" and "`..`" ) within the path of the base URI (except for the last, cut-off segmen + * @param excessParentSegments details how excess special parent segments ( "`..`" ) are handled. + * @returns a fresh object that supports {@link com.sun.star.uri.XUriReference} (and possibly also additional, scheme-specific interfaces), if the given `uri + */ + makeAbsolute(baseUriReference: XUriReference, uriReference: XUriReference, processSpecialBaseSegments: boolean, excessParentSegments: RelativeUriExcessParentSegments): XUriReference; + + /** + * changes an absolute URI reference to relative form. + * @param baseUriReference the base URI reference. + * @param uriReference any URI reference. + * @param preferAuthorityOverRelativePath controls how a relative URI reference is generated when both `baseUriReference` (e.g., "`scheme://auth/a/b`" ) an + * @param preferAbsoluteOverRelativePath controls how a relative URI reference is generated when both `baseUriReference` (e.g., "`scheme://auth/a/b`" ) and + * @param encodeRetainedSpecialSegments if `TRUE` , special segments ( "`.`" and "`..`" ) that are already present in the path component of the given `uriR + * @returns a fresh object that supports {@link com.sun.star.uri.XUriReference} , if the given `uriReference` is either already relative, or is not hierarchi + */ + makeRelative( + baseUriReference: XUriReference, uriReference: XUriReference, preferAuthorityOverRelativePath: boolean, preferAbsoluteOverRelativePath: boolean, + encodeRetainedSpecialSegments: boolean): XUriReference; + + /** + * parses the textual representation of a URI reference. + * @param uriReference the textual representation of a URI reference. + * @returns an object that supports {@link com.sun.star.uri.XUriReference} (and possibly also additional, scheme-specific interfaces), if the given input can + */ + parse(uriReference: string): XUriReference; + } + + /** + * parses textual representations of absolute URIs. + * + * See [RFC 2396]{@link url="http://www.ietf.org/rfc/rfc2396.txt"} for a description of URIs and related terms. + * @since OOo 2.0 + */ + interface XUriSchemeParser extends uno.XInterface { + /** + * parses the textual representation of an absolute URI. + * + * This method is used to parse URIs (with no fragment part), not URI references (with an optional fragment part). + * + * If an object is returned, the behaviour of its {@link com.sun.star.uri.XUriReference} methods must reflect the fact that the object represents an + * absolute URI reference with the given scheme and scheme-specific part, and without a fragment part. + * @param scheme the textual representation of the scheme part (without the delimiting "`:`" ). + * @param schemeSpecificPart the textual representation of the scheme-specific part. + * @returns an object that supports {@link com.sun.star.uri.XUriReference} (and possibly also additional, scheme-specific interfaces), if the given input can + */ + parse(scheme: string, schemeSpecificPart: string): XUriReference; + } + + /** + * represents absolute " vnd.sun.star.expand " URLs. + * + * These URLs are of the form ; **vnd-sun-star-expand-url** = `"VND.SUN.STAR.EXPAND:"`**opaque_part**; where the **opaque_part** is an UTF-8 string + * as described in [Bootstrap Arguments and Micro Deployment]{@link url="http://udk.openoffice.org/common/man/concept/micro_deployment.html"} . See [RFC + * 2396]{@link url="http://www.ietf.org/rfc/rfc2396.txt"} , [RFC 2732]{@link url="http://www.ietf.org/rfc/rfc2732.txt"} , and [RFC 2234]{@link + * url="http://www.ietf.org/rfc/rfc2234.txt"} for details. + * @since OOo 2.3 + */ + interface XVndSunStarExpandUrl { + /** + * returns the expanded content of this URL. + * @param expander a macro expander; must not be `NULL` . + * @returns the expanded content of this URL. + * @throws com::sun::star::lang::IllegalArgumentException if calling {@link com.sun.star.util.XMacroExpander.expandMacros()} on `expander` raises any such e + */ + expand(expander: util.XMacroExpander): string; + } + + /** + * represents absolute " vnd.sun.star.expand " URL references. + * @since OOo 2.3 + */ + interface XVndSunStarExpandUrlReference extends XUriReference, XVndSunStarExpandUrl { } + + /** + * creates " vnd.sun.star.pkg " URL references. + * @since OOo 2.0 + */ + interface XVndSunStarPkgUrlReferenceFactory { + /** + * creates a new " vnd.sun.star.pkg " URL reference. + * + * The returned URL reference has the given authority, an empty path, and no fragment. + * @param authority the authority of the created URL reference; must not be `NULL` , and should be an absolute URI reference with no fragment + * @returns a new " vnd.sun.star.pkg " URL reference, or `NULL` if the given authority is either not an absolute URI reference or has a fragment + */ + createVndSunStarPkgUrlReference(authority: XUriReference): XUriReference; + } + + /** + * represents absolute " vnd.sun.star.script " URLs. + * + * These URLs are of the form ; **vnd-sun-star-script-url** = `"VND.SUN.STAR.SCRIPT:"`**name** [ `"?"`**parameter** *( `"&"`**parameter** )] ; + * **name** = 1* **schar**; **parameter** = **key**`"="`**value**; **key** = 1* **schar**; **value** = * **schar**; **schar** = + * **unreserved** / **escaped** / `"$"` / `"+"` / `","` / `":"` / `";"` / `"@"` / `"["` / `"]"`; See [RFC 2396]{@link + * url="http://www.ietf.org/rfc/rfc2396.txt"} , [RFC 2732]{@link url="http://www.ietf.org/rfc/rfc2732.txt"} , and [RFC 2234]{@link + * url="http://www.ietf.org/rfc/rfc2234.txt"} for details. + * + * The names, keys, and values are arbitrary Unicode strings (non-empty Unicode strings in the case of names and keys), encoded as UTF-8 byte sequences. + * It is an error if any of them does not represent a valid UTF-8 byte sequence. Keys are compared for equality character-by-character, without + * considering case folding or normalization. There may be multiple parameters with equal keys. + * @since OOo 2.0 + */ + interface XVndSunStarScriptUrl extends uno.XInterface { + /** + * returns the name part of this URL. + * @returns the non-escaped value of the name part. + */ + getName(): string; + + /** + * returns the value of a parameter with a given key. + * @param key a non-escaped key. + * @returns the non-escaped value of the first parameter with the given key. If there is no parameter with the given key, or if `key` is an empty `string` , + */ + getParameter(key: string): string; + + /** + * returns whether this URL has a parameter with a given key. + * @param key a non-escaped key. + * @returns `TRUE` if this URL has at least one parameter with the given key. In particular, if `key` is an empty `string` , `FALSE` is returned. + */ + hasParameter(key: string): boolean; + + /** + * returns the name part of this URL. + * @returns the non-escaped value of the name part. + */ + Name: string; + + /** + * sets the name part of this URL. + * @param name specifies the non-escaped new name part of the URL. + * @since OOo 3.0 + * @throws com::sun::star::lang::IllegalArgumentException if name is empty + */ + setName(name: string): void; + + /** + * sets the value of a parameter with a given key. + * @param key a non-escaped key + * @param value the non-escaped value to be set for the parameter. If there already is a parameter with this key, the value of its first appearance will be + * @since OOo 3.0 + * @throws com::sun::star::lang::IllegalArgumentException if key is empty + */ + setParameter(key: string, value: string): void; + } + + /** represents absolute " vnd.sun.star.script " URL references. */ + interface XVndSunStarScriptUrlReference extends XUriReference, XVndSunStarScriptUrl { } + } + + namespace util { + /** + * describes a set of changes occurring as a batch transaction. + * @see XChangesBatch + * @see XChangesSet + * @see ChangesEvent + * @see ElementChange + */ + type ChangesSet = LibreOffice.SeqEquiv; + + /** + * this exception can be thrown to prevent the environment of any object from closing + * @see XCloseListener + */ + type CloseVetoException = uno.Exception; + + /** + * describes an RGB color value with an optional alpha channel. + * + * The byte order is from high to low: 1. alpha channel 2. red 3. green 4. blue + */ + type Color = number; + + /** is thrown when an object's state does not allow to call requested functionality. */ + type InvalidStateException = uno.Exception; + + /** + * Manage cancelable jobs + * @see XJobManager + */ + type JobManager = XJobManager; + + /** This type is used for a language identifier number. */ + type Language = number; + + /** is raised when attempt is made to unlock a lockable component which actually is not locked. */ + type NotLockedException = InvalidStateException; + + /** indicates that a non-numeric string is to be converted to a number. */ + type NotNumericException = uno.Exception; + + /** + * represents an object which can format numbers and strings. + * + * A {@link NumberFormatter} , if available, can be created by the global service manager. + */ + type NumberFormatter = XNumberFormatter2; + + /** + * encapsulates access to the current office installation directory and office user data directory, provides functionality to create URLs containing + * relocatable (not absolute) references to the current office installation directory and user data directory and vice versa. + * + * This functionality is useful when data containing references to the current office installation directory or user data directory must be made + * persistent and re-read later. In many cases, storing the reference directly would destroy the relocatability of an office installation and the + * possibility to share one office user data directory among parallel office installations. + * @deprecated Deprecatedrather use the singleton theOfficeInstallationDirectories + * @since OOo 2.0 + */ + type OfficeInstallationDirectories = XOfficeInstallationDirectories; + + /** + * A legacy (single-instance) service-variant of {@link thePathSettings} singleton. + * @deprecated DeprecatedUse thePathSettings singleton instead. + * @since OOo 1.1.2 + */ + type PathSettings = XPathSettings; + + /** + * A service to support the substitution and resubstitution of path variables. + * + * A path variable must be specified with the following syntax: "$("")". Path variables are not case sensitive and are always provided as + * a UCB-compliant URLs (for example: "file:///c:/temp" or "file:///usr/install"). This is mandatory to support an optional remote file system. ; There + * is a set of variables that have pre-defined values: + * + * **$(inst) **: Installation path of the Office. + * + * **$(prog) **: Program path of the Office. + * + * **$(user) **: The user installation directory. + * + * **$(work) **: The work directory of the user. Under Windows this would be the "MyDocuments" subdirectory. Under Unix this would be the home-directory + * + * **$(home) **: The home directory of the user. Under Unix this would be the home- directory. Under Windows this would be the CSIDL_PERSONAL directory, + * for example "Documents and Settings\\Documents". + * + * **$(temp) **: The current temporary directory. + * + * **$(path) **: The value of PATH environment variable. + * + * **$(username) **: The username (login name) of the currently active user, excluding the domain name on Windows. (Available since LibreOffice 5.2) + * + * **$(langid) **: The language code used by the Office, like 0x0009=English, 0x0409=English US. + * + * **$(vlang) **: The language used by the Office as a string. Like "German" for a German Office. + * + * + * + * Attention: Most predefined variables describe an absolute path. The only exceptions are: $(username), $(langid) and $(vlang). Therefore the service + * implementation should only substitute variables which are located at the start of a provided path string or are part of a multi-path. This special + * service is not designed to be a text substiution but shall provide (a) valid substituted path(s). + * @since OOo 1.1.2 + */ + type PathSubstitution = XStringSubstitution; + + /** + * provides an interface for sorting. + * @deprecated Deprecated + * @since OOo 1.1.2 + */ + type Sortable = XSortable; + + /** + * gives access to the properties of a sort descriptor. The properties are given in a sequence of PropertyValue. + * + * The available properties are listed in the specific sort descriptor implementing this service. + * @see XSortable + * @see com.sun.star.table.TableSortDescriptor2 + * @see com.sun.star.text.TextSortDescriptor2 + * @since OOo 1.1.2 + */ + type SortDescriptor2 = any; + + /** + * search a string with a defined algorithm in another string. + * + * It is possible to search forward or backward in the string. + */ + type TextSearch = XTextSearch; + + /** + * search a string with a defined algorithm in another string. + * + * It is possible to search forward or backward in the string. + */ + type TextSearch2 = XTextSearch2; + + /** + * A service that has to deal with macrofied strings will preprocess those strings using the macro expander singleton. The macro expander singleton is + * deployed with the application. + * + * This feature is currently used macrofying loader urls with macros defined in uno.ini/unorc bootstrap files. The component loader uses the macro + * expander singleton to expand those macros. This is a flexible way preprocessing loader urls. + * @see MacroExpander + */ + type theMacroExpander = XMacroExpander; + + /** + * encapsulates access to the current office installation directory and office user data directory, provides functionality to create URLs containing + * relocatable (not absolute) references to the current office installation directory and user data directory and vice versa. + * + * This functionality is useful when data containing references to the current office installation directory or user data directory must be made + * persistent and re-read later. In many cases, storing the reference directly would destroy the relocatability of an office installation and the + * possibility to share one office user data directory among parallel office installations. + */ + type theOfficeInstallationDirectories = XOfficeInstallationDirectories; + + /** + * Supports read/write access and listener for the paths properties that the Office uses. + * + * The property names of the Office paths/directories are an exactly match to the configuration entries found in the file + * (org/openoffice/Office/Common.xml). ; This service supports the usage of path variables to define paths that a relative to other office or system + * directories. See {@link PathSubstitution} + * + * Prior to LibreOffice 4.3, this singleton was only available as a (single-instance) {@link PathSettings} service. + * @since LibreOffice 4.3 + */ + type thePathSettings = XPathSettings; + + /** + * Abbreviate arbitrary URIs. + * + * An abbreviation implementation that is specialized to URIs. + * @see XStringAbbreviation + */ + type UriAbbreviation = XStringAbbreviation; + + /** helps to split up a string containing a {@link URL} into its structural parts and assembles the parts into a single string. */ + type URLTransformer = XURLTransformer; + + /** + * thrown to indicate a general veto. + * @since OOo 1.1.2 + */ + type VetoException = uno.Exception; + + /** specifies the type of an event from an {@link XDataEditor} . */ + const enum DataEditorEventType { + /** specifies that the data editing was canceled by the user (data not stored). */ + CANCELED = 1, + /** specifies that the data editing is done (data stored). */ + DONE = 0, + } + + const enum SearchAlgorithms { + ABSOLUTE = 0, + APPROXIMATE = 2, + REGEXP = 1, + } + + /** + * enumeration used to specify the type of contents in a sort field. + * @deprecated Deprecated + */ + const enum SortFieldType { + /** sort field contains text data. */ + ALPHANUMERIC = 2, + /** type is determined automatically. */ + AUTOMATIC = 0, + /** sort field contains numerical data. */ + NUMERIC = 1, + } + + /** + * This enumeration represents a tristate value. + * + * This enumeration defines three values, `TRUE` , `FALSE` and a don't know value. + */ + const enum TriState { + /** The value is indeterminate. */ + INDETERMINATE = 2, + /** The value is equivalent to `FALSE` . */ + NO = 0, + /** The value is equivalent to `TRUE` . */ + YES = 1, + } + + /** represents an entry from a component which implements the {@link XLocalizedAliases} . */ + interface AliasProgrammaticPair { + /** determines the name which is registered as an alias for a programmatic name. */ + Alias: string; + + /** + * determines which programmatic name belongs to the alias. + * @see com.sun.star.util.XLocalizedAliases + */ + ProgrammaticName: string; + } + + /** + * is used to describe which atoms the user wants to know about. + * @see com.sun.star.util.XAtomServer + */ + interface AtomClassRequest { + /** the class of the atoms described in member {@link AtomClassRequest.atoms()} . */ + atomClass: number; + + /** the atoms requested from class {@link AtomClassRequest.atomClass()} . */ + atoms: SafeArray; + } + + /** + * contains a string and the corresponding registered atom . + * @see com.sun.star.util.XAtomServer + */ + interface AtomDescription { + /** the atom itself */ + atom: number; + + /** the string it stands for */ + description: string; + } + + /** + * Macro expander expanding using rtl bootstrap notation. + * + * For details, have a look at [http://udk.openoffice.org/common/man/concept/micro_deployment.html#misc]{@link + * url="http://udk.openoffice.org/common/man/concept/micro_deployment.html#misc"} + * + * The service can be instantiated via arguments giving an ini/rc file url. Otherwise it will read from an uno.ini/unorc file next to the cppuhelper + * library. + * @see theMacroExpander + * @since OOo 1.1.2 + */ + interface BootstrapMacroExpander extends MacroExpander, lang.XInitialization { } + + /** describes the kind of protection for a protectable cell. */ + interface CellProtection { + /** specifies if the formula is hidden from the user. */ + IsFormulaHidden: boolean; + + /** specifies if the cell is hidden from the user. */ + IsHidden: boolean; + + /** specifies if the cell is locked from modifications by the user. */ + IsLocked: boolean; + + /** specifies if the cell is hidden on printouts. */ + IsPrintHidden: boolean; + } + + /** + * This event is fired when a set of changes becomes effective on the source of the event. + * @see XChangesSet + * @see XChangesBatch + * @see XChangesListener + * @see XChangesNotifier + * @see com.sun.star.container.ContainerEvent + * @see ElementChange + */ + interface ChangesEvent extends lang.EventObject { + /** + * contains the accessor to the common root of the changed elements. + * + * Type and value of the accessor depend on the service. + */ + Base: any; + + /** contains the changes which occurred. */ + Changes: ChangesSet; + } + + /** specifies an event broadcasted by an {@link XDataEditor} . */ + interface DataEditorEvent extends lang.EventObject { + /** specifies the type of the event. */ + Type: DataEditorEventType; + } + + /** + * represents a date value. + * + * The time zone is unknown. + */ + interface Date { + /** contains the day of month (1-31 or 0 for a void date). */ + Day: number; + + /** contains the month of year (1-12 or 0 for a void date). */ + Month: number; + + /** contains the year. */ + Year: number; + } + + /** represents a combined date+time value. */ + interface DateTime { + /** is the day of month (1-31 or 0 for a void date). */ + Day: number; + + /** contains the hour (0-23). */ + Hours: number; + + /** + * true: time zone is UTC false: unknown time zone. + * @since LibreOffice 4.1 + */ + IsUTC: boolean; + + /** contains the minutes (0-59). */ + Minutes: number; + + /** is the month of year (1-12 or 0 for a void date). */ + Month: number; + + /** contains the nanoseconds (0 - 999 999 999). */ + NanoSeconds: number; + + /** contains the seconds (0-59). */ + Seconds: number; + + /** is the year. */ + Year: number; + } + + /** represents a range of date+time values. */ + interface DateTimeRange { + /** contains the end day of month (1-31 or 0 for a void date) for the range. */ + EndDay: number; + + /** contains the end hour (0-23) for the range. */ + EndHours: number; + + /** contains the end minutes (0-59) for the range. */ + EndMinutes: number; + + /** contains the end month of year (1-12 or 0 for a void date) for the range. */ + EndMonth: number; + + /** contains the end nanoseconds (0 - 999 999 999) for the range. */ + EndNanoSeconds: number; + + /** contains the end seconds (0-59) for the range. */ + EndSeconds: number; + + /** contains the end year for the range. */ + EndYear: number; + + /** + * true: time zone is UTC false: unknown time zone. + * @since LibreOffice 4.1 + */ + IsUTC: boolean; + + /** contains the start day of month (1-31 or 0 for a void date) for the range. */ + StartDay: number; + + /** contains the start hour (0-23) for the range. */ + StartHours: number; + + /** contains the start minutes (0-59) for the range. */ + StartMinutes: number; + + /** contains the start month of year (1-12 or 0 for a void date) for the range. */ + StartMonth: number; + + /** contains the start nanoseconds (0 - 999 999 999) for the range. */ + StartNanoSeconds: number; + + /** contains the start seconds (0-59) for the range. */ + StartSeconds: number; + + /** contains the start year for the range. */ + StartYear: number; + } + + /** + * represents a combined date+time value with time zone. + * @since LibreOffice 4.1 + */ + interface DateTimeWithTimezone { + /** the date and time (in TimeZone) */ + DateTimeInTZ: DateTime; + + /** + * contains the time zone, as signed offset in minutes **from** UTC, that is **east** of UTC, that is the amount of minutes that should be added to UTC + * time to obtain the time in that timezone. + * + * To obtain UTC datetime from DateTimeInTZ, you need to **subtract** TimeZone minutes. + */ + Timezone: number; + } + + /** + * represents a date value with time zone. + * @since LibreOffice 4.1 + */ + interface DateWithTimezone { + /** the date. */ + DateInTZ: Date; + + /** + * contains the time zone, as signed offset in minutes **from** UTC, that is **east** of UTC, that is the amount of minutes that should be added to UTC + * time to obtain time in that timezone. + */ + Timezone: number; + } + + /** + * represents a duration. + * + * A duration is the difference of 2 DateTimes. + * + * Note that there are no constraints on the ranges of the members, except that every member must be non-negative: for example, a {@link Duration} of 400 + * Days is valid. + * @since OOo 3.3 + */ + interface Duration { + /** contains the days. */ + Days: number; + + /** contains the hours. */ + Hours: number; + + /** contains the minutes. */ + Minutes: number; + + /** contains the months. */ + Months: number; + + /** contains the nanoseconds. */ + NanoSeconds: number; + + /** explicit sign bit. */ + Negative: boolean; + + /** contains the seconds. */ + Seconds: number; + + /** contains the years. */ + Years: number; + } + + /** This structure describes a single change that is part of a batch of changes. */ + interface ElementChange { + /** + * This contains the accessor to the element which changed. + * + * The type and the value of the accessor depends on the service. + */ + Accessor: any; + + /** This contains the element that was inserted or changed. */ + Element: any; + + /** This contains the element that was replaced or removed. */ + ReplacedElement: any; + } + + /** + * This meta service supports the {@link XMacroExpander} interface for expanding arbitrary macro expressions, i.e. substitude macro names. The purpose of + * this service is to separate the use of macrofied strings, e.g. urls from the use of services. + * @deprecated Deprecatedrather use the util::theMacroExpander singleton + * @see BootstrapMacroExpander + * @see theMacroExpander + * @since OOo 1.1.2 + */ + interface MacroExpander extends XMacroExpander, lang.XComponent { } + + /** is thrown when a {@link NumberFormat} string is syntactically incorrect. */ + interface MalformedNumberFormatException extends uno.Exception { + /** contains the character position in the string where the malformation begins. */ + CheckPos: number; + } + + /** + * allows to veto changes in an object's internal mode. + * @see XModeChangeBroadcaster + * @see XModeChangeListener + * @since OOo 1.1.2 + */ + interface ModeChangeEvent extends lang.EventObject { + /** + * denotes the new internal mode of a component + * + * The semantics of the mode string is to be defined by the component broadcasting this event. + */ + NewMode: string; + } + + /** + * contains properties specifying the behavior of a {@link NumberFormatter} . + * @see NumberFormatter + */ + interface NumberFormatProperties { + /** contains a comment regarding the number format for display to the user. */ + Comment: string; + + /** contains the format string of the number format. */ + FormatString: string; + + /** contains the locale of the number format. */ + Locale: lang.Locale; + + /** + * contains the type of the number format. + * @see NumberFormat + */ + Type: number; + } + + /** specifies a container of number formats. */ + interface NumberFormats extends XNumberFormats, XNumberFormatTypes { } + + /** specifies the settings for number formatting. */ + interface NumberFormatSettings extends beans.XPropertySet { + /** is set to indicate that a zero value should be formatted as an empty string. */ + NoZero: boolean; + + /** + * specifies the date which is represented by the value 0. + * + * The most common value for this is 12/30/1899. + */ + NullDate: Date; + + /** specifies the maximum number of decimals used for the standard number format ("General"). */ + StandardDecimals: number; + + /** specifies the first year to be generated from a two-digit year input. */ + TwoDigitDateStart: number; + } + + /** + * provides an supplier of number formats + * @see NumberFormats + * @see NumberFormatter + * @since OOo 1.1.2 + */ + interface NumberFormatsSupplier extends XNumberFormatsSupplier { + /** Create using default locale. */ + createWithDefaultLocale(): void; + + /** + * Create using specific locale. + * @param Locale the locale of the number formats supplier + */ + createWithLocale(Locale: lang.Locale): void; + } + + /** describes what and how to replace strings. */ + interface ReplaceDescriptor extends SearchDescriptor, XReplaceDescriptor { } + + /** represents the information that describes a revision of something. */ + interface RevisionTag { + /** contains an identifier for the author that created the revision( can be empty ) */ + Author: string; + + /** contains a comment that the author has left for this revision ( can be empty ) */ + Comment: string; + + /** + * contains a unique identifier for the revision and must not be empty + * + * This identifier can have any form. It can be something like "1.2.3" or "Version 1" etc. It depends on the revision control system how it names the + * revisions. + */ + Identifier: string; + + /** contains the time when the revision was created ( can be invalid ) */ + TimeStamp: DateTime; + } + + /** describes what and how to search within a container. */ + interface SearchDescriptor extends XSearchDescriptor, beans.XPropertySet { + /** If `TRUE` , the search is done backwards in the document. */ + SearchBackwards: boolean; + + /** If `TRUE` , the case of the letters is important for the match. */ + SearchCaseSensitive: boolean; + + /** + * If `TRUE` , the search string is evaluated as a regular expression. + * + * SearchRegularExpression, SearchWildcard and SearchSimilarity are mutually exclusive, only one can be `TRUE` at the same time. + */ + SearchRegularExpression: boolean; + + /** + * If `TRUE` , a "similarity search" is performed. + * + * In the case of a similarity search, the following properties specify the kind of similarity: + * + * SearchSimilarityRelaxSearchSimilarityRemoveSearchSimilarityAddSearchSimilarityExchange + * + * SearchRegularExpression, SearchWildcard and SearchSimilarity are mutually exclusive, only one can be `TRUE` at the same time. + */ + SearchSimilarity: boolean; + + /** specifies the number of characters that must be added to match the search pattern. */ + SearchSimilarityAdd: number; + + /** This property specifies the number of characters that must be replaced to match the search pattern. */ + SearchSimilarityExchange: number; + + /** + * If `TRUE` , all similarity rules are applied together. + * + * In the case of a relaxed similarity search, the following properties are applied together: + * + * SearchSimilarityRemoveSearchSimilarityAddSearchSimilarityExchange + */ + SearchSimilarityRelax: boolean; + + /** This property specifies the number of characters that may be ignored to match the search pattern. */ + SearchSimilarityRemove: number; + + /** If `TRUE` , it is searched for positions where the paragraph style with the name of the search pattern is applied. */ + SearchStyles: boolean; + + /** + * If `TRUE` , the search string is evaluated as a wildcard pattern. + * + * Wildcards are '*' (asterisk) for any sequence of characters, including an empty sequence, and '?' (question mark) for exactly one character. Escape + * character is '\' (U+005C REVERSE SOLIDUS) aka backslash, it escapes the special meaning of a question mark, asterisk or escape character that follows + * immediately after the escape character. + * + * SearchRegularExpression, SearchWildcard and SearchSimilarity are mutually exclusive, only one can be `TRUE` at the same time. + * @since LibreOffice 5.2 + */ + SearchWildcard: boolean; + + /** If `TRUE` , only complete words will be found. */ + SearchWords: boolean; + } + + interface SearchOptions { + /** search type */ + algorithmType: SearchAlgorithms; + + /** This many characters can be different (as a replacement) between the found word and the search pattern in a "Weighted Levenshtein; Distance" search. */ + changedChars: number; + + /** This many characters can be missing in the found word in a "Weighted Levenshtein Distance" search. */ + deletedChars: number; + + /** This many characters can be additional in the found word in a "Weighted Levenshtein Distance" search. */ + insertedChars: number; + + /** The locale for case insensitive search. */ + Locale: lang.Locale; + + /** The replacement text (is for optional replacing - SearchOption is only the data container for it) */ + replaceString: string; + + /** + * some flags - can be mixed + * @see SearchFlags + */ + searchFlag: number; + + /** The text or pattern to be searched. */ + searchString: string; + + /** Flags for the transliteration. Same meaning as the enum of {@link com.sun.star.i18n.TransliterationModules} */ + transliterateFlags: number; + } + + /** + * This augments {@link com.sun.star.util.SearchOptions} to be able to specify additional search algorithms for use with {@link + * com.sun.star.util.XTextSearch2} + * @since LibreOffice 5.2 + */ + interface SearchOptions2 extends SearchOptions { + /** + * Search type, one of {@link com.sun.star.util.SearchAlgorithms2} constants. This is preferred over the content of the SearchAlgorithms {@link + * SearchOptions.algorithmType} enum field. + */ + AlgorithmType2: number; + + /** + * The escape character to be used with a {@link com.sun.star.util.SearchAlgorithms2.WILDCARD} search. + * + * A Unicode character, if not 0 escapes the special meaning of a question mark, asterisk or escape character that follows immediately after the escape + * character. If 0 defines no escape character is used. + * + * Common values are '\' (U+005C REVERSE SOLIDUS) aka backslash in text processing context, or '~' (U+007E TILDE) in spreadsheet processing context. + */ + WildcardEscapeCharacter: number; + } + + interface SearchResult { + endOffset: SafeArray; + startOffset: SafeArray; + + /** + * Number of subexpressions. + * + * If it is 0, then no match found; this value is 1 for ABSOLUTE and APPROXIMATE match. The start and endOffset are always dependent on the search + * direction. + * + * For example, if you search "X" in the text "-X-" the offsets are: for forward: start = 1, end = 2 + * + * + * + * for backward: start = 2, end = 1 + * + * + * + * Forward, the startOffset is inclusive, the endOffset exclusive. Backward, the startOffset is exclusive, the endOffset inclusive. + * + * For regular expressions it can be greater than 1. If the value is 1, startoffset[0] and endoffset[0] points to the matching sub string if value is > + * 1, still startoffset[0] and endoffset[0] points to the matching substring for whole regular expression startoffset[i] and endoffset[i] points to the + * matching substring of i th matching substring. + */ + subRegExpressions: number; + } + + /** + * specifies the properties which can be used to describe a sort order applied to an {@link XSortable} . + * @deprecated Deprecated + * @see XSortable + */ + interface SortDescriptor extends beans.XPropertySet { + /** + * specifies the algorithm for the compare operator (collator). + * + * The collator algorithm may be defined for separate keys in specific implementations. For those this property may not need to be set. + * @see com.sun.star.text.TextSortDescriptor + * @see com.sun.star.i18n.XCollator + */ + CollatorAlgorithm: string; + + /** specifies the locale for the compare operator (collator). */ + CollatorLocale: lang.Locale; + + /** specifies if the case of letters is important when comparing entries. */ + IsCaseSensitive: boolean; + + /** + * specifies the sorting order. + * + * The sorting order may be defined for separate keys in specific implementations. For those this property may not need to be set. + * @see com.sun.star.text.TextSortDescriptor + */ + SortAscending: boolean; + + /** + * specifies if the columns are sorted. + * + * **TRUE**: The columns are sorted.; + * + * **FALSE**: The rows are sorted. + */ + SortColumns: boolean; + } + + /** + * describes a single field in a sort descriptor. + * @deprecated Deprecated + */ + interface SortField { + /** index of the field in the table; 0-based. */ + Field: number; + + /** type of contents in the field. */ + FieldType: SortFieldType; + + /** `TRUE` if data are sorted in ascending order, `FALSE` if in descending order. */ + SortAscending: boolean; + } + + /** represents a time value. */ + interface Time { + /** contains the hour (0-23). */ + Hours: number; + + /** + * true: time zone is UTC false: unknown time zone. + * @since LibreOffice 4.1 + */ + IsUTC: boolean; + + /** contains the minutes (0-59). */ + Minutes: number; + + /** contains the nanoseconds (0 - 999 999 999). */ + NanoSeconds: number; + + /** contains the seconds (0-59). */ + Seconds: number; + } + + /** + * represents a combined time value with time zone. + * @since LibreOffice 4.1 + */ + interface TimeWithTimezone { + /** the time (in TimeZone) */ + TimeInTZ: Time; + + /** + * contains the time zone, as signed offset in minutes **from** UTC, that is **east** of UTC, that is the amount of minutes that should be added to UTC + * time to obtain the time in that timezone. + * + * To obtain UTC time from TimeInTZ, you need to **subtract** TimeZone minutes. + */ + Timezone: number; + } + + /** + * represents the structure of an Uniform Resource Locator. + * + * If the structure represents a valid {@link URL} or not depends on prior usage of the functions of {@link XURLTransformer} . Only after one of the + * functions returned `TRUE` this can be assumed. ; It is not necessary to set all of the fields; either {@link URL.Complete} or (some of) the others + * are set. Additionally, most of the other fields, like URL::Host, {@link URL.Port} , {@link URL.User} , {@link URL.Password} , or {@link URL.Mark} , + * are optional. + * @see XURLTransformer + */ + interface URL { + /** contains the arguments part of the {@link URL} , for example, "a=b" */ + Arguments: string; + + /** + * contains the string representation of the complete {@link URL} , for example, [http://www.sun.de:8080/pub/test/foo.txt?a=b#xyz]{@link + * url="http://www.sun.de:8080/pub/test/foo.txt?a=b#xyz"} + * + * It is used as a central input/output or input parameter for the interfaces of {@link XURLTransformer} . The usage of one of the {@link + * XURLTransformer} function is mandatory to validate the {@link URL} . It cannot be assumed that {@link URL.Complete} represents always a valid URL! + */ + Complete: string; + + /** + * contains the {@link URL} without a mark and without arguments, for example, [http://www.sun.de:8080/pub/test/foo.txt]{@link + * url="http://www.sun.de:8080/pub/test/foo.txt"} + */ + Main: string; + + /** contains the mark part of the {@link URL} , for example, "xyz" */ + Mark: string; + + /** + * contains the last segment of the hierarchical path of the {@link URL} , for the above example, "foo.txt" + * + * **Attention:** A service implementing the {@link XURLTransformer} interface will normally not detect if the last segment is a folder or a file. So it + * is possible that the last segment describes a folder. If you want to be sure that a file {@link URL} that references a folder will be correctly put + * into the {@link URL} fields you should append a "/" at the end of the hierarchical path. + */ + Name: string; + + /** contains the users password of the {@link URL} , for example, "pass" */ + Password: string; + + /** contains all segments but the last one of the hierarchical path of the {@link URL} , for example, "/pub/test/" */ + Path: string; + + /** contains the port at the server of the {@link URL} , for example, "8080" */ + Port: number; + + /** contains the protocol (scheme) of the {@link URL} , for example, "http" */ + Protocol: string; + + /** contains the server part of the {@link URL} , for example, "www.sun.de" */ + Server: string; + + /** contains the user-identifier of the {@link URL} , for example, "me" */ + User: string; + } + + /** + * allows estimating the memory usage of a service. + * @since LibreOffice 5.3 + */ + interface XAccounting extends uno.XInterface { + /** @returns an estimate of the current memory usage, in octets. */ + estimateUsage(): number; + } + + /** + * an interface to map between **string** s and **id** s + * + * a note on atoms: ; Atoms are abbreviations for strings. When a string gets registered, it is assigned a numeric id so that said string can always be + * referred to by this id. This way strings have to be transported only once over remote connections. Valid ids are (in this implementation) non zero, + * signed 32 bit values. An atom of 0 means that the string in question is not registered + * + * Additionally there is the abstraction of atom class: ; Atoms are grouped into classes, so that an id can be assigned to multiple strings, depending + * on the class context. The main advantage of this is that atoms in one class may be kept to small numbers, so that bandwidth can be reduced by sending + * the atoms only as 16 bit values. Note that it is up to the user in this case to handle overflows. + */ + interface XAtomServer extends uno.XInterface { + /** + * registers or searches for a string + * @param atomClass the class of atoms in question + * @param description the string in question + * @param create if true a new atom will be created for an unknown string else the invalid atom (0) will be returned for an unknown string + * @returns the atom for the string `description` + */ + getAtom(atomClass: number, description: string, create: boolean): number; + + /** + * returns the strings for an arbitrary amount of atoms of multiple classes + * @param atoms describes which strings to return + * @returns the strings for the requested atoms + */ + getAtomDescriptions(atoms: LibreOffice.SeqEquiv): SafeArray; + + /** + * returns a whole atom class + * @param atomClass which class to return + * @returns the descriptions for all atoms of class `atomClass` + */ + getClass(atomClass: number): SafeArray; + + /** + * returns multiple atom classes + * @param atomClasses which classes to return + * @returns the descriptions for all atoms of the requested classes + */ + getClasses(atomClasses: LibreOffice.SeqEquiv): SafeArray>; + + /** + * returns the atoms that have been registered to a class after an already known atom + * + * Hint to implementor: using ascending atoms is the easiest way to decide, which atoms are recent. + * @param atomClass the class in question + * @param atom the last known atom + * @returns all atom description that have been added to class `atomClass` after `atom` + */ + getRecentAtoms(atomClass: number, atom: number): SafeArray; + } + + /** + * allows to control notification behavior of a broadcaster. + * @since OOo 3.0 + */ + interface XBroadcaster extends uno.XInterface { + /** + * suspends broadcasts to the registered listeners. + * + * The calls to {@link XBroadcaster.lockBroadcasts()} and {@link XBroadcaster.unlockBroadcasts()} may be nested and even overlapping, but they must be in + * pairs. While there is at least one lock remaining, no broadcasts are sent to registered listeners. + */ + lockBroadcasts(): void; + + /** + * resumes the broadcasts which were suspended by {@link XBroadcaster.lockBroadcasts()} . + * + * The calls to {@link XBroadcaster.lockBroadcasts()} and {@link XBroadcaster.unlockBroadcasts()} may be nested and even overlapping, but they must be in + * pairs. While there is at least one lock remaining, no broadcasts are sent to registered listeners. + * + * Pending broadcasts will be sent immediately after the last call to {@link XBroadcaster.lockBroadcasts()} is matched by a call to {@link + * XBroadcaster.unlockBroadcasts()} . An implementation can decide to broadcast all pending notification in order or batch them in single broadcasts. + */ + unlockBroadcasts(): void; + } + + /** + * offers the possibility of canceling a job. + * + * This is supported by objects which represent a job. + */ + interface XCancellable extends uno.XInterface { + /** cancels the current job of the object. */ + cancel(): void; + } + + /** enables the object to be a member of a chain. */ + interface XChainable extends uno.XInterface { + /** @returns the previous object in this chain or NULL, if this is the first object of this chain. */ + getPredecessor(): XChainable; + + /** @returns the next object in this chain or NULL, if this is the last object in this chain. */ + getSuccessor(): XChainable; + + /** checks if the specified object can be linked to this. */ + isChainable(xChainable: XChainable): boolean; + + /** @returns the previous object in this chain or NULL, if this is the first object of this chain. */ + readonly Predecessor: XChainable; + + /** + * connects the specified object to this object as the successor in a chain. + * + * This implies that this object will become the predecessor of **xChainable** . + */ + setSuccessor(xChainable: XChainable): void; + + /** @returns the next object in this chain or NULL, if this is the last object in this chain. */ + Successor: XChainable; + } + + /** + * this interface enables applying a set of changes in one batch transaction. + * + * An object implementing this interface allows other interfaces to change its state locally. It will keep a list of pending changes until such changes + * are committed or canceled. + * + * Only when they are explicitly committed will these changes take effect persistently or globally. + * @see XChangesNotifier + * @see XChangesSet + * @see XCancellable + */ + interface XChangesBatch extends uno.XInterface { + /** + * commits any pending changes. + * + * The exact action depends on the concrete service. + */ + commitChanges(): void; + + /** queries for any pending changes that can be committed. */ + getPendingChanges(): ChangesSet; + + /** checks whether this object has any pending changes that can be committed. */ + hasPendingChanges(): boolean; + + /** queries for any pending changes that can be committed. */ + readonly PendingChanges: ChangesSet; + } + + /** + * receives events from batch change broadcaster objects. + * @see ChangesEvent + * @see XChangesNotifier + * @see XChangesBatch + */ + interface XChangesListener extends lang.XEventListener { + /** is invoked when a batch of changes occurred. */ + changesOccurred(Event: ChangesEvent): void; + } + + /** + * broadcasts events about multiple changes that occur in bulk. + * @see XChangesListener + * @see XChangesBatch + * @see ChangesEvent + */ + interface XChangesNotifier extends uno.XInterface { + /** adds the specified listener to receive events when changes occurred. */ + addChangesListener(aListener: XChangesListener): void; + + /** removes the specified listener. */ + removeChangesListener(aListener: XChangesListener): void; + } + + /** + * this interface enables inspecting a set of changes forming one batch transaction. + * + * An object implementing this interface should implement more container interfaces to access individual changes as well. + * @see XChangesBatch + * @see ChangesEvent + * @see XChangesListener + * @see XChangesNotifier + */ + interface XChangesSet extends container.XElementAccess { + /** + * queries for all contained changes at once. + * @returns an array of {@link ElementChange} holding information about each changes that is part of this object. + */ + readonly AllChanges: SafeArray; + + /** + * queries for all contained changes at once. + * @returns an array of {@link ElementChange} holding information about each changes that is part of this object. + */ + getAllChanges(): SafeArray; + } + + /** makes it possible to create a copy of the object which supports this interface. */ + interface XCloneable extends uno.XInterface { + /** creates a copy of the object. */ + createClone(): XCloneable; + } + + /** + * makes it possible to release any objects in a ordered manner by using a two-step mechanism + * + * If an object should be terminated, it can be: ; disposed (if it supports {@link com.sun.star.lang.XComponent.dispose()} )closed (if it supports {@link + * XCloseable.close()} ) First version gives the object no chance to disagree with that (e.g. if a process is still running and can't be canceled + * really). Last version provides this possibility, but can't guarantee real termination of called object. It depends from the environment of an object, + * if one or both mechanism are necessary. + * + * Base interface {@link XCloseBroadcaster} makes it possible that any listener which is interested on life time of listened object ... can get a + * notification about closing of itor can have a veto to break that. + * @see com.sun.star.lang.XComponent.dispose() + * @see XCloseBroadcaster + * @see XCloseListener + */ + interface XCloseable extends XCloseBroadcaster { + /** + * try to close the object + * + * Must definitely be called before {@link com.sun.star.lang.XComponent.dispose()} . But nobody can guarantee real closing of called object - because it + * can disagree with that if any still running processes can't be canceled yet. It's not allowed to block this call till internal operations will be + * finished here. They must be canceled or call must return immediately by throwing the {@link CloseVetoException} . Otherwise (if nothing exist to + * disagree) it must return normally. + * + * Before any internal processes will be canceled, all registered {@link XCloseListener} must be notified. Any of them can disagree with a {@link + * CloseVetoException} too. It's forbidden to catch this exception inside the called {@link close()} method because the caller must get this information! + * + * If somewhere disagree with a {@link CloseVetoException} it will not clear who has to close the object again after still running processes was + * finished. The parameter **DeliverOwnership** regulate that. If it is set to `FALSE` the caller of the method {@link close()} will be the owner of this + * object in every case. Then it's not allowed to call {@link close()} from any other place (may a registered {@link XCloseListener} ). If it is set to + * `TRUE` the caller gives up his ownership. If a {@link XCloseListener} throw the veto exception he will be the new owner of the closing object. This + * information is passed to the listener by a parameter of his notification method {@link XCloseListener.queryClosing()} . After his operations was + * finished he MUST try to close it again. If the closing object itself disagree by an exception and the parameter **DeliverOwnership** was set to `TRUE` + * the object will be his own owner with all consequences of that. ; **Note:**; There is no way to get the ownership back if it was delivered! + * + * If this method was already called on an object it should return without any reaction. Normally it's possible to throw a {@link + * com.sun.star.lang.DisposedException} for already disposed or closed objects (which represent a {@link com.sun.star.uno.RuntimeException} and can be + * thrown by every interface call), but it shouldn't be used here. The veto exception should be the only way to indicates the result. + * @param DeliverOwnership `TRUE` delegates the ownership of this closing object to any one which throw the {@link CloseVetoException} . This new owner has + * @see XCloseListener + * @see CloseVetoException + * @see com.sun.star.lang.XComponent.dispose() + * @see com.sun.star.lang.DisposedException + * @throws CloseVetoException indicates that the closing object himself or any of his currently registered listener disagree with this {@link close()} request. + */ + close(DeliverOwnership: boolean): void; + } + + /** + * broadcasts each tried closing of an object to all interest listener + * + * The called object for closing must post the closing events immediately and before any internal cancel operations will be started. If a listener + * disagree with that it should throw a {@link CloseVetoException} and called function {@link XCloseable.close()} must be broken immediately. It's not + * allowed to catch it inside the close() request. If no listener nor internal processes hinder the object on closing all listeners get a notification + * about real closing. + * @see + */ + interface XCloseBroadcaster extends uno.XInterface { + /** + * adds the specified listener to receive or have a veto for "close" events + * @param Listener the listener which is interest on closing events + */ + addCloseListener(Listener: XCloseListener): void; + + /** + * removes the specified listener + * @param Listener the listener which isn't interest on closing events any longer + */ + removeCloseListener(Listener: XCloseListener): void; + } + + /** + * makes it possible to receive events when an object is called for closing + * + * Such close events are broadcasted by a {@link XCloseBroadcaster} if somewhere tries to close it by calling {@link XCloseable.close()} . Listener can: + * break that by throwing {@link CloseVetoException}or accept that by deregister himself at this broadcaster. + * + * If an event {@link com.sun.star.lang.XEventListener.disposing()} occurred, nobody called {@link XCloseable.close()} on listened object before. Then + * it's not allowed to break this request - it must be accepted! + * @see XCloseable + * @see XCloseBroadcaster + */ + interface XCloseListener extends lang.XEventListener { + /** + * is called when the listened object is closed really + * + * Now the listened object is closed really. Listener has to accept that; should deregister himself and release all references to it. It's not allowed + * nor possible to disagree with that by throwing any exception. + * + * If the event {@link com.sun.star.lang.XEventListener.disposing()} occurred before it must be accepted too. There exist no chance for a disagreement + * any more. + * @param Source describes the source of the event (must be the listened object) + */ + notifyClosing(Source: lang.EventObject): void; + + /** + * is called when somewhere tries to close listened object + * + * Is called before {@link XCloseListener.notifyClosing()} . Listener has the chance to break that by throwing a {@link CloseVetoException} . This + * exception must be passed to the original caller of {@link XCloseable.close()} without any interaction. + * + * The parameter **GetsOwnership** regulate who has to try to close the listened object again, if this listener disagree with the request by throwing the + * exception. If it's set to `FALSE` the original caller of {@link XCloseable.close()} will be the owner in every case. It's not allowed to call close() + * from this listener then. If it's set to `TRUE` this listener will be the new owner if he throw the exception, otherwise not! If his still running + * processes will be finished he must call close() on listened object again then. + * + * If this listener doesn't disagree with th close request it depends from his internal implementation if he deregister himself at the listened object. + * But normally this must be done in {@link XCloseListener.notifyClosing()} . + * @param Source describes the source of the event (must be the listened object) + * @param GetsOwnership `TRUE` pass the ownership to this listener, if he throw the veto exception (otherwise this parameter must be ignored!) ; `FALSE` fo + * @throws CloseVetoException if listener disagree with the close request on listened object he must throw this exception + */ + queryClosing(Source: lang.EventObject, GetsOwnership: boolean): void; + } + + /** connects to a model and broadcasts status change events. */ + interface XDataEditor extends uno.XInterface { + /** registers a listener to receive `DataEditorEvent` s. */ + addDataEditorListener(listener: XDataEditorListener): void; + + /** @returns the data model which was set by {@link XDataEditor.setModel()} . */ + getModel(): uno.XInterface; + + /** @returns the data model which was set by {@link XDataEditor.setModel()} . */ + Model: uno.XInterface; + + /** unregisters a listener. */ + removeDataEditorListener(listener: XDataEditorListener): void; + + /** connects the data editor to a data model. */ + setModel(model: uno.XInterface): void; + + /** makes the data editor visible to the user. */ + show(): void; + } + + /** makes it possible to receive status change events from an {@link XDataEditor} . */ + interface XDataEditorListener extends uno.XInterface { + /** is called when the state of a connected {@link XDataEditor} changes. */ + updateDataEditorState(event: DataEditorEvent): void; + } + + /** is supported by objects with data that can be flushed to a data source. */ + interface XFlushable extends uno.XInterface { + /** adds the specified listener to receive event "flushed." */ + addFlushListener(l: XFlushListener): void; + + /** flushes the data of the object to the connected data source. */ + flush(): void; + + /** removes the specified listener. */ + removeFlushListener(l: XFlushListener): void; + } + + /** makes it possible to receive **flushed** events. */ + interface XFlushListener extends lang.XEventListener { + /** is called when the object data is flushed. */ + flushed(rEvent: lang.EventObject): void; + } + + /** makes it possible to import files into the object. */ + interface XImportable extends uno.XInterface { + /** @returns a descriptor which contains the arguments for an import. */ + createImportDescriptor(bEmpty: boolean): SafeArray; + + /** imports data from an external database. */ + doImport(aDescriptor: LibreOffice.SeqEquiv): void; + } + + /** allows indentation of the object to be changed. */ + interface XIndent extends uno.XInterface { + /** shifts the indentation by one default step to the left. */ + decrementIndent(): void; + + /** shifts the indentation by one default step to the right. */ + incrementIndent(): void; + } + + /** Manage cancelable jobs. */ + interface XJobManager extends uno.XInterface { + /** cancel all registered jobs. */ + cancelAllJobs(): void; + + /** registers a cancelable job. */ + registerJob(Job: XCancellable): void; + + /** deregisters a cancelable jobs. */ + releaseJob(Job: XCancellable): void; + } + + /** allows initiating an update of linked parts of a document. */ + interface XLinkUpdate extends uno.XInterface { + /** initiates the reloading of all linked document content like linked graphics, linked text sections. */ + updateLinks(): void; + } + + /** is the interface for binding programmatic names to aliases. Aliases can be provided in several locales for the same programmatic name. */ + interface XLocalizedAliases extends uno.XInterface { + /** registers an alias for a programmatic name. */ + bindAlias(programmaticName: string, locale: lang.Locale, alias: string): void; + + /** + * retrieves a list of all registered aliases for a certain language. + * @param locale specifies the locale scope. + * @returns a sequence of registered pair of alias and programmatic name. + */ + listAliases(locale: lang.Locale): SafeArray; + + /** retrieves a registered programmatic name identified by an alias. */ + lookupAlias(locale: lang.Locale, Alias: string): string; + + /** retrieves a given alias for a programmatic name. */ + lookupProgrammatic(locale: lang.Locale, programmatic: string): string; + + /** rebinds all aliases registered to a given {@link URL} to a new one. */ + rebindAliases(currentProgrammatic: string, newProgrammatic: string): void; + + /** renames an alias for a programmatic name. */ + renameAlias(locale: lang.Locale, oldName: string, aNewName: string): void; + + /** revokes an alias for a programmatic name. */ + unbindAlias(locale: lang.Locale, alias: string): void; + + /** removes all aliases for a programmatic name. */ + unbindAliases(programmaticName: string): void; + } + + /** + * allows locking a component + * + * `lock` and `unlock` calls can be nested. However, they must be in pairs. As long as there has been one more call to `lock` than to `unlock` , the + * component is considered locked, which is reflected by {@link isLocked()} returning `TRUE` . + */ + interface XLockable { + /** + * determines whether the component is currently locked. + * @see lock + * @see unlock + */ + isLocked(): boolean; + + /** + * locks the component + * @see unlock + * @see isLocked + */ + lock(): void; + + /** + * unlocks the component + * @see lock + * @see isLocked + * @throws NotLockedException if the component is not currently locked. + */ + unlock(): void; + } + + /** + * Expands macro in expressions, i.e. substitudes macro names. + * @since OOo 1.1.2 + */ + interface XMacroExpander extends uno.XInterface { + /** + * Expands macrofied expressions. + * @param exp macrofied expression + * @returns demacrofied expression + * @throws IllegalArgumentException if a macro name is unknown, thus cannot be expanded + */ + expandMacros(exp: string): string; + } + + /** represents a range of cells that can be merged. */ + interface XMergeable extends uno.XInterface { + /** @returns `TRUE` if the area specified by this object is merged, or `FALSE` otherwise. */ + getIsMerged(): boolean; + + /** @returns `TRUE` if the area specified by this object is merged, or `FALSE` otherwise. */ + readonly IsMerged: boolean; + + /** merges/unmerges the area specified by this object. */ + merge(bMerge: boolean): void; + } + + /** + * allows to veto changes in an object's internal mode. + * @see XModeChangeBroadcaster + * @since OOo 1.1.2 + */ + interface XModeChangeApproveListener extends lang.XEventListener { + /** + * indicates that the mode of the broadcasting component is about to change. + * + * The {@link ModeChangeEvent.NewMode} indicates the new mode which is to be set on the component + * @throws VetoException when the mode change is vetoed + */ + approveModeChange(rSource: ModeChangeEvent): void; + } + + /** + * broadcasts changes in an object's internal mode. + * @see XModeSelector + * @see XModeChangeListener + * @see XModeChangeApproveListener + * @since OOo 1.1.2 + */ + interface XModeChangeBroadcaster extends uno.XInterface { + /** + * adds the given listener to the list of components to be notified when the mode is about to change. + * @throws com::sun::star::lang::NoSupportException if the component does not allow vetoing mode changes + */ + addModeChangeApproveListener(rxListener: XModeChangeApproveListener): void; + + /** adds the given listener to the list of components to be notified when the mode changes. */ + addModeChangeListener(rxListener: XModeChangeListener): void; + + /** + * remove the given listener from the list of components to be notified when the mode is about to change. + * @throws com::sun::star::lang::NoSupportException if the component does not allow vetoing mode changes + */ + removeModeChangeApproveListener(rxListener: XModeChangeApproveListener): void; + + /** removes the given listener from the list of components to be notified when the mode changes. */ + removeModeChangeListener(rxListener: XModeChangeListener): void; + } + + /** + * allows to listen for changes in an object's internal mode. + * @see XModeChangeBroadcaster + * @since OOo 1.1.2 + */ + interface XModeChangeListener extends lang.XEventListener { + /** indicates that the mode of the broadcasting component has changed. */ + modeChanged(rSource: ModeChangeEvent): void; + } + + /** is supported by objects which supply different modes. */ + interface XModeSelector extends uno.XInterface { + /** @returns the current mode. */ + getMode(): string; + + /** @returns a sequence of all supported modes. */ + getSupportedModes(): SafeArray; + + /** @returns the current mode. */ + Mode: string; + + /** sets a new mode for the implementing object. */ + setMode(aMode: string): void; + + /** @returns a sequence of all supported modes. */ + readonly SupportedModes: SafeArray; + + /** asks whether a mode is supported or not. */ + supportsMode(aMode: string): boolean; + } + + /** + * makes the modify state of the object accessible. + * + * Additionally, it makes it possible to register listener objects, which get notification whenever the status or content of the object changes. + */ + interface XModifiable extends XModifyBroadcaster { + /** @returns `TRUE` if the object is modified. The modification is always in relation to a certain state (i.e., the initial, loaded, or last stored version). */ + isModified(): boolean; + + /** sets the status of the **modified** -flag from outside of the object. */ + setModified(bModified: boolean): void; + } + + /** + * allows to control modifiable state change. + * + * This interface allows to prevent changing of the modified state of the object. It is introduced for performance optimizations, to allow to prevent + * unnecessary updates, for example while importing a document. Please use this interface very carefully. + */ + interface XModifiable2 extends XModifiable { + /** + * disable possibility to change modified state of the document + * @returns the value that says whether the modified state change was enabled before the call `TRUE` the changing of the modified state was already disabled + */ + disableSetModified(): boolean; + + /** + * enable possibility to change modified state of the document + * @returns the value that says whether the modified state change was enabled before the call `TRUE` the changing of the modified state was disabled `FALSE` + */ + enableSetModified(): boolean; + + /** allows to detect whether the modified state change is enabled */ + isSetModifiedEnabled(): boolean; + } + + /** + * broadcasts each modification made on the date data of the object which supports this interface. + * + * The modified object must post the modification events immediately after the modification is performed. + */ + interface XModifyBroadcaster extends uno.XInterface { + /** adds the specified listener to receive events "modified." */ + addModifyListener(aListener: XModifyListener): void; + + /** removes the specified listener. */ + removeModifyListener(aListener: XModifyListener): void; + } + + /** makes it possible to receive events when a model object changes. */ + interface XModifyListener extends lang.XEventListener { + /** + * is called when something changes in the object. + * + * Due to such an event, it may be necessary to update views or controllers. + * + * The source of the event may be the content of the object to which the listener is registered. + */ + modified(aEvent: lang.EventObject): void; + } + + /** + * represents a number formatter which can preview number formats without inserting them. + * @see NumberFormatter + */ + interface XNumberFormatPreviewer extends uno.XInterface { + /** + * formats a value using a format string, without inserting a number format into the list. + * @param aFormat is the format string that is used for formatting. + * @param fValue is the value that is formatted. + * @param nLocale is the locale that is used to interpret the format string. + * @param bAllowEnglish specifies if English language number format strings are accepted in addition to those from the selected locale. + * @returns the formatted string. + * @throws com::sun::star::util::MalformedNumberFormatException if the format string is invalid. + */ + convertNumberToPreviewString(aFormat: string, fValue: number, nLocale: lang.Locale, bAllowEnglish: boolean): string; + + /** + * returns the color which is to be used for a number. + * @param aFormat is the format string that is used for formatting. + * @param fValue is the value that is formatted. + * @param nLocale is the locale that is used to interpret the format string. + * @param bAllowEnglish specifies if English language number format strings are accepted in addition to those from the selected locale. + * @param aDefaultColor is the color that should be returned if no color is set by the number format. + * @returns the color that should used to output the formatted string. + * @throws com::sun::star::util::MalformedNumberFormatException if the format string is invalid. + */ + queryPreviewColorForNumber(aFormat: string, fValue: number, nLocale: lang.Locale, bAllowEnglish: boolean, aDefaultColor: Color): Color; + } + + /** + * provides access to multiple {@link NumberFormats} . + * + * The number formats are managed by their unique key in the document. + */ + interface XNumberFormats extends uno.XInterface { + /** + * adds a new number format to the list, using a format string. + * @param aFormat the string representation of the number format + * @param nLocale the locale for the number format + * @returns the key for new number format + * @throws com::sun::star::util::MalformedNumberFormatException if incorrect number format is specified + */ + addNew(aFormat: string, nLocale: lang.Locale): number; + + /** + * adds a new number format to the list, using a format string in a different locale than the desired locale of the resulting number format. + * @param aFormat the key for the number format + * @param nLocale the original locale for the number format + * @param nNewLocale the new locale for the number format to be converted + * @returns the key for added number format + * @throws com::sun::star::util::MalformedNumberFormatException if incorrect number format is specified + */ + addNewConverted(aFormat: string, nLocale: lang.Locale, nNewLocale: lang.Locale): number; + + /** + * generates a format string from several parameters without creating an actual number format. + * @param nBaseKey the key for the number format to be used as base format + * @param nLocale the locale for the number format + * @param bThousands the thousands separator is shown or not + * @param bRed show negative number in red colored if `TRUE` + * @param nDecimals how many digits are shown after the decimal point + * @param nLeading how many number of leading zeros are shown + * @returns the string representation for the number format + */ + generateFormat(nBaseKey: number, nLocale: lang.Locale, bThousands: boolean, bRed: boolean, nDecimals: number, nLeading: number): string; + + /** + * @param nKey the key for the format + * @returns a readonly {@link NumberFormatProperties} . + */ + getByKey(nKey: number): beans.XPropertySet; + + /** + * finds a number format by its format string and returns its key. + * @param aFormat the string representation of the number format + * @param nLocale the locale for number formats to find + * @param bScan reserved for future use and should be set to false + * @returns the key for the format if found, otherwise -1. + */ + queryKey(aFormat: string, nLocale: lang.Locale, bScan: boolean): number; + + /** + * @param nType the type of number formats to return. Must be one of the {@link NumberFormat} constants. + * @param nLocale the locale of number formats to return. + * @param bCreate `TRUE` : create new entries if no formats for the selected language exist ; `FALSE` : return an empty list if no formats for the selected + * @returns a sequence of the keys of all number formats with the specified type and language. + */ + queryKeys(nType: number, nLocale: lang.Locale, bCreate: boolean): SafeArray; + + /** + * removes a number format from the list. + * @param nKey the key for the numberformat + */ + removeByKey(nKey: number): void; + } + + /** supplies the collection of {@link NumberFormats} (for example, in a document) and the settings belonging to these formats. */ + interface XNumberFormatsSupplier extends uno.XInterface { + /** @returns the collection of number formats belonging to this object (e.g., to this document). */ + getNumberFormats(): XNumberFormats; + + /** @returns the {@link NumberFormatSettings} of this object. */ + getNumberFormatSettings(): beans.XPropertySet; + + /** @returns the collection of number formats belonging to this object (e.g., to this document). */ + readonly NumberFormats: XNumberFormats; + + /** @returns the {@link NumberFormatSettings} of this object. */ + readonly NumberFormatSettings: beans.XPropertySet; + } + + /** represents a number formatter. */ + interface XNumberFormatter extends uno.XInterface { + /** + * attaches an {@link XNumberFormatsSupplier} to this {@link NumberFormatter} . + * + * This {@link NumberFormatter} will only use the {@link NumberFormats} specified in the attached {@link XNumberFormatsSupplier} . Without an attached + * {@link XNumberFormatsSupplier} , no formatting is possible. + */ + attachNumberFormatsSupplier(xSupplier: XNumberFormatsSupplier): void; + + /** converts a number into a string. */ + convertNumberToString(nKey: number, fValue: number): string; + + /** + * converts a string which contains a formatted number into a number. + * + * If this is a text format, the string will not be converted. + */ + convertStringToNumber(nKey: number, aString: string): number; + + /** detects the number format in a string which contains a formatted number. */ + detectNumberFormat(nKey: number, aString: string): number; + + /** converts a string into another string. */ + formatString(nKey: number, aString: string): string; + + /** + * converts a number into a string with the specified format. + * + * This string can always be converted back to a number using the same format. + */ + getInputString(nKey: number, fValue: number): string; + + /** @returns the attached {@link XNumberFormatsSupplier} . */ + getNumberFormatsSupplier(): XNumberFormatsSupplier; + + /** @returns the attached {@link XNumberFormatsSupplier} . */ + readonly NumberFormatsSupplier: XNumberFormatsSupplier; + + /** @returns the color which is specified for the given value in the number format, which is otherwise the value of **aDefaultColor** . */ + queryColorForNumber(nKey: number, fValue: number, aDefaultColor: Color): Color; + + /** @returns the color which is specified for the given string in the number format, which is otherwise the value of **aDefaultColor** . */ + queryColorForString(nKey: number, aString: string, aDefaultColor: Color): Color; + } + + /** + * Provides a unified interface for the {@link NumberFormatter} service to implement. + * @since LibreOffice 4.0 + */ + interface XNumberFormatter2 extends XNumberFormatter, XNumberFormatPreviewer { } + + /** represents functions to get specific, predefined number formats. */ + interface XNumberFormatTypes extends uno.XInterface { + /** + * @param nKey index of the old number format + * @param nLocale the locale to which the number format is converted + * @returns the index of the converted number format if successful, the old index if the number format could not be converted. + */ + getFormatForLocale(nKey: number, nLocale: lang.Locale): number; + + /** + * @param nIndex the index of the wanted number format within the formats for the given locale. One of the {@link com.sun.star.i18n.NumberFormatIndex} cons + * @param nLocale the locale for which the key is requested. + * @returns the key of a built-in format for a locale: + */ + getFormatIndex(nIndex: number, nLocale: lang.Locale): number; + + /** + * @param nType the type of the number format. Must be one of the {@link NumberFormat} constants. + * @param nLocale the locale for which the number format is requested. + * @returns the key of the standard format within a specified type for a given locale. + */ + getStandardFormat(nType: number, nLocale: lang.Locale): number; + + /** @returns the key of the standard format for a locale. */ + getStandardIndex(nLocale: lang.Locale): number; + + /** verifies if one type of number format is compatible with another type. */ + isTypeCompatible(nOldType: number, nNewType: number): boolean; + } + + /** + * encapsulates access to the current office installation directory and office user data directory, provides functionality to create URLs containing + * relocatable (not absolute) references to the current office installation directory and user data directory and vice versa. + * + * This functionality is useful when data containing references to the current office installation directory must be made persistent and re-read later. + * In many cases, storing the reference directly would destroy the relocatability of an office installation. + * @since OOo 2.0 + */ + interface XOfficeInstallationDirectories extends uno.XInterface { + /** + * returns the absolute {@link URL} containing the directory of the current office installation (for example "file:///opt/LibreOffice") + * @returns the absolute {@link URL} containing the directory of the current office installation. + */ + getOfficeInstallationDirectoryURL(): string; + + /** + * returns the absolute {@link URL} containing the directory where the current office installation expects its user data (for example + * "file:///home/kso/.config/libreoffice/4") + * @returns the absolute {@link URL} containing the directory of the current office user data. + */ + getOfficeUserDataDirectoryURL(): string; + + /** + * the counterpart of `makeRelocatableURL` . + * + * If the given {@link URL} contains a placeholder for an absolute reference to the current office installation directory or for the office user data + * directory, that was created using `makeRelocatableURL` , the respective placeholder will be replaced by an absolute reference to the current office + * installation directory or office user data directory. + * @param URL The {@link URL} for that an absolute {@link URL} is requested. In case the {@link URL} does not contain the opaque relocation placeholder use + * @returns The absolute {@link URL} . + */ + makeAbsoluteURL(URL: string): string; + + /** + * calculates a relocatable {@link URL} from the given {@link URL} . + * + * If the given {@link URL} contains an absolute reference to the current office installation directory or office user data directory, this method will + * replace the absolute reference by an opaque placeholder string. `makeRelocatableURL` must be used in order to re-replace the placeholder by an + * absolute reference. + * @param URL The {@link URL} for that a relocatable {@link URL} is requested. In case the {@link URL} does not contain a reference to the current office i + * @returns The relocatable {@link URL} . + */ + makeRelocatableURL(URL: string): string; + + /** + * returns the absolute {@link URL} containing the directory of the current office installation (for example "file:///opt/LibreOffice") + * @returns the absolute {@link URL} containing the directory of the current office installation. + */ + readonly OfficeInstallationDirectoryURL: string; + + /** + * returns the absolute {@link URL} containing the directory where the current office installation expects its user data (for example + * "file:///home/kso/.config/libreoffice/4") + * @returns the absolute {@link URL} containing the directory of the current office user data. + */ + readonly OfficeUserDataDirectoryURL: string; + } + + /** @since LibreOffice 4.1 */ + interface XPathSettings extends beans.XPropertySet { + /** Specifies the directory that contains spreadsheet add-ins which use the old add-in API */ + Addin: string; + + /** The settings of the AutoCorrect dialog. The value can be more than one path separated by a semicolon. */ + AutoCorrect: string; + + /** The directory which contains the AutoText modules. The value can be more than one path separated by a semicolon. */ + AutoText: string; + + /** Automatic backup copies of documents are stored here. */ + Backup: string; + BasePathShareLayer: string; + BasePathUserLayer: string; + + /** The Basic files, used by the AutoPilots, can be found here. The value can be more than one path separated by a semicolon. */ + Basic: string; + + /** This directory contains the icons for the toolbars. */ + Bitmap: string; + + /** The configuration files are located here. This entry cannot be changed by the user in Office user interface. */ + Config: string; + + /** The provided dictionaries are stored here. */ + Dictionary: string; + + /** Path to save folder bookmarks */ + Favorite: string; + + /** Specifies the directory where all the filters are stored. */ + Filter: string; + + /** Specifies the directories which contains the Gallery database and multimedia files. The value can be more than one path separated by a semicolon. */ + Gallery: string; + + /** This directory is displayed when the dialog for opening a graphic or for saving a new graphic is called. */ + Graphic: string; + + /** The path to the Office help files. */ + Help: string; + + /** The files that are necessary for the spell check are saved here. */ + Linguistic: string; + + /** This is the path for the modules. */ + Module: string; + + /** + * This is the path to the palette files *.SOB to *.SOF containing user-defined colors and patterns. The value can be more than one path separated by a + * semicolon. + */ + Palette: string; + + /** Plugins are saved in these directories. The value can be more than one path separated by a semicolon. */ + Plugin: string; + + /** Mail, News files and other information (for example, about FTP Server) are stored here. */ + Storage: string; + + /** The base url to the office temp-files */ + Temp: string; + + /** The templates originate from these folders and sub-folders. The value can be more than one path separated by a semicolon. */ + Template: string; + + /** + * Global directories to look for user interface configuration files. The user interface configuration will be merged with user settings stored in the + * directory specified by **UserConfig** . The value can be more than one path separated by a semicolon. + */ + UIConfig: string; + + /** Specifies the folder with the user settings. */ + UserConfig: string; + + /** + * The custom dictionaries are contained here. + * @deprecated Deprecated + */ + UserDictionary: string; + + /** The path of the work folder can be modified according to the user's needs. The path specified here can be seen in the Open or Save dialog. */ + Work: string; + } + + /** makes it possible to search and replace properties. */ + interface XPropertyReplace extends XReplaceDescriptor { + /** @returns the attribute values which are used to replace the found occurrences. */ + getReplaceAttributes(): SafeArray; + + /** @returns the attributes to search for. */ + getSearchAttributes(): SafeArray; + + /** provides the information if specific property values are searched, or just the existence of the specified properties. */ + getValueSearch(): boolean; + + /** @returns the attribute values which are used to replace the found occurrences. */ + ReplaceAttributes: SafeArray; + + /** @returns the attributes to search for. */ + SearchAttributes: SafeArray; + + /** sets the properties to replace the found occurrences. */ + setReplaceAttributes(aSearchAttribs: LibreOffice.SeqEquiv): void; + + /** sets the properties to search for. */ + setSearchAttributes(aSearchAttribs: LibreOffice.SeqEquiv): void; + + /** specifies if specific property values are searched, or just the existence of the specified properties. */ + setValueSearch(bValueSearch: boolean): void; + + /** provides the information if specific property values are searched, or just the existence of the specified properties. */ + ValueSearch: boolean; + } + + /** makes it possible to protect objects from modifications. */ + interface XProtectable extends uno.XInterface { + /** @returns the current state of protection. */ + isProtected(): boolean; + + /** + * activates the protection. + * @param aPassword a string to specify new password. + */ + protect(aPassword: string): void; + + /** + * removes the protection. + * @param aPassword a string to match with the current password. + * @throws com::sun::star::lang::IllegalArgumentException if invalid password is specified. + */ + unprotect(aPassword: string): void; + } + + /** is supported by objects with data that can be refreshed from a data source. */ + interface XRefreshable extends uno.XInterface { + /** adds the specified listener to receive the event "refreshed." */ + addRefreshListener(l: XRefreshListener): void; + + /** refreshes the data of the object from the connected data source. */ + refresh(): void; + + /** removes the specified listener. */ + removeRefreshListener(l: XRefreshListener): void; + } + + /** makes it possible to receive **refreshed** events. */ + interface XRefreshListener extends lang.XEventListener { + /** is called when the object data is refreshed. */ + refreshed(rEvent: lang.EventObject): void; + } + + /** + * makes it possible to replace strings in a text described by a {@link SearchDescriptor} . + * + * Example: replace all bold words "search for" by "look for" + * + * {{program example here, see documentation}} + */ + interface XReplaceable extends XSearchable { + /** + * creates a descriptor which contains properties that specify a search in this container. + * @see SearchDescriptor + */ + createReplaceDescriptor(): XReplaceDescriptor; + + /** + * searches for all occurrences of whatever is specified. + * @see SearchDescriptor + */ + replaceAll(xDesc: XSearchDescriptor): number; + } + + /** specifies a string replace operation. */ + interface XReplaceDescriptor extends XSearchDescriptor { + /** @returns the string which replaces the found occurrences. */ + getReplaceString(): string; + + /** @returns the string which replaces the found occurrences. */ + ReplaceString: string; + + /** sets the string which replaces the found occurrences. */ + setReplaceString(aReplaceString: string): void; + } + + /** + * enables the object to look for specified contents of the object (in particular, for a text range which contains a specific string pattern). + * + * Example: in a {@link com.sun.star.text.TextDocument} : set all "search for" to bold using {@link findFirst()} /findNext(): + * + * {{program example here, see documentation}} + */ + interface XSearchable extends uno.XInterface { + /** + * creates a {@link SearchDescriptor} which contains properties that specify a search in this container. + * @see SearchDescriptor + */ + createSearchDescriptor(): XSearchDescriptor; + + /** + * searches the contained texts for all occurrences of whatever is specified. + * @see SearchDescriptor + */ + findAll(xDesc: XSearchDescriptor): container.XIndexAccess; + + /** + * searches the contained texts for the next occurrence of whatever is specified. + * @returns the position within the component, e.g. a {@link com.sun.star.text.XTextRange} which determines the found elements. + * @see SearchDescriptor + */ + findFirst(xDesc: XSearchDescriptor): uno.XInterface; + + /** + * searches the contained texts for the next occurrence of whatever is specified. + * @param xStartAt represents a position within the component at which the search continues. This position is returned by {@link XSearchable.findFirst()} o + * @param xDesc the descriptor used for searching. + * @see SearchDescriptor + */ + findNext(xStartAt: uno.XInterface, xDesc: XSearchDescriptor): uno.XInterface; + } + + /** specifies a string search operation. */ + interface XSearchDescriptor extends beans.XPropertySet { + /** @returns the string of characters to search for. */ + getSearchString(): string; + + /** @returns the string of characters to search for. */ + SearchString: string; + + /** sets the string of characters to look for. */ + setSearchString(aString: string): void; + } + + /** + * makes it possible to sort the contents of this object. + * + * The available properties describing the sort criteria are defined in the sort descriptor implemented by the object that implements this interface. + * + * There are older deprecated sort descriptors: + * + * {@link com.sun.star.util.SortDescriptor}{@link com.sun.star.table.TableSortDescriptor}{@link com.sun.star.text.TextSortDescriptor} + * + * And a new set of sort descriptors: + * + * {@link com.sun.star.util.SortDescriptor2}{@link com.sun.star.table.TableSortDescriptor2}{@link com.sun.star.text.TextSortDescriptor2} + * + * Both types may be implemented by the same object. When calling the sort method however properties from different descriptors must not be mixed. + */ + interface XSortable extends uno.XInterface { + /** + * @returns a sequence of properties which allows to specify/modify the sort criteria. The set of properties is specific to the type of object that implemen + * @see com.sun.star.util.SortDescriptor + * @see com.sun.star.table.TableSortDescriptor + * @see com.sun.star.text.TextSortDescriptor + * @see com.sun.star.util.SortDescriptor2 + * @see com.sun.star.table.TableSortDescriptor2 + * @see com.sun.star.text.TextSortDescriptor2 + */ + createSortDescriptor(): SafeArray; + + /** + * sorts the contents of the object according to the specified properties. + * + * The specified properties are usually the same or a subset of those obtained by calling {@link createSortDescriptor()} on the same type of object. + * @see com.sun.star.util.SortDescriptor + * @see com.sun.star.table.TableSortDescriptor + * @see com.sun.star.text.TextSortDescriptor + * @see com.sun.star.util.SortDescriptor2 + * @see com.sun.star.table.TableSortDescriptor2 + * @see com.sun.star.text.TextSortDescriptor2 + */ + sort(xDescriptor: LibreOffice.SeqEquiv): void; + } + + /** + * Abbreviate arbitrary strings. + * + * It is expected that there will be different implementations of this interface, that each expect strings conforming to a certain structure (e.g., URIs, + * platform-specific file paths, or newsgroup names). The abbreviation algorithms will then take into account the structural information. + * @see XStringWidth + */ + interface XStringAbbreviation extends uno.XInterface { + /** + * Abbreviate a string, so that the resulting abbreviated string is not wider than some given width. + * + * The width of a string is an abstract concept here, measured via an {@link XStringWidth} interface. Examples are the number of characters in the string + * ( {@link XStringWidth} will measure the string's length), or the width in pixel when displayed with a specific font (which {@link XStringWidth} would + * encapsulate). + * @param xStringWidth The interface that makes concrete the abstract notion of string width. + * @param nWidth The resulting abbreviated string's width will be no larger than this. + * @param aString The string that is abbreviated. + * @returns an abbreviated string. + */ + abbreviateString(xStringWidth: XStringWidth, nWidth: number, aString: string): string; + } + + /** + * This interface is used to encode an arbitrary String into a escaped form. + * + * The escaped form is chosen to be suitable for use with other interfaces of the object or service providing this interface. + * + * Any characters or character sequences that are not compatible with any naming rules or restrictions must be replaced by an escaped form, that complies + * to these rules. + * + * The transformation should preserve all traits of the string that are generally respected by the service. For example, the case of a string may be lost + * after encoding and then decoding, if the service generally is case insensitive. + * + * Other than that the encoding is one-to-one and can be reversed. The encoding should try to preserve as much as possible of the original string, to + * keep human-readable input human-friendly where possible. Strings that already conform to the naming conventions should be left unchanged or minimally + * modified. + */ + interface XStringEscape extends uno.XInterface { + /** encodes an arbitrary string into an escaped form compatible with some naming rules. */ + escapeString(aString: string): string; + + /** decodes an escaped string into the original form. */ + unescapeString(aEscapedString: string): string; + } + + /** provides a mapping from `string` to `string` */ + interface XStringMapping extends uno.XInterface { + /** provides a mapping for a given sequence of strings to a sequence of belonging strings. */ + mapStrings(Parameter: [LibreOffice.SeqEquiv]): boolean; + } + + /** + * A common interface for substituting string variables with other strings. + * + * The substitution algorithm and the syntax for a string variable are not part of this interface definition. Please look at the documentation of the + * implementation that must specify these parameters. + * @since OOo 1.1.2 + */ + interface XStringSubstitution extends uno.XInterface { + /** + * Returns the current value of a variable. + * + * The method iterates through it's internal variable list and tries to find the given variable. If the variable is unknown a {@link + * com.sun.star.container.NoSuchElementException} is thrown. + * @param variable The name of a variable. + * @returns Returns a string that represents the variable. If the variable is unknown a {@link com.sun.star.container.NoSuchElementException} is thrown. + */ + getSubstituteVariableValue(variable: string): string; + + /** + * Tries to replace parts of aText with variables that represents these sub strings. + * + * The method iterates through it's internal variable list and tries to match parts of the given string Tries to replace parts of **aText** with + * variables that represents these sub strings.If more than one variable matches the one with the longest matching sub string will be chosen. + * @param aText A string where known substrings should be replaced by variables. + * @returns Returns the resubstituted string with variables for all parts that could be replaced. The unchanged argument will be returned if nothing can be r + */ + reSubstituteVariables(aText: string): string; + + /** + * Exchanges variables inside a given text with a substitution text defined for the variables. + * + * The method iterates through it's internal variables list to match the variables in the given string. A match replaces the variable with the string + * defined for this variable. If no variable can be found in the string it will be returned unchanged. The behavior if a variable is found in the string + * but it is unknown for the implementation depends on the parameter bSubstRequired. + * @param aText A string containing variables that should be substituted. + * @param bSubstRequired Specifies if a successful substitution is required. The function throws a {@link com.sun.star.container.NoSuchElementException} if + * @returns Returns a string based on **aText** where all variables were exchanged with their value defined at calling time. + */ + substituteVariables(aText: string, bSubstRequired: boolean): string; + } + + /** + * An interface that encapsulates the abstract notion of string width. + * @see XStringAbbreviation + */ + interface XStringWidth extends uno.XInterface { + /** + * compute the width of a given string. + * + * Depending on the implementation of this interface, the width of a string can be rather different things, like the number of characters in the string, + * or the width in pixel when displayed with a specific font. + * @param aString The string that is to be measured. + * @returns the string's width. + */ + queryStringWidth(aString: string): number; + } + + /** enables an object to search in its content. */ + interface XTextSearch extends uno.XInterface { + /** + * search backward in the searchStr, starts at startPos and ends by endpos. The endpos must be lower then the startpos, because the function searches + * backward! The result is returned in the {@link SearchResult} . + */ + searchBackward(searchStr: string, startPos: number, endPos: number): SearchResult; + + /** search forward in the searchStr, starts at startPos and ends by endpos. The result is returned in the {@link SearchResult} . */ + searchForward(searchStr: string, startPos: number, endPos: number): SearchResult; + + /** set the options for the forward or backward search. */ + setOptions(options: SearchOptions): void; + } + + /** enables an object to search in its content. */ + interface XTextSearch2 extends XTextSearch { + /** set the options for the forward or backward search. */ + setOptions2(options: SearchOptions2): void; + } + + /** + * provides timestamp information for an object in the form of an arbitrary string. + * + * The format and meaning of the timestamp depends on the implementation. Services implementing this interface must document the meaning and format they + * use. + * + * If the timestamp is unchanged between two calls, the associated object has not changed. Any properties beyond this, particularly the presence of a + * meaningful order between timestamps, depend on the implementation. + * @since OOo 1.1.2 + */ + interface XTimeStamped extends uno.XInterface { + /** + * returns the timestamp of the object. + * @returns a `string` that represents a timestamp. + */ + getTimestamp(): string; + + /** + * returns the timestamp of the object. + * @returns a `string` that represents a timestamp. + */ + readonly Timestamp: string; + } + + /** creates IDs which are unique within the container. */ + interface XUniqueIDFactory extends uno.XInterface { + createUniqueID(): string; + } + + /** is supported by objects with data that can be updated from a data source. */ + interface XUpdatable extends uno.XInterface { + /** refreshes the data of the object from the connected data source. */ + update(): void; + } + + /** + * This interface extends {@link XUpdatable} in order to provide more fine-tuned update modes. When performing a **soft** update, the implementor may + * decide not to update in certain cases, such as when the controller is locked. When performing a **hard** update, on the other hand, the implementor + * should perform update more aggressively even when the controller is locked. + */ + interface XUpdatable2 extends XUpdatable { + /** Perform update, even when the controller is locked. */ + updateHard(): void; + + /** Perform update, but update may not always be performed especially when the controller is locked. */ + updateSoft(): void; + } + + /** + * supports parsing and assembling of URLs + * @see URL + * @see URLTransformer + */ + interface XURLTransformer extends uno.XInterface { + /** + * assembles the parts of the {@link URL} specified by **aURL** and stores it into {@link URL.Complete} + * @param aURL the {@link URL} which contains alls necessary information in a structured form. The member {@link URL.Complete} contains the {@link URL} in + * @returns `TRUE` if assembling was successfully or `FALSE` otherwise. + */ + assemble(aURL: [URL]): boolean; + + /** + * returns a representation of the {@link URL} for UI purposes only + * + * Sometimes it can be useful to show an {@link URL} on an user interface in a more "human readable" form. Such {@link URL} can't be used on any API + * call, but make it easier for the user to understand it. + * @param aURL {@link URL} in structured form which should be shown at the UI + * @param bWithPassword specifies whether the password will be included in the encoding or not. Usually passwords should never be shown at the user interface. + * @returns a string representing the **aURL** if it is syntactically correct. A empty string if **aURL** is not syntactically correct. + */ + getPresentation(aURL: URL, bWithPassword: boolean): string; + + /** + * parses the string in {@link URL.Complete} , which may contain a syntactically complete {@link URL} or is specified by the provided protocol + * + * The implementation can use smart functions to correct or interpret {@link URL.Complete} if it is not a syntactically complete {@link URL} . The parts + * of the {@link URL} are stored in the other fields of **aURL** . + * @param aURL the {@link URL} which include the string notation and will contain all parsed parts of it after finishing this call. This includes {@link UR + * @param sSmartProtocol optional information which protocol specification should be used to parse {@link URL.Complete} . If empty the implementation can u + * @returns `TRUE` if parsing was successful (means if {@link URL.Complete} could be syntactically correct) or `FALSE` otherwise. + */ + parseSmart(aURL: [URL], sSmartProtocol: string): boolean; + + /** + * parses the string in {@link URL.Complete} which should contain a syntactically complete {@link URL} . + * + * The implementation is allowed to correct minor failures in {@link URL.Complete} if the meaning of the {@link URL} remain unchanged. Parts of the + * {@link URL} are stored in the other fields of **aURL** . + * @param aURL the {@link URL} which include the complete string notation and will contain all parsed parts of it after finishing this call. {@link URL.Com + * @returns `TRUE` if parsing was successfully (means if given {@link URL} was syntactically correct) or `FALSE` otherwise. + */ + parseStrict(aURL: [URL]): boolean; + } + + /** provides information about a veto which has been raised against an operation */ + interface XVeto { + /** + * provides additional details about the veto. + * + * The concrete semantics of this attribute is to be defined in the service implementing this interface. + */ + Details: any; + + /** describes the reason for the veto */ + Reason: string; + } + + namespace Endianness { + const enum Constants { + BIG = 1, + LITTLE = 0, + } + } + + namespace MeasureUnit { + const enum Constants { + APPFONT = 17, + CM = 3, + FOOT = 13, + INCH = 7, + INCH_1000TH = 4, + INCH_100TH = 5, + INCH_10TH = 6, + KM = 11, + M = 10, + MILE = 14, + MM = 2, + MM_100TH = 0, + MM_10TH = 1, + PERCENT = 15, + PICA = 12, + PIXEL = 16, + POINT = 8, + SYSFONT = 18, + TWIP = 9, + } + } + + namespace NumberFormat { + const enum Constants { + ALL = 0, + CURRENCY = 8, + DATE = 2, + DATETIME = 6, + DEFINED = 1, + EMPTY = 4096, + FRACTION = 64, + LOGICAL = 1024, + NUMBER = 16, + PERCENT = 128, + SCIENTIFIC = 32, + TEXT = 256, + TIME = 4, + UNDEFINED = 2048, + } + } + + namespace SearchAlgorithms2 { + const enum Constants { + ABSOLUTE = 1, + APPROXIMATE = 3, + REGEXP = 2, + WILDCARD = 4, + } + } + + namespace SearchFlags { + const enum Constants { + ALL_IGNORE_CASE = 1, + LEV_RELAXED = 65536, + NORM_WORD_ONLY = 16, + REG_EXTENDED = 256, + REG_NEWLINE = 1024, + REG_NOSUB = 512, + REG_NOT_BEGINOFLINE = 2048, + REG_NOT_ENDOFLINE = 4096, + WILD_MATCH_SELECTION = 1048576, + } + } + } + + namespace view { + /** specifies the format (size) of the paper on a text document. */ + const enum PaperFormat { + /** specifies the paper format as A3. */ + A3 = 0, + /** specifies the paper format as A4. */ + A4 = 1, + /** specifies the paper format as A5. */ + A5 = 2, + /** specifies the paper format as B4. */ + B4 = 3, + /** specifies the paper format as B5. */ + B5 = 4, + /** specifies the paper format as Legal. */ + LEGAL = 6, + /** specifies the paper format as Letter. */ + LETTER = 5, + /** specifies the paper format as Tabloid. */ + TABLOID = 7, + /** The real paper size is user defined in 100th mm. */ + USER = 8, + } + + /** specifies the orientation of the paper. */ + const enum PaperOrientation { + /** set the paper orientation to landscape. */ + LANDSCAPE = 1, + /** set the paper orientation to portrait. */ + PORTRAIT = 0, + } + + /** + * specifies the print progress of an {@link XPrintable} . + * + * Printing consists of two abstract phases: rendering the document for the printer and then sending it to the printer (spooling). PrintableState + * describes which phase is currently progressing or has failed. + * @see PrintableStateEvent + */ + const enum PrintableState { + /** printing was aborted (e.g., by the user) while either printing or spooling. */ + JOB_ABORTED = 3, + /** printing (rendering the document) has finished, spooling has begun */ + JOB_COMPLETED = 1, + /** printing ran into an error. */ + JOB_FAILED = 4, + /** spooling has finished successfully. This is the only state that can be considered as "success" for a print job. */ + JOB_SPOOLED = 2, + /** the document could be printed but not spooled. */ + JOB_SPOOLING_FAILED = 5, + /** printing (rendering the document) has begun */ + JOB_STARTED = 0, + } + + /** Specifies a selection type for a view that supports a selection model. */ + const enum SelectionType { + /** The selection can contain zero or more objects. */ + MULTI = 2, + /** + * No selection is possible. + * + * The selection is always empty. + */ + NONE = 0, + /** + * The selection can contain zero or more objects. + * + * all selected objects must be part of a continues range + */ + RANGE = 3, + /** The selection can only contain one or zero objects. */ + SINGLE = 1, + } + + /** specifies a view of a standard office document. */ + interface OfficeDocumentView extends XSelectionSupplier, XViewSettingsSupplier, XControlAccess { } + + /** + * specifies the print progress of an {@link XPrintable} . + * + * {@link com.sun.star.lang.EventObject.Source} contains the {@link XPrintable} having changed its state + * + * . + */ + interface PrintableStateEvent extends lang.EventObject { + State: PrintableState; + } + + /** + * describes a printer by specifying the queue name and some settings. + * + * This service may be represented by a {@link com.sun.star.beans.PropertyValue} []. + * @see com.sun.star.beans.PropertyValue + */ + interface PrinterDescriptor { + /** indicates, whether the printer allows changes to {@link PrinterDescriptor.PaperFormat} . */ + CanSetPaperFormat: boolean; + + /** indicates, whether the printer allows changes to {@link PrinterDescriptor.PaperOrientation} . */ + CanSetPaperOrientation: boolean; + + /** indicates if the printer allows changes to {@link PrinterDescriptor.PaperSize} . */ + CanSetPaperSize: boolean; + + /** indicates, whether the printer is busy or not. */ + IsBusy: boolean; + + /** + * specifies the name of the printer queue to be used. + * + * Which printer queues are available, can be figured out with the system library of the used programming language/environment. + */ + Name: string; + + /** + * specifies a predefined paper size or if the paper size is a user-defined size. + * + * Setting this property may change the value of {@link PrinterDescriptor.PaperSize} . + */ + PaperFormat: PaperFormat; + + /** specifies the orientation of the paper. */ + PaperOrientation: PaperOrientation; + + /** + * specifies the size of the paper in 100th mm. + * + * Setting this property may change the value of {@link PrinterDescriptor.PaperFormat} . + */ + PaperSize: awt.Size; + } + + /** + * specifies the print progress of an {@link XPrintJob} . + * + * {@link com.sun.star.lang.EventObject.Source} contains the {@link XPrintJob} having changed its state + * + * . + * @since OOo 1.1.2 + */ + interface PrintJobEvent extends lang.EventObject { + State: PrintableState; + } + + /** + * describes the options for print jobs. + * + * These options are only valid for a single print job. They do not change layout or formatting of the document. + */ + interface PrintOptions { + /** advises the printer to collate the pages of the copies. */ + Collate: boolean; + + /** specifies the number of copies to print. */ + CopyCount: number; + + /** + * determines the duplex mode for the print job. + * @see DuplexMode for more information about supported values + */ + DuplexMode: number; + + /** if set, specifies the name of a file to print to. */ + FileName: string; + + /** + * specifies which pages to print. + * + * This range is given as at the user interface. For example: "1-4;10" to print the pages 1 to 4 and 10. + */ + Pages: string; + + /** if set, specifies name of the printer to use. */ + PrinterName: string; + + /** + * advises the printer to sort the pages of the copies. + * @deprecated DeprecatedUse Collate instead. + */ + Sort: boolean; + + /** if set to TRUE, the corresponding {@link XPrintable.print()} request will be executed synchronous.

Default is the asynchronous print mode.

*/ + Wait: boolean; + } + + /** + * provides access to the settings for printing documents. + * + * These settings are printer independent but affect the rendering of the document. + */ + interface PrintSettings { + /** + * determines how annotations are printed. + * @see NotePrintMode + */ + PrintAnnotationMode: number; + + /** + * If `TRUE` , all characters are printed in black. + * + * It is useful for printing colored text on a b/w printer. + */ + PrintBlackFonts: boolean; + + /** If `TRUE` , control shapes are included in printing. */ + PrintControls: boolean; + + /** If `TRUE` , drawing objects (shapes) are included in printing. */ + PrintDrawings: boolean; + + /** If `TRUE` , graphic objects are included in printing. */ + PrintGraphics: boolean; + + /** If `TRUE` , left pages are included in printing. */ + PrintLeftPages: boolean; + + /** If `TRUE` , the background of the page is printed. */ + PrintPageBackground: boolean; + + /** If `TRUE` , the pages are printed in the order of prospects. */ + PrintProspect: boolean; + + /** + * If `TRUE` , the pages are printed in reverse order. + * + * The last page is printed first. + */ + PrintReversed: boolean; + + /** If `TRUE` , right pages are included in printing. */ + PrintRightPages: boolean; + + /** If `TRUE` , tables are included in printing. */ + PrintTables: boolean; + } + + /** + * describes the options for Render jobs. + * @since OOo 1.1.2 + */ + interface RenderDescriptor { + /** specifies the page size for the current renderer. The unit of this page size is 1/100th mm. */ + PageSize: awt.Size; + } + + /** + * describes the options for Render jobs. + * @since OOo 1.1.2 + */ + interface RenderOptions { + /** + * indicates that the current page is the first page to be exported. + * + * Hyperlinks, notes, and outlines cannot be exported on a per page base. They have to be exported once **before** the first page is exported. Therefore + * the IsFirstPage property has been introduced. It is evaluated in the render function and indicates that the current page is the first page to be + * exported. + * @see XRenderable + */ + IsFirstPage: boolean; + + /** + * indicates that the current page is the last page to be exported. + * + * Hyperlinks from the EditEngine have to be exported once **after** the last page has been processed. Therefore the IsLastPage property has been + * introduced. It is evaluated in the render function and indicates that the current page is the last page to be exported. + * @see XRenderable + */ + IsLastPage: boolean; + + /** + * specifies if empty pages should be skipped. + * + * Tells the PDF export to skip empty pages. This flag also has to be passed to the render function, in order to calculate to correct page numbers during + * the export of hyperlinks, notes, and outlines. + * @see XRenderable + */ + IsSkipEmptyPages: boolean; + + /** + * specifies the page ranges to be rendered. + * + * Tells the PDF export to skip empty pages. This flag also has to be passed to the render function, in order to calculate to correct page numbers during + * the export of hyperlinks, notes, and outlines. + * @see XRenderable + */ + PageRange: string; + + /** specifies the device the page should be rendered to */ + RenderDevice: awt.XDevice; + } + + /** provides access to the settings of the controller of an office document. */ + interface ViewSettings extends beans.XPropertySet { + /** If this property is `TRUE` , the horizontal ruler is displayed. */ + ShowHoriRuler: boolean; + + /** If this property is `TRUE` , the horizontal scroll bar is displayed. */ + ShowHoriScrollBar: boolean; + + /** If this property is `TRUE` , the vertical ruler is displayed. */ + ShowVertRuler: boolean; + + /** If this property is `TRUE` , the vertical scroll bar is displayed. */ + ShowVertScrollBar: boolean; + + /** specifies the zoom-value in percent. */ + ZoomValue: number; + } + + /** + * provides access to the controls in a view. + * @see com.sun.star.frame.XController + */ + interface XControlAccess extends uno.XInterface { + /** is called to get the control from the specified control model. */ + getControl(xModel: awt.XControlModel): awt.XControl; + } + + /** + * provides access to the form layer elements in a view + * @since OOo 2.3 + */ + interface XFormLayerAccess extends XControlAccess { + /** + * returns the {@link com.sun.star.form.FormController} instance which operates on a given form. + * + * A form controller is a component which controls the user interaction with the form layer, as long as the form is not in design mode. + * @returns the requested form controller, or `NULL` if the view's form layer is currently in design mode. Note that the returned instance becomes non-functi + * @see isDesignMode + * @see setDesignMode + * @see com.sun.star.form.runtime.FormController + * @see com.sun.star.form.runtime.FormOperations + */ + getFormController(Form: form.XForm): form.runtime.XFormController; + + /** + * determines whether the view's form layer is currently in design or alive mode + * + * **Note** : This is a convenience method. In the user interface, the design mode is coupled with the `.uno:SwitchControlDesignMode` feature (see {@link + * com.sun.star.frame.XDispatchProvider} ), and asking for the current mode is the same as asking for the state of this feature. + */ + isFormDesignMode(): boolean; + + /** + * determines whether the view's form layer is currently in design or alive mode + * + * **Note** : This is a convenience method. In the user interface, the design mode is coupled with the `.uno:SwitchControlDesignMode` feature (see {@link + * com.sun.star.frame.XDispatchProvider} ), and changing the current mode is the same as dispatching this feature URL. + */ + setFormDesignMode(DesignMode: boolean): void; + } + + /** + * makes it possible to move a cursor by lines within laid out text. + * @see com.sun.star.table.CellCursor + * @see com.sun.star.text.TextCursor + * @see com.sun.star.text.XTextViewCursor + */ + interface XLineCursor extends uno.XInterface { + /** + * moves the cursor to the end of the current line. + * @param bExpand determines whether the text range of the cursor is expanded ( `TRUE` ) or the cursor will be just at the new position after the move ( `F + */ + gotoEndOfLine(bExpand: boolean): void; + + /** + * moves the cursor to the start of the current line. + * @param bExpand determines whether the text range of the cursor is expanded ( `TRUE` ) or the cursor will be just at the new position after the move ( `F + */ + gotoStartOfLine(bExpand: boolean): void; + + /** determines if the cursor is positioned at the end of a line. */ + isAtEndOfLine(): boolean; + + /** determines if the cursor is positioned at the start of a line. */ + isAtStartOfLine(): boolean; + } + + /** + * makes it possible to append and remove objects from a selection. + * + * The method XSelectionSupplier::setSelection() for an instance that also supports {@link XMultiSelectionSupplier} should be implemented that it also + * takes either a selectable object or a sequence of selectable objects. + * + * Adding an object more than once to a selection should not toggle the selection for that object but only select it once + */ + interface XMultiSelectionSupplier extends XSelectionSupplier { + /** + * adds the object or the objects represented by **Selection** to the selection of this {@link XMultiSelectionSupplier} . + * @param Selection either an Object that is selectable or a sequence of objects that are selectable. + * @returns `TRUE` /, if **Selection** was added to the current selection. `FALSE` , if **Selection** or parts of **Selection** could not be added to the cur + * @throws com::sun::star::lang::IllegalArgumentException If **Selection** is not a selectable object for this {@link XMultiSelectionSupplier} . Adding an o + */ + addSelection(Selection: any): boolean; + + /** clears the selection of this {@link XMultiSelectionSupplier} . */ + clearSelection(): void; + + /** @returns a new object to enumerate the selection of this {@link XMultiSelectionSupplier} in reverse order. If the order of the selected objects It returns */ + createReverseSelectionEnumeration(): container.XEnumeration; + + /** @returns a new object to enumerate the selection of this {@link XMultiSelectionSupplier} . It returns NULL if there are no objects in the selection. */ + createSelectionEnumeration(): container.XEnumeration; + + /** returns the number of selected objects of this {@link XMultiSelectionSupplier} . */ + getSelectionCount(): number; + + /** + * remove the object or objects represented by **Selection** from the selection of this {@link XMultiSelectionSupplier} . + * @param Selection either an Object that is selectable or a sequence of objects that are selectable. + * @returns `TRUE` /, if **Selection** was added to the current selection. `FALSE` , if **Selection** or parts of **Selection** could not be added to the cur + * @throws com::sun::star::lang::IllegalArgumentException If **Selection** is not a selectable object for this {@link XMultiSelectionSupplier} . Removing an + */ + removeSelection(Selection: any): void; + + /** returns the number of selected objects of this {@link XMultiSelectionSupplier} . */ + readonly SelectionCount: number; + } + + /** offers printing functionality. */ + interface XPrintable extends uno.XInterface { + /** + * @returns a descriptor of the current printer. The attributes of the current printer are used for formatting. + * @see PrinterDescriptor + */ + getPrinter(): SafeArray; + + /** + * prints the object. + * @param xOptions specifies the number of copies and some other values which do not affect formatting. + * @see PrintOptions + */ + print(xOptions: LibreOffice.SeqEquiv): void; + + /** + * @returns a descriptor of the current printer. The attributes of the current printer are used for formatting. + * @see PrinterDescriptor + */ + Printer: SafeArray; + + /** + * assigns a new printer to the object. + * + * Setting a new printer will cause reformatting. + * @see PrinterDescriptor + */ + setPrinter(aPrinter: LibreOffice.SeqEquiv): void; + } + + /** + * allows for getting information about a print job. + * + * {@link XPrintableBroadcaster} can be implemented by classes which implement {@link XPrintable} . It allows a {@link XPrintableListener} to be + * registered, thus a client object will learn about the print progress. + * @see XPrintableListener + */ + interface XPrintableBroadcaster extends uno.XInterface { + /** adds an {@link XPrintableListener} to be notified about print progress. */ + addPrintableListener(xListener: XPrintableListener): void; + + /** removes an {@link XPrintableListener} . */ + removePrintableListener(xListener: XPrintableListener): void; + } + + /** + * receives events about print job progress. + * + * {@link XPrintableListener} can be registered to {@link XPrintableBroadcaster} . Then, the client object will receive events about print progress. + * @see XPrintableBroadcaster + */ + interface XPrintableListener extends lang.XEventListener { + /** + * informs the user of the new state in print progress. + * @param Event contains the {@link XPrintable} having changed state and the new state. + */ + stateChanged(Event: PrintableStateEvent): void; + } + + /** + * allows for getting information about a print job. + * + * {@link XPrintJob} is implemented by print jobs that are created by classes that implement {@link XPrintable} . It gives information about the context + * of the print job. + * @see XPrintJobListener + * @since OOo 1.1.2 + */ + interface XPrintJob extends uno.XInterface { + cancelJob(): void; + + /** returns the printed object used for the print job */ + getPrintable(): XPrintable; + + /** returns the Printer used for the print job */ + getPrinter(): SafeArray; + + /** returns the {@link PrintOptions} used for the print job */ + getPrintOptions(): SafeArray; + + /** returns the printed object used for the print job */ + readonly Printable: XPrintable; + + /** returns the Printer used for the print job */ + readonly Printer: SafeArray; + + /** returns the {@link PrintOptions} used for the print job */ + readonly PrintOptions: SafeArray; + } + + /** + * allows for getting information about a print job. + * + * {@link XPrintJobBroadcaster} can be implemented by classes which implement {@link XPrintable} . It allows a {@link XPrintJobListener} to be + * registered, thus a client object will learn about the print progress. + * @see XPrintJobListener + * @since OOo 1.1.2 + */ + interface XPrintJobBroadcaster extends uno.XInterface { + /** adds an {@link XPrintJobListener} to be notified about print progress. */ + addPrintJobListener(xListener: XPrintJobListener): void; + + /** removes an {@link XPrintJobListener} . */ + removePrintJobListener(xListener: XPrintJobListener): void; + } + + /** + * receives events about print job progress. + * + * {@link XPrintJobListener} can be registered to {@link XPrintJobBroadcaster} . Then, the client object will be notified when a new print job starts or + * its state changes. + * @see XPrintJobBroadcaster + * @see XPrintJob + * @since OOo 1.1.2 + */ + interface XPrintJobListener extends lang.XEventListener { + /** + * informs the user about the creation or the progress of a PrintJob + * @param Event contains the {@link XPrintJob} having changed state and the new state. + */ + printJobEvent(Event: PrintJobEvent): void; + } + + /** offers printing related settings, which affect document rendering, but are not related to the printer itself. */ + interface XPrintSettingsSupplier extends uno.XInterface { + /** + * @returns a set of properties which are related to printing. + * @see PrintSettings + */ + getPrintSettings(): beans.XPropertySet; + + /** + * @returns a set of properties which are related to printing. + * @see PrintSettings + */ + readonly PrintSettings: beans.XPropertySet; + } + + /** + * represents something that can be rendered. + * @since OOo 1.1.2 + */ + interface XRenderable extends uno.XInterface { + /** + * @returns a descriptor of the specific renderer. returns the specific renderer properties based on the given selection. If the selection contains a valid + * @see RenderDescriptor + * @see RenderOptions + */ + getRenderer(nRenderer: number, aSelection: any, xOptions: LibreOffice.SeqEquiv): SafeArray; + + /** + * @returns the count of renderers (based on paper count of a document, for example). If a selection is given, the count has to be calculated based on this + * @see RenderOptions + */ + getRendererCount(aSelection: any, xOptions: LibreOffice.SeqEquiv): number; + + /** + * renders the object. + * + * renders the object with the specific renderer based on the given selection. + * + * If the selection contains a valid XModel interface, it is assumed that the whole document should be rendered. If the selection is empty, nothing + * should be rendered. + * @see RenderOptions + */ + render(nRenderer: number, aSelection: any, xOptions: LibreOffice.SeqEquiv): void; + } + + /** makes it possible to page through the document in steps of the displayed size. */ + interface XScreenCursor extends uno.XInterface { + /** scrolls the view forward by one visible page. */ + screenDown(): boolean; + + /** scrolls the view backward by one visible page. */ + screenUp(): boolean; + } + + /** + * makes it possible to receive an event when the current selection changes. + * @see com.sun.star.view.XSelectionSupplier + */ + interface XSelectionChangeListener extends lang.XEventListener { + /** + * is called when the selection changes. + * + * You can get the new selection via {@link XSelectionSupplier} from {@link com.sun.star.lang.EventObject.Source} . + */ + selectionChanged(aEvent: lang.EventObject): void; + } + + /** + * makes it possible to access and change the selection in a view. + * @see OfficeDocumentView + */ + interface XSelectionSupplier extends uno.XInterface { + /** registers an event listener, which is called when the selection changes. */ + addSelectionChangeListener(xListener: XSelectionChangeListener): void; + + /** @returns the current selection. The selection is either specified by an object which is contained in the component to which the view belongs, or it is an */ + getSelection(): any; + + /** unregisters an event listener which was registered with {@link XSelectionSupplier.addSelectionChangeListener()} . */ + removeSelectionChangeListener(xListener: XSelectionChangeListener): void; + + /** selects the object represented by **xSelection** if it is known and selectable in this object. */ + select(xSelection: any): boolean; + + /** @returns the current selection. The selection is either specified by an object which is contained in the component to which the view belongs, or it is an */ + readonly Selection: any; + } + + /** + * makes it possible to move a cursor up/down/left/right within laid out text. + * @see com.sun.star.table.CellCursor + * @see com.sun.star.text.TextCursor + * @see com.sun.star.view.XLineCursor + */ + interface XViewCursor extends uno.XInterface { + /** + * moves the cursor the specified number of lines down. + * @param nCount specifies the number of lines to go down. + * @param bExpand determines whether the text range of the cursor is expanded ( `TRUE` ) or the cursor will be just at the new position after the move ( `F + * @returns `TRUE` if the cursor was moved, or `FALSE` if it was already in the bottom row. + */ + goDown(nCount: number, bExpand: boolean): boolean; + + /** + * moves the cursor the specified number of characters to the left. + * @param nCount specifies the number of characters to move. + * @param bExpand determines whether the text range of the cursor is expanded ( `TRUE` ) + * @returns `TRUE` if the cursor was moved, or `FALSE` if it was already at the leftmost position. + */ + goLeft(nCount: number, bExpand: boolean): boolean; + + /** + * moves the cursor the specified number of characters to the right. + * @param nCount specifies the number of characters to move. + * @param bExpand determines whether the text range of the cursor is expanded ( `TRUE` ) + * @returns `TRUE` if the cursor was moved, or `FALSE` if it was already at the rightmost position. + */ + goRight(nCount: number, bExpand: boolean): boolean; + + /** + * moves the cursor the specified number of lines up. + * @param nCount specifies the number of lines to go up. + * @param bExpand determines whether the text range of the cursor is expanded ( `TRUE` ) + * @returns `TRUE` if the cursor was moved, or `FALSE` if it was already in the top row. + */ + goUp(nCount: number, bExpand: boolean): boolean; + } + + /** provides access to the view settings of the object. */ + interface XViewSettingsSupplier extends uno.XInterface { + /** @returns an interface to the {@link ViewSettings} . Subclasses might be returned instead, offering more settings. */ + getViewSettings(): beans.XPropertySet; + + /** @returns an interface to the {@link ViewSettings} . Subclasses might be returned instead, offering more settings. */ + readonly ViewSettings: beans.XPropertySet; + } + + namespace DocumentZoomType { + const enum Constants { + BY_VALUE = 3, + ENTIRE_PAGE = 2, + OPTIMAL = 0, + PAGE_WIDTH = 1, + PAGE_WIDTH_EXACT = 4, + } + } + + namespace DuplexMode { + const enum Constants { + LONGEDGE = 2, + OFF = 1, + SHORTEDGE = 3, + UNKNOWN = 0, + } + } + } + + namespace xforms { + /** + * thrown if the user triggers an {@link XForms} submission with invalid instance data + * + * The com::sun::star::uno::Exception::Source member refers to the submission which was invoked. + */ + type InvalidDataOnSubmitException = util.VetoException; + + /** @since LibreOffice 4.1 */ + type Model = XModel2; + + /** @since LibreOffice 4.1 */ + type XForms = container.XNameContainer; + + /** represent a binding to one or more nodes in the DOM tree of an {@link XModel} . */ + interface Binding extends form.binding.ValueBinding, util.XModifyBroadcaster, form.binding.ListEntrySource, form.validation.XValidator { + /** + * among other properties, there is this one + * + * It is unclear to me whether this is an implementation detail or a supported interface. + * + * The value supports the service {@link com.sun.star.xml.NamespaceContainer} + * @see com.sun.star.xml.NamespaceContainer + */ + BindingNamespaces: container.XNameContainer; + } + + /** + * specifies a repository of XSD data types + * + * The elements of the repository are instances supporting the {@link com.sun.star.xsd.XDataType} interface. + */ + interface XDataTypeRepository extends container.XEnumerationAccess, container.XNameAccess { + /** + * creates a clone of the given data type, and inserts it into the repository + * @throws com::sun::star::container::NoSuchElementException if the given name does not refer to a type in the repository + * @throws com::sun::star::container::ElementExistException if the new name is already used in the repository + */ + cloneDataType(sourceName: string, newName: string): xsd.XDataType; + + /** + * retrieves the basic type for the given type class + * @see com.sun.star.xsd.DataTypeClass + * @throws com::sun::star::container::NoSuchElementException if in the repository, there is no data type with the given class + */ + getBasicDataType(dataTypeClass: number): xsd.XDataType; + getDataType(typeName: string): xsd.XDataType; + + /** + * removes a data type given by name from the repository + * @see com.sun.star.xsd.XDataType + * @throws com::sun::star::container::NoSuchElementException if the given name does not refer to a type in the repository + * @throws com::sun::star::util::VetoException if the specified data type is a built-in (basic) data type, and cannot be removed + */ + revokeDataType(typeName: string): void; + } + + interface XFormsEvent extends xml.dom.events.XEvent { + initXFormsEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void; + } + + /** provides access to the {@link XForms} models contained in the component */ + interface XFormsSupplier extends uno.XInterface { + /** + * access {@link XForms} model container. + * @returns a container for the {@link XForms} models contained in the component + */ + getXForms(): container.XNameContainer; + + /** + * access {@link XForms} model container. + * @returns a container for the {@link XForms} models contained in the component + */ + readonly XForms: container.XNameContainer; + } + + /** + * provide several helper methods for the UI + * + * **This interfaces is for UI use only, and will likely be unsupported in future versions.** + */ + interface XFormsUIHelper1 { + cloneBindingAsGhost(binding: beans.XPropertySet): beans.XPropertySet; + createAttribute(xParent: xml.dom.XNode, sName: string): xml.dom.XNode; + createElement(xParent: xml.dom.XNode, sName: string): xml.dom.XNode; + getBindingForNode(xNode: xml.dom.XNode, bCreate: boolean): beans.XPropertySet; + getBindingName(xBinding: beans.XPropertySet, bDetail: boolean): string; + getDefaultBindingExpressionForNode(xNode: xml.dom.XNode): string; + getDefaultServiceNameForNode(xNode: xml.dom.XNode): string; + getNodeDisplayName(xNode: xml.dom.XNode, bDetail: boolean): string; + getNodeName(xNode: xml.dom.XNode): string; + getResultForExpression(xBinding: beans.XPropertySet, bIsBindingExpression: boolean, sExpression: string): string; + getSubmissionName(xSubm: beans.XPropertySet, bDetail: boolean): string; + isValidPrefixName(sName: string): boolean; + isValidXMLName(sName: string): boolean; + newInstance(sName: string, sURL: string, bURLOnce: boolean): xml.dom.XDocument; + newModel(xModel: frame.XModel, sName: string): XModel; + removeBindingForNode(xNode: xml.dom.XNode): void; + removeBindingIfUseless(xBinding: beans.XPropertySet): void; + removeInstance(sName: string): void; + removeModel(xModel: frame.XModel, sName: string): void; + renameInstance(sFrom: string, sTo: string, sURL: string, bURLOnce: boolean): void; + renameModel(xModel: frame.XModel, sFrom: string, sTo: string): void; + renameNode(xNode: xml.dom.XNode, sName: string): xml.dom.XNode; + setNodeValue(xNode: xml.dom.XNode, sValue: string): void; + } + + /** represent an {@link XForms} model */ + interface XModel { + /** get a container containing all bindings; also supports XNameAccess */ + readonly Bindings: container.XSet; + + /** + * clone an arbitrary binding element for this model; still needs + * + * The returned binding still needs to be inserted into the bindings container. + * @see getBindings + */ + cloneBinding(binding: beans.XPropertySet): beans.XPropertySet; + + /** + * clone an arbitrary submission element for this model + * + * The returned submission element still needs to be inserted into the submission container. + * @see getSubmissions + */ + cloneSubmission(submission: beans.XPropertySet): XSubmission; + + /** + * create a binding element for this model + * + * The returned binding still needs to be inserted into the bindings container. + * @see getBindings + */ + createBinding(): beans.XPropertySet; + + /** + * create a submission element for this model + * + * The returned submission element still needs to be inserted into the submission container. + * @see getSubmissions + */ + createSubmission(): XSubmission; + + /** provides management access to the XSD data types associated with the model */ + readonly DataTypeRepository: XDataTypeRepository; + + /** get the default instance for this model */ + readonly DefaultInstance: xml.dom.XDocument; + + /** + * get a binding with a certain ID + * + * This is a convenience method: the same result can also be obtained through {@link getBindings()} + */ + getBinding(id: string): beans.XPropertySet; + + /** get a container containing all bindings; also supports XNameAccess */ + getBindings(): container.XSet; + + /** provides management access to the XSD data types associated with the model */ + getDataTypeRepository(): XDataTypeRepository; + + /** get the default instance for this model */ + getDefaultInstance(): xml.dom.XDocument; + + /** get the {@link XForms} model ID */ + getID(): string; + + /** retrieves the instance with the given id */ + getInstanceDocument(id: string): xml.dom.XDocument; + + /** + * gets container containing all instances; + * + * The elements of the set are arrays of {@link com.sun.star.beans.PropertyValues} , containing the ID, the URL, and the instance itself. + */ + getInstances(): container.XSet; + + /** + * get a submission with a certain ID. + * + * This is a convenience method: the same result can also be obtained through {@link getSubmissions()} . + */ + getSubmission(id: string): XSubmission; + + /** get container containing all submissions; also supports XNameAccess */ + getSubmissions(): container.XSet; + + /** get the {@link XForms} model ID */ + ID: string; + + /** initialize the model */ + initialize(): void; + + /** + * gets container containing all instances; + * + * The elements of the set are arrays of {@link com.sun.star.beans.PropertyValues} , containing the ID, the URL, and the instance itself. + */ + readonly Instances: container.XSet; + + /** rebuild the model */ + rebuild(): void; + + /** re-evaluate all calculate attributes */ + recalculate(): void; + + /** refresh the model */ + refresh(): void; + + /** re-evaluate all validity attributes */ + revalidate(): void; + + /** set the {@link XForms} model ID */ + setID(id: string): void; + + /** get container containing all submissions; also supports XNameAccess */ + readonly Submissions: container.XSet; + + /** + * submit form through given submission id + * + * This is a convenience method. Calling it is equivalent to calling `getSubmission()( id ).submit()` . + * @param id the ID of the submission to execute + * @throws com::sun::star::util::VetoException when the current model state does not allow a submission. Usually, this indicates that consistency criteria f + * @throws com::sun::star::lang::WrappedTargetException when another error occurred during the submission. The {@link com.sun.star.lang.WrappedTargetExcepti + */ + submit(id: string): void; + + /** + * submit form through given submission id + * + * This is a convenience method. Calling it is equivalent to calling `getSubmission()( id, handler ).submit()` . + * @param id the ID of the submission to execute + * @param aHandler This handler allows additional user interaction, which may be necessary before the submission can be performed. + * @throws com::sun::star::util::VetoException when the current model state does not allow a submission. Usually, this indicates that consistency criteria f + * @throws com::sun::star::lang::WrappedTargetException when another error occurred during the submission. The {@link com.sun.star.lang.WrappedTargetExcepti + */ + submitWithInteraction(id: string, aHandler: task.XInteractionHandler): void; + } + + /** @since LibreOffice 4.1 */ + interface XModel2 extends XModel, beans.XPropertySet { } + + /** specifies a submission object, associated with an {@link XModel} */ + interface XSubmission extends beans.XPropertySet, container.XNamed, form.submission.XSubmission { } + } + + namespace xml { + /** + * This service describes a container for XML attributes. + * + * Each attribute is accessed with its local name, or optionally, its local name with its namespace prefix. The type and value of an attribute is stored + * in a `AttributeData` struct. If you use a namespace in the `AttributeData` , you must use a prefix in the name and you must use a namespace, if you + * use a prefix. + */ + type AttributeContainer = container.XNameContainer; + + /** + * describes an import filter for XML-based file formats. + * @since OOo 1.1.2 + */ + type ImportFilter = XImportFilter; + + /** + * This service describes a container for XML namespaces. + * + * Each namespace is accessed with its prefix and the URL is stored as a string. + * @see com.sun.star.xforms.Binding + */ + type NamespaceContainer = container.XNameContainer; + + /** + * describes an export filter for XML-based file formats. + * + * It is an extension of {@link com.sun.star.document.ExportFilter} and differs from it only in that an {@link com.sun.star.xml.sax.XDocumentHandler} + * needs to be passed through the XInitialization interface. This XDocumentHandler will then be used to export the XML data stream. + */ + type XMLExportFilter = document.ExportFilter; + + /** A struct to keep information of an element's attribute. */ + interface Attribute { + /** the attribute name */ + Name: string; + + /** the attribute namespace URL */ + NamespaceURL: string; + + /** the attribute value */ + Value: string; + } + + /** store the type and value of an XML attribute inside a XNameContainer */ + interface AttributeData { + /** + * the namespace of this XML attribute. + * + * This string can be empty if you are not using namespaces. + */ + Namespace: string; + + /** + * the type of this XML attribute. + * + * For non validating parsers this must be CDATA. + */ + Type: string; + + /** the string value of this XML attribute. */ + Value: string; + } + + /** + * describes an export filter for XML-based file formats. + * + * First, the {@link XExportFilter.exporter()} method must be called to provide the export component with the target location to which the data should be + * exported. Then, the source document's XML representation will be generated by calling the appropriate methods of the {@link + * com.sun.star.xml.sax.XDocumentHandler} interface. Error conditions must be signaled by throwing a {@link com.sun.star.xml.sax.SAXException} in the + * {@link com.sun.star.xml.sax.XDocumentHandler} calls. + * @since OOo 1.1.2 + */ + interface ExportFilter extends sax.XDocumentHandler, XExportFilter { } + + /** A struct to keep information of an element's attribute. */ + interface FastAttribute { + /** the token corresponding to the attribute */ + Token: number; + + /** the attribute value */ + Value: string; + } + + /** + * A component that supports this service preserves XML attributes, unknown by its parser, that belong to the XML element representing it (the + * component). + * @since OOo 2.0.4 + */ + interface ParaUserDefinedAttributesSupplier { + /** + * This container holds the {@link AttributeData} elements that represent uninterpreted XML attributes of a paragraph. + * + * The idea behind this property is that a parser can stow away all attributes that it cannot handle by itself on reading an XML file. When the file is + * stored again, the unknown attributes can be written back without loss. + * + * The {@link com.sun.star.container.XNameContainer} supports the service {@link AttributeContainer} . + */ + ParaUserDefinedAttributes: container.XNameContainer; + } + + /** + * A component that supports this service preserves XML attributes, unknown by its parser, that belong to the XML element representing it (the + * component). + * @since OOo 2.0.4 + */ + interface TextUserDefinedAttributesSupplier { + /** + * This container holds the {@link AttributeData} elements that represent uninterpreted XML attributes of a text. + * + * The idea behind this property is that a parser can stow away all attributes that it cannot handle by itself on reading an XML file. When the file is + * stored again, the unknown attributes can be written back without loss. + * + * The {@link com.sun.star.container.XNameContainer} supports the service {@link AttributeContainer} . + */ + TextUserDefinedAttributes: container.XNameContainer; + } + + /** + * A component that supports this service preserves XML attributes, unknown by its parser, that belong to the XML element representing it (the + * component). + * @since OOo 2.0.4 + */ + interface UserDefinedAttributesSupplier { + /** + * This container holds the {@link AttributeData} elements that represent uninterpreted XML attributes. + * + * The idea behind this property is that a parser can stow away all attributes that it cannot handle by itself on reading an XML file. When the file is + * stored again, the unknown attributes can be written back without loss. + * + * The {@link com.sun.star.container.XNameContainer} supports the service {@link AttributeContainer} . + */ + UserDefinedAttributes: container.XNameContainer; + } + + /** + * interface to implement for an XML-based import filter. i + * @since OOo 1.1.2 + */ + interface XExportFilter extends uno.XInterface { + /** + * performs the import. + * + * The source data (location indicated by **aSourceData** ), and the XML representation of the document must be generated by calls to xocHandler (???) + * methods. + * @param aSourceData {@link com.sun.star.document.MediaDescriptor} which defines the data source + * @param msUserData Sequence of strings which contains the user data defined in the TypeDetection.xml (???) + * @returns `TRUE` if import process is successful + */ + exporter(aSourceData: LibreOffice.SeqEquiv, msUserData: LibreOffice.SeqEquiv): boolean; + } + + /** + * interface to implement for an XML-based import filter. + * @since OOo 1.1.2 + */ + interface XImportFilter extends uno.XInterface { + /** + * performs the import. + * + * The source data (location indicated by **aSourceData** ), and the XML representation of the document must be generated by calls to xocHandler (???) + * methods. + * @param aSourceData {@link com.sun.star.document.MediaDescriptor} which defines the data source + * @param msUserData Sequence of strings which contains the user data defined in the TypeDetection.xml + * @param xDocHandler target for the XML document representation + * @returns `TRUE` if import process is successful + */ + importer(aSourceData: LibreOffice.SeqEquiv, xDocHandler: sax.XDocumentHandler, msUserData: LibreOffice.SeqEquiv): boolean; + } + + /** + * describes an import filter for XML-based file formats. + * + * It is an extension of {@link com.sun.star.document.ImportFilter} and differs from it in that this filter additionally supports the {@link + * com.sun.star.xml.sax.XDocumentHandler} interface. + */ + interface XMLImportFilter extends document.ImportFilter, sax.XDocumentHandler { } + + namespace crypto { + /** @since LibreOffice 4.0 */ + type NSSInitializer = XNSSInitializer; + + /** Service of {@link XSecurityEnvironment} */ + type SecurityEnvironment = XSecurityEnvironment; + + /** Service of {@link SEInitializer} */ + type SEInitializer = XSEInitializer; + + type XMLEncryptionException = security.EncryptionException; + + /** Service of {@link XMLEncryptionTemplate} */ + type XMLEncryptionTemplate = XXMLEncryptionTemplate; + + /** Service of {@link XMLSecurityContext} */ + type XMLSecurityContext = XXMLSecurityContext; + + type XMLSignatureException = security.SignatureException; + + /** Service of {@link XMLSignatureTemplate} */ + type XMLSignatureTemplate = XXMLSignatureTemplate; + + /** Defines results for security operation. */ + const enum SecurityOperationStatus { + ASSERTION = 49, + CERT_HAS_EXPIRED = 46, + CERT_ISSUER_FAILED = 44, + CERT_NOT_FOUND = 42, + CERT_NOT_YET_VALID = 45, + CERT_REVOKED = 43, + CERT_VERIFY_FAILED = 41, + CRYPTO_FAILED = 6, + DATA_NOT_MATCH = 19, + DISABLED = 10, + DSIG_INVALID_REFERENCE = 48, + DSIG_NO_REFERENCES = 47, + /** + * The following constants are derived from XMLSec error definitions, as following: + * + * XMLSEC_ERRORS_R_XMLSEC_FAILED XMLSEC_ERRORS_R_MALLOC_FAILED XMLSEC_ERRORS_R_STRDUP_FAILED XMLSEC_ERRORS_R_CRYPTO_FAILED XMLSEC_ERRORS_R_XML_FAILED + * XMLSEC_ERRORS_R_XSLT_FAILED XMLSEC_ERRORS_R_IO_FAILED XMLSEC_ERRORS_R_DISABLED XMLSEC_ERRORS_R_NOT_IMPLEMENTED XMLSEC_ERRORS_R_INVALID_SIZE + * XMLSEC_ERRORS_R_INVALID_DATA XMLSEC_ERRORS_R_INVALID_RESULT XMLSEC_ERRORS_R_INVALID_TYPE XMLSEC_ERRORS_R_INVALID_OPERATION + * XMLSEC_ERRORS_R_INVALID_STATUS XMLSEC_ERRORS_R_INVALID_FORMAT XMLSEC_ERRORS_R_DATA_NOT_MATCH XMLSEC_ERRORS_R_INVALID_NODE + * XMLSEC_ERRORS_R_INVALID_NODE_CONTENT XMLSEC_ERRORS_R_INVALID_NODE_ATTRIBUTE XMLSEC_ERRORS_R_MISSING_NODE_ATTRIBUTE + * XMLSEC_ERRORS_R_NODE_ALREADY_PRESENT XMLSEC_ERRORS_R_UNEXPECTED_NODE XMLSEC_ERRORS_R_NODE_NOT_FOUND XMLSEC_ERRORS_R_INVALID_TRANSFORM + * XMLSEC_ERRORS_R_INVALID_TRANSFORM_KEY XMLSEC_ERRORS_R_INVALID_URI_TYPE XMLSEC_ERRORS_R_TRANSFORM_SAME_DOCUMENT_REQUIRED + * XMLSEC_ERRORS_R_TRANSFORM_DISABLED XMLSEC_ERRORS_R_INVALID_KEY_DATA XMLSEC_ERRORS_R_KEY_DATA_NOT_FOUND XMLSEC_ERRORS_R_KEY_DATA_ALREADY_EXIST + * XMLSEC_ERRORS_R_INVALID_KEY_DATA_SIZE XMLSEC_ERRORS_R_KEY_NOT_FOUND XMLSEC_ERRORS_R_KEYDATA_DISABLED XMLSEC_ERRORS_R_MAX_RETRIEVALS_LEVEL + * XMLSEC_ERRORS_R_MAX_RETRIEVAL_TYPE_MISMATCH XMLSEC_ERRORS_R_MAX_ENCKEY_LEVEL XMLSEC_ERRORS_R_CERT_VERIFY_FAILED XMLSEC_ERRORS_R_CERT_NOT_FOUND + * XMLSEC_ERRORS_R_CERT_REVOKED XMLSEC_ERRORS_R_CERT_ISSUER_FAILED XMLSEC_ERRORS_R_CERT_NOT_YET_VALID XMLSEC_ERRORS_R_CERT_HAS_EXPIRED + * XMLSEC_ERRORS_R_DSIG_NO_REFERENCES XMLSEC_ERRORS_R_DSIG_INVALID_REFERENCE XMLSEC_ERRORS_R_ASSERTION XMLSEC_ERRORS_MAX_NUMBER + */ + ENGINE_FAILED = 3, + INVALID_DATA = 13, + INVALID_FORMAT = 18, + INVALID_KEY_DATA = 32, + INVALID_KEY_DATA_SIZE = 35, + INVALID_NODE = 20, + INVALID_NODE_ATTRIBUTE = 22, + INVALID_NODE_CONTENT = 21, + INVALID_OPERATION = 16, + INVALID_RESULT = 14, + INVALID_SIZE = 12, + INVALID_STATUS = 17, + INVALID_TRANSFORM = 27, + INVALID_TRANSFORM_KEY = 28, + INVALID_TYPE = 15, + INVALID_URI_TYPE = 29, + IO_FAILED = 9, + KEY_DATA_ALREADY_EXIST = 34, + KEY_DATA_NOT_FOUND = 33, + KEY_NOT_FOUND = 36, + KEYDATA_DISABLED = 37, + MALLOC_FAILED = 4, + MAX_ENCKEY_LEVEL = 40, + MAX_RETRIEVAL_TYPE_MISMATCH = 39, + MAX_RETRIEVALS_LEVEL = 38, + MISSING_NODE_ATTRIBUTE = 23, + NODE_ALREADY_PRESENT = 24, + NODE_NOT_FOUND = 26, + NOT_IMPLEMENTED = 11, + OPERATION_SUCCEEDED = 1, + RUNTIMEERROR_FAILED = 2, + STRDUP_FAILED = 5, + TRANSFORM_DISABLED = 31, + TRANSFORM_SAME_DOCUMENT_REQUIRED = 30, + UNEXPECTED_NODE = 25, + UNKNOWN = 0, + XML_FAILED = 7, + XSLT_FAILED = 8, + } + + /** + * This interface allows to encrypt/decrypt data using the cipher context. + * + * The algorithm as well as encryption data are specified on object creation. + * @see XCipherContextSupplier + * @since OOo 3.4 + */ + interface XCipherContext extends uno.XInterface { + /** + * encrypts/decrypts the data using the cipher. + * + * Please have in mind, the cipher object state might depend from the already encrypted/decrypted data ( it depends from the used algorithm ). + * + * Whether the object does encryption or decryption is specified by creation of the object. + * @param aData data that should be encrypted/decrypted + */ + convertWithCipherContext(aData: LibreOffice.SeqEquiv): SafeArray; + + /** finalizes cipher and disposes context. */ + finalizeCipherContextAndDispose(): SafeArray; + } + + /** + * This interface allows to get an object that allows to encrypt/decrypt data using the specified algorithm. + * @since OOo 3.4 + */ + interface XCipherContextSupplier extends uno.XInterface { + /** + * returns an object that allows to encrypt/decrypt data. + * @param nCipherID the internal ID specifying the algorithm, should take value from {@link CipherID} + * @param aKey the key that should be used for the encryption + * @param aInitializationVector the initialization vector that should be used for the encryption + * @param bEncryption whether an encryption or decryption cipher should be created `TRUE` - Encryption `FALSE` - Decryption + * @param aParams optional parameters that could be used to initialize the cipher, + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + */ + getCipherContext( + nCipherID: number, aKey: LibreOffice.SeqEquiv, aInitializationVector: LibreOffice.SeqEquiv, bEncryption: boolean, + aParams: LibreOffice.SeqEquiv): XCipherContext; + } + + /** + * This interface allows to generate the digest. + * + * The algorithm to generate the digest is specified on object creation. + * @see XDigestContextSupplier + * @since OOo 3.4 + */ + interface XDigestContext extends uno.XInterface { + /** finalizes digest and disposes context. */ + finalizeDigestAndDispose(): SafeArray; + + /** + * update the digest with the given data. + * @param aData data that should be used to update the digest + */ + updateDigest(aData: LibreOffice.SeqEquiv): void; + } + + /** + * This interface allows to get an object to generate a digest of a specified format. + * @since OOo 3.4 + */ + interface XDigestContextSupplier extends uno.XInterface { + /** + * returns an object that allows to generate the specified digest. + * @param nDigestID the internal ID specifying the algorithm, should take value from {@link DigestID} + * @param aParams optional parameters that could be used to initialize the digest, for example, it could contain a key and etc. + * @throws com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal + */ + getDigestContext(nDigestID: number, aParams: LibreOffice.SeqEquiv): XDigestContext; + } + + /** Service of {@link XMLEncryption} */ + interface XMLEncryption extends XXMLEncryption, lang.XInitialization { } + + /** Service of {@link XMLSignature} */ + interface XMLSignature extends XXMLSignature, lang.XInitialization { } + + /** @since LibreOffice 4.0 */ + interface XNSSInitializer extends XDigestContextSupplier, XCipherContextSupplier { } + + /** Interface of Security Environment */ + interface XSecurityEnvironment extends uno.XInterface { + /** build certificate path from a certain certificate */ + buildCertificatePath(beginCert: security.XCertificate): SafeArray; + + /** Create certificate interface from a Base64 encoded certificate. */ + createCertificateFromAscii(asciiCertificate: string): security.XCertificate; + + /** Create certificate interface from raw DER encoded certificate */ + createCertificateFromRaw(rawCertificate: LibreOffice.SeqEquiv): security.XCertificate; + + /** Get certificate from the environment by issuer name and serial number */ + getCertificate(issuerName: string, serialNumber: LibreOffice.SeqEquiv): security.XCertificate; + + /** + * Get a certificate characters. + * + * The method provides a way to get certificate characters like: 1. Whether or not the certificate have a private key in the user profile. 2. Whether or + * not the certificate is a trusted certificate. 3. Whether or not the certificate is a self-signed certificate. + * + * The certificate characters is defined as bit-wise long, please refer to CertificateCharacters definition. + */ + getCertificateCharacters(xCertificate: security.XCertificate): number; + + /** Get personal certificate from the environment */ + getPersonalCertificates(): SafeArray; + + /** Get the Environment detail infos */ + getSecurityEnvironmentInformation(): string; + + /** Get personal certificate from the environment */ + readonly PersonalCertificates: SafeArray; + + /** Get the Environment detail infos */ + readonly SecurityEnvironmentInformation: string; + + /** + * Verify a certificate. + * + * The method provides a way to verify a certificate. + * @param xEECertificate The certificate which is to be validated. + * @param intermediateCertificates Additional certificates which can be used by the method in constructing the certificate chain. The root certificate may + * @returns The validation status will returned as a bit-wise long, please refer to CertificateValidity definition. + */ + verifyCertificate(xEECertificate: security.XCertificate, intermediateCertificates: LibreOffice.SeqEquiv): number; + } + + /** Interface to manipulate Security Environment */ + interface XSEInitializer extends uno.XInterface { + /** + * Creates a security context. + * @param aString reserved for internal use. + * @returns the security context created + */ + createSecurityContext(aString: string): XXMLSecurityContext; + + /** + * Frees a security context. + * @param securityContext the security context to be freed + */ + freeSecurityContext(securityContext: XXMLSecurityContext): void; + } + + /** + * Interface of Uri Binding. + * + * This interface is used to dynamically bind a uri with a XInputStream interface. + */ + interface XUriBinding extends uno.XInterface { + /** + * Gets the XInputStream interface for a uri. + * @param uri the uri whose binding is to get + * @returns the XInputStream bound with the uri + */ + getUriBinding(uri: string): io.XInputStream; + + /** + * Sets the XInputStream interface for a uri. + * @param uri the uri to bind + * @param InputStream the XInputStream to be bound + */ + setUriBinding(uri: string, InputStream: io.XInputStream): void; + } + + /** + * Interface of XML encryption + * + * This interface represents a XML encryptor or decryptor. + * + * The encryptor or decryptor concrete a key by retrieve security context and encryption template. + * + * In some cases, the encryptor or decryptor can determine and locate the EncryptedKey from the encryption template by dereference the RetrievalMethod + * inside EncryptedData. + * + * In some cases, the EncryptedKey need to be clearly pointed out by the encryption template. + */ + interface XXMLEncryption extends uno.XInterface { + /** Perform decryption in the environment of encryption template and context. */ + decrypt(aTemplate: XXMLEncryptionTemplate, aContext: XXMLSecurityContext): XXMLEncryptionTemplate; + + /** Perform encryption in the environment of encryption template and context. */ + encrypt(aTemplate: XXMLEncryptionTemplate, aEnvironment: XSecurityEnvironment): XXMLEncryptionTemplate; + } + + /** + * Interface of XML encryption template + * + * This interface represents a encryption template, which is the same as the desired XML encryption element[ EncryptedType ] but some of the nodes may be + * empty. The empty entities include CipherValue, which is a subset of EncryptedData or EncryptedKey. Empty entities are not allowed in a encryption + * template when performing decryption. + * + * In some cases, the encryptor or decryptor can determine and locate the EncryptedKey from the encryption template by dereference the RetrievalMethod + * inside EncryptedData. + * + * In some cases, the EncryptedKey need to be clearly pointed out by the encryption template. + * + * With the help of encryption context, the encryptor or decryptor specifies the key from the KeyInfo in the encryption template. + * + * It isn't a good method to set the EncryptedKey here. In general, there is a RetrievalMethod in EncryptedData by which we can get the EncryptedKey. + * + * And some times, in the low level, it is hard to determine what the key is except that the high level application tell the mechanism and parameters. + * + * So I think it will be more simple that the application set the encrypted key information. In this case, the application only need to know the XML + * schema or DTD and the encryption device. If so, the high level application takes the action of build the EncryptedKey template and references it in + * the element of EncryptedData. And in this case, the calling to set up EncryptedKey template and target is not necessary, because the encryptor or + * decryptor can determine and locate the EncryptedKey from the encryption template of EncryptedData by dereference the RetrievalMethod. + * + * In some situation, the high level applications do not want to know anything about crypto devices( May be he must, because the lower level do not know + * what the key is ). If it gives the key value, it can get EncryptedKey by setting the key template and key value target. + */ + interface XXMLEncryptionTemplate extends XXMLSecurityTemplate { + /** Get the target XML element, i.e. the element to be encrypted */ + getTarget(): wrapper.XXMLElementWrapper; + + /** Get the target XML element, i.e. the element to be encrypted */ + readonly Target: wrapper.XXMLElementWrapper; + } + + /** + * Interface of XML security context + * + * This interface specifies a certain signature context. By signature context, the signer or verifier retrieves key specification. + */ + interface XXMLSecurityContext extends uno.XInterface { + /** Add personal security environment , and return the index of the added environment. */ + addSecurityEnvironment(aSecurityEnvironment: XSecurityEnvironment): number; + + /** Get the ID of the internal security environment */ + DefaultSecurityEnvironmentIndex: number; + + /** Get the ID of the internal security environment */ + getDefaultSecurityEnvironmentIndex(): number; + + /** An handy method to get the first personal security environment. In XMLSec/NSS, the first personal security environment should be the "internal slot" */ + getSecurityEnvironment(): XSecurityEnvironment; + + /** Get personal security environment */ + getSecurityEnvironmentByIndex(index: number): XSecurityEnvironment; + + /** Get the number of security environments */ + getSecurityEnvironmentNumber(): number; + + /** An handy method to get the first personal security environment. In XMLSec/NSS, the first personal security environment should be the "internal slot" */ + readonly SecurityEnvironment: XSecurityEnvironment; + + /** Get the number of security environments */ + readonly SecurityEnvironmentNumber: number; + + /** set the ID of the internal security environment */ + setDefaultSecurityEnvironmentIndex(index: number): void; + } + + /** + * Interface of the XML security template + * + * This interface represents a security template, which is the super interface of the {@link XXMLSignatureTemplate} interface and the {@link + * XXMLEncryptionTemplate} interface. + */ + interface XXMLSecurityTemplate extends uno.XInterface { + /** Get the template status */ + getStatus(): SecurityOperationStatus; + + /** Get the XML signature element that represents the signature template */ + getTemplate(): wrapper.XXMLElementWrapper; + + /** Set the template status */ + setStatus(status: SecurityOperationStatus): void; + + /** Load the target XML element, i.e. the element to be signed */ + setTarget(aXmlElement: wrapper.XXMLElementWrapper): void; + + /** Load a XML signature template from XML signature element */ + setTemplate(aXmlElement: wrapper.XXMLElementWrapper): void; + + /** Get the template status */ + Status: SecurityOperationStatus; + + /** Get the XML signature element that represents the signature template */ + Template: wrapper.XXMLElementWrapper; + } + + /** + * Interface of XML signature + * + * This interface represents a XML signer or verifier. + * + * The signer or verifier concrete a key by retrieve signature context and signature template. + * + * In some cases, the signer or verifier can determine and locate the contents to be signed from the signature template by dereference the URI. + * + * In some cases, the contents to be signed need to be clearly pointed out by the signature template. + */ + interface XXMLSignature extends uno.XInterface { + /** Perform signature in the environment of signature template and context. */ + generate(aTemplate: XXMLSignatureTemplate, aEnvironment: XSecurityEnvironment): XXMLSignatureTemplate; + + /** Perform validation in the environment of signature template and context. */ + validate(aTemplate: XXMLSignatureTemplate, aContext: XXMLSecurityContext): XXMLSignatureTemplate; + } + + /** + * Interface of XML signature template + * + * This interface represents a signature template, which is the same as the desired XML signature element but some of the nodes may be empty. The empty + * entities include digest value and signature value. Empty entities are not allowed in a signature template when performing validation. + * + * In some cases, the signer or verifier can determine and locate the contents to be signed from the template by dereference the URI. + * + * With the help of signature context, the signer or verifier specifies the key from the KeyInfo in the signature template. + * + * Owner: Andrew Fan + */ + interface XXMLSignatureTemplate extends XXMLSecurityTemplate { + /** Get the dynamic URI binding */ + Binding: XUriBinding; + + /** Get the dynamic URI binding */ + getBinding(): XUriBinding; + + /** Get the target XML element, i.e. the element to be signed */ + getTargets(): SafeArray; + + /** Set the dynamic URI binding */ + setBinding(aUriBinding: XUriBinding): void; + + /** Get the target XML element, i.e. the element to be signed */ + readonly Targets: SafeArray; + } + + namespace CipherID { + const enum Constants { + AES_CBC_W3C_PADDING = 1, + BLOWFISH_CFB_8 = 2, + } + } + + namespace DigestID { + const enum Constants { + SHA1 = 1, + SHA1_1K = 3, + SHA256 = 2, + SHA256_1K = 4, + } + } + + namespace sax { + /** + * Defines priority for the element mark's notification. + * + * The PRI_MINIMUM priority is a value less than any practical priority value, it is used when compare between different priority values. + * + * The PRI_AFTERMODIFY priority represents the notification will be sent after any internal modification has finished. + * + * The PRI_BEFOREMODIFY proirity represents the notification will be sent before any internal modification happens. + * + * So an element mark with PRI_BEFOREMODIFY will be handled first, and one with PRI_AFTERMODIFY will be handled at last. + */ + const enum ElementMarkPriority { + AFTERMODIFY = 2, + BEFOREMODIFY = 3, + MINIMUM = 1, + } + + /** + * Defines types of element mark. + * + * the TYPEOFELEMENTMARK type represents a blocker, and the TYPEOFELEMENTCOLLECTOR type represents a element collector. + */ + const enum ElementMarkType { + ELEMENTCOLLECTOR = 2, + ELEMENTMARK = 1, + } + + /** Service of {@link Decryptor} */ + interface Decryptor extends XReferenceResolvedListener, XBlockerMonitor, XDecryptionResultBroadcaster, XKeyCollector, XMissionTaker, lang.XInitialization { } + + /** A struct to keep a startElement/endElement SAX event. */ + interface ElementStackItem { + /** the name of the element */ + elementName: string; + + /** whether it is a startElement event */ + isStartElementEvent: boolean; + + /** attribute list for a startElement event */ + xAttributes: com.sun.star.xml.sax.XAttributeList; + } + + /** Service of {@link Encryptor} */ + interface Encryptor extends XReferenceResolvedListener, XReferenceCollector, XBlockerMonitor, XEncryptionResultBroadcaster, XKeyCollector, XMissionTaker, + lang.XInitialization { } + + /** Service of {@link SAXEventKeeper} */ + interface SAXEventKeeper extends XSecuritySAXEventKeeper, XReferenceResolvedBroadcaster, XSAXEventKeeperStatusChangeBroadcaster, + com.sun.star.xml.sax.XDocumentHandler, lang.XInitialization { } + + interface SignatureCreator extends XReferenceResolvedListener, XReferenceCollector, XSignatureCreationResultBroadcaster, XBlockerMonitor, XKeyCollector, + XMissionTaker, XUriBinding, lang.XInitialization { } + + /** Service of {@link SignatureVerifier} */ + interface SignatureVerifier extends XReferenceResolvedListener, XReferenceCollector, XSignatureVerifyResultBroadcaster, XKeyCollector, XMissionTaker, + XUriBinding, lang.XInitialization { } + + /** + * Interface of Blocker Monitor. + * + * This interface is used to manipulate a blocker. + */ + interface XBlockerMonitor extends uno.XInterface { + /** + * Configures the blocker's id. + * @param id the keeper id of the blocker + */ + setBlockerId(id: number): void; + } + + /** + * Interface of Decryption Result Broadcaster. + * + * This interface is used to manipulate decryption result listener. + */ + interface XDecryptionResultBroadcaster extends uno.XInterface { + /** + * Adds a new decryption result listener. + * + * When the decryption is finished, the result information will be sent to this listener. + * @param listener the listener to be added + */ + addDecryptionResultListener(listener: XDecryptionResultListener): void; + + /** + * Removes a decryption result listener. + * + * After a listener is removed, no result information will be sent to it. + * @param listener the listener to be removed + */ + removeDecryptionResultListener(listener: XDecryptionResultListener): void; + } + + /** + * Interface of Decryption Result Listener. + * + * This interface is used to receive the result information of a decryption operation. + */ + interface XDecryptionResultListener extends uno.XInterface { + /** + * Notifies the decryption result. + * @param securityId the security id of the encryption to be decrypted + * @param decryptionResult the result information + */ + decrypted(securityId: number, decryptionResult: SecurityOperationStatus): void; + } + + /** Manipulate the "key SAX events" in a SAX event stream. */ + interface XElementStackKeeper extends uno.XInterface { + /** + * Transfers the buffered key SAX events to a document handler. + * + * All transferred events are removed from the buffer. + * @param handler the document to receive key SAX events + * @param includingTheLastEvent whether to transfer the last key SAX event + */ + retrieve(handler: com.sun.star.xml.sax.XDocumentHandler, includingTheLastEvent: boolean): void; + + /** Starts to buffer key SAX events. */ + start(): void; + + /** Stops buffering key SAX events. */ + stop(): void; + } + + /** + * Interface of Encryption Result Broadcaster. + * + * This interface is used to manipulate encryption result listener. + */ + interface XEncryptionResultBroadcaster extends uno.XInterface { + /** + * Adds a new encryption result listener. + * + * When the encryption is finished, the result information will be sent to this listener. + * @param listener the listener to be added + */ + addEncryptionResultListener(listener: XEncryptionResultListener): void; + + /** + * Removes an encryption result listener. + * + * After a listener is removed, no result information will be sent to it. + * @param listener the listener to be removed + */ + removeEncryptionResultListener(listener: XEncryptionResultListener): void; + } + + /** + * Interface of Encryption Result Listener. + * + * This interface is used to receive the result information of an encryption operation. + */ + interface XEncryptionResultListener extends uno.XInterface { + /** + * Notifies the encryption result. + * @param securityId the security id of the encryption + * @param encryptionResult the result information + */ + encrypted(securityId: number, encryptionResult: SecurityOperationStatus): void; + } + + /** + * Interface of Key Collector. + * + * This interface is used to manipulate key materials. + */ + interface XKeyCollector extends uno.XInterface { + /** + * Set the keeper id of the key element. + * @param id the keeper id of the key element. If the id is 0, then it represents that this security entity has included its key material internally. + */ + setKeyId(id: number): void; + } + + /** + * Interface of Mission Taker. + * + * This interface is used to control a mission. + */ + interface XMissionTaker extends uno.XInterface { + /** + * Forces a mission to make an end. + * @returns `TRUE` if the mission is completed successfully, `FALSE` otherwise. + */ + endMission(): boolean; + } + + /** + * Interface of Signature Collector. + * + * This interface is used to control collecting a signature. + */ + interface XReferenceCollector extends uno.XInterface { + /** + * Sets the reference count of the signature. + * @param count the reference count of the signature + */ + setReferenceCount(count: number): void; + + /** + * Set the keeper id of the element collector of the referenced element. + * @param id the keeper id of the element collector, which is collecting a referenced element + */ + setReferenceId(id: number): void; + } + + /** + * Interface of Reference Resolved Broadcaster. + * + * This interface is used to manipulate reference resolved listener. + */ + interface XReferenceResolvedBroadcaster extends uno.XInterface { + /** + * Adds a new reference resolved listener for a element collector. + * + * When the element collector has completely collected that element, this listener will receive a notification. + * @param referenceId the id of the element collector for which the new listener is added + * @param listener the listener to be added + */ + addReferenceResolvedListener(referenceId: number, listener: XReferenceResolvedListener): void; + + /** + * Removes a listener from a element collector. + * + * When a listener is removed, it will not receive notification when collection completes. + * @param referenceId the id of the element collector from which the listener is removed + * @param listener the listener to be removed + */ + removeReferenceResolvedListener(referenceId: number, listener: XReferenceResolvedListener): void; + } + + /** + * Interface of Reference Resolved Listener. + * + * This interface is used to receive the collection completion notification for a element collector. + */ + interface XReferenceResolvedListener extends uno.XInterface { + /** + * Notifies an element has been collected by an element collector. + * @param referenceId the id of the element collector + */ + referenceResolved(referenceId: number): void; + } + + /** + * Interface of SAX Event Keeper. + * + * This interface is used to manipulate element marks in a SAX event stream. + * + * There are two kinds of element mark, one is element collector, which is used to collect a particular element from the SAX event stream; the other is + * blocker, which is used to block the SAX event stream. + */ + interface XSAXEventKeeper extends uno.XInterface { + /** + * Adds a new blocker on the next element in the SAX event stream. + * + * No SAX event starting from the next element will be forwarded until this blocker is removed. + * @returns the keeper id of the new blocker + */ + addBlocker(): number; + + /** + * Adds a new element collector on the next element in the SAX event stream. + * @returns the keeper id of the new element collector + */ + addElementCollector(): number; + + /** + * Gets the element which current blocking happens. + * + * This element is the working element of the first blocker in tree order. + * @returns the current blocking element + */ + readonly CurrentBlockingNode: wrapper.XXMLElementWrapper; + + /** + * Gets the element which current blocking happens. + * + * This element is the working element of the first blocker in tree order. + * @returns the current blocking element + */ + getCurrentBlockingNode(): wrapper.XXMLElementWrapper; + + /** + * Gets the element of an element mark. + * @param id the keeper id of the element mark, it can be a element collector or a blocker + */ + getElement(id: number): wrapper.XXMLElementWrapper; + + /** + * Checks whether the SAX event stream is blocking. + * @returns `true` if blocking, `false` otherwise + */ + isBlocking(): boolean; + + /** + * Prints information about all buffered elements. + * @returns a tree-style string including all buffer information + */ + printBufferNodeTree(): string; + + /** + * Removes a blocker + * @param id the keeper id of the blocker to be removed + */ + removeBlocker(id: number): void; + + /** + * Removes an element collector. + * @param id the keeper id of the element collector to be removed + */ + removeElementCollector(id: number): void; + + /** + * Sets the element of an element mark. + * + * When an element is replaced outside of this interface, then uses this method can restore the link between an element mark and its working element. + * @param id the keeper id of the element mark to be set + * @param aElement the new element for this element mark. + */ + setElement(id: number, aElement: wrapper.XXMLElementWrapper): void; + + /** + * Sets the next document handler in the SAX chain. + * + * This handler will receive SAX events forwarded by the {@link SAXEventKeeper} . + * @param nextHandler the next handler in the SAX chain + * @returns the old next handler + */ + setNextHandler(nextHandler: com.sun.star.xml.sax.XDocumentHandler): com.sun.star.xml.sax.XDocumentHandler; + } + + /** + * Interface of {@link SAXEventKeeper} Status Change Broadcaster. + * + * This interface is used to manipulate {@link SAXEventKeeper} status change listener. + */ + interface XSAXEventKeeperStatusChangeBroadcaster extends uno.XInterface { + /** + * Adds a new status change listener. + * + * When the {@link SAXEventKeeper} 's status changes, the listener will receive a notification. + * @param listener the listener to be added + */ + addSAXEventKeeperStatusChangeListener(listener: XSAXEventKeeperStatusChangeListener): void; + + /** + * Removes a status change listener. + * + * After a listener is removed, no status change notification will be sent to it. + * @param listener the listener to be removed + */ + removeSAXEventKeeperStatusChangeListener(listener: XSAXEventKeeperStatusChangeListener): void; + } + + /** + * Interface of {@link SAXEventKeeper} Status Change Listener. + * + * This interface is used to receive the {@link SAXEventKeeper} status change notification. + */ + interface XSAXEventKeeperStatusChangeListener extends uno.XInterface { + /** + * Notifies the {@link SAXEventKeeper} is entering/leaving blocking state. + * @param isBlocking `true` if the {@link SAXEventKeeper} is entering blocking state, `false` otherwise + */ + blockingStatusChanged(isBlocking: boolean): void; + + /** + * Notifies the {@link SAXEventKeeper} 's buffer is empty/not empty + * @param isBufferEmpty `true` if the {@link SAXEventKeeper} has no buffer at all; `false` otherwise. + */ + bufferStatusChanged(isBufferEmpty: boolean): void; + + /** + * Notifies the {@link SAXEventKeeper} is entering/leaving collecting state. + * @param isInsideCollectedElement `true` if the {@link SAXEventKeeper} is collecting some element, `false` otherwise + */ + collectionStatusChanged(isInsideCollectedElement: boolean): void; + } + + /** + * Interface of Security SAX Event Keeper. + * + * This interface is an extension of the {@link XSAXEventKeeper} interface, some security related features are added. + */ + interface XSecuritySAXEventKeeper extends XSAXEventKeeper { + /** + * Adds a new element collector on the next element in the SAX event stream. + * @param priority the priority of the element collector. See ConstOfPriority + * @param modifyElement a flag representing whether the element collector will modify the content of its element after notification + * @returns the keeper id of the new element collector + */ + addSecurityElementCollector(priority: ElementMarkPriority, modifyElement: boolean): number; + + /** + * Sets security id for an element mark. + * @param id the keeper id of the element collector to be set + * @param securityId the security id to be set + */ + setSecurityId(id: number, securityId: number): void; + } + + /** + * Interface of Signature Creation Result Broadcaster. + * + * This interface is used to manipulate signature creation result listener. + */ + interface XSignatureCreationResultBroadcaster extends uno.XInterface { + /** + * Adds a new signature creation result listener. + * + * When the signature is created, the result information will be sent to this listener. + * @param listener the listener to be added + */ + addSignatureCreationResultListener(listener: XSignatureCreationResultListener): void; + + /** + * Removes a signature creation result listener. + * + * After a listener is removed, no result information will be sent to it. + * @param listener the listener to be removed + */ + removeSignatureCreationResultListener(listener: XSignatureCreationResultListener): void; + } + + /** + * Interface of Signature Creation Result Listener. + * + * This interface is used to receive the result information of a signature creation. + */ + interface XSignatureCreationResultListener extends uno.XInterface { + /** + * Notifies the signature creation result. + * @param securityId the security id of the signature + * @param creationResult the result information + */ + signatureCreated(securityId: number, creationResult: SecurityOperationStatus): void; + } + + /** + * Interface of Signature Verify Result Broadcaster. + * + * This interface is used to manipulate signature verify result listener. + */ + interface XSignatureVerifyResultBroadcaster extends uno.XInterface { + /** + * Adds a new signature verify result listener. + * + * When the signature is verified, the result information will be sent to this listener. + * @param listener the listener to be added + */ + addSignatureVerifyResultListener(listener: XSignatureVerifyResultListener): void; + + /** + * Removes a signature verify result listener. + * + * After a listener is removed, no result information will be sent to it. + * @param listener the listener to be removed + */ + removeSignatureVerifyResultListener(listener: XSignatureVerifyResultListener): void; + } + + /** + * Interface of Signature Verify Result Listener. + * + * This interface is used to receive the result information of a signature verification. + */ + interface XSignatureVerifyResultListener extends uno.XInterface { + /** + * Notifies the signature verify result. + * @param securityId the security id of the signature + * @param verifyResult the result information + */ + signatureVerified(securityId: number, verifyResult: SecurityOperationStatus): void; + } + + namespace ConstOfSecurityId { + const enum Constants { + UNDEFINEDSECURITYID = -1, + } + } + } + } + + namespace csax { + /** + * A compressed XDocumentHandler interface. + * + * All methods in this interface have the same function with methods in the XDocumentHandler interface. + * + * Because there is no interface parameter in these methods, so using this interface to transfer SAX event is thought to have better performance than + * using the XDocumentHandler interface, in case of when UNO C++/Java bridge is involved. + */ + interface XCompressedDocumentHandler extends uno.XInterface { + compressedCharacters(aChars: string): void; + compressedEndDocument(): void; + compressedEndElement(aName: string): void; + compressedIgnorableWhitespace(aWhitespaces: string): void; + compressedProcessingInstruction(aTarget: string, aData: string): void; + compressedSetDocumentLocator(columnNumber: number, lineNumber: number, publicId: string, systemId: string): void; + compressedStartDocument(): void; + compressedStartElement(aName: string, aAttributes: LibreOffice.SeqEquiv): void; + } + + /** A struct to keep information of an element's attribute. */ + interface XMLAttribute { + /** the attribute name */ + sName: string; + + /** the attribute value */ + sValue: string; + } + } + + namespace dom { + type DocumentBuilder = XDocumentBuilder; + + type SAXDocumentBuilder = XSAXDocumentBuilder2; + + type XCDATASection = XText; + + type XComment = XCharacterData; + + type XDocumentFragment = XNode; + + type XEntityReference = XNode; + + const enum DOMExceptionType { + DOMSTRING_SIZE_ERR = 0, + HIERARCHY_REQUEST_ERR = 1, + INDEX_SIZE_ERR = 2, + INUSE_ATTRIBUTE_ERR = 3, + INVALID_ACCESS_ERR = 4, + INVALID_CHARACTER_ERR = 5, + INVALID_MODIFICATION_ERR = 6, + INVALID_STATE_ERR = 7, + NAMESPACE_ERR = 8, + NO_DATA_ALLOWED_ERR = 9, + NO_MODIFICATION_ALLOWED_ERR = 10, + NOT_FOUND_ERR = 11, + NOT_SUPPORTED_ERR = 12, + SYNTAX_ERR = 13, + WRONG_DOCUMENT_ERR = 14, + } + + const enum NodeType { + ATTRIBUTE_NODE = 0, + CDATA_SECTION_NODE = 1, + COMMENT_NODE = 2, + DOCUMENT_FRAGMENT_NODE = 3, + DOCUMENT_NODE = 4, + DOCUMENT_TYPE_NODE = 5, + ELEMENT_NODE = 6, + ENTITY_NODE = 7, + ENTITY_REFERENCE_NODE = 8, + NOTATION_NODE = 9, + PROCESSING_INSTRUCTION_NODE = 10, + TEXT_NODE = 11, + } + + const enum SAXDocumentBuilderState { + BUILDING_DOCUMENT = 1, + BUILDING_FRAGMENT = 2, + DOCUMENT_FINISHED = 3, + FRAGMENT_FINISHED = 4, + READY = 0, + } + + /** encapsulates the details of an XML parse error or warning. */ + interface DOMException extends uno.Exception { + Code: DOMExceptionType; + } + + interface XAttr extends XNode { + /** Returns the name of this attribute. */ + getName(): string; + + /** The Element node this attribute is attached to or null if this attribute is not in use. */ + getOwnerElement(): XElement; + + /** If this attribute was explicitly given a value in the original document, this is true; otherwise, it is false. */ + getSpecified(): boolean; + + /** On retrieval, the value of the attribute is returned as a string. */ + getValue(): string; + + /** Returns the name of this attribute. */ + readonly Name: string; + + /** The Element node this attribute is attached to or null if this attribute is not in use. */ + readonly OwnerElement: XElement; + + /** Sets the value of the attribute from a string. Throws: {@link DOMException} - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. */ + setValue(value: string): void; + + /** If this attribute was explicitly given a value in the original document, this is true; otherwise, it is false. */ + readonly Specified: boolean; + + /** On retrieval, the value of the attribute is returned as a string. */ + Value: string; + } + + interface XCharacterData extends XNode { + /** + * Append the string to the end of the character data of the node. Throws: {@link DOMException} - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is + * readonly. + */ + appendData(arg: string): void; + + /** + * Return the character data of the node that implements this interface. Throws: {@link DOMException} - NO_MODIFICATION_ALLOWED_ERR: Raised when the node + * is readonly. {@link DOMException} - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the + * implementation platform. + */ + Data: string; + + /** + * Remove a range of 16-bit units from the node. Throws: {@link DOMException} - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater + * than the number of 16-bit units in data, or if the specified count is negative. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + deleteData(offset: number, count: number): void; + + /** + * Return the character data of the node that implements this interface. Throws: {@link DOMException} - NO_MODIFICATION_ALLOWED_ERR: Raised when the node + * is readonly. {@link DOMException} - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the + * implementation platform. + */ + getData(): string; + + /** The number of 16-bit units that are available through data and the substringData method below. */ + getLength(): number; + + /** + * Insert a string at the specified 16-bit unit offset. Throws: {@link DOMException} - INDEX_SIZE_ERR: Raised if the specified offset is negative or + * greater than the number of 16-bit units in data. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + insertData(offset: number, arg: string): void; + + /** The number of 16-bit units that are available through data and the substringData method below. */ + readonly Length: number; + + /** + * Replace the characters starting at the specified 16-bit unit offset with the specified string. Throws; {@link DOMException} - INDEX_SIZE_ERR: Raised + * if the specified offset is negative or greater than the number of 16-bit units in data, or if the specified count is negative. + * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + replaceData(offset: number, count: number, arg: string): void; + + /** + * Set the character data of the node that implements this interface. Throws: {@link DOMException} - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is + * readonly. {@link DOMException} - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the + * implementation platform. + */ + setData(data: string): void; + + /** + * Extracts a range of data from the node. Throws: {@link DOMException} - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the + * number of 16-bit units in data, or if the specified count is negative. DOMSTRING_SIZE_ERR: Raised if the specified range of text does not fit into a + * DOMString. + */ + subStringData(offset: number, count: number): string; + } + + interface XDocument extends XNode { + /** Creates an Attr of the given name. Throws: {@link DOMException} - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. */ + createAttribute(name: string): XAttr; + + /** + * Creates an attribute of the given qualified name and namespace URI. Throws: {@link DOMException} - INVALID_CHARACTER_ERR: Raised if the specified + * qualified name contains an illegal character, per the XML 1.0 specification . NAMESPACE_ERR: Raised if the qualifiedName is malformed per the + * Namespaces in XML specification, if the qualifiedName has a prefix and the namespaceURI is null, if the qualifiedName has a prefix that is "xml" and + * the namespaceURI is different from " http://www.w3.org/XML/1998/namespace", or if the qualifiedName, or its prefix, is "xmlns" and the namespaceURI is + * different from " http://www.w3.org/2000/xmlns/". NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since + * namespaces were defined by XML. + */ + createAttributeNS(namespaceURI: string, qualifiedName: string): XAttr; + + /** + * Creates a CDATASection node whose value is the specified string. Throws: {@link DOMException} - NOT_SUPPORTED_ERR: Raised if this document is an HTML + * document. + */ + createCDATASection(data: string): XCDATASection; + + /** Creates a Comment node given the specified string. */ + createComment(data: string): XComment; + + /** Creates an empty DocumentFragment object. */ + createDocumentFragment(): XDocumentFragment; + + /** + * Creates an element of the type specified. Throws: {@link DOMException} - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal + * character. + */ + createElement(tagName: string): XElement; + + /** + * Creates an element of the given qualified name and namespace URI. Throws: {@link DOMException} - INVALID_CHARACTER_ERR: Raised if the specified + * qualified name contains an illegal character, per the XML 1.0 specification . NAMESPACE_ERR: Raised if the qualifiedName is malformed per the + * Namespaces in XML specification, if the qualifiedName has a prefix and the namespaceURI is null, or if the qualifiedName has a prefix that is "xml" + * and the namespaceURI is different from " http://www.w3.org/XML/1998/namespace" . NOT_SUPPORTED_ERR: Always thrown if the current document does not + * support the "XML" feature, since namespaces were defined by XML. + */ + createElementNS(namespaceURI: string, qualifiedName: string): XElement; + + /** + * Throws: {@link DOMException} - NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported. Creates an EntityReference object. + * Throws: {@link DOMException} - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. NOT_SUPPORTED_ERR: Raised if this + * document is an HTML document. + */ + createEntityReference(name: string): XEntityReference; + + /** + * Creates a ProcessingInstruction node given the specified name and data strings. Throws: {@link DOMException} - INVALID_CHARACTER_ERR: Raised if the + * specified target contains an illegal character. NOT_SUPPORTED_ERR: Raised if this document is an HTML document. + */ + createProcessingInstruction(target: string, data: string): XProcessingInstruction; + + /** Creates a Text node given the specified string. */ + createTextNode(data: string): XText; + + /** The Document Type Declaration (see DocumentType) associated with this document. */ + readonly Doctype: XDocumentType; + + /** This is a convenience attribute that allows direct access to the child node that is the root element of the document. */ + readonly DocumentElement: XElement; + + /** The Document Type Declaration (see DocumentType) associated with this document. */ + getDoctype(): XDocumentType; + + /** This is a convenience attribute that allows direct access to the child node that is the root element of the document. */ + getDocumentElement(): XElement; + + /** Returns the Element whose ID is given by elementId. */ + getElementById(elementId: string): XElement; + + /** Returns a NodeList of all the Elements with a given tag name in the order in which they are encountered in a preorder traversal of the Document tree. */ + getElementsByTagName(tagname: string): XNodeList; + + /** + * Returns a NodeList of all the Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of + * the Document tree. + */ + getElementsByTagNameNS(namespaceURI: string, localName: string): XNodeList; + + /** The DOMImplementation object that handles this document. */ + getImplementation(): XDOMImplementation; + + /** The DOMImplementation object that handles this document. */ + readonly Implementation: XDOMImplementation; + + /** + * Imports a node from another document to this document. Throws: {@link DOMException} - NOT_SUPPORTED_ERR: Raised if the type of node being imported is + * not supported. + */ + importNode(importedNode: XNode, deep: boolean): XNode; + } + + /** Builds a new dom tree */ + interface XDocumentBuilder extends uno.XInterface { + /** Obtain an instance of a DOMImplementation object. */ + readonly DOMImplementation: XDOMImplementation; + + /** Obtain an instance of a DOMImplementation object. */ + getDOMImplementation(): XDOMImplementation; + + /** Indicates whether or not this parser is configured to understand namespaces. */ + isNamespaceAware(): boolean; + + /** Indicates whether or not this parser is configured to validate XML documents. */ + isValidating(): boolean; + + /** Obtain a new instance of a DOM Document object to build a DOM tree with. */ + newDocument(): XDocument; + + /** Parse the content of the given InputStream as an XML document and return a new DOM Document object. */ + parse(is: io.XInputStream): XDocument; + + /** Parse the content of the given URI as an XML document and return a new DOM Document object. */ + parseURI(uri: string): XDocument; + + /** Specify the EntityResolver to be used to resolve entities present in the XML document to be parsed. */ + setEntityResolver(er: sax.XEntityResolver): void; + + /** Specify the ErrorHandler to be used to report errors present in the XML document to be parsed. */ + setErrorHandler(eh: sax.XErrorHandler): void; + } + + interface XDocumentType extends XNode { + /** A NamedNodeMap containing the general entities, both external and internal, declared in the DTD. */ + readonly Entities: XNamedNodeMap; + + /** A NamedNodeMap containing the general entities, both external and internal, declared in the DTD. */ + getEntities(): XNamedNodeMap; + + /** The internal subset as a string, or null if there is none. */ + getInternalSubset(): string; + + /** The name of DTD; i.e., the name immediately following the DOCTYPE keyword. */ + getName(): string; + + /** A NamedNodeMap containing the notations declared in the DTD. */ + getNotations(): XNamedNodeMap; + + /** The public identifier of the external subset. */ + getPublicId(): string; + + /** The system identifier of the external subset. */ + getSystemId(): string; + + /** The internal subset as a string, or null if there is none. */ + readonly InternalSubset: string; + + /** The name of DTD; i.e., the name immediately following the DOCTYPE keyword. */ + readonly Name: string; + + /** A NamedNodeMap containing the notations declared in the DTD. */ + readonly Notations: XNamedNodeMap; + + /** The public identifier of the external subset. */ + readonly PublicId: string; + + /** The system identifier of the external subset. */ + readonly SystemId: string; + } + + interface XDOMImplementation extends uno.XInterface { + /** + * Creates a DOM Document object of the specified type with its document element. Throws: {@link DOMException} - INVALID_CHARACTER_ERR: Raised if the + * specified qualified name contains an illegal character. NAMESPACE_ERR: Raised if the qualifiedName is malformed, if the qualifiedName has a prefix and + * the namespaceURI is null, or if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from " + * http://www.w3.org/XML/1998/namespace" , or if the DOM implementation does not support the "XML" feature but a non-null namespace URI was provided, + * since namespaces were defined by XML. WRONG_DOCUMENT_ERR: Raised if doctype has already been used with a different document or was created from a + * different implementation. NOT_SUPPORTED_ERR: May be raised by DOM implementations which do not support the "XML" feature, if they choose not to + * support this method. Other features introduced in the future, by the DOM WG or in extensions defined by other groups, may also demand support for this + * method; please consult the definition of the feature to see if it requires this method. + */ + createDocument(namespaceURI: string, qualifiedName: string, doctype: XDocumentType): XDocument; + + /** + * Creates an empty DocumentType node. Throws: {@link DOMException} - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal + * character. NAMESPACE_ERR: Raised if the qualifiedName is malformed. NOT_SUPPORTED_ERR: May be raised by DOM implementations which do not support the + * "XML" feature, if they choose not to support this method. Other features introduced in the future, by the DOM WG or in extensions defined by other + * groups, may also demand support for this method; please consult the definition of the feature to see if it requires this method. + */ + createDocumentType(qualifiedName: string, publicId: string, systemId: string): XDocumentType; + + /** Test if the DOM implementation implements a specific feature. */ + hasFeature(feature: string, ver: string): boolean; + } + + interface XElement extends XNode { + /** Retrieves an attribute value by name. */ + getAttribute(name: string): string; + + /** Retrieves an attribute node by name. */ + getAttributeNode(name: string): XAttr; + + /** Retrieves an Attr node by local name and namespace URI. */ + getAttributeNodeNS(namespaceURI: string, localName: string): XAttr; + + /** Retrieves an attribute value by local name and namespace URI. */ + getAttributeNS(namespaceURI: string, localName: string): string; + + /** + * Returns a NodeList of all descendant Elements with a given tag name, in the order in which they are encountered in a preorder traversal of this + * Element tree. + */ + getElementsByTagName(name: string): XNodeList; + + /** + * Returns a NodeList of all the descendant Elements with a given local name and namespace URI in the order in which they are encountered in a preorder + * traversal of this Element tree. + */ + getElementsByTagNameNS(namespaceURI: string, localName: string): XNodeList; + + /** The name of the element. */ + getTagName(): string; + + /** Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise. */ + hasAttribute(name: string): boolean; + + /** Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise. */ + hasAttributeNS(namespaceURI: string, localName: string): boolean; + + /** Removes an attribute by name. Throws: {@link DOMException} - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. */ + removeAttribute(name: string): void; + + /** + * Removes the specified attribute node. Throws: {@link DOMException} - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. NOT_FOUND_ERR: + * Raised if oldAttr is not an attribute of the element. + */ + removeAttributeNode(oldAttr: XAttr): XAttr; + + /** Removes an attribute by local name and namespace URI. Throws: {@link DOMException} - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. */ + removeAttributeNS(namespaceURI: string, localName: string): void; + + /** + * Adds a new attribute. Throws: {@link DOMException} - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. + * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + setAttribute(name: string, value: string): void; + + /** + * Adds a new attribute node. Throws: {@link DOMException} - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one + * that created the element. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute + * of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. + */ + setAttributeNode(newAttr: XAttr): XAttr; + + /** + * Adds a new attribute. Throws: {@link DOMException} - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that + * created the element. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of + * another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. NOT_SUPPORTED_ERR: Always thrown if the + * current document does not support the "XML" feature, since namespaces were defined by XML. + */ + setAttributeNodeNS(newAttr: XAttr): XAttr; + + /** + * Adds a new attribute. Throws: {@link DOMException} - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character, per + * the XML 1.0 specification . NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. NAMESPACE_ERR: Raised if the qualifiedName is malformed per + * the Namespaces in XML specification, if the qualifiedName has a prefix and the namespaceURI is null, if the qualifiedName has a prefix that is "xml" + * and the namespaceURI is different from " http://www.w3.org/XML/1998/namespace", or if the qualifiedName, or its prefix, is "xmlns" and the + * namespaceURI is different from " http://www.w3.org/2000/xmlns/". NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" + * feature, since namespaces were defined by XML. + */ + setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void; + + /** The name of the element. */ + readonly TagName: string; + } + + interface XEntity extends XNode { + /** For unparsed entities, the name of the notation for the entity. */ + getNotationName(): string; + + /** The public identifier associated with the entity, if specified. */ + getPublicId(): string; + + /** The system identifier associated with the entity, if specified. */ + getSystemId(): string; + + /** For unparsed entities, the name of the notation for the entity. */ + readonly NotationName: string; + + /** The public identifier associated with the entity, if specified. */ + readonly PublicId: string; + + /** The system identifier associated with the entity, if specified. */ + readonly SystemId: string; + } + + interface XNamedNodeMap extends uno.XInterface { + /** The number of nodes in this map. */ + getLength(): number; + + /** Retrieves a node specified by local name. */ + getNamedItem(name: string): XNode; + + /** Retrieves a node specified by local name and namespace URI. */ + getNamedItemNS(namespaceURI: string, localName: string): XNode; + + /** Returns a node specified by index. */ + item(index: number): XNode; + + /** The number of nodes in this map. */ + readonly Length: number; + + /** + * Removes a node specified by name. Throws: {@link DOMException} - NOT_FOUND_ERR: Raised if there is no node named name in this map. + * NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. + */ + removeNamedItem(name: string): XNode; + + /** + * Removes a node specified by local name and namespace URI. Throws: {@link DOMException} - NOT_FOUND_ERR: Raised if there is no node with the specified + * namespaceURI and localName in this map. NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. + */ + removeNamedItemNS(namespaceURI: string, localName: string): XNode; + + /** + * Adds a node using its nodeName attribute. Throws: {@link DOMException} - WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than + * the one that created this map. NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is + * already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. HIERARCHY_REQUEST_ERR: + * Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr + * node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities. + */ + setNamedItem(arg: XNode): XNode; + + /** + * Adds a node using its namespaceURI and localName. Throws: {@link DOMException} - WRONG_DOCUMENT_ERR: Raised if arg was created from a different + * document than the one that created this map. NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. INUSE_ATTRIBUTE_ERR: Raised if arg is an + * Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. + * HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert + * something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities. + * NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML. + */ + setNamedItemNS(arg: XNode): XNode; + } + + /** + * The primary dom datatype + * + * The Node interface is the primary datatype for the entire Document Object Model. It represents a single node in the document tree. While all objects + * implementing the Node interface expose methods for dealing with children, not all objects implementing the Node interface may have children. For + * example, Text nodes may not have children, and adding children to such nodes results in a {@link DOMException} being raised. + * + * The attributes nodeName, nodeValue and attributes are included as a mechanism to get at node information without casting down to the specific derived + * interface. In cases where there is no obvious mapping of these attributes for a specific nodeType (e.g., nodeValue for an Element or attributes for a + * Comment ), this returns null. Note that the specialized interfaces may contain additional and more convenient mechanisms to get and set the relevant + * information. + * + * The values of nodeName, nodeValue, and attributes vary according to the node type as follows: {{table here, see documentation}} + * @see Document Object Model (DOM) Level 2 Core Specification + * @since OOo 2.0 + */ + interface XNode extends uno.XInterface { + /** + * Adds the node newChild to the end of the list of children of this node. + * @param newChild the new child node + * @throws com::sun::star::xml::dom::DOMException HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the n + */ + appendChild(newChild: XNode): XNode; + + /** A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise. */ + readonly Attributes: XNamedNodeMap; + + /** A NodeList that contains all children of this node. */ + readonly ChildNodes: XNodeList; + + /** + * Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. + * @param deep `TRUE` : clone node together with any children ; `FALSE` : clone without children + * @returns the cloned node + */ + cloneNode(deep: boolean): XNode; + + /** The first child of this node. */ + readonly FirstChild: XNode; + + /** A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise. */ + getAttributes(): XNamedNodeMap; + + /** A NodeList that contains all children of this node. */ + getChildNodes(): XNodeList; + + /** The first child of this node. */ + getFirstChild(): XNode; + + /** The last child of this node. */ + getLastChild(): XNode; + + /** Returns the local part of the qualified name of this node. */ + getLocalName(): string; + + /** The namespace URI of this node, or null if it is unspecified. */ + getNamespaceURI(): string; + + /** The node immediately following this node. */ + getNextSibling(): XNode; + + /** The name of this node, depending on its type; see the table above. */ + getNodeName(): string; + + /** A code representing the type of the underlying object, as defined above. */ + getNodeType(): NodeType; + + /** + * The value of this node, depending on its type; see the table above. + * @throws com::sun::star::xml::dom::DOMException DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the i + */ + getNodeValue(): string; + + /** The Document object associated with this node. */ + getOwnerDocument(): XDocument; + + /** The parent of this node. */ + getParentNode(): XNode; + + /** The namespace prefix of this node, or null if it is unspecified. */ + getPrefix(): string; + + /** The node immediately preceding this node. */ + getPreviousSibling(): XNode; + + /** Returns whether this node (if it is an element) has any attributes. */ + hasAttributes(): boolean; + + /** Returns whether this node has any children. */ + hasChildNodes(): boolean; + + /** + * Inserts the node newChild before the existing child node refChild. + * @throws DOMException HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the no + */ + insertBefore(newChild: XNode, refChild: XNode): XNode; + + /** Tests whether the DOM implementation implements a specific feature and that feature is supported by this node. */ + isSupported(feature: string, ver: string): boolean; + + /** The last child of this node. */ + readonly LastChild: XNode; + + /** Returns the local part of the qualified name of this node. */ + readonly LocalName: string; + + /** The namespace URI of this node, or null if it is unspecified. */ + readonly NamespaceURI: string; + + /** The node immediately following this node. */ + readonly NextSibling: XNode; + + /** The name of this node, depending on its type; see the table above. */ + readonly NodeName: string; + + /** A code representing the type of the underlying object, as defined above. */ + readonly NodeType: NodeType; + + /** + * The value of this node, depending on its type; see the table above. + * @throws com::sun::star::xml::dom::DOMException DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the i + */ + NodeValue: string; + + /** + * Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure + * (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text + * nodes nor empty Text nodes. + */ + normalize(): void; + + /** The Document object associated with this node. */ + readonly OwnerDocument: XDocument; + + /** The parent of this node. */ + readonly ParentNode: XNode; + + /** The namespace prefix of this node, or null if it is unspecified. */ + Prefix: string; + + /** The node immediately preceding this node. */ + readonly PreviousSibling: XNode; + + /** + * Removes the child node indicated by oldChild from the list of children, and returns it. + * @throws DOMException NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. NOT_FOUND_ERR: Raised if oldChild is not a child of this node. + */ + removeChild(oldChild: XNode): XNode; + + /** + * Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. + * @throws DOMException HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the no + */ + replaceChild(newChild: XNode, oldChild: XNode): XNode; + + /** + * The value of this node, depending on its type; see the table above. + * @throws DOMException NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. DOMSTRING_SIZE_ERR: Raised when it would return more characters tha + */ + setNodeValue(nodeValue: string): void; + + /** + * The namespace prefix of this node, or null if it is unspecified. + * @throws DOMException INVALID_CHARACTER_ERR: Raised if the specified prefix contains an illegal character, per the XML 1.0 specification . NO_MODIFICATI + */ + setPrefix(prefix: string): void; + } + + interface XNodeList extends uno.XInterface { + /** The number of nodes in the list. */ + getLength(): number; + + /** Returns a node specified by index in the collection. */ + item(index: number): XNode; + + /** The number of nodes in the list. */ + readonly Length: number; + } + + interface XNotation extends XNode { + /** The public identifier of this notation. */ + getPublicId(): string; + + /** The system identifier of this notation. */ + getSystemId(): string; + + /** The public identifier of this notation. */ + readonly PublicId: string; + + /** The system identifier of this notation. */ + readonly SystemId: string; + } + + interface XProcessingInstruction extends XNode { + /** The content of this processing instruction. */ + Data: string; + + /** The content of this processing instruction. */ + getData(): string; + + /** The target of this processing instruction. */ + getTarget(): string; + + /** The content of this processing instruction. Throws: {@link DOMException} - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. */ + setData(data: string): void; + + /** The target of this processing instruction. */ + readonly Target: string; + } + + /** Builds a new dom tree */ + interface XSAXDocumentBuilder extends uno.XInterface { + readonly Document: XDocument; + readonly DocumentFragment: XDocumentFragment; + endDocumentFragment(): void; + getDocument(): XDocument; + getDocumentFragment(): XDocumentFragment; + getState(): SAXDocumentBuilderState; + reset(): void; + startDocumentFragment(ownerDoc: XDocument): void; + readonly State: SAXDocumentBuilderState; + } + + /** + * Provides a unified interface for the {@link SAXDocumentBuilder} service to implement. + * @since LibreOffice 4.0 + */ + interface XSAXDocumentBuilder2 extends XSAXDocumentBuilder, sax.XDocumentHandler { } + + interface XText extends XCharacterData { + /** + * Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings. Throws: {@link DOMException} - INDEX_SIZE_ERR: Raised + * if the specified offset is negative or greater than the number of 16-bit units in data. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + splitText(offset: number): XText; + } + + namespace events { + const enum AttrChangeType { + ADDITION = 1, + MODIFICATION = 0, + REMOVAL = 2, + } + + const enum EventType { + click = 3, + DOMActivate = 2, + DOMAttrModified = 14, + DOMCharacterDataModified = 15, + DOMFocusIn = 0, + DOMFocusOut = 1, + DOMNodeInserted = 10, + DOMNodeInsertedIntoDocument = 13, + DOMNodeRemoved = 11, + DOMNodeRemovedFromDocument = 12, + DOMSubtreeModified = 9, + mousedown = 4, + mousemove = 7, + mouseout = 8, + mouseover = 6, + mouseup = 5, + } + + const enum PhaseType { + AT_TARGET = 1, + BUBBLING_PHASE = 2, + CAPTURING_PHASE = 0, + } + + interface EventException extends uno.Exception { + code: number; + } + + interface XDocumentEvent extends uno.XInterface { + createEvent(eventType: string): XEvent; + } + + interface XEvent extends uno.XInterface { + readonly Bubbles: boolean; + readonly Cancelable: boolean; + readonly CurrentTarget: XEventTarget; + readonly EventPhase: PhaseType; + getBubbles(): boolean; + getCancelable(): boolean; + getCurrentTarget(): XEventTarget; + getEventPhase(): PhaseType; + getTarget(): XEventTarget; + getTimeStamp(): util.Time; + getType(): string; + initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void; + preventDefault(): void; + stopPropagation(): void; + readonly Target: XEventTarget; + readonly TimeStamp: util.Time; + readonly Type: string; + } + + interface XEventListener extends uno.XInterface { + handleEvent(evt: XEvent): void; + } + + interface XEventTarget extends uno.XInterface { + addEventListener(eventType: string, listener: XEventListener, useCapture: boolean): void; + dispatchEvent(evt: XEvent): boolean; + removeEventListener(eventType: string, listener: XEventListener, useCapture: boolean): void; + } + + interface XMouseEvent extends XUIEvent { + readonly AltKey: boolean; + readonly Button: number; + readonly ClientX: number; + readonly ClientY: number; + readonly CtrlKey: boolean; + getAltKey(): boolean; + getButton(): number; + getClientX(): number; + getClientY(): number; + getCtrlKey(): boolean; + getMetaKey(): boolean; + getRelatedTarget(): XEventTarget; + getScreenX(): number; + getScreenY(): number; + getShiftKey(): boolean; + initMouseEvent( + typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: views.XAbstractView, detailArg: number, screenXArg: number, + screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, + buttonArg: number, relatedTargetArg: XEventTarget): void; + readonly MetaKey: boolean; + readonly RelatedTarget: XEventTarget; + readonly ScreenX: number; + readonly ScreenY: number; + readonly ShiftKey: boolean; + } + + interface XMutationEvent extends XEvent { + readonly AttrChange: AttrChangeType; + readonly AttrName: string; + getAttrChange(): AttrChangeType; + getAttrName(): string; + getNewValue(): string; + getPrevValue(): string; + getRelatedNode(): XNode; + initMutationEvent( + typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: XNode, prevValueArg: string, newValueArg: string, + attrNameArg: string, attrChangeArg: AttrChangeType): void; + readonly NewValue: string; + readonly PrevValue: string; + readonly RelatedNode: XNode; + } + + interface XUIEvent extends XEvent { + readonly Detail: number; + getDetail(): number; + getView(): views.XAbstractView; + initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: views.XAbstractView, detailArg: number): void; + readonly View: views.XAbstractView; + } + } + + namespace views { + interface XAbstractView extends uno.XInterface { + readonly Document: XDocumentView; + getDocument(): XDocumentView; + } + + interface XDocumentView extends uno.XInterface { + readonly DefaultView: XAbstractView; + getDefaultView(): XAbstractView; + } + } + } + + namespace input { + /** + * This service helps parsing files by providing a SAX document handler interface for a SAX parsers. You have to instantiate this service passing an + * {@link XRoot} instance. + */ + interface SaxDocumentHandler extends sax.XDocumentHandler, lang.XInitialization { } + + /** An element's attributes */ + interface XAttributes extends uno.XInterface { + /** + * Gets attribute index passing a QName. + * @param qName QName + * @returns attribute index or -1, if not found + */ + getIndexByQName(qName: string): number; + + /** + * Gets attribute index passing a namespace uid and a local name. + * @param uid namespace uid + * @param localName local name + * @returns attribute index or -1, if not found + */ + getIndexByUidName(uid: number, localName: string): number; + + /** + * Gets the number of attributes. + * @returns number of attributes + */ + getLength(): number; + + /** + * Gets the local name of an attribute. + * @param nIndex index + * @returns local name of attribute or empty string, if invalid index + */ + getLocalNameByIndex(nIndex: number): string; + + /** + * Gets the QName of an attribute. + * @param nIndex index + * @returns QName of attribute or empty string, if invalid index + */ + getQNameByIndex(nIndex: number): string; + + /** + * Gets the type of an attribute, if possible. + * @param nIndex index + * @returns type of attribute (if possible, else empty string) + */ + getTypeByIndex(nIndex: number): string; + + /** + * Gets the namespace uid of an attribute. + * @param nIndex index + * @returns namespace uid of attribute or -1, if invalid index + */ + getUidByIndex(nIndex: number): number; + + /** + * Gets the value of an attribute. + * @param nIndex index + * @returns value string or empty string, if invalid index + */ + getValueByIndex(nIndex: number): string; + + /** + * For convenience: Gets the value of an attribute passing uid, local name. + * @param uid namespace uid + * @param localName local name + * @returns value string or empty string, if invalid uid/local name + */ + getValueByUidName(uid: number, localName: string): string; + + /** + * Gets the number of attributes. + * @returns number of attributes + */ + readonly Length: number; + } + + /** Capsule around an XML element. */ + interface XElement extends uno.XInterface { + /** + * Gets the attributes of this element. + * @returns attributes of this element + */ + readonly Attributes: XAttributes; + + /** + * Called upon retrieval of characters. + * @param chars characters + */ + characters(chars: string): void; + + /** Receives notification of element closing. */ + endElement(): void; + + /** + * Gets the attributes of this element. + * @returns attributes of this element + */ + getAttributes(): XAttributes; + + /** + * Gets the local name of this element. + * @returns local name of this element + */ + getLocalName(): string; + + /** + * Gets the parent context. + * @returns parent context + */ + getParent(): XElement; + + /** + * Gets the namespace uid of this element. + * @returns namespace uid of this element + */ + getUid(): number; + + /** + * Receives notification of white space that can be ignored. + * @param whitespace white space characters + */ + ignorableWhitespace(whitespace: string): void; + + /** + * Gets the local name of this element. + * @returns local name of this element + */ + readonly LocalName: string; + + /** + * Gets the parent context. + * @returns parent context + */ + readonly Parent: XElement; + + /** + * Receives notification of a processing instruction. + * @param target target + * @param data data + */ + processingInstruction(target: string, data: string): void; + + /** + * Called upon each occurring child element. + * @param uid namespace uid of element + * @param localName local name of element + * @param xAttributes attributes of element + * @returns child import context + */ + startChildElement(uid: number, localName: string, xAttributes: XAttributes): XElement; + + /** + * Gets the namespace uid of this element. + * @returns namespace uid of this element + */ + readonly Uid: number; + } + + /** Interface to map XML namespace URI strings to ordinals (URI-id, short uid). */ + interface XNamespaceMapping extends uno.XInterface { + /** + * Creates a unique ordinal passing an XML namespace URI. + * @param uri XML namespace URI + * @returns uid + */ + getUidByUri(uri: string): number; + + /** + * Gets the corresponding XML namespace URI passing a uid (created using {@link getUidByUri()} ). + * @param uid uid + * @returns XML namespace URI + */ + getUriByUid(uid: number): string; + } + + /** Root interface being passed to {@link SaxDocumentHandler} service upon instantiation. */ + interface XRoot extends uno.XInterface { + /** Receives notification of the end of a document. */ + endDocument(): void; + + /** + * Receives notification of a processing instruction. + * @param target target + * @param data data + */ + processingInstruction(target: string, data: string): void; + + /** + * Receives an object for locating the origin of SAX document events. + * @param locator locator + */ + setDocumentLocator(locator: sax.XLocator): void; + + /** + * Receives notification of the beginning of a document. + * @param xMapping mapping to obtain ids out of XML namespace URIs and vice versa + */ + startDocument(xMapping: XNamespaceMapping): void; + + /** + * Called upon root element. + * @param uid namespace uid of element + * @param localName local name of element + * @param xAttributes attributes of element + */ + startRootElement(uid: number, localName: string, xAttributes: XAttributes): XElement; + } + } + + namespace sax { + type FastParser = XFastParser; + + type FastShapeContextHandler = XFastShapeContextHandler; + + type FastTokenHandler = XFastTokenHandler; + + /** Service that provides a SAX parser. */ + type Parser = XParser; + + /** + * stores information for locating the error in the original XML document. + * @see XLocator + */ + type SAXInvalidCharacterException = SAXException; + + /** @since LibreOffice 4.0 */ + type Writer = XWriter; + + /** + * specifies the Datasource plus some additional information for the parser. + * + * There are two places where the application will deliver this input source to the parser: + * + * as the argument of {@link XParser.parseStream()}as the return value of XEntityReslover::resolveEntity(). + */ + interface InputSource { + /** contains the byte input stream of the document. */ + aInputStream: io.XInputStream; + + /** + * contains the encoding of the data stream. This is used by the parser to do Unicode conversions. + * + * Note that in general you do not need to specify an encoding. Either it is UTF-8 or UTF-16 which is recognized by the parser or it is specified in the + * first line of the XML-File ( e.g. **?xml encoding="EUC-JP"?** ). + */ + sEncoding: string; + + /** contains the public Id of the document, for example, needed in exception-message strings. */ + sPublicId: string; + + /** contains the system ID of the document. */ + sSystemId: string; + } + + /** + * encapsulates the details of an XML parse error or warning. + * + * This structure is a replacement for the Java class **org.xml.sax.SAXException** . + * + * Some abbreviations: + * + * SAX = Simple API for XMLURI = Uniform Resource IdentifierDTD = document type definition + */ + interface SAXException extends uno.Exception { + /** This field may contain a wrapped exception. */ + WrappedException: any; + } + + /** + * stores information for locating the error in the original XML document. + * @see XLocator + */ + interface SAXParseException extends SAXException { + /** contains the column number in the document. */ + ColumnNumber: number; + + /** contains the line number in the document. */ + LineNumber: number; + + /** contains the public identifier of the document where the exception has occurred. */ + PublicId: string; + + /** contains the system identifier of the document. */ + SystemId: string; + } + + /** + * specifies an element's attributes. + * + * This interface describes a name-type-value triple which describes a single attribute of a tag. Implementors are encouraged to implement the {@link + * com.sun.star.util.XCloneable} interface also to allow the user to make a copy of the instance. + * + * This interface is a poor IDL version of the Java interface **org.xml.sax.AttributeList** . For example in getValueByName, it does not allow to + * distinguish a missing value (for which the Java interface returns null) from an empty string value. + */ + interface XAttributeList extends uno.XInterface { + /** @returns the number of attributes in this list. */ + getLength(): number; + + /** @returns the name of an attribute in this list (by position). */ + getNameByIndex(i: number): string; + + /** @returns the type of an attribute in the list (by position). Non-validating parsers may return CDATA only. */ + getTypeByIndex(i: number): string; + + /** @returns the type of an attribute in the list (by name). Non-validating parsers may return CDATA only. */ + getTypeByName(aName: string): string; + + /** @returns the value of an attribute in the list (by position). */ + getValueByIndex(i: number): string; + + /** @returns the value of an attribute in the list (by name). */ + getValueByName(aName: string): string; + + /** @returns the number of attributes in this list. */ + readonly Length: number; + } + + /** + * receives notification of general document events. + * + * This interface is an IDL version of the Java interface **org.xml.sax.DocumentHandler** with some smaller adaptations. + */ + interface XDocumentHandler extends uno.XInterface { + /** receives notification of character data. */ + characters(aChars: string): void; + + /** receives notification of the end of a document. */ + endDocument(): void; + + /** receives notification of the end of an element. */ + endElement(aName: string): void; + + /** receives notification of white space that can be ignored. */ + ignorableWhitespace(aWhitespaces: string): void; + + /** receives notification of a processing instruction. */ + processingInstruction(aTarget: string, aData: string): void; + + /** receives an object for locating the origin of SAX document events. */ + setDocumentLocator(xLocator: XLocator): void; + + /** receives notification of the beginning of a document. */ + startDocument(): void; + + /** receives notification of the beginning of an element . */ + startElement(aName: string, xAttribs: XAttributeList): void; + } + + /** + * receives events according to the DTD of the document. + * + * The SAX parser may report these events in any order, regardless of the order in which the notations and unparsed entities were declared; however, all + * DTD events must be reported after the document handler's `startDocument` event, and before the first `startElement` event. It is up to the application + * to store the information for future use (perhaps in a hash table or object tree). If the application encounters attributes of type "NOTATION", + * "ENTITY", or "ENTITIES", it can use the information that it obtained through this interface to find the entity and/or notation that corresponds with + * the attribute value. + */ + interface XDTDHandler extends uno.XInterface { + /** receives notification of a notation declaration event. */ + notationDecl(sName: string, sPublicId: string, sSystemId: string): void; + + /** receives notification of an unparsed entity declaration event. */ + unparsedEntityDecl(sName: string, sPublicId: string, sSystemId: string, sNotationName: string): void; + } + + /** + * makes it possible to modify the behavior of resolving external preferences. + * + * Usually, the parser has a default behavior of resolving external references (See documentation of the parser implementation). Use this interface to + * modify or reimplement this behavior. + */ + interface XEntityResolver extends uno.XInterface { + /** @returns {@link InputSource} for the external entity. If **aInputStream** is a valid reference to an input stream, the parser uses this {@link InputSourc */ + resolveEntity(sPublicId: string, sSystemId: string): InputSource; + } + + /** + * is the basic interface for SAX error handlers. + * + * If a SAX application needs to implement customized error handling, it must implement this interface and then register an instance with the SAX parser + * using the parser's XParser::setErrorhandler() method. The parser will then report all errors and warnings through this interface. + * + * This interface is a slight adaption of the Java interface `org.xml.sax.ErrorHandler` . In IDL, no exception can be passed as an argument, so an `any` + * serves as the container. The type of the exception is {@link SAXParseException} or an instance of a derived class. + */ + interface XErrorHandler extends uno.XInterface { + /** receives notification of a recoverable error. */ + error(aSAXParseException: any): void; + + /** receives notification of a non-recoverable error. */ + fatalError(aSAXParseException: any): void; + + /** receives notification of a warning. */ + warning(aSAXParseException: any): void; + } + + /** + * this interface does not conform to the SAX-standard. + * + * Note: Whether or not every callback is supported is dependent on the parser implementation. + */ + interface XExtendedDocumentHandler extends XDocumentHandler { + /** informs a writer that it is allowable to insert a line break and indentation before the next XDocumentHandler-call. */ + allowLineBreak(): void; + + /** receives notification about a comment in the XML-source. */ + comment(sComment: string): void; + + /** + * informs about the end of a CDATA-Section. + * + * Note that `startCDATA/endCDATA` MUST NOT enclose any `startElement/endElement` -call! + */ + endCDATA(): void; + + /** + * receives notification about the start of a CDATA section in the XML-source. + * + * Any string coming in via character handler may include chars, that would otherwise be interpreted as markup. + */ + startCDATA(): void; + + /** notifies that any characters that cannot be handled by other callback methods are announced through this method. */ + unknown(sString: string): void; + } + + /** + * a container for the attributes of an XML element. + * + * ; Attributes are separated into known attributes and unknown attributes. + * + * Known attributes have a local name that is known to the {@link XFastTokenHandler} registered at the {@link XFastParser} which created the sax event + * containing this attributes. If an attribute also has a namespace, that must be registered at the {@link XFastParser} , else this attribute is also + * unknown even if the local name is known. + */ + interface XFastAttributeList extends uno.XInterface { + /** returns a sequence of attributes which names and or namespaces URLS are translated to tokens. */ + readonly FastAttributes: SafeArray; + + /** returns a sequence of attributes which names and or namespaces URLS are translated to tokens. */ + getFastAttributes(): SafeArray; + + /** + * retrieves the value of an attribute. ; + * @param Token contains the integer token from the {@link XFastTokenHandler} registered at the {@link XFastParser} . ; If the attribute name has a namesp + * @returns The string value from the attribute or an empty string if the attribute is not available. + */ + getOptionalValue(Token: number): string; + + /** + * retrieves the token of an attribute value. ; + * @param Token contains the integer token from the {@link XFastTokenHandler} registered at the {@link XFastParser} . ; If the attribute name has a namesp + * @param Default This value will be returned if the attribute is not available + * @returns If the attribute is available it returns the integer token of the value from the attribute or FastToken::Invalid. If not the value of `Default` i + */ + getOptionalValueToken(Token: number, Default: number): number; + + /** returns a sequence of attributes which names and or namespaces URLS can not be translated to tokens. */ + getUnknownAttributes(): SafeArray; + + /** + * retrieves the value of an attribute. ; + * @param Token contains the integer token from the {@link XFastTokenHandler} registered at the {@link XFastParser} . ; If the attribute name has a namesp + * @returns The string value from the attribute. + * @throws SAXEXception if the attribute is not available + */ + getValue(Token: number): string; + + /** + * retrieves the token of an attribute value. ; + * @param Token contains the integer token from the {@link XFastTokenHandler} registered at the {@link XFastParser} . ; If the attribute name has a namesp + * @returns The integer token of the value from the attribute or FastToken::Invalid + * @throws SAXEXception if the attribute is not available + */ + getValueToken(Token: number): number; + + /** + * checks if an attribute is available. ; + * @param Token contains the integer token from the {@link XFastTokenHandler} registered at the {@link XFastParser} . ; If the attribute name has a namesp + * @returns `TRUE` , if the attribute is available + */ + hasAttribute(Token: number): boolean; + + /** returns a sequence of attributes which names and or namespaces URLS can not be translated to tokens. */ + readonly UnknownAttributes: SafeArray; + } + + /** + * receives notification of sax document events from a {@link XFastParser} . + * @see XFastDocumentHandler + */ + interface XFastContextHandler extends uno.XInterface { + /** receives notification of character data. */ + characters(aChars: string): void; + + /** + * receives notification of the beginning of a known child element. + * @param Element contains the integer token from the {@link XFastTokenHandler} registered at the {@link XFastParser} .; If the element has a namespace th + * @param Attribs Contains a {@link XFastAttributeList} to access the attributes from the element. + */ + createFastChildContext(Element: number, Attribs: XFastAttributeList): XFastContextHandler; + + /** + * receives notification of the beginning of a unknown child element . + * @param Namespace contains the namespace url (not the prefix!) of this element. + * @param Name contains the elements local name. + * @param Attribs Contains a {@link XFastAttributeList} to access the attributes the element. + */ + createUnknownChildContext(Namespace: string, Name: string, Attribs: XFastAttributeList): XFastContextHandler; + + /** + * receives notification of the end of an known element. + * @see startFastElement + */ + endFastElement(Element: number): void; + + /** + * receives notification of the end of an known element. + * @see startUnknownElement + */ + endUnknownElement(Namespace: string, Name: string): void; + + /** + * receives notification of the beginning of an element . + * @param Element contains the integer token from the {@link XFastTokenHandler} registered at the {@link XFastParser} . ; If the element has a namespace t + * @param Attribs Contains a {@link XFastAttributeList} to access the attributes from the element. + */ + startFastElement(Element: number, Attribs: XFastAttributeList): void; + + /** + * receives notification of the beginning of an unknown element . + * @param Namespace contains the namespace url (not the prefix!) of this element. + * @param Name contains the elements local name. + * @param Attribs Contains a {@link XFastAttributeList} to access the attributes from the element. + */ + startUnknownElement(Namespace: string, Name: string, Attribs: XFastAttributeList): void; + } + + /** receives notification of sax document events from a {@link XFastParser} */ + interface XFastDocumentHandler extends XFastContextHandler { + /** called by the parser after the last XML element of a stream is processed. */ + endDocument(): void; + + /** receives an object for locating the origin of SAX document events. */ + setDocumentLocator(xLocator: XLocator): void; + + /** called by the parser when parsing of an XML stream is started. */ + startDocument(): void; + } + + /** @since LibreOffice 5.3 */ + interface XFastNamespaceHandler extends uno.XInterface { + getNamespaceURI(NamespacePrefix: string): string; + registerNamespace(NamespacePrefix: string, NamespaceURI: string): void; + } + + /** + * specifies a SAX parser that uses integer values for known XML names (elements, attributes and attribute values). The parser also handles namespaces + * and allows to have individual contexts for each XML element. + * + * Before parsing is possible you have to set your {@link XFastDocumentHandler} using {@link setFastDocumentHandler()} . + * + * Parsing starts with calling {@link parseStream()} . If the parser finds a valid XML file with the given {@link InputSource} , it calls {@link + * XFastDocumentHandler.startDocument()} first. + * + * This parser generates either "fast" events that use integer token values for namespaces, elements and attributes or "unknown" events for elements that + * are unknown. + * + * A namespace is unknown if the namespace URL was not registered with {@link registerNamespace()} . + * + * An element is unknown if no {@link XFastTokenHandler} is set or if the {@link XFastTokenHandler} does not return a valid identifier for the elements + * local name. An element is also unknown if the elements local name is known but it uses a namespace that is unknown. + * + * Setting a {@link XFastTokenHandler} with {@link setTokenHandler()} is optional, but without a {@link XFastTokenHandler} you will only get unknown sax + * events. This can be useful if you are only interested in the namespace handling and/or the context feature. + * + * For each element the parser sends a create child element event to the elements parent context by calling {@link + * XFastContextHandler.createFastChildContext()} for known elements or {@link XFastContextHandler.createUnknownChildContext()} for unknown elements. ; + * The parent context for the root element is the {@link XFastDocumentHandler} itself. + * + * If the parent context returns an empty reference, no further events for the element and all of its children are created. + * + * If a valid context is returned this context gets a start event by a call to {@link XFastContextHandler.startFastElement()} for known elements or + * {@link XFastContextHandler.startUnknownElement()} for unknown elements. + * + * After processing all its child elements the context gets an end event by a call to {@link XFastContextHandler.endFastElement()} for known elements or + * {@link XFastContextHandler.endUnknownElement()} for unknown elements. + * + * It is valid to return one instance of {@link XFastContextHandler} more than once. It is even possible to only use the {@link XFastDocumentHandler} by + * always returning a reference to itself for each create child context event. + * + * After the last element is processed the parser generates an end document event at the {@link XFastDocumentHandler} by calling {@link + * XFastDocumentHandler.endDocument()} . + * @see http://wiki.openoffice.org/wiki/FastParser + */ + interface XFastParser extends uno.XInterface { + /** Gets the namespace url string. */ + getNamespaceURL(prefix: string): string; + + /** + * parses an XML document from a stream. + * + * Set the desired handlers before calling this method. + */ + parseStream(aInputSource: InputSource): void; + + /** + * registers a known namespace url with the given integer token. ; + * @param NamespaceURL the namespace URL. + * @param NamespaceToken an integer token that must be greater than {@link FastToken.NAMESPACE} . + */ + registerNamespace(NamespaceURL: string, NamespaceToken: number): void; + + /** allows an application to register a DTD-Handler. */ + setEntityResolver(Resolver: XEntityResolver): void; + + /** + * allows an application to register an error event handler. + * + * Note that the error handler can throw an exception when an error or warning occurs. Note that an exception is thrown by the parser when an + * unrecoverable (fatal) error occurs. + */ + setErrorHandler(Handler: XErrorHandler): void; + + /** Application must register a document event handler to get sax events for the parsed stream. */ + setFastDocumentHandler(Handler: XFastDocumentHandler): void; + + /** + * sets a locale specified for localization of warnings and error messages. + * + * Set the language of the error messages. Useful when the parsing errors will be presented to the user. + */ + setLocale(locale: lang.Locale): void; + + /** @since LibreOffice 5.3 */ + setNamespaceHandler(Handler: XFastNamespaceHandler): void; + + /** must be registered to translate known XML names to integer tokens. */ + setTokenHandler(Handler: XFastTokenHandler): void; + } + + /** + * serializes a DOM tree by generating FastSAX events. + * @since OOo 3.1 + */ + interface XFastSAXSerializable { + /** + * serializes an object (e.g. a DOM tree) that represents an XML document by generating fast SAX events. + * @param handler the SAX event handler that should receive the generated events + * @param tokenHandler the fast SAX token handler that is used to translate names + * @param namespaces a list of namespace declarations that will be added to the root element node of the XML document This is necessary mostly because the + * @param registerNamespaces a list of namespace url / namespace token pairs. you need to register all namespace in order to have them recognized during ex + * @throws com::sun::star::xml::sax::SAXException if serializing the XML document fails + */ + fastSerialize( + handler: XFastDocumentHandler, tokenHandler: XFastTokenHandler, namespaces: LibreOffice.SeqEquiv, + registerNamespaces: LibreOffice.SeqEquiv>): void; + } + + /** + * receives notification of sax document events from a {@link XFastParser} . + * @see XFastDocumentHandler + */ + interface XFastShapeContextHandler extends XFastContextHandler { + DocumentProperties: document.XDocumentProperties; + DrawPage: drawing.XDrawPage; + MediaDescriptor: SafeArray; + Model: frame.XModel; + Position: awt.Point; + RelationFragmentPath: string; + Shape: drawing.XShape; + StartToken: number; + } + + /** + * interface to translate XML strings to integer tokens. + * + * An instance of this interface can be registered at a {@link XFastParser} . It should be able to translate all XML names (element local names, + * attribute local names and constant attribute values) to integer tokens. + * + * A token value must be greater or equal to zero and less than {@link FastToken.NAMESPACE} . If a string identifier is not known to this instance, + * {@link FastToken.DONTKNOW} is returned. + */ + interface XFastTokenHandler extends uno.XInterface { + /** + * returns a integer token for the given string + * @param Identifier the string given as a byte sequence encoded in UTF-8 + * @returns a unique integer token for the given String or {@link FastToken.DONTKNOW} if the identifier is not known to this instance. + */ + getTokenFromUTF8(Identifier: LibreOffice.SeqEquiv): number; + + /** returns a identifier for the given integer token as a byte sequence encoded in UTF-8. */ + getUTF8Identifier(Token: number): SafeArray; + } + + /** + * makes it possible to associate a SAX event with a document location. + * + * This interface is an IDL version of the Java interface **org.xml.sax.Locator** . + */ + interface XLocator extends uno.XInterface { + /** @returns the column number where the current document event ends. */ + readonly ColumnNumber: number; + + /** @returns the column number where the current document event ends. */ + getColumnNumber(): number; + + /** @returns the line number where the current document event ends. */ + getLineNumber(): number; + + /** @returns the public identifier for the current document event. */ + getPublicId(): string; + + /** @returns the system identifier for the current document event. */ + getSystemId(): string; + + /** @returns the line number where the current document event ends. */ + readonly LineNumber: number; + + /** @returns the public identifier for the current document event. */ + readonly PublicId: string; + + /** @returns the system identifier for the current document event. */ + readonly SystemId: string; + } + + /** + * specifies a SAX parser. + * + * This interface is an IDL version of the Java interface **org.xml.sax.Parser** with some minor adaptations. + */ + interface XParser extends uno.XInterface { + /** + * parses an XML document from a stream. + * + * Set the desired handlers before calling this method. + */ + parseStream(aInputSource: InputSource): void; + + /** allows an application to register a document event handler. */ + setDocumentHandler(xHandler: XDocumentHandler): void; + + /** allows an application to register a DTD-Handler. */ + setDTDHandler(xHandler: XDTDHandler): void; + + /** allows an application to register a DTD-Handler. */ + setEntityResolver(xResolver: XEntityResolver): void; + + /** + * allows an application to register an error event handler. + * + * Note that the error handler can throw an exception when an error or warning occurs. Note that an exception is thrown by the parser when an + * unrecoverable (fatal) error occurs. + */ + setErrorHandler(xHandler: XErrorHandler): void; + + /** + * sets a locale specified for localization of warnings and error messages. + * + * Set the language of the error messages. Useful when the parsing errors will be presented to the user. + */ + setLocale(locale: lang.Locale): void; + } + + /** + * serializes a DOM tree by generating SAX events. + * @since OOo 3.0 + */ + interface XSAXSerializable { + /** + * serializes an object (e.g. a DOM tree) that represents an XML document by generating SAX events. + * @param handler the SAX event handler that should receive the generated events + * @param namespaces a list of namespace declarations that will be added to the root element node of the XML document This is necessary mostly because the + * @throws com::sun::star::xml::sax::SAXException if serializing the XML document fails + */ + serialize(handler: XDocumentHandler, namespaces: LibreOffice.SeqEquiv): void; + } + + /** + * Provides a unified interface for the new-style {@link Writer} service to implement. + * @since LibreOffice 4.0 + */ + interface XWriter extends io.XActiveDataSource, XExtendedDocumentHandler { } + + namespace FastToken { + const enum Constants { + DONTKNOW = -1, + NAMESPACE = 65536, + } + } + } + + namespace wrapper { + /** + * Interface of XML Element Wrapper. + * + * This interface is used to wrap a element information, which make it enable to transfer the element information between different languages, such as + * C++/Java. + */ + type XXMLElementWrapper = uno.XInterface; + + /** Service of {@link XMLDocumentWrapper} */ + interface XMLDocumentWrapper extends XXMLDocumentWrapper, lang.XInitialization { } + + /** Service of {@link XMLElementWrapper} */ + interface XMLElementWrapper extends XXMLElementWrapper, lang.XUnoTunnel, lang.XInitialization { } + + /** + * Interface of XML Document Wrapper. + * + * When converting SAX events into a DOM tree, this interface is used to manipulate the DOM data in UNO perspective. + * + * Every language has its own methods to manipulate its native DOM data structure, this interface provides a common method set which each language have + * to implement. + * + * In another word, this interface wraps language dependent methods, then other component can manipulate DOM data through UNO methods. + */ + interface XXMLDocumentWrapper extends uno.XInterface { + /** + * Clears all useless element in a branch of the DOM tree along the tree order. + * @param node the start point of the branch to clear + * @param reservedDescendants an array including all elements that need to be reserved (along their ancestor path) + * @param stopAtNode the stop element. The operation have to interrupt when this element is met during clearing + */ + clearUselessData(node: XXMLElementWrapper, reservedDescendants: LibreOffice.SeqEquiv, stopAtNode: XXMLElementWrapper): void; + + /** + * Collapses a tree path + * + * Each element in the ancestor path of the node will be checked, if this element is empty, then deletes it. + * @param node the start point of the path from where the tree path will be collapsed + */ + collapse(node: XXMLElementWrapper): void; + + /** + * Gets the current element. + * @returns the current element in the SAX event stream + */ + CurrentElement: XXMLElementWrapper; + + /** + * Converts a part of the DOM tree into SAX events. + * @param handler the document handler which will receive generated SAX events + * @param saxEventKeeperHandler the SAXEventKeeper connecting with this XMLDocumentHandler + * @param startNode the start point to generate SAX events + * @param endNode the end point where to stop generating + */ + generateSAXEvents(handler: sax.XDocumentHandler, saxEventKeeperHandler: sax.XDocumentHandler, startNode: XXMLElementWrapper, endNode: XXMLElementWrapper): void; + + /** + * Gets the current element. + * @returns the current element in the SAX event stream + */ + getCurrentElement(): XXMLElementWrapper; + + /** + * Gets the name of the element. + * @param node the element whose name will be gotten + * @returns the name of the element + */ + getNodeName(node: XXMLElementWrapper): string; + + /** + * Converts the whole DOM tree into a SAX event stream. + * @param handler the document handler which will receive the SAX event stream + */ + getTree(handler: sax.XDocumentHandler): void; + + /** + * Checks whether an element is the current element. + * @param node the element to be checked + * @returns `true` if the node is the current element, `false` otherwise + */ + isCurrent(node: XXMLElementWrapper): boolean; + + /** + * Checks whether the current element is empty. + * @returns `true` if the current element is empty, `false` otherwise + */ + isCurrentElementEmpty(): boolean; + + /** + * Rebuild the ID attribute in the branch starting from the particular element. + * @param node the root element of the branch whose ID link will be built + */ + rebuildIDLink(node: XXMLElementWrapper): void; + + /** + * Removes the current element. + * + * When the current element is removed, then its parent element becomes the new current element. + */ + removeCurrentElement(): void; + + /** + * Sets the current element. + * + * When the current element is replaced outside of this interface, then uses this method can update the current element pointer. + * @param element the new current element + */ + setCurrentElement(element: XXMLElementWrapper): void; + } + } + + namespace xpath { + type XPathAPI = XXPathAPI; + + /** + * Exception that may occur when evaluating an XPath expression. + * @see XXPathAPI + * @since OOo 3.0 + */ + type XPathException = uno.Exception; + + const enum XPathObjectType { + XPATH_BOOLEAN = 2, + XPATH_LOCATIONSET = 7, + XPATH_NODESET = 1, + XPATH_NUMBER = 3, + XPATH_POINT = 5, + XPATH_RANGE = 6, + XPATH_STRING = 4, + XPATH_UNDEFINED = 0, + XPATH_USERS = 8, + XPATH_XSLT_TREE = 9, + } + + interface Libxml2ExtensionHandle { + functionData: number; + functionLookupFunction: number; + variableData: number; + variableLookupFunction: number; + } + + interface XPathExtension extends XXPathExtension { + createWithModel(Model: xforms.XModel, ContextNode: dom.XNode): void; + } + + interface XXPathAPI extends uno.XInterface { + /** + * Evaluate XPath Expression. + * @param contextNode the context node (expression is relative to this node) + * @param expr the XPath expression + * @returns an object representing the result of the XPath evaluation + * @see XXPathObject + * @throws XPathException if the expression is malformed, or evaluation fails + */ + eval(contextNode: dom.XNode, expr: string): XXPathObject; + + /** + * Evaluate XPath Expression. + * @param contextNode the context node (expression is relative to this node) + * @param expr the XPath expression + * @param namespaceNode all namespaces declared on this node will be registered + * @returns an object representing the result of the XPath evaluation + * @see XXPathObject + * @throws XPathException if the expression is malformed, or evaluation fails + */ + evalNS(contextNode: dom.XNode, expr: string, namespaceNode: dom.XNode): XXPathObject; + registerExtension(serviceName: string): void; + registerExtensionInstance(aExtension: XXPathExtension): void; + registerNS(prefix: string, url: string): void; + + /** + * Evaluate an XPath expression to select a list of nodes. + * @param contextNode the context node (expression is relative to this node) + * @param expr the XPath expression + * @returns result of the XPath evaluation: a list of nodes + * @see XNodeList + * @throws XPathException if the expression is malformed, or evaluation fails + */ + selectNodeList(contextNode: dom.XNode, expr: string): dom.XNodeList; + + /** + * Evaluate an XPath expression to select a list of nodes. + * @param contextNode the context node (expression is relative to this node) + * @param expr the XPath expression + * @param namespaceNode all namespaces declared on this node will be registered + * @returns result of the XPath evaluation: a list of nodes + * @see XNodeList + * @throws XPathException if the expression is malformed, or evaluation fails + */ + selectNodeListNS(contextNode: dom.XNode, expr: string, namespaceNode: dom.XNode): dom.XNodeList; + + /** + * Evaluate an XPath expression to select a single node. + * @param contextNode the context node (expression is relative to this node) + * @param expr the XPath expression + * @returns result of the XPath evaluation: a single node + * @throws XPathException if the expression is malformed, or evaluation fails + */ + selectSingleNode(contextNode: dom.XNode, expr: string): dom.XNode; + + /** + * Evaluate an XPath expression to select a single node. + * @param contextNode the context node (expression is relative to this node) + * @param expr the XPath expression + * @param namespaceNode all namespaces declared on this node will be registered + * @returns result of the XPath evaluation: a single node + * @throws XPathException if the expression is malformed, or evaluation fails + */ + selectSingleNodeNS(contextNode: dom.XNode, expr: string, namespaceNode: dom.XNode): dom.XNode; + unregisterNS(prefix: string, url: string): void; + } + + interface XXPathExtension extends uno.XInterface { + getLibxml2ExtensionHandle(): Libxml2ExtensionHandle; + readonly Libxml2ExtensionHandle: Libxml2ExtensionHandle; + } + + interface XXPathObject extends uno.XInterface { + /** get value of a boolean object */ + readonly Boolean: boolean; + + /** get number as byte */ + readonly Byte: number; + + /** get number as double */ + readonly Double: number; + + /** get number as float */ + readonly Float: number; + + /** get value of a boolean object */ + getBoolean(): boolean; + + /** get number as byte */ + getByte(): number; + + /** get number as double */ + getDouble(): number; + + /** get number as float */ + getFloat(): number; + + /** get number as hyper */ + getHyper(): number; + + /** get number as long */ + getLong(): number; + + /** get the nodes from a node list type object */ + getNodeList(): dom.XNodeList; + + /** get object type */ + getObjectType(): XPathObjectType; + + /** get number as short */ + getShort(): number; + + /** get string value */ + getString(): string; + + /** get number as hyper */ + readonly Hyper: number; + + /** get number as long */ + readonly Long: number; + + /** get the nodes from a node list type object */ + readonly NodeList: dom.XNodeList; + + /** get object type */ + readonly ObjectType: XPathObjectType; + + /** get number as short */ + readonly Short: number; + + /** get string value */ + readonly String: string; + } + } + + namespace xslt { + /** + * Get XSLT filter transformer supporting XSLT 2.0. + * @since LibreOffice 4.0 + */ + interface XSLT2Transformer extends XXSLTTransformer { + create(args: LibreOffice.SeqEquiv): void; + } + + /** + * Get unspecified XSLT filter transformer. + * + * It is not safe to expect support for any features except XSLT 1.0 . + * @since LibreOffice 4.0 + */ + interface XSLTTransformer extends XXSLTTransformer { + create(args: LibreOffice.SeqEquiv): void; + } + + /** + * An interface for XSLT transformers. + * @since LibreOffice 4.0 + */ + interface XXSLTTransformer extends io.XActiveDataControl, io.XActiveDataSink, io.XActiveDataSource, lang.XInitialization { } + } + } + + namespace xsd { + /** specifies an [XSD compliant boolean type]{@link url="http://www.w3.org/TR/xmlschema-2/#boolean"} */ + type Boolean = XDataType; + + /** specifies an [XSD compliant date type]{@link url="http://www.w3.org/TR/xmlschema-2/#date"} */ + interface Date extends XDataType { + /** + * specifies the exclusive upper bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-maxExclusive + */ + MaxExclusiveDate: util.Date; + + /** + * specifies the inclusive upper bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-maxInclusive + */ + MaxInclusiveDate: util.Date; + + /** + * specifies the exclusive lower bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-minExclusive + */ + MinExclusiveDate: util.Date; + + /** + * specifies the inclusive lower bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-minInclusive + */ + MinInclusiveDate: util.Date; + } + + /** specifies an [XSD compliant dateTime type]{@link url="http://www.w3.org/TR/xmlschema-2/#dateTime"} */ + interface DateTime extends XDataType { + /** + * specifies the exclusive upper bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-maxExclusive + */ + MaxExclusiveDateTime: util.DateTime; + + /** + * specifies the inclusive upper bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-maxInclusive + */ + MaxInclusiveDateTime: util.DateTime; + + /** + * specifies the exclusive lower bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-minExclusive + */ + MinExclusiveDateTime: util.DateTime; + + /** + * specifies the inclusive lower bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-minInclusive + */ + MinInclusiveDateTime: util.DateTime; + } + + /** specifies an [XSD compliant gDay type]{@link url="http://www.w3.org/TR/xmlschema-2/#gDay"} */ + interface Day extends XDataType { + /** + * specifies the exclusive upper bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-maxExclusive + */ + MaxExclusiveInt: number; + + /** + * specifies the inclusive upper bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-maxInclusive + */ + MaxInclusiveInt: number; + + /** + * specifies the exclusive lower bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-minExclusive + */ + MinExclusiveInt: number; + + /** + * specifies the inclusive lower bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-minInclusive + */ + MinInclusiveInt: number; + } + + /** specifies an [XSD compliant decimal type]{@link url="http://www.w3.org/TR/xmlschema-2/#decimal"} */ + interface Decimal extends XDataType { + /** + * fractionDigits is the maximum number of digits in the fractional part of values of decimal data + * + * The value of fractionDigits must be a non negative integer. + * + * See [http://www.w3.org/TR/xmlschema-2/#rf-fractionDigits]{@link url="http://www.w3.org/TR/xmlschema-2/#rf-fractionDigits"} + */ + FractionDigits: number; + + /** + * specifies the exclusive upper bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-maxExclusive + */ + MaxExclusiveDouble: number; + + /** + * specifies the inclusive upper bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-maxInclusive + */ + MaxInclusiveDouble: number; + + /** + * specifies the exclusive lower bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-minExclusive + */ + MinExclusiveDouble: number; + + /** + * specifies the inclusive lower bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-minInclusive + */ + MinInclusiveDouble: number; + + /** + * totalDigits is the maximum number of digits in values of decimal data types. + * + * The value of totalDigits must be a positive integer. + * + * See [http://www.w3.org/TR/xmlschema-2/#rf-totalDigits]{@link url="http://www.w3.org/TR/xmlschema-2/#rf-totalDigits"} + */ + TotalDigits: number; + } + + /** specifies an [XSD compliant gMonth type]{@link url="http://www.w3.org/TR/xmlschema-2/#gMonth"} */ + interface Month extends XDataType { + /** + * specifies the exclusive upper bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-maxExclusive + */ + MaxExclusiveInt: number; + + /** + * specifies the inclusive upper bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-maxInclusive + */ + MaxInclusiveInt: number; + + /** + * specifies the exclusive lower bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-minExclusive + */ + MinExclusiveInt: number; + + /** + * specifies the inclusive lower bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-minInclusive + */ + MinInclusiveInt: number; + } + + /** specifies an [XSD compliant string type]{@link url="http://www.w3.org/TR/xmlschema-2/#string"} */ + interface String extends XDataType { + /** + * specifies the length of the string + * + * Note that you cannot specify {@link Length} together with {@link MinLength} or {@link MaxLength} . + */ + Length: number; + + /** + * specifies the maximum length of the string + * + * Note that you cannot specify {@link MaxLength} together with {@link Length} . + */ + MaxLength: number; + + /** + * specifies the minimum length of the string + * + * Note that you cannot specify {@link MinLength} together with {@link Length} . + */ + MinLength: number; + } + + /** specifies an [XSD compliant time type]{@link url="http://www.w3.org/TR/xmlschema-2/#time"} */ + interface Time extends XDataType { + /** + * specifies the exclusive upper bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-maxExclusive + */ + MaxExclusiveTime: util.Time; + + /** + * specifies the inclusive upper bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-maxInclusive + */ + MaxInclusiveTime: util.Time; + + /** + * specifies the exclusive lower bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-minExclusive + */ + MinExclusiveTime: util.Time; + + /** + * specifies the inclusive lower bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-minInclusive + */ + MinInclusiveTime: util.Time; + } + + /** specifies an [XSD compliant simple data type]{@link url="http://www.w3.org/TR/xmlschema-2/#built-in-datatypes"} */ + interface XDataType extends beans.XPropertySet { + explainInvalid(value: string): string; + + /** + * specifies whether the type is a basic type + * + * Basic types are built into the type system, and cannot be changed by the user. + */ + IsBasic: boolean; + + /** provides access to the name of the type */ + Name: string; + + /** + * specifies the pattern which strings conforming to this type comply to + * + * See [http://www.w3.org/TR/xmlschema-2/#rf-pattern]{@link url="http://www.w3.org/TR/xmlschema-2/#rf-pattern"} + */ + Pattern: string; + + /** + * class of the type + * @see DataTypeClass + */ + TypeClass: number; + validate(value: string): boolean; + + /** + * specifies how strings of this data type are to be processed, with respect to white spaces + * + * See [http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace]{@link url="http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace"} + */ + WhiteSpaceTreatment: number; + } + + /** specifies an [XSD compliant gYear type]{@link url="http://www.w3.org/TR/xmlschema-2/#gYear"} */ + interface Year extends XDataType { + /** + * specifies the exclusive upper bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-maxExclusive + */ + MaxExclusiveInt: number; + + /** + * specifies the inclusive upper bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-maxInclusive + */ + MaxInclusiveInt: number; + + /** + * specifies the exclusive lower bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-minExclusive + */ + MinExclusiveInt: number; + + /** + * specifies the inclusive lower bound for the value + * @see http://www.w3.org/TR/xmlschema-2/#rf-minInclusive + */ + MinInclusiveInt: number; + } + + namespace DataTypeClass { + const enum Constants { + anyURI = 17, + base64Binary = 16, + BOOLEAN = 2, + DATE = 9, + DATETIME = 7, + DECIMAL = 3, + DOUBLE = 5, + DURATION = 6, + FLOAT = 4, + gDay = 13, + gMonth = 14, + gMonthDay = 12, + gYear = 11, + gYearMonth = 10, + hexBinary = 15, + NOTATION = 19, + QName = 18, + STRING = 1, + TIME = 8, + } + } + + namespace WhiteSpaceTreatment { + const enum Constants { + Collapse = 2, + Preserve = 0, + Replace = 1, + } + } + } +} + +interface ActiveXObject { + new(progid: 'com.sun.star.ServiceManager'): LibreOffice.AutomationServiceManager; +} + +declare namespace org.freedesktop.PackageKit { + type SyncDbusSessionHelper = XSyncDbusSessionHelper; + + /** + * The interface used for modifying the package database. + * @see https://git.gnome.org/browse/gnome-software/tree/src/org.freedesktop.PackageKit.xml for documentation of the corresponding D-Bus interface + */ + interface XModify extends com.sun.star.uno.XInterface { + /** + * Installs sequence< string > packages to provide sequence< string > files. + * @since LibreOffice 4.0 + */ + InstallCatalogs(xid: number, files: LibreOffice.SeqEquiv, interaction: string): void; + + /** + * Installs fontconfig resources ( [in] usually fonts) from a configured software source. + * @since LibreOffice 4.0 + */ + InstallFontconfigResources(xid: number, resources: LibreOffice.SeqEquiv, interaction: string): void; + + /** + * Installs GStreamer resources ( [in] usually codecs) from a configured software source. + * @since LibreOffice 4.0 + */ + InstallGStreamerResources(xid: number, resources: LibreOffice.SeqEquiv, interaction: string): void; + + /** + * Installs mimetype handlers from a configured software source. + * @since LibreOffice 4.0 + */ + InstallMimeTypes(xid: number, mimeTypes: LibreOffice.SeqEquiv, interaction: string): void; + + /** + * Installs local package sequence< string > files or service packs. + * @since LibreOffice 4.0 + */ + InstallPackageFiles(xid: number, files: LibreOffice.SeqEquiv, interaction: string): void; + + /** + * Installs sequence< string > packages from a configured software source. + * @since LibreOffice 4.0 + */ + InstallPackageNames(xid: number, packages: LibreOffice.SeqEquiv, interaction: string): void; + + /** + * Installs printer drivers from a configured software source. + * @since LibreOffice 4.0 + */ + InstallPrinterDrivers(xid: number, files: LibreOffice.SeqEquiv, interaction: string): void; + + /** + * Installs sequence< string > packages to provide sequence< string > files. + * @since LibreOffice 4.0 + */ + InstallProvideFiles(xid: number, files: LibreOffice.SeqEquiv, interaction: string): void; + + /** + * Installs resources of a given type from a configured software source. + * @since LibreOffice 4.0 + */ + InstallResources(xid: number, types: LibreOffice.SeqEquiv, resources: LibreOffice.SeqEquiv, interaction: string): void; + + /** + * Removes sequence< string > packages that provide the given local sequence< string > files. + * @since LibreOffice 4.0 + */ + RemovePackageByFiles(xid: number, files: LibreOffice.SeqEquiv, interaction: string): void; + } + + /** + * The interface used for quering the package database. + * @see https://git.gnome.org/browse/gnome-software/tree/src/org.freedesktop.PackageKit.xml for documentation of the corresponding D-Bus interface + */ + interface XQuery extends com.sun.star.uno.XInterface { + /** + * Installs local package files or service packs. + * @since LibreOffice 4.0 + */ + IsInstalled(packageName: string, interaction: string, installed: [boolean]): void; + + /** + * Installs packages to provide files. + * @since LibreOffice 4.0 + */ + SearchFile(fileName: string, interaction: string, installed: [boolean], packageName: [string]): void; + } + + interface XSyncDbusSessionHelper extends XModify, XQuery { } +} + +/** Helper types which are not part of the UNO API */ +declare namespace LibreOffice { + type InstantiableNameMap = ServicesNameMap & StructNameMap; + + type SeqEquiv = SafeArray | sequence | T[]; + + interface AutomationScriptContext extends com.sun.star.container.XNameAccess { + getByName(aName: K): SingletonsNameMap[K]; + getByName(aName: string): any; + } + + interface AutomationServiceManager extends com.sun.star.lang.ServiceManager { + Bridge_GetStruct(structName: K): StructNameMap[K]; + + /** + * Returns a Value Object, for explicitly specifying the types of values passed into the UNO API + * Can also be used for `out` and `inout` parameters + */ + Bridge_GetValueObject(): void; + defaultContext: AutomationScriptContext; + } + + interface ServicesNameMap { + 'com.sun.star.accessibility.Accessible': com.sun.star.accessibility.Accessible; + 'com.sun.star.accessibility.AccessibleContext': com.sun.star.accessibility.AccessibleContext; + 'com.sun.star.accessibility.MSAAService': com.sun.star.accessibility.MSAAService; + 'com.sun.star.animations.AnimateColor': com.sun.star.animations.AnimateColor; + 'com.sun.star.animations.AnimateMotion': com.sun.star.animations.AnimateMotion; + 'com.sun.star.animations.AnimateSet': com.sun.star.animations.AnimateSet; + 'com.sun.star.animations.Audio': com.sun.star.animations.Audio; + 'com.sun.star.animations.Command': com.sun.star.animations.Command; + 'com.sun.star.animations.IterateContainer': com.sun.star.animations.IterateContainer; + 'com.sun.star.animations.ParallelTimeContainer': com.sun.star.animations.ParallelTimeContainer; + 'com.sun.star.animations.SequenceTimeContainer': com.sun.star.animations.SequenceTimeContainer; + 'com.sun.star.auth.SSOManagerFactory': com.sun.star.auth.SSOManagerFactory; + 'com.sun.star.auth.SSOPasswordCache': com.sun.star.auth.SSOPasswordCache; + 'com.sun.star.awt.AccessibleButton': com.sun.star.awt.AccessibleButton; + 'com.sun.star.awt.AccessibleCheckBox': com.sun.star.awt.AccessibleCheckBox; + 'com.sun.star.awt.AccessibleComboBox': com.sun.star.awt.AccessibleComboBox; + 'com.sun.star.awt.AccessibleDropDownComboBox': com.sun.star.awt.AccessibleDropDownComboBox; + 'com.sun.star.awt.AccessibleDropDownListBox': com.sun.star.awt.AccessibleDropDownListBox; + 'com.sun.star.awt.AccessibleEdit': com.sun.star.awt.AccessibleEdit; + 'com.sun.star.awt.AccessibleFixedText': com.sun.star.awt.AccessibleFixedText; + 'com.sun.star.awt.AccessibleIconChoiceControl': com.sun.star.awt.AccessibleIconChoiceControl; + 'com.sun.star.awt.AccessibleIconChoiceControlEntry': com.sun.star.awt.AccessibleIconChoiceControlEntry; + 'com.sun.star.awt.AccessibleList': com.sun.star.awt.AccessibleList; + 'com.sun.star.awt.AccessibleListBox': com.sun.star.awt.AccessibleListBox; + 'com.sun.star.awt.AccessibleListBoxList': com.sun.star.awt.AccessibleListBoxList; + 'com.sun.star.awt.AccessibleListItem': com.sun.star.awt.AccessibleListItem; + 'com.sun.star.awt.AccessibleMenu': com.sun.star.awt.AccessibleMenu; + 'com.sun.star.awt.AccessibleMenuBar': com.sun.star.awt.AccessibleMenuBar; + 'com.sun.star.awt.AccessibleMenuItem': com.sun.star.awt.AccessibleMenuItem; + 'com.sun.star.awt.AccessibleMenuSeparator': com.sun.star.awt.AccessibleMenuSeparator; + 'com.sun.star.awt.AccessiblePopupMenu': com.sun.star.awt.AccessiblePopupMenu; + 'com.sun.star.awt.AccessibleRadioButton': com.sun.star.awt.AccessibleRadioButton; + 'com.sun.star.awt.AccessibleScrollBar': com.sun.star.awt.AccessibleScrollBar; + 'com.sun.star.awt.AccessibleStatusBar': com.sun.star.awt.AccessibleStatusBar; + 'com.sun.star.awt.AccessibleStatusBarItem': com.sun.star.awt.AccessibleStatusBarItem; + 'com.sun.star.awt.AccessibleTabBar': com.sun.star.awt.AccessibleTabBar; + 'com.sun.star.awt.AccessibleTabBarPage': com.sun.star.awt.AccessibleTabBarPage; + 'com.sun.star.awt.AccessibleTabBarPageList': com.sun.star.awt.AccessibleTabBarPageList; + 'com.sun.star.awt.AccessibleTabControl': com.sun.star.awt.AccessibleTabControl; + 'com.sun.star.awt.AccessibleTabPage': com.sun.star.awt.AccessibleTabPage; + 'com.sun.star.awt.AccessibleTextField': com.sun.star.awt.AccessibleTextField; + 'com.sun.star.awt.AccessibleToolBox': com.sun.star.awt.AccessibleToolBox; + 'com.sun.star.awt.AccessibleToolBoxItem': com.sun.star.awt.AccessibleToolBoxItem; + 'com.sun.star.awt.AccessibleTreeListBox': com.sun.star.awt.AccessibleTreeListBox; + 'com.sun.star.awt.AccessibleTreeListBoxEntry': com.sun.star.awt.AccessibleTreeListBoxEntry; + 'com.sun.star.awt.AccessibleWindow': com.sun.star.awt.AccessibleWindow; + 'com.sun.star.awt.AnimatedImagesControl': com.sun.star.awt.AnimatedImagesControl; + 'com.sun.star.awt.AnimatedImagesControlModel': com.sun.star.awt.AnimatedImagesControlModel; + 'com.sun.star.awt.AsyncCallback': com.sun.star.awt.AsyncCallback; + 'com.sun.star.awt.ContainerWindowProvider': com.sun.star.awt.ContainerWindowProvider; + 'com.sun.star.awt.DialogProvider': com.sun.star.awt.DialogProvider; + 'com.sun.star.awt.DialogProvider2': com.sun.star.awt.DialogProvider2; + 'com.sun.star.awt.grid.DefaultGridColumnModel': com.sun.star.awt.grid.DefaultGridColumnModel; + 'com.sun.star.awt.grid.DefaultGridDataModel': com.sun.star.awt.grid.DefaultGridDataModel; + 'com.sun.star.awt.grid.GridColumn': com.sun.star.awt.grid.GridColumn; + 'com.sun.star.awt.grid.SortableGridDataModel': com.sun.star.awt.grid.SortableGridDataModel; + 'com.sun.star.awt.grid.UnoControlGrid': com.sun.star.awt.grid.UnoControlGrid; + 'com.sun.star.awt.grid.UnoControlGridModel': com.sun.star.awt.grid.UnoControlGridModel; + 'com.sun.star.awt.MenuBar': com.sun.star.awt.MenuBar; + 'com.sun.star.awt.Pointer': com.sun.star.awt.Pointer; + 'com.sun.star.awt.PopupMenu': com.sun.star.awt.PopupMenu; + 'com.sun.star.awt.PrinterServer': com.sun.star.awt.PrinterServer; + 'com.sun.star.awt.RoadmapItem': com.sun.star.awt.RoadmapItem; + 'com.sun.star.awt.SpinningProgressControlModel': com.sun.star.awt.SpinningProgressControlModel; + 'com.sun.star.awt.tab.UnoControlTabPage': com.sun.star.awt.tab.UnoControlTabPage; + 'com.sun.star.awt.tab.UnoControlTabPageContainer': com.sun.star.awt.tab.UnoControlTabPageContainer; + 'com.sun.star.awt.tab.UnoControlTabPageContainerModel': com.sun.star.awt.tab.UnoControlTabPageContainerModel; + 'com.sun.star.awt.tab.UnoControlTabPageModel': com.sun.star.awt.tab.UnoControlTabPageModel; + 'com.sun.star.awt.TabController': com.sun.star.awt.TabController; + 'com.sun.star.awt.TabControllerModel': com.sun.star.awt.TabControllerModel; + 'com.sun.star.awt.Toolkit': com.sun.star.awt.Toolkit; + 'com.sun.star.awt.tree.MutableTreeDataModel': com.sun.star.awt.tree.MutableTreeDataModel; + 'com.sun.star.awt.tree.MutableTreeNode': com.sun.star.awt.tree.MutableTreeNode; + 'com.sun.star.awt.tree.TreeControl': com.sun.star.awt.tree.TreeControl; + 'com.sun.star.awt.tree.TreeControlModel': com.sun.star.awt.tree.TreeControlModel; + 'com.sun.star.awt.UnoControl': com.sun.star.awt.UnoControl; + 'com.sun.star.awt.UnoControlButton': com.sun.star.awt.UnoControlButton; + 'com.sun.star.awt.UnoControlButtonModel': com.sun.star.awt.UnoControlButtonModel; + 'com.sun.star.awt.UnoControlCheckBox': com.sun.star.awt.UnoControlCheckBox; + 'com.sun.star.awt.UnoControlCheckBoxModel': com.sun.star.awt.UnoControlCheckBoxModel; + 'com.sun.star.awt.UnoControlComboBox': com.sun.star.awt.UnoControlComboBox; + 'com.sun.star.awt.UnoControlComboBoxModel': com.sun.star.awt.UnoControlComboBoxModel; + 'com.sun.star.awt.UnoControlContainer': com.sun.star.awt.UnoControlContainer; + 'com.sun.star.awt.UnoControlContainerModel': com.sun.star.awt.UnoControlContainerModel; + 'com.sun.star.awt.UnoControlCurrencyField': com.sun.star.awt.UnoControlCurrencyField; + 'com.sun.star.awt.UnoControlCurrencyFieldModel': com.sun.star.awt.UnoControlCurrencyFieldModel; + 'com.sun.star.awt.UnoControlDateField': com.sun.star.awt.UnoControlDateField; + 'com.sun.star.awt.UnoControlDateFieldModel': com.sun.star.awt.UnoControlDateFieldModel; + 'com.sun.star.awt.UnoControlDialog': com.sun.star.awt.UnoControlDialog; + 'com.sun.star.awt.UnoControlDialogElement': com.sun.star.awt.UnoControlDialogElement; + 'com.sun.star.awt.UnoControlDialogModel': com.sun.star.awt.UnoControlDialogModel; + 'com.sun.star.awt.UnoControlDialogModelProvider': com.sun.star.awt.UnoControlDialogModelProvider; + 'com.sun.star.awt.UnoControlEdit': com.sun.star.awt.UnoControlEdit; + 'com.sun.star.awt.UnoControlEditModel': com.sun.star.awt.UnoControlEditModel; + 'com.sun.star.awt.UnoControlFileControl': com.sun.star.awt.UnoControlFileControl; + 'com.sun.star.awt.UnoControlFileControlModel': com.sun.star.awt.UnoControlFileControlModel; + 'com.sun.star.awt.UnoControlFixedHyperlink': com.sun.star.awt.UnoControlFixedHyperlink; + 'com.sun.star.awt.UnoControlFixedHyperlinkModel': com.sun.star.awt.UnoControlFixedHyperlinkModel; + 'com.sun.star.awt.UnoControlFixedLine': com.sun.star.awt.UnoControlFixedLine; + 'com.sun.star.awt.UnoControlFixedLineModel': com.sun.star.awt.UnoControlFixedLineModel; + 'com.sun.star.awt.UnoControlFixedText': com.sun.star.awt.UnoControlFixedText; + 'com.sun.star.awt.UnoControlFixedTextModel': com.sun.star.awt.UnoControlFixedTextModel; + 'com.sun.star.awt.UnoControlFormattedField': com.sun.star.awt.UnoControlFormattedField; + 'com.sun.star.awt.UnoControlFormattedFieldModel': com.sun.star.awt.UnoControlFormattedFieldModel; + 'com.sun.star.awt.UnoControlGroupBox': com.sun.star.awt.UnoControlGroupBox; + 'com.sun.star.awt.UnoControlGroupBoxModel': com.sun.star.awt.UnoControlGroupBoxModel; + 'com.sun.star.awt.UnoControlImageControl': com.sun.star.awt.UnoControlImageControl; + 'com.sun.star.awt.UnoControlImageControlModel': com.sun.star.awt.UnoControlImageControlModel; + 'com.sun.star.awt.UnoControlListBox': com.sun.star.awt.UnoControlListBox; + 'com.sun.star.awt.UnoControlListBoxModel': com.sun.star.awt.UnoControlListBoxModel; + 'com.sun.star.awt.UnoControlModel': com.sun.star.awt.UnoControlModel; + 'com.sun.star.awt.UnoControlNumericField': com.sun.star.awt.UnoControlNumericField; + 'com.sun.star.awt.UnoControlNumericFieldModel': com.sun.star.awt.UnoControlNumericFieldModel; + 'com.sun.star.awt.UnoControlPatternField': com.sun.star.awt.UnoControlPatternField; + 'com.sun.star.awt.UnoControlPatternFieldModel': com.sun.star.awt.UnoControlPatternFieldModel; + 'com.sun.star.awt.UnoControlProgressBar': com.sun.star.awt.UnoControlProgressBar; + 'com.sun.star.awt.UnoControlProgressBarModel': com.sun.star.awt.UnoControlProgressBarModel; + 'com.sun.star.awt.UnoControlRadioButton': com.sun.star.awt.UnoControlRadioButton; + 'com.sun.star.awt.UnoControlRadioButtonModel': com.sun.star.awt.UnoControlRadioButtonModel; + 'com.sun.star.awt.UnoControlRoadmap': com.sun.star.awt.UnoControlRoadmap; + 'com.sun.star.awt.UnoControlRoadmapModel': com.sun.star.awt.UnoControlRoadmapModel; + 'com.sun.star.awt.UnoControlScrollBar': com.sun.star.awt.UnoControlScrollBar; + 'com.sun.star.awt.UnoControlScrollBarModel': com.sun.star.awt.UnoControlScrollBarModel; + 'com.sun.star.awt.UnoControlSpinButton': com.sun.star.awt.UnoControlSpinButton; + 'com.sun.star.awt.UnoControlSpinButtonModel': com.sun.star.awt.UnoControlSpinButtonModel; + 'com.sun.star.awt.UnoControlTimeField': com.sun.star.awt.UnoControlTimeField; + 'com.sun.star.awt.UnoControlTimeFieldModel': com.sun.star.awt.UnoControlTimeFieldModel; + 'com.sun.star.beans.Introspection': com.sun.star.beans.Introspection; + 'com.sun.star.beans.PropertyBag': com.sun.star.beans.PropertyBag; + 'com.sun.star.beans.PropertySet': com.sun.star.beans.PropertySet; + 'com.sun.star.bridge.Bridge': com.sun.star.bridge.Bridge; + 'com.sun.star.bridge.BridgeFactory': com.sun.star.bridge.BridgeFactory; + 'com.sun.star.bridge.IiopBridge': com.sun.star.bridge.IiopBridge; + 'com.sun.star.bridge.OleApplicationRegistration': com.sun.star.bridge.OleApplicationRegistration; + 'com.sun.star.bridge.oleautomation.ApplicationRegistration': com.sun.star.bridge.oleautomation.ApplicationRegistration; + 'com.sun.star.bridge.oleautomation.BridgeSupplier': com.sun.star.bridge.oleautomation.BridgeSupplier; + 'com.sun.star.bridge.oleautomation.Factory': com.sun.star.bridge.oleautomation.Factory; + 'com.sun.star.bridge.OleBridgeSupplier': com.sun.star.bridge.OleBridgeSupplier; + 'com.sun.star.bridge.OleBridgeSupplier2': com.sun.star.bridge.OleBridgeSupplier2; + 'com.sun.star.bridge.OleBridgeSupplierVar1': com.sun.star.bridge.OleBridgeSupplierVar1; + 'com.sun.star.bridge.OleObjectFactory': com.sun.star.bridge.OleObjectFactory; + 'com.sun.star.bridge.UnoUrlResolver': com.sun.star.bridge.UnoUrlResolver; + 'com.sun.star.bridge.UrpBridge': com.sun.star.bridge.UrpBridge; + 'com.sun.star.chart.AccessibleChartDocumentView': com.sun.star.chart.AccessibleChartDocumentView; + 'com.sun.star.chart.AccessibleChartElement': com.sun.star.chart.AccessibleChartElement; + 'com.sun.star.chart.AreaDiagram': com.sun.star.chart.AreaDiagram; + 'com.sun.star.chart.BarDiagram': com.sun.star.chart.BarDiagram; + 'com.sun.star.chart.BubbleDiagram': com.sun.star.chart.BubbleDiagram; + 'com.sun.star.chart.Chart3DBarProperties': com.sun.star.chart.Chart3DBarProperties; + 'com.sun.star.chart.ChartArea': com.sun.star.chart.ChartArea; + 'com.sun.star.chart.ChartAxis': com.sun.star.chart.ChartAxis; + 'com.sun.star.chart.ChartAxisXSupplier': com.sun.star.chart.ChartAxisXSupplier; + 'com.sun.star.chart.ChartAxisYSupplier': com.sun.star.chart.ChartAxisYSupplier; + 'com.sun.star.chart.ChartAxisZSupplier': com.sun.star.chart.ChartAxisZSupplier; + 'com.sun.star.chart.ChartData': com.sun.star.chart.ChartData; + 'com.sun.star.chart.ChartDataArray': com.sun.star.chart.ChartDataArray; + 'com.sun.star.chart.ChartDataPointProperties': com.sun.star.chart.ChartDataPointProperties; + 'com.sun.star.chart.ChartDataRowProperties': com.sun.star.chart.ChartDataRowProperties; + 'com.sun.star.chart.ChartDocument': com.sun.star.chart.ChartDocument; + 'com.sun.star.chart.ChartGrid': com.sun.star.chart.ChartGrid; + 'com.sun.star.chart.ChartLegend': com.sun.star.chart.ChartLegend; + 'com.sun.star.chart.ChartLine': com.sun.star.chart.ChartLine; + 'com.sun.star.chart.ChartPieSegmentProperties': com.sun.star.chart.ChartPieSegmentProperties; + 'com.sun.star.chart.ChartStatistics': com.sun.star.chart.ChartStatistics; + 'com.sun.star.chart.ChartTableAddressSupplier': com.sun.star.chart.ChartTableAddressSupplier; + 'com.sun.star.chart.ChartTitle': com.sun.star.chart.ChartTitle; + 'com.sun.star.chart.ChartTwoAxisXSupplier': com.sun.star.chart.ChartTwoAxisXSupplier; + 'com.sun.star.chart.ChartTwoAxisYSupplier': com.sun.star.chart.ChartTwoAxisYSupplier; + 'com.sun.star.chart.Diagram': com.sun.star.chart.Diagram; + 'com.sun.star.chart.Dim3DDiagram': com.sun.star.chart.Dim3DDiagram; + 'com.sun.star.chart.DonutDiagram': com.sun.star.chart.DonutDiagram; + 'com.sun.star.chart.FilledNetDiagram': com.sun.star.chart.FilledNetDiagram; + 'com.sun.star.chart.LineDiagram': com.sun.star.chart.LineDiagram; + 'com.sun.star.chart.NetDiagram': com.sun.star.chart.NetDiagram; + 'com.sun.star.chart.PieDiagram': com.sun.star.chart.PieDiagram; + 'com.sun.star.chart.StackableDiagram': com.sun.star.chart.StackableDiagram; + 'com.sun.star.chart.StockDiagram': com.sun.star.chart.StockDiagram; + 'com.sun.star.chart.XYDiagram': com.sun.star.chart.XYDiagram; + 'com.sun.star.chart2.Axis': com.sun.star.chart2.Axis; + 'com.sun.star.chart2.CandleStickChartType': com.sun.star.chart2.CandleStickChartType; + 'com.sun.star.chart2.CartesianCoordinateSystem2d': com.sun.star.chart2.CartesianCoordinateSystem2d; + 'com.sun.star.chart2.CartesianCoordinateSystem3d': com.sun.star.chart2.CartesianCoordinateSystem3d; + 'com.sun.star.chart2.ChartDocument': com.sun.star.chart2.ChartDocument; + 'com.sun.star.chart2.ChartDocumentWrapper': com.sun.star.chart2.ChartDocumentWrapper; + 'com.sun.star.chart2.ChartType': com.sun.star.chart2.ChartType; + 'com.sun.star.chart2.ChartTypeManager': com.sun.star.chart2.ChartTypeManager; + 'com.sun.star.chart2.ChartTypeTemplate': com.sun.star.chart2.ChartTypeTemplate; + 'com.sun.star.chart2.CoordinateSystem': com.sun.star.chart2.CoordinateSystem; + 'com.sun.star.chart2.CoordinateSystemType': com.sun.star.chart2.CoordinateSystemType; + 'com.sun.star.chart2.data.DatabaseDataProvider': com.sun.star.chart2.data.DatabaseDataProvider; + 'com.sun.star.chart2.data.DataFilter': com.sun.star.chart2.data.DataFilter; + 'com.sun.star.chart2.data.DataProvider': com.sun.star.chart2.data.DataProvider; + 'com.sun.star.chart2.data.DataSequence': com.sun.star.chart2.data.DataSequence; + 'com.sun.star.chart2.data.DataSink': com.sun.star.chart2.data.DataSink; + 'com.sun.star.chart2.data.DataSource': com.sun.star.chart2.data.DataSource; + 'com.sun.star.chart2.data.LabeledDataSequence': com.sun.star.chart2.data.LabeledDataSequence; + 'com.sun.star.chart2.data.RangeHighlighter': com.sun.star.chart2.data.RangeHighlighter; + 'com.sun.star.chart2.data.RangeHighlightListener': com.sun.star.chart2.data.RangeHighlightListener; + 'com.sun.star.chart2.data.TabularDataProviderArguments': com.sun.star.chart2.data.TabularDataProviderArguments; + 'com.sun.star.chart2.DataPoint': com.sun.star.chart2.DataPoint; + 'com.sun.star.chart2.DataPointProperties': com.sun.star.chart2.DataPointProperties; + 'com.sun.star.chart2.DataSeries': com.sun.star.chart2.DataSeries; + 'com.sun.star.chart2.Diagram': com.sun.star.chart2.Diagram; + 'com.sun.star.chart2.ErrorBar': com.sun.star.chart2.ErrorBar; + 'com.sun.star.chart2.ExponentialRegressionCurve': com.sun.star.chart2.ExponentialRegressionCurve; + 'com.sun.star.chart2.ExponentialScaling': com.sun.star.chart2.ExponentialScaling; + 'com.sun.star.chart2.FormattedString': com.sun.star.chart2.FormattedString; + 'com.sun.star.chart2.GridProperties': com.sun.star.chart2.GridProperties; + 'com.sun.star.chart2.Legend': com.sun.star.chart2.Legend; + 'com.sun.star.chart2.LinearRegressionCurve': com.sun.star.chart2.LinearRegressionCurve; + 'com.sun.star.chart2.LinearScaling': com.sun.star.chart2.LinearScaling; + 'com.sun.star.chart2.LogarithmicRegressionCurve': com.sun.star.chart2.LogarithmicRegressionCurve; + 'com.sun.star.chart2.LogarithmicScaling': com.sun.star.chart2.LogarithmicScaling; + 'com.sun.star.chart2.LogicTargetModel': com.sun.star.chart2.LogicTargetModel; + 'com.sun.star.chart2.MovingAverageRegressionCurve': com.sun.star.chart2.MovingAverageRegressionCurve; + 'com.sun.star.chart2.PolarCoordinateSystem2d': com.sun.star.chart2.PolarCoordinateSystem2d; + 'com.sun.star.chart2.PolarCoordinateSystem3d': com.sun.star.chart2.PolarCoordinateSystem3d; + 'com.sun.star.chart2.PolynomialRegressionCurve': com.sun.star.chart2.PolynomialRegressionCurve; + 'com.sun.star.chart2.PotentialRegressionCurve': com.sun.star.chart2.PotentialRegressionCurve; + 'com.sun.star.chart2.PowerScaling': com.sun.star.chart2.PowerScaling; + 'com.sun.star.chart2.PropertyPool': com.sun.star.chart2.PropertyPool; + 'com.sun.star.chart2.RegressionCurve': com.sun.star.chart2.RegressionCurve; + 'com.sun.star.chart2.RegressionCurveEquation': com.sun.star.chart2.RegressionCurveEquation; + 'com.sun.star.chart2.RegressionEquation': com.sun.star.chart2.RegressionEquation; + 'com.sun.star.chart2.Scaling': com.sun.star.chart2.Scaling; + 'com.sun.star.chart2.StandardDiagramCreationParameters': com.sun.star.chart2.StandardDiagramCreationParameters; + 'com.sun.star.chart2.Title': com.sun.star.chart2.Title; + 'com.sun.star.configuration.AccessRootElement': com.sun.star.configuration.AccessRootElement; + 'com.sun.star.configuration.AdministrationProvider': com.sun.star.configuration.AdministrationProvider; + 'com.sun.star.configuration.backend.Backend': com.sun.star.configuration.backend.Backend; + 'com.sun.star.configuration.backend.BackendAdapter': com.sun.star.configuration.backend.BackendAdapter; + 'com.sun.star.configuration.backend.CopyImporter': com.sun.star.configuration.backend.CopyImporter; + 'com.sun.star.configuration.backend.DataImporter': com.sun.star.configuration.backend.DataImporter; + 'com.sun.star.configuration.backend.DefaultBackend': com.sun.star.configuration.backend.DefaultBackend; + 'com.sun.star.configuration.backend.HierarchyBrowser': com.sun.star.configuration.backend.HierarchyBrowser; + 'com.sun.star.configuration.backend.Importer': com.sun.star.configuration.backend.Importer; + 'com.sun.star.configuration.backend.InteractionHandler': com.sun.star.configuration.backend.InteractionHandler; + 'com.sun.star.configuration.backend.Layer': com.sun.star.configuration.backend.Layer; + 'com.sun.star.configuration.backend.LayerDescriber': com.sun.star.configuration.backend.LayerDescriber; + 'com.sun.star.configuration.backend.LayerFilter': com.sun.star.configuration.backend.LayerFilter; + 'com.sun.star.configuration.backend.LayerUpdateMerger': com.sun.star.configuration.backend.LayerUpdateMerger; + 'com.sun.star.configuration.backend.LdapMultiLayerStratum': com.sun.star.configuration.backend.LdapMultiLayerStratum; + 'com.sun.star.configuration.backend.LdapSingleBackend': com.sun.star.configuration.backend.LdapSingleBackend; + 'com.sun.star.configuration.backend.LdapSingleStratum': com.sun.star.configuration.backend.LdapSingleStratum; + 'com.sun.star.configuration.backend.LocalDataImporter': com.sun.star.configuration.backend.LocalDataImporter; + 'com.sun.star.configuration.backend.LocalHierarchyBrowser': com.sun.star.configuration.backend.LocalHierarchyBrowser; + 'com.sun.star.configuration.backend.LocalSchemaSupplier': com.sun.star.configuration.backend.LocalSchemaSupplier; + 'com.sun.star.configuration.backend.LocalSingleBackend': com.sun.star.configuration.backend.LocalSingleBackend; + 'com.sun.star.configuration.backend.LocalSingleStratum': com.sun.star.configuration.backend.LocalSingleStratum; + 'com.sun.star.configuration.backend.MergeImporter': com.sun.star.configuration.backend.MergeImporter; + 'com.sun.star.configuration.backend.MultiLayerStratum': com.sun.star.configuration.backend.MultiLayerStratum; + 'com.sun.star.configuration.backend.MultiStratumBackend': com.sun.star.configuration.backend.MultiStratumBackend; + 'com.sun.star.configuration.backend.OfflineBackend': com.sun.star.configuration.backend.OfflineBackend; + 'com.sun.star.configuration.backend.OnlineBackend': com.sun.star.configuration.backend.OnlineBackend; + 'com.sun.star.configuration.backend.PlatformBackend': com.sun.star.configuration.backend.PlatformBackend; + 'com.sun.star.configuration.backend.Schema': com.sun.star.configuration.backend.Schema; + 'com.sun.star.configuration.backend.SchemaSupplier': com.sun.star.configuration.backend.SchemaSupplier; + 'com.sun.star.configuration.backend.SingleBackend': com.sun.star.configuration.backend.SingleBackend; + 'com.sun.star.configuration.backend.SingleBackendAdapter': com.sun.star.configuration.backend.SingleBackendAdapter; + 'com.sun.star.configuration.backend.SingleLayerStratum': com.sun.star.configuration.backend.SingleLayerStratum; + 'com.sun.star.configuration.backend.SystemIntegration': com.sun.star.configuration.backend.SystemIntegration; + 'com.sun.star.configuration.backend.UpdatableLayer': com.sun.star.configuration.backend.UpdatableLayer; + 'com.sun.star.configuration.backend.xml.LayerParser': com.sun.star.configuration.backend.xml.LayerParser; + 'com.sun.star.configuration.backend.xml.LayerWriter': com.sun.star.configuration.backend.xml.LayerWriter; + 'com.sun.star.configuration.backend.xml.SchemaParser': com.sun.star.configuration.backend.xml.SchemaParser; + 'com.sun.star.configuration.bootstrap.BootstrapContext': com.sun.star.configuration.bootstrap.BootstrapContext; + 'com.sun.star.configuration.ConfigurationAccess': com.sun.star.configuration.ConfigurationAccess; + 'com.sun.star.configuration.ConfigurationProvider': com.sun.star.configuration.ConfigurationProvider; + 'com.sun.star.configuration.ConfigurationRegistry': com.sun.star.configuration.ConfigurationRegistry; + 'com.sun.star.configuration.ConfigurationUpdateAccess': com.sun.star.configuration.ConfigurationUpdateAccess; + 'com.sun.star.configuration.DefaultProvider': com.sun.star.configuration.DefaultProvider; + 'com.sun.star.configuration.GroupAccess': com.sun.star.configuration.GroupAccess; + 'com.sun.star.configuration.GroupElement': com.sun.star.configuration.GroupElement; + 'com.sun.star.configuration.GroupUpdate': com.sun.star.configuration.GroupUpdate; + 'com.sun.star.configuration.HierarchyAccess': com.sun.star.configuration.HierarchyAccess; + 'com.sun.star.configuration.HierarchyElement': com.sun.star.configuration.HierarchyElement; + 'com.sun.star.configuration.PropertyHierarchy': com.sun.star.configuration.PropertyHierarchy; + 'com.sun.star.configuration.ReadOnlyAccess': com.sun.star.configuration.ReadOnlyAccess; + 'com.sun.star.configuration.ReadWriteAccess': com.sun.star.configuration.ReadWriteAccess; + 'com.sun.star.configuration.SetAccess': com.sun.star.configuration.SetAccess; + 'com.sun.star.configuration.SetElement': com.sun.star.configuration.SetElement; + 'com.sun.star.configuration.SetUpdate': com.sun.star.configuration.SetUpdate; + 'com.sun.star.configuration.SimpleSetAccess': com.sun.star.configuration.SimpleSetAccess; + 'com.sun.star.configuration.SimpleSetUpdate': com.sun.star.configuration.SimpleSetUpdate; + 'com.sun.star.configuration.UpdateRootElement': com.sun.star.configuration.UpdateRootElement; + 'com.sun.star.connection.Acceptor': com.sun.star.connection.Acceptor; + 'com.sun.star.connection.Connector': com.sun.star.connection.Connector; + 'com.sun.star.container.EnumerableMap': com.sun.star.container.EnumerableMap; + 'com.sun.star.cui.ColorPicker': com.sun.star.cui.ColorPicker; + 'com.sun.star.datatransfer.clipboard.ClipboardManager': com.sun.star.datatransfer.clipboard.ClipboardManager; + 'com.sun.star.datatransfer.clipboard.GenericClipboard': com.sun.star.datatransfer.clipboard.GenericClipboard; + 'com.sun.star.datatransfer.clipboard.SystemClipboard': com.sun.star.datatransfer.clipboard.SystemClipboard; + 'com.sun.star.datatransfer.DataFormatTranslator': com.sun.star.datatransfer.DataFormatTranslator; + 'com.sun.star.datatransfer.dnd.OleDragSource': com.sun.star.datatransfer.dnd.OleDragSource; + 'com.sun.star.datatransfer.dnd.OleDropTarget': com.sun.star.datatransfer.dnd.OleDropTarget; + 'com.sun.star.datatransfer.dnd.X11DragSource': com.sun.star.datatransfer.dnd.X11DragSource; + 'com.sun.star.datatransfer.dnd.X11DropTarget': com.sun.star.datatransfer.dnd.X11DropTarget; + 'com.sun.star.datatransfer.MimeContentTypeFactory': com.sun.star.datatransfer.MimeContentTypeFactory; + 'com.sun.star.deployment.PackageRegistryBackend': com.sun.star.deployment.PackageRegistryBackend; + 'com.sun.star.deployment.test.SmoketestCommandEnvironment': com.sun.star.deployment.test.SmoketestCommandEnvironment; + 'com.sun.star.deployment.ui.LicenseDialog': com.sun.star.deployment.ui.LicenseDialog; + 'com.sun.star.deployment.ui.PackageManagerDialog': com.sun.star.deployment.ui.PackageManagerDialog; + 'com.sun.star.deployment.ui.UpdateRequiredDialog': com.sun.star.deployment.ui.UpdateRequiredDialog; + 'com.sun.star.deployment.UpdateInformationProvider': com.sun.star.deployment.UpdateInformationProvider; + 'com.sun.star.document.DocumentProperties': com.sun.star.document.DocumentProperties; + 'com.sun.star.document.DocumentRevisionListPersistence': com.sun.star.document.DocumentRevisionListPersistence; + 'com.sun.star.document.EventDescriptor': com.sun.star.document.EventDescriptor; + 'com.sun.star.document.Events': com.sun.star.document.Events; + 'com.sun.star.document.ExportFilter': com.sun.star.document.ExportFilter; + 'com.sun.star.document.ExtendedTypeDetection': com.sun.star.document.ExtendedTypeDetection; + 'com.sun.star.document.ExtendedTypeDetectionFactory': com.sun.star.document.ExtendedTypeDetectionFactory; + 'com.sun.star.document.FilterAdapter': com.sun.star.document.FilterAdapter; + 'com.sun.star.document.FilterConfigRefresh': com.sun.star.document.FilterConfigRefresh; + 'com.sun.star.document.FilterFactory': com.sun.star.document.FilterFactory; + 'com.sun.star.document.GraphicObjectResolver': com.sun.star.document.GraphicObjectResolver; + 'com.sun.star.document.HeaderFooterSettings': com.sun.star.document.HeaderFooterSettings; + 'com.sun.star.document.ImportFilter': com.sun.star.document.ImportFilter; + 'com.sun.star.document.IndexedPropertyValues': com.sun.star.document.IndexedPropertyValues; + 'com.sun.star.document.LinkTarget': com.sun.star.document.LinkTarget; + 'com.sun.star.document.LinkTargets': com.sun.star.document.LinkTargets; + 'com.sun.star.document.MediaDescriptor': com.sun.star.document.MediaDescriptor; + 'com.sun.star.document.NamedPropertyValues': com.sun.star.document.NamedPropertyValues; + 'com.sun.star.document.OfficeDocument': com.sun.star.document.OfficeDocument; + 'com.sun.star.document.OleEmbeddedServerRegistration': com.sun.star.document.OleEmbeddedServerRegistration; + 'com.sun.star.document.OOXMLDocumentPropertiesImporter': com.sun.star.document.OOXMLDocumentPropertiesImporter; + 'com.sun.star.document.PDFDialog': com.sun.star.document.PDFDialog; + 'com.sun.star.document.Settings': com.sun.star.document.Settings; + 'com.sun.star.document.TypeDetection': com.sun.star.document.TypeDetection; + 'com.sun.star.document.XMLBasicExporter': com.sun.star.document.XMLBasicExporter; + 'com.sun.star.document.XMLBasicImporter': com.sun.star.document.XMLBasicImporter; + 'com.sun.star.document.XMLOasisBasicExporter': com.sun.star.document.XMLOasisBasicExporter; + 'com.sun.star.document.XMLOasisBasicImporter': com.sun.star.document.XMLOasisBasicImporter; + 'com.sun.star.drawing.AccessibleDrawDocumentView': com.sun.star.drawing.AccessibleDrawDocumentView; + 'com.sun.star.drawing.AccessibleGraphControl': com.sun.star.drawing.AccessibleGraphControl; + 'com.sun.star.drawing.AccessibleGraphicShape': com.sun.star.drawing.AccessibleGraphicShape; + 'com.sun.star.drawing.AccessibleImageBullet': com.sun.star.drawing.AccessibleImageBullet; + 'com.sun.star.drawing.AccessibleOLEShape': com.sun.star.drawing.AccessibleOLEShape; + 'com.sun.star.drawing.AccessibleShape': com.sun.star.drawing.AccessibleShape; + 'com.sun.star.drawing.AccessibleSlideView': com.sun.star.drawing.AccessibleSlideView; + 'com.sun.star.drawing.AccessibleSlideViewObject': com.sun.star.drawing.AccessibleSlideViewObject; + 'com.sun.star.drawing.AppletShape': com.sun.star.drawing.AppletShape; + 'com.sun.star.drawing.Background': com.sun.star.drawing.Background; + 'com.sun.star.drawing.BitmapTable': com.sun.star.drawing.BitmapTable; + 'com.sun.star.drawing.CaptionShape': com.sun.star.drawing.CaptionShape; + 'com.sun.star.drawing.ClosedBezierShape': com.sun.star.drawing.ClosedBezierShape; + 'com.sun.star.drawing.ColorTable': com.sun.star.drawing.ColorTable; + 'com.sun.star.drawing.ConnectorProperties': com.sun.star.drawing.ConnectorProperties; + 'com.sun.star.drawing.ConnectorShape': com.sun.star.drawing.ConnectorShape; + 'com.sun.star.drawing.ControlShape': com.sun.star.drawing.ControlShape; + 'com.sun.star.drawing.CustomShape': com.sun.star.drawing.CustomShape; + 'com.sun.star.drawing.CustomShapeEngine': com.sun.star.drawing.CustomShapeEngine; + 'com.sun.star.drawing.DashTable': com.sun.star.drawing.DashTable; + 'com.sun.star.drawing.Defaults': com.sun.star.drawing.Defaults; + 'com.sun.star.drawing.DocumentSettings': com.sun.star.drawing.DocumentSettings; + 'com.sun.star.drawing.DrawingDocument': com.sun.star.drawing.DrawingDocument; + 'com.sun.star.drawing.DrawingDocumentDrawView': com.sun.star.drawing.DrawingDocumentDrawView; + 'com.sun.star.drawing.DrawingDocumentFactory': com.sun.star.drawing.DrawingDocumentFactory; + 'com.sun.star.drawing.DrawPage': com.sun.star.drawing.DrawPage; + 'com.sun.star.drawing.DrawPages': com.sun.star.drawing.DrawPages; + 'com.sun.star.drawing.EllipseShape': com.sun.star.drawing.EllipseShape; + 'com.sun.star.drawing.EnhancedCustomShapeExtrusion': com.sun.star.drawing.EnhancedCustomShapeExtrusion; + 'com.sun.star.drawing.EnhancedCustomShapeGeometry': com.sun.star.drawing.EnhancedCustomShapeGeometry; + 'com.sun.star.drawing.EnhancedCustomShapeHandle': com.sun.star.drawing.EnhancedCustomShapeHandle; + 'com.sun.star.drawing.EnhancedCustomShapePath': com.sun.star.drawing.EnhancedCustomShapePath; + 'com.sun.star.drawing.EnhancedCustomShapeTextPath': com.sun.star.drawing.EnhancedCustomShapeTextPath; + 'com.sun.star.drawing.FillProperties': com.sun.star.drawing.FillProperties; + 'com.sun.star.drawing.framework.BasicPaneFactory': com.sun.star.drawing.framework.BasicPaneFactory; + 'com.sun.star.drawing.framework.BasicToolBarFactory': com.sun.star.drawing.framework.BasicToolBarFactory; + 'com.sun.star.drawing.framework.BasicViewFactory': com.sun.star.drawing.framework.BasicViewFactory; + 'com.sun.star.drawing.framework.Configuration': com.sun.star.drawing.framework.Configuration; + 'com.sun.star.drawing.framework.ConfigurationController': com.sun.star.drawing.framework.ConfigurationController; + 'com.sun.star.drawing.framework.ModuleController': com.sun.star.drawing.framework.ModuleController; + 'com.sun.star.drawing.framework.ResourceId': com.sun.star.drawing.framework.ResourceId; + 'com.sun.star.drawing.GenericDrawingDocument': com.sun.star.drawing.GenericDrawingDocument; + 'com.sun.star.drawing.GenericDrawPage': com.sun.star.drawing.GenericDrawPage; + 'com.sun.star.drawing.GradientTable': com.sun.star.drawing.GradientTable; + 'com.sun.star.drawing.GraphicExportFilter': com.sun.star.drawing.GraphicExportFilter; + 'com.sun.star.drawing.GraphicObjectShape': com.sun.star.drawing.GraphicObjectShape; + 'com.sun.star.drawing.GroupShape': com.sun.star.drawing.GroupShape; + 'com.sun.star.drawing.HatchTable': com.sun.star.drawing.HatchTable; + 'com.sun.star.drawing.Layer': com.sun.star.drawing.Layer; + 'com.sun.star.drawing.LayerManager': com.sun.star.drawing.LayerManager; + 'com.sun.star.drawing.LineProperties': com.sun.star.drawing.LineProperties; + 'com.sun.star.drawing.LineShape': com.sun.star.drawing.LineShape; + 'com.sun.star.drawing.MarkerTable': com.sun.star.drawing.MarkerTable; + 'com.sun.star.drawing.MasterPage': com.sun.star.drawing.MasterPage; + 'com.sun.star.drawing.MasterPages': com.sun.star.drawing.MasterPages; + 'com.sun.star.drawing.MeasureProperties': com.sun.star.drawing.MeasureProperties; + 'com.sun.star.drawing.MeasureShape': com.sun.star.drawing.MeasureShape; + 'com.sun.star.drawing.ModuleDispatcher': com.sun.star.drawing.ModuleDispatcher; + 'com.sun.star.drawing.OLE2Shape': com.sun.star.drawing.OLE2Shape; + 'com.sun.star.drawing.OpenBezierShape': com.sun.star.drawing.OpenBezierShape; + 'com.sun.star.drawing.PageShape': com.sun.star.drawing.PageShape; + 'com.sun.star.drawing.PluginShape': com.sun.star.drawing.PluginShape; + 'com.sun.star.drawing.PolyLineShape': com.sun.star.drawing.PolyLineShape; + 'com.sun.star.drawing.PolyPolygonBezierDescriptor': com.sun.star.drawing.PolyPolygonBezierDescriptor; + 'com.sun.star.drawing.PolyPolygonBezierShape': com.sun.star.drawing.PolyPolygonBezierShape; + 'com.sun.star.drawing.PolyPolygonDescriptor': com.sun.star.drawing.PolyPolygonDescriptor; + 'com.sun.star.drawing.PolyPolygonShape': com.sun.star.drawing.PolyPolygonShape; + 'com.sun.star.drawing.RectangleShape': com.sun.star.drawing.RectangleShape; + 'com.sun.star.drawing.RotationDescriptor': com.sun.star.drawing.RotationDescriptor; + 'com.sun.star.drawing.ShadowProperties': com.sun.star.drawing.ShadowProperties; + 'com.sun.star.drawing.Shape': com.sun.star.drawing.Shape; + 'com.sun.star.drawing.ShapeCollection': com.sun.star.drawing.ShapeCollection; + 'com.sun.star.drawing.Shapes': com.sun.star.drawing.Shapes; + 'com.sun.star.drawing.SlideRenderer': com.sun.star.drawing.SlideRenderer; + 'com.sun.star.drawing.SlideSorter': com.sun.star.drawing.SlideSorter; + 'com.sun.star.drawing.Text': com.sun.star.drawing.Text; + 'com.sun.star.drawing.TextProperties': com.sun.star.drawing.TextProperties; + 'com.sun.star.drawing.TextShape': com.sun.star.drawing.TextShape; + 'com.sun.star.drawing.TransparencyGradientTable': com.sun.star.drawing.TransparencyGradientTable; + 'com.sun.star.embed.BaseStorage': com.sun.star.embed.BaseStorage; + 'com.sun.star.embed.DocumentCloser': com.sun.star.embed.DocumentCloser; + 'com.sun.star.embed.EmbeddedObjectCreator': com.sun.star.embed.EmbeddedObjectCreator; + 'com.sun.star.embed.EmbeddedObjectDescriptor': com.sun.star.embed.EmbeddedObjectDescriptor; + 'com.sun.star.embed.FileSystemStorage': com.sun.star.embed.FileSystemStorage; + 'com.sun.star.embed.FileSystemStorageFactory': com.sun.star.embed.FileSystemStorageFactory; + 'com.sun.star.embed.HatchWindowFactory': com.sun.star.embed.HatchWindowFactory; + 'com.sun.star.embed.InstanceLocker': com.sun.star.embed.InstanceLocker; + 'com.sun.star.embed.MSOLEObjectSystemCreator': com.sun.star.embed.MSOLEObjectSystemCreator; + 'com.sun.star.embed.OLEEmbeddedObjectFactory': com.sun.star.embed.OLEEmbeddedObjectFactory; + 'com.sun.star.embed.OLESimpleStorage': com.sun.star.embed.OLESimpleStorage; + 'com.sun.star.embed.OOoEmbeddedObjectFactory': com.sun.star.embed.OOoEmbeddedObjectFactory; + 'com.sun.star.embed.Storage': com.sun.star.embed.Storage; + 'com.sun.star.embed.StorageFactory': com.sun.star.embed.StorageFactory; + 'com.sun.star.embed.StorageStream': com.sun.star.embed.StorageStream; + 'com.sun.star.form.binding.BindableControlModel': com.sun.star.form.binding.BindableControlModel; + 'com.sun.star.form.binding.BindableDataAwareControlModel': com.sun.star.form.binding.BindableDataAwareControlModel; + 'com.sun.star.form.binding.BindableDatabaseCheckBox': com.sun.star.form.binding.BindableDatabaseCheckBox; + 'com.sun.star.form.binding.BindableDatabaseComboBox': com.sun.star.form.binding.BindableDatabaseComboBox; + 'com.sun.star.form.binding.BindableDatabaseDateField': com.sun.star.form.binding.BindableDatabaseDateField; + 'com.sun.star.form.binding.BindableDatabaseFormattedField': com.sun.star.form.binding.BindableDatabaseFormattedField; + 'com.sun.star.form.binding.BindableDatabaseListBox': com.sun.star.form.binding.BindableDatabaseListBox; + 'com.sun.star.form.binding.BindableDatabaseNumericField': com.sun.star.form.binding.BindableDatabaseNumericField; + 'com.sun.star.form.binding.BindableDatabaseRadioButton': com.sun.star.form.binding.BindableDatabaseRadioButton; + 'com.sun.star.form.binding.BindableDatabaseTextField': com.sun.star.form.binding.BindableDatabaseTextField; + 'com.sun.star.form.binding.BindableDatabaseTimeField': com.sun.star.form.binding.BindableDatabaseTimeField; + 'com.sun.star.form.binding.BindableIntegerValueRange': com.sun.star.form.binding.BindableIntegerValueRange; + 'com.sun.star.form.binding.ListEntrySource': com.sun.star.form.binding.ListEntrySource; + 'com.sun.star.form.binding.ValueBinding': com.sun.star.form.binding.ValueBinding; + 'com.sun.star.form.component.CheckBox': com.sun.star.form.component.CheckBox; + 'com.sun.star.form.component.ComboBox': com.sun.star.form.component.ComboBox; + 'com.sun.star.form.component.CommandButton': com.sun.star.form.component.CommandButton; + 'com.sun.star.form.component.CurrencyField': com.sun.star.form.component.CurrencyField; + 'com.sun.star.form.component.DatabaseCheckBox': com.sun.star.form.component.DatabaseCheckBox; + 'com.sun.star.form.component.DatabaseComboBox': com.sun.star.form.component.DatabaseComboBox; + 'com.sun.star.form.component.DatabaseCurrencyField': com.sun.star.form.component.DatabaseCurrencyField; + 'com.sun.star.form.component.DatabaseDateField': com.sun.star.form.component.DatabaseDateField; + 'com.sun.star.form.component.DatabaseFormattedField': com.sun.star.form.component.DatabaseFormattedField; + 'com.sun.star.form.component.DatabaseImageControl': com.sun.star.form.component.DatabaseImageControl; + 'com.sun.star.form.component.DatabaseListBox': com.sun.star.form.component.DatabaseListBox; + 'com.sun.star.form.component.DatabaseNumericField': com.sun.star.form.component.DatabaseNumericField; + 'com.sun.star.form.component.DatabasePatternField': com.sun.star.form.component.DatabasePatternField; + 'com.sun.star.form.component.DatabaseRadioButton': com.sun.star.form.component.DatabaseRadioButton; + 'com.sun.star.form.component.DatabaseTextField': com.sun.star.form.component.DatabaseTextField; + 'com.sun.star.form.component.DatabaseTimeField': com.sun.star.form.component.DatabaseTimeField; + 'com.sun.star.form.component.DataForm': com.sun.star.form.component.DataForm; + 'com.sun.star.form.component.DateField': com.sun.star.form.component.DateField; + 'com.sun.star.form.component.FileControl': com.sun.star.form.component.FileControl; + 'com.sun.star.form.component.FixedText': com.sun.star.form.component.FixedText; + 'com.sun.star.form.component.Form': com.sun.star.form.component.Form; + 'com.sun.star.form.component.FormattedField': com.sun.star.form.component.FormattedField; + 'com.sun.star.form.component.GridControl': com.sun.star.form.component.GridControl; + 'com.sun.star.form.component.GroupBox': com.sun.star.form.component.GroupBox; + 'com.sun.star.form.component.HiddenControl': com.sun.star.form.component.HiddenControl; + 'com.sun.star.form.component.HTMLForm': com.sun.star.form.component.HTMLForm; + 'com.sun.star.form.component.ImageButton': com.sun.star.form.component.ImageButton; + 'com.sun.star.form.component.ListBox': com.sun.star.form.component.ListBox; + 'com.sun.star.form.component.NavigationToolBar': com.sun.star.form.component.NavigationToolBar; + 'com.sun.star.form.component.NumericField': com.sun.star.form.component.NumericField; + 'com.sun.star.form.component.PatternField': com.sun.star.form.component.PatternField; + 'com.sun.star.form.component.RadioButton': com.sun.star.form.component.RadioButton; + 'com.sun.star.form.component.RichTextControl': com.sun.star.form.component.RichTextControl; + 'com.sun.star.form.component.ScrollBar': com.sun.star.form.component.ScrollBar; + 'com.sun.star.form.component.SpinButton': com.sun.star.form.component.SpinButton; + 'com.sun.star.form.component.SubmitButton': com.sun.star.form.component.SubmitButton; + 'com.sun.star.form.component.TextField': com.sun.star.form.component.TextField; + 'com.sun.star.form.component.TimeField': com.sun.star.form.component.TimeField; + 'com.sun.star.form.control.CheckBox': com.sun.star.form.control.CheckBox; + 'com.sun.star.form.control.ComboBox': com.sun.star.form.control.ComboBox; + 'com.sun.star.form.control.CommandButton': com.sun.star.form.control.CommandButton; + 'com.sun.star.form.control.CurrencyField': com.sun.star.form.control.CurrencyField; + 'com.sun.star.form.control.DateField': com.sun.star.form.control.DateField; + 'com.sun.star.form.control.FilterControl': com.sun.star.form.control.FilterControl; + 'com.sun.star.form.control.FormattedField': com.sun.star.form.control.FormattedField; + 'com.sun.star.form.control.GridControl': com.sun.star.form.control.GridControl; + 'com.sun.star.form.control.GroupBox': com.sun.star.form.control.GroupBox; + 'com.sun.star.form.control.ImageButton': com.sun.star.form.control.ImageButton; + 'com.sun.star.form.control.ImageControl': com.sun.star.form.control.ImageControl; + 'com.sun.star.form.control.InteractionGridControl': com.sun.star.form.control.InteractionGridControl; + 'com.sun.star.form.control.ListBox': com.sun.star.form.control.ListBox; + 'com.sun.star.form.control.NavigationToolBar': com.sun.star.form.control.NavigationToolBar; + 'com.sun.star.form.control.NumericField': com.sun.star.form.control.NumericField; + 'com.sun.star.form.control.PatternField': com.sun.star.form.control.PatternField; + 'com.sun.star.form.control.RadioButton': com.sun.star.form.control.RadioButton; + 'com.sun.star.form.control.SubmitButton': com.sun.star.form.control.SubmitButton; + 'com.sun.star.form.control.TextField': com.sun.star.form.control.TextField; + 'com.sun.star.form.control.TimeField': com.sun.star.form.control.TimeField; + 'com.sun.star.form.ControlFontDialog': com.sun.star.form.ControlFontDialog; + 'com.sun.star.form.DataAwareControlModel': com.sun.star.form.DataAwareControlModel; + 'com.sun.star.form.FormComponent': com.sun.star.form.FormComponent; + 'com.sun.star.form.FormComponents': com.sun.star.form.FormComponents; + 'com.sun.star.form.FormController': com.sun.star.form.FormController; + 'com.sun.star.form.FormControllerDispatcher': com.sun.star.form.FormControllerDispatcher; + 'com.sun.star.form.FormControlModel': com.sun.star.form.FormControlModel; + 'com.sun.star.form.Forms': com.sun.star.form.Forms; + 'com.sun.star.form.inspection.ButtonNavigationHandler': com.sun.star.form.inspection.ButtonNavigationHandler; + 'com.sun.star.form.inspection.CellBindingPropertyHandler': com.sun.star.form.inspection.CellBindingPropertyHandler; + 'com.sun.star.form.inspection.DefaultFormComponentInspectorModel': com.sun.star.form.inspection.DefaultFormComponentInspectorModel; + 'com.sun.star.form.inspection.EditPropertyHandler': com.sun.star.form.inspection.EditPropertyHandler; + 'com.sun.star.form.inspection.EventHandler': com.sun.star.form.inspection.EventHandler; + 'com.sun.star.form.inspection.FormComponentPropertyHandler': com.sun.star.form.inspection.FormComponentPropertyHandler; + 'com.sun.star.form.inspection.SubmissionPropertyHandler': com.sun.star.form.inspection.SubmissionPropertyHandler; + 'com.sun.star.form.inspection.XMLFormsPropertyHandler': com.sun.star.form.inspection.XMLFormsPropertyHandler; + 'com.sun.star.form.inspection.XSDValidationPropertyHandler': com.sun.star.form.inspection.XSDValidationPropertyHandler; + 'com.sun.star.form.PropertyBrowserController': com.sun.star.form.PropertyBrowserController; + 'com.sun.star.form.runtime.FormController': com.sun.star.form.runtime.FormController; + 'com.sun.star.form.runtime.FormOperations': com.sun.star.form.runtime.FormOperations; + 'com.sun.star.form.TabOrderDialog': com.sun.star.form.TabOrderDialog; + 'com.sun.star.form.validation.ValidatableBindableControlModel': com.sun.star.form.validation.ValidatableBindableControlModel; + 'com.sun.star.form.validation.ValidatableControlModel': com.sun.star.form.validation.ValidatableControlModel; + 'com.sun.star.formula.AccessibleFormulaText': com.sun.star.formula.AccessibleFormulaText; + 'com.sun.star.formula.AccessibleFormulaView': com.sun.star.formula.AccessibleFormulaView; + 'com.sun.star.formula.FormulaProperties': com.sun.star.formula.FormulaProperties; + 'com.sun.star.frame.AppDispatchProvider': com.sun.star.frame.AppDispatchProvider; + 'com.sun.star.frame.AutoRecovery': com.sun.star.frame.AutoRecovery; + 'com.sun.star.frame.Bibliography': com.sun.star.frame.Bibliography; + 'com.sun.star.frame.Components': com.sun.star.frame.Components; + 'com.sun.star.frame.ContentHandler': com.sun.star.frame.ContentHandler; + 'com.sun.star.frame.ContentHandlerFactory': com.sun.star.frame.ContentHandlerFactory; + 'com.sun.star.frame.Controller': com.sun.star.frame.Controller; + 'com.sun.star.frame.Desktop': com.sun.star.frame.Desktop; + 'com.sun.star.frame.DesktopTask': com.sun.star.frame.DesktopTask; + 'com.sun.star.frame.DesktopTasks': com.sun.star.frame.DesktopTasks; + 'com.sun.star.frame.DispatchHelper': com.sun.star.frame.DispatchHelper; + 'com.sun.star.frame.DispatchProvider': com.sun.star.frame.DispatchProvider; + 'com.sun.star.frame.DispatchRecorder': com.sun.star.frame.DispatchRecorder; + 'com.sun.star.frame.DispatchRecorderSupplier': com.sun.star.frame.DispatchRecorderSupplier; + 'com.sun.star.frame.DocumentTemplates': com.sun.star.frame.DocumentTemplates; + 'com.sun.star.frame.Frame': com.sun.star.frame.Frame; + 'com.sun.star.frame.FrameControl': com.sun.star.frame.FrameControl; + 'com.sun.star.frame.FrameLoader': com.sun.star.frame.FrameLoader; + 'com.sun.star.frame.FrameLoaderFactory': com.sun.star.frame.FrameLoaderFactory; + 'com.sun.star.frame.FramesContainer': com.sun.star.frame.FramesContainer; + 'com.sun.star.frame.GlobalEventBroadcaster': com.sun.star.frame.GlobalEventBroadcaster; + 'com.sun.star.frame.LayoutManager': com.sun.star.frame.LayoutManager; + 'com.sun.star.frame.MediaTypeDetectionHelper': com.sun.star.frame.MediaTypeDetectionHelper; + 'com.sun.star.frame.ModuleManager': com.sun.star.frame.ModuleManager; + 'com.sun.star.frame.OfficeFrameLoader': com.sun.star.frame.OfficeFrameLoader; + 'com.sun.star.frame.PopupMenuController': com.sun.star.frame.PopupMenuController; + 'com.sun.star.frame.PopupMenuControllerFactory': com.sun.star.frame.PopupMenuControllerFactory; + 'com.sun.star.frame.ProtocolHandler': com.sun.star.frame.ProtocolHandler; + 'com.sun.star.frame.SessionListener': com.sun.star.frame.SessionListener; + 'com.sun.star.frame.SessionManager': com.sun.star.frame.SessionManager; + 'com.sun.star.frame.Settings': com.sun.star.frame.Settings; + 'com.sun.star.frame.StartModule': com.sun.star.frame.StartModule; + 'com.sun.star.frame.StatusbarController': com.sun.star.frame.StatusbarController; + 'com.sun.star.frame.StatusbarControllerFactory': com.sun.star.frame.StatusbarControllerFactory; + 'com.sun.star.frame.SynchronousFrameLoader': com.sun.star.frame.SynchronousFrameLoader; + 'com.sun.star.frame.Task': com.sun.star.frame.Task; + 'com.sun.star.frame.TaskCreator': com.sun.star.frame.TaskCreator; + 'com.sun.star.frame.TemplateAccess': com.sun.star.frame.TemplateAccess; + 'com.sun.star.frame.ToolbarController': com.sun.star.frame.ToolbarController; + 'com.sun.star.frame.ToolbarControllerFactory': com.sun.star.frame.ToolbarControllerFactory; + 'com.sun.star.frame.TransientDocumentsDocumentContentFactory': com.sun.star.frame.TransientDocumentsDocumentContentFactory; + 'com.sun.star.frame.UICommandDescription': com.sun.star.frame.UICommandDescription; + 'com.sun.star.gallery.GalleryItem': com.sun.star.gallery.GalleryItem; + 'com.sun.star.gallery.GalleryTheme': com.sun.star.gallery.GalleryTheme; + 'com.sun.star.gallery.GalleryThemeProvider': com.sun.star.gallery.GalleryThemeProvider; + 'com.sun.star.graphic.Graphic': com.sun.star.graphic.Graphic; + 'com.sun.star.graphic.GraphicDescriptor': com.sun.star.graphic.GraphicDescriptor; + 'com.sun.star.graphic.GraphicObject': com.sun.star.graphic.GraphicObject; + 'com.sun.star.graphic.GraphicProvider': com.sun.star.graphic.GraphicProvider; + 'com.sun.star.graphic.GraphicRasterizer': com.sun.star.graphic.GraphicRasterizer; + 'com.sun.star.graphic.GraphicRendererVCL': com.sun.star.graphic.GraphicRendererVCL; + 'com.sun.star.graphic.MediaProperties': com.sun.star.graphic.MediaProperties; + 'com.sun.star.graphic.Primitive2DTools': com.sun.star.graphic.Primitive2DTools; + 'com.sun.star.graphic.PrimitiveFactory2D': com.sun.star.graphic.PrimitiveFactory2D; + 'com.sun.star.graphic.SvgTools': com.sun.star.graphic.SvgTools; + 'com.sun.star.i18n.BreakIterator': com.sun.star.i18n.BreakIterator; + 'com.sun.star.i18n.ChapterCollator': com.sun.star.i18n.ChapterCollator; + 'com.sun.star.i18n.CharacterClassification': com.sun.star.i18n.CharacterClassification; + 'com.sun.star.i18n.Collator': com.sun.star.i18n.Collator; + 'com.sun.star.i18n.IndexEntrySupplier': com.sun.star.i18n.IndexEntrySupplier; + 'com.sun.star.i18n.InputSequenceChecker': com.sun.star.i18n.InputSequenceChecker; + 'com.sun.star.i18n.LocaleCalendar': com.sun.star.i18n.LocaleCalendar; + 'com.sun.star.i18n.LocaleCalendar2': com.sun.star.i18n.LocaleCalendar2; + 'com.sun.star.i18n.LocaleData': com.sun.star.i18n.LocaleData; + 'com.sun.star.i18n.NativeNumberSupplier': com.sun.star.i18n.NativeNumberSupplier; + 'com.sun.star.i18n.NumberFormatMapper': com.sun.star.i18n.NumberFormatMapper; + 'com.sun.star.i18n.OrdinalSuffix': com.sun.star.i18n.OrdinalSuffix; + 'com.sun.star.i18n.TextConversion': com.sun.star.i18n.TextConversion; + 'com.sun.star.i18n.Transliteration': com.sun.star.i18n.Transliteration; + 'com.sun.star.image.ImageMap': com.sun.star.image.ImageMap; + 'com.sun.star.image.ImageMapCircleObject': com.sun.star.image.ImageMapCircleObject; + 'com.sun.star.image.ImageMapObject': com.sun.star.image.ImageMapObject; + 'com.sun.star.image.ImageMapPolygonObject': com.sun.star.image.ImageMapPolygonObject; + 'com.sun.star.image.ImageMapRectangleObject': com.sun.star.image.ImageMapRectangleObject; + 'com.sun.star.inspection.DefaultHelpProvider': com.sun.star.inspection.DefaultHelpProvider; + 'com.sun.star.inspection.GenericPropertyHandler': com.sun.star.inspection.GenericPropertyHandler; + 'com.sun.star.inspection.ObjectInspector': com.sun.star.inspection.ObjectInspector; + 'com.sun.star.inspection.ObjectInspectorModel': com.sun.star.inspection.ObjectInspectorModel; + 'com.sun.star.inspection.StringRepresentation': com.sun.star.inspection.StringRepresentation; + 'com.sun.star.io.DataInputStream': com.sun.star.io.DataInputStream; + 'com.sun.star.io.DataOutputStream': com.sun.star.io.DataOutputStream; + 'com.sun.star.io.MarkableInputStream': com.sun.star.io.MarkableInputStream; + 'com.sun.star.io.MarkableOutputStream': com.sun.star.io.MarkableOutputStream; + 'com.sun.star.io.ObjectInputStream': com.sun.star.io.ObjectInputStream; + 'com.sun.star.io.ObjectOutputStream': com.sun.star.io.ObjectOutputStream; + 'com.sun.star.io.Pipe': com.sun.star.io.Pipe; + 'com.sun.star.io.Pump': com.sun.star.io.Pump; + 'com.sun.star.io.SequenceInputStream': com.sun.star.io.SequenceInputStream; + 'com.sun.star.io.SequenceOutputStream': com.sun.star.io.SequenceOutputStream; + 'com.sun.star.io.TempFile': com.sun.star.io.TempFile; + 'com.sun.star.io.TextInputStream': com.sun.star.io.TextInputStream; + 'com.sun.star.io.TextOutputStream': com.sun.star.io.TextOutputStream; + 'com.sun.star.java.JavaVirtualMachine': com.sun.star.java.JavaVirtualMachine; + 'com.sun.star.lang.MultiServiceFactory': com.sun.star.lang.MultiServiceFactory; + 'com.sun.star.lang.RegistryServiceManager': com.sun.star.lang.RegistryServiceManager; + 'com.sun.star.lang.ServiceManager': com.sun.star.lang.ServiceManager; + 'com.sun.star.linguistic2.ConversionDictionary': com.sun.star.linguistic2.ConversionDictionary; + 'com.sun.star.linguistic2.ConversionDictionaryList': com.sun.star.linguistic2.ConversionDictionaryList; + 'com.sun.star.linguistic2.Dictionary': com.sun.star.linguistic2.Dictionary; + 'com.sun.star.linguistic2.DictionaryList': com.sun.star.linguistic2.DictionaryList; + 'com.sun.star.linguistic2.HangulHanjaConversionDictionary': com.sun.star.linguistic2.HangulHanjaConversionDictionary; + 'com.sun.star.linguistic2.Hyphenator': com.sun.star.linguistic2.Hyphenator; + 'com.sun.star.linguistic2.LanguageGuessing': com.sun.star.linguistic2.LanguageGuessing; + 'com.sun.star.linguistic2.LinguProperties': com.sun.star.linguistic2.LinguProperties; + 'com.sun.star.linguistic2.LinguServiceManager': com.sun.star.linguistic2.LinguServiceManager; + 'com.sun.star.linguistic2.Proofreader': com.sun.star.linguistic2.Proofreader; + 'com.sun.star.linguistic2.ProofreadingIterator': com.sun.star.linguistic2.ProofreadingIterator; + 'com.sun.star.linguistic2.SpellChecker': com.sun.star.linguistic2.SpellChecker; + 'com.sun.star.linguistic2.Thesaurus': com.sun.star.linguistic2.Thesaurus; + 'com.sun.star.loader.Dynamic': com.sun.star.loader.Dynamic; + 'com.sun.star.loader.Java': com.sun.star.loader.Java; + 'com.sun.star.loader.Java2': com.sun.star.loader.Java2; + 'com.sun.star.loader.SharedLibrary': com.sun.star.loader.SharedLibrary; + 'com.sun.star.logging.ConsoleHandler': com.sun.star.logging.ConsoleHandler; + 'com.sun.star.logging.CsvLogFormatter': com.sun.star.logging.CsvLogFormatter; + 'com.sun.star.logging.FileHandler': com.sun.star.logging.FileHandler; + 'com.sun.star.logging.PlainTextFormatter': com.sun.star.logging.PlainTextFormatter; + 'com.sun.star.logging.SimpleLogRing': com.sun.star.logging.SimpleLogRing; + 'com.sun.star.mail.MailMessage': com.sun.star.mail.MailMessage; + 'com.sun.star.mail.MailServiceProvider': com.sun.star.mail.MailServiceProvider; + 'com.sun.star.media.Manager': com.sun.star.media.Manager; + 'com.sun.star.mozilla.MenuProxy': com.sun.star.mozilla.MenuProxy; + 'com.sun.star.mozilla.MenuProxyListener': com.sun.star.mozilla.MenuProxyListener; + 'com.sun.star.mozilla.MozillaBootstrap': com.sun.star.mozilla.MozillaBootstrap; + 'com.sun.star.office.Quickstart': com.sun.star.office.Quickstart; + 'com.sun.star.packages.manifest.ManifestReader': com.sun.star.packages.manifest.ManifestReader; + 'com.sun.star.packages.manifest.ManifestWriter': com.sun.star.packages.manifest.ManifestWriter; + 'com.sun.star.packages.Package': com.sun.star.packages.Package; + 'com.sun.star.packages.PackageFolder': com.sun.star.packages.PackageFolder; + 'com.sun.star.packages.PackageFolderEnumeration': com.sun.star.packages.PackageFolderEnumeration; + 'com.sun.star.packages.PackageStream': com.sun.star.packages.PackageStream; + 'com.sun.star.packages.zip.ZipFileAccess': com.sun.star.packages.zip.ZipFileAccess; + 'com.sun.star.presentation.ChartShape': com.sun.star.presentation.ChartShape; + 'com.sun.star.presentation.CustomPresentation': com.sun.star.presentation.CustomPresentation; + 'com.sun.star.presentation.CustomPresentationAccess': com.sun.star.presentation.CustomPresentationAccess; + 'com.sun.star.presentation.DateTimeShape': com.sun.star.presentation.DateTimeShape; + 'com.sun.star.presentation.DocumentSettings': com.sun.star.presentation.DocumentSettings; + 'com.sun.star.presentation.DrawPage': com.sun.star.presentation.DrawPage; + 'com.sun.star.presentation.FooterShape': com.sun.star.presentation.FooterShape; + 'com.sun.star.presentation.GraphicObjectShape': com.sun.star.presentation.GraphicObjectShape; + 'com.sun.star.presentation.HandoutShape': com.sun.star.presentation.HandoutShape; + 'com.sun.star.presentation.HandoutView': com.sun.star.presentation.HandoutView; + 'com.sun.star.presentation.HeaderShape': com.sun.star.presentation.HeaderShape; + 'com.sun.star.presentation.NotesShape': com.sun.star.presentation.NotesShape; + 'com.sun.star.presentation.NotesView': com.sun.star.presentation.NotesView; + 'com.sun.star.presentation.OLE2Shape': com.sun.star.presentation.OLE2Shape; + 'com.sun.star.presentation.OutlinerShape': com.sun.star.presentation.OutlinerShape; + 'com.sun.star.presentation.OutlineView': com.sun.star.presentation.OutlineView; + 'com.sun.star.presentation.PageShape': com.sun.star.presentation.PageShape; + 'com.sun.star.presentation.Presentation': com.sun.star.presentation.Presentation; + 'com.sun.star.presentation.Presentation2': com.sun.star.presentation.Presentation2; + 'com.sun.star.presentation.PresentationDocument': com.sun.star.presentation.PresentationDocument; + 'com.sun.star.presentation.PresentationView': com.sun.star.presentation.PresentationView; + 'com.sun.star.presentation.PreviewView': com.sun.star.presentation.PreviewView; + 'com.sun.star.presentation.Shape': com.sun.star.presentation.Shape; + 'com.sun.star.presentation.SlideNumberShape': com.sun.star.presentation.SlideNumberShape; + 'com.sun.star.presentation.SlideShow': com.sun.star.presentation.SlideShow; + 'com.sun.star.presentation.SlidesView': com.sun.star.presentation.SlidesView; + 'com.sun.star.presentation.SubtitleShape': com.sun.star.presentation.SubtitleShape; + 'com.sun.star.presentation.textfield.DateTime': com.sun.star.presentation.textfield.DateTime; + 'com.sun.star.presentation.textfield.Footer': com.sun.star.presentation.textfield.Footer; + 'com.sun.star.presentation.textfield.Header': com.sun.star.presentation.textfield.Header; + 'com.sun.star.presentation.TitleTextShape': com.sun.star.presentation.TitleTextShape; + 'com.sun.star.presentation.TransitionFactory': com.sun.star.presentation.TransitionFactory; + 'com.sun.star.rdf.BlankNode': com.sun.star.rdf.BlankNode; + 'com.sun.star.rdf.Literal': com.sun.star.rdf.Literal; + 'com.sun.star.rdf.Repository': com.sun.star.rdf.Repository; + 'com.sun.star.rdf.URI': com.sun.star.rdf.URI; + 'com.sun.star.reflection.CoreReflection': com.sun.star.reflection.CoreReflection; + 'com.sun.star.reflection.ProxyFactory': com.sun.star.reflection.ProxyFactory; + 'com.sun.star.reflection.TypeDescriptionManager': com.sun.star.reflection.TypeDescriptionManager; + 'com.sun.star.reflection.TypeDescriptionProvider': com.sun.star.reflection.TypeDescriptionProvider; + 'com.sun.star.registry.DefaultRegistry': com.sun.star.registry.DefaultRegistry; + 'com.sun.star.registry.ImplementationRegistration': com.sun.star.registry.ImplementationRegistration; + 'com.sun.star.registry.NestedRegistry': com.sun.star.registry.NestedRegistry; + 'com.sun.star.registry.SimpleRegistry': com.sun.star.registry.SimpleRegistry; + 'com.sun.star.rendering.BitmapCanvas': com.sun.star.rendering.BitmapCanvas; + 'com.sun.star.rendering.Canvas': com.sun.star.rendering.Canvas; + 'com.sun.star.rendering.CanvasFactory': com.sun.star.rendering.CanvasFactory; + 'com.sun.star.rendering.MtfRenderer': com.sun.star.rendering.MtfRenderer; + 'com.sun.star.report.FixedLine': com.sun.star.report.FixedLine; + 'com.sun.star.report.FixedText': com.sun.star.report.FixedText; + 'com.sun.star.report.FormatCondition': com.sun.star.report.FormatCondition; + 'com.sun.star.report.FormattedField': com.sun.star.report.FormattedField; + 'com.sun.star.report.Function': com.sun.star.report.Function; + 'com.sun.star.report.Group': com.sun.star.report.Group; + 'com.sun.star.report.Groups': com.sun.star.report.Groups; + 'com.sun.star.report.ImageControl': com.sun.star.report.ImageControl; + 'com.sun.star.report.inspection.DataProviderHandler': com.sun.star.report.inspection.DataProviderHandler; + 'com.sun.star.report.inspection.DefaultComponentInspectorModel': com.sun.star.report.inspection.DefaultComponentInspectorModel; + 'com.sun.star.report.inspection.ReportComponentHandler': com.sun.star.report.inspection.ReportComponentHandler; + 'com.sun.star.report.ReportControlFormat': com.sun.star.report.ReportControlFormat; + 'com.sun.star.report.ReportControlModel': com.sun.star.report.ReportControlModel; + 'com.sun.star.report.ReportDefinition': com.sun.star.report.ReportDefinition; + 'com.sun.star.report.ReportEngine': com.sun.star.report.ReportEngine; + 'com.sun.star.report.Section': com.sun.star.report.Section; + 'com.sun.star.report.Shape': com.sun.star.report.Shape; + 'com.sun.star.resource.StringResource': com.sun.star.resource.StringResource; + 'com.sun.star.resource.StringResourceWithLocation': com.sun.star.resource.StringResourceWithLocation; + 'com.sun.star.resource.StringResourceWithStorage': com.sun.star.resource.StringResourceWithStorage; + 'com.sun.star.scanner.ScannerManager': com.sun.star.scanner.ScannerManager; + 'com.sun.star.script.AllListenerAdapter': com.sun.star.script.AllListenerAdapter; + 'com.sun.star.script.browse.BrowseNode': com.sun.star.script.browse.BrowseNode; + 'com.sun.star.script.browse.BrowseNodeFactory': com.sun.star.script.browse.BrowseNodeFactory; + 'com.sun.star.script.Converter': com.sun.star.script.Converter; + 'com.sun.star.script.DocumentDialogLibraryContainer': com.sun.star.script.DocumentDialogLibraryContainer; + 'com.sun.star.script.DocumentScriptLibraryContainer': com.sun.star.script.DocumentScriptLibraryContainer; + 'com.sun.star.script.Engine': com.sun.star.script.Engine; + 'com.sun.star.script.Invocation': com.sun.star.script.Invocation; + 'com.sun.star.script.InvocationAdapterFactory': com.sun.star.script.InvocationAdapterFactory; + 'com.sun.star.script.JavaScript': com.sun.star.script.JavaScript; + 'com.sun.star.script.provider.LanguageScriptProvider': com.sun.star.script.provider.LanguageScriptProvider; + 'com.sun.star.script.provider.MasterScriptProvider': com.sun.star.script.provider.MasterScriptProvider; + 'com.sun.star.script.provider.MasterScriptProviderFactory': com.sun.star.script.provider.MasterScriptProviderFactory; + 'com.sun.star.script.provider.ScriptProvider': com.sun.star.script.provider.ScriptProvider; + 'com.sun.star.script.provider.ScriptProviderForBasic': com.sun.star.script.provider.ScriptProviderForBasic; + 'com.sun.star.script.provider.ScriptProviderForBeanShell': com.sun.star.script.provider.ScriptProviderForBeanShell; + 'com.sun.star.script.provider.ScriptProviderForJava': com.sun.star.script.provider.ScriptProviderForJava; + 'com.sun.star.script.provider.ScriptProviderForJavaScript': com.sun.star.script.provider.ScriptProviderForJavaScript; + 'com.sun.star.script.provider.ScriptURIHelper': com.sun.star.script.provider.ScriptURIHelper; + 'com.sun.star.script.vba.VBAEventProcessor': com.sun.star.script.vba.VBAEventProcessor; + 'com.sun.star.script.vba.VBAMacroResolver': com.sun.star.script.vba.VBAMacroResolver; + 'com.sun.star.script.vba.VBASpreadsheetEventProcessor': com.sun.star.script.vba.VBASpreadsheetEventProcessor; + 'com.sun.star.script.vba.VBATextEventProcessor': com.sun.star.script.vba.VBATextEventProcessor; + 'com.sun.star.sdb.application.CopyTableWizard': com.sun.star.sdb.application.CopyTableWizard; + 'com.sun.star.sdb.application.DefaultViewController': com.sun.star.sdb.application.DefaultViewController; + 'com.sun.star.sdb.application.MacroMigrationWizard': com.sun.star.sdb.application.MacroMigrationWizard; + 'com.sun.star.sdb.CallableStatement': com.sun.star.sdb.CallableStatement; + 'com.sun.star.sdb.Column': com.sun.star.sdb.Column; + 'com.sun.star.sdb.ColumnDescriptorControl': com.sun.star.sdb.ColumnDescriptorControl; + 'com.sun.star.sdb.ColumnDescriptorControlModel': com.sun.star.sdb.ColumnDescriptorControlModel; + 'com.sun.star.sdb.ColumnSettings': com.sun.star.sdb.ColumnSettings; + 'com.sun.star.sdb.CommandDefinition': com.sun.star.sdb.CommandDefinition; + 'com.sun.star.sdb.Connection': com.sun.star.sdb.Connection; + 'com.sun.star.sdb.ContentLoader': com.sun.star.sdb.ContentLoader; + 'com.sun.star.sdb.DataAccessDescriptor': com.sun.star.sdb.DataAccessDescriptor; + 'com.sun.star.sdb.DatabaseAccess': com.sun.star.sdb.DatabaseAccess; + 'com.sun.star.sdb.DatabaseAccessConnection': com.sun.star.sdb.DatabaseAccessConnection; + 'com.sun.star.sdb.DatabaseAccessContext': com.sun.star.sdb.DatabaseAccessContext; + 'com.sun.star.sdb.DatabaseAccessDataSource': com.sun.star.sdb.DatabaseAccessDataSource; + 'com.sun.star.sdb.DatabaseContext': com.sun.star.sdb.DatabaseContext; + 'com.sun.star.sdb.DatabaseDocument': com.sun.star.sdb.DatabaseDocument; + 'com.sun.star.sdb.DatabaseEnvironment': com.sun.star.sdb.DatabaseEnvironment; + 'com.sun.star.sdb.DatabaseInteractionHandler': com.sun.star.sdb.DatabaseInteractionHandler; + 'com.sun.star.sdb.DataColumn': com.sun.star.sdb.DataColumn; + 'com.sun.star.sdb.DataSettings': com.sun.star.sdb.DataSettings; + 'com.sun.star.sdb.DataSource': com.sun.star.sdb.DataSource; + 'com.sun.star.sdb.DatasourceAdministrationDialog': com.sun.star.sdb.DatasourceAdministrationDialog; + 'com.sun.star.sdb.DataSourceBrowser': com.sun.star.sdb.DataSourceBrowser; + 'com.sun.star.sdb.DefinitionContainer': com.sun.star.sdb.DefinitionContainer; + 'com.sun.star.sdb.DefinitionContent': com.sun.star.sdb.DefinitionContent; + 'com.sun.star.sdb.Document': com.sun.star.sdb.Document; + 'com.sun.star.sdb.DocumentContainer': com.sun.star.sdb.DocumentContainer; + 'com.sun.star.sdb.DocumentDataSource': com.sun.star.sdb.DocumentDataSource; + 'com.sun.star.sdb.DocumentDefinition': com.sun.star.sdb.DocumentDefinition; + 'com.sun.star.sdb.ErrorMessageDialog': com.sun.star.sdb.ErrorMessageDialog; + 'com.sun.star.sdb.FilterDialog': com.sun.star.sdb.FilterDialog; + 'com.sun.star.sdb.Forms': com.sun.star.sdb.Forms; + 'com.sun.star.sdb.InteractionHandler': com.sun.star.sdb.InteractionHandler; + 'com.sun.star.sdb.OfficeDatabaseDocument': com.sun.star.sdb.OfficeDatabaseDocument; + 'com.sun.star.sdb.OrderColumn': com.sun.star.sdb.OrderColumn; + 'com.sun.star.sdb.OrderDialog': com.sun.star.sdb.OrderDialog; + 'com.sun.star.sdb.PreparedStatement': com.sun.star.sdb.PreparedStatement; + 'com.sun.star.sdb.Query': com.sun.star.sdb.Query; + 'com.sun.star.sdb.QueryDefinition': com.sun.star.sdb.QueryDefinition; + 'com.sun.star.sdb.QueryDescriptor': com.sun.star.sdb.QueryDescriptor; + 'com.sun.star.sdb.QueryDesign': com.sun.star.sdb.QueryDesign; + 'com.sun.star.sdb.RelationDesign': com.sun.star.sdb.RelationDesign; + 'com.sun.star.sdb.ReportDesign': com.sun.star.sdb.ReportDesign; + 'com.sun.star.sdb.Reports': com.sun.star.sdb.Reports; + 'com.sun.star.sdb.ResultColumn': com.sun.star.sdb.ResultColumn; + 'com.sun.star.sdb.ResultSet': com.sun.star.sdb.ResultSet; + 'com.sun.star.sdb.RowSet': com.sun.star.sdb.RowSet; + 'com.sun.star.sdb.SingleSelectQueryAnalyzer': com.sun.star.sdb.SingleSelectQueryAnalyzer; + 'com.sun.star.sdb.SingleSelectQueryComposer': com.sun.star.sdb.SingleSelectQueryComposer; + 'com.sun.star.sdb.SQLQueryComposer': com.sun.star.sdb.SQLQueryComposer; + 'com.sun.star.sdb.Table': com.sun.star.sdb.Table; + 'com.sun.star.sdb.TableDefinition': com.sun.star.sdb.TableDefinition; + 'com.sun.star.sdb.TableDescriptor': com.sun.star.sdb.TableDescriptor; + 'com.sun.star.sdb.TableDesign': com.sun.star.sdb.TableDesign; + 'com.sun.star.sdb.TextConnectionSettings': com.sun.star.sdb.TextConnectionSettings; + 'com.sun.star.sdb.tools.ConnectionTools': com.sun.star.sdb.tools.ConnectionTools; + 'com.sun.star.sdbc.CallableStatement': com.sun.star.sdbc.CallableStatement; + 'com.sun.star.sdbc.Connection': com.sun.star.sdbc.Connection; + 'com.sun.star.sdbc.ConnectionPool': com.sun.star.sdbc.ConnectionPool; + 'com.sun.star.sdbc.ConnectionProperties': com.sun.star.sdbc.ConnectionProperties; + 'com.sun.star.sdbc.DBASEConnectionProperties': com.sun.star.sdbc.DBASEConnectionProperties; + 'com.sun.star.sdbc.Driver': com.sun.star.sdbc.Driver; + 'com.sun.star.sdbc.DriverManager': com.sun.star.sdbc.DriverManager; + 'com.sun.star.sdbc.FILEConnectionProperties': com.sun.star.sdbc.FILEConnectionProperties; + 'com.sun.star.sdbc.FLATConnectionProperties': com.sun.star.sdbc.FLATConnectionProperties; + 'com.sun.star.sdbc.JDBCConnectionProperties': com.sun.star.sdbc.JDBCConnectionProperties; + 'com.sun.star.sdbc.ODBCConnectionProperties': com.sun.star.sdbc.ODBCConnectionProperties; + 'com.sun.star.sdbc.PreparedStatement': com.sun.star.sdbc.PreparedStatement; + 'com.sun.star.sdbc.ResultSet': com.sun.star.sdbc.ResultSet; + 'com.sun.star.sdbc.RowSet': com.sun.star.sdbc.RowSet; + 'com.sun.star.sdbc.Statement': com.sun.star.sdbc.Statement; + 'com.sun.star.sdbcx.Column': com.sun.star.sdbcx.Column; + 'com.sun.star.sdbcx.ColumnDescriptor': com.sun.star.sdbcx.ColumnDescriptor; + 'com.sun.star.sdbcx.Container': com.sun.star.sdbcx.Container; + 'com.sun.star.sdbcx.DatabaseDefinition': com.sun.star.sdbcx.DatabaseDefinition; + 'com.sun.star.sdbcx.Descriptor': com.sun.star.sdbcx.Descriptor; + 'com.sun.star.sdbcx.Driver': com.sun.star.sdbcx.Driver; + 'com.sun.star.sdbcx.Group': com.sun.star.sdbcx.Group; + 'com.sun.star.sdbcx.GroupDescriptor': com.sun.star.sdbcx.GroupDescriptor; + 'com.sun.star.sdbcx.Index': com.sun.star.sdbcx.Index; + 'com.sun.star.sdbcx.IndexColumn': com.sun.star.sdbcx.IndexColumn; + 'com.sun.star.sdbcx.IndexColumnDescriptor': com.sun.star.sdbcx.IndexColumnDescriptor; + 'com.sun.star.sdbcx.IndexDescriptor': com.sun.star.sdbcx.IndexDescriptor; + 'com.sun.star.sdbcx.Key': com.sun.star.sdbcx.Key; + 'com.sun.star.sdbcx.KeyColumn': com.sun.star.sdbcx.KeyColumn; + 'com.sun.star.sdbcx.KeyColumnDescriptor': com.sun.star.sdbcx.KeyColumnDescriptor; + 'com.sun.star.sdbcx.KeyDescriptor': com.sun.star.sdbcx.KeyDescriptor; + 'com.sun.star.sdbcx.PreparedStatement': com.sun.star.sdbcx.PreparedStatement; + 'com.sun.star.sdbcx.ReferenceColumn': com.sun.star.sdbcx.ReferenceColumn; + 'com.sun.star.sdbcx.ResultSet': com.sun.star.sdbcx.ResultSet; + 'com.sun.star.sdbcx.Statement': com.sun.star.sdbcx.Statement; + 'com.sun.star.sdbcx.Table': com.sun.star.sdbcx.Table; + 'com.sun.star.sdbcx.TableDescriptor': com.sun.star.sdbcx.TableDescriptor; + 'com.sun.star.sdbcx.User': com.sun.star.sdbcx.User; + 'com.sun.star.sdbcx.UserDescriptor': com.sun.star.sdbcx.UserDescriptor; + 'com.sun.star.sdbcx.View': com.sun.star.sdbcx.View; + 'com.sun.star.sdbcx.ViewDescriptor': com.sun.star.sdbcx.ViewDescriptor; + 'com.sun.star.security.AccessController': com.sun.star.security.AccessController; + 'com.sun.star.security.CertificateContainer': com.sun.star.security.CertificateContainer; + 'com.sun.star.security.DocumentDigitalSignatures': com.sun.star.security.DocumentDigitalSignatures; + 'com.sun.star.security.Policy': com.sun.star.security.Policy; + 'com.sun.star.security.SerialNumberAdapter': com.sun.star.security.SerialNumberAdapter; + 'com.sun.star.setup.UpdateCheck': com.sun.star.setup.UpdateCheck; + 'com.sun.star.setup.UpdateCheckConfig': com.sun.star.setup.UpdateCheckConfig; + 'com.sun.star.sheet.AccessibleCell': com.sun.star.sheet.AccessibleCell; + 'com.sun.star.sheet.AccessibleCsvCell': com.sun.star.sheet.AccessibleCsvCell; + 'com.sun.star.sheet.AccessibleCsvRuler': com.sun.star.sheet.AccessibleCsvRuler; + 'com.sun.star.sheet.AccessibleCsvTable': com.sun.star.sheet.AccessibleCsvTable; + 'com.sun.star.sheet.AccessiblePageHeaderFooterAreasView': com.sun.star.sheet.AccessiblePageHeaderFooterAreasView; + 'com.sun.star.sheet.AccessibleSpreadsheet': com.sun.star.sheet.AccessibleSpreadsheet; + 'com.sun.star.sheet.AccessibleSpreadsheetDocumentView': com.sun.star.sheet.AccessibleSpreadsheetDocumentView; + 'com.sun.star.sheet.AccessibleSpreadsheetPageView': com.sun.star.sheet.AccessibleSpreadsheetPageView; + 'com.sun.star.sheet.AddIn': com.sun.star.sheet.AddIn; + 'com.sun.star.sheet.CellAnnotation': com.sun.star.sheet.CellAnnotation; + 'com.sun.star.sheet.CellAnnotations': com.sun.star.sheet.CellAnnotations; + 'com.sun.star.sheet.CellAnnotationsEnumeration': com.sun.star.sheet.CellAnnotationsEnumeration; + 'com.sun.star.sheet.CellAnnotationShape': com.sun.star.sheet.CellAnnotationShape; + 'com.sun.star.sheet.CellAreaLink': com.sun.star.sheet.CellAreaLink; + 'com.sun.star.sheet.CellAreaLinks': com.sun.star.sheet.CellAreaLinks; + 'com.sun.star.sheet.CellAreaLinksEnumeration': com.sun.star.sheet.CellAreaLinksEnumeration; + 'com.sun.star.sheet.CellFormatRanges': com.sun.star.sheet.CellFormatRanges; + 'com.sun.star.sheet.CellFormatRangesEnumeration': com.sun.star.sheet.CellFormatRangesEnumeration; + 'com.sun.star.sheet.Cells': com.sun.star.sheet.Cells; + 'com.sun.star.sheet.CellsEnumeration': com.sun.star.sheet.CellsEnumeration; + 'com.sun.star.sheet.ColorScale': com.sun.star.sheet.ColorScale; + 'com.sun.star.sheet.ConditionalFormat': com.sun.star.sheet.ConditionalFormat; + 'com.sun.star.sheet.ConditionFormatEntry': com.sun.star.sheet.ConditionFormatEntry; + 'com.sun.star.sheet.ConsolidationDescriptor': com.sun.star.sheet.ConsolidationDescriptor; + 'com.sun.star.sheet.DataBar': com.sun.star.sheet.DataBar; + 'com.sun.star.sheet.DatabaseImportDescriptor': com.sun.star.sheet.DatabaseImportDescriptor; + 'com.sun.star.sheet.DatabaseRange': com.sun.star.sheet.DatabaseRange; + 'com.sun.star.sheet.DatabaseRanges': com.sun.star.sheet.DatabaseRanges; + 'com.sun.star.sheet.DatabaseRangesEnumeration': com.sun.star.sheet.DatabaseRangesEnumeration; + 'com.sun.star.sheet.DataPilotDescriptor': com.sun.star.sheet.DataPilotDescriptor; + 'com.sun.star.sheet.DataPilotField': com.sun.star.sheet.DataPilotField; + 'com.sun.star.sheet.DataPilotFieldGroup': com.sun.star.sheet.DataPilotFieldGroup; + 'com.sun.star.sheet.DataPilotFieldGroupEnumeration': com.sun.star.sheet.DataPilotFieldGroupEnumeration; + 'com.sun.star.sheet.DataPilotFieldGroupItem': com.sun.star.sheet.DataPilotFieldGroupItem; + 'com.sun.star.sheet.DataPilotFieldGroups': com.sun.star.sheet.DataPilotFieldGroups; + 'com.sun.star.sheet.DataPilotFieldGroupsEnumeration': com.sun.star.sheet.DataPilotFieldGroupsEnumeration; + 'com.sun.star.sheet.DataPilotFields': com.sun.star.sheet.DataPilotFields; + 'com.sun.star.sheet.DataPilotFieldsEnumeration': com.sun.star.sheet.DataPilotFieldsEnumeration; + 'com.sun.star.sheet.DataPilotItem': com.sun.star.sheet.DataPilotItem; + 'com.sun.star.sheet.DataPilotItems': com.sun.star.sheet.DataPilotItems; + 'com.sun.star.sheet.DataPilotItemsEnumeration': com.sun.star.sheet.DataPilotItemsEnumeration; + 'com.sun.star.sheet.DataPilotSource': com.sun.star.sheet.DataPilotSource; + 'com.sun.star.sheet.DataPilotSourceDimension': com.sun.star.sheet.DataPilotSourceDimension; + 'com.sun.star.sheet.DataPilotSourceDimensions': com.sun.star.sheet.DataPilotSourceDimensions; + 'com.sun.star.sheet.DataPilotSourceHierarchies': com.sun.star.sheet.DataPilotSourceHierarchies; + 'com.sun.star.sheet.DataPilotSourceHierarchy': com.sun.star.sheet.DataPilotSourceHierarchy; + 'com.sun.star.sheet.DataPilotSourceLevel': com.sun.star.sheet.DataPilotSourceLevel; + 'com.sun.star.sheet.DataPilotSourceLevels': com.sun.star.sheet.DataPilotSourceLevels; + 'com.sun.star.sheet.DataPilotSourceMember': com.sun.star.sheet.DataPilotSourceMember; + 'com.sun.star.sheet.DataPilotSourceMembers': com.sun.star.sheet.DataPilotSourceMembers; + 'com.sun.star.sheet.DataPilotTable': com.sun.star.sheet.DataPilotTable; + 'com.sun.star.sheet.DataPilotTables': com.sun.star.sheet.DataPilotTables; + 'com.sun.star.sheet.DataPilotTablesEnumeration': com.sun.star.sheet.DataPilotTablesEnumeration; + 'com.sun.star.sheet.DateCondition': com.sun.star.sheet.DateCondition; + 'com.sun.star.sheet.DDELink': com.sun.star.sheet.DDELink; + 'com.sun.star.sheet.DDELinks': com.sun.star.sheet.DDELinks; + 'com.sun.star.sheet.DDELinksEnumeration': com.sun.star.sheet.DDELinksEnumeration; + 'com.sun.star.sheet.DocumentSettings': com.sun.star.sheet.DocumentSettings; + 'com.sun.star.sheet.ExternalDocLink': com.sun.star.sheet.ExternalDocLink; + 'com.sun.star.sheet.ExternalDocLinks': com.sun.star.sheet.ExternalDocLinks; + 'com.sun.star.sheet.ExternalSheetCache': com.sun.star.sheet.ExternalSheetCache; + 'com.sun.star.sheet.FilterFormulaParser': com.sun.star.sheet.FilterFormulaParser; + 'com.sun.star.sheet.FormulaOpCodeMapper': com.sun.star.sheet.FormulaOpCodeMapper; + 'com.sun.star.sheet.FormulaParser': com.sun.star.sheet.FormulaParser; + 'com.sun.star.sheet.FunctionAccess': com.sun.star.sheet.FunctionAccess; + 'com.sun.star.sheet.FunctionDescription': com.sun.star.sheet.FunctionDescription; + 'com.sun.star.sheet.FunctionDescriptionEnumeration': com.sun.star.sheet.FunctionDescriptionEnumeration; + 'com.sun.star.sheet.FunctionDescriptions': com.sun.star.sheet.FunctionDescriptions; + 'com.sun.star.sheet.GlobalSheetSettings': com.sun.star.sheet.GlobalSheetSettings; + 'com.sun.star.sheet.HeaderFooterContent': com.sun.star.sheet.HeaderFooterContent; + 'com.sun.star.sheet.IconSet': com.sun.star.sheet.IconSet; + 'com.sun.star.sheet.LabelRange': com.sun.star.sheet.LabelRange; + 'com.sun.star.sheet.LabelRanges': com.sun.star.sheet.LabelRanges; + 'com.sun.star.sheet.LabelRangesEnumeration': com.sun.star.sheet.LabelRangesEnumeration; + 'com.sun.star.sheet.NamedRange': com.sun.star.sheet.NamedRange; + 'com.sun.star.sheet.NamedRanges': com.sun.star.sheet.NamedRanges; + 'com.sun.star.sheet.NamedRangesEnumeration': com.sun.star.sheet.NamedRangesEnumeration; + 'com.sun.star.sheet.RangeSelectionArguments': com.sun.star.sheet.RangeSelectionArguments; + 'com.sun.star.sheet.RecentFunctions': com.sun.star.sheet.RecentFunctions; + 'com.sun.star.sheet.Scenario': com.sun.star.sheet.Scenario; + 'com.sun.star.sheet.Scenarios': com.sun.star.sheet.Scenarios; + 'com.sun.star.sheet.ScenariosEnumeration': com.sun.star.sheet.ScenariosEnumeration; + 'com.sun.star.sheet.Shape': com.sun.star.sheet.Shape; + 'com.sun.star.sheet.SheetCell': com.sun.star.sheet.SheetCell; + 'com.sun.star.sheet.SheetCellCursor': com.sun.star.sheet.SheetCellCursor; + 'com.sun.star.sheet.SheetCellRange': com.sun.star.sheet.SheetCellRange; + 'com.sun.star.sheet.SheetCellRanges': com.sun.star.sheet.SheetCellRanges; + 'com.sun.star.sheet.SheetCellRangesEnumeration': com.sun.star.sheet.SheetCellRangesEnumeration; + 'com.sun.star.sheet.SheetFilterDescriptor': com.sun.star.sheet.SheetFilterDescriptor; + 'com.sun.star.sheet.SheetLink': com.sun.star.sheet.SheetLink; + 'com.sun.star.sheet.SheetLinks': com.sun.star.sheet.SheetLinks; + 'com.sun.star.sheet.SheetLinksEnumeration': com.sun.star.sheet.SheetLinksEnumeration; + 'com.sun.star.sheet.SheetRangesQuery': com.sun.star.sheet.SheetRangesQuery; + 'com.sun.star.sheet.SheetSortDescriptor': com.sun.star.sheet.SheetSortDescriptor; + 'com.sun.star.sheet.SheetSortDescriptor2': com.sun.star.sheet.SheetSortDescriptor2; + 'com.sun.star.sheet.Solver': com.sun.star.sheet.Solver; + 'com.sun.star.sheet.Spreadsheet': com.sun.star.sheet.Spreadsheet; + 'com.sun.star.sheet.SpreadsheetDocument': com.sun.star.sheet.SpreadsheetDocument; + 'com.sun.star.sheet.SpreadsheetDocumentSettings': com.sun.star.sheet.SpreadsheetDocumentSettings; + 'com.sun.star.sheet.SpreadsheetDrawPage': com.sun.star.sheet.SpreadsheetDrawPage; + 'com.sun.star.sheet.Spreadsheets': com.sun.star.sheet.Spreadsheets; + 'com.sun.star.sheet.SpreadsheetsEnumeration': com.sun.star.sheet.SpreadsheetsEnumeration; + 'com.sun.star.sheet.SpreadsheetView': com.sun.star.sheet.SpreadsheetView; + 'com.sun.star.sheet.SpreadsheetViewPane': com.sun.star.sheet.SpreadsheetViewPane; + 'com.sun.star.sheet.SpreadsheetViewPanesEnumeration': com.sun.star.sheet.SpreadsheetViewPanesEnumeration; + 'com.sun.star.sheet.SpreadsheetViewSettings': com.sun.star.sheet.SpreadsheetViewSettings; + 'com.sun.star.sheet.SubTotalDescriptor': com.sun.star.sheet.SubTotalDescriptor; + 'com.sun.star.sheet.SubTotalField': com.sun.star.sheet.SubTotalField; + 'com.sun.star.sheet.SubTotalFieldsEnumeration': com.sun.star.sheet.SubTotalFieldsEnumeration; + 'com.sun.star.sheet.TableAutoFormat': com.sun.star.sheet.TableAutoFormat; + 'com.sun.star.sheet.TableAutoFormatEnumeration': com.sun.star.sheet.TableAutoFormatEnumeration; + 'com.sun.star.sheet.TableAutoFormatField': com.sun.star.sheet.TableAutoFormatField; + 'com.sun.star.sheet.TableAutoFormats': com.sun.star.sheet.TableAutoFormats; + 'com.sun.star.sheet.TableAutoFormatsEnumeration': com.sun.star.sheet.TableAutoFormatsEnumeration; + 'com.sun.star.sheet.TableCellStyle': com.sun.star.sheet.TableCellStyle; + 'com.sun.star.sheet.TableConditionalEntry': com.sun.star.sheet.TableConditionalEntry; + 'com.sun.star.sheet.TableConditionalEntryEnumeration': com.sun.star.sheet.TableConditionalEntryEnumeration; + 'com.sun.star.sheet.TableConditionalFormat': com.sun.star.sheet.TableConditionalFormat; + 'com.sun.star.sheet.TablePageStyle': com.sun.star.sheet.TablePageStyle; + 'com.sun.star.sheet.TableValidation': com.sun.star.sheet.TableValidation; + 'com.sun.star.sheet.UniqueCellFormatRanges': com.sun.star.sheet.UniqueCellFormatRanges; + 'com.sun.star.sheet.UniqueCellFormatRangesEnumeration': com.sun.star.sheet.UniqueCellFormatRangesEnumeration; + 'com.sun.star.sheet.VolatileResult': com.sun.star.sheet.VolatileResult; + 'com.sun.star.smarttags.SmartTagAction': com.sun.star.smarttags.SmartTagAction; + 'com.sun.star.smarttags.SmartTagRecognizer': com.sun.star.smarttags.SmartTagRecognizer; + 'com.sun.star.style.CellStyle': com.sun.star.style.CellStyle; + 'com.sun.star.style.CharacterProperties': com.sun.star.style.CharacterProperties; + 'com.sun.star.style.CharacterPropertiesAsian': com.sun.star.style.CharacterPropertiesAsian; + 'com.sun.star.style.CharacterPropertiesComplex': com.sun.star.style.CharacterPropertiesComplex; + 'com.sun.star.style.CharacterStyle': com.sun.star.style.CharacterStyle; + 'com.sun.star.style.NumberingAlignment': com.sun.star.style.NumberingAlignment; + 'com.sun.star.style.NumberingLevel': com.sun.star.style.NumberingLevel; + 'com.sun.star.style.NumberingRule': com.sun.star.style.NumberingRule; + 'com.sun.star.style.PageProperties': com.sun.star.style.PageProperties; + 'com.sun.star.style.PageStyle': com.sun.star.style.PageStyle; + 'com.sun.star.style.ParagraphProperties': com.sun.star.style.ParagraphProperties; + 'com.sun.star.style.ParagraphPropertiesAsian': com.sun.star.style.ParagraphPropertiesAsian; + 'com.sun.star.style.ParagraphPropertiesComplex': com.sun.star.style.ParagraphPropertiesComplex; + 'com.sun.star.style.ParagraphStyle': com.sun.star.style.ParagraphStyle; + 'com.sun.star.style.Style': com.sun.star.style.Style; + 'com.sun.star.style.StyleFamilies': com.sun.star.style.StyleFamilies; + 'com.sun.star.style.StyleFamily': com.sun.star.style.StyleFamily; + 'com.sun.star.system.SimpleCommandMail': com.sun.star.system.SimpleCommandMail; + 'com.sun.star.system.SimpleSystemMail': com.sun.star.system.SimpleSystemMail; + 'com.sun.star.system.SystemShellExecute': com.sun.star.system.SystemShellExecute; + 'com.sun.star.table.AccessibleCellView': com.sun.star.table.AccessibleCellView; + 'com.sun.star.table.AccessibleTableView': com.sun.star.table.AccessibleTableView; + 'com.sun.star.table.Cell': com.sun.star.table.Cell; + 'com.sun.star.table.CellCursor': com.sun.star.table.CellCursor; + 'com.sun.star.table.CellProperties': com.sun.star.table.CellProperties; + 'com.sun.star.table.CellRange': com.sun.star.table.CellRange; + 'com.sun.star.table.CellRangeListSource': com.sun.star.table.CellRangeListSource; + 'com.sun.star.table.CellValueBinding': com.sun.star.table.CellValueBinding; + 'com.sun.star.table.ListPositionCellBinding': com.sun.star.table.ListPositionCellBinding; + 'com.sun.star.table.TableChart': com.sun.star.table.TableChart; + 'com.sun.star.table.TableCharts': com.sun.star.table.TableCharts; + 'com.sun.star.table.TableChartsEnumeration': com.sun.star.table.TableChartsEnumeration; + 'com.sun.star.table.TableColumn': com.sun.star.table.TableColumn; + 'com.sun.star.table.TableColumns': com.sun.star.table.TableColumns; + 'com.sun.star.table.TableColumnsEnumeration': com.sun.star.table.TableColumnsEnumeration; + 'com.sun.star.table.TableRow': com.sun.star.table.TableRow; + 'com.sun.star.table.TableRows': com.sun.star.table.TableRows; + 'com.sun.star.table.TableRowsEnumeration': com.sun.star.table.TableRowsEnumeration; + 'com.sun.star.table.TableSortDescriptor': com.sun.star.table.TableSortDescriptor; + 'com.sun.star.table.TableSortDescriptor2': com.sun.star.table.TableSortDescriptor2; + 'com.sun.star.task.AsyncJob': com.sun.star.task.AsyncJob; + 'com.sun.star.task.InteractionHandler': com.sun.star.task.InteractionHandler; + 'com.sun.star.task.InteractionRequestStringResolver': com.sun.star.task.InteractionRequestStringResolver; + 'com.sun.star.task.Job': com.sun.star.task.Job; + 'com.sun.star.task.JobExecutor': com.sun.star.task.JobExecutor; + 'com.sun.star.task.PasswordContainer': com.sun.star.task.PasswordContainer; + 'com.sun.star.task.PasswordContainerInteractionHandler': com.sun.star.task.PasswordContainerInteractionHandler; + 'com.sun.star.task.StatusIndicatorFactory': com.sun.star.task.StatusIndicatorFactory; + 'com.sun.star.text.AccessibleEndnoteView': com.sun.star.text.AccessibleEndnoteView; + 'com.sun.star.text.AccessibleFootnoteView': com.sun.star.text.AccessibleFootnoteView; + 'com.sun.star.text.AccessibleHeaderFooterView': com.sun.star.text.AccessibleHeaderFooterView; + 'com.sun.star.text.AccessiblePageView': com.sun.star.text.AccessiblePageView; + 'com.sun.star.text.AccessibleParagraphView': com.sun.star.text.AccessibleParagraphView; + 'com.sun.star.text.AccessibleTextDocumentPageView': com.sun.star.text.AccessibleTextDocumentPageView; + 'com.sun.star.text.AccessibleTextDocumentView': com.sun.star.text.AccessibleTextDocumentView; + 'com.sun.star.text.AccessibleTextEmbeddedObject': com.sun.star.text.AccessibleTextEmbeddedObject; + 'com.sun.star.text.AccessibleTextFrameView': com.sun.star.text.AccessibleTextFrameView; + 'com.sun.star.text.AccessibleTextGraphicObject': com.sun.star.text.AccessibleTextGraphicObject; + 'com.sun.star.text.AutoTextContainer': com.sun.star.text.AutoTextContainer; + 'com.sun.star.text.AutoTextEntry': com.sun.star.text.AutoTextEntry; + 'com.sun.star.text.AutoTextGroup': com.sun.star.text.AutoTextGroup; + 'com.sun.star.text.BaseFrame': com.sun.star.text.BaseFrame; + 'com.sun.star.text.BaseFrameProperties': com.sun.star.text.BaseFrameProperties; + 'com.sun.star.text.BaseIndex': com.sun.star.text.BaseIndex; + 'com.sun.star.text.BaseIndexMark': com.sun.star.text.BaseIndexMark; + 'com.sun.star.text.Bibliography': com.sun.star.text.Bibliography; + 'com.sun.star.text.Bookmark': com.sun.star.text.Bookmark; + 'com.sun.star.text.Bookmarks': com.sun.star.text.Bookmarks; + 'com.sun.star.text.Cell': com.sun.star.text.Cell; + 'com.sun.star.text.CellProperties': com.sun.star.text.CellProperties; + 'com.sun.star.text.CellRange': com.sun.star.text.CellRange; + 'com.sun.star.text.ChainedTextFrame': com.sun.star.text.ChainedTextFrame; + 'com.sun.star.text.ChapterNumberingRule': com.sun.star.text.ChapterNumberingRule; + 'com.sun.star.text.ContentIndex': com.sun.star.text.ContentIndex; + 'com.sun.star.text.ContentIndexMark': com.sun.star.text.ContentIndexMark; + 'com.sun.star.text.DefaultNumberingProvider': com.sun.star.text.DefaultNumberingProvider; + 'com.sun.star.text.Defaults': com.sun.star.text.Defaults; + 'com.sun.star.text.DependentTextField': com.sun.star.text.DependentTextField; + 'com.sun.star.text.DocumentIndex': com.sun.star.text.DocumentIndex; + 'com.sun.star.text.DocumentIndexes': com.sun.star.text.DocumentIndexes; + 'com.sun.star.text.DocumentIndexLevelFormat': com.sun.star.text.DocumentIndexLevelFormat; + 'com.sun.star.text.DocumentIndexMark': com.sun.star.text.DocumentIndexMark; + 'com.sun.star.text.DocumentIndexMarkAsian': com.sun.star.text.DocumentIndexMarkAsian; + 'com.sun.star.text.DocumentIndexParagraphStyles': com.sun.star.text.DocumentIndexParagraphStyles; + 'com.sun.star.text.DocumentSettings': com.sun.star.text.DocumentSettings; + 'com.sun.star.text.Endnote': com.sun.star.text.Endnote; + 'com.sun.star.text.EndnoteSettings': com.sun.star.text.EndnoteSettings; + 'com.sun.star.text.fieldmaster.Bibliography': com.sun.star.text.fieldmaster.Bibliography; + 'com.sun.star.text.fieldmaster.Database': com.sun.star.text.fieldmaster.Database; + 'com.sun.star.text.fieldmaster.DDE': com.sun.star.text.fieldmaster.DDE; + 'com.sun.star.text.fieldmaster.SetExpression': com.sun.star.text.fieldmaster.SetExpression; + 'com.sun.star.text.fieldmaster.User': com.sun.star.text.fieldmaster.User; + 'com.sun.star.text.Footnote': com.sun.star.text.Footnote; + 'com.sun.star.text.Footnotes': com.sun.star.text.Footnotes; + 'com.sun.star.text.FootnoteSettings': com.sun.star.text.FootnoteSettings; + 'com.sun.star.text.GenericTextDocument': com.sun.star.text.GenericTextDocument; + 'com.sun.star.text.GlobalDocument': com.sun.star.text.GlobalDocument; + 'com.sun.star.text.GlobalSettings': com.sun.star.text.GlobalSettings; + 'com.sun.star.text.IllustrationsIndex': com.sun.star.text.IllustrationsIndex; + 'com.sun.star.text.InContentMetadata': com.sun.star.text.InContentMetadata; + 'com.sun.star.text.LineNumberingProperties': com.sun.star.text.LineNumberingProperties; + 'com.sun.star.text.MailMerge': com.sun.star.text.MailMerge; + 'com.sun.star.text.ModuleDispatcher': com.sun.star.text.ModuleDispatcher; + 'com.sun.star.text.NumberingLevel': com.sun.star.text.NumberingLevel; + 'com.sun.star.text.NumberingRules': com.sun.star.text.NumberingRules; + 'com.sun.star.text.NumberingStyle': com.sun.star.text.NumberingStyle; + 'com.sun.star.text.ObjectIndex': com.sun.star.text.ObjectIndex; + 'com.sun.star.text.PageFootnoteInfo': com.sun.star.text.PageFootnoteInfo; + 'com.sun.star.text.PagePrintSettings': com.sun.star.text.PagePrintSettings; + 'com.sun.star.text.Paragraph': com.sun.star.text.Paragraph; + 'com.sun.star.text.ParagraphEnumeration': com.sun.star.text.ParagraphEnumeration; + 'com.sun.star.text.PrintSettings': com.sun.star.text.PrintSettings; + 'com.sun.star.text.RedlinePortion': com.sun.star.text.RedlinePortion; + 'com.sun.star.text.ReferenceMark': com.sun.star.text.ReferenceMark; + 'com.sun.star.text.ReferenceMarks': com.sun.star.text.ReferenceMarks; + 'com.sun.star.text.Shape': com.sun.star.text.Shape; + 'com.sun.star.text.TableColumns': com.sun.star.text.TableColumns; + 'com.sun.star.text.TableIndex': com.sun.star.text.TableIndex; + 'com.sun.star.text.TableRows': com.sun.star.text.TableRows; + 'com.sun.star.text.Text': com.sun.star.text.Text; + 'com.sun.star.text.TextColumns': com.sun.star.text.TextColumns; + 'com.sun.star.text.TextContent': com.sun.star.text.TextContent; + 'com.sun.star.text.TextContentCollection': com.sun.star.text.TextContentCollection; + 'com.sun.star.text.TextCursor': com.sun.star.text.TextCursor; + 'com.sun.star.text.TextDocument': com.sun.star.text.TextDocument; + 'com.sun.star.text.TextDocumentView': com.sun.star.text.TextDocumentView; + 'com.sun.star.text.TextEmbeddedObject': com.sun.star.text.TextEmbeddedObject; + 'com.sun.star.text.TextEmbeddedObjects': com.sun.star.text.TextEmbeddedObjects; + 'com.sun.star.text.TextField': com.sun.star.text.TextField; + 'com.sun.star.text.textfield.Annotation': com.sun.star.text.textfield.Annotation; + 'com.sun.star.text.textfield.Author': com.sun.star.text.textfield.Author; + 'com.sun.star.text.textfield.Bibliography': com.sun.star.text.textfield.Bibliography; + 'com.sun.star.text.textfield.Chapter': com.sun.star.text.textfield.Chapter; + 'com.sun.star.text.textfield.CharacterCount': com.sun.star.text.textfield.CharacterCount; + 'com.sun.star.text.textfield.CombinedCharacters': com.sun.star.text.textfield.CombinedCharacters; + 'com.sun.star.text.textfield.ConditionalText': com.sun.star.text.textfield.ConditionalText; + 'com.sun.star.text.textfield.Database': com.sun.star.text.textfield.Database; + 'com.sun.star.text.textfield.DatabaseName': com.sun.star.text.textfield.DatabaseName; + 'com.sun.star.text.textfield.DatabaseNextSet': com.sun.star.text.textfield.DatabaseNextSet; + 'com.sun.star.text.textfield.DatabaseNumberOfSet': com.sun.star.text.textfield.DatabaseNumberOfSet; + 'com.sun.star.text.textfield.DatabaseSetNumber': com.sun.star.text.textfield.DatabaseSetNumber; + 'com.sun.star.text.textfield.DateTime': com.sun.star.text.textfield.DateTime; + 'com.sun.star.text.textfield.DDE': com.sun.star.text.textfield.DDE; + 'com.sun.star.text.textfield.docinfo.ChangeAuthor': com.sun.star.text.textfield.docinfo.ChangeAuthor; + 'com.sun.star.text.textfield.docinfo.ChangeDateTime': com.sun.star.text.textfield.docinfo.ChangeDateTime; + 'com.sun.star.text.textfield.docinfo.CreateAuthor': com.sun.star.text.textfield.docinfo.CreateAuthor; + 'com.sun.star.text.textfield.docinfo.CreateDateTime': com.sun.star.text.textfield.docinfo.CreateDateTime; + 'com.sun.star.text.textfield.docinfo.Custom': com.sun.star.text.textfield.docinfo.Custom; + 'com.sun.star.text.textfield.docinfo.Description': com.sun.star.text.textfield.docinfo.Description; + 'com.sun.star.text.textfield.docinfo.EditTime': com.sun.star.text.textfield.docinfo.EditTime; + 'com.sun.star.text.textfield.docinfo.Keywords': com.sun.star.text.textfield.docinfo.Keywords; + 'com.sun.star.text.textfield.docinfo.PrintAuthor': com.sun.star.text.textfield.docinfo.PrintAuthor; + 'com.sun.star.text.textfield.docinfo.PrintDateTime': com.sun.star.text.textfield.docinfo.PrintDateTime; + 'com.sun.star.text.textfield.docinfo.Revision': com.sun.star.text.textfield.docinfo.Revision; + 'com.sun.star.text.textfield.docinfo.Subject': com.sun.star.text.textfield.docinfo.Subject; + 'com.sun.star.text.textfield.docinfo.Title': com.sun.star.text.textfield.docinfo.Title; + 'com.sun.star.text.textfield.DropDown': com.sun.star.text.textfield.DropDown; + 'com.sun.star.text.textfield.EmbeddedObjectCount': com.sun.star.text.textfield.EmbeddedObjectCount; + 'com.sun.star.text.textfield.ExtendedUser': com.sun.star.text.textfield.ExtendedUser; + 'com.sun.star.text.textfield.FileName': com.sun.star.text.textfield.FileName; + 'com.sun.star.text.textfield.GetExpression': com.sun.star.text.textfield.GetExpression; + 'com.sun.star.text.textfield.GetReference': com.sun.star.text.textfield.GetReference; + 'com.sun.star.text.textfield.GraphicObjectCount': com.sun.star.text.textfield.GraphicObjectCount; + 'com.sun.star.text.textfield.HiddenParagraph': com.sun.star.text.textfield.HiddenParagraph; + 'com.sun.star.text.textfield.HiddenText': com.sun.star.text.textfield.HiddenText; + 'com.sun.star.text.textfield.Input': com.sun.star.text.textfield.Input; + 'com.sun.star.text.textfield.InputUser': com.sun.star.text.textfield.InputUser; + 'com.sun.star.text.textfield.JumpEdit': com.sun.star.text.textfield.JumpEdit; + 'com.sun.star.text.textfield.Macro': com.sun.star.text.textfield.Macro; + 'com.sun.star.text.textfield.MetadataField': com.sun.star.text.textfield.MetadataField; + 'com.sun.star.text.textfield.PageCount': com.sun.star.text.textfield.PageCount; + 'com.sun.star.text.textfield.PageNumber': com.sun.star.text.textfield.PageNumber; + 'com.sun.star.text.textfield.ParagraphCount': com.sun.star.text.textfield.ParagraphCount; + 'com.sun.star.text.textfield.ReferencePageGet': com.sun.star.text.textfield.ReferencePageGet; + 'com.sun.star.text.textfield.ReferencePageSet': com.sun.star.text.textfield.ReferencePageSet; + 'com.sun.star.text.textfield.Script': com.sun.star.text.textfield.Script; + 'com.sun.star.text.textfield.SetExpression': com.sun.star.text.textfield.SetExpression; + 'com.sun.star.text.textfield.TableCount': com.sun.star.text.textfield.TableCount; + 'com.sun.star.text.textfield.TableFormula': com.sun.star.text.textfield.TableFormula; + 'com.sun.star.text.textfield.TemplateName': com.sun.star.text.textfield.TemplateName; + 'com.sun.star.text.textfield.URL': com.sun.star.text.textfield.URL; + 'com.sun.star.text.textfield.User': com.sun.star.text.textfield.User; + 'com.sun.star.text.textfield.WordCount': com.sun.star.text.textfield.WordCount; + 'com.sun.star.text.TextFieldEnumeration': com.sun.star.text.TextFieldEnumeration; + 'com.sun.star.text.TextFieldMaster': com.sun.star.text.TextFieldMaster; + 'com.sun.star.text.TextFieldMasters': com.sun.star.text.TextFieldMasters; + 'com.sun.star.text.TextFields': com.sun.star.text.TextFields; + 'com.sun.star.text.TextFrame': com.sun.star.text.TextFrame; + 'com.sun.star.text.TextFrames': com.sun.star.text.TextFrames; + 'com.sun.star.text.TextGraphicObject': com.sun.star.text.TextGraphicObject; + 'com.sun.star.text.TextGraphicObjects': com.sun.star.text.TextGraphicObjects; + 'com.sun.star.text.TextLayoutCursor': com.sun.star.text.TextLayoutCursor; + 'com.sun.star.text.TextPageStyle': com.sun.star.text.TextPageStyle; + 'com.sun.star.text.TextPortion': com.sun.star.text.TextPortion; + 'com.sun.star.text.TextPortionEnumeration': com.sun.star.text.TextPortionEnumeration; + 'com.sun.star.text.TextRange': com.sun.star.text.TextRange; + 'com.sun.star.text.TextRangeContentProperties': com.sun.star.text.TextRangeContentProperties; + 'com.sun.star.text.TextRanges': com.sun.star.text.TextRanges; + 'com.sun.star.text.TextSection': com.sun.star.text.TextSection; + 'com.sun.star.text.TextSections': com.sun.star.text.TextSections; + 'com.sun.star.text.TextSortable': com.sun.star.text.TextSortable; + 'com.sun.star.text.TextSortDescriptor': com.sun.star.text.TextSortDescriptor; + 'com.sun.star.text.TextSortDescriptor2': com.sun.star.text.TextSortDescriptor2; + 'com.sun.star.text.TextTable': com.sun.star.text.TextTable; + 'com.sun.star.text.TextTableCursor': com.sun.star.text.TextTableCursor; + 'com.sun.star.text.TextTableRow': com.sun.star.text.TextTableRow; + 'com.sun.star.text.TextTables': com.sun.star.text.TextTables; + 'com.sun.star.text.TextViewCursor': com.sun.star.text.TextViewCursor; + 'com.sun.star.text.UserDefinedIndex': com.sun.star.text.UserDefinedIndex; + 'com.sun.star.text.UserIndex': com.sun.star.text.UserIndex; + 'com.sun.star.text.UserIndexMark': com.sun.star.text.UserIndexMark; + 'com.sun.star.text.ViewSettings': com.sun.star.text.ViewSettings; + 'com.sun.star.text.WebDocument': com.sun.star.text.WebDocument; + 'com.sun.star.ucb.AnyCompareFactory': com.sun.star.ucb.AnyCompareFactory; + 'com.sun.star.ucb.CachedContentResultSet': com.sun.star.ucb.CachedContentResultSet; + 'com.sun.star.ucb.CachedContentResultSetFactory': com.sun.star.ucb.CachedContentResultSetFactory; + 'com.sun.star.ucb.CachedContentResultSetStub': com.sun.star.ucb.CachedContentResultSetStub; + 'com.sun.star.ucb.CachedContentResultSetStubFactory': com.sun.star.ucb.CachedContentResultSetStubFactory; + 'com.sun.star.ucb.CachedDynamicResultSet': com.sun.star.ucb.CachedDynamicResultSet; + 'com.sun.star.ucb.CachedDynamicResultSetFactory': com.sun.star.ucb.CachedDynamicResultSetFactory; + 'com.sun.star.ucb.CachedDynamicResultSetStub': com.sun.star.ucb.CachedDynamicResultSetStub; + 'com.sun.star.ucb.CachedDynamicResultSetStubFactory': com.sun.star.ucb.CachedDynamicResultSetStubFactory; + 'com.sun.star.ucb.CmisContentProvider': com.sun.star.ucb.CmisContentProvider; + 'com.sun.star.ucb.CommandEnvironment': com.sun.star.ucb.CommandEnvironment; + 'com.sun.star.ucb.Content': com.sun.star.ucb.Content; + 'com.sun.star.ucb.ContentProvider': com.sun.star.ucb.ContentProvider; + 'com.sun.star.ucb.ContentProviderProxy': com.sun.star.ucb.ContentProviderProxy; + 'com.sun.star.ucb.ContentProviderProxyFactory': com.sun.star.ucb.ContentProviderProxyFactory; + 'com.sun.star.ucb.ContentResultSet': com.sun.star.ucb.ContentResultSet; + 'com.sun.star.ucb.ContentTransmitter': com.sun.star.ucb.ContentTransmitter; + 'com.sun.star.ucb.DefaultHierarchyDataSource': com.sun.star.ucb.DefaultHierarchyDataSource; + 'com.sun.star.ucb.DynamicResultSet': com.sun.star.ucb.DynamicResultSet; + 'com.sun.star.ucb.ExpandContentProvider': com.sun.star.ucb.ExpandContentProvider; + 'com.sun.star.ucb.FileContent': com.sun.star.ucb.FileContent; + 'com.sun.star.ucb.FileContentProvider': com.sun.star.ucb.FileContentProvider; + 'com.sun.star.ucb.FTPContent': com.sun.star.ucb.FTPContent; + 'com.sun.star.ucb.FTPContentProvider': com.sun.star.ucb.FTPContentProvider; + 'com.sun.star.ucb.GIOContentProvider': com.sun.star.ucb.GIOContentProvider; + 'com.sun.star.ucb.GnomeVFSContentProvider': com.sun.star.ucb.GnomeVFSContentProvider; + 'com.sun.star.ucb.GnomeVFSDocumentContent': com.sun.star.ucb.GnomeVFSDocumentContent; + 'com.sun.star.ucb.GnomeVFSFolderContent': com.sun.star.ucb.GnomeVFSFolderContent; + 'com.sun.star.ucb.HelpContent': com.sun.star.ucb.HelpContent; + 'com.sun.star.ucb.HelpContentProvider': com.sun.star.ucb.HelpContentProvider; + 'com.sun.star.ucb.HierarchyContentProvider': com.sun.star.ucb.HierarchyContentProvider; + 'com.sun.star.ucb.HierarchyDataReadAccess': com.sun.star.ucb.HierarchyDataReadAccess; + 'com.sun.star.ucb.HierarchyDataReadWriteAccess': com.sun.star.ucb.HierarchyDataReadWriteAccess; + 'com.sun.star.ucb.HierarchyDataSource': com.sun.star.ucb.HierarchyDataSource; + 'com.sun.star.ucb.HierarchyFolderContent': com.sun.star.ucb.HierarchyFolderContent; + 'com.sun.star.ucb.HierarchyLinkContent': com.sun.star.ucb.HierarchyLinkContent; + 'com.sun.star.ucb.HierarchyRootFolderContent': com.sun.star.ucb.HierarchyRootFolderContent; + 'com.sun.star.ucb.ODMAContent': com.sun.star.ucb.ODMAContent; + 'com.sun.star.ucb.ODMAContentProvider': com.sun.star.ucb.ODMAContentProvider; + 'com.sun.star.ucb.PackageContentProvider': com.sun.star.ucb.PackageContentProvider; + 'com.sun.star.ucb.PackageFolderContent': com.sun.star.ucb.PackageFolderContent; + 'com.sun.star.ucb.PackageStreamContent': com.sun.star.ucb.PackageStreamContent; + 'com.sun.star.ucb.PersistentPropertySet': com.sun.star.ucb.PersistentPropertySet; + 'com.sun.star.ucb.PropertiesManager': com.sun.star.ucb.PropertiesManager; + 'com.sun.star.ucb.PropertySetRegistry': com.sun.star.ucb.PropertySetRegistry; + 'com.sun.star.ucb.RemoteAccessContentProvider': com.sun.star.ucb.RemoteAccessContentProvider; + 'com.sun.star.ucb.RemoteContentProviderAcceptor': com.sun.star.ucb.RemoteContentProviderAcceptor; + 'com.sun.star.ucb.RemoteProxyContentProvider': com.sun.star.ucb.RemoteProxyContentProvider; + 'com.sun.star.ucb.SimpleFileAccess': com.sun.star.ucb.SimpleFileAccess; + 'com.sun.star.ucb.SortedDynamicResultSetFactory': com.sun.star.ucb.SortedDynamicResultSetFactory; + 'com.sun.star.ucb.Store': com.sun.star.ucb.Store; + 'com.sun.star.ucb.TransientDocumentsContentProvider': com.sun.star.ucb.TransientDocumentsContentProvider; + 'com.sun.star.ucb.TransientDocumentsDocumentContent': com.sun.star.ucb.TransientDocumentsDocumentContent; + 'com.sun.star.ucb.TransientDocumentsFolderContent': com.sun.star.ucb.TransientDocumentsFolderContent; + 'com.sun.star.ucb.TransientDocumentsRootContent': com.sun.star.ucb.TransientDocumentsRootContent; + 'com.sun.star.ucb.TransientDocumentsStreamContent': com.sun.star.ucb.TransientDocumentsStreamContent; + 'com.sun.star.ucb.UniversalContentBroker': com.sun.star.ucb.UniversalContentBroker; + 'com.sun.star.ucb.WebDAVContentProvider': com.sun.star.ucb.WebDAVContentProvider; + 'com.sun.star.ucb.WebDAVDocumentContent': com.sun.star.ucb.WebDAVDocumentContent; + 'com.sun.star.ucb.WebDAVFolderContent': com.sun.star.ucb.WebDAVFolderContent; + 'com.sun.star.ui.ActionTrigger': com.sun.star.ui.ActionTrigger; + 'com.sun.star.ui.ActionTriggerContainer': com.sun.star.ui.ActionTriggerContainer; + 'com.sun.star.ui.ActionTriggerSeparator': com.sun.star.ui.ActionTriggerSeparator; + 'com.sun.star.ui.AddressBookSourceDialog': com.sun.star.ui.AddressBookSourceDialog; + 'com.sun.star.ui.ConfigurableUIElement': com.sun.star.ui.ConfigurableUIElement; + 'com.sun.star.ui.dialogs.AddressBookSourcePilot': com.sun.star.ui.dialogs.AddressBookSourcePilot; + 'com.sun.star.ui.dialogs.FilePicker': com.sun.star.ui.dialogs.FilePicker; + 'com.sun.star.ui.dialogs.FilterOptionsDialog': com.sun.star.ui.dialogs.FilterOptionsDialog; + 'com.sun.star.ui.dialogs.FolderPicker': com.sun.star.ui.dialogs.FolderPicker; + 'com.sun.star.ui.dialogs.Wizard': com.sun.star.ui.dialogs.Wizard; + 'com.sun.star.ui.dialogs.XSLTFilterDialog': com.sun.star.ui.dialogs.XSLTFilterDialog; + 'com.sun.star.ui.DocumentAcceleratorConfiguration': com.sun.star.ui.DocumentAcceleratorConfiguration; + 'com.sun.star.ui.GlobalAcceleratorConfiguration': com.sun.star.ui.GlobalAcceleratorConfiguration; + 'com.sun.star.ui.ImageManager': com.sun.star.ui.ImageManager; + 'com.sun.star.ui.ItemDescriptor': com.sun.star.ui.ItemDescriptor; + 'com.sun.star.ui.ModuleAcceleratorConfiguration': com.sun.star.ui.ModuleAcceleratorConfiguration; + 'com.sun.star.ui.ModuleUICategoryDescription': com.sun.star.ui.ModuleUICategoryDescription; + 'com.sun.star.ui.ModuleUICommandDescription': com.sun.star.ui.ModuleUICommandDescription; + 'com.sun.star.ui.ModuleUIConfigurationManager': com.sun.star.ui.ModuleUIConfigurationManager; + 'com.sun.star.ui.ModuleWindowStateConfiguration': com.sun.star.ui.ModuleWindowStateConfiguration; + 'com.sun.star.ui.test.UITest': com.sun.star.ui.test.UITest; + 'com.sun.star.ui.UICategoryDescription': com.sun.star.ui.UICategoryDescription; + 'com.sun.star.ui.UIConfigurationManager': com.sun.star.ui.UIConfigurationManager; + 'com.sun.star.ui.UIElement': com.sun.star.ui.UIElement; + 'com.sun.star.ui.UIElementFactory': com.sun.star.ui.UIElementFactory; + 'com.sun.star.ui.UIElementFactoryManager': com.sun.star.ui.UIElementFactoryManager; + 'com.sun.star.ui.UIElementSettings': com.sun.star.ui.UIElementSettings; + 'com.sun.star.ui.WindowContentFactory': com.sun.star.ui.WindowContentFactory; + 'com.sun.star.ui.WindowContentFactoryManager': com.sun.star.ui.WindowContentFactoryManager; + 'com.sun.star.ui.WindowStateConfiguration': com.sun.star.ui.WindowStateConfiguration; + 'com.sun.star.uno.NamingService': com.sun.star.uno.NamingService; + 'com.sun.star.uri.ExternalUriReferenceTranslator': com.sun.star.uri.ExternalUriReferenceTranslator; + 'com.sun.star.uri.UriReferenceFactory': com.sun.star.uri.UriReferenceFactory; + 'com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTexpand': com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTexpand; + 'com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript': com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript; + 'com.sun.star.uri.VndSunStarPkgUrlReferenceFactory': com.sun.star.uri.VndSunStarPkgUrlReferenceFactory; + 'com.sun.star.util.BootstrapMacroExpander': com.sun.star.util.BootstrapMacroExpander; + 'com.sun.star.util.JobManager': com.sun.star.util.JobManager; + 'com.sun.star.util.MacroExpander': com.sun.star.util.MacroExpander; + 'com.sun.star.util.NumberFormatProperties': com.sun.star.util.NumberFormatProperties; + 'com.sun.star.util.NumberFormats': com.sun.star.util.NumberFormats; + 'com.sun.star.util.NumberFormatSettings': com.sun.star.util.NumberFormatSettings; + 'com.sun.star.util.NumberFormatsSupplier': com.sun.star.util.NumberFormatsSupplier; + 'com.sun.star.util.NumberFormatter': com.sun.star.util.NumberFormatter; + 'com.sun.star.util.OfficeInstallationDirectories': com.sun.star.util.OfficeInstallationDirectories; + 'com.sun.star.util.PathSettings': com.sun.star.util.PathSettings; + 'com.sun.star.util.PathSubstitution': com.sun.star.util.PathSubstitution; + 'com.sun.star.util.ReplaceDescriptor': com.sun.star.util.ReplaceDescriptor; + 'com.sun.star.util.SearchDescriptor': com.sun.star.util.SearchDescriptor; + 'com.sun.star.util.Sortable': com.sun.star.util.Sortable; + 'com.sun.star.util.SortDescriptor': com.sun.star.util.SortDescriptor; + 'com.sun.star.util.SortDescriptor2': com.sun.star.util.SortDescriptor2; + 'com.sun.star.util.TextSearch': com.sun.star.util.TextSearch; + 'com.sun.star.util.TextSearch2': com.sun.star.util.TextSearch2; + 'com.sun.star.util.UriAbbreviation': com.sun.star.util.UriAbbreviation; + 'com.sun.star.util.URLTransformer': com.sun.star.util.URLTransformer; + 'com.sun.star.view.OfficeDocumentView': com.sun.star.view.OfficeDocumentView; + 'com.sun.star.view.PrinterDescriptor': com.sun.star.view.PrinterDescriptor; + 'com.sun.star.view.PrintOptions': com.sun.star.view.PrintOptions; + 'com.sun.star.view.PrintSettings': com.sun.star.view.PrintSettings; + 'com.sun.star.view.RenderDescriptor': com.sun.star.view.RenderDescriptor; + 'com.sun.star.view.RenderOptions': com.sun.star.view.RenderOptions; + 'com.sun.star.view.ViewSettings': com.sun.star.view.ViewSettings; + 'com.sun.star.xforms.Binding': com.sun.star.xforms.Binding; + 'com.sun.star.xforms.Model': com.sun.star.xforms.Model; + 'com.sun.star.xforms.XForms': com.sun.star.xforms.XForms; + 'com.sun.star.xml.AttributeContainer': com.sun.star.xml.AttributeContainer; + 'com.sun.star.xml.crypto.NSSInitializer': com.sun.star.xml.crypto.NSSInitializer; + 'com.sun.star.xml.crypto.sax.Decryptor': com.sun.star.xml.crypto.sax.Decryptor; + 'com.sun.star.xml.crypto.sax.Encryptor': com.sun.star.xml.crypto.sax.Encryptor; + 'com.sun.star.xml.crypto.sax.SAXEventKeeper': com.sun.star.xml.crypto.sax.SAXEventKeeper; + 'com.sun.star.xml.crypto.sax.SignatureCreator': com.sun.star.xml.crypto.sax.SignatureCreator; + 'com.sun.star.xml.crypto.sax.SignatureVerifier': com.sun.star.xml.crypto.sax.SignatureVerifier; + 'com.sun.star.xml.crypto.SecurityEnvironment': com.sun.star.xml.crypto.SecurityEnvironment; + 'com.sun.star.xml.crypto.SEInitializer': com.sun.star.xml.crypto.SEInitializer; + 'com.sun.star.xml.crypto.XMLEncryption': com.sun.star.xml.crypto.XMLEncryption; + 'com.sun.star.xml.crypto.XMLEncryptionTemplate': com.sun.star.xml.crypto.XMLEncryptionTemplate; + 'com.sun.star.xml.crypto.XMLSecurityContext': com.sun.star.xml.crypto.XMLSecurityContext; + 'com.sun.star.xml.crypto.XMLSignature': com.sun.star.xml.crypto.XMLSignature; + 'com.sun.star.xml.crypto.XMLSignatureTemplate': com.sun.star.xml.crypto.XMLSignatureTemplate; + 'com.sun.star.xml.dom.DocumentBuilder': com.sun.star.xml.dom.DocumentBuilder; + 'com.sun.star.xml.dom.SAXDocumentBuilder': com.sun.star.xml.dom.SAXDocumentBuilder; + 'com.sun.star.xml.ExportFilter': com.sun.star.xml.ExportFilter; + 'com.sun.star.xml.ImportFilter': com.sun.star.xml.ImportFilter; + 'com.sun.star.xml.input.SaxDocumentHandler': com.sun.star.xml.input.SaxDocumentHandler; + 'com.sun.star.xml.NamespaceContainer': com.sun.star.xml.NamespaceContainer; + 'com.sun.star.xml.ParaUserDefinedAttributesSupplier': com.sun.star.xml.ParaUserDefinedAttributesSupplier; + 'com.sun.star.xml.sax.FastParser': com.sun.star.xml.sax.FastParser; + 'com.sun.star.xml.sax.FastShapeContextHandler': com.sun.star.xml.sax.FastShapeContextHandler; + 'com.sun.star.xml.sax.FastTokenHandler': com.sun.star.xml.sax.FastTokenHandler; + 'com.sun.star.xml.sax.Parser': com.sun.star.xml.sax.Parser; + 'com.sun.star.xml.sax.Writer': com.sun.star.xml.sax.Writer; + 'com.sun.star.xml.TextUserDefinedAttributesSupplier': com.sun.star.xml.TextUserDefinedAttributesSupplier; + 'com.sun.star.xml.UserDefinedAttributesSupplier': com.sun.star.xml.UserDefinedAttributesSupplier; + 'com.sun.star.xml.wrapper.XMLDocumentWrapper': com.sun.star.xml.wrapper.XMLDocumentWrapper; + 'com.sun.star.xml.wrapper.XMLElementWrapper': com.sun.star.xml.wrapper.XMLElementWrapper; + 'com.sun.star.xml.XMLExportFilter': com.sun.star.xml.XMLExportFilter; + 'com.sun.star.xml.XMLImportFilter': com.sun.star.xml.XMLImportFilter; + 'com.sun.star.xml.xpath.XPathAPI': com.sun.star.xml.xpath.XPathAPI; + 'com.sun.star.xml.xpath.XPathExtension': com.sun.star.xml.xpath.XPathExtension; + 'com.sun.star.xml.xslt.XSLT2Transformer': com.sun.star.xml.xslt.XSLT2Transformer; + 'com.sun.star.xml.xslt.XSLTTransformer': com.sun.star.xml.xslt.XSLTTransformer; + 'com.sun.star.xsd.Boolean': com.sun.star.xsd.Boolean; + 'com.sun.star.xsd.Date': com.sun.star.xsd.Date; + 'com.sun.star.xsd.DateTime': com.sun.star.xsd.DateTime; + 'com.sun.star.xsd.Day': com.sun.star.xsd.Day; + 'com.sun.star.xsd.Decimal': com.sun.star.xsd.Decimal; + 'com.sun.star.xsd.Month': com.sun.star.xsd.Month; + 'com.sun.star.xsd.String': com.sun.star.xsd.String; + 'com.sun.star.xsd.Time': com.sun.star.xsd.Time; + 'com.sun.star.xsd.Year': com.sun.star.xsd.Year; + 'org.freedesktop.PackageKit.SyncDbusSessionHelper': org.freedesktop.PackageKit.SyncDbusSessionHelper; + } + + interface SingletonsNameMap { + '/singleton/com.sun.star.beans.theIntrospection': com.sun.star.beans.theIntrospection; + '/singleton/com.sun.star.configuration.theDefaultProvider': com.sun.star.configuration.theDefaultProvider; + '/singleton/com.sun.star.configuration.Update': com.sun.star.configuration.Update; + '/singleton/com.sun.star.deployment.ExtensionManager': com.sun.star.deployment.ExtensionManager; + '/singleton/com.sun.star.deployment.PackageInformationProvider': com.sun.star.deployment.PackageInformationProvider; + '/singleton/com.sun.star.deployment.thePackageManagerFactory': com.sun.star.deployment.thePackageManagerFactory; + '/singleton/com.sun.star.frame.theAutoRecovery': com.sun.star.frame.theAutoRecovery; + '/singleton/com.sun.star.frame.theDesktop': com.sun.star.frame.theDesktop; + '/singleton/com.sun.star.frame.theGlobalEventBroadcaster': com.sun.star.frame.theGlobalEventBroadcaster; + '/singleton/com.sun.star.frame.thePopupMenuControllerFactory': com.sun.star.frame.thePopupMenuControllerFactory; + '/singleton/com.sun.star.frame.theStatusbarControllerFactory': com.sun.star.frame.theStatusbarControllerFactory; + '/singleton/com.sun.star.frame.theToolbarControllerFactory': com.sun.star.frame.theToolbarControllerFactory; + '/singleton/com.sun.star.frame.theUICommandDescription': com.sun.star.frame.theUICommandDescription; + '/singleton/com.sun.star.logging.DocumentIOLogRing': com.sun.star.logging.DocumentIOLogRing; + '/singleton/com.sun.star.logging.LoggerPool': com.sun.star.logging.LoggerPool; + '/singleton/com.sun.star.reflection.theCoreReflection': com.sun.star.reflection.theCoreReflection; + '/singleton/com.sun.star.resource.OfficeResourceLoader': com.sun.star.resource.OfficeResourceLoader; + '/singleton/com.sun.star.script.browse.theBrowseNodeFactory': com.sun.star.script.browse.theBrowseNodeFactory; + '/singleton/com.sun.star.script.provider.theMasterScriptProviderFactory': com.sun.star.script.provider.theMasterScriptProviderFactory; + '/singleton/com.sun.star.script.theServiceDocumenter': com.sun.star.script.theServiceDocumenter; + '/singleton/com.sun.star.sdb.DataAccessDescriptorFactory': com.sun.star.sdb.DataAccessDescriptorFactory; + '/singleton/com.sun.star.task.OfficeRestartManager': com.sun.star.task.OfficeRestartManager; + '/singleton/com.sun.star.task.theJobExecutor': com.sun.star.task.theJobExecutor; + '/singleton/com.sun.star.ui.ContextChangeEventMultiplexer': com.sun.star.ui.ContextChangeEventMultiplexer; + '/singleton/com.sun.star.ui.theModuleUIConfigurationManagerSupplier': com.sun.star.ui.theModuleUIConfigurationManagerSupplier; + '/singleton/com.sun.star.ui.theUICategoryDescription': com.sun.star.ui.theUICategoryDescription; + '/singleton/com.sun.star.ui.theUIElementFactoryManager': com.sun.star.ui.theUIElementFactoryManager; + '/singleton/com.sun.star.ui.theWindowContentFactoryManager': com.sun.star.ui.theWindowContentFactoryManager; + '/singleton/com.sun.star.ui.theWindowStateConfiguration': com.sun.star.ui.theWindowStateConfiguration; + '/singleton/com.sun.star.util.theMacroExpander': com.sun.star.util.theMacroExpander; + '/singleton/com.sun.star.util.theOfficeInstallationDirectories': com.sun.star.util.theOfficeInstallationDirectories; + '/singleton/com.sun.star.util.thePathSettings': com.sun.star.util.thePathSettings; + } + + interface StructNameMap { + 'com.sun.star.accessibility.AccessibleEventObject': com.sun.star.accessibility.AccessibleEventObject; + 'com.sun.star.accessibility.AccessibleRelation': com.sun.star.accessibility.AccessibleRelation; + 'com.sun.star.accessibility.AccessibleTableModelChange': com.sun.star.accessibility.AccessibleTableModelChange; + 'com.sun.star.accessibility.TextSegment': com.sun.star.accessibility.TextSegment; + 'com.sun.star.animations.Event': com.sun.star.animations.Event; + 'com.sun.star.animations.TargetProperties': com.sun.star.animations.TargetProperties; + 'com.sun.star.animations.TimeFilterPair': com.sun.star.animations.TimeFilterPair; + 'com.sun.star.animations.ValuePair': com.sun.star.animations.ValuePair; + 'com.sun.star.awt.ActionEvent': com.sun.star.awt.ActionEvent; + 'com.sun.star.awt.AdjustmentEvent': com.sun.star.awt.AdjustmentEvent; + 'com.sun.star.awt.DeviceInfo': com.sun.star.awt.DeviceInfo; + 'com.sun.star.awt.DockingData': com.sun.star.awt.DockingData; + 'com.sun.star.awt.DockingEvent': com.sun.star.awt.DockingEvent; + 'com.sun.star.awt.EndDockingEvent': com.sun.star.awt.EndDockingEvent; + 'com.sun.star.awt.EndPopupModeEvent': com.sun.star.awt.EndPopupModeEvent; + 'com.sun.star.awt.EnhancedMouseEvent': com.sun.star.awt.EnhancedMouseEvent; + 'com.sun.star.awt.FocusEvent': com.sun.star.awt.FocusEvent; + 'com.sun.star.awt.FontDescriptor': com.sun.star.awt.FontDescriptor; + 'com.sun.star.awt.Gradient': com.sun.star.awt.Gradient; + 'com.sun.star.awt.grid.GridColumnEvent': com.sun.star.awt.grid.GridColumnEvent; + 'com.sun.star.awt.grid.GridDataEvent': com.sun.star.awt.grid.GridDataEvent; + 'com.sun.star.awt.grid.GridSelectionEvent': com.sun.star.awt.grid.GridSelectionEvent; + 'com.sun.star.awt.InputEvent': com.sun.star.awt.InputEvent; + 'com.sun.star.awt.ItemEvent': com.sun.star.awt.ItemEvent; + 'com.sun.star.awt.ItemListEvent': com.sun.star.awt.ItemListEvent; + 'com.sun.star.awt.KeyEvent': com.sun.star.awt.KeyEvent; + 'com.sun.star.awt.KeyStroke': com.sun.star.awt.KeyStroke; + 'com.sun.star.awt.MenuEvent': com.sun.star.awt.MenuEvent; + 'com.sun.star.awt.MouseEvent': com.sun.star.awt.MouseEvent; + 'com.sun.star.awt.PaintEvent': com.sun.star.awt.PaintEvent; + 'com.sun.star.awt.Point': com.sun.star.awt.Point; + 'com.sun.star.awt.Rectangle': com.sun.star.awt.Rectangle; + 'com.sun.star.awt.Selection': com.sun.star.awt.Selection; + 'com.sun.star.awt.SimpleFontMetric': com.sun.star.awt.SimpleFontMetric; + 'com.sun.star.awt.Size': com.sun.star.awt.Size; + 'com.sun.star.awt.SpinEvent': com.sun.star.awt.SpinEvent; + 'com.sun.star.awt.SystemDependentXWindow': com.sun.star.awt.SystemDependentXWindow; + 'com.sun.star.awt.tab.TabPageActivatedEvent': com.sun.star.awt.tab.TabPageActivatedEvent; + 'com.sun.star.awt.TextEvent': com.sun.star.awt.TextEvent; + 'com.sun.star.awt.tree.TreeDataModelEvent': com.sun.star.awt.tree.TreeDataModelEvent; + 'com.sun.star.awt.tree.TreeExpansionEvent': com.sun.star.awt.tree.TreeExpansionEvent; + 'com.sun.star.awt.VclContainerEvent': com.sun.star.awt.VclContainerEvent; + 'com.sun.star.awt.WindowDescriptor': com.sun.star.awt.WindowDescriptor; + 'com.sun.star.awt.WindowEvent': com.sun.star.awt.WindowEvent; + 'com.sun.star.beans.GetDirectPropertyTolerantResult': com.sun.star.beans.GetDirectPropertyTolerantResult; + 'com.sun.star.beans.GetPropertyTolerantResult': com.sun.star.beans.GetPropertyTolerantResult; + 'com.sun.star.beans.NamedValue': com.sun.star.beans.NamedValue; + 'com.sun.star.beans.Property': com.sun.star.beans.Property; + 'com.sun.star.beans.PropertyChangeEvent': com.sun.star.beans.PropertyChangeEvent; + 'com.sun.star.beans.PropertySetInfoChangeEvent': com.sun.star.beans.PropertySetInfoChangeEvent; + 'com.sun.star.beans.PropertyStateChangeEvent': com.sun.star.beans.PropertyStateChangeEvent; + 'com.sun.star.beans.PropertyValue': com.sun.star.beans.PropertyValue; + 'com.sun.star.beans.SetPropertyTolerantFailed': com.sun.star.beans.SetPropertyTolerantFailed; + 'com.sun.star.beans.StringPair': com.sun.star.beans.StringPair; + 'com.sun.star.bridge.oleautomation.Currency': com.sun.star.bridge.oleautomation.Currency; + 'com.sun.star.bridge.oleautomation.Date': com.sun.star.bridge.oleautomation.Date; + 'com.sun.star.bridge.oleautomation.Decimal': com.sun.star.bridge.oleautomation.Decimal; + 'com.sun.star.bridge.oleautomation.NamedArgument': com.sun.star.bridge.oleautomation.NamedArgument; + 'com.sun.star.bridge.oleautomation.PropertyPutArgument': com.sun.star.bridge.oleautomation.PropertyPutArgument; + 'com.sun.star.bridge.oleautomation.SCode': com.sun.star.bridge.oleautomation.SCode; + 'com.sun.star.bridge.ProtocolProperty': com.sun.star.bridge.ProtocolProperty; + 'com.sun.star.chart.ChartDataChangeEvent': com.sun.star.chart.ChartDataChangeEvent; + 'com.sun.star.chart.ChartDataRow': com.sun.star.chart.ChartDataRow; + 'com.sun.star.chart.ChartDataValue': com.sun.star.chart.ChartDataValue; + 'com.sun.star.chart.ChartSeriesAddress': com.sun.star.chart.ChartSeriesAddress; + 'com.sun.star.chart.TimeIncrement': com.sun.star.chart.TimeIncrement; + 'com.sun.star.chart.TimeInterval': com.sun.star.chart.TimeInterval; + 'com.sun.star.chart2.data.HighlightedRange': com.sun.star.chart2.data.HighlightedRange; + 'com.sun.star.chart2.DataPointLabel': com.sun.star.chart2.DataPointLabel; + 'com.sun.star.chart2.FillBitmap': com.sun.star.chart2.FillBitmap; + 'com.sun.star.chart2.IncrementData': com.sun.star.chart2.IncrementData; + 'com.sun.star.chart2.InterpretedData': com.sun.star.chart2.InterpretedData; + 'com.sun.star.chart2.LightSource': com.sun.star.chart2.LightSource; + 'com.sun.star.chart2.RelativePosition': com.sun.star.chart2.RelativePosition; + 'com.sun.star.chart2.RelativeSize': com.sun.star.chart2.RelativeSize; + 'com.sun.star.chart2.ScaleData': com.sun.star.chart2.ScaleData; + 'com.sun.star.chart2.SubIncrement': com.sun.star.chart2.SubIncrement; + 'com.sun.star.chart2.Symbol': com.sun.star.chart2.Symbol; + 'com.sun.star.configuration.backend.ComponentChangeEvent': com.sun.star.configuration.backend.ComponentChangeEvent; + 'com.sun.star.configuration.backend.PropertyInfo': com.sun.star.configuration.backend.PropertyInfo; + 'com.sun.star.configuration.backend.TemplateIdentifier': com.sun.star.configuration.backend.TemplateIdentifier; + 'com.sun.star.connection.SocketPermission': com.sun.star.connection.SocketPermission; + 'com.sun.star.container.ContainerEvent': com.sun.star.container.ContainerEvent; + 'com.sun.star.datatransfer.clipboard.ClipboardEvent': com.sun.star.datatransfer.clipboard.ClipboardEvent; + 'com.sun.star.datatransfer.DataFlavor': com.sun.star.datatransfer.DataFlavor; + 'com.sun.star.datatransfer.dnd.DragGestureEvent': com.sun.star.datatransfer.dnd.DragGestureEvent; + 'com.sun.star.datatransfer.dnd.DragSourceDragEvent': com.sun.star.datatransfer.dnd.DragSourceDragEvent; + 'com.sun.star.datatransfer.dnd.DragSourceDropEvent': com.sun.star.datatransfer.dnd.DragSourceDropEvent; + 'com.sun.star.datatransfer.dnd.DragSourceEvent': com.sun.star.datatransfer.dnd.DragSourceEvent; + 'com.sun.star.datatransfer.dnd.DropTargetDragEnterEvent': com.sun.star.datatransfer.dnd.DropTargetDragEnterEvent; + 'com.sun.star.datatransfer.dnd.DropTargetDragEvent': com.sun.star.datatransfer.dnd.DropTargetDragEvent; + 'com.sun.star.datatransfer.dnd.DropTargetDropEvent': com.sun.star.datatransfer.dnd.DropTargetDropEvent; + 'com.sun.star.datatransfer.dnd.DropTargetEvent': com.sun.star.datatransfer.dnd.DropTargetEvent; + 'com.sun.star.deployment.UpdateInformationEntry': com.sun.star.deployment.UpdateInformationEntry; + 'com.sun.star.document.CmisProperty': com.sun.star.document.CmisProperty; + 'com.sun.star.document.CmisVersion': com.sun.star.document.CmisVersion; + 'com.sun.star.document.DocumentEvent': com.sun.star.document.DocumentEvent; + 'com.sun.star.document.EventObject': com.sun.star.document.EventObject; + 'com.sun.star.document.UndoManagerEvent': com.sun.star.document.UndoManagerEvent; + 'com.sun.star.drawing.BezierPoint': com.sun.star.drawing.BezierPoint; + 'com.sun.star.drawing.BoundVolume': com.sun.star.drawing.BoundVolume; + 'com.sun.star.drawing.CameraGeometry': com.sun.star.drawing.CameraGeometry; + 'com.sun.star.drawing.Direction3D': com.sun.star.drawing.Direction3D; + 'com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue': com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue; + 'com.sun.star.drawing.EnhancedCustomShapeParameter': com.sun.star.drawing.EnhancedCustomShapeParameter; + 'com.sun.star.drawing.EnhancedCustomShapeParameterPair': com.sun.star.drawing.EnhancedCustomShapeParameterPair; + 'com.sun.star.drawing.EnhancedCustomShapeSegment': com.sun.star.drawing.EnhancedCustomShapeSegment; + 'com.sun.star.drawing.EnhancedCustomShapeTextFrame': com.sun.star.drawing.EnhancedCustomShapeTextFrame; + 'com.sun.star.drawing.framework.ConfigurationChangeEvent': com.sun.star.drawing.framework.ConfigurationChangeEvent; + 'com.sun.star.drawing.framework.TabBarButton': com.sun.star.drawing.framework.TabBarButton; + 'com.sun.star.drawing.GluePoint': com.sun.star.drawing.GluePoint; + 'com.sun.star.drawing.GluePoint2': com.sun.star.drawing.GluePoint2; + 'com.sun.star.drawing.Hatch': com.sun.star.drawing.Hatch; + 'com.sun.star.drawing.HomogenMatrix': com.sun.star.drawing.HomogenMatrix; + 'com.sun.star.drawing.HomogenMatrix3': com.sun.star.drawing.HomogenMatrix3; + 'com.sun.star.drawing.HomogenMatrix4': com.sun.star.drawing.HomogenMatrix4; + 'com.sun.star.drawing.HomogenMatrixLine': com.sun.star.drawing.HomogenMatrixLine; + 'com.sun.star.drawing.HomogenMatrixLine3': com.sun.star.drawing.HomogenMatrixLine3; + 'com.sun.star.drawing.HomogenMatrixLine4': com.sun.star.drawing.HomogenMatrixLine4; + 'com.sun.star.drawing.LineDash': com.sun.star.drawing.LineDash; + 'com.sun.star.drawing.PolyPolygonBezierCoords': com.sun.star.drawing.PolyPolygonBezierCoords; + 'com.sun.star.drawing.PolyPolygonShape3D': com.sun.star.drawing.PolyPolygonShape3D; + 'com.sun.star.drawing.Position3D': com.sun.star.drawing.Position3D; + 'com.sun.star.embed.InsertedObjectInfo': com.sun.star.embed.InsertedObjectInfo; + 'com.sun.star.embed.VerbDescriptor': com.sun.star.embed.VerbDescriptor; + 'com.sun.star.embed.VisualRepresentation': com.sun.star.embed.VisualRepresentation; + 'com.sun.star.form.binding.ListEntryEvent': com.sun.star.form.binding.ListEntryEvent; + 'com.sun.star.form.DatabaseDeleteEvent': com.sun.star.form.DatabaseDeleteEvent; + 'com.sun.star.form.DatabaseParameterEvent': com.sun.star.form.DatabaseParameterEvent; + 'com.sun.star.form.ErrorEvent': com.sun.star.form.ErrorEvent; + 'com.sun.star.form.runtime.FeatureState': com.sun.star.form.runtime.FeatureState; + 'com.sun.star.form.runtime.FilterEvent': com.sun.star.form.runtime.FilterEvent; + 'com.sun.star.formula.SymbolDescriptor': com.sun.star.formula.SymbolDescriptor; + 'com.sun.star.frame.BorderWidths': com.sun.star.frame.BorderWidths; + 'com.sun.star.frame.ControlCommand': com.sun.star.frame.ControlCommand; + 'com.sun.star.frame.ControlEvent': com.sun.star.frame.ControlEvent; + 'com.sun.star.frame.DispatchDescriptor': com.sun.star.frame.DispatchDescriptor; + 'com.sun.star.frame.DispatchInformation': com.sun.star.frame.DispatchInformation; + 'com.sun.star.frame.DispatchResultEvent': com.sun.star.frame.DispatchResultEvent; + 'com.sun.star.frame.DispatchStatement': com.sun.star.frame.DispatchStatement; + 'com.sun.star.frame.FeatureStateEvent': com.sun.star.frame.FeatureStateEvent; + 'com.sun.star.frame.FrameActionEvent': com.sun.star.frame.FrameActionEvent; + 'com.sun.star.frame.status.ClipboardFormats': com.sun.star.frame.status.ClipboardFormats; + 'com.sun.star.frame.status.FontHeight': com.sun.star.frame.status.FontHeight; + 'com.sun.star.frame.status.ItemStatus': com.sun.star.frame.status.ItemStatus; + 'com.sun.star.frame.status.LeftRightMargin': com.sun.star.frame.status.LeftRightMargin; + 'com.sun.star.frame.status.LeftRightMarginScale': com.sun.star.frame.status.LeftRightMarginScale; + 'com.sun.star.frame.status.Template': com.sun.star.frame.status.Template; + 'com.sun.star.frame.status.UpperLowerMargin': com.sun.star.frame.status.UpperLowerMargin; + 'com.sun.star.frame.status.UpperLowerMarginScale': com.sun.star.frame.status.UpperLowerMarginScale; + 'com.sun.star.frame.status.Verb': com.sun.star.frame.status.Verb; + 'com.sun.star.frame.status.Visibility': com.sun.star.frame.status.Visibility; + 'com.sun.star.frame.TitleChangedEvent': com.sun.star.frame.TitleChangedEvent; + 'com.sun.star.geometry.AffineMatrix2D': com.sun.star.geometry.AffineMatrix2D; + 'com.sun.star.geometry.AffineMatrix3D': com.sun.star.geometry.AffineMatrix3D; + 'com.sun.star.geometry.EllipticalArc': com.sun.star.geometry.EllipticalArc; + 'com.sun.star.geometry.IntegerBezierSegment2D': com.sun.star.geometry.IntegerBezierSegment2D; + 'com.sun.star.geometry.IntegerPoint2D': com.sun.star.geometry.IntegerPoint2D; + 'com.sun.star.geometry.IntegerRectangle2D': com.sun.star.geometry.IntegerRectangle2D; + 'com.sun.star.geometry.IntegerSize2D': com.sun.star.geometry.IntegerSize2D; + 'com.sun.star.geometry.Matrix2D': com.sun.star.geometry.Matrix2D; + 'com.sun.star.geometry.RealBezierSegment2D': com.sun.star.geometry.RealBezierSegment2D; + 'com.sun.star.geometry.RealPoint2D': com.sun.star.geometry.RealPoint2D; + 'com.sun.star.geometry.RealRectangle2D': com.sun.star.geometry.RealRectangle2D; + 'com.sun.star.geometry.RealRectangle3D': com.sun.star.geometry.RealRectangle3D; + 'com.sun.star.geometry.RealSize2D': com.sun.star.geometry.RealSize2D; + 'com.sun.star.i18n.Boundary': com.sun.star.i18n.Boundary; + 'com.sun.star.i18n.Calendar': com.sun.star.i18n.Calendar; + 'com.sun.star.i18n.Calendar2': com.sun.star.i18n.Calendar2; + 'com.sun.star.i18n.CalendarItem': com.sun.star.i18n.CalendarItem; + 'com.sun.star.i18n.CalendarItem2': com.sun.star.i18n.CalendarItem2; + 'com.sun.star.i18n.Currency': com.sun.star.i18n.Currency; + 'com.sun.star.i18n.Currency2': com.sun.star.i18n.Currency2; + 'com.sun.star.i18n.ForbiddenCharacters': com.sun.star.i18n.ForbiddenCharacters; + 'com.sun.star.i18n.FormatElement': com.sun.star.i18n.FormatElement; + 'com.sun.star.i18n.Implementation': com.sun.star.i18n.Implementation; + 'com.sun.star.i18n.LanguageCountryInfo': com.sun.star.i18n.LanguageCountryInfo; + 'com.sun.star.i18n.LineBreakHyphenationOptions': com.sun.star.i18n.LineBreakHyphenationOptions; + 'com.sun.star.i18n.LineBreakResults': com.sun.star.i18n.LineBreakResults; + 'com.sun.star.i18n.LineBreakUserOptions': com.sun.star.i18n.LineBreakUserOptions; + 'com.sun.star.i18n.LocaleDataItem': com.sun.star.i18n.LocaleDataItem; + 'com.sun.star.i18n.NativeNumberXmlAttributes': com.sun.star.i18n.NativeNumberXmlAttributes; + 'com.sun.star.i18n.NumberFormatCode': com.sun.star.i18n.NumberFormatCode; + 'com.sun.star.i18n.ParseResult': com.sun.star.i18n.ParseResult; + 'com.sun.star.i18n.TextConversionResult': com.sun.star.i18n.TextConversionResult; + 'com.sun.star.inspection.LineDescriptor': com.sun.star.inspection.LineDescriptor; + 'com.sun.star.inspection.PropertyCategoryDescriptor': com.sun.star.inspection.PropertyCategoryDescriptor; + 'com.sun.star.io.DataTransferEvent': com.sun.star.io.DataTransferEvent; + 'com.sun.star.io.FilePermission': com.sun.star.io.FilePermission; + 'com.sun.star.lang.EventObject': com.sun.star.lang.EventObject; + 'com.sun.star.lang.Locale': com.sun.star.lang.Locale; + 'com.sun.star.linguistic2.DictionaryEvent': com.sun.star.linguistic2.DictionaryEvent; + 'com.sun.star.linguistic2.DictionaryListEvent': com.sun.star.linguistic2.DictionaryListEvent; + 'com.sun.star.linguistic2.LinguServiceEvent': com.sun.star.linguistic2.LinguServiceEvent; + 'com.sun.star.linguistic2.ProofreadingResult': com.sun.star.linguistic2.ProofreadingResult; + 'com.sun.star.linguistic2.SingleProofreadingError': com.sun.star.linguistic2.SingleProofreadingError; + 'com.sun.star.logging.LogRecord': com.sun.star.logging.LogRecord; + 'com.sun.star.mail.MailAttachment': com.sun.star.mail.MailAttachment; + 'com.sun.star.mozilla.MenuMultipleChange': com.sun.star.mozilla.MenuMultipleChange; + 'com.sun.star.mozilla.MenuSingleChange': com.sun.star.mozilla.MenuSingleChange; + 'com.sun.star.packages.zip.ZipEntry': com.sun.star.packages.zip.ZipEntry; + 'com.sun.star.presentation.ParagraphTarget': com.sun.star.presentation.ParagraphTarget; + 'com.sun.star.rdf.Statement': com.sun.star.rdf.Statement; + 'com.sun.star.reflection.ParamInfo': com.sun.star.reflection.ParamInfo; + 'com.sun.star.rendering.AnimationAttributes': com.sun.star.rendering.AnimationAttributes; + 'com.sun.star.rendering.ARGBColor': com.sun.star.rendering.ARGBColor; + 'com.sun.star.rendering.Caret': com.sun.star.rendering.Caret; + 'com.sun.star.rendering.ColorProfile': com.sun.star.rendering.ColorProfile; + 'com.sun.star.rendering.FloatingPointBitmapLayout': com.sun.star.rendering.FloatingPointBitmapLayout; + 'com.sun.star.rendering.FontInfo': com.sun.star.rendering.FontInfo; + 'com.sun.star.rendering.FontMetrics': com.sun.star.rendering.FontMetrics; + 'com.sun.star.rendering.FontRequest': com.sun.star.rendering.FontRequest; + 'com.sun.star.rendering.IntegerBitmapLayout': com.sun.star.rendering.IntegerBitmapLayout; + 'com.sun.star.rendering.Panose': com.sun.star.rendering.Panose; + 'com.sun.star.rendering.RenderState': com.sun.star.rendering.RenderState; + 'com.sun.star.rendering.RGBColor': com.sun.star.rendering.RGBColor; + 'com.sun.star.rendering.StringContext': com.sun.star.rendering.StringContext; + 'com.sun.star.rendering.StrokeAttributes': com.sun.star.rendering.StrokeAttributes; + 'com.sun.star.rendering.TextHit': com.sun.star.rendering.TextHit; + 'com.sun.star.rendering.Texture': com.sun.star.rendering.Texture; + 'com.sun.star.rendering.ViewState': com.sun.star.rendering.ViewState; + 'com.sun.star.scanner.ScannerContext': com.sun.star.scanner.ScannerContext; + 'com.sun.star.script.AllEventObject': com.sun.star.script.AllEventObject; + 'com.sun.star.script.ArrayWrapper': com.sun.star.script.ArrayWrapper; + 'com.sun.star.script.ContextInformation': com.sun.star.script.ContextInformation; + 'com.sun.star.script.EventListener': com.sun.star.script.EventListener; + 'com.sun.star.script.FinishEngineEvent': com.sun.star.script.FinishEngineEvent; + 'com.sun.star.script.InterruptEngineEvent': com.sun.star.script.InterruptEngineEvent; + 'com.sun.star.script.InvocationInfo': com.sun.star.script.InvocationInfo; + 'com.sun.star.script.ModuleInfo': com.sun.star.script.ModuleInfo; + 'com.sun.star.script.NativeObjectWrapper': com.sun.star.script.NativeObjectWrapper; + 'com.sun.star.script.ScriptEvent': com.sun.star.script.ScriptEvent; + 'com.sun.star.script.ScriptEventDescriptor': com.sun.star.script.ScriptEventDescriptor; + 'com.sun.star.script.vba.VBAScriptEvent': com.sun.star.script.vba.VBAScriptEvent; + 'com.sun.star.sdb.application.CopyTableRowEvent': com.sun.star.sdb.application.CopyTableRowEvent; + 'com.sun.star.sdb.application.NamedDatabaseObject': com.sun.star.sdb.application.NamedDatabaseObject; + 'com.sun.star.sdb.DatabaseRegistrationEvent': com.sun.star.sdb.DatabaseRegistrationEvent; + 'com.sun.star.sdb.RowChangeEvent': com.sun.star.sdb.RowChangeEvent; + 'com.sun.star.sdb.RowsChangeEvent': com.sun.star.sdb.RowsChangeEvent; + 'com.sun.star.sdb.SQLErrorEvent': com.sun.star.sdb.SQLErrorEvent; + 'com.sun.star.sdbc.ChangeEvent': com.sun.star.sdbc.ChangeEvent; + 'com.sun.star.sdbc.DriverPropertyInfo': com.sun.star.sdbc.DriverPropertyInfo; + 'com.sun.star.security.AllPermission': com.sun.star.security.AllPermission; + 'com.sun.star.security.CertAltNameEntry': com.sun.star.security.CertAltNameEntry; + 'com.sun.star.security.DocumentSignatureInformation': com.sun.star.security.DocumentSignatureInformation; + 'com.sun.star.security.RuntimePermission': com.sun.star.security.RuntimePermission; + 'com.sun.star.sheet.ActivationEvent': com.sun.star.sheet.ActivationEvent; + 'com.sun.star.sheet.ComplexReference': com.sun.star.sheet.ComplexReference; + 'com.sun.star.sheet.DataPilotFieldAutoShowInfo': com.sun.star.sheet.DataPilotFieldAutoShowInfo; + 'com.sun.star.sheet.DataPilotFieldFilter': com.sun.star.sheet.DataPilotFieldFilter; + 'com.sun.star.sheet.DataPilotFieldGroupInfo': com.sun.star.sheet.DataPilotFieldGroupInfo; + 'com.sun.star.sheet.DataPilotFieldLayoutInfo': com.sun.star.sheet.DataPilotFieldLayoutInfo; + 'com.sun.star.sheet.DataPilotFieldReference': com.sun.star.sheet.DataPilotFieldReference; + 'com.sun.star.sheet.DataPilotFieldSortInfo': com.sun.star.sheet.DataPilotFieldSortInfo; + 'com.sun.star.sheet.DataPilotTableHeaderData': com.sun.star.sheet.DataPilotTableHeaderData; + 'com.sun.star.sheet.DataPilotTablePositionData': com.sun.star.sheet.DataPilotTablePositionData; + 'com.sun.star.sheet.DataPilotTableResultData': com.sun.star.sheet.DataPilotTableResultData; + 'com.sun.star.sheet.DataResult': com.sun.star.sheet.DataResult; + 'com.sun.star.sheet.DDEItemInfo': com.sun.star.sheet.DDEItemInfo; + 'com.sun.star.sheet.DDELinkInfo': com.sun.star.sheet.DDELinkInfo; + 'com.sun.star.sheet.ExternalLinkInfo': com.sun.star.sheet.ExternalLinkInfo; + 'com.sun.star.sheet.ExternalReference': com.sun.star.sheet.ExternalReference; + 'com.sun.star.sheet.FilterFieldValue': com.sun.star.sheet.FilterFieldValue; + 'com.sun.star.sheet.FormulaOpCodeMapEntry': com.sun.star.sheet.FormulaOpCodeMapEntry; + 'com.sun.star.sheet.FormulaToken': com.sun.star.sheet.FormulaToken; + 'com.sun.star.sheet.FunctionArgument': com.sun.star.sheet.FunctionArgument; + 'com.sun.star.sheet.GoalResult': com.sun.star.sheet.GoalResult; + 'com.sun.star.sheet.LocalizedName': com.sun.star.sheet.LocalizedName; + 'com.sun.star.sheet.MemberResult': com.sun.star.sheet.MemberResult; + 'com.sun.star.sheet.NameToken': com.sun.star.sheet.NameToken; + 'com.sun.star.sheet.opencl.OpenCLDevice': com.sun.star.sheet.opencl.OpenCLDevice; + 'com.sun.star.sheet.opencl.OpenCLPlatform': com.sun.star.sheet.opencl.OpenCLPlatform; + 'com.sun.star.sheet.RangeSelectionEvent': com.sun.star.sheet.RangeSelectionEvent; + 'com.sun.star.sheet.ResultEvent': com.sun.star.sheet.ResultEvent; + 'com.sun.star.sheet.SingleReference': com.sun.star.sheet.SingleReference; + 'com.sun.star.sheet.SolverConstraint': com.sun.star.sheet.SolverConstraint; + 'com.sun.star.sheet.SubTotalColumn': com.sun.star.sheet.SubTotalColumn; + 'com.sun.star.sheet.TableFilterField': com.sun.star.sheet.TableFilterField; + 'com.sun.star.sheet.TableFilterField2': com.sun.star.sheet.TableFilterField2; + 'com.sun.star.sheet.TableFilterField3': com.sun.star.sheet.TableFilterField3; + 'com.sun.star.sheet.TablePageBreakData': com.sun.star.sheet.TablePageBreakData; + 'com.sun.star.style.DropCapFormat': com.sun.star.style.DropCapFormat; + 'com.sun.star.style.LineSpacing': com.sun.star.style.LineSpacing; + 'com.sun.star.style.TabStop': com.sun.star.style.TabStop; + 'com.sun.star.table.BorderLine': com.sun.star.table.BorderLine; + 'com.sun.star.table.BorderLine2': com.sun.star.table.BorderLine2; + 'com.sun.star.table.CellAddress': com.sun.star.table.CellAddress; + 'com.sun.star.table.CellRangeAddress': com.sun.star.table.CellRangeAddress; + 'com.sun.star.table.ShadowFormat': com.sun.star.table.ShadowFormat; + 'com.sun.star.table.TableBorder': com.sun.star.table.TableBorder; + 'com.sun.star.table.TableBorder2': com.sun.star.table.TableBorder2; + 'com.sun.star.table.TableBorderDistances': com.sun.star.table.TableBorderDistances; + 'com.sun.star.table.TableSortField': com.sun.star.table.TableSortField; + 'com.sun.star.task.UrlRecord': com.sun.star.task.UrlRecord; + 'com.sun.star.task.UserRecord': com.sun.star.task.UserRecord; + 'com.sun.star.text.GraphicCrop': com.sun.star.text.GraphicCrop; + 'com.sun.star.text.HoriOrientationFormat': com.sun.star.text.HoriOrientationFormat; + 'com.sun.star.text.MailMergeEvent': com.sun.star.text.MailMergeEvent; + 'com.sun.star.text.SectionFileLink': com.sun.star.text.SectionFileLink; + 'com.sun.star.text.TableColumnSeparator': com.sun.star.text.TableColumnSeparator; + 'com.sun.star.text.TextColumn': com.sun.star.text.TextColumn; + 'com.sun.star.text.TextMarkupDescriptor': com.sun.star.text.TextMarkupDescriptor; + 'com.sun.star.text.TextPosition': com.sun.star.text.TextPosition; + 'com.sun.star.text.TextRangeSelection': com.sun.star.text.TextRangeSelection; + 'com.sun.star.text.VertOrientationFormat': com.sun.star.text.VertOrientationFormat; + 'com.sun.star.ucb.CheckinArgument': com.sun.star.ucb.CheckinArgument; + 'com.sun.star.ucb.Command': com.sun.star.ucb.Command; + 'com.sun.star.ucb.CommandInfo': com.sun.star.ucb.CommandInfo; + 'com.sun.star.ucb.CommandInfoChangeEvent': com.sun.star.ucb.CommandInfoChangeEvent; + 'com.sun.star.ucb.ContentEvent': com.sun.star.ucb.ContentEvent; + 'com.sun.star.ucb.ContentInfo': com.sun.star.ucb.ContentInfo; + 'com.sun.star.ucb.ContentProviderInfo': com.sun.star.ucb.ContentProviderInfo; + 'com.sun.star.ucb.CrossReference': com.sun.star.ucb.CrossReference; + 'com.sun.star.ucb.DocumentHeaderField': com.sun.star.ucb.DocumentHeaderField; + 'com.sun.star.ucb.ExportStreamInfo': com.sun.star.ucb.ExportStreamInfo; + 'com.sun.star.ucb.FetchResult': com.sun.star.ucb.FetchResult; + 'com.sun.star.ucb.FolderList': com.sun.star.ucb.FolderList; + 'com.sun.star.ucb.FolderListEntry': com.sun.star.ucb.FolderListEntry; + 'com.sun.star.ucb.GlobalTransferCommandArgument': com.sun.star.ucb.GlobalTransferCommandArgument; + 'com.sun.star.ucb.GlobalTransferCommandArgument2': com.sun.star.ucb.GlobalTransferCommandArgument2; + 'com.sun.star.ucb.InsertCommandArgument': com.sun.star.ucb.InsertCommandArgument; + 'com.sun.star.ucb.InsertCommandArgument2': com.sun.star.ucb.InsertCommandArgument2; + 'com.sun.star.ucb.Link': com.sun.star.ucb.Link; + 'com.sun.star.ucb.ListAction': com.sun.star.ucb.ListAction; + 'com.sun.star.ucb.ListEvent': com.sun.star.ucb.ListEvent; + 'com.sun.star.ucb.Lock': com.sun.star.ucb.Lock; + 'com.sun.star.ucb.LockEntry': com.sun.star.ucb.LockEntry; + 'com.sun.star.ucb.NumberedSortingInfo': com.sun.star.ucb.NumberedSortingInfo; + 'com.sun.star.ucb.OpenCommandArgument': com.sun.star.ucb.OpenCommandArgument; + 'com.sun.star.ucb.OpenCommandArgument2': com.sun.star.ucb.OpenCommandArgument2; + 'com.sun.star.ucb.OpenCommandArgument3': com.sun.star.ucb.OpenCommandArgument3; + 'com.sun.star.ucb.PostCommandArgument': com.sun.star.ucb.PostCommandArgument; + 'com.sun.star.ucb.PostCommandArgument2': com.sun.star.ucb.PostCommandArgument2; + 'com.sun.star.ucb.PropertyCommandArgument': com.sun.star.ucb.PropertyCommandArgument; + 'com.sun.star.ucb.PropertyValueInfo': com.sun.star.ucb.PropertyValueInfo; + 'com.sun.star.ucb.RecipientInfo': com.sun.star.ucb.RecipientInfo; + 'com.sun.star.ucb.RemoteContentProviderChangeEvent': com.sun.star.ucb.RemoteContentProviderChangeEvent; + 'com.sun.star.ucb.Rule': com.sun.star.ucb.Rule; + 'com.sun.star.ucb.RuleSet': com.sun.star.ucb.RuleSet; + 'com.sun.star.ucb.RuleTerm': com.sun.star.ucb.RuleTerm; + 'com.sun.star.ucb.SearchCommandArgument': com.sun.star.ucb.SearchCommandArgument; + 'com.sun.star.ucb.SearchCriterium': com.sun.star.ucb.SearchCriterium; + 'com.sun.star.ucb.SearchInfo': com.sun.star.ucb.SearchInfo; + 'com.sun.star.ucb.SendInfo': com.sun.star.ucb.SendInfo; + 'com.sun.star.ucb.SendMediaTypes': com.sun.star.ucb.SendMediaTypes; + 'com.sun.star.ucb.SortingInfo': com.sun.star.ucb.SortingInfo; + 'com.sun.star.ucb.TransferInfo': com.sun.star.ucb.TransferInfo; + 'com.sun.star.ucb.TransferInfo2': com.sun.star.ucb.TransferInfo2; + 'com.sun.star.ucb.TransferResult': com.sun.star.ucb.TransferResult; + 'com.sun.star.ucb.WelcomeDynamicResultSetStruct': com.sun.star.ucb.WelcomeDynamicResultSetStruct; + 'com.sun.star.ui.ConfigurationEvent': com.sun.star.ui.ConfigurationEvent; + 'com.sun.star.ui.ContextChangeEventObject': com.sun.star.ui.ContextChangeEventObject; + 'com.sun.star.ui.ContextMenuExecuteEvent': com.sun.star.ui.ContextMenuExecuteEvent; + 'com.sun.star.ui.dialogs.DialogClosedEvent': com.sun.star.ui.dialogs.DialogClosedEvent; + 'com.sun.star.ui.dialogs.FilePickerEvent': com.sun.star.ui.dialogs.FilePickerEvent; + 'com.sun.star.ui.LayoutSize': com.sun.star.ui.LayoutSize; + 'com.sun.star.uno.Uik': com.sun.star.uno.Uik; + 'com.sun.star.util.AliasProgrammaticPair': com.sun.star.util.AliasProgrammaticPair; + 'com.sun.star.util.AtomClassRequest': com.sun.star.util.AtomClassRequest; + 'com.sun.star.util.AtomDescription': com.sun.star.util.AtomDescription; + 'com.sun.star.util.CellProtection': com.sun.star.util.CellProtection; + 'com.sun.star.util.ChangesEvent': com.sun.star.util.ChangesEvent; + 'com.sun.star.util.DataEditorEvent': com.sun.star.util.DataEditorEvent; + 'com.sun.star.util.Date': com.sun.star.util.Date; + 'com.sun.star.util.DateTime': com.sun.star.util.DateTime; + 'com.sun.star.util.DateTimeRange': com.sun.star.util.DateTimeRange; + 'com.sun.star.util.DateTimeWithTimezone': com.sun.star.util.DateTimeWithTimezone; + 'com.sun.star.util.DateWithTimezone': com.sun.star.util.DateWithTimezone; + 'com.sun.star.util.Duration': com.sun.star.util.Duration; + 'com.sun.star.util.ElementChange': com.sun.star.util.ElementChange; + 'com.sun.star.util.ModeChangeEvent': com.sun.star.util.ModeChangeEvent; + 'com.sun.star.util.RevisionTag': com.sun.star.util.RevisionTag; + 'com.sun.star.util.SearchOptions': com.sun.star.util.SearchOptions; + 'com.sun.star.util.SearchOptions2': com.sun.star.util.SearchOptions2; + 'com.sun.star.util.SearchResult': com.sun.star.util.SearchResult; + 'com.sun.star.util.SortField': com.sun.star.util.SortField; + 'com.sun.star.util.Time': com.sun.star.util.Time; + 'com.sun.star.util.TimeWithTimezone': com.sun.star.util.TimeWithTimezone; + 'com.sun.star.util.URL': com.sun.star.util.URL; + 'com.sun.star.view.PrintableStateEvent': com.sun.star.view.PrintableStateEvent; + 'com.sun.star.view.PrintJobEvent': com.sun.star.view.PrintJobEvent; + 'com.sun.star.xml.Attribute': com.sun.star.xml.Attribute; + 'com.sun.star.xml.AttributeData': com.sun.star.xml.AttributeData; + 'com.sun.star.xml.crypto.sax.ElementStackItem': com.sun.star.xml.crypto.sax.ElementStackItem; + 'com.sun.star.xml.csax.XMLAttribute': com.sun.star.xml.csax.XMLAttribute; + 'com.sun.star.xml.FastAttribute': com.sun.star.xml.FastAttribute; + 'com.sun.star.xml.sax.InputSource': com.sun.star.xml.sax.InputSource; + 'com.sun.star.xml.xpath.Libxml2ExtensionHandle': com.sun.star.xml.xpath.Libxml2ExtensionHandle; + } + + interface ValueObject { + /** Returns the value contained in the object, when the Value Object was used as an `inout` or `out` parameter */ + Get(): any; + + /** Initialize the object as an `inout` parameter */ + InitInOutParam( + type: '[][]any' | '[][]boolean' | '[][]byte' | '[][]char' | '[][]double' | '[][]float' | '[][]long' | '[][]object' | '[][]short' | '[][]string' | + '[][]unsigned' | '[][]unsigned long' | '[][]unsigned short' | '[]any' | '[]boolean' | '[]byte' | '[]char' | '[]double' | '[]float' | '[]long' | '[]object' | + '[]short' | '[]string' | '[]unsigned' | '[]unsigned long' | '[]unsigned short' | 'any' | 'boolean' | 'byte' | 'char' | 'double' | 'float' | 'long' | 'object' | + 'short' | 'string' | 'unsigned' | 'unsigned long' | 'unsigned short', + value: any): void; + + /** Initialize the object as an `out` parameter */ + InitOutParam(): void; + + /** Assigns a type and a value */ + Set( + type: '[][]any' | '[][]boolean' | '[][]byte' | '[][]char' | '[][]double' | '[][]float' | '[][]long' | '[][]object' | '[][]short' | '[][]string' | + '[][]unsigned' | '[][]unsigned long' | '[][]unsigned short' | '[]any' | '[]boolean' | '[]byte' | '[]char' | '[]double' | '[]float' | '[]long' | '[]object' | + '[]short' | '[]string' | '[]unsigned' | '[]unsigned long' | '[]unsigned short' | 'any' | 'boolean' | 'byte' | 'char' | 'double' | 'float' | 'long' | 'object' | + 'short' | 'string' | 'unsigned' | 'unsigned long' | 'unsigned short', + value: any): void; + } +} diff --git a/types/activex-libreoffice/tsconfig.json b/types/activex-libreoffice/tsconfig.json new file mode 100644 index 0000000000..f17c193b97 --- /dev/null +++ b/types/activex-libreoffice/tsconfig.json @@ -0,0 +1,21 @@ + +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es5", "scripthost"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "activex-libreoffice-tests.ts" + ] +} \ No newline at end of file diff --git a/types/activex-libreoffice/tslint.json b/types/activex-libreoffice/tslint.json new file mode 100644 index 0000000000..098cdac415 --- /dev/null +++ b/types/activex-libreoffice/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": false, + "no-unnecessary-qualifier": false + } +} \ No newline at end of file diff --git a/types/cassandra-driver/index.d.ts b/types/cassandra-driver/index.d.ts index c152d330ec..a581071dfb 100644 --- a/types/cassandra-driver/index.d.ts +++ b/types/cassandra-driver/index.d.ts @@ -513,12 +513,10 @@ export interface Client extends events.EventEmitter { connect(callback: Callback): void; eachRow(query: string, params?: any, options?: QueryOptions, rowCallback?: Callback, callback?: Callback): void; - execute(query: string, params: any, options: QueryOptions, callback: ResultCallback): void; execute(query: string, params: any, callback: ResultCallback): void; execute(query: string, callback: ResultCallback): void; execute(query: string, params?: any, options?: QueryOptions): Promise; - getReplicas(keyspace: string, token: Buffer): Array; // TODO: Should this be a more explicit return? shutdown(callback?: Callback): void; stream(query: string, params?: any, options?: QueryOptions, callback?: Callback): NodeJS.ReadableStream; diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index 7ae0f7ded6..3c71e78500 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -67,66 +67,66 @@ export type InferableComponentEnhancer = */ export declare function connect(): InferableComponentEnhancer>; -export declare function connect( +export declare function connect( mapStateToProps: MapStateToPropsParam ): InferableComponentEnhancerWithProps, TOwnProps>; -export declare function connect( +export declare function connect( mapStateToProps: null | undefined, mapDispatchToProps: MapDispatchToPropsParam ): InferableComponentEnhancerWithProps; -export declare function connect( +export declare function connect( mapStateToProps: MapStateToPropsParam, mapDispatchToProps: MapDispatchToPropsParam ): InferableComponentEnhancerWithProps; -export declare function connect( +export declare function connect( mapStateToProps: MapStateToPropsParam, mapDispatchToProps: null | undefined, mergeProps: MergeProps, ): InferableComponentEnhancerWithProps; -export declare function connect( +export declare function connect( mapStateToProps: null | undefined, mapDispatchToProps: MapDispatchToPropsParam, mergeProps: MergeProps, ): InferableComponentEnhancerWithProps; -export declare function connect( +export declare function connect( mapStateToProps: null | undefined, mapDispatchToProps: null | undefined, mergeProps: MergeProps, ): InferableComponentEnhancerWithProps; -export declare function connect( +export declare function connect( mapStateToProps: MapStateToPropsParam, mapDispatchToProps: MapDispatchToPropsParam, mergeProps: MergeProps, ): InferableComponentEnhancerWithProps; -export declare function connect( +export declare function connect( mapStateToProps: MapStateToPropsParam, mapDispatchToProps: null | undefined, mergeProps: null | undefined, options: Options ): InferableComponentEnhancerWithProps & TStateProps, TOwnProps>; -export declare function connect( +export declare function connect( mapStateToProps: null | undefined, mapDispatchToProps: MapDispatchToPropsParam, mergeProps: null | undefined, options: Options ): InferableComponentEnhancerWithProps; -export declare function connect( +export declare function connect( mapStateToProps: MapStateToPropsParam, mapDispatchToProps: MapDispatchToPropsParam, mergeProps: null | undefined, options: Options ): InferableComponentEnhancerWithProps; -export declare function connect( +export declare function connect( mapStateToProps: MapStateToPropsParam, mapDispatchToProps: MapDispatchToPropsParam, mergeProps: MergeProps, diff --git a/types/react-redux/react-redux-tests.tsx b/types/react-redux/react-redux-tests.tsx index 64b7b1966d..f4a4ba4a75 100644 --- a/types/react-redux/react-redux-tests.tsx +++ b/types/react-redux/react-redux-tests.tsx @@ -57,7 +57,7 @@ interface ICounterDispatchProps { onIncrement: () => void } // with higher order functions -connect( +connect( () => mapStateToProps, () => mapDispatchToProps )(Counter); @@ -67,11 +67,11 @@ connect( (dispatch: Dispatch, ownProps) => mapDispatchToProps )(Counter); // only first argument -connect( +connect( () => mapStateToProps )(Counter); // wrap only one argument -connect( +connect( mapStateToProps, () => mapDispatchToProps )(Counter); diff --git a/types/recharts/index.d.ts b/types/recharts/index.d.ts index 589f34c265..ee3a8bba30 100644 --- a/types/recharts/index.d.ts +++ b/types/recharts/index.d.ts @@ -51,6 +51,7 @@ export interface AreaProps extends Partial { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class Area extends React.Component { } export interface AreaChartProps { @@ -67,6 +68,7 @@ export interface AreaChartProps { onMouseMove?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class AreaChart extends React.Component { } export interface BarProps extends Partial { @@ -96,6 +98,7 @@ export interface BarProps extends Partial { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class Bar extends React.Component { } export interface BarChartProps { @@ -115,6 +118,7 @@ export interface BarChartProps { onMouseMove?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class BarChart extends React.Component { } export interface BrushProps { @@ -130,6 +134,7 @@ export interface BrushProps { tickFormatter?: RechartsFunction; onChange?: RechartsFunction; } + export class Brush extends React.Component { } export interface CartesianAxisProps { @@ -148,6 +153,7 @@ export interface CartesianAxisProps { label?: string | number | React.ReactElement | RechartsFunction; mirror?: boolean; } + export class CartesianAxis extends React.Component { } export interface CartesianGridProps extends Partial { @@ -158,12 +164,14 @@ export interface CartesianGridProps extends Partial { horizontalPoints?: any[]; verticalPoints?: any[]; } + export class CartesianGrid extends React.Component { } export interface CellProps { fill?: string; stroke?: string; } + export class Cell extends React.Component { } export interface ComposedChartProps { @@ -181,6 +189,7 @@ export interface ComposedChartProps { onMouseMove?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class ComposedChart extends React.Component { } export interface CrossProps { @@ -191,6 +200,7 @@ export interface CrossProps { width?: number; height?: number; } + export class Cross extends React.Component { } export interface CurveProps extends Partial { @@ -208,6 +218,7 @@ export interface CurveProps extends Partial { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class Curve extends React.Component { } export interface DotProps { @@ -223,6 +234,7 @@ export interface DotProps { onMouseMove?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class Dot extends React.Component { } export interface ErrorBarProps extends Partial { @@ -231,6 +243,7 @@ export interface ErrorBarProps extends Partial { stroke?: string; direction?: string; } + export class ErrorBar extends React.Component { } export interface LegendProps { @@ -256,6 +269,7 @@ export interface LegendProps { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class Legend extends React.Component { } export interface LineProps extends Partial { @@ -284,6 +298,7 @@ export interface LineProps extends Partial { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class Line extends React.Component { } export interface LineChartProps { @@ -298,6 +313,7 @@ export interface LineChartProps { onMouseMove?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class LineChart extends React.Component { } export interface PieProps extends Partial { @@ -330,6 +346,7 @@ export interface PieProps extends Partial { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class Pie extends React.Component { } export interface PieChartProps { @@ -340,6 +357,7 @@ export interface PieChartProps { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class PieChart extends React.Component { } export interface PolarAngleAxisProps { @@ -363,6 +381,7 @@ export interface PolarAngleAxisProps { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class PolarAngleAxis extends React.Component { } export interface PolarGridProps extends Partial { @@ -374,6 +393,7 @@ export interface PolarGridProps extends Partial { polarRadius: any[]; gridType?: 'polygon' | 'circle'; } + export class PolarGrid extends React.Component { } export interface PolarRadiusAxisProps { @@ -397,6 +417,7 @@ export interface PolarRadiusAxisProps { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class PolarRadiusAxis extends React.Component { } export interface PolygonProps { @@ -410,6 +431,7 @@ export interface PolygonProps { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class Polygon extends React.Component { } export interface RadarProps extends Partial { @@ -423,6 +445,7 @@ export interface RadarProps extends Partial { animationBegin?: number; animationEasing?: AnimationEasingType; } + export class Radar extends React.Component { } export interface RadarChartProps { @@ -439,6 +462,7 @@ export interface RadarChartProps { onMouseLeave?: RechartsFunction; onClick?: RechartsFunction; } + export class RadarChart extends React.Component { } export interface RadialBarProps extends Partial { @@ -464,6 +488,7 @@ export interface RadialBarProps extends Partial { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class RadialBar extends React.Component { } export interface RadialBarChartProps { @@ -482,6 +507,7 @@ export interface RadialBarChartProps { onMouseLeave?: RechartsFunction; onClick?: RechartsFunction; } + export class RadialBarChart extends React.Component { } export interface RectangleProps extends Partial { @@ -497,6 +523,7 @@ export interface RectangleProps extends Partial { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class Rectangle extends React.Component { } export interface ReferenceAreaProps { @@ -513,6 +540,7 @@ export interface ReferenceAreaProps { label?: string | number | React.ReactElement | RechartsFunction; isFront?: boolean; } + export class ReferenceArea extends React.Component { } export interface ReferenceDotProps { @@ -534,6 +562,7 @@ export interface ReferenceDotProps { onMouseMove?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class ReferenceDot extends React.Component { } export interface ReferenceLineProps { @@ -548,6 +577,7 @@ export interface ReferenceLineProps { label?: string | number | React.ReactElement | RechartsFunction; isFront?: boolean; } + export class ReferenceLine extends React.Component { } export interface ResponsiveContainerProps { @@ -558,6 +588,7 @@ export interface ResponsiveContainerProps { minHeight?: number; debounce?: number; } + export class ResponsiveContainer extends React.Component { } export interface ScatterProps extends Partial { @@ -581,6 +612,7 @@ export interface ScatterProps extends Partial { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class Scatter extends React.Component { } export interface ScatterChartProps { @@ -596,6 +628,7 @@ export interface ScatterChartProps { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class ScatterChart extends React.Component { } export interface SectorProps { @@ -615,6 +648,7 @@ export interface SectorProps { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class Sector extends React.Component { } export interface TextProps extends Partial { @@ -623,6 +657,7 @@ export interface TextProps extends Partial { textAnchor?: 'start' | 'middle' | 'end' | 'inherit'; verticalAnchor?: 'start' | 'middle' | 'end'; } + export class Text extends React.Component { } export interface ViewBox { @@ -660,6 +695,7 @@ export interface TooltipProps { animationBegin?: number; animationEasing?: AnimationEasingType; } + export class Tooltip extends React.Component { } export interface TreemapProps { @@ -671,6 +707,7 @@ export interface TreemapProps { animationBegin?: number; animationEasing?: AnimationEasingType; } + export class Treemap extends React.Component { } export interface XPadding { @@ -713,6 +750,7 @@ export interface XAxisProps { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class XAxis extends React.Component { } export interface YPadding { @@ -755,6 +793,7 @@ export interface YAxisProps { onMouseEnter?: RechartsFunction; onMouseLeave?: RechartsFunction; } + export class YAxis extends React.Component { } export interface ZAxisProps { @@ -765,4 +804,5 @@ export interface ZAxisProps { name?: string | number; scale?: ScaleType | RechartsFunction; } + export class ZAxis extends React.Component { }

This optimizes the calling sequence + * + * ( XInvocation::hasProperty(), + * + * XInvocation::getValue() ) or + * + * + * + * ( XInvocation::hasProperty(), + * + * XInvocation::setValue() )! + * @@param aName specifies the name of the property. + */ + hasProperty(aName: string): boolean; + + /** returns the introspection from this object or `NULL` if the object does not provide this information. */ + readonly Introspection: beans.XIntrospectionAccess; + + /** + * provides access to methods exposed by an object. + * @param aFunctionName the method to invoke + * @param aParams all parameters; pure out params are undefined in sequence, the value has to be ignored by the callee + * @param aOutParamIndex This sequence contains the indices of all parameters that are specified as out or inout. + * @param aOutParam This sequence contains the values of all parameters that are specified as out or inout and corresponds with the indices provided by the + */ + invoke(aFunctionName: string, aParams: LibreOffice.SeqEquiv, aOutParamIndex: [LibreOffice.SeqEquiv], aOutParam: [LibreOffice.SeqEquiv]): any; + + /** + * sets a value to the property with the specified name. + * + * If the underlying object implements an {@link com.sun.star.container.XNameContainer} , then this method will insert the value if there is no such + * **aPropertyName** . + */ + setValue(aPropertyName: string, aValue: any): void; + } + + /** Extension of {@link XInvocation} to provide additional information about the methods and properties that are accessible via {@link XInvocation} . */ + interface XInvocation2 extends XInvocation { + /** + * returns information items for all methods and properties accessible via {@link XInvocation} . + * @see com.sun.star.script.Invocation + */ + getInfo(): SafeArray; + + /** + * returns information item for the method or property defined by aName + * @param aName specifies the name of the method or property + * @param bExact specifies the name of the method or property + * @see com.sun.star.script.Invocation + * @throws IllegalArgumentException if aName is not the name of a supported method or property + */ + getInfoForName(aName: string, bExact: boolean): InvocationInfo; + + /** returns the names of all methods and properties accessible via {@link XInvocation} . */ + getMemberNames(): SafeArray; + + /** + * returns information items for all methods and properties accessible via {@link XInvocation} . + * @see com.sun.star.script.Invocation + */ + readonly Info: SafeArray; + + /** returns the names of all methods and properties accessible via {@link XInvocation} . */ + readonly MemberNames: SafeArray; + } + + /** + * Interface to create adapter objects giving a type to be supported and a an invocation interface incoming calls are delegated to. + * + * This interface is deprecated. Use {@link XInvocationAdapterFactory2} . + * @deprecated Deprecated + */ + interface XInvocationAdapterFactory extends uno.XInterface { + /** + * Creates an adapter interface of given type for calling the given {@link XInvocation} interface. + * @param Invocation invocation interface being called on incoming adapter calls + * @param aType supported type of adapter + * @returns adapter interface; this interface can be queried for XInterface and given type + */ + createAdapter(Invocation: XInvocation, aType: type): uno.XInterface; + } + + /** Interface to create adapter objects giving types to be supported and a an invocation interface incoming calls are delegated to. */ + interface XInvocationAdapterFactory2 extends uno.XInterface { + /** + * Creates an adapter interface of given types for calling the given {@link XInvocation} interface. + * @param Invocation invocation interface being called on incoming adapter calls + * @param aTypes supported types of adapter + * @returns adapter interface; this interface can be queried for XInterface and given types + */ + createAdapter(Invocation: XInvocation, aTypes: LibreOffice.SeqEquiv): uno.XInterface; + } + + /** + * provides access to additional scripting code. + * + * This code is organized in modules and these modules contain the functions. It is possible to get just the code from a function, but you can also get + * the whole code of a module with all functions in it. + * @deprecated Deprecated + */ + interface XLibraryAccess extends uno.XInterface { + /** + * Get the compiled code of a function. + * @param FunctionName the full qualified name of a function. (e.g., "UtilLibrary.ModuleDate.Function.CurrentDate") + * @returns an empty sequence, if this function is not found. + */ + getFunctionCode(FunctionName: string): SafeArray; + + /** get the source code of a function. */ + getFunctionSource(aFunctionName: string): string; + + /** + * Get the hole compiled code of a module. + * @param aModuleName the full qualified name of a module. (e.g., "UtilLibrary.ModuleDate") + * @returns an empty sequence, if this module is not found or the code is not compiled. + */ + getModuleCode(aModuleName: string): SafeArray; + + /** Return all module names which contain code. e.g., { "UtilLibrary.ModuleDate", "UtilLibrary.Output", ... } */ + getModuleNames(): SafeArray; + + /** get the source code of a module. */ + getModuleSource(aModulName: string): string; + + /** + * returns `TRUE` , if the function is accessible through this library; otherwise it returns `FALSE` . + * @@param aFunctionName the fully qualified name of a function. (e.g., "UtilLibrary.ModuleDate.FunctionCurrentDate") + */ + isFunction(aFunctionName: string): boolean; + + /** + * returns `TRUE` if a fully qualified function name begins with this name. + * @@param aPathName a part of a function name (e.g., "UtilLibrary"). + */ + isValidPath(aPathName: string): boolean; + + /** Return all module names which contain code. e.g., { "UtilLibrary.ModuleDate", "UtilLibrary.Output", ... } */ + readonly ModuleNames: SafeArray; + } + + /** Provides access to a library system. */ + interface XLibraryContainer extends container.XNameAccess { + /** Creates a new library */ + createLibrary(Name: string): container.XNameContainer; + + /** + * Creates a link to an "external" library that then can be accessed using this library manager. The format of the StorageURL is a matter of the + * implementation. If the read only flag is set, the linked library cannot be modified. In this case, the returned interface really is only an + * XNameAccess. If ReadOnly is false (and the referenced storage allows write access) the returned interface also can be a {@link + * com.sun.star.container.XNameContainer} . + */ + createLibraryLink(Name: string, StorageURL: string, ReadOnly: boolean): container.XNameAccess; + + /** returns true if the accessed library is already loaded from the storage, otherwise false. */ + isLibraryLoaded(Name: string): boolean; + + /** Causes the accessed library to be loaded from its storage if it hasn't already been loaded. */ + loadLibrary(Name: string): void; + + /** removes the library item with the specified name. If the accessed library item is a link only the link is removed, not the target library. */ + removeLibrary(Name: string): void; + } + + /** Extension of {@link XLibraryContainer} to provide additional information about the libraries contained in a library container */ + interface XLibraryContainer2 extends XLibraryContainer { + /** + * returns the location of the library link target. Should return the same URL that was passed to createLibraryLink in the StorageURL parameter. + * + * If the accessed library item exists but isn't a link, a IllegalArgumentException is thrown + */ + getLibraryLinkURL(Name: string): string; + + /** returns true if the accessed library item is a link, e.g., created by createLibraryLink, otherwise false. */ + isLibraryLink(Name: string): boolean; + + /** + * returns true if the accessed library item (library or library link) is read only. A library can be read only because it was set to read only using the + * methods provided by this interface or because of other reasons depending on the implementation (e.g., file system write protection) + */ + isLibraryReadOnly(Name: string): boolean; + + /** + * renames the library item with the specified name. If the accessed library item is a link only the link is renamed, not the target library. If a + * library with the new name exists already a {@link com.sun.star.container.ElementExistException} is thrown. + */ + renameLibrary(Name: string, NewName: string): void; + + /** Sets the accessed library item (library or library link) to read only according to the flag bReadOnly (true means read only) */ + setLibraryReadOnly(Name: string, bReadOnly: boolean): void; + } + + /** Extension of {@link XLibraryContainer2} . */ + interface XLibraryContainer3 extends XLibraryContainer2 { + /** + * returns the location of the library link target. + * + * The returned URL is literally the same as the one provided in {@link XLibraryContainer.createLibraryLink()} . Otherwise the behavior is the same as + * {@link XLibraryContainer2.getLibraryLinkURL()} + */ + getOriginalLibraryLinkURL(Name: string): string; + } + + /** Extension of {@link XLibraryContainer} to provide functionality to store a library to a location represented by a URL. */ + interface XLibraryContainerExport extends uno.XInterface { + /** + * Exports a library specified by Name to the location specified by the passed URL string. + * + * An interaction handler can be passed to be used for internal ucb operations. Exceptions not processed by this handler will be passed as {@link + * com.sun.star.uno.Exception} . If this parameter is null this applies to all exceptions thrown by ucb. + * @see com.sun.star.task.InteractionHandler If a library with the this name doesn't exist a {@link com.sun.star.container.NoSuchElementException} is thrown. + */ + exportLibrary(Name: string, URL: string, Handler: task.XInteractionHandler): void; + } + + /** + * Extension of {@link XLibraryContainer} to provide password functionality. This interface should be implemented together with {@link + * XLibraryContainer2} + */ + interface XLibraryContainerPassword extends uno.XInterface { + /** + * Changes the library's password. + * + * If the library wasn't password protected before: The OldPassword parameter has to be an empty string. Afterwards calls to isLibraryPasswordProtected + * and isLibraryPasswordVerified for this library will return true. + * + * If the library already was password protected: The OldPassword parameter has to be set to the previous defined password. If then the NewPassword + * parameter is an empty string the library password protection will be disabled afterwards (afterwards calls to isLibraryPasswordProtected for this + * library will return false). If the NewPassword parameter is not an empty string it will accepted as the new password for the library. + * + * If a library with the this name doesn't exist but isn't {@link com.sun.star.container.NoSuchElementException} is thrown. + * + * If the library exists and is password protected and a wrong OldPassword is passed to the method a {@link com.sun.star.lang.IllegalArgumentException} + * is thrown. + * + * If the library exists and isn't password protected and the OldPassword isn't an empty string or the library is read only a {@link + * com.sun.star.lang.IllegalArgumentException} is thrown. + */ + changeLibraryPassword(Name: string, OldPassword: string, NewPassword: string): void; + + /** + * Returns true if the accessed library item is protected by a password. + * + * If a library with the this name doesn't exist a {@link com.sun.star.container.NoSuchElementException} is thrown. + */ + isLibraryPasswordProtected(Name: string): boolean; + + /** + * Returns true if the accessed library item is protected by a password (see isLibraryPasswordProtected) and the password was already verified with + * verifyLibraryPassword or if an initial password was set with changeLibraryPassword. + * + * If a library with the this name doesn't exist a {@link com.sun.star.container.NoSuchElementException} is thrown. + * + * If the library exists but isn't password protected a {@link com.sun.star.lang.IllegalArgumentException} is thrown. + */ + isLibraryPasswordVerified(Name: string): boolean; + + /** + * Verifies the library's password. If the correct password was passed, the method returns true and further calls to isLibraryPasswordVerified will also + * return true. + * + * If a library with the this name doesn't exist a {@link com.sun.star.container.NoSuchElementException} is thrown. + * + * If the library exists but isn't password protected a {@link com.sun.star.lang.IllegalArgumentException} is thrown. + * + * If the library password is already verified a {@link com.sun.star.lang.IllegalArgumentException} is thrown. + */ + verifyLibraryPassword(Name: string, Password: string): boolean; + } + + interface XLibraryQueryExecutable extends uno.XInterface { + HasExecutableCode(name: string): boolean; + } + + /** + * describes a container of script libraries which is persistent. + * + * The type of persistence of the container elements is not defined here, but in derived interfaces or services using `XPersistentLibraryContainer` . + * + * The actual libraries are stored in some object - a sub folder, or a sub storage, for example - below the root location. + * @since OOo 2.3 + */ + interface XPersistentLibraryContainer extends util.XModifiable, XLibraryContainer2 { + /** + * denotes the name of the sub location where the container elements are actually stored. + * @see RootLocation + */ + ContainerLocationName: string; + + /** + * denotes the root location associated with the container. + * + * The type of this location - it might be a folder in a file system, a storage, or anything else - is not specified here, but in derived interfaces or + * services implementing `XPersistentLibraryContainer` . + * + * All operations of the library container take place in a location below the root location, the so-called container location, whose name is exposed as + * {@link ContainerLocationName} . + * @see ContainerLocationName + */ + RootLocation: any; + + /** + * stores the libraries to the current location. + * @see RootLocation + * @see ContainerLocationName + * @throws com::sun::star::lang::WrappedTargetException if an error occurs during storing. + */ + storeLibraries(): void; + } + + /** + * This interface can be used to attach script events to a number of objects that give access to the definition of events that should be attached to + * them, e.g., by supporting XEventsSupplier + */ + interface XScriptEventsAttacher extends uno.XInterface { + /** + * Attaches the events defined by {@link XScriptEventsSupplier} to the corresponding object implementing {@link XScriptEventsSupplier} . + * @param Objects Sequence of all objects. Usually the objects should directly support {@link XScriptEventsAttacher} to define the events but this is not s + * @param xListener All events (if defined by {@link XScriptEventsSupplier} ) that are fired by one of the objects are mapped into a {@link ScriptEvent} an + * @param Helper Helper object for the implementation. This value will be passed to the {@link XScriptListener} as Helper property in the {@link ScriptEvent} . + */ + attachEvents(Objects: LibreOffice.SeqEquiv, xListener: XScriptListener, Helper: any): void; + } + + /** Gives access to an event container represented by an XNameContainer containing {@link ScriptEventDescriptor} instances. */ + interface XScriptEventsSupplier extends uno.XInterface { + /** Returns an XNameContainer containing instances of {@link ScriptEventDescriptor} */ + readonly Events: container.XNameContainer; + + /** Returns an XNameContainer containing instances of {@link ScriptEventDescriptor} */ + getEvents(): container.XNameContainer; + } + + /** makes it possible to receive ScriptEvents. */ + interface XScriptListener extends lang.XEventListener { + /** gets called when a "vetoable event" occurs at the object. */ + approveFiring(aEvent: ScriptEvent): any; + + /** + * gets called when an event takes place. For that a {@link ScriptEventDescriptor} is registered at and attached to an object by an {@link + * XEventAttacherManager} . + */ + firing(aEvent: ScriptEvent): void; + } + + /** + * provides documentation for UNO services + * @since LibreOffice 5.1 + */ + interface XServiceDocumenter { + CoreBaseUrl: string; + ServiceBaseUrl: string; + showCoreDocs(xService: lang.XServiceInfo): void; + showInterfaceDocs(xTypeProvider: lang.XTypeProvider): void; + showServiceDocs(xService: lang.XServiceInfo): void; + } + + /** + * Interface representing a library and provides access to its modules + * @deprecated Deprecated + */ + interface XStarBasicAccess extends uno.XInterface { + /** + * Adds an old style basic dialog (SI controls) to an existing (e.g., created by createLibrary) library. By using this method together with createLibrary + * the caller does not have to implement {@link XStarBasicLibraryInfo} and {@link XStarBasicDialogInfo} + * @throws NoSuchElementException if the library doesn't exist. + */ + addDialog(LibraryName: string, DialogName: string, Data: LibreOffice.SeqEquiv): void; + + /** + * Adds a module to an existing (e.g., created by createLibrary) library. By using this method together with createLibrary the caller does not have to + * implement {@link XStarBasicLibraryInfo} and XModuleInfo. + * @throws NoSuchElementException if the library doesn't exist. + */ + addModule(LibraryName: string, ModuleName: string, Language: string, Source: string): void; + + /** + * Creates an empty library. This method can be called alternatively to accessing directly the NameContainer returned by getLibraryContainer. By using + * this method together with addModule and addStarBasicDialog the caller does not have to implement {@link XStarBasicLibraryInfo} , XModuleInfo, and + * {@link XStarBasicDialogInfo} + */ + createLibrary(LibName: string, Password: string, ExternalSourceURL: string, LinkTargetURL: string): void; + + /** returns the library container giving access to the libraries stored in a document or basic library file. */ + getLibraryContainer(): container.XNameContainer; + + /** returns the library container giving access to the libraries stored in a document or basic library file. */ + readonly LibraryContainer: container.XNameContainer; + } + + /** + * Interface describing old style basic dialog (SI controls) in binary data + * @deprecated Deprecated + */ + interface XStarBasicDialogInfo extends uno.XInterface { + /** returns binary data describing the SIDialog in SBX stream format */ + readonly Data: SafeArray; + + /** returns binary data describing the SIDialog in SBX stream format */ + getData(): SafeArray; + + /** returns the name of the dialog */ + getName(): string; + + /** returns the name of the dialog */ + readonly Name: string; + } + + /** + * Interface representing a library and provides access to its modules + * @deprecated Deprecated + */ + interface XStarBasicLibraryInfo extends uno.XInterface { + /** + * returns the dialog container giving access to the dialogs stored in the library. The container has to be returned in any case, no matter if the + * library is stored embedded, external, or linked. + * @see getExternalSourceURL + * @see getLinkTargetURL + */ + readonly DialogContainer: container.XNameContainer; + + /** + * returns an URL describing the location where the library is stored if the library is stored separately (for example not in the main XML file but in a + * special library format file), an empty string otherwise. This information can be useful to optimize the access to the library, e.g., for loading on + * demand. + */ + readonly ExternalSourceURL: string; + + /** + * returns the dialog container giving access to the dialogs stored in the library. The container has to be returned in any case, no matter if the + * library is stored embedded, external, or linked. + * @see getExternalSourceURL + * @see getLinkTargetURL + */ + getDialogContainer(): container.XNameContainer; + + /** + * returns an URL describing the location where the library is stored if the library is stored separately (for example not in the main XML file but in a + * special library format file), an empty string otherwise. This information can be useful to optimize the access to the library, e.g., for loading on + * demand. + */ + getExternalSourceURL(): string; + + /** + * returns an URL describing the location of the library linked to. + * + * HINT: This method can be removed when there is a generic interface for linking. Then the implementation will simply support this "XLinked" interface + * and it can be checked by {@link queryInterface()} . + */ + getLinkTargetURL(): string; + + /** + * returns the module container giving access to the modules stored in the library. The container has to be returned in any case, no matter if the + * library is stored embedded, external, or linked. + * @see getExternalSourceURL + * @see getLinkTargetURL + */ + getModuleContainer(): container.XNameContainer; + + /** returns the library's name */ + getName(): string; + + /** returns the password, if the library is protected with one, an empty string otherwise. */ + getPassword(): string; + + /** + * returns an URL describing the location of the library linked to. + * + * HINT: This method can be removed when there is a generic interface for linking. Then the implementation will simply support this "XLinked" interface + * and it can be checked by {@link queryInterface()} . + */ + readonly LinkTargetURL: string; + + /** + * returns the module container giving access to the modules stored in the library. The container has to be returned in any case, no matter if the + * library is stored embedded, external, or linked. + * @see getExternalSourceURL + * @see getLinkTargetURL + */ + readonly ModuleContainer: container.XNameContainer; + + /** returns the library's name */ + readonly Name: string; + + /** returns the password, if the library is protected with one, an empty string otherwise. */ + readonly Password: string; + } + + /** + * Script Module containing some scripting code in a certain scripting language + * @deprecated Deprecated + */ + interface XStarBasicModuleInfo extends uno.XInterface { + /** returns the type of the script language as string, for example, "StarBasic" or "JavaScript". */ + getLanguage(): string; + + /** returns the name of the module */ + getName(): string; + + /** + * returns the script source code as string. + * + * The code has to correspond with the language defined by Language. + */ + getSource(): string; + + /** returns the type of the script language as string, for example, "StarBasic" or "JavaScript". */ + readonly Language: string; + + /** returns the name of the module */ + readonly Name: string; + + /** + * returns the script source code as string. + * + * The code has to correspond with the language defined by Language. + */ + readonly Source: string; + } + + /** + * is the interface for an {@link XLibraryContainer} which can be made persistent in an {@link com.sun.star.embed.XStorage} . + * + * A persistent library container is associated with a root storage. The container is responsible for a particular sub storage of the root storage, the + * container storage. + * @since OOo 2.3 + */ + interface XStorageBasedLibraryContainer extends XPersistentLibraryContainer { + /** + * denotes the root storage associated with the container. + * + * Effectively, this attribute is a typed version of {@link XPersistentLibraryContainer.RootLocation} , it's guaranteed that at every time, + * `XPersistentLibraryContainer::RootLocation` and `RootStorage` have the same value. + * + * You should only **set** this attribute to a new value if you previously called storeLibrariesToStorage with the same storage. Setting this attribute + * to a storage into which the container has not been stored previously might result in unexpected behavior. + */ + RootStorage: embed.XStorage; + + /** + * stores the libraries to a storage other than the current container storage + * + * Note that the library container is not automatically associated with the new root storage. Instead, you need to manually set the RootStorage attribute + * afterwards. This separation allows for Save-To as well Save-As operations. + * @param RootStorage denotes the root storage into which the libraries should be written, which must not be `NULL` . ; Note that the actual libraries are + * @throws com::sun::star::lang::IllegalArgumentException if the `RootStorage` parameter is `NULL` , or equals {@link RootStorage} . + * @throws com::sun::star::lang::WrappedTargetException if an error occurs during storing. + */ + storeLibrariesToStorage(RootStorage: embed.XStorage): void; + } + + /** + * Interface to provide standard type conversions. + * @see Converter + */ + interface XTypeConverter extends uno.XInterface { + /** + * Converts the value `aFrom` to the specified type `xDestinationType` . Throws an {@link CannotConvertException} if the conversion failed. + * @param aFrom source value + * @param xDestinationType destination type + * @returns converted value (any carrying value of type `xDestinationType` + */ + convertTo(aFrom: any, xDestinationType: type): any; + + /** + * Converts the value `aFrom` to the specified simple type `aDestinationType` . Throws an {@link CannotConvertException} if the conversion failed and an + * {@link com.sun.star.lang.IllegalArgumentException} if the destination {@link com.sun.star.uno.TypeClass} is not simple, e.g. not long or byte. + * @param aFrom source value + * @param aDestinationType destination type class + * @returns converted value (any carrying value of type `aDestinationType` + */ + convertToSimpleType(aFrom: any, aDestinationType: uno.TypeClass): any; + } + + namespace browse { + /** + * This service is used to create Root XBrowseNodes. + * @deprecated Deprecateduse the singleton theBrowseNodeFactory + * @since OOo 2.0 + */ + type BrowseNodeFactory = XBrowseNodeFactory; + + /** + * The one and only {@link BrowseNodeFactory} . + * + * To get the singleton call getValueByName on the component context `; /singletons/com.sun.star.script.theBrowseNodeFactory; ` + * @since OOo 2.0 + */ + type theBrowseNodeFactory = XBrowseNodeFactory; + + /** + * This service provides access to the Macros and Macro containers via the {@link XBrowseNode} interface. {@link XInvocation} is an optional interface + * that is used to execute macros, or to create/delete/rename macros or macro containers. + * @since OOo 2.0 + */ + interface BrowseNode extends XBrowseNode, XInvocation { } + + /** + * This interface represents a node in the hierarchy used to browse available scripts. Objects implementing this interface are expected to also implement + * {@link com.sun.star.beans.XPropertySet} and, optionally, {@link com.sun.star.script.XInvocation} (see the Developer's Guide for more details). + */ + interface XBrowseNode extends uno.XInterface { + /** + * Get the children of this node + * @returns {@link com.sun.star.script.browse.XBrowseNode} sequence of child nodes + */ + readonly ChildNodes: SafeArray; + + /** + * Get the children of this node + * @returns {@link com.sun.star.script.browse.XBrowseNode} sequence of child nodes + */ + getChildNodes(): SafeArray; + + /** + * Get the name of the node + * @returns The `string` name of this node + */ + getName(): string; + + /** + * the type of the node. + * @returns A `short` representing the type of this node. + */ + getType(): number; + + /** + * Indicates if this node contains any children + * @returns `boolean` true if there are child nodes. + */ + hasChildNodes(): boolean; + + /** + * Get the name of the node + * @returns The `string` name of this node + */ + readonly Name: string; + + /** + * the type of the node. + * @returns A `short` representing the type of this node. + */ + readonly Type: number; + } + + /** This interface provides a factory for obtaining objects implementing the {@link XBrowseNode} interface. */ + interface XBrowseNodeFactory extends uno.XInterface { + /** + * a factory method for the creation of XBrowseNodes ( view ) {@link com.sun.star.script.browse.BrowseNodeFactoryViewTypes} specifies the type of view to + * be returned + * @returns an object implementing {@link com.sun.star.script.browse.XBrowseNode} + */ + createView(viewType: number): XBrowseNode; + } + + namespace BrowseNodeFactoryViewTypes { + const enum Constants { + MACROORGANIZER = 1, + MACROSELECTOR = 0, + } + } + + namespace BrowseNodeTypes { + const enum Constants { + CONTAINER = 1, + ROOT = 2, + SCRIPT = 0, + } + } + } + + namespace FailReason { + const enum Constants { + INVALID = 8, + IS_NOT_BOOL = 4, + IS_NOT_ENUM = 3, + IS_NOT_NUMBER = 2, + NO_DEFAULT_AVAILABLE = 9, + NO_SUCH_INTERFACE = 5, + OUT_OF_RANGE = 1, + SOURCE_IS_NO_DERIVED_TYPE = 6, + TYPE_NOT_SUPPORTED = 7, + UNKNOWN = 10, + } + } + + namespace ModuleType { + const enum Constants { + CLASS = 2, + DOCUMENT = 4, + FORM = 3, + NORMAL = 1, + UNKNOWN = 0, + } + } + + namespace provider { + /** This service provides a means of browsing and invoking scripts in a single language. */ + type LanguageScriptProvider = ScriptProvider; + + /** This service acts as a wrapper around the various language specific ScriptProviders. */ + type MasterScriptProvider = ScriptProvider; + + /** + * This service is used to create MasterScriptProviders. Note: You shouldn't ever instantiate the {@link MasterScriptProvider} service directly, you + * should always use this service. + * @deprecated Deprecatedrather use the singleton service theMasterScriptProviderFactory + */ + type MasterScriptProviderFactory = XScriptProviderFactory; + + /** This service is a Basic-specific {@link LanguageScriptProvider} . */ + type ScriptProviderForBasic = LanguageScriptProvider; + + /** This service is a BeanShell-specific {@link LanguageScriptProvider} . */ + type ScriptProviderForBeanShell = LanguageScriptProvider; + + /** This service is a Java-specific {@link LanguageScriptProvider} . */ + type ScriptProviderForJava = LanguageScriptProvider; + + /** This service is a Java-specific {@link LanguageScriptProvider} . */ + type ScriptProviderForJavaScript = LanguageScriptProvider; + + /** + * The one and only {@link MasterScriptProviderFactory} + * + * To get the singleton call getValueByName on the component context `; /singletons/com.sun.star.script.provider.theMasterScriptProviderFactory` + */ + type theMasterScriptProviderFactory = XScriptProviderFactory; + + /** is a checked exception that represents an error encountered by a {@link LanguageScriptProvider} whilst executing a script */ + interface ScriptErrorRaisedException extends uno.Exception { + /** Scripting language of script that generated exception */ + language: string; + + /** line number where error occurred. */ + lineNum: number; + + /** Name of script where error occurred */ + scriptName: string; + } + + /** is a checked exception that represents the detail of an exception thrown by a {@link LanguageScriptProvider} whilst executing a script */ + interface ScriptExceptionRaisedException extends ScriptErrorRaisedException { + /** Name of script where error occurred */ + exceptionType: string; + } + + /** is a checked exception that represents an error encountered by the Scripting Framework whilst executing a script */ + interface ScriptFrameworkErrorException extends uno.Exception { + /** error type {@link com.sun.star.script.provider.ScriptFrameworkErrorType} */ + errorType: number; + + /** Scripting language of script that generated exception */ + language: string; + + /** Name of script where error occurred */ + scriptName: string; + } + + /** This service providers a means to browse and execute scripts. */ + interface ScriptProvider extends browse.BrowseNode, XScriptProvider { } + + /** This service is used to help transform Scripting Framework storage locations to Scripting Framework script URIs and vice versa. */ + interface ScriptURIHelper extends XScriptURIHelper { + /** + * create a new {@link ScriptURIHelper} + * @param language The name of the scripting language for which this {@link ScriptURIHelper} is being created. It should be the same as the language name u + * @param location This location which was passed to the {@link LanguageScriptProvider} by the Scripting Framework on its creation + * @throws com::sun::star::lang::IllegalArgumentException + */ + create(language: string, location: string): void; + } + + /** This interface represents an invokable script or UNO function. */ + interface XScript extends uno.XInterface { + /** + * invoke the script or function represented by the implementing object + * @param aParams all parameters; pure, out parameters are undefined in sequence, i.e., the value has to be ignored by the callee + * @param aOutParamIndex out indices, indicating the position of the out or inout parameters in the list of arguments to the script + * @param aOutParam out parameters For example, if the script had the signature ; `long foo( [inout] string a, [in] string b, [out] string c )`; the call + * @returns the value returned from the function being invoked + * @throws com::sun::star::reflection::InvocationTargetException if and error occurs while attempting to invoke a script the information is captured. If the + */ + invoke(aParams: LibreOffice.SeqEquiv, aOutParamIndex: [LibreOffice.SeqEquiv], aOutParam: [LibreOffice.SeqEquiv]): any; + } + + /** + * This interface is provided to scripts, and provides a means of access to the various interfaces which they might need to perform some action on a + * document. It is required to be passed as the first argument for any Java scripts. + */ + interface XScriptContext extends uno.XInterface { + /** + * Obtain the component context which the script can use to create other uno components + * @returns {@link com.sun.star.uno.XComponentContext} interface + */ + readonly ComponentContext: uno.XComponentContext; + + /** + * Obtain the desktop reference on which the script can operate + * @returns {@link com.sun.star.frame.XDesktop} interface + */ + readonly Desktop: frame.XDesktop; + + /** + * Obtain the document reference on which the script can operate + * @returns {@link com.sun.star.frame.XModel} interface + */ + readonly Document: frame.XModel; + + /** + * Obtain the component context which the script can use to create other uno components + * @returns {@link com.sun.star.uno.XComponentContext} interface + */ + getComponentContext(): uno.XComponentContext; + + /** + * Obtain the desktop reference on which the script can operate + * @returns {@link com.sun.star.frame.XDesktop} interface + */ + getDesktop(): frame.XDesktop; + + /** + * Obtain the document reference on which the script can operate + * @returns {@link com.sun.star.frame.XModel} interface + */ + getDocument(): frame.XModel; + + /** + * provides access to the context where the script was invoked + * + * In some cases, it is possible that scripts, embedded in a document, are executed from within a context which is **not** the document itself. In this + * case, the `getInvocationContext` member allows to access this context. + * + * Note that the returned context is allowed to be `NULL` , in this case, the document as returned by `getDocument` is the invocation context. + * + * If the returned context is not `NULL` , its `ScriptContainer` attribute equals the document as returned by `XScriptContext::getDocument` . + * @since OOo 3.0 + */ + getInvocationContext(): document.XScriptInvocationContext; + + /** + * provides access to the context where the script was invoked + * + * In some cases, it is possible that scripts, embedded in a document, are executed from within a context which is **not** the document itself. In this + * case, the `getInvocationContext` member allows to access this context. + * + * Note that the returned context is allowed to be `NULL` , in this case, the document as returned by `getDocument` is the invocation context. + * + * If the returned context is not `NULL` , its `ScriptContainer` attribute equals the document as returned by `XScriptContext::getDocument` . + * @since OOo 3.0 + */ + readonly InvocationContext: document.XScriptInvocationContext; + } + + /** This interface provides a factory for obtaining objects implementing the {@link XScript} interface. */ + interface XScriptProvider extends uno.XInterface { + /** + * a factory method for the creation of {@link XScript} implementations. + * @param sScriptURI is the logical or language-dependent script URI + * @returns an object implementing {@link com.sun.star.script.provider.XScript} representing the script + * @throws com::sun::star::script::provider::ScriptFrameworkErrorException Framework error getting script for URI. + */ + getScript(sScriptURI: string): XScript; + } + + /** This interface provides a factory for obtaining objects implementing the {@link XScriptProvider} interface. */ + interface XScriptProviderFactory extends uno.XInterface { + /** + * a factory method for the creation of XScriptProviders implementations. + * @param Context is context for which the {@link ScriptProvider} is to be created for + * @returns an object implementing {@link com.sun.star.script.provider.XScriptProvider} + * @throws com::sun::star::lang::IllegalArgumentException if illegal or unknown context is passed + */ + createScriptProvider(Context: any): XScriptProvider; + } + + /** This interface allows to get the scripting provider related to the object. */ + interface XScriptProviderSupplier extends uno.XInterface { + /** + * returns scripting provider related to the object. + * @returns an object implementing {@link com.sun.star.script.provider.XScriptProvider} representing the script provider + */ + getScriptProvider(): XScriptProvider; + + /** + * returns scripting provider related to the object. + * @returns an object implementing {@link com.sun.star.script.provider.XScriptProvider} representing the script provider + */ + readonly ScriptProvider: XScriptProvider; + } + + /** This interface is used to help transform Scripting Framework storage locations to Scripting Framework script URIs and vice versa. */ + interface XScriptURIHelper extends uno.XInterface { + /** + * Obtain the root storage URI for this {@link ScriptURIHelper} . The resulting string can be used to access the storage for this using the Universal + * Content Broker + * @returns a URI to the storage as a `string` + */ + getRootStorageURI(): string; + + /** + * Obtain the Scripting Framework script URI for a specific UCB URI + * @returns the URI as a `string` + * @throws com::sun::star::lang::IllegalArgumentException if the storageURI is not a valid + */ + getScriptURI(storageURI: string): string; + + /** + * Obtain the storage URI for a specific Scripting Framework script URI. + * @returns a URI to the storage as a `string` + * @throws com::sun::star::lang::IllegalArgumentException if the storageURI is not a valid + */ + getStorageURI(scriptURI: string): string; + + /** + * Obtain the root storage URI for this {@link ScriptURIHelper} . The resulting string can be used to access the storage for this using the Universal + * Content Broker + * @returns a URI to the storage as a `string` + */ + readonly RootStorageURI: string; + } + + namespace ScriptFrameworkErrorType { + const enum Constants { + MALFORMED_URL = 3, + NO_SUCH_SCRIPT = 2, + NOTSUPPORTED = 1, + UNKNOWN = 0, + } + } + } + + namespace vba { + type VBAEventProcessor = XVBAEventProcessor; + + type VBAMacroResolver = XVBAMacroResolver; + + type VBASpreadsheetEventProcessor = XVBAEventProcessor; + + type VBATextEventProcessor = XVBAEventProcessor; + + /** + * Describes a VBA script event fired via {@link XVBACompatibility.broadcastVBAScriptEvent()} , and received by {@link + * XVBAScriptListener.notifyVBAScriptEvent()} . + * @see XVBACompatibility + * @see XVBAScriptListener + */ + interface VBAScriptEvent extends lang.EventObject { + /** + * Identifies the type of the event. + * @see VBAScriptEventId + */ + Identifier: number; + + /** + * Contains the name of the involved VBA module. + * @see VBAScriptEventId + */ + ModuleName: string; + } + + interface XVBACompatibility { + addVBAScriptListener(Listener: XVBAScriptListener): void; + broadcastVBAScriptEvent(Identifier: number, ModuleName: string): void; + ProjectName: string; + removeVBAScriptListener(Listener: XVBAScriptListener): void; + RunningVBAScripts: number; + VBACompatibilityMode: boolean; + } + + /** Executes VBA event handlers. */ + interface XVBAEventProcessor { + /** + * Returns whether a VBA event handler exists. + * @param nEventId The identifier of the event. Must be a constant from {@link VBAEventId} . + * @param aArgs Additional arguments needed to identify some event handlers, e.g. a sheet index for spreadsheet events. + * @returns `TRUE` , if the VBA event handler exists. `FALSE` , for all other cases. + */ + hasVbaEventHandler(nEventId: number, aArgs: LibreOffice.SeqEquiv): boolean; + + /** + * Executes a VBA event handler. + * @param nEventId The identifier of the event. Must be a constant from {@link VBAEventId} . + * @param aArgs The input arguments needed to create the argument list of the VBA event handler. + * @returns `TRUE` , if event handing is enabled, and the event handler macro exists and has been invoked. + * @throws com::sun::star::lang::IllegalArgumentException if the passed event identifier is not supported, or if the passed arguments do not conform to the + * @throws com::sun::star::util::VetoException if the VBA event handler has indicated to veto the event. + */ + processVbaEvent(nEventId: number, aArgs: LibreOffice.SeqEquiv): boolean; + } + + /** Converts VBA macro names to script URLs and vice versa. */ + interface XVBAMacroResolver { + /** + * Returns the VBA macro name for a macro with the passed script URL. + * @param aScriptURL The script URL to be resolved to a VBA macro name. Must be a document-local script. + * @returns The VBA macro name referring to a macro with the passed script URL. + * @throws com::sun::star::lang::IllegalArgumentException if a macro with the passed name does not exist. + */ + resolveScriptURLtoVBAMacro(aScriptURL: string): string; + + /** + * Returns the script URL representing the passed VBA macro name. + * @param aVBAMacroName The VBA macro name to be resolved to a script URL. The macro name may consist of up to three parts, divided by periods. The first t + * @returns The script URL referring to the passed VBA macro. + * @throws com::sun::star::lang::IllegalArgumentException if a macro with the passed name does not exist. + */ + resolveVBAMacroToScriptURL(aVBAMacroName: string): string; + } + + interface XVBAModuleInfo { + getModuleInfo(ModuleName: string): ModuleInfo; + hasModuleInfo(ModuleName: string): boolean; + insertModuleInfo(ModuleName: string, ModuleInfo: ModuleInfo): void; + removeModuleInfo(ModuleName: string): void; + } + + interface XVBAScriptListener extends lang.XEventListener { + notifyVBAScriptEvent(Event: VBAScriptEvent): void; + } + + namespace VBAEventId { + const enum Constants { + AUTO_CLOSE = 3, + AUTO_EXEC = 4, + AUTO_EXIT = 5, + AUTO_NEW = 1, + AUTO_OPEN = 2, + DOCUMENT_CLOSE = 1003, + DOCUMENT_NEW = 1001, + DOCUMENT_OPEN = 1002, + NO_EVENT = -1, + USERDEFINED_START = 1000000, + WORKBOOK_ACTIVATE = 2001, + WORKBOOK_AFTERSAVE = 2007, + WORKBOOK_BEFORECLOSE = 2004, + WORKBOOK_BEFOREPRINT = 2005, + WORKBOOK_BEFORESAVE = 2006, + WORKBOOK_DEACTIVATE = 2002, + WORKBOOK_NEWSHEET = 2008, + WORKBOOK_OPEN = 2003, + WORKBOOK_WINDOWACTIVATE = 2009, + WORKBOOK_WINDOWDEACTIVATE = 2010, + WORKBOOK_WINDOWRESIZE = 2011, + WORKSHEET_ACTIVATE = 2101, + WORKSHEET_BEFOREDOUBLECLICK = 2103, + WORKSHEET_BEFORERIGHTCLICK = 2104, + WORKSHEET_CALCULATE = 2105, + WORKSHEET_CHANGE = 2106, + WORKSHEET_DEACTIVATE = 2102, + WORKSHEET_FOLLOWHYPERLINK = 2108, + WORKSHEET_SELECTIONCHANGE = 2107, + } + } + + namespace VBAScriptEventId { + const enum Constants { + INITIALIZE_USERFORM = 2, + SCRIPT_STARTED = 0, + SCRIPT_STOPPED = 1, + } + } + } + } + + namespace sdb { + /** specifies a column descriptor control. */ + type ColumnDescriptorControl = awt.UnoControl; + + /** @since LibreOffice 4.1 */ + type CommandDefinition = sdbcx.XRename; + + /** + * implements a loader for various datasource-related user interface components. + * + * Usually, you don't deal with this loader directly. Instead, use an instance with the {@link com.sun.star.frame.XComponentLoader} interface, and pass + * one of the below-mentioned URLs to it. + * @see com.sun.star.frame.XComponentLoader + * @see com.sun.star.frame.Desktop + */ + type ContentLoader = frame.FrameLoader; + + /** allows creating instances of the {@link DataAccessDescriptor} service. */ + type DataAccessDescriptorFactory = XDataAccessDescriptorFactory; + + /** + * is the context for accessing datasource. + * + * A datasource contains information how to create a connection to a database, such as, which database driver should be used, for which user should a + * connection be established, etc. ; The context stores datasources under a given name. + * @see com.sun.star.sdb.DataSource + */ + type DatabaseContext = XDatabaseContext; + + /** + * describes a service which is able to handle database-related interactions. + * + * Usually, you will not instantiate this service directly. Instead, you'll instantiate a generic {@link com.sun.star.task.InteractionHandler} service, + * and pass it your request. Based on configuration data, this implementation will decide where to forward the request to. + * + * By default, the `DatabaseInteractionHandler` feels responsible (as per configuration) for the following interaction types: **database related + * errors**; The general structure to transport such errors is the {@link com.sun.star.sdbc.SQLException} , and if your interaction request supplies + * such a `SQLException` (or an instance of any derived class), the handler will display a generic error dialog, which is able to travel the object chain + * which may be contained in the exception.**parameter requests**; If your interaction request supplies an {@link com.sun.star.sdb.ParametersRequest} , + * the handler will open a standard dialog asking the user to fill in parameter values. ; In the case you want to use this feature of the handler, you + * should supply a special continuation ( {@link com.sun.star.sdb.XInteractionSupplyParameters} ) as well, so the handler can return the entered + * information. + */ + type DatabaseInteractionHandler = task.XInteractionHandler2; + + /** + * describes a container which provides access to database forms. + * @see com.sun.star.sdb.DocumentDefinition + */ + type Forms = DocumentContainer; + + /** + * is a service for user interaction for databases. + * @deprecated DeprecatedDo not use this service anymore. Instead, create a generic com::sun::star::task::InteractionHandler instance, and pass it your request. + */ + type InteractionHandler = task.XInteractionHandler; + + /** + * is a stored definition of a SQL "Select statement". + * + * It can be used, if there is a need to execute SQL statement more than once. + */ + type QueryDefinition = XQueryDefinition; + + /** + * This interface could be incomplete since I derived it from its sole place of use. + * @since LibreOffice 4.1 + */ + type ReportDesign = frame.XController2; + + /** + * describes a container which provides access to database reports. + * @see com.sun.star.sdb.DocumentDefinition + */ + type Reports = DocumentContainer; + + /** + * is an exception fired whenever a row set operation was cancelled because of of a veto of an approved listener. + * @see com.sun.star.sdb.XRowSetApproveListener + */ + type RowSetVetoException = sdbc.SQLException; + + /** @since LibreOffice 4.1 */ + type TextConnectionSettings = XTextConnectionSettings; + + /** + * represents a procedure call. The service differs only in the access of the columns and parameters to the service {@link + * com.sun.star.sdbc.CallableStatement} . + */ + interface CallableStatement extends sdbc.CallableStatement, PreparedStatement { } + + /** describes the common properties of a database column. */ + interface Column extends sdbcx.Column, ColumnSettings { } + + /** specifies the standard model of an {@link ColumnDescriptorControl} . */ + interface ColumnDescriptorControlModel extends awt.UnoControlModel { + /** specifies the connection to a database. */ + ActiveConnection: sdbc.XConnection; + + /** + * specifies the border style of the control. + * + * `; 0: No border; 1: 3D border; 2: simple border; ` + */ + Border: number; + + /** specifies the column descriptor where the values will be stored in. */ + Column: beans.XPropertySet; + + /** determines whether the control is enabled or disabled. */ + Enabled: boolean; + + /** specifies that the control can be reached with the TAB key. */ + Tabstop: boolean; + } + + /** describes the common properties of a database column. */ + interface ColumnSettings extends beans.XPropertySet { + /** + * specifies the alignment of columns text. + * + * `; 0: left; 1: center; 2: right; ` + * + * If the value is `VOID` , a default alignment should be used according to the datatype of the column. + */ + Align: number; + + /** describes the default value which should be displayed by a control when moving to a new row. The default is `NULL` . */ + ControlDefault: string; + + /** indicates a control model which defines the settings for layouting. The default is `NULL` . */ + ControlModel: beans.XPropertySet; + + /** + * contains the index of the number format that is used for the column. + * + * The proper value can be determined by using the {@link com.sun.star.util.XNumberFormatter} interface. + * + * If the value is `VOID` , a default number format should be used according to the datatype of the column. + */ + FormatKey: number; + + /** describes an optional help text which can be used by UI components when representing this column. The default is `NULL` . */ + HelpText: string; + + /** determines whether the column should be displayed or not. */ + Hidden: boolean; + + /** + * Position of the column within a grid. + * + * If the value is `VOID` , the default position should be taken according. + */ + Position: number; + + /** + * specifies the width of the column displayed in a grid, the unit is 10THMM. + * + * If the value is `VOID` , a default width should be used according to the label of the column. + */ + Width: number; + } + + /** extends the {@link com.sun.star.sdbc.Connection} of SDBC by providing the data definitions of a connected database. */ + interface Connection extends sdbc.Connection, container.XChild, XCommandPreparation, sdbcx.DatabaseDefinition, XQueriesSupplier, XSQLQueryComposerFactory, + lang.XMultiServiceFactory { } + + /** + * descriptor for accessing basic data access objects. + * + * Various components interacting with the database access world require to specify (or provide themselves) an object such as a query, a table, a result + * set, a connection to a data source, a column within a table, and so on. ; All of these objects are usually not specified with a single property, but + * with a set of properties, and for various objects, various (but not always different) properties are needed. ; The `DataAccessDescriptor` describes + * the super set of the properties for the most common data access objects. + * + * Every component providing or requiring a {@link DataAccessDescriptor} for some functionality is urged to specify which properties are mandatory, and + * which ones optional. Additionally, it's free to specify any additional requirements about the relations of properties. + * @since OOo 1.1.2 + */ + interface DataAccessDescriptor { + /** + * is a connection to use. + * + * This object is guaranteed to be a {@link com.sun.star.sdbc.Connection} , but usually it will be a {@link Connection} from the module {@link + * com.sun.star.sdb} . ; Especially in the case where no {@link DataSourceName} is given, but {@link CommandType} is {@link CommandType.QUERY} , the + * ActiveConnection needs to fully support the {@link Connection} service, to actually retrieve the query specified by {@link Command} + * + * If no ActiveConnection is given, then a {@link DataSourceName} is required. + * @see DataSourceName + */ + ActiveConnection: sdbc.XConnection; + + /** + * specifies how to interpret {@link Selection} + * + * If present, {@link BookmarkSelection} specifies the semantics of {@link Selection} . If not present, it's up to the implementing component to specify + * this semantics. + * + * If `TRUE` , then the single elements of the array specified by {@link Selection} are bookmarks relative to the result set, if `FALSE` , they're record + * numbers. + * @see com.sun.star.sdbcx.XRowLocate + * @see com.sun.star.sdbc.XResultSet + * @see com.sun.star.sdb.XResultSetAccess + */ + BookmarkSelection: boolean; + + /** + * specifies a column object + * + * For reasons of performance and saving resources, a supplier of an {@link DataAccessDescriptor} which is used to describe a column object can pass this + * object directly, instead of specifying it only implicitly with the {@link ColumnName} property. + * + * The object will at least support the {@link com.sun.star.sdbcx.Column} service, but more often it will even be a {@link Column} from the {@link + * com.sun.star.sdb} module. + */ + Column: beans.XPropertySet; + + /** + * specifies a column name. + * + * This property is usually used together with the {@link Command} and {@link CommandType} properties. + * @see Column + */ + ColumnName: string; + + /** + * specifies the command to execute to retrieve a result set. + * + * This property is only meaningful together with the {@link CommandType} property, thus either **both** or **none** of them are present. + * @see CommandType + */ + Command: string; + + /** + * specifies the type of the command to be executed to retrieve a result set. + * + * {@link Command} needs to be interpreted depending on the value of this property. + * + * This property is only meaningful together with the {@link Command} property, thus either **both** or **none** of them are present. + * @see com.sun.star.sdb.CommandType + */ + CommandType: number; + + /** + * specifies additional info to use when creating a connection from a `ConnectionResource` + * + * This member is evaluated only when `ConnectionResource` is used: In this case, {@link com.sun.star.sdbc.XDriverManager.getConnectionWithInfo()} is + * used to create a connection for the given connection resource, instead of {@link com.sun.star.sdbc.XDriverManager.getConnection()} . + * + * If the sequence is empty, it is ignored. + */ + ConnectionInfo: SafeArray; + + /** + * specifies the database URL which locates a database driver. + * + * This database URL is usually used to create a {@link Connection} . If no ConnectionResource is given, then an {@link ActiveConnection} is required. + * @see com.sun.star.sdb.DatabaseContext + * @see ActiveConnection + */ + ConnectionResource: string; + + /** + * specifies the URL of the database file. + * + * This database location is usually used to create a {@link Connection} . If no DatabaseLocation is given and the {@link ConnectionResource} is empty, + * then an {@link ActiveConnection} is required. + * @see com.sun.star.sdb.DatabaseContext + * @see ActiveConnection + */ + DatabaseLocation: string; + + /** + * specifies the name of the datasource to access. + * + * This data source is usually used to create a {@link Connection} . If no DataSourceName is given and the {@link DatabaseLocation} and the {@link + * ConnectionResource} are empty, then an {@link ActiveConnection} is required. + * @see com.sun.star.sdb.DatabaseContext + * @see ActiveConnection + */ + DataSourceName: string; + + /** + * specifies if the {@link Command} should be analyzed on the client side before sending it to the database server. + * + * The default value of this property is `TRUE` . By switching it to `FALSE` , you can pass backend-specific SQL statements, which are not standard SQL, + * to your database. + * + * This property is usually present together with the {@link Command} and {@link CommandType} properties, and is evaluated if and only if {@link + * CommandType} equals {@link CommandType.COMMAND} . + */ + EscapeProcessing: boolean; + + /** + * specifies an additional filter to optionally use. + * + * The Filter string has to form a `WHERE` -clause, **without** the `WHERE` -string itself. + * + * If a {@link DataSourceName} , {@link Command} and {@link CommandType} are specified, a {@link RowSet} can be created with this information. If the + * results provided by the row set are to be additionally filtered, the Filter property can be used. + * + * Note that the Filter property does not make sense if a {@link ResultSet} has been specified in the {@link DataAccessDescriptor} . + * @see com.sun.star.sdb.RowSet + * @see ResultSet + */ + Filter: string; + + /** + * specifies an additional `GROUP BY` clause which should be applied on top of the given {@link Command} . + * + * The keyword `GROUP BY` itself is not part of this property. + */ + GroupBy: string; + + /** + * specifies an additional `HAVING` clause which should be applied on top of the given {@link Command} . + * + * The keyword `HAVING` itself is not part of this property. + */ + HavingClause: string; + + /** + * specifies an additional `ORDER BY` clause which should be applied on top of the given {@link Command} . + * + * The keyword `ORDER BY` itself is not part of this property. + */ + Order: string; + + /** + * specifies an already existent result set to use. + * + * Usually, you use the properties {@link DataSourceName} (alternatively {@link ActiveConnection} ), {@link Command} and {@link CommandType} to specify + * how to **obtain** a result set. However, in scenarios where the provider of a {@link DataAccessDescriptor} has access to an already existent result + * set, it can pass it along for reusage. This is encouraged to increase performance. + * + * The object will at least support the {@link com.sun.star.sdbc.ResultSet} service. + * + * Note that any superservices of {@link com.sun.star.sdbc.ResultSet} are also allowed. Especially, this member can denote an instance of the {@link + * com.sun.star.sdb.RowSet} , or an instance obtained by calling {@link com.sun.star.sdb.XResultSetAccess.createResultSet()} on such a {@link + * com.sun.star.sdb.RowSet} . This becomes important in conjunction with the {@link Selection} property. + * @see com.sun.star.sdb.XResultSetAccess + */ + ResultSet: sdbc.XResultSet; + + /** + * specifies a selection to confine the records in a result set. + * + * When you specify a result set either implicitly ( {@link DataSourceName} , {@link Command} , {@link CommandType} ) or explicitly ( {@link ResultSet} + * ), the set of results can be additionally refined with this property. + * + * The single elements of the {@link Selection} are either record numbers (see {@link com.sun.star.sdbc.XResultSet.getRow()} ), or bookmarks (see {@link + * com.sun.star.sdbcx.XRowLocate.getBookmark()} ). ; It is up to the component which provides or requires a {@link DataAccessDescriptor} to specify + * which of the two alternatives it expects. If it does **not** specify this, then the property {@link BookmarkSelection} becomes mandatory. + * + * If the elements specify bookmarks, and a {@link ResultSet} has been specified, then this result set is required to support the {@link + * com.sun.star.sdbcx.XRowLocate} interface. + */ + Selection: SafeArray; + } + + /** + * specifies a component, which controls DatabaseAccessConnections and acts like a shared {@link DataSource} . + * @deprecated Deprecated + */ + interface DatabaseAccess extends beans.XPropertySet, XDatabaseAccess, XCompletedConnection { + /** is a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included. */ + ConnectInfo: SafeArray; + + /** indicates a database url of the form ; ` jdbc:subprotocol:subname` or ` sdbc:subprotocol:subname` */ + ConnectURL: string; + + /** indicates that a password is always necessary. */ + IsPasswordRequired: boolean; + + /** determines whether modifications on the data access bean are allowed or not. */ + IsReadOnly: boolean; + + /** provides an object for formatting numbers. */ + NumberFormatsSupplier: util.XNumberFormatsSupplier; + + /** defines a list of tables, on which the bean should have it's focus. If empty, all tables are rejected. */ + TableFilter: SafeArray; + + /** defines a list of table types, on which the bean should have it's focus. If empty, all tables types are rejected. */ + TableTypeFilter: SafeArray; + + /** is the title of the bean. */ + Title: string; + + /** is the URL of the bean. */ + URL: string; + } + + /** + * specifies a component, which supplies and stores additional information related to a certain database connection, such as, DatabaseQueries, + * FormDocuments, and ReportDocuments. Objects for data definition are supplied as well, for instance, Tables, Views, etc. + * + * Implements the service {@link com.sun.star.sdbc.Connection} . It is possible to open more than one connection at the same time, but the method {@link + * com.sun.star.sdb.DatabaseAccessConnection.dispose()} will close only one of these connections. You have to close all connections in order to close the + * connection to the database. + * @deprecated Deprecated + */ + interface DatabaseAccessConnection extends sdbc.Connection, sdbcx.DatabaseDefinition, container.XChild, XSQLQueryComposerFactory, XQueriesSupplier { } + + /** + * is the context for data access beans. It allows to register aliases for database access beans. It is possible to have different aliases for different + * locales. + * + * A {@link DatabaseContext} stores an alias for the URL of a database access component for a given locale. It is also allowed to work with a default + * locale. This is useful in connection with Enumeration or NameAccess to the context. In common use, the default language is set during the + * initialization of the component. + * + * The service also provides a default handling for locales, where an alias isn't set. The first time an alias is registered for a programmatic name, the + * alias becomes the default for all other known locales. + * @deprecated Deprecated + * @see com.sun.star.util.XLocalizedAliases + */ + interface DatabaseAccessContext extends container.XEnumerationAccess, container.XNameAccess, util.XLocalizedAliases, lang.XLocalizable { } + + /** + * is a factory to create data access beans. Data access beans are shared among components, so if an already existing bean is requested, the existing one + * is returned. + * @deprecated Deprecated + */ + interface DatabaseAccessDataSource extends beans.XPropertySet, sdbc.XDataSource, XCompletedConnection { + /** determines the password handling. */ + PasswordMode: ucb.RememberAuthentication; + + /** locates the database access bean. */ + URL: string; + } + + /** + * specifies a link to a document associated with a database document + * @deprecated Deprecated + * @since OOo 2.0 + */ + interface DatabaseDocument extends beans.XPropertySet, sdbcx.XDataDescriptorFactory, sdbcx.XRename { + /** is the name of the document. */ + Name: string; + + /** is the URL of the document. */ + URL: string; + } + + /** @deprecated Deprecatedis the top level service for accessing database components. It enables the service user to establish connections to databases or to us */ + interface DatabaseEnvironment extends XDatabaseEnvironment, beans.XPropertySet { + /** provides an object for formatting numbers. */ + NumberFormatsSupplier: util.XNumberFormatsSupplier; + } + + /** + * describes a change in a database registration + * @see XDatabaseRegistrations + * @see XDatabaseRegistrationsListener + * @since LibreOffice 3.3 + */ + interface DatabaseRegistrationEvent extends lang.EventObject { + Name: string; + NewLocation: string; + OldLocation: string; + } + + /** defines a column used for a result set which contains the data definition and the data of the column of the current row of a result set. */ + interface DataColumn extends ResultColumn, XColumn, XColumnUpdate { + /** contains the original value of the column. */ + OriginalValue: any; + + /** + * contains the column's value. This could be a constraint property, to veto modifications, if a new value does not fit into rules defined for the + * column. + */ + Value: any; + } + + /** extends the {@link com.sun.star.sdbcx.Table} with additional display information, sorting and filtering criteria. */ + interface DataSettings { + /** indicates whether the filter should be applied or not, default is `FALSE` . */ + ApplyFilter: boolean; + + /** additional filter for the data object. */ + Filter: string; + + /** specifies the font attributes for data displaying. */ + FontDescriptor: awt.FontDescriptor; + + /** additional group by for the data object. */ + GroupBy: string; + + /** additional having clause for the data object. */ + HavingClause: string; + + /** is an additional sort order definition. */ + Order: string; + + /** specifies the height of a data row. */ + RowHeight: number; + + /** specifies the text color (RGB) for displaying text. */ + TextColor: util.Color; + } + + /** + * is a factory to establish database connections. It should be registered at a {@link com.sun.star.uno.NamingService} . + * @see com.sun.star.sdb.DatabaseContext + */ + interface DataSource extends beans.XPropertySet, XCompletedConnection, sdbc.XIsolatedConnection, util.XFlushable, XQueryDefinitionsSupplier, sdbc.XDataSource, + XBookmarksSupplier { + /** + * is a list of arbitrary string tag/value pairs as connection arguments + * + * The {@link DataSource} itself does not attempt to interpret any of those values. + * + * Instead, the values in this property have two use cases: Upon creating a connection, for every value in this sequence it's checked whether the {@link + * com.sun.star.sdbc.XDriver} which is to provide the connection supports a setting with the respective name, using its {@link + * com.sun.star.sdbc.XDriver.getPropertyInfo()} method.br/> If so, the settings is passed to the driver's {@link com.sun.star.sdbc.XDriver.connect()} + * method. If not, the setting is ignored.External components may use the settings to carry arbitrary information with the data source. Usually, this is + * used to control the behavior of components working with the data source. + */ + Info: SafeArray; + + /** indicates that a password is always necessary. */ + IsPasswordRequired: boolean; + + /** determines whether modifications on the data source are allowed or not. */ + IsReadOnly: boolean; + + /** + * is the name of the data source. + * + * If the data source is registered at the database context, then the `Name` property denotes the registration name. Otherwise, the name property + * contains the URL of the file which the database document associated with the data source is based on. + * + * If the same data source is registered under different names, the value of the `Name` property is not defined. + */ + Name: string; + + /** provides an object for formatting numbers. */ + NumberFormatsSupplier: util.XNumberFormatsSupplier; + + /** determines a users password. The password is not persistent. */ + Password: string; + + /** + * is a convenience wrapper around the {@link Info} property. + * + * Since fiddling around with a sequence of property values is somewhat uncomfortable in all known UNO language bindings (especially for tasks like + * simply changing the value of an existing value), the {@link Settings} property wraps the {@link Info} property for easier single-value access. + * + * You should use the {@link Settings} property if you need to access a few properties only, and the {@link Info} property if you need access to all + * existent settings at once. + * + * The object represented by this property supports the {@link com.sun.star.beans.PropertyBag} service. That is, you can at runtime add arbitrary new + * properties to the bag. + * + * Additionally, the property bag supports default values of properties, and thus the {@link com.sun.star.beans.XPropertyState} interface. If you add an + * own property to the bag using {@link com.sun.star.beans.XPropertyContainer.addProperty()} , you need to specify an initial value, which is also used + * as default value (exceptions see below). + * + * Effectively, the property bag represented by `Settings` contains two classes of properties: Pre-defined ones and user-defined ones. + * + * **Pre-defined** properties are properties which are potentially used by the data source, the application UI for the data source, or a particular + * backend driver employed by the data source. There's a large set of such properties, no all of them are effectively used for a concrete data source, + * nonetheless, they're all present in the `Settings` . ; Such properties are not removable from the bag, that is, their {@link + * com.sun.star.beans.PropertyAttribute.REMOVABLE} attribute is **not** set. ; Usually, you'll find that all of this properties have the + * com::sun::star::beans::PropertyState::PropertyState_DEFAULT_VALUE state. + * + * **User-defined** properties are the ones which are added at runtime by any instance. They might or might not be removable, this depends on whether or + * not the code adding them specifies the {@link com.sun.star.beans.PropertyAttribute.REMOVABLE} attribute. Also, they might or might not have a default + * value, determined by the {@link com.sun.star.beans.PropertyAttribute.MAYBEDEFAULT} attribute at the time they're added to the bag. + * + * When a data source is made persistent, then properties which are not removable (which are assumed to be the pre-defined properties) are ignored when + * they are in `DEFAULT` state. All other properties are always made persistent, except when an explicit {@link + * com.sun.star.beans.PropertyAttribute.TRANSIENT} attribute prohibits this. + * + * Similar, when you obtain the {@link Info} property of a `DataSource` , the `Settings` bag is asked for all its property values, and the ones which are + * removable and in state default are stripped, and **not** returned in the `Info` sequence. + */ + Settings: beans.XPropertySet; + + /** indicates that components displaying data obtained from this data source should suppress columns used for versioning. */ + SuppressVersionColumns: boolean; + + /** defines a list of tables, on which the {@link DataSource} should have it's focus. If empty, all tables are rejected. */ + TableFilter: SafeArray; + + /** defines a list of table types, on which the {@link DataSource} should have it's focus. If empty, all table types are rejected. */ + TableTypeFilter: SafeArray; + + /** indicates a database url of the form ; ` jdbc:subprotocol:subname` or `sdbc:subprotocol:subname` */ + URL: string; + + /** determines a users login name. */ + User: string; + } + + /** + * provides a user interface for administrating the system wide registered data sources. + * + * Here, **system wide registered** means registered on the (one and only) instance of the {@link com.sun.star.sdb.DatabaseContext} service. + */ + interface DatasourceAdministrationDialog extends beans.XPropertySet, ui.dialogs.XExecutableDialog, lang.XInitialization { + /** + * parent window to use for the administration dialog + * + * This property can't be set while the dialog is being displayed. + */ + ParentWindow: awt.XWindow; + + /** the title of the (dialog) window */ + Title: string; + } + + /** + * implements a component which allows browsing the data sources registered on the system. + * + * This service implements a user interface for browsing data sources registered on the {@link com.sun.star.sdb.DatabaseContext} instance of the system. + * + * It is possible to navigate through all the data sources, it's queries and it's tables. The queries/tables can be displayed in a grid-like view, where + * functionality for searching, sorting, filtering, and such is provided. + * + * Usually, you won't instantiate this service directly, instead you use the dispatch mechanisms of the application framework to load the URL + * **.component:DB/DataSourceBrowser** into an arbitrary frame. This should involve a {@link com.sun.star.sdb.ContentLoader} service, which creates and + * initializes the browser. + * + * Some aspects of the browser can be controlled from outside, e.g., it is possible to dispatch a sort or filter request, if a table or query is being + * displayed. + * + * The communication between the browser and external instances works in two ways. ; The way **in** is provided by the {@link + * com.sun.star.frame.XDispatchProvider} interface the service exports (Please see below for more details on this). ; The way **out** works in another + * way. There are several URLs which an external instance can provide dispatches for (usually by implementing a {@link + * com.sun.star.frame.XDispatchProviderInterceptor} for the parent frame of the browser), thus indicating that the browser should provide special + * functionality. ; In this case, the browser displays and maintains some additional slots (to be more concrete: toolbox items), which, upon triggering, + * call the {@link com.sun.star.frame.XDispatch.dispatch()} method of the object provided by the external instance. + * + * In particular, the supported URLs for communicating to an external instance are: **.uno:DataSourceBrowser/InsertColumns**; Available whenever an + * external instance provides a dispatcher ( {@link com.sun.star.frame.XDispatch} ) for this URL. ; Enabled, if at least one row in the grid view of a + * table or query is selected. ; It is the task of the external instance to provide functionality for this URL, but usually it is used to implement some + * kind of "Data To Text" functionality. ; **.uno:DataSourceBrowser/InsertContent**; Available whenever an external instance provides a dispatcher( + * {@link com.sun.star.frame.XDispatch} ) for this URL. ; Enabled, if at least one row in the grid view of a table or query is selected. ; It is the + * task of the external instance to provide functionality for this URL, but usually it is used to implement some kind of "Data To Fields" functionality. + * ; **.uno:DataSourceBrowser/FormLetter**; Available whenever an external instance provides a dispatcher ( {@link com.sun.star.frame.XDispatch} ) for + * this URL. ; It is the task of the external instance to provide functionality for this URL, but usually it is used to implement some kind of "Form + * Letter" functionality. ; + * + * For all kinds of URLs, the parameters supplied during dispatching build up a {@link DataAccessDescriptor} , where the following properties are + * present: {@link DataAccessDescriptor.DataSourceName}{@link DataAccessDescriptor.Command}{@link DataAccessDescriptor.CommandType}**optional**{@link + * DataAccessDescriptor.Selection}**optional**{@link DataAccessDescriptor.BookmarkSelection}**optional**{@link DataAccessDescriptor.ResultSet} + * + * The default for {@link DataAccessDescriptor.Selection} is to contain bookmarks, if not specified otherwise by {@link + * DataAccessDescriptor.BookmarkSelection} . + * @see com.sun.star.sdb.ContentLoader + * @see com.sun.star.sdb.DatabaseContext + * @see com.sun.star.sdb.DataSource + * @see com.sun.star.frame.XDispatch + * @see com.sun.star.frame.XDispatchProvider + * @see com.sun.star.frame.XDispatchProviderInterceptor + */ + interface DataSourceBrowser extends form.FormController, frame.XController, lang.XInitialization, frame.XDispatchProvider, ui.XContextMenuInterception { + getModel(): awt.XTabControllerModel; + getModel(): frame.XModel; + } + + /** + * describes a container which provides access to database related definitions like commands, forms, and reports. + * + * The container supports access to its elements by the elements name or by the elements position. + * + * Simple enumeration must be supported as well. + * + * To reflect the changes with the underlying database, a refresh mechanism needs to be supported. + */ + interface DefinitionContainer extends container.XNameAccess, container.XNameContainer, container.XIndexAccess, container.XEnumerationAccess, util.XRefreshable, + lang.XSingleServiceFactory { } + + /** + * defines the basic functionality for an object in the hierarchy of sub documents of a {@link OfficeDatabaseDocument} . + * @see DocumentDefinition + * @see DocumentContainer + */ + interface DefinitionContent extends ucb.Content, container.XHierarchicalName { } + + /** + * specifies documents which belong to a database source. + * + * These documents typically process information from a connected data source. A {@link Document} could be a form or a report. + * @deprecated Deprecated + */ + interface Document extends beans.XPropertySet { + /** is the URL of the document. */ + DocumentLocation: string; + + /** is the name of the document. If the document is part of the container, it is not possible to alter the name. */ + Name: string; + } + + /** + * describes a container which provides access to documents embedded into a database document, usually forms and reports. + * + * The {@link com.sun.star.lang.XMultiServiceFactory.createInstanceWithArguments()} should be used to create sub document container or form, or report + * objects. + * + * The embedded documents do not support any particular database related service, instead, they're usual com::sun::star::document::OfficeDocuments. ; + * The only thing worth mentioning here is that they support the {@link com.sun.star.container.XChild} interface, whose {@link + * com.sun.star.container.XChild.getParent()} method can be used to obtain the database document which the embedded document belongs to. + * @see DocumentDefinition + * @see OfficeDatabaseDocument + */ + interface DocumentContainer extends DefinitionContainer, DefinitionContent, frame.XComponentLoader, lang.XMultiServiceFactory, container.XHierarchicalNameContainer { + createInstance(aServiceSpecifier: K): LibreOffice.ServicesNameMap[K]; + createInstance(aServiceSpecifier?: string): uno.XInterface; + createInstanceWithArguments(ServiceSpecifier: K, Arguments: LibreOffice.SeqEquiv): LibreOffice.ServicesNameMap[K]; + createInstanceWithArguments(aArguments: LibreOffice.SeqEquiv | string): uno.XInterface; + } + + /** + * simplifies the accessing of data sources and it's corresponding database document. + * @see DataSource + * @see XDocumentDataSource + */ + interface DocumentDataSource extends DataSource, XDocumentDataSource { } + + /** + * specifies a sub document of a {@link OfficeDatabaseDocument} . + * + * Usual instances of a `DocumentDefinition` are forms and reports. + * + * Note that the `DocumentDefinition` does not denote the actual document (i.e. an object supporting the {@link com.sun.star.frame.XModel} interface), + * but only a shortcut to access and load those actual documents. + */ + interface DocumentDefinition extends DefinitionContent, beans.XPropertySet, XSubDocument { + /** Indicates if the document is to be used as template, for example, if a report is to be filled with data. */ + AsTemplate: boolean; + + /** is the name of the document. If the document is part of the container, it is not possible to alter the name. */ + Name: string; + } + + /** + * an error specifying the lack of a document name + * + * Usually thrown if someone tries to save a document which hasn't a name yet. + * @since OOo 2.0 + */ + interface DocumentSaveRequest extends task.ClassifiedInteractionRequest { + /** + * specifies the content where the document should save inside. Somebody handling the request could, e.g., use the content as root content to display the + * hierarchy of the sub contents. + */ + Content: ucb.XContent; + + /** The default name of the document, may be empty. */ + Name: string; + } + + /** + * provides a dialog for displaying database related exceptions. + * + * If applications use any of the functionality provided in the modules {@link com.sun.star.sdbc} , {@link com.sun.star.sdbcx} and {@link + * com.sun.star.sdb} , they will - sooner or later - encounter {@link com.sun.star.sdbc.SQLException} 's. ; These exceptions can be chained, so the + * information wrapped in one single {@link com.sun.star.sdbc.SQLException} can be rather complex (e.g., every instance where such an exception is + * passing before it is finally caught, could append a {@link com.sun.star.sdb.SQLContext} to explain what it was doing), and they should be presented to + * the user in a consistent way. ; This can be reached by using this service. + * @see com.sun.star.sdb.InteractionHandler + */ + interface ErrorMessageDialog extends ui.dialogs.XExecutableDialog { + /** + * allows initializing the dialog + * + * You do not need to call the initialize method directly, instead you may use the createInstanceWithArguments method of your {@link + * com.sun.star.lang.XMultiServiceFactory} . + * + * You specify a parameter by passing one (or more) {@link com.sun.star.beans.PropertyValue} object(s) to the initialize method, where the **Name** field + * contains a string describing which aspect you want to affect, and the **Value** field containing a value. ; Imagine the initialization values, as if + * you use {@link com.sun.star.beans} ">XPropertySet::setPropertyValue() of the {@link com.sun.star.beans.XPropertySet} interface ... ; allowed + * parameters are **title**; String describing the initial title of the dialog. If not specified, a default title is used.**parentWindow**; {@link + * com.sun.star.awt.XWindow} describing the parent window to use for the dialog.**sqlException**; {@link com.sun.star.sdbc.SQLException} describing the + * error which is being displayed. ; When initializing this value, you may use any derivative of {@link com.sun.star.sdbc.SQLException} . + */ + create(initialTitle: string, parentWindow: awt.XWindow, sqlException: any): void; + } + + /** + * This interface could be incomplete since I derived it from its places of use. + * @since LibreOffice 4.1 + */ + interface FilterDialog extends ui.dialogs.XExecutableDialog { + createDefault(): void; + createWithQuery(QueryComposer: XSingleSelectQueryComposer, RowSet: sdbc.XRowSet, ParentWindow: awt.XWindow): void; + } + + /** + * specifies a office database document which is a storable document. + * + * These documents contain information about forms, and reports, and the properties of a data source. + * + * The database document contains no data per default. The following is stored inside the document: formsreportsThe table settings defined in {@link + * DataSettings}The query settings defined in {@link DataSettings}All properties of the service {@link DataSource} + * @see com.sun.star.sdb.XOfficeDatabaseDocument + * @see com.sun.star.document.OfficeDocument + * @since OOo 2.0 + */ + interface OfficeDatabaseDocument extends document.OfficeDocument, XOfficeDatabaseDocument, document.XEmbeddedScripts, script.provider.XScriptProviderSupplier, + frame.XLoadable, document.XDocumentEventBroadcaster, util.XCloseable { + addEventListener(Listener: document.XEventListener | lang.XEventListener): void; + removeEventListener(Listener: document.XEventListener | lang.XEventListener): void; + } + + /** + * describes a column which is part of the ORDER clause. + * @see com.sun.star.sdb.XSingleSelectQueryComposer + */ + interface OrderColumn extends sdbcx.Column { + /** describes which sort order this column has. The default is `TRUE` . */ + IsAscending: boolean; + } + + /** + * This interface could be incomplete since I derived it from its places of use. + * @since LibreOffice 4.1 + */ + interface OrderDialog extends ui.dialogs.XExecutableDialog { + createDefault(): void; + createWithQuery(QueryComposer: XSingleSelectQueryComposer, RowSet: beans.XPropertySet): void; + } + + /** + * an error specifying the lack of parameters values + * + * Usually thrown if someone tries to execute an SQL statement containing parameters which can't be filled by the executing instance. + */ + interface ParametersRequest extends task.ClassifiedInteractionRequest { + /** + * specifies the connection on which the statement is to be executed. Somebody handling the request could, e.g., use the connection for determining the + * identifier quote string, etc. + */ + Connection: sdbc.XConnection; + + /** + * is the list of parameters requested. The objects returned by the {@link com.sun.star.container.XIndexAccess} have to be property sets describing the + * respective parameter. For this, the objects have to support the service {@link com.sun.star.sdbcx.Column} . + */ + Parameters: container.XIndexAccess; + } + + /** + * represents a precompiled SQL statement. The service differs only in the access of the columns and parameters to the service {@link + * com.sun.star.sdbc.PreparedStatement} . + */ + interface PreparedStatement extends sdbc.PreparedStatement, sdbcx.XColumnsSupplier { } + + /** + * is a stored definition of a SQL query. + * + * It can be used if there is a need to execute SQL statements more than once, or if you want to format the query result fields differently from the + * underlying table definitions. + */ + interface Query extends XQueryDefinition, DataSettings, sdbcx.XDataDescriptorFactory, sdbcx.XRename, sdbcx.XColumnsSupplier { } + + /** + * is a stored definition of a SQL "Select statement". + * + * It can be used, if there is a need to execute SQL statement more than once or if you want to format the query result fields different from the + * underlying table definitions. + */ + interface QueryDescriptor extends sdbcx.Descriptor, sdbcx.XDataDescriptorFactory, DataSettings, sdbcx.XColumnsSupplier { + /** is the command of the query, this is typically a select statement. */ + Command: string; + + /** should we use escape processing for the query. */ + EscapeProcessing: boolean; + + /** is the name of the update table catalog. */ + UpdateCatalogName: string; + + /** is the name of the update table schema. */ + UpdateSchemaName: string; + + /** is the name of the table which should be updated. This is usually used for queries which relate on more than one table. */ + UpdateTableName: string; + } + + /** + * implements a component which allows the creation of SQL statements. + * + * This service implements a user interface for creating SQL statements either through a graphical design interface or simply to enter the SQL statement + * directly. + * + * The design view of the {@link QueryDesign} is divided into two parts. The first part contains the table windows where columns can be selected for the + * SQL statement. The second part contains the columns which should appear in the selection of the SQL statement or criteria which narrow the query. + * + * **Operation Modes** + * + * A `QueryDesign` component has 3 operation modes, which control what kind of object is edited: **Query Mode** + * + * In `Query Mode` , the designer is used to modify an existing or create a new client-side query. + * + * + * + * ; + + /** + * gets the value of a column in the current row as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is + * particularly suitable for retrieving large LONGVARCHAR values. + * + * **Note:** All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly + * closes the stream. Also, a stream may return 0 when the method {@link com.sun.star.io.XInputStream.available()} is called whether there is data + * available or not. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + readonly CharacterStream: io.XInputStream; + + /** + * gets a CLOB value in the current row of this `ResultSet` object. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + readonly Clob: sdbc.XClob; + + /** + * gets the value of a column in the current row as a date object. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + readonly Date: util.Date; + + /** + * gets the value of a column in the current row as a double. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + readonly Double: number; + + /** + * gets the value of a column in the current row as a float. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + readonly Float: number; + + /** + * gets a SQL ARRAY value from the current row. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getArray(): sdbc.XArray; + + /** + * gets the value of a column in the current row as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is + * particularly suitable for retrieving large LONGVARBINARY or LONGVARCHAR values. + * + * **Note:** All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly + * closes the stream. Also, a stream may return 0 when the method {@link com.sun.star.io.XInputStream.available()} is called whether there is data + * available or not. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getBinaryStream(): io.XInputStream; + + /** + * gets a BLOB (Binary Large OBject) value in the current row. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getBlob(): sdbc.XBlob; + + /** + * gets the value of a column in the current row as boolean. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getBoolean(): boolean; + + /** + * gets the value of a column in the current row as a byte. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getByte(): number; + + /** + * gets the value of a column in the current row as a byte array. The bytes represent the raw values returned by the driver. + * @returns the column value; if the value is SQL NULL, the result is empty. + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getBytes(): SafeArray; + + /** + * gets the value of a column in the current row as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is + * particularly suitable for retrieving large LONGVARCHAR values. + * + * **Note:** All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly + * closes the stream. Also, a stream may return 0 when the method {@link com.sun.star.io.XInputStream.available()} is called whether there is data + * available or not. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getCharacterStream(): io.XInputStream; + + /** + * gets a CLOB value in the current row of this `ResultSet` object. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getClob(): sdbc.XClob; + + /** + * gets the value of a column in the current row as a date object. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getDate(): util.Date; + + /** + * gets the value of a column in the current row as a double. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getDouble(): number; + + /** + * gets the value of a column in the current row as a float. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getFloat(): number; + + /** + * gets the value of a column in the current row as a long. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getInt(): number; + + /** + * gets the value of a column in the current row as a hyper. + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getLong(): number; + + /** + * @param typeMap the type map is used to fetch the correct type + * @returns the value of a column in the current row as an object. This method uses the given `Map` object for the custom mapping of the SQL structure or dis + * @returns the column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + getObject(typeMap: container.XNameAccess): any; + + /** + * gets a REF(): void; + + /** + * updates a column with a stream value. + * @param x the new column value + * @param length the length of the stream + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + updateCharacterStream(x: io.XInputStream, length: number): void; + + /** + * updates a column with a Date value. + * @param x the new column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + updateDate(x: util.Date): void; + + /** + * updates a column with a double value. + * @param x the new column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + updateDouble(x: number): void; + + /** + * updates a column with a float value. + * @param x the new column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + updateFloat(x: number): void; + + /** + * updates a column with a long value. + * @param x the new column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + updateInt(x: number): void; + + /** + * updates a column with a hyper value. + * @param x the new column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + updateLong(x: number): void; + + /** + * gives a nullable column a null value. + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + updateNull(): void; + + /** + * updates a column with an Object value. + * @param x the new column value + * @param scale the scale + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + updateNumericObject(x: any, scale: number): void; + + /** + * updates a column with an Object value. + * @param x the new column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + updateObject(x: any): void; + + /** + * updates a column with a short value. + * @param x the new column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + updateShort(x: number): void; + + /** + * updates a column with a string value. + * @param x the new column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + updateString(x: string): void; + + /** + * updates a column with a Time value. + * @param x the new column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + updateTime(x: util.Time): void; + + /** + * updates a column with a Timestamp value. + * @param x the new column value + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + updateTimestamp(x: util.DateTime): void; + } + + /** + * is used for preparation of commands. + * + * A command could be a table, query, or any kind of SQL statement prepared by the user. + */ + interface XCommandPreparation extends uno.XInterface { + /** + * creates a {@link com.sun.star.sdbc.PreparedStatement} object for sending parameterized SQL statements to the database. + * + * A SQL statement with or without IN parameters can be pre-compiled and stored in a {@link PreparedStatement} object. This object can then be used to + * efficiently execute this statement multiple times. + * @param command the command to be prepared. Any SQL statement. + * @param commandType kind of the command {@link com.sun.star.sdb.CommandType} + * @returns the {@link PreparedStatement} object + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + prepareCommand(command: string, commandType: number): sdbc.XPreparedStatement; + } + + /** + * is used for establishing connections via a factory which is identified by its name. To complete the information needed for establishing a connection + * an interaction handler is used. + */ + interface XCompletedConnection extends uno.XInterface { + /** + * attempts to establish a database connection. If information is missing, such as a user's password, they are completed by user interaction. + * @param handler will be asked when more information is needed + * @returns the {@link Connection} object + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + connectWithCompletion(handler: task.XInteractionHandler): sdbc.XConnection; + } + + /** is used for execution where information for execution may be required from the user. */ + interface XCompletedExecution extends uno.XInterface { + /** + * completes necessary information before execution, for example parameter values. + * @param handler will be asked when more information is needed + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + executeWithCompletion(handler: task.XInteractionHandler): void; + } + + /** + * allows creating instances of the {@link DataAccessDescriptor} service. + * + * Data access descriptors are finally only bags of properties with a defined semantics. Depending on the context in which you use them, certain of their + * properties are needed or unneeded. ; The descriptor factory allows you to create instances which offer all properties potentially needed at a + * descriptor. + */ + interface XDataAccessDescriptorFactory { + /** creates a {@link DataAccessDescriptor} which supports all properties defined for this service, even if they're normally optional only. */ + createDataAccessDescriptor(): beans.XPropertySet; + } + + /** + * is not to be used anymore + * @deprecated Deprecated + */ + interface XDatabaseAccess extends sdbc.XDataSource { + addDatabaseAccessListener(listener: XDatabaseAccessListener): void; + getIsolatedConnection(user: string, password: string): sdbc.XConnection; + hasConnections(): boolean; + removeDatabaseAccessListener(listener: XDatabaseAccessListener): void; + suspendConnections(): boolean; + } + + /** + * is not to be used anymore + * @deprecated Deprecated + */ + interface XDatabaseAccessListener extends lang.XEventListener { + approveConnectionClosing(event: lang.EventObject): boolean; + connectionChanged(event: lang.EventObject): void; + connectionClosing(event: lang.EventObject): void; + } + + /** + * Provides an interface for the new-style {@link DatabaseContext} service to implement. + * @since LibreOffice 4.0 + */ + interface XDatabaseContext extends container.XEnumerationAccess, container.XNameAccess, uno.XNamingService, container.XContainer, lang.XSingleServiceFactory, + XDatabaseRegistrations { } + + /** + * is not to be used anymore. + * @deprecated Deprecated + */ + interface XDatabaseEnvironment extends sdbc.XDriverManager { + createDatabaseAccess(URL: string, title: string): XDatabaseAccess; + getDatabaseAccess(URL: string): XDatabaseAccess; + } + + /** + * provides access to the application-wide registered databases. + * + * This interface provides a mere wrapper around the respective configuration data, this way hiding the concrete configuration structure from its + * clients. You should, if possible at all, use this interface, instead of modifying or querying the configuration data directly. + * @since OOo 3.3 + */ + interface XDatabaseRegistrations { + /** registers a listener which is notified of changes in the registered databases */ + addDatabaseRegistrationsListener(Listener: XDatabaseRegistrationsListener): void; + + /** + * changes the location of a given database registration + * @throws com::sun::star::lang::IllegalArgumentException if the given name is empty, or the given location is invalid. + * @throws com::sun::star::container::NoSuchElementException if there is no database registered under this name + * @throws com::sun::star::lang::IllegalAccessException if the registration data for this database is read-only + */ + changeDatabaseLocation(Name: string, NewLocation: string): void; + + /** + * returns the location of the database registered under the given name + * @throws com::sun::star::lang::IllegalArgumentException if the given name is empty + * @throws com::sun::star::container::NoSuchElementException if there is no database registered under this name + */ + getDatabaseLocation(Name: string): string; + + /** returns the names of all registered databases */ + getRegistrationNames(): SafeArray; + + /** + * determines whether a database is registered under the given name. + * @throws com::sun::star::lang::IllegalArgumentException if the given name is empty + */ + hasRegisteredDatabase(Name: string): boolean; + + /** + * determines whether the registration data for a database given by name is read-only. + * + * In this case, attempts to revoke this registration will fail. + * @throws com::sun::star::lang::IllegalArgumentException if the given name is empty + * @throws com::sun::star::container::NoSuchElementException if there is no database registered under this name + */ + isDatabaseRegistrationReadOnly(Name: string): boolean; + + /** + * registers a database, given by location, under a given name + * @throws com::sun::star::lang::IllegalArgumentException if the given name is empty, or the given location is invalid. + * @throws com::sun::star::container::ElementExistException if there already is a databases registered under the given name. + */ + registerDatabaseLocation(Name: string, Location: string): void; + + /** returns the names of all registered databases */ + readonly RegistrationNames: SafeArray; + + /** revokes a previously registered listener */ + removeDatabaseRegistrationsListener(Listener: XDatabaseRegistrationsListener): void; + + /** + * revokes the registration of a database, given by name + * @throws com::sun::star::lang::IllegalArgumentException if the given name is empty + * @throws com::sun::star::container::NoSuchElementException if there is no database registered under this name + * @throws com::sun::star::lang::IllegalAccessException if the registration data for this database is read-only + */ + revokeDatabaseLocation(Name: string): void; + } + + /** + * implemented by components which want to be notified of changes in the application-wide registered databases. + * @see XDatabaseRegistrations + * @since OOo 3.3 + */ + interface XDatabaseRegistrationsListener extends lang.XEventListener { + /** + * called when a the location of a registered database changed + * + * Note that this talks about registration data only. That is, if the actual file denoted by the database registration is moved, this is in no way + * monitored or reported. Only (successful) calls to {@link XDatabaseRegistrations.changeDatabaseLocation()} are reported here. + */ + changedDatabaseLocation(Event: DatabaseRegistrationEvent): void; + + /** called when a database has been registered */ + registeredDatabaseLocation(Event: DatabaseRegistrationEvent): void; + + /** called when a database registration has been revoked */ + revokedDatabaseLocation(Event: DatabaseRegistrationEvent): void; + } + + /** + * simplifies the accessing of data sources and their corresponding database document. + * + * The interface can be used to access the data source of the database document. + * @see OfficeDatabaseDocument + */ + interface XDocumentDataSource { + /** + * provides access to the one and only {@link OfficeDatabaseDocument} which the data source is based on. + * + * The component returned by this attribute is an {@link OfficeDatabaseDocument} . + * + * Though there is a 1-to-1 relationship between database documents and data sources, each of the two can exist without its counterpart, but create this + * counterpart on request only. As a consequence, the document obtained via this attribute might be newly created, which implies that the caller is now + * responsible for it. In particular, the caller is responsible for calling {@link com.sun.star.util.XCloseable.close()} on the document as soon as it's + * not needed anymore. + * + * Additionally, if the caller does long-lasting processing on the document, it's advised to add itself as {@link com.sun.star.util.XCloseListener} to + * the document, to prevent closing as long as the processing lasts. + */ + DatabaseDocument: XOfficeDatabaseDocument; + } + + /** + * provides the access to a container of database forms. + * @see Forms + */ + interface XFormDocumentsSupplier extends uno.XInterface { + /** + * returns the container of forms. + * @returns the form documents + * @see Forms + */ + readonly FormDocuments: container.XNameAccess; + + /** + * returns the container of forms. + * @returns the form documents + * @see Forms + */ + getFormDocuments(): container.XNameAccess; + } + + /** + * An interaction continuation handing back a document name. + * + * This continuation is typically used in conjunction with a {@link com.sun.star.sdb.DocumentSaveRequest} . + * @since OOo 2.0 + */ + interface XInteractionDocumentSave extends task.XInteractionContinuation { + /** + * set the document name chosen by the interaction handler + * @param Name the name of the document + * @param Content the content where the document should store itself + */ + setName(Name: string, Content: ucb.XContent): void; + } + + /** + * An interaction continuation handing back parameter data. + * + * This continuation is typically used in conjunction with a {@link com.sun.star.sdb.ParametersRequest} . + */ + interface XInteractionSupplyParameters extends task.XInteractionContinuation { + /** + * set the parameters chosen by the interaction handler + * @param Values the parameters to set + */ + setParameters(Values: LibreOffice.SeqEquiv): void; + } + + /** simplifies the accessing of data sources, and it's corresponding database document and forms, and reports. */ + interface XOfficeDatabaseDocument extends XFormDocumentsSupplier, XReportDocumentsSupplier, document.XDocumentSubStorageSupplier { + /** provides access to the one and only {@link DataSource} associated with this document */ + DataSource: sdbc.XDataSource; + } + + /** provides the access to a container of parameters, typically used for a prepared statement. */ + interface XParametersSupplier extends uno.XInterface { + /** + * returns the container of parameters. + * @returns the parameters + */ + getParameters(): container.XIndexAccess; + + /** + * returns the container of parameters. + * @returns the parameters + */ + readonly Parameters: container.XIndexAccess; + } + + /** provides the access to a container of database queries. */ + interface XQueriesSupplier extends uno.XInterface { + /** + * returns the container of queries. + * + * The single elements of the container support the {@link Query} service. + * @returns the queries belonging to database connection at which the {@link XQueriesSupplier} interface is exposed. + */ + getQueries(): container.XNameAccess; + + /** + * returns the container of queries. + * + * The single elements of the container support the {@link Query} service. + * @returns the queries belonging to database connection at which the {@link XQueriesSupplier} interface is exposed. + */ + readonly Queries: container.XNameAccess; + } + + /** @since LibreOffice 4.1 */ + interface XQueryDefinition extends beans.XPropertySet, ucb.XContent, lang.XComponent { } + + /** provides the access to a container of database command definitions. */ + interface XQueryDefinitionsSupplier extends uno.XInterface { + /** + * returns the container of commands. + * @returns the query definitions + */ + getQueryDefinitions(): container.XNameAccess; + + /** + * returns the container of commands. + * @returns the query definitions + */ + readonly QueryDefinitions: container.XNameAccess; + } + + /** + * provides the access to a container of database reports. + * @see Reports + */ + interface XReportDocumentsSupplier extends uno.XInterface { + /** + * returns the container of reports. + * @returns the report documents + * @see Reports + */ + getReportDocuments(): container.XNameAccess; + + /** + * returns the container of reports. + * @returns the report documents + * @see Reports + */ + readonly ReportDocuments: container.XNameAccess; + } + + /** is the interface to create a {@link com.sun.star.sdbc.ResultSet} based on the object providing the interface. */ + interface XResultSetAccess extends uno.XInterface { + /** + * returns a new {@link com.sun.star.sdbc.ResultSet} based on the object. + * @returns the new created {@link ResultSet} object + */ + createResultSet(): sdbc.XResultSet; + } + + /** + * broadcasts changes in the `RowSet` supplied by a component + * @see XRowSetSupplier + * @see XRowsChangeListener + * @since OOo 3.3 + */ + interface XRowsChangeBroadcaster { + /** adds a listener to be notified when the `RowSet` supplied by the component changes. */ + addRowsChangeListener(listener: XRowsChangeListener): void; + + /** removes a previously added listener. */ + removeRowsChangeListener(listener: XRowsChangeListener): void; + } + + /** is used for receiving "rowsChanged" events posted by, for example, a row set. */ + interface XRowsChangeListener extends lang.XEventListener { + /** + * is called when rows are inserted, updated, or deleted. + * @param event contains information about the event + */ + rowsChanged(event: RowsChangeEvent): void; + } + + /** provides the possibility of reviving an event before changing the content of a row set. */ + interface XRowSetApproveBroadcaster extends uno.XInterface { + /** adds the specified listener to receive the events "approveCursorMove", "approveRowChange", and "appproveRowSetChange". */ + addRowSetApproveListener(listener: XRowSetApproveListener): void; + + /** removes the specified listener. */ + removeRowSetApproveListener(listener: XRowSetApproveListener): void; + } + + /** is used for approving the moving and changing of row set actions. */ + interface XRowSetApproveListener extends lang.XEventListener { + /** + * is called before a row set's cursor is moved. + * @param event the event which happened + * @returns `TRUE` when moving is allowed, otherwise `FALSE` + */ + approveCursorMove(event: lang.EventObject): boolean; + + /** + * is called before a row is inserted, updated, or deleted. + * @param event the event which happened + * @returns `TRUE` when changing is allowed, otherwise `FALSE` + */ + approveRowChange(event: RowChangeEvent): boolean; + + /** + * is called before a row set is changed, or in other words before a row set is reexecuted. + * @param event the event which happened + * @returns `TRUE` when changing is allowed, otherwise `FALSE` + */ + approveRowSetChange(event: lang.EventObject): boolean; + } + + /** + * broadcasts changes in the `RowSet` supplied by a component + * @see XRowSetSupplier + * @see XRowSetChangeListener + * @since OOo 3.2 + */ + interface XRowSetChangeBroadcaster { + /** adds a listener to be notified when the `RowSet` supplied by the component changes. */ + addRowSetChangeListener(iListener: XRowSetChangeListener): void; + + /** removes a previously added listener. */ + removeRowSetChangeListener(iListener: XRowSetChangeListener): void; + } + + /** + * is implemented by components which want to be notified when the `RowSet` supplied by a {@link XRowSetSupplier} changes. + * @see XRowSetChangeBroadcaster + * @see XRowSetSupplier + * @since OOo 3.2 + */ + interface XRowSetChangeListener extends lang.XEventListener { + /** notifies the listener that the `RowSet` associated with a {@link XRowSetSupplier} has changed. */ + onRowSetChanged(iEvent: lang.EventObject): void; + } + + /** + * uses a row set as datasource. + * @see XRowSetChangeBroadcaster + */ + interface XRowSetSupplier extends uno.XInterface { + /** + * provides access to the data source. + * @returns the {@link RowSet} object + */ + getRowSet(): sdbc.XRowSet; + + /** + * provides access to the data source. + * @returns the {@link RowSet} object + */ + RowSet: sdbc.XRowSet; + + /** + * sets the data source. + * @param xDataSource the {@link RowSet} object to set + */ + setRowSet(xDataSource: sdbc.XRowSet): void; + } + + /** + * simplifies the analyzing of single select statements. + * + * The interface can be used for analyzing single SELECT statements without knowing the structure of the used query. + */ + interface XSingleSelectQueryAnalyzer extends uno.XInterface { + /** + * returns the used filter. + * + * The filter criteria returned is part of the where condition of the select command, but it does not contain the where token. + * @returns the filter + */ + readonly Filter: string; + + /** + * returns the used filter. + * + * The filter criteria returned is part of the where condition of the select command, but it does not contain the where token. + * @returns the filter + */ + getFilter(): string; + + /** + * returns the currently used GROUP BY. + * + * The group criteria returned is part of the GROUP BY clause of the select command, but it does not contain the GROUP BY keyword . + * @returns the group + */ + getGroup(): string; + + /** + * returns the currently used group. + * + * The columns returned form the GROUP BY clause. + * @returns a collection of com::sun::star::sdb::GroupColumn which form the GROUP BY. + */ + getGroupColumns(): container.XIndexAccess; + + /** + * returns the used HAVING filter. + * + * The HAVING filter criteria returned is part of the HAVING condition of the select command, but it does not contain the HAVING token. + * @returns the filter + */ + getHavingClause(): string; + + /** + * returns the currently used sort order. + * + * The order criteria returned is part of the ORDER BY clause of the select command, but it does not contain the ORDER BY keyword . + * @returns the order + */ + getOrder(): string; + + /** + * returns the currently used sort order. + * + * The order criteria returned is part of the ORDER BY clause of the select command, but it does not contain the ORDER BY keyword . + * @returns a collection of {@link com.sun.star.sdb.OrderColumn} which form the ORDER BY. + */ + getOrderColumns(): container.XIndexAccess; + + /** + * returns the query. + * @returns the query + */ + getQuery(): string; + + /** + * returns the query previously set at the analyzer, with all application-level features being substituted by their database-level counterparts. + * + * The {@link XSingleSelectQueryAnalyzer} is an application-level component, which in some respect understands SQL features usually not present at the + * database level. As a prominent example, you might pass a `SELECT` statement to the analyzer which is based on another query. + * + * While all other methods will handle those additional features transparently - e.g. the query in the `FROM` part of a `SELECT` statement will be + * handled as if it really is a table -, `getQueryWithSubstitution` gives you the SQL statement where all those features have been stripped, and replaced + * with appropriate standard SQL. + * + * For example, consider a database document which contains a client-side query named `All Orders` . This query is not known to the underlying database, + * so an SQL statement like `SELECT * from "All Orders"` would be rejected by the database. However, instantiating a {@link SingleSelectQueryAnalyzer} at + * the {@link Connection} object, and passing it the above query, you can then use `getQueryWithSubstitution` to retrieve a statement where `"All + * Orders"` has been replaced with the `SELECT` statement which actually constitutes the `"All Orders"` query. + * @see Connection + * @see XQueriesSupplier + * @see DatabaseDocument + * @since OOo 2.0.4 + * @throws com::sun::star::sdbc::SQLException if the query represented cannot be completely substituted. A usual case for this is a recursion in the sub que + */ + getQueryWithSubstitution(): string; + + /** + * returns the currently used filter. + * + * The filter criteria is split into levels. Each level represents the OR criteria. Within each level, the filters are provided as an AND criteria with + * the name of the column and the filter condition. The filter condition is of type string. The operator used, is defined by {@link + * com.sun.star.sdb.SQLFilterOperator} . + * @returns the structured filter + */ + getStructuredFilter(): SafeArray>; + + /** + * returns the currently used HAVING filter. + * + * The HAVING filter criteria is split into levels. Each level represents the OR criteria. Within each level, the filters are provided as an AND criteria + * with the name of the column and the filter condition. The filter condition is of type string. The operator used, is defined by {@link + * com.sun.star.sdb.SQLFilterOperator} . + * @returns the structured HAVING filter + */ + getStructuredHavingClause(): SafeArray>; + + /** + * returns the currently used GROUP BY. + * + * The group criteria returned is part of the GROUP BY clause of the select command, but it does not contain the GROUP BY keyword . + * @returns the group + */ + readonly Group: string; + + /** + * returns the currently used group. + * + * The columns returned form the GROUP BY clause. + * @returns a collection of com::sun::star::sdb::GroupColumn which form the GROUP BY. + */ + readonly GroupColumns: container.XIndexAccess; + + /** + * returns the used HAVING filter. + * + * The HAVING filter criteria returned is part of the HAVING condition of the select command, but it does not contain the HAVING token. + * @returns the filter + */ + readonly HavingClause: string; + + /** + * returns the currently used sort order. + * + * The order criteria returned is part of the ORDER BY clause of the select command, but it does not contain the ORDER BY keyword . + * @returns the order + */ + readonly Order: string; + + /** + * returns the currently used sort order. + * + * The order criteria returned is part of the ORDER BY clause of the select command, but it does not contain the ORDER BY keyword . + * @returns a collection of {@link com.sun.star.sdb.OrderColumn} which form the ORDER BY. + */ + readonly OrderColumns: container.XIndexAccess; + + /** + * returns the query. + * @returns the query + */ + Query: string; + + /** + * returns the query previously set at the analyzer, with all application-level features being substituted by their database-level counterparts. + * + * The {@link XSingleSelectQueryAnalyzer} is an application-level component, which in some respect understands SQL features usually not present at the + * database level. As a prominent example, you might pass a `SELECT` statement to the analyzer which is based on another query. + * + * While all other methods will handle those additional features transparently - e.g. the query in the `FROM` part of a `SELECT` statement will be + * handled as if it really is a table -, `getQueryWithSubstitution` gives you the SQL statement where all those features have been stripped, and replaced + * with appropriate standard SQL. + * + * For example, consider a database document which contains a client-side query named `All Orders` . This query is not known to the underlying database, + * so an SQL statement like `SELECT * from "All Orders"` would be rejected by the database. However, instantiating a {@link SingleSelectQueryAnalyzer} at + * the {@link Connection} object, and passing it the above query, you can then use `getQueryWithSubstitution` to retrieve a statement where `"All + * Orders"` has been replaced with the `SELECT` statement which actually constitutes the `"All Orders"` query. + * @see Connection + * @see XQueriesSupplier + * @see DatabaseDocument + * @since OOo 2.0.4 + * @throws com::sun::star::sdbc::SQLException if the query represented cannot be completely substituted. A usual case for this is a recursion in the sub que + */ + readonly QueryWithSubstitution: string; + + /** + * sets a new query for the composer, which may be expanded by filters, group by, having and sort criteria. + * @param Command is the command which should be executed, the type of command depends on the {@link CommandType} . In case of a `CommandType` of {@link c + * @param CommandType is the type of the command. + * @see com.sun.star.sdb.CommandType + * @see com.sun.star.sdbc.RowSet.EscapeProcessing + * @see com.sun.star.sdb.CommandType + * @throws com::sun::star::sdbc::SQLException if a database access error occurs or the statement isn't a single select statement or the statement isn't vali + */ + setCommand(Command: string, CommandType: number): void; + + /** + * sets a new query for the composer, which may be expanded by filters, group by, having and sort criteria. + * @param command the single select statement to set + * @throws com::sun::star::sdbc::SQLException if a database access error occurs or the statement isn't a single select statement or the statement isn't vali + */ + setQuery(command: string): void; + + /** + * returns the currently used filter. + * + * The filter criteria is split into levels. Each level represents the OR criteria. Within each level, the filters are provided as an AND criteria with + * the name of the column and the filter condition. The filter condition is of type string. The operator used, is defined by {@link + * com.sun.star.sdb.SQLFilterOperator} . + * @returns the structured filter + */ + readonly StructuredFilter: SafeArray>; + + /** + * returns the currently used HAVING filter. + * + * The HAVING filter criteria is split into levels. Each level represents the OR criteria. Within each level, the filters are provided as an AND criteria + * with the name of the column and the filter condition. The filter condition is of type string. The operator used, is defined by {@link + * com.sun.star.sdb.SQLFilterOperator} . + * @returns the structured HAVING filter + */ + readonly StructuredHavingClause: SafeArray>; + } + + /** + * simplifies the composing of single select statements. + * + * The interface can be used for composing single SELECT statements without knowing the structure of the used query. + * @see com.sun.star.sdb.SingleSelectQueryComposer + */ + interface XSingleSelectQueryComposer extends XSingleSelectQueryAnalyzer { + /** + * appends a new filter condition by a {@link com.sun.star.sdb.DataColumn} providing the name and the value for the filter. The value property must be + * supported by the {@link com.sun.star.sdb.DataColumn} . + * @param column the column which is used to create a filter + * @param andCriteria If `TRUE` the filter condition will be appended as an AND condition, otherwise the new filter condition will be appended as OR criter + * @param filterOperator The operator used, is defined by {@link com.sun.star.sdb.SQLFilterOperator} . + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + appendFilterByColumn(column: beans.XPropertySet, andCriteria: boolean, filterOperator: number): void; + + /** + * appends an additional part to the group criteria of the select statement. The column must be a {@link com.sun.star.sdbcx.Column} . + * @param column the column which is used to create a group part + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + appendGroupByColumn(column: beans.XPropertySet): void; + + /** + * appends a new HAVING filter condition by a {@link com.sun.star.sdb.DataColumn} providing the name and the value for the filter. + * @param column the column which is used to create a filter + * @param andCriteria If `TRUE` the filter condition will be appended as an AND condition, otherwise the new filter condition will be appended as OR criter + * @param filterOperator The operator used, is defined by {@link com.sun.star.sdb.SQLFilterOperator} . + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + appendHavingClauseByColumn(column: beans.XPropertySet, andCriteria: boolean, filterOperator: number): void; + + /** + * appends an additional part to the sort order criteria of the select statement. The column must be a {@link com.sun.star.sdbcx.Column} . + * @param column the column which is used to create a order part + * @param ascending `TRUE` when the order should be ascending, otherwise if `FALSE` descending. + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + appendOrderByColumn(column: beans.XPropertySet, ascending: boolean): void; + + /** + * sets a new elementary query for the composer + * + * An elementary query or statement is a (single select) statement whose parts are not covered by the various set and get methods of the composer. That + * is, if the elementary statement contains a filter clause, a call to {@link XSingleSelectQueryAnalyzer.getFilter()} will not return you this filter. + * Instead, only filters which have been set using for instance {@link setFilter()} are covered by the get methods. + * + * The only methods which take all parts of the elementary statement into account are {@link XSingleSelectQueryAnalyzer.getQuery()} and {@link + * XSingleSelectQueryAnalyzer.getQueryWithSubstitution()} , which always returns the complete composed query. + * + * As a result, you can use the composer to build cumulative filter expressions. That is, you can set {@link ElementaryQuery} to a statement already + * containing filters, and then use {@link setFilter()} to append additional filters. + * + * The very same holds for sort orders, `HAVING` and `GROUP BY` clauses. + * + * There are various use cases for this. For instance, you might want to use the statement represented by a {@link QueryDefinition} , and extend it with + * additional filters or sort orders, while not touching the respective parts already present in QueryDefinition::Command. This can be achieved by + * setting the QueryDefinition::Command as {@link ElementaryQuery} of a {@link SingleSelectQueryComposer} . + * + * If, in such a scenario, you would be interested in the filter part of the QueryDefinition::Command, you would set it via {@link + * XSingleSelectQueryAnalyzer.setQuery()} , and retrieve the filter part via {@link XSingleSelectQueryAnalyzer.getFilter()} . + * + * If you'd be interested in the composed filter, you would set the QueryDefinition::Command as {@link ElementaryQuery} , add your filter, and propagate + * the resulting query ( {@link XSingleSelectQueryAnalyzer.getQuery()} ) to an {@link SingleSelectQueryAnalyzer} instance via {@link + * XSingleSelectQueryAnalyzer.setQuery()} . + */ + ElementaryQuery: string; + + /** + * makes it possible to set a filter condition for the query. + * @param filter the filter to set + * @throws com::sun::star::sdbc::SQLException if a database access error occurs or the statement isn't valid or the statement isn't parsable. + */ + setFilter(filter: string): void; + + /** + * makes it possible to set a group for the query. + * @param group the group part to set + * @throws com::sun::star::sdbc::SQLException if a database access error occurs or the statement isn't valid or the statement isn't parsable. + */ + setGroup(group: string): void; + + /** + * makes it possible to set a HAVING filter condition for the query. + * @param filter the filter to set + * @throws com::sun::star::sdbc::SQLException if a database access error occurs or the statement isn't valid or the statement isn't parsable. + */ + setHavingClause(filter: string): void; + + /** + * makes it possible to set a sort condition for the query. + * @param order the order part to set + * @throws com::sun::star::sdbc::SQLException if a database access error occurs or the order isn't valid or the statement isn't parsable. + */ + setOrder(order: string): void; + + /** + * appends a new set of filter criteria which is split into levels. + * @param filter The filter criteria is split into levels. Each level represents the OR criteria. Within each level, the filters are provided as an AND cri + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + setStructuredFilter(filter: LibreOffice.SeqEquiv>): void; + + /** + * appends a new set of HAVING filter criteria which is split into levels. + * @param filter The HAVING filter criteria is split into levels. Each level represents the OR criteria. Within each level, the filters are provided as an + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + setStructuredHavingClause(filter: LibreOffice.SeqEquiv>): void; + } + + /** interface for notifying potential listeners of {@link com.sun.star.sdbc.SQLException} s posted by any database object. */ + interface XSQLErrorBroadcaster extends uno.XInterface { + /** adds the specified listener to receive the event "errorOccurred" */ + addSQLErrorListener(Listener: XSQLErrorListener): void; + + /** removes the specified listener. */ + removeSQLErrorListener(Listener: XSQLErrorListener): void; + } + + /** the listener interface for receiving "errorOccured" events posted by any database object. */ + interface XSQLErrorListener extends lang.XEventListener { + /** + * invoked when a database error occurs, just before a {@link com.sun.star.sdbc.SQLException} is thrown to the application. + * @param aEvent the event which occurred + */ + errorOccured(aEvent: SQLErrorEvent): void; + } + + /** + * should be provided by a tool which simplifies the handling with SQL select statements. + * + * The interface can be used for composing SELECT statements without knowing the structure of the used query. + */ + interface XSQLQueryComposer extends uno.XInterface { + /** + * appends a new filter condition by a {@link com.sun.star.sdb.DataColumn} providing the name and the value for the filter. + * @param column the column which is used to create a filter + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + appendFilterByColumn(column: beans.XPropertySet): void; + + /** + * appends an additional part to the sort order criteria of the select statement. + * @param column the column which is used to create a order part + * @param ascending `TRUE` when the order should be ascending, otherwise `FALSE` + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + appendOrderByColumn(column: beans.XPropertySet, ascending: boolean): void; + + /** + * returns the query composed with filters and sort criteria. + * @returns the composed query + */ + readonly ComposedQuery: string; + + /** + * returns the currently used filter. + * + * The filter criteria returned is part of the where condition of the select command, but it does not contain the where token. + * @returns the filter + */ + Filter: string; + + /** + * returns the query composed with filters and sort criteria. + * @returns the composed query + */ + getComposedQuery(): string; + + /** + * returns the currently used filter. + * + * The filter criteria returned is part of the where condition of the select command, but it does not contain the where token. + * @returns the filter + */ + getFilter(): string; + + /** + * returns the currently used sort order. + * + * The order criteria returned is part of the ORDER BY clause of the select command, but it does not contain the ORDER BY keyword . + * @returns the order + */ + getOrder(): string; + + /** + * returns the query used for composing. + * @returns the query + */ + getQuery(): string; + + /** + * returns the currently used filter. + * + * The filter criteria is split into levels. Each level represents the OR criteria. Within each level, the filters are provided as an AND criteria with + * the name of the column and the filter condition. The filter condition is of type string. + * @returns the structured filter + */ + getStructuredFilter(): SafeArray>; + + /** + * returns the currently used sort order. + * + * The order criteria returned is part of the ORDER BY clause of the select command, but it does not contain the ORDER BY keyword . + * @returns the order + */ + Order: string; + + /** + * returns the query used for composing. + * @returns the query + */ + Query: string; + + /** + * makes it possible to set a filter condition for the query. + * @param filter the filter to set + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + setFilter(filter: string): void; + + /** + * makes it possible to set a sort condition for the query. + * @param order the order part to set + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + setOrder(order: string): void; + + /** + * sets a new query for the composer, which may be expanded by filters and sort criteria. + * @param command the command to set + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + setQuery(command: string): void; + + /** + * returns the currently used filter. + * + * The filter criteria is split into levels. Each level represents the OR criteria. Within each level, the filters are provided as an AND criteria with + * the name of the column and the filter condition. The filter condition is of type string. + * @returns the structured filter + */ + readonly StructuredFilter: SafeArray>; + } + + /** is a factory for instances of service {@link com.sun.star.sdb.SQLQueryComposer} . */ + interface XSQLQueryComposerFactory extends uno.XInterface { + /** + * creates a new query composer. + * @returns the {@link SQLQueryComposer} object + */ + createQueryComposer(): XSQLQueryComposer; + } + + /** + * allows operating on a sub document of an {@link OfficeDatabaseDocument} + * @since OOo 3.1 + */ + interface XSubDocument { + /** + * closes the sub document, if it had previously been opened in either mode + * @returns `TRUE` if and only if the document could be closed, `FALSE` otherwise, e.g. if the closing has been vetoed by the user. + * @throws com::sun::star::lang::WrappedTargetException if an error occurs during closing the document + */ + close(): boolean; + + /** + * opens the sub document + * + * Note that opening the document means it is displayed in an own top-level frame on the desktop. + * @returns the sub document, usually an {@link com.sun.star.frame.XModel} , or an {@link com.sun.star.frame.XController} if the sub document does not have a + * @throws com::sun::star::lang::WrappedTargetException if an error occurs during opening the document + */ + open(): lang.XComponent; + + /** + * opens the sub document in design mode + * @returns the sub document, usually an {@link com.sun.star.frame.XModel} , or an {@link com.sun.star.frame.XController} if the sub document does not have a + * @throws com::sun::star::lang::WrappedTargetException if an error occurs during opening the document + */ + openDesign(): lang.XComponent; + + /** + * stores the sub document, if it had previously been opened in either mode + * @throws com::sun::star::lang::WrappedTargetException if an error occurs during storing the document + */ + store(): void; + } + + /** @since LibreOffice 4.1 */ + interface XTextConnectionSettings extends ui.dialogs.XExecutableDialog, beans.XPropertySet { } + + namespace application { + /** + * specifies an event happening while copying table data between databases. + * + * Whenever this event is fired to an {@link XCopyTableListener} , {@link com.sun.star.lang.EventObject.Source} contains the wizard instance which + * actually does the copying. + * @see CopyTableWizard + */ + interface CopyTableRowEvent extends lang.EventObject { + /** + * denotes the error which happened while copying the data. + * + * Usually, this contains an instance of {@link com.sun.star.sdbc.SQLException} . + */ + Error: any; + + /** contains the result set which is being copied by the wizard currently. */ + SourceData: sdbc.XResultSet; + } + + /** + * describes a wizard which can be used to copy table like data from one database to another. + * + * **Interactions**: ; There are various cases where the wizard needs to interact with the user (except of course the obvious case to display and operate + * the wizard dialog itself). For those cases, an interaction handler is needed, which is used for fulfilling parameter requests. This might become + * necessary if the copy source describes a parametrized query.user interaction in case copying a row fails. If no copy table listener is registered at + * the wizard, or none of the registered listener handles an error during copying a row, or a registered listeners explicitly tells the wizard to ask the + * user how to handle the error, then the interaction handler is used together with the error (an `SQLException` , usually) that happened.displaying + * other errors which happen during copying, in particular errors in creating the target table or view.; ; ; When you do not specify an interaction + * handler by using the {@link createWithInteractionHandler()} constructor, the wizard will use the interaction handler associated with the copy target, + * i.e. the interaction handler specified when loading the document which the copy target refers to. If the copy target cannot be associated with a + * database document (e.g. because it is a mere `ConnectionResource` , or a connection not obtained from a data source), or if the copy target's database + * document cannot provide an interaction handler, a newly-created instance of an interaction handler is used.; ; ; There's one exception to the above, + * however: Upon creating the copy table wizard, the copy source and the copy target descriptors are used to create a {@link Connection} . For any + * interaction during this phase - including, for instance, necessary authentication -, the interaction handler of the respective data source is used, no + * matter what you specified in {@link createWithInteractionHandler()} . Only if there is no such interaction handler, the processing described above, to + * find another handler, is applied.; + * @see com.sun.star.sdb.ParametersRequest + * @see XCopyTableWizard.addCopyTableListener + * @see CopyTableContinuation + * @see com.sun.star.document.MediaDescriptor.InteractionHandler + * @see com.sun.star.sdb.DatabaseDocument + * @see com.sun.star.sdb.DataSource + * @see com.sun.star.sdb.DataAccessDescriptor.ConnectionResource + * @see com.sun.star.sdb.InteractionHandler + * @since OOo 2.4 + */ + interface CopyTableWizard extends XCopyTableWizard { + /** + * creates an executable wizard dialog, which is to guide the user through copying a table from one database to another. + * + * At creation time, an attempt will be made to obtain the connections described by Source resp. Dest. Failing to do so will result in an exception. + * + * If the connection has been newly created by the wizard (e.g. because the data access descriptor specified a `DataSource` instead of an + * `ActiveConnection` ), then this connection will be disposed upon disposal of the wizard. + * @param Source the {@link com.sun.star.sdb.DataAccessDescriptor} describing the data to copy. The following members of the `DataAccessDescriptor` are su + * @param Destination the {@link com.sun.star.sdb.DataAccessDescriptor} describing the target for the copy operation. Only `DataSourceName` , `DatabaseLoc + * @see com.sun.star.sdb.DataAccessDescriptor + * @throws com::sun::star::lang::IllegalArgumentException if either `Source` or `Destination` is `NULL`either `Source` or `Destination` are not sufficient t + * @throws com::sun::star::sdbc::SQLException if an error occurs during obtaining the source or destination connection. Those errors are passed unchanged to + * @throws com::sun::star::lang::WrappedTargetException if an error other than the ones mentioned above occurs while extracting the necessary information fr + */ + create(Source: beans.XPropertySet, Destination: beans.XPropertySet): void; + + /** + * creates an executable wizard dialog, which is to guide the user through copying a table from one database to another. + * + * The only difference to the {@link create()} constructor is that `createWithInteractionHandler` takes an additional argument, which can be used to + * intercept interactions (such as error messages) during the wizard run. + * @param Source the {@link com.sun.star.sdb.DataAccessDescriptor} describing the target for the copy operation. + * @param Destination the {@link com.sun.star.sdb.DataAccessDescriptor} describing the target for the copy operation. + * @param InteractionHandler specifies an interaction handler to use when user input is required. When specifying this parameter, you should use an implem + * @see com.sun.star.sdb.InteractionHandler + */ + createWithInteractionHandler(Source: beans.XPropertySet, Destination: beans.XPropertySet, InteractionHandler: task.XInteractionHandler): void; + } + + /** is the default controller implementation for OpenOffice.org's database application. */ + interface DefaultViewController extends frame.Controller, ui.XContextMenuInterception, awt.XUserInputInterception, view.XSelectionSupplier, frame.XTitle, + frame.XTitleChangeBroadcaster, XDatabaseDocumentUI { } + + /** @since LibreOffice 4.1 */ + interface MacroMigrationWizard extends ui.dialogs.XExecutableDialog { + createWithDocument(Document: XOfficeDatabaseDocument): void; + } + + /** + * denotes a named database object, or a named folder of database objects + * @since OOo 3.0 + */ + interface NamedDatabaseObject { + /** + * denotes the name of the object + * + * In case of forms, reports, form folders and report folders, this is the hierarchical path to the object, where the path elements are separated by a + * slash ( `/` ). + * + * In case of tables, this is the fully qualified name of the table, as required by the database's table name composition rules. + * + * In case of queries, this is the name of the query. + * + * In case of virtual folders denoted by {@link DatabaseObjectContainer.CATALOG} and {@link DatabaseObjectContainer.SCHEMA} , it is `` , if the + * database supports schemas only`` , if the database supports catalogs only`.` , if the database supports both catalogs and + * schemas, and catalogs are to appear at the beginning of an identifier.`.` , if the database supports both catalogs and schemas, and + * catalogs are to appear at the end of an identifier. + * + * In case of the virtual folders denoted by {@link DatabaseObjectContainer.TABLES} , {@link DatabaseObjectContainer.QUERIES} , {@link + * DatabaseObjectContainer.DATA_SOURCE} , {@link DatabaseObjectContainer.FORMS} or {@link DatabaseObjectContainer.REPORTS} , this denotes the name of the + * data source (as denoted by {@link com.sun.star.sdb.DataSource.Name} ) + * @see XDatabaseMetaData.isCatalogAtStart + * @see DatabaseObjectContainer + */ + Name: string; + + /** + * denotes the type of the object. + * + * This member is one of the {@link DatabaseObject} or {@link DatabaseObjectContainer} constants. + */ + Type: number; + } + + /** + * specifies the interface required to listen for progress in copying table rows via a `CopyTableWizard` . + * @see CopyTableRowEvent + * @see CopyTableWizard + */ + interface XCopyTableListener extends lang.XEventListener { + /** + * is called when a row was successfully copied. + * + * This method is called right after a row has been successfully copied. It might be used, for instance, to update a progress indicator. + * @param Event describes the current state of the copy operation. {@link CopyTableRowEvent.SourceData} is positioned at the row which was just copied to t + */ + copiedRow(Event: CopyTableRowEvent): void; + + /** + * is called when a row is about to be copied. + * + * This method is called immediately before a row is copied. It might be used, for instance, to update a progress indicator. + * @param Event describes the current state of the copy operation. {@link CopyTableRowEvent.SourceData} is positioned at the row which is about to be copied. + */ + copyingRow(Event: CopyTableRowEvent): void; + + /** + * is called when copying a row failed. + * @param Event describes the current state of the copy operation. {@link CopyTableRowEvent.SourceData} is positioned at the row which was attempted to be + * @returns how to continue with copying. Must be one of the {@link CopyTableContinuation} constants. + */ + copyRowError(Event: CopyTableRowEvent): number; + } + + /** + * describes a wizard which can be used to copy table like data from one database to another. + * + * Copying table data between databases can be a complex task. Especially when it comes to matching field types in the source and in the target database, + * some heuristics, and sometimes support from the user doing the operation, are required. + * + * The `copy table wizard` described by this interfaces cares for those, and other, settings. + * @since OOo 2.4 + */ + interface XCopyTableWizard extends ui.dialogs.XExecutableDialog { + /** adds a listener which is to be notified of progress in the copy operation */ + addCopyTableListener(Listener: XCopyTableListener): void; + + /** + * specifies that a new primary key is to be created in the target database + * + * At initialization time, you can specify the initial settings for the primary key in the UI. + * + * You cannot use this attribute to determine the primary key, possibly created by the wizard, after it finished. The reason is that during the wizard + * run, the user can define an arbitrarily complex primary key, e.g. including multiple columns, which cannot be represented in this simple attribute + * anymore. + * + * This attribute is ignored if {@link Operation} is {@link CopyTableOperation.AppendData} . + * + * Changing this attribute while the dialog is running is not supported, the result of such an attempt is undefined. + * + * When a primary key is to be created by the wizard, it will be an auto-increment column, if possible. + * @throws com::sun::star::lang::IllegalArgumentException if the target database does not support primary keys + */ + CreatePrimaryKey: com.sun.star.beans.Optional; + + /** + * specifies the name of the table in the destination database. + * + * At initialization time, you can use this attribute to control the initial table name as suggested to the user. + * + * After the wizard has finished, you can use this attribute to determine what table was actually created resp. to which existing table the source + * table's data was appended. + * + * Changing this attribute while the dialog is running is not supported, the result of such an attempt is undefined. + */ + DestinationTableName: string; + + /** + * specifies the basic operation for the wizard to execute. + * + * This must be one of the {@link CopyTableOperation} constants. + * + * At initialization time, you can use this attribute to control the initial operation in the wizard. + * + * After the wizard has finished, you can use this attribute to determine what operation was actually executed. + * + * Changing this attribute while the dialog is running is not supported, the result of such an attempt is undefined. + * @throws IllegalArgumentException if you attempt to set an invalid operation, or if the given operation is not supported by the target database type, e.g. + */ + Operation: number; + + /** removes a listener */ + removeCopyTableListener(Listener: XCopyTableListener): void; + + /** + * specifies that the first row should be used to identify column names. + * + * This attribute is ignored when the source defines the column names which isn't the case when only a part of a table should be copied e.g. in the RTF + * format or in the HTML format. + */ + UseHeaderLineAsColumnNames: boolean; + } + + /** + * provides access to the user interface of a database document + * + * This interface is available when a database document has been loaded into a frame, at the controller of this frame. + * @see com.sun.star.frame.Controller + * @see com.sun.star.sdb.DatabaseDocument + * @since OOo 2.2 + */ + interface XDatabaseDocumentUI { + /** + * provides access to the current connection of the application + * + * Note that the connection returned here is really the working connection of the application. Clients should not misuse it, in particular, closing the + * connection can yield unexpected results and should definitely be avoided. If you need a separate connection to the data source, use {@link + * com.sun.star.sdbc.XDataSource.getConnection()} . + */ + ActiveConnection: sdbc.XConnection; + + /** + * provides access to the application's main window + * + * Note that reading this attribute is equivalent to querying the component for the {@link com.sun.star.frame.XController} interface, asking the + * controller for its frame, and asking this frame for its container window. + * @see com.sun.star.frame.XController + * @see com.sun.star.frame.XFrame + */ + ApplicationMainWindow: awt.XWindow; + + /** + * closes all sub components of the database document. + * + * During working with the database, the user might open different sub components: forms, reports, tables, queries. If you need to close all those + * documents, use `closeSubComponents` , which will gracefully do this. + * + * In a first step, the sub components will be suspended ( {@link com.sun.star.frame.XController.suspend()} ). There are basically two reasons why + * suspending a single sub component can fail: The user might veto it (she's asked if the document is currently modified), and the component might be + * uncloseable currently, e.g. due to an open modal dialog, or a long-lasting operation running currently (e.g. printing). + * + * Once all sub components have been suspended, they will, in a second step, be closed. Again, closing might be vetoed by other instances, e.g. by a + * close listener registered at the component. + * @returns `TRUE` if and only if both suspending and closing all sub components succeeds. + * @since OOo 3.0 + */ + closeSubComponents(): boolean; + + /** + * lets the application connect to the database + * + * If the application is already connected, nothing happens. If it is not connected, the application will try to establish a connection by using {@link + * com.sun.star.sdbc.XDataSource.getConnection()} with the current settings, as specified in the {@link com.sun.star.sdb.DataSource.Settings} member. + * + * If the connection cannot be established, the respective error message is shown in the application window. + * @throws com::sun::star::sdbc::SQLException if the connection cannot be established + */ + connect(): void; + + /** + * creates a new sub component of the given type + * @param ObjectType specifies the type of the object, must be one of the {@link DatabaseObject} constants. + * @param DocumentDefinition Upon successful return, and if and only if ObjectType equals {@link DatabaseObject.FORM} or {@link DatabaseObject.REPORT} , th + */ + createComponent(ObjectType: number, DocumentDefinition: [lang.XComponent]): lang.XComponent; + + /** + * creates a new sub component of the given type + * + * In opposite to {@link createComponent()} , this method allows you to specify additional arguments which are passed to the to-be-loaded component. + * @param ObjectType specifies the type of the object, must be one of the {@link DatabaseObject} constants. + * @param Arguments The meaning of the arguments is defined at the service which is effectively created. See the [above table]{@link url="#component_types" + * @param DocumentDefinition Upon successful return, and if and only if ObjectType equals {@link DatabaseObject.FORM} or {@link DatabaseObject.REPORT} , th + */ + createComponentWithArguments(ObjectType: number, Arguments: LibreOffice.SeqEquiv, DocumentDefinition: [lang.XComponent]): lang.XComponent; + + /** provides access to the data source belong to the database document */ + DataSource: sdbc.XDataSource; + + /** + * identifies the given sub component + * @param SubComponent the component to identify. Must be one of the components in {@link SubComponents} . + * @returns a record describing the sub component. The first element of the returned pair is the type of the component, denoted by one of the {@link Database + * @throws com::sun::star::lang::IllegalArgumentException if the given component is not one of the controller's sub components + */ + identifySubComponent(SubComponent: lang.XComponent): com.sun.star.beans.Pair; + + /** determines whether the application is currently connected to the database */ + isConnected(): boolean; + + /** + * loads the given sub component of the database document + * + * This method allows programmatic access to the functionality which is present in the UI: it allows opening a table, query, form, or report for either + * editing or viewing. + * + * This method is a convenience wrapper for API which is also available otherwise. For instance, for loading forms and reports, you could use the {@link + * com.sun.star.frame.XComponentLoader} interface of the {@link com.sun.star.sdb.Forms} resp. {@link com.sun.star.sdb.Reports} collections. + * + * Note there must exist a connection to the database before you can call this method. + * + * If an error occurs opening the given object, then this is reported to the user via an error dialog. + * @param ObjectType specifies the type of the object, must be one of the {@link DatabaseObject} constants. + * @param ObjectName specifies the name of the object. In case hierarchical objects are supported (as is the case form forms and reports), hierarchical nam + * @param ForEditing specifies whether the object should be opened for editing ( `TRUE` ) or viewing ( `FALSE` ). For the different object types, this mea + * @returns the component which has been loaded. This is either an {@link com.sun.star.frame.XModel} , or an {@link com.sun.star.frame.XController} if the co + * @see isConnected + * @see connect + * @throws com::sun::star::lang::IllegalArgumentException if ObjectType denotes an invalid object type + * @throws com::sun::star::container::NoSuchElementException if an object with the given name and of the given type does not exist + * @throws com::sun::star::sdbc::SQLException if there is no connection to the database at the time the method is called. + */ + loadComponent(ObjectType: number, ObjectName: string, ForEditing: boolean): lang.XComponent; + + /** + * loads the given sub component of the database document + * + * In opposite to {@link loadComponent()} , this method allows you to specify additional arguments which are passed to the to-be-loaded component. + * + * The meaning of the arguments is defined at the service which is effectively created. See the [above table]{@link url="#component_types"} for a list of + * those services. + */ + loadComponentWithArguments(ObjectType: number, ObjectName: string, ForEditing: boolean, Arguments: LibreOffice.SeqEquiv): lang.XComponent; + + /** + * contains all sub components of the database document + * + * During working with the database, the user might open different sub components: forms, reports, tables, queries. Those components are tracked by the + * application, and provided in this attribute. + * + * The components here might either be documents ( {@link com.sun.star.frame.XModel} ), controllers ( {@link com.sun.star.frame.XController} ), or frames + * ( {@link com.sun.star.frame.XFrame} ). + * @since OOo 3.0 + */ + SubComponents: SafeArray; + } + + /** + * is used by the database application to obtain non-default user interface information and/or components for database tables. + * @see com.sun.star.sdb.Connection + * @since OOo 2.2 + */ + interface XTableUIProvider { + /** + * returns a component which can be used to edit the definition of an existing table. + * @param DocumentUI provides access to the UI in which the database document is currently displayed. ; In particular, this parameter provides access to t + * @param TableName denotes the fully qualified name of an existing table. + * @returns a component which can be used to edit the definition of an existing table, or `NULL` if the default component should be used. ; Two component ty + * @throws com::sun::star::lang::IllegalArgumentException if the given TableName does not denote an existing table + * @throws com::sun::star::lang::WrappedTargetException if an error occurs while creating the table editor component. + */ + getTableEditor(DocumentUI: XDatabaseDocumentUI, TableName: string): uno.XInterface; + + /** + * provides the icon which should be used to represent the table in the database application window. + * + * The icon will usually be requested once per table, and cached. It might be requested again if the application settings change, for instance, if + * another desktop theme has been activated. + * @param TableName denotes the fully qualified name of the database table. + * @param ColorMode denotes the color mode of the graphic to retrieve, being one of the {@link com.sun.star.graphic.GraphicColorMode} constants. + * @returns the icon which should be used to represent the table in the database application window, or `NULL` if the default icon should be used. + */ + getTableIcon(TableName: string, ColorMode: number): graphic.XGraphic; + } + + namespace CopyTableContinuation { + const enum Constants { + AskUser = 3, + CallNextHandler = 1, + Cancel = 2, + Proceed = 0, + } + } + + namespace CopyTableOperation { + const enum Constants { + AppendData = 3, + CopyDefinitionAndData = 0, + CopyDefinitionOnly = 1, + CreateAsView = 2, + } + } + + namespace DatabaseObject { + const enum Constants { + FORM = 2, + REPORT = 3, + } + } + + namespace DatabaseObjectContainer { + const enum Constants { + CATALOG = 1005, + DATA_SOURCE = 1004, + FORMS = 1002, + FORMS_FOLDER = 1007, + QUERIES = 1001, + REPORTS = 1003, + REPORTS_FOLDER = 1008, + SCHEMA = 1006, + TABLES = 1000, + } + } + } + + namespace BooleanComparisonMode { + const enum Constants { + ACCESS_COMPAT = 3, + EQUAL_INTEGER = 0, + EQUAL_LITERAL = 2, + IS_LITERAL = 1, + } + } + + namespace CommandType { + const enum Constants { + COMMAND = 2, + QUERY = 1, + TABLE = 0, + } + } + + namespace ErrorCondition { + const enum Constants { + AB_ADDRESSBOOK_NOT_FOUND = 500, + DATA_CANNOT_SELECT_UNFILTERED = 550, + DB_INVALID_SQL_NAME = 301, + DB_NOT_CONNECTED = 304, + DB_OBJECT_NAME_IS_USED = 303, + DB_OBJECT_NAME_WITH_SLASHES = 300, + DB_QUERY_NAME_WITH_QUOTES = 302, + PARSER_CYCLIC_SUB_QUERIES = 200, + ROW_SET_OPERATION_VETOED = 100, + } + } + + namespace RowChangeAction { + const enum Constants { + DELETE = 3, + INSERT = 1, + UPDATE = 2, + } + } + + namespace SQLFilterOperator { + const enum Constants { + EQUAL = 1, + GREATER = 4, + GREATER_EQUAL = 6, + LESS = 3, + LESS_EQUAL = 5, + LIKE = 7, + NOT_EQUAL = 2, + NOT_LIKE = 8, + NOT_SQLNULL = 10, + SQLNULL = 9, + } + } + + namespace tools { + /** @since LibreOffice 4.1 */ + interface ConnectionTools extends XConnectionTools { + createWithConnection(Connection: sdbc.XConnection): void; + } + + /** + * allows to access the active connection + * @see com.sun.star.sdbcx.XConnection + * @since OOo 3.3 + */ + interface XConnectionSupplier extends lang.XInitialization { + /** returns the source connection. */ + ActiveConnection: sdbc.XConnection; + } + + /** + * encapsulates various useful functionality around a {@link com.sun.star.sdb.Connection} + * + * Most of the functionality provided here is meaningful only relative to a given database connection. For instance, for quoting table names, you need + * the meta data instance of the connection. Thus, the entry point for obtaining a {@link XConnectionTools} instance is the {@link + * com.sun.star.sdb.Connection} service. + * + * Note that nearly all functionality provided by this interface is also available by other means, it's only provided here for convenience purposes. + * @since OOo 2.0.4 + */ + interface XConnectionTools { + /** + * creates an instance supporting the {@link XTableName} interface, which can be used to manipulate table names for various purposes. + * + * The returned object is guaranteed to not be `NULL` . + */ + createTableName(): XTableName; + + /** provides access to the application-level data source meta data */ + readonly DataSourceMetaData: XDataSourceMetaData; + + /** + * get the composer initialized with a command and command type. + * @param commandType the type of the object + * @param command the object. This may be a table name, a query name, or an SQL statement, depending on the value of _nCommandType + * @returns the composer filled with command and command type. + */ + getComposer(commandType: number, command: string): XSingleSelectQueryComposer; + + /** provides access to the application-level data source meta data */ + getDataSourceMetaData(): XDataSourceMetaData; + + /** + * get fields for a result set given by a "command descriptor" + * + * A command descriptor here means: a SDB-level connection ( {@link com.sun.star.sdb.Connection}a string specifying the name of an object relative to the + * connectiona {@link com.sun.star.sdb.CommandType} value specifying the type of the object + * @param commandType the type of the object + * @param command the object. This may be a table name, a query name, or an SQL statement, depending on the value of _nCommandType + * @param keepFieldsAlive If (and only if) {@link CommandType} is {@link CommandType.COMMAND} , the fields collection which is returned by this function he + * @returns the container of the columns (aka fields) of the object + */ + getFieldsByCommandDescriptor(commandType: number, command: string, keepFieldsAlive: [lang.XComponent]): container.XNameAccess; + + /** + * returns an instance supporting the {@link XObjectNames} interface, which provides access to functionality around table and query names. + * + * The returned object is guaranteed to not be `NULL` . + */ + getObjectNames(): XObjectNames; + + /** + * returns an instance supporting the {@link XObjectNames} interface, which provides access to functionality around table and query names. + * + * The returned object is guaranteed to not be `NULL` . + */ + readonly ObjectNames: XObjectNames; + } + + interface XDataSourceMetaData { + /** determines whether the data source supports queries in the `FROM` part of a `SELECT` statement. */ + supportsQueriesInFrom(): boolean; + } + + /** + * allows to alter the indexes of a table. + * @see com.sun.star.sdb.DataSource.Settings + * @see com.sun.star.sdbcx.XAppend + * @see com.sun.star.sdbcx.XDrop + * @since OOo 3.3 + */ + interface XIndexAlteration extends XConnectionSupplier { + /** + * creates a new object using the given descriptor and appends it to the related container. ** Note: ** The descriptor will not be changed and can be + * used again to append another object. + * @param table the table to be altered + * @param descriptor the descriptor which should be serve to append a new object + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + addIndex(table: beans.XPropertySet, descriptor: beans.XPropertySet): void; + + /** + * drops an object of the related container identified by its name. + * @param table the table to be altered + * @param index the name of the column to be dropped + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + dropIndex(table: beans.XPropertySet, index: string): void; + } + + /** + * allows to alter the keys of a table. + * @see com.sun.star.sdb.DataSource.Settings + * @see com.sun.star.sdbcx.XAppend + * @see com.sun.star.sdbcx.XDrop + * @since OOo 3.3 + */ + interface XKeyAlteration extends XConnectionSupplier { + /** + * creates a new object using the given descriptor and appends it to the related container. ** Note: ** The descriptor will not be changed and can be + * used again to append another object. + * @param table the table to be altered + * @param descriptor the descriptor which should be serve to append a new object + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + addKey(table: beans.XPropertySet, descriptor: beans.XPropertySet): void; + + /** + * drops an object of the related container identified by its name. + * @param table the table to be altered + * @param key the key to be dropped + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + dropKey(table: beans.XPropertySet, key: beans.XPropertySet): void; + } + + /** + * encapsulates functionality which you might find useful when writing a database application which deals with query and table names. + * + * The most important task fulfilled by this instance is that it hides different naming restrictions from you, which are caused by server-side or client + * side specialties. + * + * For instance, it can validate names against the characters allowed in the object names of a connection. Also, it relieves you from caring whether a + * database supports queries in a `SELECT` statement's `FROM` part (known as "queries in queries"). In such databases, query and table names share a + * common namespace, thus they must be unique. Using this interface, you can easily ensure this uniqueness. + * + * All of the functionality present in this interface depends on a connection, thus it entry point for obtaining it is a {@link + * com.sun.star.sdb.Connection} service. + * + * The component itself does not have life-time control mechanisms, i.e. you cannot explicitly dispose it ( {@link + * com.sun.star.lang.XComponent.dispose()} ), and you cannot be notified when it dies. ; However, if your try to access any of its methods or + * attributes, after the connection which was used to create it was closed, a {@link com.sun.star.lang.DisposedException} will be thrown. + * @see XConnectionTools + * @since OOo 2.0.4 + */ + interface XObjectNames { + /** + * checks whether a given name is allowed for a to-be-created table or query in the database. + * + * This method basically does the same checks as {@link isNameUsed()} and {@link isNameValid()} . In case the given name is not allowed, it throws an + * exception. This error can be presented to the user, to give it a common experience in all cases where he's required to enter an object name. + * @see isNameUsed + * @see isNameValid + * @see com.sun.star.sdb.ErrorMessageDialog + * @see com.sun.star.sdb.InteractionHandler + */ + checkNameForCreate(CommandType: number, Name: string): void; + + /** + * converts the given object name to a name which is valid in the database. + * + * The conversion takes place by converting every character which is neither allowed by the SQL-92 standard, nor part of the special characters supported + * by the database, with an underscore character (_). + * @see com.sun.star.sdbc.XDatabaseMetaData.getExtraNameCharacters + */ + convertToSQLName(Name: string): string; + + /** + * checks whether a given name is used as table respectively query name in the database. + * + * If in the database, tables and queries share a common namespace, this will be respected by this function. + * + * As before, the information you obtain by calling this method might be obsolete in the very moment you evaluate this, in case another process or thread + * interferes. However, it's usually sufficiently up-to-date for purpose of using it in a database application driven by user interactions. + * @param CommandType specifies the {@link com.sun.star.sdb.CommandType} of the object whose name should be checked. Must be either {@link com.sun.star.sdb + * @param Name specifies the to-be-checked name of the object. + * @returns `TRUE` if and only if the given name is legitimate as table respectively query name to be used in the database. + * @see checkNameIsUsed + * @throws com::sun::star::lang::IllegalArgumentException if {@link CommandType} specifies an invalid command type. + */ + isNameUsed(CommandType: number, Name: string): boolean; + + /** + * checks whether a given name is valid as table or query name + * + * For tables, the name must consist of characters allowed by the SQL-92 standard, plus characters allowed by the connection as extra name characters. + * + * For queries, names are nearly arbitrary, except that usual quoting characters must not be part of the name. + * @see com.sun.star.sdbc.XDatabaseMetaData.getExtraNameCharacters + */ + isNameValid(CommandType: number, Name: string): boolean; + + /** + * suggests a (unique) table or query name + * + * If in the database, tables and queries share a common namespace, this will be respected by this function. + * + * Note that in an multi-threaded environment, the name you obtain here is not absolutely guaranteed to be unique. It is unique at the very moment the + * function returns to you. But already when you evaluate the returned value, it might not be unique anymore, if another process or thread created a + * query or table with this name. + * + * This implies that you cannot rely on the name's uniqueness, but you can use it as first guess to present to the user. In most cases, it will still be + * sufficient when you are actually creating the table respectively query. + * @param CommandType specifies the {@link com.sun.star.sdb.CommandType} of the object for which a unique name is to be generated. Must be either {@link co + * @param BaseName specifies the base of the to-be-created object name. If empty, a default base name will be used. + * @throws com::sun::star::lang::IllegalArgumentException if {@link CommandType} specifies an invalid command type. + */ + suggestName(CommandType: number, BaseName: string): string; + } + + /** + * allows to alter a table. + * @see com.sun.star.sdb.DataSource.Settings + * @see com.sun.star.sdbcx.ColumnDescriptor + * @see com.sun.star.sdbcx.XAlterTable + * @see com.sun.star.sdbcx.XAppend + * @see com.sun.star.sdbcx.XDrop + * @since OOo 3.3 + */ + interface XTableAlteration extends XConnectionSupplier { + /** + * creates a new object using the given descriptor and appends it to the related container. ** Note: ** The descriptor will not be changed and can be + * used again to append another object. + * @param table the table to be altered + * @param descriptor the descriptor which should be serve to append a new object + * @see com.sun.star.sdbcx.XAppend + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + addColumn(table: beans.XPropertySet, descriptor: beans.XPropertySet): void; + + /** + * alter the column defined by name + * @param table the table to be altered + * @param columnName the name of the column to be changed + * @param columnDescriptor the column descriptor with the information of the new column definition + * @see com.sun.star.sdbcx.XAlterTable + * @throws com::sun::star::sdbc::SQLException + */ + alterColumnByName(table: beans.XPropertySet, columnName: string, columnDescriptor: beans.XPropertySet): void; + + /** + * drops an object of the related container identified by its name. + * @param table the table to be altered + * @param columnName the name of the column to be dropped + * @see com.sun.star.sdbcx.XDrop + * @throws com::sun::star::sdbc::SQLException if a database access error occurs. + */ + dropColumn(table: beans.XPropertySet, columnName: string): void; + } + + /** + * allows to manipulate table names. + * + * When, in a database application, dealing with table names, there's many degrees of freedom to deal with. For instance, suppose you want to have the + * full name of a table object, as it should be used in a `SELECT` statement's `FROM` part. This requires you to evaluate whether or not the table has a + * catalog and/or schema name, to combine the catalog, the schema, and the basic table name into one name, respecting the database's quoting character, + * and the order in which all those parts should be combined. Additionally, you have to respect the client-side settings which tell OpenOffice.org to use + * or not use catalogs and schemas in `SELECT` at all. + * + * The {@link XTableName} interface eases this and other, similar tasks around table names. + * + * The component itself does not have life-time control mechanisms, i.e. you cannot explicitly dispose it ( {@link + * com.sun.star.lang.XComponent.dispose()} ), and you cannot be notified when it dies. ; However, if your try to access any of its methods or + * attributes, after the connection which was used to create it was closed, a {@link com.sun.star.lang.DisposedException} will be thrown. + * @see XConnectionTools + * @see com.sun.star.sdbc.XDatabaseMetaData + * @see com.sun.star.sdb.DataSource.Settings + * @since OOo 2.0.4 + */ + interface XTableName { + /** denotes the name of the catalog which the table is a part of */ + CatalogName: string; + + /** + * returns the composed table name, including the catalog and schema name, respecting the database's quoting requirements, plus + * @param Type the type of name composition to be used. + * @param Quote specifies whether the single parts of the table name should be quoted + * @see CompositionType + * @throws com::sun::star::IllegalArgumentException if the given Type does not denote a valid {@link CompositionType} + */ + getComposedName(Type: number, Quote: boolean): string; + + /** + * represents the table name in a form to be used in a `SELECT` statement. + * + * On a per-data-source basis, OpenOffice.org allows to override database meta data information in that you can specify to not use catalog and or schema + * names in `SELECT` statements. Using this attribute, you can generate a table name which respects those settings. + * @see com.sun.star.sdb.DataSource.Settings + */ + NameForSelect: string; + + /** denotes the name of the schema which the table is a part of */ + SchemaName: string; + + /** + * sets a new composed table name + * @param ComposedName specifies the composed table name + * @param Type specifies the composition type which was used to create the composed table name + */ + setComposedName(ComposedName: string, Type: number): void; + + /** + * is the {@link com.sun.star.sdb.Table} object specified by the current name. + * + * Retrieving this attribute is equivalent to obtaining the tables container from the connection (via {@link com.sun.star.sdbcx.XTablesSupplier} ), and + * calling its {@link com.sun.star.container.XNameAccess.getByName()} method with the ComposedName. + * @throws com::sun::star::container::NoSuchElementException if, upon getting the attribute value, the current composed table name represented by this insta + * @throws com::sun::star::lang::IllegalArgumentException if you try to set an object which does not denote a table from the underlying database. + */ + Table: beans.XPropertySet; + + /** denotes the mere, unqualified table name, excluding any catalog and schema. */ + TableName: string; + } + + /** + * allows to rename table. + * @see com.sun.star.sdb.DataSource.Settings + * @since OOo 3.3 + */ + interface XTableRename extends XConnectionSupplier { + /** + * rename the given table to the new name + * @param table the table to be renamed + * @param newName the new name of the table + * @throws com::sun::star::sdbc::SQLException + */ + rename(table: beans.XPropertySet, newName: string): void; + } + + /** + * allows to fetch and to change the sql statements of views + * @see com.sun.star.sdb.DataSource.Settings + * @see com.sun.star.sdbcx.View + * @since OOo 3.3 + */ + interface XViewAccess extends XConnectionSupplier { + /** + * allows to alter the SQL statement of a view + * @param view the view to be altered + * @param command the new SQL statement + * @throws com::sun::star::sdbc::SQLException + */ + alterCommand(view: beans.XPropertySet, command: string): void; + + /** + * returns the SQL statement of the view + * @param view the table to be renamed + * @throws com::sun::star::sdbc::SQLException + */ + getCommand(view: beans.XPropertySet): string; + } + + namespace CompositionType { + const enum Constants { + Complete = 5, + ForDataManipulation = 2, + ForIndexDefinitions = 1, + ForPrivilegeDefinitions = 4, + ForProcedureCalls = 3, + ForTableDefinitions = 0, + } + } + } + } + + namespace sdbc { + /** + * is the basic service for pooling SDBC connections. + * + * When the method {@link com.sun.star.sdbc.XPooledConnection.getConnection()} is called, the {@link ConnectionPool} will attempt to locate a suitable + * pooled connection or create a new connection from the {@link DriverManager} . When the connection will be released it will move to the pool of unused + * connections. + * @see com.sun.star.sdbc.XDriver + * @see com.sun.star.sdbc.XConnection + */ + type ConnectionPool = XConnectionPool; + + /** + * is the service that every driver class must implement. + * + * Each driver should supply a service that implements the {@link Driver} interface. + * + * The {@link DriverManager} will try to load as many drivers as it can find and then for any given connection request, it will ask each driver in turn + * to try to connect to the target URL. + * + * It is strongly recommended that each {@link Driver} object should be small and standalone so that the {@link Driver} object can be loaded and queried + * without bringing in vast quantities of supporting code. + * + * Each driver should be a one instance service. + * @see com.sun.star.sdbc.XDriverManager + * @see com.sun.star.sdbc.XConnection + */ + type Driver = XDriver; + + type DriverManager = XDriverManager2; + + /** + * is an exception that provides information on database access warnings. Warnings are silently chained to the object whose method caused it to be + * reported. + * @see XConnection.getWarnings + * @see XResultSet.getWarnings + * @see XStatement.getWarnings + */ + type SQLWarning = SQLException; + + /** + * is thrown when an error occurs during a batch update operation. + * + * In addition to the information provided by {@link com.sun.star.sdbc.SQLException} , a `BatchUpdateException` provides the update counts for all + * commands that were executed successfully during the batch update, that is, all commands that were executed before the error occurred. The order of + * elements in an array of update counts corresponds to the order in which commands were added to the batch. + */ + interface BatchUpdateException extends SQLException { + /** is an array of `long` , with each element indicating the update count for a SQL command that executed successfully before the exception was thrown. */ + UpdateCounts: SafeArray; + } + + /** + * is used to execute SQL stored procedures. + * + * SDBC provides a stored procedure SQL escape that allows stored procedures to be called in a standard way for all RDBMSs. This escape syntax has one + * form that includes a result parameter and one that does not. If used, the result parameter must be registered as an OUT parameter. The other + * parameters can be used for input, output, or both. Parameters are referred to sequentially, by number. The first parameter is 1. + * + * `{?=call<procedure-name>[<arg1>,<arg2>,...]}; {call<procedure-name>[<arg1>,<arg2>,...]} ` + * + * IN parameter values are set using the set methods inherited from {@link com.sun.star.sdbc.PreparedStatement} . The type of all OUT parameters must be + * registered prior to executing the stored procedure; their values are retrieved after execution via the `get` methods provided by the {@link + * com.sun.star.sdbc.XRow} . + * + * A `CallableStatement` can return one {@link com.sun.star.sdbc.XResultSet} or multiple {@link com.sun.star.sdbc.ResultSet} objects. Multiple + * `ResultSet` objects are handled using operations inherited from {@link com.sun.star.sdbc.XPreparedStatement} . + * + * For maximum portability, a call's {@link com.sun.star.sdbc.ResultSet} objects and update counts should be processed prior to getting the values of + * output parameters. + */ + interface CallableStatement extends PreparedStatement, XRow, XOutParameters { } + + /** @deprecated Deprecatedindicates the type of change action on the data source. */ + interface ChangeEvent extends lang.EventObject { + /** + * indicates the type of change. + * @see com.sun.star.sdbc.ChangeAction + */ + Action: number; + + /** indicates the number of rows affected by the change. */ + Rows: number; + } + + /** + * represents a connection (session) with a specific database. Within the context of a {@link Connection} , SQL statements are executed and results are + * returned. + * + * A {@link Connection} 's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, and the + * capabilities of this connection. This information is obtained with the {@link com.sun.star.sdbc.XConnection.getMetaData()} method. + * + * ** Note: ** By default the {@link Connection} automatically commits changes after executing each statement. If auto commit has been disabled, an + * explicit commit must be done or database changes will not be saved. + * @see com.sun.star.sdbc.XStatement + * @see com.sun.star.sdbc.XResultSet + * @see com.sun.star.sdbc.XDatabaseMetaData + */ + interface Connection extends lang.XComponent, XConnection, XWarningsSupplier { } + + /** + * represents the properties for a connection (session) with a specific database. These properties can be used when calling the method {@link + * com.sun.star.sdbc.XDriver.connect()} or {@link com.sun.star.sdbc.XDriverManager.getConnectionWithInfo()} . + * + * The properties for a connection contain additional information about how to connect to a database and how to control the behavior of the resulting + * connection should be. + * @see com.sun.star.sdbc.XDriver + * @see com.sun.star.sdbc.XDriverManager + * @see com.sun.star.sdbc.JDBCConnectionProperties + * @see com.sun.star.sdbc.ODBCConnectionProperties + * @see com.sun.star.sdbc.FILEConnectionProperties + * @see com.sun.star.sdbc.DBASEConnectionProperties + * @see com.sun.star.sdbc.FLATConnectionProperties + */ + interface ConnectionProperties { + /** the password */ + password: string; + + /** the username */ + user: string; + } + + /** + * reports a {@link DataTruncation} warning, on reads, or is thrown as a {@link DataTruncation} exception, on writes, when a data value is unexpectedly + * truncated. + * + * The SQL state for a `DataTruncation` is `01004` . + */ + interface DataTruncation extends SQLWarning { + /** + * contains the number of bytes of data that should have been transferred. This number may be approximate if data conversions were being performed. The + * value may be `-1` if the size is unknown. + */ + DataSize: number; + + /** is `TRUE` if a read was truncated. */ + DuringRead: boolean; + + /** is the index of the parameter or column value. */ + Index: number; + + /** is `TRUE` if a parameter value is truncated. */ + IsParameter: boolean; + + /** contains the number of bytes of data actually transferred. The value may be `-1` if the size is unknown. */ + TransferSize: number; + } + + /** + * represents the properties for a dBase connection (session) with a specific database. These properties can be used when calling the method {@link + * com.sun.star.sdbc.XDriver.connect()} or {@link com.sun.star.sdbc.XDriverManager.getConnectionWithInfo()} . + * + * The properties for a connection contain additional information about how to connect to a database and how to control the behavior of the resulting + * connection should be. + * @see com.sun.star.sdbc.XDriver + * @see com.sun.star.sdbc.XDriverManager + * @see com.sun.star.sdbc.FILEConnectionProperties + */ + interface DBASEConnectionProperties extends FILEConnectionProperties { + /** `TRUE` when deleted rows should be shown, otherwise `FALSE` */ + ShowDeleted: boolean; + } + + /** + * describes the driver properties for making a connection. + * + * The {@link DriverPropertyInfo} is of interest only to advanced programmers who need to interact with a driver to discover and supply properties for + * connections. + */ + interface DriverPropertyInfo { + /** + * contains a sequence of possible values if the value for the field `DriverPropertyInfo.value` may be selected from a particular set of values; + * otherwise empty. + */ + Choices: SafeArray; + + /** is a brief description of the property, which may be null. */ + Description: string; + + /** is `TRUE` if a value must be supplied for this property during `Driver.connect` and `FALSE` otherwise. */ + IsRequired: boolean; + + /** is the name of the property. */ + Name: string; + + /** specifies the current value of the property, based on the driver-supplied default values. This field may be empty if no value is known. */ + Value: string; + } + + /** + * represents the properties for a FILE connection (session) with a specific database. These properties can be used when calling the method {@link + * com.sun.star.sdbc.XDriver.connect()} or {@link com.sun.star.sdbc.XDriverManager.getConnectionWithInfo()} . + * + * The properties for a connection contain additional information about how to connect to a database and how to control the behavior of the resulting + * connection should be. + * @see com.sun.star.sdbc.XDriver + * @see com.sun.star.sdbc.XDriverManager + * @see com.sun.star.sdbc.ConnectionProperties + */ + interface FILEConnectionProperties extends ConnectionProperties { + /** + * specifies the encoding to use to translate the backend data + * + * See the [IANA character set list]{@link url="http://www.iana.org/assignments/character-sets"} for a list of valid values. + */ + CharSet: string; + } + + /** + * represents the properties for a FLAT connection (session) with a specific database. These properties can be used when calling the method {@link + * com.sun.star.sdbc.XDriver.connect()} or {@link com.sun.star.sdbc.XDriverManager.getConnectionWithInfo()} . + * + * The properties for a connection contain additional information about how to connect to a database and how to control the behavior of the resulting + * connection should be. + * @see com.sun.star.sdbc.XDriver + * @see com.sun.star.sdbc.XDriverManager + * @see com.sun.star.sdbc.FILEConnectionProperties + */ + interface FLATConnectionProperties extends FILEConnectionProperties { + /** A one character delimiter to separate the decimal. */ + DecimalDelimiter: string; + + /** the extension of the files to be used. */ + Extension: string; + + /** A one character delimiter to separate the fields. */ + FieldDelimiter: string; + + /** `TRUE` when the file contains a header line otherwise `FALSE` */ + HeaderLine: boolean; + + /** A one character delimiter to separate the strings. */ + StringDelimiter: string; + + /** A one character delimiter to separate the thousands. */ + ThousandDelimiter: string; + } + + /** + * represents the properties for a JDBC connection (session) with a specific database. These properties can be used when calling the method {@link + * com.sun.star.sdbc.XDriver.connect()} or {@link com.sun.star.sdbc.XDriverManager.getConnectionWithInfo()} . + * + * The properties for a connection contain additional information about how to connect to a database and how to control the behavior of the resulting + * connection should be. + * @see com.sun.star.sdbc.XDriver + * @see com.sun.star.sdbc.XDriverManager + * @see com.sun.star.sdbc.ConnectionProperties + */ + interface JDBCConnectionProperties extends ConnectionProperties { + /** specifies the statement which should be executed when asking an "INSERT" statement for the {@link XGeneratedResultSet} (future concept) interface. */ + AutoRetrievingStatement: string; + + /** + * specifies if retrieving of auto generated values should be enabled or not. If `TRUE` than the statement will support the {@link XGeneratedResultSet} + * (future concept) interface, otherwise not. + */ + IsAutoRetrievingEnabled: boolean; + + /** + * which JDBC driver class should be loaded to create the connection. + * @see com.sun.star.sdbc.JDBCConnectionProperties.JavaDriverClassPath + */ + JavaDriverClass: string; + + /** + * an optional class path to locate the {@link com.sun.star.sdbc.JDBCConnectionProperties.JavaDriverClass} + * + * The class path is a list of zero or more internal (see the {@link com.sun.star.uri.ExternalUriReferenceTranslator} service) URI references, where any + * space characters ( `U+0020` ) are ignored (and, in particular, separate adjacent URI references). Any " vnd.sun.star.expand " URL references in the + * list are expanded using the {@link com.sun.star.util.theMacroExpander} singleton. + * @since OOo 2.3 + */ + JavaDriverClassPath: string; + + /** specifies a set of properties to pass to `java.lang.System.setProperty` before loading the system's JDBC driver. */ + SystemProperties: SafeArray; + + /** + * specifies how the type info returned by {@link com.sun.star.sdbc.XDatabaseMetaData.getTypeInfo()} will be modified. + * + * The sequence contains an even amount of string values. Each pair describes what should be searched for and what should be replaced if found. ; The + * syntax is: + * + * COLUMN(2) = -5COLUMN(6) = PRECISION + * + * COLUMN(X) defines the column which will be compared and the column which will be replaced. In the example above column 2 will be compared with the + * value -5. If this is true than column 6 will now return the value PRECISION. + */ + TypeInfoSettings: SafeArray; + } + + /** + * represents the properties for a ODBC connection (session) with a specific database. These properties can be used when calling the method {@link + * com.sun.star.sdbc.XDriver.connect()} or {@link com.sun.star.sdbc.XDriverManager.getConnectionWithInfo()} . + * + * The properties for a connection contain additional information about how to connect to a database and how to control the behavior of the resulting + * connection should be. + * @see com.sun.star.sdbc.XDriver + * @see com.sun.star.sdbc.XDriverManager + * @see com.sun.star.sdbc.ConnectionProperties + */ + interface ODBCConnectionProperties extends ConnectionProperties { + /** specifies the statement which should be executed when asking an "INSERT" statement for the {@link XGeneratedResultSet} (future concept) interface. */ + AutoRetrievingStatement: string; + + /** + * specifies the encoding to use to translate the backend data + * + * See the [IANA character set list]{@link url="http://www.iana.org/assignments/character-sets"} for a list of valid values. + */ + CharSet: string; + + /** + * specifies if retrieving of auto generated values should be enabled or not. If `TRUE` than the statement will support the {@link XGeneratedResultSet} + * (future concept) interface, otherwise not. + */ + IsAutoRetrievingEnabled: boolean; + + /** should the parameter "?" in prepared statement be substituted with an distinct name */ + ParameterNameSubstitution: boolean; + + /** Silent - should the connection be silent. No user interaction while creating the connection. */ + Silent: boolean; + + /** the Timeout after which time a timeout should happen */ + Timeout: number; + + /** should the driver should support a catalog. */ + UseCatalog: boolean; + } + + /** + * represents a precompiled SQL statement. + * + * A SQL statement is pre-compiled and stored in a {@link PreparedStatement} object. This object can then be used to efficiently execute this statement + * multiple times. + * + * ** Note: ** The `setXXX` methods for setting IN parameter values must specify types that are compatible with the defined SQL type of the input + * parameter. For instance, if the IN parameter has SQL type Integer, then the method {@link com.sun.star.sdbc.XParameters.setInt()} should be used. + * + * If arbitrary parameter type conversions are required, the method {@link com.sun.star.sdbc.XParameters.setObject()} should be used with a target SQL + * type. + * + * Example of setting a parameter; `con` is an active connection. {{program example here, see documentation}} + * + * + * + * Only one {@link com.sun.star.sdbc.ResultSet} per {@link com.sun.star.sdbc.Statement} can be open at any point in time. Therefore, if the reading of + * one {@link ResultSet} is interleaved with the reading of another, each must have been generated by different Statements. All statement `execute` + * methods implicitly close a statement's current {@link ResultSet} if an open one exists. + */ + interface PreparedStatement extends lang.XComponent, XCloseable, beans.XPropertySet, util.XCancellable, XPreparedStatement, XResultSetMetaDataSupplier, + XParameters, XPreparedBatchExecution, XWarningsSupplier, XMultipleResults { + /** + * defines the SQL cursor name that will be used by subsequent {@link Statement}`execute` methods. + * + * This name can then be used in SQL positioned update/delete statements to identify the current row in the {@link ResultSet} generated by this + * statement. If the database does not support positioned update/delete, this property is a noop. To insure that a cursor has the proper isolation level + * to support updates, the cursor's SELECT statement should be of the form "select for update ...". If the "for update" phrase is omitted, positioned + * updates may fail. + * + * ** Note: ** By definition, positioned update/delete execution must be done by a different {@link Statement} than the one which generated the {@link + * ResultSet} being used for positioning. Also, cursor names must be unique within a connection. + */ + CursorName: string; + + /** + * retrieves the direction for fetching rows from database tables that is the default for result sets generated from this `Statement` object. + * + * If this `Statement` object has not set a fetch direction, the return value is implementation-specific. + */ + FetchDirection: number; + + /** + * retrieves the number of result set rows that is the default fetch size for result sets generated from this `Statement` object. + * + * If this `Statement` object has not set a fetch size, the return value is implementation-specific. + */ + FetchSize: number; + + /** + * returns the maximum number of bytes allowed for any column value. + * + * This limit is the maximum number of bytes that can be returned for any column value. The limit applies only to {@link + * com.sun.star.sdbc.DataType.BINARY} , {@link com.sun.star.sdbc.DataType.VARBINARY} , {@link com.sun.star.sdbc.DataType.LONGVARBINARY} , {@link + * com.sun.star.sdbc.DataType.CHAR} , {@link com.sun.star.sdbc.DataType.VARCHAR} , and {@link com.sun.star.sdbc.DataType.LONGVARCHAR} columns. If the + * limit is exceeded, the excess data is silently discarded. + * + * There is no limitation, if set to zero. + */ + MaxFieldSize: number; + + /** + * retrieves the maximum number of rows that a {@link ResultSet} can contain. If the limit is exceeded, the excess rows are silently dropped. ; There is + * no limitation, if set to zero. + */ + MaxRows: number; + + /** + * retrieves the number of seconds the driver will wait for a {@link Statement} to execute. If the limit is exceeded, a {@link SQLException} is thrown. + * There is no limitation, if set to zero. + */ + QueryTimeOut: number; + + /** + * retrieves the result set concurrency. + * @see com.sun.star.sdbc.ResultSetConcurrency + */ + ResultSetConcurrency: number; + + /** + * Determine the result set type. + * @see com.sun.star.sdbc.ResultSetType + */ + ResultSetType: number; + } + + /** + * provides access to a table of data. A {@link ResultSet} object is usually generated by executing a {@link Statement} . + * + * A {@link ResultSet} maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The "next" method + * moves the cursor to the next row. + * + * The getXXX methods retrieve column values for the current row. You can retrieve values using either the index number of the column. Columns are + * numbered from 1. + * + * For maximum portability, {@link ResultSet} columns within each row should be read in left-to-right order and each column should be read only once. + * + * For the getXXX methods, the SDBC driver attempts to convert the underlying data to the specified type and returns a suitable value. + * + * Column names used as input to the findColumn method are case insensitive. When several columns have the same name, then the value of the first + * matching column will be returned. The column name option is designed to be used when column names are used in the SQL query. For columns that are NOT + * explicitly named in the query, it is best to use column numbers. If column names are used, there is no way for the programmer to guarantee that they + * actually refer to the intended columns. + * + * A {@link ResultSet} is automatically closed (disposed) by the {@link Statement} that generated it when that {@link Statement} is closed, re-executed, + * or used to retrieve the next result from a sequence of multiple results. + * + * The number, types, and properties of a {@link ResultSet} 's columns are provided by the ResultSetMetaData object returned by the getMetaData method. + */ + interface ResultSet extends lang.XComponent, XCloseable, beans.XPropertySet, XWarningsSupplier, XResultSetMetaDataSupplier, XResultSet, XResultSetUpdate, XRow, + XColumnLocate, XRowUpdate { + /** + * defines the SQL cursor name that will be used by subsequent {@link Statement}`execute` methods. + * + * This name can then be used in SQL positioned update/delete statements to identify the current row in the {@link ResultSet} generated by this + * statement. If the database doesn't support positioned update/delete, this property is a noop. To insure that a cursor has the proper isolation level + * to support updates, the cursor's SELECT statement should be of the form "select for update ...". If the "for update" phrase is omitted, positioned + * updates may fail. + * + * ** Note: ** By definition, positioned update/delete execution must be done by a different {@link Statement} than the one which generated the {@link + * ResultSet} being used for positioning. Also, cursor names must be unique within a connection. + */ + CursorName: string; + + /** + * retrieves the direction for fetching rows from database tables that is the default for result sets generated from this {@link + * com.sun.star.sdbcx.Statement} object. ; If this `Statement` object has not set a fetch direction, the return value is implementation-specific. + */ + FetchDirection: number; + + /** + * retrieves the number of result set rows that is the default fetch size for result sets generated from this {@link com.sun.star.sdbcx.Statement} + * object. ; If this {@link com.sun.star.sdbcx.Statement} object has not set a fetch size, the return value is implementation-specific. + */ + FetchSize: number; + + /** + * retrieves the result set concurrency. + * @see com.sun.star.sdbc.ResultSetConcurrency + */ + ResultSetConcurrency: number; + + /** + * determines the result set type. + * @see com.sun.star.sdbc.ResultSetType + */ + ResultSetType: number; + } + + /** + * is a client side {@link ResultSet} , which combines the characteristics of a {@link com.sun.star.sdbc.Statement} and a {@link + * com.sun.star.sdbc.ResultSet} . + * + * It acts like a typical bean. Before you use the {@link RowSet} , you have to specify a set of properties like a DataSource and a Command and other + * properties known of {@link Statement} . ; Afterwards, you can populate the {@link RowSet} by its execute method to fill the set with data. + * + * On the one hand, a {@link RowSet} can be used as a short cut to retrieve the data of a DataSource. You don't have to establish a connection, create a + * {@link Statement} , and then create a {@link ResultSet} . On the other hand, a row set can be used to implement capabilities for a result set, which + * are not supported by a driver result set, like caching strategies or update capabilities. + */ + interface RowSet extends ResultSet, XRowSet, XParameters, XColumnLocate { + /** is the command which should be executed. */ + Command: string; + + /** + * is the name of a named datasource to use. + * @see com.sun.star.sdbc:XDataSource + */ + DataSourceName: string; + + /** + * returns if escape processing is on or off. If escape scanning is on (the default), the driver will do escape substitution before sending the SQL to + * the database. This is only evaluated, if the CommandType is COMMAND. + */ + EscapeProcessing: boolean; + + /** + * returns the maximum number of bytes allowed for any column value. + * + * This limit is the maximum number of bytes that can be returned for any column value. The limit applies only to {@link + * com.sun.star.sdbc.DataType.BINARY} , {@link com.sun.star.sdbc.DataType.VARBINARY} , {@link com.sun.star.sdbc.DataType.LONGVARBINARY} , {@link + * com.sun.star.sdbc.DataType.CHAR} , {@link com.sun.star.sdbc.DataType.VARCHAR} , and {@link com.sun.star.sdbc.DataType.LONGVARCHAR} columns. If the + * limit is exceeded, the excess data is silently discarded. ; There is no limitation, if set to zero. + */ + MaxFieldSize: number; + + /** + * retrieves the maximum number of rows that a {@link ResultSet} can contain. If the limit is exceeded, the excess rows are silently dropped. ; There is + * no limitation, if set to zero. + */ + MaxRows: number; + + /** determines the user for whom to open the connection. */ + Password: string; + + /** + * retrieves the number of seconds the driver will wait for a {@link Statement} to execute. If the limit is exceeded, a {@link + * com.sun.star.sdbc.SQLException} is thrown. There is no limitation, if set to zero. + */ + QueryTimeOut: number; + + /** + * determine the result set type. + * @see com.sun.star.sdbc.ResultSetType + */ + ResultSetType: number; + + /** + * indicates the transaction isolation level, which should be used for the connection. + * @see com.sun.star.sdbc.TransactionIsolation + */ + TransactionIsolation: number; + + /** is the type map that will be used for the custom mapping of SQL structured types and distinct types. */ + TypeMap: container.XNameAccess; + + /** is the connection URL. Could be used instead of the DataSourceName. */ + URL: string; + + /** determines the user for whom to open the connection. */ + User: string; + } + + /** + * is an exception that provides information on a database access error. + * + * Each {@link com.sun.star.sdbc.SQLException} provides several kinds of information: + * + * a string describing the error. This is used as the {@link com.sun.star.uno.Exception} message. + */ + interface SQLException extends uno.Exception { + /** + * returns an integer error code that is specific to each vendor. Normally this will be the actual error code returned by the underlying database. A + * chain to the next Exception. This can be used to provide additional error information. + */ + ErrorCode: number; + + /** returns a chain to the next Exception. This can be used to provide additional error information. */ + NextException: any; + + /** returns a string, which uses the XOPEN SQLState conventions. The values of the SQLState string are described in the XOPEN SQL spec. */ + SQLState: string; + } + + /** + * is used for executing a static SQL statement and obtaining the results produced by it. + * + * Only one {@link ResultSet} per {@link Statement} can be open at any point in time. Therefore, if the reading of one {@link ResultSet} is interleaved + * with the reading of another, each must have been generated by different Statements. All statement `execute` methods implicitly close a statement's + * current {@link ResultSet} if an open one exists. + */ + interface Statement extends lang.XComponent, XCloseable, beans.XPropertySet, util.XCancellable, XStatement, XBatchExecution, XWarningsSupplier, XMultipleResults { + /** + * defines the SQL cursor name that will be used by subsequent {@link Statement}`execute` methods. + * + * This name can then be used in SQL positioned update/delete statements to identify the current row in the {@link ResultSet} generated by this + * statement. If the database does not support positioned update/delete, this property is a noop. To insure that a cursor has the proper isolation level + * to support updates, the cursor's SELECT statement should be of the form "select for update ...". If the "for update" phrase is omitted, positioned + * updates may fail. + * + * ** Note: ** By definition, positioned update/delete execution must be done by a different {@link Statement} than the one which generated the {@link + * ResultSet} being used for positioning. Also, cursor names must be unique within a connection. + */ + CursorName: string; + + /** + * returns if escape processing is on or off. If escape scanning is on (the default), the driver will do escape substitution before sending the SQL to + * the database. + */ + EscapeProcessing: boolean; + + /** + * retrieves the direction for fetching rows from database tables that is the default for result sets generated from this `Statement` object. ; If this + * `Statement` object has not set a fetch direction, the return value is implementation-specific. + */ + FetchDirection: number; + + /** + * retrieves the number of result set rows that is the default fetch size for result sets generated from this `Statement` object. ; If this `Statement` + * object has not set a fetch size, the return value is implementation-specific. + */ + FetchSize: number; + + /** + * returns the maximum number of bytes allowed for any column value. + * + * This limit is the maximum number of bytes that can be returned for any column value. The limit applies only to {@link + * com.sun.star.sdbc.DataType.BINARY} , {@link com.sun.star.sdbc.DataType.VARBINARY} , {@link com.sun.star.sdbc.DataType.LONGVARBINARY} , {@link + * com.sun.star.sdbc.DataType.CHAR} , {@link com.sun.star.sdbc.DataType.VARCHAR} , and {@link com.sun.star.sdbc.DataType.LONGVARCHAR} columns. If the + * limit is exceeded, the excess data is silently discarded. ; There is no limitation, if set to zero. + */ + MaxFieldSize: number; + + /** + * retrieves the maximum number of rows that a {@link ResultSet} can contain. If the limit is exceeded, the excess rows are silently dropped. ; There is + * no limitation, if set to zero. + */ + MaxRows: number; + + /** + * retrieves the number of seconds the driver will wait for a {@link Statement} to execute. If the limit is exceeded, a {@link SQLException} is thrown. + * There is no limitation, if set to zero. + */ + QueryTimeOut: number; + + /** + * retrieves the result set concurrency. + * @see com.sun.star.sdbc.ResultSetConcurrency + */ + ResultSetConcurrency: number; + + /** + * determine the result set type. + * @see com.sun.star.sdbc.ResultSetType + */ + ResultSetType: number; + } + + /** + * is used for mapping the SQL type {@link com.sun.star.sdbc.DataType.ARRAY} . + * + * By default, an `Array` is a transaction duration reference to an SQL array. By default, an `Array` is implemented using a SQL LOCATOR(array) + * internally. + */ + interface XArray extends uno.XInterface { + /** + * returns the SDBC type of the elements in the array designated by this `Array` object. + * @returns a constant from the SDBC types that is the type code for the elements in the array designated by this Array object. + * @throws SQLException if a database access error occurs. + */ + readonly BaseType: number; + + /** + * returns the SQL type name of the elements in the array designated by this `Array` object. + * + * If the elements are a built-in type, it returns the database-specific type name of the elements. If the elements are a user-defined type (UDT), this + * method returns the fully-qualified SQL type name. + * @returns a String that is the database-specific name for a built-in base type or the fully-qualified SQL type name for a base type that is a UDT + * @throws SQLException if a database access error occurs. + */ + readonly BaseTypeName: string; + + /** + * retrieves the contents of the SQL array designated by this `Array` object, using the specified `typeMap` for type map customizations. + * + * If the base type of the array does not match a user-defined type in `typeMap` , the standard mapping is used instead. + * @param typeMap is a map object that contains mappings of SQL type names to services. If the `typeMap` is `NULL` , the type-map associated with the conne + * @returns an sequence that contains the ordered elements of the SQL array designated by this object. + * @throws SQLException if an error occurs while attempting to access the array. + */ + getArray(typeMap: container.XNameAccess): SafeArray; + + /** + * returns an array containing a slice of the SQL array, beginning with the specified `index` and containing up to `count` successive elements of the SQL + * array. + * @param index is the array index of the first element to retrieve; the first element is at index 1. + * @param count is the number of successive SQL array elements to retrieve. + * @param typeMap is a map object that contains mappings of SQL type names to services. If the `typeMap` is `NULL` , the type-map associated with the conne + * @returns an array containing up to `count` consecutive elements of the SQL array, beginning with element `index` . + * @throws SQLException if an error occurs while attempting to access the array. + */ + getArrayAtIndex(index: number, count: number, typeMap: container.XNameAccess): SafeArray; + + /** + * returns the SDBC type of the elements in the array designated by this `Array` object. + * @returns a constant from the SDBC types that is the type code for the elements in the array designated by this Array object. + * @throws SQLException if a database access error occurs. + */ + getBaseType(): number; + + /** + * returns the SQL type name of the elements in the array designated by this `Array` object. + * + * If the elements are a built-in type, it returns the database-specific type name of the elements. If the elements are a user-defined type (UDT), this + * method returns the fully-qualified SQL type name. + * @returns a String that is the database-specific name for a built-in base type or the fully-qualified SQL type name for a base type that is a UDT + * @throws SQLException if a database access error occurs. + */ + getBaseTypeName(): string; + + /** + * returns a result set that contains the elements of the array designated by this `Array` object and uses the given `typeMap` to map the array elements. + * If the base type of the array does not match a user-defined type in `typeMap` or the `typeMap` is `NULL` , the connection type mapping is used + * instead. + * + * The result set contains one row for each array element, with two columns in each row. The second column stores the element value; the first column + * stores the index into the array for that element (with the first array element being at index 1). The rows are in ascending order corresponding to the + * order of the indices. + * @param typeMap contains mapping of SQL user-defined types to classes in the UNO programming language + * @returns a {@link ResultSet} object containing one row for each of the elements in the array designated by this Array object, with the rows in ascending o + * @throws SQLException if a database access error occurs. + */ + getResultSet(typeMap: container.XNameAccess): XResultSet; + + /** + * returns a result set holding the elements of the subarray that starts at index `index` and contains up to `count` successive elements. This method + * uses the given `typeMap` to map the array elements. If the base type of the array does not match a user-defined type in `typeMap` or the `typeMap` is + * `NULL` , the connection type mapping is used instead. + * + * The result set contains one row for each array element, with two columns in each row. The second column stores the element value; the first column + * stores the index into the array for that element (with the first array element being at index 1). The rows are in ascending order corresponding to the + * order of the indices. + * @param index the array index of the first element to retrieve; the first element is at index 1. + * @param count the number of successive SQL array elements to retrieve, + * @param typeMap the Map object that contains the mapping of SQL type names to classes in the UNO programming language. + * @returns a {@link ResultSet} object containing up to count consecutive elements of the SQL array designated by this Array object, starting at index index. + * @throws SQLException if a database access error occurs. + */ + getResultSetAtIndex(index: number, count: number, typeMap: container.XNameAccess): XResultSet; + } + + /** is used for collecting and executing a set of SQL statements. */ + interface XBatchExecution extends uno.XInterface { + /** + * adds a SQL command to the current batch of commands for the statement object. + * @param sql the SQL statement which should be appended to the batch. + * @throws SQLException if a database access error occurs. + */ + addBatch(sql: string): void; + + /** + * makes the set of commands in the current batch empty. + * @throws SQLException if a database access error occurs. + */ + clearBatch(): void; + + /** + * submits a batch of commands to the database for execution. + * @returns an array of update counts containing one element for each command in the batch. The array is ordered according to the order in which commands wer + * @throws SQLException if a database access error occurs. + */ + executeBatch(): SafeArray; + } + + /** + * is the representation (mapping) of an SQL **BLOB** . + * + * A SQL ** BLOB ** is a built-in type that stores a Binary Large Object as a column value in a row of a database table. The driver implements ** BLOB ** + * using a SQL `locator(BLOB)` , which means that a `Blob` object contains a logical pointer to the SQL ** BLOB ** data rather than the data itself. ; A + * `Blob` object is valid for the duration of the transaction in which is was created. + * + * Methods in the interfaces {@link com.sun.star.sdbc.XResultSet} , and {@link com.sun.star.sdbc.XPreparedStatement} , such as `getBlob` and `setBlob` + * allow a programmer to access the SQL **BLOB** . ; The `Blob` interface provides methods for getting the length of a SQL ** BLOB ** (Binary Large + * Object) value, for materializing a ** BLOB ** value on the client and for determining the position of a pattern of bytes within a ** BLOB ** value. + */ + interface XBlob extends uno.XInterface { + /** + * retrieves the ** BLOB ** designated by this `Blob` instance as a stream. + * @returns the stream + * @throws SQLException if a database access error occurs. + */ + readonly BinaryStream: io.XInputStream; + + /** + * retrieves the ** BLOB ** designated by this `Blob` instance as a stream. + * @returns the stream + * @throws SQLException if a database access error occurs. + */ + getBinaryStream(): io.XInputStream; + + /** + * returns as an array of bytes part or all of the ** BLOB ** value that this `Blob` object designates. The byte array contains up to `length` + * consecutive bytes starting at position `pos` . + * @param pos is the ordinal position of the first byte in the ** BLOB ** value to be extracted; the first byte is at position 1. + * @param length is the number of consecutive bytes to be copied. + * @returns a byte array containing up to `length` consecutive bytes from the ** BLOB ** value designated by this `Blob` object, starting with the byte at po + * @throws SQLException if there is an error accessing the **BLOB** . + */ + getBytes(pos: number, length: number): SafeArray; + + /** + * returns the number of bytes in the ** BLOB ** value designated by this `Blob` object. + * @returns the length + * @throws SQLException if a database access error occurs. + */ + length(): number; + + /** + * determines the byte position at which the specified byte `pattern` begins within the ** BLOB ** value that this `Blob` object represents. The search + * for `pattern` begins at position `start` . + * @param pattern the pattern to search + * @param start the start position for the search + * @returns the position + * @throws SQLException if a database access error occurs. + */ + position(pattern: LibreOffice.SeqEquiv, start: number): number; + + /** + * determines the byte position in the ** BLOB ** value designated by this `Blob` object at which `pattern` begins. The search begins at position `start` + * . + * @param pattern the pattern to search + * @param start position to start + * @returns the position + * @throws SQLException if a database access error occurs. + */ + positionOfBlob(pattern: XBlob, start: number): number; + } + + /** + * is the mapping for the SQL `CLOB` type. + * + * A SQL `CLOB` is a built-in type that stores a Character Large Object as a column value in a row of a database table. The driver implements a `Clob` + * object using a SQL `locator(CLOB)` , which means that a `Clob` object contains a logical pointer to the SQL `CLOB` data rather than the data itself. A + * `Clob` object is valid for the duration of the transaction in which it was created. + * + * The `Clob` interface provides methods for getting the length of a SQL `CLOB` (Character Large Object) value, for materializing a `CLOB` value on the + * client, and for searching for a substring or `CLOB` object within a `CLOB` value. + * + * Methods in the interfaces {@link com.sun.star.sdbc.XResultSet} , and {@link com.sun.star.sdbc.XPreparedStatement} , such as `getClob` and `setClob` + * allow a programmer to access the SQL `CLOB` . + */ + interface XClob extends uno.XInterface { + /** + * gets the `Clob` contents as a stream. + * @returns the stream + * @throws SQLException if a database access error occurs. + */ + readonly CharacterStream: io.XInputStream; + + /** + * gets the `Clob` contents as a stream. + * @returns the stream + * @throws SQLException if a database access error occurs. + */ + getCharacterStream(): io.XInputStream; + + /** + * returns a copy of the specified substring in the `Clob` value designated by this `Clob` object. + * + * The substring begins at position `pos` and has up to `length` consecutive characters. + * @param pos the starting position + * @param length the length of the substring + * @returns the substring + * @throws SQLException if a database access error occurs. + */ + getSubString(pos: number, length: number): string; + + /** + * returns the number of characters in the `CLOB` value designated by this `Clob` object. + * @returns the length of the CLOB object + * @throws SQLException if a database access error occurs. + */ + length(): number; + + /** + * determines the character position at which the specified substring `searchstr` appears in the `Clob` . The search begins at position `start` . + * @param searchstr the string to search + * @param start the starting position + * @returns the length of the CLOB object + * @throws SQLException if a database access error occurs. + */ + position(searchstr: string, start: number): number; + + /** + * determines the position at which the specified `Clob` object `pattern` appears in this `Clob` object. The search begins at position `start` . + * @param pattern the CLOB to search + * @param start the starting position + * @returns the position of the CLOB inside + * @throws SQLException if a database access error occurs. + */ + positionOfClob(pattern: XClob, start: number): number; + } + + /** provides for the releasing of resources acquired by the implementing object. */ + interface XCloseable extends uno.XInterface { + /** + * releases all resources connected to an object. + * @throws SQLException if a database access error occurs. + */ + close(): void; + } + + /** + * provides the possibility to find columns by their name. + * + * When several columns have the same name, then the value of the first matching column will be returned. The column name option is designed to be used + * when column names are used in the SQL query. For columns that are NOT explicitly named in the query, it is best to use column numbers. If column names + * are used, there is no way for the programmer to guarantee that they actually refer to the intended columns. + */ + interface XColumnLocate extends uno.XInterface { + /** + * maps the given {@link ResultSet} column name to its {@link ResultSet} column index. + * + * The specification before LibreOffice 4.2 left unspecified what should happen for an invalid column name. As a result some drivers written against the + * older speification may return a special invalid value, such as a negative number, zero, or a number greater than the number of columns. + * @param columnName the name of the column + * @returns the position of the column + * @throws SQLException if the column named `columnName` does not exist, or a database access error occurs. + */ + findColumn(columnName: string): number; + } + + /** + * represents a connection (session) with a specific database. Within the context of a {@link Connection} , SQL statements are executed and results are + * returned. + * + * A {@link Connection} 's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, and the + * capabilities of this connection. This information is obtained with the com::sun::star::sdbc::XDatabaseMetaData::getMetaData() method. + * @see com.sun.star.sdbc.XDriverManager + * @see com.sun.star.sdbc.XStatement + * @see com.sun.star.sdbc.XDatabaseMetaData + */ + interface XConnection extends XCloseable { + /** + * gets the current auto-commit state. + * @returns the current state of auto-commit mode. + * @see setAutoCommit + * @throws SQLException if a database access error occurs. + */ + AutoCommit: boolean; + + /** + * returns the {@link Connection} 's current catalog name. + * @returns the current catalog name or an empty string. + * @throws SQLException if a database access error occurs. + */ + Catalog: string; + + /** + * makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the {@link Connection} . This + * method should be used only when auto-commit mode has been disabled. + * @see setAutoCommit + * @throws SQLException if a database access error occurs. + */ + commit(): void; + + /** + * creates a new {@link com.sun.star.sdbc.Statement} object for sending SQL statements to the database. + * + * SQL statements without parameters are normally executed using {@link Statement} objects. If the same SQL statement is executed many times, it is more + * efficient to use a {@link com.sun.star.sdbc.PreparedStatement} . + * + * Result sets created using the returned {@link Statement} will have forward-only type, and read-only concurrency, by default. + * + * Escape processing for the SQL-Statement is enabled, by default. + * @returns a new {@link Statement} object + * @throws SQLException if a database access error occurs. + */ + createStatement(): XStatement; + + /** + * gets the current auto-commit state. + * @returns the current state of auto-commit mode. + * @see setAutoCommit + * @throws SQLException if a database access error occurs. + */ + getAutoCommit(): boolean; + + /** + * returns the {@link Connection} 's current catalog name. + * @returns the current catalog name or an empty string. + * @throws SQLException if a database access error occurs. + */ + getCatalog(): string; + + /** + * gets the metadata regarding this connection's database. + * + * A {@link Connection} 's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the + * capabilities of this connection, and so on. This information is made available through a DatabaseMetaData object. + * @returns a DatabaseMetaData object for this {@link Connection} . + * @throws SQLException if a database access error occurs. + */ + getMetaData(): XDatabaseMetaData; + + /** + * gets this {@link Connection} 's current transaction isolation level. + * @returns the current {@link TransactionIsolation} mode value. + * @throws SQLException if a database access error occurs. + */ + getTransactionIsolation(): number; + + /** + * gets the type map object associated with this connection. Only drivers which implement the custom type mapping facility will return an object + * otherwise NULL could be returned. + * + * Unless the application has added an entry to the type map, the map returned will be empty. + * @returns the XNameAccess object associated with this {@link Connection} object. + * @throws SQLException if a database access error occurs. + */ + getTypeMap(): container.XNameAccess; + + /** + * tests to see if a connection is closed. + * + * ** Note: ** A {@link Connection} is automatically closed if no one references it anymore. Certain fatal errors also result in a closed {@link + * Connection} . + * @returns `TRUE` if the connection is closed; `FALSE` if it's still open. + * @throws SQLException if a database access error occurs. + */ + isClosed(): boolean; + + /** + * tests to see if the connection is in read-only mode. + * @returns `TRUE` if connection is read-only and `FALSE` otherwise. + * @throws SQLException if a database access error occurs. + */ + isReadOnly(): boolean; + + /** + * gets the metadata regarding this connection's database. + * + * A {@link Connection} 's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the + * capabilities of this connection, and so on. This information is made available through a DatabaseMetaData object. + * @returns a DatabaseMetaData object for this {@link Connection} . + * @throws SQLException if a database access error occurs. + */ + readonly MetaData: XDatabaseMetaData; + + /** + * converts the given SQL statement into the system's native SQL grammar. A driver may convert the JDBC SQL grammar into its system's native SQL grammar + * prior to sending it; this method returns the native form of the statement that the driver would have sent. + * @param sql a SQL statement that may contain one or more "?" parameter placeholders + * @returns the native form of this statement + * @throws SQLException if a database access error occurs. + */ + nativeSQL(sql: string): string; + + /** + * creates a {@link com.sun.star.sdbc.CallableStatement} object for calling database stored procedures. + * + * The {@link CallableStatement} provides methods for setting up its IN and OUT parameters, and methods for executing the call to a stored procedure. + * + * ** Note: ** This method is optimized for handling stored procedure call statements. Some drivers may send the call statement to the database when the + * method `prepareCall` is done; ; others may wait until the {@link CallableStatement} is executed. This has no direct effect on users; however, it does + * affect which method throws certain SQLExceptions. Result sets created using the returned {@link CallableStatement} will have forward-only type and + * read-only concurrency, by default. + * @param sql a SQL statement that may contain one or more "?" IN parameter placeholders + * @returns a new {@link PreparedStatement} object containing the pre-compiled statement + * @throws SQLException if a database access error occurs. + */ + prepareCall(sql: string): XPreparedStatement; + + /** + * creates a {@link com.sun.star.sdbc.PreparedStatement} object for sending parameterized SQL statements to the database. + * + * A SQL statement with or without IN parameters can be pre-compiled and stored in a {@link PreparedStatement} object. This object can then be used to + * efficiently execute this statement multiple times. + * + * ** Note: ** This method is optimized for handling parametric SQL statements that benefit from precompilation. If the driver supports precompilation, + * the method `prepareStatement` will send the statement to the database for precompilation. Some drivers may not support precompilation. In this case, + * the statement may not be sent to the database until the {@link com.sun.star.sdbc.PreparedStatement} is executed. This has no direct effect on users; + * however, it does affect which method throws certain SQLExceptions. + * + * Result sets created using the returned {@link PreparedStatement} will have forward-only type and read-only concurrency, by default. + * + * Escape processing for the SQL-Statement is enabled, by default. + * @param sql a SQL statement that may contain one or more "?" IN parameter placeholders + * @returns a new {@link PreparedStatement} object containing the pre-compiled statement + * @throws SQLException if a database access error occurs. + */ + prepareStatement(sql: string): XPreparedStatement; + + /** + * drops all changes made since the previous commit/rollback and releases any database locks currently held by this {@link Connection} . This method + * should be used only when auto-commit has been disabled. + * @see setAutoCommit + * @throws SQLException if a database access error occurs. + */ + rollback(): void; + + /** + * sets this connection's auto-commit mode. + * + * If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual transactions. Otherwise, its SQL + * statements are grouped into transactions that are terminated by a call to either the method {@link com.sun.star.sdbc.XConnection.commit()} or the + * method {@link com.sun.star.sdbc.XConnection.rollback()} . By default, new connections are in auto-commit mode. + * + * The commit occurs when the statement completes or the next execute occurs, whichever comes first. In the case of statements returning a {@link + * ResultSet} , the statement completes when the last row of the {@link ResultSet} has been retrieved or the {@link ResultSet} has been closed. In + * advanced cases, a single statement may return multiple results as well as output parameter values. In these cases the commit occurs when all results + * and output parameter values have been retrieved. + * @param autoCommit `TRUE` enables auto-commit; `FALSE` disables auto-commit. + * @throws SQLException if a database access error occurs. + */ + setAutoCommit(autoCommit: boolean): void; + + /** + * sets a catalog name in order to select a subspace of this {@link Connection} 's database in which to work. If the driver does not support catalogs, it + * will silently ignore this request. + * @param catalog the name of the catalog. + * @throws SQLException if a database access error occurs. + */ + setCatalog(catalog: string): void; + + /** + * puts this connection in read-only mode as a hint to enable database optimizations. + * + * ** Note: ** This method cannot be called while in the middle of a transaction. Calling setReadOnly with `TRUE` does not necessarily cause writes to be + * prohibited. + * @param readOnly `TRUE` enables read-only mode; `FALSE` disables read-only mode. + * @throws SQLException if a database access error occurs. + */ + setReadOnly(readOnly: boolean): void; + + /** + * attempts to change the transaction isolation level to the one given. + * + * The constants defined in {@link com.sun.star.sdbc.TransactionIsolation} are the possible transaction isolation levels. + * + * ** Note: ** This method cannot be called while in the middle of a transaction. + * @param level one of the {@link TransactionIsolation} values with the exception of NONE; some databases may not support other values. + * @see com.sun.star.sdbc.XDatabaseMetaData.supportsTransactionIsolationLevel() + * @throws SQLException if a database access error occurs. + */ + setTransactionIsolation(level: number): void; + + /** + * installs the given type map as the type map for this connection. The type map will be used for the custom mapping of SQL structured types and distinct + * types. + * + * Only if the driver supports custom type mapping is the setting of a map allowed. + * @param typeMap set the XNameAccess object associated with this {@link Connection} object. + * @throws SQLException if a database access error occurs. + */ + setTypeMap(typeMap: container.XNameAccess): void; + + /** + * gets this {@link Connection} 's current transaction isolation level. + * @returns the current {@link TransactionIsolation} mode value. + * @throws SQLException if a database access error occurs. + */ + TransactionIsolation: number; + + /** + * gets the type map object associated with this connection. Only drivers which implement the custom type mapping facility will return an object + * otherwise NULL could be returned. + * + * Unless the application has added an entry to the type map, the map returned will be empty. + * @returns the XNameAccess object associated with this {@link Connection} object. + * @throws SQLException if a database access error occurs. + */ + TypeMap: container.XNameAccess; + } + + interface XConnectionPool extends XDriverManager, XDriverAccess { } + + /** + * provides comprehensive information about the database as a whole. + * + * Many of the methods here return lists of information in the form of {@link com.sun.star.sdbc.XResultSet} objects. You can use the normal {@link + * com.sun.star.sdbc.XRow} (or {@link com.sun.star.sdb.XColumn} ) methods such as {@link com.sun.star.sdbc.XRow.getString()} and {@link + * com.sun.star.sdbc.XRow.getInt()} to retrieve the data from these XResultSets. If a given form of metadata is not available, these methods should throw + * a {@link com.sun.star.sdbc.SQLException} . After calling one of the getXXX() methods, one can check whether that value is `NULL` with the method + * {@link com.sun.star.sdbc.XRow.wasNull()} . In the text only "(may be `NULL`)" is mentioned for this case. + * + * Some of these methods take arguments that are String patterns. These arguments all have names such as fooPattern. Within a pattern String, "%" means + * match any substring of 0 or more characters, and "_" means match any one character. Only metadata entries matching the search pattern are returned. If + * a search pattern argument is set to `VOID` , that argument's criteria will be dropped from the search. + * + * A {@link com.sun.star.sdbc.SQLException} will be thrown if a driver does not support a metadata method. In the case of methods that return an {@link + * XResultSet} , either an {@link XResultSet} (which may be empty) is returned or a {@link SQLException} is thrown. + */ + interface XDatabaseMetaData extends uno.XInterface { + /** + * Can all the procedures returned by getProcedures be called by the current user? + * @returns `TRUE` if the user is allowed to call all procedures returned by getProcedures otherwise `FALSE` . + * @throws SQLException if a database access error occurs. + */ + allProceduresAreCallable(): boolean; + + /** + * Can all the tables returned by getTable be SELECTed by the current user? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + allTablesAreSelectable(): boolean; + + /** + * gets the catalog names available in this database. The results are ordered by catalog name. + * + * The catalog column is: + * + * 1. **TABLE_CAT** string => catalog name + * @returns each row has a single String column that is a catalog name + * @throws SQLException if a database access error occurs. + */ + readonly Catalogs: XResultSet; + + /** + * return the separator between catalog and table name + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly CatalogSeparator: string; + + /** + * return the database vendor's preferred term for "catalog" + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly CatalogTerm: string; + + /** + * retrieves the connection that produced this metadata object. + * @returns the {@link Connection} object + * @throws SQLException if a database access error occurs. + */ + readonly Connection: XConnection; + + /** returns the name of the database product. */ + readonly DatabaseProductName: string; + + /** returns the version of the database product. */ + readonly DatabaseProductVersion: string; + + /** + * does a data definition statement within a transaction force the transaction to commit? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + dataDefinitionCausesTransactionCommit(): boolean; + + /** + * is a data definition statement within a transaction ignored? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + dataDefinitionIgnoredInTransactions(): boolean; + + /** + * return the database default transaction isolation level. The values are defined in {@link com.sun.star.sdbc.TransactionIsolation} . + * @returns `TRUE` if so + * @see com.sun.star.sdbc.XConnection + * @throws SQLException if a database access error occurs. + */ + readonly DefaultTransactionIsolation: number; + + /** + * indicates whether or not a visible row delete can be detected by calling {@link com.sun.star.sdbc.XResultSet.rowDeleted()} . If {@link + * deletesAreDetected()} returns `FALSE` , then deleted rows are removed from the result set. + * @param setType defined in {@link com.sun.star.sdbc.ResultSetType} + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + deletesAreDetected(setType: number): boolean; + + /** + * Did {@link getMaxRowSize()} include LONGVARCHAR and LONGVARBINARY blobs? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + doesMaxRowSizeIncludeBlobs(): boolean; + + /** returns the SDBC driver major version number. */ + readonly DriverMajorVersion: number; + + /** returns the SDBC driver minor version number. */ + readonly DriverMinorVersion: number; + + /** returns the name of the SDBC driver. */ + readonly DriverName: string; + + /** returns the version number of the SDBC driver. */ + readonly DriverVersion: string; + + /** + * gets all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9 and _). + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly ExtraNameCharacters: string; + + /** + * gets a description of a table's optimal set of columns that uniquely identifies a row. They are ordered by SCOPE. + * + * Each column description has the following columns: + * + * 1. **SCOPE** short => actual scope of result TEMPORARY - very temporary, while using rowTRANSACTION - valid for remainder of current + * transactionSESSION - valid for remainder of current session 2. **COLUMN_NAME** string => column name 3. **DATA_TYPE** short => SQL data type from + * java.sql.Types 4. **TYPE_NAME** string => Data source dependent type name, for a UDT the type name is fully qualified 5. **COLUMN_SIZE** long => + * precision 6. **BUFFER_LENGTH** long => not used 7. **DECIMAL_DIGITS** short => scale 8. **PSEUDO_COLUMN** short => is this a pseudo column like an + * Oracle ROWID UNKNOWN - may or may not be pseudo columnNOT_PSEUDO - is NOT a pseudo columnPSEUDO - is a pseudo column + * @param catalog a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria + * @param schema a schema name; "" retrieves those without a schema + * @param table a table name + * @param scope the scope of interest; use same values as SCOPE + * @param nullable include columns that are nullable? + * @returns each row is a column description + * @throws SQLException if a database access error occurs. + */ + getBestRowIdentifier(catalog: any, schema: string, table: string, scope: number, nullable: boolean): XResultSet; + + /** + * gets the catalog names available in this database. The results are ordered by catalog name. + * + * The catalog column is: + * + * 1. **TABLE_CAT** string => catalog name + * @returns each row has a single String column that is a catalog name + * @throws SQLException if a database access error occurs. + */ + getCatalogs(): XResultSet; + + /** + * return the separator between catalog and table name + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getCatalogSeparator(): string; + + /** + * return the database vendor's preferred term for "catalog" + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getCatalogTerm(): string; + + /** + * gets a description of the access rights for a table's columns. + * + * Only privileges matching the column name criteria are returned. They are ordered by COLUMN_NAME and PRIVILEGE. + * + * Each privilege description has the following columns: + * + * 1. **TABLE_CAT** string => table catalog (may be `NULL` ) 2. **TABLE_SCHEM** string => table schema (may be `NULL` ) 3. **TABLE_NAME** string => + * table name 4. **COLUMN_NAME** string => column name 5. **GRANTOR** => granter of access (may be `NULL` ) 6. **GRANTEE** string => grantee of access 7. + * **PRIVILEGE** string => name of access (SELECT, INSERT, UPDATE, REFERENCES, ...) 8. **IS_GRANTABLE** string => "YES" if grantee is permitted to grant + * to others; "NO" if not; `NULL` if unknown + * @param catalog a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria + * @param schema a schema name ; "" retrieves those without a schema + * @param table a table name + * @param columnNamePattern a column name pattern + * @returns each row is a column privilege description + * @throws SQLException if a database access error occurs. + */ + getColumnPrivileges(catalog: any, schema: string, table: string, columnNamePattern: string): XResultSet; + + /** + * gets a description of table columns available in the specified catalog. + * + * Only column descriptions matching the catalog, schema, table and column name criteria are returned. They are ordered by TABLE_SCHEM, TABLE_NAME, and + * ORDINAL_POSITION. + * + * Each column description has the following columns: + * + * 1. **TABLE_CAT** string => table catalog (may be `NULL` ) 2. **TABLE_SCHEM** string => table schema (may be `NULL` ) 3. **TABLE_NAME** string => + * table name 4. **COLUMN_NAME** string => column name 5. **DATA_TYPE** short => SQL type from java.sql.Types 6. **TYPE_NAME** string => Data source + * dependent type name, for a UDT the type name is fully qualified 7. **COLUMN_SIZE** long => column size. For char or date types this is the maximum + * number of characters, for numeric or decimal types this is precision. 8. **BUFFER_LENGTH** is not used. 9. **DECIMAL_DIGITS** long => the number of + * fractional digits 10. **NUM_PREC_RADIX** long => Radix (typically either 10 or 2) 11. **NULLABLE** long => is NULL allowed? NO_NULLS - might not allow + * NULL valuesNULLABLE - definitely allows NULL valuesNULLABLE_UNKNOWN - nullability unknown 12. **REMARKS** string => comment describing column (may be + * `NULL` ) 13. **COLUMN_DEF** string => default value (may be `NULL` ) 14. **SQL_DATA_TYPE** long => unused 15. **SQL_DATETIME_SUB** long => unused 16. + * **CHAR_OCTET_LENGTH** long => for char types the maximum number of bytes in the column 17. **ORDINAL_POSITION** int => index of column in table + * (starting at 1) 18. **IS_NULLABLE** string => "NO" means column definitely does not allow NULL values; "YES" means the column might allow NULL values. + * An empty string means nobody knows. + * @param catalog a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria + * @param schemaPattern a schema name pattern; "" retrieves those without a schema + * @param tableNamePattern a table name pattern + * @param columnNamePattern a column name pattern + * @returns each row is a column description + * @throws SQLException if a database access error occurs. + */ + getColumns(catalog: any, schemaPattern: string, tableNamePattern: string, columnNamePattern: string): XResultSet; + + /** + * retrieves the connection that produced this metadata object. + * @returns the {@link Connection} object + * @throws SQLException if a database access error occurs. + */ + getConnection(): XConnection; + + /** + * gets a description of the foreign key columns in the foreign key table that reference the primary key columns of the primary key table (describe how + * one table imports another's key.) This should normally return a single foreign key/primary key pair (most tables only import a foreign key from a + * table once.). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ. + * + * Each foreign key column description has the following columns: + * + * 1. **PKTABLE_CAT** string => primary key table catalog (may be `NULL` ) 2. **PKTABLE_SCHEM** string => primary key table schema (may be `NULL` ) 3. + * **PKTABLE_NAME** string => primary key table name 4. **PKCOLUMN_NAME** string => primary key column name 5. **FKTABLE_CAT** string => foreign key + * table catalog (may be `NULL` ) being exported (may be `NULL` ) 6. **FKTABLE_SCHEM** string => foreign key table schema (may be `NULL` ) being exported + * (may be `NULL` ) 7. **FKTABLE_NAME** string => foreign key table name being exported 8. **FKCOLUMN_NAME** string => foreign key column name being + * exported 9. **KEY_SEQ** short => sequence number within foreign key 10. **UPDATE_RULE** short => What happens to foreign key when primary is updated: + * NO_ACTION - do not allow update of primary key if it has been importedCASCADE - change imported key to agree with primary key updateSET_NULL - change + * imported key to NULL if its primary key has been updatedSET_DEFAULT - change imported key to default values if its primary key has been + * updatedRESTRICT - same as importedKeyNoAction (for ODBC 2.x compatibility) 11. **DELETE_RULE** short => What happens to the foreign key when primary + * is deleted. NO_ACTION - do not allow delete of primary key if it has been importedCASCADE - delete rows that import a deleted keySET_NULL - change + * imported key to NULL if its primary key has been deletedRESTRICT - same as importedKeyNoAction (for ODBC 2.x compatibility)SET_DEFAULT - change + * imported key to default if its primary key has been deleted 12. **FK_NAME** string => foreign key name (may be `NULL` ) 13. **PK_NAME** string => + * primary key name (may be `NULL` ) 14. **DEFERRABILITY** short => can the evaluation of foreign key constraints be deferred until commit + * INITIALLY_DEFERRED - see SQL92 for definitionINITIALLY_IMMEDIATE - see SQL92 for definitionNONE - see SQL92 for definition + * @param primaryCatalog a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria + * @param primarySchema a schema name; "" retrieves those without a schema + * @param primaryTable the table name that exports the key + * @param foreignCatalog a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria + * @param foreignSchema a schema name; "" retrieves those without a schema + * @param foreignTable the table name that imports the key + * @returns each row is a foreign key column description + * @throws SQLException if a database access error occurs. + */ + getCrossReference(primaryCatalog: any, primarySchema: string, primaryTable: string, foreignCatalog: any, foreignSchema: string, foreignTable: string): XResultSet; + + /** returns the name of the database product. */ + getDatabaseProductName(): string; + + /** returns the version of the database product. */ + getDatabaseProductVersion(): string; + + /** + * return the database default transaction isolation level. The values are defined in {@link com.sun.star.sdbc.TransactionIsolation} . + * @returns `TRUE` if so + * @see com.sun.star.sdbc.XConnection + * @throws SQLException if a database access error occurs. + */ + getDefaultTransactionIsolation(): number; + + /** returns the SDBC driver major version number. */ + getDriverMajorVersion(): number; + + /** returns the SDBC driver minor version number. */ + getDriverMinorVersion(): number; + + /** returns the name of the SDBC driver. */ + getDriverName(): string; + + /** returns the version number of the SDBC driver. */ + getDriverVersion(): string; + + /** + * gets a description of the foreign key columns that reference a table's primary key columns (the foreign keys exported by a table). They are ordered by + * FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ. + * + * Each foreign key column description has the following columns: + * + * 1. **PKTABLE_CAT** string => primary key table catalog (may be `NULL` ) 2. **PKTABLE_SCHEM** string => primary key table schema (may be `NULL` ) 3. + * **PKTABLE_NAME** string => primary key table name 4. **PKCOLUMN_NAME** string => primary key column name 5. **FKTABLE_CAT** string => foreign key + * table catalog (may be `NULL` ) being exported (may be `NULL` ) 6. **FKTABLE_SCHEM** string => foreign key table schema (may be `NULL` ) being exported + * (may be `NULL` ) 7. **FKTABLE_NAME** string => foreign key table name being exported 8. **FKCOLUMN_NAME** string => foreign key column name being + * exported 9. **KEY_SEQ** short => sequence number within foreign key 10. **UPDATE_RULE** short => What happens to foreign key when primary is updated: + * NO_ACTION - do not allow update of primary key if it has been importedCASCADE - change imported key to agree with primary key updateSET_NULL - change + * imported key to NULL if its primary key has been updatedSET_DEFAULT - change imported key to default values if its primary key has been + * updatedRESTRICT - same as importedKeyNoAction (for ODBC 2.x compatibility) 11. **DELETE_RULE** short => What happens to the foreign key when primary + * is deleted. NO_ACTION - do not allow delete of primary key if it has been importedCASCADE - delete rows that import a deleted keySET_NULL - change + * imported key to NULL if its primary key has been deletedRESTRICT - same as importedKeyNoAction (for ODBC 2.x compatibility)SET_DEFAULT - change + * imported key to default if its primary key has been deleted 12. **FK_NAME** string => foreign key name (may be `NULL` ) 13. **PK_NAME** string => + * primary key name (may be `NULL` ) 14. **DEFERRABILITY** short => can the evaluation of foreign key constraints be deferred until commit + * INITIALLY_DEFERRED - see SQL92 for definitionINITIALLY_IMMEDIATE - see SQL92 for definitionNONE - see SQL92 for definition + * @param catalog a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria + * @param schema a schema name; "" retrieves those without a schema + * @param table a table name + * @returns each row is a foreign key column description + * @throws SQLException if a database access error occurs. + */ + getExportedKeys(catalog: any, schema: string, table: string): XResultSet; + + /** + * gets all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9 and _). + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getExtraNameCharacters(): string; + + /** + * What's the string used to quote SQL identifiers? This returns a space " " if identifier quoting is not supported. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getIdentifierQuoteString(): string; + + /** + * gets a description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table). They are + * ordered by PKTABLE_CAT, PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ. + * + * Each primary key column description has the following columns: + * + * 1. **PKTABLE_CAT** string => primary key table catalog being imported (may be `NULL` ) 2. **PKTABLE_SCHEM** string => primary key table schema being + * imported (may be `NULL` ) 3. **PKTABLE_NAME** string => primary key table name being imported 4. **PKCOLUMN_NAME** string => primary key column name + * being imported 5. **FKTABLE_CAT** string => foreign key table catalog (may be `NULL` ) 6. **FKTABLE_SCHEM** string => foreign key table schema (may be + * `NULL` ) 7. **FKTABLE_NAME** string => foreign key table name 8. **FKCOLUMN_NAME** string => foreign key column name 9. **KEY_SEQ** short => sequence + * number within foreign key 10. **UPDATE_RULE** short => What happens to foreign key when primary is updated: importedNoAction - do not allow update of + * primary key if it has been importedimportedKeyCascade - change imported key to agree with primary key updateimportedKeySetNull - change imported key + * to NULL if its primary key has been updatedimportedKeySetDefault - change imported key to default values if its primary key has been + * updatedimportedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility) 11. **DELETE_RULE** short => What happens to the foreign key + * when primary is deleted. importedKeyNoAction - do not allow delete of primary key if it has been importedimportedKeyCascade - delete rows that import + * a deleted keyimportedKeySetNull - change imported key to NULL if its primary key has been deletedimportedKeyRestrict - same as importedKeyNoAction + * (for ODBC 2.x compatibility)importedKeySetDefault - change imported key to default if its primary key has been deleted 12. **FK_NAME** string => + * foreign key name (may be `NULL` ) 13. **PK_NAME** string => primary key name (may be `NULL` ) 14. **DEFERRABILITY** short => can the evaluation of + * foreign key constraints be deferred until commit importedKeyInitiallyDeferred - see SQL92 for definitionimportedKeyInitiallyImmediate - see SQL92 for + * definitionimportedKeyNotDeferrable - see SQL92 for definition + * @param catalog a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria + * @param schema a schema name; "" retrieves those without a schema + * @param table a table name + * @returns each row is a primary key column description + * @throws SQLException if a database access error occurs. + */ + getImportedKeys(catalog: any, schema: string, table: string): XResultSet; + + /** + * gets a description of a table's indices and statistics. They are ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION. + * + * Each index column description has the following columns: + * + * 1. **TABLE_CAT** string => table catalog (may be `NULL` ) 2. **TABLE_SCHEM** string => table schema (may be `NULL` ) 3. **TABLE_NAME** string => + * table name 4. **NON_UNIQUE** boolean => Can index values be non-unique? `FALSE` when TYPE is tableIndexStatistic 5. **INDEX_QUALIFIER** string => + * index catalog (may be `NULL` ); `NULL` when TYPE is tableIndexStatistic 6. **INDEX_NAME** string => index name; `NULL` when TYPE is + * tableIndexStatistic 7. **TYPE** short => index type: 0 - this identifies table statistics that are returned in conjunction with a table's index + * descriptionsCLUSTERED - this is a clustered indexHASHED - this is a hashed indexOTHER - this is some other style of index 8. **ORDINAL_POSITION** + * short => column sequence number within index; zero when TYPE is tableIndexStatistic 9. **COLUMN_NAME** string => column name; `NULL` when TYPE is + * tableIndexStatistic 10. **ASC_OR_DESC** string => column sort sequence, "A" => ascending, "D" => descending, may be `NULL` if sort sequence is not + * supported; `NULL` when TYPE is tableIndexStatistic 11. **CARDINALITY** long => When TYPE is tableIndexStatistic, then this is the number of rows in + * the table; otherwise, it is the number of unique values in the index. 12. **PAGES** long => When TYPE is tableIndexStatisic then this is the number of + * pages used for the table, otherwise it is the number of pages used for the current index. 13. **FILTER_CONDITION** string => Filter condition, if any. + * (may be `NULL` ) + * @param catalog a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria + * @param schema a schema name; "" retrieves those without a schema + * @param table the table name that exports the key + * @param unique when `TRUE` , return only indices for unique values; when `FALSE` , return indices regardless of whether unique or not + * @param approximate when `TRUE` , result is allowed to reflect approximate or out of data values; when `FALSE` , results are requested to be accurate + * @returns each row is an index column description + * @throws SQLException if a database access error occurs. + */ + getIndexInfo(catalog: any, schema: string, table: string, unique: boolean, approximate: boolean): XResultSet; + + /** + * return the maximal number of hex characters in an inline binary literal + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxBinaryLiteralLength(): number; + + /** + * return the maximum length of a catalog name + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxCatalogNameLength(): number; + + /** + * return the max length for a character literal + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxCharLiteralLength(): number; + + /** + * return the limit on column name length + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxColumnNameLength(): number; + + /** + * return the maximum number of columns in a "GROUP BY" clause + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxColumnsInGroupBy(): number; + + /** + * return the maximum number of columns allowed in an index + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxColumnsInIndex(): number; + + /** + * return the maximum number of columns in an "ORDER BY" clause + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxColumnsInOrderBy(): number; + + /** + * return the maximum number of columns in a "SELECT" list + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxColumnsInSelect(): number; + + /** + * return the maximum number of columns in a table + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxColumnsInTable(): number; + + /** + * return the number of active connections at a time to this database. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxConnections(): number; + + /** + * return the maximum cursor name length + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxCursorNameLength(): number; + + /** + * return the maximum length of an index (in bytes) + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxIndexLength(): number; + + /** + * return the maximum length of a procedure name + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxProcedureNameLength(): number; + + /** + * return the maximum length of a single row. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxRowSize(): number; + + /** + * return the maximum length allowed for a schema name + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxSchemaNameLength(): number; + + /** + * return the maximum length of a SQL statement + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxStatementLength(): number; + + /** + * return the maximal number of open active statements at one time to this database + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxStatements(): number; + + /** + * return the maximum length of a table name + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxTableNameLength(): number; + + /** + * return the maximum number of tables in a SELECT statement + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxTablesInSelect(): number; + + /** + * return the maximum length of a user name + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getMaxUserNameLength(): number; + + /** + * gets a comma-separated list of math functions. These are the X/Open CLI math function names used in the SDBC function escape clause. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getNumericFunctions(): string; + + /** + * gets a description of a table's primary key columns. They are ordered by COLUMN_NAME. + * + * Each primary key column description has the following columns: + * + * 1. **TABLE_CAT** string => table catalog (may be `NULL` ) 2. **TABLE_SCHEM** string => table schema (may be `NULL` ) 3. **TABLE_NAME** string => + * table name 4. **COLUMN_NAME** string => column name 5. **KEY_SEQ** short => sequence number within primary key 6. **PK_NAME** string => primary key + * name (may be `NULL` ) + * @param catalog a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria + * @param schema a schema name; "" retrieves those without a schema + * @param table a table name + * @returns each row is a primary key column description + * @throws SQLException if a database access error occurs. + */ + getPrimaryKeys(catalog: any, schema: string, table: string): XResultSet; + + /** + * gets a description of a catalog's stored procedure parameters and result columns. + * + * Only descriptions matching the schema, procedure and parameter name criteria are returned. They are ordered by PROCEDURE_SCHEM and PROCEDURE_NAME. + * Within this, the return value, if any, is first. Next are the parameter descriptions in call order. The column descriptions follow in column number + * order. + * + * Each row in the {@link XResultSet} is a parameter description or column description with the following fields: + * + * 1. **PROCEDURE_CAT** string => procedure catalog (may be `NULL` ) 2. **PROCEDURE_SCHEM** string => procedure schema (may be `NULL` ) 3. + * **PROCEDURE_NAME** string => procedure name 4. **COLUMN_NAME** string => column/parameter name 5. **COLUMN_TYPE** Short => kind of column/parameter: + * UNKNOWN - nobody knowsIN - IN parameterINOUT - INOUT parameterOUT - OUT parameterRETURN - procedure return valueRESULT - result column in {@link + * XResultSet} 6. **DATA_TYPE** short => SQL type from java.sql.Types 7. **TYPE_NAME** string => SQL type name, for a UDT type the type name is fully + * qualified 8. **PRECISION** long => precision 9. **LENGTH** long => length in bytes of data 10. **SCALE** short => scale 11. **RADIX** short => radix + * 12. **NULLABLE** short => can it contain NULL? NO_NULLS - does not allow NULL valuesNULLABLE - allows NULL valuesNULLABLE_UNKNOWN - nullability + * unknown 13. **REMARKS** string => comment describing parameter/column + * + * **Note:** Some databases may not return the column descriptions for a procedure. Additional columns beyond REMARKS can be defined by the database. + * @param catalog a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria + * @param schemaPattern a schema name pattern; "" retrieves those without a schema + * @param procedureNamePattern a procedure name pattern + * @param columnNamePattern a column name pattern + * @returns each row describes a stored procedure parameter or column + * @throws SQLException if a database access error occurs. + */ + getProcedureColumns(catalog: any, schemaPattern: string, procedureNamePattern: string, columnNamePattern: string): XResultSet; + + /** + * Gets a description of the stored procedures available in a catalog. + * + * Only procedure descriptions matching the schema and procedure name criteria are returned. They are ordered by PROCEDURE_SCHEM, and PROCEDURE_NAME. + * + * Each procedure description has the following columns: + * + * 1. **PROCEDURE_CAT** string => procedure catalog (may be `NULL` ) 2. **PROCEDURE_SCHEM** string => procedure schema (may be `NULL` ) 3. + * **PROCEDURE_NAME** string => procedure name 4. reserved for future use 5. reserved for future use 6. reserved for future use 7. **REMARKS** string => + * explanatory comment on the procedure 8. **PROCEDURE_TYPE** short => kind of procedure: UNKNOWN - May return a resultNO - Does not return a + * resultRETURN - Returns a result + * @param catalog a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria + * @param schemaPattern a schema name pattern; "" retrieves those without a schema + * @param procedureNamePattern a procedure name pattern + * @returns each row is a procedure description + * @throws SQLException if a database access error occurs. + */ + getProcedures(catalog: any, schemaPattern: string, procedureNamePattern: string): XResultSet; + + /** + * return the database vendor's preferred term for "procedure" + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getProcedureTerm(): string; + + /** + * Gets the schema names available in this database. The results are ordered by schema name. + * + * The schema column is: + * + * 1. **TABLE_SCHEM** string => schema name + * @returns each row has a single String column that is a schema name + * @throws SQLException if a database access error occurs. + */ + getSchemas(): XResultSet; + + /** + * return the database vendor's preferred term for "schema" + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getSchemaTerm(): string; + + /** + * gets the string that can be used to escape wildcard characters. This is the string that can be used to escape "_" or "%" in the string pattern style + * catalog search parameters. + * + * The "_" character represents any single character. + * + * The "%" character represents any sequence of zero or more characters. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getSearchStringEscape(): string; + + /** + * gets a comma-separated list of all a database's SQL keywords that are NOT also SQL92 keywords. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getSQLKeywords(): string; + + /** + * gets a comma-separated list of string functions. These are the X/Open CLI string function names used in the SDBC function escape clause. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getStringFunctions(): string; + + /** + * gets a comma-separated list of system functions. These are the X/Open CLI system function names used in the SDBC function escape clause. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getSystemFunctions(): string; + + /** + * gets a description of the access rights for each table available in a catalog. Note that a table privilege applies to one or more columns in the + * table. It would be wrong to assume that this privilege applies to all columns (this may be `TRUE` for some systems but is not `TRUE` for all.) + * + * Only privileges matching the schema and table name criteria are returned. They are ordered by TABLE_SCHEM, TABLE_NAME, and PRIVILEGE. + * + * Each privilege description has the following columns: + * + * 1. **TABLE_CAT** string => table catalog (may be `NULL` ) 2. **TABLE_SCHEM** string => table schema (may be `NULL` ) 3. **TABLE_NAME** string => + * table name 4. **GRANTOR** => granter of access (may be `NULL` ) 5. **GRANTEE** string => grantee of access 6. **PRIVILEGE** string => name of access + * (SELECT, INSERT, UPDATE, REFERENCES, ...) 7. **IS_GRANTABLE** string => "YES" if grantee is permitted to grant to others; "NO" if not; `NULL` if + * unknown + * @param catalog a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria + * @param schemaPattern a schema name pattern; "" retrieves those without a schema + * @param tableNamePattern a table name pattern + * @returns each row is a table privilege description + * @throws SQLException if a database access error occurs. + */ + getTablePrivileges(catalog: any, schemaPattern: string, tableNamePattern: string): XResultSet; + + /** + * gets a description of tables available in a catalog. + * + * Only table descriptions matching the catalog, schema, table name, and type criteria are returned. They are ordered by TABLE_TYPE, TABLE_SCHEM, and + * TABLE_NAME. + * + * Each table description has the following columns: + * + * 1. **TABLE_CAT** string => table catalog (may be `NULL` ) 2. **TABLE_SCHEM** string => table schema (may be `NULL` ) 3. **TABLE_NAME** string => + * table name 4. **TABLE_TYPE** string => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", + * "SYNONYM". 5. **REMARKS** string => explanatory comment on the table + * + * **Note:** Some databases may not return information for all tables. + * @param catalog a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria + * @param schemaPattern a schema name pattern; "" retrieves those without a schema + * @param tableNamePattern a table name pattern + * @param types a list of table types to include + * @returns each row is a table description + * @throws SQLException if a database access error occurs. + */ + getTables(catalog: any, schemaPattern: string, tableNamePattern: string, types: LibreOffice.SeqEquiv): XResultSet; + + /** + * gets the table types available in this database. The results are ordered by table type. + * + * The table type is: + * + * 1. **TABLE_TYPE** string => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM". + * @returns each row has a single String column that is a table type + * @throws SQLException if a database access error occurs. + */ + getTableTypes(): XResultSet; + + /** + * gets a comma-separated list of time and date functions. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + getTimeDateFunctions(): string; + + /** + * gets a description of all the standard SQL types supported by this database. They are ordered by DATA_TYPE and then by how closely the data type maps + * to the corresponding SDBC SQL type. + * + * Each type description has the following columns: + * + * 1. **TYPE_NAME** string => Type name 2. **DATA_TYPE** short => SQL data type from java.sql.Types 3. **PRECISION** long => maximum precision 4. + * **LITERAL_PREFIX** string => prefix used to quote a literal (may be `NULL` ) 5. **LITERAL_SUFFIX** string => suffix used to quote a literal (may be + * `NULL` ) 6. **CREATE_PARAMS** string => parameters used in creating the type (may be `NULL` ) 7. **NULLABLE** short => can you use NULL for this type? + * NO_NULLS - does not allow NULL valuesNULLABLE - allows NULL valuesNULLABLE_UNKNOWN - nullability unknown 8. **CASE_SENSITIVE** boolean=> is it case + * sensitive? 9. **SEARCHABLE** short => can you use "WHERE" based on this type: NONE - No supportCHAR - Only supported with WHERE .. LIKEBASIC - + * Supported except for WHERE .. LIKEFULL - Supported for all WHERE .. 10. **UNSIGNED_ATTRIBUTE** boolean => is it unsigned? 11. **FIXED_PREC_SCALE** + * boolean => can it be a money value? 12. **AUTO_INCREMENT** boolean => can it be used for an auto-increment value? 13. **LOCAL_TYPE_NAME** string => + * localized version of type name (may be `NULL` ) 14. **MINIMUM_SCALE** short => minimum scale supported 15. **MAXIMUM_SCALE** short => maximum scale + * supported 16. **SQL_DATA_TYPE** long => unused 17. **SQL_DATETIME_SUB** long => unused 18. **NUM_PREC_RADIX** long => usually 2 or 10 + * @returns each row is a SQL type description + * @throws SQLException if a database access error occurs. + */ + getTypeInfo(): XResultSet; + + /** + * Gets a description of the user-defined types defined in a particular schema. Schema-specific UDTs may have type OBJECT, STRUCT, or DISTINCT. + * + * Only types matching the catalog, schema, type name, and type criteria are returned. They are ordered by DATA_TYPE, TYPE_SCHEM, and TYPE_NAME. The type + * name parameter may be a fully-qualified name. In this case, the catalog and schemaPattern parameters are ignored. + * + * Each type description has the following columns: + * + * 1. **TYPE_CAT** string => the type's catalog (may be `NULL` ) 2. **TYPE_SCHEM** string => type's schema (may be `NULL` ) 3. **TYPE_NAME** string => + * type name 4. **CLASS_NAME** string => Java class name or service name 5. **DATA_TYPE** string => type value. One of OBJECT, STRUCT, or DISTINCT 6. + * **REMARKS** string => explanatory comment on the type + * + * **Note:** If the driver does not support UDTs, an empty result set is returned. + * @param catalog a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria + * @param schemaPattern a schema name pattern; "" retrieves those without a schema + * @param typeNamePattern a type name pattern; may be a fully-qualified name + * @param types a list of user-named types to include (OBJECT, STRUCT, or DISTINCT) + * @returns each row is a type description + * @throws SQLException if a database access error occurs. + */ + getUDTs(catalog: any, schemaPattern: string, typeNamePattern: string, types: LibreOffice.SeqEquiv): XResultSet; + + /** returns the URL for the database connection */ + getURL(): string; + + /** returns the user name from this database connection. */ + getUserName(): string; + + /** + * gets a description of a table's columns that are automatically updated when any value in a row is updated. They are unordered. + * + * Each column description has the following columns: + * + * 1. **SCOPE** short => is not used 2. **COLUMN_NAME** string => column name 3. **DATA_TYPE** short => SQL data type from java.sql.Types 4. + * **TYPE_NAME** string => Data source dependent type name 5. **COLUMN_SIZE** long => precision 6. **BUFFER_LENGTH** long => length of column value in + * bytes 7. **DECIMAL_DIGITS** short => scale 8. **PSEUDO_COLUMN** short => is this a pseudo column like an Oracle ROWID UNKNOWN - may or may not be + * pseudo columnNOT_PSEUDO - is NOT a pseudo columnPSEUDO - is a pseudo column + * @param catalog a catalog name; "" retrieves those without a catalog; `VOID` means drop catalog name from the selection criteria + * @param schema a schema name; "" retrieves those without a schema + * @param table a table name + * @returns each row is a column description + * @throws SQLException if a database access error occurs. + */ + getVersionColumns(catalog: any, schema: string, table: string): XResultSet; + + /** + * What's the string used to quote SQL identifiers? This returns a space " " if identifier quoting is not supported. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly IdentifierQuoteString: string; + + /** + * indicates whether or not a visible row insert can be detected by calling {@link com.sun.star.sdbc.XResultSet.rowInserted()} .() + * @param setType defined in {@link com.sun.star.sdbc.ResultSetType} + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + insertsAreDetected(setType: number): boolean; + + /** + * Does a catalog appear at the start of a qualified table name? (Otherwise it appears at the end) + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + isCatalogAtStart(): boolean; + + /** + * checks if the database in read-only mode. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + isReadOnly(): boolean; + + /** + * return the maximal number of hex characters in an inline binary literal + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxBinaryLiteralLength: number; + + /** + * return the maximum length of a catalog name + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxCatalogNameLength: number; + + /** + * return the max length for a character literal + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxCharLiteralLength: number; + + /** + * return the limit on column name length + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxColumnNameLength: number; + + /** + * return the maximum number of columns in a "GROUP BY" clause + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxColumnsInGroupBy: number; + + /** + * return the maximum number of columns allowed in an index + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxColumnsInIndex: number; + + /** + * return the maximum number of columns in an "ORDER BY" clause + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxColumnsInOrderBy: number; + + /** + * return the maximum number of columns in a "SELECT" list + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxColumnsInSelect: number; + + /** + * return the maximum number of columns in a table + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxColumnsInTable: number; + + /** + * return the number of active connections at a time to this database. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxConnections: number; + + /** + * return the maximum cursor name length + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxCursorNameLength: number; + + /** + * return the maximum length of an index (in bytes) + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxIndexLength: number; + + /** + * return the maximum length of a procedure name + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxProcedureNameLength: number; + + /** + * return the maximum length of a single row. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxRowSize: number; + + /** + * return the maximum length allowed for a schema name + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxSchemaNameLength: number; + + /** + * return the maximum length of a SQL statement + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxStatementLength: number; + + /** + * return the maximal number of open active statements at one time to this database + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxStatements: number; + + /** + * return the maximum length of a table name + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxTableNameLength: number; + + /** + * return the maximum number of tables in a SELECT statement + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxTablesInSelect: number; + + /** + * return the maximum length of a user name + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly MaxUserNameLength: number; + + /** + * are concatenations between NULL and non-NULL values NULL? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + nullPlusNonNullIsNull(): boolean; + + /** + * Are NULL values sorted at the end, regardless of sort order? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + nullsAreSortedAtEnd(): boolean; + + /** + * Are NULL values sorted at the start regardless of sort order? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + nullsAreSortedAtStart(): boolean; + + /** + * Are NULL values sorted high? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + nullsAreSortedHigh(): boolean; + + /** + * Are NULL values sorted low? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + nullsAreSortedLow(): boolean; + + /** + * gets a comma-separated list of math functions. These are the X/Open CLI math function names used in the SDBC function escape clause. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly NumericFunctions: string; + + /** + * indicates whether deletes made by others are visible. + * @param setType defined in {@link com.sun.star.sdbc.ResultSetType} + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + othersDeletesAreVisible(setType: number): boolean; + + /** + * indicates whether inserts made by others are visible. + * @param setType defined in {@link com.sun.star.sdbc.ResultSetType} + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + othersInsertsAreVisible(setType: number): boolean; + + /** + * indicates whether updates made by others are visible. + * @param setType defined in {@link com.sun.star.sdbc.ResultSetType} + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + othersUpdatesAreVisible(setType: number): boolean; + + /** + * indicates whether a result set's own deletes are visible. + * @param setType defined in {@link com.sun.star.sdbc.ResultSetType} + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + ownDeletesAreVisible(setType: number): boolean; + + /** + * indicates whether a result set's own inserts are visible. + * @param setType defined in {@link com.sun.star.sdbc.ResultSetType} + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + ownInsertsAreVisible(setType: number): boolean; + + /** + * indicates whether a result set's own updates are visible. + * @param setType defined in {@link com.sun.star.sdbc.ResultSetType} + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + ownUpdatesAreVisible(setType: number): boolean; + + /** + * return the database vendor's preferred term for "procedure" + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly ProcedureTerm: string; + + /** + * Gets the schema names available in this database. The results are ordered by schema name. + * + * The schema column is: + * + * 1. **TABLE_SCHEM** string => schema name + * @returns each row has a single String column that is a schema name + * @throws SQLException if a database access error occurs. + */ + readonly Schemas: XResultSet; + + /** + * return the database vendor's preferred term for "schema" + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly SchemaTerm: string; + + /** + * gets the string that can be used to escape wildcard characters. This is the string that can be used to escape "_" or "%" in the string pattern style + * catalog search parameters. + * + * The "_" character represents any single character. + * + * The "%" character represents any sequence of zero or more characters. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly SearchStringEscape: string; + + /** + * gets a comma-separated list of all a database's SQL keywords that are NOT also SQL92 keywords. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly SQLKeywords: string; + + /** + * Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in lower case? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + storesLowerCaseIdentifiers(): boolean; + + /** + * Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in lower case? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + storesLowerCaseQuotedIdentifiers(): boolean; + + /** + * Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in mixed case? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + storesMixedCaseIdentifiers(): boolean; + + /** + * Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in mixed case? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + storesMixedCaseQuotedIdentifiers(): boolean; + + /** + * Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in upper case? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + storesUpperCaseIdentifiers(): boolean; + + /** + * Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in upper case? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + storesUpperCaseQuotedIdentifiers(): boolean; + + /** + * gets a comma-separated list of string functions. These are the X/Open CLI string function names used in the SDBC function escape clause. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly StringFunctions: string; + + /** + * support the Database "ALTER TABLE" with add column? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsAlterTableWithAddColumn(): boolean; + + /** + * support the Database "ALTER TABLE" with drop column? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsAlterTableWithDropColumn(): boolean; + + /** + * @returns `TRUE` , if the database supports ANSI92 entry level SQL grammar, otherwise `FALSE` . + * @throws SQLException if a database access error occurs. + */ + supportsANSI92EntryLevelSQL(): boolean; + + /** + * @returns `TRUE` , if the database supports ANSI92 full SQL grammar, otherwise `FALSE` . + * @throws SQLException if a database access error occurs. + */ + supportsANSI92FullSQL(): boolean; + + /** + * @returns `TRUE` , if the database supports ANSI92 intermediate SQL grammar, otherwise `FALSE` . + * @throws SQLException if a database access error occurs. + */ + supportsANSI92IntermediateSQL(): boolean; + + /** + * indicates whether the driver supports batch updates. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsBatchUpdates(): boolean; + + /** + * Can a catalog name be used in a data manipulation statement? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsCatalogsInDataManipulation(): boolean; + + /** + * Can a catalog name be used in an index definition statement? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsCatalogsInIndexDefinitions(): boolean; + + /** + * Can a catalog name be used in a privilege definition statement? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsCatalogsInPrivilegeDefinitions(): boolean; + + /** + * Can a catalog name be used in a procedure call statement? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsCatalogsInProcedureCalls(): boolean; + + /** + * Can a catalog name be used in a table definition statement? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsCatalogsInTableDefinitions(): boolean; + + /** + * support the Database column aliasing? + * + * The SQL AS clause can be used to provide names for computed columns or to provide alias names for columns as required. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsColumnAliasing(): boolean; + + /** + * `TRUE` , if the Database supports the CONVERT between the given SQL types otherwise `FALSE` . + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsConvert(fromType: number, toType: number): boolean; + + /** + * `TRUE` , if the database supports ODBC Core SQL grammar, otherwise `FALSE` . + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsCoreSQLGrammar(): boolean; + + /** + * Are correlated subqueries supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsCorrelatedSubqueries(): boolean; + + /** + * support the Database both data definition and data manipulation statements within a transaction? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsDataDefinitionAndDataManipulationTransactions(): boolean; + + /** + * are only data manipulation statements within a transaction supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsDataManipulationTransactionsOnly(): boolean; + + /** + * If table correlation names are supported, are they restricted to be different from the names of the tables? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsDifferentTableCorrelationNames(): boolean; + + /** + * Are expressions in "ORDER BY" lists supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsExpressionsInOrderBy(): boolean; + + /** + * `TRUE` , if the database supports ODBC Extended SQL grammar, otherwise `FALSE` . + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsExtendedSQLGrammar(): boolean; + + /** + * @returns `TRUE` , if full nested outer joins are supported, otherwise `FALSE` . + * @throws SQLException if a database access error occurs. + */ + supportsFullOuterJoins(): boolean; + + /** + * Is some form of "GROUP BY" clause supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsGroupBy(): boolean; + + /** + * Can a "GROUP BY" clause add columns not in the SELECT provided it specifies all the columns in the SELECT? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsGroupByBeyondSelect(): boolean; + + /** + * Can a "GROUP BY" clause use columns not in the SELECT? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsGroupByUnrelated(): boolean; + + /** + * returns `TRUE` , if the Database supports SQL Integrity Enhancement Facility, otherwise `FALSE` . + * @throws SQLException if a database access error occurs. + */ + supportsIntegrityEnhancementFacility(): boolean; + + /** + * Is the escape character in "LIKE" clauses supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsLikeEscapeClause(): boolean; + + /** + * @returns `TRUE` , if there is limited support for outer joins. (This will be `TRUE` if supportFullOuterJoins is `TRUE` .) `FALSE` is returned otherwise. + * @throws SQLException if a database access error occurs. + */ + supportsLimitedOuterJoins(): boolean; + + /** + * `TRUE` , if the database supports ODBC Minimum SQL grammar, otherwise `FALSE` . + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsMinimumSQLGrammar(): boolean; + + /** + * use the database "mixed case unquoted SQL identifiers" case sensitive. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsMixedCaseIdentifiers(): boolean; + + /** + * Does the database treat mixed case quoted SQL identifiers as case sensitive and as a result store them in mixed case? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsMixedCaseQuotedIdentifiers(): boolean; + + /** + * Are multiple XResultSets from a single execute supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsMultipleResultSets(): boolean; + + /** + * Can we have multiple transactions open at once (on different connections)? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsMultipleTransactions(): boolean; + + /** + * Can columns be defined as non-nullable? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsNonNullableColumns(): boolean; + + /** + * Can cursors remain open across commits? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsOpenCursorsAcrossCommit(): boolean; + + /** + * Can cursors remain open across rollbacks? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsOpenCursorsAcrossRollback(): boolean; + + /** + * Can statements remain open across commits? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsOpenStatementsAcrossCommit(): boolean; + + /** + * Can statements remain open across rollbacks? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsOpenStatementsAcrossRollback(): boolean; + + /** + * Can an "ORDER BY" clause use columns not in the SELECT statement? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsOrderByUnrelated(): boolean; + + /** + * @returns `TRUE` , if some form of outer join is supported, otherwise `FALSE` . + * @throws SQLException if a database access error occurs. + */ + supportsOuterJoins(): boolean; + + /** + * Is positioned DELETE supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsPositionedDelete(): boolean; + + /** + * Is positioned UPDATE supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsPositionedUpdate(): boolean; + + /** + * Does the database support the concurrency type in combination with the given result set type? + * @param setType defined in {@link com.sun.star.sdbc.ResultSetType} + * @param concurrency defined in {@link com.sun.star.sdbc.ResultSetConcurrency} + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsResultSetConcurrency(setType: number, concurrency: number): boolean; + + /** + * Does the database support the given result set type? + * @param setType defined in {@link com.sun.star.sdbc.ResultSetType} + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsResultSetType(setType: number): boolean; + + /** + * Can a schema name be used in a data manipulation statement? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsSchemasInDataManipulation(): boolean; + + /** + * Can a schema name be used in an index definition statement? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsSchemasInIndexDefinitions(): boolean; + + /** + * Can a schema name be used in a privilege definition statement? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsSchemasInPrivilegeDefinitions(): boolean; + + /** + * Can a schema name be used in a procedure call statement? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsSchemasInProcedureCalls(): boolean; + + /** + * Can a schema name be used in a table definition statement? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsSchemasInTableDefinitions(): boolean; + + /** + * Is SELECT for UPDATE supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsSelectForUpdate(): boolean; + + /** + * Are stored procedure calls using the stored procedure escape syntax supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsStoredProcedures(): boolean; + + /** + * Are subqueries in comparison expressions supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsSubqueriesInComparisons(): boolean; + + /** + * Are subqueries in "exists" expressions supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsSubqueriesInExists(): boolean; + + /** + * Are subqueries in "in" statements supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsSubqueriesInIns(): boolean; + + /** + * Are subqueries in quantified expressions supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsSubqueriesInQuantifieds(): boolean; + + /** + * Are table correlation names supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsTableCorrelationNames(): boolean; + + /** + * Does this database support the given transaction isolation level? + * @returns `TRUE` if so + * @see com.sun.star.sdbc.Connection + * @throws SQLException if a database access error occurs. + */ + supportsTransactionIsolationLevel(level: number): boolean; + + /** + * support the Database transactions? If not, invoking the method {@link com.sun.star.sdbc.XConnection.commit()} is a noop and the isolation level is + * TransactionIsolation_NONE. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsTransactions(): boolean; + + /** + * `TRUE` , if the Database supports the CONVERT function between SQL types, otherwise `FALSE` . + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsTypeConversion(): boolean; + + /** + * Is SQL UNION supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsUnion(): boolean; + + /** + * Is SQL UNION ALL supported? + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + supportsUnionAll(): boolean; + + /** + * gets a comma-separated list of system functions. These are the X/Open CLI system function names used in the SDBC function escape clause. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly SystemFunctions: string; + + /** + * gets the table types available in this database. The results are ordered by table type. + * + * The table type is: + * + * 1. **TABLE_TYPE** string => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM". + * @returns each row has a single String column that is a table type + * @throws SQLException if a database access error occurs. + */ + readonly TableTypes: XResultSet; + + /** + * gets a comma-separated list of time and date functions. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + readonly TimeDateFunctions: string; + + /** + * gets a description of all the standard SQL types supported by this database. They are ordered by DATA_TYPE and then by how closely the data type maps + * to the corresponding SDBC SQL type. + * + * Each type description has the following columns: + * + * 1. **TYPE_NAME** string => Type name 2. **DATA_TYPE** short => SQL data type from java.sql.Types 3. **PRECISION** long => maximum precision 4. + * **LITERAL_PREFIX** string => prefix used to quote a literal (may be `NULL` ) 5. **LITERAL_SUFFIX** string => suffix used to quote a literal (may be + * `NULL` ) 6. **CREATE_PARAMS** string => parameters used in creating the type (may be `NULL` ) 7. **NULLABLE** short => can you use NULL for this type? + * NO_NULLS - does not allow NULL valuesNULLABLE - allows NULL valuesNULLABLE_UNKNOWN - nullability unknown 8. **CASE_SENSITIVE** boolean=> is it case + * sensitive? 9. **SEARCHABLE** short => can you use "WHERE" based on this type: NONE - No supportCHAR - Only supported with WHERE .. LIKEBASIC - + * Supported except for WHERE .. LIKEFULL - Supported for all WHERE .. 10. **UNSIGNED_ATTRIBUTE** boolean => is it unsigned? 11. **FIXED_PREC_SCALE** + * boolean => can it be a money value? 12. **AUTO_INCREMENT** boolean => can it be used for an auto-increment value? 13. **LOCAL_TYPE_NAME** string => + * localized version of type name (may be `NULL` ) 14. **MINIMUM_SCALE** short => minimum scale supported 15. **MAXIMUM_SCALE** short => maximum scale + * supported 16. **SQL_DATA_TYPE** long => unused 17. **SQL_DATETIME_SUB** long => unused 18. **NUM_PREC_RADIX** long => usually 2 or 10 + * @returns each row is a SQL type description + * @throws SQLException if a database access error occurs. + */ + readonly TypeInfo: XResultSet; + + /** + * indicates whether or not a visible row update can be detected by calling the method `XResultSet.rowUpdated` . + * @param setType defined in {@link com.sun.star.sdbc.ResultSetType} + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + updatesAreDetected(setType: number): boolean; + + /** returns the URL for the database connection */ + readonly URL: string; + + /** returns the user name from this database connection. */ + readonly UserName: string; + + /** + * use the database one local file to save for each table. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + usesLocalFilePerTable(): boolean; + + /** + * use the database local files to save the tables. + * @returns `TRUE` if so + * @throws SQLException if a database access error occurs. + */ + usesLocalFiles(): boolean; + } + + /** extends the {@link XDatabaseMetaData} interface to allow retrieval of additional information. */ + interface XDatabaseMetaData2 extends XDatabaseMetaData { + /** + * complements {@link XDatabaseMetaData.getURL} by returning the settings which, upon construction of the connection, have been used besides the + * connection URL. + * @see XDriver.connect + */ + readonly ConnectionInfo: SafeArray; + + /** + * complements {@link XDatabaseMetaData.getURL} by returning the settings which, upon construction of the connection, have been used besides the + * connection URL. + * @see XDriver.connect + */ + getConnectionInfo(): SafeArray; + } + + /** + * is used for establishing connections via a factory which is identified by its name. A DataSource object is typically registered by a naming service + * provider. + */ + interface XDataSource extends uno.XInterface { + /** + * attempts to establish a database connection. + * @param user the user name + * @param password the password + * @returns the connection object + * @throws SQLException if a database access error occurs. + */ + getConnection(user: string, password: string): XConnection; + + /** + * gets the maximum time in seconds that this data source can wait while attempting to connect to a database. + * + * A value of zero means that the timeout is the default system timeout if there is one; otherwise, it means that there is no timeout. When a DataSource + * object is created the login timeout is initially zero. + * @returns the login time limit in seconds + * @throws SQLException if a database access error occurs. + */ + getLoginTimeout(): number; + + /** + * gets the maximum time in seconds that this data source can wait while attempting to connect to a database. + * + * A value of zero means that the timeout is the default system timeout if there is one; otherwise, it means that there is no timeout. When a DataSource + * object is created the login timeout is initially zero. + * @returns the login time limit in seconds + * @throws SQLException if a database access error occurs. + */ + LoginTimeout: number; + + /** + * sets the maximum time in seconds that this data source will wait while attempting to connect to a database. + * + * A value of zero specifies that the timeout is the default system timeout if there is one; otherwise, it specifies that there is no timeout. When a + * DataSource object is created the login timeout is initially zero. + * @param seconds the login time limit in seconds + * @throws SQLException if a database access error occurs. + */ + setLoginTimeout(seconds: number): void; + } + + /** + * is the interface that every driver class must implement. + * + * Each driver should supply a service that implements the {@link Driver} interface. + * + * The {@link DriverManager} will try to load as many drivers as it can find, and then for any given connection request, it will ask each driver in turn + * to try to connect to the target URL. + * + * It is strongly recommended that each {@link Driver} object should be small and standalone so that the {@link Driver} object can be loaded and queried + * without bringing in vast quantities of supporting code. + * @see com.sun.star.sdbc.XDriverManager + * @see com.sun.star.sdbc.XConnection + */ + interface XDriver extends uno.XInterface { + /** + * returns `TRUE` if the driver thinks that it can open a connection to the given URL. Typically drivers will return `TRUE` if they understand the + * subprotocol specified in the URL and `FALSE` if they do not. + * @param url is the URL of the database to which to connect. + * @returns `TRUE` if this driver can connect to the given URL. + * @throws SQLException if a database access error occurs. + */ + acceptsURL(url: string): boolean; + + /** + * attempts to make a database connection to the given URL. The driver should return `NULL` if it realizes it is the wrong kind of driver to connect to + * the given URL. This will be common, as when the driver manager is asked to connect to a given URL it passes the URL to each loaded driver in turn. + * + * The driver should raise a {@link com.sun.star.sdbc.SQLException} if it is the right driver to connect to the given URL, but has trouble connecting to + * the database. + * + * The info argument can be used to pass arbitrary string tag/value pairs as connection arguments. Normally at least "user" and "password" properties + * should be included in the Properties. For a JDBC driver also the Java class must be supplied in the property named JavaDriverClass, and a class path + * (a space-separated list of URLs) needed to locate that class can optionally be supplied in a property named JavaDriverClassPath. Possible property + * value names are when supported by the driver: + * @param url is the URL of the database to which to connect. + * @param info a list of arbitrary string tag/value pairs as connection arguments. Normally at least a "user" and "password" property should be included. + * @returns a {@link Connection} object that represents a connection to the URL + * @see com.sun.star.sdbc.ConnectionProperties + * @see com.sun.star.sdbc.ConnectionProperties + * @throws SQLException if a database access error occurs + */ + connect(url: string, info: LibreOffice.SeqEquiv): XConnection; + + /** + * gets the driver's major version number. Initially this should be 1. + * @returns this driver's major version number + */ + getMajorVersion(): number; + + /** + * gets the driver's minor version number. Initially this should be 0. + * @returns this driver's minor version number. + */ + getMinorVersion(): number; + + /** + * gets information about the possible properties for this driver. + * + * The getPropertyInfo method is intended to allow a generic GUI tool to discover what properties it should prompt a human for in order to get enough + * information to connect to a database. Note that depending on the values the human has supplied so far, additional values may become necessary, so it + * may be necessary to iterate though several calls to getPropertyInfo. + * @param url is the URL of the database to which to connect. + * @param info is a proposed list of tag/value pairs that will be sent on connect open. + * @returns an array of {@link DriverPropertyInfo} objects describing possible properties. This array may be an empty array if no properties are required. + * @throws SQLException if a database access error occurs. + */ + getPropertyInfo(url: string, info: LibreOffice.SeqEquiv): SafeArray; + + /** + * gets the driver's major version number. Initially this should be 1. + * @returns this driver's major version number + */ + readonly MajorVersion: number; + + /** + * gets the driver's minor version number. Initially this should be 0. + * @returns this driver's minor version number. + */ + readonly MinorVersion: number; + } + + /** + * provides the access of sdbc driver components + * @see com.sun.star.sdbc.XDriverManager + * @see com.sun.star.sdbc.XDriver + */ + interface XDriverAccess extends uno.XInterface { + /** + * get a driver which accepts a given url. + * @param url a database url of the form sdbc:subprotocol:subname + * @returns a {@link Driver} that can connect to the URL + * @see com.sun.star.sdbc.XDriver.acceptsURL + * @throws SQLException if a database access error occurs. + */ + getDriverByURL(url: string): XDriver; + } + + /** + * is the basic interface for managing a set of SDBC drivers. + * + * When the method {@link com.sun.star.sdbc.XDriverManager.getConnection()} is called, the {@link DriverManager} will attempt to locate a suitable + * driver. + * @see com.sun.star.sdbc.XDriver + * @see com.sun.star.sdbc.XConnection + */ + interface XDriverManager extends uno.XInterface { + /** + * attempts to establish a connection to the given database URL. The {@link DriverManager} attempts to select an appropriate driver from the set of + * registered JDBC/SDBC drivers. + * @param url a database url of the form sdbc:subprotocol:subname + * @returns the {@link Connection} object + * @throws SQLException if a database access error occurs. + */ + getConnection(url: string): XConnection; + + /** + * attempts to establish a connection to the given database URL. The {@link DriverManager} attempts to select an appropriate driver from the set of + * registered JDBC/SDBC drivers. + * @param url a database url of the form sdbc:subprotocol:subname + * @param info a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included + * @returns the {@link Connection} object + * @see com.sun.star.sdbc.ConnectionProperties + * @throws SQLException if a database access error occurs. + */ + getConnectionWithInfo(url: string, info: LibreOffice.SeqEquiv): XConnection; + + /** + * gets the maximum time in seconds that a driver can wait when attempting to login to a database. + * @returns the driver login time limit in seconds + * @throws SQLException if a database access error occurs. + */ + getLoginTimeout(): number; + + /** + * gets the maximum time in seconds that a driver can wait when attempting to login to a database. + * @returns the driver login time limit in seconds + * @throws SQLException if a database access error occurs. + */ + LoginTimeout: number; + + /** + * sets the maximum time in seconds that a driver will wait while attempting to connect to a database. + * @param seconds the login time limit in seconds + * @throws SQLException if a database access error occurs. + */ + setLoginTimeout(seconds: number): void; + } + + /** + * is the basic interface for managing a set of SDBC drivers. + * + * As part of its initialization, the {@link DriverManager} service will attempt to load the registered drivers. + * + * When the method `getConnection` is called, the {@link DriverManager} will attempt to locate a suitable driver. + * @see com.sun.star.sdbc.XDriver + * @see com.sun.star.sdbc.XConnection + * @since LibreOffice 4.0 + */ + interface XDriverManager2 extends XDriverManager, XDriverAccess, container.XEnumerationAccess { } + + /** + * provides a result set which gives access to automatically generated values after a new row was inserted. + * + * The relative order of columns in the result set returned by {@link getGeneratedValues()} must be the same as the relative order of the same columns as + * returned when executing a "SELECT * FROM table". This ensures that clients of this interface can reliably fetch the column values. + * @see com.sun.star.sdbc.Statement + * @see com.sun.star.sdbc.PreparedStatement + * @since OOo 1.1.2 + */ + interface XGeneratedResultSet extends uno.XInterface { + /** + * gives access to automatically generated values after a new row was inserted. + * @returns a result set that contains the data produced by the query + * @throws SQLException if a database access error occurs. + */ + readonly GeneratedValues: XResultSet; + + /** + * gives access to automatically generated values after a new row was inserted. + * @returns a result set that contains the data produced by the query + * @throws SQLException if a database access error occurs. + */ + getGeneratedValues(): XResultSet; + } + + /** + * is used for establishing isolated connections via a factory. + * + * The {@link XIsolatedConnection} allows to create connections which are not shared among others as it is the case when creating connections in normal + * way. + * @see com.sun.star.sdb.DataSource + * @since OOo 1.1.2 + */ + interface XIsolatedConnection extends uno.XInterface { + /** + * attempts to establish a database connection. + * @param user The user name. + * @param password The password. + * @returns A connection which is not shared. + * @throws com::sun::star::sdbc::SQLException when an error occurs. + */ + getIsolatedConnection(user: string, password: string): XConnection; + + /** + * attempts to establish a database connection. + * + * If information is missing, such as a user's password, they are completed by user interaction. + * @param handler The handler which ask for the needed information when they are missing. + * @returns A connection which is not shared. + * @throws com::sun::star::sdbc::SQLException when an error occurs. + */ + getIsolatedConnectionWithCompletion(handler: task.XInteractionHandler): XConnection; + } + + /** + * is used for inspecting multiple results produced by the execution of a SQL statement. + * + * Under some (uncommon) situations a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you + * are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string. The methods + * {@link com.sun.star.sdbc.XMultipleResults.getMoreResults()} , {@link com.sun.star.sdbc.XMultipleResults.getResultSet()} and {@link + * com.sun.star.sdbc.XMultipleResults.getUpdateCount()} let you navigate through multiple results. + * @see com.sun.star.sdbc.XStatement + * @see com.sun.star.sdbc.XPreparedStatement + */ + interface XMultipleResults extends uno.XInterface { + /** + * moves to a {@link Statement} 's next result. It returns `TRUE` if this result is a {@link ResultSet} . This method also implicitly closes any current + * {@link ResultSet} obtained with getResultSet. + * + * There are no more results when `(!getMoreResults() && getUpdateCount() == -1)` . + * @returns `TRUE` if there exists more {@link ResultSet} objects + * @throws SQLException if a database access error occurs. + */ + getMoreResults(): boolean; + + /** + * returns the current result as a {@link com.sun.star.sdbc.ResultSet} object. This method should be called only once per result. + * @returns the {@link ResultSet} object + * @throws SQLException if a database access error occurs. + */ + getResultSet(): XResultSet; + + /** + * returns the current result as an update count. + * + * If the result is a {@link ResultSet} or there are no more results, -1 is returned. This method should be called only once per result. + * @returns the current result as an update count. + * @throws SQLException if a database access error occurs. + */ + getUpdateCount(): number; + + /** + * moves to a {@link Statement} 's next result. It returns `TRUE` if this result is a {@link ResultSet} . This method also implicitly closes any current + * {@link ResultSet} obtained with getResultSet. + * + * There are no more results when `(!getMoreResults() && getUpdateCount() == -1)` . + * @returns `TRUE` if there exists more {@link ResultSet} objects + * @throws SQLException if a database access error occurs. + */ + readonly MoreResults: boolean; + + /** + * returns the current result as a {@link com.sun.star.sdbc.ResultSet} object. This method should be called only once per result. + * @returns the {@link ResultSet} object + * @throws SQLException if a database access error occurs. + */ + readonly ResultSet: XResultSet; + + /** + * returns the current result as an update count. + * + * If the result is a {@link ResultSet} or there are no more results, -1 is returned. This method should be called only once per result. + * @returns the current result as an update count. + * @throws SQLException if a database access error occurs. + */ + readonly UpdateCount: number; + } + + /** + * is used to register Out-Parameters for stored procedures. + * + * SDBC provides a stored procedure SQL escape that allows stored procedures to be called in a standard way for all RDBMSs. This escape syntax has one + * form that includes a result parameter and one that does not. If used, the result parameter must be registered as an OUT parameter. The other + * parameters can be used for input, output, or both. Parameters are referred to sequentially, by number. The first parameter is 1. + */ + interface XOutParameters extends uno.XInterface { + /** + * registers the OUT parameter in ordinal position `parameterIndex` to the SDBC type `sqlType` . All OUT parameters must be registered before a stored + * procedure is executed. + * + * The SDBC type specified by `sqlType` for an OUT parameter determines the type that must be used in the `get` method to read the value of that + * parameter. This version of {@link com.sun.star.sdbc.XOutParameters.registerOutParameter()} should be used when the parameter is of SDBC type {@link + * com.sun.star.sdbc.DataType.NUMERIC} or {@link com.sun.star.sdbc.DataType.DECIMAL} . + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param sqlType the type of the column to register + * @param scale the scale of the type + * @throws SQLException if a database access error occurs. + */ + registerNumericOutParameter(parameterIndex: number, sqlType: number, scale: number): void; + + /** + * registers the designated output parameter. This version of the method {@link com.sun.star.sdbc.XOutParameters.registerOutParameter()} should be used + * for a user-named or REF output parameter. Examples of user-named types include: STRUCT, DISTINCT, OBJECT, and named array types. + * + * Before executing a stored procedure call, you must explicitly call {@link com.sun.star.sdbc.XOutParameters.registerOutParameter()} to register the + * type from {@link com.sun.star.sdbc.DataType} for each OUT parameter. ; For a user-named parameter the fully-qualified SQL type name of the parameter + * should also be given, while a REF parameter requires that the fully-qualified type name of the referenced type be given. An SDBC driver that does not + * need the type code and type name information may ignore it. To be portable, however, applications should always provide these values for user-named + * and REF parameters. + * + * Although it is intended for user-named and REF parameters, this method may be used to register a parameter of any SDBC type. If the parameter does not + * have a user-named or REF type, the typeName parameter is ignored. + * + * **Note:** When reading the value of an out parameter, you must use the `getXXX` method whose type XXX corresponds to the parameter's registered SQL + * type. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param sqlType the type of the column to register + * @param typeName the name of the type + * @throws SQLException if a database access error occurs. + */ + registerOutParameter(parameterIndex: number, sqlType: number, typeName: string): void; + } + + /** + * is used for parameter setting, commonly implemented in conjunction with PreparedStatements. + * + * **Note:** The setXXX methods for setting IN parameter values must specify types that are compatible with the defined SQL type of the input parameter. + * For instance, if the IN parameter has SQL type Integer, then the method {@link com.sun.star.sdbc.XParameters.setInt()} should be used. + * + * If arbitrary parameter type conversions are required, the method {@link com.sun.star.sdbc.XParameters.setObject()} should be used with a target SQL + * type. ; ; Example of setting a parameter; `con` is an active connection. + * + * {{program example here, see documentation}} + * @see com.sun.star.sdbc.XPreparedStatement + */ + interface XParameters extends uno.XInterface { + /** + * clears the current parameter values immediately. + * + * In general, parameter values remain in force for repeated use of a {@link Statement} . Setting a parameter value automatically clears its previous + * value. However, in some cases it is useful to immediately release the resources used by the current parameter values; this can be done by calling + * clearParameters. + * @throws SQLException if a database access error occurs. + */ + clearParameters(): void; + + /** + * sets an Array parameter. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setArray(parameterIndex: number, x: XArray): void; + + /** + * sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large binary value is input to a + * LONGVARBINARY or LONGVARCHAR parameter, it may be more practical to send it via an {@link com.sun.star.io.XInputStream} . SDBC will read the data from + * the stream as needed, until it reaches end-of-file. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @param length the number of bytes in the stream + * @throws SQLException if a database access error occurs. + */ + setBinaryStream(parameterIndex: number, x: io.XInputStream, length: number): void; + + /** + * sets a BLOB parameter. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setBlob(parameterIndex: number, x: XBlob): void; + + /** + * sets the designated parameter to a boolean value. The driver converts this to a SQL BIT value when it sends it to the database. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setBoolean(parameterIndex: number, x: boolean): void; + + /** + * sets the designated parameter to a byte value. The driver converts this to a SQL TINYINT value when it sends it to the database. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setByte(parameterIndex: number, x: number): void; + + /** + * sets the designated parameter to a sequence of bytes. The driver converts this to a SQL VARBINARY or LONGVARBINARY (depending on the argument's size + * relative to the driver's limits on VARBINARYs) when it sends it to the database. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setBytes(parameterIndex: number, x: LibreOffice.SeqEquiv): void; + + /** + * sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large binary value is input to a + * LONGVARCHAR parameter, it may be more practical to send it via a {@link com.sun.star.io.XInputStream} . SDBC will read the data from the stream as + * needed, until it reaches end-of-file. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @param length the number of characters in the stream + * @throws SQLException if a database access error occurs. + */ + setCharacterStream(parameterIndex: number, x: io.XInputStream, length: number): void; + + /** + * sets a CLOB parameter. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setClob(parameterIndex: number, x: XClob): void; + + /** + * sets the designated parameter to a date value. The driver converts this to a SQL DATE value when it sends it to the database. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setDate(parameterIndex: number, x: util.Date): void; + + /** + * sets the designated parameter to a double value. The driver converts this to a SQL DOUBLE value when it sends it to the database. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setDouble(parameterIndex: number, x: number): void; + + /** + * sets the designated parameter to a float value. The driver converts this to a SQL FLOAT value when it sends it to the database. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setFloat(parameterIndex: number, x: number): void; + + /** + * sets the designated parameter to a long value. The driver converts this to a SQL INTEGER value when it sends it to the database. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setInt(parameterIndex: number, x: number): void; + + /** + * sets the designated parameter to a hyper value. The driver converts this to a SQL BIGINT value when it sends it to the database. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setLong(parameterIndex: number, x: number): void; + + /** sets the designated parameter to SQL NULL. */ + setNull(parameterIndex: number, sqlType: number): void; + + /** + * sets the value of a parameter using an any. + * + * The given object will be converted to the targetSqlType before being sent to the database. If the object has a custom mapping (is of a class + * implementing SQLData), the SDBC driver should call its method `writeSQL` to write it to the SQL data stream. If, on the other hand, the object is of a + * service implementing Ref, Blob, Clob, Struct, or Array, the driver should pass it to the database as a value of the corresponding SQL type. + * + * Note that this method may be used to pass database-specific abstract data types. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setObject(parameterIndex: number, x: any): void; + + /** + * sets the designated parameter to SQL NULL. This version of setNull should be used for user-named types and REF type parameters. Examples of user-named + * types include: STRUCT, DISTINCT, OBJECT, and named array types. + * + * **Note:** To be portable, applications must give the SQL type code and the fully-qualified SQL type name when specifying a NULL user-defined or REF + * parameter. In the case of a user-named type the name is the type name of the parameter itself. For a REF parameter the name is the type name of the + * referenced type. If a SDBC driver does not need the type code or type name information, it may ignore it. ; Although it is intended for user-named + * and Ref parameters, this method may be used to set a null parameter of any JDBC type. If the parameter does not have a user-named or REF type, the + * given typeName is ignored. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param sqlType the type of the column to set to `NULL` + * @param typeName the name of the type + * @throws SQLException if a database access error occurs. + */ + setObjectNull(parameterIndex: number, sqlType: number, typeName: string): void; + + /** + * set a value from the Datatype ANY for a parameter. + * + * The given object will be converted to the targetSqlType before being sent to the database. If the object has a custom mapping (is of a class + * implementing SQLData), the SDBC driver should call its method `writeSQL` to write it to the SQL data stream. If, on the other hand, the object is of a + * service implementing Ref, Blob, Clob, Struct, or Array, the driver should pass it to the database as a value of the corresponding SQL type. + * + * Note that this method may be used to pass database-specific abstract data types. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @param targetSqlType the SQL type (as defined in {@link com.sun.star.sdbc.DataType} ) to be sent to the database. The scale argument may further qualify + * @param scale for {@link com.sun.star.sdbc.DataType.DECIMAL} or {@link com.sun.star.sdbc.DataType.NUMERIC} types, this is the number of digits after the + * @throws SQLException if a database access error occurs. + */ + setObjectWithInfo(parameterIndex: number, x: any, targetSqlType: number, scale: number): void; + + /** + * sets a REF(<structured-type>) parameter. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setRef(parameterIndex: number, x: XRef): void; + + /** + * sets the designated parameter to a short value. The driver converts this to a SQL SMALLINT value when it sends it to the database. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setShort(parameterIndex: number, x: number): void; + + /** + * sets the designated parameter to a string value. The driver converts this to a SQL VARCHAR or LONGVARCHAR value (depending on the argument's size + * relative to the driver's limits on VARCHARs) when it sends it to the database. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setString(parameterIndex: number, x: string): void; + + /** + * sets the designated parameter to a time value. The driver converts this to a SQL TIME value when it sends it to the database. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setTime(parameterIndex: number, x: util.Time): void; + + /** + * sets the designated parameter to a datetime value. The driver converts this to a SQL TIMESTAMP value when it sends it to the database. + * @param parameterIndex the first parameter is 1, the second is 2, ... + * @param x the parameter value + * @throws SQLException if a database access error occurs. + */ + setTimestamp(parameterIndex: number, x: util.DateTime): void; + } + + /** + * defines a pooled connection which can share a unused connection. + * + *