LCOV - code coverage report
Current view: top level - framework/source/uielement - statusbar.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 24 43 55.8 %
Date: 2014-11-03 Functions: 9 13 69.2 %
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             : #include <uielement/statusbar.hxx>
      21             : 
      22             : #include <vcl/svapp.hxx>
      23             : 
      24             : namespace framework
      25             : {
      26             : 
      27        5506 : FrameworkStatusBar::FrameworkStatusBar(
      28             :     vcl::Window*           pParent,
      29             :     WinBits           nWinBits ) :
      30             :     StatusBar( pParent, nWinBits ),
      31        5506 :     m_pMgr( NULL )
      32             : {
      33             :     // set optimal size
      34        5506 :     SetOutputSizePixel( CalcWindowSizePixel() );
      35        5506 : }
      36             : 
      37       11004 : FrameworkStatusBar::~FrameworkStatusBar()
      38             : {
      39       11004 : }
      40             : 
      41        5506 : void FrameworkStatusBar::SetStatusBarManager( StatusBarManager* pStatusBarManager )
      42             : {
      43        5506 :     SolarMutexGuard aSolarMutexGuard;
      44        5506 :     m_pMgr = pStatusBarManager;
      45        5506 : }
      46             : 
      47       12048 : void FrameworkStatusBar::UserDraw(const UserDrawEvent& rUDEvt)
      48             : {
      49       12048 :     if ( m_pMgr )
      50       12048 :         m_pMgr->UserDraw( rUDEvt );
      51       12048 : }
      52             : 
      53           0 : void FrameworkStatusBar::Command( const CommandEvent& rEvt )
      54             : {
      55           0 :     if ( m_pMgr )
      56           0 :         m_pMgr->Command( rEvt );
      57           0 : }
      58             : 
      59       14498 : void FrameworkStatusBar::StateChanged( StateChangedType nType )
      60             : {
      61       14498 :     if ( m_pMgr )
      62       14498 :         m_pMgr->StateChanged( nType );
      63       14498 : }
      64             : 
      65           4 : void FrameworkStatusBar::DataChanged( const DataChangedEvent& rDCEvt )
      66             : {
      67           4 :     StatusBar::DataChanged( rDCEvt );
      68           4 :     if ( m_pMgr )
      69           4 :         m_pMgr->DataChanged( rDCEvt );
      70           4 : }
      71             : 
      72           0 : void FrameworkStatusBar::MouseMove( const MouseEvent& rMEvt )
      73             : {
      74           0 :     StatusBar::MouseMove( rMEvt );
      75           0 :     if ( m_pMgr )
      76           0 :         m_pMgr->MouseMove( rMEvt );
      77           0 : }
      78             : 
      79           0 : void FrameworkStatusBar::MouseButtonDown( const MouseEvent& rMEvt )
      80             : {
      81           0 :     StatusBar::MouseButtonDown( rMEvt );
      82           0 :     if ( m_pMgr )
      83           0 :         m_pMgr->MouseButtonDown( rMEvt );
      84           0 : }
      85             : 
      86           0 : void FrameworkStatusBar::MouseButtonUp( const MouseEvent& rMEvt )
      87             : {
      88           0 :     StatusBar::MouseButtonUp( rMEvt );
      89           0 :     if ( m_pMgr )
      90           0 :         m_pMgr->MouseButtonUp( rMEvt );
      91           0 : }
      92             : 
      93         951 : }
      94             : 
      95             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10