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 .
20 #ifndef INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_INSPECTORMODELBASE_HXX
21 #define INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_INSPECTORMODELBASE_HXX
23 #include <com/sun/star/inspection/XObjectInspectorModel.hpp>
24 #include <com/sun/star/lang/XInitialization.hpp>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <com/sun/star/uno/XComponentContext.hpp>
28 #include <cppuhelper/implbase3.hxx>
29 #include <cppuhelper/propshlp.hxx>
31 #include <comphelper/broadcasthelper.hxx>
32 #include <comphelper/uno3.hxx>
41 class InspectorModelProperties
;
43 //= ImplInspectorModel
45 typedef ::cppu::WeakImplHelper3
< ::com::sun::star::inspection::XObjectInspectorModel
46 , ::com::sun::star::lang::XInitialization
47 , ::com::sun::star::lang::XServiceInfo
48 > ImplInspectorModel_Base
;
49 typedef ::cppu::OPropertySetHelper ImplInspectorModel_PBase
;
51 class ImplInspectorModel
52 :public ::comphelper::OMutexAndBroadcastHelper
53 ,public ImplInspectorModel_Base
54 ,public ImplInspectorModel_PBase
57 ::std::unique_ptr
< InspectorModelProperties
> m_pProperties
;
60 virtual ~ImplInspectorModel();
66 DECLARE_XTYPEPROVIDER()
68 // ::com::sun::star::beans::XPropertySet and friends
69 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
70 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() SAL_OVERRIDE
;
71 virtual sal_Bool SAL_CALL
convertFastPropertyValue( ::com::sun::star::uno::Any
& rConvertedValue
, ::com::sun::star::uno::Any
& rOldValue
, sal_Int32 nHandle
, const ::com::sun::star::uno::Any
& rValue
) throw (::com::sun::star::lang::IllegalArgumentException
) SAL_OVERRIDE
;
72 virtual void SAL_CALL
setFastPropertyValue_NoBroadcast( sal_Int32 nHandle
, const ::com::sun::star::uno::Any
& rValue
) throw (::com::sun::star::uno::Exception
, std::exception
) SAL_OVERRIDE
;
73 virtual void SAL_CALL
getFastPropertyValue( ::com::sun::star::uno::Any
& rValue
, sal_Int32 nHandle
) const SAL_OVERRIDE
;
75 // ::com::sun::star::inspection::XObjectInspectorModel
76 virtual sal_Bool SAL_CALL
getHasHelpSection() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
77 virtual ::sal_Int32 SAL_CALL
getMinHelpTextLines() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
78 virtual ::sal_Int32 SAL_CALL
getMaxHelpTextLines() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
79 virtual sal_Bool SAL_CALL
getIsReadOnly() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
80 virtual void SAL_CALL
setIsReadOnly( sal_Bool _IsReadOnly
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
82 // ::com::sun::star::lang::XServiceInfo
83 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
86 void enableHelpSectionProperties( sal_Int32 _nMinHelpTextLines
, sal_Int32 _nMaxHelpTextLines
);
89 using ImplInspectorModel_PBase::getFastPropertyValue
;
96 #endif // INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_INSPECTORMODELBASE_HXX
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */