summaryrefslogtreecommitdiffstats
path: root/include/tools
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-08-13 16:44:15 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-08-16 15:53:02 +0200
commit581b2cf7960c48e6199bd35be839424113abe533 (patch)
tree5f5d0f4cf0be4d134804cea9738460e92a61e11c /include/tools
parenttdf#143656: Tools > SQL : add a checkbox to enable Direct SQL (diff)
downloadcore-581b2cf7960c48e6199bd35be839424113abe533.tar.gz
core-581b2cf7960c48e6199bd35be839424113abe533.zip
Drop tools::Rectangle::getX/getY, which are just duplicates of Left/Top
The change allowed to simplify many places where previously this API was used, to avoid inefficient calculations (e.g., moving rectangle keeping its size, and then immediately changing the size). Change-Id: Ica2dc594d91cae83e2c2740c1f4fb23f44998916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120461 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/tools')
-rw-r--r--include/tools/gen.hxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 3c97728c7402..1cd3928ab67e 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -568,8 +568,6 @@ public:
friend inline tools::Rectangle operator - ( const tools::Rectangle& rRect, const Point& rPt );
// ONE
- tools::Long getX() const { return nLeft; }
- tools::Long getY() const { return nTop; }
/// Returns the difference between right and left, assuming the range includes one end, but not the other.
tools::Long getWidth() const { return Right() - Left(); }
/// Returns the difference between bottom and top, assuming the range includes one end, but not the other.
@@ -723,7 +721,7 @@ inline std::basic_ostream<charT, traits> & operator <<(
return stream << "EMPTY";
else
return stream << rectangle.GetWidth() << 'x' << rectangle.GetHeight()
- << "@(" << rectangle.getX() << ',' << rectangle.getY() << ")";
+ << "@(" << rectangle.Left() << ',' << rectangle.Top() << ")";
}
}