diff options
Diffstat (limited to 'tools/source/generic/gen.cxx')
-rw-r--r-- | tools/source/generic/gen.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx index 5fe6eeeaa3d6..ea855f98e9f0 100644 --- a/tools/source/generic/gen.cxx +++ b/tools/source/generic/gen.cxx @@ -85,6 +85,18 @@ void tools::Rectangle::SaturatingSetSize(const Size& rSize) nBottom = RECT_EMPTY; } +void tools::Rectangle::SaturatingSetX(long x) +{ + nRight = o3tl::saturating_add(nRight, x - nLeft); + nLeft = x; +} + +void tools::Rectangle::SaturatingSetY(long y) +{ + nBottom = o3tl::saturating_add(nBottom, y - nTop); + nTop = y; +} + tools::Rectangle& tools::Rectangle::Union( const tools::Rectangle& rRect ) { if ( rRect.IsEmpty() ) |