LCOV - code coverage report
Current view: top level - svtools/source/contnr - viewdataentry.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 34 43 79.1 %
Date: 2014-04-11 Functions: 14 17 82.4 %
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 "svtools/viewdataentry.hxx"
      21             : 
      22             : #include "tools/debug.hxx"
      23             : 
      24             : 
      25       21995 : SvViewDataEntry::SvViewDataEntry() :
      26             :     nVisPos(0),
      27             :     mbSelected(false),
      28             :     mbHighlighted(false),
      29             :     mbExpanded(false),
      30             :     mbFocused(false),
      31             :     mbCursored(false),
      32       21995 :     mbSelectable(true)
      33             : {
      34       21995 : }
      35             : 
      36           0 : SvViewDataEntry::SvViewDataEntry( const SvViewDataEntry& rData ) :
      37             :     nVisPos(rData.nVisPos),
      38             :     mbSelected(false),
      39             :     mbHighlighted(false),
      40             :     mbExpanded(rData.mbExpanded),
      41             :     mbFocused(false),
      42             :     mbCursored(rData.mbCursored),
      43           0 :     mbSelectable(rData.mbSelectable)
      44             : {
      45           0 : }
      46             : 
      47       21990 : SvViewDataEntry::~SvViewDataEntry()
      48             : {
      49             : #ifdef DBG_UTIL
      50             :     nVisPos = 0x12345678;
      51             : #endif
      52       21990 : }
      53             : 
      54        2279 : bool SvViewDataEntry::IsSelected() const
      55             : {
      56        2279 :     return mbSelected;
      57             : }
      58             : 
      59        4438 : bool SvViewDataEntry::IsHighlighted() const
      60             : {
      61        4438 :     return mbHighlighted;
      62             : }
      63             : 
      64       41676 : bool SvViewDataEntry::IsExpanded() const
      65             : {
      66       41676 :     return mbExpanded;
      67             : }
      68             : 
      69         122 : bool SvViewDataEntry::HasFocus() const
      70             : {
      71         122 :     return mbFocused;
      72             : }
      73             : 
      74        2483 : bool SvViewDataEntry::IsCursored() const
      75             : {
      76        2483 :     return mbCursored;
      77             : }
      78             : 
      79         302 : bool SvViewDataEntry::IsSelectable() const
      80             : {
      81         302 :     return mbSelectable;
      82             : }
      83             : 
      84         124 : void SvViewDataEntry::SetFocus( bool bFocus )
      85             : {
      86         124 :     mbFocused = bFocus;
      87         124 : }
      88             : 
      89         239 : void SvViewDataEntry::SetSelected( bool bSelected )
      90             : {
      91         239 :     mbSelected = bSelected;
      92         239 :     mbHighlighted = bSelected;
      93         239 : }
      94             : 
      95           0 : void SvViewDataEntry::SetHighlighted( bool bHighlighted )
      96             : {
      97           0 :     mbHighlighted = bHighlighted;
      98           0 : }
      99             : 
     100         441 : void SvViewDataEntry::SetExpanded( bool bExpanded )
     101             : {
     102         441 :     mbExpanded = bExpanded;
     103         441 : }
     104             : 
     105           0 : void SvViewDataEntry::SetSelectable( bool bSelectable )
     106             : {
     107           0 :     mbSelectable = bSelectable;
     108           0 : }
     109             : 
     110       21678 : void SvViewDataEntry::Init(size_t nSize)
     111             : {
     112       21678 :     maItems.resize(nSize);
     113       21678 : }
     114             : 
     115       63161 : const SvViewDataItem* SvViewDataEntry::GetItem(size_t nPos) const
     116             : {
     117       63161 :     return &maItems[nPos];
     118             : }
     119             : 
     120       43356 : SvViewDataItem* SvViewDataEntry::GetItem(size_t nPos)
     121             : {
     122       43356 :     return &maItems[nPos];
     123             : }
     124             : 
     125             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10