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

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #include <SpellAttrib.hxx>
      30                 :            : #include <vcl/font.hxx>
      31                 :            : #include <com/sun/star/uno/Reference.hxx>
      32                 :            : #include <com/sun/star/linguistic2/XSpellAlternatives.hpp>
      33                 :            : using namespace svx;
      34                 :            : using namespace com::sun::star::linguistic2;
      35                 :            : using namespace com::sun::star::uno;
      36                 :            : 
      37                 :            : 
      38                 :            : //-----------------------------------------------------------------------
      39                 :          0 : SpellErrorAttrib::SpellErrorAttrib( const SpellErrorDescription& rDesc ) :
      40                 :            :     TextAttrib(TEXTATTR_SPELL_ERROR),
      41         [ #  # ]:          0 :     m_aSpellErrorDescription( rDesc )
      42                 :            : {
      43                 :          0 : }
      44                 :            : 
      45                 :            : 
      46                 :            : //-----------------------------------------------------------------------
      47                 :          0 : SpellErrorAttrib::SpellErrorAttrib( const SpellErrorAttrib& rAttr ) :
      48                 :            :     TextAttrib(TEXTATTR_SPELL_ERROR),
      49         [ #  # ]:          0 :     m_aSpellErrorDescription( rAttr.m_aSpellErrorDescription )
      50                 :            : {
      51                 :          0 : }
      52                 :            : 
      53                 :            : //-----------------------------------------------------------------------
      54         [ #  # ]:          0 : SpellErrorAttrib::~SpellErrorAttrib()
      55                 :            : {
      56         [ #  # ]:          0 : }
      57                 :            : 
      58                 :            : //-----------------------------------------------------------------------
      59                 :          0 : void SpellErrorAttrib::SetFont( Font&  ) const
      60                 :            : {
      61                 :            :     //this attribute doesn't have a visual effect
      62                 :          0 : }
      63                 :            : 
      64                 :            : //-----------------------------------------------------------------------
      65                 :          0 : TextAttrib*     SpellErrorAttrib::Clone() const
      66                 :            : {
      67         [ #  # ]:          0 :     return new SpellErrorAttrib(*this);
      68                 :            : }
      69                 :            : 
      70                 :            : //-----------------------------------------------------------------------
      71                 :          0 : int SpellErrorAttrib::operator==( const TextAttrib& rAttr ) const
      72                 :            : {
      73                 :          0 :     return Which() == rAttr.Which() &&
      74 [ #  # ][ #  # ]:          0 :             m_aSpellErrorDescription == static_cast<const SpellErrorAttrib&>(rAttr).m_aSpellErrorDescription;
      75                 :            : }
      76                 :            : 
      77                 :            : //-----------------------------------------------------------------------
      78                 :          0 : SpellLanguageAttrib::SpellLanguageAttrib(LanguageType eLang) :
      79                 :            :     TextAttrib(TEXTATTR_SPELL_LANGUAGE),
      80                 :          0 :     m_eLanguage(eLang)
      81                 :            : {
      82                 :          0 : }
      83                 :            : 
      84                 :            : //-----------------------------------------------------------------------
      85                 :          0 : SpellLanguageAttrib::SpellLanguageAttrib( const SpellLanguageAttrib& rAttr ) :
      86                 :            :     TextAttrib(TEXTATTR_SPELL_LANGUAGE),
      87                 :          0 :     m_eLanguage(rAttr.m_eLanguage)
      88                 :            : {
      89                 :          0 : }
      90                 :            : 
      91                 :            : //-----------------------------------------------------------------------
      92                 :          0 : SpellLanguageAttrib::~SpellLanguageAttrib()
      93                 :            : {
      94         [ #  # ]:          0 : }
      95                 :            : 
      96                 :            : //-----------------------------------------------------------------------
      97                 :          0 : void SpellLanguageAttrib::SetFont( Font&  ) const
      98                 :            : {
      99                 :            :     //no visual effect
     100                 :          0 : }
     101                 :            : 
     102                 :            : //-----------------------------------------------------------------------
     103                 :          0 : TextAttrib* SpellLanguageAttrib::Clone() const
     104                 :            : {
     105         [ #  # ]:          0 :     return new SpellLanguageAttrib(*this);
     106                 :            : }
     107                 :            : 
     108                 :            : //-----------------------------------------------------------------------
     109                 :          0 : int SpellLanguageAttrib::operator==( const TextAttrib& rAttr ) const
     110                 :            : {
     111                 :          0 :     return Which() == rAttr.Which() &&
     112 [ #  # ][ #  # ]:          0 :             m_eLanguage == static_cast<const SpellLanguageAttrib&>(rAttr).m_eLanguage;
     113                 :            : }
     114                 :            : 
     115                 :            : //-----------------------------------------------------------------------
     116                 :          0 : SpellBackgroundAttrib::SpellBackgroundAttrib(const Color& rCol) :
     117                 :            :     TextAttrib(TEXTATTR_SPELL_BACKGROUND),
     118                 :          0 :     m_aBackgroundColor(rCol)
     119                 :            : {
     120                 :          0 : }
     121                 :            : 
     122                 :            : //-----------------------------------------------------------------------
     123                 :          0 : SpellBackgroundAttrib::SpellBackgroundAttrib( const SpellBackgroundAttrib& rAttr ) :
     124                 :            :     TextAttrib(TEXTATTR_SPELL_BACKGROUND),
     125                 :          0 :     m_aBackgroundColor(rAttr.m_aBackgroundColor)
     126                 :            : {
     127                 :          0 : }
     128                 :            : 
     129                 :            : //-----------------------------------------------------------------------
     130                 :          0 : SpellBackgroundAttrib::~SpellBackgroundAttrib()
     131                 :            : {
     132         [ #  # ]:          0 : }
     133                 :            : 
     134                 :            : //-----------------------------------------------------------------------
     135                 :          0 : void SpellBackgroundAttrib::SetFont( Font& rFont ) const
     136                 :            : {
     137                 :          0 :     rFont.SetFillColor(m_aBackgroundColor);
     138                 :          0 : }
     139                 :            : 
     140                 :            : //-----------------------------------------------------------------------
     141                 :          0 : TextAttrib* SpellBackgroundAttrib::Clone() const
     142                 :            : {
     143         [ #  # ]:          0 :     return new SpellBackgroundAttrib(*this);
     144                 :            : }
     145                 :            : 
     146                 :            : //-----------------------------------------------------------------------
     147                 :          0 : int  SpellBackgroundAttrib::operator==( const TextAttrib& rAttr ) const
     148                 :            : {
     149                 :          0 :     return Which() == rAttr.Which() &&
     150 [ #  # ][ #  # ]:          0 :             m_aBackgroundColor == static_cast<const SpellBackgroundAttrib&>(rAttr).m_aBackgroundColor;
     151                 :            : }
     152                 :            : 
     153                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10