Kaydet (Commit) 03f440c3 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Add SAL_FALLTHROUGH, where apparently appropriate

Change-Id: I796ec3b79d7c26d9efe275b4232ae85cac80b578
üst 2ea7fe25
...@@ -876,6 +876,7 @@ bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, bool bExtendedInfo ) ...@@ -876,6 +876,7 @@ bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, bool bExtendedInfo )
case 4 : case 4 :
case 3 : case 3 :
nBitsPerPixel = 24; nBitsPerPixel = 24;
SAL_FALLTHROUGH;
case 2 : case 2 :
case 1 : case 1 :
aPixSize.Width() = nColumns; aPixSize.Width() = nColumns;
......
...@@ -426,16 +426,19 @@ sal_uInt16 NaturalSpline(sal_uInt16 n, double* x, double* y, ...@@ -426,16 +426,19 @@ sal_uInt16 NaturalSpline(sal_uInt16 n, double* x, double* y,
c[0] =c[0]-h[0]; c[0] =c[0]-h[0];
b[n-2]=b[n-2]-h[n-1]; b[n-2]=b[n-2]-h[n-1];
} }
SAL_FALLTHROUGH;
} }
case 1: { case 1: {
a[0] =a[0]-1.5*((y[1]-y[0])/h[0]-Marg0); a[0] =a[0]-1.5*((y[1]-y[0])/h[0]-Marg0);
a[n-2]=a[n-2]-1.5*(MargN-(y[n]-y[n-1])/h[n-1]); a[n-2]=a[n-2]-1.5*(MargN-(y[n]-y[n-1])/h[n-1]);
d[0] =d[0]-h[0]*0.5; d[0] =d[0]-h[0]*0.5;
d[n-2]=d[n-2]-h[n-1]*0.5; d[n-2]=d[n-2]-h[n-1]*0.5;
SAL_FALLTHROUGH;
} }
case 2: { case 2: {
a[0] =a[0]-h[0]*Marg0*0.5; a[0] =a[0]-h[0]*Marg0*0.5;
a[n-2]=a[n-2]-h[n-1]*MargN*0.5; a[n-2]=a[n-2]-h[n-1]*MargN*0.5;
SAL_FALLTHROUGH;
} }
case 3: { case 3: {
a[0] =a[0]+Marg0*h[0]*h[0]*0.5; a[0] =a[0]+Marg0*h[0]*h[0]*0.5;
...@@ -460,16 +463,19 @@ sal_uInt16 NaturalSpline(sal_uInt16 n, double* x, double* y, ...@@ -460,16 +463,19 @@ sal_uInt16 NaturalSpline(sal_uInt16 n, double* x, double* y,
c[0]=c[1]+h[0]*(c[1]-c[2])/h[1]; c[0]=c[1]+h[0]*(c[1]-c[2])/h[1];
c[n]=c[n-1]+h[n-1]*(c[n-1]-c[n-2])/h[n-2]; c[n]=c[n-1]+h[n-1]*(c[n-1]-c[n-2])/h[n-2];
} }
SAL_FALLTHROUGH;
} }
case 1: { case 1: {
c[0]=1.5*((y[1]-y[0])/h[0]-Marg0); c[0]=1.5*((y[1]-y[0])/h[0]-Marg0);
c[0]=(c[0]-c[1]*h[0]*0.5)/h[0]; c[0]=(c[0]-c[1]*h[0]*0.5)/h[0];
c[n]=1.5*((y[n]-y[n-1])/h[n-1]-MargN); c[n]=1.5*((y[n]-y[n-1])/h[n-1]-MargN);
c[n]=(c[n]-c[n-1]*h[n-1]*0.5)/h[n-1]; c[n]=(c[n]-c[n-1]*h[n-1]*0.5)/h[n-1];
SAL_FALLTHROUGH;
} }
case 2: { case 2: {
c[0]=Marg0*0.5; c[0]=Marg0*0.5;
c[n]=MargN*0.5; c[n]=MargN*0.5;
SAL_FALLTHROUGH;
} }
case 3: { case 3: {
c[0]=c[1]-Marg0*h[0]*0.5; c[0]=c[1]-Marg0*h[0]*0.5;
......
...@@ -954,12 +954,14 @@ bool EnhWMFReader::ReadEnhWMF() ...@@ -954,12 +954,14 @@ bool EnhWMFReader::ReadEnhWMF()
aLineInfo.SetLineCap( css::drawing::LineCap_ROUND ); aLineInfo.SetLineCap( css::drawing::LineCap_ROUND );
break; break;
} }
SAL_FALLTHROUGH;
case PS_ENDCAP_SQUARE : case PS_ENDCAP_SQUARE :
if ( aSize.Width() ) if ( aSize.Width() )
{ {
aLineInfo.SetLineCap( css::drawing::LineCap_SQUARE ); aLineInfo.SetLineCap( css::drawing::LineCap_SQUARE );
break; break;
} }
SAL_FALLTHROUGH;
case PS_ENDCAP_FLAT : case PS_ENDCAP_FLAT :
default : default :
aLineInfo.SetLineCap( css::drawing::LineCap_BUTT ); aLineInfo.SetLineCap( css::drawing::LineCap_BUTT );
...@@ -1042,12 +1044,14 @@ bool EnhWMFReader::ReadEnhWMF() ...@@ -1042,12 +1044,14 @@ bool EnhWMFReader::ReadEnhWMF()
aLineInfo.SetLineCap( css::drawing::LineCap_ROUND ); aLineInfo.SetLineCap( css::drawing::LineCap_ROUND );
break; break;
} }
SAL_FALLTHROUGH;
case PS_ENDCAP_SQUARE : case PS_ENDCAP_SQUARE :
if ( aLineInfo.GetWidth() ) if ( aLineInfo.GetWidth() )
{ {
aLineInfo.SetLineCap( css::drawing::LineCap_SQUARE ); aLineInfo.SetLineCap( css::drawing::LineCap_SQUARE );
break; break;
} }
SAL_FALLTHROUGH;
case PS_ENDCAP_FLAT : case PS_ENDCAP_FLAT :
default : default :
aLineInfo.SetLineCap( css::drawing::LineCap_BUTT ); aLineInfo.SetLineCap( css::drawing::LineCap_BUTT );
...@@ -1168,6 +1172,7 @@ bool EnhWMFReader::ReadEnhWMF() ...@@ -1168,6 +1172,7 @@ bool EnhWMFReader::ReadEnhWMF()
case EMR_ABORTPATH : case EMR_ABORTPATH :
pOut->ClearPath(); pOut->ClearPath();
SAL_FALLTHROUGH;
case EMR_ENDPATH : case EMR_ENDPATH :
bRecordPath = false; bRecordPath = false;
break; break;
...@@ -1527,6 +1532,7 @@ bool EnhWMFReader::ReadEnhWMF() ...@@ -1527,6 +1532,7 @@ bool EnhWMFReader::ReadEnhWMF()
case EMR_EXTTEXTOUTA : case EMR_EXTTEXTOUTA :
bFlag = true; bFlag = true;
SAL_FALLTHROUGH;
case EMR_EXTTEXTOUTW : case EMR_EXTTEXTOUTW :
{ {
sal_Int32 nLeft, nTop, nRight, nBottom, ptlReferenceX, ptlReferenceY, nGfxMode, nXScale, nYScale; sal_Int32 nLeft, nTop, nRight, nBottom, ptlReferenceX, ptlReferenceY, nGfxMode, nXScale, nYScale;
......
...@@ -570,6 +570,7 @@ bool PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint ) ...@@ -570,6 +570,7 @@ bool PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
{ {
case 16 : case 16 :
mnTargetDepth = 8; // we have to reduce the bitmap mnTargetDepth = 8; // we have to reduce the bitmap
SAL_FALLTHROUGH;
case 8 : case 8 :
mbGrayScale = true; mbGrayScale = true;
break; break;
......
...@@ -694,6 +694,7 @@ bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part, ...@@ -694,6 +694,7 @@ bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
break; break;
} }
SAL_FALLTHROUGH;
case CTRL_COMBOBOX: case CTRL_COMBOBOX:
case CTRL_LISTBOX: case CTRL_LISTBOX:
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment