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