summaryrefslogtreecommitdiff
path: root/sw/inc/viscrs.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-05 13:18:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-07 12:14:11 +0200
commit8e156f009e29a90883c2536943f338be163dad45 (patch)
tree9062fa4f9f44f5d2366e2fbdd45ef3a2a9cdf04c /sw/inc/viscrs.hxx
parentd155f7af035e0fd818340c1affe41d3b6e97b502 (diff)
provide overrides of GetNext/GetPrev in SwPaM subclasses
so we don't need to cast at the call sites. Also fix the type of mpExtInputRing in SwDoc Change-Id: I60794a4b5c24ca552eafa87b8810dc08efdee3ea Reviewed-on: https://gerrit.libreoffice.org/52455 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc/viscrs.hxx')
-rw-r--r--sw/inc/viscrs.hxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index e30fd59283f3..902a25314a00 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -114,7 +114,7 @@ public:
long* pX = nullptr, long* pY = nullptr );
};
-class SwShellCursor : public virtual SwCursor, public SwSelPaintRects
+class SW_DLLPUBLIC SwShellCursor : public virtual SwCursor, public SwSelPaintRects
{
private:
// Document positions of start/end characters of a SSelection.
@@ -163,6 +163,11 @@ public:
virtual bool IsReadOnlyAvailable() const override;
+ SwShellCursor* GetNext() { return dynamic_cast<SwShellCursor *>(GetNextInRing()); }
+ const SwShellCursor* GetNext() const { return dynamic_cast<SwShellCursor const *>(GetNextInRing()); }
+ SwShellCursor* GetPrev() { return dynamic_cast<SwShellCursor *>(GetPrevInRing()); }
+ const SwShellCursor* GetPrev() const { return dynamic_cast<SwShellCursor const *>(GetPrevInRing()); }
+
DECL_FIXEDMEMPOOL_NEWDEL( SwShellCursor )
};
@@ -199,6 +204,10 @@ public:
// true: Cursor can be set to this position.
virtual bool IsAtValidPos( bool bPoint = true ) const override;
+ SwShellTableCursor* GetNext() { return dynamic_cast<SwShellTableCursor *>(GetNextInRing()); }
+ const SwShellTableCursor* GetNext() const { return dynamic_cast<SwShellTableCursor const *>(GetNextInRing()); }
+ SwShellTableCursor* GetPrev() { return dynamic_cast<SwShellTableCursor *>(GetPrevInRing()); }
+ const SwShellTableCursor* GetPrev() const { return dynamic_cast<SwShellTableCursor const *>(GetPrevInRing()); }
};
#endif // INCLUDED_SW_INC_VISCRS_HXX