[Libreoffice-commits] core.git: include/tools
Miklos Vajna
vmiklos at collabora.co.uk
Tue Jul 7 05:08:47 PDT 2015
include/tools/gen.hxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit f420d65b76a6c30bce1322215990890da119a8ce
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Jul 7 14:07:33 2015 +0200
vcl: document Rectangle's get vs Get differences
Change-Id: Icf08f96c8d21f98a6f5a5a83b07447755f32257a
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 32e488a..9b624ee 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -377,7 +377,9 @@ public:
void SetSize( const Size& rSize );
inline Size GetSize() const;
+ /// Returns the difference between right and left, assuming the range is inclusive.
inline long GetWidth() const;
+ /// Returns the difference between bottom and top, assuming the range is inclusive.
inline long GetHeight() const;
Rectangle& Union( const Rectangle& rRect );
@@ -409,7 +411,9 @@ public:
// ONE
long getX() const { return nLeft; }
long getY() const { return nTop; }
+ /// Returns the difference between right and left, assuming the range includes one end, but not the other.
long getWidth() const { return nRight - nLeft; }
+ /// Returns the difference between bottom and top, assuming the range includes one end, but not the other.
long getHeight() const { return nBottom - nTop; }
void setX( long n ) { nRight += n-nLeft; nLeft = n; }
void setY( long n ) { nBottom += n-nTop; nTop = n; }
More information about the Libreoffice-commits
mailing list