diff options
Diffstat (limited to 'sw/source/filter/ww8/ww8par.hxx')
-rw-r--r-- | sw/source/filter/ww8/ww8par.hxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 74953aa2016c..f98853d82295 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -589,7 +589,7 @@ class WW8ReaderSave { private: WW8PLCFxSaveAll maPLCFxSave; - SwPosition const maTmpPos; + std::shared_ptr<SwUnoCursor> mxTmpPos; std::deque<bool> maOldApos; std::deque<WW8FieldEntry> maOldFieldStack; std::unique_ptr<SwWW8FltControlStack> mxOldStck; @@ -617,7 +617,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 }; @@ -922,6 +922,14 @@ public: explicit wwExtraneousParas(SwDoc &rDoc) : m_rDoc(rDoc) {} ~wwExtraneousParas() { delete_all_from_doc(); } void insert(SwTextNode *pTextNode) { m_aTextNodes.insert(pTextNode); } + void check_anchor_destination(SwTextNode *pTextNode) + { + auto it = m_aTextNodes.find(pTextNode); + if (it == m_aTextNodes.end()) + return; + SAL_WARN("sw.ww8", "It is unexpected to anchor something in a para scheduled for removal"); + m_aTextNodes.erase(it); + } void delete_all_from_doc(); }; |