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  SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
87  if( !IsNewDoc() )
88  Reader::ResetFrameFormatAttrs( aFrameSet );
89 
90  sal_uInt16 nLeftSpace = 0, nRightSpace = 0, nUpperSpace = 0, nLowerSpace = 0;
91  if( (rPixSpace.Width() || rPixSpace.Height()) && Application::GetDefaultDevice() )
92  {
93  Size aTwipSpc( rPixSpace.Width(), rPixSpace.Height() );
94  aTwipSpc =
96  MapMode(MapUnit::MapTwip) );
97  nLeftSpace = nRightSpace = o3tl::narrowing<sal_uInt16>(aTwipSpc.Width());
98  nUpperSpace = nLowerSpace = o3tl::narrowing<sal_uInt16>(aTwipSpc.Height());
99  }
100 
101  // set left/right border
102  const SfxPoolItem *pItem;
103  if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, true, &pItem ) )
104  {
105  // maybe flatten the first line indentation
106  const SvxLRSpaceItem *pLRItem = static_cast<const SvxLRSpaceItem *>(pItem);
107  SvxLRSpaceItem aLRItem( *pLRItem );
108  aLRItem.SetTextFirstLineOffset( 0 );
109  if( rCSS1PropInfo.m_bLeftMargin )
110  {
111  nLeftSpace = static_cast< sal_uInt16 >(aLRItem.GetLeft());
112  rCSS1PropInfo.m_bLeftMargin = false;
113  }
114  if( rCSS1PropInfo.m_bRightMargin )
115  {
116  nRightSpace = static_cast< sal_uInt16 >(aLRItem.GetRight());
117  rCSS1PropInfo.m_bRightMargin = false;
118  }
119  rCSS1ItemSet.ClearItem( RES_LR_SPACE );
120  }
121  if( nLeftSpace || nRightSpace )
122  {
123  SvxLRSpaceItem aLRItem( RES_LR_SPACE );
124  aLRItem.SetLeft( nLeftSpace );
125  aLRItem.SetRight( nRightSpace );
126  aFrameSet.Put( aLRItem );
127  }
128 
129  // set top/bottom border
130  if( SfxItemState::SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, true, &pItem ) )
131  {
132  // maybe flatten the first line indentation
133  const SvxULSpaceItem *pULItem = static_cast<const SvxULSpaceItem *>(pItem);
134  if( rCSS1PropInfo.m_bTopMargin )
135  {
136  nUpperSpace = pULItem->GetUpper();
137  rCSS1PropInfo.m_bTopMargin = false;
138  }
139  if( rCSS1PropInfo.m_bBottomMargin )
140  {
141  nLowerSpace = pULItem->GetLower();
142  rCSS1PropInfo.m_bBottomMargin = false;
143  }
144 
145  rCSS1ItemSet.ClearItem( RES_UL_SPACE );
146  }
147  if( nUpperSpace || nLowerSpace )
148  {
149  SvxULSpaceItem aULItem( RES_UL_SPACE );
150  aULItem.SetUpper( nUpperSpace );
151  aULItem.SetLower( nLowerSpace );
152  aFrameSet.Put( aULItem );
153  }
154 
155  SwFormatAnchor aAnchor( RndStdIds::FLY_AS_CHAR );
156  if( SVX_CSS1_POS_ABSOLUTE == rCSS1PropInfo.m_ePosition &&
157  SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.m_eLeftType &&
158  SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.m_eTopType )
159  {
160  const SwStartNode *pFlySttNd =
161  m_pPam->GetPoint()->nNode.GetNode().FindFlyStartNode();
162 
163  if( pFlySttNd )
164  {
165  aAnchor.SetType( RndStdIds::FLY_AT_FLY );
166  SwPosition aPos( *pFlySttNd );
167  aAnchor.SetAnchor( &aPos );
168  }
169  else
170  {
171  aAnchor.SetType( RndStdIds::FLY_AT_PAGE );
172  }
173  // #i26791# - direct positioning for <SwDoc::Insert(..)>
174  pNewDrawObj->SetRelativePos( Point(rCSS1PropInfo.m_nLeft + nLeftSpace,
175  rCSS1PropInfo.m_nTop + nUpperSpace) );
176  aFrameSet.Put( SwFormatSurround(css::text::WrapTextMode_THROUGH) );
177  }
178  else if( SvxAdjust::Left == rCSS1PropInfo.m_eFloat ||
179  text::HoriOrientation::LEFT == eHoriOri )
180  {
181  aAnchor.SetType( RndStdIds::FLY_AT_PARA );
182  aFrameSet.Put( SwFormatSurround(css::text::WrapTextMode_RIGHT) );
183  // #i26791# - direct positioning for <SwDoc::Insert(..)>
184  pNewDrawObj->SetRelativePos( Point(nLeftSpace, nUpperSpace) );
185  }
186  else if( text::VertOrientation::NONE != eVertOri )
187  {
188  aFrameSet.Put( SwFormatVertOrient( 0, eVertOri ) );
189  }
190 
191  if (RndStdIds::FLY_AT_PAGE == aAnchor.GetAnchorId())
192  {
193  aAnchor.SetPageNum( 1 );
194  }
195  else if( RndStdIds::FLY_AT_FLY != aAnchor.GetAnchorId() )
196  {
197  aAnchor.SetAnchor( m_pPam->GetPoint() );
198  }
199  aFrameSet.Put( aAnchor );
200 
201  m_xDoc->getIDocumentContentOperations().InsertDrawObj( *m_pPam, *pNewDrawObj, aFrameSet );
202 }
203 
204 static void PutEEPoolItem( SfxItemSet &rEEItemSet,
205  const SfxPoolItem& rSwItem )
206 {
207 
208  sal_uInt16 nEEWhich = 0;
209 
210  switch( rSwItem.Which() )
211  {
212  case RES_CHRATR_COLOR: nEEWhich = EE_CHAR_COLOR; break;
213  case RES_CHRATR_CROSSEDOUT: nEEWhich = EE_CHAR_STRIKEOUT; break;
214  case RES_CHRATR_ESCAPEMENT: nEEWhich = EE_CHAR_ESCAPEMENT; break;
215  case RES_CHRATR_FONT: nEEWhich = EE_CHAR_FONTINFO; break;
216  case RES_CHRATR_CJK_FONT: nEEWhich = EE_CHAR_FONTINFO_CJK; break;
217  case RES_CHRATR_CTL_FONT: nEEWhich = EE_CHAR_FONTINFO_CTL; break;
218  case RES_CHRATR_FONTSIZE: nEEWhich = EE_CHAR_FONTHEIGHT; break;
219  case RES_CHRATR_CJK_FONTSIZE: nEEWhich = EE_CHAR_FONTHEIGHT_CJK; break;
220  case RES_CHRATR_CTL_FONTSIZE: nEEWhich = EE_CHAR_FONTHEIGHT_CTL; break;
221  case RES_CHRATR_KERNING: nEEWhich = EE_CHAR_KERNING; break;
222  case RES_CHRATR_POSTURE: nEEWhich = EE_CHAR_ITALIC; break;
223  case RES_CHRATR_CJK_POSTURE: nEEWhich = EE_CHAR_ITALIC_CJK; break;
224  case RES_CHRATR_CTL_POSTURE: nEEWhich = EE_CHAR_ITALIC_CTL; break;
225  case RES_CHRATR_UNDERLINE: nEEWhich = EE_CHAR_UNDERLINE; break;
226  case RES_CHRATR_WEIGHT: nEEWhich = EE_CHAR_WEIGHT; break;
227  case RES_CHRATR_CJK_WEIGHT: nEEWhich = EE_CHAR_WEIGHT_CJK; break;
228  case RES_CHRATR_CTL_WEIGHT: nEEWhich = EE_CHAR_WEIGHT_CTL; break;
229  case RES_BACKGROUND:
231  {
232  const SvxBrushItem& rBrushItem = static_cast<const SvxBrushItem&>(rSwItem);
233  rEEItemSet.Put( XFillStyleItem(drawing::FillStyle_SOLID) );
234  rEEItemSet.Put(XFillColorItem(OUString(),
235  rBrushItem.GetColor()) );
236  }
237  break;
238  }
239 
240  if( nEEWhich )
241  rEEItemSet.Put( rSwItem.CloneSetWhich(nEEWhich) );
242 }
243 
245 {
246 
247  OSL_ENSURE( !m_pMarquee, "Marquee in Marquee???" );
248  m_aContents.clear();
249 
250  OUString aId, aStyle, aClass;
251 
252  tools::Long nWidth=0, nHeight=0;
253  bool bPercentWidth = false, bDirection = false, bBGColor = false;
254  Size aSpace( 0, 0 );
255  sal_Int16 eVertOri = text::VertOrientation::TOP;
256  sal_Int16 eHoriOri = text::HoriOrientation::NONE;
257  SdrTextAniKind eAniKind = SdrTextAniKind::Scroll;
258  SdrTextAniDirection eAniDir = SdrTextAniDirection::Left;
259  sal_uInt16 nCount = 0, nDelay = 60;
260  sal_Int16 nAmount = -6;
261  Color aBGColor;
262 
263  const HTMLOptions& rHTMLOptions = GetOptions();
264  for (const auto & rOption : rHTMLOptions)
265  {
266  switch( rOption.GetToken() )
267  {
268  case HtmlOptionId::ID:
269  aId = rOption.GetString();
270  break;
271  case HtmlOptionId::STYLE:
272  aStyle = rOption.GetString();
273  break;
274  case HtmlOptionId::CLASS:
275  aClass = rOption.GetString();
276  break;
277 
278  case HtmlOptionId::BEHAVIOR:
279  eAniKind = rOption.GetEnum( aHTMLMarqBehaviorTable, eAniKind );
280  break;
281 
282  case HtmlOptionId::BGCOLOR:
283  rOption.GetColor( aBGColor );
284  bBGColor = true;
285  break;
286 
287  case HtmlOptionId::DIRECTION:
288  eAniDir = rOption.GetEnum( aHTMLMarqDirectionTable, eAniDir );
289  bDirection = true;
290  break;
291 
292  case HtmlOptionId::LOOP:
293  if (rOption.GetString().
295  {
296  nCount = 0;
297  }
298  else
299  {
300  const sal_Int32 nLoop = rOption.GetSNumber();
301  nCount = std::max<sal_Int32>(nLoop, 0);
302  }
303  break;
304 
305  case HtmlOptionId::SCROLLAMOUNT:
306  nAmount = - static_cast<sal_Int16>(rOption.GetNumber());
307  break;
308 
309  case HtmlOptionId::SCROLLDELAY:
310  nDelay = o3tl::narrowing<sal_uInt16>(rOption.GetNumber());
311  break;
312 
313  case HtmlOptionId::WIDTH:
314  // first only save as pixel value!
315  nWidth = rOption.GetNumber();
316  bPercentWidth = rOption.GetString().indexOf('%') != -1;
317  if( bPercentWidth && nWidth>100 )
318  nWidth = 100;
319  break;
320 
321  case HtmlOptionId::HEIGHT:
322  // first only save as pixel value!
323  nHeight = rOption.GetNumber();
324  if( rOption.GetString().indexOf('%') != -1 )
325  nHeight = 0;
326  break;
327 
328  case HtmlOptionId::HSPACE:
329  // first only save as pixel value!
330  aSpace.setHeight( rOption.GetNumber() );
331  break;
332 
333  case HtmlOptionId::VSPACE:
334  // first only save as pixel value!
335  aSpace.setWidth( rOption.GetNumber() );
336  break;
337 
338  case HtmlOptionId::ALIGN:
339  eVertOri =
340  rOption.GetEnum( aHTMLImgVAlignTable,
341  text::VertOrientation::TOP );
342  eHoriOri =
343  rOption.GetEnum( aHTMLImgHAlignTable );
344  break;
345  default: break;
346  }
347  }
348 
349  // create a DrawTextobj
350  // #i52858# - method name changed
351  SwDrawModel* pModel = m_xDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
352  SdrPage* pPg = pModel->GetPage( 0 );
353  m_pMarquee = SdrObjFactory::MakeNewObject(
354  *pModel,
355  SdrInventor::Default,
356  OBJ_TEXT);
357 
358  if( !m_pMarquee )
359  return;
360 
361  pPg->InsertObject( m_pMarquee );
362 
363  if( !aId.isEmpty() )
364  InsertBookmark( aId );
365 
366  // (only) Alternate runs from left to right as default
367  if( SdrTextAniKind::Alternate==eAniKind && !bDirection )
368  eAniDir = SdrTextAniDirection::Right;
369 
370  // re set the attributes needed for scrolling
371  static WhichRangesContainer const aWhichMap(svl::Items<
375  SfxItemSet aItemSet( pModel->GetItemPool(), aWhichMap );
376  aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) );
377  aItemSet.Put( makeSdrTextAutoGrowHeightItem( true ) );
378  aItemSet.Put( SdrTextAniKindItem( eAniKind ) );
379  aItemSet.Put( SdrTextAniDirectionItem( eAniDir ) );
380  aItemSet.Put( SdrTextAniCountItem( nCount ) );
381  aItemSet.Put( SdrTextAniDelayItem( nDelay ) );
382  aItemSet.Put( SdrTextAniAmountItem( nAmount ) );
383  if( SdrTextAniKind::Alternate==eAniKind )
384  {
385  // (only) Alternate starts and ends Inside as default
386  aItemSet.Put( SdrTextAniStartInsideItem(true) );
387  aItemSet.Put( SdrTextAniStopInsideItem(true) );
388  if( SdrTextAniDirection::Left==eAniDir )
390  }
391 
392  // set the default colour (from the default template), so that a meaningful
393  // colour is set at all
394  const Color& rDfltColor =
395  m_pCSS1Parser->GetTextCollFromPool( RES_POOLCOLL_STANDARD )
396  ->GetColor().GetValue();
397  aItemSet.Put( SvxColorItem( rDfltColor, EE_CHAR_COLOR ) );
398 
399  // set the attributes of the current paragraph style
400  sal_uInt16 nWhichIds[] =
401  {
410  0
411  };
412  SwTextNode const*const pTextNd =
413  m_pPam->GetPoint()->nNode.GetNode().GetTextNode();
414  if( pTextNd )
415  {
416  const SfxItemSet& rItemSet = pTextNd->GetAnyFormatColl().GetAttrSet();
417  const SfxPoolItem *pItem;
418  for( int i=0; nWhichIds[i]; ++i )
419  {
420  if( SfxItemState::SET == rItemSet.GetItemState( nWhichIds[i], true, &pItem ) )
421  PutEEPoolItem( aItemSet, *pItem );
422  }
423  }
424 
425  // set attribute of environment at the Draw object
426  HTMLAttr** pHTMLAttributes = reinterpret_cast<HTMLAttr**>(m_xAttrTab.get());
427  for (auto nCnt = sizeof(HTMLAttrTable) / sizeof(HTMLAttr*); nCnt--; ++pHTMLAttributes)
428  {
429  HTMLAttr *pAttr = *pHTMLAttributes;
430  if( pAttr )
431  PutEEPoolItem( aItemSet, pAttr->GetItem() );
432  }
433 
434  if( bBGColor )
435  {
436  aItemSet.Put( XFillStyleItem(drawing::FillStyle_SOLID) );
437  aItemSet.Put(XFillColorItem(OUString(), aBGColor));
438  }
439 
440  // parse styles (is here only possible for attributes, which also
441  // can be set at character object)
442  SfxItemSet aStyleItemSet( m_xDoc->GetAttrPool(),
443  m_pCSS1Parser->GetWhichMap() );
444  SvxCSS1PropertyInfo aPropInfo;
445  if( HasStyleOptions( aStyle, aId, aClass ) &&
446  ParseStyleOptions( aStyle, aId, aClass, aStyleItemSet, aPropInfo ) )
447  {
448  SfxItemIter aIter( aStyleItemSet );
449 
450  for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem; pItem = aIter.NextItem())
451  {
452  PutEEPoolItem( aItemSet, *pItem );
453  }
454  }
455 
456  // now set the size
457  Size aTwipSz( bPercentWidth ? 0 : nWidth, nHeight );
458  if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() )
459  {
461  ->PixelToLogic( aTwipSz, MapMode( MapUnit::MapTwip ) );
462  }
463 
464  if( SVX_CSS1_LTYPE_TWIP== aPropInfo.m_eWidthType )
465  {
466  aTwipSz.setWidth( aPropInfo.m_nWidth );
467  nWidth = 1; // != 0;
468  bPercentWidth = false;
469  }
470  if( SVX_CSS1_LTYPE_TWIP== aPropInfo.m_eHeightType )
471  aTwipSz.setHeight( aPropInfo.m_nHeight );
472 
473  m_bFixMarqueeWidth = false;
474  if( !nWidth || bPercentWidth )
475  {
476  if( m_xTable )
477  {
478  if( !pCurTable )
479  {
480  // The marquee is in a table, but not in a cell. Since now no
481  // reasonable mapping to a cell is possible, we adjust here the
482  // width to the content of the marquee.
483  m_bFixMarqueeWidth = true;
484  }
485  else if( !nWidth )
486  {
487  // Because we know in which cell the marquee is, we also can
488  // adjust the width. No width specification is treated as
489  // 100 percent.
490  nWidth = 100;
491  bPercentWidth = true;
492  }
493  aTwipSz.setWidth( MINLAY );
494  }
495  else
496  {
497  tools::Long nBrowseWidth = GetCurrentBrowseWidth();
498  aTwipSz.setWidth( !nWidth ? nBrowseWidth
499  : (nWidth*nBrowseWidth) / 100 );
500  }
501  }
502 
503  // The height is only minimum height
504  if( aTwipSz.Height() < MINFLY )
505  aTwipSz.setHeight( MINFLY );
506  aItemSet.Put( makeSdrTextMinFrameHeightItem( aTwipSz.Height() ) );
507 
508  m_pMarquee->SetMergedItemSetAndBroadcast(aItemSet);
509 
510  if( aTwipSz.Width() < MINFLY )
511  aTwipSz.setWidth( MINFLY );
512  m_pMarquee->SetLogicRect( tools::Rectangle( 0, 0, aTwipSz.Width(), aTwipSz.Height() ) );
513 
514  // and insert the object into the document
515  InsertDrawObject( m_pMarquee, aSpace, eVertOri, eHoriOri, aStyleItemSet,
516  aPropInfo );
517 
518  // Register the drawing object at the table. Is a little bit complicated,
519  // because it is done via the parser, although the table is known, but
520  // otherwise the table would have to be public and that also isn't pretty.
521  // The global pTable also can't be used, because the marquee can also be
522  // in a sub-table.
523  if( pCurTable && bPercentWidth)
524  RegisterDrawObjectToTable( pCurTable, m_pMarquee, static_cast<sal_uInt8>(nWidth) );
525 }
526 
528 {
529  OSL_ENSURE( m_pMarquee && OBJ_TEXT==m_pMarquee->GetObjIdentifier(),
530  "no marquee or wrong type" );
531 
532  if( m_bFixMarqueeWidth )
533  {
534  // Because there is no fixed height make the text object wider then
535  // the text, so that there is no line break.
536  const tools::Rectangle& rOldRect = m_pMarquee->GetLogicRect();
537  m_pMarquee->SetLogicRect( tools::Rectangle( rOldRect.TopLeft(),
538  Size( USHRT_MAX, 240 ) ) );
539  }
540 
541  // insert the collected text
542  static_cast<SdrTextObj*>(m_pMarquee)->SetText( m_aContents );
543  m_pMarquee->SetMergedItemSetAndBroadcast( m_pMarquee->GetMergedItemSet() );
544 
545  if( m_bFixMarqueeWidth )
546  {
547  // adjust the size to the text
548  static_cast<SdrTextObj*>(m_pMarquee)->FitFrameToTextSize();
549  }
550 
551  m_aContents.clear();
552  m_pMarquee = nullptr;
553 }
554 
556 {
557  OSL_ENSURE( m_pMarquee && OBJ_TEXT==m_pMarquee->GetObjIdentifier(),
558  "no marquee or wrong type" );
559 
560  // append the current text part to the text
561  m_aContents += aToken;
562 }
563 
565 {
566  OSL_ENSURE( OBJ_TEXT==pObj->GetObjIdentifier(),
567  "no marquee or wrong type" );
568 
569  if( OBJ_TEXT!=pObj->GetObjIdentifier() )
570  return;
571 
572  // the old size
573  const tools::Rectangle& rOldRect = pObj->GetLogicRect();
574  Size aNewSz( nWidth, rOldRect.GetSize().Height() );
575  pObj->SetLogicRect( tools::Rectangle( rOldRect.TopLeft(), aNewSz ) );
576 }
577 
578 /* 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:312
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
Marks a position in the document model.
Definition: pam.hxx:35
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)
sal_uInt16 GetLower() const
void setWidth(tools::Long nWidth)
static constexpr auto Items
#define MINFLY
Definition: swtypes.hxx:62
long Long
tools::Long GetRight() const
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
#define MINLAY
Definition: swtypes.hxx:63
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:708
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
OUString aId
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)
void SetMergedItemSetAndBroadcast(const SfxItemSet &rSet, bool bClearAllItems=false)
#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:52
HTMLOptionEnum< sal_Int16 > const aHTMLImgVAlignTable[]
Definition: htmlgrin.cxx:82
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:199
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:75
virtual const tools::Rectangle & GetLogicRect() const
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:120
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)
OBJ_TEXT
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:850
sal_uInt16 GetUpper() const
void SetAnchor(const SwPosition *pPos)
Definition: atrfrm.cxx:1584