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