sw/source/core/doc/docbm.cxx |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit d86d3353ce400c4ff1afeb325b98e24d386909b5
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Wed Jul 3 13:16:46 2019 +0200
Commit:     Michael Stahl <michael.st...@cib.de>
CommitDate: Wed Jul 3 16:02:24 2019 +0200

    sw: remove useless local pMarkBase in makeMark()
    
    Change-Id: I26ae1a8a33e0d7822975abdfd5c74a2ef5ac45e9
    Reviewed-on: https://gerrit.libreoffice.org/75034
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@cib.de>

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index f3a13c2d6841..b603d5f608b8 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -603,17 +603,13 @@ namespace sw { namespace mark
         assert(pMark.get() &&
             "MarkManager::makeMark(..)"
             " - Mark was not created.");
-        MarkBase *const pMarkBase = pMark.get(); // TODO?
-
-        if (!pMarkBase)
-            return nullptr;
 
         if(pMark->GetMarkPos() != pMark->GetMarkStart())
-            pMarkBase->Swap();
+            pMark->Swap();
 
         // for performance reasons, we trust UnoMarks to have a (generated) 
unique name
         if ( eType != IDocumentMarkAccess::MarkType::UNO_BOOKMARK )
-            pMarkBase->SetName( getUniqueMarkName( pMarkBase->GetName() ) );
+            pMark->SetName( getUniqueMarkName( pMark->GetName() ) );
 
         // register mark
         lcl_InsertMarkSorted(m_vAllMarks, pMark.get());
@@ -638,7 +634,7 @@ namespace sw { namespace mark
                 // no special array for these
                 break;
         }
-        pMarkBase->InitDoc(m_pDoc, eMode);
+        pMark->InitDoc(m_pDoc, eMode);
         SAL_INFO("sw.core", "--- makeType ---");
         SAL_INFO("sw.core", "Marks");
         lcl_DebugMarks(m_vAllMarks);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to