[Libreoffice-commits] .: 4 commits - binfilter/bf_sc binfilter/bf_svx binfilter/bf_xmloff filter/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Dec 23 05:03:23 PST 2010


 binfilter/bf_sc/source/filter/xml/sc_XMLColumnRowGroupExport.cxx |    4 -
 binfilter/bf_svx/source/svdraw/svx_svdoedge.cxx                  |   30 +---------
 binfilter/bf_xmloff/source/script/xmloff_XMLEventExport.cxx      |    2 
 filter/source/flash/swfwriter.cxx                                |    2 
 4 files changed, 8 insertions(+), 30 deletions(-)

New commits:
commit f87ca23efd3898f2c8fb554558552c73e5ccd5b0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 23 12:55:12 2010 +0000

    cppcheck: unused variable

diff --git a/binfilter/bf_svx/source/svdraw/svx_svdoedge.cxx b/binfilter/bf_svx/source/svdraw/svx_svdoedge.cxx
index 0addf85..3add7e3 100644
--- a/binfilter/bf_svx/source/svdraw/svx_svdoedge.cxx
+++ b/binfilter/bf_svx/source/svdraw/svx_svdoedge.cxx
@@ -682,8 +682,6 @@ namespace binfilter {
 /*N*/ 	bool bObn=nEscAngle==9000;
 /*N*/ 	bool bLks=nEscAngle==18000;
 /*N*/ 	bool bUnt=nEscAngle==27000;
-/*N*/ 	bool bHor=bLks || bRts;
-/*N*/ 	bool bVer=bObn || bUnt;
 /*N*/ 
 /*N*/ 	Point aP1(rStPt); // erstmal den Pflichtabstand
 /*N*/ 	if (bLks) aP1.X()=rRect.Left();
@@ -890,8 +888,6 @@ namespace binfilter {
 /*N*/ 	Rectangle aBewareRect1(rBewareRect1);
 /*N*/ 	Rectangle aBewareRect2(rBewareRect2);
 /*N*/ 	Point aMeeting((aPt1.X()+aPt2.X()+1)/2,(aPt1.Y()+aPt2.Y()+1)/2);
-/*N*/ 	bool bMeetingXMid=TRUE;
-/*N*/ 	bool bMeetingYMid=TRUE;
 /*N*/ 	if (eKind==SDREDGE_ONELINE) {
 /*?*/ 		XPolygon aXP(2);
 /*?*/ 		aXP[0]=rPt1;
@@ -939,7 +935,6 @@ namespace binfilter {
 /*?*/ 		return aXP;
 /*N*/ 	}
 /*N*/ 	USHORT nIntersections=0;
-/*N*/ 	bool bForceMeeting=FALSE; // Muss die Linie durch den MeetingPoint laufen?
 /*N*/ 	{
 /*N*/ 		Point aC1(aBewareRect1.Center());
 /*N*/ 		Point aC2(aBewareRect2.Center());
@@ -977,8 +972,6 @@ namespace binfilter {
 /*N*/ 		long nXMax=Max(aBewareRect1.Right(),aBewareRect2.Right());
 /*N*/ 		long nYMin=Min(aBewareRect1.Top(),aBewareRect2.Top());
 /*N*/ 		long nYMax=Max(aBewareRect1.Bottom(),aBewareRect2.Bottom());
-/*N*/ 		bool bBoundOverlap=aBoundRect1.Right()>aBoundRect2.Left() && aBoundRect1.Left()<aBoundRect2.Right() &&
-/*N*/ 							   aBoundRect1.Bottom()>aBoundRect2.Top() && aBoundRect1.Top()<aBoundRect2.Bottom();
 /*N*/ 		bool bBewareOverlap=aBewareRect1.Right()>aBewareRect2.Left() && aBewareRect1.Left()<aBewareRect2.Right() &&
 /*N*/ 								aBewareRect1.Bottom()>aBewareRect2.Top() && aBewareRect1.Top()<aBewareRect2.Bottom();
 /*N*/ 		unsigned nMainCase=3;
@@ -994,23 +987,18 @@ namespace binfilter {
 /*N*/ 			bool bY2Ok=aPt2.Y()<=aBewareRect1.Top() || aPt2.Y()>=aBewareRect1.Bottom();
 /*N*/ 			if (bLks1 && (bY1Ok || aBewareRect1.Left()<aBewareRect2.Right()) && (bY2Ok || aBewareRect2.Left()<aBewareRect1.Right())) {
 /*N*/ 				aMeeting.X()=nXMin;
-/*N*/ 				bMeetingXMid=FALSE;
 /*N*/ 			}
 /*N*/ 			if (bRts1 && (bY1Ok || aBewareRect1.Right()>aBewareRect2.Left()) && (bY2Ok || aBewareRect2.Right()>aBewareRect1.Left())) {
 /*N*/ 				aMeeting.X()=nXMax;
-/*N*/ 				bMeetingXMid=FALSE;
 /*N*/ 			}
 /*N*/ 			if (bObn1 && (bX1Ok || aBewareRect1.Top()<aBewareRect2.Bottom()) && (bX2Ok || aBewareRect2.Top()<aBewareRect1.Bottom())) {
 /*N*/ 				aMeeting.Y()=nYMin;
-/*N*/ 				bMeetingYMid=FALSE;
 /*N*/ 			}
 /*N*/ 			if (bUnt1 && (bX1Ok || aBewareRect1.Bottom()>aBewareRect2.Top()) && (bX2Ok || aBewareRect2.Bottom()>aBewareRect1.Top())) {
 /*N*/ 				aMeeting.Y()=nYMax;
-/*N*/ 				bMeetingYMid=FALSE;
 /*N*/ 			}
 /*N*/ 		} else if (nMainCase==2) {
 /*N*/ 			// Fall 2:
-/*N*/ 			bForceMeeting=TRUE;
 /*N*/ 			if (bHor1) { // beide waagerecht
 /*N*/ 				// 9 Moeglichkeiten:                   ???
 /*N*/ 				//   2.1 Gegenueber, Ueberschneidung   ???
@@ -1065,7 +1053,6 @@ namespace binfilter {
 /*N*/ 							} else {
 /*?*/ 								aMeeting.Y()=nYMax;
 /*N*/ 							}
-/*N*/ 							bMeetingYMid=FALSE;
 /*N*/ 							if (bCase29) {
 /*N*/ 								// und nun noch dafuer sorgen, dass das
 /*N*/ 								// umzingelte Obj nicht durchquert wird
@@ -1074,7 +1061,6 @@ namespace binfilter {
 /*N*/ 								} else {
 /*N*/ 									aMeeting.X()=aBewR1.Left();
 /*N*/ 								}
-/*N*/ 								bMeetingXMid=FALSE;
 /*N*/ 							}
 /*N*/ 						} else {
 /*N*/ 							// Direkte Verbindung (3-Linien Z-Verbindung), da
@@ -1125,7 +1111,6 @@ namespace binfilter {
 /*N*/ 							} else {
 /*N*/ 								aMeeting.X()=nXMax;
 /*N*/ 							}
-/*N*/ 							bMeetingXMid=FALSE;
 /*N*/ 							if (bCase29) {
 /*N*/ 								// und nun noch dafuer sorgen, dass das
 /*N*/ 								// umzingelte Obj nicht durchquert wird
@@ -1134,7 +1119,6 @@ namespace binfilter {
 /*N*/ 								} else {
 /*N*/ 									aMeeting.Y()=aBewR1.Top();
 /*N*/ 								}
-/*N*/ 								bMeetingYMid=FALSE;
 /*N*/ 							}
 /*N*/ 						} else {
 /*N*/ 							// Direkte Verbindung (3-Linien Z-Verbindung), da
@@ -1205,9 +1189,6 @@ namespace binfilter {
 /*N*/ 				(((bRts2 && aTmpR2.Right ()<=aPt1.X()) || (bLks2 && aTmpR2.Left()>=aPt1.X())) &&
 /*N*/ 				 ((bUnt1 && aTmpR1.Bottom()<=aPt2.Y()) || (bObn1 && aTmpR1.Top ()>=aPt2.Y())))) {
 /*N*/ 				// Fall 3.2 trifft zu: Verbindung mit lediglich 2 Linien
-/*N*/ 				bForceMeeting=TRUE;
-/*N*/ 				bMeetingXMid=FALSE;
-/*N*/ 				bMeetingYMid=FALSE;
 /*N*/ 				if (bHor1) {
 /*N*/ 					aMeeting.X()=aPt2.X();
 /*N*/ 					aMeeting.Y()=aPt1.Y();
@@ -1227,11 +1208,10 @@ namespace binfilter {
 /*N*/ 						((bUnt1 && aBewareRect1.Bottom()>aBewareRect2.Top   ()) ||
 /*N*/ 						 (bObn1 && aBewareRect1.Top   ()<aBewareRect2.Bottom())))) {
 /*N*/ 				// Fall 3.3
-/*N*/ 				bForceMeeting=TRUE;
-/*N*/ 				if (bRts1 || bRts2) { aMeeting.X()=nXMax; bMeetingXMid=FALSE; }
-/*N*/ 				if (bLks1 || bLks2) { aMeeting.X()=nXMin; bMeetingXMid=FALSE; }
-/*N*/ 				if (bUnt1 || bUnt2) { aMeeting.Y()=nYMax; bMeetingYMid=FALSE; }
-/*N*/ 				if (bObn1 || bObn2) { aMeeting.Y()=nYMin; bMeetingYMid=FALSE; }
+/*N*/ 				if (bRts1 || bRts2) { aMeeting.X()=nXMax; }
+/*N*/ 				if (bLks1 || bLks2) { aMeeting.X()=nXMin; }
+/*N*/ 				if (bUnt1 || bUnt2) { aMeeting.Y()=nYMax; }
+/*N*/ 				if (bObn1 || bObn2) { aMeeting.Y()=nYMin; }
 /*N*/ 			}
 /*N*/ 		}
 /*N*/ 	}
@@ -1253,8 +1233,6 @@ namespace binfilter {
 /*N*/ 		// Sonderbehandlung fuer 'I'-Verbinder
 /*N*/ 		nXP1Anz--; aXP1.Remove(nXP1Anz,1);
 /*N*/ 		nXP2Anz--; aXP2.Remove(nXP2Anz,1);
-/*N*/ 		bMeetingXMid=FALSE;
-/*N*/ 		bMeetingYMid=FALSE;
 /*N*/ 	}
 /*N*/ 	if (bInsMeetingPoint) {
 /*N*/ 		aXP1.Insert(XPOLY_APPEND,aMeeting,XPOLY_NORMAL);
commit b9fb8317d26f7221daef495a906f34fdc5d201ad
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 23 12:52:33 2010 +0000

    cppcheck: prefer prefix variant

diff --git a/binfilter/bf_xmloff/source/script/xmloff_XMLEventExport.cxx b/binfilter/bf_xmloff/source/script/xmloff_XMLEventExport.cxx
index 80ed4c2..f859712 100644
--- a/binfilter/bf_xmloff/source/script/xmloff_XMLEventExport.cxx
+++ b/binfilter/bf_xmloff/source/script/xmloff_XMLEventExport.cxx
@@ -69,7 +69,7 @@ XMLEventExport::~XMLEventExport()
     for( HandlerMap::iterator aIter = 
              aHandlerMap.begin();
          aIter != aEnd;
-         aIter++ )
+         ++aIter )
     {
         delete aIter->second;
     }
commit 24aab51c9450664a9a95f09316a0ad526a2aa944
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 23 12:50:20 2010 +0000

    cppcheck: prefer prefix variant

diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx
index 0fa0268..bd8daa0 100644
--- a/filter/source/flash/swfwriter.cxx
+++ b/filter/source/flash/swfwriter.cxx
@@ -153,7 +153,7 @@ void ImplCopySvStreamToXOutputStream( SvStream& rIn, Reference< XOutputStream >
 
 void Writer::storeTo( Reference< XOutputStream > &xOutStream )
 {
-    for(FontMap::iterator i = maFonts.begin(); i != maFonts.end(); i++)
+    for(FontMap::iterator i = maFonts.begin(); i != maFonts.end(); ++i)
     {
         FlashFont* pFont = (*i);
         pFont->write( *mpFontsStream );
commit a0c6d9fc481c5f1d3922d8042a7e9bbfcedc54c6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 23 12:47:50 2010 +0000

    cppcheck: prefer prefix variant

diff --git a/binfilter/bf_sc/source/filter/xml/sc_XMLColumnRowGroupExport.cxx b/binfilter/bf_sc/source/filter/xml/sc_XMLColumnRowGroupExport.cxx
index 2e1e371..2d7958b 100644
--- a/binfilter/bf_sc/source/filter/xml/sc_XMLColumnRowGroupExport.cxx
+++ b/binfilter/bf_sc/source/filter/xml/sc_XMLColumnRowGroupExport.cxx
@@ -98,7 +98,7 @@ sal_Bool ScMyOpenCloseColumnRowGroup::IsGroupStart(const sal_Int32 nField)
             ScMyColumnRowGroupVec::iterator aEnd = aTableStart.end();
             while ( aItr != aEnd && nItrField < nField )
             {
-                aItr++;
+                ++aItr;
                 if ( aItr != aEnd )
                     nItrField = aItr->nField;
             }
@@ -168,7 +168,7 @@ void ScMyOpenCloseColumnRowGroup::CloseGroups(const sal_Int32 nField)
 sal_Int32 ScMyOpenCloseColumnRowGroup::GetLast()
 {
     sal_Int32 maximum(-1);
-    for (ScMyFieldGroupVec::iterator i = aTableEnd.begin(); i != aTableEnd.end(); i++)
+    for (ScMyFieldGroupVec::iterator i = aTableEnd.begin(); i != aTableEnd.end(); ++i)
         if (*i > maximum)
             maximum = *i;
     return maximum;


More information about the Libreoffice-commits mailing list