From ea0962fbb21814db30fef8adaad10a1e4f97b8c3 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Wed, 6 May 2015 16:25:22 +0200 Subject: use new unocrsrs in ww8 Change-Id: I7f19c4002f471981b75b88998b31afcd4f30fa8c --- sw/source/filter/ww8/ww8par.cxx | 6 ++++-- sw/source/filter/ww8/ww8par.hxx | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 04a1d7699735..8df50e79a26d 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4900,7 +4900,8 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) pDocShell->SetReadOnlyUI(true); } - m_pPaM = m_rDoc.CreateUnoCrsr(rPos); + mpCrsr = m_rDoc.CreateUnoCrsr2(rPos); + m_pPaM = mpCrsr.get(); m_pCtrlStck = new SwWW8FltControlStack( &m_rDoc, m_nFieldFlags, *this ); @@ -5344,7 +5345,8 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) SAL_WARN_IF(m_pTableEndPaM, "sw.ww8", "document ended without table ending"); m_pTableEndPaM.reset(); //ensure this is deleted before pPaM - delete m_pPaM, m_pPaM = 0; + mpCrsr.reset(); + m_pPaM = nullptr; m_pLastAnchorPos.reset();//ensure this is deleted before UpdatePageDescs UpdatePageDescs(m_rDoc, nPageDescOffset); diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index afe7125c39f9..cb27db4fca43 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1094,6 +1094,7 @@ private: // allgemeines SwDoc& m_rDoc; + std::shared_ptr mpCrsr; SwPaM* m_pPaM; SwWW8FltControlStack* m_pCtrlStck; // Stack fuer die Attribute -- cgit