[Libreoffice-commits] .: sw/source

Thomas Arnhold tarnhold at kemper.freedesktop.org
Tue Feb 14 04:39:23 PST 2012


 sw/source/core/text/txtfly.cxx |   64 -----------------------------------------
 sw/source/core/text/txtfrm.cxx |   39 ------------------------
 2 files changed, 103 deletions(-)

New commits:
commit 3bbb62f09fef9d8526ef6d4bdacc55def952963a
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 14 13:38:59 2012 +0100

    sw: dead code removal

diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 7a7ddf5..c2695f9 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -121,8 +121,6 @@ void SwTxtFormatter::CalcUnclipped( SwTwips& rTop, SwTwips& rBottom )
             "SwTxtFormatter::CalcUnclipped with unswapped frame" );
 
     long nFlyAsc, nFlyDesc;
-    // OD 08.01.2004 #i11859# - use new method <SwLineLayout::MaxAscentDescent(..)>
-    //lcl_MaxAscDescent( pCurr, rTop, rBottom, nFlyAsc, nFlyDesc );
     pCurr->MaxAscentDescent( rTop, rBottom, nFlyAsc, nFlyDesc );
     rTop = Y() + GetCurr()->GetAscent();
     rBottom = rTop + nFlyDesc;
@@ -156,8 +154,6 @@ void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
     aTmpInf.SetPos( aStart );
 
     long nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc;
-    // OD 08.01.2004 #i11859# - use new method <SwLineLayout::MaxAscentDescent(..)>
-    //lcl_MaxAscDescent( pPos, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc );
     pCurrent->MaxAscentDescent( nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc );
 
     KSHORT nTmpHeight = pCurrent->GetRealHeight();
