You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2014/04/30 14:08:51 UTC

svn commit: r1591267 - /openoffice/trunk/main/sw/source/core/layout/fly.cxx

Author: orw
Date: Wed Apr 30 12:08:51 2014
New Revision: 1591267

URL: http://svn.apache.org/r1591267
Log:
117749: remove unused local variable

	patch by: caolanm@redhat.com


Modified:
    openoffice/trunk/main/sw/source/core/layout/fly.cxx

Modified: openoffice/trunk/main/sw/source/core/layout/fly.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/layout/fly.cxx?rev=1591267&r1=1591266&r2=1591267&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/layout/fly.cxx (original)
+++ openoffice/trunk/main/sw/source/core/layout/fly.cxx Wed Apr 30 12:08:51 2014
@@ -103,10 +103,7 @@ TYPEINIT2(SwFlyFrm,SwLayoutFrm,SwAnchore
 
 SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) :
 	SwLayoutFrm( pFmt, pSib ),
-    // OD 2004-03-22 #i26791#
     SwAnchoredObject(),
-    // OD 2004-05-27 #i26791# - moved to <SwAnchoredObject>
-//    aRelPos(),
 	pPrevLink( 0 ),
 	pNextLink( 0 ),
 	bInCnt( sal_False ),
@@ -118,21 +115,16 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, S
 {
     nType = FRMC_FLY;
 
-	bInvalid = bNotifyBack = sal_True;
-	bLocked  = bMinHeight =
-	bHeightClipped = bWidthClipped = bFormatHeightOnly = sal_False;
-
-	//Grosseneinstellung, Fixe groesse ist immer die Breite
-	const SwFmtFrmSize &rFrmSize = pFmt->GetFrmSize();
-    sal_Bool bVert = sal_False;
-    sal_uInt16 nDir =
-        ((SvxFrameDirectionItem&)pFmt->GetFmtAttr( RES_FRAMEDIR )).GetValue();
+    bInvalid = bNotifyBack = sal_True;
+    bLocked = bMinHeight = bHeightClipped = bWidthClipped = bFormatHeightOnly = sal_False;
+
+    //Grosseneinstellung, Fixe groesse ist immer die Breite
+    const SwFmtFrmSize &rFrmSize = pFmt->GetFrmSize();
+    sal_uInt16 nDir = ((SvxFrameDirectionItem&)pFmt->GetFmtAttr( RES_FRAMEDIR )).GetValue();
     if( FRMDIR_ENVIRONMENT == nDir )
     {
         bDerivedVert = 1;
         bDerivedR2L = 1;
-        if( pAnch && pAnch->IsVertical() )
-            bVert = sal_True;
     }
     else
     {
@@ -165,7 +157,6 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, S
             }
         }
         
-        bVert = bVertical;
         bInvalidR2L = 0;
         if( FRMDIR_HORI_RIGHT_TOP == nDir )
             bRightToLeft = 1;
@@ -182,25 +173,20 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, S
     else if ( rFrmSize.GetHeightSizeType() == ATT_FIX_SIZE )
         bFixSize = sal_True;
 
-    // OD 2004-02-12 #110582#-2 - insert columns, if necessary
+    // insert columns, if necessary
     InsertColumns();
 
-	//Erst das Init, dann den Inhalt, denn zum Inhalt koennen  widerum
-	//Objekte/Rahmen gehoeren die dann angemeldet werden.
+	// initialize before inserting content as the content might contain other objects which need to be registered
     InitDrawObj( sal_False );
 
-    // OD 2004-01-19 #110582#
     Chain( pAnch );
 
-    // OD 2004-01-19 #110582#
     InsertCnt();
 
-	//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;
+    // apply dummy position which is far-away in order to avoid needless formattings
+    Frm().Pos().X() = Frm().Pos().Y() = WEIT_WECH;
 }
 
-// OD 2004-01-19 #110582#
 void SwFlyFrm::Chain( SwFrm* _pAnch )
 {
     // Connect to chain neighboors.
@@ -232,7 +218,6 @@ void SwFlyFrm::Chain( SwFrm* _pAnch )
     }
 }
 
-// OD 2004-01-19 #110582#
 void SwFlyFrm::InsertCnt()
 {
     if ( !GetPrevLink() )
@@ -253,20 +238,17 @@ void SwFlyFrm::InsertCnt()
     }
 }
 
- // OD 2004-02-12 #110582#-2
- void SwFlyFrm::InsertColumns()
- {
-    // --> OD 2009-08-12 #i97379#
+void SwFlyFrm::InsertColumns()
+{
     // Check, if column are allowed.
     // Columns are not allowed for fly frames, which represent graphics or embedded objects.
     const SwFmtCntnt& rCntnt = GetFmt()->GetCntnt();
     ASSERT( rCntnt.GetCntntIdx(), "<SwFlyFrm::InsertColumns()> - no content prepared." );
-    SwNodeIndex aFirstCntnt( *(rCntnt.GetCntntIdx()), 1 );
+    SwNodeIndex aFirstCntnt( *( rCntnt.GetCntntIdx() ), 1 );
     if ( aFirstCntnt.GetNode().IsNoTxtNode() )
     {
         return;
     }
-    // <--
 
     const SwFmtCol &rCol = GetFmt()->GetCol();
     if ( rCol.GetNumCols() > 1 )
@@ -280,7 +262,7 @@ void SwFlyFrm::InsertCnt()
                              //Old-Wert hereingereicht wird.
         ChgColumns( aOld, rCol );
     }
- }
+}
 
 /*************************************************************************
 |*