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 INSPECTORMODELBASE_HXX
21 #define 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>
27 #include <cppuhelper/implbase3.hxx>
28 #include <cppuhelper/propshlp.hxx>
30 #include <comphelper/broadcasthelper.hxx>
31 #include <comphelper/componentcontext.hxx>
32 #include <comphelper/uno3.hxx>
36 //........................................................................
39 //........................................................................
41 class InspectorModelProperties
;
42 //====================================================================
43 //= ImplInspectorModel
44 //====================================================================
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 ::comphelper::ComponentContext m_aContext
;
58 ::std::auto_ptr
< InspectorModelProperties
> m_pProperties
;
61 ~ImplInspectorModel();
64 ImplInspectorModel( const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxContext
);
67 DECLARE_XTYPEPROVIDER()
69 // ::com::sun::star::beans::XPropertySet and friends
70 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException
);
71 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
72 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
);
73 virtual void SAL_CALL
setFastPropertyValue_NoBroadcast( sal_Int32 nHandle
, const ::com::sun::star::uno::Any
& rValue
) throw (::com::sun::star::uno::Exception
);
74 virtual void SAL_CALL
getFastPropertyValue( ::com::sun::star::uno::Any
& rValue
, sal_Int32 nHandle
) const;
76 // ::com::sun::star::inspection::XObjectInspectorModel
77 virtual ::sal_Bool SAL_CALL
getHasHelpSection() throw (::com::sun::star::uno::RuntimeException
);
78 virtual ::sal_Int32 SAL_CALL
getMinHelpTextLines() throw (::com::sun::star::uno::RuntimeException
);
79 virtual ::sal_Int32 SAL_CALL
getMaxHelpTextLines() throw (::com::sun::star::uno::RuntimeException
);
80 virtual ::sal_Bool SAL_CALL
getIsReadOnly() throw (::com::sun::star::uno::RuntimeException
);
81 virtual void SAL_CALL
setIsReadOnly( ::sal_Bool _IsReadOnly
) throw (::com::sun::star::uno::RuntimeException
);
83 // ::com::sun::star::lang::XServiceInfo
84 virtual ::sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) throw (::com::sun::star::uno::RuntimeException
);
87 void enableHelpSectionProperties( sal_Int32 _nMinHelpTextLines
, sal_Int32 _nMaxHelpTextLines
);
90 using ImplInspectorModel_PBase::getFastPropertyValue
;
93 //........................................................................
95 //........................................................................
97 #endif // INSPECTORMODELBASE_HXX
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */