diff options
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.hxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index a145b13279e4..f6345d06d565 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2012,7 +2012,7 @@ void SwWW8ImplReader::ImportDopTypography(const WW8DopTypography &rTypo) * Footnotes and Endnotes */ WW8ReaderSave::WW8ReaderSave(SwWW8ImplReader* pRdr ,WW8_CP nStartCp) : - maTmpPos(*pRdr->m_pPaM->GetPoint()), + mxTmpPos(pRdr->m_rDoc.CreateUnoCursor(*pRdr->m_pPaM->GetPoint())), mxOldStck(std::move(pRdr->m_xCtrlStck)), mxOldAnchorStck(std::move(pRdr->m_xAnchorStck)), mxOldRedlines(std::move(pRdr->m_xRedlineStack)), @@ -2109,7 +2109,7 @@ void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr ) pRdr->DeleteAnchorStack(); pRdr->m_xAnchorStck = std::move(mxOldAnchorStck); - *pRdr->m_pPaM->GetPoint() = maTmpPos; + *pRdr->m_pPaM->GetPoint() = GetStartPos(); if (mxOldPlcxMan != pRdr->m_xPlcxMan) pRdr->m_xPlcxMan = mxOldPlcxMan; diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 8717e20eebfe..032f5c4060ba 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -595,7 +595,7 @@ class WW8ReaderSave { private: WW8PLCFxSaveAll maPLCFxSave; - SwPosition maTmpPos; + std::shared_ptr<SwUnoCursor> mxTmpPos; std::deque<bool> maOldApos; std::deque<WW8FieldEntry> maOldFieldStack; std::unique_ptr<SwWW8FltControlStack> mxOldStck; @@ -623,7 +623,7 @@ private: public: WW8ReaderSave(SwWW8ImplReader* pRdr, WW8_CP nStart=-1); void Restore(SwWW8ImplReader* pRdr); - const SwPosition &GetStartPos() const { return maTmpPos; } + const SwPosition &GetStartPos() const { return *mxTmpPos->GetPoint(); } }; enum class eF_ResT { OK, TEXT, TAGIGN, READ_FSPA }; |