1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef INSPECTORMODELBASE_HXX
29 #define INSPECTORMODELBASE_HXX
31 /** === begin UNO includes === **/
32 #include <com/sun/star/inspection/XObjectInspectorModel.hpp>
33 #include <com/sun/star/lang/XInitialization.hpp>
34 #include <com/sun/star/lang/XServiceInfo.hpp>
35 /** === end UNO includes === **/
37 #include <cppuhelper/implbase3.hxx>
38 #include <cppuhelper/propshlp.hxx>
40 #include <comphelper/broadcasthelper.hxx>
41 #include <comphelper/componentcontext.hxx>
42 #include <comphelper/uno3.hxx>
46 //........................................................................
49 //........................................................................
51 class InspectorModelProperties
;
52 //====================================================================
53 //= ImplInspectorModel
54 //====================================================================
55 typedef ::cppu::WeakImplHelper3
< ::com::sun::star::inspection::XObjectInspectorModel
56 , ::com::sun::star::lang::XInitialization
57 , ::com::sun::star::lang::XServiceInfo
58 > ImplInspectorModel_Base
;
59 typedef ::cppu::OPropertySetHelper ImplInspectorModel_PBase
;
61 class ImplInspectorModel
62 :public ::comphelper::OMutexAndBroadcastHelper
63 ,public ImplInspectorModel_Base
64 ,public ImplInspectorModel_PBase
67 ::comphelper::ComponentContext m_aContext
;
68 ::std::auto_ptr
< InspectorModelProperties
> m_pProperties
;
71 ~ImplInspectorModel();
74 ImplInspectorModel( const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxContext
);
77 DECLARE_XTYPEPROVIDER()
79 // ::com::sun::star::beans::XPropertySet and friends
80 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException
);
81 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
82 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
);
83 virtual void SAL_CALL
setFastPropertyValue_NoBroadcast( sal_Int32 nHandle
, const ::com::sun::star::uno::Any
& rValue
) throw (::com::sun::star::uno::Exception
);
84 virtual void SAL_CALL
getFastPropertyValue( ::com::sun::star::uno::Any
& rValue
, sal_Int32 nHandle
) const;
86 // ::com::sun::star::inspection::XObjectInspectorModel
87 virtual ::sal_Bool SAL_CALL
getHasHelpSection() throw (::com::sun::star::uno::RuntimeException
);
88 virtual ::sal_Int32 SAL_CALL
getMinHelpTextLines() throw (::com::sun::star::uno::RuntimeException
);
89 virtual ::sal_Int32 SAL_CALL
getMaxHelpTextLines() throw (::com::sun::star::uno::RuntimeException
);
90 virtual ::sal_Bool SAL_CALL
getIsReadOnly() throw (::com::sun::star::uno::RuntimeException
);
91 virtual void SAL_CALL
setIsReadOnly( ::sal_Bool _IsReadOnly
) throw (::com::sun::star::uno::RuntimeException
);
93 // ::com::sun::star::lang::XServiceInfo
94 virtual ::sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
) throw (::com::sun::star::uno::RuntimeException
);
97 void enableHelpSectionProperties( sal_Int32 _nMinHelpTextLines
, sal_Int32 _nMaxHelpTextLines
);
100 using ImplInspectorModel_PBase::getFastPropertyValue
;
103 //........................................................................
105 //........................................................................
107 #endif // INSPECTORMODELBASE_HXX