diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2023-02-09 21:16:55 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2023-03-04 09:45:39 +0000 |
commit | fa8a60c76117cdd0f4290fb5afbe7f5c1463d801 (patch) | |
tree | e4996b641685a42c3620797d57fef9fcb3f3f26e /include/svx | |
parent | bb4a052a768d5936e0e241b15d3c08a56284eeb4 (diff) |
svx: change Poly2Rect to return a rectangle, also clean-up the code
There is no need to pass the rectangle by reference and to change
it inside the function, better to return a new instance.
Also clean-up the code of Poly2Rect and rename the function to
svx::polygonToRectangle.
Change-Id: I25e77c8abd12e2075939f55e06f40343ac23ca97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148211
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/svdtrans.hxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/svx/svdtrans.hxx b/include/svx/svdtrans.hxx index 0087f5407f81..dea845a26bc1 100644 --- a/include/svx/svdtrans.hxx +++ b/include/svx/svdtrans.hxx @@ -212,7 +212,11 @@ public: }; tools::Polygon Rect2Poly(const tools::Rectangle& rRect, const GeoStat& rGeo); -void Poly2Rect(const tools::Polygon& rPol, tools::Rectangle& rRect, GeoStat& rGeo); + +namespace svx +{ +tools::Rectangle polygonToRectangle(const tools::Polygon& rPolygon, GeoStat& rGeo); +} void OrthoDistance8(const Point& rPt0, Point& rPt, bool bBigOrtho); void OrthoDistance4(const Point& rPt0, Point& rPt, bool bBigOrtho); |