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/implbase.hxx>
29 #include <cppuhelper/propshlp.hxx>
31 #include <comphelper/broadcasthelper.hxx>
32 #include <comphelper/uno3.hxx>
41 class InspectorModelProperties
;
43 //= ImplInspectorModel
45 typedef ::cppu::WeakImplHelper
< css::inspection::XObjectInspectorModel
46 , css::lang::XInitialization
47 , css::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
56 std::unique_ptr
< InspectorModelProperties
> m_pProperties
;
59 virtual ~ImplInspectorModel() override
;
65 DECLARE_XTYPEPROVIDER()
67 // css::beans::XPropertySet and friends
68 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
69 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() override
;
70 virtual sal_Bool SAL_CALL
convertFastPropertyValue( css::uno::Any
& rConvertedValue
, css::uno::Any
& rOldValue
, sal_Int32 nHandle
, const css::uno::Any
& rValue
) override
;
71 virtual void SAL_CALL
setFastPropertyValue_NoBroadcast( sal_Int32 nHandle
, const css::uno::Any
& rValue
) override
;
72 virtual void SAL_CALL
getFastPropertyValue( css::uno::Any
& rValue
, sal_Int32 nHandle
) const override
;
74 // css::inspection::XObjectInspectorModel
75 virtual sal_Bool SAL_CALL
getHasHelpSection() override
;
76 virtual ::sal_Int32 SAL_CALL
getMinHelpTextLines() override
;
77 virtual ::sal_Int32 SAL_CALL
getMaxHelpTextLines() override
;
78 virtual sal_Bool SAL_CALL
getIsReadOnly() override
;
79 virtual void SAL_CALL
setIsReadOnly( sal_Bool IsReadOnly
) override
;
81 // css::lang::XServiceInfo
82 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
85 void enableHelpSectionProperties( sal_Int32 _nMinHelpTextLines
, sal_Int32 _nMaxHelpTextLines
);
88 using ImplInspectorModel_PBase::getFastPropertyValue
;
95 #endif // INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_INSPECTORMODELBASE_HXX
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */