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