LibreOffice Module sw (master)  1
atrstck.cxx
Go to the documentation of this file.
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 "atrhndl.hxx"
21 #include <svl/itemiter.hxx>
22 #include <vcl/outdev.hxx>
23 #include <editeng/cmapitem.hxx>
24 #include <editeng/colritem.hxx>
25 #include <editeng/contouritem.hxx>
28 #include <editeng/fontitem.hxx>
29 #include <editeng/fhgtitem.hxx>
30 #include <editeng/kernitem.hxx>
32 #include <editeng/langitem.hxx>
33 #include <editeng/postitem.hxx>
34 #include <editeng/shdditem.hxx>
35 #include <editeng/udlnitem.hxx>
36 #include <editeng/wghtitem.hxx>
37 #include <editeng/wrlmitem.hxx>
38 #include <editeng/autokernitem.hxx>
39 #include <editeng/blinkitem.hxx>
43 #include <editeng/twolinesitem.hxx>
45 #include <editeng/boxitem.hxx>
46 #include <editeng/shaditem.hxx>
47 #include <viewopt.hxx>
48 #include <charfmt.hxx>
49 #include <fchrfmt.hxx>
50 #include <fmtautofmt.hxx>
51 #include <editeng/brushitem.hxx>
52 #include <fmtinfmt.hxx>
53 #include <txtinet.hxx>
55 #include <viewsh.hxx>
56 
70 {
71  0, // // 0
72  1, // RES_CHRATR_CASEMAP = RES_CHRATR_BEGIN // 1
73  0, // RES_CHRATR_CHARSETCOLOR, // 2
74  2, // RES_CHRATR_COLOR, // 3
75  3, // RES_CHRATR_CONTOUR, // 4
76  4, // RES_CHRATR_CROSSEDOUT, // 5
77  5, // RES_CHRATR_ESCAPEMENT, // 6
78  6, // RES_CHRATR_FONT, // 7
79  7, // RES_CHRATR_FONTSIZE, // 8
80  8, // RES_CHRATR_KERNING, // 9
81  9, // RES_CHRATR_LANGUAGE, // 10
82  10, // RES_CHRATR_POSTURE, // 11
83  0, // RES_CHRATR_UNUSED1, // 12
84  11, // RES_CHRATR_SHADOWED, // 13
85  12, // RES_CHRATR_UNDERLINE, // 14
86  13, // RES_CHRATR_WEIGHT, // 15
87  14, // RES_CHRATR_WORDLINEMODE, // 16
88  15, // RES_CHRATR_AUTOKERN, // 17
89  16, // RES_CHRATR_BLINK, // 18
90  17, // RES_CHRATR_NOHYPHEN, // 19
91  0, // RES_CHRATR_UNUSED2, // 20
92  18, // RES_CHRATR_BACKGROUND, // 21
93  19, // RES_CHRATR_CJK_FONT, // 22
94  20, // RES_CHRATR_CJK_FONTSIZE, // 23
95  21, // RES_CHRATR_CJK_LANGUAGE, // 24
96  22, // RES_CHRATR_CJK_POSTURE, // 25
97  23, // RES_CHRATR_CJK_WEIGHT, // 26
98  24, // RES_CHRATR_CTL_FONT, // 27
99  25, // RES_CHRATR_CTL_FONTSIZE, // 28
100  26, // RES_CHRATR_CTL_LANGUAGE, // 29
101  27, // RES_CHRATR_CTL_POSTURE, // 30
102  28, // RES_CHRATR_CTL_WEIGHT, // 31
103  29, // RES_CHRATR_ROTATE, // 32
104  30, // RES_CHRATR_EMPHASIS_MARK, // 33
105  31, // RES_CHRATR_TWO_LINES, // 34
106  32, // RES_CHRATR_SCALEW, // 35
107  33, // RES_CHRATR_RELIEF, // 36
108  34, // RES_CHRATR_HIDDEN, // 37
109  35, // RES_CHRATR_OVERLINE, // 38
110  0, // RES_CHRATR_RSID, // 39
111  36, // RES_CHRATR_BOX, // 40
112  37, // RES_CHRATR_SHADOW, // 41
113  38, // RES_CHRATR_HIGHLIGHT, // 42
114  0, // RES_CHRATR_GRABBAG, // 43
115  0, // RES_CHRATR_BIDIRTL, // 44
116  0, // RES_CHRATR_IDCTHINT, // 45
117  39, // RES_TXTATR_REFMARK, // 46
118  40, // RES_TXTATR_TOXMARK, // 47
119  41, // RES_TXTATR_META, // 48
120  41, // RES_TXTATR_METAFIELD, // 49
121  0, // RES_TXTATR_AUTOFMT, // 50
122  0, // RES_TXTATR_INETFMT // 51
123  0, // RES_TXTATR_CHARFMT, // 52
124  42, // RES_TXTATR_CJK_RUBY, // 53
125  0, // RES_TXTATR_UNKNOWN_CONTAINER, // 54
126  43, // RES_TXTATR_INPUTFIELD // 55
127 };
128 
129 namespace CharFormat
130 {
131 
133 const SfxItemSet* GetItemSet( const SfxPoolItem& rAttr )
134 {
135  const SfxItemSet* pSet = nullptr;
136 
137  if ( RES_TXTATR_AUTOFMT == rAttr.Which() )
138  {
139  pSet = static_cast<const SwFormatAutoFormat&>(rAttr).GetStyleHandle().get();
140  }
141  else
142  {
143  // Get the attributes from the template
144  const SwCharFormat* pFormat = RES_TXTATR_INETFMT == rAttr.Which() ?
145  static_cast<const SwFormatINetFormat&>(rAttr).GetTextINetFormat()->GetCharFormat() :
146  static_cast<const SwFormatCharFormat&>(rAttr).GetCharFormat();
147  if( pFormat )
148  {
149  pSet = &pFormat->GetAttrSet();
150  }
151  }
152 
153  return pSet;
154 }
155 
157 const SfxPoolItem* GetItem( const SwTextAttr& rAttr, sal_uInt16 nWhich )
158 {
159  if ( RES_TXTATR_INETFMT == rAttr.Which() ||
160  RES_TXTATR_CHARFMT == rAttr.Which() ||
161  RES_TXTATR_AUTOFMT == rAttr.Which() )
162  {
163  const SfxItemSet* pSet = CharFormat::GetItemSet( rAttr.GetAttr() );
164  if ( !pSet ) return nullptr;
165 
166  bool bInParent = RES_TXTATR_AUTOFMT != rAttr.Which();
167  const SfxPoolItem* pItem;
168  bool bRet = SfxItemState::SET == pSet->GetItemState( nWhich, bInParent, &pItem );
169 
170  return bRet ? pItem : nullptr;
171  }
172 
173  return ( nWhich == rAttr.Which() ) ? &rAttr.GetAttr() : nullptr;
174 }
175 
177 bool IsItemIncluded( const sal_uInt16 nWhich, const SwTextAttr *pAttr )
178 {
179  bool bRet = false;
180 
181  const SfxItemSet* pItemSet = CharFormat::GetItemSet( pAttr->GetAttr() );
182  if ( pItemSet )
183  bRet = SfxItemState::SET == pItemSet->GetItemState( nWhich );
184 
185  return bRet;
186 }
187 }
188 
196 static bool lcl_ChgHyperLinkColor( const SwTextAttr& rAttr,
197  const SfxPoolItem& rItem,
198  const SwViewShell* pShell,
199  Color* pColor )
200 {
201  if ( !pShell ||
202  RES_TXTATR_INETFMT != rAttr.Which() ||
203  RES_CHRATR_COLOR != rItem.Which() )
204  return false;
205 
206  // #i15455#
207  // 1. case:
208  // We do not want to show visited links:
209  // (printing, pdf export, page preview)
210 
211  SwTextINetFormat & rINetAttr(const_cast<SwTextINetFormat&>(
212  static_txtattr_cast<SwTextINetFormat const&>(rAttr)));
213  if ( pShell->GetOut()->GetOutDevType() == OUTDEV_PRINTER ||
214  pShell->GetViewOptions()->IsPDFExport() ||
215  pShell->GetViewOptions()->IsPagePreview() )
216  {
217  if (rINetAttr.IsVisited())
218  {
219  if ( pColor )
220  {
221  // take color from character format 'unvisited link'
222  rINetAttr.SetVisited(false);
223  const SwCharFormat* pTmpFormat = rINetAttr.GetCharFormat();
224  const SfxPoolItem* pItem;
225  if (SfxItemState::SET == pTmpFormat->GetItemState(RES_CHRATR_COLOR, true, &pItem))
226  *pColor = static_cast<const SvxColorItem*>(pItem)->GetValue();
227  rINetAttr.SetVisited(true);
228  }
229  return true;
230  }
231 
232  return false;
233  }
234 
235  // 2. case:
236  // We do not want to apply the color set in the hyperlink
237  // attribute, instead we take the colors from the view options:
238 
239  if ( pShell->GetWin() &&
240  (
241  (rINetAttr.IsVisited() && SwViewOption::IsVisitedLinks()) ||
242  (!rINetAttr.IsVisited() && SwViewOption::IsLinks())
243  )
244  )
245  {
246  if ( pColor )
247  {
248  if (rINetAttr.IsVisited())
249  {
250  // take color from view option 'visited link color'
252  }
253  else
254  {
255  // take color from view option 'unvisited link color'
256  *pColor = SwViewOption::GetLinksColor();
257  }
258  }
259  return true;
260  }
261 
262  return false;
263 }
264 
266  : m_pIDocumentSettingAccess(nullptr)
267  , m_pShell(nullptr)
268  , m_bVertLayout(false)
269  , m_bVertLayoutLRBT(false)
270 {
271  memset( m_pDefaultArray, 0, NUM_DEFAULT_VALUES * sizeof(SfxPoolItem*) );
272 }
273 
275 {
276 }
277 
278 void SwAttrHandler::Init( const SwAttrSet& rAttrSet,
279  const IDocumentSettingAccess& rIDocumentSettingAcces )
280 {
281  m_pIDocumentSettingAccess = &rIDocumentSettingAcces;
282  m_pShell = nullptr;
283 
284  for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++ )
285  m_pDefaultArray[ StackPos[ i ] ] = &rAttrSet.Get( i );
286 }
287 
288 void SwAttrHandler::Init( const SfxPoolItem** pPoolItem, const SwAttrSet* pAS,
289  const IDocumentSettingAccess& rIDocumentSettingAcces,
290  const SwViewShell* pSh,
291  SwFont& rFnt, bool bVL, bool bVertLayoutLRBT )
292 {
293  // initialize default array
294  memcpy( m_pDefaultArray, pPoolItem,
295  NUM_DEFAULT_VALUES * sizeof(SfxPoolItem*) );
296 
297  m_pIDocumentSettingAccess = &rIDocumentSettingAcces;
298  m_pShell = pSh;
299 
300  // do we have to apply additional paragraph attributes?
301  m_bVertLayout = bVL;
302  m_bVertLayoutLRBT = bVertLayoutLRBT;
303 
304  if ( pAS && pAS->Count() )
305  {
306  SfxItemIter aIter( *pAS );
307  sal_uInt16 nWhich;
308  const SfxPoolItem* pItem = aIter.GetCurItem();
309  do
310  {
311  nWhich = pItem->Which();
312  if (isCHRATR(nWhich))
313  {
314  m_pDefaultArray[ StackPos[ nWhich ] ] = pItem;
315  FontChg( *pItem, rFnt, true );
316  }
317 
318  pItem = aIter.NextItem();
319  } while (pItem);
320  }
321 
322  // It is possible, that Init is called more than once, e.g., in a
323  // SwTextFrame::FormatOnceMore situation or (since sw_redlinehide)
324  // from SwAttrIter::Seek(); in the latter case SwTextSizeInfo::m_pFnt
325  // is an alias of m_pFnt so it must not be deleted!
326  if (m_pFnt)
327  {
328  *m_pFnt = rFnt;
329  }
330  else
331  {
332  m_pFnt.reset(new SwFont(rFnt));
333  }
334 }
335 
337 {
338  for (auto& i : m_aAttrStack)
339  i.clear();
340 }
341 
342 void SwAttrHandler::PushAndChg( const SwTextAttr& rAttr, SwFont& rFnt )
343 {
344  // these special attributes in fact represent a collection of attributes
345  // they have to be pushed to each stack they belong to
346  if ( RES_TXTATR_INETFMT == rAttr.Which() ||
347  RES_TXTATR_CHARFMT == rAttr.Which() ||
348  RES_TXTATR_AUTOFMT == rAttr.Which() )
349  {
350  const SfxItemSet* pSet = CharFormat::GetItemSet( rAttr.GetAttr() );
351  if ( !pSet ) return;
352 
353  for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
354  {
355  const SfxPoolItem* pItem;
356  bool bRet = SfxItemState::SET == pSet->GetItemState( i, rAttr.Which() != RES_TXTATR_AUTOFMT, &pItem );
357 
358  if ( bRet )
359  {
360  // we push rAttr onto the appropriate stack
361  if ( Push( rAttr, *pItem ) )
362  {
363  // we let pItem change rFnt
364  Color aColor;
365  if (lcl_ChgHyperLinkColor(rAttr, *pItem, m_pShell, &aColor))
366  {
367  SvxColorItem aItemNext( aColor, RES_CHRATR_COLOR );
368  FontChg( aItemNext, rFnt, true );
369  }
370  else
371  FontChg( *pItem, rFnt, true );
372  }
373  }
374  }
375  }
376  // this is the usual case, we have a basic attribute, push it onto the
377  // stack and change the font
378  else
379  {
380  if ( Push( rAttr, rAttr.GetAttr() ) )
381  // we let pItem change rFnt
382  FontChg( rAttr.GetAttr(), rFnt, true );
383  }
384 }
385 
386 const SwTextAttr* SwAttrHandler::GetTop(sal_uInt16 nStack)
387 {
388  return m_aAttrStack[nStack].empty() ? nullptr : m_aAttrStack[nStack].back();
389 }
390 
391 bool SwAttrHandler::Push( const SwTextAttr& rAttr, const SfxPoolItem& rItem )
392 {
393  OSL_ENSURE( rItem.Which() < RES_TXTATR_WITHEND_END,
394  "I do not want this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
395 
396  // robust
397  if ( RES_TXTATR_WITHEND_END <= rItem.Which() )
398  return false;
399 
400  const sal_uInt16 nStack = StackPos[ rItem.Which() ];
401 
402  // attributes originating from redlining have highest priority
403  // second priority are hyperlink attributes, which have a color replacement
404  const SwTextAttr* pTopAttr = GetTop(nStack);
405  if ( !pTopAttr
406  || rAttr.IsPriorityAttr()
407  || ( !pTopAttr->IsPriorityAttr()
408  && !lcl_ChgHyperLinkColor(*pTopAttr, rItem, m_pShell, nullptr)))
409  {
410  m_aAttrStack[nStack].push_back(&rAttr);
411  return true;
412  }
413 
414  const auto it = m_aAttrStack[nStack].end() - 1;
415  m_aAttrStack[nStack].insert(it, &rAttr);
416  return false;
417 }
418 
419 void SwAttrHandler::RemoveFromStack(sal_uInt16 nWhich, const SwTextAttr& rAttr)
420 {
421  auto& rStack = m_aAttrStack[StackPos[nWhich]];
422  const auto it = std::find(rStack.begin(), rStack.end(), &rAttr);
423  if (it != rStack.end())
424  rStack.erase(it);
425 }
426 
427 void SwAttrHandler::PopAndChg( const SwTextAttr& rAttr, SwFont& rFnt )
428 {
429  if ( RES_TXTATR_WITHEND_END <= rAttr.Which() )
430  return; // robust
431 
432  // these special attributes in fact represent a collection of attributes
433  // they have to be removed from each stack they belong to
434  if ( RES_TXTATR_INETFMT == rAttr.Which() ||
435  RES_TXTATR_CHARFMT == rAttr.Which() ||
436  RES_TXTATR_AUTOFMT == rAttr.Which() )
437  {
438  const SfxItemSet* pSet = CharFormat::GetItemSet( rAttr.GetAttr() );
439  if ( !pSet ) return;
440 
441  for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
442  {
443  const SfxPoolItem* pItem;
444  bool bRet = SfxItemState::SET == pSet->GetItemState( i, RES_TXTATR_AUTOFMT != rAttr.Which(), &pItem );
445  if ( bRet )
446  {
447  // we remove rAttr from the appropriate stack
448  RemoveFromStack(i, rAttr);
449  // reset font according to attribute on top of stack
450  // or default value
451  ActivateTop( rFnt, i );
452  }
453  }
454  }
455  // this is the usual case, we have a basic attribute, remove it from the
456  // stack and reset the font
457  else
458  {
459  RemoveFromStack(rAttr.Which(), rAttr);
460  // reset font according to attribute on top of stack
461  // or default value
462  ActivateTop( rFnt, rAttr.Which() );
463  }
464 }
465 
467 void SwAttrHandler::Pop( const SwTextAttr& rAttr )
468 {
469  OSL_ENSURE( rAttr.Which() < RES_TXTATR_WITHEND_END,
470  "I do not have this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
471 
472  if ( rAttr.Which() < RES_TXTATR_WITHEND_END )
473  {
474  RemoveFromStack(rAttr.Which(), rAttr);
475  }
476 }
477 
478 void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr )
479 {
480  OSL_ENSURE( nAttr < RES_TXTATR_WITHEND_END,
481  "I cannot activate this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
482 
483  const sal_uInt16 nStackPos = StackPos[ nAttr ];
484  const SwTextAttr* pTopAt = GetTop(nStackPos);
485  if ( pTopAt )
486  {
487  const SfxPoolItem* pItemNext(nullptr);
488 
489  // check if top attribute is collection of attributes
490  if ( RES_TXTATR_INETFMT == pTopAt->Which() ||
491  RES_TXTATR_CHARFMT == pTopAt->Which() ||
492  RES_TXTATR_AUTOFMT == pTopAt->Which() )
493  {
494  const SfxItemSet* pSet = CharFormat::GetItemSet( pTopAt->GetAttr() );
495  if (pSet)
496  pSet->GetItemState( nAttr, RES_TXTATR_AUTOFMT != pTopAt->Which(), &pItemNext );
497  }
498 
499  if (pItemNext)
500  {
501  Color aColor;
502  if (lcl_ChgHyperLinkColor(*pTopAt, *pItemNext, m_pShell, &aColor))
503  {
504  SvxColorItem aItemNext( aColor, RES_CHRATR_COLOR );
505  FontChg( aItemNext, rFnt, false );
506  }
507  else
508  FontChg( *pItemNext, rFnt, false );
509  }
510  else
511  FontChg( pTopAt->GetAttr(), rFnt, false );
512  }
513 
514  // default value has to be set, we only have default values for char attribs
515  else if ( nStackPos < NUM_DEFAULT_VALUES )
516  FontChg( *m_pDefaultArray[ nStackPos ], rFnt, false );
517  else if ( RES_TXTATR_REFMARK == nAttr )
518  rFnt.GetRef()--;
519  else if ( RES_TXTATR_TOXMARK == nAttr )
520  rFnt.GetTox()--;
521  else if ( (RES_TXTATR_META == nAttr) || (RES_TXTATR_METAFIELD == nAttr) )
522  {
523  rFnt.GetMeta()--;
524  }
525  else if ( RES_TXTATR_CJK_RUBY == nAttr )
526  {
527  // ruby stack has no more attributes
528  // check, if a rotation attribute has to be applied
529  const sal_uInt16 nTwoLineStack = StackPos[ RES_CHRATR_TWO_LINES ];
530  bool bTwoLineAct = false;
531  const SwTextAttr* pTwoLineAttr = GetTop(nTwoLineStack);
532 
533  if ( pTwoLineAttr )
534  {
535  const SfxPoolItem* pTwoLineItem = CharFormat::GetItem( *pTwoLineAttr, RES_CHRATR_TWO_LINES );
536  bTwoLineAct = static_cast<const SvxTwoLinesItem*>(pTwoLineItem)->GetValue();
537  }
538  else
539  bTwoLineAct =
540  static_cast<const SvxTwoLinesItem*>(m_pDefaultArray[ nTwoLineStack ])->GetValue();
541 
542  if ( bTwoLineAct )
543  return;
544 
545  // eventually, a rotate attribute has to be activated
546  const sal_uInt16 nRotateStack = StackPos[ RES_CHRATR_ROTATE ];
547  const SwTextAttr* pRotateAttr = GetTop(nRotateStack);
548 
549  if ( pRotateAttr )
550  {
551  const SfxPoolItem* pRotateItem = CharFormat::GetItem( *pRotateAttr, RES_CHRATR_ROTATE );
552  rFnt.SetVertical( static_cast<const SvxCharRotateItem*>(pRotateItem)->GetValue(),
553  m_bVertLayout );
554  }
555  else
556  rFnt.SetVertical(
557  static_cast<const SvxCharRotateItem*>(m_pDefaultArray[ nRotateStack ])->GetValue(),
559  );
560  }
561  else if ( RES_TXTATR_INPUTFIELD == nAttr )
562  rFnt.GetInputField()--;
563 }
564 
570 void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, bool bPush )
571 {
572  switch ( rItem.Which() )
573  {
574  case RES_CHRATR_CASEMAP :
575  rFnt.SetCaseMap( static_cast<const SvxCaseMapItem&>(rItem).GetCaseMap() );
576  break;
577  case RES_CHRATR_COLOR :
578  rFnt.SetColor( static_cast<const SvxColorItem&>(rItem).GetValue() );
579  break;
580  case RES_CHRATR_CONTOUR :
581  rFnt.SetOutline( static_cast<const SvxContourItem&>(rItem).GetValue() );
582  break;
583  case RES_CHRATR_CROSSEDOUT :
584  rFnt.SetStrikeout( static_cast<const SvxCrossedOutItem&>(rItem).GetStrikeout() );
585  break;
586  case RES_CHRATR_ESCAPEMENT :
587  rFnt.SetEscapement( static_cast<const SvxEscapementItem&>(rItem).GetEsc() );
588  rFnt.SetProportion( static_cast<const SvxEscapementItem&>(rItem).GetProportionalHeight() );
589  break;
590  case RES_CHRATR_FONT :
591  rFnt.SetName( static_cast<const SvxFontItem&>(rItem).GetFamilyName(), SwFontScript::Latin );
592  rFnt.SetStyleName( static_cast<const SvxFontItem&>(rItem).GetStyleName(), SwFontScript::Latin );
593  rFnt.SetFamily( static_cast<const SvxFontItem&>(rItem).GetFamily(), SwFontScript::Latin );
594  rFnt.SetPitch( static_cast<const SvxFontItem&>(rItem).GetPitch(), SwFontScript::Latin );
595  rFnt.SetCharSet( static_cast<const SvxFontItem&>(rItem).GetCharSet(), SwFontScript::Latin );
596  break;
597  case RES_CHRATR_FONTSIZE :
598  rFnt.SetSize(Size(0,static_cast<const SvxFontHeightItem&>(rItem).GetHeight() ), SwFontScript::Latin );
599  break;
600  case RES_CHRATR_KERNING :
601  rFnt.SetFixKerning( static_cast<const SvxKerningItem&>(rItem).GetValue() );
602  break;
603  case RES_CHRATR_LANGUAGE :
604  rFnt.SetLanguage( static_cast<const SvxLanguageItem&>(rItem).GetLanguage(), SwFontScript::Latin );
605  break;
606  case RES_CHRATR_POSTURE :
607  rFnt.SetItalic( static_cast<const SvxPostureItem&>(rItem).GetPosture(), SwFontScript::Latin );
608  break;
609  case RES_CHRATR_SHADOWED :
610  rFnt.SetShadow( static_cast<const SvxShadowedItem&>(rItem).GetValue() );
611  break;
612  case RES_CHRATR_UNDERLINE :
613  {
614  const sal_uInt16 nStackPos = StackPos[ RES_CHRATR_HIDDEN ];
615  const SwTextAttr* pTopAt = GetTop(nStackPos);
616 
617  const SfxPoolItem* pTmpItem = pTopAt ?
619  m_pDefaultArray[ nStackPos ];
620 
621  if ((m_pShell && !m_pShell->GetWin()) ||
622  (pTmpItem && !static_cast<const SvxCharHiddenItem*>(pTmpItem)->GetValue()) )
623  {
624  rFnt.SetUnderline( static_cast<const SvxUnderlineItem&>(rItem).GetLineStyle() );
625  rFnt.SetUnderColor( static_cast<const SvxUnderlineItem&>(rItem).GetColor() );
626  }
627  break;
628  }
629  case RES_CHRATR_BOX:
630  {
631  const SvxBoxItem& aBoxItem = static_cast<const SvxBoxItem&>(rItem);
632  rFnt.SetTopBorder( aBoxItem.GetTop() );
633  rFnt.SetBottomBorder( aBoxItem.GetBottom() );
634  rFnt.SetRightBorder( aBoxItem.GetRight() );
635  rFnt.SetLeftBorder( aBoxItem.GetLeft() );
636  rFnt.SetTopBorderDist( aBoxItem.GetDistance(SvxBoxItemLine::TOP) );
637  rFnt.SetBottomBorderDist( aBoxItem.GetDistance(SvxBoxItemLine::BOTTOM) );
638  rFnt.SetRightBorderDist( aBoxItem.GetDistance(SvxBoxItemLine::RIGHT) );
639  rFnt.SetLeftBorderDist( aBoxItem.GetDistance(SvxBoxItemLine::LEFT) );
640  break;
641  }
642  case RES_CHRATR_SHADOW:
643  {
644  const SvxShadowItem& aShadowItem = static_cast<const SvxShadowItem&>(rItem);
645  rFnt.SetShadowColor( aShadowItem.GetColor() );
646  rFnt.SetShadowWidth( aShadowItem.GetWidth() );
647  rFnt.SetShadowLocation( aShadowItem.GetLocation() );
648  break;
649  }
650  case RES_CHRATR_OVERLINE :
651  rFnt.SetOverline( static_cast<const SvxOverlineItem&>(rItem).GetLineStyle() );
652  rFnt.SetOverColor( static_cast<const SvxOverlineItem&>(rItem).GetColor() );
653  break;
654  case RES_CHRATR_WEIGHT :
655  rFnt.SetWeight( static_cast<const SvxWeightItem&>(rItem).GetWeight(), SwFontScript::Latin );
656  break;
658  rFnt.SetWordLineMode( static_cast<const SvxWordLineModeItem&>(rItem).GetValue() );
659  break;
660  case RES_CHRATR_AUTOKERN :
661  if( static_cast<const SvxAutoKernItem&>(rItem).GetValue() )
662  {
665  FontKerning::FontSpecific :
666  FontKerning::Asian );
667  }
668  else
669  rFnt.SetAutoKern( FontKerning::NONE );
670  break;
671  case RES_CHRATR_BACKGROUND :
672  rFnt.SetBackColor(new Color( static_cast<const SvxBrushItem&>(rItem).GetColor() ) );
673  break;
674  case RES_CHRATR_HIGHLIGHT :
675  rFnt.SetHighlightColor( static_cast<const SvxBrushItem&>(rItem).GetColor() );
676  break;
677  case RES_CHRATR_CJK_FONT :
678  rFnt.SetName( static_cast<const SvxFontItem&>(rItem).GetFamilyName(), SwFontScript::CJK );
679  rFnt.SetStyleName( static_cast<const SvxFontItem&>(rItem).GetStyleName(), SwFontScript::CJK );
680  rFnt.SetFamily( static_cast<const SvxFontItem&>(rItem).GetFamily(), SwFontScript::CJK );
681  rFnt.SetPitch( static_cast<const SvxFontItem&>(rItem).GetPitch(), SwFontScript::CJK );
682  rFnt.SetCharSet( static_cast<const SvxFontItem&>(rItem).GetCharSet(), SwFontScript::CJK );
683  break;
685  rFnt.SetSize(Size( 0, static_cast<const SvxFontHeightItem&>(rItem).GetHeight()), SwFontScript::CJK);
686  break;
688  rFnt.SetLanguage( static_cast<const SvxLanguageItem&>(rItem).GetLanguage(), SwFontScript::CJK );
689  break;
691  rFnt.SetItalic( static_cast<const SvxPostureItem&>(rItem).GetPosture(), SwFontScript::CJK );
692  break;
693  case RES_CHRATR_CJK_WEIGHT :
694  rFnt.SetWeight( static_cast<const SvxWeightItem&>(rItem).GetWeight(), SwFontScript::CJK );
695  break;
696  case RES_CHRATR_CTL_FONT :
697  rFnt.SetName( static_cast<const SvxFontItem&>(rItem).GetFamilyName(), SwFontScript::CTL );
698  rFnt.SetStyleName( static_cast<const SvxFontItem&>(rItem).GetStyleName(), SwFontScript::CTL );
699  rFnt.SetFamily( static_cast<const SvxFontItem&>(rItem).GetFamily(), SwFontScript::CTL );
700  rFnt.SetPitch( static_cast<const SvxFontItem&>(rItem).GetPitch(), SwFontScript::CTL );
701  rFnt.SetCharSet( static_cast<const SvxFontItem&>(rItem).GetCharSet(), SwFontScript::CTL );
702  break;
704  rFnt.SetSize(Size(0, static_cast<const SvxFontHeightItem&>(rItem).GetHeight() ), SwFontScript::CTL);
705  break;
707  rFnt.SetLanguage( static_cast<const SvxLanguageItem&>(rItem).GetLanguage(), SwFontScript::CTL );
708  break;
710  rFnt.SetItalic( static_cast<const SvxPostureItem&>(rItem).GetPosture(), SwFontScript::CTL );
711  break;
712  case RES_CHRATR_CTL_WEIGHT :
713  rFnt.SetWeight( static_cast<const SvxWeightItem&>(rItem).GetWeight(), SwFontScript::CTL );
714  break;
716  rFnt.SetEmphasisMark(
717  static_cast<const SvxEmphasisMarkItem&>(rItem).GetEmphasisMark()
718  );
719  break;
720  case RES_CHRATR_SCALEW :
721  rFnt.SetPropWidth( static_cast<const SvxCharScaleWidthItem&>(rItem).GetValue() );
722  break;
723  case RES_CHRATR_RELIEF :
724  rFnt.SetRelief( static_cast<const SvxCharReliefItem&>(rItem).GetValue() );
725  break;
726  case RES_CHRATR_HIDDEN :
727  if (m_pShell && m_pShell->GetWin())
728  {
729  if ( static_cast<const SvxCharHiddenItem&>(rItem).GetValue() )
731  else
733  }
734  break;
735  case RES_CHRATR_ROTATE :
736  {
737  // rotate attribute is applied, when:
738  // 1. ruby stack is empty and
739  // 2. top of two line stack ( or default attribute )is an
740  // deactivated two line attribute
741  const bool bRuby =
742  0 != m_aAttrStack[ StackPos[ RES_TXTATR_CJK_RUBY ] ].size();
743 
744  if ( bRuby )
745  break;
746 
747  const sal_uInt16 nTwoLineStack = StackPos[ RES_CHRATR_TWO_LINES ];
748  bool bTwoLineAct = false;
749  const SwTextAttr* pTwoLineAttr = GetTop(nTwoLineStack);
750 
751  if ( pTwoLineAttr )
752  {
753  const SfxPoolItem* pTwoLineItem = CharFormat::GetItem( *pTwoLineAttr, RES_CHRATR_TWO_LINES );
754  bTwoLineAct = static_cast<const SvxTwoLinesItem*>(pTwoLineItem)->GetValue();
755  }
756  else
757  bTwoLineAct =
758  static_cast<const SvxTwoLinesItem*>(m_pDefaultArray[ nTwoLineStack ])->GetValue();
759 
760  if ( !bTwoLineAct )
761  rFnt.SetVertical( static_cast<const SvxCharRotateItem&>(rItem).GetValue(),
763 
764  break;
765  }
766  case RES_CHRATR_TWO_LINES :
767  {
768  bool bRuby = 0 !=
770 
771  // two line is activated, if
772  // 1. no ruby attribute is set and
773  // 2. attribute is active
774  if ( !bRuby && static_cast<const SvxTwoLinesItem&>(rItem).GetValue() )
775  {
776  rFnt.SetVertical( 0, m_bVertLayout );
777  break;
778  }
779 
780  // a deactivating two line attribute is on top of stack,
781  // check if rotate attribute has to be enabled
782  if ( bRuby )
783  break;
784 
785  const sal_uInt16 nRotateStack = StackPos[ RES_CHRATR_ROTATE ];
786  const SwTextAttr* pRotateAttr = GetTop(nRotateStack);
787 
788  if ( pRotateAttr )
789  {
790  const SfxPoolItem* pRotateItem = CharFormat::GetItem( *pRotateAttr, RES_CHRATR_ROTATE );
791  rFnt.SetVertical( static_cast<const SvxCharRotateItem*>(pRotateItem)->GetValue(),
792  m_bVertLayout );
793  }
794  else
795  rFnt.SetVertical(
796  static_cast<const SvxCharRotateItem*>(m_pDefaultArray[ nRotateStack ])->GetValue(),
798  );
799  break;
800  }
801  case RES_TXTATR_CJK_RUBY :
802  rFnt.SetVertical( 0, m_bVertLayout );
803  break;
804  case RES_TXTATR_REFMARK :
805  if ( bPush )
806  rFnt.GetRef()++;
807  else
808  rFnt.GetRef()--;
809  break;
810  case RES_TXTATR_TOXMARK :
811  if ( bPush )
812  rFnt.GetTox()++;
813  else
814  rFnt.GetTox()--;
815  break;
816  case RES_TXTATR_META:
818  if ( bPush )
819  rFnt.GetMeta()++;
820  else
821  rFnt.GetMeta()--;
822  break;
823  case RES_TXTATR_INPUTFIELD :
824  if ( bPush )
825  rFnt.GetInputField()++;
826  else
827  rFnt.GetInputField()--;
828  break;
829  }
830 }
831 
834  sal_uInt16& nAscent, sal_uInt16& nHeight ) const
835 {
836  OSL_ENSURE(m_pFnt, "No font available for GetDefaultAscentAndHeight");
837 
838  if (m_pFnt)
839  {
840  SwFont aFont( *m_pFnt );
841  nHeight = aFont.GetHeight( pShell, rOut );
842  nAscent = aFont.GetAscent( pShell, rOut );
843  }
844 }
845 
846 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetLeftBorderDist(const sal_uInt16 nLeftDist)
Definition: swfont.hxx:848
vcl::RenderContext * GetOut() const
Definition: viewsh.hxx:339
OutDevType GetOutDevType() const
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
SwCharFormat * GetCharFormat()
Definition: txtatr2.cxx:110
bool IsPagePreview() const
Definition: viewopt.hxx:617
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
constexpr TypedWhichId< SvxEscapementItem > RES_CHRATR_ESCAPEMENT(6)
void Pop(const SwTextAttr &rAttr)
Only used during redlining.
Definition: atrstck.cxx:467
static bool IsVisitedLinks()
Definition: viewopt.hxx:652
bool IsPriorityAttr() const
Definition: txatbase.hxx:97
void SetWordLineMode(const bool bWordLineMode)
Definition: swfont.hxx:668
bool isCHRATR(const sal_uInt16 nWhich)
Definition: hintids.hxx:471
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_METAFIELD(49)
void PopAndChg(const SwTextAttr &rAttr, SwFont &rFnt)
Definition: atrstck.cxx:427
std::string GetValue
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_META(48)
void FontChg(const SfxPoolItem &rItem, SwFont &rFnt, bool bPush)
When popping an attribute from the stack, the top more remaining attribute in the stack becomes valid...
Definition: atrstck.cxx:570
const SfxPoolItem * GetItem(const SwTextAttr &rAttr, sal_uInt16 nWhich)
Extracts pool item of type nWhich from rAttr.
Definition: atrstck.cxx:157
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
LanguageType GetLanguage(SfxItemSet const &aSet, sal_uInt16 nLangWhichId)
Definition: langhelper.cxx:399
static Color & GetLinksColor()
Definition: viewopt.cxx:390
void SetBackColor(Color *pNewColor)
Definition: swfont.cxx:65
void SetEmphasisMark(const FontEmphasisMark eValue)
Definition: swfont.hxx:682
sal_uInt16 GetDistance(SvxBoxItemLine nLine) const
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
constexpr TypedWhichId< SvxAutoKernItem > RES_CHRATR_AUTOKERN(17)
bool IsVisited() const
Definition: txtinet.hxx:55
const SfxPoolItem * m_pDefaultArray[NUM_DEFAULT_VALUES]
Definition: atrhndl.hxx:44
constexpr TypedWhichId< SvxBoxItem > RES_CHRATR_BOX(40)
sal_uInt16 Which() const
Definition: txatbase.hxx:110
void SetOutline(const bool bOutline)
Definition: swfont.hxx:600
const editeng::SvxBorderLine * GetRight() const
void SetPropWidth(const sal_uInt16 nNew)
Definition: swfont.hxx:690
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
sal_uInt8 & GetRef()
Definition: swfont.hxx:249
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
void SetBottomBorderDist(const sal_uInt16 nBottomDist)
Definition: swfont.hxx:834
void SetPitch(const FontPitch ePitch, const SwFontScript nWhich)
Definition: swfont.hxx:501
constexpr TypedWhichId< SvxTwoLinesItem > RES_CHRATR_TWO_LINES(34)
#define NUM_DEFAULT_VALUES
Definition: swfntcch.hxx:22
void SetColor(const Color &rColor)
Definition: swfont.hxx:411
constexpr TypedWhichId< SvxCaseMapItem > RES_CHRATR_CASEMAP(RES_CHRATR_BEGIN)
void SetShadow(const bool bShadow)
Definition: swfont.hxx:615
bool m_bVertLayoutLRBT
Definition: atrhndl.hxx:53
const SfxPoolItem * NextItem()
SvxShadowLocation GetLocation() const
bool m_bVertLayout
Definition: atrhndl.hxx:52
constexpr TypedWhichId< SvxShadowItem > RES_CHRATR_SHADOW(41)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
sal_uInt16 GetAscent(SwViewShell const *pSh, const OutputDevice &rOut)
Definition: swfont.hxx:323
static Color & GetVisitedLinksColor()
Definition: viewopt.cxx:395
constexpr TypedWhichId< SwFormatRuby > RES_TXTATR_CJK_RUBY(53)
void SetShadowColor(const Color &rColor)
Definition: swfont.hxx:920
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
void SetUnderline(const FontLineStyle eUnderline)
Definition: swfont.hxx:542
constexpr TypedWhichId< SvxCharReliefItem > RES_CHRATR_RELIEF(36)
void SetShadowLocation(const SvxShadowLocation aLocation)
Definition: swfont.hxx:934
std::unique_ptr< SwFont > m_pFnt
Definition: atrhndl.hxx:50
constexpr TypedWhichId< SwFormatAutoFormat > RES_TXTATR_AUTOFMT(50)
void SetStrikeout(const FontStrikeout eStrikeout)
Definition: swfont.hxx:572
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
void SetLeftBorder(const editeng::SvxBorderLine *pLeftBorder)
Definition: swfont.cxx:111
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
OUTDEV_PRINTER
const Color & GetColor() const
void SetStyleName(const OUString &rStyleName, const SwFontScript nWhich)
Definition: swfont.hxx:474
const editeng::SvxBorderLine * GetTop() const
void SetLanguage(LanguageType eNewLang, const SwFontScript nWhich)
Definition: swfont.hxx:804
void Reset()
Definition: atrstck.cxx:336
void Init(const SwAttrSet &rAttrSet, const IDocumentSettingAccess &rIDocumentSettingAccess)
Definition: atrstck.cxx:278
void SetRightBorder(const editeng::SvxBorderLine *pRightBorder)
Definition: swfont.cxx:98
const editeng::SvxBorderLine * GetLeft() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void SetVisited(bool bNew)
Definition: txtinet.hxx:56
int i
void SetUnderColor(const Color &rColor)
Definition: swfont.hxx:214
void SetRightBorderDist(const sal_uInt16 nRightDist)
Definition: swfont.hxx:841
void SetShadowWidth(const sal_uInt16 nWidth)
Definition: swfont.hxx:927
void SetCaseMap(const SvxCaseMap eNew)
Definition: swfont.hxx:654
constexpr sal_uInt16 RES_TXTATR_WITHEND_END(56)
sal_uInt16 Count() const
long GetHeight() const
Definition: swfont.hxx:280
constexpr TypedWhichId< SvxShadowedItem > RES_CHRATR_SHADOWED(13)
void SetRelief(const FontRelief eNew)
Definition: swfont.hxx:708
const IDocumentSettingAccess * m_pIDocumentSettingAccess
Definition: atrhndl.hxx:45
const SfxItemSet * GetItemSet(const SfxPoolItem &rAttr)
Returns the item set associated with a character/inet/auto style.
Definition: atrstck.cxx:133
void SetEscapement(const short nNewEsc)
Definition: swfont.hxx:781
Provides access to settings of a document.
void RemoveFromStack(sal_uInt16 nWhich, const SwTextAttr &rAttr)
Definition: atrstck.cxx:419
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
Definition: format.cxx:396
void SetWeight(const FontWeight eWeight, const SwFontScript nWhich)
Definition: swfont.hxx:529
void GetDefaultAscentAndHeight(SwViewShell const *pShell, OutputDevice const &rOut, sal_uInt16 &nAscent, sal_uInt16 &nHeight) const
Takes the default font and calculated the ascent and height.
Definition: atrstck.cxx:833
bool IsPDFExport() const
Definition: viewopt.hxx:399
Shell * m_pShell
bool Push(const SwTextAttr &rAttr, const SfxPoolItem &rItem)
Definition: atrstck.cxx:391
constexpr TypedWhichId< SvxOverlineItem > RES_CHRATR_OVERLINE(38)
constexpr TypedWhichId< SvxEmphasisMarkItem > RES_CHRATR_EMPHASIS_MARK(33)
sal_uInt8 & GetMeta()
Definition: swfont.hxx:251
void SetOverColor(const Color &rColor)
Definition: swfont.hxx:216
const SwTextAttr * GetTop(sal_uInt16 nStack)
Definition: atrstck.cxx:386
void SetFixKerning(const short nNewKern)
Definition: swfont.hxx:647
constexpr TypedWhichId< SvxCharScaleWidthItem > RES_CHRATR_SCALEW(35)
constexpr TypedWhichId< SvxCharHiddenItem > RES_CHRATR_HIDDEN(37)
void SetBottomBorder(const editeng::SvxBorderLine *pBottomBorder)
Definition: swfont.cxx:85
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
static bool IsLinks()
Definition: viewopt.hxx:651
const sal_uInt8 StackPos[RES_TXTATR_WITHEND_END-RES_CHRATR_BEGIN+1]
Attribute to Stack Mapping.
Definition: atrstck.cxx:69
const SwViewShell * m_pShell
Definition: atrhndl.hxx:46
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
sal_uInt8 & GetInputField()
Definition: swfont.hxx:253
sal_uInt8 & GetTox()
Definition: swfont.hxx:247
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void SetSize(const Size &rSize, const SwFontScript nWhich)
Definition: swfont.hxx:734
unsigned char sal_uInt8
constexpr TypedWhichId< SvxWordLineModeItem > RES_CHRATR_WORDLINEMODE(16)
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:424
vcl::Window * GetWin() const
Definition: viewsh.hxx:338
LINESTYLE_DOTTED
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
void SetTopBorder(const editeng::SvxBorderLine *pTopBorder)
Definition: swfont.cxx:72
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
void SetFamily(const FontFamily eFamily, const SwFontScript nWhich)
Definition: swfont.hxx:448
void SetCharSet(const rtl_TextEncoding eCharSet, const SwFontScript nWhich)
Definition: swfont.hxx:487
constexpr TypedWhichId< SwTOXMark > RES_TXTATR_TOXMARK(47)
void ActivateTop(SwFont &rFnt, sal_uInt16 nStackPos)
Definition: atrstck.cxx:478
std::vector< const SwTextAttr * > m_aAttrStack[NUM_ATTRIBUTE_STACKS]
Definition: atrhndl.hxx:43
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
constexpr TypedWhichId< SwFormatField > RES_TXTATR_INPUTFIELD(55)
constexpr sal_uInt16 RES_CHRATR_END(46)
void SetName(const OUString &rName, const SwFontScript nWhich)
Definition: swfont.hxx:461
void PushAndChg(const SwTextAttr &rAttr, SwFont &rFnt)
Definition: atrstck.cxx:342
const SfxPoolItem & GetAttr() const
Definition: txatbase.hxx:159
bool IsItemIncluded(const sal_uInt16 nWhich, const SwTextAttr *pAttr)
Checks if item is included in character/inet/auto style.
Definition: atrstck.cxx:177
void SetAutoKern(FontKerning nAutoKern)
Definition: swfont.hxx:630
constexpr TypedWhichId< SvxCharRotateItem > RES_CHRATR_ROTATE(32)
void SetItalic(const FontItalic eItalic, const SwFontScript nWhich)
Definition: swfont.hxx:587
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:116
void SetProportion(const sal_uInt8 nNewPropr)
Definition: swfont.hxx:762
void SetVertical(sal_uInt16 nDir, const bool bVertLayout=false, const bool bVertLayoutLRBT=false)
Definition: swfont.cxx:438
void SetHighlightColor(const Color &aNewColor)
Definition: swfont.hxx:941
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
static bool lcl_ChgHyperLinkColor(const SwTextAttr &rAttr, const SfxPoolItem &rItem, const SwViewShell *pShell, Color *pColor)
The color of hyperlinks is taken from the associated character attribute, depending on its 'visited' ...
Definition: atrstck.cxx:196
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_HIGHLIGHT(42)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
constexpr TypedWhichId< SvxKerningItem > RES_CHRATR_KERNING(9)
void SetOverline(const FontLineStyle eOverline)
Definition: swfont.hxx:557
const editeng::SvxBorderLine * GetBottom() const
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
sal_uInt16 Which() const
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
void SetTopBorderDist(const sal_uInt16 nTopDist)
Definition: swfont.hxx:827
sal_Int16 GetCaseMap(sal_Int32 nToken)
const SfxPoolItem * GetCurItem() const
sal_uInt16 GetWidth() const
constexpr TypedWhichId< SvxContourItem > RES_CHRATR_CONTOUR(4)