summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-15 10:48:53 +0200
committerJan Holesovsky <kendy@collabora.com>2018-06-01 08:59:10 +0200
commit32817f930580b6b378dd470ccbdf967c06540db2 (patch)
treea78c6b7267342c370e8eb87258d25604586181ad /include
parentb26c7beaa3f3a642917a8ab88088401e971eefbc (diff)
introduce Move/Adjust methods to Point,Rect,Size
to make my following changes with the changetoolsgen plugin easier to read Change-Id: I514bbea00b8907cc94c4218ca6ab1473bd9efd61 Reviewed-on: https://gerrit.libreoffice.org/49793 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit dd4fc3b1e3f8a7c69a44c26715b2e3cdb22aede9)
Diffstat (limited to 'include')
-rw-r--r--include/tools/gen.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 2db20125d499..c4dd2e6fd02b 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -82,6 +82,8 @@ public:
long& Y() { return nB; }
void Move( long nHorzMove, long nVertMove );
+ void MoveX( long nHorzMove ) { nA += nHorzMove; }
+ void MoveY( long nVertMove ) { nB += nVertMove; }
void RotateAround( long& rX, long& rY, short nOrientation ) const;
@@ -186,6 +188,8 @@ public:
long& Width() { return nA; }
long& Height() { return nB; }
+ void AdjustWidth( long n ) { nA += n; }
+ void AdjustHeight( long n ) { nB += n; }
long getWidth() const { return Width(); }
long getHeight() const { return Height(); }
@@ -373,6 +377,10 @@ public:
/// Move the top and left edges by a delta, preserving width and height
inline void Move( long nHorzMoveDelta, long nVertMoveDelta );
+ void MoveLeft( long nHorzMoveDelta ) { nLeft += nHorzMoveDelta; }
+ void MoveRight( long nHorzMoveDelta ) { nRight += nHorzMoveDelta; }
+ void MoveTop( long nVertMoveDelta ) { nTop += nVertMoveDelta; }
+ void MoveBottom( long nVertMoveDelta ) { nBottom += nVertMoveDelta; }
inline void SetPos( const Point& rPoint );
void SetSize( const Size& rSize );
inline Size GetSize() const;