[Libreoffice-commits] .: 2 commits - svx/source
David Tardon
dtardon at kemper.freedesktop.org
Wed Dec 29 01:53:02 PST 2010
svx/source/accessibility/GraphCtlAccessibleContext.cxx | 2
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 77 ++++++----------
svx/source/fmcomp/fmgridcl.cxx | 3
svx/source/form/datanavi.cxx | 3
svx/source/form/fmvwimp.cxx | 6 -
svx/source/form/formcontroller.cxx | 2
svx/source/gallery2/galtheme.cxx | 2
svx/source/items/numfmtsh.cxx | 7 -
svx/source/svdraw/sdrpagewindow.cxx | 2
svx/source/svdraw/svdedtv1.cxx | 3
svx/source/svdraw/svdfmtf.cxx | 5 -
svx/source/svdraw/svdfmtf.hxx | 4
svx/source/svdraw/svdibrow.cxx | 4
svx/source/svdraw/svdoedge.cxx | 31 +-----
svx/source/svdraw/svdotext.cxx | 3
svx/source/svdraw/svdotextpathdecomposition.cxx | 2
svx/source/table/accessibletableshape.cxx | 2
svx/source/table/tabledesign.cxx | 2
svx/source/table/tablelayouter.cxx | 7 -
svx/source/table/tablelayouter.hxx | 5 -
svx/source/tbxctrls/tbcontrl.cxx | 4
21 files changed, 61 insertions(+), 115 deletions(-)
New commits:
commit 0a7bd33de162d4f3aca86f67b33dbd82e0a0b204
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed Dec 29 09:52:22 2010 +0100
Some cppcheck cleaning
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index 8abc832..0e60765 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -824,7 +824,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::disposing()
{
ShapesMapType::iterator I;
- for (I=mxShapes.begin(); I!=mxShapes.end(); I++)
+ for (I=mxShapes.begin(); I!=mxShapes.end(); ++I)
{
XAccessible* pAcc = (*I).second;
Reference< XComponent > xComp( pAcc, UNO_QUERY );
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index f73113c..23cfd5b 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -124,7 +124,7 @@ sal_Bool InitializeFontWorkData( const SdrObject* pCustomShape, const sal_uInt16
{
FWTextArea aTextArea;
sal_Int32 i, nParagraphs = ( ( nParagraphsLeft - 1 ) / nTextAreaCount ) + 1;
- for ( i = 0; i < nParagraphs; i++, j++ )
+ for ( i = 0; i < nParagraphs; ++i, ++j )
{
FWParagraphData aParagraphData;
aParagraphData.aString = rTextObj.GetText( j );
@@ -215,9 +215,9 @@ void CalculateHorizontalScalingFactor( const SdrObject* pCustomShape,
fScalingFactor = fScale;
}
}
- aParagraphIter++;
+ ++aParagraphIter;
}
- aTextAreaIter++;
+ ++aTextAreaIter;
}
rFWData.fHorizontalTextScaling = fScalingFactor;
}
@@ -313,7 +313,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
// rotating
aOutlineIter->Rotate( Point( nTextWidth / 2, rFWData.nSingleLineHeight / 2 ), 900 );
aCharacterData.aBoundRect.Union( aOutlineIter->GetBoundRect() );
- aOutlineIter++;
+ ++aOutlineIter;
}
aOutlineIter = aCharacterData.vOutlines.begin();
aOutlineIEnd = aCharacterData.vOutlines.end();
@@ -322,7 +322,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
sal_Int32 nM = - aCharacterData.aBoundRect.Left() + nHeight;
aOutlineIter->Move( nM, 0 );
aCharacterData.aBoundRect.Move( nM, 0 );
- aOutlineIter++;
+ ++aOutlineIter;
}
nHeight += aCharacterData.aBoundRect.GetWidth() + ( rFWData.nSingleLineHeight / 5 );
aSingleCharacterUnion.Union( aCharacterData.aBoundRect );
@@ -339,9 +339,9 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
while ( aOutlineIter != aOutlineIEnd )
{
aOutlineIter->Move( ( aSingleCharacterUnion.GetWidth() - aCharacterIter->aBoundRect.GetWidth() ) / 2, 0 );
- aOutlineIter++;
+ ++aOutlineIter;
}
- aCharacterIter++;
+ ++aCharacterIter;
}
}
else
@@ -359,25 +359,6 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
{
aParagraphIter->vCharacters.push_back( aCharacterData );
}
-
-/* trying to retrieve each single character _> is not working well
- sal_Int32 i;
- for ( i = 0; i < rText.getLength(); i++ )
- {
- FWCharacterData aCharacterData;
- if ( aVirDev.GetTextOutlines( aCharacterData.vOutlines, rText, 0, i, 1, TRUE, nWidth, pDXArry ) )
- {
- std::vector< PolyPolygon >::iterator aOutlineIter = aCharacterData.vOutlines.begin();
- std::vector< PolyPolygon >::iterator aOutlineIEnd = aCharacterData.vOutlines.end();
- while ( aOutlineIter != aOutlineIEnd )
- {
- aCharacterData.aBoundRect.Union( aOutlineIter->GetBoundRect() );
- aOutlineIter++;
- }
- }
- aParagraphIter->vCharacters.push_back( aCharacterData );
- }
-*/
}
delete[] pDXArry;
@@ -400,7 +381,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
aParagraphIter->aBoundRect.Union( aBoundRect );
}
- aCharacterIter++;
+ ++aCharacterIter;
}
}
// updating the boundrect for the text area by merging the current paragraph boundrect
@@ -433,9 +414,9 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
sal_Int32 nMove = aPolyPolyBoundRect.Top() - rParagraphBoundRect.Top();
if ( nMove )
aOutlineIter->Move( 0, -nMove );
- aOutlineIter++;
+ ++aOutlineIter;
}
- aCharacterIter++;
+ ++aCharacterIter;
}
}
}
@@ -443,7 +424,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
nVerticalOffset -= rFWData.nSingleLineHeight;
else
nVerticalOffset += rFWData.nSingleLineHeight;
- aParagraphIter++;
+ ++aParagraphIter;
}
}
@@ -489,12 +470,12 @@ void GetFontWorkOutline( FWData& rFWData, const SdrObject* pCustomShape )
while( aOutlineIter != aOutlineIEnd )
{
aOutlineIter->Scale( fScale, 1.0 );
- aOutlineIter++;
+ ++aOutlineIter;
}
- aCharacterIter++;
+ ++aCharacterIter;
}
}
- aParagraphIter++;
+ ++aParagraphIter;
}
}
else
@@ -524,12 +505,12 @@ void GetFontWorkOutline( FWData& rFWData, const SdrObject* pCustomShape )
while( aOutlineIter != aOutlineIEnd )
{
aOutlineIter->Move( nHorzDiff, 0 );
- aOutlineIter++;
+ ++aOutlineIter;
}
- aCharacterIter++;
+ ++aCharacterIter;
}
}
- aParagraphIter++;
+ ++aParagraphIter;
}
}
break;
@@ -538,7 +519,7 @@ void GetFontWorkOutline( FWData& rFWData, const SdrObject* pCustomShape )
case SDRTEXTHORZADJUST_LEFT : break; // already left aligned -> nothing to do
}
}
- aTextAreaIter++;
+ ++aTextAreaIter;
}
}
@@ -722,11 +703,11 @@ void FitTextOutlinesToShapeOutlines( const PolyPolygon& aOutlines2d, FWData& rFW
rPolyPoly.Rotate( Point( aBoundRect.Center().X(), aParagraphIter->aBoundRect.Center().Y() ), sin( fAngle ), cos( fAngle ) );
rPolyPoly.Move( (sal_Int32)( ( fx1 + fvx )- aBoundRect.Center().X() ), (sal_Int32)( ( fy1 + fvy ) - aParagraphIter->aBoundRect.Center().Y() ) );
- aOutlineIter++;
+ ++aOutlineIter;
}
- aCharacterIter++;
+ ++aCharacterIter;
}
- aParagraphIter++;
+ ++aParagraphIter;
}
}
}
@@ -798,15 +779,15 @@ void FitTextOutlinesToShapeOutlines( const PolyPolygon& aOutlines2d, FWData& rFW
// write back polygon
rPolyPoly[ i ] = aLocalPoly;
}
- aOutlineIter++;
+ ++aOutlineIter;
}
- aCharacterIter++;
+ ++aCharacterIter;
}
- aParagraphIter++;
+ ++aParagraphIter;
}
}
}
- aTextAreaIter++;
+ ++aTextAreaIter;
}
}
@@ -838,13 +819,13 @@ SdrObject* CreateSdrObjectFromParagraphOutlines( const FWData& rFWData, const Sd
// SJ: not setting model, so we save a lot of broadcasting and the model is not modified any longer
// pPathObj->SetModel( pCustomShape->GetModel() );
((SdrObjGroup*)pRet)->GetSubList()->NbcInsertObject( pPathObj );
- aOutlineIter++;
+ ++aOutlineIter;
}
- aCharacterIter++;
+ ++aCharacterIter;
}
- aParagraphIter++;
+ ++aParagraphIter;
}
- aTextAreaIter++;
+ ++aTextAreaIter;
}
Point aP( pCustomShape->GetSnapRect().Center() );
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 71fefd2..f8f0be5 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -510,11 +510,10 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ )
DBG_ERROR("FmGridHeader::ExecuteDrop: Exception occurred!");
}
- sal_Int32 nPreferedType = -1;
sal_Bool bDateNTimeCol = sal_False;
if (aPossibleTypes.Count() != 0)
{
- nPreferedType = aPossibleTypes[0];
+ sal_Int32 nPreferedType = aPossibleTypes[0];
if ((m_pImpl->nDropAction == DND_ACTION_LINK) && (aPossibleTypes.Count() > 1))
{
ImageList aImageList( SVX_RES(RID_SVXIMGLIST_FMEXPL) );
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 3d89f0e..345df16 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -1250,13 +1250,13 @@ namespace svxform
if ( xContainer.is() )
m_pNaviWin->AddContainerBroadcaster( xContainer );
- USHORT nIter = 0;
Reference< XEnumerationAccess > xNumAccess( _xModel->getInstances(), UNO_QUERY );
if ( xNumAccess.is() )
{
Reference < XEnumeration > xNum = xNumAccess->createEnumeration();
if ( xNum.is() && xNum->hasMoreElements() )
{
+ USHORT nIter = 0;
while ( xNum->hasMoreElements() )
{
if ( nIter == _nPagePos )
@@ -1885,6 +1885,7 @@ namespace svxform
m_aTabCtrl.SetPageText( nId, sNewName );
bIsDocModified = true;
}
+ delete(pPage);
}
break;
}
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index c4d0f36..329d7e2 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -586,7 +586,7 @@ FmWinRecList::const_iterator FmXFormView::findWindow( const Reference< XControlC
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen at sun.com", "FmXFormView::findWindow" );
for (FmWinRecList::const_iterator i = m_aWinList.begin();
- i != m_aWinList.end(); i++)
+ i != m_aWinList.end(); ++i)
{
if ( _rxCC == (*i)->getControlContainer() )
return i;
@@ -599,7 +599,7 @@ FmWinRecList::iterator FmXFormView::findWindow( const Reference< XControlContain
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen at sun.com", "FmXFormView::findWindow" );
for (FmWinRecList::iterator i = m_aWinList.begin();
- i != m_aWinList.end(); i++)
+ i != m_aWinList.end(); ++i)
{
if ( _rxCC == (*i)->getControlContainer() )
return i;
@@ -733,7 +733,7 @@ IMPL_LINK(FmXFormView, OnActivate, void*, /*EMPTYTAG*/)
Window* pWindow = const_cast<Window*>(static_cast<const Window*>(m_pView->GetActualOutDev()));
FmXPageViewWinRec* pFmRec = m_aWinList.size() ? m_aWinList[0] : NULL;
for (FmWinRecList::const_iterator i = m_aWinList.begin();
- i != m_aWinList.end(); i++)
+ i != m_aWinList.end(); ++i)
{
if (pWindow == (*i)->getWindow())
pFmRec =*i;
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index eacf3b5..3077838 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -1223,7 +1223,7 @@ void FormController::disposing(void)
// clean up our children
for (FmFormControllers::const_iterator i = m_aChilds.begin();
- i != m_aChilds.end(); i++)
+ i != m_aChilds.end(); ++i)
{
// search the position of the model within the form
Reference< XFormComponent > xForm((*i)->getModel(), UNO_QUERY);
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 324d5e3..8f051a8 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -723,7 +723,6 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, BO
if( pIStm )
{
String aThemeName;
- sal_uInt32 nThemeId = 0;
sal_uInt16 nVersion;
BOOL bThemeNameFromResource = FALSE;
@@ -731,6 +730,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, BO
if( nVersion <= 0x00ff )
{
+ sal_uInt32 nThemeId = 0;
ByteString aTmpStr;
*pIStm >> aTmpStr; aThemeName = String( aTmpStr.GetBuffer(), RTL_TEXTENCODING_UTF8 );
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index d6a2f3a..b1b5c52 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -373,14 +373,14 @@ void SvxNumberFormatShell::MakeFormat( String& rFormat,
if(aCurrencyFormatList.Count()>nCurrencyPos)
{
xub_StrLen rErrPos=0;
- sal_uInt16 rCatLbSelPos=0;
- short rFmtSelPos=0;
SvStrings aFmtEList;
sal_uInt32 nFound = pFormatter->TestNewString( *aCurrencyFormatList[nCurrencyPos], eCurLanguage );
if ( nFound == NUMBERFORMAT_ENTRY_NOT_FOUND )
{
+ sal_uInt16 rCatLbSelPos=0;
+ short rFmtSelPos=0;
AddFormat( *aCurrencyFormatList[nCurrencyPos],rErrPos,rCatLbSelPos,
rFmtSelPos,aFmtEList);
}
@@ -1729,10 +1729,9 @@ sal_uInt16 SvxNumberFormatShell::FindCurrencyFormat( const String& rFmtString )
sal_uInt16 nPos=FindCurrencyTableEntry(rFmtString, bTestBanking);
- sal_uInt16 nStart=0;
-
if(nPos!=(sal_uInt16)-1)
{
+ sal_uInt16 nStart=0;
if(bTestBanking && aCurCurrencyList.Count()>nPos)
{
nStart=nCount;
diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx
index 0e1f8fa..5153fb7 100644
--- a/svx/source/svdraw/sdrpagewindow.cxx
+++ b/svx/source/svdraw/sdrpagewindow.cxx
@@ -285,8 +285,6 @@ namespace
Color aColor(rand()%255, rand()%255, rand()%255);
impPaintStrokePolygon(aResult.getB2DPolygon(a), rOutDev, aColor);
}
-
- bool bBla = true;
}
}
}
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index c545c3c..1d2b1c4 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1370,7 +1370,6 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
nRotateY = nOldRotateY = aRotateAxe.Y();
}
- long nNewShearAngle=0;
long nShearAngle=0;
long nShearX=0;
long nShearY=0;
@@ -1426,7 +1425,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
// Shear
if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_SHEAR,TRUE,&pPoolItem)) {
- nNewShearAngle=((const SfxInt32Item*)pPoolItem)->GetValue();
+ long nNewShearAngle=((const SfxInt32Item*)pPoolItem)->GetValue();
if (nNewShearAngle>SDRMAXSHEAR) nNewShearAngle=SDRMAXSHEAR;
if (nNewShearAngle<-SDRMAXSHEAR) nNewShearAngle=-SDRMAXSHEAR;
if (nNewShearAngle!=nOldShearAngle) {
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index a217d92..e9126ab 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -691,14 +691,12 @@ bool IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rIndent)
bool bTileTRUE = false;
bool bTileFALSE = false;
bool bStretchTRUE = false;
- bool bStretchFALSE = false;
if (ImpGetItem(*pSet,XATTR_FILLBMP_TILE,pItem)) {
bTileTRUE=((const XFillBmpTileItem*)pItem)->GetValue();
bTileFALSE=!bTileTRUE;
}
if (ImpGetItem(*pSet,XATTR_FILLBMP_STRETCH,pItem)) {
bStretchTRUE=((const XFillBmpStretchItem*)pItem)->GetValue();
- bStretchFALSE=!bStretchTRUE;
}
// Stretch nicht anwaehlbar, wenn Tile=TRUE
if (nWhich==XATTR_FILLBMP_STRETCH) return bTileTRUE;
@@ -1198,7 +1196,6 @@ IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse)
if (nLongVal>pEntry->nMax) nLongVal=pEntry->nMax;
if (nLongVal<pEntry->nMin) nLongVal=pEntry->nMin;
}
- bool bPair = false;
bool bPairX = true;
bool bPairY = false;
USHORT nSepLen=1;
@@ -1209,7 +1206,6 @@ IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse)
if (nPos==STRING_NOTFOUND) nPos=aNewText.Search(sal_Unicode(' '));
if (nPos==STRING_NOTFOUND) { nPos=aNewText.SearchAscii(".."); if (nPos!=STRING_NOTFOUND) nSepLen=2; }
if (nPos!=STRING_NOTFOUND) {
- bPair = true;
bPairX=nPos>0;
XubString s(aNewText);
s.Erase(0,nPos+nSepLen);
commit 0922fe7b303e7f681a9d00a3b1727d7474e2422f
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed Dec 29 09:49:33 2010 +0100
Some cppcheck cleaning
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 229ecea..1ea7fb0 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -445,12 +445,11 @@ void ImpSdrGDIMetaFileImport::InsertObj( SdrObject* pObj, sal_Bool bScale )
}
/**************************************************************************************************/
-
-void ImpSdrGDIMetaFileImport::DoAction(MetaPixelAction& /*rAct*/)
+void ImpSdrGDIMetaFileImport::DoAction(MetaPixelAction& /*rAct*/) const
{
}
-void ImpSdrGDIMetaFileImport::DoAction(MetaPointAction& /*rAct*/)
+void ImpSdrGDIMetaFileImport::DoAction(MetaPointAction& /*rAct*/) const
{
}
diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx
index 6ba95c6..aa14791 100644
--- a/svx/source/svdraw/svdfmtf.hxx
+++ b/svx/source/svdraw/svdfmtf.hxx
@@ -106,8 +106,8 @@ protected:
sal_Bool bLastObjWasLine;
protected:
- void DoAction(MetaPixelAction & rAct);
- void DoAction(MetaPointAction & rAct);
+ void DoAction(MetaPixelAction & rAct) const;
+ void DoAction(MetaPointAction & rAct) const;
void DoAction(MetaLineAction & rAct);
void DoAction(MetaRectAction & rAct);
void DoAction(MetaRoundRectAction & rAct);
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 143e466..f4f8853 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -859,8 +859,6 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
Rectangle aBewareRect1(rBewareRect1);
Rectangle aBewareRect2(rBewareRect2);
Point aMeeting((aPt1.X()+aPt2.X()+1)/2,(aPt1.Y()+aPt2.Y()+1)/2);
- bool bMeetingXMid = true;
- bool bMeetingYMid = true;
if (eKind==SDREDGE_ONELINE) {
XPolygon aXP(2);
aXP[0]=rPt1;
@@ -906,7 +904,6 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
return aXP;
}
USHORT nIntersections=0;
- bool bForceMeeting = false; // Muss die Linie durch den MeetingPoint laufen?
{
Point aC1(aBewareRect1.Center());
Point aC2(aBewareRect2.Center());
@@ -961,23 +958,18 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
bool bY2Ok=aPt2.Y()<=aBewareRect1.Top() || aPt2.Y()>=aBewareRect1.Bottom();
if (bLks1 && (bY1Ok || aBewareRect1.Left()<aBewareRect2.Right()) && (bY2Ok || aBewareRect2.Left()<aBewareRect1.Right())) {
aMeeting.X()=nXMin;
- bMeetingXMid = false;
}
if (bRts1 && (bY1Ok || aBewareRect1.Right()>aBewareRect2.Left()) && (bY2Ok || aBewareRect2.Right()>aBewareRect1.Left())) {
aMeeting.X()=nXMax;
- bMeetingXMid = false;
}
if (bObn1 && (bX1Ok || aBewareRect1.Top()<aBewareRect2.Bottom()) && (bX2Ok || aBewareRect2.Top()<aBewareRect1.Bottom())) {
aMeeting.Y()=nYMin;
- bMeetingYMid = false;
}
if (bUnt1 && (bX1Ok || aBewareRect1.Bottom()>aBewareRect2.Top()) && (bX2Ok || aBewareRect2.Bottom()>aBewareRect1.Top())) {
aMeeting.Y()=nYMax;
- bMeetingYMid = false;
}
} else if (nMainCase==2) {
// Fall 2:
- bForceMeeting = true;
if (bHor1) { // beide waagerecht
/* 9 Moeglichkeiten: ù ù ù */
/* 2.1 Gegenueber, Ueberschneidung à ´ ù */
@@ -1032,7 +1024,6 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
} else {
aMeeting.Y()=nYMax;
}
- bMeetingYMid = false;
if (bCase29) {
// und nun noch dafuer sorgen, dass das
// umzingelte Obj nicht durchquert wird
@@ -1041,7 +1032,6 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
} else {
aMeeting.X()=aBewR1.Left();
}
- bMeetingXMid = false;
}
} else {
// Direkte Verbindung (3-Linien Z-Verbindung), da
@@ -1092,7 +1082,6 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
} else {
aMeeting.X()=nXMax;
}
- bMeetingXMid = false;
if (bCase29) {
// und nun noch dafuer sorgen, dass das
// umzingelte Obj nicht durchquert wird
@@ -1101,7 +1090,6 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
} else {
aMeeting.Y()=aBewR1.Top();
}
- bMeetingYMid = false;
}
} else {
// Direkte Verbindung (3-Linien Z-Verbindung), da
@@ -1172,9 +1160,6 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
(((bRts2 && aTmpR2.Right ()<=aPt1.X()) || (bLks2 && aTmpR2.Left()>=aPt1.X())) &&
((bUnt1 && aTmpR1.Bottom()<=aPt2.Y()) || (bObn1 && aTmpR1.Top ()>=aPt2.Y())))) {
// Fall 3.2 trifft zu: Verbindung mit lediglich 2 Linien
- bForceMeeting = true;
- bMeetingXMid = false;
- bMeetingYMid = false;
if (bHor1) {
aMeeting.X()=aPt2.X();
aMeeting.Y()=aPt1.Y();
@@ -1194,11 +1179,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
((bUnt1 && aBewareRect1.Bottom()>aBewareRect2.Top ()) ||
(bObn1 && aBewareRect1.Top ()<aBewareRect2.Bottom())))) {
// Fall 3.3
- bForceMeeting = true;
- if (bRts1 || bRts2) { aMeeting.X()=nXMax; bMeetingXMid = false; }
- if (bLks1 || bLks2) { aMeeting.X()=nXMin; bMeetingXMid = false; }
- if (bUnt1 || bUnt2) { aMeeting.Y()=nYMax; bMeetingYMid = false; }
- if (bObn1 || bObn2) { aMeeting.Y()=nYMin; bMeetingYMid = false; }
+ if (bRts1 || bRts2) { aMeeting.X()=nXMax; }
+ if (bLks1 || bLks2) { aMeeting.X()=nXMin; }
+ if (bUnt1 || bUnt2) { aMeeting.Y()=nYMax; }
+ if (bObn1 || bObn2) { aMeeting.Y()=nYMin; }
}
}
}
@@ -1220,8 +1204,6 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
// Sonderbehandlung fuer 'I'-Verbinder
nXP1Anz--; aXP1.Remove(nXP1Anz,1);
nXP2Anz--; aXP2.Remove(nXP2Anz,1);
- bMeetingXMid = false;
- bMeetingYMid = false;
}
if (bInsMeetingPoint) {
aXP1.Insert(XPOLY_APPEND,aMeeting,XPOLY_NORMAL);
@@ -2096,8 +2078,6 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO
bool bFnd = false;
SdrObjConnection aTestCon;
SdrObjConnection aBestCon;
- bool bTestBoundHit = false;
- //bool bBestBoundHit=FALSE;
while (no>0 && !bFnd) {
// Problem: Gruppenobjekt mit verschiedenen Layern liefert LayerID 0 !!!!
@@ -2110,7 +2090,6 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO
Rectangle aObjBound(pObj->GetCurrentBoundRect());
if (aObjBound.IsOver(aMouseRect)) {
aTestCon.ResetVars();
- bTestBoundHit = false;
bool bEdge=HAS_BASE(SdrEdgeObj,pObj); // kein BestCon fuer Edge
// Die Userdefined Konnektoren haben absolute Prioritaet.
// Danach kommt Vertex, Corner und Mitte(Best) gleich priorisiert.
@@ -2197,7 +2176,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO
aMouseRect.Top() -=nBoundHitTol;
aMouseRect.Right() +=nBoundHitTol;
aMouseRect.Bottom()+=nBoundHitTol;
- bTestBoundHit=aObjBound.IsOver(aMouseRect2);
+ aObjBound.IsOver(aMouseRect2);
}
}
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 2585c70..06692ae 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1061,10 +1061,9 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS
long nX=(nWantWdt*100) /nIsWdt; // X-Stretching berechnen
long nY=(nWantHgt*100) /nIsHgt; // Y-Stretching berechnen
bool bChkX = true;
- bool bChkY = true;
if (bNoStretching) { // #35762# evtl. nur proportional moeglich
if (nX>nY) { nX=nY; bChkX=FALSE; }
- else { nY=nX; bChkY=FALSE; }
+ else { nY=nX; }
}
while (nLoopCount<5 && !bNoMoreLoop) {
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx
index b66458c..b419403 100644
--- a/svx/source/svdraw/svdotextpathdecomposition.cxx
+++ b/svx/source/svdraw/svdotextpathdecomposition.cxx
@@ -593,7 +593,7 @@ namespace
const drawinglayer::attribute::StrokeAttribute& rStrokeAttribute,
std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& rTarget)
{
- for(basegfx::B2DPolyPolygonVector::const_iterator aPolygon(rB2DPolyPolyVector.begin()); aPolygon != rB2DPolyPolyVector.end(); aPolygon++)
+ for(basegfx::B2DPolyPolygonVector::const_iterator aPolygon(rB2DPolyPolyVector.begin()); aPolygon != rB2DPolyPolyVector.end(); ++aPolygon)
{
// prepare PolyPolygons
basegfx::B2DPolyPolygon aB2DPolyPolygon = *aPolygon;
diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx
index d563e0c..5b3890f 100644
--- a/svx/source/table/accessibletableshape.cxx
+++ b/svx/source/table/accessibletableshape.cxx
@@ -229,7 +229,7 @@ void SAL_CALL AccessibleTableShapeImpl::modified( const EventObject& /*aEvent*/
// all accessible cell instances still left in aTempChildMap must be disposed
// as they are no longer part of the table
- for( AccessibleCellMap::iterator iter( aTempChildMap.begin() ); iter != aTempChildMap.end(); iter++ )
+ for( AccessibleCellMap::iterator iter( aTempChildMap.begin() ); iter != aTempChildMap.end(); ++iter )
{
(*iter).second->dispose();
}
diff --git a/svx/source/table/tabledesign.cxx b/svx/source/table/tabledesign.cxx
index 32627b8..9c46944 100644
--- a/svx/source/table/tabledesign.cxx
+++ b/svx/source/table/tabledesign.cxx
@@ -717,7 +717,7 @@ void SAL_CALL TableDesignFamily::dispose( ) throw (RuntimeException)
TableDesignStyleVector aDesigns;
aDesigns.swap( maDesigns );
- for( TableDesignStyleVector::iterator iter( aDesigns.begin() ); iter != aDesigns.end(); iter++ )
+ for( TableDesignStyleVector::iterator iter( aDesigns.begin() ); iter != aDesigns.end(); ++iter )
{
Reference< XComponent > xComp( (*iter), UNO_QUERY );
if( xComp.is() )
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 693f8c8..a3e4340 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -156,8 +156,7 @@ bool TableLayouter::getCellArea( const CellPos& rPos, basegfx::B2IRectangle& rAr
}
// -----------------------------------------------------------------------------
-
-sal_Int32 TableLayouter::getRowHeight( sal_Int32 nRow )
+sal_Int32 TableLayouter::getRowHeight( sal_Int32 nRow ) const
{
if( isValidRow(nRow) )
return maRows[nRow].mnSize;
@@ -180,8 +179,7 @@ void TableLayouter::setRowHeight( sal_Int32 nRow, sal_Int32 nHeight )
}
// -----------------------------------------------------------------------------
-
-sal_Int32 TableLayouter::getColumnWidth( sal_Int32 nColumn )
+sal_Int32 TableLayouter::getColumnWidth( sal_Int32 nColumn ) const
{
if( isValidColumn(nColumn) )
return maColumns[nColumn].mnSize;
@@ -1204,7 +1202,6 @@ void TableLayouter::DistributeRows( ::Rectangle& rArea, sal_Int32 nFirstRow, sal
}
// -----------------------------------------------------------------------------
-
void TableLayouter::SetWritingMode( com::sun::star::text::WritingMode eWritingMode )
{
meWritingMode = eWritingMode;
diff --git a/svx/source/table/tablelayouter.hxx b/svx/source/table/tablelayouter.hxx
index 6bb9d1b..1bbe0c4 100644
--- a/svx/source/table/tablelayouter.hxx
+++ b/svx/source/table/tablelayouter.hxx
@@ -95,13 +95,12 @@ public:
::sal_Int32 getRowCount() const { return static_cast< ::sal_Int32 >( maRows.size() ); }
::sal_Int32 getColumnCount() const { return static_cast< ::sal_Int32 >( maColumns.size() ); }
-
- sal_Int32 getRowHeight( sal_Int32 nRow );
+ sal_Int32 getRowHeight( sal_Int32 nRow ) const;
// sets the layout height of the given row hard, LayoutTable must be called directly after calling this method! */
void setRowHeight( sal_Int32 nRow, sal_Int32 nHeight );
- sal_Int32 getColumnWidth( sal_Int32 nColumn );
+ sal_Int32 getColumnWidth( sal_Int32 nColumn ) const;
// sets the layout width of the given column hard, LayoutTable must be called directly after calling this method! */
void setColumnWidth( sal_Int32 nColumn, sal_Int32 nWidth );
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index f2b6821..326ec3e 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1979,7 +1979,6 @@ void SvxStyleToolBoxControl::FillStyleBox()
{
const SfxStyleFamily eFamily = GetActFamily();
USHORT nCount = pStyleSheetPool->Count();
- USHORT i = 0;
SfxStyleSheetBase* pStyle = NULL;
BOOL bDoFill = FALSE;
@@ -1998,6 +1997,7 @@ void SvxStyleToolBoxControl::FillStyleBox()
}
else
{
+ USHORT i= 0;
while ( pStyle && !bDoFill )
{
bDoFill = ( pBox->GetEntry(i) != pStyle->GetName() );
@@ -2014,12 +2014,12 @@ void SvxStyleToolBoxControl::FillStyleBox()
{
USHORT _i;
sal_uInt32 nCnt = pImpl->aDefaultStyles.size();
- bool bInsert;
pStyle = pStyleSheetPool->First();
if( pImpl->bSpecModeWriter || pImpl->bSpecModeCalc )
{
+ bool bInsert;
while ( pStyle )
{
// sort out default styles
More information about the Libreoffice-commits
mailing list