summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorAndreas Martens <ama@openoffice.org>2001-09-18 08:14:03 +0000
committerAndreas Martens <ama@openoffice.org>2001-09-18 08:14:03 +0000
commit766f084db29b5fab7d23795fc345ebd915411196 (patch)
tree87a658ea32da806ede41b94268bffd47ddb0242b /sw
parent31ca01cf3e577bab17093a4c53f442961c57eb17 (diff)
New: More help functions for vertical layout
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/swrect.hxx10
-rw-r--r--sw/source/core/bastyp/swrect.cxx8
-rw-r--r--sw/source/core/inc/frame.hxx6
-rw-r--r--sw/source/core/layout/newfrm.cxx8
4 files changed, 24 insertions, 8 deletions
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx
index ba209650b328..7090f7c15e17 100644
--- a/sw/inc/swrect.hxx
+++ b/sw/inc/swrect.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: swrect.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: ama $ $Date: 2001-09-11 07:58:18 $
+ * last change: $Author: ama $ $Date: 2001-09-18 09:14:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -176,6 +176,10 @@ public:
void AddHeight( const long nAdd );
void SetPosX( const long nNew );
void SetPosY( const long nNew );
+ const Point _Pos() const;
+ const Size _Size() const;
+ const Point SwappedPos() const;
+ const Size SwappedSize() const;
#endif
};
@@ -185,6 +189,8 @@ extern SvStream &operator<<( SvStream &rStream, const SwRect &rRect );
#ifdef VERTICAL_LAYOUT
typedef void (SwRect:: *SwRectSet)( const long nNew );
typedef long (SwRect:: *SwRectGet)() const;
+typedef const Point (SwRect:: *SwRectPoint)() const;
+typedef const Size (SwRect:: *SwRectSize)() const;
#endif
//---------------------------------- Set-Methoden
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index 1f61c3e6eede..b8eb1f4f6a90 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: swrect.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: ama $ $Date: 2001-09-11 07:59:07 $
+ * last change: $Author: ama $ $Date: 2001-09-18 09:13:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -311,6 +311,10 @@ void SwRect::SubTop( const long nSub ){ nHeight += nSub; nY -= nSub; }
void SwRect::AddBottom( const long nAdd ){ nHeight += nAdd; }
void SwRect::SetPosX( const long nNew ){ nX = nNew; }
void SwRect::SetPosY( const long nNew ){ nY = nNew; }
+const Point SwRect::_Pos() const { return Pos(); }
+const Size SwRect::_Size() const { return SSize(); }
+const Point SwRect::SwappedPos() const { return Point( nY, nX ); }
+const Size SwRect::SwappedSize() const { return Size( nHeight, nWidth ); }
#endif
#ifndef PRODUCT
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 38c2e804a845..8f8a887a1066 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: frame.hxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: ama $ $Date: 2001-09-14 14:08:42 $
+ * last change: $Author: ama $ $Date: 2001-09-18 09:12:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -195,6 +195,8 @@ struct SwRectFnCollection
SwRectGet fnGetRight;
SwRectGet fnGetWidth;
SwRectGet fnGetHeight;
+ SwRectPoint fnGetPos;
+ SwRectSize fnGetSize;
SwRectSet fnSetTop;
SwRectSet fnSetBottom;
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index f1ed1f1103e0..53318890ba1b 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: newfrm.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: ama $ $Date: 2001-09-14 14:09:27 $
+ * last change: $Author: ama $ $Date: 2001-09-18 09:12:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -152,6 +152,8 @@ static SwRectFnCollection aHorizontal = {
&SwRect::_Right,
&SwRect::_Width,
&SwRect::_Height,
+ &SwRect::_Pos,
+ &SwRect::_Size,
/* fnRectSet */
&SwRect::_Top,
&SwRect::_Bottom,
@@ -188,6 +190,8 @@ static SwRectFnCollection aVertical = {
&SwRect::_Bottom,
&SwRect::_Height,
&SwRect::_Width,
+ &SwRect::SwappedPos,
+ &SwRect::SwappedSize,
/* fnRectSet */
&SwRect::_Right,
&SwRect::_Left,