1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xsdvalidationpropertyhandler.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef EXTENSIONS_SOURCE_PROPCTRLR_XSDVALIDATIONPROPERTYHANDLER_HXX
32 #define EXTENSIONS_SOURCE_PROPCTRLR_XSDVALIDATIONPROPERTYHANDLER_HXX
34 #include "propertyhandler.hxx"
36 /** === begin UNO includes === **/
37 /** === end UNO includes === **/
41 //........................................................................
44 //........................................................................
46 class XSDValidationHelper
;
47 //====================================================================
48 //= XSDValidationPropertyHandler
49 //====================================================================
50 class XSDValidationPropertyHandler
;
51 typedef HandlerComponentBase
< XSDValidationPropertyHandler
> XSDValidationPropertyHandler_Base
;
52 class XSDValidationPropertyHandler
: public XSDValidationPropertyHandler_Base
55 ::std::auto_ptr
< XSDValidationHelper
> m_pHelper
;
58 XSDValidationPropertyHandler(
59 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxContext
62 static ::rtl::OUString SAL_CALL
getImplementationName_static( ) throw (::com::sun::star::uno::RuntimeException
);
63 static ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames_static( ) throw (::com::sun::star::uno::RuntimeException
);
66 ~XSDValidationPropertyHandler();
69 // XPropertyHandler overriables
70 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const ::rtl::OUString
& _rPropertyName
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
71 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& _rPropertyName
, const ::com::sun::star::uno::Any
& _rValue
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
72 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
>
73 SAL_CALL
getSupersededProperties( ) throw (::com::sun::star::uno::RuntimeException
);
74 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
>
75 SAL_CALL
getActuatingProperties( ) throw (::com::sun::star::uno::RuntimeException
);
76 virtual ::com::sun::star::inspection::LineDescriptor
77 SAL_CALL
describePropertyLine( const ::rtl::OUString
& _rPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::inspection::XPropertyControlFactory
>& _rxControlFactory
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::NullPointerException
, ::com::sun::star::uno::RuntimeException
);
78 virtual ::com::sun::star::inspection::InteractiveSelectionResult
79 SAL_CALL
onInteractivePropertySelection( const ::rtl::OUString
& _rPropertyName
, sal_Bool _bPrimary
, ::com::sun::star::uno::Any
& _rData
, const ::com::sun::star::uno::Reference
< ::com::sun::star::inspection::XObjectInspectorUI
>& _rxInspectorUI
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::NullPointerException
, ::com::sun::star::uno::RuntimeException
);
80 virtual void SAL_CALL
actuatingPropertyChanged( const ::rtl::OUString
& _rActuatingPropertyName
, const ::com::sun::star::uno::Any
& _rNewValue
, const ::com::sun::star::uno::Any
& _rOldValue
, const ::com::sun::star::uno::Reference
< ::com::sun::star::inspection::XObjectInspectorUI
>& _rxInspectorUI
, sal_Bool
) throw (::com::sun::star::lang::NullPointerException
, ::com::sun::star::uno::RuntimeException
);
81 virtual void SAL_CALL
addPropertyChangeListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& _rxListener
) throw (::com::sun::star::uno::RuntimeException
);
82 virtual void SAL_CALL
removePropertyChangeListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& _rxListener
) throw (::com::sun::star::uno::RuntimeException
);
84 // PropertyHandler overridables
85 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::Property
>
86 SAL_CALL
doDescribeSupportedProperties() const;
87 virtual void onNewComponent();
90 bool implPrepareRemoveCurrentDataType() SAL_THROW(());
91 bool implDoRemoveCurrentDataType() SAL_THROW(());
93 bool implPrepareCloneDataCurrentType( ::rtl::OUString
& _rNewName
) SAL_THROW(());
94 bool implDoCloneCurrentDataType( const ::rtl::OUString
& _rNewName
) SAL_THROW(());
96 /** retrieves the names of the data types which our introspectee can be validated against
98 void implGetAvailableDataTypeNames( ::std::vector
< ::rtl::OUString
>& /* [out] */ _rNames
) const SAL_THROW(());
101 //........................................................................
103 //........................................................................
105 #endif // EXTENSIONS_SOURCE_PROPCTRLR_XSDVALIDATIONPROPERTYHANDLER_HXX