diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-06-04 11:07:35 +0200 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-06-04 11:07:35 +0200 |
commit | eab7d5d28e11da3cd41327363f6e46ca4bc493a7 (patch) | |
tree | ff48852675b566f6c1a88e88f7289075f1c1e14b /tools | |
parent | 949e0f71cec13f83259ff4de0c7ab402504200cc (diff) | |
parent | ac7956251708f163ef56ad98bbc184e3709e219f (diff) |
CWS-TOOLING: integrate CWS slidecopy
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/tools/diagnose_ex.h | 18 | ||||
-rw-r--r-- | tools/inc/tools/gen.hxx | 15 | ||||
-rw-r--r-- | tools/inc/tools/svborder.hxx | 8 |
3 files changed, 41 insertions, 0 deletions
diff --git a/tools/inc/tools/diagnose_ex.h b/tools/inc/tools/diagnose_ex.h index fac739b32583..6833fd6632ce 100644 --- a/tools/inc/tools/diagnose_ex.h +++ b/tools/inc/tools/diagnose_ex.h @@ -141,6 +141,24 @@ return; \ } +/** asserts a given condition (in debug mode), and continues the most-inner + loop if the condition is not met +*/ +#define ENSURE_OR_CONTINUE( c, m ) \ + if ( !(c) ) \ + { \ + OSL_ENSURE( false, m ); \ + continue; \ + } +/** asserts a given condition (in debug mode), and continues the most-inner + loop if the condition is not met +*/ +#define ENSURE_OR_BREAK( c, m ) \ + if ( !(c) ) \ + { \ + OSL_ENSURE( false, m ); \ + break; \ + } #endif // TOOLS_DIAGNOSE_EX_H diff --git a/tools/inc/tools/gen.hxx b/tools/inc/tools/gen.hxx index 85da22126b77..308cc02165ce 100644 --- a/tools/inc/tools/gen.hxx +++ b/tools/inc/tools/gen.hxx @@ -420,6 +420,7 @@ public: Point Center() const; void Move( long nHorzMove, long nVertMove ); + inline void Transpose(); inline void SetPos( const Point& rPoint ); void SetSize( const Size& rSize ); inline Size GetSize() const; @@ -578,6 +579,20 @@ inline void Rectangle::Move( long nHorzMove, long nVertMove ) nBottom += nVertMove; } +void Rectangle::Transpose() +{ + if ( !IsEmpty() ) + { + long swap( nLeft ); + nLeft = nTop; + nTop = swap; + + swap = nRight; + nRight = nBottom; + nBottom = swap; + } +} + inline void Rectangle::SetPos( const Point& rPoint ) { if ( nRight != RECT_EMPTY ) diff --git a/tools/inc/tools/svborder.hxx b/tools/inc/tools/svborder.hxx index 9523a71a060f..a0509bcc89be 100644 --- a/tools/inc/tools/svborder.hxx +++ b/tools/inc/tools/svborder.hxx @@ -49,6 +49,14 @@ public: } BOOL operator != ( const SvBorder & rObj ) const { return !(*this == rObj); } + SvBorder & operator = ( const SvBorder & rBorder ) + { + Left() = rBorder.Left(); + Top() = rBorder.Top(); + Right() = rBorder.Right(); + Bottom() = rBorder.Bottom(); + return *this; + } SvBorder & operator += ( const SvBorder & rBorder ) { Left() += rBorder.Left(); |