summaryrefslogtreecommitdiff
path: root/sw/inc/viscrs.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-02-27 10:33:10 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-02 08:51:01 +0100
commitee8ee08b4dfc698fa4e21ea28ff961e4c67cb160 (patch)
tree491360dee54a312b2e8f41bdc93fe88d1bd82fbe /sw/inc/viscrs.hxx
parentf52920ad25ae142bb49beaa7a7353240f143b0b7 (diff)
SwSelPaintRects: add FillStartEnd() interface
Previously we always assumed non-table selections in SwSelPaintRects, but that is not always true, resulting in incorrect handles for table selections. Add a FillStartEnd() interface to fill the passed SwRects with the rectangle of the start and end handle, and implement it in both SwShellCrsr and SwShellTableCrsr. This makes adjusting the end of table selections using the end selection handle work (be it shrinking or extending). Change-Id: Iba8657466b102ec60c41829f00660dfe295643ab
Diffstat (limited to 'sw/inc/viscrs.hxx')
-rw-r--r--sw/inc/viscrs.hxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index b24bea5ba060..7de57a2b23ef 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -89,6 +89,8 @@ public:
virtual ~SwSelPaintRects();
virtual void FillRects() = 0;
+ /// Fill rStart and rEnd with a rectangle that represents the start and end for selection handles.
+ virtual void FillStartEnd(SwRect& rStart, SwRect& rEnd) = 0;
// #i75172# in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To
// make a complete swap access to mpCursorOverlay is needed there
@@ -126,6 +128,8 @@ public:
virtual ~SwShellCrsr();
virtual void FillRects() SAL_OVERRIDE; // For Table- und normal cursors.
+ /// @see SwSelPaintRects::FillStartEnd(), override for text selections.
+ virtual void FillStartEnd(SwRect& rStart, SwRect& rEnd) SAL_OVERRIDE;
void Show(); // Update and display all selections.
void Hide(); // Hide all selections.
@@ -159,6 +163,10 @@ public:
class SwShellTableCrsr : public virtual SwShellCrsr, public virtual SwTableCursor
{
+ /// Left edge of the selection start (top left cell).
+ SwRect m_aStart;
+ /// Right edge of the selection end (bottom right cell).
+ SwRect m_aEnd;
// The Selection has the same order as the table boxes, i.e.
// if something is deleted from the one array at a certain position
// it has to be deleted from the other one as well!!
@@ -171,6 +179,8 @@ public:
virtual ~SwShellTableCrsr();
virtual void FillRects() SAL_OVERRIDE; // For table and normal cursor.
+ /// @see SwSelPaintRects::FillStartEnd(), override for table selections.
+ virtual void FillStartEnd(SwRect& rStart, SwRect& rEnd) SAL_OVERRIDE;
// Check if SPoint is within table SSelection.
bool IsInside( const Point& rPt ) const;