diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-03 09:59:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-04 00:51:57 +0000 |
commit | c6223049651d6607101ef04271773e478a429c8a (patch) | |
tree | f2bfb8c976896009409ae47780c324d3a9b51c77 /lotuswordpro | |
parent | 242ed97d9a74a08363e1306452bba20f06d673e4 (diff) |
V813: Decreased performance
Change-Id: Ica2563d9e8da15e19eb38246d4de54a1fcb75655
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfdrawobj.hxx | 14 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfdrawpath.hxx | 10 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfdrawpolyline.hxx | 24 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfdrawrect.hxx | 10 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfinputlist.hxx | 22 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfrect.hxx | 2 |
6 files changed, 35 insertions, 47 deletions
diff --git a/lotuswordpro/source/filter/xfilter/xfdrawobj.hxx b/lotuswordpro/source/filter/xfilter/xfdrawobj.hxx index 300b15ca4d43..7dcfa32c0bb8 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawobj.hxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawobj.hxx @@ -91,7 +91,12 @@ public: /** * @descr Set drawing object rotate. */ - void SetRotate(double degree, XFPoint aRotatePoint=XFPoint(0,0)); + void SetRotate(double degree, const XFPoint& rRotatePoint=XFPoint(0,0)) + { + m_nFlag |= XFDRAWOBJECT_FLAG_ROTATE; + m_fRotate = degree*2*PI/360; + m_aRotatePoint = rRotatePoint; + } /** * @descr Set drawing object scale. @@ -130,13 +135,6 @@ inline void XFDrawObject::SetTextStyleName(const OUString& style) m_strTextStyle = style; } -inline void XFDrawObject::SetRotate(double degree, XFPoint aRotatePoint) -{ - m_nFlag |= XFDRAWOBJECT_FLAG_ROTATE; - m_fRotate = degree*2*PI/360; - m_aRotatePoint = aRotatePoint; -} - inline void XFDrawObject::SetScale(double cx, double cy) { m_nFlag |= XFDRAWOBJECT_FLAG_SCALE; diff --git a/lotuswordpro/source/filter/xfilter/xfdrawpath.hxx b/lotuswordpro/source/filter/xfilter/xfdrawpath.hxx index f567d902953b..283768f98b56 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawpath.hxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawpath.hxx @@ -81,7 +81,10 @@ public: /** * @descr Set svg path point. */ - void AddPoint(XFPoint pt); + void AddPoint(const XFPoint& pt) + { + m_aPoints.push_back(pt); + } OUString ToString(); @@ -132,11 +135,6 @@ inline void XFSvgPathEntry::SetCommand(const OUString& cmd) m_strCommand = cmd; } -inline void XFSvgPathEntry::AddPoint(XFPoint pt) -{ - m_aPoints.push_back(pt); -} - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawpolyline.hxx b/lotuswordpro/source/filter/xfilter/xfdrawpolyline.hxx index d7b7b994ba35..52968d40257c 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawpolyline.hxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawpolyline.hxx @@ -69,9 +69,17 @@ public: XFDrawPolyline(); public: - void AddPoint(double x, double y); + void AddPoint(double x, double y) + { + assert(x>=0&&y>=0); + m_aPoints.push_back( XFPoint(x,y) ); + } - void AddPoint(XFPoint pt); + void AddPoint(const XFPoint& pt) + { + assert(pt.GetX()>=0&&pt.GetY()>=0); + m_aPoints.push_back(pt); + } XFRect CalcViewBox(); @@ -81,17 +89,5 @@ protected: std::vector<XFPoint> m_aPoints; }; -inline void XFDrawPolyline::AddPoint(double x, double y) -{ - assert(x>=0&&y>=0); - m_aPoints.push_back( XFPoint(x,y) ); -} - -inline void XFDrawPolyline::AddPoint(XFPoint pt) -{ - assert(pt.GetX()>=0&&pt.GetY()>=0); - m_aPoints.push_back(pt); -} - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawrect.hxx b/lotuswordpro/source/filter/xfilter/xfdrawrect.hxx index 0dab2ef81873..d67a51c9ea9d 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawrect.hxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawrect.hxx @@ -68,7 +68,10 @@ public: XFDrawRect(); public: - void SetStartPoint(XFPoint pt); + void SetStartPoint(const XFPoint& pt) + { + m_aRect.SetStartPoint(pt); + } void SetSize(double width, double height); @@ -84,11 +87,6 @@ private: double m_fCornerRadius; }; -inline void XFDrawRect::SetStartPoint(XFPoint pt) -{ - m_aRect.SetStartPoint(pt); -} - inline void XFDrawRect::SetSize(double width, double height) { m_aRect.SetSize(width,height); diff --git a/lotuswordpro/source/filter/xfilter/xfinputlist.hxx b/lotuswordpro/source/filter/xfilter/xfinputlist.hxx index c903c5a8f560..a4e36800df04 100644 --- a/lotuswordpro/source/filter/xfilter/xfinputlist.hxx +++ b/lotuswordpro/source/filter/xfilter/xfinputlist.hxx @@ -69,24 +69,22 @@ class XFInputList : public XFContent { public: - void SetName(const OUString& sName); - void SetLabels(std::vector<OUString> list); + void SetName(const OUString& sName) + { + m_strName = sName; + } + + void SetLabels(const std::vector<OUString>& list) + { + m_list=list; + } + virtual void ToXml(IXFStream *pStrm) SAL_OVERRIDE; private: OUString m_strName; std::vector<OUString> m_list; }; -inline void XFInputList::SetName(const OUString& sName) -{ - m_strName = sName; -} - -inline void XFInputList::SetLabels(std::vector<OUString> list) -{ - m_list=list; -} - inline void XFInputList::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); diff --git a/lotuswordpro/source/filter/xfilter/xfrect.hxx b/lotuswordpro/source/filter/xfilter/xfrect.hxx index 7c1636424fc7..5c2905969883 100644 --- a/lotuswordpro/source/filter/xfilter/xfrect.hxx +++ b/lotuswordpro/source/filter/xfilter/xfrect.hxx @@ -117,7 +117,7 @@ public: return m_fHeight; } - void SetStartPoint(XFPoint pt) + void SetStartPoint(const XFPoint& pt) { m_aPoint = pt; } |