[Libreoffice-commits] core.git: editeng/source
Julien Nabet
serval2412 at yahoo.fr
Sun Dec 20 12:58:37 PST 2015
editeng/source/editeng/impedit.cxx | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
New commits:
commit f909e39f98ee5e5e8e879865f7747e7776cc96ed
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun Dec 20 21:55:42 2015 +0100
cppcheck: false positive memleak
Help cppcheck by tweaking a bit the code.
No functional diff
Change-Id: If495b0ff845b16522d19da0b723db08b4481e995
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index d8e9a2d..f14d57c 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -186,14 +186,12 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
if (comphelper::LibreOfficeKit::isActive() && !pRegion)
pRegion = &aRegion;
- tools::PolyPolygon* pPolyPoly = nullptr;
- if ( pRegion )
- pPolyPoly = new tools::PolyPolygon;
-
OutputDevice* pTarget = pTargetDevice ? pTargetDevice : pOutWin;
bool bClipRegion = pTarget->IsClipRegion();
vcl::Region aOldRegion = pTarget->GetClipRegion();
+ tools::PolyPolygon* pPolyPoly = nullptr;
+
if ( !pRegion )
{
if ( !pEditEngine->pImpEditEngine->GetUpdateMode() )
@@ -214,6 +212,10 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
if ( pOutWin->GetCursor() )
pOutWin->GetCursor()->Hide();
}
+ else
+ {
+ pPolyPoly = new tools::PolyPolygon;
+ }
DBG_ASSERT( !pEditEngine->IsIdleFormatterActive(), "DrawSelection: Not formatted!" );
aTmpSel.Adjust( pEditEngine->GetEditDoc() );
More information about the Libreoffice-commits
mailing list