LCOV - code coverage report
Current view: top level - libreoffice/framework/inc/services - frame.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 6 33.3 %
Date: 2012-12-27 Functions: 2 6 33.3 %
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 __FRAMEWORK_SERVICES_FRAME_HXX_
      21             : #define __FRAMEWORK_SERVICES_FRAME_HXX_
      22             : 
      23             : #include <classes/framecontainer.hxx>
      24             : #include <classes/propertysethelper.hxx>
      25             : #include <threadhelp/resetableguard.hxx>
      26             : #include <threadhelp/writeguard.hxx>
      27             : #include <threadhelp/readguard.hxx>
      28             : #include <threadhelp/threadhelpbase.hxx>
      29             : 
      30             : #include <threadhelp/transactionbase.hxx>
      31             : #include <macros/generic.hxx>
      32             : #include <macros/debug.hxx>
      33             : #include <macros/xinterface.hxx>
      34             : #include <macros/xtypeprovider.hxx>
      35             : #include <macros/xserviceinfo.hxx>
      36             : #include <general.h>
      37             : 
      38             : #include <com/sun/star/frame/XDispatchInformationProvider.hpp>
      39             : #include <com/sun/star/frame/XComponentLoader.hpp>
      40             : #include <com/sun/star/frame/XController.hpp>
      41             : #include <com/sun/star/frame/XDispatch.hpp>
      42             : #include <com/sun/star/frame/XDispatchProvider.hpp>
      43             : #include <com/sun/star/frame/XDispatchRecorderSupplier.hpp>
      44             : #include <com/sun/star/frame/XDispatchProviderInterception.hpp>
      45             : #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
      46             : #include <com/sun/star/lang/XEventListener.hpp>
      47             : #include <com/sun/star/frame/XFrame.hpp>
      48             : #include <com/sun/star/frame/XFrameActionListener.hpp>
      49             : #include <com/sun/star/frame/XFrames.hpp>
      50             : #include <com/sun/star/frame/XFramesSupplier.hpp>
      51             : #include <com/sun/star/frame/XTitle.hpp>
      52             : #include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
      53             : #include <com/sun/star/task/XStatusIndicator.hpp>
      54             : #include <com/sun/star/task/XStatusIndicatorFactory.hpp>
      55             : #include <com/sun/star/awt/XTopWindowListener.hpp>
      56             : #include <com/sun/star/awt/XWindow.hpp>
      57             : #include <com/sun/star/awt/XTopWindow.hpp>
      58             : #include <com/sun/star/awt/XWindowListener.hpp>
      59             : #include <com/sun/star/awt/XFocusListener.hpp>
      60             : #include <com/sun/star/awt/FocusEvent.hpp>
      61             : #include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
      62             : #include <com/sun/star/document/XActionLockable.hpp>
      63             : #include <com/sun/star/util/XCloseable.hpp>
      64             : #include <com/sun/star/frame/XLayoutManager.hpp>
      65             : 
      66             : #include <unotools/cmdoptions.hxx>
      67             : #include <cppuhelper/interfacecontainer.hxx>
      68             : #include <cppuhelper/weak.hxx>
      69             : #include <rtl/string.hxx>
      70             : 
      71             : namespace framework{
      72             : 
      73             : // This enum can be used to set differnt active states of frames
      74             : enum EActiveState
      75             : {
      76             :     E_INACTIVE      ,   // I'am not a member of active path in tree and i don't have the focus.
      77             :     E_ACTIVE        ,   // I'am in the middle of an active path in tree and i don't have the focus.
      78             :     E_FOCUS             // I have the focus now. I must a member of an active path!
      79             : };
      80             : 
      81             : class WindowCommandDispatch;
      82             : 
      83             : /*-************************************************************************************************************//**
      84             :     @short      implements a normal frame of hierarchy
      85             :     @descr      An instance of these class can be a normal node in frame tree. A frame support influencing of his
      86             :                 subtree, find of subframes, activate- and deactivate-mechanism as well as
      87             :                 set/get of a frame window, component or controller.
      88             : 
      89             :     @attention  This implementation supports three states: a)uninitialized, b)working, c)disposed
      90             :                 If you call wrong methods in modes a) or c) ... you will get some exceptions.
      91             :                 How you should work with this service:
      92             :                     i)      create it by using "xServiceManager->createInstance(...)"
      93             :                     ii)     call XInitialization::initialize() with a valid window reference or use createInstanceWithArguments() at i)
      94             :                     iii)    works with object
      95             :                     iv)     dispose object by calling XComponent::dispose()
      96             :                 After iv) all further requests are rejected by exceptions! (DisposedException)
      97             : 
      98             :     @base       ThreadHelpBase
      99             :                     help to guarantee correct initialized lock member at startup
     100             :     @base       TransactionBase
     101             :                     help to implement unbreakable interface calls
     102             :     @base       OBroadcastHelper
     103             :                 OPropertySetHelper
     104             :                     implements the property set
     105             :     @base       OWeakObject
     106             :                     provides the refcount and XInterface, XWeak
     107             : 
     108             :     @devstatus  ready to use
     109             :     @threadsafe yes
     110             : *//*-*************************************************************************************************************/
     111             : class Frame :   // interfaces
     112             :                 public  css::lang::XTypeProvider                    ,
     113             :                 public  css::lang::XServiceInfo                     ,
     114             :                 public  css::frame::XFramesSupplier                 ,   // => XFrame => XComponent
     115             :                 public  css::frame::XDispatchProvider               ,
     116             :                 public  css::frame::XDispatchProviderInterception   ,
     117             :                 public  css::frame::XDispatchInformationProvider    ,
     118             :                 public  css::task::XStatusIndicatorFactory          ,
     119             :                 public  css::awt::XWindowListener                   ,   // => XEventListener
     120             :                 public  css::awt::XTopWindowListener                ,
     121             :                 public  css::awt::XFocusListener                    ,
     122             :                 public  css::document::XActionLockable              ,
     123             :                 public  css::util::XCloseable                       ,   // => XCloseBroadcaster
     124             :                 public  css::frame::XComponentLoader                ,
     125             :                 public  css::frame::XTitle                          ,
     126             :                 public  css::frame::XTitleChangeBroadcaster         ,
     127             :                 // base classes
     128             :                 // Order is neccessary for right initialization of this class!
     129             :                 public  ThreadHelpBase                              ,
     130             :                 public  TransactionBase                             ,
     131             :                 public  PropertySetHelper                           ,   // helper implements ThreadHelpbase, TransactionBase, XPropertySet, XPropertySetInfo
     132             :                 public  ::cppu::OWeakObject                             // helper implements XInterface, XWeak
     133             : {
     134             :     //-------------------------------------------------------------------------------------------------------------
     135             :     //  public methods
     136             :     //-------------------------------------------------------------------------------------------------------------
     137             : 
     138             :     public:
     139             : 
     140             :         //---------------------------------------------------------------------------------------------------------
     141             :         //  constructor / destructor
     142             :         //---------------------------------------------------------------------------------------------------------
     143             :                   Frame( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory );
     144             :         virtual ~Frame(                                                                         );
     145             : 
     146             :         //---------------------------------------------------------------------------------------------------------
     147             :         //  XInterface, XTypeProvider, XServiceInfo
     148             :         //---------------------------------------------------------------------------------------------------------
     149             :         FWK_DECLARE_XINTERFACE
     150             :         FWK_DECLARE_XTYPEPROVIDER
     151             :         DECLARE_XSERVICEINFO
     152             : 
     153             :         //---------------------------------------------------------------------------------------------------------
     154             :         //  XComponentLoader
     155             :         //---------------------------------------------------------------------------------------------------------
     156             :         virtual css::uno::Reference< css::lang::XComponent >        SAL_CALL loadComponentFromURL               ( const ::rtl::OUString&                                                        sURL                ,
     157             :                                                                                                                   const ::rtl::OUString&                                                        sTargetFrameName    ,
     158             :                                                                                                                         sal_Int32                                                               nSearchFlags        ,
     159             :                                                                                                                   const css::uno::Sequence< css::beans::PropertyValue >&                        lArguments          ) throw( css::io::IOException                ,
     160             :                                                                                                                                                                                                                              css::lang::IllegalArgumentException ,
     161             :                                                                                                                                                                                                                              css::uno::RuntimeException          );
     162             : 
     163             : 
     164             :         //---------------------------------------------------------------------------------------------------------
     165             :         //  XFramesSupplier
     166             :         //---------------------------------------------------------------------------------------------------------
     167             :         virtual css::uno::Reference< css::frame::XFrames >          SAL_CALL getFrames                          (                                                                                                   ) throw( css::uno::RuntimeException );
     168             :         virtual css::uno::Reference< css::frame::XFrame >           SAL_CALL getActiveFrame                     (                                                                                                   ) throw( css::uno::RuntimeException );
     169             :         virtual void                                                SAL_CALL setActiveFrame                     (   const   css::uno::Reference< css::frame::XFrame >&                          xFrame              ) throw( css::uno::RuntimeException );
     170             : 
     171             :         //---------------------------------------------------------------------------------------------------------
     172             :         //  XFrame
     173             :         //---------------------------------------------------------------------------------------------------------
     174             :         virtual void                                                SAL_CALL initialize                         (   const   css::uno::Reference< css::awt::XWindow >&                           xWindow             ) throw( css::uno::RuntimeException );
     175             :         virtual css::uno::Reference< css::awt::XWindow >            SAL_CALL getContainerWindow                 (                                                                                                   ) throw( css::uno::RuntimeException );
     176             :         virtual void                                                SAL_CALL setCreator                         (   const   css::uno::Reference< css::frame::XFramesSupplier >&                 xCreator            ) throw( css::uno::RuntimeException );
     177             :         virtual css::uno::Reference< css::frame::XFramesSupplier >  SAL_CALL getCreator                         (                                                                                                   ) throw( css::uno::RuntimeException );
     178             :         virtual ::rtl::OUString                                     SAL_CALL getName                            (                                                                                                   ) throw( css::uno::RuntimeException );
     179             :         virtual void                                                SAL_CALL setName                            (   const   ::rtl::OUString&                                                    sName               ) throw( css::uno::RuntimeException );
     180             :         virtual css::uno::Reference< css::frame::XFrame >           SAL_CALL findFrame                          (   const   ::rtl::OUString&                                                    sTargetFrameName    ,
     181             :                                                                                                                             sal_Int32                                                           nSearchFlags        ) throw( css::uno::RuntimeException );
     182             :         virtual sal_Bool                                            SAL_CALL isTop                              (                                                                                                   ) throw( css::uno::RuntimeException );
     183             :         virtual void                                                SAL_CALL activate                           (                                                                                                   ) throw( css::uno::RuntimeException );
     184             :         virtual void                                                SAL_CALL deactivate                         (                                                                                                   ) throw( css::uno::RuntimeException );
     185             :         virtual sal_Bool                                            SAL_CALL isActive                           (                                                                                                   ) throw( css::uno::RuntimeException );
     186             :         virtual void                                                SAL_CALL contextChanged                     (                                                                                                   ) throw( css::uno::RuntimeException );
     187             :         virtual sal_Bool                                            SAL_CALL setComponent                       (   const   css::uno::Reference< css::awt::XWindow >&                           xComponentWindow    ,
     188             :                                                                                                                     const   css::uno::Reference< css::frame::XController >&                     xController         ) throw( css::uno::RuntimeException );
     189             :         virtual css::uno::Reference< css::awt::XWindow >            SAL_CALL getComponentWindow                 (                                                                                                   ) throw( css::uno::RuntimeException );
     190             :         virtual css::uno::Reference< css::frame::XController >      SAL_CALL getController                      (                                                                                                   ) throw( css::uno::RuntimeException );
     191             :         virtual void                                                SAL_CALL addFrameActionListener             (   const   css::uno::Reference< css::frame::XFrameActionListener >&            xListener           ) throw( css::uno::RuntimeException );
     192             :         virtual void                                                SAL_CALL removeFrameActionListener          (   const   css::uno::Reference< css::frame::XFrameActionListener >&            xListener           ) throw( css::uno::RuntimeException );
     193             : 
     194             :         //---------------------------------------------------------------------------------------------------------
     195             :         //  XComponent
     196             :         //---------------------------------------------------------------------------------------------------------
     197             :         virtual void                                                SAL_CALL dispose                            (                                                                                                   ) throw( css::uno::RuntimeException );
     198             :         virtual void                                                SAL_CALL addEventListener                   (   const   css::uno::Reference< css::lang::XEventListener >&                   xListener           ) throw( css::uno::RuntimeException );
     199             :         virtual void                                                SAL_CALL removeEventListener                (   const   css::uno::Reference< css::lang::XEventListener >&                   xListener           ) throw( css::uno::RuntimeException );
     200             : 
     201             :         //---------------------------------------------------------------------------------------------------------
     202             :         //  XStatusIndicatorFactory
     203             :         //---------------------------------------------------------------------------------------------------------
     204             :         virtual css::uno::Reference< css::task::XStatusIndicator >  SAL_CALL createStatusIndicator              (                                                                                                   ) throw( css::uno::RuntimeException );
     205             : 
     206             :         //---------------------------------------------------------------------------------------------------------
     207             :         //  XDispatchProvider
     208             :         //---------------------------------------------------------------------------------------------------------
     209             :         virtual css::uno::Reference< css::frame::XDispatch >        SAL_CALL queryDispatch                      (   const   css::util::URL&                                                     aURL                ,
     210             :                                                                                                                     const   ::rtl::OUString&                                                    sTargetFrameName    ,
     211             :                                                                                                                             sal_Int32                                                           nSearchFlags        ) throw( css::uno::RuntimeException );
     212             :         virtual css::uno::Sequence<
     213             :                     css::uno::Reference< css::frame::XDispatch > >  SAL_CALL queryDispatches                    (   const   css::uno::Sequence< css::frame::DispatchDescriptor >&               lDescriptor         ) throw( css::uno::RuntimeException );
     214             : 
     215             :         //---------------------------------------------------------------------------------------------------------
     216             :         //  XDispatchProviderInterception
     217             :         //---------------------------------------------------------------------------------------------------------
     218             :         virtual void                                                SAL_CALL registerDispatchProviderInterceptor(   const   css::uno::Reference< css::frame::XDispatchProviderInterceptor >&    xInterceptor        ) throw( css::uno::RuntimeException );
     219             :         virtual void                                                SAL_CALL releaseDispatchProviderInterceptor (   const   css::uno::Reference< css::frame::XDispatchProviderInterceptor >&    xInterceptor        ) throw( css::uno::RuntimeException );
     220             : 
     221             :         //---------------------------------------------------------------------------------------------------------
     222             :         //  XDispatchInformationProvider
     223             :         //---------------------------------------------------------------------------------------------------------
     224             :         virtual css::uno::Sequence< sal_Int16 >                       SAL_CALL getSupportedCommandGroups         (                       ) throw (css::uno::RuntimeException);
     225             :         virtual css::uno::Sequence< css::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation(sal_Int16 nCommandGroup) throw (css::uno::RuntimeException);
     226             : 
     227             :         //---------------------------------------------------------------------------------------------------------
     228             :         //  XWindowListener
     229             :         //  Attention: windowResized() and windowShown() are implement only! All other are empty!
     230             :         //---------------------------------------------------------------------------------------------------------
     231             :         virtual void                                                SAL_CALL windowResized                      (   const   css::awt::WindowEvent&                                              aEvent              ) throw( css::uno::RuntimeException );
     232         583 :         virtual void                                                SAL_CALL windowMoved                        (   const   css::awt::WindowEvent&                                              /*aEvent*/          ) throw( css::uno::RuntimeException ) {};
     233             :         virtual void                                                SAL_CALL windowShown                        (   const   css::lang::EventObject&                                             aEvent              ) throw( css::uno::RuntimeException );
     234             :         virtual void                                                SAL_CALL windowHidden                       (   const   css::lang::EventObject&                                             aEvent              ) throw( css::uno::RuntimeException );
     235             : 
     236             :         //---------------------------------------------------------------------------------------------------------
     237             :         //  XFocusListener
     238             :         //  Attention: focusLost() not implemented yet!
     239             :         //---------------------------------------------------------------------------------------------------------
     240             :         virtual void                                                SAL_CALL focusGained                        (   const   css::awt::FocusEvent&                                               aEvent              ) throw( css::uno::RuntimeException );
     241           0 :         virtual void                                                SAL_CALL focusLost                          (   const   css::awt::FocusEvent&                                               /*aEvent*/          ) throw( css::uno::RuntimeException ) {};
     242             : 
     243             :         //---------------------------------------------------------------------------------------------------------
     244             :         //  XTopWindowListener
     245             :         //  Attention: windowActivated(), windowDeactivated() and windowClosing() are implement only! All other are empty!
     246             :         //---------------------------------------------------------------------------------------------------------
     247             :         virtual void                                                SAL_CALL windowActivated                    (   const   css::lang::EventObject&                                             aEvent              ) throw( css::uno::RuntimeException );
     248             :         virtual void                                                SAL_CALL windowDeactivated                  (   const   css::lang::EventObject&                                             aEvent              ) throw( css::uno::RuntimeException );
     249         472 :         virtual void                                                SAL_CALL windowOpened                       (   const   css::lang::EventObject&                                             /*aEvent*/          ) throw( css::uno::RuntimeException ) {};
     250             :         virtual void                                                SAL_CALL windowClosing                      (   const   css::lang::EventObject&                                             aEvent              ) throw( css::uno::RuntimeException );
     251           0 :         virtual void                                                SAL_CALL windowClosed                       (   const   css::lang::EventObject&                                             /*aEvent*/          ) throw( css::uno::RuntimeException ) {};
     252           0 :         virtual void                                                SAL_CALL windowMinimized                    (   const   css::lang::EventObject&                                             /*aEvent*/          ) throw( css::uno::RuntimeException ) {};
     253           0 :         virtual void                                                SAL_CALL windowNormalized                   (   const   css::lang::EventObject&                                             /*aEvent*/          ) throw( css::uno::RuntimeException ) {};
     254             : 
     255             :         //---------------------------------------------------------------------------------------------------------
     256             :         //  XEventListener
     257             :         //---------------------------------------------------------------------------------------------------------
     258             :         virtual void                                                SAL_CALL disposing                          (   const   css::lang::EventObject&                                             aEvent              ) throw( css::uno::RuntimeException );
     259             : 
     260             :         //---------------------------------------------------------------------------------------------------------
     261             :         //  XActionLockable
     262             :         //---------------------------------------------------------------------------------------------------------
     263             :         virtual sal_Bool    SAL_CALL isActionLocked  (                 ) throw( css::uno::RuntimeException );
     264             :         virtual void        SAL_CALL addActionLock   (                 ) throw( css::uno::RuntimeException );
     265             :         virtual void        SAL_CALL removeActionLock(                 ) throw( css::uno::RuntimeException );
     266             :         virtual void        SAL_CALL setActionLocks  ( sal_Int16 nLock ) throw( css::uno::RuntimeException );
     267             :         virtual sal_Int16   SAL_CALL resetActionLocks(                 ) throw( css::uno::RuntimeException );
     268             : 
     269             :         //---------------------------------------------------------------------------------------------------------
     270             :         //  XCloseable
     271             :         //---------------------------------------------------------------------------------------------------------
     272             :         virtual void SAL_CALL close( sal_Bool bDeliverOwnerShip ) throw( css::util::CloseVetoException,
     273             :                                                                          css::uno::RuntimeException   );
     274             : 
     275             :         //---------------------------------------------------------------------------------------------------------
     276             :         //  XCloseBroadcaster
     277             :         //---------------------------------------------------------------------------------------------------------
     278             :         virtual void SAL_CALL addCloseListener   ( const css::uno::Reference< css::util::XCloseListener >& xListener ) throw (css::uno::RuntimeException);
     279             :         virtual void SAL_CALL removeCloseListener( const css::uno::Reference< css::util::XCloseListener >& xListener ) throw (css::uno::RuntimeException);
     280             : 
     281             :         //---------------------------------------------------------------------------------------------------------
     282             :         //  XTitle
     283             :         //---------------------------------------------------------------------------------------------------------
     284             :         virtual ::rtl::OUString SAL_CALL getTitle(                               ) throw (css::uno::RuntimeException);
     285             :         virtual void            SAL_CALL setTitle( const ::rtl::OUString& sTitle ) throw (css::uno::RuntimeException);
     286             : 
     287             :         //---------------------------------------------------------------------------------------------------------
     288             :         //  XTitleChangeBroadcaster
     289             :         //---------------------------------------------------------------------------------------------------------
     290             :         virtual void SAL_CALL addTitleChangeListener   ( const css::uno::Reference< css::frame::XTitleChangeListener >& xListener) throw (css::uno::RuntimeException);
     291             :         virtual void SAL_CALL removeTitleChangeListener( const css::uno::Reference< css::frame::XTitleChangeListener >& xListenr ) throw (css::uno::RuntimeException);
     292             : 
     293             :         //---------------------------------------------------------------------------------------------------------
     294             :         //  PropertySetHelper => XPropertySet, XPropertySetInfo
     295             :         //---------------------------------------------------------------------------------------------------------
     296             :     private:
     297             : 
     298             :         void impl_initializePropInfo();
     299             : 
     300             :         virtual void SAL_CALL impl_setPropertyValue(const ::rtl::OUString& sProperty,
     301             :                                                           sal_Int32        nHandle  ,
     302             :                                                     const css::uno::Any&   aValue   );
     303             : 
     304             :         virtual css::uno::Any SAL_CALL impl_getPropertyValue(const ::rtl::OUString& sProperty,
     305             :                                                                    sal_Int32        nHandle  );
     306             : 
     307             :     //-------------------------------------------------------------------------------------------------------------
     308             :     //  private methods
     309             :     //-------------------------------------------------------------------------------------------------------------
     310             : 
     311             :     private:
     312             : 
     313             :         /*-****************************************************************************************************//**
     314             :             @short      helper methods
     315             :             @descr      Follow methods are needed at different points of our code (more then ones!).
     316             : 
     317             :             @attention  Threadsafe methods are signed by "implts_..."!
     318             :         *//*-*****************************************************************************************************/
     319             : 
     320             :         // threadsafe
     321             :         void                                                    implts_sendFrameActionEvent     ( const css::frame::FrameAction&                        aAction          );
     322             :         void                                                    implts_resizeComponentWindow    (                                                                        );
     323             :         void                                                    implts_setIconOnWindow          (                                                                        );
     324             :         void                                                    implts_startWindowListening     (                                                                        );
     325             :         void                                                    implts_stopWindowListening      (                                                                        );
     326             :         void                                                    implts_saveWindowAttributes     (                                                                        );
     327             :         void                                                    implts_checkSuicide             (                                                                        );
     328             :         void                                                    implts_forgetSubFrames          (                                                                        );
     329             :         DECL_LINK( implts_windowClosing, void* );
     330             :         css::uno::Reference< css::awt::XTopWindow >             impl_searchTopWindow            ( const css::uno::Reference< css::awt::XWindow >&       xWindow          );
     331             : 
     332             :         // non threadsafe
     333             :         void                                                    impl_checkMenuCloser            (                                                                        );
     334             :         void                                                    impl_setCloser                  ( const css::uno::Reference< css::frame::XFrame >&      xFrame           ,
     335             :                                                                                                         sal_Bool                                        bState           );
     336             :         void                                                    impl_disposeContainerWindow     (       css::uno::Reference< css::awt::XWindow >&       xWindow          );
     337             :         static const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(                                                                        );
     338             : 
     339             :     //-------------------------------------------------------------------------------------------------------------
     340             :     //  debug methods
     341             :     //  (should be private everyway!)
     342             :     //-------------------------------------------------------------------------------------------------------------
     343             : 
     344             :         /*-****************************************************************************************************//**
     345             :             @short      debug-method to check incoming parameter of some other mehods of this class
     346             :             @descr      The following methods are used to check parameters for other methods
     347             :                         of this class. The return value is used directly for an ASSERT(...).
     348             : 
     349             :             @attention  This methods are static and can't use our member directly! It's better for threadsafe code...
     350             :                         because we call it with references or pointer to check variables ... and must make it safe
     351             :                         by himself!
     352             : 
     353             :             @seealso    ASSERTs in implementation!
     354             : 
     355             :             @param      references to checking variables
     356             :             @return     sal_True  ,on invalid parameter
     357             :             @return     sal_False ,otherwise
     358             : 
     359             :             @onerror    We return sal_True
     360             :         *//*-*****************************************************************************************************/
     361             : 
     362             :     #ifdef ENABLE_ASSERTIONS
     363             : 
     364             :     private:
     365             : 
     366             :         static sal_Bool implcp_ctor                                (   const   css::uno::Reference< css::lang::XMultiServiceFactory >&             xFactory            );
     367             :         static sal_Bool implcp_setActiveFrame                      (   const   css::uno::Reference< css::frame::XFrame >&                          xFrame              );
     368             :         static sal_Bool implcp_addFrameActionListener              (   const   css::uno::Reference< css::frame::XFrameActionListener >&            xListener           );
     369             :         static sal_Bool implcp_removeFrameActionListener           (   const   css::uno::Reference< css::frame::XFrameActionListener >&            xListener           );
     370             :         static sal_Bool implcp_addEventListener                    (   const   css::uno::Reference< css::lang::XEventListener >&                   xListener           );
     371             :         static sal_Bool implcp_removeEventListener                 (   const   css::uno::Reference< css::lang::XEventListener >&                   xListener           );
     372             :         static sal_Bool implcp_windowResized                       (   const   css::awt::WindowEvent&                                              aEvent              );
     373             :         static sal_Bool implcp_focusGained                         (   const   css::awt::FocusEvent&                                               aEvent              );
     374             :         static sal_Bool implcp_windowActivated                     (   const   css::lang::EventObject&                                             aEvent              );
     375             :         static sal_Bool implcp_windowDeactivated                   (   const   css::lang::EventObject&                                             aEvent              );
     376             :         static sal_Bool implcp_disposing                           (   const   css::lang::EventObject&                                             aEvent              );
     377             : 
     378             :     #endif  // #ifdef ENABLE_ASSERTIONS
     379             : 
     380             :     //*************************************************************************************************************
     381             :     //  variables
     382             :     //  -threadsafe by own read/write lock "m_aLock"
     383             :     //*************************************************************************************************************
     384             :     private:
     385             : 
     386             :         css::uno::Reference< css::lang::XMultiServiceFactory >                  m_xFactory                          ;   /// reference to factory, which has create this instance
     387             :         css::uno::Reference< css::task::XStatusIndicatorFactory >               m_xIndicatorFactoryHelper           ;   /// reference to factory helper to create status indicator objects
     388             :         css::uno::WeakReference< css::task::XStatusIndicator >                  m_xIndicatorInterception            ;   /// points to an external set progress, which should be used instead of the internal one.
     389             :         css::uno::Reference< css::frame::XDispatchProvider >                    m_xDispatchHelper                   ;   /// helper for XDispatch/Provider and interception interfaces
     390             :         css::uno::Reference< css::frame::XFrames >                              m_xFramesHelper                     ;   /// helper for XFrames, XIndexAccess and XElementAccess interfaces
     391             :         ::cppu::OMultiTypeInterfaceContainerHelper                              m_aListenerContainer                ;   /// container for ALL Listener
     392             :         css::uno::Reference< css::frame::XFramesSupplier >                      m_xParent                           ;   /// parent of this frame
     393             :         css::uno::Reference< css::awt::XWindow >                                m_xContainerWindow                  ;   /// containerwindow of this frame for embedded components
     394             :         css::uno::Reference< css::awt::XWindow >                                m_xComponentWindow                  ;   /// window of the actual component
     395             :         css::uno::Reference< css::frame::XController >                          m_xController                       ;   /// controller of the actual frame
     396             :         css::uno::Reference< css::datatransfer::dnd::XDropTargetListener >      m_xDropTargetListener               ;   /// listen to drag & drop
     397             :         EActiveState                                                            m_eActiveState                      ;   /// state, if i'am a member of active path in tree or i have the focus or ...
     398             :         ::rtl::OUString                                                         m_sName                             ;   /// name of this frame
     399             :         sal_Bool                                                                m_bIsFrameTop                       ;   /// frame has no parent or the parent is a taskor the desktop
     400             :         sal_Bool                                                                m_bConnected                        ;   /// due to FrameActionEvent
     401             :         sal_Int16                                                               m_nExternalLockCount                ;
     402             :         css::uno::Reference< css::frame::XDispatchRecorderSupplier >            m_xDispatchRecorderSupplier         ;   /// is used for dispatch recording and will be set/get from outside. Frame provide it only!
     403             :         SvtCommandOptions                                                       m_aCommandOptions                   ;   /// ref counted class to support disabling commands defined by configuration file
     404             :         sal_Bool                                                                m_bSelfClose                        ;   /// in case of CloseVetoException on method close() wqs thrown by ourself - we must close ourself later if no internal processes are running
     405             :         sal_Bool                                                                m_bIsHidden                         ;   /// indicates, if this frame is used in hidden mode or not
     406             :         static css::uno::WeakReference< css::frame::XFrame >                    m_xCloserFrame                      ;   /// holds the only frame, which must show the special closer menu item (can be NULL!)
     407             :         css::uno::Reference< ::com::sun::star::frame::XLayoutManager >    m_xLayoutManager                    ;   /// is used to layout the child windows of the frame.
     408             :         css::uno::Reference< css::frame::XDispatchInformationProvider >         m_xDispatchInfoHelper               ;
     409             :         css::uno::Reference< css::frame::XTitle >                               m_xTitleHelper                      ;
     410             : 
     411             :         WindowCommandDispatch*                                                  m_pWindowCommandDispatch            ;
     412             : 
     413             :     protected:
     414             : 
     415             :         FrameContainer                                                          m_aChildFrameContainer              ;   /// array of child frames
     416             : 
     417             :         inline css::uno::Reference< css::lang::XMultiServiceFactory > impl_getFactory()
     418             :         {
     419             :             ReadGuard aReadLock( m_aLock );
     420             :             return m_xFactory;
     421             :         }
     422             : 
     423             :         inline ::rtl::OUString impl_getName()
     424             :         {
     425             :             ReadGuard aReadLock( m_aLock );
     426             :             return m_sName;
     427             :         }
     428             : 
     429             :         inline css::uno::Reference< css::awt::XWindow > impl_getContainerWindow()
     430             :         {
     431             :             ReadGuard aReadLock( m_aLock );
     432             :             return m_xContainerWindow;
     433             :         }
     434             : 
     435             :         inline css::uno::Reference< css::frame::XDispatchProvider > impl_getDispatchHelper()
     436             :         {
     437             :             ReadGuard aReadLock( m_aLock );
     438             :             return m_xDispatchHelper;
     439             :         }
     440             : 
     441             :         inline css::uno::Reference< css::frame::XFramesSupplier > impl_getParent()
     442             :         {
     443             :             ReadGuard aReadLock( m_aLock );
     444             :             return m_xParent;
     445             :         }
     446             : 
     447             : };      // class Frame
     448             : 
     449             : }       // namespace framework
     450             : 
     451             : #endif  // #ifndef __FRAMEWORK_SERVICES_FRAME_HXX_
     452             : 
     453             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10