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