summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/tree/drawtreevisiting.hxx115
-rw-r--r--sdext/source/pdfimport/tree/genericelements.hxx319
-rw-r--r--sdext/source/pdfimport/tree/imagecontainer.hxx65
-rw-r--r--sdext/source/pdfimport/tree/pdfiprocessor.hxx295
-rw-r--r--sdext/source/pdfimport/tree/style.hxx184
-rw-r--r--sdext/source/pdfimport/tree/treevisiting.hxx84
-rw-r--r--sdext/source/pdfimport/tree/writertreevisiting.hxx120
7 files changed, 1182 insertions, 0 deletions
diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.hxx b/sdext/source/pdfimport/tree/drawtreevisiting.hxx
new file mode 100644
index 000000000000..a9fdb22a48d6
--- /dev/null
+++ b/sdext/source/pdfimport/tree/drawtreevisiting.hxx
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: drawtreevisiting.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_PDFI_DRAWTREEVISITING_HXX
+#define INCLUDED_PDFI_DRAWTREEVISITING_HXX
+
+#include "treevisiting.hxx"
+
+
+namespace pdfi
+{
+ struct DrawElement;
+
+ class DrawXmlOptimizer : public ElementTreeVisitor
+ {
+ private:
+ PDFIProcessor& m_rProcessor;
+ void optimizeTextElements(Element& rParent);
+
+ public:
+ explicit DrawXmlOptimizer(PDFIProcessor& rProcessor) :
+ m_rProcessor(rProcessor)
+ {}
+
+ virtual void visit( HyperlinkElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( TextElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( ParagraphElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( FrameElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( PolyPolyElement&, const std::list< Element* >::const_iterator& );
+ 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& );
+ };
+
+ class DrawXmlFinalizer : public ElementTreeVisitor
+ {
+ private:
+ StyleContainer& m_rStyleContainer;
+ PDFIProcessor& m_rProcessor;
+
+ public:
+ explicit DrawXmlFinalizer(StyleContainer& rStyleContainer,
+ PDFIProcessor& rProcessor) :
+ m_rStyleContainer(rStyleContainer),
+ m_rProcessor(rProcessor)
+ {}
+
+ virtual void visit( HyperlinkElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( TextElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( ParagraphElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( FrameElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( PolyPolyElement&, const std::list< Element* >::const_iterator& );
+ 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& );
+ };
+
+ class DrawXmlEmitter : public ElementTreeVisitor
+ {
+ private:
+ EmitContext& m_rEmitContext ;
+ /// writes Impress doc when false
+ const bool m_bWriteDrawDocument;
+
+ void fillFrameProps( DrawElement& rElem,
+ PropertyMap& rProps,
+ const EmitContext& rEmitContext );
+
+ public:
+ enum DocType{ DRAW_DOC, IMPRESS_DOC };
+ explicit DrawXmlEmitter(EmitContext& rEmitContext, DocType eDocType) :
+ m_rEmitContext(rEmitContext),
+ m_bWriteDrawDocument(eDocType==DRAW_DOC)
+ {}
+
+ virtual void visit( HyperlinkElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( TextElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( ParagraphElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( FrameElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( PolyPolyElement&, const std::list< Element* >::const_iterator& );
+ 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.hxx b/sdext/source/pdfimport/tree/genericelements.hxx
new file mode 100644
index 000000000000..34fbdf6391de
--- /dev/null
+++ b/sdext/source/pdfimport/tree/genericelements.hxx
@@ -0,0 +1,319 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: genericelements.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_PDFI_GENERICELEMENTS_HXX
+#define INCLUDED_PDFI_GENERICELEMENTS_HXX
+
+#include "pdfihelper.hxx"
+#include "treevisiting.hxx"
+
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/range/b2drange.hxx>
+#include <rtl/ustring.hxx>
+#include <rtl/ustrbuf.hxx>
+
+#include <list>
+
+namespace pdfi
+{
+ class XmlEmitter;
+ class StyleContainer;
+ class ImageContainer;
+ class PDFIProcessor;
+ class ElementFactory;
+
+
+ struct EmitContext
+ {
+ EmitContext(
+ XmlEmitter& _rEmitter,
+ StyleContainer& _rStyles,
+ ImageContainer& _rImages,
+ PDFIProcessor& _rProcessor,
+ const com::sun::star::uno::Reference<
+ com::sun::star::task::XStatusIndicator>& _xStatusIndicator ) :
+ rEmitter(_rEmitter),
+ rStyles(_rStyles),
+ rImages(_rImages),
+ rProcessor(_rProcessor),
+ xStatusIndicator(_xStatusIndicator)
+ {}
+
+ XmlEmitter& rEmitter;
+ StyleContainer& rStyles;
+ ImageContainer& rImages;
+ PDFIProcessor& rProcessor;
+ com::sun::star::uno::Reference<
+ com::sun::star::task::XStatusIndicator> xStatusIndicator;
+ };
+
+ struct Element : public ElementTreeVisitable
+ {
+ protected:
+ Element( Element* pParent )
+ : x( 0 ), y( 0 ), w( 0 ), h( 0 ), StyleId( -1 ), Parent( pParent )
+ {
+ if( pParent )
+ pParent->Children.push_back( this );
+ }
+
+ public:
+ virtual ~Element();
+
+ /// Apply visitor to all children
+ void applyToChildren( ElementTreeVisitor& );
+ /// Union element geometry with given element
+ void updateGeometryWith( const Element* pMergeFrom );
+
+#if OSL_DEBUG_LEVEL > 1
+ // xxx refac TODO: move code to visitor
+ virtual void emitStructure( int nLevel );
+#endif
+ /** el must be a valid dereferencable iterator of el->Parent->Children
+ 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;
+ protected:
+ HyperlinkElement( Element* pParent, const rtl::OUString& rURI )
+ : Element( pParent ), URI( rURI ) {}
+ public:
+ // ElementTreeVisitable
+ virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& );
+
+ rtl::OUString URI;
+ };
+
+ struct GraphicalElement : public Element
+ {
+ protected:
+ GraphicalElement( Element* pParent, sal_Int32 nGCId )
+ : Element( pParent ), GCId(nGCId ) {}
+
+ public:
+ sal_Int32 GCId;
+ };
+
+ struct DrawElement : public GraphicalElement
+ {
+ protected:
+ DrawElement( Element* pParent, sal_Int32 nGCId )
+ : GraphicalElement( pParent, nGCId ), isCharacter(false), ZOrder(0) {}
+
+ public:
+ bool isCharacter;
+ sal_Int32 ZOrder;
+ };
+
+ struct FrameElement : public DrawElement
+ {
+ friend class ElementFactory;
+ protected:
+ FrameElement( Element* pParent, sal_Int32 nGCId )
+ : DrawElement( pParent, nGCId ) {}
+
+ public:
+ // ElementTreeVisitable
+ virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& );
+ };
+
+ struct TextElement : public GraphicalElement
+ {
+ friend class ElementFactory;
+ protected:
+ TextElement( Element* pParent, sal_Int32 nGCId, sal_Int32 nFontId )
+ : GraphicalElement( pParent, nGCId ), FontId( nFontId ) {}
+
+ public:
+ // ElementTreeVisitable
+ virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& );
+
+ rtl::OUStringBuffer Text;
+ sal_Int32 FontId;
+ };
+
+ struct ParagraphElement : public Element
+ {
+ friend class ElementFactory;
+ protected:
+ ParagraphElement( Element* pParent ) : Element( pParent ), Type( Normal ) {}
+
+ 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
+ // line height is font height if the text element is itself multilined
+ 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;
+ };
+
+ struct PolyPolyElement : public DrawElement
+ {
+ friend class ElementFactory;
+ protected:
+ PolyPolyElement( Element* pParent, sal_Int32 nGCId,
+ const basegfx::B2DPolyPolygon& rPolyPoly,
+ sal_Int8 nAction );
+ 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;
+ protected:
+ ImageElement( Element* pParent, sal_Int32 nGCId, ImageId nImage )
+ : DrawElement( pParent, nGCId ), Image( nImage ) {}
+
+ public:
+ // ElementTreeVisitable
+ virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& );
+
+ ImageId Image;
+ };
+
+ struct PageElement : public Element
+ {
+ friend class ElementFactory;
+ protected:
+ PageElement( Element* pParent, sal_Int32 nPageNr )
+ : Element( pParent ), PageNumber( nPageNr ), Hyperlinks(),
+ TopMargin( 0.0 ), BottomMargin( 0.0 ), LeftMargin( 0.0 ), RightMargin( 0.0 ),
+ HeaderElement( NULL ), FooterElement( NULL )
+ {}
+ private:
+ // helper method for resolveHyperlinks
+ bool resolveHyperlink( std::list<Element*>::iterator link_it, std::list<Element*>& rElements );
+ public:
+ virtual ~PageElement();
+
+ // ElementTreeVisitable
+ virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& rParentIt );
+
+ 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;
+ double BottomMargin;
+ double LeftMargin;
+ double RightMargin;
+ Element* HeaderElement;
+ Element* FooterElement;
+ };
+
+ struct DocumentElement : public Element
+ {
+ friend class ElementFactory;
+ protected:
+ DocumentElement() : Element( NULL ) {}
+ public:
+ virtual ~DocumentElement();
+
+ // ElementTreeVisitable
+ 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
+ {
+ 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*
+ createPolyPolyElement( Element* pParent,
+ sal_Int32 nGCId,
+ const basegfx::B2DPolyPolygon& rPolyPoly,
+ sal_Int8 nAction)
+ { 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.hxx b/sdext/source/pdfimport/tree/imagecontainer.hxx
new file mode 100644
index 000000000000..530bfe64b37c
--- /dev/null
+++ b/sdext/source/pdfimport/tree/imagecontainer.hxx
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: imagecontainer.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_PDFI_IMAGECONTAINER_HXX
+#define INCLUDED_PDFI_IMAGECONTAINER_HXX
+
+#include "pdfihelper.hxx"
+
+#include <rtl/ustring.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/awt/XBitmap.hpp>
+
+#include <vector>
+#include <hash_map>
+
+namespace pdfi
+{
+ struct EmitContext;
+
+ class ImageContainer
+ {
+ private:
+ std::vector< ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue> > m_aImages;
+
+ 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.hxx b/sdext/source/pdfimport/tree/pdfiprocessor.hxx
new file mode 100644
index 000000000000..e8558386e0e0
--- /dev/null
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.hxx
@@ -0,0 +1,295 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: pdfiprocessor.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_PDFI_PROCESSOR_HXX
+#define INCLUDED_PDFI_PROCESSOR_HXX
+
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <com/sun/star/rendering/XVolatileBitmap.hpp>
+#include <com/sun/star/geometry/RealSize2D.hpp>
+#include <com/sun/star/geometry/RealPoint2D.hpp>
+#include <com/sun/star/geometry/RealRectangle2D.hpp>
+#include <com/sun/star/geometry/Matrix2D.hpp>
+
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/range/b2drange.hxx>
+
+#include <rtl/ustring.hxx>
+#include <rtl/ustrbuf.hxx>
+
+#include <boost/shared_ptr.hpp>
+#include <list>
+#include <hash_map>
+
+#include "imagecontainer.hxx"
+#include "pdfihelper.hxx"
+#include "contentsink.hxx"
+#include "treevisitorfactory.hxx"
+#include "genericelements.hxx"
+
+namespace pdfi
+{
+
+ class PDFIProcessor;
+ struct Element;
+ struct DocumentElement;
+ struct PageElement;
+ class ElementFactory;
+ class XmlEmitter;
+ class CharGlyph;
+
+ /** Main entry from the parser
+
+ Creates the internal DOM tree from the render calls
+ */
+ class PDFIProcessor : public ContentSink
+ {
+ public:
+ double fYPrevTextPosition;
+ double fPrevTextHeight;
+ double fXPrevTextPosition;
+ double fPrevTextWidth;
+ enum DocumentTextDirecion { LrTb, RlTb, TbLr };
+
+ explicit PDFIProcessor( const com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator >& );
+
+ /// TEMP - enable writer-like text:p on doc level
+ void enableToplevelText();
+
+ void emit( XmlEmitter& rEmitter,
+ const TreeVisitorFactory& rVisitorFactory );
+
+ sal_Int32 getGCId( const GraphicsContext& rGC );
+ const GraphicsContext& getGraphicsContext( sal_Int32 nGCId ) const;
+ GraphicsContext& getCurrentContext() { return m_aGCStack.back(); }
+ const GraphicsContext& getCurrentContext() const { return m_aGCStack.back(); }
+
+ ImageContainer& getImages() { return m_aImages; }
+ boost::shared_ptr<ElementFactory> getElementFactory() const { return m_pElFactory; }
+
+ const com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator >& getStatusIndicator() const
+ { return m_xStatusIndicator; }
+ void setStatusIndicator( const com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator >& xStatus )
+ { m_xStatusIndicator = xStatus; }
+
+ const FontAttributes& getFont( sal_Int32 nFontId ) const;
+ sal_Int32 getFontId( const FontAttributes& rAttr ) const;
+
+ void sortElements( Element* pElement, bool bDeep = false );
+ void sortDocument( bool bDeep = false );
+ void setWordSpace( double fWordSpace);
+
+ private:
+ void processGlyphLine();
+ void processGlyph( double fPreAvarageSpaceValue,
+ CharGlyph& rGlyph,
+ ParagraphElement* pPara,
+ FrameElement* pFrame,
+ bool bIsWhiteSpaceInLine );
+
+ void drawGlyphLine( const rtl::OUString& rGlyphs,
+ const ::com::sun::star::geometry::RealRectangle2D& rRect,
+ const ::com::sun::star::geometry::Matrix2D& rFontMatrix );
+
+ void drawCharGlyphs( rtl::OUString& rGlyphs,
+ ::com::sun::star::geometry::RealRectangle2D& rRect,
+ ::com::sun::star::geometry::Matrix2D& rFontMatrix,
+ GraphicsContext aGC,
+ Element* pCurElement,
+ ParagraphElement* pPara,
+ FrameElement* pFrame,
+ bool bSpaceFlag );
+
+ GraphicsContext& getTransformGlyphContex( CharGlyph& rGlyph );
+
+ // ContentSink interface implementation
+
+ virtual void setPageNum( sal_Int32 nNumPages );
+ virtual void startPage( const ::com::sun::star::geometry::RealSize2D& rSize );
+ virtual void endPage();
+
+ virtual void hyperLink( const ::com::sun::star::geometry::RealRectangle2D& rBounds,
+ const ::rtl::OUString& rURI );
+ virtual void pushState();
+ virtual void popState();
+ virtual void setFlatness( double );
+ virtual void setTransformation( const ::com::sun::star::geometry::AffineMatrix2D& rMatrix );
+ virtual void setLineDash( const ::com::sun::star::uno::Sequence<double>& dashes,
+ double start );
+ virtual void setLineJoin(sal_Int8);
+ virtual void setLineCap(sal_Int8);
+ virtual void setMiterLimit(double);
+ virtual void setLineWidth(double);
+ virtual void setFillColor( const ::com::sun::star::rendering::ARGBColor& rColor );
+ virtual void setStrokeColor( const ::com::sun::star::rendering::ARGBColor& rColor );
+ virtual void setBlendMode(sal_Int8);
+ virtual void setFont( const FontAttributes& rFont );
+
+ virtual void strokePath( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XPolyPolygon2D >& rPath );
+ virtual void fillPath( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XPolyPolygon2D >& rPath );
+ virtual void eoFillPath( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XPolyPolygon2D >& rPath );
+
+ virtual void intersectClip(const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XPolyPolygon2D >& rPath);
+ virtual void intersectEoClip(const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XPolyPolygon2D >& rPath);
+
+ virtual void drawGlyphs( const rtl::OUString& rGlyphs,
+ const ::com::sun::star::geometry::RealRectangle2D& rRect,
+ const ::com::sun::star::geometry::Matrix2D& rFontMatrix );
+ virtual void endText();
+
+ virtual void drawMask(const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue>& xBitmap,
+ bool bInvert );
+ /// 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 );
+ /** 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<
+ ::com::sun::star::uno::Any>& xMaskColors );
+ virtual void drawMaskedImage(const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue>& xBitmap,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue>& xMask,
+ bool bInvertMask);
+ virtual void drawAlphaMaskedImage(const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue>& xImage,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue>& xMask);
+
+ /// nElements == -1 means fill in number of pages
+ void startIndicator( const rtl::OUString& rText, sal_Int32 nElements = -1 );
+ void endIndicator();
+
+ void setupImage(ImageId nImage);
+
+ 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 );
+ std::vector<CharGlyph> m_GlyphsList;
+
+ boost::shared_ptr<ElementFactory> m_pElFactory;
+ boost::shared_ptr<DocumentElement> m_pDocument;
+ PageElement* m_pCurPage;
+ Element* m_pCurElement;
+ 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_nNextZOrder;
+ double m_fWordSpace;
+ bool m_bIsWhiteSpaceInLine;
+ com::sun::star::uno::Reference<
+ com::sun::star::task::XStatusIndicator >
+ m_xStatusIndicator;
+
+ bool m_bHaveTextOnDocLevel;
+ };
+ class CharGlyph
+ {
+ 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; }
+ double getPrevGlypthsSpace() { 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; }
+
+ private:
+
+ double m_fYPrevGlyphPosition ;
+ double m_fXPrevGlyphPosition ;
+ double m_fPrevGlyphHeight ;
+ double m_fPrevGlyphWidth ;
+ Element* m_pCurElement ;
+ GraphicsContext m_rCurrentContext ;
+ com::sun::star::geometry::Matrix2D m_rFontMatrix ;
+ com::sun::star::geometry::RealRectangle2D m_rRect ;
+ rtl::OUString m_rGlyphs ;
+ };
+}
+
+#define USTR(x) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( x ) )
+
+#endif
diff --git a/sdext/source/pdfimport/tree/style.hxx b/sdext/source/pdfimport/tree/style.hxx
new file mode 100644
index 000000000000..912f0707bcc1
--- /dev/null
+++ b/sdext/source/pdfimport/tree/style.hxx
@@ -0,0 +1,184 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: style.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_PDFI_STYLE_HXX
+#define INCLUDED_PDFI_STYLE_HXX
+
+#include "pdfihelper.hxx"
+#include <hash_map>
+#include <vector>
+#include <rtl/ustring.hxx>
+#include <rtl/string.hxx>
+#include "treevisiting.hxx"
+
+namespace pdfi
+{
+ struct Element;
+ struct EmitContext;
+ struct ElementTreeVisitable;
+
+ class StyleContainer
+ {
+ public:
+ struct Style
+ {
+ rtl::OString Name;
+ PropertyMap Properties;
+ rtl::OUString Contents;
+ Element* ContainedElement;
+ std::vector< Style* > SubStyles;
+
+ Style() : ContainedElement( NULL ) {}
+ Style( const rtl::OString& rName, const PropertyMap& rProps ) :
+ Name( rName ),
+ Properties( rProps ),
+ ContainedElement( NULL )
+ {}
+ };
+
+ private:
+ struct HashedStyle
+ {
+ rtl::OString Name;
+ PropertyMap Properties;
+ 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 ),
+ Contents( rRight.Contents ),
+ ContainedElement( rRight.ContainedElement ),
+ SubStyles( rRight.SubStyles ),
+ IsSubStyle( rRight.IsSubStyle ),
+ RefCount( 0 )
+ {}
+
+ size_t hashCode() const
+ {
+ size_t nRet = size_t(Name.hashCode());
+ for( PropertyMap::const_iterator it = Properties.begin();
+ it != Properties.end(); ++it )
+ {
+ nRet ^= size_t(it->first.hashCode());
+ nRet ^= size_t(it->second.hashCode());
+ }
+ nRet = size_t(Contents.hashCode());
+ nRet ^= size_t(ContainedElement);
+ for( unsigned int n = 0; n < SubStyles.size(); ++n )
+ nRet ^= size_t(SubStyles[n]);
+ return nRet;
+ }
+
+ bool operator==(const HashedStyle& rRight) const
+ {
+ if( Name != rRight.Name ||
+ Properties != rRight.Properties ||
+ Contents != rRight.Contents ||
+ ContainedElement != rRight.ContainedElement ||
+ SubStyles.size() != rRight.SubStyles.size()
+ )
+ return false;
+ for( unsigned int n = 0; n < SubStyles.size(); ++n )
+ {
+ if( SubStyles[n] != rRight.SubStyles[n] )
+ return false;
+ }
+ return true;
+ }
+ };
+
+ struct StyleHash;
+ friend struct StyleHash;
+ struct StyleHash
+ {
+ size_t operator()( const StyleContainer::HashedStyle& rStyle ) const
+ {
+ 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)
+ {}
+ bool operator()( sal_Int32 nLeft, sal_Int32 nRight )
+ {
+ const std::hash_map< sal_Int32, HashedStyle >::const_iterator left_it =
+ m_pMap->find( nLeft );
+ const std::hash_map< sal_Int32, HashedStyle >::const_iterator right_it =
+ m_pMap->find( nRight );
+ if( left_it == m_pMap->end() )
+ return false;
+ else if( right_it == m_pMap->end() )
+ return true;
+ else
+ 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,
+ EmitContext& rContext,
+ ElementTreeVisitor& rContainedElemVisitor );
+
+ public:
+ StyleContainer();
+
+ void emit( EmitContext& rContext,
+ ElementTreeVisitor& rContainedElemVisitor );
+
+ sal_Int32 impl_getStyleId( const Style& rStyle, bool bSubStyle );
+ sal_Int32 getStyleId( const Style& rStyle )
+ { return impl_getStyleId( rStyle, false ); }
+
+ // returns NULL for an invalid style id
+ const PropertyMap* getProperties( sal_Int32 nStyleId ) const;
+ sal_Int32 setProperties( sal_Int32 nStyleId, const PropertyMap &rNewProps );
+ rtl::OUString getStyleName( sal_Int32 nStyle ) const;
+ };
+}
+
+#endif
diff --git a/sdext/source/pdfimport/tree/treevisiting.hxx b/sdext/source/pdfimport/tree/treevisiting.hxx
new file mode 100644
index 000000000000..0aba4cd547cb
--- /dev/null
+++ b/sdext/source/pdfimport/tree/treevisiting.hxx
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: treevisiting.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_PDFI_TREEVISITING_HXX
+#define INCLUDED_PDFI_TREEVISITING_HXX
+
+#include <sal/config.h>
+#include <list>
+
+
+namespace pdfi
+{
+ class PDFIProcessor;
+ class StyleContainer;
+ struct HyperlinkElement;
+ struct TextElement;
+ struct ParagraphElement;
+ struct FrameElement;
+ struct PolyPolyElement;
+ struct ImageElement;
+ struct PageElement;
+ struct DocumentElement;
+ struct EmitContext;
+ struct Element;
+
+ /** To be visited by all tree element types
+
+ Visitor interface from the "visitor pattern". Implementor gets
+ called with actual tree node instances.
+ */
+ struct ElementTreeVisitor
+ {
+ virtual void visit( HyperlinkElement&, const std::list< Element* >::const_iterator& ) = 0;
+ virtual void visit( TextElement&, const std::list< Element* >::const_iterator& ) = 0;
+ virtual void visit( ParagraphElement&, const std::list< Element* >::const_iterator& ) = 0;
+ virtual void visit( FrameElement&, const std::list< Element* >::const_iterator& ) = 0;
+ virtual void visit( PolyPolyElement&, const std::list< Element* >::const_iterator& ) = 0;
+ virtual void visit( ImageElement&, const std::list< Element* >::const_iterator& ) = 0;
+ virtual void visit( PageElement&, const std::list< Element* >::const_iterator& ) = 0;
+ virtual void visit( DocumentElement&, const std::list< Element* >::const_iterator& ) = 0;
+ };
+ typedef boost::shared_ptr<ElementTreeVisitor> ElementTreeVisitorSharedPtr;
+
+ /** Visitee interface
+
+ To be implemented by every tree node that needs to be
+ visitable.
+ */
+ struct ElementTreeVisitable
+ {
+ virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& rParentIt ) = 0;
+ };
+ typedef boost::shared_ptr<ElementTreeVisitable> ElementTreeVisitableSharedPtr;
+}
+
+#endif
diff --git a/sdext/source/pdfimport/tree/writertreevisiting.hxx b/sdext/source/pdfimport/tree/writertreevisiting.hxx
new file mode 100644
index 000000000000..a02dcc6d6712
--- /dev/null
+++ b/sdext/source/pdfimport/tree/writertreevisiting.hxx
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: writertreevisiting.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_PDFI_WRITERTREEVISITING_HXX
+#define INCLUDED_PDFI_WRITERTREEVISITING_HXX
+
+#include "treevisiting.hxx"
+
+namespace pdfi
+{
+ struct DrawElement;
+
+ class WriterXmlOptimizer : public ElementTreeVisitor
+ {
+ private:
+ PDFIProcessor& m_rProcessor;
+ void optimizeTextElements(Element& rParent);
+ void checkHeaderAndFooter( PageElement& rElem );
+
+ public:
+ explicit WriterXmlOptimizer(PDFIProcessor& rProcessor) :
+ m_rProcessor(rProcessor)
+ {}
+ virtual ~WriterXmlOptimizer()
+ {}
+
+ virtual void visit( HyperlinkElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( TextElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( ParagraphElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( FrameElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( PolyPolyElement&, const std::list< Element* >::const_iterator& );
+ 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& );
+ };
+
+ class WriterXmlFinalizer : public ElementTreeVisitor
+ {
+ private:
+ StyleContainer& m_rStyleContainer;
+ PDFIProcessor& m_rProcessor;
+
+ void setFirstOnPage( ParagraphElement& rElem,
+ StyleContainer& rStyles,
+ const rtl::OUString& rMasterPageName );
+
+ public:
+ explicit WriterXmlFinalizer(StyleContainer& rStyleContainer,
+ PDFIProcessor& rProcessor) :
+ m_rStyleContainer(rStyleContainer),
+ m_rProcessor(rProcessor)
+ {}
+ virtual ~WriterXmlFinalizer()
+ {}
+
+ virtual void visit( HyperlinkElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( TextElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( ParagraphElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( FrameElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( PolyPolyElement&, const std::list< Element* >::const_iterator& );
+ 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& );
+ };
+
+ class WriterXmlEmitter : public ElementTreeVisitor
+ {
+ private:
+ EmitContext& m_rEmitContext ;
+ void fillFrameProps( DrawElement& rElem,
+ PropertyMap& rProps,
+ const EmitContext& rEmitContext );
+
+ public:
+ explicit WriterXmlEmitter(EmitContext& rEmitContext) :
+ m_rEmitContext(rEmitContext)
+ {}
+ virtual ~WriterXmlEmitter()
+ {}
+
+ virtual void visit( HyperlinkElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( TextElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( ParagraphElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( FrameElement&, const std::list< Element* >::const_iterator& );
+ virtual void visit( PolyPolyElement&, const std::list< Element* >::const_iterator& );
+ 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