LCOV - code coverage report
Current view: top level - libreoffice/vcl/source/edit - txtattr.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 67 0.0 %
Date: 2012-12-27 Functions: 0 30 0.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             :  * 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             : 
      21             : #include <vcl/txtattr.hxx>
      22             : #include <vcl/font.hxx>
      23             : 
      24             : 
      25             : 
      26             : 
      27           0 : TextAttrib::~TextAttrib()
      28             : {
      29           0 : }
      30             : 
      31           0 : int TextAttrib::operator==( const TextAttrib& rAttr ) const
      32             : {
      33           0 :     return mnWhich == rAttr.mnWhich;
      34             : }
      35             : 
      36             : 
      37           0 : TextAttribFontColor::TextAttribFontColor( const Color& rColor )
      38           0 :     : TextAttrib( TEXTATTR_FONTCOLOR ), maColor( rColor )
      39             : {
      40           0 : }
      41             : 
      42           0 : TextAttribFontColor::TextAttribFontColor( const TextAttribFontColor& rAttr )
      43           0 :     : TextAttrib( rAttr ), maColor( rAttr.maColor )
      44             : {
      45           0 : }
      46             : 
      47           0 : TextAttribFontColor::~TextAttribFontColor()
      48             : {
      49           0 : }
      50             : 
      51           0 : void TextAttribFontColor::SetFont( Font& rFont ) const
      52             : {
      53           0 :     rFont.SetColor( maColor );
      54           0 : }
      55             : 
      56           0 : TextAttrib* TextAttribFontColor::Clone() const
      57             : {
      58           0 :     return new TextAttribFontColor( *this );
      59             : }
      60             : 
      61           0 : int TextAttribFontColor::operator==( const TextAttrib& rAttr ) const
      62             : {
      63           0 :     return ( ( TextAttrib::operator==(rAttr ) ) &&
      64           0 :                 ( maColor == ((const TextAttribFontColor&)rAttr).maColor ) );
      65             : }
      66             : 
      67           0 : TextAttribFontWeight::TextAttribFontWeight( FontWeight eWeight )
      68           0 :     : TextAttrib( TEXTATTR_FONTWEIGHT ), meWeight( eWeight )
      69             : {
      70           0 : }
      71             : 
      72           0 : TextAttribFontWeight::TextAttribFontWeight( const TextAttribFontWeight& rAttr )
      73           0 :     : TextAttrib( rAttr ), meWeight( rAttr.meWeight )
      74             : {
      75           0 : }
      76             : 
      77           0 : TextAttribFontWeight::~TextAttribFontWeight()
      78             : {
      79           0 : }
      80             : 
      81           0 : void TextAttribFontWeight::SetFont( Font& rFont ) const
      82             : {
      83           0 :     rFont.SetWeight( meWeight );
      84           0 : }
      85             : 
      86           0 : TextAttrib* TextAttribFontWeight::Clone() const
      87             : {
      88           0 :     return new TextAttribFontWeight( *this );
      89             : }
      90             : 
      91           0 : int TextAttribFontWeight::operator==( const TextAttrib& rAttr ) const
      92             : {
      93           0 :     return ( ( TextAttrib::operator==(rAttr ) ) &&
      94           0 :                 ( meWeight == ((const TextAttribFontWeight&)rAttr).meWeight ) );
      95             : }
      96             : 
      97             : 
      98           0 : TextAttribHyperLink::TextAttribHyperLink( const TextAttribHyperLink& rAttr )
      99           0 :     : TextAttrib( rAttr ), maURL( rAttr.maURL ), maDescription( rAttr.maDescription )
     100             : {
     101           0 :     maColor = rAttr.maColor;
     102           0 : }
     103             : 
     104           0 : TextAttribHyperLink::~TextAttribHyperLink()
     105             : {
     106           0 : }
     107             : 
     108           0 : void TextAttribHyperLink::SetFont( Font& rFont ) const
     109             : {
     110           0 :     rFont.SetColor( maColor );
     111           0 :     rFont.SetUnderline( UNDERLINE_SINGLE );
     112           0 : }
     113             : 
     114           0 : TextAttrib* TextAttribHyperLink::Clone() const
     115             : {
     116           0 :     return new TextAttribHyperLink( *this );
     117             : }
     118             : 
     119           0 : int TextAttribHyperLink::operator==( const TextAttrib& rAttr ) const
     120             : {
     121           0 :     return ( ( TextAttrib::operator==(rAttr ) ) &&
     122           0 :                 ( maURL == ((const TextAttribHyperLink&)rAttr).maURL ) &&
     123           0 :                 ( maDescription == ((const TextAttribHyperLink&)rAttr).maDescription ) &&
     124           0 :                 ( maColor == ((const TextAttribHyperLink&)rAttr).maColor ) );
     125             : }
     126             : 
     127           0 : TextAttribProtect::TextAttribProtect() :
     128           0 :     TextAttrib( TEXTATTR_PROTECTED )
     129             : {
     130           0 : }
     131             : 
     132           0 : TextAttribProtect::TextAttribProtect( const TextAttribProtect&) :
     133           0 :     TextAttrib( TEXTATTR_PROTECTED )
     134             : {
     135           0 : }
     136             : 
     137           0 : TextAttribProtect::~TextAttribProtect()
     138             : {
     139           0 : }
     140             : 
     141           0 : void TextAttribProtect::SetFont( Font& ) const
     142             : {
     143           0 : }
     144             : 
     145           0 : TextAttrib*     TextAttribProtect::Clone() const
     146             : {
     147           0 :     return new TextAttribProtect();
     148             : }
     149             : 
     150           0 : int TextAttribProtect::operator==( const TextAttrib& rAttr ) const
     151             : {
     152           0 :     return ( TextAttrib::operator==(rAttr ) );
     153             : }
     154             : 
     155             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10