summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-01-13 14:01:57 +0100
committerNoel Power <noel.power@suse.com>2013-01-14 18:32:38 +0000
commit460c55f620a1bab7aa8f740dc85a60ce0cdf583c (patch)
treee19b2aee06e95829b9377f3910ee451ba83d1ef0 /sdext
parentd276d3f3ae112a11c8cb5768650d147cbb94275e (diff)
Modify constructor, remove setters + unused define
Change-Id: Ibf878c44ae761e59a04b6d5023296c5918cbf85e Reviewed-on: https://gerrit.libreoffice.org/1665 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/tree/pdfiprocessor.cxx14
-rw-r--r--sdext/source/pdfimport/tree/pdfiprocessor.hxx23
2 files changed, 11 insertions, 26 deletions
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index b166a3749784..01585e556b99 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -440,19 +440,11 @@ void PDFIProcessor::drawGlyphLine( const rtl::OUString& rGlyphs,
processGlyphLine();
}
- CharGlyph aGlyph;
+ CharGlyph aGlyph(fXPrevTextPosition, fYPrevTextPosition, fPrevTextHeight, fPrevTextWidth,
+ m_pCurElement, getCurrentContext(), rFontMatrix, rRect, rGlyphs);
- 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 );
+ getGCId(getCurrentContext());
m_GlyphsList.push_back( aGlyph );
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.hxx b/sdext/source/pdfimport/tree/pdfiprocessor.hxx
index a288c64b2988..1e4af2513205 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.hxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.hxx
@@ -242,7 +242,13 @@ namespace pdfi
class CharGlyph
{
public:
- CharGlyph(){};
+ CharGlyph(double fXPrevGlyphPosition, double fYPrevGlyphPosition, double fPrevGlyphHeight, double fPrevGlyphWidth,
+ Element* pCurElement, const GraphicsContext& rCurrentContext, const com::sun::star::geometry::Matrix2D& rFontMatrix,
+ const com::sun::star::geometry::RealRectangle2D& rRect, const rtl::OUString& rGlyphs )
+ : m_fXPrevGlyphPosition(fXPrevGlyphPosition), m_fYPrevGlyphPosition(fYPrevGlyphPosition), m_fPrevGlyphHeight(fPrevGlyphHeight),
+ m_fPrevGlyphWidth(fPrevGlyphWidth), m_pCurElement(pCurElement), m_rCurrentContext(rCurrentContext),
+ m_rFontMatrix(rFontMatrix), m_rRect(rRect), m_rGlyphs(rGlyphs) {};
+
virtual ~CharGlyph(){};
rtl::OUString& getGlyph(){ return m_rGlyphs; }
com::sun::star::geometry::RealRectangle2D& getRect(){ return m_rRect; }
@@ -250,12 +256,6 @@ namespace pdfi
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() const { return m_fYPrevGlyphPosition; }
double getXPrevGlyphPosition() const { return m_fXPrevGlyphPosition; }
double getPrevGlyphHeight() const { return m_fPrevGlyphHeight; }
@@ -268,15 +268,10 @@ namespace pdfi
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_fYPrevGlyphPosition ;
double m_fPrevGlyphHeight ;
double m_fPrevGlyphWidth ;
Element* m_pCurElement ;
@@ -287,8 +282,6 @@ namespace pdfi
};
}
-#define USTR(x) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( x ) )
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */