summaryrefslogtreecommitdiffstats
path: root/starmath
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2017-01-17 13:21:13 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2017-01-17 11:39:41 +0000
commit98e910fbecd3e4f4fee7b527f332a3f7219aebd9 (patch)
tree685e4d0a0ff57da3e54af920df075e9b9bfbebc4 /starmath
parentnew loplugin: useuniqueptr: forms..framework (diff)
downloadcore-98e910fbecd3e4f4fee7b527f332a3f7219aebd9.tar.gz
core-98e910fbecd3e4f4fee7b527f332a3f7219aebd9.zip
starmath: Rely on the default ctors for SmRect
No need to define its copy ctor manually nor to use placement new for assignment operator. Change-Id: I679a19c1d1a87072d818cdfa4a9347edb6f4cea1 Reviewed-on: https://gerrit.libreoffice.org/33202 Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp> Tested-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/rect.hxx12
-rw-r--r--starmath/source/rect.cxx20
2 files changed, 0 insertions, 32 deletions
diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
index 5f20fdac1b6f..5c58b9d7efee 100644
--- a/starmath/inc/rect.hxx
+++ b/starmath/inc/rect.hxx
@@ -20,8 +20,6 @@
#ifndef INCLUDED_STARMATH_INC_RECT_HXX
#define INCLUDED_STARMATH_INC_RECT_HXX
-#include <new>
-
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
#include <tools/gen.hxx>
@@ -122,7 +120,6 @@ public:
SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
const OUString &rText, long nBorderWidth);
SmRect(long nWidth, long nHeight);
- SmRect(const SmRect &rRect);
sal_uInt16 GetBorderWidth() const { return nBorderWidth; }
@@ -193,8 +190,6 @@ public:
bool IsInsideRect(const Point &rPoint) const;
bool IsInsideItalicRect(const Point &rPoint) const;
- inline SmRect & operator = (const SmRect &rRect);
-
inline Rectangle AsRectangle() const;
SmRect AsGlyphRect() const;
};
@@ -225,13 +220,6 @@ inline long SmRect::GetBaseline() const
}
-inline SmRect & SmRect::operator = (const SmRect &rRect)
-{
- new (this) SmRect(rRect); // placement new
- return *this;
-}
-
-
inline Rectangle SmRect::AsRectangle() const
{
return Rectangle(Point(GetItalicLeft(), GetTop()), GetItalicSize());
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 6252e5551f5c..4b26bcae42b8 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -94,26 +94,6 @@ SmRect::SmRect()
}
-SmRect::SmRect(const SmRect &rRect)
- : aTopLeft(rRect.aTopLeft)
- , aSize(rRect.aSize)
- , nBaseline(rRect.nBaseline)
- , nAlignT(rRect.nAlignT)
- , nAlignM(rRect.nAlignM)
- , nAlignB(rRect.nAlignB)
- , nGlyphTop(rRect.nGlyphTop)
- , nGlyphBottom(rRect.nGlyphBottom)
- , nItalicLeftSpace(rRect.nItalicLeftSpace)
- , nItalicRightSpace(rRect.nItalicRightSpace)
- , nLoAttrFence(rRect.nLoAttrFence)
- , nHiAttrFence(rRect.nHiAttrFence)
- , nBorderWidth(rRect.nBorderWidth)
- , bHasBaseline(rRect.bHasBaseline)
- , bHasAlignInfo(rRect.bHasAlignInfo)
-{
-}
-
-
void SmRect::CopyAlignInfo(const SmRect &rRect)
{
nBaseline = rRect.nBaseline;