summaryrefslogtreecommitdiff
path: root/vcl/inc/sallayout.hxx
diff options
context:
space:
mode:
authorTamas Bunth <tamas.bunth@collabora.co.uk>2017-06-07 04:38:27 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-06-07 13:52:17 +0200
commitcb9be0e492d047648185ae80553220fd9b538746 (patch)
treec8ae318427e59c3c32fed32080903f5e442bc579 /vcl/inc/sallayout.hxx
parent61c3e678f4efb19fb2396de43075cf6a1e0afd99 (diff)
Replace vcl::SalLayout Release with destructor
Replace SalLayout::Release() with normal destructor mechanism. Release() uses reference counting for the layout. But in practice, the reference counting variable is initialized in ctor and is not incremented elsewhere. So I removed the Release() method and replaced all the Release() calls with 'delete'. It will make easier the use of smart pointers and decrease the chance of memory leaks. Change-Id: Ia2e142dea10b87e232d5757d84778e62d87cf081 Reviewed-on: https://gerrit.libreoffice.org/38488 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl/inc/sallayout.hxx')
-rw-r--r--vcl/inc/sallayout.hxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index d4a960d63432..c90f029f7d70 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -151,6 +151,7 @@ std::ostream &operator <<(std::ostream& s, ImplLayoutArgs &rArgs);
class VCL_PLUGIN_PUBLIC SalLayout
{
public:
+ virtual ~SalLayout();
// used by upper layers
Point& DrawBase() { return maDrawBase; }
const Point& DrawBase() const { return maDrawBase; }
@@ -179,9 +180,6 @@ public:
virtual bool GetOutline( SalGraphics&, basegfx::B2DPolyPolygonVector& ) const;
virtual bool GetBoundRect( SalGraphics&, tools::Rectangle& ) const;
- // reference counting
- void Release() const;
-
// used by glyph+font+script fallback
virtual void MoveGlyph( int nStart, long nNewXPos ) = 0;
virtual void DropGlyph( int nStart ) = 0;
@@ -193,7 +191,6 @@ public:
protected:
// used by layout engines
SalLayout();
- virtual ~SalLayout();
static int CalcAsianKerning( sal_UCS4, bool bLeft, bool bVertical );
@@ -209,7 +206,6 @@ protected:
int mnUnitsPerPixel;
int mnOrientation;
- mutable int mnRefCount;
mutable Point maDrawOffset;
Point maDrawBase;
};