1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include "outputwrap.hxx"
23 #include "contentsink.hxx"
24 #include "pdfihelper.hxx"
25 #include "wrapper.hxx"
26 #include "pdfparse.hxx"
27 #include "../pdfiadaptor.hxx"
29 #include <rtl/math.hxx>
30 #include <osl/file.hxx>
31 #include <comphelper/sequence.hxx>
33 #include "cppunit/TestAssert.h"
34 #include "cppunit/TestFixture.h"
35 #include "cppunit/extensions/HelperMacros.h"
36 #include "cppunit/plugin/TestPlugIn.h"
37 #include <test/bootstrapfixture.hxx>
39 #include <com/sun/star/rendering/XCanvas.hpp>
40 #include <com/sun/star/rendering/XColorSpace.hpp>
41 #include <com/sun/star/rendering/PathJoinType.hpp>
42 #include <com/sun/star/rendering/PathCapType.hpp>
43 #include <com/sun/star/rendering/BlendMode.hpp>
45 #include <basegfx/matrix/b2dhommatrix.hxx>
46 #include <basegfx/tools/canvastools.hxx>
47 #include <basegfx/polygon/b2dpolygon.hxx>
48 #include <basegfx/polygon/b2dpolypolygon.hxx>
49 #include <basegfx/polygon/b2dpolypolygontools.hxx>
50 #include <basegfx/polygon/b2dpolygonclipper.hxx>
52 #include <unordered_map>
56 #include <rtl/ustring.hxx>
58 using namespace ::pdfparse
;
59 using namespace ::pdfi
;
60 using namespace ::com::sun::star
;
65 class TestSink
: public ContentSink
79 m_bRedCircleSeen(false),
80 m_bGreenStrokeSeen(false),
81 m_bDashedLineSeen(false),
85 virtual ~TestSink() {}
89 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "A4 page size (in 100th of points): Width", 79400, m_aPageSize
.Width
, 0.00000001);
90 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "A4 page size (in 100th of points): Height", 59500, m_aPageSize
.Height
, 0.0000001 );
91 CPPUNIT_ASSERT_MESSAGE( "endPage() called", m_bPageEnded
);
92 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Num pages equal one", (sal_Int32
) 1, m_nNumPages
);
93 CPPUNIT_ASSERT_MESSAGE( "Correct hyperlink bounding box",
94 rtl::math::approxEqual(m_aHyperlinkBounds
.X1
,34.7 ) &&
95 rtl::math::approxEqual(m_aHyperlinkBounds
.Y1
,386.0) &&
96 rtl::math::approxEqual(m_aHyperlinkBounds
.X2
,166.7) &&
97 rtl::math::approxEqual(m_aHyperlinkBounds
.Y2
,406.2) );
98 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Correct hyperlink URI", OUString("http://download.openoffice.org/"), m_aURI
);
100 const char* sText
= " \n \nThis is a testtext\nNew paragraph,\nnew line\n"
101 "Hyperlink, this is\n?\nThis is more text\noutline mode\n?\nNew paragraph\n";
103 m_aTextOut
.makeStringAndClear().convertToString( &aTmp
,
104 RTL_TEXTENCODING_ASCII_US
,
105 OUSTRING_TO_OSTRING_CVTFLAGS
);
106 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Imported text is \"This is a testtext New paragraph, new line"
107 " Hyperlink, this is * This is more text outline mode * New paragraph\"",
108 aTmp
, OString(sText
) );
110 CPPUNIT_ASSERT_MESSAGE( "red circle seen in input", m_bRedCircleSeen
);
111 CPPUNIT_ASSERT_MESSAGE( "green stroke seen in input", m_bGreenStrokeSeen
);
112 CPPUNIT_ASSERT_MESSAGE( "dashed line seen in input", m_bDashedLineSeen
);
113 CPPUNIT_ASSERT_MESSAGE( "image seen in input", m_bImageSeen
);
117 GraphicsContext
& getCurrentContext() { return m_aGCStack
.back(); }
119 // ContentSink interface implementation
120 virtual void setPageNum( sal_Int32 nNumPages
) SAL_OVERRIDE
122 m_nNumPages
= nNumPages
;
125 virtual void startPage( const geometry::RealSize2D
& rSize
) SAL_OVERRIDE
130 virtual void endPage() SAL_OVERRIDE
135 virtual void hyperLink( const geometry::RealRectangle2D
& rBounds
,
136 const OUString
& rURI
) SAL_OVERRIDE
138 m_aHyperlinkBounds
= rBounds
;
142 virtual void pushState() SAL_OVERRIDE
144 GraphicsContextStack::value_type
const a(m_aGCStack
.back());
145 m_aGCStack
.push_back(a
);
148 virtual void popState() SAL_OVERRIDE
150 m_aGCStack
.pop_back();
153 virtual void setTransformation( const geometry::AffineMatrix2D
& rMatrix
) SAL_OVERRIDE
155 basegfx::unotools::homMatrixFromAffineMatrix(
156 getCurrentContext().Transformation
,
160 virtual void setLineDash( const uno::Sequence
<double>& dashes
,
161 double start
) SAL_OVERRIDE
163 GraphicsContext
& rContext( getCurrentContext() );
164 if( dashes
.getLength() )
165 comphelper::sequenceToContainer(rContext
.DashArray
,dashes
);
166 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "line dashing start offset", 0.0, start
, 0.000000001 );
169 virtual void setFlatness( double nFlatness
) SAL_OVERRIDE
171 getCurrentContext().Flatness
= nFlatness
;
174 virtual void setLineJoin(sal_Int8 nJoin
) SAL_OVERRIDE
176 getCurrentContext().LineJoin
= nJoin
;
179 virtual void setLineCap(sal_Int8 nCap
) SAL_OVERRIDE
181 getCurrentContext().LineCap
= nCap
;
184 virtual void setMiterLimit(double nVal
) SAL_OVERRIDE
186 getCurrentContext().MiterLimit
= nVal
;
189 virtual void setLineWidth(double nVal
) SAL_OVERRIDE
191 getCurrentContext().LineWidth
= nVal
;
194 virtual void setFillColor( const rendering::ARGBColor
& rColor
) SAL_OVERRIDE
196 getCurrentContext().FillColor
= rColor
;
199 virtual void setStrokeColor( const rendering::ARGBColor
& rColor
) SAL_OVERRIDE
201 getCurrentContext().LineColor
= rColor
;
204 virtual void setBlendMode(sal_Int8 nMode
) SAL_OVERRIDE
206 getCurrentContext().BlendMode
= nMode
;
209 virtual void setFont( const FontAttributes
& rFont
) SAL_OVERRIDE
211 FontToIdMap::const_iterator it
= m_aFontToId
.find( rFont
);
212 if( it
!= m_aFontToId
.end() )
213 getCurrentContext().FontId
= it
->second
;
216 m_aFontToId
[ rFont
] = m_nNextFontId
;
217 m_aIdToFont
[ m_nNextFontId
] = rFont
;
218 getCurrentContext().FontId
= m_nNextFontId
;
223 virtual void strokePath( const uno::Reference
<rendering::XPolyPolygon2D
>& rPath
) SAL_OVERRIDE
225 GraphicsContext
& rContext( getCurrentContext() );
226 basegfx::B2DPolyPolygon aPath
= basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(rPath
);
227 aPath
.transform( rContext
.Transformation
);
229 if( rContext
.DashArray
.empty() )
231 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is green", 1.0, rContext
.LineColor
.Alpha
, 0.00000001);
232 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is green", 0.0, rContext
.LineColor
.Blue
, 0.00000001);
233 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is green", 1.0, rContext
.LineColor
.Green
, 0.00000001);
234 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is green", 0.0, rContext
.LineColor
.Red
, 0.00000001);
236 CPPUNIT_ASSERT_MESSAGE( "Line width is 0",
237 rtl::math::approxEqual(rContext
.LineWidth
, 28.3) );
239 const char* sExportString
= "m53570 7650-35430 24100";
240 CPPUNIT_ASSERT_MESSAGE( "Stroke is m535.7 518.5-354.3-241",
241 basegfx::tools::exportToSvgD( aPath
, true, true, false ).equalsAscii(sExportString
) );
243 m_bGreenStrokeSeen
= true;
247 CPPUNIT_ASSERT_MESSAGE( "Dash array consists of four entries",
248 rContext
.DashArray
.size() == 4 &&
249 rtl::math::approxEqual(rContext
.DashArray
[0],14.3764) &&
250 rContext
.DashArray
[0] == rContext
.DashArray
[1] &&
251 rContext
.DashArray
[1] == rContext
.DashArray
[2] &&
252 rContext
.DashArray
[2] == rContext
.DashArray
[3] );
254 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is black", 1.0, rContext
.LineColor
.Alpha
, 0.00000001);
255 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is black", 0.0, rContext
.LineColor
.Blue
, 0.00000001);
256 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is black", 0.0, rContext
.LineColor
.Green
, 0.00000001);
257 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is black", 0.0, rContext
.LineColor
.Red
, 0.00000001);
259 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line width is 0",
260 0, rContext
.LineWidth
, 0.0000001 );
262 const char* sExportString
= "m49890 5670.00000000001-35430 24090";
263 CPPUNIT_ASSERT_MESSAGE( "Stroke is m49890 5670.00000000001-35430 24090",
264 basegfx::tools::exportToSvgD( aPath
, true, true, false ).equalsAscii(sExportString
) );
266 m_bDashedLineSeen
= true;
268 CPPUNIT_ASSERT_MESSAGE( "Blend mode is normal",
269 rContext
.BlendMode
== rendering::BlendMode::NORMAL
);
270 CPPUNIT_ASSERT_MESSAGE( "Join type is round",
271 rContext
.LineJoin
== rendering::PathJoinType::ROUND
);
272 CPPUNIT_ASSERT_MESSAGE( "Cap type is butt",
273 rContext
.LineCap
== rendering::PathCapType::BUTT
);
274 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line miter limit is 10",
275 10, rContext
.MiterLimit
, 0.0000001 );
276 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Flatness is 0",
277 1, rContext
.Flatness
, 0.00000001 );
278 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font id is 0",
279 (sal_Int32
) 0, rContext
.FontId
);
282 virtual void fillPath( const uno::Reference
<rendering::XPolyPolygon2D
>& rPath
) SAL_OVERRIDE
284 GraphicsContext
& rContext( getCurrentContext() );
285 basegfx::B2DPolyPolygon aPath
= basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(rPath
);
286 aPath
.transform( rContext
.Transformation
);
288 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is black", 1.0, rContext
.LineColor
.Alpha
, 0.00000001);
289 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is black", 0.0, rContext
.LineColor
.Blue
, 0.00000001);
290 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is black", 0.0, rContext
.LineColor
.Green
, 0.00000001);
291 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is black", 0.0, rContext
.LineColor
.Red
, 0.00000001);
293 CPPUNIT_ASSERT_MESSAGE( "Blend mode is normal",
294 rContext
.BlendMode
== rendering::BlendMode::NORMAL
);
295 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Flatness is 10",
296 10, rContext
.Flatness
, 0.00000001 );
297 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font id is 0",
298 (sal_Int32
) 0, rContext
.FontId
);
301 virtual void eoFillPath( const uno::Reference
<rendering::XPolyPolygon2D
>& rPath
) SAL_OVERRIDE
303 GraphicsContext
& rContext( getCurrentContext() );
304 basegfx::B2DPolyPolygon aPath
= basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(rPath
);
305 aPath
.transform( rContext
.Transformation
);
307 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is black", 1.0, rContext
.LineColor
.Alpha
, 0.00000001);
308 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is black", 0.0, rContext
.LineColor
.Blue
, 0.00000001);
309 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is black", 0.0, rContext
.LineColor
.Green
, 0.00000001);
310 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line color is black", 0.0, rContext
.LineColor
.Red
, 0.00000001);
312 CPPUNIT_ASSERT_MESSAGE( "Blend mode is normal",
313 rContext
.BlendMode
== rendering::BlendMode::NORMAL
);
314 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Flatness is 0",
315 1, rContext
.Flatness
, 0.00000001 );
316 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font id is 0",
317 (sal_Int32
) 0, rContext
.FontId
);
319 const char* sExportString
= "m12050 49610c-4310 0-7800-3490-7800-7800 0-4300 "
320 "3490-7790 7800-7790 4300 0 7790 3490 7790 7790 0 4310-3490 7800-7790 7800z";
321 CPPUNIT_ASSERT_MESSAGE( "Stroke is a 4-bezier circle",
322 basegfx::tools::exportToSvgD( aPath
, true, true, false ).equalsAscii(sExportString
) );
324 m_bRedCircleSeen
= true;
327 virtual void intersectClip(const uno::Reference
<rendering::XPolyPolygon2D
>& rPath
) SAL_OVERRIDE
329 basegfx::B2DPolyPolygon aNewClip
= basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(rPath
);
330 basegfx::B2DPolyPolygon aCurClip
= getCurrentContext().Clip
;
332 if( aCurClip
.count() ) // #i92985# adapted API from (..., false, false) to (..., true, false)
333 aNewClip
= basegfx::tools::clipPolyPolygonOnPolyPolygon( aCurClip
, aNewClip
, true, false );
335 getCurrentContext().Clip
= aNewClip
;
338 virtual void intersectEoClip(const uno::Reference
<rendering::XPolyPolygon2D
>& rPath
) SAL_OVERRIDE
340 basegfx::B2DPolyPolygon aNewClip
= basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(rPath
);
341 basegfx::B2DPolyPolygon aCurClip
= getCurrentContext().Clip
;
343 if( aCurClip
.count() ) // #i92985# adapted API from (..., false, false) to (..., true, false)
344 aNewClip
= basegfx::tools::clipPolyPolygonOnPolyPolygon( aCurClip
, aNewClip
, true, false );
346 getCurrentContext().Clip
= aNewClip
;
349 virtual void drawGlyphs( const OUString
& rGlyphs
,
350 const geometry::RealRectangle2D
& /*rRect*/,
351 const geometry::Matrix2D
& /*rFontMatrix*/,
352 double /*fontSize*/) SAL_OVERRIDE
354 m_aTextOut
.append(rGlyphs
);
357 virtual void endText() SAL_OVERRIDE
359 m_aTextOut
.append( "\n" );
362 virtual void drawMask(const uno::Sequence
<beans::PropertyValue
>& xBitmap
,
363 bool /*bInvert*/ ) SAL_OVERRIDE
365 CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMask received two properties",
366 (sal_Int32
) 3, xBitmap
.getLength() );
367 CPPUNIT_ASSERT_MESSAGE( "drawMask got URL param",
368 xBitmap
[0].Name
== "URL" );
369 CPPUNIT_ASSERT_MESSAGE( "drawMask got InputStream param",
370 xBitmap
[1].Name
== "InputStream" );
373 virtual void drawImage(const uno::Sequence
<beans::PropertyValue
>& xBitmap
) SAL_OVERRIDE
375 CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawImage received two properties",
376 (sal_Int32
) 3, xBitmap
.getLength() );
377 CPPUNIT_ASSERT_MESSAGE( "drawImage got URL param",
378 xBitmap
[0].Name
== "URL" );
379 CPPUNIT_ASSERT_MESSAGE( "drawImage got InputStream param",
380 xBitmap
[1].Name
== "InputStream" );
384 virtual void drawColorMaskedImage(const uno::Sequence
<beans::PropertyValue
>& xBitmap
,
385 const uno::Sequence
<uno::Any
>& /*xMaskColors*/ ) SAL_OVERRIDE
387 CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawColorMaskedImage received two properties",
388 (sal_Int32
) 3, xBitmap
.getLength() );
389 CPPUNIT_ASSERT_MESSAGE( "drawColorMaskedImage got URL param",
390 xBitmap
[0].Name
== "URL" );
391 CPPUNIT_ASSERT_MESSAGE( "drawColorMaskedImage got InputStream param",
392 xBitmap
[1].Name
== "InputStream" );
395 virtual void drawMaskedImage(const uno::Sequence
<beans::PropertyValue
>& xBitmap
,
396 const uno::Sequence
<beans::PropertyValue
>& xMask
,
397 bool /*bInvertMask*/) SAL_OVERRIDE
399 CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMaskedImage received two properties #1",
400 (sal_Int32
) 3, xBitmap
.getLength() );
401 CPPUNIT_ASSERT_MESSAGE( "drawMaskedImage got URL param #1",
402 xBitmap
[0].Name
== "URL" );
403 CPPUNIT_ASSERT_MESSAGE( "drawMaskedImage got InputStream param #1",
404 xBitmap
[1].Name
== "InputStream" );
406 CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMaskedImage received two properties #2",
407 (sal_Int32
) 3, xMask
.getLength() );
408 CPPUNIT_ASSERT_MESSAGE( "drawMaskedImage got URL param #2",
409 xMask
[0].Name
== "URL" );
410 CPPUNIT_ASSERT_MESSAGE( "drawMaskedImage got InputStream param #2",
411 xMask
[1].Name
== "InputStream" );
414 virtual void drawAlphaMaskedImage(const uno::Sequence
<beans::PropertyValue
>& xBitmap
,
415 const uno::Sequence
<beans::PropertyValue
>& xMask
) SAL_OVERRIDE
417 CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawAlphaMaskedImage received two properties #1",
418 (sal_Int32
) 3, xBitmap
.getLength() );
419 CPPUNIT_ASSERT_MESSAGE( "drawAlphaMaskedImage got URL param #1",
420 xBitmap
[0].Name
== "URL" );
421 CPPUNIT_ASSERT_MESSAGE( "drawAlphaMaskedImage got InputStream param #1",
422 xBitmap
[1].Name
== "InputStream" );
424 CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawAlphaMaskedImage received two properties #2",
425 (sal_Int32
) 3, xMask
.getLength() );
426 CPPUNIT_ASSERT_MESSAGE( "drawAlphaMaskedImage got URL param #2",
427 xMask
[0].Name
== "URL" );
428 CPPUNIT_ASSERT_MESSAGE( "drawAlphaMaskedImage got InputStream param #2",
429 xMask
[1].Name
== "InputStream" );
432 virtual void setTextRenderMode( sal_Int32
) SAL_OVERRIDE
436 typedef std::unordered_map
<sal_Int32
,FontAttributes
> IdToFontMap
;
437 typedef std::unordered_map
<FontAttributes
,sal_Int32
,FontAttrHash
> FontToIdMap
;
439 typedef std::vector
<GraphicsContext
> GraphicsContextStack
;
441 sal_Int32 m_nNextFontId
;
442 IdToFontMap m_aIdToFont
;
443 FontToIdMap m_aFontToId
;
445 GraphicsContextStack m_aGCStack
;
446 geometry::RealSize2D m_aPageSize
;
447 geometry::RealRectangle2D m_aHyperlinkBounds
;
449 OUStringBuffer m_aTextOut
;
450 sal_Int32 m_nNumPages
;
452 bool m_bRedCircleSeen
;
453 bool m_bGreenStrokeSeen
;
454 bool m_bDashedLineSeen
;
458 class PDFITest
: public test::BootstrapFixture
461 void testXPDFParser()
463 boost::shared_ptr
<TestSink
> pSink( new TestSink() );
465 pdfi::xpdf_ImportFromFile(
466 getURLFromSrc("/sdext/source/pdfimport/test/testinput.pdf"),
468 uno::Reference
< task::XInteractionHandler
>(),
470 getComponentContext() ) );
474 void testOdfDrawExport()
476 pdfi::PDFIRawAdaptor
aAdaptor( OUString(), getComponentContext() );
477 aAdaptor
.setTreeVisitorFactory( createDrawTreeVisitorFactory() );
479 OUString tempFileURL
;
480 CPPUNIT_ASSERT( osl::File::createTempFile( NULL
, NULL
, &tempFileURL
) == osl::File::E_None
);
481 osl::File::remove( tempFileURL
); // FIXME the below apparently fails silently if the file already exists
482 CPPUNIT_ASSERT_MESSAGE("Exporting to ODF",
483 aAdaptor
.odfConvert( getURLFromSrc("/sdext/source/pdfimport/test/testinput.pdf"),
484 new OutputWrap(tempFileURL
),
486 osl::File::remove( tempFileURL
);
489 void testOdfWriterExport()
491 pdfi::PDFIRawAdaptor
aAdaptor( OUString(), getComponentContext() );
492 aAdaptor
.setTreeVisitorFactory( createWriterTreeVisitorFactory() );
494 OUString tempFileURL
;
495 CPPUNIT_ASSERT( osl::File::createTempFile( NULL
, NULL
, &tempFileURL
) == osl::File::E_None
);
496 osl::File::remove( tempFileURL
); // FIXME the below apparently fails silently if the file already exists
497 CPPUNIT_ASSERT_MESSAGE("Exporting to ODF",
498 aAdaptor
.odfConvert( getURLFromSrc("/sdext/source/pdfimport/test/testinput.pdf"),
499 new OutputWrap(tempFileURL
),
501 osl::File::remove( tempFileURL
);
504 CPPUNIT_TEST_SUITE(PDFITest
);
505 CPPUNIT_TEST(testXPDFParser
);
506 CPPUNIT_TEST(testOdfWriterExport
);
507 CPPUNIT_TEST(testOdfDrawExport
);
508 CPPUNIT_TEST_SUITE_END();
513 CPPUNIT_TEST_SUITE_REGISTRATION(PDFITest
);
515 CPPUNIT_PLUGIN_IMPLEMENT();
517 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */