LibreOffice Module sw (master)  1
htmldrawreader.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 <hintids.hxx>
21 #include <vcl/svapp.hxx>
22 #include <svx/svdpage.hxx>
23 #include <svx/svdobj.hxx>
24 #include <svx/svdotext.hxx>
25 #include <svx/sdtagitm.hxx>
26 #include <svx/sdtacitm.hxx>
27 #include <svx/sdtayitm.hxx>
28 #include <svx/sdtaaitm.hxx>
29 #include <svx/sdtaiitm.hxx>
30 #include <svx/sdtmfitm.hxx>
31 #include <editeng/eeitem.hxx>
32 #include <svx/xfillit0.hxx>
33 #include <svx/xflclit.hxx>
34 #include <editeng/colritem.hxx>
35 #include <editeng/brushitem.hxx>
36 #include <editeng/lrspitem.hxx>
37 #include <editeng/ulspitem.hxx>
38 #include <svl/itemiter.hxx>
39 #include <svtools/htmltokn.h>
40 #include <svtools/htmlkywd.hxx>
41 #include <osl/diagnose.h>
42 
43 #include <charatr.hxx>
44 #include <drawdoc.hxx>
45 #include <fmtanchr.hxx>
46 #include <fmtornt.hxx>
47 #include <fmtsrnd.hxx>
48 #include <ndtxt.hxx>
49 #include <doc.hxx>
51 #include <poolfmt.hxx>
52 #include "swcss1.hxx"
53 #include "swhtml.hxx"
54 #include <shellio.hxx>
55 
56 using namespace css;
57 
59 {
60  { OOO_STRING_SVTOOLS_HTML_BEHAV_scroll, SdrTextAniKind::Scroll },
61  { OOO_STRING_SVTOOLS_HTML_BEHAV_alternate, SdrTextAniKind::Alternate },
62  { OOO_STRING_SVTOOLS_HTML_BEHAV_slide, SdrTextAniKind::Slide },
63  { nullptr, SdrTextAniKind(0) }
64 };
65 
67 {
68  { OOO_STRING_SVTOOLS_HTML_AL_left, SdrTextAniDirection::Left },
69  { OOO_STRING_SVTOOLS_HTML_AL_right, SdrTextAniDirection::Right },
70  { nullptr, SdrTextAniDirection(0) }
71 };
72 
74  const Size& rPixSpace,
75  sal_Int16 eVertOri,
76  sal_Int16 eHoriOri,
77  SfxItemSet& rCSS1ItemSet,
78  SvxCSS1PropertyInfo& rCSS1PropInfo )
79 {
80  // always on top of text.
81  // but in invisible layer. <ConnectToLayout> will move the object
82  // to the visible layer.
83  pNewDrawObj->SetLayer( m_xDoc->getIDocumentDrawModelAccess().GetInvisibleHeavenId() );
84 
85  SfxItemSetFixed<RES_FRMATR_BEGIN, RES_FRMATR_END-1> aFrameSet( m_xDoc->GetAttrPool() );
86  if( !IsNewDoc() )
87  Reader::ResetFrameFormatAttrs( aFrameSet );
88 
89  sal_uInt16 nLeftSpace = 0, nRightSpace = 0, nUpperSpace = 0, nLowerSpace = 0;
90  if( (rPixSpace.Width() || rPixSpace.Height()) && Application::GetDefaultDevice() )
91  {
92  Size aTwipSpc( rPixSpace.Width(), rPixSpace.Height() );
93  aTwipSpc =
95  MapMode(MapUnit::MapTwip) );
96  nLeftSpace = nRightSpace = o3tl::narrowing<sal_uInt16>(aTwipSpc.Width());
97  nUpperSpace = nLowerSpace = o3tl::narrowing<sal_uInt16>(aTwipSpc.Height());
98  }
99 
100  // set left/right border
101  if( const SvxLRSpaceItem* pLRItem = rCSS1ItemSet.GetItemIfSet( RES_LR_SPACE ) )
102  {
103  // maybe flatten the first line indentation
104  SvxLRSpaceItem aLRItem( *pLRItem );
105  aLRItem.SetTextFirstLineOffset( 0 );
106  if( rCSS1PropInfo.m_bLeftMargin )
107  {
108  nLeftSpace = static_cast< sal_uInt16 >(aLRItem.GetLeft());
109  rCSS1PropInfo.m_bLeftMargin = false;
110  }
111  if( rCSS1PropInfo.m_bRightMargin )
112  {
113  nRightSpace = static_cast< sal_uInt16 >(aLRItem.GetRight());
114  rCSS1PropInfo.m_bRightMargin = false;
115  }
116  rCSS1ItemSet.ClearItem( RES_LR_SPACE );
117  }
118  if( nLeftSpace || nRightSpace )
119  {
120  SvxLRSpaceItem aLRItem( RES_LR_SPACE );
121  aLRItem.SetLeft( nLeftSpace );
122  aLRItem.SetRight( nRightSpace );
123  aFrameSet.Put( aLRItem );
124  }
125 
126  // set top/bottom border
127  if( const SvxULSpaceItem* pULItem = rCSS1ItemSet.GetItemIfSet( RES_UL_SPACE ) )
128  {
129  // maybe flatten the first line indentation
130  if( rCSS1PropInfo.m_bTopMargin )
131  {
132  nUpperSpace = pULItem->GetUpper();
133  rCSS1PropInfo.m_bTopMargin = false;
134  }
135  if( rCSS1PropInfo.m_bBottomMargin )
136  {
137  nLowerSpace = pULItem->GetLower();
138  rCSS1PropInfo.m_bBottomMargin = false;
139  }
140 
141  rCSS1ItemSet.ClearItem( RES_UL_SPACE );
142  }
143  if( nUpperSpace || nLowerSpace )
144  {
145  SvxULSpaceItem aULItem( RES_UL_SPACE );
146  aULItem.SetUpper( nUpperSpace );
147  aULItem.SetLower( nLowerSpace );
148  aFrameSet.Put( aULItem );
149  }
150 
151  SwFormatAnchor aAnchor( RndStdIds::FLY_AS_CHAR );
152  if( SVX_CSS1_POS_ABSOLUTE == rCSS1PropInfo.m_ePosition &&
153  SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.m_eLeftType &&
154  SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.m_eTopType )
155  {
156  const SwStartNode *pFlySttNd =
157  m_pPam->GetPoint()->nNode.GetNode().FindFlyStartNode();
158 
159  if( pFlySttNd )
160  {
161  aAnchor.SetType( RndStdIds::FLY_AT_FLY );
162  SwPosition aPos( *pFlySttNd );
163  aAnchor.SetAnchor( &aPos );
164  }
165  else
166  {
167  aAnchor.SetType( RndStdIds::FLY_AT_PAGE );
168  }
169  // #i26791# - direct positioning for <SwDoc::Insert(..)>
170  pNewDrawObj->SetRelativePos( Point(rCSS1PropInfo.m_nLeft + nLeftSpace,
171  rCSS1PropInfo.m_nTop + nUpperSpace) );
172  aFrameSet.Put( SwFormatSurround(css::text::WrapTextMode_THROUGH) );
173  }
174  else if( SvxAdjust::Left == rCSS1PropInfo.m_eFloat ||
175  text::HoriOrientation::LEFT == eHoriOri )
176  {
177  aAnchor.SetType( RndStdIds::FLY_AT_PARA );
178  aFrameSet.Put( SwFormatSurround(css::text::WrapTextMode_RIGHT) );
179  // #i26791# - direct positioning for <SwDoc::Insert(..)>
180  pNewDrawObj->SetRelativePos( Point(nLeftSpace, nUpperSpace) );
181  }
182  else if( text::VertOrientation::NONE != eVertOri )
183  {
184  aFrameSet.Put( SwFormatVertOrient( 0, eVertOri ) );
185  }
186 
187  if (RndStdIds::FLY_AT_PAGE == aAnchor.GetAnchorId())
188  {
189  aAnchor.SetPageNum( 1 );
190  }
191  else if( RndStdIds::FLY_AT_FLY != aAnchor.GetAnchorId() )
192  {
193  aAnchor.SetAnchor( m_pPam->GetPoint() );
194  }
195  aFrameSet.Put( aAnchor );
196 
197  m_xDoc->getIDocumentContentOperations().InsertDrawObj( *m_pPam, *pNewDrawObj, aFrameSet );
198 }
199 
200 static void PutEEPoolItem( SfxItemSet &rEEItemSet,
201  const SfxPoolItem& rSwItem )
202 {
203 
204  sal_uInt16 nEEWhich = 0;
205 
206  switch( rSwItem.Which() )
207  {
208  case RES_CHRATR_COLOR: nEEWhich = EE_CHAR_COLOR; break;
209  case RES_CHRATR_CROSSEDOUT: nEEWhich = EE_CHAR_STRIKEOUT; break;
210  case RES_CHRATR_ESCAPEMENT: nEEWhich = EE_CHAR_ESCAPEMENT; break;
211  case RES_CHRATR_FONT: nEEWhich = EE_CHAR_FONTINFO; break;
212  case RES_CHRATR_CJK_FONT: nEEWhich = EE_CHAR_FONTINFO_CJK; break;
213  case RES_CHRATR_CTL_FONT: nEEWhich = EE_CHAR_FONTINFO_CTL; break;
214  case RES_CHRATR_FONTSIZE: nEEWhich = EE_CHAR_FONTHEIGHT; break;
215  case RES_CHRATR_CJK_FONTSIZE: nEEWhich = EE_CHAR_FONTHEIGHT_CJK; break;
216  case RES_CHRATR_CTL_FONTSIZE: nEEWhich = EE_CHAR_FONTHEIGHT_CTL; break;
217  case RES_CHRATR_KERNING: nEEWhich = EE_CHAR_KERNING; break;
218  case RES_CHRATR_POSTURE: nEEWhich = EE_CHAR_ITALIC; break;
219  case RES_CHRATR_CJK_POSTURE: nEEWhich = EE_CHAR_ITALIC_CJK; break;
220  case RES_CHRATR_CTL_POSTURE: nEEWhich = EE_CHAR_ITALIC_CTL; break;
221  case RES_CHRATR_UNDERLINE: nEEWhich = EE_CHAR_UNDERLINE; break;
222  case RES_CHRATR_WEIGHT: nEEWhich = EE_CHAR_WEIGHT; break;
223  case RES_CHRATR_CJK_WEIGHT: nEEWhich = EE_CHAR_WEIGHT_CJK; break;
224  case RES_CHRATR_CTL_WEIGHT: nEEWhich = EE_CHAR_WEIGHT_CTL; break;
225  case RES_BACKGROUND:
227  {
228  const SvxBrushItem& rBrushItem = static_cast<const SvxBrushItem&>(rSwItem);
229  rEEItemSet.Put( XFillStyleItem(drawing::FillStyle_SOLID) );
230  rEEItemSet.Put(XFillColorItem(OUString(),
231  rBrushItem.GetColor()) );
232  }
233  break;
234  }
235 
236  if( nEEWhich )
237  rEEItemSet.Put( rSwItem.CloneSetWhich(nEEWhich) );
238 }
239 
241 {
242 
243  OSL_ENSURE( !m_pMarquee, "Marquee in Marquee???" );
244  m_aContents.clear();
245 
246  OUString aId, aStyle, aClass;
247 
248  tools::Long nWidth=0, nHeight=0;
249  bool bPercentWidth = false, bDirection = false, bBGColor = false;
250  Size aSpace( 0, 0 );
251  sal_Int16 eVertOri = text::VertOrientation::TOP;
252  sal_Int16 eHoriOri = text::HoriOrientation::NONE;
253  SdrTextAniKind eAniKind = SdrTextAniKind::Scroll;
254  SdrTextAniDirection eAniDir = SdrTextAniDirection::Left;
255  sal_uInt16 nCount = 0, nDelay = 60;
256  sal_Int16 nAmount = -6;
257  Color aBGColor;
258 
259  const HTMLOptions& rHTMLOptions = GetOptions();
260  for (const auto & rOption : rHTMLOptions)
261  {
262  switch( rOption.GetToken() )
263  {
264  case HtmlOptionId::ID:
265  aId = rOption.GetString();
266  break;
267  case HtmlOptionId::STYLE:
268  aStyle = rOption.GetString();
269  break;
270  case HtmlOptionId::CLASS:
271  aClass = rOption.GetString();
272  break;
273 
274  case HtmlOptionId::BEHAVIOR:
275  eAniKind = rOption.GetEnum( aHTMLMarqBehaviorTable, eAniKind );
276  break;
277 
278  case HtmlOptionId::BGCOLOR:
279  rOption.GetColor( aBGColor );
280  bBGColor = true;
281  break;
282 
283  case HtmlOptionId::DIRECTION:
284  eAniDir = rOption.GetEnum( aHTMLMarqDirectionTable, eAniDir );
285  bDirection = true;
286  break;
287 
288  case HtmlOptionId::LOOP:
289  if (rOption.GetString().
291  {
292  nCount = 0;
293  }
294  else
295  {
296  const sal_Int32 nLoop = rOption.GetSNumber();
297  nCount = std::max<sal_Int32>(nLoop, 0);
298  }
299  break;
300 
301  case HtmlOptionId::SCROLLAMOUNT:
302  nAmount = - static_cast<sal_Int16>(rOption.GetNumber());
303  break;
304 
305  case HtmlOptionId::SCROLLDELAY:
306  nDelay = o3tl::narrowing<sal_uInt16>(rOption.GetNumber());
307  break;
308 
309  case HtmlOptionId::WIDTH:
310  // first only save as pixel value!
311  nWidth = rOption.GetNumber();
312  bPercentWidth = rOption.GetString().indexOf('%') != -1;
313  if( bPercentWidth && nWidth>100 )
314  nWidth = 100;
315  break;
316 
317  case HtmlOptionId::HEIGHT:
318  // first only save as pixel value!
319  nHeight = rOption.GetNumber();
320  if( rOption.GetString().indexOf('%') != -1 )
321  nHeight = 0;
322  break;
323 
324  case HtmlOptionId::HSPACE:
325  // first only save as pixel value!
326  aSpace.setHeight( rOption.GetNumber() );
327  break;
328 
329  case HtmlOptionId::VSPACE:
330  // first only save as pixel value!
331  aSpace.setWidth( rOption.GetNumber() );
332  break;
333 
334  case HtmlOptionId::ALIGN:
335  eVertOri =
336  rOption.GetEnum( aHTMLImgVAlignTable,
337  text::VertOrientation::TOP );
338  eHoriOri =
339  rOption.GetEnum( aHTMLImgHAlignTable );
340  break;
341  default: break;
342  }
343  }
344 
345  // create a DrawTextobj
346  // #i52858# - method name changed
347  SwDrawModel* pModel = m_xDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
348  SdrPage* pPg = pModel->GetPage( 0 );
349  m_pMarquee = SdrObjFactory::MakeNewObject(
350  *pModel,
351  SdrInventor::Default,
352  SdrObjKind::Text);
353 
354  if( !m_pMarquee )
355  return;
356 
357  pPg->InsertObject( m_pMarquee );
358 
359  if( !aId.isEmpty() )
360  InsertBookmark( aId );
361 
362  // (only) Alternate runs from left to right as default
363  if( SdrTextAniKind::Alternate==eAniKind && !bDirection )
364  eAniDir = SdrTextAniDirection::Right;
365 
366  // re set the attributes needed for scrolling
371  aItemSet( pModel->GetItemPool() );
372  aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) );
373  aItemSet.Put( makeSdrTextAutoGrowHeightItem( true ) );
374  aItemSet.Put( SdrTextAniKindItem( eAniKind ) );
375  aItemSet.Put( SdrTextAniDirectionItem( eAniDir ) );
376  aItemSet.Put( SdrTextAniCountItem( nCount ) );
377  aItemSet.Put( SdrTextAniDelayItem( nDelay ) );
378  aItemSet.Put( SdrTextAniAmountItem( nAmount ) );
379  if( SdrTextAniKind::Alternate==eAniKind )
380  {
381  // (only) Alternate starts and ends Inside as default
382  aItemSet.Put( SdrTextAniStartInsideItem(true) );
383  aItemSet.Put( SdrTextAniStopInsideItem(true) );
384  if( SdrTextAniDirection::Left==eAniDir )
386  }
387 
388  // set the default colour (from the default template), so that a meaningful
389  // colour is set at all
390  const Color& rDfltColor =
391  m_pCSS1Parser->GetTextCollFromPool( RES_POOLCOLL_STANDARD )
392  ->GetColor().GetValue();
393  aItemSet.Put( SvxColorItem( rDfltColor, EE_CHAR_COLOR ) );
394 
395  // set the attributes of the current paragraph style
396  sal_uInt16 nWhichIds[] =
397  {
406  0
407  };
408  SwTextNode const*const pTextNd =
409  m_pPam->GetPoint()->nNode.GetNode().GetTextNode();
410  if( pTextNd )
411  {
412  const SfxItemSet& rItemSet = pTextNd->GetAnyFormatColl().GetAttrSet();
413  const SfxPoolItem *pItem;
414  for( int i=0; nWhichIds[i]; ++i )
415  {
416  if( SfxItemState::SET == rItemSet.GetItemState( nWhichIds[i], true, &pItem ) )
417  PutEEPoolItem( aItemSet, *pItem );
418  }
419  }
420 
421  // set attribute of environment at the Draw object
422  HTMLAttr** pHTMLAttributes = reinterpret_cast<HTMLAttr**>(m_xAttrTab.get());
423  for (auto nCnt = sizeof(HTMLAttrTable) / sizeof(HTMLAttr*); nCnt--; ++pHTMLAttributes)
424  {
425  HTMLAttr *pAttr = *pHTMLAttributes;
426  if( pAttr )
427  PutEEPoolItem( aItemSet, pAttr->GetItem() );
428  }
429 
430  if( bBGColor )
431  {
432  aItemSet.Put( XFillStyleItem(drawing::FillStyle_SOLID) );
433  aItemSet.Put(XFillColorItem(OUString(), aBGColor));
434  }
435 
436  // parse styles (is here only possible for attributes, which also
437  // can be set at character object)
438  SfxItemSet aStyleItemSet( m_xDoc->GetAttrPool(),
439  m_pCSS1Parser->GetWhichMap() );
440  SvxCSS1PropertyInfo aPropInfo;
441  if( HasStyleOptions( aStyle, aId, aClass ) &&
442  ParseStyleOptions( aStyle, aId, aClass, aStyleItemSet, aPropInfo ) )
443  {
444  SfxItemIter aIter( aStyleItemSet );
445 
446  for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem; pItem = aIter.NextItem())
447  {
448  PutEEPoolItem( aItemSet, *pItem );
449  }
450  }
451 
452  // now set the size
453  Size aTwipSz( bPercentWidth ? 0 : nWidth, nHeight );
454  if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() )
455  {
457  ->PixelToLogic( aTwipSz, MapMode( MapUnit::MapTwip ) );
458  }
459 
460  if( SVX_CSS1_LTYPE_TWIP== aPropInfo.m_eWidthType )
461  {
462  aTwipSz.setWidth( aPropInfo.m_nWidth );
463  nWidth = 1; // != 0;
464  bPercentWidth = false;
465  }
466  if( SVX_CSS1_LTYPE_TWIP== aPropInfo.m_eHeightType )
467  aTwipSz.setHeight( aPropInfo.m_nHeight );
468 
469  m_bFixMarqueeWidth = false;
470  if( !nWidth || bPercentWidth )
471  {
472  if( m_xTable )
473  {
474  if( !pCurTable )
475  {
476  // The marquee is in a table, but not in a cell. Since now no
477  // reasonable mapping to a cell is possible, we adjust here the
478  // width to the content of the marquee.
479  m_bFixMarqueeWidth = true;
480  }
481  else if( !nWidth )
482  {
483  // Because we know in which cell the marquee is, we also can
484  // adjust the width. No width specification is treated as
485  // 100 percent.
486  nWidth = 100;
487  bPercentWidth = true;
488  }
489  aTwipSz.setWidth( MINLAY );
490  }
491  else
492  {
493  tools::Long nBrowseWidth = GetCurrentBrowseWidth();
494  aTwipSz.setWidth( !nWidth ? nBrowseWidth
495  : (nWidth*nBrowseWidth) / 100 );
496  }
497  }
498 
499  // The height is only minimum height
500  if( aTwipSz.Height() < MINFLY )
501  aTwipSz.setHeight( MINFLY );
502  aItemSet.Put( makeSdrTextMinFrameHeightItem( aTwipSz.Height() ) );
503 
504  m_pMarquee->SetMergedItemSetAndBroadcast(aItemSet);
505 
506  if( aTwipSz.Width() < MINFLY )
507  aTwipSz.setWidth( MINFLY );
508  m_pMarquee->SetLogicRect( tools::Rectangle( 0, 0, aTwipSz.Width(), aTwipSz.Height() ) );
509 
510  // and insert the object into the document
511  InsertDrawObject( m_pMarquee, aSpace, eVertOri, eHoriOri, aStyleItemSet,
512  aPropInfo );
513 
514  // Register the drawing object at the table. Is a little bit complicated,
515  // because it is done via the parser, although the table is known, but
516  // otherwise the table would have to be public and that also isn't pretty.
517  // The global pTable also can't be used, because the marquee can also be
518  // in a sub-table.
519  if( pCurTable && bPercentWidth)
520  RegisterDrawObjectToTable( pCurTable, m_pMarquee, static_cast<sal_uInt8>(nWidth) );
521 }
522 
524 {
525  OSL_ENSURE( m_pMarquee && SdrObjKind::Text==m_pMarquee->GetObjIdentifier(),
526  "no marquee or wrong type" );
527 
528  if( m_bFixMarqueeWidth )
529  {
530  // Because there is no fixed height make the text object wider then
531  // the text, so that there is no line break.
532  const tools::Rectangle& rOldRect = m_pMarquee->GetLogicRect();
533  m_pMarquee->SetLogicRect( tools::Rectangle( rOldRect.TopLeft(),
534  Size( USHRT_MAX, 240 ) ) );
535  }
536 
537  // insert the collected text
538  static_cast<SdrTextObj*>(m_pMarquee)->SetText( m_aContents );
539  m_pMarquee->SetMergedItemSetAndBroadcast( m_pMarquee->GetMergedItemSet() );
540 
541  if( m_bFixMarqueeWidth )
542  {
543  // adjust the size to the text
544  static_cast<SdrTextObj*>(m_pMarquee)->FitFrameToTextSize();
545  }
546 
547  m_aContents.clear();
548  m_pMarquee = nullptr;
549 }
550 
552 {
553  OSL_ENSURE( m_pMarquee && SdrObjKind::Text==m_pMarquee->GetObjIdentifier(),
554  "no marquee or wrong type" );
555 
556  // append the current text part to the text
557  m_aContents += aToken;
558 }
559 
561 {
562  OSL_ENSURE( SdrObjKind::Text==pObj->GetObjIdentifier(),
563  "no marquee or wrong type" );
564 
565  if( SdrObjKind::Text!=pObj->GetObjIdentifier() )
566  return;
567 
568  // the old size
569  const tools::Rectangle& rOldRect = pObj->GetLogicRect();
570  Size aNewSz( nWidth, rOldRect.GetSize().Height() );
571  pObj->SetLogicRect( tools::Rectangle( rOldRect.TopLeft(), aNewSz ) );
572 }
573 
574 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_STRING_SVTOOLS_HTML_LOOP_infinite
Starts a section of nodes in the document model.
Definition: node.hxx:313
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CJK(EE_CHAR_START+17)
SvxCSS1LengthType m_eLeftType
Definition: svxcss1.hxx:137
SvxCSS1LengthType m_eTopType
Definition: svxcss1.hxx:137
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
#define OOO_STRING_SVTOOLS_HTML_BEHAV_alternate
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
Marks a position in the document model.
Definition: pam.hxx:36
constexpr TypedWhichId< SvxKerningItem > EE_CHAR_KERNING(EE_CHAR_START+12)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
constexpr TypedWhichId< SvxEscapementItem > RES_CHRATR_ESCAPEMENT(6)
void setWidth(tools::Long nWidth)
virtual void SetText(const OUString &rStr) override
#define MINFLY
Definition: swtypes.hxx:61
long Long
tools::Long GetRight() const
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
#define MINLAY
Definition: swtypes.hxx:62
constexpr sal_uInt16 RES_FRMATR_END(133)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC(EE_CHAR_START+7)
static SdrObject * MakeNewObject(SdrModel &rSdrModel, SdrInventor nInventor, SdrObjKind nObjIdentifier, const tools::Rectangle *pSnapRect=nullptr)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
virtual SdrObjKind GetObjIdentifier() const
constexpr sal_uInt16 SDRATTR_MISC_LAST(SDRATTR_TEXT_CHAINNEXTNAME)
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
void SetPageNum(sal_uInt16 nNew)
Definition: fmtanchr.hxx:72
HTMLOptionEnum< SdrTextAniDirection > const aHTMLMarqDirectionTable[]
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
SdrOnOffItem makeSdrTextAutoGrowHeightItem(bool bAuto)
SdrTextAniKind
Reference< css::datatransfer::XTransferable > m_aContents
static OutputDevice * GetDefaultDevice()
constexpr tools::Long Width() const
const SfxPoolItem * NextItem()
static void ResetFrameFormatAttrs(SfxItemSet &rFrameSet)
Definition: shellio.cxx:613
static void ResizeDrawObject(SdrObject *pObj, SwTwips nWidth)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CTL(EE_CHAR_START+18)
int nCount
SfxPoolItem & GetItem()
Definition: swhtml.hxx:172
SdrOnOffItem makeSdrTextAutoGrowWidthItem(bool bAuto)
void InsertDrawObject(SdrObject *pNewDrawObj, const Size &rSpace, sal_Int16 eVertOri, sal_Int16 eHoriOri, SfxItemSet &rCSS1ItemSet, SvxCSS1PropertyInfo &rCSS1PropInfo)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT(EE_CHAR_START+4)
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
SwFormatColl & GetAnyFormatColl() const
Definition: node.hxx:717
const Color & GetColor() const
virtual void SetLayer(SdrLayerID nLayer)
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
int i
tools::Long m_nTop
Definition: svxcss1.hxx:133
void NewMarquee(HTMLTable *pCurTable=nullptr)
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:65
static void PutEEPoolItem(SfxItemSet &rEEItemSet, const SfxPoolItem &rSwItem)
FlyAnchors.
Definition: fmtanchr.hxx:34
tools::Long GetLeft() const
const SdrPage * GetPage(sal_uInt16 nPgNum) const
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
#define OOO_STRING_SVTOOLS_HTML_AL_left
constexpr sal_uInt16 EE_CHAR_START(EE_PARA_END+1)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT_CJK(EE_CHAR_START+21)
SvxCSS1Position m_ePosition
Definition: svxcss1.hxx:121
virtual void SetLogicRect(const tools::Rectangle &rRect)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC_CTL(EE_CHAR_START+24)
virtual void SetRelativePos(const Point &rPnt)
constexpr sal_uInt16 EE_CHAR_END(EE_CHAR_START+32)
SvxAdjust m_eFloat
Definition: svxcss1.hxx:119
void InsertMarqueeText()
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
tools::Long SwTwips
Definition: swtypes.hxx:51
HTMLOptionEnum< sal_Int16 > const aHTMLImgVAlignTable[]
Definition: htmlgrin.cxx:83
constexpr Point TopLeft() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
SDRTEXTHORZADJUST_RIGHT
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
constexpr TypedWhichId< SvxCrossedOutItem > EE_CHAR_STRIKEOUT(EE_CHAR_START+6)
constexpr Size GetSize() const
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
#define OOO_STRING_SVTOOLS_HTML_AL_right
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CTL(EE_CHAR_START+20)
#define OOO_STRING_SVTOOLS_HTML_BEHAV_slide
constexpr tools::Long Height() const
constexpr TypedWhichId< SvxEscapementItem > EE_CHAR_ESCAPEMENT(EE_CHAR_START+10)
SdrMetricItem makeSdrTextMinFrameHeightItem(tools::Long mnHeight)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
::std::vector< HTMLOption > HTMLOptions
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT_CTL(EE_CHAR_START+22)
constexpr TypedWhichId< SvxColorItem > EE_CHAR_COLOR(EE_CHAR_START+0)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
tools::Long m_nLeft
Definition: svxcss1.hxx:133
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO(EE_CHAR_START+1)
#define OOO_STRING_SVTOOLS_HTML_BEHAV_scroll
SdrTextAniDirection
void setHeight(tools::Long nHeight)
void SetType(RndStdIds nRndId)
Definition: fmtanchr.hxx:71
const SwStartNode * FindFlyStartNode() const
Definition: node.hxx:200
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC_CJK(EE_CHAR_START+23)
constexpr TypedWhichId< SvxUnderlineItem > EE_CHAR_UNDERLINE(EE_CHAR_START+5)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CJK(EE_CHAR_START+19)
const SfxItemPool & GetItemPool() const
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLBACKGROUND)
HTMLOptionEnum< sal_Int16 > const aHTMLImgHAlignTable[]
Definition: htmlgrin.cxx:76
virtual const tools::Rectangle & GetLogicRect() const
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:136
constexpr sal_uInt16 SDRATTR_MISC_FIRST(SDRATTR_CAPTION_LAST+1)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
constexpr TypedWhichId< SvxKerningItem > RES_CHRATR_KERNING(9)
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
sal_uInt16 Which() const
HTMLOptionEnum< SdrTextAniKind > const aHTMLMarqBehaviorTable[]
const SfxPoolItem * GetCurItem() const
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:864
void SetAnchor(const SwPosition *pPos)
Definition: atrfrm.cxx:1585
OUString aId