@@ -195,9 +191,6 @@ void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
         if( ( pPos->IsFlyCntPortion() || pPos->IsGrfNumPortion() )
             && ( bAllWays || !IsQuick() ) )
         {
-            // OD 08.01.2004 #i11859# - use new method <SwLineLayout::MaxAscentDescent(..)>
-            //lcl_MaxAscDescent( pFirst, nTmpAscent, nTmpDescent,
-            //                  nFlyAsc, nFlyDesc, pPos );
             pCurrent->MaxAscentDescent( nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, pPos );
 
             if( pPos->IsGrfNumPortion() )
@@ -290,9 +283,6 @@ void SwTxtFormatter::AlignFlyInCntBase( long nBaseLine ) const
     {
         if( pPos->IsFlyCntPortion() || pPos->IsGrfNumPortion() )
         {
-            // OD 08.01.2004 #i11859# - use new method <SwLineLayout::MaxAscentDescent(..)>
-            //lcl_MaxAscDescent( pFirst, nTmpAscent, nTmpDescent,
-            //                  nFlyAsc, nFlyDesc, pPos );
             pCurr->MaxAscentDescent( nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, pPos );
 
             if( pPos->IsGrfNumPortion() )
@@ -963,8 +953,6 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
                     const SwFmtSurround &rSur = pFmt->GetSurround();
                     const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
                         //Nur undurchsichtige und weiter oben liegende.
-                    /// OD 08.10.2002 #103898# - add condition
-                    /// <!(pFly->IsBackgroundTransparent() || pFly->IsShadowTransparent())>
                     if( !( pFly->IsBackgroundTransparent()
                            || pFly->IsShadowTransparent() ) &&
                         SURROUND_THROUGHT == rSur.GetSurround() &&
@@ -1203,13 +1191,6 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
                     // anchored objects to one in the page header/footer and
                     // the document body --> content of at-paragraph/at-character
                     // anchored objects doesn't wrap around each other.
-//                    else if( bInFooterOrHeader )
-//                        return sal_False;  // In header or footer no wrapping
-//                                           // if both bounded at paragraph
-//                    else // Zwei Flies mit (auto-)absatzgebunder Verankerung ...
-//                    // ... entscheiden nach der Reihenfolge ihrer Anker im Dok.
-//                      bEvade = rNewA.GetCntntAnchor()->nNode.GetIndex() <=
-//                              rCurrA.GetCntntAnchor()->nNode.GetIndex();
                     else
                         return sal_False;
                 }
@@ -1451,51 +1432,6 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
                 // If objects on the same position are found, they are sorted
                 // on its width.
                 // #i68520#
-//                sal_uInt16 nPos = pFlyList->Count();
-//                while ( nPos )
-//                {
-//                    SdrObject* pTmpObj = (*pFlyList)[ --nPos ];
-//                    const SwRect aBoundRectOfTmpObj( GetBoundRect( pTmpObj ) );
-//                    if ( ( bR2L &&
-//                           ( (aBoundRectOfTmpObj.*fnRect->fnGetRight)() ==
-//                             (aBound.*fnRect->fnGetRight)() ) ) ||
-//                         ( !bR2L &&
-//                           ( (aBoundRectOfTmpObj.*fnRect->fnGetLeft)() ==
-//                             (aBound.*fnRect->fnGetLeft)() ) ) )
-//                    {
-//                        SwTwips nTopDiff =
-//                            (*fnRect->fnYDiff)( (aBound.*fnRect->fnGetTop)(),
-//                                                (aBoundRectOfTmpObj.*fnRect->fnGetTop)() );
-//                        if ( nTopDiff == 0 &&
-//                             ( ( bR2L &&
-//                                 ( (aBound.*fnRect->fnGetLeft)() >
-//                                   (aBoundRectOfTmpObj.*fnRect->fnGetLeft)() ) ) ||
-//                               ( !bR2L &&
-//                                 ( (aBound.*fnRect->fnGetRight)() <
-//                                   (aBoundRectOfTmpObj.*fnRect->fnGetRight)() ) ) ) )
-//                        {
-//                            ++nPos;
-//                            break;
-//                        }
-//                        else if ( nTopDiff > 0 )
-//                        {
-//                            ++nPos;
-//                            break;
-//                        }
-//                    }
-//                    else if ( ( bR2L &&
-//                                ( (aBoundRectOfTmpObj.*fnRect->fnGetRight)() >
-//                                  (aBound.*fnRect->fnGetRight)() ) ) ||
-//                              ( !bR2L &&
-//                                ( (aBoundRectOfTmpObj.*fnRect->fnGetLeft)() <
-//                                  (aBound.*fnRect->fnGetLeft)() ) ) )
-//                    {
-//                        ++nPos;
-//                        break;
-//                    }
-//                }
-//                SdrObject* pSdrObj = pAnchoredObj->DrawObj();
-//                pFlyList->C40_INSERT( SdrObject, pSdrObj, nPos );
                 {
                     SwAnchoredObjList::iterator aInsPosIter =
                             std::lower_bound( mpAnchoredObjList->begin(),
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 237cc6a..1005969 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -564,8 +564,6 @@ bool lcl_HideObj( const SwTxtFrm& _rFrm,
 
     - is called from HideHidden() - should hide objects in hidden paragraphs and
     - from _Format() - should hide/show objects in partly visible paragraphs
-
-    @author OD
 */
 void SwTxtFrm::HideAndShowObjects()
 {
@@ -751,9 +749,6 @@ void SwTxtFrm::_InvalidateRange( const SwCharRange &aRange, const long nD)
     }
     if(bInv)
     {
-// 90365: nD is passed to a follow two times
-//        if( GetFollow() )
-//            ((SwTxtFrm*)GetFollow())->InvalidateRange( aRange, nD );
         InvalidateSize();
     }
 }
@@ -1220,7 +1215,6 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
                             //     Thus, check complete fly frame background
                             //     color and *not* only its transparency value
                             if ( (rBack.GetColor() == COL_TRANSPARENT)  &&
-                            //if( rBack.GetColor().GetTransparency() &&
                                 rBack.GetGraphicPos() == GPOS_NONE )
                             {
                                 pFly->SetCompletePaint();
@@ -1318,16 +1312,6 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
         }
         break;
 
-/* Seit dem neuen Blocksatz muessen wir immer neu formatieren:
-        case RES_PARATR_ADJUST:
-        {
-            if( GetShell() )
-            {
-                Prepare( PREP_CLEAR );
-            }
-            break;
-        }
-*/
         // 6870: SwDocPosUpdate auswerten.
         case RES_DOCPOS_UPDATE:
         {
@@ -1413,17 +1397,6 @@ void SwTxtFrm::PrepWidows( const MSHORT nNeed, sal_Bool bNotify )
         return;
     pPara->SetPrepWidows( sal_True );
 
-    // These two lines of code have been deleted for #102340#.
-    // Obviously the widow control does not work if we have a
-    // pMaster->pFollow->pFollow situation:
-
-    // returnen oder nicht ist hier die Frage.
-    // Ohne IsLocked() ist 5156 gefaehrlich,
-    // ohne IsFollow() werden die Orphans unterdrueckt: 6968.
-    // Abfrage auf IsLocked erst hier, weil das Flag gesetzt werden soll.
-//  if( IsLocked() && IsFollow() )
-//      return;
-
     MSHORT nHave = nNeed;
 
     // Wir geben ein paar Zeilen ab und schrumpfen im CalcPreps()
@@ -1913,7 +1886,6 @@ SwTestFormat::SwTestFormat( SwTxtFrm* pTxtFrm, const SwFrm* pPre, SwTwips nMaxHe
                   (pFrm->Prt().*fnRect->fnGetTop)() - nLower ) );
     (pFrm->Prt().*fnRect->fnSetWidth)(
         (pFrm->Frm().*fnRect->fnGetWidth)() -
-        // OD 23.01.2003 #106895# - add 1st param to <SwBorderAttrs::CalcRight(..)>
         ( rAttrs.CalcLeft( pFrm ) + rAttrs.CalcRight( pFrm ) ) );
     pOldPara = pFrm->HasPara() ? pFrm->GetPara() : NULL;
     pFrm->SetPara( new SwParaPortion(), sal_False );
@@ -2201,8 +2173,6 @@ SwTwips SwTxtFrm::CalcFitToContent()
     are in LABEL_ALIGNMENT mode, in order to determine additional first
     line offset for the real text formatting due to the value of label
     adjustment attribute of the list level.
-
-    @author OD
 */
 void SwTxtFrm::CalcAdditionalFirstLineOffset()
 {
@@ -2279,8 +2249,6 @@ void SwTxtFrm::CalcAdditionalFirstLineOffset()
     OD 2005-05-20 #i47162# - introduce new optional parameter <_bUseFont>
     in order to force the usage of the former algorithm to determine the
     height of the last line, which uses the font.
-
-    @author OD
 */
 void SwTxtFrm::_CalcHeightOfLastLine( const bool _bUseFont )
 {
@@ -2387,7 +2355,6 @@ void SwTxtFrm::_CalcHeightOfLastLine( const bool _bUseFont )
                     // called recursive.
                     // Thus, member <mnHeightOfLastLine> is only set directly, if
                     // no recursive call is needed.
-    //                mnHeightOfLastLine = nAscent + nDescent;
                     const SwTwips nNewHeightOfLastLine = nAscent + nDescent;
                     // #i47162# - if last line only contains
                     // fly content portions, <mnHeightOfLastLine> is zero.
@@ -2560,12 +2527,6 @@ void SwTxtFrm::ChgThisLines()
         else //Paragraphs which are not counted should not manipulate the AllLines.
             nThisLines = nNew;
     }
-
-    //mba: invalidating is not necessary; if mongolian script has a problem, it should be fixed at the ritgh place
-    //with invalidating we probably get too much flickering
-    //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
-    //Ugly. How can we hack if better?
-    //InvalidatePage();
 }
 
 


More information about the Libreoffice-commits mailing list