[Libreoffice-commits] core.git: 2 commits - filter/source helpcontent2
Caolán McNamara
caolanm at redhat.com
Mon Oct 2 19:59:57 UTC 2017
filter/source/graphicfilter/icgm/bitmap.cxx | 29 +++++++++++++---------------
filter/source/graphicfilter/icgm/bitmap.hxx | 2 -
filter/source/graphicfilter/icgm/class4.cxx | 7 ++----
helpcontent2 | 2 -
4 files changed, 19 insertions(+), 21 deletions(-)
New commits:
commit 34e8fd7e99489e9f50a512b07c6f3923b358b4d3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 2 16:29:36 2017 +0100
ofz#3537 Direct-leak
Change-Id: Icca25565d396a36154bca0ac748554e95cd83ae9
Reviewed-on: https://gerrit.libreoffice.org/43049
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx b/filter/source/graphicfilter/icgm/bitmap.cxx
index 215b46a17019..71a64eedcddc 100644
--- a/filter/source/graphicfilter/icgm/bitmap.cxx
+++ b/filter/source/graphicfilter/icgm/bitmap.cxx
@@ -347,27 +347,26 @@ void CGMBitmap::ImplInsert( CGMBitmapDescriptor& rSource, CGMBitmapDescriptor& r
rDest.mndy += rSource.mndy;
};
-CGMBitmap* CGMBitmap::GetNext()
+std::unique_ptr<CGMBitmap> CGMBitmap::GetNext()
{
- if ( pCGMBitmapDescriptor->mpBitmap && pCGMBitmapDescriptor->mbStatus )
+ std::unique_ptr<CGMBitmap> xCGMTempBitmap;
+ if (pCGMBitmapDescriptor->mpBitmap && pCGMBitmapDescriptor->mbStatus)
{
- CGMBitmap* pCGMTempBitmap = new CGMBitmap( *mpCGM );
- if ( ( (long)pCGMTempBitmap->pCGMBitmapDescriptor->mnOrientation == (long)pCGMBitmapDescriptor->mnOrientation ) &&
- ( ( ( pCGMTempBitmap->pCGMBitmapDescriptor->mnR.X == pCGMBitmapDescriptor->mnQ.X ) &&
- ( pCGMTempBitmap->pCGMBitmapDescriptor->mnR.Y == pCGMBitmapDescriptor->mnQ.Y ) ) ||
- ( ( pCGMTempBitmap->pCGMBitmapDescriptor->mnQ.X == pCGMBitmapDescriptor->mnR.X ) &&
- ( pCGMTempBitmap->pCGMBitmapDescriptor->mnQ.Y == pCGMBitmapDescriptor->mnR.Y ) ) ) )
+ xCGMTempBitmap.reset(new CGMBitmap(*mpCGM));
+ if ( ( (long)xCGMTempBitmap->pCGMBitmapDescriptor->mnOrientation == (long)pCGMBitmapDescriptor->mnOrientation ) &&
+ ( ( ( xCGMTempBitmap->pCGMBitmapDescriptor->mnR.X == pCGMBitmapDescriptor->mnQ.X ) &&
+ ( xCGMTempBitmap->pCGMBitmapDescriptor->mnR.Y == pCGMBitmapDescriptor->mnQ.Y ) ) ||
+ ( ( xCGMTempBitmap->pCGMBitmapDescriptor->mnQ.X == pCGMBitmapDescriptor->mnR.X ) &&
+ ( xCGMTempBitmap->pCGMBitmapDescriptor->mnQ.Y == pCGMBitmapDescriptor->mnR.Y ) ) ) )
{
- ImplInsert( *(pCGMTempBitmap->pCGMBitmapDescriptor), *(pCGMBitmapDescriptor) );
- delete pCGMTempBitmap;
- return nullptr;
+ ImplInsert( *(xCGMTempBitmap->pCGMBitmapDescriptor), *(pCGMBitmapDescriptor) );
+ xCGMTempBitmap.reset();
+ return xCGMTempBitmap;
}
- pCGMBitmapDescriptor.swap(pCGMTempBitmap->pCGMBitmapDescriptor);
- return pCGMTempBitmap;
+ pCGMBitmapDescriptor.swap(xCGMTempBitmap->pCGMBitmapDescriptor);
}
- else
- return nullptr;
+ return xCGMTempBitmap;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/icgm/bitmap.hxx b/filter/source/graphicfilter/icgm/bitmap.hxx
index 586b0e7cd4d6..ccf0f043cf45 100644
--- a/filter/source/graphicfilter/icgm/bitmap.hxx
+++ b/filter/source/graphicfilter/icgm/bitmap.hxx
@@ -83,7 +83,7 @@ public:
explicit CGMBitmap( CGM& rCGM );
~CGMBitmap();
CGMBitmapDescriptor* GetBitmap() { return pCGMBitmapDescriptor.get();}
- CGMBitmap* GetNext();
+ std::unique_ptr<CGMBitmap> GetNext();
};
#endif
diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx
index c505b39a90cf..87ce8e129769 100644
--- a/filter/source/graphicfilter/icgm/class4.cxx
+++ b/filter/source/graphicfilter/icgm/class4.cxx
@@ -309,11 +309,10 @@ void CGM::ImplDoClass4()
if ( mpBitmapInUse )
{
- CGMBitmap* pBmpDesc = mpBitmapInUse->GetNext();
- if ( pBmpDesc ) // we possibly get a bitmap back which does not fit to
+ std::unique_ptr<CGMBitmap> xBmpDesc(mpBitmapInUse->GetNext());
+ if (xBmpDesc) // we possibly get a bitmap back which does not fit to
{ // to the previous -> we need to delete this one too
- mpOutAct->DrawBitmap( pBmpDesc->GetBitmap() );
- delete pBmpDesc;
+ mpOutAct->DrawBitmap(xBmpDesc->GetBitmap());
}
}
else
commit e4c4c21d46ed2c8f7d117ce8d7f407474c2a12bc
Author: Gabor Kelemen <kelemeng at gnome.hu>
Date: Mon Oct 2 21:49:16 2017 +0200
Updated core
Project: help aa1e7fffd4f067414833d593cd0307bd2dc9d6f9
tdf#112804 Fix key combination for inserting paragraph before table
Change-Id: Ibe077bd39c5e2a44520052ae0afa9cd69ca59991
Reviewed-on: https://gerrit.libreoffice.org/43054
Reviewed-by: Gabor Kelemen <kelemeng at ubuntu.com>
Tested-by: Gabor Kelemen <kelemeng at ubuntu.com>
diff --git a/helpcontent2 b/helpcontent2
index 9ff4dd9cbd32..aa1e7fffd4f0 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 9ff4dd9cbd323794e72d08e297b59cc09d1abbe0
+Subproject commit aa1e7fffd4f067414833d593cd0307bd2dc9d6f9
More information about the Libreoffice-commits
mailing list