From 4dd7c0369d66aa7b30f2b9e547faa5fb2c7cd8dd Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 17 Jul 2012 17:00:14 +0200 Subject: Various Clang 3.1 -Wunsued-variable, -Wconstant-conversion Change-Id: I0799f22685609201dfb524c373d065b6184ed53c --- svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 1 - svx/source/dialog/frmsel.cxx | 2 -- svx/source/dialog/pagectrl.cxx | 4 ---- svx/source/engine3d/scene3d.cxx | 4 +--- svx/source/form/filtnav.cxx | 10 +++++----- svx/source/form/tabwin.cxx | 1 - svx/source/gallery2/galbrws.cxx | 1 - svx/source/inc/filtnav.hxx | 2 +- svx/source/svdraw/svdograf.cxx | 4 ---- svx/source/svdraw/svdopath.cxx | 2 -- 10 files changed, 7 insertions(+), 24 deletions(-) (limited to 'svx') diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 0b60720b33cb..2f6833f0bada 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -853,7 +853,6 @@ SdrObject* EnhancedCustomShapeFontWork::CreateFontWork( const SdrObject* pShape2 { SdrObject* pRet = NULL; - Rectangle aLogicRect( pCustomShape->GetLogicRect() ); PolyPolygon aOutlines2d( GetOutlinesFromShape2d( pShape2d ) ); sal_uInt16 nOutlinesCount2d = aOutlines2d.Count(); if ( nOutlinesCount2d ) diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index 75a7d7ebe830..e87731744fd4 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -378,8 +378,6 @@ void FrameSelectorImpl::InitBorderGeometry() maArray.SetYOffset( mnLine1 ); maArray.SetAllRowHeights( (mbHor ? mnLine2 : mnLine3) - mnLine1 ); - Rectangle aTLRect( maArray.GetCellRect( 0, 0 ) ); - // Focus polygons --------------------------------------------------------- /* Width for focus rectangles from center of frame borders. */ diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx index 7eec077c837a..db46a37e0488 100644 --- a/svx/source/dialog/pagectrl.cxx +++ b/svx/source/dialog/pagectrl.cxx @@ -202,10 +202,6 @@ void SvxPageWindow::DrawPage( const Point& rOrg, const sal_Bool bSecond, const s SetFillColor( rFieldColor ); DrawRect( Rectangle( rOrg, aTempSize ) ); - // Border Top Bottom Left Right - Point aBegin( rOrg ); - Point aEnd( rOrg ); - long nL = nLeft; long nR = nRight; diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index 76d6a8931893..732eb210c435 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -547,8 +547,6 @@ void E3dScene::RotateScene (const Point& rRef, long /*nWink*/, double sn, double long dyOutRectHalf = labs(UpperLeft.Y() - LowerRight.Y()); dyOutRectHalf /= 2; - Rectangle RectQuelle(aOutRect), RectZiel(aOutRect); - // Only the center is moved. The corners are moved by NbcMove. For the // rotation a cartesian coordinate system is used in which the pivot // point is the origin, and the y-axis increases upward, the X-axis to @@ -571,7 +569,7 @@ void E3dScene::RotateScene (const Point& rRef, long /*nWink*/, double sn, double // positive direction! { // xnew = x * cos(alpha) - y * sin(alpha) // ynew = x * sin(alpha) + y * cos(alpha) - // Bottom Right is not rotated: the pages of RectQuelle must + // Bottom Right is not rotated: the pages of aOutRect must // remain parallel to the coordinate axes. NewCenter.X() = (long) (Center.X() * cs - Center.Y() * sn); NewCenter.Y() = (long) (Center.X() * sn + Center.Y() * cs); diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 24a0b87d6a95..270b9562d81e 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -249,15 +249,15 @@ TYPEINIT1( FmFilterHint, SfxHint ); //======================================================================== class FmFilterInsertedHint : public FmFilterHint { - sal_Int32 m_nPos; // Position relative to the parent of the data + sal_uLong m_nPos; // Position relative to the parent of the data public: TYPEINFO(); - FmFilterInsertedHint(FmFilterData* pData, sal_Int32 nRelPos) + FmFilterInsertedHint(FmFilterData* pData, sal_uLong nRelPos) :FmFilterHint(pData) ,m_nPos(nRelPos){} - sal_Int32 GetPos() const { return m_nPos; } + sal_uLong GetPos() const { return m_nPos; } }; TYPEINIT1( FmFilterInsertedHint, FmFilterHint ); @@ -793,7 +793,7 @@ void FmFilterModel::AppendFilterItems( FmFormItem& _rFormItem ) void FmFilterModel::Insert(const ::std::vector::iterator& rPos, FmFilterData* pData) { ::std::vector& rItems = pData->GetParent()->GetChildren(); - sal_Int32 nPos = rPos == rItems.end() ? LIST_APPEND : rPos - rItems.begin(); + sal_uLong nPos = rPos == rItems.end() ? LIST_APPEND : rPos - rItems.begin(); rItems.insert(rPos, pData); // UI benachrichtigen @@ -1548,7 +1548,7 @@ SvLBoxEntry* FmFilterNavigator::FindEntry(const FmFilterData* pItem) const } //------------------------------------------------------------------------ -void FmFilterNavigator::Insert(FmFilterData* pItem, sal_Int32 nPos) +void FmFilterNavigator::Insert(FmFilterData* pItem, sal_uLong nPos) { const FmParentData* pParent = pItem->GetParent() ? pItem->GetParent() : GetFilterModel(); diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 7948ad37d156..e5a8b38cd89e 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -424,7 +424,6 @@ void FmFieldWin::Resize() { SfxFloatingWindow::Resize(); - Point aPos(GetPosPixel()); Size aOutputSize( GetOutputSizePixel() ); ////////////////////////////////////////////////////////////////////// diff --git a/svx/source/gallery2/galbrws.cxx b/svx/source/gallery2/galbrws.cxx index 96df9025cf66..5442ef800b78 100644 --- a/svx/source/gallery2/galbrws.cxx +++ b/svx/source/gallery2/galbrws.cxx @@ -162,7 +162,6 @@ void GalleryBrowser::Resize() const long nFrameWidth = LogicToPixel( Size( 3, 0 ), MAP_APPFONT ).Width(); const long nFrameWidth2 = nFrameWidth << 1; - Size aMinSize( GetMinOutputSizePixel() ); Size aNewSize( GetOutputSizePixel() ); Point aSplitPos( mpSplitter->GetPosPixel() ); const Size aSplitSize( mpSplitter->GetOutputSizePixel() ); diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx index c694aaab50db..d1af0c954066 100644 --- a/svx/source/inc/filtnav.hxx +++ b/svx/source/inc/filtnav.hxx @@ -296,7 +296,7 @@ protected: void DeleteSelection(); SvLBoxEntry* FindEntry(const FmFilterData* pItem) const; - void Insert(FmFilterData* pItem, sal_Int32 nPos); + void Insert(FmFilterData* pItem, sal_uLong nPos); void Remove(FmFilterData* pItem); DECL_LINK(OnRemove, SvLBoxEntry*); diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index e03a8d0aefbb..bc9d0f7f2fa4 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -956,8 +956,6 @@ void SdrGrafObj::SaveGeoData(SdrObjGeoData& rGeo) const void SdrGrafObj::RestGeoData(const SdrObjGeoData& rGeo) { - Size aSizMerk( aRect.GetSize() ); - SdrRectObj::RestGeoData(rGeo); SdrGrafObjGeoData& rGGeo=(SdrGrafObjGeoData&)rGeo; bMirrored=rGGeo.bMirrored; @@ -1038,8 +1036,6 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(sal_Bool bBezier) const // Sort into group and return ONLY those objects that can be created from the MetaFile. SdrObjGroup* pGrp = new SdrObjGroup(); ImpSdrGDIMetaFileImport aFilter(*GetModel()); - Point aOutPos( aRect.TopLeft() ); - const Size aOutSiz( aRect.GetSize() ); aFilter.SetScaleRect(GetSnapRect()); aFilter.SetLayer(GetLayer()); diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 3ef20c8e17ed..c5f5c2a8151d 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -1328,7 +1328,6 @@ bool ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat) bool bFreeHand=IsFreeHand(pU->eAktKind); rStat.SetNoSnap(bFreeHand); rStat.SetOrtho8Possible(pU->eAktKind!=OBJ_CARC && pU->eAktKind!=OBJ_RECT && (!pU->bMixedCreate || pU->eAktKind!=OBJ_LINE)); - Point aActMerk(rXPoly[nActPoint]); rXPoly[nActPoint]=rStat.Now(); if (!pU->bMixedCreate && pU->eStartKind==OBJ_LINE && rXPoly.GetPointCount()>=1) { Point aPt(rStat.Start()); @@ -1403,7 +1402,6 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) bool bIncomp=pView!=NULL && pView->IsUseIncompatiblePathCreateInterface(); XPolygon& rXPoly=aPathPolygon[aPathPolygon.Count()-1]; sal_uInt16 nActPoint=rXPoly.GetPointCount()-1; - Point aAktMerk(rXPoly[nActPoint]); rXPoly[nActPoint]=rStat.Now(); if (!pU->bMixedCreate && pU->eStartKind==OBJ_LINE) { if (rStat.GetPointAnz()>=2) eCmd=SDRCREATE_FORCEEND; -- cgit