[Libreoffice-commits] core.git: editeng/source

Jochen Nitschke j.nitschke+logerrit at ok.de
Mon Feb 20 06:02:36 UTC 2017


 editeng/source/editeng/editobj.cxx |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 673dddaf9d6f49ff43724ff84122451bb4df94f2
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Sun Feb 19 22:58:40 2017 +0100

    this can't be nullptr
    
    Change-Id: I33a18fe4c03a921e834ac6ea4234ddaf42a390e2
    Reviewed-on: https://gerrit.libreoffice.org/34435
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 3e3e8b7..7e9cccb 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -476,7 +476,7 @@ void EditTextObject::dumpAsXml(xmlTextWriterPtr pWriter) const
 // from SfxItemPoolUser
 void EditTextObjectImpl::ObjectInDestruction(const SfxItemPool& rSfxItemPool)
 {
-    if(!bOwnerOfPool && pPool && pPool == &rSfxItemPool)
+    if(!bOwnerOfPool && pPool == &rSfxItemPool)
     {
         // The pool we are based on gets destructed; get owner of pool by creating own one.
         // No need to call RemoveSfxItemPoolUser(), this is done from the pool's destructor
@@ -484,10 +484,7 @@ void EditTextObjectImpl::ObjectInDestruction(const SfxItemPool& rSfxItemPool)
         // pool if needed, but only text attributes should be used.
         SfxItemPool* pNewPool = EditEngine::CreatePool();
 
-        if(pPool)
-        {
-            pNewPool->SetDefaultMetric(pPool->GetMetric(DEF_METRIC));
-        }
+        pNewPool->SetDefaultMetric(pPool->GetMetric(DEF_METRIC));
 
         ContentInfosType aReplaced;
         aReplaced.reserve(aContents.size());


More information about the Libreoffice-commits mailing list