LibreOffice Module sw (master)  1
wrtww8gr.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 <memory>
21 #include <com/sun/star/embed/XEmbedPersist.hpp>
22 #include <com/sun/star/embed/Aspects.hpp>
23 #include <com/sun/star/embed/ElementModes.hpp>
24 #include <sal/log.hxx>
25 #include <vcl/graphicfilter.hxx>
26 #include <vcl/gdimtf.hxx>
27 #include <svl/itemiter.hxx>
28 #include <tools/UnitConversion.hxx>
29 
30 #include <svtools/embedhlp.hxx>
31 
32 #include <hintids.hxx>
33 #include <editeng/boxitem.hxx>
34 #include <editeng/shaditem.hxx>
36 #include <editeng/fhgtitem.hxx>
37 #include <svx/svdoole2.hxx>
38 
40 #include <fmtanchr.hxx>
41 #include <ndgrf.hxx>
42 #include <frmfmt.hxx>
43 #include <grfatr.hxx>
44 #include <ndole.hxx>
45 #include <ndtxt.hxx>
46 #include <fmtfsize.hxx>
47 #include <fmtornt.hxx>
48 
49 #include "sprmids.hxx"
50 
51 #include <doc.hxx>
52 #include "writerhelper.hxx"
53 #include "writerwordglue.hxx"
54 #include "ww8struc.hxx"
55 #include "wrtww8.hxx"
56 #include "ww8par.hxx"
57 #include "escher.hxx"
58 //Added for i120568
59 #include "ww8attributeoutput.hxx"
60 #include <fmturl.hxx>
61 
63 #include <drawdoc.hxx>
64 
65 using namespace ::com::sun::star;
66 
67 // TODO:
68 // 5. convert the MapModes that Widows can't handle
69 
70 // OutGrf () is called for every GrfNode in the document. A PicLocFc-Sprm
71 // will be inserted, which contains a magic number instead of an address.
72 // The GrfNode-Ptr is saved in Graf-Class (used later for output of
73 // the graphic and patching of the PicLocFc attributes)
74 
75 void WW8Export::OutputGrfNode( const SwGrfNode& /*rNode*/ )
76 {
77  SAL_INFO("sw", "WW8Export::OutputGrfNode( const SwGrfNode& )" );
78  OSL_ENSURE( m_pParentFrame, "frame not set!" );
79  if ( m_pParentFrame )
80  {
82  pFib->m_fHasPic = true;
83  }
84 }
85 
87  const tools::SvRef<SotStorage>& xObjStg,
88  OUString const& rStorageName, SwOLENode* pOLENd)
89 {
90  bool bGraphicNeeded = false;
91  SfxItemIter aIter( rSet );
92  for (auto pItem = aIter.GetCurItem(); !bGraphicNeeded && pItem; pItem = aIter.NextItem())
93  {
94  switch (pItem->Which())
95  {
96  /*
97  For an inline object these properties are irrelevant because they
98  will be the same as the defaults that msword applies in their
99  absence, so if that is all that there is for these inline objects
100  then if there turns out to be enough information in the object
101  itself to regenerate the correct size and preview of the object
102  then we will not need to provide an additional graphics preview in
103  the data stream, which can save a lot of disk space.
104  */
105  case RES_FRM_SIZE:
106  case RES_CNTNT:
107  case RES_VERT_ORIENT:
108  case RES_ANCHOR:
109  break;
110  default:
111  bGraphicNeeded = true;
112  }
113  }
114 
115  /*
116  Now we must see if the object contains a preview itself which is equal to
117  the preview that we are currently using. If the graphics are equal then we
118  don't need to store another preview
119  */
120  GDIMetaFile aWMF;
121  long nX=0,nY=0;
122  if (!bGraphicNeeded && SwWW8ImplReader::ImportOleWMF(xOleStg,aWMF,nX,nY))
123  {
124  // bGraphicNeeded set to true is right / fixes #i51670#.
125  bGraphicNeeded = true;
126  tools::Rectangle aRect( Point(), Size( nX, nY ) );
127  Graphic aGraph(aWMF);
128 
129  ErrCode nErr = ERRCODE_NONE;
130  sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
131  if ( pOLENd )
132  nAspect = pOLENd->GetAspect();
135  rStorageName,
136  xObjStg,
138  aGraph,
139  aRect,
141  nullptr,
142  nErr,
143  0,
144  nAspect,
145  m_pWriter->GetBaseURL());
146 
147  if (pRet)
148  {
149  uno::Reference< embed::XEmbeddedObject > xObj = pOLENd->GetOLEObj().GetOleRef();
150  if ( xObj.is() )
151  {
152  std::unique_ptr<SvStream> pGraphicStream;
154  try
155  {
156  uno::Reference< embed::XEmbedPersist > xPersist(
157  xObj,
158  uno::UNO_QUERY_THROW );
159 
160  // it makes no sense to search the object in the container by reference since the object was created
161  // outside of the container and was not inserted there, only the name makes sense
162  pGraphicStream =
163  ::utl::UcbStreamHelper::CreateStream( aCnt.GetGraphicStream( xPersist->getEntryName() ) );
164  }
165  catch( const uno::Exception& )
166  {}
167 
168  OSL_ENSURE( pGraphicStream && !pGraphicStream->GetError(), "No graphic stream available!" );
169  if ( pGraphicStream && !pGraphicStream->GetError() )
170  {
171  Graphic aGr1;
173  if( rGF.ImportGraphic( aGr1, OUString(), *pGraphicStream ) == ERRCODE_NONE )
174  {
175  Graphic aGr2;
176  pGraphicStream =
177  ::utl::UcbStreamHelper::CreateStream( aCnt.GetGraphicStream( pRet->GetObjRef() ) );
178  if( pGraphicStream && rGF.ImportGraphic( aGr2, OUString(), *pGraphicStream ) == ERRCODE_NONE )
179  {
180  if ( aGr1 == aGr2 )
181  bGraphicNeeded = false;
182  }
183  }
184  }
185  }
186 
187  // always use SdrObject::Free(...) for SdrObjects (!)
188  SdrObject* pTemp(pRet);
189  SdrObject::Free(pTemp);
190  }
191  }
192  else
193  bGraphicNeeded = true;
194  return bGraphicNeeded;
195 }
196 
197 void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
198 {
199  SAL_INFO("sw", "WW8Export::OutputOLENode( const SwOLENode& rOLENode )" );
200  sal_uInt8 *pSpecOLE;
201  sal_uInt8 *pDataAdr;
202  short nSize;
203  static sal_uInt8 aSpecOLE_WW8[] = {
204  0x03, 0x6a, 0, 0, 0, 0, // sprmCPicLocation
205  0x0a, 0x08, 1, // sprmCFOLE2
206  0x56, 0x08, 1 // sprmCFObj
207  };
208 
209  pSpecOLE = aSpecOLE_WW8;
210  nSize = sizeof( aSpecOLE_WW8 );
211  pDataAdr = pSpecOLE + 2; //WW6 sprm is 1 but has 1 byte len as well.
212 
214 
215  if( !xObjStg.is() )
216  return;
217 
218  uno::Reference < embed::XEmbeddedObject > xObj(const_cast<SwOLENode&>(rOLENode).GetOLEObj().GetOleRef());
219  if( !xObj.is() )
220  return;
221 
222  const embed::XEmbeddedObject *pObj = xObj.get();
223  //Don't want to use pointer ids, as is traditional, because we need
224  //to put this into a 32bit value, and on 64bit the bottom bits
225  //might collide and two unrelated ole objects end up considered the
226  //same. Don't want to simply start at 0 which is a special value
227  sal_Int32 nPictureId = SAL_MAX_INT32 - m_aOleMap.size();
228  WW8OleMap::value_type entry = std::make_pair(pObj, nPictureId);
229  std::pair<WW8OleMap::iterator, bool> aRes = m_aOleMap.insert(entry);
230  bool bIsNotDuplicate = aRes.second; //.second is false when element already existed
231  nPictureId = aRes.first->second;
232  Set_UInt32(pDataAdr, nPictureId);
233  OUString sStorageName = "_" + OUString::number( nPictureId );
234  tools::SvRef<SotStorage> xOleStg = xObjStg->OpenSotStorage( sStorageName );
235  if( !xOleStg.is() )
236  return;
237 
238  /*
239  If this object storage has been written already don't
240  waste time rewriting it
241  */
242  if (bIsNotDuplicate)
243  {
244  sal_Int64 nAspect = rOLENode.GetAspect();
245  svt::EmbeddedObjectRef aObjRef( xObj, nAspect );
246  m_pOLEExp->ExportOLEObject( aObjRef, *xOleStg );
247  if ( nAspect == embed::Aspects::MSOLE_ICON )
248  {
249  OUString aObjInfo( "\3ObjInfo" );
250  if ( !xOleStg->IsStream( aObjInfo ) )
251  {
252  const sal_uInt8 pObjInfoData[] = { 0x40, 0x00, 0x03, 0x00 };
253  tools::SvRef<SotStorageStream> rObjInfoStream = xOleStg->OpenSotStream( aObjInfo );
254  if ( rObjInfoStream.is() && !rObjInfoStream->GetError() )
255  {
256  rObjInfoStream->WriteBytes(pObjInfoData, sizeof(pObjInfoData));
257  xOleStg->Commit();
258  }
259  }
260  }
261  }
262 
263  // write as embedded field - the other things will be done
264  // in the escher export
265  OUString sServer = FieldString(ww::eEMBED) + xOleStg->GetUserName() + " ";
266 
267  OutputField(nullptr, ww::eEMBED, sServer, FieldFlags::Start |
269 
270  m_pChpPlc->AppendFkpEntry( Strm().Tell(),
271  nSize, pSpecOLE );
272 
273  bool bEndCR = true;
274  /*
275  In the word filter we only need a preview image for
276  floating images, and then only (the usual case) if the
277  object doesn't contain enough information to reconstruct
278  what we need.
279 
280  We don't need a graphic for inline objects, so we don't
281  even need the overhead of a graphic in that case.
282  */
283  bool bGraphicNeeded = false;
284 
285  if (m_pParentFrame)
286  {
287  bGraphicNeeded = true;
288 
289  if (m_pParentFrame->IsInline())
290  {
291  const SwAttrSet& rSet =
293  bEndCR = false;
294  bGraphicNeeded = TestOleNeedsGraphic(rSet,
295  xOleStg, xObjStg, sStorageName, const_cast<SwOLENode*>(&rOLENode));
296  }
297  }
298 
299  if (!bGraphicNeeded)
300  WriteChar(0x1);
301  else
302  {
303  /*
304  ##897##
305  We need to insert the graphic representation of
306  this object for the inline case, otherwise word
307  has no place to find the dimensions of the ole
308  object, and will not be able to draw it
309  */
311  }
312 
313  OutputField(nullptr, ww::eEMBED, OUString(),
315 
316  if (bEndCR) //No newline in inline case
317  WriteCR();
318 }
319 
320 void WW8Export::OutputLinkedOLE( const OUString& rOleId )
321 {
322  uno::Reference< embed::XStorage > xDocStg = m_pDoc->GetDocStorage();
323  uno::Reference< embed::XStorage > xOleStg = xDocStg->openStorageElement( "OLELinks", embed::ElementModes::READ );
324  tools::SvRef<SotStorage> xObjSrc = SotStorage::OpenOLEStorage( xOleStg, rOleId, StreamMode::READ );
325 
327 
328  if( !(xObjStg.is() && xObjSrc.is()) )
329  return;
330 
331  tools::SvRef<SotStorage> xOleDst = xObjStg->OpenSotStorage( rOleId );
332  if ( xOleDst.is() )
333  xObjSrc->CopyTo( xOleDst.get() );
334 
335  if ( xOleDst->GetError( ) )
336  return;
337 
338  xOleDst->Commit();
339 
340  // Output the cPicLocation attribute
341  std::unique_ptr<ww::bytes> pBuf( new ww::bytes );
343  SwWW8Writer::InsUInt32( *pBuf, rOleId.copy( 1 ).toInt32() );
344 
346  pBuf->push_back( 1 );
347 
349  pBuf->push_back( 1 );
350 
352  pBuf->push_back( 1 );
353 
354  m_pChpPlc->AppendFkpEntry( Strm().Tell(), pBuf->size(), pBuf->data() );
355 }
356 
357 void WW8Export::OutGrf(const ww8::Frame &rFrame)
358 {
359  //Added for i120568,the hyperlink info within a graphic whose anchor type is "As character"
360  //will be exported to ensure the fidelity
361  const SwFormatURL& rURL = rFrame.GetFrameFormat().GetAttrSet().GetURL();
362  bool bURLStarted = false;
363  if( !rURL.GetURL().isEmpty() && rFrame.GetWriterType() == ww8::Frame::eGraphic)
364  {
365  bURLStarted = true;
366  m_pAttrOutput->StartURL( rURL.GetURL(), rURL.GetTargetFrameName() );
367  }
368 
369  // Store the graphic settings in GrfNode so they may be written-out later
370  m_pGrf->Insert(rFrame);
371 
372  m_pChpPlc->AppendFkpEntry( Strm().Tell(), pO->size(), pO->data() );
373  pO->clear();
374 
375  // #i29408#
376  // linked, as-character anchored graphics have to be exported as fields.
377  const SwGrfNode* pGrfNd = rFrame.IsInline() && rFrame.GetContent()
378  ? rFrame.GetContent()->GetGrfNode() : nullptr;
379  if ( pGrfNd && pGrfNd->IsLinkedFile() )
380  {
381  OUString sStr;
382  pGrfNd->GetFileFilterNms(&sStr, nullptr);
383  sStr = FieldString(ww::eINCLUDEPICTURE) + " \"" + sStr + "\" \\d";
384 
385  OutputField( nullptr, ww::eINCLUDEPICTURE, sStr,
387  }
388 
389  WriteChar( char(1) ); // paste graphic symbols in the main text
390 
391  sal_uInt8 aArr[ 18 ];
392  sal_uInt8* pArr = aArr;
393 
394  const SwFrameFormat &rFlyFormat = rFrame.GetFrameFormat();
395  const RndStdIds eAn = rFlyFormat.GetAttrSet().GetAnchor(false).GetAnchorId();
396  if (eAn == RndStdIds::FLY_AS_CHAR)
397  {
398  sal_Int16 eVert = rFlyFormat.GetVertOrient().GetVertOrient();
399  if ((eVert == text::VertOrientation::CHAR_CENTER) || (eVert == text::VertOrientation::LINE_CENTER))
400  {
401  bool bVert = false;
402  //The default for word in vertical text mode is to center,
403  //otherwise a sub/super script hack is employed
404  if (dynamic_cast< const SwContentNode *>( m_pOutFormatNode ) )
405  {
406  const SwTextNode* pTextNd = static_cast<const SwTextNode*>(m_pOutFormatNode);
407  SwPosition aPos(*pTextNd);
408  bVert = m_pDoc->IsInVerticalText(aPos);
409  }
410  if (!bVert)
411  {
412  SwTwips nHeight = rFlyFormat.GetFrameSize().GetHeight();
413  nHeight/=20; //nHeight was in twips, want it in half points, but
414  //then half of total height.
415  long nFontHeight = GetItem(RES_CHRATR_FONTSIZE).GetHeight();
416  nHeight-=nFontHeight/20;
417 
419  Set_UInt16( pArr, - static_cast<sal_Int16>(nHeight));
420  }
421  }
422  }
423 
424  // sprmCFSpec
425  Set_UInt16( pArr, 0x855 );
426  Set_UInt8( pArr, 1 );
427 
428  // sprmCPicLocation
430  Set_UInt32( pArr, GRF_MAGIC_321 );
431 
432  // vary Magic, so that different graphic attributes will not be merged
433  static sal_uInt8 nAttrMagicIdx = 0;
434  --pArr;
435  Set_UInt8( pArr, nAttrMagicIdx++ );
436  m_pChpPlc->AppendFkpEntry( Strm().Tell(), static_cast< short >(pArr - aArr), aArr );
437 
438  // #i75464#
439  // Check, if graphic isn't exported as-character anchored.
440  // Otherwise, an additional paragraph is exported for a graphic, which is
441  // forced to be treated as inline, because it's anchored inside another frame.
442  if ( !rFrame.IsInline() &&
443  ( (eAn == RndStdIds::FLY_AT_PARA) ||
444  (eAn == RndStdIds::FLY_AT_PAGE) ) )
445  {
446  WriteChar( char(0x0d) ); // close the surrounding frame with CR
447 
448  static sal_uInt8 nSty[2] = { 0, 0 };
449  pO->insert( pO->end(), nSty, nSty+2 ); // Style #0
450  bool bOldGrf = m_bOutGrf;
451  m_bOutGrf = true;
452 
453  OutputFormat( rFrame.GetFrameFormat(), false, false, true ); // Fly-Attrs
454 
455  m_bOutGrf = bOldGrf;
456  m_pPapPlc->AppendFkpEntry( Strm().Tell(), pO->size(), pO->data() );
457  pO->clear();
458  }
459  // #i29408#
460  // linked, as-character anchored graphics have to be exported as fields.
461  else if ( pGrfNd && pGrfNd->IsLinkedFile() )
462  {
463  OutputField( nullptr, ww::eINCLUDEPICTURE, OUString(), FieldFlags::Close );
464  }
465  //Added for i120568,the hyperlink info within a graphic whose anchor type is
466  //"As character" will be exported to ensure the fidelity
467  if( bURLStarted )
468  m_pAttrOutput->EndURL(false);
469 }
470 
472 {
473  const Size aSize( rFly.GetLayoutSize() );
474  const sal_uInt16 nWidth = static_cast< sal_uInt16 >(aSize.Width());
475  const sal_uInt16 nHeight = static_cast< sal_uInt16 >(aSize.Height());
476  maDetails.emplace_back(rFly, nWidth, nHeight);
477 }
478 
480  sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight, const SwAttrSet* pAttrSet)
481 {
482  sal_Int16 nXSizeAdd = 0, nYSizeAdd = 0;
483  sal_Int16 nCropL = 0, nCropR = 0, nCropT = 0, nCropB = 0;
484 
485  // write Crop-Attribute content in Header ( if available )
486  const SfxPoolItem* pItem;
487  if (pAttrSet && (SfxItemState::SET
488  == pAttrSet->GetItemState(RES_GRFATR_CROPGRF, false, &pItem)))
489  {
490  const SwCropGrf& rCr = *static_cast<const SwCropGrf*>(pItem);
491  nCropL = static_cast<sal_Int16>(rCr.GetLeft());
492  nCropR = static_cast<sal_Int16>(rCr.GetRight());
493  nCropT = static_cast<sal_Int16>(rCr.GetTop());
494  nCropB = static_cast<sal_Int16>(rCr.GetBottom());
495  nXSizeAdd = nXSizeAdd - static_cast<sal_Int16>( rCr.GetLeft() + rCr.GetRight() );
496  nYSizeAdd = nYSizeAdd - static_cast<sal_Int16>( rCr.GetTop() + rCr.GetBottom() );
497  }
498 
499  Size aGrTwipSz(rFly.GetSize());
500  sal_uInt16 nHdrLen = 0x44;
501 
502  sal_uInt8 aArr[ 0x44 ] = { 0 };
503 
504  sal_uInt8* pArr = aArr + 0x2E; // Do borders first
505 
506  const SwAttrSet& rAttrSet = rFly.GetFrameFormat().GetAttrSet();
507  if (SfxItemState::SET == rAttrSet.GetItemState(RES_BOX, false, &pItem))
508  {
509  const SvxBoxItem* pBox = static_cast<const SvxBoxItem*>(pItem);
510  if( pBox )
511  {
512  bool bShadow = false; // Shadow ?
513  if (const SvxShadowItem* pSI = rAttrSet.GetItem<SvxShadowItem>(RES_SHADOW))
514  {
515  bShadow = (pSI->GetLocation() != SvxShadowLocation::NONE) &&
516  (pSI->GetWidth() != 0);
517  }
518 
519  static const SvxBoxItemLine aLnArr[4] = { SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT,
520  SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT };
521  for(const SvxBoxItemLine & i : aLnArr)
522  {
523  const ::editeng::SvxBorderLine* pLn = pBox->GetLine( i );
524  WW8_BRC aBrc;
525  if (pLn)
526  {
528  pBox->GetDistance( i ), bShadow );
530  aBrc90.cv()));
531  aBrc = WW8_BRC(aBrc90.dptLineWidth(), aBrc90.brcType(), ico,
532  aBrc90.dptSpace(), aBrc90.fShadow(), aBrc90.fFrame());
533  }
534 
535  // use importer logic to determine how large the exported
536  // border will really be in word and adjust accordingly
537  short nSpacing;
538  short nThick = aBrc.DetermineBorderProperties(&nSpacing);
539  switch (i)
540  {
541  case SvxBoxItemLine::TOP:
542  case SvxBoxItemLine::BOTTOM:
543  nHeight -= bShadow ? nThick*2 : nThick;
544  nHeight = nHeight - nSpacing;
545  break;
546  case SvxBoxItemLine::LEFT:
547  case SvxBoxItemLine::RIGHT:
548  default:
549  nWidth -= bShadow ? nThick*2 : nThick;
550  nWidth = nWidth - nSpacing;
551  break;
552  }
553  memcpy( pArr, &aBrc.aBits1, 2);
554  pArr+=2;
555 
556  memcpy( pArr, &aBrc.aBits2, 2);
557  pArr+=2;
558  }
559  }
560  }
561 
562  pArr = aArr + 4; // skip lcb
563  Set_UInt16( pArr, nHdrLen ); // set cbHeader
564 
565  Set_UInt16( pArr, mm ); // set mm
566 
567  /*
568  Just in case our original size is too big to fit inside a ushort we can
569  substitute the final size and lose on retaining the scaling factor but
570  still keep the correct display size anyway.
571  */
572  const bool bIsSubstitutedSize = (aGrTwipSz.Width() > SHRT_MAX) || (aGrTwipSz.Height() > SHRT_MAX) ||
573  aGrTwipSz.IsEmpty();
574  if ( bIsSubstitutedSize )
575  {
576  aGrTwipSz.setWidth( nWidth );
577  aGrTwipSz.setHeight( nHeight );
578  }
579  using namespace sw::types;
580  // set xExt & yExt
581  Set_UInt16(pArr, msword_cast<sal_uInt16>(convertTwipToMm100(aGrTwipSz.Width())));
582  Set_UInt16(pArr, msword_cast<sal_uInt16>(convertTwipToMm100(aGrTwipSz.Height())));
583  pArr += 16;
584  // skip hMF & rcWinMF
585  // set dxaGoal & dyaGoal
586  Set_UInt16(pArr, msword_cast<sal_uInt16>(aGrTwipSz.Width()));
587  Set_UInt16(pArr, msword_cast<sal_uInt16>(aGrTwipSz.Height()));
588 
589  if ( aGrTwipSz.Width() + nXSizeAdd ) // set mx
590  {
591  if ( !bIsSubstitutedSize )
592  {
593  const double fVal = nWidth * 1000.0 / (aGrTwipSz.Width() + nXSizeAdd );
594  Set_UInt16( pArr, static_cast<sal_uInt16>(::rtl::math::round(fVal)) );
595  }
596  else
597  {
598  Set_UInt16( pArr, 1000 );
599  }
600  }
601  else
602  {
603  pArr += 2;
604  }
605 
606  if ( aGrTwipSz.Height() + nYSizeAdd ) // set my
607  {
608  if ( !bIsSubstitutedSize )
609  {
610  const double fVal = nHeight * 1000.0 / (aGrTwipSz.Height() + nYSizeAdd);
611  Set_UInt16( pArr, static_cast<sal_uInt16>(::rtl::math::round(fVal)) );
612  }
613  else
614  {
615  Set_UInt16( pArr, 1000 );
616  }
617  }
618  else
619  {
620  pArr += 2;
621  }
622 
623  if ( !bIsSubstitutedSize )
624  {
625  Set_UInt16( pArr, nCropL ); // set dxaCropLeft
626  Set_UInt16( pArr, nCropT ); // set dyaCropTop
627  Set_UInt16( pArr, nCropR ); // set dxaCropRight
628  Set_UInt16( pArr, nCropB ); // set dyaCropBottom
629  }
630 
631  rStrm.WriteBytes(aArr, nHdrLen);
632 }
633 
635  const ww8::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight)
636 {
637  if (rGrfNd.IsLinkedFile()) // Linked File
638  {
639  OUString aFileN;
640  rGrfNd.GetFileFilterNms( &aFileN, nullptr );
641 
642  sal_uInt16 const mm = 94; // 94 = BMP, GIF
643 
644  WritePICFHeader(rStrm, rFly, mm, nWidth, nHeight,
645  rGrfNd.GetpSwAttrSet());
646  rStrm.WriteUChar( aFileN.getLength() ); // write Pascal-String
647  SwWW8Writer::WriteString8(rStrm, aFileN, false,
648  RTL_TEXTENCODING_MS_1252);
649  }
650  else // Embedded File or DDE or something like that
651  {
652  WritePICFHeader(rStrm, rFly, 0x64, nWidth, nHeight,
653  rGrfNd.GetpSwAttrSet());
654  SwBasicEscherEx aInlineEscher(&rStrm, rWrt);
655  aInlineEscher.WriteGrfFlyFrame(rFly.GetFrameFormat(), 0x401);
656  aInlineEscher.WritePictures();
657  }
658 }
659 //For i120928,export graphic info of bullet
661  sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight)
662 {
663  sal_Int16 nXSizeAdd = 0, nYSizeAdd = 0;
664 
665  Size aGrTwipSz(rGrf.GetPrefSize());
666  sal_uInt16 nHdrLen = 0x44;
667 
668  sal_uInt8 aArr[ 0x44 ] = { 0 };
669 
670  sal_uInt8* pArr = aArr + 0x2E; //Do borders first
671 
672  static const SvxBoxItemLine aLnArr[4] = { SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT,
673  SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT };
674  for(const SvxBoxItemLine & i : aLnArr)
675  {
676  WW8_BRC aBrc;
677 
678  short nSpacing;
679  short nThick = aBrc.DetermineBorderProperties(&nSpacing);
680  switch (i)
681  {
682  case SvxBoxItemLine::TOP:
683  case SvxBoxItemLine::BOTTOM:
684  nHeight -= nThick;
685  nHeight = nHeight - nSpacing;
686  break;
687  case SvxBoxItemLine::LEFT:
688  case SvxBoxItemLine::RIGHT:
689  default:
690  nWidth -= nThick;
691  nWidth = nWidth - nSpacing;
692  break;
693  }
694  memcpy( pArr, &aBrc.aBits1, 2);
695  pArr+=2;
696 
697  memcpy(pArr, &aBrc.aBits2, 2);
698  pArr+=2;
699  }
700 
701  pArr = aArr + 4; //skip lcb
702  Set_UInt16( pArr, nHdrLen ); // set cbHeader
703 
704  Set_UInt16( pArr, mm ); // set mm
705 
706  if ( (convertTwipToMm100(aGrTwipSz.Width()) > USHRT_MAX ) || ( convertTwipToMm100(aGrTwipSz.Height()) > USHRT_MAX )
707  || aGrTwipSz.IsEmpty() )
708  {
709  aGrTwipSz.setWidth( nWidth );
710  aGrTwipSz.setHeight( nHeight );
711  }
712  using namespace sw::types;
713  // set xExt & yExt
714  Set_UInt16(pArr, msword_cast<sal_uInt16>(convertTwipToMm100(aGrTwipSz.Width())));
715  Set_UInt16(pArr, msword_cast<sal_uInt16>(convertTwipToMm100(aGrTwipSz.Height())));
716  pArr += 16;
717  // skip hMF & rcWinMF
718  // set dxaGoal & dyaGoal
719  Set_UInt16(pArr, msword_cast<sal_uInt16>(aGrTwipSz.Width()));
720  Set_UInt16(pArr, msword_cast<sal_uInt16>(aGrTwipSz.Height()));
721 
722  if( aGrTwipSz.Width() + nXSizeAdd ) // set mx
723  {
724  double fVal = nWidth * 1000.0 / (aGrTwipSz.Width() + nXSizeAdd);
725  Set_UInt16( pArr, static_cast<sal_uInt16>(::rtl::math::round(fVal)) );
726  }
727  else
728  pArr += 2;
729 
730  if( aGrTwipSz.Height() + nYSizeAdd ) // set my
731  {
732  double fVal = nHeight * 1000.0 / (aGrTwipSz.Height() + nYSizeAdd);
733  Set_UInt16( pArr, static_cast<sal_uInt16>(::rtl::math::round(fVal)) );
734  }
735  else
736  pArr += 2;
737 
738  Set_UInt16( pArr, 0 ); // set dxaCropLeft
739  Set_UInt16( pArr, 0 ); // set dyaCropTop
740  Set_UInt16( pArr, 0 ); // set dxaCropRight
741  Set_UInt16( pArr, 0 ); // set dyaCropBottom
742 
743  rStrm.WriteBytes(aArr, nHdrLen);
744 }
745 
746 void SwWW8WrGrf::WriteGrfForBullet(SvStream& rStrm, const Graphic &rGrf, sal_uInt16 nWidth, sal_uInt16 nHeight)
747 {
748  WritePICBulletFHeader(rStrm,rGrf, 0x64,nWidth,nHeight);
749  SwBasicEscherEx aInlineEscher(&rStrm, rWrt);
750  aInlineEscher.WriteGrfBullet(rGrf);
751  aInlineEscher.WritePictures();
752 }
753 
755 {
756  sal_uInt16 nWidth = rItem.mnWid;
757  sal_uInt16 nHeight = rItem.mnHei;
758  sal_uInt32 nPos = rStrm.Tell(); // store start of graphic
759 
760  const ww8::Frame &rFly = rItem.maFly;
761  switch (rFly.GetWriterType())
762  {
764  {
765  const SwNode *pNode = rItem.maFly.GetContent();
766  const SwGrfNode *pNd = pNode ? pNode->GetGrfNode() : nullptr;
767  OSL_ENSURE(pNd, "Impossible");
768  if (pNd)
769  WriteGrfFromGrfNode(rStrm, *pNd, rItem.maFly, nWidth, nHeight);
770  }
771  break;
772  //For i120928,add branch to export graphic of bullet
774  {
775  if (rItem.maFly.HasGraphic())
776  {
777  const Graphic& rGrf = rItem.maFly.GetGraphic();
778  WriteGrfForBullet(rStrm, rGrf, nWidth, nHeight);
779  }
780  }
781  break;
782 
783  case ww8::Frame::eOle:
784  {
785  const SwNode *pNode = rItem.maFly.GetContent();
786  const SwOLENode *pNd = pNode ? pNode->GetOLENode() : nullptr;
787  OSL_ENSURE(pNd, "Impossible");
788  if (pNd)
789  {
790 #ifdef OLE_PREVIEW_AS_EMF
791  //Convert this ole2 preview in ww8+ to an EMF for better unicode
792  //support (note that at this moment this breaks StarSymbol
793  //using graphics because I need to embed starsymbol in exported
794  //documents.
795  WritePICFHeader(rStrm, rFly, 0x64, nWidth, nHeight,
796  pNd->GetpSwAttrSet());
797  SwBasicEscherEx aInlineEscher(&rStrm, rWrt);
798  aInlineEscher.WriteOLEFlyFrame(rFly.GetFrameFormat(), 0x401);
799  aInlineEscher.WritePictures();
800 #else
801  // cast away const
802  SwOLENode *pOleNd = const_cast<SwOLENode*>(pNd);
803  SwOLEObj& rSObj= pOleNd->GetOLEObj();
804 
805  // TODO/LATER: do we need to load object?
806  Graphic* pGr = SdrOle2Obj::GetGraphicFromObject( pOleNd->GetDoc()->GetDocStorage(), rObj );
807 
808  //TODO/LATER: do we really want to use GDIMetafile?!
809  GDIMetaFile aMtf;
810  if ( pGr )
811  aMtf = pGr->GetGDIMetaFile();
812 
813  Size aS(aMtf.GetPrefSize());
814  aMtf.WindStart();
815  aMtf.Play(Application::GetDefaultDevice(), Point(0, 0),
816  Size(2880, 2880));
817 
818  WritePICFHeader(rStrm, rFly, 8, nWidth, nHeight,
819  pNd->GetpSwAttrSet());
820  WriteWindowMetafileBits(rStrm, aMtf);
821  delete pGr;
822 #endif
823  }
824  }
825  break;
829  /*
830  #i3958# We only export an empty dummy picture frame here, this is
831  what word does the escher export should contain an anchored to
832  character element which is drawn over this dummy and the whole
833  shebang surrounded with a SHAPE field. This isn't *my* hack :-),
834  it's what word does.
835  */
836  {
837  WritePICFHeader(rStrm, rFly, 0x64, nWidth, nHeight);
838  SwBasicEscherEx aInlineEscher(&rStrm, rWrt);
839  aInlineEscher.WriteEmptyFlyFrame(rFly.GetFrameFormat(), 0x401);
840  }
841  break;
842  default:
843  OSL_ENSURE(false, "Some inline export not implemented");
844  break;
845  }
846 
847  sal_uInt32 nPos2 = rStrm.Tell(); // store the end
848  rStrm.Seek( nPos );
849  rStrm.WriteUInt32(nPos2 - nPos); // patch graphic length in the header
850  rStrm.Seek( nPos2 ); // restore Pos
851 }
852 
853 // SwWW8WrGrf::Write() is called after the text.
854 // It writes out all the graphics and remembers the file locations of the graphics,
855 // so when writing the attributes of the items it can be patched into PicLocFc-SPRMs.
856 // The search in the attributes for the Magic sal_uLong and patching
857 // happens when writing the attributes. Class SwWW8WrGrf provides with
858 // GetFPos() sequentially the positions
860 {
862  auto aEnd = maDetails.end();
863  for (auto aIter = maDetails.begin(); aIter != aEnd; ++aIter)
864  {
865  sal_uInt32 nPos = rStrm.Tell(); // align to 4 Bytes
866  if( nPos & 0x3 )
867  SwWW8Writer::FillCount( rStrm, 4 - ( nPos & 0x3 ) );
868 
869  auto aIter2 = std::find(maDetails.begin(), aIter, *aIter);
870  if (aIter2 != aIter)
871  {
872  aIter->mnPos = aIter2->mnPos;
873  }
874  else
875  {
876  aIter->mnPos = rStrm.Tell();
877  WriteGraphicNode(rStrm, *aIter);
878  }
879  }
880 }
881 
882 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::embed::XStorage > GetDocStorage()
Definition: docnew.cxx:606
constexpr TypedWhichId< SwCropGrf > RES_GRFATR_CROPGRF(132)
bool is() const
static void InsUInt32(ww::bytes &rO, sal_uInt32 n)
Definition: wrtww8.cxx:1736
const OUString & GetBaseURL() const
Definition: shellio.hxx:439
sal_Int64 GetAspect() const
Definition: ndole.hxx:136
sal_uInt8 brcType() const
Definition: ww8struc.hxx:325
SVBT16 aBits1
Definition: ww8struc.hxx:263
std::unique_ptr< ww::bytes > pO
Buffer.
Definition: wrtww8.hxx:986
std::unique_ptr< SvxMSExportOLEObjects > m_pOLEExp
Definition: wrtww8.hxx:473
Marks a position in the document model.
Definition: pam.hxx:35
sal_Int32 GetLeft() const
ErrCode ImportGraphic(Graphic &rGraphic, const INetURLObject &rPath, sal_uInt16 nFormat=GRFILTER_FORMAT_DONTKNOW, sal_uInt16 *pDeterminedFormat=nullptr, GraphicFilterImportFlags nImportFlags=GraphicFilterImportFlags::NONE)
std::unique_ptr< WW8Fib > pFib
File Information Block.
Definition: wrtww8.hxx:990
const SfxPoolItem & GetItem(sal_uInt16 nWhich) const
Definition: wrtww8.cxx:799
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
static SdrOle2Obj * CreateSdrOLEFromStorage(SdrModel &rSdrModel, const OUString &rStorageName, tools::SvRef< SotStorage > const &rSrcStorage, const css::uno::Reference< css::embed::XStorage > &xDestStg, const Graphic &rGraf, const tools::Rectangle &rBoundRect, const tools::Rectangle &rVisArea, SvStream *pDataStrrm, ErrCode &rError, sal_uInt32 nConvertFlags, sal_Int64 nAspect, OUString const &rBaseURL)
SwOLENode * GetOLENode()
Inline methods from Node.hxx.
Definition: ndole.hxx:161
const SwOLEObj & GetOLEObj() const
Definition: ndole.hxx:112
OUString GetUserName()
bool HasGraphic() const
const SwFormatVertOrient & GetVertOrient(bool=true) const
Definition: fmtornt.hxx:106
const SwFormatURL & GetURL(bool=true) const
Definition: fmturl.hxx:75
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
std::vector< sal_uInt8 > bytes
Definition: types.hxx:29
ErrCode GetError() const
sal_uInt8 TransColToIco(const Color &rCol)
static void WriteString8(SvStream &rStrm, const OUString &rStr, bool bAddZero, rtl_TextEncoding eCodeSet)
Definition: wrtww8.cxx:1786
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
const SwFormatAnchor & GetAnchor(bool=true) const
Definition: fmtanchr.hxx:78
static void WritePICBulletFHeader(SvStream &rStrm, const Graphic &rGrf, sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight)
Definition: wrtww8gr.cxx:660
css::uno::Reference< css::embed::XEmbeddedObject > const & GetOleRef()
Definition: ndole.cxx:913
static SotStorage * OpenOLEStorage(css::uno::Reference< css::embed::XStorage > const &xStorage, OUString const &rEleName, StreamMode=StreamMode::STD_READWRITE)
sal_uInt16 GetDistance(SvxBoxItemLine nLine) const
bool IsLinkedFile() const
Definition: ndgrf.hxx:163
sal_uInt64 Seek(sal_uInt64 nPos)
long SwTwips
Definition: swtypes.hxx:49
bool IsStream(const OUString &rEleName) const
void Set_UInt32(sal_uInt8 *&p, sal_uInt32 n)
Definition: ww8struc.hxx:53
static constexpr sal_uInt16 val
Definition: sprmids.hxx:277
static void Free(SdrObject *&_rpObject)
bool WriteWindowMetafileBits(SvStream &rStream, const GDIMetaFile &rMTF)
OUString FieldString(ww::eField eIndex)
Definition: ww8atr.cxx:2576
bool Commit()
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
Definition: doc.cxx:154
static OutputDevice * GetDefaultDevice()
static void WritePICFHeader(SvStream &rStrm, const ww8::Frame &rFly, sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight, const SwAttrSet *pAttrSet=nullptr)
Definition: wrtww8gr.cxx:479
constexpr TypedWhichId< SwFormatVertOrient > RES_VERT_ORIENT(102)
const SfxPoolItem * NextItem()
virtual void OutputOLENode(const SwOLENode &) override
Output SwOLENode.
Definition: wrtww8gr.cxx:197
SotStorage * OpenSotStorage(const OUString &rEleName, StreamMode=StreamMode::STD_READWRITE, bool transacted=true)
virtual void OutputField(const SwField *pField, ww::eField eFieldType, const OUString &rFieldCmd, FieldFlags nMode=FieldFlags::All) override
Write the field.
Definition: ww8atr.cxx:1722
static std::unique_ptr< SvStream > CreateStream(const OUString &rFileName, StreamMode eOpenMode, css::uno::Reference< css::awt::XWindow > xParentWin=nullptr)
bool fFrame() const
Definition: ww8struc.hxx:331
void OutputFormat(const SwFormat &rFormat, bool bPapFormat, bool bChpFormat, bool bFlyFormat=false)
Output attributes.
Definition: ww8atr.cxx:747
sal_uInt32 cv() const
Definition: ww8struc.hxx:321
bool IsInVerticalText(const SwPosition &rPos) const
Definition: doclay.cxx:1664
sal_uInt8 dptSpace() const
Definition: ww8struc.hxx:327
const Size & GetLayoutSize() const
The layout size of the contained element.
WW8Export & rWrt
for access to the variables
Definition: wrtww8.hxx:1401
bool CopyTo(SotStorage *pDestStg)
const GDIMetaFile & GetGDIMetaFile() const
SvStream & WriteUInt32(sal_uInt32 nUInt32)
short DetermineBorderProperties(short *pSpace) const
Definition: ww8scan.cxx:1363
void Set_UInt16(sal_uInt8 *&p, sal_uInt16 n)
Definition: ww8struc.hxx:47
const editeng::SvxBorderLine * GetLine(SvxBoxItemLine nLine) const
void OutGrf(const ww8::Frame &rFrame)
Definition: wrtww8gr.cxx:357
static WW8_BRCVer9 TranslateBorderLine(const ::editeng::SvxBorderLine &pLine, sal_uInt16 nDist, bool bShadow)
Definition: ww8atr.cxx:4257
void WriteChar(sal_Unicode c) override
Definition: wrtww8.cxx:1892
bool GetFileFilterNms(OUString *pFileNm, OUString *pFilterNm) const
Definition: ndgrf.cxx:484
void WriteGraphicNode(SvStream &rStrm, const GraphicDetails &rItem)
Definition: wrtww8gr.cxx:754
void WriteGrfBullet(const Graphic &)
Definition: wrtw8esh.cxx:1566
sal_uInt32 BGRToRGB(sal_uInt32 nColour)
const SwFrameFormat & GetFrameFormat() const
Get the writer SwFrameFormat that this object describes.
sal_uInt16 mnWid
Definition: wrtww8.hxx:1380
std::vector< GraphicDetails > maDetails
Definition: wrtww8.hxx:1403
const char aObjectPool[]
Definition: ww8scan.hxx:44
const SwAttrSet * GetpSwAttrSet() const
Definition: node.hxx:443
std::unique_ptr< WW8_WrPlcPn > m_pPapPlc
Definition: wrtww8.hxx:495
T * get() const
static sal_uInt8 nAttrMagicIdx
Definition: wrtww8.cxx:1619
Style of a layout element.
Definition: frmfmt.hxx:57
#define SAL_MAX_INT32
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
int i
SotStorageStream * OpenSotStream(const OUString &rEleName, StreamMode=StreamMode::STD_READWRITE)
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:65
const SwModify * m_pOutFormatNode
Definition: wrtww8.hxx:534
void WriteGrfFromGrfNode(SvStream &rStrm, const SwGrfNode &rNd, const ww8::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight)
Definition: wrtww8gr.cxx:634
const SvxPageUsage aArr[]
const ww8::Frame * m_pParentFrame
Definition: wrtww8.hxx:515
SwDoc * GetDoc()
Definition: node.hxx:702
eINCLUDEPICTURE
std::size_t WriteBytes(const void *pData, std::size_t nSize)
const Graphic & GetGraphic() const
virtual void WriteCR(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner=ww8::WW8TableNodeInfoInner::Pointer_t()) override
Definition: wrtww8.cxx:1882
SwWW8Writer & GetWriter() const
Definition: wrtww8.hxx:1174
WW8OleMap m_aOleMap
Definition: wrtww8.hxx:475
constexpr TypedWhichId< SwFormatContent > RES_CNTNT(95)
SVBT16 aBits2
Definition: ww8struc.hxx:264
SwWW8Writer * m_pWriter
Pointer to the writer.
Definition: wrtww8.hxx:999
sal_uInt8 dptLineWidth() const
Definition: ww8struc.hxx:323
Size GetPrefSize() const
sal_Int32 GetBottom() const
virtual void OutputGrfNode(const SwGrfNode &) override
Output SwGrfNode.
Definition: wrtww8gr.cxx:75
const SwNode * GetContent() const
Get the first node of content in the frame.
sal_Int32 GetTop() const
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:80
SotStorage & GetStorage() const
Definition: shellio.hxx:494
constexpr sal_Int64 convertTwipToMm100(sal_Int64 n)
static bool ImportOleWMF(const tools::SvRef< SotStorage > &xSrc1, GDIMetaFile &rWMF, long &rX, long &rY)
Definition: ww8par4.cxx:304
SvStream & Strm() const
Definition: wrtww8.hxx:1175
#define ERRCODE_NONE
unsigned char sal_uInt8
Make exporting a Writer Frame easy.
std::unique_ptr< SwWW8WrGrf > m_pGrf
Definition: wrtww8.hxx:532
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:254
const OUString & GetTargetFrameName() const
Definition: fmturl.hxx:65
virtual void WritePictures()
Definition: wrtw8esh.cxx:2185
#define GRF_MAGIC_321
Definition: wrtww8.hxx:134
#define SAL_INFO(area, stream)
SvStream & WriteUChar(unsigned char nChar)
SvStream * pDataStrm
Streams for WW97 Export.
Definition: wrtww8.hxx:988
const Size & GetSize() const
The Size of the contained element.
virtual SwDrawModel * GetOrCreateDrawModel()=0
virtual void OutputLinkedOLE(const OUString &) override
Definition: wrtww8gr.cxx:320
SvxBoxItemLine
sal_uInt64 Tell() const
void WriteEmptyFlyFrame(const SwFrameFormat &rFormat, sal_uInt32 nShapeId)
Definition: wrtw8esh.cxx:1532
bool TestOleNeedsGraphic(const SwAttrSet &rSet, tools::SvRef< SotStorage > const &xOleStg, const tools::SvRef< SotStorage > &xObjStg, OUString const &rStorageName, SwOLENode *pOLENd)
Definition: wrtww8gr.cxx:86
sal_Int16 GetVertOrient() const
Definition: fmtornt.hxx:54
static void InsUInt16(ww::bytes &rO, sal_uInt16 n)
Definition: wrtww8.cxx:1728
constexpr TypedWhichId< SvxBoxItem > RES_BOX(106)
const SwFormatFrameSize & GetFrameSize(bool=true) const
Definition: fmtfsize.hxx:104
void Write()
Definition: wrtww8gr.cxx:859
sal_Int32 GetRight() const
sal_uInt16 mnHei
Definition: wrtww8.hxx:1381
static GraphicFilter & GetGraphicFilter()
void Insert(const ww8::Frame &rFly)
Definition: wrtww8gr.cxx:471
void Set_UInt8(sal_uInt8 *&p, sal_uInt8 n)
Definition: ww8struc.hxx:41
RndStdIds
bool IsInline() const
Is this frame inline (as character)
WriterSource GetWriterType() const
Get the type of frame that this wraps.
ww8::Frame maFly
Definition: wrtww8.hxx:1378
SwGrfNode * GetGrfNode()
Definition: ndgrf.hxx:153
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:116
long GetHeight() const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
void SvStream & rStrm
void WriteGrfForBullet(SvStream &rStrm, const Graphic &rGrf, sal_uInt16 nWidth, sal_uInt16 nHeight)
Definition: wrtww8gr.cxx:746
static void FillCount(SvStream &rStrm, sal_uLong nCount)
Definition: wrtww8.cxx:950
std::unique_ptr< WW8_WrPlcPn > m_pChpPlc
Definition: wrtww8.hxx:496
constexpr TypedWhichId< SvxShadowItem > RES_SHADOW(107)
SwDoc * m_pDoc
Definition: wrtww8.hxx:571
sal_uInt16 nPos
const SfxPoolItem * GetCurItem() const
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(104)
const OUString & GetURL() const
Definition: fmturl.hxx:66
bool fShadow() const
Definition: ww8struc.hxx:329
Base class of the Writer document model elements.
Definition: node.hxx:79
std::unique_ptr< WW8AttributeOutput > m_pAttrOutput
Converting attributes to stream data.
Definition: wrtww8.hxx:1000