diff --git a/offapi/com/sun/star/form/component/CommandButton.idl b/offapi/com/sun/star/form/component/CommandButton.idl index d39a44ceb96a..ac01ea91c6f8 100644 --- a/offapi/com/sun/star/form/component/CommandButton.idl +++ b/offapi/com/sun/star/form/component/CommandButton.idl @@ -30,25 +30,12 @@ #ifndef __com_sun_star_form_component_CommandButton_idl__ #define __com_sun_star_form_component_CommandButton_idl__ -#ifndef __com_sun_star_form_FormControlModel_idl__ #include -#endif - -#ifndef __com_sun_star_awt_UnoControlButtonModel_idl__ #include -#endif - -#ifndef __com_sun_star_form_XImageProducerSupplier_idl__ #include -#endif - -#ifndef __com_sun_star_form_XApproveActionBroadcaster_idl__ #include -#endif - -#ifndef __com_sun_star_form_FormButtonType_idl__ #include -#endif +#include //============================================================================= @@ -101,6 +88,28 @@ published service CommandButton @see com::sun::star::form::FormButtonType */ [property] string TargetURL; + + /** specifies the default toggle state for the button, used when it is reset. + +

This property is meaningful only when UnoControlButtonModel::Toggle + is . 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 XReset must be present.

+ */ + [optional, property] boolean DefaultState; + + /** allows resetting the button + +

This property is meaningful only when UnoControlButtonModel::Toggle + is . In this case, the DefaultState controls to which State the button will + be reset, when XReset::reset is invoked.

+ +

For a given implementation of the interface, if this (optional) interface is present, then also the optional + property DefaultState must be present.

+ */ + [optional] interface ::com::sun::star::form::XReset; }; //============================================================================= diff --git a/offapi/com/sun/star/report/XReportControlFormat.idl b/offapi/com/sun/star/report/XReportControlFormat.idl index cf82c064270f..5a8e2a159780 100644 --- a/offapi/com/sun/star/report/XReportControlFormat.idl +++ b/offapi/com/sun/star/report/XReportControlFormat.idl @@ -30,21 +30,14 @@ #ifndef __com_sun_star_report_XReportControlFormat_idl__ #define __com_sun_star_report_XReportControlFormat_idl__ -#ifndef __com_sun_star_awt_FontDescriptor_idl__ #include -#endif -#ifndef __com_sun_star_util_Color_idl__ -#include -#endif -#ifndef __com_sun_star_beans_XPropertySet_idl__ -#include -#endif -#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ -#include -#endif -#include #include - +#include +#include +#include +#include +#include +#include //============================================================================= module com { module sun { module star { module report { @@ -70,15 +63,8 @@ interface XReportControlFormat get raises ( com::sun::star::beans::UnknownPropertyException ); }; - /** specifies the horizontal alignment of the text in the control. - -
-        0: left
-        1: center
-        2: right
-        
- - @since OOo 2.0.0 + /** specifies the horizontal alignment of the text. + @see ::com::sun::star::style::ParagraphAdjust */ [attribute,bound] short ParaAdjust { @@ -414,11 +400,12 @@ interface XReportControlFormat }; /** specifies the vertical alignment of the text in the control. - @see com::sun::star::text::ParagraphVertAlign + @see com::sun::star::style::VerticalAlignment */ - [attribute,bound] short ParaVertAlignment + [attribute,bound] com::sun::star::style::VerticalAlignment VerticalAlign { - set raises ( com::sun::star::lang::IllegalArgumentException ); + set raises ( com::sun::star::lang::IllegalArgumentException,com::sun::star::beans::UnknownPropertyException ); + get raises ( com::sun::star::beans::UnknownPropertyException ); }; //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/report/XReportEngine.idl b/offapi/com/sun/star/report/XReportEngine.idl index 9cdb03eec80b..99aec07d3fd9 100644 --- a/offapi/com/sun/star/report/XReportEngine.idl +++ b/offapi/com/sun/star/report/XReportEngine.idl @@ -153,6 +153,13 @@ interface XReportEngine /** specifies the status indicator which shows the progress of the report generation process. */ [attribute] com::sun::star::task::XStatusIndicator StatusIndicator; + + /** 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. + */ + [attribute,bound] long MaxRows; }; //============================================================================= diff --git a/offapi/com/sun/star/sdb/ErrorCondition.idl b/offapi/com/sun/star/sdb/ErrorCondition.idl index 0745739337c4..79fcd4c523f3 100644 --- a/offapi/com/sun/star/sdb/ErrorCondition.idl +++ b/offapi/com/sun/star/sdb/ErrorCondition.idl @@ -141,6 +141,20 @@ constants ErrorCondition database, which did not exist at that time. */ const long DB_NOT_CONNECTED = 304; + + // ======================================================================== + // = section AB - address book access related error conditions + // = + // = next section should start with 550 + + /** used by the component implementing address book access to indicate that a requested address book could + not be accessed. + +

For instance, this error code is used when you try to access the address book + in a Thunderbird profile named MyProfile, but there does not exist a profile + with this name.

+ */ + const long AB_ADDRESSBOOK_NOT_FOUND = 500; }; //============================================================================= diff --git a/offapi/com/sun/star/sdb/RowSet.idl b/offapi/com/sun/star/sdb/RowSet.idl index 01d3f0662919..fd860380fc28 100644 --- a/offapi/com/sun/star/sdb/RowSet.idl +++ b/offapi/com/sun/star/sdb/RowSet.idl @@ -216,7 +216,8 @@ published service RowSet the XParameters interface.
However, you can also choose to let an interaction handler supply such data. For this, you may for instance instantiate an InteractionHandler, which asks the user for the - data, or you may write your own one, which supplies the data from somewhere else.

+ data, or you may write your own one, which supplies the data from somewhere else. + The default implementation will only ask for parameters which aren't set before through the XParameters interface.

@see com::sun::star::sdb::InteractionHandler */ diff --git a/udkapi/com/sun/star/container/EnumerableMap.idl b/udkapi/com/sun/star/container/EnumerableMap.idl new file mode 100644 index 000000000000..c683a5abf210 --- /dev/null +++ b/udkapi/com/sun/star/container/EnumerableMap.idl @@ -0,0 +1,139 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef __com_sun_star_container_Map_idl__ +#define __com_sun_star_container_Map_idl__ + +#include +#include +#include + +//============================================================================= + +module com { module sun { module star { module container { + +//============================================================================= + +/** provides a default XEnumerableMap implementation + +

For the keys put into the map using XMap::put or createImmutable, + the following rules apply: + +

  • A 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 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 XMap::put or createImmutable, + the following rules apply: + +

  • The value will be accepted to be put into the map.

    +
  • If the value type's class is 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 TypeClass::EXCEPTION + or 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 + DisposedException being thrown.

+ + @see http://udk.openoffice.org/common/man/typesystem.html +*/ +service EnumerableMap : 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 TypeClass::VOID + and TypeClass::UNKNOWN are accepted. + For keys, scalar types, strings, Type itself, and interface + types are accepted. + */ + create( [in] type KeyType, [in] type ValueType ) + raises( ::com::sun::star::beans::IllegalTypeException ); + + /** 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 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 TypeClass::VOID + are accepted.
+ For keys, scalar types, strings, Type itself, and interface + types are accepted. + @throws ::com::sun::star::lang::IllegalArgumentException + if any of the given values or keys violates the key rules or + value rules. + */ + createImmutable( + [in] type KeyType, + [in] type ValueType, + [in] sequence< ::com::sun::star::beans::Pair< any, any > > Values + ) + raises( ::com::sun::star::beans::IllegalTypeException, + ::com::sun::star::lang::IllegalArgumentException ); +}; + +//============================================================================= + +}; }; }; }; + +//============================================================================= + +#endif diff --git a/udkapi/com/sun/star/container/XEnumerableMap.idl b/udkapi/com/sun/star/container/XEnumerableMap.idl new file mode 100644 index 000000000000..eac4222fc3f4 --- /dev/null +++ b/udkapi/com/sun/star/container/XEnumerableMap.idl @@ -0,0 +1,108 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef __com_sun_star_container_XEnumerableMap_idl__ +#define __com_sun_star_container_XEnumerableMap_idl__ + +#include +#include +#include + +//============================================================================= + +module com { module sun { module star { module container { + +//============================================================================= + +/** extends 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 NoSupportException + being thrown.

+ */ +interface XEnumerableMap : XMap +{ + /** 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. + */ + XEnumeration createKeyEnumeration( [in] boolean Isolated ) + raises ( ::com::sun::star::lang::NoSupportException ); + + /** 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. + */ + XEnumeration createValueEnumeration( [in] boolean Isolated ) + raises ( ::com::sun::star::lang::NoSupportException ); + + /** creates a enumerator for the key-value pairs of the map + +

The elements returned by the enumerator are instances of 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. + */ + XEnumeration createElementEnumeration( [in] boolean Isolated ) + raises ( ::com::sun::star::lang::NoSupportException ); +}; + +//============================================================================= + +}; }; }; }; + +//============================================================================= + +#endif diff --git a/udkapi/com/sun/star/container/XMap.idl b/udkapi/com/sun/star/container/XMap.idl new file mode 100644 index 000000000000..df05cf9f8c7b --- /dev/null +++ b/udkapi/com/sun/star/container/XMap.idl @@ -0,0 +1,201 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef __com_sun_star_container_XMap_idl__ +#define __com_sun_star_container_XMap_idl__ + +#include +#include +#include +#include +#include + +//============================================================================= + +module com { module sun { module star { module container { + +//============================================================================= + +/** 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, + 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 +{ + interface XElementAccess; + + /** denotes the type of the keys in the map. + +

Implementations are free to accept any supertype of KeyType as keys.

+ */ + [attribute, readonly] type KeyType; + + /** denotes the type of the values in the map. + +

Implementations are free to accept any supertype of the ValueType as values.

+ */ + [attribute, readonly] type ValueType; + + /** clears the map, removing all key-value pairs from it. + + @throws ::com::sun::star::beans::NoSupportException + if the map is not mutable. + */ + void clear() + raises( ::com::sun::star::lang::NoSupportException ); + + /** 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. + @return + 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 XMap interface to specify which special values are not + supported. For instances, implementations might decide to not allow keys, or + to reject Double.NaN (not a number) to due its problematic + behavior with respect to equality. + */ + boolean containsKey( [in] any Key ) + raises( ::com::sun::star::beans::IllegalTypeException, + ::com::sun::star::lang::IllegalArgumentException ); + + /** 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. + @return + 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 the XMap interface to specify which special values are not + supported. For instances, implementations might decide to not allow Double.NaN + (not a number) to due its problematic behavior with respect to equality. + @throws ::com::sun::star::lang::IllegalArgumentException + if the given value is not supported to be put into the map. + */ + boolean containsValue( [in] any Value ) + raises( ::com::sun::star::beans::IllegalTypeException, + ::com::sun::star::lang::IllegalArgumentException ); + + /** gets the value to which a given key maps. + + @param Key + they key whose associated value is to be returned. + @return + 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::beans::IllegalArgumentException + if the given key is not supported to be put into the map. It's up to the service + implementing the XMap interface to specify which special values are not + supported. For instances, implementations might decide to not allow keys, or + to reject Double.NaN (not a number) to due its problematic + behavior with respect to equality. + @throws ::com::sun::star::container::NoSuchElementException + if there is no value associated with the given key + */ + any get( [in] any Key ) + raises( ::com::sun::star::beans::IllegalTypeException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException ); + + /** 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 + @return + the value which was previously associated with the given key, or + 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 service implementing the XMap interface to specify which special values + are not supported.
+ For instances, implementations might decide to not allow keys or values, or to + reject Double.NaN (not a number) to due its problematic behavior + with respect to equality. + @throws ::com::sun::star::beans::NoSupportException + if the map does not support putting new mappings into it + */ + any put( [in] any Key, [in] any Value ) + raises( ::com::sun::star::lang::NoSupportException, + ::com::sun::star::beans::IllegalTypeException, + ::com::sun::star::lang::IllegalArgumentException ); + + /** removes a key-value mapping, given by key, from the map. + + @param Key + is the key whose mapping should be removed from the map + @return + 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 XMap interface to specify which special values are not + supported. For instances, implementations might decide to not allow keys, or + to reject Double.NaN (not a number) to due its problematic + behavior with respect to equality. + @throws ::com::sun::star::beans::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 + */ + any remove( [in] any Key ) + raises( ::com::sun::star::lang::NoSupportException, + ::com::sun::star::beans::IllegalTypeException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException ); +}; + +//============================================================================= + +}; }; }; }; + +//============================================================================= + +#endif diff --git a/udkapi/com/sun/star/container/makefile.mk b/udkapi/com/sun/star/container/makefile.mk index f78f3385670b..07b43627a00a 100644 --- a/udkapi/com/sun/star/container/makefile.mk +++ b/udkapi/com/sun/star/container/makefile.mk @@ -47,6 +47,7 @@ IDLFILES=\ XIdentifierContainer.idl\ ContainerEvent.idl\ ElementExistException.idl\ + EnumerableMap.idl\ NoSuchElementException.idl\ XChild.idl\ XUniqueIDAccess.idl\ @@ -59,6 +60,7 @@ IDLFILES=\ XContainerQuery.idl\ XContentEnumerationAccess.idl\ XElementAccess.idl\ + XEnumerableMap.idl\ XEnumeration.idl\ XEnumerationAccess.idl\ XHierarchicalName.idl\ @@ -71,6 +73,7 @@ IDLFILES=\ XIndexAccess.idl\ XIndexContainer.idl\ XIndexReplace.idl\ + XMap.idl\ XNameAccess.idl\ XNameContainer.idl\ XNamed.idl\