LibreOffice Module vcl (master)  1
pdfextoutdevdata.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 <vcl/canvastools.hxx>
21 #include <vcl/pdfextoutdevdata.hxx>
22 #include <vcl/graph.hxx>
23 #include <vcl/outdev.hxx>
24 #include <vcl/gfxlink.hxx>
25 #include <vcl/metaact.hxx>
26 #include <vcl/graphicfilter.hxx>
29 #include <sal/log.hxx>
30 #include <osl/diagnose.h>
31 #include <tools/stream.hxx>
32 
33 #include <memory>
34 #include <map>
35 
36 namespace vcl
37 {
38 namespace {
39 
40 struct PDFExtOutDevDataSync
41 {
42  enum Action{ CreateNamedDest,
43  CreateDest,
44  CreateLink,
45  CreateScreen,
46  SetLinkDest,
47  SetLinkURL,
48  SetScreenURL,
49  SetScreenStream,
50  RegisterDest,
51  CreateOutlineItem,
52  CreateNote,
53  SetPageTransition,
54 
55  BeginStructureElement,
56  EndStructureElement,
57  SetCurrentStructureElement,
58  SetStructureAttribute,
59  SetStructureAttributeNumerical,
60  SetStructureBoundingBox,
61  SetActualText,
62  SetAlternateText,
63  CreateControl,
64  BeginGroup,
65  EndGroupGfxLink
66  };
67 
68  sal_uInt32 nIdx;
69  Action eAct;
70 };
71 
72 struct PDFLinkDestination
73 {
74  tools::Rectangle mRect;
75  MapMode mMapMode;
76  sal_Int32 mPageNr;
77  PDFWriter::DestAreaType mAreaType;
78 };
79 
80 }
81 
83 {
84  std::deque< PDFExtOutDevDataSync::Action > mActions;
85  std::deque< MapMode > mParaMapModes;
86  std::deque< tools::Rectangle > mParaRects;
87  std::deque< sal_Int32 > mParaInts;
88  std::deque< sal_uInt32 > mParauInts;
89  std::deque< OUString > mParaOUStrings;
90  std::deque< PDFWriter::DestAreaType > mParaDestAreaTypes;
91  std::deque< PDFNote > mParaPDFNotes;
92  std::deque< PDFWriter::PageTransition > mParaPageTransitions;
93  ::std::map< sal_Int32, PDFLinkDestination > mFutureDestinations;
94 
95  sal_Int32 GetMappedId();
96  sal_Int32 GetMappedStructId( sal_Int32 );
97 
98  sal_Int32 mCurId;
99  std::vector< sal_Int32 > mParaIds;
100  std::vector< sal_Int32 > mStructIdMap;
101 
103  std::vector< sal_Int32 > mStructParents;
105  mCurId ( 0 ),
106  mCurrentStructElement( 0 )
107  {
108  mStructParents.push_back( 0 );
109  mStructIdMap.push_back( 0 );
110  }
111  void PlayGlobalActions( PDFWriter& rWriter );
112 };
113 
115 {
116  sal_Int32 nLinkId = mParaInts.front();
117  mParaInts.pop_front();
118 
119  /* negative values are intentionally passed as invalid IDs
120  * e.g. to create a new top level outline item
121  */
122  if( nLinkId >= 0 )
123  {
124  if ( static_cast<sal_uInt32>(nLinkId) < mParaIds.size() )
125  nLinkId = mParaIds[ nLinkId ];
126  else
127  nLinkId = -1;
128 
129  SAL_WARN_IF( nLinkId < 0, "vcl", "unmapped id in GlobalSyncData" );
130  }
131 
132  return nLinkId;
133 }
134 
135 sal_Int32 GlobalSyncData::GetMappedStructId( sal_Int32 nStructId )
136 {
137  if ( static_cast<sal_uInt32>(nStructId) < mStructIdMap.size() )
138  nStructId = mStructIdMap[ nStructId ];
139  else
140  nStructId = -1;
141 
142  SAL_WARN_IF( nStructId < 0, "vcl", "unmapped structure id in GlobalSyncData" );
143 
144  return nStructId;
145 }
146 
148 {
149  for (auto const& action : mActions)
150  {
151  switch (action)
152  {
153  case PDFExtOutDevDataSync::CreateNamedDest : //i56629
154  {
155  rWriter.Push( PushFlags::MAPMODE );
156  rWriter.SetMapMode( mParaMapModes.front() );
157  mParaMapModes.pop_front();
158  mParaIds.push_back( rWriter.CreateNamedDest( mParaOUStrings.front(), mParaRects.front(), mParaInts.front(), mParaDestAreaTypes.front() ) );
159  mParaOUStrings.pop_front();
160  mParaRects.pop_front();
161  mParaInts.pop_front();
162  mParaDestAreaTypes.pop_front();
163  rWriter.Pop();
164  }
165  break;
166  case PDFExtOutDevDataSync::CreateDest :
167  {
168  rWriter.Push( PushFlags::MAPMODE );
169  rWriter.SetMapMode( mParaMapModes.front() );
170  mParaMapModes.pop_front();
171  mParaIds.push_back( rWriter.CreateDest( mParaRects.front(), mParaInts.front(), mParaDestAreaTypes.front() ) );
172  mParaRects.pop_front();
173  mParaInts.pop_front();
174  mParaDestAreaTypes.pop_front();
175  rWriter.Pop();
176  }
177  break;
178  case PDFExtOutDevDataSync::CreateLink :
179  {
180  rWriter.Push( PushFlags::MAPMODE );
181  rWriter.SetMapMode( mParaMapModes.front() );
182  mParaMapModes.pop_front();
183  mParaIds.push_back( rWriter.CreateLink( mParaRects.front(), mParaInts.front() ) );
184  // resolve LinkAnnotation structural attribute
185  rWriter.SetLinkPropertyID( mParaIds.back(), sal_Int32(mParaIds.size()-1) );
186  mParaRects.pop_front();
187  mParaInts.pop_front();
188  rWriter.Pop();
189  }
190  break;
191  case PDFExtOutDevDataSync::CreateScreen:
192  {
193  rWriter.Push(PushFlags::MAPMODE);
194  rWriter.SetMapMode(mParaMapModes.front());
195  mParaMapModes.pop_front();
196  mParaIds.push_back(rWriter.CreateScreen(mParaRects.front(), mParaInts.front()));
197  mParaRects.pop_front();
198  mParaInts.pop_front();
199  rWriter.Pop();
200  }
201  break;
202  case PDFExtOutDevDataSync::SetLinkDest :
203  {
204  sal_Int32 nLinkId = GetMappedId();
205  sal_Int32 nDestId = GetMappedId();
206  rWriter.SetLinkDest( nLinkId, nDestId );
207  }
208  break;
209  case PDFExtOutDevDataSync::SetLinkURL :
210  {
211  sal_Int32 nLinkId = GetMappedId();
212  rWriter.SetLinkURL( nLinkId, mParaOUStrings.front() );
213  mParaOUStrings.pop_front();
214  }
215  break;
216  case PDFExtOutDevDataSync::SetScreenURL:
217  {
218  sal_Int32 nScreenId = GetMappedId();
219  rWriter.SetScreenURL(nScreenId, mParaOUStrings.front());
220  mParaOUStrings.pop_front();
221  }
222  break;
223  case PDFExtOutDevDataSync::SetScreenStream:
224  {
225  sal_Int32 nScreenId = GetMappedId();
226  rWriter.SetScreenStream(nScreenId, mParaOUStrings.front());
227  mParaOUStrings.pop_front();
228  }
229  break;
230  case PDFExtOutDevDataSync::RegisterDest :
231  {
232  const sal_Int32 nDestId = mParaInts.front();
233  mParaInts.pop_front();
234  OSL_ENSURE( mFutureDestinations.find( nDestId ) != mFutureDestinations.end(),
235  "GlobalSyncData::PlayGlobalActions: DescribeRegisteredRequest has not been called for that destination!" );
236 
237  PDFLinkDestination& rDest = mFutureDestinations[ nDestId ];
238 
239  rWriter.Push( PushFlags::MAPMODE );
240  rWriter.SetMapMode( rDest.mMapMode );
241  mParaIds.push_back( rWriter.RegisterDestReference( nDestId, rDest.mRect, rDest.mPageNr, rDest.mAreaType ) );
242  rWriter.Pop();
243  }
244  break;
245  case PDFExtOutDevDataSync::CreateOutlineItem :
246  {
247  sal_Int32 nParent = GetMappedId();
248  sal_Int32 nLinkId = GetMappedId();
249  mParaIds.push_back( rWriter.CreateOutlineItem( nParent, mParaOUStrings.front(), nLinkId ) );
250  mParaOUStrings.pop_front();
251  }
252  break;
253  case PDFExtOutDevDataSync::CreateNote :
254  {
255  rWriter.Push( PushFlags::MAPMODE );
256  rWriter.SetMapMode( mParaMapModes.front() );
257  rWriter.CreateNote( mParaRects.front(), mParaPDFNotes.front(), mParaInts.front() );
258  mParaMapModes.pop_front();
259  mParaRects.pop_front();
260  mParaPDFNotes.pop_front();
261  mParaInts.pop_front();
262  }
263  break;
264  case PDFExtOutDevDataSync::SetPageTransition :
265  {
266  rWriter.SetPageTransition( mParaPageTransitions.front(), mParauInts.front(), mParaInts.front() );
267  mParaPageTransitions.pop_front();
268  mParauInts.pop_front();
269  mParaInts.pop_front();
270  }
271  break;
272  case PDFExtOutDevDataSync::BeginStructureElement:
273  case PDFExtOutDevDataSync::EndStructureElement:
274  case PDFExtOutDevDataSync::SetCurrentStructureElement:
275  case PDFExtOutDevDataSync::SetStructureAttribute:
276  case PDFExtOutDevDataSync::SetStructureAttributeNumerical:
277  case PDFExtOutDevDataSync::SetStructureBoundingBox:
278  case PDFExtOutDevDataSync::SetActualText:
279  case PDFExtOutDevDataSync::SetAlternateText:
280  case PDFExtOutDevDataSync::CreateControl:
281  case PDFExtOutDevDataSync::BeginGroup:
282  case PDFExtOutDevDataSync::EndGroupGfxLink:
283  break;
284  }
285  }
286 }
287 
289 {
290  std::deque< PDFExtOutDevDataSync > mActions;
291  std::deque< tools::Rectangle > mParaRects;
292  std::deque< sal_Int32 > mParaInts;
293  std::deque< OUString > mParaOUStrings;
294  std::deque< PDFWriter::StructElement > mParaStructElements;
295  std::deque< PDFWriter::StructAttribute > mParaStructAttributes;
296  std::deque< PDFWriter::StructAttributeValue > mParaStructAttributeValues;
297  std::deque< Graphic > mGraphics;
299  std::deque< std::shared_ptr< PDFWriter::AnyWidget > >
302 
304 
305 
306  explicit PageSyncData( GlobalSyncData* pGlobal )
307  : mbGroupIgnoreGDIMtfActions ( false )
308  { mpGlobalData = pGlobal; }
309 
310  void PushAction( const OutputDevice& rOutDev, const PDFExtOutDevDataSync::Action eAct );
311  bool PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const GDIMetaFile& rMtf, const PDFExtOutDevData& rOutDevData );
312 };
313 
314 void PageSyncData::PushAction( const OutputDevice& rOutDev, const PDFExtOutDevDataSync::Action eAct )
315 {
316  GDIMetaFile* pMtf = rOutDev.GetConnectMetaFile();
317  SAL_WARN_IF( !pMtf, "vcl", "PageSyncData::PushAction -> no ConnectMetaFile !!!" );
318 
319  PDFExtOutDevDataSync aSync;
320  aSync.eAct = eAct;
321  if ( pMtf )
322  aSync.nIdx = pMtf->GetActionSize();
323  else
324  aSync.nIdx = 0x7fffffff; // sync not possible
325  mActions.push_back( aSync );
326 }
327 bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const GDIMetaFile& rMtf, const PDFExtOutDevData& rOutDevData )
328 {
329  bool bRet = false;
330  if ( !mActions.empty() && ( mActions.front().nIdx == rCurGDIMtfAction ) )
331  {
332  bRet = true;
333  PDFExtOutDevDataSync aDataSync = mActions.front();
334  mActions.pop_front();
335  switch( aDataSync.eAct )
336  {
337  case PDFExtOutDevDataSync::BeginStructureElement :
338  {
339  sal_Int32 nNewEl = rWriter.BeginStructureElement( mParaStructElements.front(), mParaOUStrings.front() ) ;
340  mParaStructElements.pop_front();
341  mParaOUStrings.pop_front();
342  mpGlobalData->mStructIdMap.push_back( nNewEl );
343  }
344  break;
345  case PDFExtOutDevDataSync::EndStructureElement :
346  {
347  rWriter.EndStructureElement();
348  }
349  break;
350  case PDFExtOutDevDataSync::SetCurrentStructureElement:
351  {
353  mParaInts.pop_front();
354  }
355  break;
356  case PDFExtOutDevDataSync::SetStructureAttribute :
357  {
359  mParaStructAttributeValues.pop_front();
360  mParaStructAttributes.pop_front();
361  }
362  break;
363  case PDFExtOutDevDataSync::SetStructureAttributeNumerical :
364  {
366  mParaStructAttributes.pop_front();
367  mParaInts.pop_front();
368  }
369  break;
370  case PDFExtOutDevDataSync::SetStructureBoundingBox :
371  {
372  rWriter.SetStructureBoundingBox( mParaRects.front() );
373  mParaRects.pop_front();
374  }
375  break;
376  case PDFExtOutDevDataSync::SetActualText :
377  {
378  rWriter.SetActualText( mParaOUStrings.front() );
379  mParaOUStrings.pop_front();
380  }
381  break;
382  case PDFExtOutDevDataSync::SetAlternateText :
383  {
384  rWriter.SetAlternateText( mParaOUStrings.front() );
385  mParaOUStrings.pop_front();
386  }
387  break;
388  case PDFExtOutDevDataSync::CreateControl:
389  {
390  std::shared_ptr< PDFWriter::AnyWidget > pControl( mControls.front() );
391  SAL_WARN_IF( !pControl.get(), "vcl", "PageSyncData::PlaySyncPageAct: invalid widget!" );
392  if ( pControl.get() )
393  rWriter.CreateControl( *pControl );
394  mControls.pop_front();
395  }
396  break;
397  case PDFExtOutDevDataSync::BeginGroup :
398  {
399  /* first determining if this BeginGroup is starting a GfxLink,
400  by searching for an EndGroup or an EndGroupGfxLink */
402  auto isStartingGfxLink = std::any_of(mActions.begin(), mActions.end(),
403  [](const PDFExtOutDevDataSync& rAction) { return rAction.eAct == PDFExtOutDevDataSync::EndGroupGfxLink; });
404  if ( isStartingGfxLink )
405  {
406  Graphic& rGraphic = mGraphics.front();
407  if ( rGraphic.IsGfxLink() && mParaRects.size() >= 2 )
408  {
409  GfxLinkType eType = rGraphic.GetGfxLink().GetType();
410  if ( eType == GfxLinkType::NativeJpg )
411  {
414  mCurrentGraphic = rGraphic;
415  }
416  else if ( eType == GfxLinkType::NativePng || eType == GfxLinkType::NativePdf )
417  {
418  if ( eType == GfxLinkType::NativePdf || rOutDevData.HasAdequateCompression(rGraphic, mParaRects[0], mParaRects[1]) )
419  mCurrentGraphic = rGraphic;
420  }
421  }
422  }
423  }
424  break;
425  case PDFExtOutDevDataSync::EndGroupGfxLink :
426  {
427  tools::Rectangle aOutputRect, aVisibleOutputRect;
428  Graphic aGraphic( mGraphics.front() );
429 
430  mGraphics.pop_front();
431  sal_Int32 nTransparency = mParaInts.front();
432  mParaInts.pop_front();
433  aOutputRect = mParaRects.front();
434  mParaRects.pop_front();
435  aVisibleOutputRect = mParaRects.front();
436  mParaRects.pop_front();
437 
439  {
440  bool bClippingNeeded = ( aOutputRect != aVisibleOutputRect ) && !aVisibleOutputRect.IsEmpty();
441 
442  GfxLink aGfxLink( aGraphic.GetGfxLink() );
443  if ( aGfxLink.GetType() == GfxLinkType::NativeJpg )
444  {
445  if ( bClippingNeeded )
446  {
447  rWriter.Push();
449  vcl::unotools::b2DRectangleFromRectangle(aVisibleOutputRect) ) );
450  rWriter.SetClipRegion( aRect);
451  }
452 
453  Bitmap aMask;
454  if (nTransparency)
455  {
456  AlphaMask aAlphaMask(aGraphic.GetSizePixel());
457  aAlphaMask.Erase(nTransparency);
458  aMask = aAlphaMask.GetBitmap();
459  }
460 
461  SvMemoryStream aTmp;
462  const sal_uInt8* pData = aGfxLink.GetData();
463  sal_uInt32 nBytes = aGfxLink.GetDataSize();
464  if( pData && nBytes )
465  {
466  aTmp.WriteBytes( pData, nBytes );
467 
468  // Look up the output rectangle from the previous
469  // bitmap scale action if possible. This has the
470  // correct position and size for images with a
471  // custom translation (Writer header) or scaling
472  // (Impress notes page).
473  if (rCurGDIMtfAction > 0)
474  {
475  const MetaAction* pAction = rMtf.GetAction(rCurGDIMtfAction - 1);
476  if (pAction && pAction->GetType() == MetaActionType::BMPSCALE)
477  {
478  const MetaBmpScaleAction* pA
479  = static_cast<const MetaBmpScaleAction*>(pAction);
480  aOutputRect.SetPos(pA->GetPoint());
481  aOutputRect.SetSize(pA->GetSize());
482  }
483  }
484 
485  rWriter.DrawJPGBitmap( aTmp, aGraphic.GetBitmapEx().GetBitCount() > 8, aGraphic.GetSizePixel(), aOutputRect, aMask, aGraphic );
486  }
487 
488  if ( bClippingNeeded )
489  rWriter.Pop();
490  }
492  }
494  }
495  break;
496  case PDFExtOutDevDataSync::CreateNamedDest:
497  case PDFExtOutDevDataSync::CreateDest:
498  case PDFExtOutDevDataSync::CreateLink:
499  case PDFExtOutDevDataSync::CreateScreen:
500  case PDFExtOutDevDataSync::SetLinkDest:
501  case PDFExtOutDevDataSync::SetLinkURL:
502  case PDFExtOutDevDataSync::SetScreenURL:
503  case PDFExtOutDevDataSync::SetScreenStream:
504  case PDFExtOutDevDataSync::RegisterDest:
505  case PDFExtOutDevDataSync::CreateOutlineItem:
506  case PDFExtOutDevDataSync::CreateNote:
507  case PDFExtOutDevDataSync::SetPageTransition:
508  break;
509  }
510  }
511  else if ( mbGroupIgnoreGDIMtfActions )
512  {
513  rCurGDIMtfAction++;
514  bRet = true;
515  }
516  return bRet;
517 }
518 
520  mrOutDev ( rOutDev ),
521  mbTaggedPDF ( false ),
522  mbExportNotes ( true ),
523  mbExportNotesPages ( false ),
524  mbTransitionEffects ( true ),
525  mbUseLosslessCompression( true ),
526  mbReduceImageResolution ( false ),
527  mbExportFormFields ( false ),
528  mbExportBookmarks ( false ),
529  mbExportHiddenSlides ( false ),
530  mbSinglePageSheets ( false ),
531  mbExportNDests ( false ),
532  mnPage ( -1 ),
533  mnCompressionQuality ( 90 ),
534  mpGlobalSyncData ( new GlobalSyncData() )
535 {
536  mpPageSyncData.reset( new PageSyncData( mpGlobalSyncData.get() ) );
537 }
538 
540 {
541  mpPageSyncData.reset();
542  mpGlobalSyncData.reset();
543 }
544 
546 {
547  return mpPageSyncData->mCurrentGraphic;
548 }
549 
550 void PDFExtOutDevData::SetDocumentLocale( const css::lang::Locale& rLoc )
551 {
552  maDocLocale = rLoc;
553 }
554 void PDFExtOutDevData::SetCurrentPageNumber( const sal_Int32 nPage )
555 {
556  mnPage = nPage;
557 }
558 void PDFExtOutDevData::SetIsLosslessCompression( const bool bUseLosslessCompression )
559 {
560  mbUseLosslessCompression = bUseLosslessCompression;
561 }
562 void PDFExtOutDevData::SetCompressionQuality( const sal_Int32 nQuality )
563 {
564  mnCompressionQuality = nQuality;
565 }
566 void PDFExtOutDevData::SetIsReduceImageResolution( const bool bReduceImageResolution )
567 {
568  mbReduceImageResolution = bReduceImageResolution;
569 }
570 void PDFExtOutDevData::SetIsExportNotes( const bool bExportNotes )
571 {
572  mbExportNotes = bExportNotes;
573 }
574 void PDFExtOutDevData::SetIsExportNotesPages( const bool bExportNotesPages )
575 {
576  mbExportNotesPages = bExportNotesPages;
577 }
578 void PDFExtOutDevData::SetIsExportTaggedPDF( const bool bTaggedPDF )
579 {
580  mbTaggedPDF = bTaggedPDF;
581 }
582 void PDFExtOutDevData::SetIsExportTransitionEffects( const bool bTransitionEffects )
583 {
584  mbTransitionEffects = bTransitionEffects;
585 }
586 void PDFExtOutDevData::SetIsExportFormFields( const bool bExportFomtFields )
587 {
588  mbExportFormFields = bExportFomtFields;
589 }
590 void PDFExtOutDevData::SetIsExportBookmarks( const bool bExportBookmarks )
591 {
592  mbExportBookmarks = bExportBookmarks;
593 }
594 void PDFExtOutDevData::SetIsExportHiddenSlides( const bool bExportHiddenSlides )
595 {
596  mbExportHiddenSlides = bExportHiddenSlides;
597 }
598 void PDFExtOutDevData::SetIsSinglePageSheets( const bool bSinglePageSheets )
599 {
600  mbSinglePageSheets = bSinglePageSheets;
601 }
602 void PDFExtOutDevData::SetIsExportNamedDestinations( const bool bExportNDests )
603 {
604  mbExportNDests = bExportNDests;
605 }
607 {
609 }
610 bool PDFExtOutDevData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rIdx, const GDIMetaFile& rMtf )
611 {
612  return mpPageSyncData->PlaySyncPageAct( rWriter, rIdx, rMtf, *this );
613 }
615 {
616  mpGlobalSyncData->PlayGlobalActions( rWriter );
617 }
618 
619 /* global actions, synchronisation to the recorded metafile isn't needed,
620  all actions will be played after the last page was recorded
621 */
622 //--->i56629
623 sal_Int32 PDFExtOutDevData::CreateNamedDest(const OUString& sDestName, const tools::Rectangle& rRect, sal_Int32 nPageNr )
624 {
625  mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateNamedDest );
626  mpGlobalSyncData->mParaOUStrings.push_back( sDestName );
627  mpGlobalSyncData->mParaRects.push_back( rRect );
628  mpGlobalSyncData->mParaMapModes.push_back( mrOutDev.GetMapMode() );
629  mpGlobalSyncData->mParaInts.push_back( nPageNr == -1 ? mnPage : nPageNr );
630  mpGlobalSyncData->mParaDestAreaTypes.push_back( PDFWriter::DestAreaType::XYZ );
631 
632  return mpGlobalSyncData->mCurId++;
633 }
634 //<---i56629
636 {
637  const sal_Int32 nLinkDestID = mpGlobalSyncData->mCurId++;
638  mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::RegisterDest );
639  mpGlobalSyncData->mParaInts.push_back( nLinkDestID );
640 
641  return nLinkDestID;
642 }
643 void PDFExtOutDevData::DescribeRegisteredDest( sal_Int32 nDestId, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
644 {
645  OSL_PRECOND( nDestId != -1, "PDFExtOutDevData::DescribeRegisteredDest: invalid destination Id!" );
646  PDFLinkDestination aLinkDestination;
647  aLinkDestination.mRect = rRect;
648  aLinkDestination.mMapMode = mrOutDev.GetMapMode();
649  aLinkDestination.mPageNr = nPageNr == -1 ? mnPage : nPageNr;
650  aLinkDestination.mAreaType = eType;
651  mpGlobalSyncData->mFutureDestinations[ nDestId ] = aLinkDestination;
652 }
653 sal_Int32 PDFExtOutDevData::CreateDest( const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
654 {
655  mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateDest );
656  mpGlobalSyncData->mParaRects.push_back( rRect );
657  mpGlobalSyncData->mParaMapModes.push_back( mrOutDev.GetMapMode() );
658  mpGlobalSyncData->mParaInts.push_back( nPageNr == -1 ? mnPage : nPageNr );
659  mpGlobalSyncData->mParaDestAreaTypes.push_back( eType );
660  return mpGlobalSyncData->mCurId++;
661 }
662 sal_Int32 PDFExtOutDevData::CreateLink( const tools::Rectangle& rRect, sal_Int32 nPageNr )
663 {
664  mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateLink );
665  mpGlobalSyncData->mParaRects.push_back( rRect );
666  mpGlobalSyncData->mParaMapModes.push_back( mrOutDev.GetMapMode() );
667  mpGlobalSyncData->mParaInts.push_back( nPageNr == -1 ? mnPage : nPageNr );
668  return mpGlobalSyncData->mCurId++;
669 }
670 
671 sal_Int32 PDFExtOutDevData::CreateScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr)
672 {
673  mpGlobalSyncData->mActions.push_back(PDFExtOutDevDataSync::CreateScreen);
674  mpGlobalSyncData->mParaRects.push_back(rRect);
675  mpGlobalSyncData->mParaMapModes.push_back(mrOutDev.GetMapMode());
676  mpGlobalSyncData->mParaInts.push_back(nPageNr);
677  return mpGlobalSyncData->mCurId++;
678 }
679 
680 void PDFExtOutDevData::SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId )
681 {
682  mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::SetLinkDest );
683  mpGlobalSyncData->mParaInts.push_back( nLinkId );
684  mpGlobalSyncData->mParaInts.push_back( nDestId );
685 }
686 void PDFExtOutDevData::SetLinkURL( sal_Int32 nLinkId, const OUString& rURL )
687 {
688  mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::SetLinkURL );
689  mpGlobalSyncData->mParaInts.push_back( nLinkId );
690  mpGlobalSyncData->mParaOUStrings.push_back( rURL );
691 }
692 
693 void PDFExtOutDevData::SetScreenURL(sal_Int32 nScreenId, const OUString& rURL)
694 {
695  mpGlobalSyncData->mActions.push_back(PDFExtOutDevDataSync::SetScreenURL);
696  mpGlobalSyncData->mParaInts.push_back(nScreenId);
697  mpGlobalSyncData->mParaOUStrings.push_back(rURL);
698 }
699 
700 void PDFExtOutDevData::SetScreenStream(sal_Int32 nScreenId, const OUString& rURL)
701 {
702  mpGlobalSyncData->mActions.push_back(PDFExtOutDevDataSync::SetScreenStream);
703  mpGlobalSyncData->mParaInts.push_back(nScreenId);
704  mpGlobalSyncData->mParaOUStrings.push_back(rURL);
705 }
706 
707 sal_Int32 PDFExtOutDevData::CreateOutlineItem( sal_Int32 nParent, const OUString& rText, sal_Int32 nDestID )
708 {
709  if (nParent == -1)
710  // Has no parent, it's a chapter / heading 1.
711  maChapterNames.push_back(rText);
712 
713  mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateOutlineItem );
714  mpGlobalSyncData->mParaInts.push_back( nParent );
715  mpGlobalSyncData->mParaOUStrings.push_back( rText );
716  mpGlobalSyncData->mParaInts.push_back( nDestID );
717  return mpGlobalSyncData->mCurId++;
718 }
719 void PDFExtOutDevData::CreateNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr )
720 {
721  mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateNote );
722  mpGlobalSyncData->mParaRects.push_back( rRect );
723  mpGlobalSyncData->mParaMapModes.push_back( mrOutDev.GetMapMode() );
724  mpGlobalSyncData->mParaPDFNotes.push_back( rNote );
725  mpGlobalSyncData->mParaInts.push_back( nPageNr == -1 ? mnPage : nPageNr );
726 }
728 {
729  mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::SetPageTransition );
730  mpGlobalSyncData->mParaPageTransitions.push_back( eType );
731  mpGlobalSyncData->mParauInts.push_back( nMilliSec );
732  mpGlobalSyncData->mParaInts.push_back( mnPage );
733 }
734 
735 /* local (page), actions have to be played synchronously to the actions of
736  of the recorded metafile (created by each xRenderable->render()) */
737  sal_Int32 PDFExtOutDevData::BeginStructureElement( PDFWriter::StructElement eType, const OUString& rAlias )
738 {
739  mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::BeginStructureElement );
740  mpPageSyncData->mParaStructElements.push_back( eType );
741  mpPageSyncData->mParaOUStrings.push_back( rAlias );
742  // need a global id
743  sal_Int32 nNewId = mpGlobalSyncData->mStructParents.size();
744  mpGlobalSyncData->mStructParents.push_back( mpGlobalSyncData->mCurrentStructElement );
745  mpGlobalSyncData->mCurrentStructElement = nNewId;
746  return nNewId;
747 }
749 {
750  mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::EndStructureElement );
751  mpGlobalSyncData->mCurrentStructElement = mpGlobalSyncData->mStructParents[ mpGlobalSyncData->mCurrentStructElement ];
752 }
754 {
755  bool bSuccess = false;
756  if( sal_uInt32(nStructId) < mpGlobalSyncData->mStructParents.size() )
757  {
758  mpGlobalSyncData->mCurrentStructElement = nStructId;
759  mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetCurrentStructureElement );
760  mpPageSyncData->mParaInts.push_back( nStructId );
761  bSuccess = true;
762  }
763  return bSuccess;
764 }
766 {
767  return mpGlobalSyncData->mCurrentStructElement;
768 }
770 {
771  mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetStructureAttribute );
772  mpPageSyncData->mParaStructAttributes.push_back( eAttr );
773  mpPageSyncData->mParaStructAttributeValues.push_back( eVal );
774 }
776 {
777  mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetStructureAttributeNumerical );
778  mpPageSyncData->mParaStructAttributes.push_back( eAttr );
779  mpPageSyncData->mParaInts.push_back( nValue );
780 }
782 {
783  mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetStructureBoundingBox );
784  mpPageSyncData->mParaRects.push_back( rRect );
785 }
786 void PDFExtOutDevData::SetActualText( const OUString& rText )
787 {
788  mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetActualText );
789  mpPageSyncData->mParaOUStrings.push_back( rText );
790 }
791 void PDFExtOutDevData::SetAlternateText( const OUString& rText )
792 {
793  mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetAlternateText );
794  mpPageSyncData->mParaOUStrings.push_back( rText );
795 }
796 
798 {
799  mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::CreateControl );
800 
801  std::shared_ptr< PDFWriter::AnyWidget > pClone( rControlType.Clone() );
802  mpPageSyncData->mControls.push_back( pClone );
803 }
804 
806 {
807  mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::BeginGroup );
808 }
809 
810 void PDFExtOutDevData::EndGroup( const Graphic& rGraphic,
811  sal_uInt8 nTransparency,
812  const tools::Rectangle& rOutputRect,
813  const tools::Rectangle& rVisibleOutputRect )
814 {
815  mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::EndGroupGfxLink );
816  mpPageSyncData->mGraphics.push_back( rGraphic );
817  mpPageSyncData->mParaInts.push_back( nTransparency );
818  mpPageSyncData->mParaRects.push_back( rOutputRect );
819  mpPageSyncData->mParaRects.push_back( rVisibleOutputRect );
820 }
821 
822 // Avoids expensive de-compression and re-compression of large images.
824  const tools::Rectangle & rOutputRect,
825  const tools::Rectangle & rVisibleOutputRect ) const
826 {
827  assert(rGraphic.IsGfxLink() &&
828  (rGraphic.GetGfxLink().GetType() == GfxLinkType::NativeJpg ||
829  rGraphic.GetGfxLink().GetType() == GfxLinkType::NativePng ||
830  rGraphic.GetGfxLink().GetType() == GfxLinkType::NativePdf));
831 
832  if (rOutputRect != rVisibleOutputRect)
833  // rOutputRect is the crop rectangle, re-compress cropped image.
834  return false;
835 
837  // Reducing resolution was requested, implies that re-compressing is
838  // wanted.
839  return false;
840 
841  if (rGraphic.GetGfxLink().GetDataSize() == 0)
842  return false;
843 
844  GfxLink aLink = rGraphic.GetGfxLink();
845  SvMemoryStream aMemoryStream(const_cast<sal_uInt8*>(aLink.GetData()), aLink.GetDataSize(),
846  StreamMode::READ | StreamMode::WRITE);
847  GraphicDescriptor aDescriptor(aMemoryStream, nullptr);
848  if (aDescriptor.Detect(true) && aDescriptor.GetNumberOfImageComponents() == 4)
849  // 4 means CMYK, which is not handled.
850  return false;
851 
852  const Size aSize = rGraphic.GetSizePixel();
853 
854  // small items better off as PNG anyway
855  if ( aSize.Width() < 32 &&
856  aSize.Height() < 32 )
857  return false;
858 
860  return !GetIsReduceImageResolution();
861 
862  // FIXME: ideally we'd also pre-empt the DPI related scaling too.
863  sal_Int32 nCurrentRatio = (100 * aSize.Width() * aSize.Height() * 4) /
864  rGraphic.GetGfxLink().GetDataSize();
865 
866  static const struct {
867  sal_Int32 const mnQuality;
868  sal_Int32 const mnRatio;
869  } aRatios[] = { // minimum tolerable compression ratios
870  { 100, 400 }, { 95, 700 }, { 90, 1000 }, { 85, 1200 },
871  { 80, 1500 }, { 75, 1700 }
872  };
873  sal_Int32 nTargetRatio = 10000;
874  bool bIsTargetRatioReached = false;
875  for (auto & rRatio : aRatios)
876  {
877  if ( mnCompressionQuality > rRatio.mnQuality )
878  {
879  bIsTargetRatioReached = true;
880  break;
881  }
882  nTargetRatio = rRatio.mnRatio;
883  }
884 
885  return ((nCurrentRatio > nTargetRatio) && bIsTargetRatioReached);
886 }
887 
888 }
889 
890 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::deque< PDFWriter::StructAttributeValue > mParaStructAttributeValues
void SetCurrentPageNumber(const sal_Int32 nPage)
long Width() const
std::deque< PDFWriter::StructAttribute > mParaStructAttributes
void SetPos(const Point &rPoint)
std::deque< PDFWriter::StructElement > mParaStructElements
void PushAction(const OutputDevice &rOutDev, const PDFExtOutDevDataSync::Action eAct)
const Point & GetPoint() const
Definition: metaact.hxx:700
void SetIsExportNotes(const bool bExportNotes)
void SetPageTransition(PageTransition eType, sal_uInt32 nMilliSec, sal_Int32 nPageNr)
Sets the transitional effect to be applied when the current page gets shown.
Definition: pdfwriter.cxx:430
void BeginGroup()
Start a new group of render output.
sal_Int32 RegisterDest()
registers a destination for which a destination ID needs to be known immediately, instead of later on...
std::deque< sal_Int32 > mParaInts
std::unique_ptr< ContentProperties > pData
Size GetSizePixel(const OutputDevice *pRefDevice=nullptr) const
Definition: graph.cxx:429
long Height() const
bool PlaySyncPageAct(PDFWriter &rWriter, sal_uInt32 &rCurGDIMtfAction, const GDIMetaFile &rMtf)
bool SetCurrentStructureElement(sal_Int32 nElement)
set the current structure element
void SetScreenURL(sal_Int32 nScreenId, const OUString &rURL)
Set URL for a linked Screen annotation.
void SetAlternateText(const OUString &rText)
set the Alt attribute of a strutural element
sal_Int32 BeginStructureElement(enum StructElement eType, const OUString &rAlias)
begin a new logical structure element
Definition: pdfwriter.cxx:390
std::deque< PDFWriter::DestAreaType > mParaDestAreaTypes
void SetStructureAttribute(PDFWriter::StructAttribute eAttr, PDFWriter::StructAttributeValue eVal)
set a structure attribute on the current structural element
void SetActualText(const OUString &rText)
set the ActualText attribute of a structural element
Definition: pdfwriter.cxx:420
std::deque< sal_Int32 > mParaInts
const Size & GetSize() const
Definition: metaact.hxx:701
const MapMode & GetMapMode() const
Definition: outdev.hxx:1674
void SetIsReduceImageResolution(const bool bReduceImageResolution)
virtual ~PDFExtOutDevData() override
GDIMetaFile * GetConnectMetaFile() const
Definition: outdev.hxx:417
std::deque< tools::Rectangle > mParaRects
void SetIsExportNamedDestinations(const bool bExportNDests)
std::vector< sal_Int32 > mStructParents
bool IsGfxLink() const
Definition: graph.cxx:532
void SetStructureBoundingBox(const tools::Rectangle &rRect)
set the bounding box of a structural element
Definition: pdfwriter.cxx:415
std::unique_ptr< GlobalSyncData > mpGlobalSyncData
bool IsEmpty() const
void Clear()
Definition: graph.cxx:307
bool GetIsLosslessCompression() const
void SetLinkPropertyID(sal_Int32 nLinkId, sal_Int32 nPropertyID)
Resolve link in logical structure.
Definition: pdfwriter.cxx:375
std::deque< std::shared_ptr< PDFWriter::AnyWidget > > mControls
std::deque< sal_uInt32 > mParauInts
void EndStructureElement()
end the current logical structure element
Definition: pdfwriter.cxx:395
std::vector< sal_Int32 > mParaIds
sal_Int32 CreateNamedDest(const OUString &sDestName, const tools::Rectangle &rRect, sal_Int32 nPageNr, DestAreaType eType)
Create a new named destination to be used in a link from another PDF document.
Definition: pdfwriter.cxx:346
void EndGroup(const Graphic &rGraphic, sal_uInt8 nTransparency, const tools::Rectangle &rOutputRect, const tools::Rectangle &rVisibleOutputRect)
End render output.
void SetLinkDest(sal_Int32 nLinkId, sal_Int32 nDestId)
Set the destination for a link.
PageSyncData(GlobalSyncData *pGlobal)
std::vector< OUString > maChapterNames
sal_Int32 GetCurrentStructureElement() const
get the current structure element id
void DrawJPGBitmap(SvStream &rJPGData, bool bIsTrueColor, const Size &rSrcSizePixel, const tools::Rectangle &rTargetArea, const Bitmap &rMask, const Graphic &rGraphic)
Insert a JPG encoded image (optionally with mask)
Definition: pdfwriter.cxx:326
void SetIsExportFormFields(const bool bExportFormFields)
std::deque< Graphic > mGraphics
std::deque< OUString > mParaOUStrings
void SetAlternateText(const OUString &rText)
set the Alt attribute of a strutural element
Definition: pdfwriter.cxx:425
std::deque< PDFExtOutDevDataSync::Action > mActions
void SetIsSinglePageSheets(const bool bSinglePageSheets)
void SetIsExportBookmarks(const bool bExportBookmarks)
void Erase(sal_uInt8 cTransparency)
Definition: alpha.cxx:75
PDFExtOutDevData(const OutputDevice &rOutDev)
void SetLinkDest(sal_Int32 nLinkId, sal_Int32 nDestId)
Set the destination for a link will change a URL type link to a dest link if necessary.
Definition: pdfwriter.cxx:355
void PlayGlobalActions(PDFWriter &rWriter)
void SetCompressionQuality(const sal_Int32 nQuality)
void SetStructureAttributeNumerical(PDFWriter::StructAttribute eAttr, sal_Int32 nValue)
set a structure attribute on the current structural element
void SetIsExportNotesPages(const bool bExportNotesPages)
std::deque< PDFNote > mParaPDFNotes
void SetSize(const Size &rSize)
void SetIsExportHiddenSlides(const bool bExportHiddenSlides)
B2DPolygon createPolygonFromRect(const B2DRectangle &rRect, double fRadiusX, double fRadiusY)
GlobalSyncData * mpGlobalData
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
std::size_t WriteBytes(const void *pData, std::size_t nSize)
sal_Int32 CreateDest(const tools::Rectangle &rRect, sal_Int32 nPageNr=-1, PDFWriter::DestAreaType eType=PDFWriter::DestAreaType::XYZ)
Create a new destination to be used in a link.
void SetStructureAttributeNumerical(enum StructAttribute eAttr, sal_Int32 nValue)
set a structure attribute on the current structural element
Definition: pdfwriter.cxx:410
virtual std::unique_ptr< AnyWidget > Clone() const =0
std::deque< OUString > mParaOUStrings
void SetIsLosslessCompression(const bool bLosslessCompression)
void SetIsExportTaggedPDF(const bool bTaggedPDF)
void Push(PushFlags nFlags=PushFlags::ALL)
Definition: pdfwriter.cxx:226
std::deque< PDFExtOutDevDataSync > mActions
void SetMapMode(const MapMode &rNewMapMode)
Definition: pdfwriter.cxx:236
GfxLink GetGfxLink() const
Definition: graph.cxx:527
DocumentType const eType
sal_Int32 BeginStructureElement(PDFWriter::StructElement eType, const OUString &rAlias=OUString())
begin a new logical structure element
sal_Int32 CreateScreen(const tools::Rectangle &rRect, sal_Int32 nPageNr)
Create a Screen annotation.
sal_Int32 RegisterDestReference(sal_Int32 nDestId, const tools::Rectangle &rRect, sal_Int32 nPageNr, DestAreaType eType)
creates a destination which is not intended to be referred to by a link, but by a public destination ...
Definition: pdfwriter.cxx:341
basegfx::B2DRange b2DRectangleFromRectangle(const ::tools::Rectangle &rRect)
void DescribeRegisteredDest(sal_Int32 nDestId, const tools::Rectangle &rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType=PDFWriter::DestAreaType::XYZ)
provides detailed information about a destination range which previously has been registered using Re...
bool HasAdequateCompression(const Graphic &rGraphic, const tools::Rectangle &rOutputRect, const tools::Rectangle &rVisibleOutputRect) const
Detect if stream is compressed enough to avoid de-compress / scale & re-compress. ...
void SetLinkURL(sal_Int32 nLinkId, const OUString &rURL)
Set the URL for a link.
std::vector< sal_Int32 > mStructIdMap
void CreateNote(const tools::Rectangle &rRect, const PDFNote &rNote, sal_Int32 nPageNr=-1)
Create a new note on a page.
::std::map< sal_Int32, PDFLinkDestination > mFutureDestinations
sal_Int32 CreateControl(const AnyWidget &rControlType)
create a new form control
Definition: pdfwriter.cxx:435
sal_Int32 CreateOutlineItem(sal_Int32 nParent, const OUString &rText, sal_Int32 nDestID)
Create a new outline item.
Definition: pdfwriter.cxx:380
css::lang::Locale maDocLocale
std::unique_ptr< PageSyncData > mpPageSyncData
void PlayGlobalActions(PDFWriter &rWriter)
void SetStructureAttribute(enum StructAttribute eAttr, enum StructAttributeValue eVal)
set a structure attribute on the current structural element
Definition: pdfwriter.cxx:405
sal_Int32 CreateLink(const tools::Rectangle &rRect, sal_Int32 nPageNr)
Create a new link on a page.
Definition: pdfwriter.cxx:331
#define SAL_WARN_IF(condition, area, stream)
OutputDevice & mrOutDev
void SetScreenURL(sal_Int32 nScreenId, const OUString &rURL)
Sets the URL of a linked screen annotation.
Definition: pdfwriter.cxx:365
unsigned char sal_uInt8
MetaAction * GetAction(size_t nAction) const
Definition: gdimtf.cxx:162
void SetLinkURL(sal_Int32 nLinkId, const OUString &rURL)
Set the URL for a link will change a dest type link to a URL type link if necessary.
Definition: pdfwriter.cxx:360
sal_Int32 CreateNamedDest(const OUString &sDestName, const tools::Rectangle &rRect, sal_Int32 nPageNr=-1)
Create a new named destination to be used in a link to this document from another PDF document (see P...
sal_Int32 CreateLink(const tools::Rectangle &rRect, sal_Int32 nPageNr=-1)
Create a new link on a page.
bool PlaySyncPageAct(PDFWriter &rWriter, sal_uInt32 &rCurGDIMtfAction, const GDIMetaFile &rMtf, const PDFExtOutDevData &rOutDevData)
size_t GetActionSize() const
Definition: gdimtf.cxx:157
void SetDocumentLocale(const css::lang::Locale &rLoc)
MetaActionType GetType() const
Definition: metaact.hxx:89
std::deque< tools::Rectangle > mParaRects
sal_Int32 CreateOutlineItem(sal_Int32 nParent, const OUString &rText, sal_Int32 nDestID)
Create a new outline item.
sal_Int32 CreateDest(const tools::Rectangle &rRect, sal_Int32 nPageNr, DestAreaType eType)
Create a new destination to be used in a link.
Definition: pdfwriter.cxx:350
void SetActualText(const OUString &rText)
set the ActualText attribute of a structural element
void CreateNote(const tools::Rectangle &rRect, const PDFNote &rNote, sal_Int32 nPageNr)
Create a new note on a page.
Definition: pdfwriter.cxx:385
const OutputDevice & mrOutDev
void SetIsExportTransitionEffects(const bool bTransitionalEffects)
sal_Int32 GetMappedStructId(sal_Int32)
const Graphic & GetCurrentGraphic() const
void CreateControl(const PDFWriter::AnyWidget &rControlType)
create a new form control
sal_Int32 CreateScreen(const tools::Rectangle &rRect, sal_Int32 nPageNr)
Creates a screen annotation.
Definition: pdfwriter.cxx:336
void SetScreenStream(sal_Int32 nScreenId, const OUString &rURL)
Set URL for an embedded Screen annotation.
void SetPageTransition(PDFWriter::PageTransition eType, sal_uInt32 nMilliSec)
Sets the transitional effect to be applied when the current page gets shown.
void SetScreenStream(sal_Int32 nScreenId, const OUString &rURL)
Sets the URL of an embedded screen annotation.
Definition: pdfwriter.cxx:370
void SetClipRegion()
Definition: pdfwriter.cxx:251
std::deque< MapMode > mParaMapModes
void SetStructureBoundingBox(const tools::Rectangle &rRect)
set the bounding box of a structural element
void EndStructureElement()
end a logical structure element
std::deque< PDFWriter::PageTransition > mParaPageTransitions
bool GetIsReduceImageResolution() const
void SetCurrentStructureElement(sal_Int32 nElement)
set the current structure element
Definition: pdfwriter.cxx:400