summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-28 14:05:08 +0200
committerNoel Grandin <noel@peralex.com>2016-04-28 14:06:18 +0200
commit26d73dbf53831cf4d5aec1f4db32bedb2c1e06be (patch)
treeac690c7a1b71c5e2e8ce67c740034f97c3975bf0
parent2465cb26763b2ed8de65f35bce791fb55fe0e746 (diff)
loplugin:stylepolice
Change-Id: I151e4d94f1f5dc84ef3f91218686ca9d1b9bc36f
-rw-r--r--compilerplugins/clang/stylepolice.cxx1
-rw-r--r--svx/source/svdraw/svdtrans.cxx20
-rw-r--r--svx/source/svdraw/svdxcgv.cxx10
-rw-r--r--svx/source/unodraw/unoshcol.cxx4
4 files changed, 18 insertions, 17 deletions
diff --git a/compilerplugins/clang/stylepolice.cxx b/compilerplugins/clang/stylepolice.cxx
index c6f0e16e55fb..d2e3af752b98 100644
--- a/compilerplugins/clang/stylepolice.cxx
+++ b/compilerplugins/clang/stylepolice.cxx
@@ -175,6 +175,7 @@ bool StylePolice::VisitVarDecl(const VarDecl * varDecl)
&& !startswith(typeName, "vcl::DeleteUnoReferenceOnDeinit")
// there are lots of coordinate/position vars that start with "x"
&& !qt->isArithmeticType()
+ && !startswith(typeName, "float [")
)
{
report(
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index 414de974842b..5ba0648524f6 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -34,26 +34,26 @@ void MoveXPoly(XPolygon& rPoly, const Size& S)
void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, const Fraction& ryFact)
{
- Fraction xFact(rxFact);
- Fraction yFact(ryFact);
+ Fraction aXFact(rxFact);
+ Fraction aYFact(ryFact);
- if (!xFact.IsValid()) {
+ if (!aXFact.IsValid()) {
SAL_WARN( "svx.svdraw", "invalid fraction xFract, using Fraction(1,1)" );
- xFact = Fraction(1,1);
+ aXFact = Fraction(1,1);
long nWdt = rRect.Right() - rRect.Left();
if (nWdt == 0) rRect.Right()++;
}
- rRect.Left() = rRef.X() + svx::Round( (rRect.Left() - rRef.X()) * double(xFact) );
- rRect.Right() = rRef.X() + svx::Round( (rRect.Right() - rRef.X()) * double(xFact) );
+ rRect.Left() = rRef.X() + svx::Round( (rRect.Left() - rRef.X()) * double(aXFact) );
+ rRect.Right() = rRef.X() + svx::Round( (rRect.Right() - rRef.X()) * double(aXFact) );
- if (!yFact.IsValid()) {
+ if (!aYFact.IsValid()) {
SAL_WARN( "svx.svdraw", "invalid fraction yFract, using Fraction(1,1)" );
- yFact = Fraction(1,1);
+ aYFact = Fraction(1,1);
long nHgt = rRect.Bottom() - rRect.Top();
if (nHgt == 0) rRect.Bottom()++;
}
- rRect.Top() = rRef.Y() + svx::Round( (rRect.Top() - rRef.Y()) * double(yFact) );
- rRect.Bottom() = rRef.Y() + svx::Round( (rRect.Bottom() - rRef.Y()) * double(yFact) );
+ rRect.Top() = rRef.Y() + svx::Round( (rRect.Top() - rRef.Y()) * double(aYFact) );
+ rRect.Bottom() = rRef.Y() + svx::Round( (rRect.Bottom() - rRef.Y()) * double(aYFact) );
rRect.Justify();
}
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 96aa08b6171e..8270f34bed2b 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -266,13 +266,13 @@ bool SdrExchangeView::Paste(
MapUnit eSrcUnit=pSrcMod->GetScaleUnit();
MapUnit eDstUnit=mpModel->GetScaleUnit();
bool bResize=eSrcUnit!=eDstUnit;
- Fraction xResize,yResize;
+ Fraction aXResize,aYResize;
Point aPt0;
if (bResize)
{
FrPair aResize(GetMapFactor(eSrcUnit,eDstUnit));
- xResize=aResize.X();
- yResize=aResize.Y();
+ aXResize=aResize.X();
+ aYResize=aResize.Y();
}
SdrObjList* pDstLst=pLst;
sal_uInt16 nPg,nPgAnz=pSrcMod->GetPageCount();
@@ -284,7 +284,7 @@ bool SdrExchangeView::Paste(
Rectangle aR=pSrcPg->GetAllObjSnapRect();
if (bResize)
- ResizeRect(aR,aPt0,xResize,yResize);
+ ResizeRect(aR,aPt0,aXResize,aYResize);
Point aDist(aPos-aR.Center());
Size aSiz(aDist.X(),aDist.Y());
size_t nCloneErrCnt = 0;
@@ -306,7 +306,7 @@ bool SdrExchangeView::Paste(
if(bResize)
{
pNeuObj->GetModel()->SetPasteResize(true);
- pNeuObj->NbcResize(aPt0,xResize,yResize);
+ pNeuObj->NbcResize(aPt0,aXResize,aYResize);
pNeuObj->GetModel()->SetPasteResize(false);
}
diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx
index f95bff014f0f..d657b7f2990d 100644
--- a/svx/source/unodraw/unoshcol.cxx
+++ b/svx/source/unodraw/unoshcol.cxx
@@ -230,10 +230,10 @@ uno::Any SAL_CALL SvxShapeCollection::getByIndex( sal_Int32 Index )
if( Index < 0 || Index >= getCount() )
throw lang::IndexOutOfBoundsException();
- std::vector< Reference< uno::XInterface> > xElements( maShapeContainer.getElements() );
+ std::vector< Reference< uno::XInterface> > aElements( maShapeContainer.getElements() );
- return uno::makeAny( Reference< drawing::XShape>(static_cast< drawing::XShape* >( xElements[Index].get())) );
+ return uno::makeAny( Reference< drawing::XShape>(static_cast< drawing::XShape* >( aElements[Index].get())) );
}
// XElementAccess