summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-06-03 18:53:52 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-06-03 18:53:52 +0200
commitac7956251708f163ef56ad98bbc184e3709e219f (patch)
tree093f29c1fdfd26f99dab58a4f6148b7aac4d9573 /tools
parent77bd1e8dc393ca5919101400f700d35c09470627 (diff)
parent4d1c1eae73df67c115f532b7078deaf7caf4cde8 (diff)
slidecopy: merge after copying in CWS renaissance2
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/diagnose_ex.h18
-rw-r--r--tools/inc/tools/gen.hxx15
-rw-r--r--tools/inc/tools/svborder.hxx8
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();