[PATCH] Modify constructor, remove setters + unused define
Julien Nabet (via Code Review)
gerrit at gerrit.libreoffice.org
Sun Jan 13 05:04:12 PST 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1665
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/65/1665/1
Modify constructor, remove setters + unused define
Change-Id: Ibf878c44ae761e59a04b6d5023296c5918cbf85e
---
M sdext/source/pdfimport/tree/pdfiprocessor.cxx
M sdext/source/pdfimport/tree/pdfiprocessor.hxx
2 files changed, 11 insertions(+), 26 deletions(-)
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index b166a37..01585e5 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -440,19 +440,11 @@
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 );
m_GlyphsList.push_back( aGlyph );
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.hxx b/sdext/source/pdfimport/tree/pdfiprocessor.hxx
index a288c64..1e4af25 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.hxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.hxx
@@ -242,19 +242,19 @@
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; }
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() const { return m_fYPrevGlyphPosition; }
double getXPrevGlyphPosition() const { return m_fXPrevGlyphPosition; }
@@ -268,15 +268,10 @@
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 ;
@@ -286,8 +281,6 @@
rtl::OUString m_rGlyphs ;
};
}
-
-#define USTR(x) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( x ) )
#endif
--
To view, visit https://gerrit.libreoffice.org/1665
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf878c44ae761e59a04b6d5023296c5918cbf85e
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Julien Nabet <serval2412 at yahoo.fr>
More information about the LibreOffice
mailing list