diff options
Diffstat (limited to 'sdext/source/pdfimport')
58 files changed, 4389 insertions, 4389 deletions
diff --git a/sdext/source/pdfimport/config/description.xml b/sdext/source/pdfimport/config/description.xml index 0b4031a5a63f..b7340a1f27b5 100755 --- a/sdext/source/pdfimport/config/description.xml +++ b/sdext/source/pdfimport/config/description.xml @@ -21,7 +21,7 @@ <display-name> <name lang="en-US">PDF Import</name> </display-name> - + <icon> <default xlink:href="images/extension_32.png" /> <high-contrast xlink:href="images/extension_32_h.png" /> diff --git a/sdext/source/pdfimport/config/pdf_import_filter.xcu b/sdext/source/pdfimport/config/pdf_import_filter.xcu index 89ad84b7a6cf..f10a0022fa82 100644 --- a/sdext/source/pdfimport/config/pdf_import_filter.xcu +++ b/sdext/source/pdfimport/config/pdf_import_filter.xcu @@ -9,7 +9,7 @@ <value>0</value> </prop> <prop oor:name="FilterService" oor:type="xs:string"> - <!-- stacks filters for XML import. see UserData below. + <!-- stacks filters for XML import. see UserData below. the _Writer_ in the impl name is a misnomer --> <value>com.sun.star.comp.Writer.XmlFilterAdaptor</value> </prop> @@ -38,7 +38,7 @@ <value>0</value> </prop> <prop oor:name="FilterService" oor:type="xs:string"> - <!-- stacks filters for XML import. see UserData below. + <!-- stacks filters for XML import. see UserData below. the _Writer_ in the impl name is a misnomer --> <value>com.sun.star.comp.Writer.XmlFilterAdaptor</value> </prop> @@ -67,7 +67,7 @@ <value>0</value> </prop> <prop oor:name="FilterService" oor:type="xs:string"> - <!-- stacks filters for XML import. see UserData below. + <!-- stacks filters for XML import. see UserData below. the _Writer_ in the impl name is a misnomer --> <value>com.sun.star.comp.Writer.XmlFilterAdaptor</value> </prop> diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index bfd237d85570..265ccbcad0e1 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -104,7 +104,7 @@ namespace { {} void initControls( const uno::Reference<awt::XControlContainer>& xControls, - const rtl::OUString& rFilename ) + const rtl::OUString& rFilename ) { m_xListbox.set(xControls->getControl( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ListBox" ))), @@ -710,7 +710,7 @@ uno::Reference< io::XStream > getAdditionalStream( const rtl::OUString& xEmbed.clear(); break; } - + rtl::OUString aDocName( rInPDFFileURL.copy( rInPDFFileURL.lastIndexOf( sal_Unicode('/') )+1 ) ); bool bEntered = false; diff --git a/sdext/source/pdfimport/filterdet.hxx b/sdext/source/pdfimport/filterdet.hxx index 3532b0180333..2ca62d139ed2 100644 --- a/sdext/source/pdfimport/filterdet.hxx +++ b/sdext/source/pdfimport/filterdet.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,22 +42,22 @@ namespace pdfi { -typedef ::cppu::WeakComponentImplHelper1< +typedef ::cppu::WeakComponentImplHelper1< com::sun::star::document::XExtendedFilterDetection > PDFDetectorBase; class PDFDetector : private cppu::BaseMutex, public PDFDetectorBase { private: - com::sun::star::uno::Reference< + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext; public: - explicit PDFDetector( const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XComponentContext >& xContext ); + explicit PDFDetector( const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext >& xContext ); // XExtendedFilterDetection - virtual rtl::OUString SAL_CALL detect( com::sun::star::uno::Sequence< + virtual rtl::OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& io_rDescriptor ) throw (com::sun::star::uno::RuntimeException); }; diff --git a/sdext/source/pdfimport/inc/contentsink.hxx b/sdext/source/pdfimport/inc/contentsink.hxx index 204eb7499a50..5919028e1858 100644 --- a/sdext/source/pdfimport/inc/contentsink.hxx +++ b/sdext/source/pdfimport/inc/contentsink.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,7 +35,7 @@ #include <boost/shared_ptr.hpp> namespace rtl { class OUString; } -namespace com { namespace sun { namespace star { +namespace com { namespace sun { namespace star { namespace rendering { class XPolyPolygon2D; @@ -47,7 +47,7 @@ namespace geometry struct RealRectangle2D; struct RealPoint2D; struct RealSize2D; -} +} namespace beans { struct PropertyValue; @@ -86,7 +86,7 @@ namespace pdfi bool isUnderline; bool isOutline; double size; // device pixel - + bool operator==(const FontAttributes& rFont) const { return familyName == rFont.familyName && @@ -106,18 +106,18 @@ namespace pdfi struct ContentSink { virtual ~ContentSink() {} - + /// Total number of pages for upcoming document virtual void setPageNum( sal_Int32 nNumPages ) = 0; virtual void startPage( const ::com::sun::star::geometry::RealSize2D& rSize ) = 0; virtual void endPage() = 0; - + virtual void hyperLink( const ::com::sun::star::geometry::RealRectangle2D& rBounds, const ::rtl::OUString& rURI ) = 0; - + virtual void pushState() = 0; virtual void popState() = 0; - + virtual void setFlatness( double ) = 0; virtual void setTransformation( const ::com::sun::star::geometry::AffineMatrix2D& rMatrix ) = 0; virtual void setLineDash( const ::com::sun::star::uno::Sequence<double>& dashes, @@ -131,27 +131,27 @@ namespace pdfi virtual void setBlendMode( sal_Int8 blendMode ) = 0; virtual void setFont( const FontAttributes& rFont ) = 0; virtual void setTextRenderMode( sal_Int32 ) = 0; + - - virtual void strokePath( const ::com::sun::star::uno::Reference< + virtual void strokePath( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& rPath ) = 0; - virtual void fillPath( const ::com::sun::star::uno::Reference< + virtual void fillPath( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& rPath ) = 0; - virtual void eoFillPath( const ::com::sun::star::uno::Reference< + virtual void eoFillPath( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& rPath ) = 0; - - virtual void intersectClip(const ::com::sun::star::uno::Reference< + + virtual void intersectClip(const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& rPath) = 0; - virtual void intersectEoClip(const ::com::sun::star::uno::Reference< + virtual void intersectEoClip(const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& rPath) = 0; - + virtual void drawGlyphs( const rtl::OUString& rGlyphs, const ::com::sun::star::geometry::RealRectangle2D& rRect, const ::com::sun::star::geometry::Matrix2D& rFontMatrix ) = 0; /// issued when a sequence of associated glyphs is drawn virtual void endText() = 0; - + /// draws given bitmap as a mask (using current fill color) virtual void drawMask(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& xBitmap, @@ -159,13 +159,13 @@ namespace pdfi /// Given image must already be color-mapped and normalized to sRGB. virtual void drawImage(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& xBitmap ) = 0; - /** Given image must already be color-mapped and normalized to sRGB. + /** Given image must already be color-mapped and normalized to sRGB. maskColors must contain two sequences of color components */ virtual void drawColorMaskedImage(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& xBitmap, - const ::com::sun::star::uno::Sequence< + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>& xMaskColors ) = 0; virtual void drawMaskedImage(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& xBitmap, diff --git a/sdext/source/pdfimport/inc/odfemitter.hxx b/sdext/source/pdfimport/inc/odfemitter.hxx index d7e1c27097b7..f8c958e31c5e 100644 --- a/sdext/source/pdfimport/inc/odfemitter.hxx +++ b/sdext/source/pdfimport/inc/odfemitter.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,14 +32,14 @@ #include "xmlemitter.hxx" #include <com/sun/star/uno/Reference.hxx> -namespace com { namespace sun { namespace star { namespace io +namespace com { namespace sun { namespace star { namespace io { class XOutputStream; } } } } namespace pdfi { - XmlEmitterSharedPtr createOdfEmitter( const com::sun::star::uno::Reference< + XmlEmitterSharedPtr createOdfEmitter( const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream>& xOut ); } diff --git a/sdext/source/pdfimport/inc/pdfihelper.hxx b/sdext/source/pdfimport/inc/pdfihelper.hxx index 50e982557d01..ce0ddf50c7ad 100644 --- a/sdext/source/pdfimport/inc/pdfihelper.hxx +++ b/sdext/source/pdfimport/inc/pdfihelper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,8 +49,8 @@ namespace com { namespace sun { namespace star { namespace task namespace pdfi { - typedef std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash > PropertyMap; - typedef sal_Int32 ImageId; + typedef std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash > PropertyMap; + typedef sal_Int32 ImageId; /// What to do with a polygon. values can be ORed together enum PolygonAction { PATH_STROKE=1, PATH_FILL=2, PATH_EOFILL=4 }; @@ -64,14 +64,14 @@ namespace pdfi fPix *= px2mm; return fPix; } - + inline double convmm2Px( double fMM ) { const double mm2px = PDFI_OUTDEV_RESOLUTION/25.4; fMM *= mm2px; return fMM; } - + inline double convPx2mmPrec2( double fPix ) { return rtl_math_round( convPx2mm( fPix ), 2, rtl_math_RoundingMode_Floor ); @@ -148,12 +148,12 @@ namespace pdfi Transformation == rRight.Transformation && Clip == rRight.Clip; } - + bool isRotatedOrSkewed() const { return Transformation.get( 0, 1 ) != 0.0 || Transformation.get( 1, 0 ) != 0.0; } }; - + struct GraphicsContextHash { size_t operator()(const GraphicsContext& rGC ) const @@ -188,7 +188,7 @@ namespace pdfi /** retrieve password from user */ - bool getPassword( const ::com::sun::star::uno::Reference< + bool getPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler, rtl::OUString& rOutPwd, bool bFirstTry, diff --git a/sdext/source/pdfimport/inc/pdfparse.hxx b/sdext/source/pdfimport/inc/pdfparse.hxx index 6dae97c309b7..76db849b6b30 100644 --- a/sdext/source/pdfimport/inc/pdfparse.hxx +++ b/sdext/source/pdfimport/inc/pdfparse.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,15 +48,15 @@ class EmitContext virtual unsigned int getCurPos() = 0; virtual bool copyOrigBytes( unsigned int nOrigOffset, unsigned int nLen ) = 0; virtual unsigned int readOrigBytes( unsigned int nOrigOffset, unsigned int nLen, void* pBuf ) = 0; - + EmitContext( const PDFContainer* pTop = NULL ); virtual ~EmitContext(); - + // set this to deflate contained streams bool m_bDeflate; // set this to decrypt the PDF file bool m_bDecrypt; - + private: friend struct PDFEntry; EmitImplData* m_pImplData; @@ -66,10 +66,10 @@ struct PDFEntry { PDFEntry() {} virtual ~PDFEntry(); - + virtual bool emit( EmitContext& rWriteContext ) const = 0; virtual PDFEntry* clone() const = 0; - + protected: EmitImplData* getEmitData( EmitContext& rContext ) const; void setEmitData( EmitContext& rContext, EmitImplData* pNewEmitData ) const; @@ -102,7 +102,7 @@ struct PDFName : public PDFValue virtual ~PDFName(); virtual bool emit( EmitContext& rWriteContext ) const; virtual PDFEntry* clone() const; - + rtl::OUString getFilteredName() const; }; @@ -115,7 +115,7 @@ struct PDFString : public PDFValue virtual ~PDFString(); virtual bool emit( EmitContext& rWriteContext ) const; virtual PDFEntry* clone() const; - + rtl::OString getFilteredString() const; }; @@ -145,7 +145,7 @@ struct PDFObjectRef : public PDFValue { unsigned int m_nNumber; unsigned int m_nGeneration; - + PDFObjectRef( unsigned int nNr, unsigned int nGen ) : PDFValue(), m_nNumber( nNr ), m_nGeneration( nGen ) {} virtual ~PDFObjectRef(); @@ -173,7 +173,7 @@ struct PDFContainer : public PDFEntry virtual ~PDFContainer(); virtual bool emitSubElements( EmitContext& rWriteContext ) const; virtual void cloneSubElements( std::vector<PDFEntry*>& rNewSubElements ) const; - + PDFObject* findObject( unsigned int nNumber, unsigned int nGeneration ) const; PDFObject* findObject( PDFObjectRef* pRef ) const { return findObject( pRef->m_nNumber, pRef->m_nGeneration ); } @@ -191,12 +191,12 @@ struct PDFDict : public PDFContainer { typedef std::hash_map<rtl::OString,PDFEntry*,rtl::OStringHash> Map; Map m_aMap; - + PDFDict() {} virtual ~PDFDict(); virtual bool emit( EmitContext& rWriteContext ) const; virtual PDFEntry* clone() const; - + // inserting a value of NULL will remove rName and the previous value // from the dictionary void insertValue( const rtl::OString& rName, PDFEntry* pValue ); @@ -212,20 +212,20 @@ struct PDFStream : public PDFEntry unsigned int m_nBeginOffset; unsigned int m_nEndOffset; // offset of the byte after the stream PDFDict* m_pDict; - + PDFStream( unsigned int nBegin, unsigned int nEnd, PDFDict* pStreamDict ) : PDFEntry(), m_nBeginOffset( nBegin ), m_nEndOffset( nEnd ), m_pDict( pStreamDict ) {} virtual ~PDFStream(); virtual bool emit( EmitContext& rWriteContext ) const; virtual PDFEntry* clone() const; - + unsigned int getDictLength( const PDFContainer* pObjectContainer = NULL ) const; // get contents of the "Length" entry of the dict }; struct PDFTrailer : public PDFContainer { PDFDict* m_pDict; - + PDFTrailer() : PDFContainer(), m_pDict( NULL ) {} virtual ~PDFTrailer(); virtual bool emit( EmitContext& rWriteContext ) const; @@ -241,23 +241,23 @@ struct PDFFile : public PDFContainer public: unsigned int m_nMajor; // PDF major unsigned int m_nMinor; // PDF minor - + PDFFile() : PDFContainer(), m_pData( NULL ), m_nMajor( 0 ), m_nMinor( 0 ) {} virtual ~PDFFile(); - + virtual bool emit( EmitContext& rWriteContext ) const; virtual PDFEntry* clone() const; - + bool isEncrypted() const; // this method checks whether rPwd is compatible with // either user or owner password and sets up decrypt data in that case // returns true if decryption can be done bool setupDecryptionData( const rtl::OString& rPwd ) const; - + bool decrypt( const sal_uInt8* pInBuffer, sal_uInt32 nLen, sal_uInt8* pOutBuffer, unsigned int nObject, unsigned int nGeneration ) const; @@ -269,16 +269,16 @@ struct PDFObject : public PDFContainer PDFStream* m_pStream; unsigned int m_nNumber; unsigned int m_nGeneration; - + PDFObject( unsigned int nNr, unsigned int nGen ) : m_pObject( NULL ), m_pStream( NULL ), m_nNumber( nNr ), m_nGeneration( nGen ) {} virtual ~PDFObject(); virtual bool emit( EmitContext& rWriteContext ) const; virtual PDFEntry* clone() const; - + // writes only the contained stream, deflated if necessary bool writeStream( EmitContext& rContext, const PDFFile* pPDFFile ) const; - + private: // returns true if stream is deflated // fills *ppStream and *pBytes with start of stream and count of bytes @@ -300,7 +300,7 @@ class PDFReader public: PDFReader() {} ~PDFReader() {} - + PDFEntry* read( const char* pFileName ); PDFEntry* read( const char* pBuffer, unsigned int nLen ); }; diff --git a/sdext/source/pdfimport/inc/saxemitter.hxx b/sdext/source/pdfimport/inc/saxemitter.hxx index c8a394ab746e..c2871f8124cc 100644 --- a/sdext/source/pdfimport/inc/saxemitter.hxx +++ b/sdext/source/pdfimport/inc/saxemitter.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,7 +40,7 @@ namespace sax namespace pdfi { - XmlEmitterSharedPtr createSaxEmitter( const com::sun::star::uno::Reference< + XmlEmitterSharedPtr createSaxEmitter( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler >& xDocHdl ); } diff --git a/sdext/source/pdfimport/inc/treevisitorfactory.hxx b/sdext/source/pdfimport/inc/treevisitorfactory.hxx index 064b23864043..fd9ad74fc5f4 100644 --- a/sdext/source/pdfimport/inc/treevisitorfactory.hxx +++ b/sdext/source/pdfimport/inc/treevisitorfactory.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sdext/source/pdfimport/inc/wrapper.hxx b/sdext/source/pdfimport/inc/wrapper.hxx index a7ca18574a39..119510c6c22a 100644 --- a/sdext/source/pdfimport/inc/wrapper.hxx +++ b/sdext/source/pdfimport/inc/wrapper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,7 +33,7 @@ #include <com/sun/star/uno/Reference.hxx> namespace rtl { class OUString; } -namespace com { namespace sun { namespace star { +namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } @@ -49,15 +49,15 @@ namespace pdfi const com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >& xIHdl, const rtl::OUString& rPwd, - const com::sun::star::uno::Reference< + const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext ); - bool xpdf_ImportFromStream( const com::sun::star::uno::Reference< + bool xpdf_ImportFromStream( const com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& xInput, const ContentSinkSharedPtr& rSink, const com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >& xIHdl, const rtl::OUString& rPwd, - const com::sun::star::uno::Reference< + const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext ); } diff --git a/sdext/source/pdfimport/inc/xmlemitter.hxx b/sdext/source/pdfimport/inc/xmlemitter.hxx index 3700e67b8006..66a43d609656 100644 --- a/sdext/source/pdfimport/inc/xmlemitter.hxx +++ b/sdext/source/pdfimport/inc/xmlemitter.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ namespace pdfi { public: virtual ~XmlEmitter() {} - + /** Open up a tag with the given properties */ virtual void beginTag( const char* pTag, const PropertyMap& rProperties ) = 0; diff --git a/sdext/source/pdfimport/misc/pdfihelper.cxx b/sdext/source/pdfimport/misc/pdfihelper.cxx index 1c888e1e6d1f..8209346b478a 100644 --- a/sdext/source/pdfimport/misc/pdfihelper.cxx +++ b/sdext/source/pdfimport/misc/pdfihelper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -65,7 +65,7 @@ rtl::OUString pdfi::unitMMString( double fMM ) rtl::OUStringBuffer aBuf( 32 ); aBuf.append( rtl_math_round( fMM, 2, rtl_math_RoundingMode_Floor ) ); aBuf.appendAscii( "mm" ); - + return aBuf.makeStringAndClear(); } @@ -74,7 +74,7 @@ rtl::OUString pdfi::convertPixelToUnitString( double fPix ) rtl::OUStringBuffer aBuf( 32 ); aBuf.append( rtl_math_round( convPx2mm( fPix ), 2, rtl_math_RoundingMode_Floor ) ); aBuf.appendAscii( "mm" ); - + return aBuf.makeStringAndClear(); } diff --git a/sdext/source/pdfimport/misc/pwdinteract.cxx b/sdext/source/pdfimport/misc/pwdinteract.cxx index 6ef2a17c2875..3280beafe3d7 100644 --- a/sdext/source/pdfimport/misc/pwdinteract.cxx +++ b/sdext/source/pdfimport/misc/pwdinteract.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sdext/source/pdfimport/odf/odfemitter.cxx b/sdext/source/pdfimport/odf/odfemitter.cxx index c2d30ac16304..665d351e6dd7 100644 --- a/sdext/source/pdfimport/odf/odfemitter.cxx +++ b/sdext/source/pdfimport/odf/odfemitter.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sdext/source/pdfimport/pdfiadaptor.cxx b/sdext/source/pdfimport/pdfiadaptor.cxx index 3b800f242396..f40e35480c5a 100644 --- a/sdext/source/pdfimport/pdfiadaptor.cxx +++ b/sdext/source/pdfimport/pdfiadaptor.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -168,7 +168,7 @@ sal_Bool SAL_CALL PDFIHybridAdaptor::filter( const uno::Sequence< beans::Propert catch(uno::Exception& e) { (void)e; - OSL_TRACE( "subfilter exception: %s\n", + OSL_TRACE( "subfilter exception: %s\n", OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); } @@ -182,7 +182,7 @@ sal_Bool SAL_CALL PDFIHybridAdaptor::filter( const uno::Sequence< beans::Propert { nPwPos = aFilterData.getLength(); aFilterData.realloc( nPwPos+1 ); - aFilterData[nPwPos].Name = rtl::OUString( + aFilterData[nPwPos].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Password" ) ); } aFilterData[nPwPos].Value <<= aPwd; @@ -201,7 +201,7 @@ sal_Bool SAL_CALL PDFIHybridAdaptor::filter( const uno::Sequence< beans::Propert else OSL_TRACE( "PDFIAdaptor::filter: no model set\n" ); #endif - + return bRet; } @@ -238,12 +238,12 @@ bool PDFIRawAdaptor::parse( const uno::Reference<io::XInputStream>& xInput const uno::Reference<task::XInteractionHandler>& xIHdl, const rtl::OUString& rPwd, const uno::Reference<task::XStatusIndicator>& xStatus, - const XmlEmitterSharedPtr& rEmitter, + const XmlEmitterSharedPtr& rEmitter, const rtl::OUString& rURL ) { // container for metaformat boost::shared_ptr<PDFIProcessor> pSink( - new PDFIProcessor(xStatus, m_xContext)); + new PDFIProcessor(xStatus, m_xContext)); // TEMP! TEMP! if( m_bEnableToplevelText ) @@ -274,7 +274,7 @@ bool PDFIRawAdaptor::odfConvert( const rtl::OUString& r // tell input stream that it is no longer needed xOutput->closeOutput(); - + return bSuccess; } @@ -313,8 +313,8 @@ sal_Bool SAL_CALL PDFIRawAdaptor::importer( const uno::Sequence< beans::Property // tell input stream that it is no longer needed xInput->closeInput(); - xInput.clear(); - + xInput.clear(); + return bSuccess; } diff --git a/sdext/source/pdfimport/pdfiadaptor.hxx b/sdext/source/pdfimport/pdfiadaptor.hxx index d9d6d71356f7..2b0b0b915be1 100644 --- a/sdext/source/pdfimport/pdfiadaptor.hxx +++ b/sdext/source/pdfimport/pdfiadaptor.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,7 +48,7 @@ namespace pdfi { - typedef ::cppu::WeakComponentImplHelper2< + typedef ::cppu::WeakComponentImplHelper2< com::sun::star::document::XFilter, com::sun::star::document::XImporter > PDFIHybridAdaptorBase; @@ -56,13 +56,13 @@ namespace pdfi public PDFIHybridAdaptorBase { private: - com::sun::star::uno::Reference< + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext; - com::sun::star::uno::Reference< + com::sun::star::uno::Reference< com::sun::star::frame::XModel > m_xModel; public: - explicit PDFIHybridAdaptor( const ::com::sun::star::uno::Reference< + explicit PDFIHybridAdaptor( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext ); // XFilter @@ -75,7 +75,7 @@ namespace pdfi }; - typedef ::cppu::WeakComponentImplHelper2< + typedef ::cppu::WeakComponentImplHelper2< com::sun::star::xml::XImportFilter, com::sun::star::document::XImporter > PDFIAdaptorBase; @@ -85,9 +85,9 @@ namespace pdfi public PDFIAdaptorBase { private: - com::sun::star::uno::Reference< + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext; - com::sun::star::uno::Reference< + com::sun::star::uno::Reference< com::sun::star::frame::XModel > m_xModel; TreeVisitorFactorySharedPtr m_pVisitorFactory; bool m_bEnableToplevelText; @@ -96,11 +96,11 @@ namespace pdfi const com::sun::star::uno::Reference<com::sun::star::task::XInteractionHandler>& xIHdl, const rtl::OUString& rPwd, const com::sun::star::uno::Reference<com::sun::star::task::XStatusIndicator>& xStatus, - const XmlEmitterSharedPtr& rEmitter, + const XmlEmitterSharedPtr& rEmitter, const rtl::OUString& rURL ); - + public: - explicit PDFIRawAdaptor( const ::com::sun::star::uno::Reference< + explicit PDFIRawAdaptor( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext ); /** Set factory object used to create the tree visitors @@ -114,7 +114,7 @@ namespace pdfi void enableToplevelText() { m_bEnableToplevelText=true; } /** Export pdf document to ODG - + @param xOutput Stream to write the flat xml file to @@ -128,7 +128,7 @@ namespace pdfi // XImportFilter virtual sal_Bool SAL_CALL importer( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rSourceData, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler >& rHdl, - const com::sun::star::uno::Sequence< rtl::OUString >& rUserData ) throw( com::sun::star::uno::RuntimeException ); + const com::sun::star::uno::Sequence< rtl::OUString >& rUserData ) throw( com::sun::star::uno::RuntimeException ); // XImporter virtual void SAL_CALL setTargetDocument( const com::sun::star::uno::Reference< com::sun::star::lang::XComponent >& xDocument ) diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx index c41e3acfb902..51bf6a1b7348 100644 --- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,7 +60,7 @@ struct EmitImplData XRefTable m_aXRefTable; // container of all indirect objects (usually a PDFFile*) const PDFContainer* m_pObjectContainer; - + // returns true if the xref table was updated bool insertXref( unsigned int nObject, unsigned int nGeneration, unsigned int nOffset ) { @@ -79,7 +79,7 @@ struct EmitImplData } return false; } - + EmitImplData( const PDFContainer* pTopContainer ) : m_pObjectContainer( pTopContainer ) {} @@ -212,7 +212,7 @@ OString PDFString::getFilteredString() const { int nLen = m_aString.getLength(); OStringBuffer aBuf( nLen ); - + const sal_Char* pStr = m_aString.getStr(); if( *pStr == '(' ) { @@ -296,7 +296,7 @@ OString PDFString::getFilteredString() const aBuf.append( rResult ); } } - + return aBuf.makeStringAndClear(); } @@ -308,7 +308,7 @@ bool PDFNumber::emit( EmitContext& rWriteContext ) const { rtl::OStringBuffer aBuf( 32 ); aBuf.append( ' ' ); - + double fValue = m_fValue; bool bNeg = false; int nPrecision = 5; @@ -348,7 +348,7 @@ bool PDFNumber::emit( EmitContext& rWriteContext ) const nBound /= 10; } } - + return rWriteContext.write( aBuf.getStr(), aBuf.getLength() ); } @@ -485,7 +485,7 @@ void PDFDict::insertValue( const OString& rName, PDFEntry* pValue ) { if( ! pValue ) eraseValue( rName ); - + std::hash_map<OString,PDFEntry*,OStringHash>::iterator it = m_aMap.find( rName ); if( it == m_aMap.end() ) { @@ -648,7 +648,7 @@ bool PDFObject::getDeflatedStream( char** ppStream, unsigned int* pBytes, const pFilter = dynamic_cast<PDFName*>(pArray->m_aSubElements.front()); } } - + // is the (first) filter FlateDecode ? if( pFilter && pFilter->m_aName.equals( "FlateDecode" ) ) { @@ -692,7 +692,7 @@ static void unzipToBuffer( const char* pBegin, unsigned int nLen, aZStr.zfree = ( free_func )0; aZStr.opaque = ( voidpf )0; inflateInit(&aZStr); - + const unsigned int buf_increment_size = 16384; *pOutBuf = (sal_uInt8*)rtl_reallocateMemory( *pOutBuf, buf_increment_size ); @@ -755,11 +755,11 @@ bool PDFObject::emit( EmitContext& rWriteContext ) const { if( ! rWriteContext.write( "\n", 1 ) ) return false; - + EmitImplData* pEData = getEmitData( rWriteContext ); if( pEData ) pEData->insertXref( m_nNumber, m_nGeneration, rWriteContext.getCurPos() ); - + OStringBuffer aBuf( 32 ); aBuf.append( sal_Int32( m_nNumber ) ); aBuf.append( ' ' ); @@ -767,7 +767,7 @@ bool PDFObject::emit( EmitContext& rWriteContext ) const aBuf.append( " obj\n" ); if( ! rWriteContext.write( aBuf.getStr(), aBuf.getLength() ) ) return false; - + if( rWriteContext.m_bDeflate && pEData ) { char* pStream = NULL; @@ -944,9 +944,9 @@ struct PDFFileImplData OString m_aDocID; rtlCipher m_aCipher; rtlDigest m_aDigest; - + sal_uInt8 m_aDecryptionKey[ENCRYPTION_KEY_LEN+5]; // maximum handled key length - + PDFFileImplData() : m_bIsEncrypted( false ), m_bStandardHandler( false ), @@ -961,7 +961,7 @@ struct PDFFileImplData rtl_zeroMemory( m_aUEntry, sizeof( m_aUEntry ) ); rtl_zeroMemory( m_aDecryptionKey, sizeof( m_aDecryptionKey ) ); } - + ~PDFFileImplData() { if( m_aCipher ) @@ -988,10 +988,10 @@ bool PDFFile::decrypt( const sal_uInt8* pInBuffer, sal_uInt32 nLen, sal_uInt8* p { if( ! isEncrypted() ) return false; - + if( ! m_pData->m_aCipher ) m_pData->m_aCipher = rtl_cipher_createARCFOUR( rtl_Cipher_ModeStream ); - + // modify encryption key sal_uInt32 i = m_pData->m_nKeyLength; m_pData->m_aDecryptionKey[i++] = sal_uInt8(nObject&0xff); @@ -999,11 +999,11 @@ bool PDFFile::decrypt( const sal_uInt8* pInBuffer, sal_uInt32 nLen, sal_uInt8* p m_pData->m_aDecryptionKey[i++] = sal_uInt8((nObject>>16)&0xff); m_pData->m_aDecryptionKey[i++] = sal_uInt8(nGeneration&0xff); m_pData->m_aDecryptionKey[i++] = sal_uInt8((nGeneration>>8)&0xff); - + sal_uInt8 aSum[ENCRYPTION_KEY_LEN]; rtl_digest_updateMD5( m_pData->m_aDigest, m_pData->m_aDecryptionKey, i ); rtl_digest_getMD5( m_pData->m_aDigest, aSum, sizeof( aSum ) ); - + if( i > 16 ) i = 16; @@ -1086,12 +1086,12 @@ static bool check_user_password( const OString& rPwd, PDFFileImplData* pData ) { // see PDF reference 1.4 Algorithm 3.4 // encrypt pad string - rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode, + rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode, aKey, nKeyLen, NULL, 0 ); rtl_cipher_encodeARCFOUR( pData->m_aCipher, nPadString, sizeof( nPadString ), nEncryptedEntry, sizeof( nEncryptedEntry ) ); - bValid = (rtl_compareMemory( nEncryptedEntry, pData->m_aUEntry, 32 ) == 0); + bValid = (rtl_compareMemory( nEncryptedEntry, pData->m_aUEntry, 32 ) == 0); } else if( pData->m_nStandardRevision == 3 ) { @@ -1099,7 +1099,7 @@ static bool check_user_password( const OString& rPwd, PDFFileImplData* pData ) rtl_digest_updateMD5( pData->m_aDigest, nPadString, sizeof( nPadString ) ); rtl_digest_updateMD5( pData->m_aDigest, pData->m_aDocID.getStr(), pData->m_aDocID.getLength() ); rtl_digest_getMD5( pData->m_aDigest, nEncryptedEntry, sizeof(nEncryptedEntry) ); - rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode, + rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode, aKey, sizeof(aKey), NULL, 0 ); rtl_cipher_encodeARCFOUR( pData->m_aCipher, nEncryptedEntry, 16, @@ -1109,14 +1109,14 @@ static bool check_user_password( const OString& rPwd, PDFFileImplData* pData ) sal_uInt8 aTempKey[ENCRYPTION_KEY_LEN]; for( sal_uInt32 j = 0; j < sizeof(aTempKey); j++ ) aTempKey[j] = static_cast<sal_uInt8>( aKey[j] ^ i ); - - rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode, + + rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode, aTempKey, sizeof(aTempKey), NULL, 0 ); rtl_cipher_encodeARCFOUR( pData->m_aCipher, nEncryptedEntry, 16, nEncryptedEntry, 16 ); // encrypt in place } - bValid = (rtl_compareMemory( nEncryptedEntry, pData->m_aUEntry, 16 ) == 0); + bValid = (rtl_compareMemory( nEncryptedEntry, pData->m_aUEntry, 16 ) == 0); } return bValid; } @@ -1125,7 +1125,7 @@ bool PDFFile::setupDecryptionData( const OString& rPwd ) const { if( !impl_getData()->m_bIsEncrypted ) return rPwd.getLength() == 0; - + // check if we can handle this encryption at all if( ! m_pData->m_bStandardHandler || m_pData->m_nAlgoVersion < 1 || @@ -1133,15 +1133,15 @@ bool PDFFile::setupDecryptionData( const OString& rPwd ) const m_pData->m_nStandardRevision < 2 || m_pData->m_nStandardRevision > 3 ) return false; - + if( ! m_pData->m_aCipher ) m_pData->m_aCipher = rtl_cipher_createARCFOUR(rtl_Cipher_ModeStream); if( ! m_pData->m_aDigest ) m_pData->m_aDigest = rtl_digest_createMD5(); - + // first try user password bool bValid = check_user_password( rPwd, m_pData ); - + if( ! bValid ) { // try owner password @@ -1152,7 +1152,7 @@ bool PDFFile::setupDecryptionData( const OString& rPwd ) const sal_uInt32 nKeyLen = password_to_key( rPwd, aKey, m_pData, true ); if( m_pData->m_nStandardRevision == 2 ) { - rtl_cipher_initARCFOUR( m_pData->m_aCipher, rtl_Cipher_DirectionDecode, + rtl_cipher_initARCFOUR( m_pData->m_aCipher, rtl_Cipher_DirectionDecode, aKey, nKeyLen, NULL, 0 ); rtl_cipher_decodeARCFOUR( m_pData->m_aCipher, m_pData->m_aOEntry, 32, @@ -1166,7 +1166,7 @@ bool PDFFile::setupDecryptionData( const OString& rPwd ) const sal_uInt8 nTempKey[ENCRYPTION_KEY_LEN]; for( unsigned int j = 0; j < sizeof(nTempKey); j++ ) nTempKey[j] = sal_uInt8(aKey[j] ^ i); - rtl_cipher_initARCFOUR( m_pData->m_aCipher, rtl_Cipher_DirectionDecode, + rtl_cipher_initARCFOUR( m_pData->m_aCipher, rtl_Cipher_DirectionDecode, nTempKey, nKeyLen, NULL, 0 ); rtl_cipher_decodeARCFOUR( m_pData->m_aCipher, nPwd, 32, @@ -1316,17 +1316,17 @@ PDFFileImplData* PDFFile::impl_getData() const break; } } - } + } } } - + return m_pData; } bool PDFFile::emit( EmitContext& rWriteContext ) const { setEmitData( rWriteContext, new EmitImplData( this ) ); - + OStringBuffer aBuf( 32 ); aBuf.append( "%PDF-" ); aBuf.append( sal_Int32( m_nMajor ) ); diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx b/sdext/source/pdfimport/pdfparse/pdfparse.cxx index b278021df6f8..5105ac5e2413 100644 --- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx @@ -85,7 +85,7 @@ class StringEmitContext : public EmitContext } return 0; } - + OString getString() { return m_aBuf.makeStringAndClear(); } }; @@ -107,7 +107,7 @@ public: std::vector< PDFEntry* > m_aObjectStack; rtl::OString m_aErrorString; iteratorT m_aGlobalBegin; - + public: struct pdf_string_parser { @@ -117,7 +117,7 @@ public: operator()(ScannerT const& scan, result_t&) const { std::ptrdiff_t len = 0; - + int nBraceLevel = 0; while( ! scan.at_end() ) { @@ -150,11 +150,11 @@ public: definition( const PDFGrammar<iteratorT>& rSelf ) { PDFGrammar<iteratorT>* pSelf = const_cast< PDFGrammar<iteratorT>* >( &rSelf ); - + // workaround workshop compiler: comment_p doesn't work // comment = comment_p("%")[boost::bind(&PDFGrammar::pushComment, pSelf, _1, _2 )]; comment = lexeme_d[ (ch_p('%') >> *(~ch_p('\r') & ~ch_p('\n')) >> eol_p)[boost::bind(&PDFGrammar::pushComment, pSelf, _1, _2 )] ]; - + boolean = (str_p("true") | str_p("false"))[boost::bind(&PDFGrammar::pushBool, pSelf, _1, _2)]; // workaround workshop compiler: confix_p doesn't work @@ -170,13 +170,13 @@ public: //stringtype = ( confix_p("(",*anychar_p, ")") | // confix_p("<",*xdigit_p, ">") ) // [boost::bind(&PDFGrammar::pushString,pSelf, _1, _2)]; - + stringtype = ( ( ch_p('(') >> functor_parser<pdf_string_parser>() >> ch_p(')') ) | ( ch_p('<') >> *xdigit_p >> ch_p('>') ) ) [boost::bind(&PDFGrammar::pushString,pSelf, _1, _2)]; null_object = str_p( "null" )[boost::bind(&PDFGrammar::pushNull, pSelf, _1, _2)]; - + #ifdef USE_ASSIGN_ACTOR objectref = ( uint_p[push_back_a(pSelf->m_aUIntStack)] >> uint_p[push_back_a(pSelf->m_aUIntStack)] @@ -202,10 +202,10 @@ public: [boost::bind(&PDFGrammar::pushDouble, pSelf, _1, _2)] | stringtype | boolean | null_object; #endif - + dict_begin = str_p( "<<" )[boost::bind(&PDFGrammar::beginDict, pSelf, _1, _2)]; dict_end = str_p( ">>" )[boost::bind(&PDFGrammar::endDict, pSelf, _1, _2)]; - + array_begin = str_p("[")[boost::bind(&PDFGrammar::beginArray,pSelf, _1, _2)]; array_end = str_p("]")[boost::bind(&PDFGrammar::endArray,pSelf, _1, _2)]; @@ -219,7 +219,7 @@ public: >> str_p("obj" )[boost::bind(&PDFGrammar::beginObject, pSelf, _1, _2)]; #endif object_end = str_p( "endobj" )[boost::bind(&PDFGrammar::endObject, pSelf, _1, _2)]; - + xref = str_p( "xref" ) >> uint_p >> uint_p >> lexeme_d[ +( repeat_p(10)[digit_p] @@ -229,21 +229,21 @@ public: >> ( ch_p('n') | ch_p('f') ) >> repeat_p(2)[space_p] ) ]; - + dict_element= dict_begin | comment | simple_type | array_begin | array_end | dict_end; - + object = object_begin >> *dict_element >> !stream >> object_end; - + trailer = str_p( "trailer" )[boost::bind(&PDFGrammar::beginTrailer,pSelf,_1,_2)] >> *dict_element >> str_p("startxref") >> uint_p >> str_p("%%EOF")[boost::bind(&PDFGrammar::endTrailer,pSelf,_1,_2)]; - + #ifdef USE_ASSIGN_ACTOR pdfrule = ! (lexeme_d[ str_p( "%PDF-" ) @@ -270,10 +270,10 @@ public: objectref, array, value, dict_element, dict_begin, dict_end, array_begin, array_end, object, object_begin, object_end, xref, trailer, pdfrule; - + const rule< ScannerT >& start() const { return pdfrule; } }; - + #ifndef USE_ASSIGN_ACTOR void push_back_action_uint( unsigned int i ) { @@ -284,12 +284,12 @@ public: m_fDouble = d; } #endif - + void parseError( const char* pMessage, iteratorT pLocation ) { throw_( pLocation, pMessage ); } - + rtl::OString iteratorToString( iteratorT first, iteratorT last ) const { rtl::OStringBuffer aStr( 32 ); @@ -300,7 +300,7 @@ public: } return aStr.makeStringAndClear(); } - + void haveFile( iteratorT pBegin, iteratorT /*pEnd*/ ) { if( m_aObjectStack.empty() ) @@ -308,14 +308,14 @@ public: PDFFile* pFile = new PDFFile(); pFile->m_nMinor = m_aUIntStack.back(); m_aUIntStack.pop_back(); - pFile->m_nMajor = m_aUIntStack.back(); + pFile->m_nMajor = m_aUIntStack.back(); m_aUIntStack.pop_back(); m_aObjectStack.push_back( pFile ); } else parseError( "found file header in unusual place", pBegin ); } - + void pushComment( iteratorT first, iteratorT last ) { // add a comment to the current stack element @@ -328,7 +328,7 @@ public: parseError( "comment without container", first ); pContainer->m_aSubElements.push_back( pComment ); } - + void insertNewValue( PDFEntry* pNewValue, iteratorT pPos ) { PDFContainer* pContainer = NULL; @@ -382,7 +382,7 @@ public: parseError( pMsg, pPos ); } } - + void pushName( iteratorT first, iteratorT last ) { insertNewValue( new PDFName(iteratorToString(first,last)), first ); @@ -408,7 +408,7 @@ public: insertNewValue( new PDFNull(), first ); } - + void beginObject( iteratorT first, iteratorT /*last*/ ) { if( m_aObjectStack.empty() ) @@ -418,12 +418,12 @@ public: m_aUIntStack.pop_back(); unsigned int nObject = m_aUIntStack.back(); m_aUIntStack.pop_back(); - + PDFObject* pObj = new PDFObject( nObject, nGeneration ); pObj->m_nOffset = first - m_aGlobalBegin; PDFContainer* pContainer = dynamic_cast<PDFContainer*>(m_aObjectStack.back()); - if( pContainer && + if( pContainer && ( dynamic_cast<PDFFile*>(pContainer) || dynamic_cast<PDFPart*>(pContainer) ) ) { @@ -433,7 +433,7 @@ public: else parseError( "object in wrong place", first ); } - + void endObject( iteratorT first, iteratorT ) { if( m_aObjectStack.empty() ) @@ -443,7 +443,7 @@ public: else m_aObjectStack.pop_back(); } - + void pushObjectRef( iteratorT first, iteratorT ) { unsigned int nGeneration = m_aUIntStack.back(); @@ -452,7 +452,7 @@ public: m_aUIntStack.pop_back(); insertNewValue( new PDFObjectRef(nObject,nGeneration), first ); } - + void beginDict( iteratorT first, iteratorT ) { PDFDict* pDict = new PDFDict(); @@ -471,7 +471,7 @@ public: parseError( "spurious dictionary end", first ); else m_aObjectStack.pop_back(); - + PDFEntry* pOffender = pDict->buildMap(); if( pOffender ) { @@ -487,7 +487,7 @@ public: { PDFArray* pArray = new PDFArray(); pArray->m_nOffset = first - m_aGlobalBegin; - + insertNewValue( pArray, first ); // will not come here if insertion fails (exception) m_aObjectStack.push_back( pArray ); @@ -502,7 +502,7 @@ public: else m_aObjectStack.pop_back(); } - + void emitStream( iteratorT first, iteratorT last ) { if( m_aObjectStack.empty() ) @@ -512,7 +512,7 @@ public: { if( pObj->m_pStream ) parseError( "multiple streams in object", first ); - + PDFDict* pDict = dynamic_cast<PDFDict*>(pObj->m_pObject); if( pDict ) { @@ -535,7 +535,7 @@ public: pTrailer->m_nOffset = first - m_aGlobalBegin; PDFContainer* pContainer = dynamic_cast<PDFContainer*>(m_aObjectStack.back()); - if( pContainer && + if( pContainer && ( dynamic_cast<PDFFile*>(pContainer) || dynamic_cast<PDFPart*>(pContainer) ) ) { @@ -560,7 +560,7 @@ public: PDFEntry* PDFReader::read( const char* pBuffer, unsigned int nLen ) { PDFGrammar<const char*> aGrammar( pBuffer ); - + try { boost::spirit::parse_info<const char*> aInfo = @@ -588,7 +588,7 @@ PDFEntry* PDFReader::read( const char* pBuffer, unsigned int nLen ) } #endif } - + PDFEntry* pRet = NULL; unsigned int nEntries = aGrammar.m_aObjectStack.size(); if( nEntries == 1 ) @@ -600,7 +600,7 @@ PDFEntry* PDFReader::read( const char* pBuffer, unsigned int nLen ) else if( nEntries > 1 ) fprintf( stderr, "error got %u stack objects in parse\n", nEntries ); #endif - + return pRet; } @@ -611,7 +611,7 @@ PDFEntry* PDFReader::read( const char* pFileName ) since converting to boost 1.39 file_iterator does not work anymore on all Windows systems C++ stdlib istream_iterator does not allow "-" apparently using spirit 2.0 doesn't work in our environment with the MSC - + So for the time being bite the bullet and read the whole file. FIXME: give Spirit 2.x another try when we upgrade boost again. */ @@ -638,7 +638,7 @@ PDFEntry* PDFReader::read( const char* pFileName ) return NULL; file_iterator<> file_end = file_start.make_end(); PDFGrammar< file_iterator<> > aGrammar( file_start ); - + try { boost::spirit::parse_info< file_iterator<> > aInfo = @@ -666,7 +666,7 @@ PDFEntry* PDFReader::read( const char* pFileName ) } #endif } - + PDFEntry* pRet = NULL; unsigned int nEntries = aGrammar.m_aObjectStack.size(); if( nEntries == 1 ) @@ -697,7 +697,7 @@ PDFEntry* PDFReader::read( const char* pFileName ) #pragma enable_warn #elif defined _MSC_VER #pragma warning(pop) -#endif +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/sax/emitcontext.cxx b/sdext/source/pdfimport/sax/emitcontext.cxx index 19d439060883..21de11382aa1 100644 --- a/sdext/source/pdfimport/sax/emitcontext.cxx +++ b/sdext/source/pdfimport/sax/emitcontext.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sdext/source/pdfimport/sax/emitcontext.hxx b/sdext/source/pdfimport/sax/emitcontext.hxx index e617763636f3..c67615a7456b 100644 --- a/sdext/source/pdfimport/sax/emitcontext.hxx +++ b/sdext/source/pdfimport/sax/emitcontext.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,7 +30,7 @@ #define INCLUDED_PDFI_EMITCONTEXT_HXX #include "xmlemitter.hxx" - + #include <com/sun/star/xml/sax/XDocumentHandler.hpp> #include <rtl/ustring.hxx> @@ -43,14 +43,14 @@ namespace pdfi class SaxEmitter : public XmlEmitter { private: - com::sun::star::uno::Reference< + com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler > m_xDocHdl; - + public: - explicit SaxEmitter( const com::sun::star::uno::Reference< + explicit SaxEmitter( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler >& xDocHdl ); ~SaxEmitter(); - + virtual void beginTag( const char* pTag, const PropertyMap& rProperties ); virtual void write( const rtl::OUString& rString ); virtual void endTag( const char* pTag ); diff --git a/sdext/source/pdfimport/sax/saxattrlist.cxx b/sdext/source/pdfimport/sax/saxattrlist.cxx index 2059e836bfae..dbfe2d3aad1f 100644 --- a/sdext/source/pdfimport/sax/saxattrlist.cxx +++ b/sdext/source/pdfimport/sax/saxattrlist.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -65,7 +65,7 @@ namespace { return aStr; } } - + sal_Int16 SAL_CALL SaxAttrList::getLength() throw() { return sal_Int16(m_aAttributes.size()); @@ -95,7 +95,7 @@ rtl::OUString SAL_CALL SaxAttrList::getValueByName(const ::rtl::OUString& i_rNam std::hash_map< rtl::OUString, size_t, rtl::OUStringHash >::const_iterator it = m_aIndexMap.find( i_rName ); return (it != m_aIndexMap.end()) ? m_aAttributes[it->second].m_aValue : rtl::OUString(); } - + com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL SaxAttrList::createClone() throw() { return new SaxAttrList( *this ); diff --git a/sdext/source/pdfimport/sax/saxattrlist.hxx b/sdext/source/pdfimport/sax/saxattrlist.hxx index 5e01ef18896a..5ca6b56cf9f1 100644 --- a/sdext/source/pdfimport/sax/saxattrlist.hxx +++ b/sdext/source/pdfimport/sax/saxattrlist.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,19 +48,19 @@ namespace pdfi { rtl::OUString m_aName; rtl::OUString m_aValue; - + AttrEntry( const rtl::OUString& i_rName, const rtl::OUString& i_rValue ) : m_aName( i_rName ), m_aValue( i_rValue ) {} }; std::vector< AttrEntry > m_aAttributes; std::hash_map< rtl::OUString, size_t, rtl::OUStringHash > m_aIndexMap; - + public: SaxAttrList() {} SaxAttrList( const std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >& ); SaxAttrList( const SaxAttrList& ); virtual ~SaxAttrList(); - + // ::com::sun::star::xml::sax::XAttributeList virtual sal_Int16 SAL_CALL getLength() throw(); virtual rtl::OUString SAL_CALL getNameByIndex(sal_Int16 i) throw(); @@ -68,7 +68,7 @@ namespace pdfi virtual rtl::OUString SAL_CALL getTypeByName(const ::rtl::OUString& aName) throw(); virtual rtl::OUString SAL_CALL getValueByIndex(sal_Int16 i) throw(); virtual rtl::OUString SAL_CALL getValueByName(const ::rtl::OUString& aName) throw(); - + // ::com::sun::star::util::XCloneable virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone() throw(); }; diff --git a/sdext/source/pdfimport/services.cxx b/sdext/source/pdfimport/services.cxx index a7c61f1a2577..c4860ebe1170 100644 --- a/sdext/source/pdfimport/services.cxx +++ b/sdext/source/pdfimport/services.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -95,7 +95,7 @@ namespace struct ComponentDescription { - const sal_Char* pAsciiServiceName; + const sal_Char* pAsciiServiceName; const sal_Char* pAsciiImplementationName; ComponentFactory pFactory; diff --git a/sdext/source/pdfimport/test/export.map b/sdext/source/pdfimport/test/export.map index 7321bbca16ad..f313c44bd7ad 100755 --- a/sdext/source/pdfimport/test/export.map +++ b/sdext/source/pdfimport/test/export.map @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite diff --git a/sdext/source/pdfimport/test/outputwrap.hxx b/sdext/source/pdfimport/test/outputwrap.hxx index 148ee739e7d7..5da34d5f9f80 100644 --- a/sdext/source/pdfimport/test/outputwrap.hxx +++ b/sdext/source/pdfimport/test/outputwrap.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,7 +38,7 @@ namespace pdfi { -typedef ::cppu::WeakComponentImplHelper1< +typedef ::cppu::WeakComponentImplHelper1< com::sun::star::io::XOutputStream > OutputWrapBase; class OutputWrap : private cppu::BaseMutex, public OutputWrapBase @@ -47,7 +47,7 @@ typedef ::cppu::WeakComponentImplHelper1< public: - explicit OutputWrap( const rtl::OUString& rURL ) : OutputWrapBase(m_aMutex), maFile(rURL) + explicit OutputWrap( const rtl::OUString& rURL ) : OutputWrapBase(m_aMutex), maFile(rURL) { maFile.open(osl_File_OpenFlag_Create|OpenFlag_Write); } @@ -70,6 +70,6 @@ typedef ::cppu::WeakComponentImplHelper1< }; } #endif - + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/test/pdf2xml.cxx b/sdext/source/pdfimport/test/pdf2xml.cxx index a8278ccf2267..2bf0ecbb6b1c 100644 --- a/sdext/source/pdfimport/test/pdf2xml.cxx +++ b/sdext/source/pdfimport/test/pdf2xml.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sdext/source/pdfimport/test/pdfunzip.cxx b/sdext/source/pdfimport/test/pdfunzip.cxx index e871e36809d2..606b91295888 100644 --- a/sdext/source/pdfimport/test/pdfunzip.cxx +++ b/sdext/source/pdfimport/test/pdfunzip.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -68,13 +68,13 @@ class FileEmitContext : public EmitContext oslFileHandle m_aHandle; oslFileHandle m_aReadHandle; unsigned int m_nReadLen; - + void openReadFile( const char* pOrigName ); - + public: FileEmitContext( const char* pFileName, const char* pOrigName, const PDFContainer* pTop ); virtual ~FileEmitContext(); - + virtual bool write( const void* pBuf, unsigned int nLen ) throw(); virtual unsigned int getCurPos() throw(); virtual bool copyOrigBytes( unsigned int nOrigOffset, unsigned int nLen ) throw(); @@ -94,7 +94,7 @@ FileEmitContext::FileEmitContext( const char* pFileName, const char* pOrigName, fprintf( stderr, "filename conversion \"%s\" failed\n", pFileName ); return; } - + if( osl_openFile( aURL.pData, &m_aHandle, osl_File_OpenFlag_Write ) == osl_File_E_None ) { if( osl_setFileSize( m_aHandle, 0 ) != osl_File_E_None ) @@ -111,7 +111,7 @@ FileEmitContext::FileEmitContext( const char* pFileName, const char* pOrigName, return; } m_bDeflate = true; - + openReadFile( pOrigName ); } @@ -132,20 +132,20 @@ void FileEmitContext::openReadFile( const char* pInFile ) fprintf( stderr, "filename conversion \"%s\" failed\n", pInFile ); return; } - + if( osl_openFile( aURL.pData, &m_aReadHandle, osl_File_OpenFlag_Read ) != osl_File_E_None ) { fprintf( stderr, "could not open %s\n", pInFile ); return; } - + if( osl_setFilePos( m_aReadHandle, osl_Pos_End, 0 ) != osl_File_E_None ) { fprintf( stderr, "could not seek to end of %s\n", pInFile ); osl_closeFile( m_aReadHandle ); return; } - + sal_uInt64 nFileSize = 0; if( osl_getFilePos( m_aReadHandle, &nFileSize ) != osl_File_E_None ) { @@ -153,7 +153,7 @@ void FileEmitContext::openReadFile( const char* pInFile ) osl_closeFile( m_aReadHandle ); return; } - + m_nReadLen = static_cast<unsigned int>(nFileSize); } @@ -161,7 +161,7 @@ bool FileEmitContext::write( const void* pBuf, unsigned int nLen ) throw() { if( ! m_aHandle ) return false; - + sal_uInt64 nWrite = static_cast<sal_uInt64>(nLen); sal_uInt64 nWritten = 0; return (osl_writeFile( m_aHandle, pBuf, nWrite, &nWritten ) == osl_File_E_None) @@ -183,7 +183,7 @@ bool FileEmitContext::copyOrigBytes( unsigned int nOrigOffset, unsigned int nLen { if( nOrigOffset + nLen > m_nReadLen ) return false; - + if( osl_setFilePos( m_aReadHandle, osl_Pos_Absolut, nOrigOffset ) != osl_File_E_None ) { fprintf( stderr, "could not seek to offset %u\n", nOrigOffset ); @@ -209,7 +209,7 @@ unsigned int FileEmitContext::readOrigBytes( unsigned int nOrigOffset, unsigned { if( nOrigOffset + nLen > m_nReadLen ) return 0; - + if( osl_setFilePos( m_aReadHandle, osl_Pos_Absolut, nOrigOffset ) != osl_File_E_None ) { fprintf( stderr, "could not seek to offset %u\n", nOrigOffset ); @@ -225,7 +225,7 @@ typedef int(*PDFFileHdl)(const char*, const char*, PDFFile*); int handleFile( const char* pInFile, const char* pOutFile, const char* pPassword, PDFFileHdl pHdl ) { - + PDFReader aParser; int nRet = 0; PDFEntry* pEntry = aParser.read( pInFile ); @@ -333,18 +333,18 @@ int write_fonts( const char* i_pInFile, const char* i_pOutFile, PDFFile* i_pPDFF PDFDict* pDict = dynamic_cast<PDFDict*>(pObj->m_pObject); if( ! pDict ) continue; - + std::hash_map<rtl::OString,PDFEntry*,rtl::OStringHash>::iterator map_it = pDict->m_aMap.find( "Type" ); if( map_it == pDict->m_aMap.end() ) continue; - + PDFName* pName = dynamic_cast<PDFName*>(map_it->second); if( ! pName ) continue; if( ! pName->m_aName.equals( "FontDescriptor" ) ) continue; - + // the font name will be helpful, also there must be one in // a font descriptor map_it = pDict->m_aMap.find( "FontName" ); @@ -352,9 +352,9 @@ int write_fonts( const char* i_pInFile, const char* i_pOutFile, PDFFile* i_pPDFF continue; pName = dynamic_cast<PDFName*>(map_it->second); if( ! pName ) - continue; + continue; rtl::OString aFontName( pName->m_aName ); - + PDFObjectRef* pStreamRef = 0; const char* pFileType = NULL; // we have a font descriptor, try for a type 1 font @@ -377,14 +377,14 @@ int write_fonts( const char* i_pInFile, const char* i_pOutFile, PDFFile* i_pPDFF pFileType = "ttf"; } } - + if( ! pStreamRef ) continue; - + PDFObject* pStream = i_pPDFFile->findObject( pStreamRef ); if( ! pStream ) continue; - + rtl::OStringBuffer aOutStream( i_pOutFile ); aOutStream.append( "_font_" ); aOutStream.append( sal_Int32(pStreamRef->m_nNumber) ); @@ -440,7 +440,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv ) const char* pPassword = NULL; OStringBuffer aOutFile( 256 ); PDFFileHdl aHdl = write_unzipFile; - + for( int nArg = 1; nArg < argc; nArg++ ) { if( argv[nArg][0] == '-' ) @@ -493,7 +493,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv ) s_aEmitObjects.push_back( std::pair<sal_Int32,sal_Int32>(nObject,nGeneration) ); } } - } + } else { fprintf( stderr, "unrecognized option \"%s\"\n", @@ -533,7 +533,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv ) return 11; } } - + return handleFile( pInFile, pOutFile, pPassword, aHdl ); } diff --git a/sdext/source/pdfimport/test/testdocs/pictxt_pdfi_unittest_draw.xml b/sdext/source/pdfimport/test/testdocs/pictxt_pdfi_unittest_draw.xml index f864c4dfb01a..8c3704cb0b4e 100644 --- a/sdext/source/pdfimport/test/testdocs/pictxt_pdfi_unittest_draw.xml +++ b/sdext/source/pdfimport/test/testdocs/pictxt_pdfi_unittest_draw.xml @@ -43,73 +43,73 @@ UDYKMTAwIDQwCjI1NQr///////////////////////////////////////////////////////////// <text:span text:style-name="text7" > H e - + h e a r d - + q u i e t - + s t e p s - + b e h i n d - + h i m . - + T h a t - + d i d n ' t - + b o d e - + w e l l . - + W h o - + c o u l d - + b e - + f o l @@ -119,24 +119,24 @@ w i n g - + h i m - + t h i s - + l a t e - + a t - + </text:span> </text:p> </draw:text-box> @@ -150,19 +150,19 @@ i g h t - + a n d - + i n - + t h i s - + d e a @@ -171,33 +171,33 @@ b e a t - + p a r t - + o f - + t o w n ? - + A n d - + a t - + t h i s - + p a r @@ -208,7 +208,7 @@ u l a r - + m o m @@ -216,36 +216,36 @@ e n t , - + j u s t - + a f t e r - + h e - + p u l l e d - + o f f - + t h e - + </text:span> </text:p> </draw:text-box> @@ -257,40 +257,40 @@ e b i g - + t i m e - + a n d - + w a s - + m a k i n g - + o f f - + w i t h - + t h e - + g r e @@ -302,17 +302,17 @@ c k s . - + W a s - + t h e r e - + a n o @@ -320,32 +320,32 @@ t h e r - + c r o o k - + w h o ' d - + h a d - + t h e - + s a m e - + </text:span> </text:p> </draw:text-box> @@ -359,19 +359,19 @@ d e a , - + a n d - + w a s - + n o w - + w a t @@ -380,15 +380,15 @@ h i n g - + h i m - + a n d - + w a i @@ -396,63 +396,63 @@ t i n g - + f o r - + a - + c h a n c e - + t o - + g r a b - + t h e - + f r u i t - + o f - + h i s - + l a b o r ? - + O r - + d i d - + t h e - + </text:span> </text:p> </draw:text-box> @@ -466,44 +466,44 @@ t e p s - + b e h i n d - + h i m - + m e a n - + t h a t - + o n e - + o f - + m a n y - + l a w - + o f f @@ -512,38 +512,38 @@ c e r s - + i n - + t o w n - + w a s - + o n - + t o - + h i m - + a n d - + j u s t - + w a i @@ -551,10 +551,10 @@ t i n g - + t o - + </text:span> </text:p> </draw:text-box> @@ -569,35 +569,35 @@ u n c e - + a n d - + s n a p - + t h o s e - + c u f f s - + o n - + h i s - + w r i @@ -605,10 +605,10 @@ s t s ? - + H e - + n e r @@ -618,18 +618,18 @@ u s l y - + l o o k e d - + a l l - + a r o @@ -637,7 +637,7 @@ u n d . - + S u d @@ -646,18 +646,18 @@ e n l y - + h e - + s a w - + t h e - + </text:span> </text:p> </draw:text-box> @@ -672,12 +672,12 @@ l e y . - + L i k e - + l i g @@ -687,37 +687,37 @@ n i n g - + h e - + d a r t e d - + o f f - + t o - + t h e - + l e f t - + a n d - + d i s @@ -729,7 +729,7 @@ a r e d - + b e t @@ -737,15 +737,15 @@ w e e n - + t h e - + t w o - + w a r @@ -756,14 +756,14 @@ u s e s - + a l m o s t - + </text:span> </text:p> </draw:text-box> @@ -779,53 +779,53 @@ l i n g - + o v e r - + t h e - + t r a s h - + c a n - + l y i n g - + i n - + t h e - + m i d d l e - + o f - + t h e - + s i d @@ -835,19 +835,19 @@ a l k . - + H e - + t r i e d - + t o - + n e r @@ -857,19 +857,19 @@ u s l y - + t a p - + h i s - + w a y - + </text:span> </text:p> </draw:text-box> @@ -883,19 +883,19 @@ l o n g - + i n - + t h e - + i n k y - + d a r @@ -904,11 +904,11 @@ n e s s - + a n d - + s u d @@ -917,7 +917,7 @@ e n l y - + s t i @@ -928,16 +928,16 @@ n e d : - + i t - + w a s - + a - + d e a @@ -947,36 +947,36 @@ e n d , - + h e - + w o u l d - + h a v e - + t o - + g o - + b a c k - + t h e - + </text:span> </text:p> </draw:text-box> @@ -988,45 +988,45 @@ e w a y - + h e - + h a d - + c o m e . - + T h e - + s t e p s - + g o t - + l o u d e r - + a n d - + l o u @@ -1034,24 +1034,24 @@ d e r , - + h e - + s a w - + t h e - + b l a c k - + o u t @@ -1059,26 +1059,26 @@ l i n e - + o f - + a - + f i g u r e - + c o m i n g - + </text:span> </text:p> </draw:text-box> @@ -1093,11 +1093,11 @@ o u n d - + t h e - + c o r @@ -1105,39 +1105,39 @@ n e r . - + I s - + t h i s - + t h e - + e n d - + o f - + t h e - + l i n e ? - + h e - + t h o @@ -1145,7 +1145,7 @@ u g h t - + p r e @@ -1154,7 +1154,7 @@ s i n g - + h i m @@ -1162,12 +1162,12 @@ s e l f - + b a c k - + a g a @@ -1175,16 +1175,16 @@ i n s t - + t h e - + w a l l - + </text:span> </text:p> </draw:text-box> @@ -1199,15 +1199,15 @@ y i n g - + t o - + m a k e - + h i m @@ -1215,7 +1215,7 @@ s e l f - + i n v @@ -1225,33 +1225,33 @@ i b l e - + i n - + t h e - + d a r k , - + w a s - + a l l - + t h a t - + p l a @@ -1260,18 +1260,18 @@ n i n g - + a n d - + e n e r g y - + w a s @@ -1279,14 +1279,14 @@ t e d ? - + H e - + w a s - + </text:span> </text:p> </draw:text-box> @@ -1303,76 +1303,76 @@ p i n g - + w i t h - + s w e a t - + n o w , - + c o l d - + a n d - + w e t , - + h e - + c o u l d - + s m e l l - + t h e - + f e a r - + c o m i n g - + o f f - + h i s - + c l o @@ -1381,7 +1381,7 @@ h e s . - + S u d @@ -1390,7 +1390,7 @@ e n l y - + </text:span> </text:p> </draw:text-box> @@ -1403,29 +1403,29 @@ n e x t - + t o - + h i m , - + w i t h - + a - + b a r e l y - + n o t @@ -1436,7 +1436,7 @@ a b l e - + s q u @@ -1444,20 +1444,20 @@ e a k , - + a - + d o o r - + s w u n g - + q u i @@ -1465,25 +1465,25 @@ e t l y - + t o - + a n d - + f r o - + i n - + t h e - + n i g @@ -1491,7 +1491,7 @@ h t ' s - + b r e @@ -1499,7 +1499,7 @@ e z e . - + </text:span> </text:p> </draw:text-box> @@ -1513,74 +1513,74 @@ o u l d - + t h i s - + b e - + t h e - + h a v e n - + h e ' d - + p r a y e d - + f o r ? - + S l o w l y - + h e - + s l i d - + t o w a r d - + t h e - + d o o r , - + p r e @@ -1589,7 +1589,7 @@ s i n g - + h i m @@ -1597,16 +1597,16 @@ s e l f - + m o r e - + a n d - + </text:span> </text:p> </draw:text-box> @@ -1619,83 +1619,83 @@ m o r e - + i n t o - + t h e - + w a l l , - + i n t o - + t h e - + d a r k , - + a w a y - + f r o m - + h i s - + e n e m y . - + W o u l d - + t h i s - + d o o r - + s a v e - + h i s - + h i d @@ -1711,73 +1711,73 @@ e <text:span text:style-name="text7" > H e - + h e a r d - + q u i e t - + s t e p s - + b e h i n d - + h i m . - + T h a t - + d i d n ' t - + b o d e - + w e l l . - + W h o - + c o u l d - + b e - + f o l @@ -1787,24 +1787,24 @@ w i n g - + h i m - + t h i s - + l a t e - + a t - + </text:span> </text:p> </draw:text-box> @@ -1818,19 +1818,19 @@ i g h t - + a n d - + i n - + t h i s - + d e a @@ -1839,33 +1839,33 @@ b e a t - + p a r t - + o f - + t o w n ? - + A n d - + a t - + t h i s - + p a r @@ -1876,7 +1876,7 @@ u l a r - + m o m @@ -1884,36 +1884,36 @@ e n t , - + j u s t - + a f t e r - + h e - + p u l l e d - + o f f - + t h e - + </text:span> </text:p> </draw:text-box> @@ -1925,40 +1925,40 @@ e b i g - + t i m e - + a n d - + w a s - + m a k i n g - + o f f - + w i t h - + t h e - + g r e @@ -1970,17 +1970,17 @@ c k s . - + W a s - + t h e r e - + a n o @@ -1988,32 +1988,32 @@ t h e r - + c r o o k - + w h o ' d - + h a d - + t h e - + s a m e - + </text:span> </text:p> </draw:text-box> @@ -2027,19 +2027,19 @@ d e a , - + a n d - + w a s - + n o w - + w a t @@ -2048,15 +2048,15 @@ h i n g - + h i m - + a n d - + w a i @@ -2064,63 +2064,63 @@ t i n g - + f o r - + a - + c h a n c e - + t o - + g r a b - + t h e - + f r u i t - + o f - + h i s - + l a b o r ? - + O r - + d i d - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2134,44 +2134,44 @@ t e p s - + b e h i n d - + h i m - + m e a n - + t h a t - + o n e - + o f - + m a n y - + l a w - + o f f @@ -2180,38 +2180,38 @@ c e r s - + i n - + t o w n - + w a s - + o n - + t o - + h i m - + a n d - + j u s t - + w a i @@ -2219,10 +2219,10 @@ t i n g - + t o - + </text:span> </text:p> </draw:text-box> @@ -2237,35 +2237,35 @@ u n c e - + a n d - + s n a p - + t h o s e - + c u f f s - + o n - + h i s - + w r i @@ -2273,10 +2273,10 @@ s t s ? - + H e - + n e r @@ -2286,18 +2286,18 @@ u s l y - + l o o k e d - + a l l - + a r o @@ -2305,7 +2305,7 @@ u n d . - + S u d @@ -2314,18 +2314,18 @@ e n l y - + h e - + s a w - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2340,12 +2340,12 @@ l e y . - + L i k e - + l i g @@ -2355,37 +2355,37 @@ n i n g - + h e - + d a r t e d - + o f f - + t o - + t h e - + l e f t - + a n d - + d i s @@ -2397,7 +2397,7 @@ a r e d - + b e t @@ -2405,15 +2405,15 @@ w e e n - + t h e - + t w o - + w a r @@ -2424,14 +2424,14 @@ u s e s - + a l m o s t - + </text:span> </text:p> </draw:text-box> @@ -2447,53 +2447,53 @@ l i n g - + o v e r - + t h e - + t r a s h - + c a n - + l y i n g - + i n - + t h e - + m i d d l e - + o f - + t h e - + s i d @@ -2503,19 +2503,19 @@ a l k . - + H e - + t r i e d - + t o - + n e r @@ -2525,19 +2525,19 @@ u s l y - + t a p - + h i s - + w a y - + </text:span> </text:p> </draw:text-box> @@ -2551,19 +2551,19 @@ l o n g - + i n - + t h e - + i n k y - + d a r @@ -2572,11 +2572,11 @@ n e s s - + a n d - + s u d @@ -2585,7 +2585,7 @@ e n l y - + s t i @@ -2596,16 +2596,16 @@ n e d : - + i t - + w a s - + a - + d e a @@ -2615,36 +2615,36 @@ e n d , - + h e - + w o u l d - + h a v e - + t o - + g o - + b a c k - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2656,45 +2656,45 @@ e w a y - + h e - + h a d - + c o m e . - + T h e - + s t e p s - + g o t - + l o u d e r - + a n d - + l o u @@ -2702,24 +2702,24 @@ d e r , - + h e - + s a w - + t h e - + b l a c k - + o u t @@ -2727,26 +2727,26 @@ l i n e - + o f - + a - + f i g u r e - + c o m i n g - + </text:span> </text:p> </draw:text-box> @@ -2761,11 +2761,11 @@ o u n d - + t h e - + c o r @@ -2773,39 +2773,39 @@ n e r . - + I s - + t h i s - + t h e - + e n d - + o f - + t h e - + l i n e ? - + h e - + t h o @@ -2813,7 +2813,7 @@ u g h t - + p r e @@ -2822,7 +2822,7 @@ s i n g - + h i m @@ -2830,12 +2830,12 @@ s e l f - + b a c k - + a g a @@ -2843,16 +2843,16 @@ i n s t - + t h e - + w a l l - + </text:span> </text:p> </draw:text-box> @@ -2867,15 +2867,15 @@ y i n g - + t o - + m a k e - + h i m @@ -2883,7 +2883,7 @@ s e l f - + i n v @@ -2893,33 +2893,33 @@ i b l e - + i n - + t h e - + d a r k , - + w a s - + a l l - + t h a t - + p l a @@ -2928,18 +2928,18 @@ n i n g - + a n d - + e n e r g y - + w a s @@ -2947,14 +2947,14 @@ t e d ? - + H e - + w a s - + </text:span> </text:p> </draw:text-box> @@ -2971,76 +2971,76 @@ p i n g - + w i t h - + s w e a t - + n o w , - + c o l d - + a n d - + w e t , - + h e - + c o u l d - + s m e l l - + t h e - + f e a r - + c o m i n g - + o f f - + h i s - + c l o @@ -3049,7 +3049,7 @@ h e s . - + S u d @@ -3058,7 +3058,7 @@ e n l y - + </text:span> </text:p> </draw:text-box> @@ -3071,29 +3071,29 @@ n e x t - + t o - + h i m , - + w i t h - + a - + b a r e l y - + n o t @@ -3104,7 +3104,7 @@ a b l e - + s q u @@ -3112,20 +3112,20 @@ e a k , - + a - + d o o r - + s w u n g - + q u i @@ -3133,25 +3133,25 @@ e t l y - + t o - + a n d - + f r o - + i n - + t h e - + n i g @@ -3159,7 +3159,7 @@ h t ' s - + b r e @@ -3167,7 +3167,7 @@ e z e . - + </text:span> </text:p> </draw:text-box> @@ -3181,74 +3181,74 @@ o u l d - + t h i s - + b e - + t h e - + h a v e n - + h e ' d - + p r a y e d - + f o r ? - + S l o w l y - + h e - + s l i d - + t o w a r d - + t h e - + d o o r , - + p r e @@ -3257,7 +3257,7 @@ s i n g - + h i m @@ -3265,16 +3265,16 @@ s e l f - + m o r e - + a n d - + </text:span> </text:p> </draw:text-box> @@ -3287,83 +3287,83 @@ m o r e - + i n t o - + t h e - + w a l l , - + i n t o - + t h e - + d a r k , - + a w a y - + f r o m - + h i s - + e n e m y . - + W o u l d - + t h i s - + d o o r - + s a v e - + h i s - + h i d diff --git a/sdext/source/pdfimport/test/testdocs/pictxt_pdfi_unittest_impress.xml b/sdext/source/pdfimport/test/testdocs/pictxt_pdfi_unittest_impress.xml index 6d777866ee33..68ab55f1fb65 100644 --- a/sdext/source/pdfimport/test/testdocs/pictxt_pdfi_unittest_impress.xml +++ b/sdext/source/pdfimport/test/testdocs/pictxt_pdfi_unittest_impress.xml @@ -43,73 +43,73 @@ UDYKMTAwIDQwCjI1NQr///////////////////////////////////////////////////////////// <text:span text:style-name="text7" > H e - + h e a r d - + q u i e t - + s t e p s - + b e h i n d - + h i m . - + T h a t - + d i d n ' t - + b o d e - + w e l l . - + W h o - + c o u l d - + b e - + f o l @@ -119,24 +119,24 @@ w i n g - + h i m - + t h i s - + l a t e - + a t - + </text:span> </text:p> </draw:text-box> @@ -150,19 +150,19 @@ i g h t - + a n d - + i n - + t h i s - + d e a @@ -171,33 +171,33 @@ b e a t - + p a r t - + o f - + t o w n ? - + A n d - + a t - + t h i s - + p a r @@ -208,7 +208,7 @@ u l a r - + m o m @@ -216,36 +216,36 @@ e n t , - + j u s t - + a f t e r - + h e - + p u l l e d - + o f f - + t h e - + </text:span> </text:p> </draw:text-box> @@ -257,40 +257,40 @@ e b i g - + t i m e - + a n d - + w a s - + m a k i n g - + o f f - + w i t h - + t h e - + g r e @@ -302,17 +302,17 @@ c k s . - + W a s - + t h e r e - + a n o @@ -320,32 +320,32 @@ t h e r - + c r o o k - + w h o ' d - + h a d - + t h e - + s a m e - + </text:span> </text:p> </draw:text-box> @@ -359,19 +359,19 @@ d e a , - + a n d - + w a s - + n o w - + w a t @@ -380,15 +380,15 @@ h i n g - + h i m - + a n d - + w a i @@ -396,63 +396,63 @@ t i n g - + f o r - + a - + c h a n c e - + t o - + g r a b - + t h e - + f r u i t - + o f - + h i s - + l a b o r ? - + O r - + d i d - + t h e - + </text:span> </text:p> </draw:text-box> @@ -466,44 +466,44 @@ t e p s - + b e h i n d - + h i m - + m e a n - + t h a t - + o n e - + o f - + m a n y - + l a w - + o f f @@ -512,38 +512,38 @@ c e r s - + i n - + t o w n - + w a s - + o n - + t o - + h i m - + a n d - + j u s t - + w a i @@ -551,10 +551,10 @@ t i n g - + t o - + </text:span> </text:p> </draw:text-box> @@ -569,35 +569,35 @@ u n c e - + a n d - + s n a p - + t h o s e - + c u f f s - + o n - + h i s - + w r i @@ -605,10 +605,10 @@ s t s ? - + H e - + n e r @@ -618,18 +618,18 @@ u s l y - + l o o k e d - + a l l - + a r o @@ -637,7 +637,7 @@ u n d . - + S u d @@ -646,18 +646,18 @@ e n l y - + h e - + s a w - + t h e - + </text:span> </text:p> </draw:text-box> @@ -672,12 +672,12 @@ l e y . - + L i k e - + l i g @@ -687,37 +687,37 @@ n i n g - + h e - + d a r t e d - + o f f - + t o - + t h e - + l e f t - + a n d - + d i s @@ -729,7 +729,7 @@ a r e d - + b e t @@ -737,15 +737,15 @@ w e e n - + t h e - + t w o - + w a r @@ -756,14 +756,14 @@ u s e s - + a l m o s t - + </text:span> </text:p> </draw:text-box> @@ -779,53 +779,53 @@ l i n g - + o v e r - + t h e - + t r a s h - + c a n - + l y i n g - + i n - + t h e - + m i d d l e - + o f - + t h e - + s i d @@ -835,19 +835,19 @@ a l k . - + H e - + t r i e d - + t o - + n e r @@ -857,19 +857,19 @@ u s l y - + t a p - + h i s - + w a y - + </text:span> </text:p> </draw:text-box> @@ -883,19 +883,19 @@ l o n g - + i n - + t h e - + i n k y - + d a r @@ -904,11 +904,11 @@ n e s s - + a n d - + s u d @@ -917,7 +917,7 @@ e n l y - + s t i @@ -928,16 +928,16 @@ n e d : - + i t - + w a s - + a - + d e a @@ -947,36 +947,36 @@ e n d , - + h e - + w o u l d - + h a v e - + t o - + g o - + b a c k - + t h e - + </text:span> </text:p> </draw:text-box> @@ -988,45 +988,45 @@ e w a y - + h e - + h a d - + c o m e . - + T h e - + s t e p s - + g o t - + l o u d e r - + a n d - + l o u @@ -1034,24 +1034,24 @@ d e r , - + h e - + s a w - + t h e - + b l a c k - + o u t @@ -1059,26 +1059,26 @@ l i n e - + o f - + a - + f i g u r e - + c o m i n g - + </text:span> </text:p> </draw:text-box> @@ -1093,11 +1093,11 @@ o u n d - + t h e - + c o r @@ -1105,39 +1105,39 @@ n e r . - + I s - + t h i s - + t h e - + e n d - + o f - + t h e - + l i n e ? - + h e - + t h o @@ -1145,7 +1145,7 @@ u g h t - + p r e @@ -1154,7 +1154,7 @@ s i n g - + h i m @@ -1162,12 +1162,12 @@ s e l f - + b a c k - + a g a @@ -1175,16 +1175,16 @@ i n s t - + t h e - + w a l l - + </text:span> </text:p> </draw:text-box> @@ -1199,15 +1199,15 @@ y i n g - + t o - + m a k e - + h i m @@ -1215,7 +1215,7 @@ s e l f - + i n v @@ -1225,33 +1225,33 @@ i b l e - + i n - + t h e - + d a r k , - + w a s - + a l l - + t h a t - + p l a @@ -1260,18 +1260,18 @@ n i n g - + a n d - + e n e r g y - + w a s @@ -1279,14 +1279,14 @@ t e d ? - + H e - + w a s - + </text:span> </text:p> </draw:text-box> @@ -1303,76 +1303,76 @@ p i n g - + w i t h - + s w e a t - + n o w , - + c o l d - + a n d - + w e t , - + h e - + c o u l d - + s m e l l - + t h e - + f e a r - + c o m i n g - + o f f - + h i s - + c l o @@ -1381,7 +1381,7 @@ h e s . - + S u d @@ -1390,7 +1390,7 @@ e n l y - + </text:span> </text:p> </draw:text-box> @@ -1403,29 +1403,29 @@ n e x t - + t o - + h i m , - + w i t h - + a - + b a r e l y - + n o t @@ -1436,7 +1436,7 @@ a b l e - + s q u @@ -1444,20 +1444,20 @@ e a k , - + a - + d o o r - + s w u n g - + q u i @@ -1465,25 +1465,25 @@ e t l y - + t o - + a n d - + f r o - + i n - + t h e - + n i g @@ -1491,7 +1491,7 @@ h t ' s - + b r e @@ -1499,7 +1499,7 @@ e z e . - + </text:span> </text:p> </draw:text-box> @@ -1513,74 +1513,74 @@ o u l d - + t h i s - + b e - + t h e - + h a v e n - + h e ' d - + p r a y e d - + f o r ? - + S l o w l y - + h e - + s l i d - + t o w a r d - + t h e - + d o o r , - + p r e @@ -1589,7 +1589,7 @@ s i n g - + h i m @@ -1597,16 +1597,16 @@ s e l f - + m o r e - + a n d - + </text:span> </text:p> </draw:text-box> @@ -1619,83 +1619,83 @@ m o r e - + i n t o - + t h e - + w a l l , - + i n t o - + t h e - + d a r k , - + a w a y - + f r o m - + h i s - + e n e m y . - + W o u l d - + t h i s - + d o o r - + s a v e - + h i s - + h i d @@ -1711,73 +1711,73 @@ e <text:span text:style-name="text7" > H e - + h e a r d - + q u i e t - + s t e p s - + b e h i n d - + h i m . - + T h a t - + d i d n ' t - + b o d e - + w e l l . - + W h o - + c o u l d - + b e - + f o l @@ -1787,24 +1787,24 @@ w i n g - + h i m - + t h i s - + l a t e - + a t - + </text:span> </text:p> </draw:text-box> @@ -1818,19 +1818,19 @@ i g h t - + a n d - + i n - + t h i s - + d e a @@ -1839,33 +1839,33 @@ b e a t - + p a r t - + o f - + t o w n ? - + A n d - + a t - + t h i s - + p a r @@ -1876,7 +1876,7 @@ u l a r - + m o m @@ -1884,36 +1884,36 @@ e n t , - + j u s t - + a f t e r - + h e - + p u l l e d - + o f f - + t h e - + </text:span> </text:p> </draw:text-box> @@ -1925,40 +1925,40 @@ e b i g - + t i m e - + a n d - + w a s - + m a k i n g - + o f f - + w i t h - + t h e - + g r e @@ -1970,17 +1970,17 @@ c k s . - + W a s - + t h e r e - + a n o @@ -1988,32 +1988,32 @@ t h e r - + c r o o k - + w h o ' d - + h a d - + t h e - + s a m e - + </text:span> </text:p> </draw:text-box> @@ -2027,19 +2027,19 @@ d e a , - + a n d - + w a s - + n o w - + w a t @@ -2048,15 +2048,15 @@ h i n g - + h i m - + a n d - + w a i @@ -2064,63 +2064,63 @@ t i n g - + f o r - + a - + c h a n c e - + t o - + g r a b - + t h e - + f r u i t - + o f - + h i s - + l a b o r ? - + O r - + d i d - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2134,44 +2134,44 @@ t e p s - + b e h i n d - + h i m - + m e a n - + t h a t - + o n e - + o f - + m a n y - + l a w - + o f f @@ -2180,38 +2180,38 @@ c e r s - + i n - + t o w n - + w a s - + o n - + t o - + h i m - + a n d - + j u s t - + w a i @@ -2219,10 +2219,10 @@ t i n g - + t o - + </text:span> </text:p> </draw:text-box> @@ -2237,35 +2237,35 @@ u n c e - + a n d - + s n a p - + t h o s e - + c u f f s - + o n - + h i s - + w r i @@ -2273,10 +2273,10 @@ s t s ? - + H e - + n e r @@ -2286,18 +2286,18 @@ u s l y - + l o o k e d - + a l l - + a r o @@ -2305,7 +2305,7 @@ u n d . - + S u d @@ -2314,18 +2314,18 @@ e n l y - + h e - + s a w - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2340,12 +2340,12 @@ l e y . - + L i k e - + l i g @@ -2355,37 +2355,37 @@ n i n g - + h e - + d a r t e d - + o f f - + t o - + t h e - + l e f t - + a n d - + d i s @@ -2397,7 +2397,7 @@ a r e d - + b e t @@ -2405,15 +2405,15 @@ w e e n - + t h e - + t w o - + w a r @@ -2424,14 +2424,14 @@ u s e s - + a l m o s t - + </text:span> </text:p> </draw:text-box> @@ -2447,53 +2447,53 @@ l i n g - + o v e r - + t h e - + t r a s h - + c a n - + l y i n g - + i n - + t h e - + m i d d l e - + o f - + t h e - + s i d @@ -2503,19 +2503,19 @@ a l k . - + H e - + t r i e d - + t o - + n e r @@ -2525,19 +2525,19 @@ u s l y - + t a p - + h i s - + w a y - + </text:span> </text:p> </draw:text-box> @@ -2551,19 +2551,19 @@ l o n g - + i n - + t h e - + i n k y - + d a r @@ -2572,11 +2572,11 @@ n e s s - + a n d - + s u d @@ -2585,7 +2585,7 @@ e n l y - + s t i @@ -2596,16 +2596,16 @@ n e d : - + i t - + w a s - + a - + d e a @@ -2615,36 +2615,36 @@ e n d , - + h e - + w o u l d - + h a v e - + t o - + g o - + b a c k - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2656,45 +2656,45 @@ e w a y - + h e - + h a d - + c o m e . - + T h e - + s t e p s - + g o t - + l o u d e r - + a n d - + l o u @@ -2702,24 +2702,24 @@ d e r , - + h e - + s a w - + t h e - + b l a c k - + o u t @@ -2727,26 +2727,26 @@ l i n e - + o f - + a - + f i g u r e - + c o m i n g - + </text:span> </text:p> </draw:text-box> @@ -2761,11 +2761,11 @@ o u n d - + t h e - + c o r @@ -2773,39 +2773,39 @@ n e r . - + I s - + t h i s - + t h e - + e n d - + o f - + t h e - + l i n e ? - + h e - + t h o @@ -2813,7 +2813,7 @@ u g h t - + p r e @@ -2822,7 +2822,7 @@ s i n g - + h i m @@ -2830,12 +2830,12 @@ s e l f - + b a c k - + a g a @@ -2843,16 +2843,16 @@ i n s t - + t h e - + w a l l - + </text:span> </text:p> </draw:text-box> @@ -2867,15 +2867,15 @@ y i n g - + t o - + m a k e - + h i m @@ -2883,7 +2883,7 @@ s e l f - + i n v @@ -2893,33 +2893,33 @@ i b l e - + i n - + t h e - + d a r k , - + w a s - + a l l - + t h a t - + p l a @@ -2928,18 +2928,18 @@ n i n g - + a n d - + e n e r g y - + w a s @@ -2947,14 +2947,14 @@ t e d ? - + H e - + w a s - + </text:span> </text:p> </draw:text-box> @@ -2971,76 +2971,76 @@ p i n g - + w i t h - + s w e a t - + n o w , - + c o l d - + a n d - + w e t , - + h e - + c o u l d - + s m e l l - + t h e - + f e a r - + c o m i n g - + o f f - + h i s - + c l o @@ -3049,7 +3049,7 @@ h e s . - + S u d @@ -3058,7 +3058,7 @@ e n l y - + </text:span> </text:p> </draw:text-box> @@ -3071,29 +3071,29 @@ n e x t - + t o - + h i m , - + w i t h - + a - + b a r e l y - + n o t @@ -3104,7 +3104,7 @@ a b l e - + s q u @@ -3112,20 +3112,20 @@ e a k , - + a - + d o o r - + s w u n g - + q u i @@ -3133,25 +3133,25 @@ e t l y - + t o - + a n d - + f r o - + i n - + t h e - + n i g @@ -3159,7 +3159,7 @@ h t ' s - + b r e @@ -3167,7 +3167,7 @@ e z e . - + </text:span> </text:p> </draw:text-box> @@ -3181,74 +3181,74 @@ o u l d - + t h i s - + b e - + t h e - + h a v e n - + h e ' d - + p r a y e d - + f o r ? - + S l o w l y - + h e - + s l i d - + t o w a r d - + t h e - + d o o r , - + p r e @@ -3257,7 +3257,7 @@ s i n g - + h i m @@ -3265,16 +3265,16 @@ s e l f - + m o r e - + a n d - + </text:span> </text:p> </draw:text-box> @@ -3287,83 +3287,83 @@ m o r e - + i n t o - + t h e - + w a l l , - + i n t o - + t h e - + d a r k , - + a w a y - + f r o m - + h i s - + e n e m y . - + W o u l d - + t h i s - + d o o r - + s a v e - + h i s - + h i d diff --git a/sdext/source/pdfimport/test/testdocs/pictxt_pdfi_unittest_writer.xml b/sdext/source/pdfimport/test/testdocs/pictxt_pdfi_unittest_writer.xml index 8b773553d793..254f591c0e2f 100644 --- a/sdext/source/pdfimport/test/testdocs/pictxt_pdfi_unittest_writer.xml +++ b/sdext/source/pdfimport/test/testdocs/pictxt_pdfi_unittest_writer.xml @@ -43,7 +43,7 @@ UDYKMTAwIDQwCjI1NQr///////////////////////////////////////////////////////////// <draw:text-box > <text:p > <text:span text:style-name="text7" > -He heard quiet steps behind him. That didn't bode well. Who could be following him this late at +He heard quiet steps behind him. That didn't bode well. Who could be following him this late at </text:span> </text:p> </draw:text-box> @@ -52,7 +52,7 @@ He heard quiet steps behind him. That didn't bode well. Who could be following h <draw:text-box > <text:p > <text:span text:style-name="text7" > -night and in this deadbeat part of town? And at this particular moment, just after he pulled off the +night and in this deadbeat part of town? And at this particular moment, just after he pulled off the </text:span> </text:p> </draw:text-box> @@ -61,7 +61,7 @@ night and in this deadbeat part of town? And at this particular moment, just aft <draw:text-box > <text:p > <text:span text:style-name="text7" > -big time and was making off with the greenbacks. Was there another crook who'd had the same +big time and was making off with the greenbacks. Was there another crook who'd had the same </text:span> </text:p> </draw:text-box> @@ -70,7 +70,7 @@ big time and was making off with the greenbacks. Was there another crook who'd h <draw:text-box > <text:p > <text:span text:style-name="text7" > -idea, and was now watching him and waiting for a chance to grab the fruit of his labor? Or did the +idea, and was now watching him and waiting for a chance to grab the fruit of his labor? Or did the </text:span> </text:p> </draw:text-box> @@ -79,7 +79,7 @@ idea, and was now watching him and waiting for a chance to grab the fruit of his <draw:text-box > <text:p > <text:span text:style-name="text7" > -steps behind him mean that one of many law officers in town was on to him and just waiting to +steps behind him mean that one of many law officers in town was on to him and just waiting to </text:span> </text:p> </draw:text-box> @@ -88,7 +88,7 @@ steps behind him mean that one of many law officers in town was on to him and ju <draw:text-box > <text:p > <text:span text:style-name="text7" > -pounce and snap those cuffs on his wrists? He nervously looked all around. Suddenly he saw the +pounce and snap those cuffs on his wrists? He nervously looked all around. Suddenly he saw the </text:span> </text:p> </draw:text-box> @@ -97,7 +97,7 @@ pounce and snap those cuffs on his wrists? He nervously looked all around. Sudde <draw:text-box > <text:p > <text:span text:style-name="text7" > -alley. Like lightning he darted off to the left and disappeared between the two warehouses almost +alley. Like lightning he darted off to the left and disappeared between the two warehouses almost </text:span> </text:p> </draw:text-box> @@ -106,7 +106,7 @@ alley. Like lightning he darted off to the left and disappeared between the two <draw:text-box > <text:p > <text:span text:style-name="text7" > -falling over the trash can lying in the middle of the sidewalk. He tried to nervously tap his way +falling over the trash can lying in the middle of the sidewalk. He tried to nervously tap his way </text:span> </text:p> </draw:text-box> @@ -115,7 +115,7 @@ falling over the trash can lying in the middle of the sidewalk. He tried to nerv <draw:text-box > <text:p > <text:span text:style-name="text7" > -along in the inky darkness and suddenly stiffened: it was a dead-end, he would have to go back the +along in the inky darkness and suddenly stiffened: it was a dead-end, he would have to go back the </text:span> </text:p> </draw:text-box> @@ -124,7 +124,7 @@ along in the inky darkness and suddenly stiffened: it was a dead-end, he would h <draw:text-box > <text:p > <text:span text:style-name="text7" > -way he had come. The steps got louder and louder, he saw the black outline of a figure coming +way he had come. The steps got louder and louder, he saw the black outline of a figure coming </text:span> </text:p> </draw:text-box> @@ -133,7 +133,7 @@ way he had come. The steps got louder and louder, he saw the black outline of a <draw:text-box > <text:p > <text:span text:style-name="text7" > -around the corner. Is this the end of the line? he thought pressing himself back against the wall +around the corner. Is this the end of the line? he thought pressing himself back against the wall </text:span> </text:p> </draw:text-box> @@ -142,7 +142,7 @@ around the corner. Is this the end of the line? he thought pressing himself back <draw:text-box > <text:p > <text:span text:style-name="text7" > -trying to make himself invisible in the dark, was all that planning and energy wasted? He was +trying to make himself invisible in the dark, was all that planning and energy wasted? He was </text:span> </text:p> </draw:text-box> @@ -151,7 +151,7 @@ trying to make himself invisible in the dark, was all that planning and energy w <draw:text-box > <text:p > <text:span text:style-name="text7" > -dripping with sweat now, cold and wet, he could smell the fear coming off his clothes. Suddenly +dripping with sweat now, cold and wet, he could smell the fear coming off his clothes. Suddenly </text:span> </text:p> </draw:text-box> @@ -160,7 +160,7 @@ dripping with sweat now, cold and wet, he could smell the fear coming off his cl <draw:text-box > <text:p > <text:span text:style-name="text7" > -next to him, with a barely noticeable squeak, a door swung quietly to and fro in the night's breeze. +next to him, with a barely noticeable squeak, a door swung quietly to and fro in the night's breeze. </text:span> </text:p> </draw:text-box> @@ -169,7 +169,7 @@ next to him, with a barely noticeable squeak, a door swung quietly to and fro in <draw:text-box > <text:p > <text:span text:style-name="text7" > -Could this be the haven he'd prayed for? Slowly he slid toward the door, pressing himself more and +Could this be the haven he'd prayed for? Slowly he slid toward the door, pressing himself more and </text:span> </text:p> </draw:text-box> @@ -187,7 +187,7 @@ more into the wall, into the dark, away from his enemy. Would this door save his <draw:text-box > <text:p > <text:span text:style-name="text7" > -He heard quiet steps behind him. That didn't bode well. Who could be following him this late at +He heard quiet steps behind him. That didn't bode well. Who could be following him this late at </text:span> </text:p> </draw:text-box> @@ -196,7 +196,7 @@ He heard quiet steps behind him. That didn't bode well. Who could be following h <draw:text-box > <text:p > <text:span text:style-name="text7" > -night and in this deadbeat part of town? And at this particular moment, just after he pulled off the +night and in this deadbeat part of town? And at this particular moment, just after he pulled off the </text:span> </text:p> </draw:text-box> @@ -205,7 +205,7 @@ night and in this deadbeat part of town? And at this particular moment, just aft <draw:text-box > <text:p > <text:span text:style-name="text7" > -big time and was making off with the greenbacks. Was there another crook who'd had the same +big time and was making off with the greenbacks. Was there another crook who'd had the same </text:span> </text:p> </draw:text-box> @@ -214,7 +214,7 @@ big time and was making off with the greenbacks. Was there another crook who'd h <draw:text-box > <text:p > <text:span text:style-name="text7" > -idea, and was now watching him and waiting for a chance to grab the fruit of his labor? Or did the +idea, and was now watching him and waiting for a chance to grab the fruit of his labor? Or did the </text:span> </text:p> </draw:text-box> @@ -223,7 +223,7 @@ idea, and was now watching him and waiting for a chance to grab the fruit of his <draw:text-box > <text:p > <text:span text:style-name="text7" > -steps behind him mean that one of many law officers in town was on to him and just waiting to +steps behind him mean that one of many law officers in town was on to him and just waiting to </text:span> </text:p> </draw:text-box> @@ -232,7 +232,7 @@ steps behind him mean that one of many law officers in town was on to him and ju <draw:text-box > <text:p > <text:span text:style-name="text7" > -pounce and snap those cuffs on his wrists? He nervously looked all around. Suddenly he saw the +pounce and snap those cuffs on his wrists? He nervously looked all around. Suddenly he saw the </text:span> </text:p> </draw:text-box> @@ -241,7 +241,7 @@ pounce and snap those cuffs on his wrists? He nervously looked all around. Sudde <draw:text-box > <text:p > <text:span text:style-name="text7" > -alley. Like lightning he darted off to the left and disappeared between the two warehouses almost +alley. Like lightning he darted off to the left and disappeared between the two warehouses almost </text:span> </text:p> </draw:text-box> @@ -250,7 +250,7 @@ alley. Like lightning he darted off to the left and disappeared between the two <draw:text-box > <text:p > <text:span text:style-name="text7" > -falling over the trash can lying in the middle of the sidewalk. He tried to nervously tap his way +falling over the trash can lying in the middle of the sidewalk. He tried to nervously tap his way </text:span> </text:p> </draw:text-box> @@ -259,7 +259,7 @@ falling over the trash can lying in the middle of the sidewalk. He tried to nerv <draw:text-box > <text:p > <text:span text:style-name="text7" > -along in the inky darkness and suddenly stiffened: it was a dead-end, he would have to go back the +along in the inky darkness and suddenly stiffened: it was a dead-end, he would have to go back the </text:span> </text:p> </draw:text-box> @@ -268,7 +268,7 @@ along in the inky darkness and suddenly stiffened: it was a dead-end, he would h <draw:text-box > <text:p > <text:span text:style-name="text7" > -way he had come. The steps got louder and louder, he saw the black outline of a figure coming +way he had come. The steps got louder and louder, he saw the black outline of a figure coming </text:span> </text:p> </draw:text-box> @@ -277,7 +277,7 @@ way he had come. The steps got louder and louder, he saw the black outline of a <draw:text-box > <text:p > <text:span text:style-name="text7" > -around the corner. Is this the end of the line? he thought pressing himself back against the wall +around the corner. Is this the end of the line? he thought pressing himself back against the wall </text:span> </text:p> </draw:text-box> @@ -286,7 +286,7 @@ around the corner. Is this the end of the line? he thought pressing himself back <draw:text-box > <text:p > <text:span text:style-name="text7" > -trying to make himself invisible in the dark, was all that planning and energy wasted? He was +trying to make himself invisible in the dark, was all that planning and energy wasted? He was </text:span> </text:p> </draw:text-box> @@ -295,7 +295,7 @@ trying to make himself invisible in the dark, was all that planning and energy w <draw:text-box > <text:p > <text:span text:style-name="text7" > -dripping with sweat now, cold and wet, he could smell the fear coming off his clothes. Suddenly +dripping with sweat now, cold and wet, he could smell the fear coming off his clothes. Suddenly </text:span> </text:p> </draw:text-box> @@ -304,7 +304,7 @@ dripping with sweat now, cold and wet, he could smell the fear coming off his cl <draw:text-box > <text:p > <text:span text:style-name="text7" > -next to him, with a barely noticeable squeak, a door swung quietly to and fro in the night's breeze. +next to him, with a barely noticeable squeak, a door swung quietly to and fro in the night's breeze. </text:span> </text:p> </draw:text-box> @@ -313,7 +313,7 @@ next to him, with a barely noticeable squeak, a door swung quietly to and fro in <draw:text-box > <text:p > <text:span text:style-name="text7" > -Could this be the haven he'd prayed for? Slowly he slid toward the door, pressing himself more and +Could this be the haven he'd prayed for? Slowly he slid toward the door, pressing himself more and </text:span> </text:p> </draw:text-box> diff --git a/sdext/source/pdfimport/test/testdocs/txtpic_pdfi_unittest_draw.xml b/sdext/source/pdfimport/test/testdocs/txtpic_pdfi_unittest_draw.xml index da1251864b43..c86473047278 100644 --- a/sdext/source/pdfimport/test/testdocs/txtpic_pdfi_unittest_draw.xml +++ b/sdext/source/pdfimport/test/testdocs/txtpic_pdfi_unittest_draw.xml @@ -36,73 +36,73 @@ <text:span text:style-name="text7" > H e - + h e a r d - + q u i e t - + s t e p s - + b e h i n d - + h i m . - + T h a t - + d i d n ' t - + b o d e - + w e l l . - + W h o - + c o u l d - + b e - + f o l @@ -112,24 +112,24 @@ w i n g - + h i m - + t h i s - + l a t e - + a t - + </text:span> </text:p> </draw:text-box> @@ -143,19 +143,19 @@ i g h t - + a n d - + i n - + t h i s - + d e a @@ -164,33 +164,33 @@ b e a t - + p a r t - + o f - + t o w n ? - + A n d - + a t - + t h i s - + p a r @@ -201,7 +201,7 @@ u l a r - + m o m @@ -209,36 +209,36 @@ e n t , - + j u s t - + a f t e r - + h e - + p u l l e d - + o f f - + t h e - + </text:span> </text:p> </draw:text-box> @@ -250,40 +250,40 @@ e b i g - + t i m e - + a n d - + w a s - + m a k i n g - + o f f - + w i t h - + t h e - + g r e @@ -295,17 +295,17 @@ c k s . - + W a s - + t h e r e - + a n o @@ -313,32 +313,32 @@ t h e r - + c r o o k - + w h o ' d - + h a d - + t h e - + s a m e - + </text:span> </text:p> </draw:text-box> @@ -352,19 +352,19 @@ d e a , - + a n d - + w a s - + n o w - + w a t @@ -373,15 +373,15 @@ h i n g - + h i m - + a n d - + w a i @@ -389,63 +389,63 @@ t i n g - + f o r - + a - + c h a n c e - + t o - + g r a b - + t h e - + f r u i t - + o f - + h i s - + l a b o r ? - + O r - + d i d - + t h e - + </text:span> </text:p> </draw:text-box> @@ -459,44 +459,44 @@ t e p s - + b e h i n d - + h i m - + m e a n - + t h a t - + o n e - + o f - + m a n y - + l a w - + o f f @@ -505,38 +505,38 @@ c e r s - + i n - + t o w n - + w a s - + o n - + t o - + h i m - + a n d - + j u s t - + w a i @@ -544,10 +544,10 @@ t i n g - + t o - + </text:span> </text:p> </draw:text-box> @@ -562,35 +562,35 @@ u n c e - + a n d - + s n a p - + t h o s e - + c u f f s - + o n - + h i s - + w r i @@ -598,10 +598,10 @@ s t s ? - + H e - + n e r @@ -611,18 +611,18 @@ u s l y - + l o o k e d - + a l l - + a r o @@ -630,7 +630,7 @@ u n d . - + S u d @@ -639,18 +639,18 @@ e n l y - + h e - + s a w - + t h e - + </text:span> </text:p> </draw:text-box> @@ -665,12 +665,12 @@ l e y . - + L i k e - + l i g @@ -680,37 +680,37 @@ n i n g - + h e - + d a r t e d - + o f f - + t o - + t h e - + l e f t - + a n d - + d i s @@ -722,7 +722,7 @@ a r e d - + b e t @@ -730,15 +730,15 @@ w e e n - + t h e - + t w o - + w a r @@ -749,14 +749,14 @@ u s e s - + a l m o s t - + </text:span> </text:p> </draw:text-box> @@ -772,53 +772,53 @@ l i n g - + o v e r - + t h e - + t r a s h - + c a n - + l y i n g - + i n - + t h e - + m i d d l e - + o f - + t h e - + s i d @@ -828,19 +828,19 @@ a l k . - + H e - + t r i e d - + t o - + n e r @@ -850,19 +850,19 @@ u s l y - + t a p - + h i s - + w a y - + </text:span> </text:p> </draw:text-box> @@ -876,19 +876,19 @@ l o n g - + i n - + t h e - + i n k y - + d a r @@ -897,11 +897,11 @@ n e s s - + a n d - + s u d @@ -910,7 +910,7 @@ e n l y - + s t i @@ -921,16 +921,16 @@ n e d : - + i t - + w a s - + a - + d e a @@ -940,36 +940,36 @@ e n d , - + h e - + w o u l d - + h a v e - + t o - + g o - + b a c k - + t h e - + </text:span> </text:p> </draw:text-box> @@ -981,45 +981,45 @@ e w a y - + h e - + h a d - + c o m e . - + T h e - + s t e p s - + g o t - + l o u d e r - + a n d - + l o u @@ -1027,24 +1027,24 @@ d e r , - + h e - + s a w - + t h e - + b l a c k - + o u t @@ -1052,26 +1052,26 @@ l i n e - + o f - + a - + f i g u r e - + c o m i n g - + </text:span> </text:p> </draw:text-box> @@ -1086,11 +1086,11 @@ o u n d - + t h e - + c o r @@ -1098,39 +1098,39 @@ n e r . - + I s - + t h i s - + t h e - + e n d - + o f - + t h e - + l i n e ? - + h e - + t h o @@ -1138,7 +1138,7 @@ u g h t - + p r e @@ -1147,7 +1147,7 @@ s i n g - + h i m @@ -1155,12 +1155,12 @@ s e l f - + b a c k - + a g a @@ -1168,16 +1168,16 @@ i n s t - + t h e - + w a l l - + </text:span> </text:p> </draw:text-box> @@ -1192,15 +1192,15 @@ y i n g - + t o - + m a k e - + h i m @@ -1208,7 +1208,7 @@ s e l f - + i n v @@ -1218,33 +1218,33 @@ i b l e - + i n - + t h e - + d a r k , - + w a s - + a l l - + t h a t - + p l a @@ -1253,18 +1253,18 @@ n i n g - + a n d - + e n e r g y - + w a s @@ -1272,14 +1272,14 @@ t e d ? - + H e - + w a s - + </text:span> </text:p> </draw:text-box> @@ -1296,76 +1296,76 @@ p i n g - + w i t h - + s w e a t - + n o w , - + c o l d - + a n d - + w e t , - + h e - + c o u l d - + s m e l l - + t h e - + f e a r - + c o m i n g - + o f f - + h i s - + c l o @@ -1374,7 +1374,7 @@ h e s . - + S u d @@ -1383,7 +1383,7 @@ e n l y - + </text:span> </text:p> </draw:text-box> @@ -1396,29 +1396,29 @@ n e x t - + t o - + h i m , - + w i t h - + a - + b a r e l y - + n o t @@ -1429,7 +1429,7 @@ a b l e - + s q u @@ -1437,20 +1437,20 @@ e a k , - + a - + d o o r - + s w u n g - + q u i @@ -1458,25 +1458,25 @@ e t l y - + t o - + a n d - + f r o - + i n - + t h e - + n i g @@ -1484,7 +1484,7 @@ h t ' s - + b r e @@ -1492,7 +1492,7 @@ e z e . - + </text:span> </text:p> </draw:text-box> @@ -1506,74 +1506,74 @@ o u l d - + t h i s - + b e - + t h e - + h a v e n - + h e ' d - + p r a y e d - + f o r ? - + S l o w l y - + h e - + s l i d - + t o w a r d - + t h e - + d o o r , - + p r e @@ -1582,7 +1582,7 @@ s i n g - + h i m @@ -1590,16 +1590,16 @@ s e l f - + m o r e - + a n d - + </text:span> </text:p> </draw:text-box> @@ -1612,83 +1612,83 @@ m o r e - + i n t o - + t h e - + w a l l , - + i n t o - + t h e - + d a r k , - + a w a y - + f r o m - + h i s - + e n e m y . - + W o u l d - + t h i s - + d o o r - + s a v e - + h i s - + h i d @@ -1704,73 +1704,73 @@ e <text:span text:style-name="text7" > H e - + h e a r d - + q u i e t - + s t e p s - + b e h i n d - + h i m . - + T h a t - + d i d n ' t - + b o d e - + w e l l . - + W h o - + c o u l d - + b e - + f o l @@ -1780,24 +1780,24 @@ w i n g - + h i m - + t h i s - + l a t e - + a t - + </text:span> </text:p> </draw:text-box> @@ -1811,19 +1811,19 @@ i g h t - + a n d - + i n - + t h i s - + d e a @@ -1832,33 +1832,33 @@ b e a t - + p a r t - + o f - + t o w n ? - + A n d - + a t - + t h i s - + p a r @@ -1869,7 +1869,7 @@ u l a r - + m o m @@ -1877,36 +1877,36 @@ e n t , - + j u s t - + a f t e r - + h e - + p u l l e d - + o f f - + t h e - + </text:span> </text:p> </draw:text-box> @@ -1918,40 +1918,40 @@ e b i g - + t i m e - + a n d - + w a s - + m a k i n g - + o f f - + w i t h - + t h e - + g r e @@ -1963,17 +1963,17 @@ c k s . - + W a s - + t h e r e - + a n o @@ -1981,32 +1981,32 @@ t h e r - + c r o o k - + w h o ' d - + h a d - + t h e - + s a m e - + </text:span> </text:p> </draw:text-box> @@ -2020,19 +2020,19 @@ d e a , - + a n d - + w a s - + n o w - + w a t @@ -2041,15 +2041,15 @@ h i n g - + h i m - + a n d - + w a i @@ -2057,63 +2057,63 @@ t i n g - + f o r - + a - + c h a n c e - + t o - + g r a b - + t h e - + f r u i t - + o f - + h i s - + l a b o r ? - + O r - + d i d - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2127,44 +2127,44 @@ t e p s - + b e h i n d - + h i m - + m e a n - + t h a t - + o n e - + o f - + m a n y - + l a w - + o f f @@ -2173,38 +2173,38 @@ c e r s - + i n - + t o w n - + w a s - + o n - + t o - + h i m - + a n d - + j u s t - + w a i @@ -2212,10 +2212,10 @@ t i n g - + t o - + </text:span> </text:p> </draw:text-box> @@ -2230,35 +2230,35 @@ u n c e - + a n d - + s n a p - + t h o s e - + c u f f s - + o n - + h i s - + w r i @@ -2266,10 +2266,10 @@ s t s ? - + H e - + n e r @@ -2279,18 +2279,18 @@ u s l y - + l o o k e d - + a l l - + a r o @@ -2298,7 +2298,7 @@ u n d . - + S u d @@ -2307,18 +2307,18 @@ e n l y - + h e - + s a w - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2333,12 +2333,12 @@ l e y . - + L i k e - + l i g @@ -2348,37 +2348,37 @@ n i n g - + h e - + d a r t e d - + o f f - + t o - + t h e - + l e f t - + a n d - + d i s @@ -2390,7 +2390,7 @@ a r e d - + b e t @@ -2398,15 +2398,15 @@ w e e n - + t h e - + t w o - + w a r @@ -2417,14 +2417,14 @@ u s e s - + a l m o s t - + </text:span> </text:p> </draw:text-box> @@ -2440,53 +2440,53 @@ l i n g - + o v e r - + t h e - + t r a s h - + c a n - + l y i n g - + i n - + t h e - + m i d d l e - + o f - + t h e - + s i d @@ -2496,19 +2496,19 @@ a l k . - + H e - + t r i e d - + t o - + n e r @@ -2518,19 +2518,19 @@ u s l y - + t a p - + h i s - + w a y - + </text:span> </text:p> </draw:text-box> @@ -2544,19 +2544,19 @@ l o n g - + i n - + t h e - + i n k y - + d a r @@ -2565,11 +2565,11 @@ n e s s - + a n d - + s u d @@ -2578,7 +2578,7 @@ e n l y - + s t i @@ -2589,16 +2589,16 @@ n e d : - + i t - + w a s - + a - + d e a @@ -2608,36 +2608,36 @@ e n d , - + h e - + w o u l d - + h a v e - + t o - + g o - + b a c k - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2649,45 +2649,45 @@ e w a y - + h e - + h a d - + c o m e . - + T h e - + s t e p s - + g o t - + l o u d e r - + a n d - + l o u @@ -2695,24 +2695,24 @@ d e r , - + h e - + s a w - + t h e - + b l a c k - + o u t @@ -2720,26 +2720,26 @@ l i n e - + o f - + a - + f i g u r e - + c o m i n g - + </text:span> </text:p> </draw:text-box> @@ -2754,11 +2754,11 @@ o u n d - + t h e - + c o r @@ -2766,39 +2766,39 @@ n e r . - + I s - + t h i s - + t h e - + e n d - + o f - + t h e - + l i n e ? - + h e - + t h o @@ -2806,7 +2806,7 @@ u g h t - + p r e @@ -2815,7 +2815,7 @@ s i n g - + h i m @@ -2823,12 +2823,12 @@ s e l f - + b a c k - + a g a @@ -2836,16 +2836,16 @@ i n s t - + t h e - + w a l l - + </text:span> </text:p> </draw:text-box> @@ -2860,15 +2860,15 @@ y i n g - + t o - + m a k e - + h i m @@ -2876,7 +2876,7 @@ s e l f - + i n v @@ -2886,33 +2886,33 @@ i b l e - + i n - + t h e - + d a r k , - + w a s - + a l l - + t h a t - + p l a @@ -2921,18 +2921,18 @@ n i n g - + a n d - + e n e r g y - + w a s @@ -2940,14 +2940,14 @@ t e d ? - + H e - + w a s - + </text:span> </text:p> </draw:text-box> @@ -2964,76 +2964,76 @@ p i n g - + w i t h - + s w e a t - + n o w , - + c o l d - + a n d - + w e t , - + h e - + c o u l d - + s m e l l - + t h e - + f e a r - + c o m i n g - + o f f - + h i s - + c l o @@ -3042,7 +3042,7 @@ h e s . - + S u d @@ -3051,7 +3051,7 @@ e n l y - + </text:span> </text:p> </draw:text-box> @@ -3064,29 +3064,29 @@ n e x t - + t o - + h i m , - + w i t h - + a - + b a r e l y - + n o t @@ -3097,7 +3097,7 @@ a b l e - + s q u @@ -3105,20 +3105,20 @@ e a k , - + a - + d o o r - + s w u n g - + q u i @@ -3126,25 +3126,25 @@ e t l y - + t o - + a n d - + f r o - + i n - + t h e - + n i g @@ -3152,7 +3152,7 @@ h t ' s - + b r e @@ -3160,7 +3160,7 @@ e z e . - + </text:span> </text:p> </draw:text-box> @@ -3174,74 +3174,74 @@ o u l d - + t h i s - + b e - + t h e - + h a v e n - + h e ' d - + p r a y e d - + f o r ? - + S l o w l y - + h e - + s l i d - + t o w a r d - + t h e - + d o o r , - + p r e @@ -3250,7 +3250,7 @@ s i n g - + h i m @@ -3258,16 +3258,16 @@ s e l f - + m o r e - + a n d - + </text:span> </text:p> </draw:text-box> @@ -3280,83 +3280,83 @@ m o r e - + i n t o - + t h e - + w a l l , - + i n t o - + t h e - + d a r k , - + a w a y - + f r o m - + h i s - + e n e m y . - + W o u l d - + t h i s - + d o o r - + s a v e - + h i s - + h i d diff --git a/sdext/source/pdfimport/test/testdocs/txtpic_pdfi_unittest_impress.xml b/sdext/source/pdfimport/test/testdocs/txtpic_pdfi_unittest_impress.xml index a57b2bc750de..eb0bedc3fd69 100644 --- a/sdext/source/pdfimport/test/testdocs/txtpic_pdfi_unittest_impress.xml +++ b/sdext/source/pdfimport/test/testdocs/txtpic_pdfi_unittest_impress.xml @@ -36,73 +36,73 @@ <text:span text:style-name="text7" > H e - + h e a r d - + q u i e t - + s t e p s - + b e h i n d - + h i m . - + T h a t - + d i d n ' t - + b o d e - + w e l l . - + W h o - + c o u l d - + b e - + f o l @@ -112,24 +112,24 @@ w i n g - + h i m - + t h i s - + l a t e - + a t - + </text:span> </text:p> </draw:text-box> @@ -143,19 +143,19 @@ i g h t - + a n d - + i n - + t h i s - + d e a @@ -164,33 +164,33 @@ b e a t - + p a r t - + o f - + t o w n ? - + A n d - + a t - + t h i s - + p a r @@ -201,7 +201,7 @@ u l a r - + m o m @@ -209,36 +209,36 @@ e n t , - + j u s t - + a f t e r - + h e - + p u l l e d - + o f f - + t h e - + </text:span> </text:p> </draw:text-box> @@ -250,40 +250,40 @@ e b i g - + t i m e - + a n d - + w a s - + m a k i n g - + o f f - + w i t h - + t h e - + g r e @@ -295,17 +295,17 @@ c k s . - + W a s - + t h e r e - + a n o @@ -313,32 +313,32 @@ t h e r - + c r o o k - + w h o ' d - + h a d - + t h e - + s a m e - + </text:span> </text:p> </draw:text-box> @@ -352,19 +352,19 @@ d e a , - + a n d - + w a s - + n o w - + w a t @@ -373,15 +373,15 @@ h i n g - + h i m - + a n d - + w a i @@ -389,63 +389,63 @@ t i n g - + f o r - + a - + c h a n c e - + t o - + g r a b - + t h e - + f r u i t - + o f - + h i s - + l a b o r ? - + O r - + d i d - + t h e - + </text:span> </text:p> </draw:text-box> @@ -459,44 +459,44 @@ t e p s - + b e h i n d - + h i m - + m e a n - + t h a t - + o n e - + o f - + m a n y - + l a w - + o f f @@ -505,38 +505,38 @@ c e r s - + i n - + t o w n - + w a s - + o n - + t o - + h i m - + a n d - + j u s t - + w a i @@ -544,10 +544,10 @@ t i n g - + t o - + </text:span> </text:p> </draw:text-box> @@ -562,35 +562,35 @@ u n c e - + a n d - + s n a p - + t h o s e - + c u f f s - + o n - + h i s - + w r i @@ -598,10 +598,10 @@ s t s ? - + H e - + n e r @@ -611,18 +611,18 @@ u s l y - + l o o k e d - + a l l - + a r o @@ -630,7 +630,7 @@ u n d . - + S u d @@ -639,18 +639,18 @@ e n l y - + h e - + s a w - + t h e - + </text:span> </text:p> </draw:text-box> @@ -665,12 +665,12 @@ l e y . - + L i k e - + l i g @@ -680,37 +680,37 @@ n i n g - + h e - + d a r t e d - + o f f - + t o - + t h e - + l e f t - + a n d - + d i s @@ -722,7 +722,7 @@ a r e d - + b e t @@ -730,15 +730,15 @@ w e e n - + t h e - + t w o - + w a r @@ -749,14 +749,14 @@ u s e s - + a l m o s t - + </text:span> </text:p> </draw:text-box> @@ -772,53 +772,53 @@ l i n g - + o v e r - + t h e - + t r a s h - + c a n - + l y i n g - + i n - + t h e - + m i d d l e - + o f - + t h e - + s i d @@ -828,19 +828,19 @@ a l k . - + H e - + t r i e d - + t o - + n e r @@ -850,19 +850,19 @@ u s l y - + t a p - + h i s - + w a y - + </text:span> </text:p> </draw:text-box> @@ -876,19 +876,19 @@ l o n g - + i n - + t h e - + i n k y - + d a r @@ -897,11 +897,11 @@ n e s s - + a n d - + s u d @@ -910,7 +910,7 @@ e n l y - + s t i @@ -921,16 +921,16 @@ n e d : - + i t - + w a s - + a - + d e a @@ -940,36 +940,36 @@ e n d , - + h e - + w o u l d - + h a v e - + t o - + g o - + b a c k - + t h e - + </text:span> </text:p> </draw:text-box> @@ -981,45 +981,45 @@ e w a y - + h e - + h a d - + c o m e . - + T h e - + s t e p s - + g o t - + l o u d e r - + a n d - + l o u @@ -1027,24 +1027,24 @@ d e r , - + h e - + s a w - + t h e - + b l a c k - + o u t @@ -1052,26 +1052,26 @@ l i n e - + o f - + a - + f i g u r e - + c o m i n g - + </text:span> </text:p> </draw:text-box> @@ -1086,11 +1086,11 @@ o u n d - + t h e - + c o r @@ -1098,39 +1098,39 @@ n e r . - + I s - + t h i s - + t h e - + e n d - + o f - + t h e - + l i n e ? - + h e - + t h o @@ -1138,7 +1138,7 @@ u g h t - + p r e @@ -1147,7 +1147,7 @@ s i n g - + h i m @@ -1155,12 +1155,12 @@ s e l f - + b a c k - + a g a @@ -1168,16 +1168,16 @@ i n s t - + t h e - + w a l l - + </text:span> </text:p> </draw:text-box> @@ -1192,15 +1192,15 @@ y i n g - + t o - + m a k e - + h i m @@ -1208,7 +1208,7 @@ s e l f - + i n v @@ -1218,33 +1218,33 @@ i b l e - + i n - + t h e - + d a r k , - + w a s - + a l l - + t h a t - + p l a @@ -1253,18 +1253,18 @@ n i n g - + a n d - + e n e r g y - + w a s @@ -1272,14 +1272,14 @@ t e d ? - + H e - + w a s - + </text:span> </text:p> </draw:text-box> @@ -1296,76 +1296,76 @@ p i n g - + w i t h - + s w e a t - + n o w , - + c o l d - + a n d - + w e t , - + h e - + c o u l d - + s m e l l - + t h e - + f e a r - + c o m i n g - + o f f - + h i s - + c l o @@ -1374,7 +1374,7 @@ h e s . - + S u d @@ -1383,7 +1383,7 @@ e n l y - + </text:span> </text:p> </draw:text-box> @@ -1396,29 +1396,29 @@ n e x t - + t o - + h i m , - + w i t h - + a - + b a r e l y - + n o t @@ -1429,7 +1429,7 @@ a b l e - + s q u @@ -1437,20 +1437,20 @@ e a k , - + a - + d o o r - + s w u n g - + q u i @@ -1458,25 +1458,25 @@ e t l y - + t o - + a n d - + f r o - + i n - + t h e - + n i g @@ -1484,7 +1484,7 @@ h t ' s - + b r e @@ -1492,7 +1492,7 @@ e z e . - + </text:span> </text:p> </draw:text-box> @@ -1506,74 +1506,74 @@ o u l d - + t h i s - + b e - + t h e - + h a v e n - + h e ' d - + p r a y e d - + f o r ? - + S l o w l y - + h e - + s l i d - + t o w a r d - + t h e - + d o o r , - + p r e @@ -1582,7 +1582,7 @@ s i n g - + h i m @@ -1590,16 +1590,16 @@ s e l f - + m o r e - + a n d - + </text:span> </text:p> </draw:text-box> @@ -1612,83 +1612,83 @@ m o r e - + i n t o - + t h e - + w a l l , - + i n t o - + t h e - + d a r k , - + a w a y - + f r o m - + h i s - + e n e m y . - + W o u l d - + t h i s - + d o o r - + s a v e - + h i s - + h i d @@ -1704,73 +1704,73 @@ e <text:span text:style-name="text7" > H e - + h e a r d - + q u i e t - + s t e p s - + b e h i n d - + h i m . - + T h a t - + d i d n ' t - + b o d e - + w e l l . - + W h o - + c o u l d - + b e - + f o l @@ -1780,24 +1780,24 @@ w i n g - + h i m - + t h i s - + l a t e - + a t - + </text:span> </text:p> </draw:text-box> @@ -1811,19 +1811,19 @@ i g h t - + a n d - + i n - + t h i s - + d e a @@ -1832,33 +1832,33 @@ b e a t - + p a r t - + o f - + t o w n ? - + A n d - + a t - + t h i s - + p a r @@ -1869,7 +1869,7 @@ u l a r - + m o m @@ -1877,36 +1877,36 @@ e n t , - + j u s t - + a f t e r - + h e - + p u l l e d - + o f f - + t h e - + </text:span> </text:p> </draw:text-box> @@ -1918,40 +1918,40 @@ e b i g - + t i m e - + a n d - + w a s - + m a k i n g - + o f f - + w i t h - + t h e - + g r e @@ -1963,17 +1963,17 @@ c k s . - + W a s - + t h e r e - + a n o @@ -1981,32 +1981,32 @@ t h e r - + c r o o k - + w h o ' d - + h a d - + t h e - + s a m e - + </text:span> </text:p> </draw:text-box> @@ -2020,19 +2020,19 @@ d e a , - + a n d - + w a s - + n o w - + w a t @@ -2041,15 +2041,15 @@ h i n g - + h i m - + a n d - + w a i @@ -2057,63 +2057,63 @@ t i n g - + f o r - + a - + c h a n c e - + t o - + g r a b - + t h e - + f r u i t - + o f - + h i s - + l a b o r ? - + O r - + d i d - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2127,44 +2127,44 @@ t e p s - + b e h i n d - + h i m - + m e a n - + t h a t - + o n e - + o f - + m a n y - + l a w - + o f f @@ -2173,38 +2173,38 @@ c e r s - + i n - + t o w n - + w a s - + o n - + t o - + h i m - + a n d - + j u s t - + w a i @@ -2212,10 +2212,10 @@ t i n g - + t o - + </text:span> </text:p> </draw:text-box> @@ -2230,35 +2230,35 @@ u n c e - + a n d - + s n a p - + t h o s e - + c u f f s - + o n - + h i s - + w r i @@ -2266,10 +2266,10 @@ s t s ? - + H e - + n e r @@ -2279,18 +2279,18 @@ u s l y - + l o o k e d - + a l l - + a r o @@ -2298,7 +2298,7 @@ u n d . - + S u d @@ -2307,18 +2307,18 @@ e n l y - + h e - + s a w - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2333,12 +2333,12 @@ l e y . - + L i k e - + l i g @@ -2348,37 +2348,37 @@ n i n g - + h e - + d a r t e d - + o f f - + t o - + t h e - + l e f t - + a n d - + d i s @@ -2390,7 +2390,7 @@ a r e d - + b e t @@ -2398,15 +2398,15 @@ w e e n - + t h e - + t w o - + w a r @@ -2417,14 +2417,14 @@ u s e s - + a l m o s t - + </text:span> </text:p> </draw:text-box> @@ -2440,53 +2440,53 @@ l i n g - + o v e r - + t h e - + t r a s h - + c a n - + l y i n g - + i n - + t h e - + m i d d l e - + o f - + t h e - + s i d @@ -2496,19 +2496,19 @@ a l k . - + H e - + t r i e d - + t o - + n e r @@ -2518,19 +2518,19 @@ u s l y - + t a p - + h i s - + w a y - + </text:span> </text:p> </draw:text-box> @@ -2544,19 +2544,19 @@ l o n g - + i n - + t h e - + i n k y - + d a r @@ -2565,11 +2565,11 @@ n e s s - + a n d - + s u d @@ -2578,7 +2578,7 @@ e n l y - + s t i @@ -2589,16 +2589,16 @@ n e d : - + i t - + w a s - + a - + d e a @@ -2608,36 +2608,36 @@ e n d , - + h e - + w o u l d - + h a v e - + t o - + g o - + b a c k - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2649,45 +2649,45 @@ e w a y - + h e - + h a d - + c o m e . - + T h e - + s t e p s - + g o t - + l o u d e r - + a n d - + l o u @@ -2695,24 +2695,24 @@ d e r , - + h e - + s a w - + t h e - + b l a c k - + o u t @@ -2720,26 +2720,26 @@ l i n e - + o f - + a - + f i g u r e - + c o m i n g - + </text:span> </text:p> </draw:text-box> @@ -2754,11 +2754,11 @@ o u n d - + t h e - + c o r @@ -2766,39 +2766,39 @@ n e r . - + I s - + t h i s - + t h e - + e n d - + o f - + t h e - + l i n e ? - + h e - + t h o @@ -2806,7 +2806,7 @@ u g h t - + p r e @@ -2815,7 +2815,7 @@ s i n g - + h i m @@ -2823,12 +2823,12 @@ s e l f - + b a c k - + a g a @@ -2836,16 +2836,16 @@ i n s t - + t h e - + w a l l - + </text:span> </text:p> </draw:text-box> @@ -2860,15 +2860,15 @@ y i n g - + t o - + m a k e - + h i m @@ -2876,7 +2876,7 @@ s e l f - + i n v @@ -2886,33 +2886,33 @@ i b l e - + i n - + t h e - + d a r k , - + w a s - + a l l - + t h a t - + p l a @@ -2921,18 +2921,18 @@ n i n g - + a n d - + e n e r g y - + w a s @@ -2940,14 +2940,14 @@ t e d ? - + H e - + w a s - + </text:span> </text:p> </draw:text-box> @@ -2964,76 +2964,76 @@ p i n g - + w i t h - + s w e a t - + n o w , - + c o l d - + a n d - + w e t , - + h e - + c o u l d - + s m e l l - + t h e - + f e a r - + c o m i n g - + o f f - + h i s - + c l o @@ -3042,7 +3042,7 @@ h e s . - + S u d @@ -3051,7 +3051,7 @@ e n l y - + </text:span> </text:p> </draw:text-box> @@ -3064,29 +3064,29 @@ n e x t - + t o - + h i m , - + w i t h - + a - + b a r e l y - + n o t @@ -3097,7 +3097,7 @@ a b l e - + s q u @@ -3105,20 +3105,20 @@ e a k , - + a - + d o o r - + s w u n g - + q u i @@ -3126,25 +3126,25 @@ e t l y - + t o - + a n d - + f r o - + i n - + t h e - + n i g @@ -3152,7 +3152,7 @@ h t ' s - + b r e @@ -3160,7 +3160,7 @@ e z e . - + </text:span> </text:p> </draw:text-box> @@ -3174,74 +3174,74 @@ o u l d - + t h i s - + b e - + t h e - + h a v e n - + h e ' d - + p r a y e d - + f o r ? - + S l o w l y - + h e - + s l i d - + t o w a r d - + t h e - + d o o r , - + p r e @@ -3250,7 +3250,7 @@ s i n g - + h i m @@ -3258,16 +3258,16 @@ s e l f - + m o r e - + a n d - + </text:span> </text:p> </draw:text-box> @@ -3280,83 +3280,83 @@ m o r e - + i n t o - + t h e - + w a l l , - + i n t o - + t h e - + d a r k , - + a w a y - + f r o m - + h i s - + e n e m y . - + W o u l d - + t h i s - + d o o r - + s a v e - + h i s - + h i d diff --git a/sdext/source/pdfimport/test/testdocs/txtpic_pdfi_unittest_writer.xml b/sdext/source/pdfimport/test/testdocs/txtpic_pdfi_unittest_writer.xml index 955b81b73a36..75d8958f3a92 100644 --- a/sdext/source/pdfimport/test/testdocs/txtpic_pdfi_unittest_writer.xml +++ b/sdext/source/pdfimport/test/testdocs/txtpic_pdfi_unittest_writer.xml @@ -36,7 +36,7 @@ <draw:text-box > <text:p > <text:span text:style-name="text7" > -He heard quiet steps behind him. That didn't bode well. Who could be following him this late at +He heard quiet steps behind him. That didn't bode well. Who could be following him this late at </text:span> </text:p> </draw:text-box> @@ -45,7 +45,7 @@ He heard quiet steps behind him. That didn't bode well. Who could be following h <draw:text-box > <text:p > <text:span text:style-name="text7" > -night and in this deadbeat part of town? And at this particular moment, just after he pulled off the +night and in this deadbeat part of town? And at this particular moment, just after he pulled off the </text:span> </text:p> </draw:text-box> @@ -54,7 +54,7 @@ night and in this deadbeat part of town? And at this particular moment, just aft <draw:text-box > <text:p > <text:span text:style-name="text7" > -big time and was making off with the greenbacks. Was there another crook who'd had the same +big time and was making off with the greenbacks. Was there another crook who'd had the same </text:span> </text:p> </draw:text-box> @@ -63,7 +63,7 @@ big time and was making off with the greenbacks. Was there another crook who'd h <draw:text-box > <text:p > <text:span text:style-name="text7" > -idea, and was now watching him and waiting for a chance to grab the fruit of his labor? Or did the +idea, and was now watching him and waiting for a chance to grab the fruit of his labor? Or did the </text:span> </text:p> </draw:text-box> @@ -72,7 +72,7 @@ idea, and was now watching him and waiting for a chance to grab the fruit of his <draw:text-box > <text:p > <text:span text:style-name="text7" > -steps behind him mean that one of many law officers in town was on to him and just waiting to +steps behind him mean that one of many law officers in town was on to him and just waiting to </text:span> </text:p> </draw:text-box> @@ -81,7 +81,7 @@ steps behind him mean that one of many law officers in town was on to him and ju <draw:text-box > <text:p > <text:span text:style-name="text7" > -pounce and snap those cuffs on his wrists? He nervously looked all around. Suddenly he saw the +pounce and snap those cuffs on his wrists? He nervously looked all around. Suddenly he saw the </text:span> </text:p> </draw:text-box> @@ -90,7 +90,7 @@ pounce and snap those cuffs on his wrists? He nervously looked all around. Sudde <draw:text-box > <text:p > <text:span text:style-name="text7" > -alley. Like lightning he darted off to the left and disappeared between the two warehouses almost +alley. Like lightning he darted off to the left and disappeared between the two warehouses almost </text:span> </text:p> </draw:text-box> @@ -99,7 +99,7 @@ alley. Like lightning he darted off to the left and disappeared between the two <draw:text-box > <text:p > <text:span text:style-name="text7" > -falling over the trash can lying in the middle of the sidewalk. He tried to nervously tap his way +falling over the trash can lying in the middle of the sidewalk. He tried to nervously tap his way </text:span> </text:p> </draw:text-box> @@ -108,7 +108,7 @@ falling over the trash can lying in the middle of the sidewalk. He tried to nerv <draw:text-box > <text:p > <text:span text:style-name="text7" > -along in the inky darkness and suddenly stiffened: it was a dead-end, he would have to go back the +along in the inky darkness and suddenly stiffened: it was a dead-end, he would have to go back the </text:span> </text:p> </draw:text-box> @@ -117,7 +117,7 @@ along in the inky darkness and suddenly stiffened: it was a dead-end, he would h <draw:text-box > <text:p > <text:span text:style-name="text7" > -way he had come. The steps got louder and louder, he saw the black outline of a figure coming +way he had come. The steps got louder and louder, he saw the black outline of a figure coming </text:span> </text:p> </draw:text-box> @@ -126,7 +126,7 @@ way he had come. The steps got louder and louder, he saw the black outline of a <draw:text-box > <text:p > <text:span text:style-name="text7" > -around the corner. Is this the end of the line? he thought pressing himself back against the wall +around the corner. Is this the end of the line? he thought pressing himself back against the wall </text:span> </text:p> </draw:text-box> @@ -135,7 +135,7 @@ around the corner. Is this the end of the line? he thought pressing himself back <draw:text-box > <text:p > <text:span text:style-name="text7" > -trying to make himself invisible in the dark, was all that planning and energy wasted? He was +trying to make himself invisible in the dark, was all that planning and energy wasted? He was </text:span> </text:p> </draw:text-box> @@ -144,7 +144,7 @@ trying to make himself invisible in the dark, was all that planning and energy w <draw:text-box > <text:p > <text:span text:style-name="text7" > -dripping with sweat now, cold and wet, he could smell the fear coming off his clothes. Suddenly +dripping with sweat now, cold and wet, he could smell the fear coming off his clothes. Suddenly </text:span> </text:p> </draw:text-box> @@ -153,7 +153,7 @@ dripping with sweat now, cold and wet, he could smell the fear coming off his cl <draw:text-box > <text:p > <text:span text:style-name="text7" > -next to him, with a barely noticeable squeak, a door swung quietly to and fro in the night's breeze. +next to him, with a barely noticeable squeak, a door swung quietly to and fro in the night's breeze. </text:span> </text:p> </draw:text-box> @@ -162,7 +162,7 @@ next to him, with a barely noticeable squeak, a door swung quietly to and fro in <draw:text-box > <text:p > <text:span text:style-name="text7" > -Could this be the haven he'd prayed for? Slowly he slid toward the door, pressing himself more and +Could this be the haven he'd prayed for? Slowly he slid toward the door, pressing himself more and </text:span> </text:p> </draw:text-box> @@ -180,7 +180,7 @@ more into the wall, into the dark, away from his enemy. Would this door save his <draw:text-box > <text:p > <text:span text:style-name="text7" > -He heard quiet steps behind him. That didn't bode well. Who could be following him this late at +He heard quiet steps behind him. That didn't bode well. Who could be following him this late at </text:span> </text:p> </draw:text-box> @@ -189,7 +189,7 @@ He heard quiet steps behind him. That didn't bode well. Who could be following h <draw:text-box > <text:p > <text:span text:style-name="text7" > -night and in this deadbeat part of town? And at this particular moment, just after he pulled off the +night and in this deadbeat part of town? And at this particular moment, just after he pulled off the </text:span> </text:p> </draw:text-box> @@ -198,7 +198,7 @@ night and in this deadbeat part of town? And at this particular moment, just aft <draw:text-box > <text:p > <text:span text:style-name="text7" > -big time and was making off with the greenbacks. Was there another crook who'd had the same +big time and was making off with the greenbacks. Was there another crook who'd had the same </text:span> </text:p> </draw:text-box> @@ -207,7 +207,7 @@ big time and was making off with the greenbacks. Was there another crook who'd h <draw:text-box > <text:p > <text:span text:style-name="text7" > -idea, and was now watching him and waiting for a chance to grab the fruit of his labor? Or did the +idea, and was now watching him and waiting for a chance to grab the fruit of his labor? Or did the </text:span> </text:p> </draw:text-box> @@ -216,7 +216,7 @@ idea, and was now watching him and waiting for a chance to grab the fruit of his <draw:text-box > <text:p > <text:span text:style-name="text7" > -steps behind him mean that one of many law officers in town was on to him and just waiting to +steps behind him mean that one of many law officers in town was on to him and just waiting to </text:span> </text:p> </draw:text-box> @@ -225,7 +225,7 @@ steps behind him mean that one of many law officers in town was on to him and ju <draw:text-box > <text:p > <text:span text:style-name="text7" > -pounce and snap those cuffs on his wrists? He nervously looked all around. Suddenly he saw the +pounce and snap those cuffs on his wrists? He nervously looked all around. Suddenly he saw the </text:span> </text:p> </draw:text-box> @@ -234,7 +234,7 @@ pounce and snap those cuffs on his wrists? He nervously looked all around. Sudde <draw:text-box > <text:p > <text:span text:style-name="text7" > -alley. Like lightning he darted off to the left and disappeared between the two warehouses almost +alley. Like lightning he darted off to the left and disappeared between the two warehouses almost </text:span> </text:p> </draw:text-box> @@ -243,7 +243,7 @@ alley. Like lightning he darted off to the left and disappeared between the two <draw:text-box > <text:p > <text:span text:style-name="text7" > -falling over the trash can lying in the middle of the sidewalk. He tried to nervously tap his way +falling over the trash can lying in the middle of the sidewalk. He tried to nervously tap his way </text:span> </text:p> </draw:text-box> @@ -252,7 +252,7 @@ falling over the trash can lying in the middle of the sidewalk. He tried to nerv <draw:text-box > <text:p > <text:span text:style-name="text7" > -along in the inky darkness and suddenly stiffened: it was a dead-end, he would have to go back the +along in the inky darkness and suddenly stiffened: it was a dead-end, he would have to go back the </text:span> </text:p> </draw:text-box> @@ -261,7 +261,7 @@ along in the inky darkness and suddenly stiffened: it was a dead-end, he would h <draw:text-box > <text:p > <text:span text:style-name="text7" > -way he had come. The steps got louder and louder, he saw the black outline of a figure coming +way he had come. The steps got louder and louder, he saw the black outline of a figure coming </text:span> </text:p> </draw:text-box> @@ -270,7 +270,7 @@ way he had come. The steps got louder and louder, he saw the black outline of a <draw:text-box > <text:p > <text:span text:style-name="text7" > -around the corner. Is this the end of the line? he thought pressing himself back against the wall +around the corner. Is this the end of the line? he thought pressing himself back against the wall </text:span> </text:p> </draw:text-box> @@ -279,7 +279,7 @@ around the corner. Is this the end of the line? he thought pressing himself back <draw:text-box > <text:p > <text:span text:style-name="text7" > -trying to make himself invisible in the dark, was all that planning and energy wasted? He was +trying to make himself invisible in the dark, was all that planning and energy wasted? He was </text:span> </text:p> </draw:text-box> @@ -288,7 +288,7 @@ trying to make himself invisible in the dark, was all that planning and energy w <draw:text-box > <text:p > <text:span text:style-name="text7" > -dripping with sweat now, cold and wet, he could smell the fear coming off his clothes. Suddenly +dripping with sweat now, cold and wet, he could smell the fear coming off his clothes. Suddenly </text:span> </text:p> </draw:text-box> @@ -297,7 +297,7 @@ dripping with sweat now, cold and wet, he could smell the fear coming off his cl <draw:text-box > <text:p > <text:span text:style-name="text7" > -next to him, with a barely noticeable squeak, a door swung quietly to and fro in the night's breeze. +next to him, with a barely noticeable squeak, a door swung quietly to and fro in the night's breeze. </text:span> </text:p> </draw:text-box> @@ -306,7 +306,7 @@ next to him, with a barely noticeable squeak, a door swung quietly to and fro in <draw:text-box > <text:p > <text:span text:style-name="text7" > -Could this be the haven he'd prayed for? Slowly he slid toward the door, pressing himself more and +Could this be the haven he'd prayed for? Slowly he slid toward the door, pressing himself more and </text:span> </text:p> </draw:text-box> diff --git a/sdext/source/pdfimport/test/testdocs/txtpictxt_pdfi_unittest_draw.xml b/sdext/source/pdfimport/test/testdocs/txtpictxt_pdfi_unittest_draw.xml index 01cdab8eaf68..afb83c75e754 100644 --- a/sdext/source/pdfimport/test/testdocs/txtpictxt_pdfi_unittest_draw.xml +++ b/sdext/source/pdfimport/test/testdocs/txtpictxt_pdfi_unittest_draw.xml @@ -36,73 +36,73 @@ <text:span text:style-name="text7" > H e - + h e a r d - + q u i e t - + s t e p s - + b e h i n d - + h i m . - + T h a t - + d i d n ' t - + b o d e - + w e l l . - + W h o - + c o u l d - + b e - + f o l @@ -112,24 +112,24 @@ w i n g - + h i m - + t h i s - + l a t e - + a t - + </text:span> </text:p> </draw:text-box> @@ -143,19 +143,19 @@ i g h t - + a n d - + i n - + t h i s - + d e a @@ -164,33 +164,33 @@ b e a t - + p a r t - + o f - + t o w n ? - + A n d - + a t - + t h i s - + p a r @@ -201,7 +201,7 @@ u l a r - + m o m @@ -209,36 +209,36 @@ e n t , - + j u s t - + a f t e r - + h e - + p u l l e d - + o f f - + t h e - + </text:span> </text:p> </draw:text-box> @@ -250,40 +250,40 @@ e b i g - + t i m e - + a n d - + w a s - + m a k i n g - + o f f - + w i t h - + t h e - + g r e @@ -295,17 +295,17 @@ c k s . - + W a s - + t h e r e - + a n o @@ -313,32 +313,32 @@ t h e r - + c r o o k - + w h o ' d - + h a d - + t h e - + s a m e - + </text:span> </text:p> </draw:text-box> @@ -352,19 +352,19 @@ d e a , - + a n d - + w a s - + n o w - + w a t @@ -373,15 +373,15 @@ h i n g - + h i m - + a n d - + w a i @@ -389,63 +389,63 @@ t i n g - + f o r - + a - + c h a n c e - + t o - + g r a b - + t h e - + f r u i t - + o f - + h i s - + l a b o r ? - + O r - + d i d - + t h e - + </text:span> </text:p> </draw:text-box> @@ -459,44 +459,44 @@ t e p s - + b e h i n d - + h i m - + m e a n - + t h a t - + o n e - + o f - + m a n y - + l a w - + o f f @@ -505,38 +505,38 @@ c e r s - + i n - + t o w n - + w a s - + o n - + t o - + h i m - + a n d - + j u s t - + w a i @@ -544,10 +544,10 @@ t i n g - + t o - + </text:span> </text:p> </draw:text-box> @@ -562,35 +562,35 @@ u n c e - + a n d - + s n a p - + t h o s e - + c u f f s - + o n - + h i s - + w r i @@ -598,10 +598,10 @@ s t s ? - + H e - + n e r @@ -611,18 +611,18 @@ u s l y - + l o o k e d - + a l l - + a r o @@ -630,7 +630,7 @@ u n d . - + S u d @@ -639,18 +639,18 @@ e n l y - + h e - + s a w - + t h e - + </text:span> </text:p> </draw:text-box> @@ -665,12 +665,12 @@ l e y . - + L i k e - + l i g @@ -680,37 +680,37 @@ n i n g - + h e - + d a r t e d - + o f f - + t o - + t h e - + l e f t - + a n d - + d i s @@ -722,7 +722,7 @@ a r e d - + b e t @@ -730,15 +730,15 @@ w e e n - + t h e - + t w o - + w a r @@ -749,14 +749,14 @@ u s e s - + a l m o s t - + </text:span> </text:p> </draw:text-box> @@ -772,53 +772,53 @@ l i n g - + o v e r - + t h e - + t r a s h - + c a n - + l y i n g - + i n - + t h e - + m i d d l e - + o f - + t h e - + s i d @@ -828,19 +828,19 @@ a l k . - + H e - + t r i e d - + t o - + n e r @@ -850,19 +850,19 @@ u s l y - + t a p - + h i s - + w a y - + </text:span> </text:p> </draw:text-box> @@ -876,19 +876,19 @@ l o n g - + i n - + t h e - + i n k y - + d a r @@ -897,11 +897,11 @@ n e s s - + a n d - + s u d @@ -910,7 +910,7 @@ e n l y - + s t i @@ -921,16 +921,16 @@ n e d : - + i t - + w a s - + a - + d e a @@ -940,36 +940,36 @@ e n d , - + h e - + w o u l d - + h a v e - + t o - + g o - + b a c k - + t h e - + </text:span> </text:p> </draw:text-box> @@ -981,45 +981,45 @@ e w a y - + h e - + h a d - + c o m e . - + T h e - + s t e p s - + g o t - + l o u d e r - + a n d - + l o u @@ -1027,24 +1027,24 @@ d e r , - + h e - + s a w - + t h e - + b l a c k - + o u t @@ -1052,26 +1052,26 @@ l i n e - + o f - + a - + f i g u r e - + c o m i n g - + </text:span> </text:p> </draw:text-box> @@ -1086,11 +1086,11 @@ o u n d - + t h e - + c o r @@ -1098,39 +1098,39 @@ n e r . - + I s - + t h i s - + t h e - + e n d - + o f - + t h e - + l i n e ? - + h e - + t h o @@ -1138,7 +1138,7 @@ u g h t - + p r e @@ -1147,7 +1147,7 @@ s i n g - + h i m @@ -1155,12 +1155,12 @@ s e l f - + b a c k - + a g a @@ -1168,16 +1168,16 @@ i n s t - + t h e - + w a l l - + </text:span> </text:p> </draw:text-box> @@ -1192,15 +1192,15 @@ y i n g - + t o - + m a k e - + h i m @@ -1208,7 +1208,7 @@ s e l f - + i n v @@ -1218,33 +1218,33 @@ i b l e - + i n - + t h e - + d a r k , - + w a s - + a l l - + t h a t - + p l a @@ -1253,18 +1253,18 @@ n i n g - + a n d - + e n e r g y - + w a s @@ -1272,14 +1272,14 @@ t e d ? - + H e - + w a s - + </text:span> </text:p> </draw:text-box> @@ -1296,76 +1296,76 @@ p i n g - + w i t h - + s w e a t - + n o w , - + c o l d - + a n d - + w e t , - + h e - + c o u l d - + s m e l l - + t h e - + f e a r - + c o m i n g - + o f f - + h i s - + c l o @@ -1374,7 +1374,7 @@ h e s . - + S u d @@ -1383,7 +1383,7 @@ e n l y - + </text:span> </text:p> </draw:text-box> @@ -1396,29 +1396,29 @@ n e x t - + t o - + h i m , - + w i t h - + a - + b a r e l y - + n o t @@ -1429,7 +1429,7 @@ a b l e - + s q u @@ -1437,20 +1437,20 @@ e a k , - + a - + d o o r - + s w u n g - + q u i @@ -1458,25 +1458,25 @@ e t l y - + t o - + a n d - + f r o - + i n - + t h e - + n i g @@ -1484,7 +1484,7 @@ h t ' s - + b r e @@ -1492,7 +1492,7 @@ e z e . - + </text:span> </text:p> </draw:text-box> @@ -1506,74 +1506,74 @@ o u l d - + t h i s - + b e - + t h e - + h a v e n - + h e ' d - + p r a y e d - + f o r ? - + S l o w l y - + h e - + s l i d - + t o w a r d - + t h e - + d o o r , - + p r e @@ -1582,7 +1582,7 @@ s i n g - + h i m @@ -1590,16 +1590,16 @@ s e l f - + m o r e - + a n d - + </text:span> </text:p> </draw:text-box> @@ -1612,83 +1612,83 @@ m o r e - + i n t o - + t h e - + w a l l , - + i n t o - + t h e - + d a r k , - + a w a y - + f r o m - + h i s - + e n e m y . - + W o u l d - + t h i s - + d o o r - + s a v e - + h i s - + h i d @@ -1704,73 +1704,73 @@ e <text:span text:style-name="text7" > H e - + h e a r d - + q u i e t - + s t e p s - + b e h i n d - + h i m . - + T h a t - + d i d n ' t - + b o d e - + w e l l . - + W h o - + c o u l d - + b e - + f o l @@ -1780,24 +1780,24 @@ w i n g - + h i m - + t h i s - + l a t e - + a t - + </text:span> </text:p> </draw:text-box> @@ -1811,19 +1811,19 @@ i g h t - + a n d - + i n - + t h i s - + d e a @@ -1832,33 +1832,33 @@ b e a t - + p a r t - + o f - + t o w n ? - + A n d - + a t - + t h i s - + p a r @@ -1869,7 +1869,7 @@ u l a r - + m o m @@ -1877,36 +1877,36 @@ e n t , - + j u s t - + a f t e r - + h e - + p u l l e d - + o f f - + t h e - + </text:span> </text:p> </draw:text-box> @@ -1918,40 +1918,40 @@ e b i g - + t i m e - + a n d - + w a s - + m a k i n g - + o f f - + w i t h - + t h e - + g r e @@ -1963,17 +1963,17 @@ c k s . - + W a s - + t h e r e - + a n o @@ -1981,32 +1981,32 @@ t h e r - + c r o o k - + w h o ' d - + h a d - + t h e - + s a m e - + </text:span> </text:p> </draw:text-box> @@ -2020,19 +2020,19 @@ d e a , - + a n d - + w a s - + n o w - + w a t @@ -2041,15 +2041,15 @@ h i n g - + h i m - + a n d - + w a i @@ -2057,63 +2057,63 @@ t i n g - + f o r - + a - + c h a n c e - + t o - + g r a b - + t h e - + f r u i t - + o f - + h i s - + l a b o r ? - + O r - + d i d - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2127,44 +2127,44 @@ t e p s - + b e h i n d - + h i m - + m e a n - + t h a t - + o n e - + o f - + m a n y - + l a w - + o f f @@ -2173,38 +2173,38 @@ c e r s - + i n - + t o w n - + w a s - + o n - + t o - + h i m - + a n d - + j u s t - + w a i @@ -2212,10 +2212,10 @@ t i n g - + t o - + </text:span> </text:p> </draw:text-box> @@ -2230,35 +2230,35 @@ u n c e - + a n d - + s n a p - + t h o s e - + c u f f s - + o n - + h i s - + w r i @@ -2266,10 +2266,10 @@ s t s ? - + H e - + n e r @@ -2279,18 +2279,18 @@ u s l y - + l o o k e d - + a l l - + a r o @@ -2298,7 +2298,7 @@ u n d . - + S u d @@ -2307,18 +2307,18 @@ e n l y - + h e - + s a w - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2333,12 +2333,12 @@ l e y . - + L i k e - + l i g @@ -2348,37 +2348,37 @@ n i n g - + h e - + d a r t e d - + o f f - + t o - + t h e - + l e f t - + a n d - + d i s @@ -2390,7 +2390,7 @@ a r e d - + b e t @@ -2398,15 +2398,15 @@ w e e n - + t h e - + t w o - + w a r @@ -2417,14 +2417,14 @@ u s e s - + a l m o s t - + </text:span> </text:p> </draw:text-box> @@ -2440,53 +2440,53 @@ l i n g - + o v e r - + t h e - + t r a s h - + c a n - + l y i n g - + i n - + t h e - + m i d d l e - + o f - + t h e - + s i d @@ -2496,19 +2496,19 @@ a l k . - + H e - + t r i e d - + t o - + n e r @@ -2518,19 +2518,19 @@ u s l y - + t a p - + h i s - + w a y - + </text:span> </text:p> </draw:text-box> @@ -2551,19 +2551,19 @@ l o n g - + i n - + t h e - + i n k y - + d a r @@ -2572,11 +2572,11 @@ n e s s - + a n d - + s u d @@ -2585,7 +2585,7 @@ e n l y - + s t i @@ -2596,16 +2596,16 @@ n e d : - + i t - + w a s - + a - + d e a @@ -2615,36 +2615,36 @@ e n d , - + h e - + w o u l d - + h a v e - + t o - + g o - + b a c k - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2656,45 +2656,45 @@ e w a y - + h e - + h a d - + c o m e . - + T h e - + s t e p s - + g o t - + l o u d e r - + a n d - + l o u @@ -2702,24 +2702,24 @@ d e r , - + h e - + s a w - + t h e - + b l a c k - + o u t @@ -2727,26 +2727,26 @@ l i n e - + o f - + a - + f i g u r e - + c o m i n g - + </text:span> </text:p> </draw:text-box> @@ -2761,11 +2761,11 @@ o u n d - + t h e - + c o r @@ -2773,39 +2773,39 @@ n e r . - + I s - + t h i s - + t h e - + e n d - + o f - + t h e - + l i n e ? - + h e - + t h o @@ -2813,7 +2813,7 @@ u g h t - + p r e @@ -2822,7 +2822,7 @@ s i n g - + h i m @@ -2830,12 +2830,12 @@ s e l f - + b a c k - + a g a @@ -2843,16 +2843,16 @@ i n s t - + t h e - + w a l l - + </text:span> </text:p> </draw:text-box> @@ -2867,15 +2867,15 @@ y i n g - + t o - + m a k e - + h i m @@ -2883,7 +2883,7 @@ s e l f - + i n v @@ -2893,33 +2893,33 @@ i b l e - + i n - + t h e - + d a r k , - + w a s - + a l l - + t h a t - + p l a @@ -2928,18 +2928,18 @@ n i n g - + a n d - + e n e r g y - + w a s @@ -2947,14 +2947,14 @@ t e d ? - + H e - + w a s - + </text:span> </text:p> </draw:text-box> @@ -2971,76 +2971,76 @@ p i n g - + w i t h - + s w e a t - + n o w , - + c o l d - + a n d - + w e t , - + h e - + c o u l d - + s m e l l - + t h e - + f e a r - + c o m i n g - + o f f - + h i s - + c l o @@ -3049,7 +3049,7 @@ h e s . - + S u d @@ -3058,7 +3058,7 @@ e n l y - + </text:span> </text:p> </draw:text-box> @@ -3071,29 +3071,29 @@ n e x t - + t o - + h i m , - + w i t h - + a - + b a r e l y - + n o t @@ -3104,7 +3104,7 @@ a b l e - + s q u @@ -3112,20 +3112,20 @@ e a k , - + a - + d o o r - + s w u n g - + q u i @@ -3133,25 +3133,25 @@ e t l y - + t o - + a n d - + f r o - + i n - + t h e - + n i g @@ -3159,7 +3159,7 @@ h t ' s - + b r e @@ -3167,7 +3167,7 @@ e z e . - + </text:span> </text:p> </draw:text-box> @@ -3181,74 +3181,74 @@ o u l d - + t h i s - + b e - + t h e - + h a v e n - + h e ' d - + p r a y e d - + f o r ? - + S l o w l y - + h e - + s l i d - + t o w a r d - + t h e - + d o o r , - + p r e @@ -3257,7 +3257,7 @@ s i n g - + h i m @@ -3265,16 +3265,16 @@ s e l f - + m o r e - + a n d - + </text:span> </text:p> </draw:text-box> @@ -3287,83 +3287,83 @@ m o r e - + i n t o - + t h e - + w a l l , - + i n t o - + t h e - + d a r k , - + a w a y - + f r o m - + h i s - + e n e m y . - + W o u l d - + t h i s - + d o o r - + s a v e - + h i s - + h i d diff --git a/sdext/source/pdfimport/test/testdocs/txtpictxt_pdfi_unittest_impress.xml b/sdext/source/pdfimport/test/testdocs/txtpictxt_pdfi_unittest_impress.xml index b4e9bfdc2468..b24a1ed4df12 100644 --- a/sdext/source/pdfimport/test/testdocs/txtpictxt_pdfi_unittest_impress.xml +++ b/sdext/source/pdfimport/test/testdocs/txtpictxt_pdfi_unittest_impress.xml @@ -36,73 +36,73 @@ <text:span text:style-name="text7" > H e - + h e a r d - + q u i e t - + s t e p s - + b e h i n d - + h i m . - + T h a t - + d i d n ' t - + b o d e - + w e l l . - + W h o - + c o u l d - + b e - + f o l @@ -112,24 +112,24 @@ w i n g - + h i m - + t h i s - + l a t e - + a t - + </text:span> </text:p> </draw:text-box> @@ -143,19 +143,19 @@ i g h t - + a n d - + i n - + t h i s - + d e a @@ -164,33 +164,33 @@ b e a t - + p a r t - + o f - + t o w n ? - + A n d - + a t - + t h i s - + p a r @@ -201,7 +201,7 @@ u l a r - + m o m @@ -209,36 +209,36 @@ e n t , - + j u s t - + a f t e r - + h e - + p u l l e d - + o f f - + t h e - + </text:span> </text:p> </draw:text-box> @@ -250,40 +250,40 @@ e b i g - + t i m e - + a n d - + w a s - + m a k i n g - + o f f - + w i t h - + t h e - + g r e @@ -295,17 +295,17 @@ c k s . - + W a s - + t h e r e - + a n o @@ -313,32 +313,32 @@ t h e r - + c r o o k - + w h o ' d - + h a d - + t h e - + s a m e - + </text:span> </text:p> </draw:text-box> @@ -352,19 +352,19 @@ d e a , - + a n d - + w a s - + n o w - + w a t @@ -373,15 +373,15 @@ h i n g - + h i m - + a n d - + w a i @@ -389,63 +389,63 @@ t i n g - + f o r - + a - + c h a n c e - + t o - + g r a b - + t h e - + f r u i t - + o f - + h i s - + l a b o r ? - + O r - + d i d - + t h e - + </text:span> </text:p> </draw:text-box> @@ -459,44 +459,44 @@ t e p s - + b e h i n d - + h i m - + m e a n - + t h a t - + o n e - + o f - + m a n y - + l a w - + o f f @@ -505,38 +505,38 @@ c e r s - + i n - + t o w n - + w a s - + o n - + t o - + h i m - + a n d - + j u s t - + w a i @@ -544,10 +544,10 @@ t i n g - + t o - + </text:span> </text:p> </draw:text-box> @@ -562,35 +562,35 @@ u n c e - + a n d - + s n a p - + t h o s e - + c u f f s - + o n - + h i s - + w r i @@ -598,10 +598,10 @@ s t s ? - + H e - + n e r @@ -611,18 +611,18 @@ u s l y - + l o o k e d - + a l l - + a r o @@ -630,7 +630,7 @@ u n d . - + S u d @@ -639,18 +639,18 @@ e n l y - + h e - + s a w - + t h e - + </text:span> </text:p> </draw:text-box> @@ -665,12 +665,12 @@ l e y . - + L i k e - + l i g @@ -680,37 +680,37 @@ n i n g - + h e - + d a r t e d - + o f f - + t o - + t h e - + l e f t - + a n d - + d i s @@ -722,7 +722,7 @@ a r e d - + b e t @@ -730,15 +730,15 @@ w e e n - + t h e - + t w o - + w a r @@ -749,14 +749,14 @@ u s e s - + a l m o s t - + </text:span> </text:p> </draw:text-box> @@ -772,53 +772,53 @@ l i n g - + o v e r - + t h e - + t r a s h - + c a n - + l y i n g - + i n - + t h e - + m i d d l e - + o f - + t h e - + s i d @@ -828,19 +828,19 @@ a l k . - + H e - + t r i e d - + t o - + n e r @@ -850,19 +850,19 @@ u s l y - + t a p - + h i s - + w a y - + </text:span> </text:p> </draw:text-box> @@ -876,19 +876,19 @@ l o n g - + i n - + t h e - + i n k y - + d a r @@ -897,11 +897,11 @@ n e s s - + a n d - + s u d @@ -910,7 +910,7 @@ e n l y - + s t i @@ -921,16 +921,16 @@ n e d : - + i t - + w a s - + a - + d e a @@ -940,36 +940,36 @@ e n d , - + h e - + w o u l d - + h a v e - + t o - + g o - + b a c k - + t h e - + </text:span> </text:p> </draw:text-box> @@ -981,45 +981,45 @@ e w a y - + h e - + h a d - + c o m e . - + T h e - + s t e p s - + g o t - + l o u d e r - + a n d - + l o u @@ -1027,24 +1027,24 @@ d e r , - + h e - + s a w - + t h e - + b l a c k - + o u t @@ -1052,26 +1052,26 @@ l i n e - + o f - + a - + f i g u r e - + c o m i n g - + </text:span> </text:p> </draw:text-box> @@ -1086,11 +1086,11 @@ o u n d - + t h e - + c o r @@ -1098,39 +1098,39 @@ n e r . - + I s - + t h i s - + t h e - + e n d - + o f - + t h e - + l i n e ? - + h e - + t h o @@ -1138,7 +1138,7 @@ u g h t - + p r e @@ -1147,7 +1147,7 @@ s i n g - + h i m @@ -1155,12 +1155,12 @@ s e l f - + b a c k - + a g a @@ -1168,16 +1168,16 @@ i n s t - + t h e - + w a l l - + </text:span> </text:p> </draw:text-box> @@ -1192,15 +1192,15 @@ y i n g - + t o - + m a k e - + h i m @@ -1208,7 +1208,7 @@ s e l f - + i n v @@ -1218,33 +1218,33 @@ i b l e - + i n - + t h e - + d a r k , - + w a s - + a l l - + t h a t - + p l a @@ -1253,18 +1253,18 @@ n i n g - + a n d - + e n e r g y - + w a s @@ -1272,14 +1272,14 @@ t e d ? - + H e - + w a s - + </text:span> </text:p> </draw:text-box> @@ -1296,76 +1296,76 @@ p i n g - + w i t h - + s w e a t - + n o w , - + c o l d - + a n d - + w e t , - + h e - + c o u l d - + s m e l l - + t h e - + f e a r - + c o m i n g - + o f f - + h i s - + c l o @@ -1374,7 +1374,7 @@ h e s . - + S u d @@ -1383,7 +1383,7 @@ e n l y - + </text:span> </text:p> </draw:text-box> @@ -1396,29 +1396,29 @@ n e x t - + t o - + h i m , - + w i t h - + a - + b a r e l y - + n o t @@ -1429,7 +1429,7 @@ a b l e - + s q u @@ -1437,20 +1437,20 @@ e a k , - + a - + d o o r - + s w u n g - + q u i @@ -1458,25 +1458,25 @@ e t l y - + t o - + a n d - + f r o - + i n - + t h e - + n i g @@ -1484,7 +1484,7 @@ h t ' s - + b r e @@ -1492,7 +1492,7 @@ e z e . - + </text:span> </text:p> </draw:text-box> @@ -1506,74 +1506,74 @@ o u l d - + t h i s - + b e - + t h e - + h a v e n - + h e ' d - + p r a y e d - + f o r ? - + S l o w l y - + h e - + s l i d - + t o w a r d - + t h e - + d o o r , - + p r e @@ -1582,7 +1582,7 @@ s i n g - + h i m @@ -1590,16 +1590,16 @@ s e l f - + m o r e - + a n d - + </text:span> </text:p> </draw:text-box> @@ -1612,83 +1612,83 @@ m o r e - + i n t o - + t h e - + w a l l , - + i n t o - + t h e - + d a r k , - + a w a y - + f r o m - + h i s - + e n e m y . - + W o u l d - + t h i s - + d o o r - + s a v e - + h i s - + h i d @@ -1704,73 +1704,73 @@ e <text:span text:style-name="text7" > H e - + h e a r d - + q u i e t - + s t e p s - + b e h i n d - + h i m . - + T h a t - + d i d n ' t - + b o d e - + w e l l . - + W h o - + c o u l d - + b e - + f o l @@ -1780,24 +1780,24 @@ w i n g - + h i m - + t h i s - + l a t e - + a t - + </text:span> </text:p> </draw:text-box> @@ -1811,19 +1811,19 @@ i g h t - + a n d - + i n - + t h i s - + d e a @@ -1832,33 +1832,33 @@ b e a t - + p a r t - + o f - + t o w n ? - + A n d - + a t - + t h i s - + p a r @@ -1869,7 +1869,7 @@ u l a r - + m o m @@ -1877,36 +1877,36 @@ e n t , - + j u s t - + a f t e r - + h e - + p u l l e d - + o f f - + t h e - + </text:span> </text:p> </draw:text-box> @@ -1918,40 +1918,40 @@ e b i g - + t i m e - + a n d - + w a s - + m a k i n g - + o f f - + w i t h - + t h e - + g r e @@ -1963,17 +1963,17 @@ c k s . - + W a s - + t h e r e - + a n o @@ -1981,32 +1981,32 @@ t h e r - + c r o o k - + w h o ' d - + h a d - + t h e - + s a m e - + </text:span> </text:p> </draw:text-box> @@ -2020,19 +2020,19 @@ d e a , - + a n d - + w a s - + n o w - + w a t @@ -2041,15 +2041,15 @@ h i n g - + h i m - + a n d - + w a i @@ -2057,63 +2057,63 @@ t i n g - + f o r - + a - + c h a n c e - + t o - + g r a b - + t h e - + f r u i t - + o f - + h i s - + l a b o r ? - + O r - + d i d - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2127,44 +2127,44 @@ t e p s - + b e h i n d - + h i m - + m e a n - + t h a t - + o n e - + o f - + m a n y - + l a w - + o f f @@ -2173,38 +2173,38 @@ c e r s - + i n - + t o w n - + w a s - + o n - + t o - + h i m - + a n d - + j u s t - + w a i @@ -2212,10 +2212,10 @@ t i n g - + t o - + </text:span> </text:p> </draw:text-box> @@ -2230,35 +2230,35 @@ u n c e - + a n d - + s n a p - + t h o s e - + c u f f s - + o n - + h i s - + w r i @@ -2266,10 +2266,10 @@ s t s ? - + H e - + n e r @@ -2279,18 +2279,18 @@ u s l y - + l o o k e d - + a l l - + a r o @@ -2298,7 +2298,7 @@ u n d . - + S u d @@ -2307,18 +2307,18 @@ e n l y - + h e - + s a w - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2333,12 +2333,12 @@ l e y . - + L i k e - + l i g @@ -2348,37 +2348,37 @@ n i n g - + h e - + d a r t e d - + o f f - + t o - + t h e - + l e f t - + a n d - + d i s @@ -2390,7 +2390,7 @@ a r e d - + b e t @@ -2398,15 +2398,15 @@ w e e n - + t h e - + t w o - + w a r @@ -2417,14 +2417,14 @@ u s e s - + a l m o s t - + </text:span> </text:p> </draw:text-box> @@ -2440,53 +2440,53 @@ l i n g - + o v e r - + t h e - + t r a s h - + c a n - + l y i n g - + i n - + t h e - + m i d d l e - + o f - + t h e - + s i d @@ -2496,19 +2496,19 @@ a l k . - + H e - + t r i e d - + t o - + n e r @@ -2518,19 +2518,19 @@ u s l y - + t a p - + h i s - + w a y - + </text:span> </text:p> </draw:text-box> @@ -2551,19 +2551,19 @@ l o n g - + i n - + t h e - + i n k y - + d a r @@ -2572,11 +2572,11 @@ n e s s - + a n d - + s u d @@ -2585,7 +2585,7 @@ e n l y - + s t i @@ -2596,16 +2596,16 @@ n e d : - + i t - + w a s - + a - + d e a @@ -2615,36 +2615,36 @@ e n d , - + h e - + w o u l d - + h a v e - + t o - + g o - + b a c k - + t h e - + </text:span> </text:p> </draw:text-box> @@ -2656,45 +2656,45 @@ e w a y - + h e - + h a d - + c o m e . - + T h e - + s t e p s - + g o t - + l o u d e r - + a n d - + l o u @@ -2702,24 +2702,24 @@ d e r , - + h e - + s a w - + t h e - + b l a c k - + o u t @@ -2727,26 +2727,26 @@ l i n e - + o f - + a - + f i g u r e - + c o m i n g - + </text:span> </text:p> </draw:text-box> @@ -2761,11 +2761,11 @@ o u n d - + t h e - + c o r @@ -2773,39 +2773,39 @@ n e r . - + I s - + t h i s - + t h e - + e n d - + o f - + t h e - + l i n e ? - + h e - + t h o @@ -2813,7 +2813,7 @@ u g h t - + p r e @@ -2822,7 +2822,7 @@ s i n g - + h i m @@ -2830,12 +2830,12 @@ s e l f - + b a c k - + a g a @@ -2843,16 +2843,16 @@ i n s t - + t h e - + w a l l - + </text:span> </text:p> </draw:text-box> @@ -2867,15 +2867,15 @@ y i n g - + t o - + m a k e - + h i m @@ -2883,7 +2883,7 @@ s e l f - + i n v @@ -2893,33 +2893,33 @@ i b l e - + i n - + t h e - + d a r k , - + w a s - + a l l - + t h a t - + p l a @@ -2928,18 +2928,18 @@ n i n g - + a n d - + e n e r g y - + w a s @@ -2947,14 +2947,14 @@ t e d ? - + H e - + w a s - + </text:span> </text:p> </draw:text-box> @@ -2971,76 +2971,76 @@ p i n g - + w i t h - + s w e a t - + n o w , - + c o l d - + a n d - + w e t , - + h e - + c o u l d - + s m e l l - + t h e - + f e a r - + c o m i n g - + o f f - + h i s - + c l o @@ -3049,7 +3049,7 @@ h e s . - + S u d @@ -3058,7 +3058,7 @@ e n l y - + </text:span> </text:p> </draw:text-box> @@ -3071,29 +3071,29 @@ n e x t - + t o - + h i m , - + w i t h - + a - + b a r e l y - + n o t @@ -3104,7 +3104,7 @@ a b l e - + s q u @@ -3112,20 +3112,20 @@ e a k , - + a - + d o o r - + s w u n g - + q u i @@ -3133,25 +3133,25 @@ e t l y - + t o - + a n d - + f r o - + i n - + t h e - + n i g @@ -3159,7 +3159,7 @@ h t ' s - + b r e @@ -3167,7 +3167,7 @@ e z e . - + </text:span> </text:p> </draw:text-box> @@ -3181,74 +3181,74 @@ o u l d - + t h i s - + b e - + t h e - + h a v e n - + h e ' d - + p r a y e d - + f o r ? - + S l o w l y - + h e - + s l i d - + t o w a r d - + t h e - + d o o r , - + p r e @@ -3257,7 +3257,7 @@ s i n g - + h i m @@ -3265,16 +3265,16 @@ s e l f - + m o r e - + a n d - + </text:span> </text:p> </draw:text-box> @@ -3287,83 +3287,83 @@ m o r e - + i n t o - + t h e - + w a l l , - + i n t o - + t h e - + d a r k , - + a w a y - + f r o m - + h i s - + e n e m y . - + W o u l d - + t h i s - + d o o r - + s a v e - + h i s - + h i d diff --git a/sdext/source/pdfimport/test/testdocs/txtpictxt_pdfi_unittest_writer.xml b/sdext/source/pdfimport/test/testdocs/txtpictxt_pdfi_unittest_writer.xml index 2b68f12e6bb5..fda03d3589de 100644 --- a/sdext/source/pdfimport/test/testdocs/txtpictxt_pdfi_unittest_writer.xml +++ b/sdext/source/pdfimport/test/testdocs/txtpictxt_pdfi_unittest_writer.xml @@ -36,7 +36,7 @@ <draw:text-box > <text:p > <text:span text:style-name="text7" > -He heard quiet steps behind him. That didn't bode well. Who could be following him this late at +He heard quiet steps behind him. That didn't bode well. Who could be following him this late at </text:span> </text:p> </draw:text-box> @@ -45,7 +45,7 @@ He heard quiet steps behind him. That didn't bode well. Who could be following h <draw:text-box > <text:p > <text:span text:style-name="text7" > -night and in this deadbeat part of town? And at this particular moment, just after he pulled off the +night and in this deadbeat part of town? And at this particular moment, just after he pulled off the </text:span> </text:p> </draw:text-box> @@ -54,7 +54,7 @@ night and in this deadbeat part of town? And at this particular moment, just aft <draw:text-box > <text:p > <text:span text:style-name="text7" > -big time and was making off with the greenbacks. Was there another crook who'd had the same +big time and was making off with the greenbacks. Was there another crook who'd had the same </text:span> </text:p> </draw:text-box> @@ -63,7 +63,7 @@ big time and was making off with the greenbacks. Was there another crook who'd h <draw:text-box > <text:p > <text:span text:style-name="text7" > -idea, and was now watching him and waiting for a chance to grab the fruit of his labor? Or did the +idea, and was now watching him and waiting for a chance to grab the fruit of his labor? Or did the </text:span> </text:p> </draw:text-box> @@ -72,7 +72,7 @@ idea, and was now watching him and waiting for a chance to grab the fruit of his <draw:text-box > <text:p > <text:span text:style-name="text7" > -steps behind him mean that one of many law officers in town was on to him and just waiting to +steps behind him mean that one of many law officers in town was on to him and just waiting to </text:span> </text:p> </draw:text-box> @@ -81,7 +81,7 @@ steps behind him mean that one of many law officers in town was on to him and ju <draw:text-box > <text:p > <text:span text:style-name="text7" > -pounce and snap those cuffs on his wrists? He nervously looked all around. Suddenly he saw the +pounce and snap those cuffs on his wrists? He nervously looked all around. Suddenly he saw the </text:span> </text:p> </draw:text-box> @@ -90,7 +90,7 @@ pounce and snap those cuffs on his wrists? He nervously looked all around. Sudde <draw:text-box > <text:p > <text:span text:style-name="text7" > -alley. Like lightning he darted off to the left and disappeared between the two warehouses almost +alley. Like lightning he darted off to the left and disappeared between the two warehouses almost </text:span> </text:p> </draw:text-box> @@ -99,7 +99,7 @@ alley. Like lightning he darted off to the left and disappeared between the two <draw:text-box > <text:p > <text:span text:style-name="text7" > -falling over the trash can lying in the middle of the sidewalk. He tried to nervously tap his way +falling over the trash can lying in the middle of the sidewalk. He tried to nervously tap his way </text:span> </text:p> </draw:text-box> @@ -108,7 +108,7 @@ falling over the trash can lying in the middle of the sidewalk. He tried to nerv <draw:text-box > <text:p > <text:span text:style-name="text7" > -along in the inky darkness and suddenly stiffened: it was a dead-end, he would have to go back the +along in the inky darkness and suddenly stiffened: it was a dead-end, he would have to go back the </text:span> </text:p> </draw:text-box> @@ -117,7 +117,7 @@ along in the inky darkness and suddenly stiffened: it was a dead-end, he would h <draw:text-box > <text:p > <text:span text:style-name="text7" > -way he had come. The steps got louder and louder, he saw the black outline of a figure coming +way he had come. The steps got louder and louder, he saw the black outline of a figure coming </text:span> </text:p> </draw:text-box> @@ -126,7 +126,7 @@ way he had come. The steps got louder and louder, he saw the black outline of a <draw:text-box > <text:p > <text:span text:style-name="text7" > -around the corner. Is this the end of the line? he thought pressing himself back against the wall +around the corner. Is this the end of the line? he thought pressing himself back against the wall </text:span> </text:p> </draw:text-box> @@ -135,7 +135,7 @@ around the corner. Is this the end of the line? he thought pressing himself back <draw:text-box > <text:p > <text:span text:style-name="text7" > -trying to make himself invisible in the dark, was all that planning and energy wasted? He was +trying to make himself invisible in the dark, was all that planning and energy wasted? He was </text:span> </text:p> </draw:text-box> @@ -144,7 +144,7 @@ trying to make himself invisible in the dark, was all that planning and energy w <draw:text-box > <text:p > <text:span text:style-name="text7" > -dripping with sweat now, cold and wet, he could smell the fear coming off his clothes. Suddenly +dripping with sweat now, cold and wet, he could smell the fear coming off his clothes. Suddenly </text:span> </text:p> </draw:text-box> @@ -153,7 +153,7 @@ dripping with sweat now, cold and wet, he could smell the fear coming off his cl <draw:text-box > <text:p > <text:span text:style-name="text7" > -next to him, with a barely noticeable squeak, a door swung quietly to and fro in the night's breeze. +next to him, with a barely noticeable squeak, a door swung quietly to and fro in the night's breeze. </text:span> </text:p> </draw:text-box> @@ -162,7 +162,7 @@ next to him, with a barely noticeable squeak, a door swung quietly to and fro in <draw:text-box > <text:p > <text:span text:style-name="text7" > -Could this be the haven he'd prayed for? Slowly he slid toward the door, pressing himself more and +Could this be the haven he'd prayed for? Slowly he slid toward the door, pressing himself more and </text:span> </text:p> </draw:text-box> @@ -180,7 +180,7 @@ more into the wall, into the dark, away from his enemy. Would this door save his <draw:text-box > <text:p > <text:span text:style-name="text7" > -He heard quiet steps behind him. That didn't bode well. Who could be following him this late at +He heard quiet steps behind him. That didn't bode well. Who could be following him this late at </text:span> </text:p> </draw:text-box> @@ -189,7 +189,7 @@ He heard quiet steps behind him. That didn't bode well. Who could be following h <draw:text-box > <text:p > <text:span text:style-name="text7" > -night and in this deadbeat part of town? And at this particular moment, just after he pulled off the +night and in this deadbeat part of town? And at this particular moment, just after he pulled off the </text:span> </text:p> </draw:text-box> @@ -198,7 +198,7 @@ night and in this deadbeat part of town? And at this particular moment, just aft <draw:text-box > <text:p > <text:span text:style-name="text7" > -big time and was making off with the greenbacks. Was there another crook who'd had the same +big time and was making off with the greenbacks. Was there another crook who'd had the same </text:span> </text:p> </draw:text-box> @@ -207,7 +207,7 @@ big time and was making off with the greenbacks. Was there another crook who'd h <draw:text-box > <text:p > <text:span text:style-name="text7" > -idea, and was now watching him and waiting for a chance to grab the fruit of his labor? Or did the +idea, and was now watching him and waiting for a chance to grab the fruit of his labor? Or did the </text:span> </text:p> </draw:text-box> @@ -216,7 +216,7 @@ idea, and was now watching him and waiting for a chance to grab the fruit of his <draw:text-box > <text:p > <text:span text:style-name="text7" > -steps behind him mean that one of many law officers in town was on to him and just waiting to +steps behind him mean that one of many law officers in town was on to him and just waiting to </text:span> </text:p> </draw:text-box> @@ -225,7 +225,7 @@ steps behind him mean that one of many law officers in town was on to him and ju <draw:text-box > <text:p > <text:span text:style-name="text7" > -pounce and snap those cuffs on his wrists? He nervously looked all around. Suddenly he saw the +pounce and snap those cuffs on his wrists? He nervously looked all around. Suddenly he saw the </text:span> </text:p> </draw:text-box> @@ -234,7 +234,7 @@ pounce and snap those cuffs on his wrists? He nervously looked all around. Sudde <draw:text-box > <text:p > <text:span text:style-name="text7" > -alley. Like lightning he darted off to the left and disappeared between the two warehouses almost +alley. Like lightning he darted off to the left and disappeared between the two warehouses almost </text:span> </text:p> </draw:text-box> @@ -243,7 +243,7 @@ alley. Like lightning he darted off to the left and disappeared between the two <draw:text-box > <text:p > <text:span text:style-name="text7" > -falling over the trash can lying in the middle of the sidewalk. He tried to nervously tap his way +falling over the trash can lying in the middle of the sidewalk. He tried to nervously tap his way </text:span> </text:p> </draw:text-box> @@ -259,7 +259,7 @@ UDYKMTAwIDQwCjI1NQr///////////////////////////////////////////////////////////// <draw:text-box > <text:p > <text:span text:style-name="text7" > -along in the inky darkness and suddenly stiffened: it was a dead-end, he would have to go back the +along in the inky darkness and suddenly stiffened: it was a dead-end, he would have to go back the </text:span> </text:p> </draw:text-box> @@ -268,7 +268,7 @@ along in the inky darkness and suddenly stiffened: it was a dead-end, he would h <draw:text-box > <text:p > <text:span text:style-name="text7" > -way he had come. The steps got louder and louder, he saw the black outline of a figure coming +way he had come. The steps got louder and louder, he saw the black outline of a figure coming </text:span> </text:p> </draw:text-box> @@ -277,7 +277,7 @@ way he had come. The steps got louder and louder, he saw the black outline of a <draw:text-box > <text:p > <text:span text:style-name="text7" > -around the corner. Is this the end of the line? he thought pressing himself back against the wall +around the corner. Is this the end of the line? he thought pressing himself back against the wall </text:span> </text:p> </draw:text-box> @@ -286,7 +286,7 @@ around the corner. Is this the end of the line? he thought pressing himself back <draw:text-box > <text:p > <text:span text:style-name="text7" > -trying to make himself invisible in the dark, was all that planning and energy wasted? He was +trying to make himself invisible in the dark, was all that planning and energy wasted? He was </text:span> </text:p> </draw:text-box> @@ -295,7 +295,7 @@ trying to make himself invisible in the dark, was all that planning and energy w <draw:text-box > <text:p > <text:span text:style-name="text7" > -dripping with sweat now, cold and wet, he could smell the fear coming off his clothes. Suddenly +dripping with sweat now, cold and wet, he could smell the fear coming off his clothes. Suddenly </text:span> </text:p> </draw:text-box> @@ -304,7 +304,7 @@ dripping with sweat now, cold and wet, he could smell the fear coming off his cl <draw:text-box > <text:p > <text:span text:style-name="text7" > -next to him, with a barely noticeable squeak, a door swung quietly to and fro in the night's breeze. +next to him, with a barely noticeable squeak, a door swung quietly to and fro in the night's breeze. </text:span> </text:p> </draw:text-box> @@ -313,7 +313,7 @@ next to him, with a barely noticeable squeak, a door swung quietly to and fro in <draw:text-box > <text:p > <text:span text:style-name="text7" > -Could this be the haven he'd prayed for? Slowly he slid toward the door, pressing himself more and +Could this be the haven he'd prayed for? Slowly he slid toward the door, pressing himself more and </text:span> </text:p> </draw:text-box> diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx index 63cdaa88466a..cccff7dc441e 100644 --- a/sdext/source/pdfimport/test/tests.cxx +++ b/sdext/source/pdfimport/test/tests.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx index bc24000025c2..bb6c6c6d3451 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -80,19 +80,19 @@ const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > return mxBreakIter; } -void DrawXmlEmitter::visit( HyperlinkElement& elem, const std::list< Element* >::const_iterator& ) -{ +void DrawXmlEmitter::visit( HyperlinkElement& elem, const std::list< Element* >::const_iterator& ) +{ if( elem.Children.empty() ) return; - + const char* pType = dynamic_cast<DrawElement*>(elem.Children.front()) ? "draw:a" : "text:a"; - + PropertyMap aProps; aProps[ USTR( "xlink:type" ) ] = USTR( "simple" ); aProps[ USTR( "xlink:href" ) ] = elem.URI; aProps[ USTR( "office:target-frame-name" ) ] = USTR( "_blank" ); aProps[ USTR( "xlink:show" ) ] = USTR( "new" ); - + m_rEmitContext.rEmitter.beginTag( pType, aProps ); std::list< Element* >::iterator this_it = elem.Children.begin(); while( this_it !=elem.Children.end() && *this_it != &elem ) @@ -103,18 +103,18 @@ void DrawXmlEmitter::visit( HyperlinkElement& elem, const std::list< Element* >: m_rEmitContext.rEmitter.endTag( pType ); } -void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::const_iterator& ) +void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::const_iterator& ) { if( ! elem.Text.getLength() ) return; - + rtl::OUString strSpace(32); rtl::OUString strNbSpace(160); rtl::OUString tabSpace(0x09); PropertyMap aProps; if( elem.StyleId != -1 ) { - aProps[ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "text:style-name" ) ) ] = + aProps[ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "text:style-name" ) ) ] = m_rEmitContext.rStyles.getStyleName( elem.StyleId ); } @@ -127,7 +127,7 @@ void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::cons sal_Int16 nType = GetBreakIterator()->getScriptType( str, i + 1); if (nType == ::com::sun::star::i18n::ScriptType::COMPLEX) isComplex = true; - } + } m_rEmitContext.rEmitter.beginTag( "text:span", aProps ); @@ -152,7 +152,7 @@ void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::cons m_rEmitContext.rEmitter.write( strToken ); } } - } + } std::list< Element* >::iterator this_it = elem.Children.begin(); while( this_it !=elem.Children.end() && *this_it != &elem ) @@ -160,7 +160,7 @@ void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::cons (*this_it)->visitedBy( *this, this_it ); this_it++; } - + m_rEmitContext.rEmitter.endTag( "text:span" ); } @@ -175,28 +175,28 @@ void DrawXmlEmitter::visit( ParagraphElement& elem, const std::list< Element* >: if( elem.Type == elem.Headline ) pTagType = "text:h"; m_rEmitContext.rEmitter.beginTag( pTagType, aProps ); - + std::list< Element* >::iterator this_it = elem.Children.begin(); while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); this_it++; } - + m_rEmitContext.rEmitter.endTag( pTagType ); } -void DrawXmlEmitter::fillFrameProps( DrawElement& rElem, - PropertyMap& rProps, +void DrawXmlEmitter::fillFrameProps( DrawElement& rElem, + PropertyMap& rProps, const EmitContext& rEmitContext ) { double rel_x = rElem.x, rel_y = rElem.y; - + rProps[ USTR( "draw:z-index" ) ] = rtl::OUString::valueOf( rElem.ZOrder ); rProps[ USTR( "draw:style-name" )] = rEmitContext.rStyles.getStyleName( rElem.StyleId ); rProps[ USTR( "svg:width" ) ] = convertPixelToUnitString( rElem.w ); rProps[ USTR( "svg:height" ) ] = convertPixelToUnitString( rElem.h ); - + const GraphicsContext& rGC = rEmitContext.rProcessor.getGraphicsContext( rElem.GCId ); if( rGC.Transformation.isIdentity() ) @@ -208,14 +208,14 @@ void DrawXmlEmitter::fillFrameProps( DrawElement& rElem, { basegfx::B2DTuple aScale, aTranslation; double fRotate, fShearX; - + rGC.Transformation.decompose( aScale, aTranslation, fRotate, fShearX ); - + rtl::OUStringBuffer aBuf( 256 ); - // TODO(F2): general transformation case missing; if implemented, note + // TODO(F2): general transformation case missing; if implemented, note // that ODF rotation is oriented the other way - + // vertical mirroring is done by horizontally mirroring and rotaing 180 degree // quaint ! if( rElem.MirrorVertical ) @@ -244,36 +244,36 @@ void DrawXmlEmitter::fillFrameProps( DrawElement& rElem, aBuf.append( sal_Unicode(' ') ); aBuf.append( convertPixelToUnitString( rel_y ) ); aBuf.appendAscii( " )" ); - + rProps[ USTR( "draw:transform" ) ] = aBuf.makeStringAndClear(); } } -void DrawXmlEmitter::visit( FrameElement& elem, const std::list< Element* >::const_iterator& ) -{ +void DrawXmlEmitter::visit( FrameElement& elem, const std::list< Element* >::const_iterator& ) +{ if( elem.Children.empty() ) return; - + bool bTextBox = (dynamic_cast<ParagraphElement*>(elem.Children.front()) != NULL); PropertyMap aFrameProps; fillFrameProps( elem, aFrameProps, m_rEmitContext ); m_rEmitContext.rEmitter.beginTag( "draw:frame", aFrameProps ); if( bTextBox ) m_rEmitContext.rEmitter.beginTag( "draw:text-box", PropertyMap() ); - + std::list< Element* >::iterator this_it = elem.Children.begin(); while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); this_it++; } - + if( bTextBox ) m_rEmitContext.rEmitter.endTag( "draw:text-box" ); m_rEmitContext.rEmitter.endTag( "draw:frame" ); } -void DrawXmlEmitter::visit( PolyPolyElement& elem, const std::list< Element* >::const_iterator& ) +void DrawXmlEmitter::visit( PolyPolyElement& elem, const std::list< Element* >::const_iterator& ) { elem.updateGeometry(); /* note: @@ -287,44 +287,44 @@ void DrawXmlEmitter::visit( PolyPolyElement& elem, const std::list< Element* >:: { basegfx::B2DPolygon b2dPolygon; b2dPolygon = elem.PolyPoly.getB2DPolygon( i ); - + for ( sal_uInt32 j = 0; j< b2dPolygon.count(); j++ ) { basegfx::B2DPoint point; basegfx::B2DPoint nextPoint; point = b2dPolygon.getB2DPoint( j ); - + basegfx::B2DPoint prevPoint; prevPoint = b2dPolygon.getPrevControlPoint( j ) ; - - point.setX( convPx2mmPrec2( point.getX() )*100.0 ); + + point.setX( convPx2mmPrec2( point.getX() )*100.0 ); point.setY( convPx2mmPrec2( point.getY() )*100.0 ); - + if ( b2dPolygon.isPrevControlPointUsed( j ) ) { - prevPoint.setX( convPx2mmPrec2( prevPoint.getX() )*100.0 ); + prevPoint.setX( convPx2mmPrec2( prevPoint.getX() )*100.0 ); prevPoint.setY( convPx2mmPrec2( prevPoint.getY() )*100.0 ); } - + if ( b2dPolygon.isNextControlPointUsed( j ) ) { nextPoint = b2dPolygon.getNextControlPoint( j ) ; - nextPoint.setX( convPx2mmPrec2( nextPoint.getX() )*100.0 ); + nextPoint.setX( convPx2mmPrec2( nextPoint.getX() )*100.0 ); nextPoint.setY( convPx2mmPrec2( nextPoint.getY() )*100.0 ); - } - + } + b2dPolygon.setB2DPoint( j, point ); - + if ( b2dPolygon.isPrevControlPointUsed( j ) ) b2dPolygon.setPrevControlPoint( j , prevPoint ) ; - + if ( b2dPolygon.isNextControlPointUsed( j ) ) b2dPolygon.setNextControlPoint( j , nextPoint ) ; } - + elem.PolyPoly.setB2DPolygon( i, b2dPolygon ); } - + PropertyMap aProps; fillFrameProps( elem, aProps, m_rEmitContext ); rtl::OUStringBuffer aBuf( 64 ); @@ -334,14 +334,14 @@ void DrawXmlEmitter::visit( PolyPolyElement& elem, const std::list< Element* >:: aBuf.append( convPx2mmPrec2(elem.h)*100.0 ); aProps[ USTR( "svg:viewBox" ) ] = aBuf.makeStringAndClear(); aProps[ USTR( "svg:d" ) ] = basegfx::tools::exportToSvgD( elem.PolyPoly ); - + m_rEmitContext.rEmitter.beginTag( "draw:path", aProps ); m_rEmitContext.rEmitter.endTag( "draw:path" ); } -void DrawXmlEmitter::visit( ImageElement& elem, const std::list< Element* >::const_iterator& ) +void DrawXmlEmitter::visit( ImageElement& elem, const std::list< Element* >::const_iterator& ) { - PropertyMap aImageProps; + PropertyMap aImageProps; m_rEmitContext.rEmitter.beginTag( "draw:image", aImageProps ); m_rEmitContext.rEmitter.beginTag( "office:binary-data", PropertyMap() ); m_rEmitContext.rImages.writeBase64EncodedStream( elem.Image, m_rEmitContext); @@ -353,9 +353,9 @@ void DrawXmlEmitter::visit( PageElement& elem, const std::list< Element* >::cons { PropertyMap aPageProps; aPageProps[ USTR( "draw:master-page-name" ) ] = m_rEmitContext.rStyles.getStyleName( elem.StyleId ); - + m_rEmitContext.rEmitter.beginTag("draw:page", aPageProps); - + if( m_rEmitContext.xStatusIndicator.is() ) m_rEmitContext.xStatusIndicator->setValue( elem.PageNumber ); @@ -365,23 +365,23 @@ void DrawXmlEmitter::visit( PageElement& elem, const std::list< Element* >::cons (*this_it)->visitedBy( *this, this_it ); this_it++; } - + m_rEmitContext.rEmitter.endTag("draw:page"); } - + void DrawXmlEmitter::visit( DocumentElement& elem, const std::list< Element* >::const_iterator&) { m_rEmitContext.rEmitter.beginTag( "office:body", PropertyMap() ); - m_rEmitContext.rEmitter.beginTag( m_bWriteDrawDocument ? "office:drawing" : "office:presentation", + m_rEmitContext.rEmitter.beginTag( m_bWriteDrawDocument ? "office:drawing" : "office:presentation", PropertyMap() ); - + std::list< Element* >::iterator this_it = elem.Children.begin(); while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); this_it++; } - + m_rEmitContext.rEmitter.endTag( m_bWriteDrawDocument ? "office:drawing" : "office:presentation" ); m_rEmitContext.rEmitter.endTag( "office:body" ); } @@ -412,12 +412,12 @@ void DrawXmlOptimizer::visit( PolyPolyElement& elem, const std::list< Element* > * the other is a fill */ if( elem.Parent ) - { - // find following PolyPolyElement in parent's children list + { + // find following PolyPolyElement in parent's children list std::list< Element* >::iterator this_it = elem.Parent->Children.begin(); while( this_it != elem.Parent->Children.end() && *this_it != &elem ) ++this_it; - + if( this_it != elem.Parent->Children.end() ) { std::list< Element* >::iterator next_it = this_it; @@ -477,15 +477,15 @@ void DrawXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::co if( m_rProcessor.getStatusIndicator().is() ) m_rProcessor.getStatusIndicator()->setValue( elem.PageNumber ); - // resolve hyperlinks + // resolve hyperlinks elem.resolveHyperlinks(); - + elem.resolveFontStyles( m_rProcessor ); // underlines and such - - // FIXME: until hyperlinks and font effects are adjusted for - // geometrical search handle them before sorting + + // FIXME: until hyperlinks and font effects are adjusted for + // geometrical search handle them before sorting m_rProcessor.sortElements( &elem ); - + // find paragraphs in text ParagraphElement* pCurPara = NULL; std::list< Element* >::iterator page_element, next_page_element; @@ -514,7 +514,7 @@ void DrawXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::co fCurLineHeight = (fCurLineHeight*double(nCurLineElements) + pTestText->h)/double(nCurLineElements+1); nCurLineElements++; } - } + } continue; } @@ -525,7 +525,7 @@ void DrawXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::co if( pDraw ) { // insert small drawing objects as character, else leave them page bound - + bool bInsertToParagraph = false; // first check if this is either inside the paragraph if( pCurPara && pDraw->y < pCurPara->y + pCurPara->h ) @@ -568,14 +568,14 @@ void DrawXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::co pDraw->isCharacter = true; } } - + if( ! bInsertToParagraph ) { pCurPara = NULL; continue; } } - + TextElement* pText = dynamic_cast<TextElement*>(*page_element); if( ! pText && pLink && ! pLink->Children.empty() ) pText = dynamic_cast<TextElement*>(pLink->Children.front()); @@ -604,10 +604,10 @@ void DrawXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::co } } - + } - + // update line height/width if( pCurPara ) { @@ -626,8 +626,8 @@ void DrawXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::co line_right = pGeo->x + pGeo->w; } } - - + + // move element to current paragraph if (! pCurPara ) // new paragraph, insert one { @@ -662,7 +662,7 @@ bool isSpaces(TextElement* pTextElem) rtl::OUString strToken = ouTxt2.copy(i,1) ; if( !strSpace.equals(strToken) ) return false; - } + } return true; } @@ -672,7 +672,7 @@ bool notTransformed(GraphicsContext GC) GC.Transformation.get(0,0) == 100.00 && GC.Transformation.get(1,0) == 0.00 && GC.Transformation.get(0,1) == 0.00 && - GC.Transformation.get(1,1) == -100.00 + GC.Transformation.get(1,1) == -100.00 ); } @@ -683,7 +683,7 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent) OSL_ENSURE( 0, "empty paragraph optimized" ); return; } - + // concatenate child elements with same font id std::list< Element* >::iterator next = rParent.Children.begin(); std::list< Element* >::iterator it = next++; @@ -705,12 +705,12 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent) TextElement* pNext = dynamic_cast<TextElement*>(*next); bool isComplex = false; rtl::OUString str(pCur->Text.getStr()); - for(int i=0; i< str.getLength(); i++) + for(int i=0; i< str.getLength(); i++) { sal_Int16 nType = GetBreakIterator()->getScriptType( str, i ); if (nType == ::com::sun::star::i18n::ScriptType::COMPLEX) isComplex = true; - } + } bool bPara = strspn("ParagraphElement", typeid(rParent).name()); ParagraphElement* pPara = dynamic_cast<ParagraphElement*>(&rParent); if (bPara && isComplex) @@ -719,9 +719,9 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent) { const GraphicsContext& rCurGC = m_rProcessor.getGraphicsContext( pCur->GCId ); const GraphicsContext& rNextGC = m_rProcessor.getGraphicsContext( pNext->GCId ); - + // line and space optimization; works only in strictly horizontal mode - + // concatenate consecutive text elements unless there is a // font or text color or matrix change, leave a new span in that case if( (pCur->FontId == pNext->FontId || isSpaces(pNext)) && @@ -729,7 +729,7 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent) rCurGC.FillColor.Green == rNextGC.FillColor.Green && rCurGC.FillColor.Blue == rNextGC.FillColor.Blue && rCurGC.FillColor.Alpha == rNextGC.FillColor.Alpha && - (rCurGC.Transformation == rNextGC.Transformation || notTransformed(rNextGC)) + (rCurGC.Transformation == rNextGC.Transformation || notTransformed(rNextGC)) ) { pCur->updateGeometryWith( pNext ); @@ -737,7 +737,7 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent) pCur->Text.append( pNext->Text.getStr(), pNext->Text.getLength() ); str = pCur->Text.getStr(); - for(int i=0; i< str.getLength(); i++) + for(int i=0; i< str.getLength(); i++) { sal_Int16 nType = GetBreakIterator()->getScriptType( str, i ); if (nType == ::com::sun::star::i18n::ScriptType::COMPLEX) @@ -761,7 +761,7 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent) if ( bConcat ) next = it; else - ++it; + ++it; ++next; } } @@ -783,7 +783,7 @@ void DrawXmlFinalizer::visit( PolyPolyElement& elem, const std::list< Element* > aProps[ USTR( "style:parent-style-name") ] = USTR( "standard" ); // generate standard graphic style if necessary m_rStyleContainer.getStandardStyleId( "graphic" ); - + PropertyMap aGCProps; // TODO(F3): proper dash emulation @@ -821,7 +821,7 @@ void DrawXmlFinalizer::visit( PolyPolyElement& elem, const std::list< Element* > StyleContainer::Style aStyle( "style:style", aProps ); StyleContainer::Style aSubStyle( "style:graphic-properties", aGCProps ); aStyle.SubStyles.push_back( &aSubStyle ); - + elem.StyleId = m_rStyleContainer.getStyleId( aStyle ); } @@ -830,22 +830,22 @@ void DrawXmlFinalizer::visit( HyperlinkElement&, const std::list< Element* >::co } void DrawXmlFinalizer::visit( TextElement& elem, const std::list< Element* >::const_iterator& ) -{ +{ const FontAttributes& rFont = m_rProcessor.getFont( elem.FontId ); PropertyMap aProps; aProps[ USTR( "style:family" ) ] = USTR( "text" ); PropertyMap aFontProps; - + // family name aFontProps[ USTR( "fo:font-family" ) ] = rFont.familyName; aFontProps[ USTR( "style:font-family-complex" ) ] = rFont.familyName; - + // bold if( rFont.isBold ) { aFontProps[ USTR( "fo:font-weight" ) ] = USTR( "bold" ); - aFontProps[ USTR( "fo:font-weight-asian" ) ] = USTR( "bold" ); + aFontProps[ USTR( "fo:font-weight-asian" ) ] = USTR( "bold" ); aFontProps[ USTR( "style:font-weight-complex" ) ] = USTR( "bold" ); } // italic @@ -853,7 +853,7 @@ void DrawXmlFinalizer::visit( TextElement& elem, const std::list< Element* >::co { aFontProps[ USTR( "fo:font-style" ) ] = USTR( "italic" ); aFontProps[ USTR( "fo:font-style-asian" ) ] = USTR( "italic" ); - aFontProps[ USTR( "style:font-style-complex" ) ] = USTR( "italic" ); + aFontProps[ USTR( "style:font-style-complex" ) ] = USTR( "italic" ); } // underline if( rFont.isUnderline ) @@ -878,7 +878,7 @@ void DrawXmlFinalizer::visit( TextElement& elem, const std::list< Element* >::co // color const GraphicsContext& rGC = m_rProcessor.getGraphicsContext( elem.GCId ); aFontProps[ USTR( "fo:color" ) ] = getColorString( rFont.isOutline ? rGC.LineColor : rGC.FillColor ); - + StyleContainer::Style aStyle( "style:style", aProps ); StyleContainer::Style aSubStyle( "style:text-properties", aFontProps ); aStyle.SubStyles.push_back( &aSubStyle ); @@ -886,13 +886,13 @@ void DrawXmlFinalizer::visit( TextElement& elem, const std::list< Element* >::co } void DrawXmlFinalizer::visit( ParagraphElement& elem, const std::list< Element* >::const_iterator& ) -{ +{ PropertyMap aProps; aProps[ USTR( "style:family" ) ] = USTR( "paragraph" ); // generate standard paragraph style if necessary m_rStyleContainer.getStandardStyleId( "paragraph" ); - + PropertyMap aParProps; aParProps[ USTR("fo:text-align")] = USTR("start"); @@ -900,11 +900,11 @@ void DrawXmlFinalizer::visit( ParagraphElement& elem, const std::list< Element* aParProps[ USTR("style:writing-mode")] = USTR("rl-tb"); else aParProps[ USTR("style:writing-mode")] = USTR("lr-tb"); - + StyleContainer::Style aStyle( "style:style", aProps ); StyleContainer::Style aSubStyle( "style:paragraph-properties", aParProps ); aStyle.SubStyles.push_back( &aSubStyle ); - + elem.StyleId = m_rStyleContainer.getStyleId( aStyle ); // update page boundaries @@ -916,7 +916,7 @@ void DrawXmlFinalizer::visit( ParagraphElement& elem, const std::list< Element* double p_y = elem.Parent->y; double p_w = elem.Parent->w; double p_h = elem.Parent->h; - + PageElement* pPage = dynamic_cast<PageElement*>(elem.Parent); if( pPage ) { @@ -937,7 +937,7 @@ void DrawXmlFinalizer::visit( FrameElement& elem, const std::list< Element* >::c aProps[ USTR( "style:parent-style-name") ] = USTR( "standard" ); // generate standard graphic style if necessary m_rStyleContainer.getStandardStyleId( "graphic" ); - + PropertyMap aGCProps; aGCProps[ USTR("draw:stroke") ] = USTR("none"); @@ -952,18 +952,18 @@ void DrawXmlFinalizer::visit( FrameElement& elem, const std::list< Element* >::c aGCProps[ USTR("fo:padding-left") ] = USTR("0cm"); aGCProps[ USTR("fo:padding-right") ] = USTR("0cm"); aGCProps[ USTR("fo:padding-bottom") ] = USTR("0cm"); - + // remark: vertical mirroring is done in current OOO by // mirroring horzontally and rotating 180 degrees // this is quaint, but unfortunately it seems // mirror=vertical is defined but not implemented in current code if( elem.MirrorVertical ) aGCProps[ USTR("style:mirror") ] = USTR("horizontal"); - + StyleContainer::Style aStyle( "style:style", aProps ); StyleContainer::Style aSubStyle( "style:graphic-properties", aGCProps ); aStyle.SubStyles.push_back( &aSubStyle ); - + elem.StyleId = m_rStyleContainer.getStyleId( aStyle ); elem.applyToChildren(*this); } @@ -976,10 +976,10 @@ void DrawXmlFinalizer::visit( PageElement& elem, const std::list< Element* >::co { if( m_rProcessor.getStatusIndicator().is() ) m_rProcessor.getStatusIndicator()->setValue( elem.PageNumber ); - + // transform from pixel to mm double page_width = convPx2mm( elem.w ), page_height = convPx2mm( elem.h ); - + // calculate page margins out of the relevant children (paragraphs) elem.TopMargin = elem.h, elem.BottomMargin = 0, elem.LeftMargin = elem.w, elem.RightMargin = 0; @@ -994,20 +994,20 @@ void DrawXmlFinalizer::visit( PageElement& elem, const std::list< Element* >::co if( (*it)->y + (*it)->h > elem.BottomMargin ) elem.BottomMargin = ((*it)->y + (*it)->h); } - + // transform margins to mm double left_margin = convPx2mm( elem.LeftMargin ); double right_margin = convPx2mm( elem.RightMargin ); double top_margin = convPx2mm( elem.TopMargin ); double bottom_margin = convPx2mm( elem.BottomMargin ); - + // round left/top margin to nearest mm left_margin = rtl_math_round( left_margin, 0, rtl_math_RoundingMode_Floor ); top_margin = rtl_math_round( top_margin, 0, rtl_math_RoundingMode_Floor ); // round (fuzzy) right/bottom margin to nearest cm right_margin = rtl_math_round( right_margin, right_margin >= 10 ? -1 : 0, rtl_math_RoundingMode_Floor ); - bottom_margin = rtl_math_round( bottom_margin, bottom_margin >= 10 ? -1 : 0, rtl_math_RoundingMode_Floor ); - + bottom_margin = rtl_math_round( bottom_margin, bottom_margin >= 10 ? -1 : 0, rtl_math_RoundingMode_Floor ); + // set reasonable default in case of way too large margins // e.g. no paragraph case if( left_margin > page_width/2.0 - 10 ) @@ -1018,7 +1018,7 @@ void DrawXmlFinalizer::visit( PageElement& elem, const std::list< Element* >::co top_margin = 10; if( bottom_margin > page_height/2.0 - 10 ) bottom_margin = 10; - + // catch the weird cases if( left_margin < 0 ) left_margin = 0; @@ -1028,16 +1028,16 @@ void DrawXmlFinalizer::visit( PageElement& elem, const std::list< Element* >::co top_margin = 0; if( bottom_margin < 0 ) bottom_margin = 0; - + // widely differing margins are unlikely to be correct if( right_margin > left_margin*1.5 ) right_margin = left_margin; - + elem.LeftMargin = convmm2Px( left_margin ); elem.RightMargin = convmm2Px( right_margin ); elem.TopMargin = convmm2Px( top_margin ); elem.BottomMargin = convmm2Px( bottom_margin ); - + // get styles for paragraphs PropertyMap aPageProps; PropertyMap aPageLayoutProps; @@ -1048,26 +1048,26 @@ void DrawXmlFinalizer::visit( PageElement& elem, const std::list< Element* >::co aPageLayoutProps[ USTR( "fo:margin-right" ) ] = unitMMString( right_margin ); aPageLayoutProps[ USTR( "fo:page-width" ) ] = unitMMString( page_width ); aPageLayoutProps[ USTR( "fo:page-height" ) ] = unitMMString( page_height ); - aPageLayoutProps[ USTR( "style:print-orientation" ) ]= elem.w < elem.h ? USTR( "portrait" ) : USTR( "landscape" ); + aPageLayoutProps[ USTR( "style:print-orientation" ) ]= elem.w < elem.h ? USTR( "portrait" ) : USTR( "landscape" ); aPageLayoutProps[ USTR( "style:writing-mode" ) ]= USTR( "lr-tb" ); - - StyleContainer::Style aStyle( "style:page-layout", aPageProps); - StyleContainer::Style aSubStyle( "style:page-layout-properties", aPageLayoutProps); + + StyleContainer::Style aStyle( "style:page-layout", aPageProps); + StyleContainer::Style aSubStyle( "style:page-layout-properties", aPageLayoutProps); aStyle.SubStyles.push_back(&aSubStyle); sal_Int32 nPageStyle = m_rStyleContainer.impl_getStyleId( aStyle, false ); // create master page rtl::OUString aMasterPageLayoutName = m_rStyleContainer.getStyleName( nPageStyle ); - aPageProps[ USTR( "style:page-layout-name" ) ] = aMasterPageLayoutName; - - StyleContainer::Style aMPStyle( "style:master-page", aPageProps); - + aPageProps[ USTR( "style:page-layout-name" ) ] = aMasterPageLayoutName; + + StyleContainer::Style aMPStyle( "style:master-page", aPageProps); + StyleContainer::Style aHeaderStyle( "style:header", PropertyMap() ); StyleContainer::Style aFooterStyle( "style:footer", PropertyMap() ); elem.StyleId = m_rStyleContainer.impl_getStyleId( aMPStyle,false ); - + rtl::OUString aMasterPageName = m_rStyleContainer.getStyleName( elem.StyleId ); // create styles for children @@ -1075,7 +1075,7 @@ void DrawXmlFinalizer::visit( PageElement& elem, const std::list< Element* >::co } void DrawXmlFinalizer::visit( DocumentElement& elem, const std::list< Element* >::const_iterator& ) -{ +{ elem.applyToChildren(*this); } diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.hxx b/sdext/source/pdfimport/tree/drawtreevisiting.hxx index cc41e76c5065..1671b93e808f 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.hxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,7 +60,7 @@ namespace pdfi virtual void visit( PageElement&, const std::list< Element* >::const_iterator& ); virtual void visit( DocumentElement&, const std::list< Element* >::const_iterator& ); }; - + class DrawXmlFinalizer : public ElementTreeVisitor { private: @@ -83,7 +83,7 @@ namespace pdfi virtual void visit( PageElement&, const std::list< Element* >::const_iterator& ); virtual void visit( DocumentElement&, const std::list< Element* >::const_iterator& ); }; - + class DrawXmlEmitter : public ElementTreeVisitor { private: @@ -95,8 +95,8 @@ namespace pdfi /// writes Impress doc when false const bool m_bWriteDrawDocument; - void fillFrameProps( DrawElement& rElem, - PropertyMap& rProps, + void fillFrameProps( DrawElement& rElem, + PropertyMap& rProps, const EmitContext& rEmitContext ); public: @@ -115,7 +115,7 @@ namespace pdfi virtual void visit( ImageElement&, const std::list< Element* >::const_iterator& ); virtual void visit( PageElement&, const std::list< Element* >::const_iterator& ); virtual void visit( DocumentElement&, const std::list< Element* >::const_iterator& ); - }; + }; } #endif diff --git a/sdext/source/pdfimport/tree/genericelements.cxx b/sdext/source/pdfimport/tree/genericelements.cxx index e6a50a0331db..d8696ddcb850 100644 --- a/sdext/source/pdfimport/tree/genericelements.cxx +++ b/sdext/source/pdfimport/tree/genericelements.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,7 +34,7 @@ #include "pdfiprocessor.hxx" #include "pdfihelper.hxx" #include "style.hxx" - + #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/range/b2drange.hxx> @@ -55,7 +55,7 @@ Element::~Element() Children.pop_front(); } } - + void Element::applyToChildren( ElementTreeVisitor& rVisitor ) { for( std::list< Element* >::iterator it = Children.begin(); it != Children.end(); ++it ) @@ -124,7 +124,7 @@ void HyperlinkElement::visitedBy( ElementTreeVisitor& r { rVisitor.visit(*this,rParentIt); } - + void TextElement::visitedBy( ElementTreeVisitor& rVisitor, const std::list< Element* >::const_iterator& rParentIt ) { @@ -142,8 +142,8 @@ void ImageElement::visitedBy( ElementTreeVisitor& rVisi { rVisitor.visit( *this, rParentIt); } - -PolyPolyElement::PolyPolyElement( Element* pParent, + +PolyPolyElement::PolyPolyElement( Element* pParent, sal_Int32 nGCId, const basegfx::B2DPolyPolygon& rPolyPoly, sal_Int8 nAction ) @@ -214,7 +214,7 @@ bool ParagraphElement::isSingleLined( PDFIProcessor& rProc ) const // a paragraph containing subparagraphs cannot be single lined if( dynamic_cast< ParagraphElement* >(*it) != NULL ) return false; - + pText = dynamic_cast< TextElement* >(*it); if( pText ) { @@ -232,7 +232,7 @@ bool ParagraphElement::isSingleLined( PDFIProcessor& rProc ) const } ++it; } - + // a paragraph without a single text is not considered single lined return pLastText != NULL; } @@ -281,7 +281,7 @@ PageElement::~PageElement() if( FooterElement ) delete FooterElement; } - + void PageElement::visitedBy( ElementTreeVisitor& rVisitor, const std::list< Element* >::const_iterator& rParentIt ) { @@ -323,7 +323,7 @@ bool PageElement::resolveHyperlink( std::list<Element*>::iterator link_it, std:: HyperlinkElement* pLink = dynamic_cast<HyperlinkElement*>(*link_it); if( ! pLink ) // sanity check return false; - + for( std::list<Element*>::iterator it = rElements.begin(); it != rElements.end(); ++it ) { if( (*it)->x >= pLink->x && (*it)->x + (*it)->w <= pLink->x + pLink->w && @@ -391,7 +391,7 @@ void PageElement::resolveUnderlines( PDFIProcessor& rProc ) { // FIXME: currently the algorithm used is quadratic // this could be solved by some sorting beforehand - + std::list< Element* >::iterator poly_it = Children.begin(); while( poly_it != Children.end() ) { @@ -415,7 +415,7 @@ void PageElement::resolveUnderlines( PDFIProcessor& rProc ) ++poly_it; continue; } - + bool bRemovePoly = false; basegfx::B2DPolygon aPoly = pPoly->PolyPoly.getB2DPolygon(0); if( aPoly.count() != 2 || @@ -489,7 +489,7 @@ void DocumentElement::visitedBy( ElementTreeVisitor& rV { rVisitor.visit(*this, rParentIt); } - + } diff --git a/sdext/source/pdfimport/tree/genericelements.hxx b/sdext/source/pdfimport/tree/genericelements.hxx index b2122a6c7cc2..158f251a8ef5 100644 --- a/sdext/source/pdfimport/tree/genericelements.hxx +++ b/sdext/source/pdfimport/tree/genericelements.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,7 +48,7 @@ namespace pdfi class ImageContainer; class PDFIProcessor; class ElementFactory; - + struct EmitContext { @@ -58,7 +58,7 @@ namespace pdfi ImageContainer& _rImages, PDFIProcessor& _rProcessor, const com::sun::star::uno::Reference< - com::sun::star::task::XStatusIndicator>& _xStatusIndicator, + com::sun::star::task::XStatusIndicator>& _xStatusIndicator, com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xContext) : rEmitter(_rEmitter), @@ -75,7 +75,7 @@ namespace pdfi PDFIProcessor& rProcessor; com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator> xStatusIndicator; - com::sun::star::uno::Reference< + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext; }; @@ -105,20 +105,20 @@ namespace pdfi pNewParent must not be NULL */ static void setParent( std::list<Element*>::iterator& el, Element* pNewParent ); - + double x, y, w, h; sal_Int32 StyleId; Element* Parent; std::list<Element*> Children; }; - + struct ListElement : public Element { ListElement() : Element( NULL ) {} // ElementTreeVisitable virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& ); }; - + struct HyperlinkElement : public Element { friend class ElementFactory; @@ -131,10 +131,10 @@ namespace pdfi rtl::OUString URI; }; - + struct GraphicalElement : public Element { - protected: + protected: GraphicalElement( Element* pParent, sal_Int32 nGCId ) : Element( pParent ), GCId( nGCId ), MirrorVertical( false ) {} @@ -142,7 +142,7 @@ namespace pdfi sal_Int32 GCId; bool MirrorVertical; }; - + struct DrawElement : public GraphicalElement { protected: @@ -153,7 +153,7 @@ namespace pdfi bool isCharacter; sal_Int32 ZOrder; }; - + struct FrameElement : public DrawElement { friend class ElementFactory; @@ -165,7 +165,7 @@ namespace pdfi // ElementTreeVisitable virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& ); }; - + struct TextElement : public GraphicalElement { friend class ElementFactory; @@ -176,7 +176,7 @@ namespace pdfi public: // ElementTreeVisitable virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& ); - + rtl::OUStringBuffer Text; sal_Int32 FontId; }; @@ -190,7 +190,7 @@ namespace pdfi public: // ElementTreeVisitable virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& rParentIt ); - + // returns true only if only a single line is contained bool isSingleLined( PDFIProcessor& rProc ) const; // returns the highest line height of the contained textelements @@ -198,13 +198,13 @@ namespace pdfi double getLineHeight( PDFIProcessor& rProc ) const; // returns the first text element child; does not recurse through subparagraphs TextElement* getFirstTextChild() const; - + enum ParagraphType { Normal, Headline }; ParagraphType Type; bool bRtl; }; - struct PolyPolyElement : public DrawElement + struct PolyPolyElement : public DrawElement { friend class ElementFactory; protected: @@ -214,17 +214,17 @@ namespace pdfi public: // ElementTreeVisitable virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& rParentIt ); - + void updateGeometry(); #if OSL_DEBUG_LEVEL > 1 virtual void emitStructure( int nLevel ); #endif - + basegfx::B2DPolyPolygon PolyPoly; sal_Int8 Action; }; - + struct ImageElement : public DrawElement { friend class ElementFactory; @@ -235,7 +235,7 @@ namespace pdfi public: // ElementTreeVisitable virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& ); - + ImageId Image; }; @@ -256,13 +256,13 @@ namespace pdfi // ElementTreeVisitable virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& rParentIt ); - - void emitPageAnchoredElements( EmitContext& rEmitContext ); + + void emitPageAnchoredElements( EmitContext& rEmitContext ); static void updateParagraphGeometry( Element* pEle ); void resolveHyperlinks(); void resolveFontStyles( PDFIProcessor& rProc ); void resolveUnderlines( PDFIProcessor& rProc ); - + sal_Int32 PageNumber; ListElement Hyperlinks; // contains not yet realized links on this page double TopMargin; @@ -280,12 +280,12 @@ namespace pdfi DocumentElement() : Element( NULL ) {} public: virtual ~DocumentElement(); - + // ElementTreeVisitable - virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& ); - + virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& ); + }; - + // this class is the differentiator of document types: it will create // Element objects with an optimize() method suitable for the document type class ElementFactory @@ -293,15 +293,15 @@ namespace pdfi public: ElementFactory() {} virtual ~ElementFactory(); - + virtual HyperlinkElement* createHyperlinkElement( Element* pParent, const rtl::OUString& rURI ) { return new HyperlinkElement( pParent, rURI ); } - + virtual TextElement* createTextElement( Element* pParent, sal_Int32 nGCId, sal_Int32 nFontId ) { return new TextElement( pParent, nGCId, nFontId ); } virtual ParagraphElement* createParagraphElement( Element* pParent ) { return new ParagraphElement( pParent ); } - + virtual FrameElement* createFrameElement( Element* pParent, sal_Int32 nGCId ) { return new FrameElement( pParent, nGCId ); } virtual PolyPolyElement* @@ -312,13 +312,13 @@ namespace pdfi { return new PolyPolyElement( pParent, nGCId, rPolyPoly, nAction ); } virtual ImageElement* createImageElement( Element* pParent, sal_Int32 nGCId, ImageId nImage ) { return new ImageElement( pParent, nGCId, nImage ); } - + virtual PageElement* createPageElement( Element* pParent, sal_Int32 nPageNr ) { return new PageElement( pParent, nPageNr ); } virtual DocumentElement* createDocumentElement() { return new DocumentElement(); } - }; + }; } #endif diff --git a/sdext/source/pdfimport/tree/imagecontainer.cxx b/sdext/source/pdfimport/tree/imagecontainer.cxx index 308e89ae3314..9329ed2f5d4e 100644 --- a/sdext/source/pdfimport/tree/imagecontainer.cxx +++ b/sdext/source/pdfimport/tree/imagecontainer.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sdext/source/pdfimport/tree/imagecontainer.hxx b/sdext/source/pdfimport/tree/imagecontainer.hxx index c22b7ace6034..30b869d388d1 100644 --- a/sdext/source/pdfimport/tree/imagecontainer.hxx +++ b/sdext/source/pdfimport/tree/imagecontainer.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ namespace pdfi { struct EmitContext; - + class ImageContainer { private: @@ -51,11 +51,11 @@ namespace pdfi public: ImageContainer(); - + ImageId addImage( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& xBitmap ); void writeBase64EncodedStream( ImageId nImageId, EmitContext& rContext ); - }; + }; } #endif diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx index 8db28d929184..cd94b97094d0 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -63,9 +63,9 @@ namespace pdfi { PDFIProcessor::PDFIProcessor( const uno::Reference< task::XStatusIndicator >& xStat , - com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xContext) : + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xContext) : - m_xContext(xContext), + m_xContext(xContext), fYPrevTextPosition(-10000.0), fPrevTextHeight(0.0), fXPrevTextPosition(0.0), @@ -457,32 +457,32 @@ void PDFIProcessor::drawGlyphLine( const rtl::OUString& rGlyphs, { processGlyphLine(); } - + CharGlyph aGlyph; - + aGlyph.setGlyph ( rGlyphs ); aGlyph.setRect ( rRect ); aGlyph.setFontMatrix ( rFontMatrix ); aGlyph.setGraphicsContext ( getCurrentContext() ); getGCId(getCurrentContext()); aGlyph.setCurElement( m_pCurElement ); - + aGlyph.setYPrevGlyphPosition( fYPrevTextPosition ); aGlyph.setXPrevGlyphPosition( fXPrevTextPosition ); aGlyph.setPrevGlyphHeight ( fPrevTextHeight ); aGlyph.setPrevGlyphWidth ( fPrevTextWidth ); - + m_GlyphsList.push_back( aGlyph ); - + fYPrevTextPosition = rRect.Y1; fXPrevTextPosition = rRect.X2; fPrevTextHeight = rRect.Y2-rRect.Y1; fPrevTextWidth = rRect.X2-rRect.X1; - + if( !m_bIsWhiteSpaceInLine ) { static rtl::OUString tempWhiteSpaceStr( 0x20 ); - static rtl::OUString tempWhiteSpaceNonBreakingStr( 0xa0 ); + static rtl::OUString tempWhiteSpaceNonBreakingStr( 0xa0 ); m_bIsWhiteSpaceInLine=(rGlyphs.equals( tempWhiteSpaceStr ) || rGlyphs.equals( tempWhiteSpaceNonBreakingStr )); } } @@ -579,7 +579,7 @@ void PDFIProcessor::setupImage(ImageId nImage) // TODDO(F4): correcting rotation when fShearX != 0 ? if( fRotate != 0.0 ) { - + // try to create a Transformation that corrects for the wrong rotation aTrans.identity(); aTrans.scale( aScale.getX(), aScale.getY() ); @@ -587,7 +587,7 @@ void PDFIProcessor::setupImage(ImageId nImage) basegfx::B2DRange aRect( 0, 0, 1, 1 ); aRect.transform( aTrans ); - + // TODO(F3) treat translation correctly // the corrections below work for multiples of 90 degree // which is a common case (landscape/portrait/seascape) @@ -609,7 +609,7 @@ void PDFIProcessor::setupImage(ImageId nImage) aTrans.translate( aTranslation.getX(), aTranslation.getY() ); } - + bool bMirrorVertical = aScale.getY() > 0; // transform unit rect to determine view box @@ -625,7 +625,7 @@ void PDFIProcessor::setupImage(ImageId nImage) pFrame->w = pImageElement->w = aRect.getWidth(); pFrame->h = pImageElement->h = aRect.getHeight(); pFrame->ZOrder = m_nNextZOrder++; - + if( bMirrorVertical ) { pFrame->MirrorVertical = pImageElement->MirrorVertical = true; @@ -802,7 +802,7 @@ void PDFIProcessor::startPage( const geometry::RealSize2D& rSize ) { // initial clip is to page bounds getCurrentContext().Clip = basegfx::B2DPolyPolygon( - basegfx::tools::createPolygonFromRect( + basegfx::tools::createPolygonFromRect( basegfx::B2DRange( 0, 0, rSize.Width, rSize.Height ))); sal_Int32 nNextPageNr = m_pCurPage ? m_pCurPage->PageNumber+1 : 1; @@ -815,10 +815,10 @@ void PDFIProcessor::startPage( const geometry::RealSize2D& rSize ) m_pCurPage = m_pElFactory->createPageElement(m_pDocument.get(), nNextPageNr); m_pCurElement = m_pCurPage; m_pCurPage->w = rSize.Width; - m_pCurPage->h = rSize.Height; + m_pCurPage->h = rSize.Height; m_nNextZOrder = 1; - + } void PDFIProcessor::emit( XmlEmitter& rEmitter, @@ -833,7 +833,7 @@ void PDFIProcessor::emit( XmlEmitter& rEmitter, // FIXME: localization startIndicator( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " ) ) ); m_pDocument->visitedBy( *optimizingVisitor, std::list<Element*>::iterator()); - + #if OSL_DEBUG_LEVEL > 1 m_pDocument->emitStructure( 0 ); #endif @@ -843,13 +843,13 @@ void PDFIProcessor::emit( XmlEmitter& rEmitter, ElementTreeVisitorSharedPtr finalizingVisitor( rVisitorFactory.createStyleCollectingVisitor(aStyles,*this)); // FIXME: localization - + m_pDocument->visitedBy( *finalizingVisitor, std::list<Element*>::iterator() ); - + EmitContext aContext( rEmitter, aStyles, m_aImages, *this, m_xStatusIndicator, m_xContext ); ElementTreeVisitorSharedPtr aEmittingVisitor( rVisitorFactory.createEmittingVisitor(aContext)); - + PropertyMap aProps; // document prolog #define OASIS_STR "urn:oasis:names:tc:opendocument:xmlns:" @@ -878,7 +878,7 @@ void PDFIProcessor::emit( XmlEmitter& rEmitter, // emit style list aStyles.emit( aContext, *aEmittingVisitor ); - + m_pDocument->visitedBy( *aEmittingVisitor, std::list<Element*>::iterator() ); aContext.rEmitter.endTag( "office:document" ); endIndicator(); @@ -957,7 +957,7 @@ static bool lr_tb_sort( Element* pLeft, Element* pRight ) // then left is definitely not smaller if( pRight->x+pRight->w < pLeft->x ) return false; - + // here we have established vertical and horizontal overlap // so sort left first, top second if( pLeft->x < pRight->x ) @@ -966,7 +966,7 @@ static bool lr_tb_sort( Element* pLeft, Element* pRight ) return false; if( pLeft->y < pRight->y ) return true; - + return false; } @@ -974,7 +974,7 @@ void PDFIProcessor::sortElements( Element* pEle, bool bDeep ) { if( pEle->Children.empty() ) return; - + if( bDeep ) { for( std::list< Element* >::iterator it = pEle->Children.begin(); @@ -1009,9 +1009,9 @@ void PDFIProcessor::sortElements( Element* pEle, bool bDeep ) } -::basegfx::B2DRange& PDFIProcessor::calcTransformedRectBounds( ::basegfx::B2DRange& outRect, - const ::basegfx::B2DRange& inRect, - const ::basegfx::B2DHomMatrix& transformation ) +::basegfx::B2DRange& PDFIProcessor::calcTransformedRectBounds( ::basegfx::B2DRange& outRect, + const ::basegfx::B2DRange& inRect, + const ::basegfx::B2DHomMatrix& transformation ) { outRect.reset(); @@ -1020,7 +1020,7 @@ void PDFIProcessor::sortElements( Element* pEle, bool bDeep ) // transform all four extremal points of the rectangle, // take bounding rect of those. - + // transform left-top point outRect.expand( transformation * inRect.getMinimum() ); diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.hxx b/sdext/source/pdfimport/tree/pdfiprocessor.hxx index 16d60cd5a8bf..55a5f66cafcd 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.hxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -73,7 +73,7 @@ namespace pdfi class PDFIProcessor : public ContentSink { public: - com::sun::star::uno::Reference< + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext; double fYPrevTextPosition; double fPrevTextHeight; @@ -205,17 +205,17 @@ namespace pdfi typedef std::hash_map<sal_Int32,FontAttributes> IdToFontMap; typedef std::hash_map<FontAttributes,sal_Int32,FontAttrHash> FontToIdMap; - + typedef std::hash_map<sal_Int32,GraphicsContext> IdToGCMap; typedef std::hash_map<GraphicsContext,sal_Int32,GraphicsContextHash> GCToIdMap; typedef std::vector<GraphicsContext> GraphicsContextStack; - ::basegfx::B2DRange& calcTransformedRectBounds( ::basegfx::B2DRange& outRect, - const ::basegfx::B2DRange& inRect, - const ::basegfx::B2DHomMatrix& transformation ); + ::basegfx::B2DRange& calcTransformedRectBounds( ::basegfx::B2DRange& outRect, + const ::basegfx::B2DRange& inRect, + const ::basegfx::B2DHomMatrix& transformation ); std::vector<CharGlyph> m_GlyphsList; - + boost::shared_ptr<ElementFactory> m_pElFactory; boost::shared_ptr<DocumentElement> m_pDocument; PageElement* m_pCurPage; @@ -223,22 +223,22 @@ namespace pdfi sal_Int32 m_nNextFontId; IdToFontMap m_aIdToFont; FontToIdMap m_aFontToId; - + GraphicsContextStack m_aGCStack; GraphicsContext m_prev_aGC; sal_Int32 m_nNextGCId; IdToGCMap m_aIdToGC; GCToIdMap m_aGCToId; - + ImageContainer m_aImages; - + DocumentTextDirecion m_eTextDirection; - sal_Int32 m_nPages; + sal_Int32 m_nPages; sal_Int32 m_nNextZOrder; double m_fWordSpace; bool m_bIsWhiteSpaceInLine; - com::sun::star::uno::Reference< + com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > m_xStatusIndicator; @@ -249,33 +249,33 @@ namespace pdfi public: CharGlyph(){}; virtual ~CharGlyph(){}; - rtl::OUString& getGlyph(){ return m_rGlyphs; } - com::sun::star::geometry::RealRectangle2D& getRect(){ return m_rRect; } - com::sun::star::geometry::Matrix2D& getFontMatrix(){ return m_rFontMatrix; } - GraphicsContext& getGC(){ return m_rCurrentContext; } - Element* getCurElement(){ return m_pCurElement; } - - void setGlyph (const rtl::OUString& rGlyphs ){ m_rGlyphs=rGlyphs; } - void setRect (const ::com::sun::star::geometry::RealRectangle2D& rRect ){ m_rRect=rRect; } - void setFontMatrix (const ::com::sun::star::geometry::Matrix2D& rFontMatrix ){ m_rFontMatrix= rFontMatrix; } - void setGraphicsContext (GraphicsContext& rCurrentContext ){ m_rCurrentContext= rCurrentContext; } - void setCurElement( Element* pCurElement ){ m_pCurElement= pCurElement; } - - double getYPrevGlyphPosition(){ return m_fYPrevGlyphPosition; } - double getXPrevGlyphPosition(){ return m_fXPrevGlyphPosition; } - double getPrevGlyphHeight(){ return m_fPrevGlyphHeight; } - double getPrevGlyphWidth (){ return m_fPrevGlyphWidth; } + rtl::OUString& getGlyph(){ return m_rGlyphs; } + com::sun::star::geometry::RealRectangle2D& getRect(){ return m_rRect; } + com::sun::star::geometry::Matrix2D& getFontMatrix(){ return m_rFontMatrix; } + GraphicsContext& getGC(){ return m_rCurrentContext; } + Element* getCurElement(){ return m_pCurElement; } + + void setGlyph (const rtl::OUString& rGlyphs ){ m_rGlyphs=rGlyphs; } + void setRect (const ::com::sun::star::geometry::RealRectangle2D& rRect ){ m_rRect=rRect; } + void setFontMatrix (const ::com::sun::star::geometry::Matrix2D& rFontMatrix ){ m_rFontMatrix= rFontMatrix; } + void setGraphicsContext (GraphicsContext& rCurrentContext ){ m_rCurrentContext= rCurrentContext; } + void setCurElement( Element* pCurElement ){ m_pCurElement= pCurElement; } + + double getYPrevGlyphPosition(){ return m_fYPrevGlyphPosition; } + double getXPrevGlyphPosition(){ return m_fXPrevGlyphPosition; } + double getPrevGlyphHeight(){ return m_fPrevGlyphHeight; } + double getPrevGlyphWidth (){ return m_fPrevGlyphWidth; } double getPrevGlyphsSpace() { if( (m_rRect.X1-m_fXPrevGlyphPosition)<0 ) return 0; else return m_rRect.X1-m_fXPrevGlyphPosition; } - void setYPrevGlyphPosition( double fYPrevTextPosition ){ m_fYPrevGlyphPosition= fYPrevTextPosition; } - void setXPrevGlyphPosition( double fXPrevTextPosition ){ m_fXPrevGlyphPosition= fXPrevTextPosition; } - void setPrevGlyphHeight ( double fPrevTextHeight ){ m_fPrevGlyphHeight= fPrevTextHeight; } - void setPrevGlyphWidth ( double fPrevTextWidth ){ m_fPrevGlyphWidth= fPrevTextWidth; } - + void setYPrevGlyphPosition( double fYPrevTextPosition ){ m_fYPrevGlyphPosition= fYPrevTextPosition; } + void setXPrevGlyphPosition( double fXPrevTextPosition ){ m_fXPrevGlyphPosition= fXPrevTextPosition; } + void setPrevGlyphHeight ( double fPrevTextHeight ){ m_fPrevGlyphHeight= fPrevTextHeight; } + void setPrevGlyphWidth ( double fPrevTextWidth ){ m_fPrevGlyphWidth= fPrevTextWidth; } + private: double m_fYPrevGlyphPosition ; diff --git a/sdext/source/pdfimport/tree/style.cxx b/sdext/source/pdfimport/tree/style.cxx index 01585029049a..1a2f43ca0fc5 100644 --- a/sdext/source/pdfimport/tree/style.cxx +++ b/sdext/source/pdfimport/tree/style.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,7 +50,7 @@ StyleContainer::StyleContainer() : sal_Int32 StyleContainer::impl_getStyleId( const Style& rStyle, bool bSubStyle ) { sal_Int32 nRet = -1; - + // construct HashedStyle to find or insert HashedStyle aSearchStyle; aSearchStyle.Name = rStyle.Name; @@ -59,10 +59,10 @@ sal_Int32 StyleContainer::impl_getStyleId( const Style& rStyle, bool bSubStyle ) aSearchStyle.ContainedElement = rStyle.ContainedElement; for( unsigned int n = 0; n < rStyle.SubStyles.size(); ++n ) aSearchStyle.SubStyles.push_back( impl_getStyleId( *rStyle.SubStyles[n], true ) ); - + std::hash_map< HashedStyle, sal_Int32, StyleHash >::iterator it = m_aStyleToId.find( aSearchStyle ); - + if( it != m_aStyleToId.end() ) { nRet = it->second; @@ -132,7 +132,7 @@ sal_Int32 StyleContainer::setProperties( sal_Int32 nStyleId, const PropertyMap& aSearchStyle.ContainedElement = it->second.ContainedElement; aSearchStyle.SubStyles = it->second.SubStyles; aSearchStyle.IsSubStyle = it->second.IsSubStyle; - + // find out whether this new style already exists std::hash_map< HashedStyle, sal_Int32, StyleHash >::iterator new_it = m_aStyleToId.find( aSearchStyle ); @@ -159,13 +159,13 @@ sal_Int32 StyleContainer::setProperties( sal_Int32 nStyleId, const PropertyMap& OUString StyleContainer::getStyleName( sal_Int32 nStyle ) const { OUStringBuffer aRet( 64 ); - + std::hash_map< sal_Int32, HashedStyle >::const_iterator style_it = m_aIdToStyle.find( nStyle ); if( style_it != m_aIdToStyle.end() ) { const HashedStyle& rStyle = style_it->second; - + PropertyMap::const_iterator name_it = rStyle.Properties.find( USTR("style:name") ); if( name_it != rStyle.Properties.end() ) aRet.append( name_it->second ); @@ -193,8 +193,8 @@ OUString StyleContainer::getStyleName( sal_Int32 nStyle ) const return aRet.makeStringAndClear(); } -void StyleContainer::impl_emitStyle( sal_Int32 nStyleId, - EmitContext& rContext, +void StyleContainer::impl_emitStyle( sal_Int32 nStyleId, + EmitContext& rContext, ElementTreeVisitor& rContainedElemVisitor ) { std::hash_map< sal_Int32, HashedStyle >::const_iterator it = m_aIdToStyle.find( nStyleId ); @@ -211,7 +211,7 @@ void StyleContainer::impl_emitStyle( sal_Int32 nStyleId, if( rStyle.Contents ) rContext.rEmitter.write( rStyle.Contents ); if( rStyle.ContainedElement ) - rStyle.ContainedElement->visitedBy( rContainedElemVisitor, + rStyle.ContainedElement->visitedBy( rContainedElemVisitor, std::list<Element*>::iterator() ); rContext.rEmitter.endTag( rStyle.Name.getStr() ); } @@ -234,14 +234,14 @@ void StyleContainer::emit( EmitContext& rContext, aAutomaticStyleSection.push_back( it->first ); } } - + if( ! aMasterPageSection.empty() ) std::stable_sort( aMasterPageSection.begin(), aMasterPageSection.end(), StyleIdNameSort(&m_aIdToStyle) ); if( ! aAutomaticStyleSection.empty() ) std::stable_sort( aAutomaticStyleSection.begin(), aAutomaticStyleSection.end(), StyleIdNameSort(&m_aIdToStyle) ); if( ! aOfficeStyleSection.empty() ) std::stable_sort( aOfficeStyleSection.begin(), aOfficeStyleSection.end(), StyleIdNameSort(&m_aIdToStyle) ); - + int n = 0, nElements = 0; rContext.rEmitter.beginTag( "office:styles", PropertyMap() ); for( n = 0, nElements = aOfficeStyleSection.size(); n < nElements; n++ ) diff --git a/sdext/source/pdfimport/tree/style.hxx b/sdext/source/pdfimport/tree/style.hxx index 8b79bfaa89ce..94571cafc0b1 100644 --- a/sdext/source/pdfimport/tree/style.hxx +++ b/sdext/source/pdfimport/tree/style.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -41,7 +41,7 @@ namespace pdfi struct Element; struct EmitContext; struct ElementTreeVisitable; - + class StyleContainer { public: @@ -52,7 +52,7 @@ namespace pdfi rtl::OUString Contents; Element* ContainedElement; std::vector< Style* > SubStyles; - + Style() : ContainedElement( NULL ) {} Style( const rtl::OString& rName, const PropertyMap& rProps ) : Name( rName ), @@ -60,7 +60,7 @@ namespace pdfi ContainedElement( NULL ) {} }; - + private: struct HashedStyle { @@ -69,12 +69,12 @@ namespace pdfi rtl::OUString Contents; Element* ContainedElement; std::vector<sal_Int32> SubStyles; - + bool IsSubStyle; sal_Int32 RefCount; - + HashedStyle() : ContainedElement( NULL ), IsSubStyle( true ), RefCount( 0 ) {} - + HashedStyle( const HashedStyle& rRight ) : Name( rRight.Name ), Properties( rRight.Properties ), @@ -100,7 +100,7 @@ namespace pdfi nRet ^= size_t(SubStyles[n]); return nRet; } - + bool operator==(const HashedStyle& rRight) const { if( Name != rRight.Name || @@ -128,13 +128,13 @@ namespace pdfi return rStyle.hashCode(); } }; - + struct StyleIdNameSort; friend struct StyleIdNameSort; struct StyleIdNameSort { const std::hash_map< sal_Int32, HashedStyle >* m_pMap; - + StyleIdNameSort( const std::hash_map< sal_Int32, HashedStyle >* pMap ) : m_pMap(pMap) {} @@ -152,15 +152,15 @@ namespace pdfi return left_it->second.Name < right_it->second.Name; } }; - + sal_Int32 m_nNextId; std::hash_map< sal_Int32, HashedStyle > m_aIdToStyle; std::hash_map< HashedStyle, sal_Int32, StyleHash > m_aStyleToId; - - void impl_emitStyle( sal_Int32 nStyleId, + + void impl_emitStyle( sal_Int32 nStyleId, EmitContext& rContext, ElementTreeVisitor& rContainedElemVisitor ); - + public: StyleContainer(); @@ -171,7 +171,7 @@ namespace pdfi sal_Int32 getStyleId( const Style& rStyle ) { return impl_getStyleId( rStyle, false ); } sal_Int32 getStandardStyleId( const rtl::OString& rFamily ); - + // returns NULL for an invalid style id const PropertyMap* getProperties( sal_Int32 nStyleId ) const; sal_Int32 setProperties( sal_Int32 nStyleId, const PropertyMap &rNewProps ); diff --git a/sdext/source/pdfimport/tree/treevisiting.hxx b/sdext/source/pdfimport/tree/treevisiting.hxx index b62340a7b9f8..8bd4926a126e 100644 --- a/sdext/source/pdfimport/tree/treevisiting.hxx +++ b/sdext/source/pdfimport/tree/treevisiting.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,7 +47,7 @@ namespace pdfi struct DocumentElement; struct EmitContext; struct Element; - + /** To be visited by all tree element types Visitor interface from the "visitor pattern". Implementor gets diff --git a/sdext/source/pdfimport/tree/treevisitorfactory.cxx b/sdext/source/pdfimport/tree/treevisitorfactory.cxx index 58cc091c707d..02f7896a7ac2 100644 --- a/sdext/source/pdfimport/tree/treevisitorfactory.cxx +++ b/sdext/source/pdfimport/tree/treevisitorfactory.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,7 +45,7 @@ namespace pdfi } virtual boost::shared_ptr<ElementTreeVisitor> createStyleCollectingVisitor( - StyleContainer& rStyles, + StyleContainer& rStyles, PDFIProcessor& rProc ) const { return boost::shared_ptr<ElementTreeVisitor>(new WriterXmlFinalizer(rStyles,rProc)); @@ -67,7 +67,7 @@ namespace pdfi } virtual boost::shared_ptr<ElementTreeVisitor> createStyleCollectingVisitor( - StyleContainer& rStyles, + StyleContainer& rStyles, PDFIProcessor& rProc ) const { return boost::shared_ptr<ElementTreeVisitor>(new DrawXmlFinalizer(rStyles,rProc)); @@ -90,7 +90,7 @@ namespace pdfi } virtual boost::shared_ptr<ElementTreeVisitor> createStyleCollectingVisitor( - StyleContainer& rStyles, + StyleContainer& rStyles, PDFIProcessor& rProc ) const { return boost::shared_ptr<ElementTreeVisitor>(new DrawXmlFinalizer(rStyles,rProc)); @@ -103,16 +103,16 @@ namespace pdfi } }; - TreeVisitorFactorySharedPtr createWriterTreeVisitorFactory() - { + TreeVisitorFactorySharedPtr createWriterTreeVisitorFactory() + { return TreeVisitorFactorySharedPtr(new WriterTreeVisitorFactory()); } TreeVisitorFactorySharedPtr createImpressTreeVisitorFactory() - { + { return TreeVisitorFactorySharedPtr(new ImpressTreeVisitorFactory()); } TreeVisitorFactorySharedPtr createDrawTreeVisitorFactory() - { + { return TreeVisitorFactorySharedPtr(new DrawTreeVisitorFactory()); } } diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx b/sdext/source/pdfimport/tree/writertreevisiting.cxx index 12f9d02a8607..6db1f0e171f0 100644 --- a/sdext/source/pdfimport/tree/writertreevisiting.cxx +++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,19 +44,19 @@ namespace pdfi { -void WriterXmlEmitter::visit( HyperlinkElement& elem, const std::list< Element* >::const_iterator& ) -{ +void WriterXmlEmitter::visit( HyperlinkElement& elem, const std::list< Element* >::const_iterator& ) +{ if( elem.Children.empty() ) return; - + const char* pType = dynamic_cast<DrawElement*>(elem.Children.front()) ? "draw:a" : "text:a"; - + PropertyMap aProps; aProps[ USTR( "xlink:type" ) ] = USTR( "simple" ); aProps[ USTR( "xlink:href" ) ] = elem.URI; aProps[ USTR( "office:target-frame-name" ) ] = USTR( "_blank" ); aProps[ USTR( "xlink:show" ) ] = USTR( "new" ); - + m_rEmitContext.rEmitter.beginTag( pType, aProps ); std::list< Element* >::iterator this_it = elem.Children.begin(); while( this_it !=elem.Children.end() && *this_it != &elem ) @@ -67,18 +67,18 @@ void WriterXmlEmitter::visit( HyperlinkElement& elem, const std::list< Element* m_rEmitContext.rEmitter.endTag( pType ); } -void WriterXmlEmitter::visit( TextElement& elem, const std::list< Element* >::const_iterator& ) +void WriterXmlEmitter::visit( TextElement& elem, const std::list< Element* >::const_iterator& ) { if( ! elem.Text.getLength() ) return; - + PropertyMap aProps; if( elem.StyleId != -1 ) { - aProps[ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "text:style-name" ) ) ] = + aProps[ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "text:style-name" ) ) ] = m_rEmitContext.rStyles.getStyleName( elem.StyleId ); } - + m_rEmitContext.rEmitter.beginTag( "text:span", aProps ); m_rEmitContext.rEmitter.write( elem.Text.makeStringAndClear() ); std::list< Element* >::iterator this_it = elem.Children.begin(); @@ -87,7 +87,7 @@ void WriterXmlEmitter::visit( TextElement& elem, const std::list< Element* >::co (*this_it)->visitedBy( *this, this_it ); this_it++; } - + m_rEmitContext.rEmitter.endTag( "text:span" ); } @@ -102,23 +102,23 @@ void WriterXmlEmitter::visit( ParagraphElement& elem, const std::list< Element* if( elem.Type == elem.Headline ) pTagType = "text:h"; m_rEmitContext.rEmitter.beginTag( pTagType, aProps ); - + std::list< Element* >::iterator this_it = elem.Children.begin(); while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); this_it++; } - + m_rEmitContext.rEmitter.endTag( pTagType ); } -void WriterXmlEmitter::fillFrameProps( DrawElement& rElem, - PropertyMap& rProps, +void WriterXmlEmitter::fillFrameProps( DrawElement& rElem, + PropertyMap& rProps, const EmitContext& rEmitContext ) { double rel_x = rElem.x, rel_y = rElem.y; - + // find anchor type by recursing though parents Element* pAnchor = rElem.Parent; while( pAnchor && @@ -148,7 +148,7 @@ void WriterXmlEmitter::fillFrameProps( DrawElement& rElem, rProps[ USTR( "draw:style-name" )] = rEmitContext.rStyles.getStyleName( rElem.StyleId ); rProps[ USTR( "svg:width" ) ] = convertPixelToUnitString( rElem.w ); rProps[ USTR( "svg:height" ) ] = convertPixelToUnitString( rElem.h ); - + const GraphicsContext& rGC = rEmitContext.rProcessor.getGraphicsContext( rElem.GCId ); if( rGC.Transformation.isIdentity() ) @@ -163,12 +163,12 @@ void WriterXmlEmitter::fillFrameProps( DrawElement& rElem, { basegfx::B2DTuple aScale, aTranslation; double fRotate, fShearX; - + rGC.Transformation.decompose( aScale, aTranslation, fRotate, fShearX ); - + rtl::OUStringBuffer aBuf( 256 ); - // TODO(F2): general transformation case missing; if implemented, note + // TODO(F2): general transformation case missing; if implemented, note // that ODF rotation is oriented the other way // build transformation string @@ -197,36 +197,36 @@ void WriterXmlEmitter::fillFrameProps( DrawElement& rElem, aBuf.append( convertPixelToUnitString( rel_y ) ); aBuf.appendAscii( " )" ); } - + rProps[ USTR( "draw:transform" ) ] = aBuf.makeStringAndClear(); } } -void WriterXmlEmitter::visit( FrameElement& elem, const std::list< Element* >::const_iterator& ) -{ +void WriterXmlEmitter::visit( FrameElement& elem, const std::list< Element* >::const_iterator& ) +{ if( elem.Children.empty() ) return; - + bool bTextBox = (dynamic_cast<ParagraphElement*>(elem.Children.front()) != NULL); PropertyMap aFrameProps; fillFrameProps( elem, aFrameProps, m_rEmitContext ); m_rEmitContext.rEmitter.beginTag( "draw:frame", aFrameProps ); if( bTextBox ) m_rEmitContext.rEmitter.beginTag( "draw:text-box", PropertyMap() ); - + std::list< Element* >::iterator this_it = elem.Children.begin(); while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); this_it++; } - + if( bTextBox ) m_rEmitContext.rEmitter.endTag( "draw:text-box" ); m_rEmitContext.rEmitter.endTag( "draw:frame" ); } -void WriterXmlEmitter::visit( PolyPolyElement& elem, const std::list< Element* >::const_iterator& ) +void WriterXmlEmitter::visit( PolyPolyElement& elem, const std::list< Element* >::const_iterator& ) { elem.updateGeometry(); /* note: @@ -240,44 +240,44 @@ void WriterXmlEmitter::visit( PolyPolyElement& elem, const std::list< Element* > { basegfx::B2DPolygon b2dPolygon; b2dPolygon = elem.PolyPoly.getB2DPolygon( i ); - + for ( sal_uInt32 j = 0; j< b2dPolygon.count(); j++ ) { basegfx::B2DPoint point; basegfx::B2DPoint nextPoint; point = b2dPolygon.getB2DPoint( j ); - + basegfx::B2DPoint prevPoint; prevPoint = b2dPolygon.getPrevControlPoint( j ) ; - - point.setX( convPx2mmPrec2( point.getX() )*100.0 ); + + point.setX( convPx2mmPrec2( point.getX() )*100.0 ); point.setY( convPx2mmPrec2( point.getY() )*100.0 ); - + if ( b2dPolygon.isPrevControlPointUsed( j ) ) { - prevPoint.setX( convPx2mmPrec2( prevPoint.getX() )*100.0 ); + prevPoint.setX( convPx2mmPrec2( prevPoint.getX() )*100.0 ); prevPoint.setY( convPx2mmPrec2( prevPoint.getY() )*100.0 ); } - + if ( b2dPolygon.isNextControlPointUsed( j ) ) { nextPoint = b2dPolygon.getNextControlPoint( j ) ; - nextPoint.setX( convPx2mmPrec2( nextPoint.getX() )*100.0 ); + nextPoint.setX( convPx2mmPrec2( nextPoint.getX() )*100.0 ); nextPoint.setY( convPx2mmPrec2( nextPoint.getY() )*100.0 ); - } - + } + b2dPolygon.setB2DPoint( j, point ); - + if ( b2dPolygon.isPrevControlPointUsed( j ) ) b2dPolygon.setPrevControlPoint( j , prevPoint ) ; - + if ( b2dPolygon.isNextControlPointUsed( j ) ) b2dPolygon.setNextControlPoint( j , nextPoint ) ; } - + elem.PolyPoly.setB2DPolygon( i, b2dPolygon ); } - + PropertyMap aProps; fillFrameProps( elem, aProps, m_rEmitContext ); rtl::OUStringBuffer aBuf( 64 ); @@ -287,14 +287,14 @@ void WriterXmlEmitter::visit( PolyPolyElement& elem, const std::list< Element* > aBuf.append( convPx2mmPrec2(elem.h)*100.0 ); aProps[ USTR( "svg:viewBox" ) ] = aBuf.makeStringAndClear(); aProps[ USTR( "svg:d" ) ] = basegfx::tools::exportToSvgD( elem.PolyPoly ); - + m_rEmitContext.rEmitter.beginTag( "draw:path", aProps ); m_rEmitContext.rEmitter.endTag( "draw:path" ); } -void WriterXmlEmitter::visit( ImageElement& elem, const std::list< Element* >::const_iterator& ) +void WriterXmlEmitter::visit( ImageElement& elem, const std::list< Element* >::const_iterator& ) { - PropertyMap aImageProps; + PropertyMap aImageProps; m_rEmitContext.rEmitter.beginTag( "draw:image", aImageProps ); m_rEmitContext.rEmitter.beginTag( "office:binary-data", PropertyMap() ); m_rEmitContext.rImages.writeBase64EncodedStream( elem.Image, m_rEmitContext); @@ -314,12 +314,12 @@ void WriterXmlEmitter::visit( PageElement& elem, const std::list< Element* >::co this_it++; } } - + void WriterXmlEmitter::visit( DocumentElement& elem, const std::list< Element* >::const_iterator&) { m_rEmitContext.rEmitter.beginTag( "office:body", PropertyMap() ); m_rEmitContext.rEmitter.beginTag( "office:text", PropertyMap() ); - + for( std::list< Element* >::iterator it = elem.Children.begin(); it != elem.Children.end(); ++it ) { PageElement* pPage = dynamic_cast<PageElement*>(*it); @@ -343,7 +343,7 @@ void WriterXmlEmitter::visit( DocumentElement& elem, const std::list< Element* > if( dynamic_cast<DrawElement*>(*it) == NULL ) (*it)->visitedBy( *this, it ); } - + m_rEmitContext.rEmitter.endTag( "office:text" ); m_rEmitContext.rEmitter.endTag( "office:body" ); } @@ -374,12 +374,12 @@ void WriterXmlOptimizer::visit( PolyPolyElement& elem, const std::list< Element* * the other is a fill */ if( elem.Parent ) - { - // find following PolyPolyElement in parent's children list + { + // find following PolyPolyElement in parent's children list std::list< Element* >::iterator this_it = elem.Parent->Children.begin(); while( this_it != elem.Parent->Children.end() && *this_it != &elem ) ++this_it; - + if( this_it != elem.Parent->Children.end() ) { std::list< Element* >::iterator next_it = this_it; @@ -426,7 +426,7 @@ void WriterXmlOptimizer::visit( ParagraphElement& elem, const std::list< Element optimizeTextElements( elem ); elem.applyToChildren(*this); - + if( elem.Parent && rParentIt != elem.Parent->Children.end() ) { // find if there is a previous paragraph that might be a heading for this one @@ -483,15 +483,15 @@ void WriterXmlOptimizer::visit( PageElement& elem, const std::list< Element* >:: if( m_rProcessor.getStatusIndicator().is() ) m_rProcessor.getStatusIndicator()->setValue( elem.PageNumber ); - // resolve hyperlinks + // resolve hyperlinks elem.resolveHyperlinks(); - + elem.resolveFontStyles( m_rProcessor ); // underlines and such - + // FIXME: until hyperlinks and font effects are adjusted for - // geometrical search handle them before sorting + // geometrical search handle them before sorting m_rProcessor.sortElements( &elem ); - + // find paragraphs in text ParagraphElement* pCurPara = NULL; std::list< Element* >::iterator page_element, next_page_element; @@ -520,7 +520,7 @@ void WriterXmlOptimizer::visit( PageElement& elem, const std::list< Element* >:: fCurLineHeight = (fCurLineHeight*double(nCurLineElements) + pTestText->h)/double(nCurLineElements+1); nCurLineElements++; } - } + } continue; } @@ -531,7 +531,7 @@ void WriterXmlOptimizer::visit( PageElement& elem, const std::list< Element* >:: if( pDraw ) { // insert small drawing objects as character, else leave them page bound - + bool bInsertToParagraph = false; // first check if this is either inside the paragraph if( pCurPara && pDraw->y < pCurPara->y + pCurPara->h ) @@ -574,14 +574,14 @@ void WriterXmlOptimizer::visit( PageElement& elem, const std::list< Element* >:: pDraw->isCharacter = true; } } - + if( ! bInsertToParagraph ) { pCurPara = NULL; continue; } } - + TextElement* pText = dynamic_cast<TextElement*>(*page_element); if( ! pText && pLink && ! pLink->Children.empty() ) pText = dynamic_cast<TextElement*>(pLink->Children.front()); @@ -662,12 +662,12 @@ void WriterXmlOptimizer::checkHeaderAndFooter( PageElement& rElem ) /* indicators for a header: * - single line paragrah at top of page ( inside 15% page height) * - at least linheight above the next paragr aph - * - * indicators for a footer likewise: - * - single line paragraph at bottom of page (inside 15% page height) - * - at least lineheight below the previous paragraph + * + * indicators for a footer likewise: + * - single line paragraph at bottom of page (inside 15% page height) + * - at least lineheight below the previous paragraph */ - + // detect header // Note: the following assumes that the pages' chiuldren have been // sorted geometrically @@ -696,7 +696,7 @@ void WriterXmlOptimizer::checkHeaderAndFooter( PageElement& rElem ) } ++it; } - + // detect footer std::list< Element* >::reverse_iterator rit = rElem.Children.rbegin(); while( rit != rElem.Children.rend() ) @@ -732,7 +732,7 @@ void WriterXmlOptimizer::optimizeTextElements(Element& rParent) OSL_ENSURE( 0, "empty paragraph optimized" ); return; } - + // concatenate child elements with same font id std::list< Element* >::iterator next = rParent.Children.begin(); std::list< Element* >::iterator it = next++; @@ -755,9 +755,9 @@ void WriterXmlOptimizer::optimizeTextElements(Element& rParent) { const GraphicsContext& rCurGC = m_rProcessor.getGraphicsContext( pCur->GCId ); const GraphicsContext& rNextGC = m_rProcessor.getGraphicsContext( pNext->GCId ); - + // line and space optimization; works only in strictly horizontal mode - + if( !bRotatedFrame && ! rCurGC.isRotatedOrSkewed() && ! rNextGC.isRotatedOrSkewed() @@ -850,7 +850,7 @@ void WriterXmlFinalizer::visit( PolyPolyElement& elem, const std::list< Element* const GraphicsContext& rGC = m_rProcessor.getGraphicsContext(elem.GCId ); PropertyMap aProps; aProps[ USTR( "style:family" ) ] = USTR( "graphic" ); - + PropertyMap aGCProps; // TODO(F3): proper dash emulation @@ -888,7 +888,7 @@ void WriterXmlFinalizer::visit( PolyPolyElement& elem, const std::list< Element* StyleContainer::Style aStyle( "style:style", aProps ); StyleContainer::Style aSubStyle( "style:graphic-properties", aGCProps ); aStyle.SubStyles.push_back( &aSubStyle ); - + elem.StyleId = m_rStyleContainer.getStyleId( aStyle ); } @@ -897,13 +897,13 @@ void WriterXmlFinalizer::visit( HyperlinkElement&, const std::list< Element* >:: } void WriterXmlFinalizer::visit( TextElement& elem, const std::list< Element* >::const_iterator& ) -{ +{ const FontAttributes& rFont = m_rProcessor.getFont( elem.FontId ); PropertyMap aProps; aProps[ USTR( "style:family" ) ] = USTR( "text" ); PropertyMap aFontProps; - + // family name aFontProps[ USTR( "fo:font-family" ) ] = rFont.familyName; // bold @@ -943,7 +943,7 @@ void WriterXmlFinalizer::visit( TextElement& elem, const std::list< Element* >:: // color const GraphicsContext& rGC = m_rProcessor.getGraphicsContext( elem.GCId ); aFontProps[ USTR( "fo:color" ) ] = getColorString( rFont.isOutline ? rGC.LineColor : rGC.FillColor ); - + StyleContainer::Style aStyle( "style:style", aProps ); StyleContainer::Style aSubStyle( "style:text-properties", aFontProps ); aStyle.SubStyles.push_back( &aSubStyle ); @@ -951,9 +951,9 @@ void WriterXmlFinalizer::visit( TextElement& elem, const std::list< Element* >:: } void WriterXmlFinalizer::visit( ParagraphElement& elem, const std::list< Element* >::const_iterator& rParentIt ) -{ +{ PropertyMap aParaProps; - + if( elem.Parent ) { // check for center alignement @@ -962,7 +962,7 @@ void WriterXmlFinalizer::visit( ParagraphElement& elem, const std::list< Element double p_y = elem.Parent->y; double p_w = elem.Parent->w; double p_h = elem.Parent->h; - + PageElement* pPage = dynamic_cast<PageElement*>(elem.Parent); if( pPage ) { @@ -994,7 +994,7 @@ void WriterXmlFinalizer::visit( ParagraphElement& elem, const std::list< Element aBuf.appendAscii( "mm" ); aParaProps[ USTR( "fo:margin-left" ) ] = aBuf.makeStringAndClear(); } - + // check whether to leave some space to next paragraph // find wether there is a next paragraph std::list< Element* >::const_iterator it = rParentIt; @@ -1012,7 +1012,7 @@ void WriterXmlFinalizer::visit( ParagraphElement& elem, const std::list< Element } } } - + if( ! aParaProps.empty() ) { PropertyMap aProps; @@ -1030,16 +1030,16 @@ void WriterXmlFinalizer::visit( FrameElement& elem, const std::list< Element* >: { PropertyMap aProps; aProps[ USTR( "style:family" ) ] = USTR( "graphic" ); - + PropertyMap aGCProps; aGCProps[ USTR("draw:stroke") ] = USTR("none"); aGCProps[ USTR("draw:fill") ] = USTR("none"); - + StyleContainer::Style aStyle( "style:style", aProps ); StyleContainer::Style aSubStyle( "style:graphic-properties", aGCProps ); aStyle.SubStyles.push_back( &aSubStyle ); - + elem.StyleId = m_rStyleContainer.getStyleId( aStyle ); elem.applyToChildren(*this); } @@ -1049,7 +1049,7 @@ void WriterXmlFinalizer::visit( ImageElement&, const std::list< Element* >::cons } void WriterXmlFinalizer::setFirstOnPage( ParagraphElement& rElem, - StyleContainer& rStyles, + StyleContainer& rStyles, const rtl::OUString& rMasterPageName ) { PropertyMap aProps; @@ -1062,7 +1062,7 @@ void WriterXmlFinalizer::setFirstOnPage( ParagraphElement& rElem, aProps[ USTR( "style:family" ) ] = USTR( "paragraph" ); aProps[ USTR( "style:master-page-name" ) ] = rMasterPageName; - + if( rElem.StyleId != -1 ) rElem.StyleId = rStyles.setProperties( rElem.StyleId, aProps ); else @@ -1076,10 +1076,10 @@ void WriterXmlFinalizer::visit( PageElement& elem, const std::list< Element* >:: { if( m_rProcessor.getStatusIndicator().is() ) m_rProcessor.getStatusIndicator()->setValue( elem.PageNumber ); - + // transform from pixel to mm double page_width = convPx2mm( elem.w ), page_height = convPx2mm( elem.h ); - + // calculate page margins out of the relevant children (paragraphs) elem.TopMargin = elem.h, elem.BottomMargin = 0, elem.LeftMargin = elem.w, elem.RightMargin = 0; // first element should be a paragraphy @@ -1104,7 +1104,7 @@ void WriterXmlFinalizer::visit( PageElement& elem, const std::list< Element* >:: elem.TopMargin = elem.HeaderElement->y; if( elem.FooterElement && elem.FooterElement->y+elem.FooterElement->h > elem.h - elem.BottomMargin ) elem.BottomMargin = elem.h - (elem.FooterElement->y + elem.FooterElement->h); - + // transform margins to mm double left_margin = convPx2mm( elem.LeftMargin ); double right_margin = convPx2mm( elem.RightMargin ); @@ -1118,14 +1118,14 @@ void WriterXmlFinalizer::visit( PageElement& elem, const std::list< Element* >:: top_margin = 10; bottom_margin = 10; } - + // round left/top margin to nearest mm left_margin = rtl_math_round( left_margin, 0, rtl_math_RoundingMode_Floor ); top_margin = rtl_math_round( top_margin, 0, rtl_math_RoundingMode_Floor ); // round (fuzzy) right/bottom margin to nearest cm right_margin = rtl_math_round( right_margin, right_margin >= 10 ? -1 : 0, rtl_math_RoundingMode_Floor ); - bottom_margin = rtl_math_round( bottom_margin, bottom_margin >= 10 ? -1 : 0, rtl_math_RoundingMode_Floor ); - + bottom_margin = rtl_math_round( bottom_margin, bottom_margin >= 10 ? -1 : 0, rtl_math_RoundingMode_Floor ); + // set reasonable default in case of way too large margins // e.g. no paragraph case if( left_margin > page_width/2.0 - 10 ) @@ -1136,7 +1136,7 @@ void WriterXmlFinalizer::visit( PageElement& elem, const std::list< Element* >:: top_margin = 10; if( bottom_margin > page_height/2.0 - 10 ) bottom_margin = 10; - + // catch the weird cases if( left_margin < 0 ) left_margin = 0; @@ -1146,16 +1146,16 @@ void WriterXmlFinalizer::visit( PageElement& elem, const std::list< Element* >:: top_margin = 0; if( bottom_margin < 0 ) bottom_margin = 0; - + // widely differing margins are unlikely to be correct if( right_margin > left_margin*1.5 ) right_margin = left_margin; - + elem.LeftMargin = convmm2Px( left_margin ); elem.RightMargin = convmm2Px( right_margin ); elem.TopMargin = convmm2Px( top_margin ); elem.BottomMargin = convmm2Px( bottom_margin ); - + // get styles for paragraphs PropertyMap aPageProps; PropertyMap aPageLayoutProps; @@ -1169,9 +1169,9 @@ void WriterXmlFinalizer::visit( PageElement& elem, const std::list< Element* >:: aPageLayoutProps[ USTR( "fo:margin-left" ) ] = unitMMString( left_margin ); aPageLayoutProps[ USTR( "fo:margin-right" ) ] = unitMMString( right_margin ); aPageLayoutProps[ USTR( "style:writing-mode" ) ]= USTR( "lr-tb" ); - - StyleContainer::Style aStyle( "style:page-layout", aPageProps); - StyleContainer::Style aSubStyle( "style:page-layout-properties", aPageLayoutProps); + + StyleContainer::Style aStyle( "style:page-layout", aPageProps); + StyleContainer::Style aSubStyle( "style:page-layout-properties", aPageLayoutProps); aStyle.SubStyles.push_back(&aSubStyle); sal_Int32 nPageStyle = m_rStyleContainer.impl_getStyleId( aStyle, false ); @@ -1195,12 +1195,12 @@ void WriterXmlFinalizer::visit( PageElement& elem, const std::list< Element* >:: } elem.StyleId = m_rStyleContainer.impl_getStyleId( aMPStyle,false ); - + rtl::OUString aMasterPageName = m_rStyleContainer.getStyleName( elem.StyleId ); // create styles for children elem.applyToChildren(*this); - + // no paragraph or other elements before the first paragraph if( ! pFirstPara ) { @@ -1212,7 +1212,7 @@ void WriterXmlFinalizer::visit( PageElement& elem, const std::list< Element* >:: } void WriterXmlFinalizer::visit( DocumentElement& elem, const std::list< Element* >::const_iterator& ) -{ +{ elem.applyToChildren(*this); } diff --git a/sdext/source/pdfimport/tree/writertreevisiting.hxx b/sdext/source/pdfimport/tree/writertreevisiting.hxx index b280b6aa011a..2c9e875f4b4f 100644 --- a/sdext/source/pdfimport/tree/writertreevisiting.hxx +++ b/sdext/source/pdfimport/tree/writertreevisiting.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,7 +46,7 @@ namespace pdfi explicit WriterXmlOptimizer(PDFIProcessor& rProcessor) : m_rProcessor(rProcessor) {} - virtual ~WriterXmlOptimizer() + virtual ~WriterXmlOptimizer() {} virtual void visit( HyperlinkElement&, const std::list< Element* >::const_iterator& ); @@ -58,7 +58,7 @@ namespace pdfi virtual void visit( PageElement&, const std::list< Element* >::const_iterator& ); virtual void visit( DocumentElement&, const std::list< Element* >::const_iterator& ); }; - + class WriterXmlFinalizer : public ElementTreeVisitor { private: @@ -66,7 +66,7 @@ namespace pdfi PDFIProcessor& m_rProcessor; void setFirstOnPage( ParagraphElement& rElem, - StyleContainer& rStyles, + StyleContainer& rStyles, const rtl::OUString& rMasterPageName ); public: @@ -75,7 +75,7 @@ namespace pdfi m_rStyleContainer(rStyleContainer), m_rProcessor(rProcessor) {} - virtual ~WriterXmlFinalizer() + virtual ~WriterXmlFinalizer() {} virtual void visit( HyperlinkElement&, const std::list< Element* >::const_iterator& ); @@ -87,20 +87,20 @@ namespace pdfi virtual void visit( PageElement&, const std::list< Element* >::const_iterator& ); virtual void visit( DocumentElement&, const std::list< Element* >::const_iterator& ); }; - + class WriterXmlEmitter : public ElementTreeVisitor { private: EmitContext& m_rEmitContext ; - void fillFrameProps( DrawElement& rElem, - PropertyMap& rProps, + void fillFrameProps( DrawElement& rElem, + PropertyMap& rProps, const EmitContext& rEmitContext ); public: explicit WriterXmlEmitter(EmitContext& rEmitContext) : m_rEmitContext(rEmitContext) {} - virtual ~WriterXmlEmitter() + virtual ~WriterXmlEmitter() {} virtual void visit( HyperlinkElement&, const std::list< Element* >::const_iterator& ); @@ -111,7 +111,7 @@ namespace pdfi virtual void visit( ImageElement&, const std::list< Element* >::const_iterator& ); virtual void visit( PageElement&, const std::list< Element* >::const_iterator& ); virtual void visit( DocumentElement&, const std::list< Element* >::const_iterator& ); - }; + }; } #endif diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index dcc9dd01daf3..cf07a7121b8d 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -185,9 +185,9 @@ class Parser void readLink(); void readMaskedImage(); void readSoftMaskedImage(); - int parseFontCheckForString( const sal_Unicode* pCopy, const char* str, sal_Int32& nLen, + int parseFontCheckForString( const sal_Unicode* pCopy, const char* str, sal_Int32& nLen, FontAttributes& aResult, bool bItalic, bool bBold); - int parseFontRemoveSuffix( const sal_Unicode* pCopy, const char* s, sal_Int32& nLen); + int parseFontRemoveSuffix( const sal_Unicode* pCopy, const char* s, sal_Int32& nLen); public: @@ -464,7 +464,7 @@ rendering::ARGBColor Parser::readColor() return aRes; } -int Parser::parseFontCheckForString( const sal_Unicode* pCopy, const char* s, sal_Int32& nLen, +int Parser::parseFontCheckForString( const sal_Unicode* pCopy, const char* s, sal_Int32& nLen, FontAttributes& aResult, bool bItalic, bool bBold) { int l = strlen(s); @@ -484,7 +484,7 @@ int Parser::parseFontCheckForString( const sal_Unicode* pCopy, const char* s, sa int Parser::parseFontRemoveSuffix( const sal_Unicode* pCopy, const char* s, sal_Int32& nLen) { int l = strlen(s); - if (nLen < l) + if (nLen < l) return 0; for (int i = 0; i < l; i++) if ( pCopy[nLen - l + i] != s[i] ) @@ -510,7 +510,7 @@ void Parser::parseFontFamilyName( FontAttributes& aResult ) { if (parseFontRemoveSuffix( pCopy, "PSMT", nLen)) {} else if (parseFontRemoveSuffix( pCopy, "MT", nLen)) {} - + if (parseFontCheckForString( pCopy, "Italic", nLen, aResult, true, false)) {} else if (parseFontCheckForString( pCopy, "-Bold", nLen, aResult, false, true)) {} else if (parseFontCheckForString( pCopy, "Bold", nLen, aResult, false, true)) {} @@ -630,13 +630,13 @@ uno::Sequence<beans::PropertyValue> Parser::readImageImpl() static const rtl::OString aPbmMarker( "PBM" ); static const rtl::OString aPpmMarker( "PPM" ); static const rtl::OString aPngMarker( "PNG" ); - static const rtl::OUString aJpegFile( + static const rtl::OUString aJpegFile( RTL_CONSTASCII_USTRINGPARAM( "DUMMY.JPEG" )); static const rtl::OUString aPbmFile( RTL_CONSTASCII_USTRINGPARAM( "DUMMY.PBM" )); static const rtl::OUString aPpmFile( RTL_CONSTASCII_USTRINGPARAM( "DUMMY.PPM" )); - static const rtl::OUString aPngFile( + static const rtl::OUString aPngFile( RTL_CONSTASCII_USTRINGPARAM( "DUMMY.PNG" )); rtl::OString aToken = readNextToken(); @@ -776,7 +776,7 @@ void Parser::parseLine( const ::rtl::OString& rLine ) OSL_PRECOND( m_pSink, "Invalid sink" ); OSL_PRECOND( m_pErr, "Invalid filehandle" ); OSL_PRECOND( m_xContext.is(), "Invalid service factory" ); - + m_nNextToken = 0; m_nCharIndex = 0; m_aLine = rLine; uno::Reference<rendering::XPolyPolygon2D> xPoly; const ::rtl::OString& rCmd = readNextToken(); @@ -869,23 +869,23 @@ oslFileError readLine( oslFileHandle pFile, ::rtl::OStringBuffer& line ) oslFileError nRes; // skip garbage \r \n at start of line - while( osl_File_E_None == (nRes=osl_readFile(pFile, &aChar, 1, &nBytesRead)) && - nBytesRead == 1 && + while( osl_File_E_None == (nRes=osl_readFile(pFile, &aChar, 1, &nBytesRead)) && + nBytesRead == 1 && (aChar == '\n' || aChar == '\r') ) ; if( aChar != '\n' && aChar != '\r' ) line.append( aChar ); - while( osl_File_E_None == (nRes=osl_readFile(pFile, &aChar, 1, &nBytesRead)) && + while( osl_File_E_None == (nRes=osl_readFile(pFile, &aChar, 1, &nBytesRead)) && nBytesRead == 1 && aChar != '\n' && aChar != '\r' ) { line.append( aChar ); } - + return nRes; } -} // namespace +} // namespace static bool checkEncryption( const rtl::OUString& i_rPath, const uno::Reference< task::XInteractionHandler >& i_xIHdl, @@ -897,7 +897,7 @@ static bool checkEncryption( const rtl::OUString& bool bSuccess = false; rtl::OString aPDFFile; aPDFFile = rtl::OUStringToOString( i_rPath, osl_getThreadTextEncoding() ); - + pdfparse::PDFReader aParser; boost::scoped_ptr<pdfparse::PDFEntry> pEntry( aParser.read( aPDFFile.getStr() )); if( pEntry ) @@ -911,7 +911,7 @@ static bool checkEncryption( const rtl::OUString& bool bAuthenticated = false; if( io_rPwd.getLength() ) { - rtl::OString aIsoPwd = rtl::OUStringToOString( io_rPwd, + rtl::OString aIsoPwd = rtl::OUStringToOString( io_rPwd, RTL_TEXTENCODING_ISO_8859_1 ); bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd.getStr() ); } @@ -925,12 +925,12 @@ static bool checkEncryption( const rtl::OUString& do { bEntered = getPassword( i_xIHdl, io_rPwd, ! bEntered, i_rDocName ); - rtl::OString aIsoPwd = rtl::OUStringToOString( io_rPwd, + rtl::OString aIsoPwd = rtl::OUStringToOString( io_rPwd, RTL_TEXTENCODING_ISO_8859_1 ); bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd.getStr() ); } while( bEntered && ! bAuthenticated ); } - + OSL_TRACE( "password: %s\n", bAuthenticated ? "matches" : "does not match" ); bSuccess = bAuthenticated; } @@ -954,7 +954,7 @@ bool xpdf_ImportFromFile( const ::rtl::OUString& rUR if( osl_getSystemPathFromFileURL( rURL.pData, &aSysUPath.pData ) != osl_File_E_None ) return false; rtl::OUString aDocName( rURL.copy( rURL.lastIndexOf( sal_Unicode('/') )+1 ) ); - + // check for encryption, if necessary get password rtl::OUString aPwd( rPwd ); bool bIsEncrypted = false; @@ -965,19 +965,19 @@ bool xpdf_ImportFromFile( const ::rtl::OUString& rUR // retrieve package location url (xpdfimport executable is located there) // --------------------------------------------------- - uno::Reference<deployment::XPackageInformationProvider> xProvider( - xContext->getValueByName( + uno::Reference<deployment::XPackageInformationProvider> xProvider( + xContext->getValueByName( rtl::OUString::createFromAscii("/singletons/com.sun.star.deployment.PackageInformationProvider" )), uno::UNO_QUERY); if( xProvider.is() ) { converterURL.insert( - 0, + 0, rtl::OUString::createFromAscii("/")); converterURL.insert( - 0, - xProvider->getPackageLocation( - rtl::OUString::createFromAscii( + 0, + xProvider->getPackageLocation( + rtl::OUString::createFromAscii( BOOST_PP_STRINGIZE(PDFI_IMPL_IDENTIFIER)))); } @@ -1001,18 +1001,18 @@ bool xpdf_ImportFromFile( const ::rtl::OUString& rUR rtl_uString* args[] = { aSysUPath.pData }; sal_Int32 nArgs = 1; - + oslProcess aProcess; oslFileHandle pIn = NULL; oslFileHandle pOut = NULL; oslFileHandle pErr = NULL; - const oslProcessError eErr = - osl_executeProcess_WithRedirectedIO(converterURL.makeStringAndClear().pData, - args, - nArgs, - osl_Process_SEARCHPATH|osl_Process_HIDDEN, - osl_getCurrentSecurity(), - 0, ppEnv, nEnv, + const oslProcessError eErr = + osl_executeProcess_WithRedirectedIO(converterURL.makeStringAndClear().pData, + args, + nArgs, + osl_Process_SEARCHPATH|osl_Process_HIDDEN, + osl_getCurrentSecurity(), + 0, ppEnv, nEnv, &aProcess, &pIn, &pOut, &pErr); bool bRet=true; @@ -1020,18 +1020,18 @@ bool xpdf_ImportFromFile( const ::rtl::OUString& rUR { if( eErr!=osl_Process_E_None ) return false; - + if( pIn ) { rtl::OStringBuffer aBuf(256); if( bIsEncrypted ) aBuf.append( rtl::OUStringToOString( aPwd, RTL_TEXTENCODING_ISO_8859_1 ) ); aBuf.append( '\n' ); - + sal_uInt64 nWritten = 0; osl_writeFile( pIn, aBuf.getStr(), sal_uInt64(aBuf.getLength()), &nWritten ); } - + if( pOut && pErr ) { // read results of PDF parser. One line - one call to @@ -1041,7 +1041,7 @@ bool xpdf_ImportFromFile( const ::rtl::OUString& rUR ::rtl::OStringBuffer line; while( osl_File_E_None == readLine(pOut, line) && line.getLength() ) aParser.parseLine(line.makeStringAndClear()); - } + } } catch( uno::Exception& ) { @@ -1049,7 +1049,7 @@ bool xpdf_ImportFromFile( const ::rtl::OUString& rUR bRet = false; } - if( pIn ) + if( pIn ) osl_closeFile(pIn); if( pOut ) osl_closeFile(pOut); @@ -1066,7 +1066,7 @@ bool xpdf_ImportFromStream( const uno::Reference< io::XInputStream >& xI const rtl::OUString& rPwd, const uno::Reference< uno::XComponentContext >& xContext ) { - OSL_ASSERT(xInput.is()); + OSL_ASSERT(xInput.is()); OSL_ASSERT(rSink); // convert XInputStream to local temp file @@ -1101,7 +1101,7 @@ bool xpdf_ImportFromStream( const uno::Reference< io::XInputStream >& xI break; } } - } + } while( nBytes == nBufSize ); osl_closeFile( aFile ); diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index 829ada5c155d..4280ce1cf601 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -16,12 +16,12 @@ * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, @@ -39,7 +39,7 @@ #include <vector> #include <boost/shared_array.hpp> - + #if defined __SUNPRO_CC #pragma disable_warn #elif defined _MSC_VER @@ -59,7 +59,7 @@ #endif -/* SYNC STREAMS +/* SYNC STREAMS ============ We stream human-readble tokens to stdout, and binary data (fonts, @@ -90,7 +90,7 @@ boost::shared_array<char> lcl_escapeLineFeeds(const char* const i_pStr) { size_t nLength(strlen(i_pStr)); char* pBuffer = new char[2*nLength+1]; - + const char* pRead = i_pStr; char* pWrite = pBuffer; while( nLength-- ) @@ -139,7 +139,7 @@ void writeBinaryBuffer( const OutputBuffer& rBuffer ) // put buffer to stderr if( !rBuffer.empty() ) - if( fwrite(&rBuffer[0], sizeof(char), + if( fwrite(&rBuffer[0], sizeof(char), rBuffer.size(), g_binary_out) != (size_t)rBuffer.size() ) exit(1); // error @@ -195,12 +195,12 @@ void writePbm_(OutputBuffer& o_rOutputBuf, Stream* str, int width, int height, b // copy the raw stream if( bInvert ) { - for( int i=0; i<size; ++i) + for( int i=0; i<size; ++i) o_rOutputBuf.push_back(static_cast<char>(str->getChar() ^ 0xff)); } else { - for( int i=0; i<size; ++i) + for( int i=0; i<size; ++i) o_rOutputBuf.push_back(static_cast<char>(str->getChar())); } @@ -213,7 +213,7 @@ void writePpm_( OutputBuffer& o_rOutputBuf, int height, GfxImageColorMap* colorMap, bool bWithLinefeed ) -{ +{ // write as PPM (char by char, to avoid stdlib lineend messing) o_rOutputBuf.clear(); o_rOutputBuf.resize(WRITE_BUFFER_SIZE); @@ -244,28 +244,28 @@ void writePpm_( OutputBuffer& o_rOutputBuf, Guchar *p; GfxRGB rgb; ImageStream* imgStr = - new ImageStream(str, - width, + new ImageStream(str, + width, colorMap->getNumPixelComps(), colorMap->getBits()); imgStr->reset(); - for( int y=0; y<height; ++y) + for( int y=0; y<height; ++y) { p = imgStr->getLine(); - for( int x=0; x<width; ++x) + for( int x=0; x<width; ++x) { colorMap->getRGB(p, &rgb); o_rOutputBuf.push_back(colToByte(rgb.r)); o_rOutputBuf.push_back(colToByte(rgb.g)); o_rOutputBuf.push_back(colToByte(rgb.b)); - + p +=colorMap->getNumPixelComps(); } } delete imgStr; - + } // call this only for 1 bit image streams ! @@ -277,11 +277,11 @@ void writePng_( OutputBuffer& o_rOutputBuf, GfxRGB& oneColor, bool bIsMask, bool bWithLinefeed ) -{ +{ o_rOutputBuf.clear(); - + // get png image - PngHelper::createPng( o_rOutputBuf, str, width, height, zeroColor, oneColor, bIsMask ); + PngHelper::createPng( o_rOutputBuf, str, width, height, zeroColor, oneColor, bIsMask ); printf( " PNG %d", (int)o_rOutputBuf.size() ); if( bWithLinefeed ) @@ -294,11 +294,11 @@ void writePng_( OutputBuffer& o_rOutputBuf, Stream* maskStr, int maskWidth, int maskHeight, GfxImageColorMap* maskColorMap, bool bWithLinefeed ) -{ +{ o_rOutputBuf.clear(); - + // get png image - PngHelper::createPng( o_rOutputBuf, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskColorMap ); + PngHelper::createPng( o_rOutputBuf, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskColorMap ); printf( " PNG %d", (int)o_rOutputBuf.size() ); if( bWithLinefeed ) @@ -311,11 +311,11 @@ void writePng_( OutputBuffer& o_rOutputBuf, Stream* maskStr, int maskWidth, int maskHeight, bool maskInvert, bool bWithLinefeed ) -{ +{ o_rOutputBuf.clear(); - + // get png image - PngHelper::createPng( o_rOutputBuf, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskInvert ); + PngHelper::createPng( o_rOutputBuf, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskInvert ); printf( " PNG %d", (int)o_rOutputBuf.size() ); if( bWithLinefeed ) @@ -327,7 +327,7 @@ void writeMask_( OutputBuffer& o_rOutputBuf, Stream* str, int width, int height, { if( str->getKind() == strDCT ) writeJpeg_(o_rOutputBuf, str, bWithLinefeed); - else + else writePbm_(o_rOutputBuf, str, width, height, bWithLinefeed, bInvert ); } @@ -336,17 +336,17 @@ void writeImage_( OutputBuffer& o_rOutputBuf, int width, int height, GfxImageColorMap* colorMap, - bool bWithLinefeed ) + bool bWithLinefeed ) { // dump JPEG file if( str->getKind() == strDCT && (colorMap->getNumPixelComps() == 1 || - colorMap->getNumPixelComps() == 3) ) + colorMap->getNumPixelComps() == 3) ) { writeJpeg_(o_rOutputBuf, str, bWithLinefeed); - } + } else if (colorMap->getNumPixelComps() == 1 && - colorMap->getBits() == 1) + colorMap->getBits() == 1) { // this is a two color bitmap, write a png // provide default colors @@ -360,7 +360,7 @@ void writeImage_( OutputBuffer& o_rOutputBuf, colorMap->getRGB( &nIndex, &oneColor ); } writePng_( o_rOutputBuf, str, width, height, zeroColor, oneColor, false, bWithLinefeed ); - } + } else writePpm_( o_rOutputBuf, str, width, height, colorMap, bWithLinefeed ); } @@ -443,12 +443,12 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const fflush(stdout); if( fwrite(pBuf, sizeof(char), nSize, g_binary_out) != (size_t)nSize ) - exit(1); // error + exit(1); // error - // ---sync point--- see SYNC STREAMS above + // ---sync point--- see SYNC STREAMS above fflush(g_binary_out); } - + void PDFOutDev::printPath( GfxPath* pPath ) const { int nSubPaths = pPath ? pPath->getNumSubpaths() : 0; @@ -456,13 +456,13 @@ void PDFOutDev::printPath( GfxPath* pPath ) const { GfxSubpath* pSub = pPath->getSubpath( i ); const int nPoints = pSub->getNumPoints(); - + printf( " subpath %d", pSub->isClosed() ); for( int n=0; n<nPoints; ++n ) { - printf( " %f %f %d", - normalize(pSub->getX(n)), + printf( " %f %f %d", + normalize(pSub->getX(n)), normalize(pSub->getY(n)), pSub->getCurve(n) ); } @@ -480,7 +480,7 @@ void PDFOutDev::startPage(int /*pageNum*/, GfxState* state) { assert(state); printf("startPage %f %f\n", - normalize(state->getPageWidth()), + normalize(state->getPageWidth()), normalize(state->getPageHeight())); } @@ -500,13 +500,13 @@ void PDFOutDev::processLink(Link* link, Catalog*) if( pAction->getKind() == actionURI ) { const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->getCString(); - + boost::shared_array<char> pEsc( lcl_escapeLineFeeds(pURI) ); - printf( "drawLink %f %f %f %f %s\n", - normalize(x1), - normalize(y1), - normalize(x2), + printf( "drawLink %f %f %f %f %s\n", + normalize(x1), + normalize(y1), + normalize(x2), normalize(y2), pEsc.get() ); } @@ -537,9 +537,9 @@ void PDFOutDev::setDefaultCTM(double *pMat) normalize(pMat[5]) ); } -void PDFOutDev::updateCTM(GfxState* state, - double, double, +void PDFOutDev::updateCTM(GfxState* state, double, double, + double, double, double, double) { assert(state); @@ -575,13 +575,13 @@ void PDFOutDev::updateLineDash(GfxState *state) void PDFOutDev::updateFlatness(GfxState *state) { - assert(state); + assert(state); printf( "updateFlatness %d\n", state->getFlatness() ); } void PDFOutDev::updateLineJoin(GfxState *state) { - assert(state); + assert(state); printf( "updateLineJoin %d\n", state->getLineJoin() ); } @@ -611,8 +611,8 @@ void PDFOutDev::updateFillColor(GfxState *state) state->getFillRGB( &aRGB ); printf( "updateFillColor %f %f %f %f\n", - normalize(colToDbl(aRGB.r)), - normalize(colToDbl(aRGB.g)), + normalize(colToDbl(aRGB.r)), + normalize(colToDbl(aRGB.g)), normalize(colToDbl(aRGB.b)), normalize(state->getFillOpacity()) ); } @@ -623,10 +623,10 @@ void PDFOutDev::updateStrokeColor(GfxState *state) GfxRGB aRGB; state->getStrokeRGB( &aRGB ); - + printf( "updateStrokeColor %f %f %f %f\n", - normalize(colToDbl(aRGB.r)), - normalize(colToDbl(aRGB.g)), + normalize(colToDbl(aRGB.r)), + normalize(colToDbl(aRGB.g)), normalize(colToDbl(aRGB.b)), normalize(state->getFillOpacity()) ); } @@ -673,14 +673,14 @@ void PDFOutDev::updateFont(GfxState *state) printf( " %lld", fontID ); aFont = it->second; - + boost::shared_array<char> pEsc( lcl_escapeLineFeeds(aFont.familyName.getCString()) ); printf( " %d %d %d %d %f %d %s", aFont.isEmbedded, - aFont.isBold, - aFont.isItalic, - aFont.isUnderline, - normalize(state->getTransformedFontSize()), + aFont.isBold, + aFont.isItalic, + aFont.isUnderline, + normalize(state->getTransformedFontSize()), nEmbedSize, pEsc.get() ); } @@ -694,7 +694,7 @@ void PDFOutDev::updateFont(GfxState *state) void PDFOutDev::updateRender(GfxState *state) { assert(state); - + printf( "setTextRenderMode %d\n", state->getRender() ); } @@ -742,7 +742,7 @@ void PDFOutDev::eoClip(GfxState *state) printPath( state->getPath() ); printf( "\n" ); } - + /** Output one glyph @@ -771,44 +771,44 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y, if( u == NULL ) return; - + // normalize coordinates: correct from baseline-relative to upper // left corner of glyphs - double x2(0.0), y2(0.0); - state->textTransformDelta( 0.0, - state->getFont()->getAscent(), + double x2(0.0), y2(0.0); + state->textTransformDelta( 0.0, + state->getFont()->getAscent(), &x2, &y2 ); const double fFontSize(state->getFontSize()); x += x2*fFontSize; y += y2*fFontSize; - + const double aPositionX(x-originX); const double aPositionY(y-originY); // TODO(F2): use leading here, when set const double nWidth(dx != 0.0 ? dx : fFontSize); const double nHeight(dy != 0.0 ? dy : fFontSize); - + const double* pTextMat=state->getTextMat(); printf( "drawChar %f %f %f %f %f %f %f %f ", - normalize(aPositionX), + normalize(aPositionX), normalize(aPositionY), - normalize(aPositionX+nWidth), + normalize(aPositionX+nWidth), normalize(aPositionY-nHeight), - normalize(pTextMat[0]), - normalize(pTextMat[2]), - normalize(pTextMat[1]), + normalize(pTextMat[0]), + normalize(pTextMat[2]), + normalize(pTextMat[1]), normalize(pTextMat[3]) ); // silence spurious warning (void)&mapUCS2; char buf[9]; - for( int i=0; i<uLen; ++i ) + for( int i=0; i<uLen; ++i ) { buf[ m_pUtf8Map->mapUnicode(u[i], buf, sizeof(buf)-1) ] = 0; boost::shared_array<char> pEsc( lcl_escapeLineFeeds(buf) ); printf( "%s", pEsc.get() ); - } + } printf( "\n" ); } @@ -822,7 +822,7 @@ void PDFOutDev::endTextObject(GfxState*) { printf( "endTextObject\n" ); } - + void PDFOutDev::drawImageMask(GfxState* pState, Object*, Stream* str, int width, int height, GBool invert, GBool /*inlineImg*/ ) @@ -870,13 +870,13 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, else { GfxRGB aMinRGB; - colorMap->getColorSpace()->getRGB( - (GfxColor*)maskColors, + colorMap->getColorSpace()->getRGB( + (GfxColor*)maskColors, &aMinRGB ); GfxRGB aMaxRGB; - colorMap->getColorSpace()->getRGB( - (GfxColor*)maskColors+gfxColorMaxComps, + colorMap->getColorSpace()->getRGB( + (GfxColor*)maskColors+gfxColorMaxComps, &aMaxRGB ); aMaskBuf.push_back( colToByte(aMinRGB.r) ); @@ -897,7 +897,7 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, void PDFOutDev::drawMaskedImage(GfxState*, Object*, Stream* str, int width, int height, GfxImageColorMap* colorMap, - Stream* maskStr, + Stream* maskStr, int maskWidth, int maskHeight, GBool maskInvert) { diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx index 79c9f1b4d163..8ab3c9aa6788 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx @@ -16,12 +16,12 @@ * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, @@ -140,14 +140,14 @@ namespace pdfi bool isBold; bool isItalic; bool isUnderline; - double size; + double size; }; class PDFOutDev : public OutputDev { // not owned by this class PDFDoc* m_pDoc; - mutable std::hash_map< long long, + mutable std::hash_map< long long, FontAttributes > m_aFontMap; UnicodeMap* m_pUtf8Map; @@ -157,50 +157,50 @@ namespace pdfi public: explicit PDFOutDev( PDFDoc* pDoc ); - + //----- get info about output device - + // Does this device use upside-down coordinates? // (Upside-down means (0,0) is the top left corner of the page.) virtual GBool upsideDown() { return gTrue; } - + // Does this device use drawChar() or drawString()? virtual GBool useDrawChar() { return gTrue; } - + // Does this device use beginType3Char/endType3Char? Otherwise, // text in Type 3 fonts will be drawn with drawChar/drawString. virtual GBool interpretType3Chars() { return gFalse; } - + // Does this device need non-text content? virtual GBool needNonText() { return gTrue; } - + //----- initialization and control - + // Set default transform matrix. virtual void setDefaultCTM(double *ctm); - + // Start a page. virtual void startPage(int pageNum, GfxState *state); - + // End a page. virtual void endPage(); - + // Dump page contents to display. // virtual void dump() {} - + //----- coordinate conversion - + // Convert between device and user coordinates. // virtual void cvtDevToUser(double dx, double dy, double *ux, double *uy); // virtual void cvtUserToDev(double ux, double uy, int *dx, int *dy); - + //----- link borders virtual void processLink(Link *link, Catalog *catalog); - + //----- save/restore graphics state virtual void saveState(GfxState *state); virtual void restoreState(GfxState *state); - + //----- update graphics state // virtual void updateAll(GfxState *state); virtual void updateCTM(GfxState *state, double m11, double m12, @@ -216,7 +216,7 @@ namespace pdfi virtual void updateFillOpacity(GfxState *state); virtual void updateStrokeOpacity(GfxState *state); virtual void updateBlendMode(GfxState *state); - + //----- update text state virtual void updateFont(GfxState *state); // virtual void updateTextMat(GfxState *state); @@ -227,16 +227,16 @@ namespace pdfi // virtual void updateHorizScaling(GfxState *state) {} // virtual void updateTextPos(GfxState *state) {} // virtual void updateTextShift(GfxState *state, double shift) {} - + //----- path painting virtual void stroke(GfxState *state); virtual void fill(GfxState *state); virtual void eoFill(GfxState *state); - + //----- path clipping virtual void clip(GfxState *state); virtual void eoClip(GfxState *state); - + //----- text drawing virtual void drawChar(GfxState *state, double x, double y, double dx, double dy, @@ -244,7 +244,7 @@ namespace pdfi CharCode code, int nBytes, Unicode *u, int uLen); virtual void drawString(GfxState *state, GooString *s); virtual void endTextObject(GfxState *state); - + //----- image drawing virtual void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, @@ -263,18 +263,18 @@ namespace pdfi Stream *maskStr, int maskWidth, int maskHeight, GfxImageColorMap *maskColorMap); - + //----- OPI functions // virtual void opiBegin(GfxState *state, Dict *opiDict); // virtual void opiEnd(GfxState *state, Dict *opiDict); - + //----- Type 3 font operators // virtual void type3D0(GfxState *state, double wx, double wy) {} // virtual void type3D1(GfxState *state, double wx, double wy, // double llx, double lly, double urx, double ury) {} - + //----- PostScript XObjects - // virtual void psXObject(Stream *psStream, Stream *level1Stream) {} + // virtual void psXObject(Stream *psStream, Stream *level1Stream) {} void setPageNum( int nNumPages ); }; diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx index a28a676bcf79..8bf3952eb8d0 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx @@ -16,12 +16,12 @@ * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, @@ -44,10 +44,10 @@ using namespace pdfi; /* Table of CRCs of all 8-bit messages. */ sal_uInt32 PngHelper::crc_table[256]; - + /* Flag: has the table been computed? Initially false. */ bool PngHelper::bCRCTableInit = true; - + /* Make the table for a fast CRC. */ void PngHelper::initCRCTable() { @@ -65,7 +65,7 @@ void PngHelper::initCRCTable() } bCRCTableInit = false; } - + /* Update a running CRC with the bytes buf[0..len-1]--the CRC should be initialized to all 1's, and the transmitted value is the 1's complement of the final running CRC (see the @@ -75,7 +75,7 @@ void PngHelper::updateCRC( sal_uInt32& io_rCRC, const sal_uInt8* i_pBuf, size_t { if( bCRCTableInit ) initCRCTable(); - + sal_uInt32 nCRC = io_rCRC; for( size_t n = 0; n < i_nLen; n++ ) nCRC = crc_table[(nCRC ^ i_pBuf[n]) & 0xff] ^ (nCRC >> 8); @@ -92,7 +92,7 @@ sal_uInt32 PngHelper::getCRC( const sal_uInt8* i_pBuf, size_t i_nLen ) sal_uInt32 PngHelper::deflateBuffer( const Output_t* i_pBuf, size_t i_nLen, OutputBuffer& o_rOut ) { size_t nOrigSize = o_rOut.size(); - + // prepare z stream z_stream aStream; aStream.zalloc = Z_NULL; @@ -101,7 +101,7 @@ sal_uInt32 PngHelper::deflateBuffer( const Output_t* i_pBuf, size_t i_nLen, Outp deflateInit( &aStream, Z_BEST_COMPRESSION ); aStream.avail_in = uInt(i_nLen); aStream.next_in = (Bytef*)i_pBuf; - + sal_uInt8 aOutBuf[ 32768 ]; do { @@ -115,17 +115,17 @@ sal_uInt32 PngHelper::deflateBuffer( const Output_t* i_pBuf, size_t i_nLen, Outp o_rOut.resize( nOrigSize ); return 0; } - + // append compressed bytes sal_uInt32 nCompressedBytes = sizeof( aOutBuf ) - aStream.avail_out; if( nCompressedBytes ) o_rOut.insert( o_rOut.end(), aOutBuf, aOutBuf+nCompressedBytes ); } while( aStream.avail_out == 0 ); - + // cleanup deflateEnd( &aStream ); - + return sal_uInt32( o_rOut.size() - nOrigSize ); } @@ -159,12 +159,12 @@ void PngHelper::endChunk( size_t nStart, OutputBuffer& o_rOutputBuf ) { if( nStart+8 > o_rOutputBuf.size() ) return; // something broken is going on - + // update chunk length size_t nLen = o_rOutputBuf.size() - nStart; sal_uInt32 nDataLen = sal_uInt32(nLen)-8; set( nDataLen, o_rOutputBuf, nStart ); - + // append chunk crc sal_uInt32 nChunkCRC = getCRC( (sal_uInt8*)&o_rOutputBuf[nStart+4], nLen-4 ); append( nChunkCRC, o_rOutputBuf ); @@ -186,7 +186,7 @@ void PngHelper::appendIHDR( OutputBuffer& o_rOutputBuf, int width, int height, i void PngHelper::appendIEND( OutputBuffer& o_rOutputBuf ) { size_t nStart = startChunk( "IEND", o_rOutputBuf ); - endChunk( nStart, o_rOutputBuf ); + endChunk( nStart, o_rOutputBuf ); } void PngHelper::createPng( OutputBuffer& o_rOutputBuf, @@ -200,8 +200,8 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, { appendFileHeader( o_rOutputBuf ); appendIHDR( o_rOutputBuf, width, height, 1, 3 ); - - // write palette + + // write palette size_t nIdx = startChunk( "PLTE", o_rOutputBuf ); // write colors 0 and 1 o_rOutputBuf.push_back(colToByte(zeroColor.r)); @@ -212,7 +212,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, o_rOutputBuf.push_back(colToByte(oneColor.b)); // end PLTE chunk endChunk( nIdx, o_rOutputBuf ); - + if( bIsMask ) { // write tRNS chunk @@ -236,14 +236,14 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, for( int x = 0; x < nLineSize; x++ ) aScanlines.push_back( str->getChar() ); } - + // begin IDAT chunk for scanline data nIdx = startChunk( "IDAT", o_rOutputBuf ); // compress scanlines - deflateBuffer( &aScanlines[0], aScanlines.size(), o_rOutputBuf ); + deflateBuffer( &aScanlines[0], aScanlines.size(), o_rOutputBuf ); // end IDAT chunk endChunk( nIdx, o_rOutputBuf ); - + // output IEND appendIEND( o_rOutputBuf ); } @@ -256,14 +256,14 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, { appendFileHeader( o_rOutputBuf ); appendIHDR( o_rOutputBuf, width, height, 8, 6 ); // RGBA image - + // initialize stream Guchar *p, *pm; GfxRGB rgb; GfxGray alpha; ImageStream* imgStr = - new ImageStream(str, - width, + new ImageStream(str, + width, colorMap->getNumPixelComps(), colorMap->getBits()); imgStr->reset(); @@ -272,34 +272,34 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, OutputBuffer aScanlines; aScanlines.reserve( width*height*4 + height ); - for( int y=0; y<height; ++y) + for( int y=0; y<height; ++y) { aScanlines.push_back( 0 ); p = imgStr->getLine(); - for( int x=0; x<width; ++x) + for( int x=0; x<width; ++x) { colorMap->getRGB(p, &rgb); aScanlines.push_back(colToByte(rgb.r)); aScanlines.push_back(colToByte(rgb.g)); aScanlines.push_back(colToByte(rgb.b)); aScanlines.push_back( 0xff ); - + p +=colorMap->getNumPixelComps(); } } // now fill in the mask data - + // CAUTION: originally this was done in one single loop // it caused merry chaos; the reason is that maskStr and str are // not independent streams, it happens that reading one advances // the other, too. Hence the two passes are imperative ! - + // initialize mask stream ImageStream* imgStrMask = - new ImageStream(maskStr, - maskWidth, + new ImageStream(maskStr, + maskWidth, maskColorMap->getNumPixelComps(), maskColorMap->getBits()); @@ -320,7 +320,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, delete imgStr; delete imgStrMask; - + // begind IDAT chunk for scanline data size_t nIdx = startChunk( "IDAT", o_rOutputBuf ); // compress scanlines @@ -342,13 +342,13 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, { appendFileHeader( o_rOutputBuf ); appendIHDR( o_rOutputBuf, width, height, 8, 6 ); // RGBA image - + // initialize stream Guchar *p; GfxRGB rgb; ImageStream* imgStr = - new ImageStream(str, - width, + new ImageStream(str, + width, colorMap->getNumPixelComps(), colorMap->getBits()); imgStr->reset(); @@ -357,30 +357,30 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, OutputBuffer aScanlines; aScanlines.reserve( width*height*4 + height ); - for( int y=0; y<height; ++y) + for( int y=0; y<height; ++y) { aScanlines.push_back( 0 ); p = imgStr->getLine(); - for( int x=0; x<width; ++x) + for( int x=0; x<width; ++x) { colorMap->getRGB(p, &rgb); aScanlines.push_back(colToByte(rgb.r)); aScanlines.push_back(colToByte(rgb.g)); aScanlines.push_back(colToByte(rgb.b)); aScanlines.push_back( 0xff ); - + p +=colorMap->getNumPixelComps(); } } // now fill in the mask data - + // CAUTION: originally this was done in one single loop // it caused merry chaos; the reason is that maskStr and str are // not independent streams, it happens that reading one advances // the other, too. Hence the two passes are imperative ! - + // initialize mask stream ImageStream* imgStrMask = new ImageStream(maskStr, maskWidth, 1, 1); @@ -404,7 +404,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, delete imgStr; delete imgStrMask; - + // begind IDAT chunk for scanline data size_t nIdx = startChunk( "IDAT", o_rOutputBuf ); // compress scanlines diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx index c7b050869554..07b70ede7c4a 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx +++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx @@ -16,12 +16,12 @@ * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, @@ -41,12 +41,12 @@ namespace pdfi { static sal_uInt32 crc_table[ 256 ]; static bool bCRCTableInit; - + static void initCRCTable(); static void appendFileHeader( OutputBuffer& o_rOutputBuf ); static size_t startChunk( const char* pChunkName, OutputBuffer& o_rOut ); static void endChunk( size_t nStart, OutputBuffer& o_rOut ); - + static void set( sal_uInt32 i_nValue, OutputBuffer& o_rOutputBuf, size_t i_nIndex ); static void append( sal_uInt32 i_nValue, OutputBuffer& o_rOutputBuf ) { @@ -54,18 +54,18 @@ namespace pdfi o_rOutputBuf.insert( o_rOutputBuf.end(), 4, (Output_t)0 ); set( i_nValue, o_rOutputBuf, nCur ); } - + static void appendIHDR( OutputBuffer& o_rOutputBuf, int width, int height, int depth, int colortype ); static void appendIEND( OutputBuffer& o_rOutputBuf ); - + public: static void updateCRC( sal_uInt32& io_rCRC, const sal_uInt8* i_pBuf, size_t i_nLen ); static sal_uInt32 getCRC( const sal_uInt8* i_pBuf, size_t i_nLen ); - + // deflates the passed buff i_pBuf and appends it to the output vector // returns the number of bytes added to the output static sal_uInt32 deflateBuffer( const Output_t* i_pBuf, size_t i_nLen, OutputBuffer& o_rOut ); - + static void createPng( OutputBuffer& o_rOutputBuf, Stream* str, int width, diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx index 26011cc08c64..fd75becc8a12 100644 --- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx @@ -16,12 +16,12 @@ * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, @@ -123,15 +123,15 @@ int main(int argc, char **argv) } } } - + // PDFDoc takes over ownership for all strings below GooString* pFileName = new GooString(argv[1]); GooString* pTempErrFileName = new GooString("_err.pdf"); GooString* pTempErrFileNamePath = new GooString(argv[0]); GooString* pErrFileName = new GooString(pTempErrFileNamePath,pTempErrFileName); - - + + // check for password string(s) GooString* pOwnerPasswordStr( ownerPassword[0] != '\001' ? new GooString(ownerPassword) @@ -153,12 +153,12 @@ int main(int argc, char **argv) PDFDoc aDoc( pFileName, pOwnerPasswordStr, pUserPasswordStr ); - + PDFDoc aErrDoc( pErrFileName, pOwnerPasswordStr, pUserPasswordStr ); - - + + // Check various permissions. if ( !aDoc.isOk() ) { @@ -175,17 +175,17 @@ int main(int argc, char **argv) // do the conversion for( int i=1; i<=nPages; ++i ) { - aErrDoc.displayPage( pOutDev, - i, - PDFI_OUTDEV_RESOLUTION, + aErrDoc.displayPage( pOutDev, + i, + PDFI_OUTDEV_RESOLUTION, PDFI_OUTDEV_RESOLUTION, 0, gTrue, gTrue, gTrue ); aErrDoc.processLinks( pOutDev, i ); } } else - { - + { + pdfi::PDFOutDev* pOutDev( new pdfi::PDFOutDev(&aDoc) ); // tell receiver early - needed for proper progress calculation @@ -198,9 +198,9 @@ int main(int argc, char **argv) const int nPages = aDoc.getNumPages(); for( int i=1; i<=nPages; ++i ) { - aDoc.displayPage( pOutDev, - i, - PDFI_OUTDEV_RESOLUTION, + aDoc.displayPage( pOutDev, + i, + PDFI_OUTDEV_RESOLUTION, PDFI_OUTDEV_RESOLUTION, 0, gTrue, gTrue, gTrue ); aDoc.processLinks( pOutDev, i ); |