1*9ee13d13SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*9ee13d13SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*9ee13d13SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*9ee13d13SAndrew Rist * distributed with this work for additional information 6*9ee13d13SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*9ee13d13SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*9ee13d13SAndrew Rist * "License"); you may not use this file except in compliance 9*9ee13d13SAndrew Rist * with the License. You may obtain a copy of the License at 10*9ee13d13SAndrew Rist * 11*9ee13d13SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*9ee13d13SAndrew Rist * 13*9ee13d13SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*9ee13d13SAndrew Rist * software distributed under the License is distributed on an 15*9ee13d13SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*9ee13d13SAndrew Rist * KIND, either express or implied. See the License for the 17*9ee13d13SAndrew Rist * specific language governing permissions and limitations 18*9ee13d13SAndrew Rist * under the License. 19*9ee13d13SAndrew Rist * 20*9ee13d13SAndrew Rist *************************************************************/ 21*9ee13d13SAndrew Rist 22*9ee13d13SAndrew Rist 23cdf0e10cSrcweir #ifndef RPT_DEFAULTINSPECTION_HXX 24cdf0e10cSrcweir #define RPT_DEFAULTINSPECTION_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir /** === begin UNO includes === **/ 27cdf0e10cSrcweir #include <com/sun/star/inspection/XObjectInspectorModel.hpp> 28cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 29cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp> 30cdf0e10cSrcweir #include <com/sun/star/lang/XInitialization.hpp> 31cdf0e10cSrcweir /** === end UNO includes === **/ 32cdf0e10cSrcweir #include <cppuhelper/implbase3.hxx> 33cdf0e10cSrcweir 34cdf0e10cSrcweir #include <memory> 35cdf0e10cSrcweir 36cdf0e10cSrcweir //........................................................................ 37cdf0e10cSrcweir namespace rptui 38cdf0e10cSrcweir { 39cdf0e10cSrcweir //........................................................................ 40cdf0e10cSrcweir class OPropertyInfoService; 41cdf0e10cSrcweir //==================================================================== 42cdf0e10cSrcweir //= DefaultComponentInspectorModel 43cdf0e10cSrcweir //==================================================================== 44cdf0e10cSrcweir typedef ::cppu::WeakAggImplHelper3 < ::com::sun::star::inspection::XObjectInspectorModel 45cdf0e10cSrcweir , ::com::sun::star::lang::XServiceInfo 46cdf0e10cSrcweir , ::com::sun::star::lang::XInitialization 47cdf0e10cSrcweir > DefaultComponentInspectorModel_Base; 48cdf0e10cSrcweir class DefaultComponentInspectorModel : public DefaultComponentInspectorModel_Base 49cdf0e10cSrcweir { 50cdf0e10cSrcweir private: 51cdf0e10cSrcweir ::osl::Mutex m_aMutex; 52cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; 53cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorModel > m_xComponent; /// delegatee 54cdf0e10cSrcweir bool m_bConstructed; 55cdf0e10cSrcweir bool m_bHasHelpSection; 56cdf0e10cSrcweir sal_Bool m_bIsReadOnly; 57cdf0e10cSrcweir sal_Int32 m_nMinHelpTextLines; 58cdf0e10cSrcweir sal_Int32 m_nMaxHelpTextLines; 59cdf0e10cSrcweir /// access to property meta data 60cdf0e10cSrcweir ::std::auto_ptr< OPropertyInfoService > m_pInfoService; 61cdf0e10cSrcweir 62cdf0e10cSrcweir DefaultComponentInspectorModel(const DefaultComponentInspectorModel&); 63cdf0e10cSrcweir DefaultComponentInspectorModel& operator=(const DefaultComponentInspectorModel&); 64cdf0e10cSrcweir protected: 65cdf0e10cSrcweir virtual ~DefaultComponentInspectorModel(); 66cdf0e10cSrcweir 67cdf0e10cSrcweir // XServiceInfo 68cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); 69cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); 70cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); 71cdf0e10cSrcweir 72cdf0e10cSrcweir // XObjectInspectorModel 73cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getHandlerFactories() throw (::com::sun::star::uno::RuntimeException); 74cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL getHasHelpSection() throw (::com::sun::star::uno::RuntimeException); 75cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getMinHelpTextLines() throw (::com::sun::star::uno::RuntimeException); 76cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getMaxHelpTextLines() throw (::com::sun::star::uno::RuntimeException); 77cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL getIsReadOnly() throw (::com::sun::star::uno::RuntimeException); 78cdf0e10cSrcweir virtual void SAL_CALL setIsReadOnly( ::sal_Bool _isreadonly ) throw (::com::sun::star::uno::RuntimeException); 79cdf0e10cSrcweir 80cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::inspection::PropertyCategoryDescriptor > SAL_CALL describeCategories( ) throw (::com::sun::star::uno::RuntimeException); 81cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getPropertyOrderIndex( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::uno::RuntimeException); 82cdf0e10cSrcweir 83cdf0e10cSrcweir // XInitialization 84cdf0e10cSrcweir 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); 85cdf0e10cSrcweir 86cdf0e10cSrcweir public: 87cdf0e10cSrcweir // XServiceInfo - static versions 88cdf0e10cSrcweir static ::rtl::OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException); 89cdf0e10cSrcweir static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static( ) throw(::com::sun::star::uno::RuntimeException); 90cdf0e10cSrcweir static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL 91cdf0e10cSrcweir create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&); 92cdf0e10cSrcweir 93cdf0e10cSrcweir public: 94cdf0e10cSrcweir DefaultComponentInspectorModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext); 95cdf0e10cSrcweir 96cdf0e10cSrcweir protected: 97cdf0e10cSrcweir // Service constructors 98cdf0e10cSrcweir void createDefault(); 99cdf0e10cSrcweir void createWithHelpSection( sal_Int32 _nMinHelpTextLines, sal_Int32 _nMaxHelpTextLines ); 100cdf0e10cSrcweir }; 101cdf0e10cSrcweir 102cdf0e10cSrcweir //........................................................................ 103cdf0e10cSrcweir } // namespace rptui 104cdf0e10cSrcweir //........................................................................ 105cdf0e10cSrcweir 106cdf0e10cSrcweir #endif // RPT_DEFAULTINSPECTION_HXX 107cdf0e10cSrcweir 108