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