[Libreoffice-commits] core.git: canvas/source
Asela Dasanayaka
rukmal.tb at gmail.com
Wed Aug 24 12:16:18 UTC 2016
canvas/source/cairo/cairo_textlayout.cxx | 2 +-
canvas/source/directx/dx_9rm.cxx | 4 ++--
canvas/source/directx/dx_vcltools.cxx | 18 +++++++++---------
3 files changed, 12 insertions(+), 12 deletions(-)
New commits:
commit a9bda90b3ad8ad8bb1e76c73e10df5c73607907f
Author: Asela Dasanayaka <rukmal.tb at gmail.com>
Date: Wed Aug 3 11:04:47 2016 +0530
tdf#96505 get rid of long integer literals 'L'
Remove L from integer literals in module canvas all 0L, 1L, 2L , 7L and 8L
Change-Id: Idd41a31857b4bb58ed8e7b6f4e727a73806098b1
Reviewed-on: https://gerrit.libreoffice.org/27817
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 7247ce8..7ace9c7 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -480,7 +480,7 @@ namespace cairocanvas
//faux italics
if (rSysFontData.bFakeItalic)
- m.xy = -m.xx * 0x6000L / 0x10000L;
+ m.xy = -m.xx * 0x6000 / 0x10000;
cairo_set_font_matrix(pSCairo.get(), &m);
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index 6e7ba8c..2dcebf3 100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -795,7 +795,7 @@ namespace dxcanvas
LPDIRECT3DSURFACE9 pBackBuffer = NULL;
mpSwapChain->GetBackBuffer(0,D3DBACKBUFFER_TYPE_MONO,&pBackBuffer);
mpDevice->SetRenderTarget( 0, pBackBuffer );
- mpDevice->Clear(0,NULL,D3DCLEAR_TARGET,0,1.0f,0L);
+ mpDevice->Clear(0,NULL,D3DCLEAR_TARGET,0,1.0f,0);
pBackBuffer->Release();
return true;
@@ -964,7 +964,7 @@ namespace dxcanvas
LPDIRECT3DSURFACE9 pBackBuffer = NULL;
mpSwapChain->GetBackBuffer(0,D3DBACKBUFFER_TYPE_MONO,&pBackBuffer);
mpDevice->SetRenderTarget( 0, pBackBuffer );
- mpDevice->Clear(0,NULL,D3DCLEAR_TARGET,0,1.0f,0L);
+ mpDevice->Clear(0,NULL,D3DCLEAR_TARGET,0,1.0f,0);
pBackBuffer->Release();
}
}
diff --git a/canvas/source/directx/dx_vcltools.cxx b/canvas/source/directx/dx_vcltools.cxx
index 41d03f6..addbda6 100644
--- a/canvas/source/directx/dx_vcltools.cxx
+++ b/canvas/source/directx/dx_vcltools.cxx
@@ -49,7 +49,7 @@ namespace dxcanvas
if( rBIH.biClrUsed )
return rBIH.biClrUsed;
else
- return 1L << rBIH.biBitCount;
+ return 1 << rBIH.biBitCount;
}
}
else
@@ -57,7 +57,7 @@ namespace dxcanvas
BITMAPCOREHEADER* pCoreHeader = (BITMAPCOREHEADER*)&rBIH;
if( pCoreHeader->bcBitCount <= 8 )
- return 1L << pCoreHeader->bcBitCount;
+ return 1 << pCoreHeader->bcBitCount;
}
return 0; // nothing known
@@ -341,7 +341,7 @@ namespace dxcanvas
BitmapColor aCol;
int nCurrBit;
- const int nMask( 1L );
+ const int nMask( 1 );
const int nInitialBit(7);
sal_uInt8* pCurrOutput( aBmpData.mpBitmapData.get() );
int x, y;
@@ -378,8 +378,8 @@ namespace dxcanvas
*pCurrOutput++ = aCol.GetGreen();
*pCurrOutput++ = aCol.GetRed();
- *pCurrOutput++ = aColorMap[ (pMScan[ (x & ~7L) >> 3L ] >> nCurrBit ) & nMask ];
- nCurrBit = ((nCurrBit - 1) % 8L) & 7L;
+ *pCurrOutput++ = aColorMap[ (pMScan[ (x & ~7) >> 3 ] >> nCurrBit ) & nMask ];
+ nCurrBit = ((nCurrBit - 1) % 8) & 7;
}
}
break;
@@ -396,8 +396,8 @@ namespace dxcanvas
*pCurrOutput++ = *pScan++;
*pCurrOutput++ = *pScan++;
- *pCurrOutput++ = aColorMap[ (pMScan[ (x & ~7L) >> 3L ] >> nCurrBit ) & nMask ];
- nCurrBit = ((nCurrBit - 1) % 8L) & 7L;
+ *pCurrOutput++ = aColorMap[ (pMScan[ (x & ~7) >> 3 ] >> nCurrBit ) & nMask ];
+ nCurrBit = ((nCurrBit - 1) % 8) & 7;
}
}
break;
@@ -427,8 +427,8 @@ namespace dxcanvas
*pCurrOutput++ = aCol.GetGreen();
*pCurrOutput++ = aCol.GetRed();
- *pCurrOutput++ = aColorMap[ (pMScan[ (x & ~7L) >> 3L ] >> nCurrBit ) & nMask ];
- nCurrBit = ((nCurrBit - 1) % 8L) & 7L;
+ *pCurrOutput++ = aColorMap[ (pMScan[ (x & ~7) >> 3 ] >> nCurrBit ) & nMask ];
+ nCurrBit = ((nCurrBit - 1) % 8) & 7;
}
}
break;
More information about the Libreoffice-commits
mailing list