diff options
Diffstat (limited to 'sw/source/core/inc/frame.hxx')
-rw-r--r-- | sw/source/core/inc/frame.hxx | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 9b3599ac977f..1b8762f71edd 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -198,8 +198,8 @@ struct SwRectFnCollection }; typedef SwRectFnCollection* SwRectFn; +/* extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R; - #define SWRECTFN( pFrm ) sal_Bool bVert = pFrm->IsVertical(); \ sal_Bool bRev = pFrm->IsReverse(); \ SwRectFn fnRect = bVert ? \ @@ -221,6 +221,36 @@ extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R; sal_Bool bNeighb = pFrm->IsNeighbourFrm(); \ SwRectFn fnRect = bVert == bNeighb ? \ fnRectHori : fnRectVert; +*/ + +//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin +extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R, fnRectVertL2R; +#define SWRECTFN( pFrm ) sal_Bool bVert = pFrm->IsVertical(); \ + sal_Bool bRev = pFrm->IsReverse(); \ + sal_Bool bVertL2R = pFrm->IsVertLR(); \ + SwRectFn fnRect = bVert ? \ + ( bRev ? fnRectVL2R : ( bVertL2R ? fnRectVertL2R : fnRectVert ) ): \ + ( bRev ? fnRectB2T : fnRectHori ); +#define SWRECTFNX( pFrm ) sal_Bool bVertX = pFrm->IsVertical(); \ + sal_Bool bRevX = pFrm->IsReverse(); \ + sal_Bool bVertL2RX = pFrm->IsVertLR(); \ + SwRectFn fnRectX = bVertX ? \ + ( bRevX ? fnRectVL2R : ( bVertL2RX ? fnRectVertL2R : fnRectVert ) ): \ + ( bRevX ? fnRectB2T : fnRectHori ); +#define SWREFRESHFN( pFrm ) { if( bVert != pFrm->IsVertical() || \ + bRev != pFrm->IsReverse() ) \ + bVert = pFrm->IsVertical(); \ + bRev = pFrm->IsReverse(); \ + bVertL2R = pFrm->IsVertLR(); \ + fnRect = bVert ? \ + ( bRev ? fnRectVL2R : ( bVertL2R ? fnRectVertL2R : fnRectVert ) ): \ + ( bRev ? fnRectB2T : fnRectHori ); } +#define SWRECTFN2( pFrm ) sal_Bool bVert = pFrm->IsVertical(); \ + sal_Bool bVertL2R = pFrm->IsVertLR(); \ + sal_Bool bNeighb = pFrm->IsNeighbourFrm(); \ + SwRectFn fnRect = bVert == bNeighb ? \ + fnRectHori : ( bVertL2R ? fnRectVertL2R : fnRectVert ); +//End of SCMS #define POS_DIFF( aFrm1, aFrm2 ) \ ( (aFrm1.*fnRect->fnGetTop)() != (aFrm2.*fnRect->fnGetTop)() || \ (aFrm1.*fnRect->fnGetLeft)() != (aFrm2.*fnRect->fnGetLeft)() ) @@ -371,6 +401,9 @@ protected: sal_uInt16 bInvalidVert: 1; sal_uInt16 bDerivedVert: 1; sal_uInt16 bVertical: 1; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + sal_uInt16 bVertLR: 1; + //End of SCMS sal_uInt16 nType: 4; //Who am I? sal_Bool bValidPos: 1; @@ -562,8 +595,14 @@ public: inline sal_Bool IsReverse() const { return bReverse; } inline void SetReverse( sal_Bool bNew ){ bReverse = bNew ? 1 : 0; } inline sal_Bool IsVertical() const; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + inline sal_Bool IsVertLR() const; + //End of SCMS inline sal_Bool GetVerticalFlag() const; inline void SetVertical( sal_Bool bNew ){ bVertical = bNew ? 1 : 0; } + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + inline void SetbVertLR( sal_Bool bNew ) { bVertLR = bNew ? 1 : 0; } + //End of SCMS inline void SetDerivedVert( sal_Bool bNew ){ bDerivedVert = bNew ? 1 : 0; } inline void SetInvalidVert( sal_Bool bNew) { bInvalidVert = bNew ? 1 : 0; } inline sal_Bool IsRightToLeft() const; @@ -571,6 +610,7 @@ public: inline void SetRightToLeft( sal_Bool bNew ){ bRightToLeft = bNew ? 1 : 0; } inline void SetDerivedR2L( sal_Bool bNew ) { bDerivedR2L = bNew ? 1 : 0; } inline void SetInvalidR2L( sal_Bool bNew ) { bInvalidR2L = bNew ? 1 : 0; } + void CheckDirChange(); // returns upper left frame position for LTR and // upper right frame position for Asian / RTL frames @@ -950,6 +990,12 @@ sal_Bool SwFrm::IsVertical() const ((SwFrm*)this)->SetDirFlags( sal_True ); return bVertical != 0; } +//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin +inline sal_Bool SwFrm::IsVertLR() const +{ + return bVertLR != 0; +} +//End of SCMS sal_Bool SwFrm::GetVerticalFlag() const { return bVertical != 0; |