Kaydet (Commit) 460c55f6 authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Noel Power

Modify constructor, remove setters + unused define

Change-Id: Ibf878c44ae761e59a04b6d5023296c5918cbf85e
Reviewed-on: https://gerrit.libreoffice.org/1665Reviewed-by: 's avatarNoel Power <noel.power@suse.com>
Tested-by: 's avatarNoel Power <noel.power@suse.com>
üst d276d3f3
...@@ -440,19 +440,11 @@ void PDFIProcessor::drawGlyphLine( const rtl::OUString& rGlyphs, ...@@ -440,19 +440,11 @@ void PDFIProcessor::drawGlyphLine( const rtl::OUString& rGlyphs,
processGlyphLine(); 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 ); getGCId(getCurrentContext());
aGlyph.setXPrevGlyphPosition( fXPrevTextPosition );
aGlyph.setPrevGlyphHeight ( fPrevTextHeight );
aGlyph.setPrevGlyphWidth ( fPrevTextWidth );
m_GlyphsList.push_back( aGlyph ); m_GlyphsList.push_back( aGlyph );
......
...@@ -242,7 +242,13 @@ namespace pdfi ...@@ -242,7 +242,13 @@ namespace pdfi
class CharGlyph class CharGlyph
{ {
public: 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(){}; virtual ~CharGlyph(){};
rtl::OUString& getGlyph(){ return m_rGlyphs; } rtl::OUString& getGlyph(){ return m_rGlyphs; }
com::sun::star::geometry::RealRectangle2D& getRect(){ return m_rRect; } com::sun::star::geometry::RealRectangle2D& getRect(){ return m_rRect; }
...@@ -250,12 +256,6 @@ namespace pdfi ...@@ -250,12 +256,6 @@ namespace pdfi
GraphicsContext& getGC(){ return m_rCurrentContext; } GraphicsContext& getGC(){ return m_rCurrentContext; }
Element* getCurElement(){ return m_pCurElement; } 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 getYPrevGlyphPosition() const { return m_fYPrevGlyphPosition; }
double getXPrevGlyphPosition() const { return m_fXPrevGlyphPosition; } double getXPrevGlyphPosition() const { return m_fXPrevGlyphPosition; }
double getPrevGlyphHeight() const { return m_fPrevGlyphHeight; } double getPrevGlyphHeight() const { return m_fPrevGlyphHeight; }
...@@ -268,15 +268,10 @@ namespace pdfi ...@@ -268,15 +268,10 @@ namespace pdfi
return m_rRect.X1-m_fXPrevGlyphPosition; 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: private:
double m_fYPrevGlyphPosition ;
double m_fXPrevGlyphPosition ; double m_fXPrevGlyphPosition ;
double m_fYPrevGlyphPosition ;
double m_fPrevGlyphHeight ; double m_fPrevGlyphHeight ;
double m_fPrevGlyphWidth ; double m_fPrevGlyphWidth ;
Element* m_pCurElement ; Element* m_pCurElement ;
...@@ -287,8 +282,6 @@ namespace pdfi ...@@ -287,8 +282,6 @@ namespace pdfi
}; };
} }
#define USTR(x) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( x ) )
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment