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>
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
37namespace vcl
38{
39namespace {
40
41struct 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
73struct PDFLinkDestination
74{
75 tools::Rectangle mRect;
76 MapMode mMapMode;
77 sal_Int32 mPageNr;
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 ),
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
136sal_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(), mParaOUStrings.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 mParaOUStrings.pop_front();
190 rWriter.Pop();
191 }
192 break;
193 case PDFExtOutDevDataSync::CreateScreen:
194 {
195 rWriter.Push(PushFlags::MAPMODE);
196 rWriter.SetMapMode(mParaMapModes.front());
197 mParaMapModes.pop_front();
198 mParaIds.push_back(rWriter.CreateScreen(mParaRects.front(), mParaInts.front()));
199 mParaRects.pop_front();
200 mParaInts.pop_front();
201 rWriter.Pop();
202 }
203 break;
204 case PDFExtOutDevDataSync::SetLinkDest :
205 {
206 sal_Int32 nLinkId = GetMappedId();
207 sal_Int32 nDestId = GetMappedId();
208 rWriter.SetLinkDest( nLinkId, nDestId );
209 }
210 break;
211 case PDFExtOutDevDataSync::SetLinkURL :
212 {
213 sal_Int32 nLinkId = GetMappedId();
214 rWriter.SetLinkURL( nLinkId, mParaOUStrings.front() );
215 mParaOUStrings.pop_front();
216 }
217 break;
218 case PDFExtOutDevDataSync::SetScreenURL:
219 {
220 sal_Int32 nScreenId = GetMappedId();
221 rWriter.SetScreenURL(nScreenId, mParaOUStrings.front());
222 mParaOUStrings.pop_front();
223 }
224 break;
225 case PDFExtOutDevDataSync::SetScreenStream:
226 {
227 sal_Int32 nScreenId = GetMappedId();
228 rWriter.SetScreenStream(nScreenId, mParaOUStrings.front());
229 mParaOUStrings.pop_front();
230 }
231 break;
232 case PDFExtOutDevDataSync::RegisterDest :
233 {
234 const sal_Int32 nDestId = mParaInts.front();
235 mParaInts.pop_front();
236 OSL_ENSURE( mFutureDestinations.find( nDestId ) != mFutureDestinations.end(),
237 "GlobalSyncData::PlayGlobalActions: DescribeRegisteredRequest has not been called for that destination!" );
238
239 PDFLinkDestination& rDest = mFutureDestinations[ nDestId ];
240
241 rWriter.Push( PushFlags::MAPMODE );
242 rWriter.SetMapMode( rDest.mMapMode );
243 mParaIds.push_back( rWriter.RegisterDestReference( nDestId, rDest.mRect, rDest.mPageNr, rDest.mAreaType ) );
244 rWriter.Pop();
245 }
246 break;
247 case PDFExtOutDevDataSync::CreateOutlineItem :
248 {
249 sal_Int32 nParent = GetMappedId();
250 sal_Int32 nLinkId = GetMappedId();
251 mParaIds.push_back( rWriter.CreateOutlineItem( nParent, mParaOUStrings.front(), nLinkId ) );
252 mParaOUStrings.pop_front();
253 }
254 break;
255 case PDFExtOutDevDataSync::CreateNote :
256 {
257 rWriter.Push( PushFlags::MAPMODE );
258 rWriter.SetMapMode( mParaMapModes.front() );
259 rWriter.CreateNote( mParaRects.front(), mParaPDFNotes.front(), mParaInts.front() );
260 mParaMapModes.pop_front();
261 mParaRects.pop_front();
262 mParaPDFNotes.pop_front();
263 mParaInts.pop_front();
264 }
265 break;
266 case PDFExtOutDevDataSync::SetPageTransition :
267 {
268 rWriter.SetPageTransition( mParaPageTransitions.front(), mParauInts.front(), mParaInts.front() );
269 mParaPageTransitions.pop_front();
270 mParauInts.pop_front();
271 mParaInts.pop_front();
272 }
273 break;
274 case PDFExtOutDevDataSync::BeginStructureElement:
275 case PDFExtOutDevDataSync::EndStructureElement:
276 case PDFExtOutDevDataSync::SetCurrentStructureElement:
277 case PDFExtOutDevDataSync::SetStructureAttribute:
278 case PDFExtOutDevDataSync::SetStructureAttributeNumerical:
279 case PDFExtOutDevDataSync::SetStructureBoundingBox:
280 case PDFExtOutDevDataSync::SetActualText:
281 case PDFExtOutDevDataSync::SetAlternateText:
282 case PDFExtOutDevDataSync::CreateControl:
283 case PDFExtOutDevDataSync::BeginGroup:
284 case PDFExtOutDevDataSync::EndGroupGfxLink:
285 break;
286 }
287 }
288}
289
291{
292 std::deque< PDFExtOutDevDataSync > mActions;
293 std::deque< tools::Rectangle > mParaRects;
294 std::deque< sal_Int32 > mParaInts;
295 std::deque< OUString > mParaOUStrings;
296 std::deque< PDFWriter::StructElement > mParaStructElements;
297 std::deque< PDFWriter::StructAttribute > mParaStructAttributes;
298 std::deque< PDFWriter::StructAttributeValue > mParaStructAttributeValues;
299 std::deque< Graphic > mGraphics;
301 std::deque< std::shared_ptr< PDFWriter::AnyWidget > >
304
306
307
308 explicit PageSyncData( GlobalSyncData* pGlobal )
310 { mpGlobalData = pGlobal; }
311
312 void PushAction( const OutputDevice& rOutDev, const PDFExtOutDevDataSync::Action eAct );
313 bool PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const GDIMetaFile& rMtf, const PDFExtOutDevData& rOutDevData );
314};
315
316void PageSyncData::PushAction( const OutputDevice& rOutDev, const PDFExtOutDevDataSync::Action eAct )
317{
318 GDIMetaFile* pMtf = rOutDev.GetConnectMetaFile();
319 SAL_WARN_IF( !pMtf, "vcl", "PageSyncData::PushAction -> no ConnectMetaFile !!!" );
320
321 PDFExtOutDevDataSync aSync;
322 aSync.eAct = eAct;
323 if ( pMtf )
324 aSync.nIdx = pMtf->GetActionSize();
325 else
326 aSync.nIdx = 0x7fffffff; // sync not possible
327 mActions.push_back( aSync );
328}
329bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const GDIMetaFile& rMtf, const PDFExtOutDevData& rOutDevData )
330{
331 bool bRet = false;
332 if ( !mActions.empty() && ( mActions.front().nIdx == rCurGDIMtfAction ) )
333 {
334 bRet = true;
335 PDFExtOutDevDataSync aDataSync = mActions.front();
336 mActions.pop_front();
337 switch( aDataSync.eAct )
338 {
339 case PDFExtOutDevDataSync::BeginStructureElement :
340 {
341 sal_Int32 nNewEl = rWriter.BeginStructureElement( mParaStructElements.front(), mParaOUStrings.front() ) ;
342 mParaStructElements.pop_front();
343 mParaOUStrings.pop_front();
344 mpGlobalData->mStructIdMap.push_back( nNewEl );
345 }
346 break;
347 case PDFExtOutDevDataSync::EndStructureElement :
348 {
349 rWriter.EndStructureElement();
350 }
351 break;
352 case PDFExtOutDevDataSync::SetCurrentStructureElement:
353 {
355 mParaInts.pop_front();
356 }
357 break;
358 case PDFExtOutDevDataSync::SetStructureAttribute :
359 {
361 mParaStructAttributeValues.pop_front();
362 mParaStructAttributes.pop_front();
363 }
364 break;
365 case PDFExtOutDevDataSync::SetStructureAttributeNumerical :
366 {
368 mParaStructAttributes.pop_front();
369 mParaInts.pop_front();
370 }
371 break;
372 case PDFExtOutDevDataSync::SetStructureBoundingBox :
373 {
374 rWriter.SetStructureBoundingBox( mParaRects.front() );
375 mParaRects.pop_front();
376 }
377 break;
378 case PDFExtOutDevDataSync::SetActualText :
379 {
380 rWriter.SetActualText( mParaOUStrings.front() );
381 mParaOUStrings.pop_front();
382 }
383 break;
384 case PDFExtOutDevDataSync::SetAlternateText :
385 {
386 rWriter.SetAlternateText( mParaOUStrings.front() );
387 mParaOUStrings.pop_front();
388 }
389 break;
390 case PDFExtOutDevDataSync::CreateControl:
391 {
392 std::shared_ptr< PDFWriter::AnyWidget > pControl( mControls.front() );
393 SAL_WARN_IF( !pControl, "vcl", "PageSyncData::PlaySyncPageAct: invalid widget!" );
394 if ( pControl )
395 rWriter.CreateControl( *pControl );
396 mControls.pop_front();
397 }
398 break;
399 case PDFExtOutDevDataSync::BeginGroup :
400 {
401 /* first determining if this BeginGroup is starting a GfxLink,
402 by searching for an EndGroup or an EndGroupGfxLink */
404 auto isStartingGfxLink = std::any_of(mActions.begin(), mActions.end(),
405 [](const PDFExtOutDevDataSync& rAction) { return rAction.eAct == PDFExtOutDevDataSync::EndGroupGfxLink; });
406 if ( isStartingGfxLink )
407 {
408 Graphic& rGraphic = mGraphics.front();
409 if ( rGraphic.IsGfxLink() && mParaRects.size() >= 2 )
410 {
411 GfxLinkType eType = rGraphic.GetGfxLink().GetType();
413 {
416 mCurrentGraphic = rGraphic;
417 }
419 {
420 if ( eType == GfxLinkType::NativePdf || rOutDevData.HasAdequateCompression(rGraphic, mParaRects[0], mParaRects[1]) )
421 mCurrentGraphic = rGraphic;
422 }
423 }
424 }
425 }
426 break;
427 case PDFExtOutDevDataSync::EndGroupGfxLink :
428 {
429 tools::Rectangle aOutputRect, aVisibleOutputRect;
430 Graphic aGraphic( mGraphics.front() );
431
432 mGraphics.pop_front();
433 sal_Int32 nTransparency = mParaInts.front();
434 mParaInts.pop_front();
435 aOutputRect = mParaRects.front();
436 mParaRects.pop_front();
437 aVisibleOutputRect = mParaRects.front();
438 mParaRects.pop_front();
439
441 {
442 bool bClippingNeeded = ( aOutputRect != aVisibleOutputRect ) && !aVisibleOutputRect.IsEmpty();
443
444 GfxLink aGfxLink( aGraphic.GetGfxLink() );
445 if ( aGfxLink.GetType() == GfxLinkType::NativeJpg )
446 {
447 if ( bClippingNeeded )
448 {
449 rWriter.Push();
451 vcl::unotools::b2DRectangleFromRectangle(aVisibleOutputRect) ) );
452 rWriter.SetClipRegion( aRect);
453 }
454
455 AlphaMask aAlphaMask;
456 if (nTransparency)
457 {
458 aAlphaMask = AlphaMask(aGraphic.GetSizePixel());
459 aAlphaMask.Erase(nTransparency);
460 }
461
462 SvMemoryStream aTmp;
463 const sal_uInt8* pData = aGfxLink.GetData();
464 sal_uInt32 nBytes = aGfxLink.GetDataSize();
465 if( pData && nBytes )
466 {
467 aTmp.WriteBytes( pData, nBytes );
468
469 // Look up the output rectangle from the previous
470 // bitmap scale action if possible. This has the
471 // correct position and size for images with a
472 // custom translation (Writer header) or scaling
473 // (Impress notes page).
474 if (rCurGDIMtfAction > 0)
475 {
476 const MetaAction* pAction = rMtf.GetAction(rCurGDIMtfAction - 1);
477 if (pAction && pAction->GetType() == MetaActionType::BMPSCALE)
478 {
479 const MetaBmpScaleAction* pA
480 = static_cast<const MetaBmpScaleAction*>(pAction);
481 aOutputRect.SetPos(pA->GetPoint());
482 aOutputRect.SetSize(pA->GetSize());
483 }
484 }
485 auto ePixelFormat = aGraphic.GetBitmapEx().getPixelFormat();
486 rWriter.DrawJPGBitmap(aTmp, ePixelFormat > vcl::PixelFormat::N8_BPP, aGraphic.GetSizePixel(), aOutputRect, aAlphaMask, aGraphic);
487 }
488
489 if ( bClippingNeeded )
490 rWriter.Pop();
491 }
493 }
495 }
496 break;
497 case PDFExtOutDevDataSync::CreateNamedDest:
498 case PDFExtOutDevDataSync::CreateDest:
499 case PDFExtOutDevDataSync::CreateLink:
500 case PDFExtOutDevDataSync::CreateScreen:
501 case PDFExtOutDevDataSync::SetLinkDest:
502 case PDFExtOutDevDataSync::SetLinkURL:
503 case PDFExtOutDevDataSync::SetScreenURL:
504 case PDFExtOutDevDataSync::SetScreenStream:
505 case PDFExtOutDevDataSync::RegisterDest:
506 case PDFExtOutDevDataSync::CreateOutlineItem:
507 case PDFExtOutDevDataSync::CreateNote:
508 case PDFExtOutDevDataSync::SetPageTransition:
509 break;
510 }
511 }
513 {
514 rCurGDIMtfAction++;
515 bRet = true;
516 }
517 return bRet;
518}
519
521 mrOutDev ( rOutDev ),
522 mbTaggedPDF ( false ),
523 mbExportNotes ( true ),
524 mbExportNotesPages ( false ),
525 mbTransitionEffects ( true ),
526 mbUseLosslessCompression( true ),
527 mbReduceImageResolution ( false ),
528 mbExportFormFields ( false ),
529 mbExportBookmarks ( false ),
530 mbExportHiddenSlides ( false ),
531 mbSinglePageSheets ( false ),
532 mbExportNDests ( false ),
533 mnPage ( -1 ),
534 mnCompressionQuality ( 90 ),
535 mpGlobalSyncData ( new GlobalSyncData() )
536{
537 mpPageSyncData.reset( new PageSyncData( mpGlobalSyncData.get() ) );
538}
539
541{
542 mpPageSyncData.reset();
543 mpGlobalSyncData.reset();
544}
545
547{
548 return mpPageSyncData->mCurrentGraphic;
549}
550
551void PDFExtOutDevData::SetDocumentLocale( const css::lang::Locale& rLoc )
552{
553 maDocLocale = rLoc;
554}
555void PDFExtOutDevData::SetCurrentPageNumber( const sal_Int32 nPage )
556{
557 mnPage = nPage;
558}
559void PDFExtOutDevData::SetIsLosslessCompression( const bool bUseLosslessCompression )
560{
561 mbUseLosslessCompression = bUseLosslessCompression;
562}
563void PDFExtOutDevData::SetCompressionQuality( const sal_Int32 nQuality )
564{
565 mnCompressionQuality = nQuality;
566}
567void PDFExtOutDevData::SetIsReduceImageResolution( const bool bReduceImageResolution )
568{
569 mbReduceImageResolution = bReduceImageResolution;
570}
571void PDFExtOutDevData::SetIsExportNotes( const bool bExportNotes )
572{
573 mbExportNotes = bExportNotes;
574}
575void PDFExtOutDevData::SetIsExportNotesInMargin( const bool bExportNotesInMargin )
576{
577 mbExportNotesInMargin = bExportNotesInMargin;
578}
579void PDFExtOutDevData::SetIsExportNotesPages( const bool bExportNotesPages )
580{
581 mbExportNotesPages = bExportNotesPages;
582}
583void PDFExtOutDevData::SetIsExportTaggedPDF( const bool bTaggedPDF )
584{
585 mbTaggedPDF = bTaggedPDF;
586}
587void PDFExtOutDevData::SetIsExportTransitionEffects( const bool bTransitionEffects )
588{
589 mbTransitionEffects = bTransitionEffects;
590}
591void PDFExtOutDevData::SetIsExportFormFields( const bool bExportFomtFields )
592{
593 mbExportFormFields = bExportFomtFields;
594}
595void PDFExtOutDevData::SetIsExportBookmarks( const bool bExportBookmarks )
596{
597 mbExportBookmarks = bExportBookmarks;
598}
599void PDFExtOutDevData::SetIsExportHiddenSlides( const bool bExportHiddenSlides )
600{
601 mbExportHiddenSlides = bExportHiddenSlides;
602}
603void PDFExtOutDevData::SetIsSinglePageSheets( const bool bSinglePageSheets )
604{
605 mbSinglePageSheets = bSinglePageSheets;
606}
608{
609 mbExportNDests = bExportNDests;
610}
612{
614}
615bool PDFExtOutDevData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rIdx, const GDIMetaFile& rMtf )
616{
617 return mpPageSyncData->PlaySyncPageAct( rWriter, rIdx, rMtf, *this );
618}
620{
621 mpGlobalSyncData->PlayGlobalActions( rWriter );
622}
623
624/* global actions, synchronisation to the recorded metafile isn't needed,
625 all actions will be played after the last page was recorded
626*/
627//--->i56629
628sal_Int32 PDFExtOutDevData::CreateNamedDest(const OUString& sDestName, const tools::Rectangle& rRect, sal_Int32 nPageNr )
629{
630 mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateNamedDest );
631 mpGlobalSyncData->mParaOUStrings.push_back( sDestName );
632 mpGlobalSyncData->mParaRects.push_back( rRect );
633 mpGlobalSyncData->mParaMapModes.push_back( mrOutDev.GetMapMode() );
634 mpGlobalSyncData->mParaInts.push_back( nPageNr == -1 ? mnPage : nPageNr );
635 mpGlobalSyncData->mParaDestAreaTypes.push_back( PDFWriter::DestAreaType::XYZ );
636
637 return mpGlobalSyncData->mCurId++;
638}
639//<---i56629
641{
642 const sal_Int32 nLinkDestID = mpGlobalSyncData->mCurId++;
643 mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::RegisterDest );
644 mpGlobalSyncData->mParaInts.push_back( nLinkDestID );
645
646 return nLinkDestID;
647}
648void PDFExtOutDevData::DescribeRegisteredDest( sal_Int32 nDestId, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
649{
650 OSL_PRECOND( nDestId != -1, "PDFExtOutDevData::DescribeRegisteredDest: invalid destination Id!" );
651 PDFLinkDestination aLinkDestination;
652 aLinkDestination.mRect = rRect;
653 aLinkDestination.mMapMode = mrOutDev.GetMapMode();
654 aLinkDestination.mPageNr = nPageNr == -1 ? mnPage : nPageNr;
655 aLinkDestination.mAreaType = eType;
656 mpGlobalSyncData->mFutureDestinations[ nDestId ] = aLinkDestination;
657}
658sal_Int32 PDFExtOutDevData::CreateDest( const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
659{
660 mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateDest );
661 mpGlobalSyncData->mParaRects.push_back( rRect );
662 mpGlobalSyncData->mParaMapModes.push_back( mrOutDev.GetMapMode() );
663 mpGlobalSyncData->mParaInts.push_back( nPageNr == -1 ? mnPage : nPageNr );
664 mpGlobalSyncData->mParaDestAreaTypes.push_back( eType );
665 return mpGlobalSyncData->mCurId++;
666}
667sal_Int32 PDFExtOutDevData::CreateLink(const tools::Rectangle& rRect, OUString const& rAltText, sal_Int32 nPageNr)
668{
669 mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateLink );
670 mpGlobalSyncData->mParaRects.push_back( rRect );
671 mpGlobalSyncData->mParaMapModes.push_back( mrOutDev.GetMapMode() );
672 mpGlobalSyncData->mParaInts.push_back( nPageNr == -1 ? mnPage : nPageNr );
673 mpGlobalSyncData->mParaOUStrings.push_back(rAltText);
674 return mpGlobalSyncData->mCurId++;
675}
676
677sal_Int32 PDFExtOutDevData::CreateScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr)
678{
679 mpGlobalSyncData->mActions.push_back(PDFExtOutDevDataSync::CreateScreen);
680 mpGlobalSyncData->mParaRects.push_back(rRect);
681 mpGlobalSyncData->mParaMapModes.push_back(mrOutDev.GetMapMode());
682 mpGlobalSyncData->mParaInts.push_back(nPageNr);
683 return mpGlobalSyncData->mCurId++;
684}
685
686void PDFExtOutDevData::SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId )
687{
688 mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::SetLinkDest );
689 mpGlobalSyncData->mParaInts.push_back( nLinkId );
690 mpGlobalSyncData->mParaInts.push_back( nDestId );
691}
692void PDFExtOutDevData::SetLinkURL( sal_Int32 nLinkId, const OUString& rURL )
693{
694 mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::SetLinkURL );
695 mpGlobalSyncData->mParaInts.push_back( nLinkId );
696 mpGlobalSyncData->mParaOUStrings.push_back( rURL );
697}
698
699void PDFExtOutDevData::SetScreenURL(sal_Int32 nScreenId, const OUString& rURL)
700{
701 mpGlobalSyncData->mActions.push_back(PDFExtOutDevDataSync::SetScreenURL);
702 mpGlobalSyncData->mParaInts.push_back(nScreenId);
703 mpGlobalSyncData->mParaOUStrings.push_back(rURL);
704}
705
706void PDFExtOutDevData::SetScreenStream(sal_Int32 nScreenId, const OUString& rURL)
707{
708 mpGlobalSyncData->mActions.push_back(PDFExtOutDevDataSync::SetScreenStream);
709 mpGlobalSyncData->mParaInts.push_back(nScreenId);
710 mpGlobalSyncData->mParaOUStrings.push_back(rURL);
711}
712
713sal_Int32 PDFExtOutDevData::CreateOutlineItem( sal_Int32 nParent, const OUString& rText, sal_Int32 nDestID )
714{
715 if (nParent == -1)
716 // Has no parent, it's a chapter / heading 1.
717 maChapterNames.push_back(rText);
718
719 mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateOutlineItem );
720 mpGlobalSyncData->mParaInts.push_back( nParent );
721 mpGlobalSyncData->mParaOUStrings.push_back( rText );
722 mpGlobalSyncData->mParaInts.push_back( nDestID );
723 return mpGlobalSyncData->mCurId++;
724}
725void PDFExtOutDevData::CreateNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr )
726{
727 mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateNote );
728 mpGlobalSyncData->mParaRects.push_back( rRect );
729 mpGlobalSyncData->mParaMapModes.push_back( mrOutDev.GetMapMode() );
730 mpGlobalSyncData->mParaPDFNotes.push_back( rNote );
731 mpGlobalSyncData->mParaInts.push_back( nPageNr == -1 ? mnPage : nPageNr );
732}
734{
735 mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::SetPageTransition );
736 mpGlobalSyncData->mParaPageTransitions.push_back( eType );
737 mpGlobalSyncData->mParauInts.push_back( nMilliSec );
738 mpGlobalSyncData->mParaInts.push_back( mnPage );
739}
740
741/* local (page), actions have to be played synchronously to the actions of
742 of the recorded metafile (created by each xRenderable->render()) */
743 sal_Int32 PDFExtOutDevData::BeginStructureElement( PDFWriter::StructElement eType, const OUString& rAlias )
744{
745 mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::BeginStructureElement );
746 mpPageSyncData->mParaStructElements.push_back( eType );
747 mpPageSyncData->mParaOUStrings.push_back( rAlias );
748 // need a global id
749 sal_Int32 nNewId = mpGlobalSyncData->mStructParents.size();
750 mpGlobalSyncData->mStructParents.push_back( mpGlobalSyncData->mCurrentStructElement );
751 mpGlobalSyncData->mCurrentStructElement = nNewId;
752 return nNewId;
753}
755{
756 mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::EndStructureElement );
757 mpGlobalSyncData->mCurrentStructElement = mpGlobalSyncData->mStructParents[ mpGlobalSyncData->mCurrentStructElement ];
758}
760{
761 bool bSuccess = false;
762 if( o3tl::make_unsigned(nStructId) < mpGlobalSyncData->mStructParents.size() )
763 {
764 mpGlobalSyncData->mCurrentStructElement = nStructId;
765 mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetCurrentStructureElement );
766 mpPageSyncData->mParaInts.push_back( nStructId );
767 bSuccess = true;
768 }
769 return bSuccess;
770}
772{
773 return mpGlobalSyncData->mCurrentStructElement;
774}
776{
777 mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetStructureAttribute );
778 mpPageSyncData->mParaStructAttributes.push_back( eAttr );
779 mpPageSyncData->mParaStructAttributeValues.push_back( eVal );
780}
782{
783 mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetStructureAttributeNumerical );
784 mpPageSyncData->mParaStructAttributes.push_back( eAttr );
785 mpPageSyncData->mParaInts.push_back( nValue );
786}
788{
789 mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetStructureBoundingBox );
790 mpPageSyncData->mParaRects.push_back( rRect );
791}
792void PDFExtOutDevData::SetActualText( const OUString& rText )
793{
794 mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetActualText );
795 mpPageSyncData->mParaOUStrings.push_back( rText );
796}
797void PDFExtOutDevData::SetAlternateText( const OUString& rText )
798{
799 mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetAlternateText );
800 mpPageSyncData->mParaOUStrings.push_back( rText );
801}
802
804{
805 mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::CreateControl );
806
807 std::shared_ptr< PDFWriter::AnyWidget > pClone( rControlType.Clone() );
808 mpPageSyncData->mControls.push_back( pClone );
809}
810
812{
813 mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::BeginGroup );
814}
815
817 sal_uInt8 nTransparency,
818 const tools::Rectangle& rOutputRect,
819 const tools::Rectangle& rVisibleOutputRect )
820{
821 mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::EndGroupGfxLink );
822 mpPageSyncData->mGraphics.push_back( rGraphic );
823 mpPageSyncData->mParaInts.push_back( nTransparency );
824 mpPageSyncData->mParaRects.push_back( rOutputRect );
825 mpPageSyncData->mParaRects.push_back( rVisibleOutputRect );
826}
827
828// Avoids expensive de-compression and re-compression of large images.
830 const tools::Rectangle & rOutputRect,
831 const tools::Rectangle & rVisibleOutputRect ) const
832{
833 assert(rGraphic.IsGfxLink() &&
834 (rGraphic.GetGfxLink().GetType() == GfxLinkType::NativeJpg ||
835 rGraphic.GetGfxLink().GetType() == GfxLinkType::NativePng ||
836 rGraphic.GetGfxLink().GetType() == GfxLinkType::NativePdf));
837
838 if (rOutputRect != rVisibleOutputRect)
839 // rOutputRect is the crop rectangle, re-compress cropped image.
840 return false;
841
843 // Reducing resolution was requested, implies that re-compressing is
844 // wanted.
845 return false;
846
847 auto nSize = rGraphic.GetGfxLink().GetDataSize();
848 if (nSize == 0)
849 return false;
850
851 GfxLink aLink = rGraphic.GetGfxLink();
852 SvMemoryStream aMemoryStream(const_cast<sal_uInt8*>(aLink.GetData()), aLink.GetDataSize(),
853 StreamMode::READ | StreamMode::WRITE);
854 GraphicDescriptor aDescriptor(aMemoryStream, nullptr);
855 if (aDescriptor.Detect(true) && aDescriptor.GetNumberOfImageComponents() == 4)
856 // 4 means CMYK, which is not handled.
857 return false;
858
859 const Size aSize = rGraphic.GetSizePixel();
860
861 // small items better off as PNG anyway
862 if ( aSize.Width() < 32 &&
863 aSize.Height() < 32 )
864 return false;
865
868
869 // FIXME: ideally we'd also pre-empt the DPI related scaling too.
870 sal_Int32 nCurrentRatio = (100 * aSize.Width() * aSize.Height() * 4) /
871 nSize;
872
873 static const struct {
874 sal_Int32 mnQuality;
875 sal_Int32 mnRatio;
876 } aRatios[] = { // minimum tolerable compression ratios
877 { 100, 400 }, { 95, 700 }, { 90, 1000 }, { 85, 1200 },
878 { 80, 1500 }, { 75, 1700 }
879 };
880 sal_Int32 nTargetRatio = 10000;
881 bool bIsTargetRatioReached = false;
882 for (auto & rRatio : aRatios)
883 {
884 if ( mnCompressionQuality > rRatio.mnQuality )
885 {
886 bIsTargetRatioReached = true;
887 break;
888 }
889 nTargetRatio = rRatio.mnRatio;
890 }
891
892 return ((nCurrentRatio > nTargetRatio) && bIsTargetRatioReached);
893}
894
895}
896
897/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void Erase(sal_uInt8 cTransparency)
Definition: alpha.cxx:78
vcl::PixelFormat getPixelFormat() const
Definition: bitmapex.hxx:81
size_t GetActionSize() const
Definition: gdimtf.cxx:179
MetaAction * GetAction(size_t nAction) const
Definition: gdimtf.cxx:184
sal_uInt8 GetNumberOfImageComponents() const
bool Detect(bool bExtendedInfo=false)
starts the detection
GfxLink GetGfxLink() const
Definition: graph.cxx:509
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
Definition: graph.cxx:329
void Clear()
Definition: graph.cxx:287
Size GetSizePixel(const OutputDevice *pRefDevice=nullptr) const
Definition: graph.cxx:411
bool IsGfxLink() const
Definition: graph.cxx:514
MetaActionType GetType() const
Definition: metaact.hxx:94
const Point & GetPoint() const
Definition: metaact.hxx:724
const Size & GetSize() const
Definition: metaact.hxx:725
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:171
GDIMetaFile * GetConnectMetaFile() const
Definition: outdev.hxx:286
const MapMode & GetMapMode() const
Definition: outdev.hxx:1558
constexpr tools::Long Height() const
constexpr tools::Long Width() const
std::size_t WriteBytes(const void *pData, std::size_t nSize)
void SetSize(const Size &)
void SetPos(const Point &rPoint)
constexpr bool IsEmpty() const
bool SetCurrentStructureElement(sal_Int32 nElement)
set the current structure element
void SetStructureBoundingBox(const tools::Rectangle &rRect)
set the bounding box of a structural element
void SetIsExportNamedDestinations(const bool bExportNDests)
void CreateNote(const tools::Rectangle &rRect, const PDFNote &rNote, sal_Int32 nPageNr=-1)
Create a new note on a page.
std::unique_ptr< GlobalSyncData > mpGlobalSyncData
bool GetIsLosslessCompression() const
std::unique_ptr< PageSyncData > mpPageSyncData
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 SetDocumentLocale(const css::lang::Locale &rLoc)
void SetStructureAttributeNumerical(PDFWriter::StructAttribute eAttr, sal_Int32 nValue)
set a structure attribute on the current structural element
void SetScreenStream(sal_Int32 nScreenId, const OUString &rURL)
Set URL for an embedded Screen annotation.
void SetAlternateText(const OUString &rText)
set the Alt attribute of a strutural element
void SetIsExportNotes(const bool bExportNotes)
sal_Int32 GetCurrentStructureElement() const
get the current structure element id
sal_Int32 RegisterDest()
registers a destination for which a destination ID needs to be known immediately, instead of later on...
PDFExtOutDevData(const OutputDevice &rOutDev)
void SetIsExportTaggedPDF(const bool bTaggedPDF)
void SetStructureAttribute(PDFWriter::StructAttribute eAttr, PDFWriter::StructAttributeValue eVal)
set a structure attribute on the current structural element
bool PlaySyncPageAct(PDFWriter &rWriter, sal_uInt32 &rCurGDIMtfAction, const GDIMetaFile &rMtf)
bool GetIsReduceImageResolution() const
void SetPageTransition(PDFWriter::PageTransition eType, sal_uInt32 nMilliSec)
Sets the transitional effect to be applied when the current page gets shown.
css::lang::Locale maDocLocale
void SetIsExportNotesPages(const bool bExportNotesPages)
const Graphic & GetCurrentGraphic() const
void SetActualText(const OUString &rText)
set the ActualText attribute of a structural element
void PlayGlobalActions(PDFWriter &rWriter)
void BeginGroup()
Start a new group of render output.
void SetScreenURL(sal_Int32 nScreenId, const OUString &rURL)
Set URL for a linked Screen annotation.
void SetIsLosslessCompression(const bool bLosslessCompression)
void SetIsReduceImageResolution(const bool bReduceImageResolution)
void SetCurrentPageNumber(const sal_Int32 nPage)
void EndGroup(const Graphic &rGraphic, sal_uInt8 nTransparency, const tools::Rectangle &rOutputRect, const tools::Rectangle &rVisibleOutputRect)
End render output.
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...
void SetLinkURL(sal_Int32 nLinkId, const OUString &rURL)
Set the URL for a link.
void CreateControl(const PDFWriter::AnyWidget &rControlType)
create a new form control
sal_Int32 CreateOutlineItem(sal_Int32 nParent, const OUString &rText, sal_Int32 nDestID)
Create a new outline item.
void SetIsExportBookmarks(const bool bExportBookmarks)
sal_Int32 BeginStructureElement(PDFWriter::StructElement eType, const OUString &rAlias=OUString())
begin a new logical structure element
std::vector< OUString > maChapterNames
void SetIsExportHiddenSlides(const bool bExportHiddenSlides)
void SetIsSinglePageSheets(const bool bSinglePageSheets)
void SetIsExportTransitionEffects(const bool bTransitionalEffects)
void SetIsExportFormFields(const bool bExportFormFields)
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 CreateScreen(const tools::Rectangle &rRect, sal_Int32 nPageNr)
Create a Screen annotation.
sal_Int32 CreateLink(const tools::Rectangle &rRect, OUString const &rAltText, sal_Int32 nPageNr=-1)
Create a new link on a page.
void EndStructureElement()
end a logical structure element
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.
virtual ~PDFExtOutDevData() override
void SetCompressionQuality(const sal_Int32 nQuality)
const OutputDevice & mrOutDev
void SetIsExportNotesInMargin(const bool bExportNotesInMargin)
void SetLinkDest(sal_Int32 nLinkId, sal_Int32 nDestId)
Set the destination for a link.
void CreateNote(const tools::Rectangle &rRect, const PDFNote &rNote, sal_Int32 nPageNr)
Create a new note on a page.
Definition: pdfwriter.cxx:387
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:357
void SetScreenURL(sal_Int32 nScreenId, const OUString &rURL)
Sets the URL of a linked screen annotation.
Definition: pdfwriter.cxx:367
void SetActualText(const OUString &rText)
set the ActualText attribute of a structural element
Definition: pdfwriter.cxx:422
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:362
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:348
void Push(PushFlags nFlags=PushFlags::ALL)
Definition: pdfwriter.cxx:228
sal_Int32 CreateControl(const AnyWidget &rControlType)
create a new form control
Definition: pdfwriter.cxx:437
void SetCurrentStructureElement(sal_Int32 nElement)
set the current structure element
Definition: pdfwriter.cxx:402
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:343
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:328
void SetClipRegion()
Definition: pdfwriter.cxx:253
sal_Int32 BeginStructureElement(enum StructElement eType, std::u16string_view rAlias)
begin a new logical structure element
Definition: pdfwriter.cxx:392
sal_Int32 CreateScreen(const tools::Rectangle &rRect, sal_Int32 nPageNr)
Creates a screen annotation.
Definition: pdfwriter.cxx:338
void SetMapMode(const MapMode &rNewMapMode)
Definition: pdfwriter.cxx:238
void SetAlternateText(const OUString &rText)
set the Alt attribute of a strutural element
Definition: pdfwriter.cxx:427
void SetStructureBoundingBox(const tools::Rectangle &rRect)
set the bounding box of a structural element
Definition: pdfwriter.cxx:417
void SetStructureAttributeNumerical(enum StructAttribute eAttr, sal_Int32 nValue)
set a structure attribute on the current structural element
Definition: pdfwriter.cxx:412
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:432
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:352
void SetLinkPropertyID(sal_Int32 nLinkId, sal_Int32 nPropertyID)
Resolve link in logical structure.
Definition: pdfwriter.cxx:377
sal_Int32 CreateLink(const tools::Rectangle &rRect, sal_Int32 nPageNr, OUString const &rAltText)
Create a new link on a page.
Definition: pdfwriter.cxx:333
void EndStructureElement()
end the current logical structure element
Definition: pdfwriter.cxx:397
void SetStructureAttribute(enum StructAttribute eAttr, enum StructAttributeValue eVal)
set a structure attribute on the current structural element
Definition: pdfwriter.cxx:407
sal_Int32 CreateOutlineItem(sal_Int32 nParent, std::u16string_view rText, sal_Int32 nDestID)
Create a new outline item.
Definition: pdfwriter.cxx:382
void SetScreenStream(sal_Int32 nScreenId, const OUString &rURL)
Sets the URL of an embedded screen annotation.
Definition: pdfwriter.cxx:372
DocumentType eType
sal_Int16 nValue
#define SAL_WARN_IF(condition, area, stream)
std::unique_ptr< sal_Int32[]> pData
B2DPolygon createPolygonFromRect(const B2DRectangle &rRect, double fRadiusX, double fRadiusY)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
action
basegfx::B2DRange b2DRectangleFromRectangle(const ::tools::Rectangle &rRect)
std::deque< sal_Int32 > mParaInts
std::deque< PDFWriter::PageTransition > mParaPageTransitions
std::deque< MapMode > mParaMapModes
std::vector< sal_Int32 > mParaIds
std::deque< PDFExtOutDevDataSync::Action > mActions
std::deque< sal_uInt32 > mParauInts
std::vector< sal_Int32 > mStructIdMap
std::deque< PDFNote > mParaPDFNotes
std::deque< OUString > mParaOUStrings
void PlayGlobalActions(PDFWriter &rWriter)
sal_Int32 GetMappedStructId(sal_Int32)
std::deque< PDFWriter::DestAreaType > mParaDestAreaTypes
std::vector< sal_Int32 > mStructParents
std::deque< tools::Rectangle > mParaRects
::std::map< sal_Int32, PDFLinkDestination > mFutureDestinations
virtual std::shared_ptr< AnyWidget > Clone() const =0
std::deque< PDFWriter::StructAttributeValue > mParaStructAttributeValues
std::deque< PDFWriter::StructAttribute > mParaStructAttributes
std::deque< tools::Rectangle > mParaRects
GlobalSyncData * mpGlobalData
PageSyncData(GlobalSyncData *pGlobal)
std::deque< PDFExtOutDevDataSync > mActions
std::deque< OUString > mParaOUStrings
std::deque< sal_Int32 > mParaInts
std::deque< Graphic > mGraphics
std::deque< std::shared_ptr< PDFWriter::AnyWidget > > mControls
void PushAction(const OutputDevice &rOutDev, const PDFExtOutDevDataSync::Action eAct)
std::deque< PDFWriter::StructElement > mParaStructElements
bool PlaySyncPageAct(PDFWriter &rWriter, sal_uInt32 &rCurGDIMtfAction, const GDIMetaFile &rMtf, const PDFExtOutDevData &rOutDevData)
unsigned char sal_uInt8