summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/tools/gen.hxx2
-rw-r--r--tools/source/generic/gen.cxx8
2 files changed, 9 insertions, 1 deletions
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 897db7a25f79..e29726a5e305 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -409,7 +409,7 @@ public:
inline void Move( long nHorzMoveDelta, long nVertMoveDelta );
void Move( Size const & s ) { Move(s.Width(), s.Height()); }
long AdjustLeft( long nHorzMoveDelta ) { nLeft += nHorzMoveDelta; return nLeft; }
- long AdjustRight( long nHorzMoveDelta ) { nRight += nHorzMoveDelta; return nRight; }
+ long AdjustRight( long nHorzMoveDelta );
long AdjustTop( long nVertMoveDelta ) { nTop += nVertMoveDelta; return nTop; }
long AdjustBottom( long nVertMoveDelta ) { nBottom += nVertMoveDelta; return nBottom; }
inline void SetPos( const Point& rPoint );
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index 020be91ac3c0..d298e6be4c77 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -257,6 +257,14 @@ void tools::Rectangle::shrink(long nShrinkBy)
nBottom -= nShrinkBy;
}
+long tools::Rectangle::AdjustRight(long nHorzMoveDelta)
+{
+ if (nRight == RECT_EMPTY)
+ nRight = nLeft + nHorzMoveDelta - 1;
+ else
+ nRight += nHorzMoveDelta;
+ return nRight;
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */