1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_beans_XPropertyWithState_idl__
20 #define __com_sun_star_beans_XPropertyWithState_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
24 #include
<com
/sun
/star
/beans
/PropertyState.idl
>
26 #include
<com
/sun
/star
/lang
/WrappedTargetException.idl
>
29 module com
{ module sun
{ module star
{ module beans
{
32 /** makes it possible to query information about the state of
33 this object, seen as a property contained in a property set.
35 <p> This interface provides direct access to operations
36 that are available if the containing property set
37 implements XPropertyState.
40 <p>The state contains the information if:</p>
42 <li>a value is available or void</li>
43 <li>the value is stored in the object itself, or if a default value is being used</li>
44 <li>or if the value cannot be determined, due to ambiguity
45 (multi selection with multiple values).</li>
48 <p> Generally objects that implement this interface
49 also implement XProperty.
52 published
interface XPropertyWithState
: com
::sun
::star
::uno
::XInterface
56 the state of this as a property.
58 com
::sun
::star
::beans
::PropertyState getStateAsProperty
( );
61 /** sets this to its default value.
63 <p> The value depends on the implementation of this interface.
64 If this is a bound property, the value changes before
65 the change events are fired. If this is a constrained property,
66 the vetoable event is fired before the property value changes.
69 @throws com::sun::star::lang::WrappedTargetException
70 if the implementation has an internal reason for the exception.
71 In this case the original exception is wrapped into that
72 com::sun::star::lang::WrappedTargetException.
74 void setToDefaultAsProperty
( )
75 raises
( com
::sun
::star
::lang
::WrappedTargetException
);
79 an object representing the default state of this object (as a property).
81 <p> If no default exists, is not known or is void,
82 then the return value is `NULL`.
85 @throws com::sun::star::lang::WrappedTargetException
86 if the implementation has an internal reason for the exception.
87 In this case the original exception is wrapped into that
88 com::sun::star::lang::WrappedTargetException.
90 com
::sun
::star
::uno
::XInterface getDefaultAsProperty
( )
91 raises
( com
::sun
::star
::lang
::WrappedTargetException
);
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */