[Libreoffice-commits] core.git: compilerplugins/clang svx/source
Noel Grandin
noel at peralex.com
Thu Apr 28 12:16:34 UTC 2016
compilerplugins/clang/stylepolice.cxx | 1 +
svx/source/svdraw/svdtrans.cxx | 20 ++++++++++----------
svx/source/svdraw/svdxcgv.cxx | 10 +++++-----
svx/source/unodraw/unoshcol.cxx | 4 ++--
4 files changed, 18 insertions(+), 17 deletions(-)
New commits:
commit 26d73dbf53831cf4d5aec1f4db32bedb2c1e06be
Author: Noel Grandin <noel at peralex.com>
Date: Thu Apr 28 14:05:08 2016 +0200
loplugin:stylepolice
Change-Id: I151e4d94f1f5dc84ef3f91218686ca9d1b9bc36f
diff --git a/compilerplugins/clang/stylepolice.cxx b/compilerplugins/clang/stylepolice.cxx
index c6f0e16..d2e3af7 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 414de97..5ba0648 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 96aa08b..8270f34 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 f95bff0..d657b7f 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
More information about the Libreoffice-commits
mailing list