LCOV - code coverage report
Current view: top level - extensions/source/propctrlr - propcontroller.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 4 0.0 %
Date: 2014-04-14 Functions: 0 3 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef _EXTENSIONS_PROPCTRLR_PROPCONTROLLER_HXX_
      21             : #define _EXTENSIONS_PROPCTRLR_PROPCONTROLLER_HXX_
      22             : 
      23             : #include "composeduiupdate.hxx"
      24             : #include "formbrowsertools.hxx"
      25             : #include "formmetadata.hxx"
      26             : #include "proplinelistener.hxx"
      27             : #include "propcontrolobserver.hxx"
      28             : #include "browserview.hxx"
      29             : #include "modulepcr.hxx"
      30             : #include "propertyinfo.hxx"
      31             : 
      32             : #include <com/sun/star/awt/XFocusListener.hpp>
      33             : #include <com/sun/star/beans/XPropertyState.hpp>
      34             : #include <com/sun/star/beans/XPropertySet.hpp>
      35             : #include <com/sun/star/beans/XPropertyChangeListener.hpp>
      36             : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
      37             : #include <com/sun/star/uno/XComponentContext.hpp>
      38             : #include <com/sun/star/form/XForm.hpp>
      39             : #include <com/sun/star/script/XEventAttacherManager.hpp>
      40             : #include <com/sun/star/sdbc/XRowSet.hpp>
      41             : #include <com/sun/star/uno/Sequence.hxx>
      42             : #include <com/sun/star/frame/XController.hpp>
      43             : #include <com/sun/star/lang/XServiceInfo.hpp>
      44             : #include <com/sun/star/lang/XEventListener.hpp>
      45             : #include <com/sun/star/sdbc/XConnection.hpp>
      46             : #include <com/sun/star/awt/XLayoutConstrains.hpp>
      47             : #include <com/sun/star/awt/XControlContainer.hpp>
      48             : #include <com/sun/star/inspection/XPropertyControlFactory.hpp>
      49             : #include <com/sun/star/inspection/XObjectInspector.hpp>
      50             : #include <com/sun/star/inspection/XObjectInspectorUI.hpp>
      51             : #include <com/sun/star/inspection/XPropertyHandler.hpp>
      52             : #include <com/sun/star/lang/XInitialization.hpp>
      53             : #include <connectivity/dbtools.hxx>
      54             : #include <cppuhelper/interfacecontainer.hxx>
      55             : #include <cppuhelper/implbase7.hxx>
      56             : #include <comphelper/broadcasthelper.hxx>
      57             : 
      58             : #include <map>
      59             : #include <boost/unordered_map.hpp>
      60             : #include <vector>
      61             : #include <memory>
      62             : 
      63             : class Window;
      64             : 
      65             : 
      66             : namespace pcr
      67             : {
      68             : 
      69             : 
      70             :     class OPropertyEditor;
      71             :     struct OLineDescriptor;
      72             : 
      73             :     // #95343#------------------------------------------------------------------------------------
      74             :     typedef ::cppu::WeakImplHelper7 <   ::com::sun::star::lang::XServiceInfo
      75             :                                     ,   ::com::sun::star::awt::XFocusListener
      76             :                                     ,   ::com::sun::star::awt::XLayoutConstrains
      77             :                                     ,   ::com::sun::star::beans::XPropertyChangeListener
      78             :                                     ,   ::com::sun::star::inspection::XPropertyControlFactory
      79             :                                     ,   ::com::sun::star::inspection::XObjectInspector
      80             :                                     ,   ::com::sun::star::lang::XInitialization
      81             :                                     >   OPropertyBrowserController_Base;
      82             : 
      83             :     class OPropertyBrowserController
      84             :                 :public ::comphelper::OMutexAndBroadcastHelper
      85             :                 ,public OPropertyBrowserController_Base
      86             :                 ,public ::com::sun::star::inspection::XObjectInspectorUI
      87             :                     // that's intentionally *not* part of the OPropertyBrowserController_Base
      88             :                     // We do not want this to be available in queryInterface, getTypes, and the like.
      89             :                 ,public IPropertyLineListener
      90             :                 ,public IPropertyControlObserver
      91             :                 ,public IPropertyExistenceCheck
      92             :     {
      93             :     private:
      94             :         typedef ::std::multimap< sal_Int32, ::com::sun::star::beans::Property >  OrderedPropertyMap;
      95             :         typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >
      96             :                                                                             InterfaceArray;
      97             : 
      98             :     protected:
      99             :         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
     100             : 
     101             :     private:
     102             :         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
     103             :         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >  m_xView;
     104             : 
     105             :         ::cppu::OInterfaceContainerHelper   m_aDisposeListeners;
     106             :         ::cppu::OInterfaceContainerHelper   m_aControlObservers;
     107             :         // meta data about the properties
     108             :         OPropertyBrowserView*               m_pView;
     109             : 
     110             :         OUString                     m_sPageSelection;
     111             :         OUString                     m_sLastValidPageSelection;
     112             : 
     113             :         typedef ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >
     114             :                                                         PropertyHandlerRef;
     115             :         typedef ::std::vector< PropertyHandlerRef >     PropertyHandlerArray;
     116             :         typedef ::boost::unordered_map< OUString, PropertyHandlerRef, OUStringHash >
     117             :                                                         PropertyHandlerRepository;
     118             :         typedef ::boost::unordered_multimap< OUString, PropertyHandlerRef, OUStringHash >
     119             :                                                         PropertyHandlerMultiRepository;
     120             :         PropertyHandlerRepository                       m_aPropertyHandlers;
     121             :         PropertyHandlerMultiRepository                  m_aDependencyHandlers;
     122             :         PropertyHandlerRef                              m_xInteractiveHandler;
     123             : 
     124             :         ::std::auto_ptr< ComposedPropertyUIUpdate >     m_pUIRequestComposer;
     125             : 
     126             :         /// our InspectorModel
     127             :         ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorModel >
     128             :                                                         m_xModel;
     129             :         /// the object(s) we're currently inspecting
     130             :         InterfaceArray                                  m_aInspectedObjects;
     131             :         /// the properties of the currently inspected object(s)
     132             :         OrderedPropertyMap                              m_aProperties;
     133             :         /// the property we're just committing
     134             :         OUString                                 m_sCommittingProperty;
     135             : 
     136             :         typedef ::boost::unordered_map< OUString, sal_uInt16, OUStringHash >     HashString2Int16;
     137             :         HashString2Int16                                m_aPageIds;
     138             : 
     139             :         bool        m_bContainerFocusListening;
     140             :         bool        m_bSuspendingPropertyHandlers;
     141             :         bool        m_bConstructed;
     142             :         bool        m_bBindingIntrospectee;
     143             : 
     144             :     protected:
     145             :         DECLARE_XINTERFACE()
     146             : 
     147             :         // XServiceInfo
     148             :         virtual OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     149             :         virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     150             :         virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     151             : 
     152             :         // XController
     153             :         virtual void SAL_CALL attachFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     154             :         virtual sal_Bool SAL_CALL attachModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     155             :         virtual sal_Bool SAL_CALL suspend( sal_Bool bSuspend ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     156             :         virtual ::com::sun::star::uno::Any SAL_CALL getViewData(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     157             :         virtual void SAL_CALL restoreViewData( const ::com::sun::star::uno::Any& Data ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     158             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL getModel(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     159             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     160             : 
     161             :         // XComponent
     162             :         virtual void SAL_CALL dispose(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     163             :         virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     164             :         virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     165             : 
     166             :         // XFocusListener
     167             :         virtual void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent& _rSource ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     168             :         virtual void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& _rSource ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     169             : 
     170             :         // XEventListener
     171             :         virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     172             : 
     173             :         // XLayoutConstrains #95343# ----------------
     174             :         virtual ::com::sun::star::awt::Size SAL_CALL getMinimumSize(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     175             :         virtual ::com::sun::star::awt::Size SAL_CALL getPreferredSize(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     176             :         virtual ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     177             : 
     178             :         // XPropertyChangeListener
     179             :         virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& _rEvent ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     180             : 
     181             :         /** XPropertyControlFactory
     182             :         */
     183             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl > SAL_CALL createPropertyControl( ::sal_Int16 ControlType, sal_Bool CreateReadOnly ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     184             : 
     185             :     public:
     186             :         OPropertyBrowserController(
     187             :             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext);
     188             : 
     189             :     protected:
     190             :         virtual ~OPropertyBrowserController();
     191             : 
     192             :     public:
     193             :         // XServiceInfo - static versions
     194             :         static OUString getImplementationName_static(  ) throw(::com::sun::star::uno::RuntimeException);
     195             :         static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_static(  ) throw(::com::sun::star::uno::RuntimeException);
     196             :         static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
     197             :                         Create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
     198             : 
     199             :     protected:
     200             :         // IPropertyLineListener
     201             :         virtual void    Clicked(    const OUString& _rName, sal_Bool _bPrimary ) SAL_OVERRIDE;
     202             :         virtual void    Commit(     const OUString& _rName, const ::com::sun::star::uno::Any& _rVal ) SAL_OVERRIDE;
     203             : 
     204             :         // IPropertyControlObserver
     205             :         virtual void    focusGained( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& _Control ) SAL_OVERRIDE;
     206             :         virtual void    valueChanged( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& _Control ) SAL_OVERRIDE;
     207             : 
     208             :         // IPropertyExistenceCheck
     209             :         virtual sal_Bool SAL_CALL hasPropertyByName( const OUString& _rName ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
     210             : 
     211             :         // XObjectInspectorUI
     212             :         virtual void SAL_CALL enablePropertyUI( const OUString& _rPropertyName, sal_Bool _bEnable ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     213             :         virtual void SAL_CALL enablePropertyUIElements( const OUString& _rPropertyName, ::sal_Int16 _nElements, sal_Bool _bEnable ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     214             :         virtual void SAL_CALL rebuildPropertyUI( const OUString& _rPropertyName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     215             :         virtual void SAL_CALL showPropertyUI( const OUString& _rPropertyName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     216             :         virtual void SAL_CALL hidePropertyUI( const OUString& _rPropertyName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     217             :         virtual void SAL_CALL showCategory( const OUString& _rCategory, sal_Bool _bShow ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     218             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl > SAL_CALL getPropertyControl( const OUString& _rPropertyName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     219             :         virtual void SAL_CALL registerControlObserver( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlObserver >& _Observer ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     220             :         virtual void SAL_CALL revokeControlObserver( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlObserver >& _Observer ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     221             :         virtual void SAL_CALL setHelpSectionText( const OUString& HelpText ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     222             : 
     223             :         // XObjectInspector
     224             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorModel > SAL_CALL getInspectorModel() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     225             :         virtual void SAL_CALL setInspectorModel( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorModel >& _inspectormodel ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     226             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI > SAL_CALL getInspectorUI() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     227             :         virtual void SAL_CALL inspect( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >& Objects ) throw (::com::sun::star::util::VetoException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     228             : 
     229             :         // XDispatchProvider
     230             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& URL, const OUString& TargetFrameName, ::sal_Int32 SearchFlags ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     231             :         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& Requests ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     232             : 
     233             :         // XInitialization
     234             :         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, std::exception) SAL_OVERRIDE;
     235             : 
     236             :     private:
     237             :         void UpdateUI();
     238             : 
     239             :         void startContainerWindowListening();
     240             :         void stopContainerWindowListening();
     241             : 
     242             :         // stop the inspection
     243             :         void stopInspection( bool _bCommitModified );
     244             : 
     245           0 :         sal_Bool haveView() const { return NULL != m_pView; }
     246           0 :         OPropertyEditor&    getPropertyBox() { return m_pView->getPropertyBox(); }
     247             : 
     248             :         // does the inspection of the objects as indicated by our model
     249             :         void doInspection();
     250             : 
     251             :         // bind the browser to m_xIntrospecteeAsProperty
     252             :         void    impl_rebindToInspectee_nothrow( const InterfaceArray& _rObjects );
     253             : 
     254             :         /** retrieves special property handlers for our introspectee
     255             :         */
     256             :         void    getPropertyHandlers( const InterfaceArray& _rObjects, PropertyHandlerArray& _rHandlers );
     257             : 
     258             :         /** called when a property changed, to broadcast any handlers which might have
     259             :             registered for this property
     260             : 
     261             :             @param _bFirstTimeInit
     262             :                 if set to <FALSE/>, this is a real change in the property value, not just a call
     263             :                 for purposes of initialization.
     264             :         */
     265             :         void    impl_broadcastPropertyChange_nothrow( const OUString& _rPropertyName, const ::com::sun::star::uno::Any& _rNewValue, const ::com::sun::star::uno::Any& _rOldValue, bool _bFirstTimeInit ) const;
     266             : 
     267             :         /** determines whether the given property is an actuating property, that is, at least one
     268             :             handler expressed interest in changes to this property's value.
     269             :         */
     270           0 :         inline bool impl_isActuatingProperty_nothrow( const OUString& _rPropertyName ) const
     271             :         {
     272           0 :             return ( m_aDependencyHandlers.find( _rPropertyName ) != m_aDependencyHandlers.end() );
     273             :         }
     274             : 
     275             :         sal_uInt32      GetPropertyPos(const OUString& _rPropName);
     276             : 
     277             :         /** retrieves the value of the given property, by asking the appropriate XPropertyHandler
     278             :             @param  _rPropertyName
     279             :                 the name whose handler is to be obtained. Must be the name of a property
     280             :                 for which a handler is registered.
     281             :             @throws
     282             :                 RuntimeException if there is no handler for the given property
     283             :             @return
     284             :                 the value of this property
     285             :         */
     286             :         ::com::sun::star::uno::Any
     287             :                         impl_getPropertyValue_throw( const OUString& _rPropertyName );
     288             : 
     289             :         /// calls XPropertyHandler::suspend for all our property handlers
     290             :         sal_Bool    suspendPropertyHandlers_nothrow( sal_Bool _bSuspend );
     291             : 
     292             :         /// suspends the complete inspector
     293             :         sal_Bool    suspendAll_nothrow();
     294             : 
     295             :         /** selects a page according to our current view data
     296             :         */
     297             :         void selectPageFromViewData();
     298             : 
     299             :         /** updates our view data from the currently active page
     300             :         */
     301             :         void updateViewDataFromActivePage();
     302             : 
     303             :         /// describes the UI for the given property
     304             :         void describePropertyLine( const ::com::sun::star::beans::Property& _rPropertyName, OLineDescriptor& _rDescriptor )
     305             :             SAL_THROW((::com::sun::star::uno::Exception));
     306             : 
     307             :         /** retrieves the position of the property given by name in m_aProperties
     308             :             @return
     309             :                 <TRUE/> if and only if the property could be found. In this case, <arg>_pProperty</arg> (if
     310             :                 not <NULL/> contains the iterator pointing to this property.
     311             :         */
     312             :         bool impl_findObjectProperty_nothrow( const OUString& _rName, OrderedPropertyMap::const_iterator* _pProperty = NULL );
     313             : 
     314             :         sal_Bool Construct(Window* _pParentWin);
     315             : 
     316             :         /** retrieves the property handler for a given property name
     317             :             @param  _rPropertyName
     318             :                 the name whose handler is to be obtained. Must be the name of a property
     319             :                 for which a handler is registered.
     320             :             @throws
     321             :                 RuntimeException if there is no handler for the given property
     322             :             @return
     323             :                 the handler which is responsible for the given property
     324             :         */
     325             :         PropertyHandlerRef
     326             :             impl_getHandlerForProperty_throw( const OUString& _rPropertyName ) const;
     327             : 
     328             :         /** determines whether we have a handler for the given property
     329             :             @param _rPropertyName
     330             :                 the name of the property for which the existence of a handler should be checked
     331             :         */
     332             :         bool
     333             :             impl_hasPropertyHandlerFor_nothrow( const OUString& _rPropertyName ) const;
     334             : 
     335             :         /** builds up m_aPageIds from InspectorModel::describeCategories, and insert all the
     336             :             respective tab pages into our view
     337             :             @precond
     338             :                 m_aPageIds is empty
     339             :             @throws ::com::sun::star::uno::RuntimeException
     340             :                 if one of the callees of this method throws this exception
     341             :         */
     342             :         void
     343             :             impl_buildCategories_throw();
     344             : 
     345             :         /** retrieves the id of the tab page which represents a given category.
     346             :             @param  _rCategoryName
     347             :                 the programmatic name of a category.
     348             :             @return
     349             :                 the id of the tab page, or <code>(sal_uInt16)-1</code> if there
     350             :                 is no tab page for the given category
     351             :         */
     352             :         sal_uInt16
     353             :             impl_getPageIdForCategory_nothrow( const OUString& _rCategoryName ) const;
     354             : 
     355             :         /** adds or removes ourself as XEventListener to/from all our inspectees
     356             :         */
     357             :         void    impl_toggleInspecteeListening_nothrow( bool _bOn );
     358             : 
     359             :         /** binds the instance to a new model
     360             :         */
     361             :         void    impl_bindToNewModel_nothrow( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorModel >& _rxInspectorModel );
     362             : 
     363             :         /** initializes our view, as indicated by the model's view-relevant properties
     364             : 
     365             :             It's allowed to call this method when no model exists, yet. In this case, nothing
     366             :             happens.
     367             :         */
     368             :         void    impl_initializeView_nothrow();
     369             : 
     370             :         /** determines whether the view should be readonly.
     371             : 
     372             :             Effectively, this means that the method simply checks the IsReadOnly attribute of the model.
     373             :             If there is no model, <FALSE/> is returned.
     374             : 
     375             :             @throws ::com::sun::star::uno::RuntimeException
     376             :                 in case asking the model for its IsReadOnly attribute throws a ::com::sun::star::uno::RuntimeException
     377             :                 itself.
     378             :         */
     379             :         bool    impl_isReadOnlyModel_throw() const;
     380             : 
     381             :         /** updates our view so that it is read-only, as indicated by the model property
     382             :             @see impl_isReadOnlyModel_throw
     383             :         */
     384             :         void    impl_updateReadOnlyView_nothrow();
     385             : 
     386             :         /** starts or stops listening at the model
     387             :         */
     388             :         void    impl_startOrStopModelListening_nothrow( bool _bDoListen ) const;
     389             : 
     390             :     private:
     391             :         DECL_LINK(OnPageActivation, void*);
     392             : 
     393             :     private:
     394             :         // constructors
     395             :         void    createDefault();
     396             :         void    createWithModel( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorModel >& _rxModel );
     397             :     };
     398             : 
     399             : 
     400             : } // namespace pcr
     401             : 
     402             : 
     403             : #endif // _EXTENSIONS_PROPCTRLR_PROPCONTROLLER_HXX_
     404             : 
     405             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10