1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef INSPECTORMODELBASE_HXX
30 #define INSPECTORMODELBASE_HXX
32 /** === begin UNO includes === **/
33 #include <com/sun/star/inspection/XObjectInspectorModel.hpp>
34 #include <com/sun/star/lang/XInitialization.hpp>
35 #include <com/sun/star/lang/XServiceInfo.hpp>
36 /** === end UNO includes === **/
38 #include <cppuhelper/implbase3.hxx>
39 #include <cppuhelper/propshlp.hxx>
41 #include <comphelper/broadcasthelper.hxx>
42 #include <comphelper/componentcontext.hxx>
43 #include <comphelper/uno3.hxx>
47 //........................................................................
50 //........................................................................
52 class InspectorModelProperties
;
53 //====================================================================
54 //= ImplInspectorModel
55 //====================================================================
56 typedef ::cppu::WeakImplHelper3
< ::com::sun::star::inspection::XObjectInspectorModel
57 , ::com::sun::star::lang::XInitialization
58 , ::com::sun::star::lang::XServiceInfo
59 > ImplInspectorModel_Base
;
60 typedef ::cppu::OPropertySetHelper ImplInspectorModel_PBase
;
62 class ImplInspectorModel
63 :public ::comphelper::OMutexAndBroadcastHelper
64 ,public ImplInspectorModel_Base
65 ,public ImplInspectorModel_PBase
68 ::comphelper::ComponentContext m_aContext
;
69 ::std::auto_ptr
< InspectorModelProperties
> m_pProperties
;
72 ~ImplInspectorModel();
75 ImplInspectorModel( const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxContext
);
78 DECLARE_XTYPEPROVIDER()
80 // ::com::sun::star::beans::XPropertySet and friends
81 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException
);
82 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
83 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
);
84 virtual void SAL_CALL
setFastPropertyValue_NoBroadcast( sal_Int32 nHandle
, const ::com::sun::star::uno::Any
& rValue
) throw (::com::sun::star::uno::Exception
);
85 virtual void SAL_CALL
getFastPropertyValue( ::com::sun::star::uno::Any
& rValue
, sal_Int32 nHandle
) const;
87 // ::com::sun::star::inspection::XObjectInspectorModel
88 virtual ::sal_Bool SAL_CALL
getHasHelpSection() throw (::com::sun::star::uno::RuntimeException
);
89 virtual ::sal_Int32 SAL_CALL
getMinHelpTextLines() throw (::com::sun::star::uno::RuntimeException
);
90 virtual ::sal_Int32 SAL_CALL
getMaxHelpTextLines() throw (::com::sun::star::uno::RuntimeException
);
91 virtual ::sal_Bool SAL_CALL
getIsReadOnly() throw (::com::sun::star::uno::RuntimeException
);
92 virtual void SAL_CALL
setIsReadOnly( ::sal_Bool _IsReadOnly
) throw (::com::sun::star::uno::RuntimeException
);
94 // ::com::sun::star::lang::XServiceInfo
95 virtual ::sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
) throw (::com::sun::star::uno::RuntimeException
);
98 void enableHelpSectionProperties( sal_Int32 _nMinHelpTextLines
, sal_Int32 _nMaxHelpTextLines
);
101 using ImplInspectorModel_PBase::getFastPropertyValue
;
104 //........................................................................
106 //........................................................................
108 #endif // INSPECTORMODELBASE_HXX
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */