LCOV - code coverage report
Current view: top level - editeng/source/editeng - editattr.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 197 202 97.5 %
Date: 2015-06-13 12:38:46 Functions: 57 57 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             :  * 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/wrkwin.hxx>
      22             : #include <vcl/dialog.hxx>
      23             : #include <vcl/msgbox.hxx>
      24             : #include <vcl/svapp.hxx>
      25             : 
      26             : #include <svl/grabbagitem.hxx>
      27             : #include <editeng/svxfont.hxx>
      28             : #include <editeng/flditem.hxx>
      29             : #include <editeng/fontitem.hxx>
      30             : #include <editeng/postitem.hxx>
      31             : #include <editeng/wghtitem.hxx>
      32             : #include <editeng/udlnitem.hxx>
      33             : #include <editeng/contouritem.hxx>
      34             : #include <editeng/shdditem.hxx>
      35             : #include <editeng/escapementitem.hxx>
      36             : #include <editeng/colritem.hxx>
      37             : #include <editeng/wrlmitem.hxx>
      38             : #include <editeng/fhgtitem.hxx>
      39             : #include <editeng/crossedoutitem.hxx>
      40             : #include <editeng/charsetcoloritem.hxx>
      41             : #include <editeng/kernitem.hxx>
      42             : #include <editeng/autokernitem.hxx>
      43             : #include <editeng/langitem.hxx>
      44             : #include <editeng/emphasismarkitem.hxx>
      45             : #include <editeng/charscaleitem.hxx>
      46             : #include <editeng/charreliefitem.hxx>
      47             : #include <editeng/cmapitem.hxx>
      48             : 
      49             : #include "editattr.hxx"
      50             : 
      51             : 
      52             : 
      53             : // class EditCharAttrib
      54             : 
      55      270156 : EditCharAttrib::EditCharAttrib( const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE ) :
      56      270156 :     nStart(nS), nEnd(nE), bFeature(false), bEdge(false)
      57             : {
      58      270156 :     pItem = &rAttr;
      59             : 
      60             :     DBG_ASSERT( ( rAttr.Which() >= EE_ITEMS_START ) && ( rAttr.Which() <= EE_ITEMS_END ), "EditCharAttrib CTOR: Invalid id!" );
      61             :     DBG_ASSERT( ( rAttr.Which() < EE_FEATURE_START ) || ( rAttr.Which() > EE_FEATURE_END ) || ( nE == (nS+1) ), "EditCharAttrib CTOR: Invalid feature!" );
      62      270156 : }
      63             : 
      64      258650 : EditCharAttrib::~EditCharAttrib()
      65             : {
      66      258650 : }
      67             : 
      68       14985 : void EditCharAttrib::SetFont( SvxFont&, OutputDevice* )
      69             : {
      70       14985 : }
      71             : 
      72             : 
      73             : 
      74             : // class EditCharAttribFont
      75             : 
      76       35254 : EditCharAttribFont::EditCharAttribFont( const SvxFontItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
      77       35254 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
      78             : {
      79             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTINFO || rAttr.Which() == EE_CHAR_FONTINFO_CJK || rAttr.Which() == EE_CHAR_FONTINFO_CTL, "Not a Font attribute!" );
      80       35254 : }
      81             : 
      82       25908 : void EditCharAttribFont::SetFont( SvxFont& rFont, OutputDevice* )
      83             : {
      84       25908 :     const SvxFontItem& rAttr = static_cast<const SvxFontItem&>(*GetItem());
      85             : 
      86       25908 :     rFont.SetName( rAttr.GetFamilyName() );
      87       25908 :     rFont.SetFamily( rAttr.GetFamily() );
      88       25908 :     rFont.SetPitch( rAttr.GetPitch() );
      89       25908 :     rFont.SetCharSet( rAttr.GetCharSet() );
      90       25908 : }
      91             : 
      92             : 
      93             : // class EditCharAttribItalic
      94             : 
      95       18649 : EditCharAttribItalic::EditCharAttribItalic( const SvxPostureItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
      96       18649 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
      97             : {
      98             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_ITALIC || rAttr.Which() == EE_CHAR_ITALIC_CJK || rAttr.Which() == EE_CHAR_ITALIC_CTL, "Not a Italic attribute!" );
      99       18649 : }
     100             : 
     101       17875 : void EditCharAttribItalic::SetFont( SvxFont& rFont, OutputDevice* )
     102             : {
     103       17875 :     rFont.SetItalic( static_cast<const SvxPostureItem*>(GetItem())->GetPosture() );
     104       17875 : }
     105             : 
     106             : 
     107             : // class EditCharAttribWeight
     108             : 
     109       32242 : EditCharAttribWeight::EditCharAttribWeight( const SvxWeightItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     110       32242 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     111             : {
     112             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_WEIGHT || rAttr.Which() == EE_CHAR_WEIGHT_CJK || rAttr.Which() == EE_CHAR_WEIGHT_CTL, "Not a Weight attribute!" );
     113       32242 : }
     114             : 
     115       22022 : void EditCharAttribWeight::SetFont( SvxFont& rFont, OutputDevice* )
     116             : {
     117       22022 :     rFont.SetWeight( (FontWeight)static_cast<const SvxWeightItem*>(GetItem())->GetValue() );
     118       22022 : }
     119             : 
     120             : 
     121             : // class EditCharAttribUnderline
     122             : 
     123        7950 : EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     124        7950 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     125             : {
     126             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_UNDERLINE, "Not a Underline attribute!" );
     127        7950 : }
     128             : 
     129       20606 : void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
     130             : {
     131       20606 :     rFont.SetUnderline( (FontUnderline)static_cast<const SvxUnderlineItem*>(GetItem())->GetValue() );
     132             : 
     133       20606 :     if ( pOutDev )
     134        2360 :         pOutDev->SetTextLineColor( static_cast<const SvxUnderlineItem*>(GetItem())->GetColor() );
     135             : 
     136       20606 : }
     137             : 
     138             : 
     139             : // class EditCharAttribOverline
     140             : 
     141        1636 : EditCharAttribOverline::EditCharAttribOverline( const SvxOverlineItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     142        1636 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     143             : {
     144             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_OVERLINE, "Not a overline attribute!" );
     145        1636 : }
     146             : 
     147        7438 : void EditCharAttribOverline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
     148             : {
     149        7438 :     rFont.SetOverline( (FontUnderline)static_cast<const SvxOverlineItem*>(GetItem())->GetValue() );
     150        7438 :     if ( pOutDev )
     151         933 :         pOutDev->SetOverlineColor( static_cast<const SvxOverlineItem*>(GetItem())->GetColor() );
     152        7438 : }
     153             : 
     154             : 
     155             : // class EditCharAttribFontHeight
     156             : 
     157       50122 : EditCharAttribFontHeight::EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     158       50122 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     159             : {
     160             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTHEIGHT || rAttr.Which() == EE_CHAR_FONTHEIGHT_CJK || rAttr.Which() == EE_CHAR_FONTHEIGHT_CTL, "Not a Height attribute!" );
     161       50122 : }
     162             : 
     163       36930 : void EditCharAttribFontHeight::SetFont( SvxFont& rFont, OutputDevice* )
     164             : {
     165             :     // Property is ignored
     166       36930 :     rFont.SetSize( Size( rFont.GetSize().Width(), static_cast<const SvxFontHeightItem*>(GetItem())->GetHeight() ) );
     167       36930 : }
     168             : 
     169             : 
     170             : // class EditCharAttribFontWidth
     171             : 
     172        2150 : EditCharAttribFontWidth::EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     173        2150 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     174             : {
     175             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTWIDTH, "Not a Width attribute!" );
     176        2150 : }
     177             : 
     178        8236 : void EditCharAttribFontWidth::SetFont( SvxFont& /*rFont*/, OutputDevice* )
     179             : {
     180             :     // must be calculated outside, because f(device)...
     181        8236 : }
     182             : 
     183             : 
     184             : // class EditCharAttribStrikeout
     185             : 
     186        6774 : EditCharAttribStrikeout::EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     187        6774 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     188             : {
     189             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_STRIKEOUT, "Not a Strikeout attribute!" );
     190        6774 : }
     191             : 
     192       17569 : void EditCharAttribStrikeout::SetFont( SvxFont& rFont, OutputDevice* )
     193             : {
     194       17569 :     rFont.SetStrikeout( (FontStrikeout)static_cast<const SvxCrossedOutItem*>(GetItem())->GetValue() );
     195       17569 : }
     196             : 
     197             : 
     198             : // class EditCharAttribCaseMap
     199             : 
     200        5633 : EditCharAttribCaseMap::EditCharAttribCaseMap( const SvxCaseMapItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     201        5633 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     202             : {
     203             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_CASEMAP, "Not a CaseMap Item!" );
     204        5633 : }
     205             : 
     206       16286 : void EditCharAttribCaseMap::SetFont( SvxFont& rFont, OutputDevice* )
     207             : {
     208       16286 :     rFont.SetCaseMap( static_cast<const SvxCaseMapItem*>(GetItem())->GetCaseMap() );
     209       16286 : }
     210             : 
     211             : 
     212             : // class EditCharAttribColor
     213             : 
     214       19289 : EditCharAttribColor::EditCharAttribColor( const SvxColorItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     215       19289 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     216             : {
     217             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_COLOR, "Not a Color attribute!" );
     218       19289 : }
     219             : 
     220       32209 : void EditCharAttribColor::SetFont( SvxFont& rFont, OutputDevice* )
     221             : {
     222       32209 :     Color aColor = static_cast<const SvxColorItem*>(GetItem())->GetValue();
     223       32209 :     rFont.SetColor( aColor);
     224             :     //fprintf(stderr, "Called SetFont with Color %d\n", aColor.GetColor());
     225       32209 : }
     226             : 
     227             : // class EditCharAttribBackgroundColor
     228             : 
     229        1950 : EditCharAttribBackgroundColor::EditCharAttribBackgroundColor(
     230             :                                 const SvxBackgroundColorItem& rAttr,
     231             :                                   sal_uInt16 _nStart,
     232             :                                   sal_uInt16 _nEnd )
     233        1950 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     234             : {
     235             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_BKGCOLOR, "Not a BackColor attribute!" );
     236        1950 : }
     237             : 
     238        8790 : void EditCharAttribBackgroundColor::SetFont( SvxFont& rFont, OutputDevice* )
     239             : {
     240        8790 :     Color aColor = static_cast<const SvxBackgroundColorItem*>(GetItem())->GetValue();
     241        8790 :     rFont.SetFillColor( aColor);
     242        8790 :     rFont.SetTransparent(false);
     243             : 
     244        8790 : }
     245             : 
     246             : 
     247             : // class EditCharAttribLanguage
     248             : 
     249       24384 : EditCharAttribLanguage::EditCharAttribLanguage( const SvxLanguageItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     250       24384 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     251             : {
     252             :     DBG_ASSERT( ( rAttr.Which() == EE_CHAR_LANGUAGE ) || ( rAttr.Which() == EE_CHAR_LANGUAGE_CJK ) || ( rAttr.Which() == EE_CHAR_LANGUAGE_CTL ), "Not a Language attribute!" );
     253       24384 : }
     254             : 
     255       11758 : void EditCharAttribLanguage::SetFont( SvxFont& rFont, OutputDevice* )
     256             : {
     257       11758 :     rFont.SetLanguage( static_cast<const SvxLanguageItem*>(GetItem())->GetLanguage() );
     258       11758 : }
     259             : 
     260             : 
     261             : // class EditCharAttribShadow
     262             : 
     263        2972 : EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     264        2972 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     265             : {
     266             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_SHADOW, "Not a Shadow attribute!" );
     267        2972 : }
     268             : 
     269        9729 : void EditCharAttribShadow::SetFont( SvxFont& rFont, OutputDevice* )
     270             : {
     271        9729 :     rFont.SetShadow( static_cast<const SvxShadowedItem*>(GetItem())->GetValue() );
     272        9729 : }
     273             : 
     274             : 
     275             : // class EditCharAttribEscapement
     276             : 
     277        6879 : EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     278        6879 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     279             : {
     280             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_ESCAPEMENT, "Not a escapement attribute!" );
     281        6879 : }
     282             : 
     283       17082 : void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* )
     284             : {
     285       17082 :     sal_uInt16 nProp = static_cast<const SvxEscapementItem*>(GetItem())->GetProp();
     286       17082 :     rFont.SetPropr( (sal_uInt8)nProp );
     287             : 
     288       17082 :     short nEsc = static_cast<const SvxEscapementItem*>(GetItem())->GetEsc();
     289       17082 :     if ( nEsc == DFLT_ESC_AUTO_SUPER )
     290           0 :         nEsc = 100 - nProp;
     291       17082 :     else if ( nEsc == DFLT_ESC_AUTO_SUB )
     292           0 :         nEsc = sal::static_int_cast< short >( -( 100 - nProp ) );
     293       17082 :     rFont.SetEscapement( nEsc );
     294       17082 : }
     295             : 
     296             : 
     297             : // class EditCharAttribOutline
     298             : 
     299        2927 : EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     300        2927 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     301             : {
     302             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_OUTLINE, "Not a Outline attribute!" );
     303        2927 : }
     304             : 
     305        9631 : void EditCharAttribOutline::SetFont( SvxFont& rFont, OutputDevice* )
     306             : {
     307        9631 :     rFont.SetOutline( static_cast<const SvxContourItem*>(GetItem())->GetValue() );
     308        9631 : }
     309             : 
     310             : 
     311             : // class EditCharAttribTab
     312             : 
     313         104 : EditCharAttribTab::EditCharAttribTab( const SfxVoidItem& rAttr, sal_uInt16 nPos )
     314         104 :     : EditCharAttrib( rAttr, nPos, nPos+1 )
     315             : {
     316         104 :     SetFeature( true );
     317         104 : }
     318             : 
     319          25 : void EditCharAttribTab::SetFont( SvxFont&, OutputDevice* )
     320             : {
     321          25 : }
     322             : 
     323             : 
     324             : // class EditCharAttribLineBreak
     325             : 
     326         115 : EditCharAttribLineBreak::EditCharAttribLineBreak( const SfxVoidItem& rAttr, sal_uInt16 nPos )
     327         115 :     : EditCharAttrib( rAttr, nPos, nPos+1 )
     328             : {
     329         115 :     SetFeature( true );
     330         115 : }
     331             : 
     332          47 : void EditCharAttribLineBreak::SetFont( SvxFont&, OutputDevice* )
     333             : {
     334          47 : }
     335             : 
     336             : 
     337             : // class EditCharAttribField
     338             : 
     339       21518 : EditCharAttribField::EditCharAttribField( const SvxFieldItem& rAttr, sal_uInt16 nPos )
     340       21518 :     : EditCharAttrib( rAttr, nPos, nPos+1 )
     341             : {
     342       21518 :     SetFeature( true ); // !!!
     343       21518 :     pTxtColor = 0;
     344       21518 :     pFldColor = 0;
     345       21518 : }
     346             : 
     347       16039 : void EditCharAttribField::SetFont( SvxFont& rFont, OutputDevice* )
     348             : {
     349       16039 :     if ( pFldColor )
     350             :     {
     351         287 :         rFont.SetFillColor( *pFldColor );
     352         287 :         rFont.SetTransparent( false );
     353             :     }
     354       16039 :     if ( pTxtColor )
     355          73 :         rFont.SetColor( *pTxtColor );
     356       16039 : }
     357             : 
     358             : 
     359       11748 : void EditCharAttribField::SetFieldValue(const OUString& rVal)
     360             : {
     361       11748 :     aFieldValue = rVal;
     362       11748 : }
     363             : 
     364       43086 : void EditCharAttribField::Reset()
     365             : {
     366       43086 :     aFieldValue.clear();
     367       43086 :     delete pTxtColor; pTxtColor = NULL;
     368       43086 :     delete pFldColor; pFldColor = NULL;
     369       43086 : }
     370             : 
     371       11748 : EditCharAttribField::EditCharAttribField( const EditCharAttribField& rAttr )
     372       35244 :     : EditCharAttrib( *rAttr.GetItem(), rAttr.GetStart(), rAttr.GetEnd() ),
     373       35244 :         aFieldValue( rAttr.aFieldValue )
     374             : {
     375             :     // Use this constructor only for temporary Objects, Item is not pooled.
     376       11748 :     pTxtColor = rAttr.pTxtColor ? new Color( *rAttr.pTxtColor ) : 0;
     377       11748 :     pFldColor = rAttr.pFldColor ? new Color( *rAttr.pFldColor ) : 0;
     378       11748 : }
     379             : 
     380       94014 : EditCharAttribField::~EditCharAttribField()
     381             : {
     382       31338 :     Reset();
     383       62676 : }
     384             : 
     385       11748 : bool EditCharAttribField::operator == ( const EditCharAttribField& rAttr ) const
     386             : {
     387       11748 :     if ( aFieldValue != rAttr.aFieldValue )
     388       10919 :         return false;
     389             : 
     390         829 :     if ( ( pTxtColor && !rAttr.pTxtColor ) || ( !pTxtColor && rAttr.pTxtColor ) )
     391           2 :         return false;
     392         827 :     if ( ( pTxtColor && rAttr.pTxtColor ) && ( *pTxtColor != *rAttr.pTxtColor ) )
     393           0 :         return false;
     394             : 
     395         827 :     if ( ( pFldColor && !rAttr.pFldColor ) || ( !pFldColor && rAttr.pFldColor ) )
     396           0 :         return false;
     397         827 :     if ( ( pFldColor && rAttr.pFldColor ) && ( *pFldColor != *rAttr.pFldColor ) )
     398           0 :         return false;
     399             : 
     400         827 :     return true;
     401             : }
     402             : 
     403             : 
     404             : // class EditCharAttribPairKerning
     405             : 
     406        2076 : EditCharAttribPairKerning::EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     407        2076 : : EditCharAttrib( rAttr, _nStart, _nEnd )
     408             : {
     409             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_PAIRKERNING, "Not a Pair Kerning!" );
     410        2076 : }
     411             : 
     412        9289 : void EditCharAttribPairKerning::SetFont( SvxFont& rFont, OutputDevice* )
     413             : {
     414        9289 :     rFont.SetKerning( static_cast<const SvxAutoKernItem*>(GetItem())->GetValue() ? FontKerning::FontSpecific : FontKerning::NONE );
     415        9289 : }
     416             : 
     417             : 
     418             : // class EditCharAttribKerning
     419             : 
     420        6018 : EditCharAttribKerning::EditCharAttribKerning( const SvxKerningItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     421        6018 : : EditCharAttrib( rAttr, _nStart, _nEnd )
     422             : {
     423             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_KERNING, "Not a Kerning!" );
     424        6018 : }
     425             : 
     426       16234 : void EditCharAttribKerning::SetFont( SvxFont& rFont, OutputDevice* )
     427             : {
     428       16234 :     rFont.SetFixKerning( static_cast<const SvxKerningItem*>(GetItem())->GetValue() );
     429       16234 : }
     430             : 
     431             : 
     432             : // class EditCharAttribWordLineMode
     433             : 
     434        1983 : EditCharAttribWordLineMode::EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     435        1983 : : EditCharAttrib( rAttr, _nStart, _nEnd )
     436             : {
     437             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_WLM, "Not a Kerning!" );
     438        1983 : }
     439             : 
     440        8762 : void EditCharAttribWordLineMode::SetFont( SvxFont& rFont, OutputDevice* )
     441             : {
     442        8762 :     rFont.SetWordLineMode( static_cast<const SvxWordLineModeItem*>(GetItem())->GetValue() );
     443        8762 : }
     444             : 
     445             : 
     446             : // class EditCharAttribEmphasisMark
     447             : 
     448        2478 : EditCharAttribEmphasisMark::EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     449        2478 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     450             : {
     451             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_EMPHASISMARK, "Not a Emphasis attribute!" );
     452        2478 : }
     453             : 
     454        9226 : void EditCharAttribEmphasisMark::SetFont( SvxFont& rFont, OutputDevice* )
     455             : {
     456        9226 :     rFont.SetEmphasisMark( static_cast<const SvxEmphasisMarkItem*>(GetItem())->GetEmphasisMark() );
     457        9226 : }
     458             : 
     459             : 
     460             : // class EditCharAttribRelief
     461             : 
     462        2155 : EditCharAttribRelief::EditCharAttribRelief( const SvxCharReliefItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     463        2155 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     464             : {
     465             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_RELIEF, "Not a relief attribute!" );
     466        2155 : }
     467             : 
     468        9258 : void EditCharAttribRelief::SetFont( SvxFont& rFont, OutputDevice* )
     469             : {
     470        9258 :     rFont.SetRelief( (FontRelief)static_cast<const SvxCharReliefItem*>(GetItem())->GetValue() );
     471        9258 : }
     472             : 
     473             : // class EditCharAttribGrabBag
     474             : 
     475        1545 : EditCharAttribGrabBag::EditCharAttribGrabBag( const SfxGrabBagItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     476        1545 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     477             : {
     478             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_GRABBAG, "Not a grab bage attribute!" );
     479        1545 : }
     480             : 
     481             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11