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

sw: prefix members of SwShellCrsr

Change-Id: I0be44b2686bf5f6d54cda4e26a1b61cb0c078656
üst ce0e635a
......@@ -114,9 +114,11 @@ public:
class SwShellCrsr : public virtual SwCursor, public SwSelPaintRects
{
private:
// Document positions of start/end characters of a SSelection.
Point aMkPt, aPtPt;
const SwPosition* pPt; // For assignment of GetPoint() to aPtPt.
Point m_MarkPt;
Point m_PointPt;
const SwPosition* m_pInitialPoint; // For assignment of GetPoint() to m_PointPt.
using SwCursor::UpDown;
......@@ -135,14 +137,14 @@ public:
void Hide(); // Hide all selections.
void Invalidate( const SwRect& rRect );
const Point& GetPtPos() const { return( SwPaM::GetPoint() == pPt ? aPtPt : aMkPt ); }
Point& GetPtPos() { return( SwPaM::GetPoint() == pPt ? aPtPt : aMkPt ); }
const Point& GetMkPos() const { return( SwPaM::GetMark() == pPt ? aPtPt : aMkPt ); }
Point& GetMkPos() { return( SwPaM::GetMark() == pPt ? aPtPt : aMkPt ); }
const Point& GetSttPos() const { return( SwPaM::Start() == pPt ? aPtPt : aMkPt ); }
Point& GetSttPos() { return( SwPaM::Start() == pPt ? aPtPt : aMkPt ); }
const Point& GetEndPos() const { return( SwPaM::End() == pPt ? aPtPt : aMkPt ); }
Point& GetEndPos() { return( SwPaM::End() == pPt ? aPtPt : aMkPt ); }
const Point& GetPtPos() const { return (SwPaM::GetPoint() == m_pInitialPoint) ? m_PointPt : m_MarkPt; }
Point& GetPtPos() { return (SwPaM::GetPoint() == m_pInitialPoint) ? m_PointPt : m_MarkPt; }
const Point& GetMkPos() const { return (SwPaM::GetMark() == m_pInitialPoint) ? m_PointPt : m_MarkPt; }
Point& GetMkPos() { return (SwPaM::GetMark() == m_pInitialPoint) ? m_PointPt : m_MarkPt; }
const Point& GetSttPos() const { return (SwPaM::Start() == m_pInitialPoint) ? m_PointPt : m_MarkPt; }
Point& GetSttPos() { return (SwPaM::Start() == m_pInitialPoint) ? m_PointPt : m_MarkPt; }
const Point& GetEndPos() const { return (SwPaM::End() == m_pInitialPoint) ? m_PointPt : m_MarkPt; }
Point& GetEndPos() { return (SwPaM::End() == m_pInitialPoint) ? m_PointPt : m_MarkPt; }
virtual void SetMark() SAL_OVERRIDE;
......
......@@ -518,7 +518,7 @@ SwShellCrsr::SwShellCrsr(
const SwPosition &rPos )
: SwCursor(rPos,0,false)
, SwSelPaintRects(rCShell)
, pPt(SwPaM::GetPoint())
, m_pInitialPoint(SwPaM::GetPoint())
{}
SwShellCrsr::SwShellCrsr(
......@@ -528,17 +528,17 @@ SwShellCrsr::SwShellCrsr(
SwPaM* pRing )
: SwCursor(rPos, pRing, false)
, SwSelPaintRects(rCShell)
, aMkPt(rPtPos)
, aPtPt(rPtPos)
, pPt(SwPaM::GetPoint())
, m_MarkPt(rPtPos)
, m_PointPt(rPtPos)
, m_pInitialPoint(SwPaM::GetPoint())
{}
SwShellCrsr::SwShellCrsr( SwShellCrsr& rICrsr )
: SwCursor(rICrsr)
, SwSelPaintRects(*rICrsr.GetShell())
, aMkPt(rICrsr.GetMkPos())
, aPtPt(rICrsr.GetPtPos())
, pPt(SwPaM::GetPoint())
, m_MarkPt(rICrsr.GetMkPos())
, m_PointPt(rICrsr.GetPtPos())
, m_pInitialPoint(SwPaM::GetPoint())
{}
SwShellCrsr::~SwShellCrsr()
......@@ -551,10 +551,10 @@ bool SwShellCrsr::IsReadOnlyAvailable() const
void SwShellCrsr::SetMark()
{
if( SwPaM::GetPoint() == pPt )
aMkPt = aPtPt;
if (SwPaM::GetPoint() == m_pInitialPoint)
m_MarkPt = m_PointPt;
else
aPtPt = aMkPt;
m_PointPt = m_MarkPt;
SwPaM::SetMark();
}
......
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