LCOV - code coverage report
Current view: top level - sw/source/uibase/utlui - wordcountctrl.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 11 11 100.0 %
Date: 2015-06-13 12:38:46 Functions: 6 6 100.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             : 
      10             : #include <swtypes.hxx>
      11             : #include <utlui.hrc>
      12             : #include "wordcountctrl.hxx"
      13             : #include <svl/stritem.hxx>
      14             : 
      15         403 : SFX_IMPL_STATUSBAR_CONTROL(SwWordCountStatusBarControl, SfxStringItem);
      16             : 
      17         344 : SwWordCountStatusBarControl::SwWordCountStatusBarControl(
      18             :         sal_uInt16 _nSlotId,
      19             :         sal_uInt16 _nId,
      20             :         StatusBar& rStb) :
      21         344 :     SfxStatusBarControl(_nSlotId, _nId, rStb)
      22             : {
      23         344 : }
      24             : 
      25         688 : SwWordCountStatusBarControl::~SwWordCountStatusBarControl()
      26             : {
      27         688 : }
      28             : 
      29         806 : void SwWordCountStatusBarControl::StateChanged(
      30             :     sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
      31             : {
      32         806 :     if (eState == SfxItemState::DEFAULT) // Can access pState
      33         806 :         GetStatusBar().SetItemText( GetId(), static_cast<const SfxStringItem*>(pState)->GetValue() );
      34             : 
      35         806 :     GetStatusBar().SetQuickHelpText(GetId(), SW_RESSTR(STR_WORDCOUNT_HINT));
      36         806 : }
      37             : 
      38             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11