LibreOffice Module sw (master)  1
ww8graf2.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 <iterator>
21 #include <numeric>
22 #include <hintids.hxx>
23 #include <svl/urihelper.hxx>
24 #include <svx/svdpage.hxx>
25 #include <svx/svdmodel.hxx>
26 #include <svx/svdograf.hxx>
27 #include <svx/svdoole2.hxx>
28 #include <editeng/opaqitem.hxx>
30 #include <sfx2/app.hxx>
31 #include <sfx2/docfile.hxx>
32 #include <sfx2/fcontnr.hxx>
33 #include <unotools/configmgr.hxx>
34 #include <grfatr.hxx>
35 #include <fmtanchr.hxx>
36 #include <fmtcntnt.hxx>
37 #include <fmtflcnt.hxx>
38 #include <frmfmt.hxx>
39 #include <fltshell.hxx>
40 #include <pam.hxx>
41 #include <doc.hxx>
43 #include <ndtxt.hxx>
44 #include <mdiexp.hxx>
45 #include "writerwordglue.hxx"
46 #include "ww8struc.hxx"
47 #include "ww8scan.hxx"
48 #include "ww8par.hxx"
49 #include "ww8par2.hxx"
50 #include "ww8graf.hxx"
51 #include <vcl/gdimtf.hxx>
52 #include <vcl/graphicfilter.hxx>
53 #include <vcl/wmf.hxx>
54 
55 using namespace ::com::sun::star;
56 using namespace sw::types;
57 
59  const SvxMSDffShapeOrders *pShapeOrders)
60  : maSetLayer(rSetLayer), mnInlines(0), mpDrawPg(pDrawPg),
61  mpShapeOrders(pShapeOrders)
62 {
64  OSL_ENSURE(mpDrawPg,"Missing draw page impossible!");
65 }
66 
68 {
69  maIndexes.push(GetEscherObjectIdx(nSpId));
70 }
71 
73 {
74  maIndexes.pop();
75 }
76 
77 // consider new parameter <_bInHeaderFooter>
79  sal_uLong nSpId,
80  const bool _bInHeaderFooter )
81 {
82  sal_uLong nInsertPos = GetEscherObjectPos( nSpId, _bInHeaderFooter );
83  InsertObject(pObject, nInsertPos + mnNoInitialObjects + mnInlines);
84 }
85 
87 {
88  return std::find_if(maEscherLayer.begin(), maEscherLayer.end(),
89  [nIdx](const EscherShape& rShape) { return rShape.mnEscherShapeOrder == nIdx; });
90 }
91 
93 {
94  sal_uInt16 nFound=0;
95  sal_uInt16 nShapeCount = mpShapeOrders ? mpShapeOrders->size() : 0;
96  // First, find out what position this shape is in the Escher order.
97  for (sal_uInt16 nShapePos=0; nShapePos < nShapeCount; nShapePos++)
98  {
99  const SvxMSDffShapeOrder& rOrder = *(*mpShapeOrders)[nShapePos];
100  if (rOrder.nShapeId == nSpId)
101  {
102  nFound = nShapePos;
103  break;
104  }
105  }
106  return nFound;
107 }
108 
109 // consider new parameter <_bInHeaderFooter>
111  const bool _bInHeaderFooter )
112 {
113  /*
114  EscherObjects have their own ordering which needs to be matched to
115  the actual ordering that should be used when inserting them into the
116  document.
117  */
118  sal_uInt16 nFound = GetEscherObjectIdx(nSpId);
119  // Match the ordering position from the ShapeOrders to the ordering of all
120  // objects in the document, there is a complexity when escherobjects
121  // contain inlines objects, we need to consider those as part of the
122  // escher count
123  sal_uLong nRet=0;
124  myeiter aIter = maEscherLayer.begin();
125  myeiter aEnd = maEscherLayer.end();
126  // skip objects in page header|footer,
127  // if current object isn't in page header|footer
128  if ( !_bInHeaderFooter )
129  {
130  while ( aIter != aEnd )
131  {
132  if ( !aIter->mbInHeaderFooter )
133  {
134  break;
135  }
136  nRet += aIter->mnNoInlines + 1;
137  ++aIter;
138  }
139  }
140  while (aIter != aEnd)
141  {
142  // insert object in page header|footer
143  // before objects in page body
144  if ( _bInHeaderFooter && !aIter->mbInHeaderFooter )
145  {
146  break;
147  }
148  if ( aIter->mnEscherShapeOrder > nFound )
149  break;
150  nRet += aIter->mnNoInlines+1;
151  ++aIter;
152  }
153  maEscherLayer.insert(aIter, EscherShape( nFound, _bInHeaderFooter ) );
154  return nRet;
155 }
156 
157 // InsertObj() adds the object into the Sw-Page and memorize the Z-position
158 // in a VarArr
159 void wwZOrderer::InsertDrawingObject(SdrObject* pObj, short nWwHeight)
160 {
161  sal_uLong nPos = GetDrawingObjectPos(nWwHeight);
162  if (nWwHeight & 0x2000) // Heaven ?
164  else
166 
167  InsertObject(pObj, nPos + mnNoInitialObjects + mnInlines);
168 }
169 
171 {
172  maSetLayer.SendObjectToHeaven(*pObject);
173  if (maIndexes.empty())
174  {
176  ++mnInlines;
177  }
178  else
179  {
180  //If we are inside an escher objects, place us just after that
181  //escher obj, and increment its inline count
182  sal_uInt16 nIdx = maIndexes.top();
183  myeiter aEnd = MapEscherIdxToIter(nIdx);
184 
185  sal_uLong nInsertPos = std::accumulate(maEscherLayer.begin(), aEnd, sal_uLong(0),
186  [](const sal_uLong nPos, const EscherShape& rShape) { return nPos + rShape.mnNoInlines + 1; });
187 
188  OSL_ENSURE(aEnd != maEscherLayer.end(), "Something very wrong here");
189  if (aEnd != maEscherLayer.end())
190  {
191  aEnd->mnNoInlines++;
192  nInsertPos += aEnd->mnNoInlines;
193  }
194 
195  InsertObject(pObject, mnNoInitialObjects + mnInlines + nInsertPos);
196  }
197 }
198 
199 /* Parallel to the Obj-array in the document I also build an array which
200  * contains the Ww-height (-> what covers what).
201  * Based on this VARARR the position where the insertion happens is
202  * determined.
203  * When inserting the offset in an existing document with a graphic layer the
204  * caller has to increment the index by mnNoInitialObjects, so that the new
205  * objects are added at the end (inserting is faster then)
206  */
208 {
209  auto aIter = std::find_if(
210  maDrawHeight.begin(), maDrawHeight.end(),
211  [nWwHeight](short aHeight){ return (aHeight & 0x1fff) > (nWwHeight & 0x1fff); });
212 
213  aIter = maDrawHeight.insert(aIter, nWwHeight);
214  return std::distance(maDrawHeight.begin(), aIter);
215 }
216 
218 {
219  if (!pObject->IsInserted())
220  {
221  mpDrawPg->InsertObject(pObject, nPos);
222  }
223 }
224 
225 static void WW8PicShadowToReal( WW8_PIC_SHADOW const * pPicS, WW8_PIC* pPic );
226 
228 {
229  return ERRCODE_NONE == GraphicFilter::GetGraphicFilter().ImportGraphic(rGraphic, OUString(), rSrc);
230 }
231 
232 bool SwWW8ImplReader::ReadGrafFile(OUString& rFileName, std::unique_ptr<Graphic>& rpGraphic,
233  const WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos, bool* pbInDoc)
234 { // Write the graphic to the file
235  *pbInDoc = true; // default
236 
237  sal_uLong nPosFc = nFilePos + rPic.cbHeader;
238 
239  switch (rPic.MFP.mm)
240  {
241  case 94: // BMP-file ( not embedded ) or GIF
242  case 99: // TIFF-file ( not embedded )
243  pSt->Seek(nPosFc);
244  // read name as P-string
245  rFileName = read_uInt8_PascalString(*pSt, m_eStructCharSet);
246  if (!rFileName.isEmpty())
247  rFileName = URIHelper::SmartRel2Abs(
248  INetURLObject(m_sBaseURL), rFileName,
250  *pbInDoc = false; // Don't delete the file afterwards
251  return !rFileName.isEmpty(); // read was successful
252  }
253 
254  GDIMetaFile aWMF;
255  bool bOk = checkSeek(*pSt, nPosFc) && ReadWindowMetafile( *pSt, aWMF );
256 
257  if (!bOk || pSt->GetError() || !aWMF.GetActionSize())
258  return false;
259 
260  //skip duplicate graphics when fuzzing
262  {
263  if (!m_aGrafPosSet.insert(nPosFc).second)
264  return false;
265  }
266 
267  if (m_xWwFib->m_envr != 1) // !MAC as creator
268  {
269  rpGraphic.reset(new Graphic(aWMF));
270  return true;
271  }
272 
273  // MAC - word as creator
274  // The WMF only says "Please use Word 6.0c" and Mac-Pict follows but without
275  // the first 512 Bytes which are not relevant in a MAC-PICT (they are not
276  // interpreted)
277  bOk = false;
278  long nData = rPic.lcb - ( pSt->Tell() - nPosFc );
279  if (nData > 0)
280  {
281  rpGraphic.reset(new Graphic());
282  bOk = SwWW8ImplReader::GetPictGrafFromStream(*rpGraphic, *pSt);
283  if (!bOk)
284  rpGraphic.reset();
285  }
286  return bOk; // Contains graphic
287 }
288 
290 {
291  sal_Int16 nCL, nCR, nCT, nCB;
293 
294  explicit WW8PicDesc( const WW8_PIC& rPic );
295 };
296 
298 {
299  //See #i21190# before fiddling with this method
300  long nOriWidth = rPic.dxaGoal; //Size in 1/100 mm before crop
301  long nOriHeight = rPic.dyaGoal;
302 
303  nCL = rPic.dxaCropLeft;
304  nCR = rPic.dxaCropRight;
305  nCT = rPic.dyaCropTop;
306  nCB = rPic.dyaCropBottom;
307 
308  long nCurrentWidth = nOriWidth - (nCL + nCR); // Size after crop
309  long nCurrentHeight = nOriHeight - (nCT + nCB);
310  if (!nCurrentWidth)
311  nCurrentWidth = 1;
312  if (!nCurrentHeight)
313  nCurrentHeight = 1;
314  nWidth = nCurrentWidth * rPic.mx / 1000; // Writer Size
315  nHeight = nCurrentHeight * rPic.my / 1000;
316 }
317 
318 void SwWW8ImplReader::ReplaceObj(const SdrObject &rReplaceObj,
319  SdrObject &rSubObj)
320 {
321  // Insert SdrGrafObj instead of SdrTextObj into this group
322  if (SdrObject* pGroupObject = rReplaceObj.getParentSdrObjectFromSdrObject())
323  {
324  SdrObjList* pObjectList = pGroupObject->GetSubList();
325 
326  rSubObj.SetLogicRect(rReplaceObj.GetCurrentBoundRect());
327  rSubObj.SetLayer(rReplaceObj.GetLayer());
328 
329  // remove old object from group-list and add new one
330  // (this also exchanges it in the drawing page)
331  pObjectList->ReplaceObject(&rSubObj, rReplaceObj.GetOrdNum());
332  }
333  else
334  {
335  OSL_ENSURE( false, "Impossible!");
336  }
337 }
338 
339 // MakeGrafNotInContent inserts a non character bound graphic
340 // ( bGrafApo == true)
342  const Graphic* pGraph, const OUString& rFileName, const SfxItemSet& rGrfSet)
343 {
344 
345  sal_uInt32 nWidth = rPD.nWidth;
346  sal_uInt32 nHeight = rPD.nHeight;
347 
348  // Vertical shift through line spacing
349  sal_Int32 nNetHeight = nHeight + rPD.nCT + rPD.nCB;
350  if (m_xSFlyPara->nLineSpace && m_xSFlyPara->nLineSpace > nNetHeight)
351  m_xSFlyPara->nYPos =
352  static_cast<sal_uInt16>( m_xSFlyPara->nYPos + m_xSFlyPara->nLineSpace - nNetHeight );
353 
354  WW8FlySet aFlySet(*this, m_xWFlyPara.get(), m_xSFlyPara.get(), true);
355 
357  aAnchor.SetAnchor(m_pPaM->GetPoint());
358  aFlySet.Put(aAnchor);
359 
360  aFlySet.Put( SwFormatFrameSize( ATT_FIX_SIZE, nWidth, nHeight ) );
361 
362  SwFlyFrameFormat *const pFlyFormat =
364  *m_pPaM, rFileName, OUString(), pGraph,
365  &aFlySet, &rGrfSet, nullptr);
366 
367  // So the frames are generated when inserted in an existing doc:
369  (RndStdIds::FLY_AT_PARA == pFlyFormat->GetAnchor().GetAnchorId()))
370  {
371  pFlyFormat->MakeFrames();
372  }
373  return pFlyFormat;
374 }
375 
376 // MakeGrafInContent inserts a character bound graphic
378  const WW8PicDesc& rPD, const Graphic* pGraph, const OUString& rFileName,
379  const SfxItemSet& rGrfSet)
380 {
381  WW8FlySet aFlySet(*this, m_pPaM, rPic, rPD.nWidth, rPD.nHeight);
382 
383  SwFrameFormat* pFlyFormat = nullptr;
384 
385  if (rFileName.isEmpty() && m_nObjLocFc) // then it should be a OLE-Object
386  pFlyFormat = ImportOle(pGraph, &aFlySet, &rGrfSet);
387 
388  if( !pFlyFormat ) // then just as graphic
389  {
390 
392  *m_pPaM, rFileName, OUString(), pGraph, &aFlySet,
393  &rGrfSet, nullptr);
394  }
395 
396  // Resize the frame to the size of the picture if graphic is inside a frame
397  // (only if auto-width)
398  if (m_xSFlyPara)
399  m_xSFlyPara->BoxUpWidth( rPD.nWidth );
400  return pFlyFormat;
401 }
402 
404  sal_uLong nFilePos )
405 {
406  SwFrameFormat* pRet = nullptr;
407  if( pSt->eof() || rPic.fError || rPic.MFP.mm == 99 )
408  return nullptr;
409 
410  OUString aFileName;
411  bool bInDoc;
412  std::unique_ptr<Graphic> pGraph;
413  bool bOk = ReadGrafFile(aFileName, pGraph, rPic, pSt, nFilePos, &bInDoc);
414 
415  if (!bOk)
416  {
417  return nullptr; // Graphic could not be read correctly
418  }
419 
420  WW8PicDesc aPD( rPic );
421 
423  if( aPD.nCL || aPD.nCR || aPD.nCT || aPD.nCB )
424  {
425  SwCropGrf aCrop( aPD.nCL, aPD.nCR, aPD.nCT, aPD.nCB) ;
426  aGrfSet.Put( aCrop );
427  }
428 
429  if (m_xWFlyPara && m_xWFlyPara->bGrafApo)
430  pRet = MakeGrafNotInContent(aPD, pGraph.get(), aFileName, aGrfSet);
431  else
432  pRet = MakeGrafInContent(rPic, aPD, pGraph.get(), aFileName, aGrfSet);
433  return pRet;
434 }
435 
436 void SwWW8ImplReader::PicRead(SvStream *pDataStream, WW8_PIC *pPic,
437  bool bVer67)
438 {
439  //Only the first 0x2e bytes are the same between version 6/7 and 8+
440  WW8_PIC_SHADOW aPicS;
441  pDataStream->ReadBytes( &aPicS, sizeof( aPicS ) );
442  WW8PicShadowToReal( &aPicS, pPic );
443  for (WW8_BRC & i : pPic->rgbrc)
444  pDataStream->ReadBytes(&i, bVer67 ? 2 : 4);
445  pDataStream->ReadInt16( pPic->dxaOrigin );
446  pDataStream->ReadInt16( pPic->dyaOrigin );
447  if (!bVer67)
448  pDataStream->SeekRel(2); //cProps
449 }
450 
451 namespace
452 {
453  SwNodeType GetNodeType(SwFrameFormat const &rSource)
454  {
455  const SwNodeIndex* pNodeIndex = rSource.GetContent().GetContentIdx();
456  if (!pNodeIndex)
457  return SwNodeType::NONE;
458  const SwNode& rCSttNd = pNodeIndex->GetNode();
459  SwNodeRange aRg(rCSttNd, 1, *rCSttNd.EndOfSectionNode());
460  return aRg.aStart.GetNode().GetNodeType();
461  }
462 }
463 
465  SwFrameFormat const * pOldFlyFormat)
466 {
467  SwFrameFormat* pRet = nullptr;
468  if (
469  ((m_pStrm == m_pDataStream ) && !m_nPicLocFc) ||
471  )
472  {
473  return nullptr;
474  }
475 
477 
478  GrafikCtor();
479 
480  /*
481  * Little joke from Microsoft: sometimes a stream named DATA exists. This
482  * stream then contains the PICF and the corresponding graphic!
483  * We otherwise map the variable pDataStream to pStream.
484  */
485  auto nOldPos = m_pDataStream->Tell();
486  WW8_PIC aPic;
487  bool bValid = checkSeek(*m_pDataStream, m_nPicLocFc);
488 
489  if (bValid)
490  PicRead( m_pDataStream, &aPic, m_bVer67);
491 
492  // Sanity check is needed because for example check boxes in field results
493  // contain a WMF-like struct
494  if (bValid && m_pDataStream->good() && (aPic.lcb >= 58))
495  {
497  {
498  // We just added a graphic-link into the doc. Now we need to set
499  // its position and scale it.
500  WW8PicDesc aPD( aPic );
501 
502  WW8FlySet aFlySet( *this, m_pPaM, aPic, aPD.nWidth, aPD.nHeight );
503 
504  // the correct anchor is set in Read_F_IncludePicture and the
505  // current PaM point is after the position if it is anchored in
506  // content; because this anchor add a character into the textnode.
507  // #i2806#
508  if (RndStdIds::FLY_AS_CHAR ==
510  {
511  aFlySet.ClearItem( RES_ANCHOR );
512  }
513 
515 
517  }
518  else if((0x64 == aPic.MFP.mm) || (0x66 == aPic.MFP.mm))
519  {
520  // linked graphic in ESCHER-Object
521  SdrObject* pObject = nullptr;
522 
523  WW8PicDesc aPD( aPic );
524  if (!m_xMSDffManager)
525  m_xMSDffManager.reset(new SwMSDffManager(*this, m_bSkipImages));
526  /* ##835##
527  * Disable use of main stream as fallback stream for inline direct
528  * blips as it is known that they are directly after the record
529  * header, testing for existence in main stream may lead to an
530  * incorrect fallback graphic being found if other escher graphics
531  * have been inserted in the document
532  */
533  m_xMSDffManager->DisableFallbackStream();
534  if (!m_xMSDffManager->GetModel())
535  m_xMSDffManager->SetModel(m_pDrawModel, 1440);
536 
537  if (0x66 == aPic.MFP.mm)
538  {
539  //These ones have names prepended
540  sal_uInt8 nNameLen=0;
541  m_pDataStream->ReadUChar( nNameLen );
542  m_pDataStream->SeekRel( nNameLen );
543  }
544 
545  tools::Rectangle aClientRect( 0,0, aPD.nWidth, aPD.nHeight);
546  SvxMSDffImportData aData( aClientRect );
547  pObject = m_xMSDffManager->ImportObj(*m_pDataStream, aData, aClientRect, tools::Rectangle(), /*nCalledByGroup*/0, /*pShapeId*/nullptr );
548  if (pObject)
549  {
550  // for the frame
552  RES_FRMATR_END-1>{} );
553 
554  SvxMSDffImportRec const*const pRecord = (1 == aData.size())
555  ? aData.begin()->get() : nullptr;
556 
557  if( pRecord )
558  {
559 
560  // Horizontal rule may have its width given as % of page
561  // width (-1 is used if not given, 0 means the object has
562  // fixed width).
563  // Additionally, if it's a horizontal rule without width
564  // given, assume 100.0% width.
565  int relativeWidth = pRecord->relativeHorizontalWidth;
566  if( relativeWidth == -1 )
567  relativeWidth = pRecord->isHorizontalRule ? 1000 : 0;
568  if( relativeWidth != 0 )
569  {
570  const sal_Int16 nScale = aPic.dxaGoal ? aPic.dxaGoal : 1000;
571  aPic.mx = msword_cast<sal_uInt16>(
574  m_aSectionManager.GetPageLeft()) * relativeWidth / nScale;
575  aPD = WW8PicDesc( aPic );
576  // This SetSnapRect() call adjusts the size of the
577  // object itself, no idea why it's this call (or even
578  // what the call actually does), but that's what
579  // ImportGraf() (called by ImportObj()) uses.
580  pObject->SetSnapRect( tools::Rectangle( 0, 0, aPD.nWidth, aPD.nHeight ));
581  }
582 
583  // A graphic of this type in this location is always
584  // inline, and uses the pic in the same module as ww6
585  // graphics.
586  if (m_xWFlyPara && m_xWFlyPara->bGrafApo)
587  {
588  WW8FlySet aFlySet(*this, m_xWFlyPara.get(), m_xSFlyPara.get(), true);
589 
591  aAnchor.SetAnchor(m_pPaM->GetPoint());
592  aFlySet.Put(aAnchor);
593 
594  aAttrSet.Put(aFlySet);
595  }
596  else
597  {
598  WW8FlySet aFlySet( *this, m_pPaM, aPic, aPD.nWidth,
599  aPD.nHeight );
600 
601  aAttrSet.Put(aFlySet);
602  }
603  // Modified for i120716,for graf importing from MS Word 2003
604  // binary format, there is no border distance.
605  tools::Rectangle aInnerDist(0,0,0,0);
606  MatchSdrItemsIntoFlySet( pObject, aAttrSet,
607  pRecord->eLineStyle, pRecord->eLineDashing,
608  pRecord->eShapeType, aInnerDist );
609 
610  // Set the size from the WinWord PIC-structure as graphic
611  // size
612  aAttrSet.Put( SwFormatFrameSize( ATT_FIX_SIZE, aPD.nWidth,
613  aPD.nHeight ) );
614  }
615 
616  // for the graphic
618  RES_GRFATR_END-1>{} );
619 
620  if( aPD.nCL || aPD.nCR || aPD.nCT || aPD.nCB )
621  {
622  SwCropGrf aCrop( aPD.nCL, aPD.nCR, aPD.nCT, aPD.nCB );
623  aGrSet.Put( aCrop );
624  }
625 
626  if (pRecord)
627  MatchEscherMirrorIntoFlySet(*pRecord, aGrSet);
628 
629  // if necessary adopt old AttrSet and correct horizontal
630  // positioning relation
631  if( pOldFlyFormat )
632  {
633  aAttrSet.Put( pOldFlyFormat->GetAttrSet() );
634  const SwFormatHoriOrient &rHori = pOldFlyFormat->GetHoriOrient();
635  if( text::RelOrientation::FRAME == rHori.GetRelationOrient() )
636  {
637  aAttrSet.Put( SwFormatHoriOrient( rHori.GetPos(),
638  text::HoriOrientation::NONE, text::RelOrientation::PAGE_PRINT_AREA ) );
639  }
640  }
641 
642  bool bTextObjWasGrouped = false;
643  if (pOldFlyFormat && pTextObj && pTextObj->getParentSdrObjectFromSdrObject())
644  bTextObjWasGrouped = true;
645 
646  if (bTextObjWasGrouped)
647  ReplaceObj(*pTextObj, *pObject);
648  else
649  {
650  if (sal_uInt16(OBJ_OLE2) == pObject->GetObjIdentifier())
651  {
652  // the size from BLIP, if there is any, should be already set
653  pRet = InsertOle(*static_cast<SdrOle2Obj*>(pObject), aAttrSet, &aGrSet);
654  }
655  else
656  {
657  if (SdrGrafObj* pGraphObject = dynamic_cast<SdrGrafObj*>( pObject) )
658  {
659  // Now add the link or rather the graphic to the doc
660  const Graphic& rGraph = pGraphObject->GetGraphic();
661 
662  if (m_nObjLocFc) // is it a OLE-Object?
663  pRet = ImportOle(&rGraph, &aAttrSet, &aGrSet, pObject->GetBLIPSizeRectangle());
664 
665  if (!pRet)
666  {
668  *m_pPaM, OUString(), OUString(),
669  &rGraph, &aAttrSet, &aGrSet, nullptr );
670  }
671  }
672  else
673  pRet = m_rDoc.getIDocumentContentOperations().InsertDrawObj(*m_pPaM, *pObject, aAttrSet );
674  }
675  }
676 
677  // only if we made an *Insert*
678  if (pRet)
679  {
680  if (pRecord)
681  SetAttributesAtGrfNode(pRecord, pRet, nullptr);
682 
683  OUString aObjectName(pObject->GetName());
684  if (aObjectName.isEmpty() || !m_rDoc.FindFlyByName(aObjectName, GetNodeType(*pRet)))
685  pRet->SetName(aObjectName);
686  else
687  m_aGrfNameGenerator.SetUniqueGraphName(pRet, aObjectName);
688 
689  // determine the pointer to the new object and update
690  // Z-order-list accordingly (or delete entry)
691  if (SdrObject* pOurNewObject = CreateContactObject(pRet))
692  {
693  if (pOurNewObject != pObject)
694  {
695  m_xMSDffManager->ExchangeInShapeOrder( pObject, 0,
696  pOurNewObject );
697 
698  // delete and destroy old SdrGrafObj from page
699  if (pObject->getSdrPageFromSdrObject())
700  m_pDrawPg->RemoveObject(pObject->GetOrdNum());
701  SdrObject::Free( pObject );
702  }
703  }
704  else
705  m_xMSDffManager->RemoveFromShapeOrder( pObject );
706  }
707  else
708  m_xMSDffManager->RemoveFromShapeOrder( pObject );
709 
710  // also delete this from the page if not grouped
711  if (pTextObj && !bTextObjWasGrouped && pTextObj->getSdrPageFromSdrObject())
712  m_pDrawPg->RemoveObject( pTextObj->GetOrdNum() );
713  }
714  m_xMSDffManager->EnableFallbackStream();
715  }
716  else if (aPic.lcb >= 58)
717  pRet = ImportGraf1(aPic, m_pDataStream, m_nPicLocFc);
718  }
719  m_pDataStream->Seek( nOldPos );
720 
721  if (pRet)
722  {
723  SdrObject* pOurNewObject = CreateContactObject(pRet);
724  m_xWWZOrder->InsertTextLayerObject(pOurNewObject);
725  }
726 
727  return AddAutoAnchor(pRet);
728 }
729 
730 void WW8PicShadowToReal( WW8_PIC_SHADOW const * pPicS, WW8_PIC * pPic )
731 {
732  pPic->lcb = SVBT32ToUInt32( pPicS->lcb );
733  pPic->cbHeader = SVBT16ToUInt16( pPicS->cbHeader );
734  pPic->MFP.mm = SVBT16ToUInt16( pPicS->MFP.mm );
735  pPic->MFP.xExt = SVBT16ToUInt16( pPicS->MFP.xExt );
736  pPic->MFP.yExt = SVBT16ToUInt16( pPicS->MFP.yExt );
737  pPic->MFP.hMF = SVBT16ToUInt16( pPicS->MFP.hMF );
738  for( sal_uInt16 i = 0; i < 14 ; i++ )
739  pPic->rcWinMF[i] = pPicS->rcWinMF[i];
740  pPic->dxaGoal = SVBT16ToUInt16( pPicS->dxaGoal );
741  pPic->dyaGoal = SVBT16ToUInt16( pPicS->dyaGoal );
742  pPic->mx = SVBT16ToUInt16( pPicS->mx );
743  pPic->my = SVBT16ToUInt16( pPicS->my );
744  pPic->dxaCropLeft = SVBT16ToUInt16( pPicS->dxaCropLeft );
745  pPic->dyaCropTop = SVBT16ToUInt16( pPicS->dyaCropTop );
746  pPic->dxaCropRight = SVBT16ToUInt16( pPicS->dxaCropRight );
747  pPic->dyaCropBottom = SVBT16ToUInt16( pPicS->dyaCropBottom );
748  pPic->brcl = pPicS->aBits1 & 0x0f;
749  pPic->fFrameEmpty = (pPicS->aBits1 & 0x10) >> 4;
750  pPic->fBitmap = (pPicS->aBits1 & 0x20) >> 5;
751  pPic->fDrawHatch = (pPicS->aBits1 & 0x40) >> 6;
752  pPic->fError = (pPicS->aBits1 & 0x80) >> 7;
753  pPic->bpp = pPicS->aBits2;
754 }
755 
756 void WW8FSPAShadowToReal( WW8_FSPA_SHADOW const * pFSPAS, WW8_FSPA * pFSPA )
757 {
758  pFSPA->nSpId = SVBT32ToUInt32( pFSPAS->nSpId );
759  pFSPA->nXaLeft = SVBT32ToUInt32( pFSPAS->nXaLeft );
760  pFSPA->nYaTop = SVBT32ToUInt32( pFSPAS->nYaTop );
761  pFSPA->nXaRight = SVBT32ToUInt32( pFSPAS->nXaRight );
762  pFSPA->nYaBottom = SVBT32ToUInt32( pFSPAS->nYaBottom );
763 
764  sal_uInt16 nBits = SVBT16ToUInt16( pFSPAS->aBits1 );
765 
766  pFSPA->bHdr = sal_uInt16(0 != ( nBits & 0x0001 ));
767  pFSPA->nbx = ( nBits & 0x0006 ) >> 1;
768  pFSPA->nby = ( nBits & 0x0018 ) >> 3;
769  pFSPA->nwr = ( nBits & 0x01E0 ) >> 5;
770  pFSPA->nwrk = ( nBits & 0x1E00 ) >> 9;
771  pFSPA->bRcaSimple = sal_uInt16(0 != ( nBits & 0x2000 ));
772  pFSPA->bBelowText = sal_uInt16(0 != ( nBits & 0x4000 ));
773  pFSPA->bAnchorLock = sal_uInt16(0 != ( nBits & 0x8000 ));
774  pFSPA->nTxbx = SVBT32ToUInt32( pFSPAS->nTxbx );
775 }
776 
777 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:682
sal_Int32 nXaRight
Definition: ww8struc.hxx:905
SwFrameFormat * ImportGraf1(WW8_PIC const &rPic, SvStream *pSt, sal_uLong nFilePos)
Definition: ww8graf2.cxx:403
SvStream & ReadInt16(sal_Int16 &rInt16)
void OutsideEscher()
Definition: ww8graf2.cxx:72
WW8_BRC rgbrc[4]
Definition: ww8struc.hxx:472
sal_uInt16 nby
Definition: ww8struc.hxx:915
#define RES_GRFATR_END
Definition: hintids.hxx:258
sal_uInt32 GetPageLeft() const
Definition: ww8par2.cxx:149
static constexpr RndStdIds eAnchor
Definition: ww8par2.hxx:57
SVBT16 dxaGoal
Definition: ww8struc.hxx:495
rtl_TextEncoding m_eStructCharSet
Definition: ww8par.hxx:1284
virtual const tools::Rectangle & GetCurrentBoundRect() const
ErrCode ImportGraphic(Graphic &rGraphic, const INetURLObject &rPath, sal_uInt16 nFormat=GRFILTER_FORMAT_DONTKNOW, sal_uInt16 *pDeterminedFormat=nullptr, GraphicFilterImportFlags nImportFlags=GraphicFilterImportFlags::NONE)
SwFlyFrameFormat * m_pFlyFormatOfJustInsertedGraphic
Definition: ww8par.hxx:1198
OBJ_OLE2
const SvxMSDffShapeOrders * mpShapeOrders
Definition: ww8graf.hxx:67
sal_Int16 dyaCropBottom
Definition: ww8struc.hxx:465
sal_uInt16 bBelowText
Definition: ww8struc.hxx:937
sal_Int16 nCL
Definition: ww8graf2.cxx:291
virtual SwFlyFrameFormat * InsertGraphic(const SwPaM &rRg, const OUString &rGrfName, const OUString &rFltName, const Graphic *pGraphic, const SfxItemSet *pFlyAttrSet, const SfxItemSet *pGrfAttrSet, SwFrameFormat *)=0
Insert graphic or formula.
#define WW8FL_NO_GRAF
Definition: ww8par.hxx:119
bool ReadWindowMetafile(SvStream &rStream, GDIMetaFile &rMTF)
sal_uInt16 m_nProgress
Definition: ww8par.hxx:1286
sal_uInt8 aBits1
Definition: ww8struc.hxx:503
sal_uInt16 nbx
Definition: ww8struc.hxx:909
void MatchSdrItemsIntoFlySet(SdrObject const *pSdrObj, SfxItemSet &aFlySet, MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, tools::Rectangle &rInnerDist)
Definition: ww8graf.cxx:1664
void InsertTextLayerObject(SdrObject *pObject)
Definition: ww8graf2.cxx:170
SVBT16 cbHeader
Definition: ww8struc.hxx:485
SwTwips GetPos() const
Definition: fmtornt.hxx:92
sal_uIntPtr sal_uLong
wwFrameNamer m_aGrfNameGenerator
Definition: ww8par.hxx:1177
struct WW8_PIC::@17 MFP
#define RES_FRMATR_END
Definition: hintids.hxx:236
void SetAttributesAtGrfNode(SvxMSDffImportRec const *pRecord, SwFrameFormat const *pFlyFormat, WW8_FSPA const *pF)
Definition: ww8graf.cxx:2108
bool IsInserted() const
SVBT32 nYaBottom
Definition: ww8struc.hxx:955
size_t GetObjCount() const
std::unique_ptr< WW8FlyPara > m_xWFlyPara
Definition: ww8par.hxx:1240
std::shared_ptr< WW8Fib > m_xWwFib
Definition: ww8par.hxx:1218
std::vector< std::unique_ptr< SvxMSDffShapeOrder > > SvxMSDffShapeOrders
std::vector< EscherShape >::iterator myeiter
Definition: ww8graf.hxx:56
sal_uInt64 Seek(sal_uInt64 nPos)
void WW8FSPAShadowToReal(WW8_FSPA_SHADOW const *pFSPAS, WW8_FSPA *pFSPA)
Definition: ww8graf2.cxx:756
SwNode & GetNode() const
Definition: ndindex.hxx:118
SdrPage * m_pDrawPg
Definition: ww8par.hxx:1251
std::vector< short > maDrawHeight
Definition: ww8graf.hxx:58
sal_uInt32 m_nIniFlags
Definition: ww8par.hxx:1267
std::unique_ptr< SwMSDffManager > m_xMSDffManager
Definition: ww8par.hxx:1257
sal_Int32 lcb
Definition: ww8struc.hxx:447
sal_Int16 bpp
Definition: ww8struc.hxx:471
bool const m_bSkipImages
Definition: ww8par.hxx:1305
long nWidth
Definition: ww8graf2.cxx:292
sal_Int32 nXaLeft
Definition: ww8struc.hxx:903
static void Free(SdrObject *&_rpObject)
sal_Int32 nSpId
Definition: ww8struc.hxx:902
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:347
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
Frame cannot be moved in Var-direction.
Definition: fmtfsize.hxx:38
sal_uInt16 GetEscherObjectIdx(sal_uLong nSpId)
Definition: ww8graf2.cxx:92
SwFrameFormat * ImportOle(const Graphic *=nullptr, const SfxItemSet *pFlySet=nullptr, const SfxItemSet *pGrfSet=nullptr, const tools::Rectangle &aVisArea=tools::Rectangle())
Definition: ww8par4.cxx:246
sal_uInt64 SeekRel(sal_Int64 nPos)
sal_Int16 nCT
Definition: ww8graf2.cxx:291
Make setting a drawing object's layer in a Writer document easy.
struct WW8_PIC_SHADOW::@18 MFP
SwFlyFrameFormat * InsertOle(SdrOle2Obj &rObject, const SfxItemSet &rFlySet, const SfxItemSet *rGrfSet)
Definition: ww8par4.cxx:202
sal_uInt8 rcWinMF[14]
Definition: ww8struc.hxx:456
myeiter MapEscherIdxToIter(sal_uLong nIdx)
Definition: ww8graf2.cxx:86
ErrCode GetError() const
SwNodeType GetNodeType() const
Definition: node.hxx:144
bool eof() const
SdrPage * getSdrPageFromSdrObject() const
SwNodeIndex aStart
Definition: ndindex.hxx:131
static bool IsFuzzing()
SvStream * m_pStrm
Definition: ww8par.hxx:1088
virtual void SetName(const OUString &rNewName, bool bBroadcast=false) override
Definition: atrfrm.cxx:2464
sal_Int16 fBitmap
Definition: ww8struc.hxx:468
MSDffImportRecords::const_iterator begin() const
sal_Int16 dxaCropLeft
Definition: ww8struc.hxx:462
Ret msword_cast(Param in)
A static_cast style cast for conversion of writer types to word's.
sal_uLong GetEscherObjectPos(sal_uLong nSpId, const bool _bInHeaderFooter)
Definition: ww8graf2.cxx:110
static bool GetPictGrafFromStream(Graphic &rGraphic, SvStream &rSrc)
Definition: ww8graf2.cxx:227
void GrafikCtor()
Definition: ww8graf.cxx:3172
void SetUniqueGraphName(SwFrameFormat *pFrameFormat, const OUString &rFixedPart)
Definition: ww8graf.cxx:181
sal_uInt16 bAnchorLock
Definition: ww8struc.hxx:941
OUString const m_sBaseURL
Definition: ww8par.hxx:1264
const tools::Rectangle & GetBLIPSizeRectangle() const
sal_Int16 dxaGoal
Definition: ww8struc.hxx:458
void SetProgressState(long nPosition, SwDocShell const *pDocShell)
Definition: mainwn.cxx:78
void SendObjectToHeaven(SdrObject &rObject) const
Make Object lives in the top layer.
SVBT16 dyaCropTop
Definition: ww8struc.hxx:500
std::unique_ptr< wwZOrderer > m_xWWZOrder
Definition: ww8par.hxx:1253
virtual void SetLayer(SdrLayerID nLayer)
sal_Int16 mm
Definition: ww8struc.hxx:450
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
const SwFlyFrameFormat * FindFlyByName(const OUString &rName, SwNodeType nNdTyp=SwNodeType::NONE) const
Definition: doclay.cxx:1397
void InsertObject(SdrObject *pObject, sal_uLong nPos)
Definition: ww8graf2.cxx:217
Style of a layout element.
Definition: frmfmt.hxx:57
bool checkSeek(SvStream &rSt, sal_uInt64 nOffset)
sal_Int16 fDrawHatch
Definition: ww8struc.hxx:469
SwNodeType
Definition: ndtyp.hxx:28
#define RES_ANCHOR
Definition: hintids.hxx:209
sw::util::SetLayer const maSetLayer
Definition: ww8graf.hxx:62
wwSectionManager m_aSectionManager
Definition: ww8par.hxx:1149
const SwFormatAnchor & GetAnchor(bool=true) const
Definition: fmtanchr.hxx:81
SwDoc & m_rDoc
Definition: ww8par.hxx:1093
OUString read_uInt8_PascalString(SvStream &rStrm, rtl_TextEncoding eEnc)
Definition: ww8scan.hxx:155
sal_uInt8 rcWinMF[14]
Definition: ww8struc.hxx:493
sal_Int16 yExt
Definition: ww8struc.hxx:452
const SwPosition * GetPoint() const
Definition: pam.hxx:207
virtual sal_uInt16 GetObjIdentifier() const
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:65
const SwFormatHoriOrient & GetHoriOrient(bool=true) const
Definition: fmtornt.hxx:108
SVL_DLLPUBLIC Link< OUString *, bool > const & GetMaybeFileHdl()
sal_Int16 xExt
Definition: ww8struc.hxx:451
void InsertEscherObject(SdrObject *pObject, sal_uLong nSpId, const bool _bInHeaderFooter)
Definition: ww8graf2.cxx:78
sal_Int16 nCB
Definition: ww8graf2.cxx:291
SwFrameFormat * AddAutoAnchor(SwFrameFormat *pFormat)
Definition: ww8graf.cxx:2832
sal_Int16 fFrameEmpty
Definition: ww8struc.hxx:467
int i
FlyAnchors.
Definition: fmtanchr.hxx:34
wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage *pDrawPg, const SvxMSDffShapeOrders *pShapeOrders)
Definition: ww8graf2.cxx:58
void MatchEscherMirrorIntoFlySet(const SvxMSDffImportRec &rRecord, SfxItemSet &rFlySet)
Definition: ww8graf.cxx:3048
void InsertDrawingObject(SdrObject *pObj, short nWwHeight)
Definition: ww8graf2.cxx:159
sal_uInt32 GetOrdNum() const
std::set< sal_uLong > m_aGrafPosSet
Definition: ww8par.hxx:1214
SwDocShell * m_pDocShell
Definition: ww8par.hxx:1072
virtual void SetLogicRect(const tools::Rectangle &rRect)
Marks a node in the document model.
Definition: ndindex.hxx:31
sal_Int16 dyaGoal
Definition: ww8struc.hxx:459
long nHeight
Definition: ww8graf2.cxx:292
sal_uInt16 mx
Definition: ww8struc.hxx:460
SvStream & ReadUChar(unsigned char &rChar)
GUIDCNamePair const aData
sal_Int16 dxaOrigin
Definition: ww8struc.hxx:477
sal_Int16 dyaOrigin
Definition: ww8struc.hxx:478
virtual SdrObject * RemoveObject(size_t nObjNum)
sal_uLong GetDrawingObjectPos(short nWwHeight)
Definition: ww8graf2.cxx:207
SwFlyFrameFormat * MakeGrafNotInContent(const WW8PicDesc &rPD, const Graphic *pGraph, const OUString &rFileName, const SfxItemSet &rGrfSet)
Definition: ww8graf2.cxx:341
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
Definition: doc.cxx:437
OUString GetName() const
size_t size() const
#define RES_GRFATR_BEGIN
Definition: hintids.hxx:238
sal_uInt32 GetPageRight() const
Definition: ww8par2.cxx:154
virtual SdrLayerID GetLayer() const
const SwNodeIndex * GetContentIdx() const
Definition: fmtcntnt.hxx:46
SdrPage * mpDrawPg
Definition: ww8graf.hxx:66
std::size_t ReadBytes(void *pData, std::size_t nSize)
sal_uInt16 nwrk
Definition: ww8struc.hxx:929
sal_uInt8 aBits2
Definition: ww8struc.hxx:504
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:460
sal_Int16 dyaCropTop
Definition: ww8struc.hxx:463
sal_uLong mnInlines
Definition: ww8graf.hxx:65
virtual void MakeFrames() override
Creates the views.
Definition: atrfrm.cxx:2845
sal_uInt16 bRcaSimple
Definition: ww8struc.hxx:935
virtual SwDrawFrameFormat * InsertDrawObj(const SwPaM &rRg, SdrObject &rDrawObj, const SfxItemSet &rFlyAttrSet)=0
Insert a DrawObject.
SVBT16 dyaCropBottom
Definition: ww8struc.hxx:502
virtual SdrObject * ReplaceObject(SdrObject *pNewObj, size_t nObjNum)
friend class SwMSDffManager
Definition: ww8par.hxx:1080
sal_Int16 GetRelationOrient() const
Definition: fmtornt.hxx:88
#define ERRCODE_NONE
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
unsigned char sal_uInt8
void InsideEscher(sal_uLong nIndex)
Definition: ww8graf2.cxx:67
SVBT16 dyaGoal
Definition: ww8struc.hxx:496
sal_Int16 dxaCropRight
Definition: ww8struc.hxx:464
static void PicRead(SvStream *pDataStream, WW8_PIC *pPic, bool bVer67)
Definition: ww8graf2.cxx:436
SVBT16 dxaCropRight
Definition: ww8struc.hxx:501
sal_uInt64 Tell() const
size_t GetActionSize() const
SdrObject * CreateContactObject(SwFrameFormat *pFlyFormat)
Definition: ww8graf.cxx:2209
sal_uLong mnNoInitialObjects
Definition: ww8graf.hxx:64
sal_Int32 nTxbx
Definition: ww8struc.hxx:944
std::stack< sal_uInt16 > maIndexes
Definition: ww8graf.hxx:60
SwFrameFormat * ImportGraf(SdrTextObj const *pTextObj=nullptr, SwFrameFormat const *pFlyFormat=nullptr)
Definition: ww8graf2.cxx:464
SdrObject * getParentSdrObjectFromSdrObject() const
const SwFormatContent & GetContent(bool=true) const
Definition: fmtcntnt.hxx:55
sal_Int16 hMF
Definition: ww8struc.hxx:453
bool good() const
virtual void SetSnapRect(const tools::Rectangle &rRect)
sal_Int16 fError
Definition: ww8struc.hxx:470
static GraphicFilter & GetGraphicFilter()
sal_uInt16 bHdr
Definition: ww8struc.hxx:907
sal_uInt32 GetPageWidth() const
Definition: ww8par2.cxx:159
std::unique_ptr< WW8SwFlyPara > m_xSFlyPara
Definition: ww8par.hxx:1241
void SendObjectToHell(SdrObject &rObject) const
Make Object live in the bottom drawing layer.
sal_uLong m_nObjLocFc
Definition: ww8par.hxx:1278
static void WW8PicShadowToReal(WW8_PIC_SHADOW const *pPicS, WW8_PIC *pPic)
Definition: ww8graf2.cxx:730
SdrModel * m_pDrawModel
Definition: ww8par.hxx:1250
SvStream * m_pDataStream
Definition: ww8par.hxx:1090
sal_uInt16 nwr
Definition: ww8struc.hxx:920
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:116
SwFrameFormat * MakeGrafInContent(const WW8_PIC &rPic, const WW8PicDesc &rPD, const Graphic *pGraph, const OUString &rFileName, const SfxItemSet &rGrfSet)
Definition: ww8graf2.cxx:377
sal_uLong m_nPicLocFc
Definition: ww8par.hxx:1277
bool ReadGrafFile(OUString &rFileName, std::unique_ptr< Graphic > &rpGraphic, const WW8_PIC &rPic, SvStream *pSt, sal_uLong nFilePos, bool *pDelIt)
Definition: ww8graf2.cxx:232
static void ReplaceObj(const SdrObject &rReplaceTextObj, SdrObject &rSubObj)
Definition: ww8graf2.cxx:318
sal_Int32 nYaBottom
Definition: ww8struc.hxx:906
sal_Int16 brcl
Definition: ww8struc.hxx:466
sal_Int32 nPos
sal_Int16 nCR
Definition: ww8graf2.cxx:291
std::vector< EscherShape > maEscherLayer
Definition: ww8graf.hxx:55
#define RES_FRMATR_BEGIN
Definition: hintids.hxx:192
sal_uInt16 cbHeader
Definition: ww8struc.hxx:448
sal_Int32 nYaTop
Definition: ww8struc.hxx:904
SwPaM * m_pPaM
Definition: ww8par.hxx:1095
SVBT16 dxaCropLeft
Definition: ww8struc.hxx:499
WW8PicDesc(const WW8_PIC &rPic)
Definition: ww8graf2.cxx:297
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1307
sal_uInt16 my
Definition: ww8struc.hxx:461
SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const &rTheBaseURIRef, OUString const &rTheRelURIRef, Link< OUString *, bool > const &rMaybeFileHdl=Link< OUString *, bool >(), bool bCheckFileExists=true, bool bIgnoreFragment=false, INetURLObject::EncodeMechanism eEncodeMechanism=INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism eDecodeMechanism=INetURLObject::DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
Base class of the Writer document model elements.
Definition: node.hxx:79