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
56using 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() )
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 // note: parser never creates SvxLeftMarginItem! must be converted
102 if (const SvxTextLeftMarginItem *const pLeft = rCSS1ItemSet.GetItemIfSet(RES_MARGIN_TEXTLEFT))
103 {
104 if( rCSS1PropInfo.m_bLeftMargin )
105 {
106 // should be SvxLeftMarginItem... "cast" it
107 nLeftSpace = static_cast<sal_uInt16>(pLeft->GetTextLeft());
108 rCSS1PropInfo.m_bLeftMargin = false;
109 }
110 rCSS1ItemSet.ClearItem(RES_MARGIN_TEXTLEFT);
111 }
112 if (const SvxRightMarginItem *const pRight = rCSS1ItemSet.GetItemIfSet(RES_MARGIN_RIGHT))
113 {
114 if( rCSS1PropInfo.m_bRightMargin )
115 {
116 nRightSpace = static_cast< sal_uInt16 >(pRight->GetRight());
117 rCSS1PropInfo.m_bRightMargin = false;
118 }
119 rCSS1ItemSet.ClearItem(RES_MARGIN_RIGHT);
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( const SvxULSpaceItem* pULItem = rCSS1ItemSet.GetItemIfSet( RES_UL_SPACE ) )
131 {
132 // maybe flatten the first line indentation
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 =
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
203static 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 = o3tl::narrowing<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 );
353 *pModel,
354 SdrInventor::Default,
355 SdrObjKind::Text);
356
357 if( !m_pMarquee )
358 return;
359
360 pPg->InsertObject( m_pMarquee.get() );
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
374 aItemSet( pModel->GetItemPool() );
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 =
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.get(), 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.get(), static_cast<sal_uInt8>(nWidth) );
524}
525
527{
528 OSL_ENSURE( m_pMarquee && SdrObjKind::Text==m_pMarquee->GetObjIdentifier(),
529 "no marquee or wrong type" );
530
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.get())->SetText( m_aContents );
542 m_pMarquee->SetMergedItemSetAndBroadcast( m_pMarquee->GetMergedItemSet() );
543
544 if (m_bFixMarqueeWidth && !bFuzzing)
545 {
546 // adjust the size to the text
547 static_cast<SdrTextObj*>(m_pMarquee.get())->FitFrameToTextSize();
548 }
549
550 m_aContents.clear();
551 m_pMarquee = nullptr;
552}
553
555{
556 OSL_ENSURE( m_pMarquee && SdrObjKind::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( SdrObjKind::Text==pObj->GetObjIdentifier(),
566 "no marquee or wrong type" );
567
568 if( SdrObjKind::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: */
static OutputDevice * GetDefaultDevice()
SfxPoolItem & GetItem()
Definition: swhtml.hxx:178
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
static void ResetFrameFormatAttrs(SfxItemSet &rFrameSet)
Definition: shellio.cxx:621
const SfxItemPool & GetItemPool() const
const SdrPage * GetPage(sal_uInt16 nPgNum) const
static rtl::Reference< SdrObject > MakeNewObject(SdrModel &rSdrModel, SdrInventor nInventor, SdrObjKind nObjIdentifier, const tools::Rectangle *pSnapRect=nullptr)
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
virtual void SetLogicRect(const tools::Rectangle &rRect)
virtual SdrObjKind GetObjIdentifier() const
virtual void SetLayer(SdrLayerID nLayer)
virtual void SetRelativePos(const Point &rPnt)
virtual const tools::Rectangle & GetLogicRect() const
const SfxPoolItem * GetCurItem() const
const SfxPoolItem * NextItem()
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
sal_uInt16 Which() const
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const Color & GetColor() const
tools::Long m_nHeight
Definition: svxcss1.hxx:134
tools::Long m_nTop
Definition: svxcss1.hxx:133
SvxCSS1LengthType m_eHeightType
Definition: svxcss1.hxx:138
SvxCSS1Position m_ePosition
Definition: svxcss1.hxx:121
SvxCSS1LengthType m_eWidthType
Definition: svxcss1.hxx:138
tools::Long m_nWidth
Definition: svxcss1.hxx:134
tools::Long m_nLeft
Definition: svxcss1.hxx:133
SvxCSS1LengthType m_eTopType
Definition: svxcss1.hxx:137
SvxAdjust m_eFloat
Definition: svxcss1.hxx:119
SvxCSS1LengthType m_eLeftType
Definition: svxcss1.hxx:137
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
SwFormatColl & GetAnyFormatColl() const
Definition: node.hxx:720
FlyAnchors.
Definition: fmtanchr.hxx:37
void SetPageNum(sal_uInt16 nNew)
Definition: fmtanchr.hxx:71
void SetAnchor(const SwPosition *pPos)
Definition: atrfrm.cxx:1593
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:67
void SetType(RndStdIds nRndId)
Definition: fmtanchr.hxx:68
Defines the vertical position of a fly frame.
Definition: fmtornt.hxx:37
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:136
std::shared_ptr< HTMLTable > m_xTable
Definition: swhtml.hxx:404
void NewMarquee(HTMLTable *pCurTable=nullptr)
void InsertMarqueeText()
void InsertBookmark(const OUString &rName)
Definition: htmlgrin.cxx:1393
std::shared_ptr< HTMLAttrTable > m_xAttrTab
Definition: swhtml.hxx:384
static bool HasStyleOptions(std::u16string_view rStyle, std::u16string_view rId, std::u16string_view rClass, const OUString *pLang=nullptr, const OUString *pDir=nullptr)
Definition: swhtml.hxx:1020
SwPaM * m_pPam
Definition: swhtml.hxx:399
bool m_bFixMarqueeWidth
Definition: swhtml.hxx:454
rtl::Reference< SwDoc > m_xDoc
Definition: swhtml.hxx:398
bool ParseStyleOptions(const OUString &rStyle, const OUString &rId, const OUString &rClass, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, const OUString *pLang=nullptr, const OUString *pDir=nullptr)
Definition: htmlcss1.cxx:1853
rtl::Reference< SdrObject > m_pMarquee
Definition: swhtml.hxx:406
std::unique_ptr< SwCSS1Parser > m_pCSS1Parser
Definition: swhtml.hxx:394
SwTwips GetCurrentBrowseWidth()
Definition: swhtml.cxx:5093
void InsertDrawObject(SdrObject *pNewDrawObj, const Size &rSpace, sal_Int16 eVertOri, sal_Int16 eHoriOri, SfxItemSet &rCSS1ItemSet, SvxCSS1PropertyInfo &rCSS1PropInfo)
OUString m_aContents
Definition: swhtml.hxx:370
static void RegisterDrawObjectToTable(HTMLTable *pCurTable, SdrObject *pObj, sal_uInt8 nWidth)
Definition: htmltab.cxx:3186
static void ResizeDrawObject(SdrObject *pObj, SwTwips nWidth)
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:901
const SwStartNode * FindFlyStartNode() const
Definition: node.hxx:220
const SwPosition * GetPoint() const
Definition: pam.hxx:253
Starts a section of nodes in the document model.
Definition: node.hxx:348
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
constexpr Point TopLeft() const
constexpr Size GetSize() const
int nCount
virtual void SetText(const OUString &rStr) override
constexpr TypedWhichId< SvxKerningItem > EE_CHAR_KERNING(EE_CHAR_START+12)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CJK(EE_CHAR_START+17)
constexpr TypedWhichId< SvxUnderlineItem > EE_CHAR_UNDERLINE(EE_CHAR_START+5)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT(EE_CHAR_START+4)
constexpr TypedWhichId< SvxColorItem > EE_CHAR_COLOR(EE_CHAR_START+0)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT_CTL(EE_CHAR_START+22)
constexpr TypedWhichId< SvxCrossedOutItem > EE_CHAR_STRIKEOUT(EE_CHAR_START+6)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC(EE_CHAR_START+7)
constexpr sal_uInt16 EE_CHAR_START(EE_PARA_END+1)
constexpr TypedWhichId< SvxEscapementItem > EE_CHAR_ESCAPEMENT(EE_CHAR_START+10)
constexpr sal_uInt16 EE_CHAR_END(EE_CHAR_START+32)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CTL(EE_CHAR_START+20)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT_CJK(EE_CHAR_START+21)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC_CJK(EE_CHAR_START+23)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CTL(EE_CHAR_START+18)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC_CTL(EE_CHAR_START+24)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CJK(EE_CHAR_START+19)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO(EE_CHAR_START+1)
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
constexpr sal_uInt16 RES_FRMATR_END(141)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
constexpr TypedWhichId< SvxEscapementItem > RES_CHRATR_ESCAPEMENT(6)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SvxRightMarginItem > RES_MARGIN_RIGHT(93)
constexpr TypedWhichId< SvxTextLeftMarginItem > RES_MARGIN_TEXTLEFT(92)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
constexpr TypedWhichId< SvxKerningItem > RES_CHRATR_KERNING(9)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(97)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(98)
HTMLOptionEnum< SdrTextAniDirection > const aHTMLMarqDirectionTable[]
static void PutEEPoolItem(SfxItemSet &rEEItemSet, const SfxPoolItem &rSwItem)
HTMLOptionEnum< SdrTextAniKind > const aHTMLMarqBehaviorTable[]
HTMLOptionEnum< sal_Int16 > const aHTMLImgVAlignTable[]
Definition: htmlgrin.cxx:83
HTMLOptionEnum< sal_Int16 > const aHTMLImgHAlignTable[]
Definition: htmlgrin.cxx:76
#define OOO_STRING_SVTOOLS_HTML_AL_left
#define OOO_STRING_SVTOOLS_HTML_BEHAV_slide
#define OOO_STRING_SVTOOLS_HTML_BEHAV_scroll
#define OOO_STRING_SVTOOLS_HTML_AL_right
#define OOO_STRING_SVTOOLS_HTML_BEHAV_alternate
#define OOO_STRING_SVTOOLS_HTML_LOOP_infinite
int i
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
long Long
::std::vector< HTMLOption > HTMLOptions
@ RES_POOLCOLL_STANDARD
Standard.
Definition: poolfmt.hxx:250
SdrTextAniDirection
SdrOnOffItem makeSdrTextAutoGrowHeightItem(bool bAuto)
SdrOnOffItem makeSdrTextAutoGrowWidthItem(bool bAuto)
SDRTEXTHORZADJUST_RIGHT
SdrTextAniKind
SdrMetricItem makeSdrTextMinFrameHeightItem(tools::Long mnHeight)
Marks a position in the document model.
Definition: pam.hxx:38
SwNode & GetNode() const
Definition: pam.hxx:81
constexpr sal_uInt16 SDRATTR_MISC_LAST(SDRATTR_TEXT_CLIPVERTOVERFLOW)
constexpr sal_uInt16 SDRATTR_MISC_FIRST(SDRATTR_CAPTION_LAST+1)
@ SVX_CSS1_POS_ABSOLUTE
Definition: svxcss1.hxx:43
@ SVX_CSS1_LTYPE_TWIP
Definition: svxcss1.hxx:51
#define MINLAY
Definition: swtypes.hxx:62
tools::Long SwTwips
Definition: swtypes.hxx:51
#define MINFLY
Definition: swtypes.hxx:61
unsigned char sal_uInt8
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLUSESLIDEBACKGROUND)