update emoji autocorrect entries from po-files
[LibreOffice.git] / include / comphelper / propertycontainer.hxx
blob1561b61e816591a70fa563b257b9208fae68636e
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_COMPHELPER_PROPERTYCONTAINER_HXX
21 #define INCLUDED_COMPHELPER_PROPERTYCONTAINER_HXX
23 #include <comphelper/propertycontainerhelper.hxx>
24 #include <cppuhelper/propshlp.hxx>
25 #include <com/sun/star/uno/Type.hxx>
26 #include <comphelper/comphelperdllapi.h>
29 namespace comphelper
33 /** a OPropertySetHelper implementation which is just a simple container for properties represented
34 by class members, usually in a derived class.
35 <BR>
36 A restriction of this class is that no value conversions are made on a setPropertyValue call. Though
37 the base class supports this with the convertFastPropertyValue method, the OPropertyContainer accepts only
38 values which already have the correct type, it's unable to convert, for instance, a long to a short.
40 class COMPHELPER_DLLPUBLIC OPropertyContainer
41 :public cppu::OPropertySetHelper
42 ,public OPropertyContainerHelper
44 public:
45 // this dtor is needed otherwise we can get a wrong delete operator
46 virtual ~OPropertyContainer();
48 protected:
49 OPropertyContainer(::cppu::OBroadcastHelper& _rBHelper);
51 /// for scripting : the types of the interfaces supported by this class
52 static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > getBaseTypes() throw (::com::sun::star::uno::RuntimeException, std::exception);
54 // OPropertySetHelper overridables
55 virtual sal_Bool SAL_CALL convertFastPropertyValue(
56 ::com::sun::star::uno::Any & rConvertedValue,
57 ::com::sun::star::uno::Any & rOldValue,
58 sal_Int32 nHandle,
59 const ::com::sun::star::uno::Any& rValue )
60 throw (::com::sun::star::lang::IllegalArgumentException) SAL_OVERRIDE;
62 virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
63 sal_Int32 nHandle,
64 const ::com::sun::star::uno::Any& rValue
66 throw (::com::sun::star::uno::Exception,
67 std::exception) SAL_OVERRIDE;
69 using OPropertySetHelper::getFastPropertyValue;
70 virtual void SAL_CALL getFastPropertyValue(
71 ::com::sun::star::uno::Any& rValue,
72 sal_Int32 nHandle
73 ) const SAL_OVERRIDE;
75 // disambiguate a base class method (XFastPropertySet)
76 virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue )
77 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
81 } // namespace comphelper
84 #endif // INCLUDED_COMPHELPER_PROPERTYCONTAINER_HXX
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */