[PATCH] Rename WEIT_WECH to FAR_AWAY

Nicolas Christener nicolas.christener at adfinis-sygroup.ch
Wed Mar 21 15:26:30 PDT 2012


---
 sw/source/core/inc/frmtool.hxx     |    2 +-
 sw/source/core/layout/calcmove.cxx |    4 ++--
 sw/source/core/layout/fly.cxx      |   10 +++++-----
 sw/source/core/layout/frmtool.cxx  |   16 ++++++++--------
 sw/source/core/layout/laycache.cxx |    4 ++--
 sw/source/core/layout/pagechg.cxx  |    4 ++--
 sw/source/core/layout/tabfrm.cxx   |    6 +++---
 sw/source/core/text/txtfly.cxx     |    2 +-
 8 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index ba1b0f4..e31d8b9 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -56,7 +56,7 @@ struct SwFindRowSpanCacheObj;
 #define MA_FASTCALL
 #endif
 
-#define WEIT_WECH       LONG_MAX - 20000        //Initale Position der Flys.
+#define FAR_AWAY       LONG_MAX - 20000        //Initale Position der Flys.
 #define BROWSE_HEIGHT   56700L * 10L               //10 Meter
 
 #define GRFNUM_NO 0
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 33e6722..eeccc20 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -669,7 +669,7 @@ void lcl_CheckObjects( SwSortedObjs* pSortedObjs, SwFrm* pFrm, long& rBot )
         if ( pObj->ISA(SwFlyFrm) )
         {
             SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pObj);
