diff options
-rw-r--r-- | sw/inc/swcrsr.hxx | 7 | ||||
-rw-r--r-- | sw/inc/viscrs.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/crsr/swcrsr.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/crsr/viscrs.cxx | 2 |
4 files changed, 9 insertions, 5 deletions
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index 1e84b16537ef..5e3ea0a228b0 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -69,6 +69,8 @@ class SW_DLLPUBLIC SwCursor : public SwPaM using SwPaM::Find; + SwCursor(SwCursor const& rPaM) SAL_DELETED_FUNCTION; + protected: _SwCursor_SavePos* CreateNewSavePos() const; void SaveState(); @@ -86,8 +88,9 @@ public: SwCursor( const SwPosition &rPos, SwPaM* pRing, bool bColumnSel ); virtual ~SwCursor(); - // @@@ semantic: no copy ctor. - SwCursor( SwCursor& rCpy); + /// this takes a second parameter, which indicates the Ring that + /// the new cursor should be part of (may be null) + SwCursor(SwCursor const& rCursor, SwPaM* pRing); public: diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx index a96d366c596e..99b25f761f22 100644 --- a/sw/inc/viscrs.hxx +++ b/sw/inc/viscrs.hxx @@ -126,6 +126,7 @@ public: SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos ); SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos, const Point& rPtPos, SwPaM* pRing = 0 ); + // note: *intentionally* links the new shell cursor into the old one's Ring SwShellCrsr( SwShellCrsr& ); virtual ~SwShellCrsr(); diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index e0a1a9ce4734..dcca20dbf38c 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -123,8 +123,8 @@ SwCursor::SwCursor( const SwPosition &rPos, SwPaM* pRing, bool bColumnSel ) } // @@@ semantic: no copy ctor. -SwCursor::SwCursor( SwCursor& rCpy ) - : SwPaM( rCpy, &rCpy ) +SwCursor::SwCursor(SwCursor const& rCpy, SwPaM *const pRing) + : SwPaM( rCpy, pRing ) , m_pSavePos(nullptr) , m_nRowSpanOffset(rCpy.m_nRowSpanOffset) , m_nCursorBidiLevel(rCpy.m_nCursorBidiLevel) diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 11ef0f5effc0..f5cdeb8a1299 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -528,7 +528,7 @@ SwShellCrsr::SwShellCrsr( {} SwShellCrsr::SwShellCrsr( SwShellCrsr& rICrsr ) - : SwCursor(rICrsr) + : SwCursor(rICrsr, &rICrsr) , SwSelPaintRects(*rICrsr.GetShell()) , m_MarkPt(rICrsr.GetMkPos()) , m_PointPt(rICrsr.GetPtPos()) |