From 55f07d4daa76503530d96b9c20b53c59bcd5bcf9 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 12 Jan 2018 20:10:40 +0100 Subject: More loplugin:cstylecast: vcl auto-rewrite with "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I363c01a1ae9e863fca4fb4589829492d7280d711 --- vcl/source/gdi/jobset.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'vcl/source/gdi/jobset.cxx') diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx index 24167478f79c..fdb002394662 100644 --- a/vcl/source/gdi/jobset.cxx +++ b/vcl/source/gdi/jobset.cxx @@ -25,8 +25,8 @@ #include #include -#define JOBSET_FILE364_SYSTEM ((sal_uInt16)0xFFFF) -#define JOBSET_FILE605_SYSTEM ((sal_uInt16)0xFFFE) +#define JOBSET_FILE364_SYSTEM (sal_uInt16(0xFFFF)) +#define JOBSET_FILE605_SYSTEM (sal_uInt16(0xFFFE)) struct ImplOldJobSetupData { @@ -281,8 +281,8 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup ) rJobData.SetDuplexMode( DuplexMode::Unknown ); rJobData.SetPaperBin( SVBT16ToShort( pOldJobData->nPaperBin ) ); rJobData.SetPaperFormat( (Paper)SVBT16ToShort( pOldJobData->nPaperFormat ) ); - rJobData.SetPaperWidth( (long)SVBT32ToUInt32( pOldJobData->nPaperWidth ) ); - rJobData.SetPaperHeight( (long)SVBT32ToUInt32( pOldJobData->nPaperHeight ) ); + rJobData.SetPaperWidth( static_cast(SVBT32ToUInt32( pOldJobData->nPaperWidth )) ); + rJobData.SetPaperHeight( static_cast(SVBT32ToUInt32( pOldJobData->nPaperHeight )) ); if ( rJobData.GetDriverDataLen() ) { const char* pDriverData = reinterpret_cast(pOldJobData) + nOldJobDataSize; @@ -348,9 +348,9 @@ SvStream& WriteJobSetup( SvStream& rOStream, const JobSetup& rJobSetup ) UInt32ToSVBT32( rJobData.GetDriverDataLen(), aOldJobData.nDriverDataLen ); ShortToSVBT16( (sal_uInt16)(rJobData.GetOrientation()), aOldJobData.nOrientation ); ShortToSVBT16( rJobData.GetPaperBin(), aOldJobData.nPaperBin ); - ShortToSVBT16( (sal_uInt16)(rJobData.GetPaperFormat()), aOldJobData.nPaperFormat ); - UInt32ToSVBT32( (sal_uLong)(rJobData.GetPaperWidth()), aOldJobData.nPaperWidth ); - UInt32ToSVBT32( (sal_uLong)(rJobData.GetPaperHeight()), aOldJobData.nPaperHeight ); + ShortToSVBT16( static_cast(rJobData.GetPaperFormat()), aOldJobData.nPaperFormat ); + UInt32ToSVBT32( static_cast(rJobData.GetPaperWidth()), aOldJobData.nPaperWidth ); + UInt32ToSVBT32( static_cast(rJobData.GetPaperHeight()), aOldJobData.nPaperHeight ); ImplOldJobSetupData aOldData; memset( &aOldData, 0, sizeof( aOldData ) ); -- cgit v1.2.3