1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28#ifndef __com_sun_star_form_validation_ValidatableBindableControlModel_idl__ 29#define __com_sun_star_form_validation_ValidatableBindableControlModel_idl__ 30 31#ifndef __com_sun_star_form_validation_ValidatableControlModel_idl__ 32#include <com/sun/star/form/validation/ValidatableControlModel.idl> 33#endif 34 35#ifndef __com_sun_star_form_binding_BindableControlModel_idl__ 36#include <com/sun/star/form/binding/BindableControlModel.idl> 37#endif 38//============================================================================= 39 40module com { module sun { module star { module form { module validation { 41 42/** specifies a control model which supports both binding to an external value supplier, 43 and to an external validator. 44 45 <p>There are two methods how the value which is represented by a control model 46 can interact with other components (well, except the trivial ones accessible 47 by using <type scope="com::sun::star::beans">XPropertySet</type>): 48 <ul><li>binding the value to an external component via <type scope="com::sun::star::form::binding">XBindableValue</type></li> 49 <li>validating the current value by an external component, via <type>XValidatable</type> and <type>XValidator</type></li> 50 </ul></p> 51 52 <p>The <type>ValidatableBindableControlModel</type> services describes the interaction of these concepts 53 for control models which support both of them.</p> 54*/ 55service ValidatableBindableControlModel 56{ 57 /** specifies support for validating the current value of the control 58 */ 59 service ValidatableControlModel; 60 61 /** specifies support for binding the control value to an external component 62 63 <p>If a value binding is established at the control model (by using 64 <member scope="com::sun::star::form::binding">XBindableValue::setValueBinding</member> with a non-<NULL/> 65 binding), this binding is analyzed for validation support. If it is present (read: if the 66 binding also supports the <type>XValidator</type> interface), the binding is also 67 established as validator, as if it has been passed to <member>XValidatable::setValidator</member>.<br/> 68 If, while this binding is active (in both its roles as value binding and validator), 69 an attempt is made to establish another validator, this is blocked with raising a 70 <type scope="com::sun::star::util">VetoException</type> upon calling <member>XValidatable::setValidator</member>.</p> 71 */ 72 service com::sun::star::form::binding::BindableControlModel; 73}; 74 75//============================================================================= 76 77}; }; }; }; }; 78 79#endif 80