LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/editeng/source/editeng - editattr.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 180 186 96.8 %
Date: 2013-07-09 Functions: 55 55 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 <editeng/svxfont.hxx>
      27             : #include <editeng/flditem.hxx>
      28             : #include <editeng/fontitem.hxx>
      29             : #include <editeng/postitem.hxx>
      30             : #include <editeng/wghtitem.hxx>
      31             : #include <editeng/udlnitem.hxx>
      32             : #include <editeng/contouritem.hxx>
      33             : #include <editeng/shdditem.hxx>
      34             : #include <editeng/escapementitem.hxx>
      35             : #include <editeng/colritem.hxx>
      36             : #include <editeng/wrlmitem.hxx>
      37             : #include <editeng/fhgtitem.hxx>
      38             : #include <editeng/crossedoutitem.hxx>
      39             : #include <editeng/charsetcoloritem.hxx>
      40             : #include <editeng/kernitem.hxx>
      41             : #include <editeng/autokernitem.hxx>
      42             : #include <editeng/langitem.hxx>
      43             : #include <editeng/emphasismarkitem.hxx>
      44             : #include <editeng/charscaleitem.hxx>
      45             : #include <editeng/charreliefitem.hxx>
      46             : 
      47             : #include "editattr.hxx"
      48             : 
      49             : DBG_NAME( EE_EditAttrib )
      50             : 
      51             : // -------------------------------------------------------------------------
      52             : // class EditCharAttrib
      53             : // -------------------------------------------------------------------------
      54     1106499 : EditCharAttrib::EditCharAttrib( const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE ) :
      55     1106499 :     nStart(nS), nEnd(nE), bFeature(false), bEdge(false)
      56             : {
      57             :     DBG_CTOR( EE_EditAttrib, 0 );
      58     1106499 :     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     1106499 : }
      63             : 
      64     1106688 : EditCharAttrib::~EditCharAttrib()
      65             : {
      66             :     DBG_DTOR( EE_EditAttrib, 0 );
      67     1106688 : }
      68             : 
      69        7370 : void EditCharAttrib::SetFont( SvxFont&, OutputDevice* )
      70             : {
      71        7370 : }
      72             : 
      73             : 
      74             : // -------------------------------------------------------------------------
      75             : // class EditCharAttribFont
      76             : // -------------------------------------------------------------------------
      77      281369 : EditCharAttribFont::EditCharAttribFont( const SvxFontItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
      78      281369 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
      79             : {
      80             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTINFO || rAttr.Which() == EE_CHAR_FONTINFO_CJK || rAttr.Which() == EE_CHAR_FONTINFO_CTL, "Not a Font attribute!" );
      81      281369 : }
      82             : 
      83      180668 : void EditCharAttribFont::SetFont( SvxFont& rFont, OutputDevice* )
      84             : {
      85      180668 :     const SvxFontItem& rAttr = (const SvxFontItem&)(*GetItem());
      86             : 
      87      180668 :     rFont.SetName( rAttr.GetFamilyName() );
      88      180668 :     rFont.SetFamily( rAttr.GetFamily() );
      89      180668 :     rFont.SetPitch( rAttr.GetPitch() );
      90      180668 :     rFont.SetCharSet( rAttr.GetCharSet() );
      91      180668 : }
      92             : 
      93             : // -------------------------------------------------------------------------
      94             : // class EditCharAttribItalic
      95             : // -------------------------------------------------------------------------
      96        5475 : EditCharAttribItalic::EditCharAttribItalic( const SvxPostureItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
      97        5475 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
      98             : {
      99             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_ITALIC || rAttr.Which() == EE_CHAR_ITALIC_CJK || rAttr.Which() == EE_CHAR_ITALIC_CTL, "Not a Italic attribute!" );
     100        5475 : }
     101             : 
     102        8801 : void EditCharAttribItalic::SetFont( SvxFont& rFont, OutputDevice* )
     103             : {
     104        8801 :     rFont.SetItalic( ((const SvxPostureItem*)GetItem())->GetPosture() );
     105        8801 : }
     106             : 
     107             : // -------------------------------------------------------------------------
     108             : // class EditCharAttribWeight
     109             : // -------------------------------------------------------------------------
     110      222654 : EditCharAttribWeight::EditCharAttribWeight( const SvxWeightItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     111      222654 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     112             : {
     113             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_WEIGHT || rAttr.Which() == EE_CHAR_WEIGHT_CJK || rAttr.Which() == EE_CHAR_WEIGHT_CTL, "Not a Weight attribute!" );
     114      222654 : }
     115             : 
     116      145407 : void EditCharAttribWeight::SetFont( SvxFont& rFont, OutputDevice* )
     117             : {
     118      145407 :     rFont.SetWeight( (FontWeight)((const SvxWeightItem*)GetItem())->GetValue() );
     119      145407 : }
     120             : 
     121             : // -------------------------------------------------------------------------
     122             : // class EditCharAttribUnderline
     123             : // -------------------------------------------------------------------------
     124        2238 : EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     125        2238 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     126             : {
     127             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_UNDERLINE, "Not a Underline attribute!" );
     128        2238 : }
     129             : 
     130        8878 : void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
     131             : {
     132        8878 :     rFont.SetUnderline( (FontUnderline)((const SvxUnderlineItem*)GetItem())->GetValue() );
     133        8878 :     if ( pOutDev )
     134        1095 :         pOutDev->SetTextLineColor( ((const SvxUnderlineItem*)GetItem())->GetColor() );
     135        8878 : }
     136             : 
     137             : // -------------------------------------------------------------------------
     138             : // class EditCharAttribOverline
     139             : // -------------------------------------------------------------------------
     140         950 : EditCharAttribOverline::EditCharAttribOverline( const SvxOverlineItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     141         950 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     142             : {
     143             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_OVERLINE, "Not a overline attribute!" );
     144         950 : }
     145             : 
     146        5821 : void EditCharAttribOverline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
     147             : {
     148        5821 :     rFont.SetOverline( (FontUnderline)((const SvxOverlineItem*)GetItem())->GetValue() );
     149        5821 :     if ( pOutDev )
     150         645 :         pOutDev->SetOverlineColor( ((const SvxOverlineItem*)GetItem())->GetColor() );
     151        5821 : }
     152             : 
     153             : // -------------------------------------------------------------------------
     154             : // class EditCharAttribFontHeight
     155             : // -------------------------------------------------------------------------
     156      280405 : EditCharAttribFontHeight::EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     157      280405 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     158             : {
     159             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTHEIGHT || rAttr.Which() == EE_CHAR_FONTHEIGHT_CJK || rAttr.Which() == EE_CHAR_FONTHEIGHT_CTL, "Not a Height attribute!" );
     160      280405 : }
     161             : 
     162      180663 : void EditCharAttribFontHeight::SetFont( SvxFont& rFont, OutputDevice* )
     163             : {
     164             :     // Property is ignored
     165      180663 :     rFont.SetSize( Size( rFont.GetSize().Width(), ((const SvxFontHeightItem*)GetItem())->GetHeight() ) );
     166      180663 : }
     167             : 
     168             : // -------------------------------------------------------------------------
     169             : // class EditCharAttribFontWidth
     170             : // -------------------------------------------------------------------------
     171        1357 : EditCharAttribFontWidth::EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     172        1357 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     173             : {
     174             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTWIDTH, "Not a Width attribute!" );
     175        1357 : }
     176             : 
     177        7571 : void EditCharAttribFontWidth::SetFont( SvxFont& /*rFont*/, OutputDevice* )
     178             : {
     179             :     // must be calculated outside, because f(device)...
     180        7571 : }
     181             : 
     182             : // -------------------------------------------------------------------------
     183             : // class EditCharAttribStrikeout
     184             : // -------------------------------------------------------------------------
     185        2124 : EditCharAttribStrikeout::EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     186        2124 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     187             : {
     188             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_STRIKEOUT, "Not a Size attribute!" );
     189        2124 : }
     190             : 
     191        8679 : void EditCharAttribStrikeout::SetFont( SvxFont& rFont, OutputDevice* )
     192             : {
     193        8679 :     rFont.SetStrikeout( (FontStrikeout)((const SvxCrossedOutItem*)GetItem())->GetValue() );
     194        8679 : }
     195             : 
     196             : // -------------------------------------------------------------------------
     197             : // class EditCharAttribColor
     198             : // -------------------------------------------------------------------------
     199       94298 : EditCharAttribColor::EditCharAttribColor( const SvxColorItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     200       94298 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     201             : {
     202             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_COLOR, "Not a Color attribute!" );
     203       94298 : }
     204             : 
     205      180502 : void EditCharAttribColor::SetFont( SvxFont& rFont, OutputDevice* )
     206             : {
     207      180502 :     rFont.SetColor( ((const SvxColorItem*)GetItem())->GetValue() );
     208      180502 : }
     209             : 
     210             : // -------------------------------------------------------------------------
     211             : // class EditCharAttribLanguage
     212             : // -------------------------------------------------------------------------
     213      187958 : EditCharAttribLanguage::EditCharAttribLanguage( const SvxLanguageItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     214      187958 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     215             : {
     216             :     DBG_ASSERT( ( rAttr.Which() == EE_CHAR_LANGUAGE ) || ( rAttr.Which() == EE_CHAR_LANGUAGE_CJK ) || ( rAttr.Which() == EE_CHAR_LANGUAGE_CTL ), "Not a Language attribute!" );
     217      187958 : }
     218             : 
     219      179187 : void EditCharAttribLanguage::SetFont( SvxFont& rFont, OutputDevice* )
     220             : {
     221      179187 :     rFont.SetLanguage( ((const SvxLanguageItem*)GetItem())->GetLanguage() );
     222      179187 : }
     223             : 
     224             : // -------------------------------------------------------------------------
     225             : // class EditCharAttribShadow
     226             : // -------------------------------------------------------------------------
     227        1679 : EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     228        1679 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     229             : {
     230             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_SHADOW, "Not a Shadow attribute!" );
     231        1679 : }
     232             : 
     233        8009 : void EditCharAttribShadow::SetFont( SvxFont& rFont, OutputDevice* )
     234             : {
     235        8009 :     rFont.SetShadow( (sal_Bool)((const SvxShadowedItem*)GetItem())->GetValue() );
     236        8009 : }
     237             : 
     238             : // -------------------------------------------------------------------------
     239             : // class EditCharAttribEscapement
     240             : // -------------------------------------------------------------------------
     241        6071 : EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     242        6071 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     243             : {
     244             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_ESCAPEMENT, "Not a escapement attribute!" );
     245        6071 : }
     246             : 
     247       16164 : void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* )
     248             : {
     249       16164 :     sal_uInt16 nProp = ((const SvxEscapementItem*)GetItem())->GetProp();
     250       16164 :     rFont.SetPropr( (sal_uInt8)nProp );
     251             : 
     252       16164 :     short nEsc = ((const SvxEscapementItem*)GetItem())->GetEsc();
     253       16164 :     if ( nEsc == DFLT_ESC_AUTO_SUPER )
     254           0 :         nEsc = 100 - nProp;
     255       16164 :     else if ( nEsc == DFLT_ESC_AUTO_SUB )
     256           0 :         nEsc = sal::static_int_cast< short >( -( 100 - nProp ) );
     257       16164 :     rFont.SetEscapement( nEsc );
     258       16164 : }
     259             : 
     260             : // -------------------------------------------------------------------------
     261             : // class EditCharAttribOutline
     262             : // -------------------------------------------------------------------------
     263        1641 : EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     264        1641 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     265             : {
     266             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_OUTLINE, "Not a Outline attribute!" );
     267        1641 : }
     268             : 
     269        7935 : void EditCharAttribOutline::SetFont( SvxFont& rFont, OutputDevice* )
     270             : {
     271        7935 :     rFont.SetOutline( (sal_Bool)((const SvxContourItem*)GetItem())->GetValue() );
     272        7935 : }
     273             : 
     274             : // -------------------------------------------------------------------------
     275             : // class EditCharAttribTab
     276             : // -------------------------------------------------------------------------
     277          94 : EditCharAttribTab::EditCharAttribTab( const SfxVoidItem& rAttr, sal_uInt16 nPos )
     278          94 :     : EditCharAttrib( rAttr, nPos, nPos+1 )
     279             : {
     280          94 :     SetFeature( sal_True );
     281          94 : }
     282             : 
     283           8 : void EditCharAttribTab::SetFont( SvxFont&, OutputDevice* )
     284             : {
     285           8 : }
     286             : 
     287             : // -------------------------------------------------------------------------
     288             : // class EditCharAttribLineBreak
     289             : // -------------------------------------------------------------------------
     290          29 : EditCharAttribLineBreak::EditCharAttribLineBreak( const SfxVoidItem& rAttr, sal_uInt16 nPos )
     291          29 :     : EditCharAttrib( rAttr, nPos, nPos+1 )
     292             : {
     293          29 :     SetFeature( sal_True );
     294          29 : }
     295             : 
     296          18 : void EditCharAttribLineBreak::SetFont( SvxFont&, OutputDevice* )
     297             : {
     298          18 : }
     299             : 
     300             : // -------------------------------------------------------------------------
     301             : // class EditCharAttribField
     302             : // -------------------------------------------------------------------------
     303        6441 : EditCharAttribField::EditCharAttribField( const SvxFieldItem& rAttr, sal_uInt16 nPos )
     304        6441 :     : EditCharAttrib( rAttr, nPos, nPos+1 )
     305             : {
     306        6441 :     SetFeature( sal_True ); // !!!
     307        6441 :     pTxtColor = 0;
     308        6441 :     pFldColor = 0;
     309        6441 : }
     310             : 
     311        5641 : void EditCharAttribField::SetFont( SvxFont& rFont, OutputDevice* )
     312             : {
     313        5641 :     if ( pFldColor )
     314             :     {
     315          93 :         rFont.SetFillColor( *pFldColor );
     316          93 :         rFont.SetTransparent( sal_False );
     317             :     }
     318        5641 :     if ( pTxtColor )
     319          51 :         rFont.SetColor( *pTxtColor );
     320        5641 : }
     321             : 
     322       11527 : const OUString& EditCharAttribField::GetFieldValue() const
     323             : {
     324       11527 :     return aFieldValue;
     325             : }
     326             : 
     327        2760 : void EditCharAttribField::SetFieldValue(const OUString& rVal)
     328             : {
     329        2760 :     aFieldValue = rVal;
     330        2760 : }
     331             : 
     332       11961 : void EditCharAttribField::Reset()
     333             : {
     334       11961 :     aFieldValue = OUString();
     335       11961 :     delete pTxtColor; pTxtColor = NULL;
     336       11961 :     delete pFldColor; pFldColor = NULL;
     337       11961 : }
     338             : 
     339        2760 : EditCharAttribField::EditCharAttribField( const EditCharAttribField& rAttr )
     340        8280 :     : EditCharAttrib( *rAttr.GetItem(), rAttr.GetStart(), rAttr.GetEnd() ),
     341        8280 :         aFieldValue( rAttr.aFieldValue )
     342             : {
     343             :     // Use this constructor only for temporary Objects, Item is not pooled.
     344        2760 :     pTxtColor = rAttr.pTxtColor ? new Color( *rAttr.pTxtColor ) : 0;
     345        2760 :     pFldColor = rAttr.pFldColor ? new Color( *rAttr.pFldColor ) : 0;
     346        2760 : }
     347             : 
     348       27603 : EditCharAttribField::~EditCharAttribField()
     349             : {
     350        9201 :     Reset();
     351       18402 : }
     352             : 
     353        2760 : bool EditCharAttribField::operator == ( const EditCharAttribField& rAttr ) const
     354             : {
     355        2760 :     if ( aFieldValue != rAttr.aFieldValue )
     356        2382 :         return false;
     357             : 
     358         378 :     if ( ( pTxtColor && !rAttr.pTxtColor ) || ( !pTxtColor && rAttr.pTxtColor ) )
     359           0 :         return false;
     360         378 :     if ( ( pTxtColor && rAttr.pTxtColor ) && ( *pTxtColor != *rAttr.pTxtColor ) )
     361           0 :         return false;
     362             : 
     363         378 :     if ( ( pFldColor && !rAttr.pFldColor ) || ( !pFldColor && rAttr.pFldColor ) )
     364           0 :         return false;
     365         378 :     if ( ( pFldColor && rAttr.pFldColor ) && ( *pFldColor != *rAttr.pFldColor ) )
     366           0 :         return false;
     367             : 
     368         378 :     return true;
     369             : }
     370             : 
     371             : // -------------------------------------------------------------------------
     372             : // class EditCharAttribPairKerning
     373             : // -------------------------------------------------------------------------
     374        1539 : EditCharAttribPairKerning::EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     375        1539 : : EditCharAttrib( rAttr, _nStart, _nEnd )
     376             : {
     377             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_PAIRKERNING, "Not a Pair Kerning!" );
     378        1539 : }
     379             : 
     380        8136 : void EditCharAttribPairKerning::SetFont( SvxFont& rFont, OutputDevice* )
     381             : {
     382        8136 :     rFont.SetKerning( ((const SvxAutoKernItem*)GetItem())->GetValue() );
     383        8136 : }
     384             : 
     385             : // -------------------------------------------------------------------------
     386             : // class EditCharAttribKerning
     387             : // -------------------------------------------------------------------------
     388        1801 : EditCharAttribKerning::EditCharAttribKerning( const SvxKerningItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     389        1801 : : EditCharAttrib( rAttr, _nStart, _nEnd )
     390             : {
     391             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_KERNING, "Not a Kerning!" );
     392        1801 : }
     393             : 
     394        8313 : void EditCharAttribKerning::SetFont( SvxFont& rFont, OutputDevice* )
     395             : {
     396        8313 :     rFont.SetFixKerning( ((const SvxKerningItem*)GetItem())->GetValue() );
     397        8313 : }
     398             : 
     399             : // -------------------------------------------------------------------------
     400             : // class EditCharAttribWordLineMode
     401             : // -------------------------------------------------------------------------
     402        1504 : EditCharAttribWordLineMode::EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     403        1504 : : EditCharAttrib( rAttr, _nStart, _nEnd )
     404             : {
     405             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_WLM, "Not a Kerning!" );
     406        1504 : }
     407             : 
     408        7976 : void EditCharAttribWordLineMode::SetFont( SvxFont& rFont, OutputDevice* )
     409             : {
     410        7976 :     rFont.SetWordLineMode( ((const SvxWordLineModeItem*)GetItem())->GetValue() );
     411        7976 : }
     412             : 
     413             : // -------------------------------------------------------------------------
     414             : // class EditCharAttribEmphasisMark
     415             : // -------------------------------------------------------------------------
     416        1424 : EditCharAttribEmphasisMark::EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     417        1424 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     418             : {
     419             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_EMPHASISMARK, "Not a Emphasis attribute!" );
     420        1424 : }
     421             : 
     422        7789 : void EditCharAttribEmphasisMark::SetFont( SvxFont& rFont, OutputDevice* )
     423             : {
     424        7789 :     rFont.SetEmphasisMark( ((const SvxEmphasisMarkItem*)GetItem())->GetEmphasisMark() );
     425        7789 : }
     426             : 
     427             : // -------------------------------------------------------------------------
     428             : // class EditCharAttribRelief
     429             : // -------------------------------------------------------------------------
     430        1406 : EditCharAttribRelief::EditCharAttribRelief( const SvxCharReliefItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     431        1406 :     : EditCharAttrib( rAttr, _nStart, _nEnd )
     432             : {
     433             :     DBG_ASSERT( rAttr.Which() == EE_CHAR_RELIEF, "Not a relief attribute!" );
     434        1406 : }
     435             : 
     436        7743 : void EditCharAttribRelief::SetFont( SvxFont& rFont, OutputDevice* )
     437             : {
     438        7743 :     rFont.SetRelief( (FontRelief)((const SvxCharReliefItem*)GetItem())->GetValue() );
     439        8010 : }
     440             : 
     441             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10