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 <o3tl/safeint.hxx>
31 #include <osl/diagnose.h>
32 #include <tools/stream.hxx>
33 
34 #include <memory>
35 #include <map>
36 
37 namespace vcl
38 {
39 namespace {
40 
41 struct PDFExtOutDevDataSync
42 {
43  enum Action{ CreateNamedDest,
44  CreateDest,
45  CreateLink,
46  CreateScreen,
47  SetLinkDest,
48  SetLinkURL,
49  SetScreenURL,
50  SetScreenStream,
51  RegisterDest,
52  CreateOutlineItem,
53  CreateNote,
54  SetPageTransition,
55 
56  BeginStructureElement,
57  EndStructureElement,
58  SetCurrentStructureElement,
59  SetStructureAttribute,
60  SetStructureAttributeNumerical,
61  SetStructureBoundingBox,
62  SetActualText,
63  SetAlternateText,
64  CreateControl,
65  BeginGroup,
66  EndGroupGfxLink
67  };
68 
69  sal_uInt32 nIdx;
70  Action eAct;
71 };
72 
73 struct PDFLinkDestination
74 {
75  tools::Rectangle mRect;
76  MapMode mMapMode;
77  sal_Int32 mPageNr;
78  PDFWriter::DestAreaType mAreaType;
79 };
80 
81 }
82 
84 {
85  std::deque< PDFExtOutDevDataSync::Action > mActions;
86  std::deque< MapMode > mParaMapModes;
87  std::deque< tools::Rectangle > mParaRects;
88  std::deque< sal_Int32 > mParaInts;
89  std::deque< sal_uInt32 > mParauInts;
90  std::deque< OUString > mParaOUStrings;
91  std::deque< PDFWriter::DestAreaType > mParaDestAreaTypes;
92  std::deque< PDFNote > mParaPDFNotes;
93  std::deque< PDFWriter::PageTransition > mParaPageTransitions;
94  ::std::map< sal_Int32, PDFLinkDestination > mFutureDestinations;
95 
96  sal_Int32 GetMappedId();
97  sal_Int32 GetMappedStructId( sal_Int32 );
98 
99  sal_Int32 mCurId;
100  std::vector< sal_Int32 > mParaIds;
101  std::vector< sal_Int32 > mStructIdMap;
102 
104  std::vector< sal_Int32 > mStructParents;
106  mCurId ( 0 ),
107  mCurrentStructElement( 0 )
108  {
109  mStructParents.push_back( 0 );
110  mStructIdMap.push_back( 0 );
111  }
112  void PlayGlobalActions( PDFWriter& rWriter );
113 };
114 
116 {
117  sal_Int32 nLinkId = mParaInts.front();
118  mParaInts.pop_front();
119 
120  /* negative values are intentionally passed as invalid IDs
121  * e.g. to create a new top level outline item
122  */
123  if( nLinkId >= 0 )
124  {
125  if ( o3tl::make_unsigned(nLinkId) < mParaIds.size() )
126  nLinkId = mParaIds[ nLinkId ];
127  else
128  nLinkId = -1;
129 
130  SAL_WARN_IF( nLinkId < 0, "vcl", "unmapped id in GlobalSyncData" );
131  }
132 
133  return nLinkId;
134 }
135 
136 sal_Int32 GlobalSyncData::GetMappedStructId( sal_Int32 nStructId )
137 {
138  if ( o3tl::make_unsigned(nStructId) < mStructIdMap.size() )
139  nStructId = mStructIdMap[ nStructId ];
140  else
141  nStructId = -1;
142 
143  SAL_WARN_IF( nStructId < 0, "vcl", "unmapped structure id in GlobalSyncData" );
144 
145  return nStructId;
146 }
147 
149 {
150  for (auto const& action : mActions)
151  {
152  switch (action)
153  {
154  case PDFExtOutDevDataSync::CreateNamedDest : //i56629
155  {
156  rWriter.Push( PushFlags::MAPMODE );
157  rWriter.SetMapMode( mParaMapModes.front() );
158  mParaMapModes.pop_front();
159  mParaIds.push_back( rWriter.CreateNamedDest( mParaOUStrings.front(), mParaRects.front(), mParaInts.front(), mParaDestAreaTypes.front() ) );
160  mParaOUStrings.pop_front();
161  mParaRects.pop_front();
162  mParaInts.pop_front();
163  mParaDestAreaTypes.pop_front();
164  rWriter.Pop();
165  }
166  break;
167  case PDFExtOutDevDataSync::CreateDest :
168  {
169  rWriter.Push( PushFlags::MAPMODE );
170  rWriter.SetMapMode( mParaMapModes.front() );
171  mParaMapModes.pop_front();
172  mParaIds.push_back( rWriter.CreateDest( mParaRects.front(), mParaInts.front(), mParaDestAreaTypes.front() ) );
173  mParaRects.pop_front();
174  mParaInts.pop_front();
175  mParaDestAreaTypes.pop_front();
176  rWriter.Pop();
177  }
178  break;
179  case PDFExtOutDevDataSync::CreateLink :
180  {
181  rWriter.Push( PushFlags::MAPMODE );
182  rWriter.SetMapMode( mParaMapModes.front() );
183  mParaMapModes.pop_front();
184  mParaIds.push_back( rWriter.CreateLink( mParaRects.front(), mParaInts.front() ) );
185  // resolve LinkAnnotation structural attribute
186  rWriter.SetLinkPropertyID( mParaIds.back(), sal_Int32(mParaIds.size()-1) );
187  mParaRects.pop_front();
188  mParaInts.pop_front();
189  rWriter.Pop();
190  }
191  break;
192  case PDFExtOutDevDataSync::CreateScreen:
193  {
194  rWriter.Push(PushFlags::MAPMODE);
195  rWriter.SetMapMode(mParaMapModes.front());
196  mParaMapModes.pop_front();
197  mParaIds.push_back(rWriter.CreateScreen(mParaRects.front(), mParaInts.front()));
198  mParaRects.pop_front();
199  mParaInts.pop_front();
200  rWriter.Pop();
201  }
202  break;
203  case PDFExtOutDevDataSync::SetLinkDest :
204  {
205  sal_Int32 nLinkId = GetMappedId();
206  sal_Int32 nDestId = GetMappedId();
207  rWriter.SetLinkDest( nLinkId, nDestId );
208  }
209  break;
210  case PDFExtOutDevDataSync::SetLinkURL :
211  {
212  sal_Int32 nLinkId = GetMappedId();
213  rWriter.SetLinkURL( nLinkId, mParaOUStrings.front() );
214  mParaOUStrings.pop_front();
215  }
216  break;
217  case PDFExtOutDevDataSync::SetScreenURL:
218  {
219  sal_Int32 nScreenId = GetMappedId();
220  rWriter.SetScreenURL(nScreenId, mParaOUStrings.front());
221  mParaOUStrings.pop_front();
222  }
223  break;
224  case PDFExtOutDevDataSync::SetScreenStream:
225  {
226  sal_Int32 nScreenId = GetMappedId();
227  rWriter.SetScreenStream(nScreenId, mParaOUStrings.front());
228  mParaOUStrings.pop_front();
229  }
230  break;
231  case PDFExtOutDevDataSync::RegisterDest :
232  {
233  const sal_Int32 nDestId = mParaInts.front();
234  mParaInts.pop_front();
235  OSL_ENSURE( mFutureDestinations.find( nDestId ) != mFutureDestinations.end(),
236  "GlobalSyncData::PlayGlobalActions: DescribeRegisteredRequest has not been called for that destination!" );
237 
238  PDFLinkDestination& rDest = mFutureDestinations[ nDestId ];
239 
240  rWriter.Push( PushFlags::MAPMODE );
241  rWriter.SetMapMode( rDest.mMapMode );
242  mParaIds.push_back( rWriter.RegisterDestReference( nDestId, rDest.mRect, rDest.mPageNr, rDest.mAreaType ) );
243  rWriter.Pop();
244  }
245  break;
246  case PDFExtOutDevDataSync::CreateOutlineItem :
247  {
248  sal_Int32 nParent = GetMappedId();
249  sal_Int32 nLinkId = GetMappedId();
250  mParaIds.push_back( rWriter.CreateOutlineItem( nParent, mParaOUStrings.front(), nLinkId ) );
251  mParaOUStrings.pop_front();
252  }
253  break;
254  case PDFExtOutDevDataSync::CreateNote :
255  {
256  rWriter.Push( PushFlags::MAPMODE );
257  rWriter.SetMapMode( mParaMapModes.front() );
258  rWriter.CreateNote( mParaRects.front(), mParaPDFNotes.front(), mParaInts.front() );
259  mParaMapModes.pop_front();
260  mParaRects.pop_front();
261  mParaPDFNotes.pop_front();
262  mParaInts.pop_front();
263  }
264  break;
265  case PDFExtOutDevDataSync::SetPageTransition :
266  {
267  rWriter.SetPageTransition( mParaPageTransitions.front(), mParauInts.front(), mParaInts.front() );
268  mParaPageTransitions.pop_front();
269  mParauInts.pop_front();
270  mParaInts.pop_front();
271  }
272  break;
273  case PDFExtOutDevDataSync::BeginStructureElement:
274  case PDFExtOutDevDataSync::EndStructureElement:
275  case PDFExtOutDevDataSync::SetCurrentStructureElement:
276  case PDFExtOutDevDataSync::SetStructureAttribute:
277  case PDFExtOutDevDataSync::SetStructureAttributeNumerical:
278  case PDFExtOutDevDataSync::SetStructureBoundingBox:
279  case PDFExtOutDevDataSync::SetActualText:
280  case PDFExtOutDevDataSync::SetAlternateText:
281  case PDFExtOutDevDataSync::CreateControl:
282  case PDFExtOutDevDataSync::BeginGroup:
283  case PDFExtOutDevDataSync::EndGroupGfxLink:
284  break;
285  }
286  }
287 }
288 
290 {
291  std::deque< PDFExtOutDevDataSync > mActions;
292  std::deque< tools::Rectangle > mParaRects;
293  std::deque< sal_Int32 > mParaInts;
294  std::deque< OUString > mParaOUStrings;
295  std::deque< PDFWriter::StructElement > mParaStructElements;
296  std::deque< PDFWriter::StructAttribute > mParaStructAttributes;
297  std::deque< PDFWriter::StructAttributeValue > mParaStructAttributeValues;
298  std::deque< Graphic > mGraphics;
300  std::deque< std::shared_ptr< PDFWriter::AnyWidget > >
303 
305 
306 
307  explicit PageSyncData( GlobalSyncData* pGlobal )
308  : mbGroupIgnoreGDIMtfActions ( false )
309  { mpGlobalData = pGlobal; }
310 
311  void PushAction( const OutputDevice& rOutDev, const PDFExtOutDevDataSync::Action eAct );
312  bool PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const GDIMetaFile& rMtf, const PDFExtOutDevData& rOutDevData );
313 };
314 
315 void PageSyncData::PushAction( const OutputDevice& rOutDev, const PDFExtOutDevDataSync::Action eAct )
316 {
317  GDIMetaFile* pMtf = rOutDev.GetConnectMetaFile();
318  SAL_WARN_IF( !pMtf, "vcl", "PageSyncData::PushAction -> no ConnectMetaFile !!!" );
319 
320  PDFExtOutDevDataSync aSync;
321  aSync.eAct = eAct;
322  if ( pMtf )
323  aSync.nIdx = pMtf->GetActionSize();
324  else
325  aSync.nIdx = 0x7fffffff; // sync not possible
326  mActions.push_back( aSync );
327 }
328 bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const GDIMetaFile& rMtf, const PDFExtOutDevData& rOutDevData )
329 {
330  bool bRet = false;
331  if ( !mActions.empty() && ( mActions.front().nIdx == rCurGDIMtfAction ) )
332  {
333  bRet = true;
334  PDFExtOutDevDataSync aDataSync = mActions.front();
335  mActions.pop_front();
336  switch( aDataSync.eAct )
337  {
338  case PDFExtOutDevDataSync::BeginStructureElement :
339  {
340  sal_Int32 nNewEl = rWriter.BeginStructureElement( mParaStructElements.front(), mParaOUStrings.front() ) ;
341  mParaStructElements.pop_front();
342  mParaOUStrings.pop_front();
343  mpGlobalData->mStructIdMap.push_back( nNewEl );
344  }
345  break;
346  case PDFExtOutDevDataSync::EndStructureElement :
347  {
348  rWriter.EndStructureElement();
349  }
350  break;
351  case PDFExtOutDevDataSync::SetCurrentStructureElement:
352  {
354  mParaInts.pop_front();
355  }
356  break;
357  case PDFExtOutDevDataSync::SetStructureAttribute :
358  {
360  mParaStructAttributeValues.pop_front();
361  mParaStructAttributes.pop_front();
362  }
363  break;
364  case PDFExtOutDevDataSync::SetStructureAttributeNumerical :
365  {
367  mParaStructAttributes.pop_front();
368  mParaInts.pop_front();
369  }
370  break;
371  case PDFExtOutDevDataSync::SetStructureBoundingBox :
372  {
373  rWriter.SetStructureBoundingBox( mParaRects.front() );
374  mParaRects.pop_front();
375  }
376  break;
377  case PDFExtOutDevDataSync::SetActualText :
378  {
379  rWriter.SetActualText( mParaOUStrings.front() );
380  mParaOUStrings.pop_front();
381  }
382  break;
383  case PDFExtOutDevDataSync::SetAlternateText :
384  {
385  rWriter.SetAlternateText( mParaOUStrings.front() );
386  mParaOUStrings.pop_front();
387  }
388  break;
389  case PDFExtOutDevDataSync::CreateControl:
390  {
391  std::shared_ptr< PDFWriter::AnyWidget > pControl( mControls.front() );
392  SAL_WARN_IF( !pControl, "vcl", "PageSyncData::PlaySyncPageAct: invalid widget!" );
393  if ( pControl )
394  rWriter.CreateControl( *pControl );
395  mControls.pop_front();
396  }
397  break;
398  case PDFExtOutDevDataSync::BeginGroup :
399  {
400  /* first determining if this BeginGroup is starting a GfxLink,
401  by searching for an EndGroup or an EndGroupGfxLink */
403  auto isStartingGfxLink = std::any_of(mActions.begin(), mActions.end(),
404  [](const PDFExtOutDevDataSync& rAction) { return rAction.eAct == PDFExtOutDevDataSync::EndGroupGfxLink; });
405  if ( isStartingGfxLink )
406  {
407  Graphic& rGraphic = mGraphics.front();
408  if ( rGraphic.IsGfxLink() && mParaRects.size() >= 2 )
409  {
410  GfxLinkType eType = rGraphic.GetGfxLink().GetType();
411  if ( eType == GfxLinkType::NativeJpg )
412  {
415  mCurrentGraphic = rGraphic;
416  }
417  else if ( eType == GfxLinkType::NativePng || eType == GfxLinkType::NativePdf )
418  {
419  if ( eType == GfxLinkType::NativePdf || rOutDevData.HasAdequateCompression(rGraphic, mParaRects[0], mParaRects[1]) )
420  mCurrentGraphic = rGraphic;
421  }
422  }
423  }
424  }
425  break;
426  case PDFExtOutDevDataSync::EndGroupGfxLink :
427  {
428  tools::Rectangle aOutputRect, aVisibleOutputRect;
429  Graphic aGraphic( mGraphics.front() );
430 
431  mGraphics.pop_front();
432  sal_Int32 nTransparency = mParaInts.front();
433  mParaInts.pop_front();
434  aOutputRect = mParaRects.front();
435  mParaRects.pop_front();
436  aVisibleOutputRect = mParaRects.front();
437  mParaRects.pop_front();
438 
440  {
441  bool bClippingNeeded = ( aOutputRect != aVisibleOutputRect ) && !aVisibleOutputRect.IsEmpty();
442 
443  GfxLink aGfxLink( aGraphic.GetGfxLink() );
444  if ( aGfxLink.GetType() == GfxLinkType::NativeJpg )
445  {
446  if ( bClippingNeeded )
447  {
448  rWriter.Push();
450  vcl::unotools::b2DRectangleFromRectangle(aVisibleOutputRect) ) );
451  rWriter.SetClipRegion( aRect);
452  }
453 
454  AlphaMask aAlphaMask;
455  if (nTransparency)
456  {
457  aAlphaMask = AlphaMask(aGraphic.GetSizePixel());
458  aAlphaMask.Erase(nTransparency);
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  auto ePixelFormat = aGraphic.GetBitmapEx().getPixelFormat();
485  rWriter.DrawJPGBitmap(aTmp, ePixelFormat > vcl::PixelFormat::N8_BPP, aGraphic.GetSizePixel(), aOutputRect, aAlphaMask, 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( o3tl::make_unsigned(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 
797 void PDFExtOutDevData::CreateControl( const PDFWriter::AnyWidget& rControlType )
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  auto nSize = rGraphic.GetGfxLink().GetDataSize();
842  if (nSize == 0)
843  return false;
844 
845  GfxLink aLink = rGraphic.GetGfxLink();
846  SvMemoryStream aMemoryStream(const_cast<sal_uInt8*>(aLink.GetData()), aLink.GetDataSize(),
847  StreamMode::READ | StreamMode::WRITE);
848  GraphicDescriptor aDescriptor(aMemoryStream, nullptr);
849  if (aDescriptor.Detect(true) && aDescriptor.GetNumberOfImageComponents() == 4)
850  // 4 means CMYK, which is not handled.
851  return false;
852 
853  const Size aSize = rGraphic.GetSizePixel();
854 
855  // small items better off as PNG anyway
856  if ( aSize.Width() < 32 &&
857  aSize.Height() < 32 )
858  return false;
859 
861  return !GetIsReduceImageResolution();
862 
863  // FIXME: ideally we'd also pre-empt the DPI related scaling too.
864  sal_Int32 nCurrentRatio = (100 * aSize.Width() * aSize.Height() * 4) /
865  nSize;
866 
867  static const struct {
868  sal_Int32 mnQuality;
869  sal_Int32 mnRatio;
870  } aRatios[] = { // minimum tolerable compression ratios
871  { 100, 400 }, { 95, 700 }, { 90, 1000 }, { 85, 1200 },
872  { 80, 1500 }, { 75, 1700 }
873  };
874  sal_Int32 nTargetRatio = 10000;
875  bool bIsTargetRatioReached = false;
876  for (auto & rRatio : aRatios)
877  {
878  if ( mnCompressionQuality > rRatio.mnQuality )
879  {
880  bIsTargetRatioReached = true;
881  break;
882  }
883  nTargetRatio = rRatio.mnRatio;
884  }
885 
886  return ((nCurrentRatio > nTargetRatio) && bIsTargetRatioReached);
887 }
888 
889 }
890 
891 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::deque< PDFWriter::StructAttributeValue > mParaStructAttributeValues
void SetCurrentPageNumber(const sal_Int32 nPage)
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:716
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:431
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:411
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:391
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:421
std::deque< sal_Int32 > mParaInts
const Size & GetSize() const
Definition: metaact.hxx:717
const MapMode & GetMapMode() const
Definition: outdev.hxx:1555
void SetIsReduceImageResolution(const bool bReduceImageResolution)
virtual ~PDFExtOutDevData() override
GDIMetaFile * GetConnectMetaFile() const
Definition: outdev.hxx:285
std::deque< tools::Rectangle > mParaRects
void SetIsExportNamedDestinations(const bool bExportNDests)
std::vector< sal_Int32 > mStructParents
bool IsGfxLink() const
Definition: graph.cxx:514
void SetStructureBoundingBox(const tools::Rectangle &rRect)
set the bounding box of a structural element
Definition: pdfwriter.cxx:416
std::unique_ptr< GlobalSyncData > mpGlobalSyncData
constexpr tools::Long Width() const
void Clear()
Definition: graph.cxx:287
bool GetIsLosslessCompression() const
void SetLinkPropertyID(sal_Int32 nLinkId, sal_Int32 nPropertyID)
Resolve link in logical structure.
Definition: pdfwriter.cxx:376
std::deque< std::shared_ptr< PDFWriter::AnyWidget > > mControls
std::deque< sal_uInt32 > mParauInts
void EndStructureElement()
end the current logical structure element
Definition: pdfwriter.cxx:396
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:347
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 SetIsExportFormFields(const bool bExportFormFields)
constexpr bool IsEmpty() const
std::deque< Graphic > mGraphics
DocumentType eType
std::deque< OUString > mParaOUStrings
void SetAlternateText(const OUString &rText)
set the Alt attribute of a strutural element
Definition: pdfwriter.cxx:426
std::deque< PDFExtOutDevDataSync::Action > mActions
void SetIsSinglePageSheets(const bool bSinglePageSheets)
void SetIsExportBookmarks(const bool bExportBookmarks)
void Erase(sal_uInt8 cTransparency)
Definition: alpha.cxx:78
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:356
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:168
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
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:411
std::deque< OUString > mParaOUStrings
void SetIsLosslessCompression(const bool bLosslessCompression)
void SetIsExportTaggedPDF(const bool bTaggedPDF)
void Push(PushFlags nFlags=PushFlags::ALL)
Definition: pdfwriter.cxx:227
std::deque< PDFExtOutDevDataSync > mActions
void SetMapMode(const MapMode &rNewMapMode)
Definition: pdfwriter.cxx:237
GfxLink GetGfxLink() const
Definition: graph.cxx:509
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:342
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:436
sal_Int32 CreateOutlineItem(sal_Int32 nParent, const OUString &rText, sal_Int32 nDestID)
Create a new outline item.
Definition: pdfwriter.cxx:381
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:406
sal_Int32 CreateLink(const tools::Rectangle &rRect, sal_Int32 nPageNr)
Create a new link on a page.
Definition: pdfwriter.cxx:332
#define SAL_WARN_IF(condition, area, stream)
constexpr tools::Long Height() const
void SetScreenURL(sal_Int32 nScreenId, const OUString &rURL)
Sets the URL of a linked screen annotation.
Definition: pdfwriter.cxx:366
unsigned char sal_uInt8
MetaAction * GetAction(size_t nAction) const
Definition: gdimtf.cxx:184
void DrawJPGBitmap(SvStream &rJPGData, bool bIsTrueColor, const Size &rSrcSizePixel, const tools::Rectangle &rTargetArea, const AlphaMask &rAlphaMask, const Graphic &rGraphic)
Insert a JPG encoded image (optionally with mask)
Definition: pdfwriter.cxx:327
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:361
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:179
void SetDocumentLocale(const css::lang::Locale &rLoc)
MetaActionType GetType() const
Definition: metaact.hxx:91
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:351
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:386
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:337
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:371
void SetClipRegion()
Definition: pdfwriter.cxx:252
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:401