LCOV - code coverage report
Current view: top level - svtools/source/toolpanel - toolpaneldeckpeer.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 10 18 55.6 %
Date: 2012-08-25 Functions: 4 5 80.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 5 34 14.7 %

           Branch data     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                 :            : 
      21                 :            : #include "toolpaneldeckpeer.hxx"
      22                 :            : #include "svtools/toolpanel/toolpaneldeck.hxx"
      23                 :            : 
      24                 :            : #include <com/sun/star/lang/DisposedException.hpp>
      25                 :            : 
      26                 :            : #include <tools/diagnose_ex.h>
      27                 :            : #include <vcl/svapp.hxx>
      28                 :            : 
      29                 :            : //......................................................................................................................
      30                 :            : namespace svt
      31                 :            : {
      32                 :            : //......................................................................................................................
      33                 :            : 
      34                 :            :     /** === begin UNO using === **/
      35                 :            :     using ::com::sun::star::uno::Reference;
      36                 :            :     using ::com::sun::star::uno::XInterface;
      37                 :            :     using ::com::sun::star::uno::UNO_QUERY;
      38                 :            :     using ::com::sun::star::uno::UNO_QUERY_THROW;
      39                 :            :     using ::com::sun::star::uno::UNO_SET_THROW;
      40                 :            :     using ::com::sun::star::uno::Exception;
      41                 :            :     using ::com::sun::star::uno::RuntimeException;
      42                 :            :     using ::com::sun::star::uno::Any;
      43                 :            :     using ::com::sun::star::uno::makeAny;
      44                 :            :     using ::com::sun::star::uno::Sequence;
      45                 :            :     using ::com::sun::star::uno::Type;
      46                 :            :     using ::com::sun::star::accessibility::XAccessibleContext;
      47                 :            :     using ::com::sun::star::lang::DisposedException;
      48                 :            :     /** === end UNO using === **/
      49                 :            : 
      50                 :            :     //==================================================================================================================
      51                 :            :     //= ToolPanelDeckPeer
      52                 :            :     //==================================================================================================================
      53                 :            :     //------------------------------------------------------------------------------------------------------------------
      54                 :         26 :     ToolPanelDeckPeer::ToolPanelDeckPeer( ToolPanelDeck& i_rDeck )
      55                 :            :         :VCLXWindow()
      56         [ +  - ]:         26 :         ,m_pDeck( &i_rDeck )
      57                 :            :     {
      58                 :         26 :     }
      59                 :            : 
      60                 :            :     //------------------------------------------------------------------------------------------------------------------
      61         [ +  - ]:         24 :     ToolPanelDeckPeer::~ToolPanelDeckPeer()
      62                 :            :     {
      63         [ -  + ]:         48 :     }
      64                 :            : 
      65                 :            :     //------------------------------------------------------------------------------------------------------------------
      66                 :          0 :     Reference< XAccessibleContext > ToolPanelDeckPeer::CreateAccessibleContext()
      67                 :            :     {
      68         [ #  # ]:          0 :         SolarMutexGuard aSolarGuard;
      69         [ #  # ]:          0 :         if ( m_pDeck == NULL )
      70 [ #  # ][ #  # ]:          0 :             throw DisposedException( ::rtl::OUString(), *this );
      71                 :            : 
      72         [ #  # ]:          0 :         Window* pAccessibleParent( m_pDeck->GetAccessibleParentWindow() );
      73 [ #  # ][ #  # ]:          0 :         ENSURE_OR_RETURN( pAccessibleParent != NULL, "no accessible parent => no accessible context", NULL );
      74 [ #  # ][ #  # ]:          0 :         Reference< XAccessible > xAccessibleParent( pAccessibleParent->GetAccessible(), UNO_SET_THROW );
      75 [ #  # ][ #  # ]:          0 :         return m_aAccessibleFactory.getFactory().createAccessibleToolPanelDeck( xAccessibleParent, *m_pDeck );
                 [ #  # ]
      76                 :            :     }
      77                 :            : 
      78                 :            :     //------------------------------------------------------------------------------------------------------------------
      79                 :         78 :     void SAL_CALL ToolPanelDeckPeer::dispose() throw(RuntimeException)
      80                 :            :     {
      81                 :            :         {
      82         [ +  - ]:         78 :             SolarMutexGuard aSolarGuard;
      83         [ +  - ]:         78 :             m_pDeck = NULL;
      84                 :            :         }
      85                 :         78 :         VCLXWindow::dispose();
      86                 :         78 :     }
      87                 :            : 
      88                 :            : //......................................................................................................................
      89                 :            : } // namespace svt
      90                 :            : //......................................................................................................................
      91                 :            : 
      92                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10