Kaydet (Commit) c23dd470 authored tarafından Michael Stahl's avatar Michael Stahl

sw: same treatment for SwCursor's fake "copy constructor"

Change-Id: Id627274ca6ad87e7e85b5ce64419ed68a5d4c9c3
üst bdf3c9bf
......@@ -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:
......
......@@ -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();
......
......@@ -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)
......
......@@ -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())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment