xref: /trunk/main/vcl/source/gdi/pdfwriter.cxx (revision 9f62ea84)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_vcl.hxx"
26 
27 #include <pdfwriter_impl.hxx>
28 #include <vcl/bitmapex.hxx>
29 #include <vcl/image.hxx>
30 
31 using namespace vcl;
32 
~AnyWidget()33 PDFWriter::AnyWidget::~AnyWidget()
34 {
35 }
36 
PDFWriter(const PDFWriter::PDFWriterContext & rContext,const com::sun::star::uno::Reference<com::sun::star::beans::XMaterialHolder> & xEnc)37 PDFWriter::PDFWriter( const PDFWriter::PDFWriterContext& rContext, const com::sun::star::uno::Reference< com::sun::star::beans::XMaterialHolder >& xEnc )
38         :
39         pImplementation( new PDFWriterImpl( rContext, xEnc, *this ) )
40 {
41 }
42 
~PDFWriter()43 PDFWriter::~PDFWriter()
44 {
45     delete (PDFWriterImpl*)pImplementation;
46 }
47 
GetReferenceDevice()48 OutputDevice* PDFWriter::GetReferenceDevice()
49 {
50     return ((PDFWriterImpl*)pImplementation)->getReferenceDevice();
51 }
52 
NewPage(sal_Int32 nPageWidth,sal_Int32 nPageHeight,Orientation eOrientation)53 sal_Int32 PDFWriter::NewPage( sal_Int32 nPageWidth, sal_Int32 nPageHeight, Orientation eOrientation )
54 {
55     return ((PDFWriterImpl*)pImplementation)->newPage( nPageWidth, nPageHeight, eOrientation );
56 }
57 
Emit()58 bool PDFWriter::Emit()
59 {
60     return ((PDFWriterImpl*)pImplementation)->emit();
61 }
62 
GetVersion() const63 PDFWriter::PDFVersion PDFWriter::GetVersion() const
64 {
65     return ((PDFWriterImpl*)pImplementation)->getVersion();
66 }
67 
SetDocumentLocale(const com::sun::star::lang::Locale & rLoc)68 void PDFWriter::SetDocumentLocale( const com::sun::star::lang::Locale& rLoc )
69 {
70     ((PDFWriterImpl*)pImplementation)->setDocumentLocale( rLoc );
71 }
72 
SetFont(const Font & rFont)73 void PDFWriter::SetFont( const Font& rFont )
74 {
75     ((PDFWriterImpl*)pImplementation)->setFont( rFont );
76 }
77 
DrawText(const Point & rPos,const String & rText)78 void PDFWriter::DrawText( const Point& rPos, const String& rText )
79 {
80     ((PDFWriterImpl*)pImplementation)->drawText( rPos, rText );
81 }
82 
DrawTextLine(const Point & rPos,long nWidth,FontStrikeout eStrikeout,FontUnderline eUnderline,FontUnderline eOverline,sal_Bool bUnderlineAbove)83 void PDFWriter::DrawTextLine(
84                              const Point& rPos,
85                              long nWidth,
86                              FontStrikeout eStrikeout,
87                              FontUnderline eUnderline,
88                              FontUnderline eOverline,
89                              sal_Bool bUnderlineAbove )
90 {
91     ((PDFWriterImpl*)pImplementation)->drawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove );
92 }
93 
DrawTextArray(const Point & rStartPt,const XubString & rStr,const sal_Int32 * pDXAry,xub_StrLen nIndex,xub_StrLen nLen)94 void PDFWriter::DrawTextArray(
95                               const Point& rStartPt,
96                               const XubString& rStr,
97                               const sal_Int32* pDXAry,
98                               xub_StrLen nIndex,
99                               xub_StrLen nLen )
100 {
101     ((PDFWriterImpl*)pImplementation)->drawTextArray( rStartPt, rStr, pDXAry, nIndex, nLen );
102 }
103 
DrawStretchText(const Point & rStartPt,sal_uLong nWidth,const XubString & rStr,xub_StrLen nIndex,xub_StrLen nLen)104 void PDFWriter::DrawStretchText(
105                                 const Point& rStartPt,
106                                 sal_uLong nWidth,
107                                 const XubString& rStr,
108                                 xub_StrLen nIndex,
109                                 xub_StrLen nLen )
110 {
111     ((PDFWriterImpl*)pImplementation)->drawStretchText( rStartPt, nWidth, rStr, nIndex, nLen );
112 }
113 
DrawText(const Rectangle & rRect,const XubString & rStr,sal_uInt16 nStyle)114 void PDFWriter::DrawText(
115                          const Rectangle& rRect,
116                          const XubString& rStr,
117                          sal_uInt16 nStyle )
118 {
119     ((PDFWriterImpl*)pImplementation)->drawText( rRect, rStr, nStyle );
120 }
121 
DrawLine(const Point & rStart,const Point & rStop)122 void PDFWriter::DrawLine( const Point& rStart, const Point& rStop )
123 {
124     ((PDFWriterImpl*)pImplementation)->drawLine( rStart, rStop );
125 }
126 
DrawLine(const Point & rStart,const Point & rStop,const LineInfo & rInfo)127 void PDFWriter::DrawLine( const Point& rStart, const Point& rStop, const LineInfo& rInfo )
128 {
129     ((PDFWriterImpl*)pImplementation)->drawLine( rStart, rStop, rInfo );
130 }
131 
DrawPolygon(const Polygon & rPoly)132 void PDFWriter::DrawPolygon( const Polygon& rPoly )
133 {
134     ((PDFWriterImpl*)pImplementation)->drawPolygon( rPoly );
135 }
136 
DrawPolyLine(const Polygon & rPoly)137 void PDFWriter::DrawPolyLine( const Polygon& rPoly )
138 {
139     ((PDFWriterImpl*)pImplementation)->drawPolyLine( rPoly );
140 }
141 
DrawRect(const Rectangle & rRect)142 void PDFWriter::DrawRect( const Rectangle& rRect )
143 {
144     ((PDFWriterImpl*)pImplementation)->drawRectangle( rRect );
145 }
146 
DrawRect(const Rectangle & rRect,sal_uLong nHorzRound,sal_uLong nVertRound)147 void PDFWriter::DrawRect( const Rectangle& rRect, sal_uLong nHorzRound, sal_uLong nVertRound )
148 {
149     ((PDFWriterImpl*)pImplementation)->drawRectangle( rRect, nHorzRound, nVertRound );
150 }
151 
DrawEllipse(const Rectangle & rRect)152 void PDFWriter::DrawEllipse( const Rectangle& rRect )
153 {
154     ((PDFWriterImpl*)pImplementation)->drawEllipse( rRect );
155 }
156 
DrawArc(const Rectangle & rRect,const Point & rStart,const Point & rStop)157 void PDFWriter::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rStop )
158 {
159     ((PDFWriterImpl*)pImplementation)->drawArc( rRect, rStart, rStop, false, false );
160 }
161 
DrawPie(const Rectangle & rRect,const Point & rStart,const Point & rStop)162 void PDFWriter::DrawPie( const Rectangle& rRect, const Point& rStart, const Point& rStop )
163 {
164     ((PDFWriterImpl*)pImplementation)->drawArc( rRect, rStart, rStop, true, false );
165 }
166 
DrawChord(const Rectangle & rRect,const Point & rStart,const Point & rStop)167 void PDFWriter::DrawChord( const Rectangle& rRect, const Point& rStart, const Point& rStop )
168 {
169     ((PDFWriterImpl*)pImplementation)->drawArc( rRect, rStart, rStop, false, true );
170 }
171 
DrawPolyLine(const Polygon & rPoly,const LineInfo & rInfo)172 void PDFWriter::DrawPolyLine( const Polygon& rPoly, const LineInfo& rInfo )
173 {
174     ((PDFWriterImpl*)pImplementation)->drawPolyLine( rPoly, rInfo );
175 }
176 
DrawPolyLine(const Polygon & rPoly,const ExtLineInfo & rInfo)177 void PDFWriter::DrawPolyLine( const Polygon& rPoly, const ExtLineInfo& rInfo )
178 {
179     ((PDFWriterImpl*)pImplementation)->drawPolyLine( rPoly, rInfo );
180 }
181 
DrawPolyPolygon(const PolyPolygon & rPolyPoly)182 void PDFWriter::DrawPolyPolygon( const PolyPolygon& rPolyPoly )
183 {
184     ((PDFWriterImpl*)pImplementation)->drawPolyPolygon( rPolyPoly );
185 }
186 
DrawPixel(const Point & rPos,const Color & rColor)187 void PDFWriter::DrawPixel( const Point& rPos, const Color& rColor )
188 {
189     ((PDFWriterImpl*)pImplementation)->drawPixel( rPos, rColor );
190 }
191 
DrawPixel(const Polygon & rPts,const Color * pColors)192 void PDFWriter::DrawPixel( const Polygon& rPts, const Color* pColors )
193 {
194     ((PDFWriterImpl*)pImplementation)->drawPixel( rPts, pColors );
195 }
196 
DrawBitmap(const Point & rDestPt,const Bitmap & rBitmap)197 void PDFWriter::DrawBitmap( const Point& rDestPt, const Bitmap& rBitmap )
198 {
199     Size aSize = OutputDevice::LogicToLogic( rBitmap.GetPrefSize(),
200                                              rBitmap.GetPrefMapMode(),
201                                              ((PDFWriterImpl*)pImplementation)->getMapMode() );
202     ((PDFWriterImpl*)pImplementation)->drawBitmap( rDestPt, aSize, rBitmap );
203 }
204 
DrawBitmap(const Point & rDestPt,const Size & rDestSize,const Bitmap & rBitmap)205 void PDFWriter::DrawBitmap( const Point& rDestPt, const Size& rDestSize, const Bitmap& rBitmap )
206 {
207     ((PDFWriterImpl*)pImplementation)->drawBitmap( rDestPt, rDestSize, rBitmap );
208 }
209 
DrawBitmap(const Point & rDestPt,const Size & rDestSize,const Point & rSrcPtPixel,const Size & rSrcSizePixel,const Bitmap & rBitmap)210 void PDFWriter::DrawBitmap( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSrcSizePixel, const Bitmap& rBitmap )
211 {
212     Bitmap aBitmap( rBitmap );
213     aBitmap.Crop( Rectangle( rSrcPtPixel, rSrcSizePixel ) );
214     ((PDFWriterImpl*)pImplementation)->drawBitmap( rDestPt, rDestSize, aBitmap );
215 }
216 
DrawBitmapEx(const Point & rDestPt,const BitmapEx & rBitmap)217 void PDFWriter::DrawBitmapEx( const Point& rDestPt, const BitmapEx& rBitmap )
218 {
219     Size aSize = OutputDevice::LogicToLogic( rBitmap.GetPrefSize(),
220                                              rBitmap.GetPrefMapMode(),
221                                              ((PDFWriterImpl*)pImplementation)->getMapMode() );
222     ((PDFWriterImpl*)pImplementation)->drawBitmap( rDestPt, aSize, rBitmap );
223 }
224 
DrawBitmapEx(const Point & rDestPt,const Size & rDestSize,const BitmapEx & rBitmap)225 void PDFWriter::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, const BitmapEx& rBitmap )
226 {
227     ((PDFWriterImpl*)pImplementation)->drawBitmap( rDestPt, rDestSize, rBitmap );
228 }
229 
DrawBitmapEx(const Point & rDestPt,const Size & rDestSize,const Point & rSrcPtPixel,const Size & rSrcSizePixel,const BitmapEx & rBitmap)230 void PDFWriter::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSrcSizePixel, const BitmapEx& rBitmap )
231 {
232     if ( !!rBitmap )
233     {
234 	BitmapEx aBitmap( rBitmap );
235 	aBitmap.Crop( Rectangle( rSrcPtPixel, rSrcSizePixel ) );
236 	((PDFWriterImpl*)pImplementation)->drawBitmap( rDestPt, rDestSize, aBitmap );
237     }
238 }
239 
DrawMask(const Point & rDestPt,const Bitmap & rBitmap,const Color & rMaskColor)240 void PDFWriter::DrawMask( const Point& rDestPt, const Bitmap& rBitmap, const Color& rMaskColor )
241 {
242     Size aSize = OutputDevice::LogicToLogic( rBitmap.GetPrefSize(),
243                                              rBitmap.GetPrefMapMode(),
244                                              ((PDFWriterImpl*)pImplementation)->getMapMode() );
245     ((PDFWriterImpl*)pImplementation)->drawMask( rDestPt, aSize, rBitmap, rMaskColor );
246 }
247 
DrawMask(const Point & rDestPt,const Size & rDestSize,const Bitmap & rBitmap,const Color & rMaskColor)248 void PDFWriter::DrawMask( const Point& rDestPt, const Size& rDestSize, const Bitmap& rBitmap, const Color& rMaskColor )
249 {
250     ((PDFWriterImpl*)pImplementation)->drawMask( rDestPt, rDestSize, rBitmap, rMaskColor );
251 }
252 
DrawMask(const Point & rDestPt,const Size & rDestSize,const Point & rSrcPtPixel,const Size & rSrcSizePixel,const Bitmap & rBitmap,const Color & rMaskColor)253 void PDFWriter::DrawMask( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSrcSizePixel, const Bitmap& rBitmap, const Color& rMaskColor )
254 {
255     Bitmap aBitmap( rBitmap );
256     aBitmap.Crop( Rectangle( rSrcPtPixel, rSrcSizePixel ) );
257     ((PDFWriterImpl*)pImplementation)->drawMask( rDestPt, rDestSize, aBitmap, rMaskColor );
258 }
259 
DrawGradient(const Rectangle & rRect,const Gradient & rGradient)260 void PDFWriter::DrawGradient( const Rectangle& rRect, const Gradient& rGradient )
261 {
262     ((PDFWriterImpl*)pImplementation)->drawGradient( rRect, rGradient );
263 }
264 
DrawGradient(const PolyPolygon & rPolyPoly,const Gradient & rGradient)265 void PDFWriter::DrawGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient )
266 {
267     ((PDFWriterImpl*)pImplementation)->drawGradient( rPolyPoly, rGradient );
268 }
269 
DrawHatch(const PolyPolygon & rPolyPoly,const Hatch & rHatch)270 void PDFWriter::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch )
271 {
272     ((PDFWriterImpl*)pImplementation)->drawHatch( rPolyPoly, rHatch );
273 }
274 
DrawWallpaper(const Rectangle & rRect,const Wallpaper & rWallpaper)275 void PDFWriter::DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper )
276 {
277     ((PDFWriterImpl*)pImplementation)->drawWallpaper( rRect, rWallpaper );
278 }
279 
DrawTransparent(const PolyPolygon & rPolyPoly,sal_uInt16 nTransparencePercent)280 void PDFWriter::DrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent )
281 {
282     ((PDFWriterImpl*)pImplementation)->drawTransparent( rPolyPoly, nTransparencePercent );
283 }
284 
BeginTransparencyGroup()285 void PDFWriter::BeginTransparencyGroup()
286 {
287     ((PDFWriterImpl*)pImplementation)->beginTransparencyGroup();
288 }
289 
EndTransparencyGroup(const Rectangle & rRect,sal_uInt16 nTransparentPercent)290 void PDFWriter::EndTransparencyGroup( const Rectangle& rRect, sal_uInt16 nTransparentPercent )
291 {
292     ((PDFWriterImpl*)pImplementation)->endTransparencyGroup( rRect, nTransparentPercent );
293 }
294 
EndTransparencyGroup(const Rectangle & rRect,const Bitmap & rAlphaMask)295 void PDFWriter::EndTransparencyGroup( const Rectangle& rRect, const Bitmap& rAlphaMask )
296 {
297     ((PDFWriterImpl*)pImplementation)->endTransparencyGroup( rRect, rAlphaMask );
298 }
299 
Push(sal_uInt16 nFlags)300 void PDFWriter::Push( sal_uInt16 nFlags )
301 {
302     ((PDFWriterImpl*)pImplementation)->push( nFlags );
303 }
304 
Pop()305 void PDFWriter::Pop()
306 {
307     ((PDFWriterImpl*)pImplementation)->pop();
308 }
309 
SetMapMode(const MapMode & rMapMode)310 void PDFWriter::SetMapMode( const MapMode& rMapMode )
311 {
312     ((PDFWriterImpl*)pImplementation)->setMapMode( rMapMode );
313 }
314 
SetMapMode()315 void PDFWriter::SetMapMode()
316 {
317     ((PDFWriterImpl*)pImplementation)->setMapMode();
318 }
319 
SetLineColor(const Color & rColor)320 void PDFWriter::SetLineColor( const Color& rColor )
321 {
322     ((PDFWriterImpl*)pImplementation)->setLineColor( rColor );
323 }
324 
SetFillColor(const Color & rColor)325 void PDFWriter::SetFillColor( const Color& rColor )
326 {
327     ((PDFWriterImpl*)pImplementation)->setFillColor( rColor );
328 }
329 
SetClipRegion()330 void PDFWriter::SetClipRegion()
331 {
332     ((PDFWriterImpl*)pImplementation)->clearClipRegion();
333 }
334 
SetClipRegion(const basegfx::B2DPolyPolygon & rRegion)335 void PDFWriter::SetClipRegion( const basegfx::B2DPolyPolygon& rRegion )
336 {
337     ((PDFWriterImpl*)pImplementation)->setClipRegion( rRegion );
338 }
339 
MoveClipRegion(long nHorzMove,long nVertMove)340 void PDFWriter::MoveClipRegion( long nHorzMove, long nVertMove )
341 {
342     ((PDFWriterImpl*)pImplementation)->moveClipRegion( nHorzMove, nVertMove );
343 }
344 
IntersectClipRegion(const basegfx::B2DPolyPolygon & rRegion)345 void PDFWriter::IntersectClipRegion( const basegfx::B2DPolyPolygon& rRegion )
346 {
347     ((PDFWriterImpl*)pImplementation)->intersectClipRegion( rRegion );
348 }
349 
IntersectClipRegion(const Rectangle & rRect)350 void PDFWriter::IntersectClipRegion( const Rectangle& rRect )
351 {
352     ((PDFWriterImpl*)pImplementation)->intersectClipRegion( rRect );
353 }
354 
SetAntialiasing(sal_uInt16 nMode)355 void PDFWriter::SetAntialiasing( sal_uInt16 nMode )
356 {
357     ((PDFWriterImpl*)pImplementation)->setAntiAlias( (sal_Int32)nMode );
358 }
359 
SetLayoutMode(sal_uLong nMode)360 void PDFWriter::SetLayoutMode( sal_uLong nMode )
361 {
362     ((PDFWriterImpl*)pImplementation)->setLayoutMode( (sal_Int32)nMode );
363 }
364 
SetDigitLanguage(LanguageType eLang)365 void PDFWriter::SetDigitLanguage( LanguageType eLang )
366 {
367     ((PDFWriterImpl*)pImplementation)->setDigitLanguage( eLang );
368 }
369 
SetTextColor(const Color & rColor)370 void PDFWriter::SetTextColor( const Color& rColor )
371 {
372     ((PDFWriterImpl*)pImplementation)->setTextColor( rColor );
373 }
374 
SetTextFillColor()375 void PDFWriter::SetTextFillColor()
376 {
377     ((PDFWriterImpl*)pImplementation)->setTextFillColor();
378 }
379 
SetTextFillColor(const Color & rColor)380 void PDFWriter::SetTextFillColor( const Color& rColor )
381 {
382     ((PDFWriterImpl*)pImplementation)->setTextFillColor( rColor );
383 }
384 
SetTextLineColor()385 void PDFWriter::SetTextLineColor()
386 {
387     ((PDFWriterImpl*)pImplementation)->setTextLineColor();
388 }
389 
SetTextLineColor(const Color & rColor)390 void PDFWriter::SetTextLineColor( const Color& rColor )
391 {
392     ((PDFWriterImpl*)pImplementation)->setTextLineColor( rColor );
393 }
394 
SetOverlineColor()395 void PDFWriter::SetOverlineColor()
396 {
397     ((PDFWriterImpl*)pImplementation)->setOverlineColor();
398 }
399 
SetOverlineColor(const Color & rColor)400 void PDFWriter::SetOverlineColor( const Color& rColor )
401 {
402     ((PDFWriterImpl*)pImplementation)->setOverlineColor( rColor );
403 }
404 
SetTextAlign(::TextAlign eAlign)405 void PDFWriter::SetTextAlign( ::TextAlign eAlign )
406 {
407     ((PDFWriterImpl*)pImplementation)->setTextAlign( eAlign );
408 }
409 
DrawJPGBitmap(SvStream & rStreamData,bool bIsTrueColor,const Size & rSrcSizePixel,const Rectangle & rTargetArea,const Bitmap & rMask)410 void PDFWriter::DrawJPGBitmap( SvStream& rStreamData, bool bIsTrueColor, const Size& rSrcSizePixel, const Rectangle& rTargetArea, const Bitmap& rMask )
411 {
412     ((PDFWriterImpl*)pImplementation)->drawJPGBitmap( rStreamData, bIsTrueColor, rSrcSizePixel, rTargetArea, rMask );
413 }
414 
CreateLink(const Rectangle & rRect,sal_Int32 nPageNr)415 sal_Int32 PDFWriter::CreateLink( const Rectangle& rRect, sal_Int32 nPageNr )
416 {
417     return ((PDFWriterImpl*)pImplementation)->createLink( rRect, nPageNr );
418 }
RegisterDestReference(sal_Int32 nDestId,const Rectangle & rRect,sal_Int32 nPageNr,DestAreaType eType)419 sal_Int32 PDFWriter::RegisterDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType )
420 {
421     return ((PDFWriterImpl*)pImplementation)->registerDestReference( nDestId, rRect, nPageNr, eType );
422 }
423 //--->i56629
CreateNamedDest(const rtl::OUString & sDestName,const Rectangle & rRect,sal_Int32 nPageNr,PDFWriter::DestAreaType eType)424 sal_Int32 PDFWriter::CreateNamedDest( const rtl::OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
425 {
426     return ((PDFWriterImpl*)pImplementation)->createNamedDest( sDestName, rRect, nPageNr, eType );
427 }
428 //<---
CreateDest(const Rectangle & rRect,sal_Int32 nPageNr,PDFWriter::DestAreaType eType)429 sal_Int32 PDFWriter::CreateDest( const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
430 {
431     return ((PDFWriterImpl*)pImplementation)->createDest( rRect, nPageNr, eType );
432 }
433 
SetLinkDest(sal_Int32 nLinkId,sal_Int32 nDestId)434 sal_Int32 PDFWriter::SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId )
435 {
436     return ((PDFWriterImpl*)pImplementation)->setLinkDest( nLinkId, nDestId );
437 }
438 
SetLinkURL(sal_Int32 nLinkId,const rtl::OUString & rURL)439 sal_Int32 PDFWriter::SetLinkURL( sal_Int32 nLinkId, const rtl::OUString& rURL )
440 {
441     return ((PDFWriterImpl*)pImplementation)->setLinkURL( nLinkId, rURL );
442 }
443 
SetLinkPropertyID(sal_Int32 nLinkId,sal_Int32 nPropertyId)444 void PDFWriter::SetLinkPropertyID( sal_Int32 nLinkId, sal_Int32 nPropertyId )
445 {
446     ((PDFWriterImpl*)pImplementation)->setLinkPropertyId( nLinkId, nPropertyId );
447 }
448 
CreateOutlineItem(sal_Int32 nParent,const rtl::OUString & rText,sal_Int32 nDestID)449 sal_Int32 PDFWriter::CreateOutlineItem( sal_Int32 nParent, const rtl::OUString& rText, sal_Int32 nDestID )
450 {
451     return ((PDFWriterImpl*)pImplementation)->createOutlineItem( nParent, rText, nDestID );
452 }
453 
SetOutlineItemParent(sal_Int32 nItem,sal_Int32 nNewParent)454 sal_Int32 PDFWriter::SetOutlineItemParent( sal_Int32 nItem, sal_Int32 nNewParent )
455 {
456     return ((PDFWriterImpl*)pImplementation)->setOutlineItemParent( nItem, nNewParent );
457 }
458 
SetOutlineItemText(sal_Int32 nItem,const rtl::OUString & rText)459 sal_Int32 PDFWriter::SetOutlineItemText( sal_Int32 nItem, const rtl::OUString& rText )
460 {
461     return  ((PDFWriterImpl*)pImplementation)->setOutlineItemText( nItem, rText );
462 }
463 
SetOutlineItemDest(sal_Int32 nItem,sal_Int32 nDest)464 sal_Int32 PDFWriter::SetOutlineItemDest( sal_Int32 nItem, sal_Int32 nDest )
465 {
466     return ((PDFWriterImpl*)pImplementation)->setOutlineItemDest( nItem, nDest );
467 }
468 
CreateNote(const Rectangle & rRect,const PDFNote & rNote,sal_Int32 nPageNr)469 void PDFWriter::CreateNote( const Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr )
470 {
471     ((PDFWriterImpl*)pImplementation)->createNote( rRect, rNote, nPageNr );
472 }
473 
BeginStructureElement(PDFWriter::StructElement eType,const rtl::OUString & rAlias)474 sal_Int32 PDFWriter::BeginStructureElement( PDFWriter::StructElement eType, const rtl::OUString& rAlias )
475 {
476     return ((PDFWriterImpl*)pImplementation)->beginStructureElement( eType, rAlias );
477 }
478 
EndStructureElement()479 void PDFWriter::EndStructureElement()
480 {
481     ((PDFWriterImpl*)pImplementation)->endStructureElement();
482 }
483 
SetCurrentStructureElement(sal_Int32 nID)484 bool PDFWriter::SetCurrentStructureElement( sal_Int32 nID )
485 {
486     return ((PDFWriterImpl*)pImplementation)->setCurrentStructureElement( nID );
487 }
488 
GetCurrentStructureElement()489 sal_Int32 PDFWriter::GetCurrentStructureElement()
490 {
491     return ((PDFWriterImpl*)pImplementation)->getCurrentStructureElement();
492 }
493 
SetStructureAttribute(enum StructAttribute eAttr,enum StructAttributeValue eVal)494 bool PDFWriter::SetStructureAttribute( enum StructAttribute eAttr, enum StructAttributeValue eVal )
495 {
496     return ((PDFWriterImpl*)pImplementation)->setStructureAttribute( eAttr, eVal );
497 }
498 
SetStructureAttributeNumerical(enum StructAttribute eAttr,sal_Int32 nValue)499 bool PDFWriter::SetStructureAttributeNumerical( enum StructAttribute eAttr, sal_Int32 nValue )
500 {
501     return ((PDFWriterImpl*)pImplementation)->setStructureAttributeNumerical( eAttr, nValue );
502 }
503 
SetStructureBoundingBox(const Rectangle & rRect)504 void PDFWriter::SetStructureBoundingBox( const Rectangle& rRect )
505 {
506     ((PDFWriterImpl*)pImplementation)->setStructureBoundingBox( rRect );
507 }
508 
SetActualText(const String & rText)509 void PDFWriter::SetActualText( const String& rText )
510 {
511     ((PDFWriterImpl*)pImplementation)->setActualText( rText );
512 }
513 
SetAlternateText(const String & rText)514 void PDFWriter::SetAlternateText( const String& rText )
515 {
516     ((PDFWriterImpl*)pImplementation)->setAlternateText( rText );
517 }
518 
SetAutoAdvanceTime(sal_uInt32 nSeconds,sal_Int32 nPageNr)519 void PDFWriter::SetAutoAdvanceTime( sal_uInt32 nSeconds, sal_Int32 nPageNr )
520 {
521     ((PDFWriterImpl*)pImplementation)->setAutoAdvanceTime( nSeconds, nPageNr );
522 }
523 
SetPageTransition(PDFWriter::PageTransition eType,sal_uInt32 nMilliSec,sal_Int32 nPageNr)524 void PDFWriter::SetPageTransition( PDFWriter::PageTransition eType, sal_uInt32 nMilliSec, sal_Int32 nPageNr )
525 {
526     ((PDFWriterImpl*)pImplementation)->setPageTransition( eType, nMilliSec, nPageNr );
527 }
528 
CreateControl(const PDFWriter::AnyWidget & rControl,sal_Int32 nPageNr)529 sal_Int32 PDFWriter::CreateControl( const PDFWriter::AnyWidget& rControl, sal_Int32 nPageNr )
530 {
531     return ((PDFWriterImpl*)pImplementation)->createControl( rControl, nPageNr );
532 }
533 
~PDFOutputStream()534 PDFOutputStream::~PDFOutputStream()
535 {
536 }
537 
AddStream(const String & rMimeType,PDFOutputStream * pStream,bool bCompress)538 void PDFWriter::AddStream( const String& rMimeType, PDFOutputStream* pStream, bool bCompress )
539 {
540     ((PDFWriterImpl*)pImplementation)->addStream( rMimeType, pStream, bCompress );
541 }
542 
BeginPattern(const Rectangle & rCellRect)543 void PDFWriter::BeginPattern( const Rectangle& rCellRect )
544 {
545     ((PDFWriterImpl*)pImplementation)->beginPattern( rCellRect );
546 }
547 
EndPattern(const SvtGraphicFill::Transform & rTransform)548 sal_Int32 PDFWriter::EndPattern( const SvtGraphicFill::Transform& rTransform )
549 {
550     return ((PDFWriterImpl*)pImplementation)->endPattern( rTransform );
551 }
552 
DrawPolyPolygon(const PolyPolygon & rPolyPoly,sal_Int32 nPattern,bool bEOFill)553 void PDFWriter::DrawPolyPolygon( const PolyPolygon& rPolyPoly, sal_Int32 nPattern, bool bEOFill )
554 {
555     ((PDFWriterImpl*)pImplementation)->drawPolyPolygon( rPolyPoly, nPattern, bEOFill );
556 }
557 
GetErrors()558 std::set< PDFWriter::ErrorCode > PDFWriter::GetErrors()
559 {
560     return ((PDFWriterImpl*)pImplementation)->getErrors();
561 }
562 
563 com::sun::star::uno::Reference< com::sun::star::beans::XMaterialHolder >
InitEncryption(const rtl::OUString & i_rOwnerPassword,const rtl::OUString & i_rUserPassword,bool b128Bit)564 PDFWriter::InitEncryption( const rtl::OUString& i_rOwnerPassword,
565                            const rtl::OUString& i_rUserPassword,
566                            bool b128Bit
567                           )
568 {
569     return PDFWriterImpl::initEncryption( i_rOwnerPassword, i_rUserPassword, b128Bit );
570 }
571 
PlayMetafile(const GDIMetaFile & i_rMTF,const vcl::PDFWriter::PlayMetafileContext & i_rPlayContext,PDFExtOutDevData * i_pData)572 void PDFWriter::PlayMetafile( const GDIMetaFile& i_rMTF, const vcl::PDFWriter::PlayMetafileContext& i_rPlayContext, PDFExtOutDevData* i_pData )
573 {
574     ((PDFWriterImpl*)pImplementation)->playMetafile( i_rMTF, i_pData, i_rPlayContext, NULL);
575 }
576 
577