bump product version to 5.0.4.1
[LibreOffice.git] / extensions / source / propctrlr / xsdvalidationpropertyhandler.hxx
blobce23f78dad554960f302e1c402a695786810cbaa
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_XSDVALIDATIONPROPERTYHANDLER_HXX
21 #define INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_XSDVALIDATIONPROPERTYHANDLER_HXX
23 #include "propertyhandler.hxx"
25 #include <memory>
28 namespace pcr
32 class XSDValidationHelper;
34 //= XSDValidationPropertyHandler
36 class XSDValidationPropertyHandler;
37 typedef HandlerComponentBase< XSDValidationPropertyHandler > XSDValidationPropertyHandler_Base;
38 class XSDValidationPropertyHandler : public XSDValidationPropertyHandler_Base
40 private:
41 ::std::unique_ptr< XSDValidationHelper > m_pHelper;
43 public:
44 XSDValidationPropertyHandler(
45 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext
48 static OUString SAL_CALL getImplementationName_static( ) throw (::com::sun::star::uno::RuntimeException);
49 static ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_static( ) throw (::com::sun::star::uno::RuntimeException);
51 protected:
52 virtual ~XSDValidationPropertyHandler();
54 protected:
55 // XPropertyHandler overriables
56 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& _rPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
57 virtual void SAL_CALL setPropertyValue( const OUString& _rPropertyName, const ::com::sun::star::uno::Any& _rValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
58 virtual ::com::sun::star::uno::Sequence< OUString >
59 SAL_CALL getSupersededProperties( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
60 virtual ::com::sun::star::uno::Sequence< OUString >
61 SAL_CALL getActuatingProperties( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
62 virtual ::com::sun::star::inspection::LineDescriptor
63 SAL_CALL describePropertyLine( const 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, std::exception) SAL_OVERRIDE;
64 virtual ::com::sun::star::inspection::InteractiveSelectionResult
65 SAL_CALL onInteractivePropertySelection( const 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, std::exception) SAL_OVERRIDE;
66 virtual void SAL_CALL actuatingPropertyChanged( const 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, std::exception) SAL_OVERRIDE;
67 virtual void SAL_CALL addPropertyChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& _rxListener ) throw (::com::sun::star::lang::NullPointerException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
68 virtual void SAL_CALL removePropertyChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& _rxListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
70 // PropertyHandler overridables
71 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >
72 SAL_CALL doDescribeSupportedProperties() const SAL_OVERRIDE;
73 virtual void onNewComponent() SAL_OVERRIDE;
75 private:
76 bool implPrepareRemoveCurrentDataType();
77 bool implDoRemoveCurrentDataType();
79 bool implPrepareCloneDataCurrentType( OUString& _rNewName );
80 bool implDoCloneCurrentDataType( const OUString& _rNewName );
82 /** retrieves the names of the data types which our introspectee can be validated against
84 void implGetAvailableDataTypeNames( ::std::vector< OUString >& /* [out] */ _rNames ) const;
88 } // namespace pcr
91 #endif // INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_XSDVALIDATIONPROPERTYHANDLER_HXX
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */