[Libreoffice-commits] core.git: starmath/inc starmath/source

Takeshi Abe tabe at fixedpoint.jp
Tue Jan 17 11:40:04 UTC 2017


 starmath/inc/rect.hxx    |   12 ------------
 starmath/source/rect.cxx |   20 --------------------
 2 files changed, 32 deletions(-)

New commits:
commit 98e910fbecd3e4f4fee7b527f332a3f7219aebd9
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue Jan 17 13:21:13 2017 +0900

    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 at fixedpoint.jp>
    Tested-by: Takeshi Abe <tabe at fixedpoint.jp>

diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
index 5f20fda..5c58b9d 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 6252e55..4b26bca 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;


More information about the Libreoffice-commits mailing list