-            if( pFly->Frm().Top() != WEIT_WECH &&
+            if( pFly->Frm().Top() != FAR_AWAY &&
                 ( pFrm->IsPageFrm() ? pFly->IsFlyLayFrm() :
                   ( pFly->IsFlyAtCntFrm() &&
                     ( pFrm->IsBodyFrm() ? pFly->GetAnchorFrm()->IsInDocBody() :
@@ -1012,7 +1012,7 @@ sal_Bool SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
                     SwAnchoredObject* pObj = (*GetDrawObjs())[i];
                     const SwFrmFmt& rFmt = pObj->GetFrmFmt();
                     const sal_Bool bFly = pObj->ISA(SwFlyFrm);
-                    if ((bFly && (WEIT_WECH == pObj->GetObjRect().Width()))
+                    if ((bFly && (FAR_AWAY == pObj->GetObjRect().Width()))
                         || rFmt.GetFrmSize().GetWidthPercent())
                     {
                         continue;
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index b6e7b1f..cc7c170 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -192,7 +192,7 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) :
 
     //Und erstmal in den Wald stellen die Kiste, damit bei neuen Dokument nicht
     //unnoetig viel formatiert wird.
-    Frm().Pos().X() = Frm().Pos().Y() = WEIT_WECH;
+    Frm().Pos().X() = Frm().Pos().Y() = FAR_AWAY;
 }
 
 // OD 2004-01-19 #110582#
@@ -1339,7 +1339,7 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
 
     if ( !bValidSize )
     {
-        if ( Frm().Top() == WEIT_WECH && Frm().Left() == WEIT_WECH )
+        if ( Frm().Top() == FAR_AWAY && Frm().Left() == FAR_AWAY )
         {
             //Sicherheitsschaltung wegnehmen (siehe SwFrm::CTor)
             Frm().Pos().X() = Frm().Pos().Y() = 0;
@@ -1414,7 +1414,7 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
                             // OD 06.11.2003 #i22305# - consider
                             // only Writer fly frames, which follow the text flow.
                             if ( pFly->IsFlyLayFrm() &&
-                                 pFly->Frm().Top() != WEIT_WECH &&
+                                 pFly->Frm().Top() != FAR_AWAY &&
                                  pFly->GetFmt()->GetFollowTextFlow().GetValue() )
                             {
                                 SwTwips nDist = -(pFly->Frm().*fnRect->
@@ -2149,7 +2149,7 @@ void SwFrm::AppendFly( SwFlyFrm *pNew )
     SwPageFrm *pPage = FindPageFrm();
     if ( pPage )
     {
-        if ( pNew->IsFlyAtCntFrm() && pNew->Frm().Top() == WEIT_WECH )
+        if ( pNew->IsFlyAtCntFrm() && pNew->Frm().Top() == FAR_AWAY )
         {
             //Versuch die Seitenformatierung von neuen Dokumenten etwas
             //guenstiger zu gestalten.
@@ -2424,7 +2424,7 @@ void SwLayoutFrm::NotifyLowerObjs( const bool _bUnlockPosOfObjs )
             {
                 SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pObj);
 
-                if ( pFly->Frm().Left() == WEIT_WECH )
+                if ( pFly->Frm().Left() == FAR_AWAY )
                     continue;
 
                 if ( pFly->IsAnLower( this ) )
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index c19dbf7..fe42863 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -692,7 +692,7 @@ SwFlyNotify::~SwFlyNotify()
     {
         pFly->NotifyDrawObj();
     }
-    if ( bPosChgd && aFrm.Pos().X() != WEIT_WECH )
+    if ( bPosChgd && aFrm.Pos().X() != FAR_AWAY )
     {
         // OD 2004-05-10 #i28701# - no direct move of lower Writer fly frames.
         // reason: New positioning and alignment (e.g. to-paragraph anchored,
@@ -2800,7 +2800,7 @@ void Notify( SwFlyFrm *pFly, SwPageFrm *pOld, const SwRect &rOld,
     if ( rOld.Pos() != aFrm.Pos() )
     {   //Positionsaenderung, alten und neuen Bereich invalidieren
         if ( rOld.HasArea() &&
-             rOld.Left()+pFly->GetFmt()->GetLRSpace().GetLeft() < WEIT_WECH )
+             rOld.Left()+pFly->GetFmt()->GetLRSpace().GetLeft() < FAR_AWAY )
         {
             pFly->NotifyBackground( pOld, rOld, PREP_FLY_LEAVE );
         }
@@ -2943,7 +2943,7 @@ void Notify_Background( const SdrObject* pObj,
 
     //Wenn der Frm gerade erstmalig sinnvoll positioniert wurde, braucht der
     //alte Bereich nicht benachrichtigt werden.
-    if ( eHint == PREP_FLY_LEAVE && rRect.Top() == WEIT_WECH )
+    if ( eHint == PREP_FLY_LEAVE && rRect.Top() == FAR_AWAY )
          return;
 
     SwLayoutFrm* pArea;
@@ -3047,7 +3047,7 @@ void Notify_Background( const SdrObject* pObj,
                 if( pAnchoredObj->GetDrawObj() == pObj )
                     continue;
                 SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
-                if ( pFly->Frm().Top() == WEIT_WECH )
+                if ( pFly->Frm().Top() == FAR_AWAY )
                     continue;
 
                 if ( !pFlyFrm ||
@@ -3368,8 +3368,8 @@ SwFrm* GetFrmOfModify( const SwRootFrm* pLayout, SwModify const& rMod, sal_uInt1
                         // Note: The Writer fly frame could be the frame itself.
                         SwFlyFrm* pFlyFrm( pTmpFrm->FindFlyFrm() );
                         if ( pFlyFrm &&
-                             pFlyFrm->Frm().Pos().X() == WEIT_WECH &&
-                             pFlyFrm->Frm().Pos().Y() == WEIT_WECH )
+                             pFlyFrm->Frm().Pos().X() == FAR_AWAY &&
+                             pFlyFrm->Frm().Pos().Y() == FAR_AWAY )
                         {
                             SwObjectFormatter::FormatObj( *pFlyFrm );
                         }
@@ -3391,8 +3391,8 @@ SwFrm* GetFrmOfModify( const SwRootFrm* pLayout, SwModify const& rMod, sal_uInt1
                     // nocht nicht "formatiert" sind
                     if( !bCalcFrm && nFrmType & FRM_FLY &&
                         ((SwFlyFrm*)pTmpFrm)->GetAnchorFrm() &&
-                        WEIT_WECH == pTmpFrm->Frm().Pos().X() &&
-                        WEIT_WECH == pTmpFrm->Frm().Pos().Y() )
+                        FAR_AWAY == pTmpFrm->Frm().Pos().X() &&
+                        FAR_AWAY == pTmpFrm->Frm().Pos().Y() )
                         aCalcRect = ((SwFlyFrm*)pTmpFrm)->GetAnchorFrm()->Frm();
                     else
                         aCalcRect = pTmpFrm->Frm();
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index e1500623..5cad47c 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -312,7 +312,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
                     if ( pAnchoredObj->ISA(SwFlyFrm) )
                     {
                         SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
-                        if( pFly->Frm().Left() != WEIT_WECH &&
+                        if( pFly->Frm().Left() != FAR_AWAY &&
                             !pFly->GetAnchorFrm()->FindFooterOrHeader() )
                         {
                             const SwContact *pC =
@@ -1074,7 +1074,7 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
                 const SwFlyCache* pFlyCache = *aFlyCacheSetIt;
                 SwFlyFrm* pFly = ((SwVirtFlyDrawObj*)*aFlySetIt)->GetFlyFrm();
 
-                if ( pFly->Frm().Left() == WEIT_WECH )
+                if ( pFly->Frm().Left() == FAR_AWAY )
                 {
                     // we get the stored information
                     pFly->Frm().Pos().X() = pFlyCache->Left() +
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 403f64d..127cc6f 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1805,7 +1805,7 @@ void SwRootFrm::ImplCalcBrowseWidth()
                 SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
                 const SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
                 const sal_Bool bFly = pAnchoredObj->ISA(SwFlyFrm);
-                if ((bFly && (WEIT_WECH == pAnchoredObj->GetObjRect().Width()))
+                if ((bFly && (FAR_AWAY == pAnchoredObj->GetObjRect().Width()))
                     || rFmt.GetFrmSize().GetWidthPercent())
                 {
                     continue;
@@ -1824,7 +1824,7 @@ void SwRootFrm::ImplCalcBrowseWidth()
                             // Reactivated old code because
                             // nWidth = pAnchoredObj->GetObjRect().Right()
                             // gives wrong results for objects that are still
-                            // at position WEIT_WECH.
+                            // at position FAR_AWAY.
                             if ( bFly )
                             {
                                 nWidth = rFmt.GetFrmSize().GetWidth();
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 19d608a..aa5696f 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2668,7 +2668,7 @@ sal_Bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
                 // #i26945# - correction of conditions,
                 // if Writer fly frame has to be considered:
                 // - no need to check, if top of Writer fly frame differs
-                //   from WEIT_WECH, because its also check, if the Writer
+                //   from FAR_AWAY, because its also check, if the Writer
                 //   fly frame rectangle overlaps with <aRect>
                 // - no check, if bottom of anchor frame is prior the top of
                 //   the table, because Writer fly frames can be negative positioned.
@@ -3842,7 +3842,7 @@ long MA_FASTCALL CalcHeightWidthFlys( const SwFrm *pFrm )
                     const SwFrmFmt& rFrmFmt = pAnchoredObj->GetFrmFmt();
                     const bool bConsiderObj =
                         (rFrmFmt.GetAnchor().GetAnchorId() != FLY_AS_CHAR) &&
-                            pAnchoredObj->GetObjRect().Top() != WEIT_WECH &&
+                            pAnchoredObj->GetObjRect().Top() != FAR_AWAY &&
                             rFrmFmt.GetFollowTextFlow().GetValue() &&
                             pAnchoredObj->GetPageFrm() == pTmp->FindPageFrm();
                     if ( bConsiderObj )
@@ -4773,7 +4773,7 @@ sal_Bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, sal_Bool bInva )
                         // #i52904# - no direct move of objects,
                         // whose vertical position doesn't depend on anchor frame.
                         const bool bDirectMove =
-                                WEIT_WECH != pFly->Frm().Top() &&
+                                FAR_AWAY != pFly->Frm().Top() &&
                                 bVertPosDepOnAnchor &&
                                 !pFly->ConsiderObjWrapInfluenceOnObjPos();
                         if ( bDirectMove )
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index ec6d09a..2f61c69 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -1077,7 +1077,7 @@ sal_Bool SwTxtFly::ForEach( const SwRect &rRect, SwRect* pRect, sal_Bool bAvoid
                             GetMaster() == pAnchoredObj->GetAnchorFrm() ||
                             ((FLY_AT_PARA != rAnchor.GetAnchorId()) &&
                              (FLY_AT_CHAR != rAnchor.GetAnchorId())) ) )
-                        || aRect.Top() == WEIT_WECH )
+                        || aRect.Top() == FAR_AWAY )
                         continue;
                 }
 
-- 
1.7.9


--=-ulev5HAgWbboRrd0/35A--



More information about the LibreOffice mailing list