diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2019-07-03 13:16:46 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-07-03 16:02:24 +0200 |
commit | d86d3353ce400c4ff1afeb325b98e24d386909b5 (patch) | |
tree | f29e735a11f6e412f82ad071e7141a5f2a96feef /sw | |
parent | b5b607cf5afe6ebf5964102770a52965f5b98533 (diff) |
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.Stahl@cib.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/docbm.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
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); |