LCOV - code coverage report
Current view: top level - cui/source/options - optHeaderTabListbox.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 23 0.0 %
Date: 2012-08-25 Functions: 0 6 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 44 0.0 %

           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                 :            : #include "optHeaderTabListbox.hxx"
      21                 :            : #include <vcl/svapp.hxx>
      22                 :            : #include <svtools/headbar.hxx>
      23                 :            : 
      24                 :            : namespace svx
      25                 :            : {
      26                 :            : // class OptLBoxString_Impl ----------------------------------------------
      27                 :            : 
      28         [ #  # ]:          0 : class OptLBoxString_Impl : public SvLBoxString
      29                 :            : {
      30                 :            : public:
      31                 :          0 :     OptLBoxString_Impl( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rTxt ) :
      32         [ #  # ]:          0 :         SvLBoxString( pEntry, nFlags, rTxt ) {}
      33                 :            : 
      34                 :            :     virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry );
      35                 :            : };
      36                 :            : 
      37                 :            : // -----------------------------------------------------------------------
      38                 :            : 
      39                 :          0 : void OptLBoxString_Impl::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* pEntry )
      40                 :            : {
      41         [ #  # ]:          0 :     Font aOldFont( rDev.GetFont() );
      42         [ #  # ]:          0 :     Font aFont( aOldFont );
      43                 :            :     //detect readonly state by asking for a valid Image
      44 [ #  # ][ #  # ]:          0 :     if(pEntry && !(!((OptHeaderTabListBox&)rDev).GetCollapsedEntryBmp(pEntry)))
         [ #  # ][ #  # ]
      45 [ #  # ][ #  # ]:          0 :         aFont.SetColor( Application::GetSettings().GetStyleSettings().GetDeactiveTextColor() );
      46         [ #  # ]:          0 :     rDev.SetFont( aFont );
      47 [ #  # ][ #  # ]:          0 :     rDev.DrawText( rPos, GetText() );
                 [ #  # ]
      48 [ #  # ][ #  # ]:          0 :     rDev.SetFont( aOldFont );
                 [ #  # ]
      49                 :          0 : }
      50                 :            : // -----------------------------------------------------------------------------
      51                 :            : 
      52                 :          0 : OptHeaderTabListBox::OptHeaderTabListBox( Window* pParent, WinBits nWinStyle ) :
      53                 :            : 
      54                 :          0 :     SvHeaderTabListBox( pParent, nWinStyle )
      55                 :            : {
      56                 :          0 : }
      57                 :            : 
      58                 :            : // -----------------------------------------------------------------------
      59                 :          0 : void OptHeaderTabListBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rTxt,
      60                 :            :                                      const Image& rImg1, const Image& rImg2,
      61                 :            :                                      SvLBoxButtonKind eButtonKind )
      62                 :            : {
      63                 :          0 :     SvTabListBox::InitEntry( pEntry, rTxt, rImg1, rImg2, eButtonKind );
      64                 :          0 :     sal_uInt16 _nTabCount = TabCount();
      65                 :            : 
      66         [ #  # ]:          0 :     for ( sal_uInt16 nCol = 1; nCol < _nTabCount; ++nCol )
      67                 :            :     {
      68                 :            :         // initialize all columns with own class (column 0 == Bitmap)
      69                 :          0 :         SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nCol );
      70 [ #  # ][ #  # ]:          0 :         OptLBoxString_Impl* pStr = new OptLBoxString_Impl( pEntry, 0, pCol->GetText() );
         [ #  # ][ #  # ]
      71                 :          0 :         pEntry->ReplaceItem( pStr, nCol );
      72                 :            :     }
      73                 :          0 : }
      74                 :            : 
      75                 :            : } // namespace svx
      76                 :            : 
      77                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10