Update ooo320-m1
[ooovba.git] / reportdesign / source / ui / inc / DefaultInspection.hxx
blobffea56118c6436433a545a55b4f054c7543fb489
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: DefaultInspection.hxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef RPT_DEFAULTINSPECTION_HXX
31 #define RPT_DEFAULTINSPECTION_HXX
33 /** === begin UNO includes === **/
34 #include <com/sun/star/inspection/XObjectInspectorModel.hpp>
35 #include <com/sun/star/lang/XServiceInfo.hpp>
36 #include <com/sun/star/uno/XComponentContext.hpp>
37 #include <com/sun/star/lang/XInitialization.hpp>
38 /** === end UNO includes === **/
39 #include <cppuhelper/implbase3.hxx>
41 #include <memory>
43 //........................................................................
44 namespace rptui
46 //........................................................................
47 class OPropertyInfoService;
48 //====================================================================
49 //= DefaultComponentInspectorModel
50 //====================================================================
51 typedef ::cppu::WeakAggImplHelper3 < ::com::sun::star::inspection::XObjectInspectorModel
52 , ::com::sun::star::lang::XServiceInfo
53 , ::com::sun::star::lang::XInitialization
54 > DefaultComponentInspectorModel_Base;
55 class DefaultComponentInspectorModel : public DefaultComponentInspectorModel_Base
57 private:
58 ::osl::Mutex m_aMutex;
59 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
60 ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorModel > m_xComponent; /// delegatee
61 bool m_bConstructed;
62 bool m_bHasHelpSection;
63 sal_Bool m_bIsReadOnly;
64 sal_Int32 m_nMinHelpTextLines;
65 sal_Int32 m_nMaxHelpTextLines;
66 /// access to property meta data
67 ::std::auto_ptr< OPropertyInfoService > m_pInfoService;
69 DefaultComponentInspectorModel(const DefaultComponentInspectorModel&);
70 DefaultComponentInspectorModel& operator=(const DefaultComponentInspectorModel&);
71 protected:
72 virtual ~DefaultComponentInspectorModel();
74 // XServiceInfo
75 virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
76 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
77 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
79 // XObjectInspectorModel
80 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getHandlerFactories() throw (::com::sun::star::uno::RuntimeException);
81 virtual ::sal_Bool SAL_CALL getHasHelpSection() throw (::com::sun::star::uno::RuntimeException);
82 virtual ::sal_Int32 SAL_CALL getMinHelpTextLines() throw (::com::sun::star::uno::RuntimeException);
83 virtual ::sal_Int32 SAL_CALL getMaxHelpTextLines() throw (::com::sun::star::uno::RuntimeException);
84 virtual ::sal_Bool SAL_CALL getIsReadOnly() throw (::com::sun::star::uno::RuntimeException);
85 virtual void SAL_CALL setIsReadOnly( ::sal_Bool _isreadonly ) throw (::com::sun::star::uno::RuntimeException);
87 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::inspection::PropertyCategoryDescriptor > SAL_CALL describeCategories( ) throw (::com::sun::star::uno::RuntimeException);
88 virtual ::sal_Int32 SAL_CALL getPropertyOrderIndex( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::uno::RuntimeException);
90 // XInitialization
91 virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
93 public:
94 // XServiceInfo - static versions
95 static ::rtl::OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);
96 static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static( ) throw(::com::sun::star::uno::RuntimeException);
97 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
98 create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
100 public:
101 DefaultComponentInspectorModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext);
103 protected:
104 // Service constructors
105 void createDefault();
106 void createWithHelpSection( sal_Int32 _nMinHelpTextLines, sal_Int32 _nMaxHelpTextLines );
109 //........................................................................
110 } // namespace rptui
111 //........................................................................
113 #endif // RPT_DEFAULTINSPECTION_HXX