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