summaryrefslogtreecommitdiff
path: root/vcl/source/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-27 17:13:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-30 08:33:39 +0100
commit1ecdddcc32ce2b003fca43ac2c5ef0668afef8dd (patch)
tree40d202cc79977e5f4f4aa9a010d55dc72a4a3d1f /vcl/source/filter
parentdd9c17ae211a8171a7dc84acd9c9dc17cc5b8c48 (diff)
loplugin:constantparam in vcl
Change-Id: Ic32e4098dcdae5ca5d7fe2749badedabda86a90d Reviewed-on: https://gerrit.libreoffice.org/44043 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/filter')
-rw-r--r--vcl/source/filter/sgvspln.cxx20
-rw-r--r--vcl/source/filter/sgvtext.cxx6
2 files changed, 12 insertions, 14 deletions
diff --git a/vcl/source/filter/sgvspln.cxx b/vcl/source/filter/sgvspln.cxx
index 43d3dc371849..6efc9ce9d02d 100644
--- a/vcl/source/filter/sgvspln.cxx
+++ b/vcl/source/filter/sgvspln.cxx
@@ -545,7 +545,7 @@ sal_uInt16 PeriodicSpline(sal_uInt16 n, const double* x, double* y,
sal_uInt16 ParaSpline(sal_uInt16 n, double* x, double* y, sal_uInt8 MargCond,
double Marg01, double Marg02,
double MargN1, double MargN2,
- bool CondT, double* T,
+ double* T,
double* bx, double* cx, double* dx,
double* by, double* cy, double* dy)
{
@@ -556,15 +556,13 @@ sal_uInt16 ParaSpline(sal_uInt16 n, double* x, double* y, sal_uInt8 MargCond,
if (n<2) return 1;
if ((MargCond & ~3) && (MargCond != 4)) return 2; // invalid boundary condition
- if (!CondT) {
- T[0]=0.0;
- for (i=0;i<n;i++) {
- double deltX,deltY,delt;
- deltX=x[i+1]-x[i]; deltY=y[i+1]-y[i];
- delt =deltX*deltX+deltY*deltY;
- if (delt<=0.0) return 3; // two identical adjacent points!
- T[i+1]=T[i]+sqrt(delt);
- }
+ T[0]=0.0;
+ for (i=0;i<n;i++) {
+ double deltX,deltY,delt;
+ deltX=x[i+1]-x[i]; deltY=y[i+1]-y[i];
+ delt =deltX*deltX+deltY*deltY;
+ if (delt<=0.0) return 3; // two identical adjacent points!
+ T[i+1]=T[i]+sqrt(delt);
}
switch (MargCond) {
case 0: break;
@@ -658,7 +656,7 @@ bool CalcSpline(tools::Polygon const & rPoly, bool Periodic, sal_uInt16& n,
bool bRet = false;
if ( ( Marg == 3 && n >= 3 ) || ( Marg == 2 && n >= 2 ) )
{
- bRet = ParaSpline(n,ax,ay,Marg,Marg01,Marg01,MargN1,MargN2,false,T,bx,cx,dx,by,cy,dy) == 0;
+ bRet = ParaSpline(n,ax,ay,Marg,Marg01,Marg01,MargN1,MargN2,T,bx,cx,dx,by,cy,dy) == 0;
}
if ( !bRet )
{
diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx
index e3ca71aa5663..9558f6fe1ebe 100644
--- a/vcl/source/filter/sgvtext.cxx
+++ b/vcl/source/filter/sgvtext.cxx
@@ -383,11 +383,11 @@ UCHAR GetTextChar(UCHAR* TBuf, sal_uInt16& Index,
UCHAR GetTextCharConv(UCHAR* TBuf, sal_uInt16& Index,
ObjTextType& Atr0, ObjTextType& AktAtr,
- sal_uInt16 Rest, bool ScanEsc)
+ sal_uInt16 Rest)
{
UCHAR c;
- c=GetTextChar(TBuf,Index,Atr0,AktAtr,Rest,ScanEsc);
+ c=GetTextChar(TBuf,Index,Atr0,AktAtr,Rest,false/*ScanEsc*/);
if (c<32) {
switch (c) {
case HardSpace : c=' '; break;
@@ -955,7 +955,7 @@ void TextType::Draw(OutputDevice& rOut, UCHAR* pBuffer)
T2=T1; Index2=Index1;
i=1;
while (i<=l) {
- c=GetTextCharConv(Buf,Index2,T,T2,l-i,false);
+ c=GetTextCharConv(Buf,Index2,T,T2,l-i);
long xp1,yp1; // due to overflow danger
PointType Pos;
xp1=long(Pos1.x)+xPos+long(xLine[i]);