LCOV - code coverage report
Current view: top level - framework/source/uielement - statusbar.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 23 42 54.8 %
Date: 2014-04-11 Functions: 7 11 63.6 %
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        2056 : FrameworkStatusBar::FrameworkStatusBar(
      28             :     Window*           pParent,
      29             :     WinBits           nWinBits ) :
      30             :     StatusBar( pParent, nWinBits ),
      31        2056 :     m_pMgr( NULL )
      32             : {
      33             :     // set optimal size
      34        2056 :     SetOutputSizePixel( CalcWindowSizePixel() );
      35        2056 : }
      36             : 
      37        4096 : FrameworkStatusBar::~FrameworkStatusBar()
      38             : {
      39        4096 : }
      40             : 
      41        2056 : void FrameworkStatusBar::SetStatusBarManager( StatusBarManager* pStatusBarManager )
      42             : {
      43        2056 :     SolarMutexGuard aSolarMutexGuard;
      44        2056 :     m_pMgr = pStatusBarManager;
      45        2056 : }
      46             : 
      47        9600 : void FrameworkStatusBar::UserDraw(const UserDrawEvent& rUDEvt)
      48             : {
      49        9600 :     if ( m_pMgr )
      50        9600 :         m_pMgr->UserDraw( rUDEvt );
      51        9600 : }
      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        5265 : void FrameworkStatusBar::StateChanged( StateChangedType nType )
      60             : {
      61        5265 :     if ( m_pMgr )
      62        5265 :         m_pMgr->StateChanged( nType );
      63        5265 : }
      64             : 
      65           2 : void FrameworkStatusBar::DataChanged( const DataChangedEvent& rDCEvt )
      66             : {
      67           2 :     StatusBar::DataChanged( rDCEvt );
      68           2 :     if ( m_pMgr )
      69           2 :         m_pMgr->DataChanged( rDCEvt );
      70           2 : }
      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             : }
      94             : 
      95             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10