summaryrefslogtreecommitdiff
path: root/dtrans/source/win32/dtobj/FmtFilter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dtrans/source/win32/dtobj/FmtFilter.cxx')
-rw-r--r--dtrans/source/win32/dtobj/FmtFilter.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx
index ea66d37a17c0..fc9681f28448 100644
--- a/dtrans/source/win32/dtobj/FmtFilter.cxx
+++ b/dtrans/source/win32/dtobj/FmtFilter.cxx
@@ -65,7 +65,7 @@ Sequence< sal_Int8 > SAL_CALL WinMFPictToOOMFPict( Sequence< sal_Int8 >& aMetaFi
Sequence< sal_Int8 > mfpictStream;
METAFILEPICT* pMFPict = reinterpret_cast< METAFILEPICT* >( aMetaFilePict.getArray( ) );
HMETAFILE hMf = pMFPict->hMF;
- sal_uInt32 nCount = GetMetaFileBitsEx( hMf, 0, NULL );
+ sal_uInt32 nCount = GetMetaFileBitsEx( hMf, 0, nullptr );
if ( nCount > 0 )
{
@@ -134,11 +134,11 @@ Sequence< sal_Int8 > SAL_CALL WinENHMFPictToOOMFPict( HENHMETAFILE hEnhMetaFile
UINT nSize = 0;
if( hEnhMetaFile &&
- ( ( nSize = GetEnhMetaFileBits( hEnhMetaFile, 0, NULL ) ) != 0 ) )
+ ( ( nSize = GetEnhMetaFileBits( hEnhMetaFile, 0, nullptr ) ) != 0 ) )
{
aRet.realloc( nSize );
- if( GetEnhMetaFileBits( hEnhMetaFile, nSize, (unsigned char*) aRet.getArray() ) != nSize )
+ if( GetEnhMetaFileBits( hEnhMetaFile, nSize, reinterpret_cast<unsigned char*>(aRet.getArray()) ) != nSize )
aRet.realloc( 0 );
}
@@ -149,12 +149,12 @@ Sequence< sal_Int8 > SAL_CALL WinENHMFPictToOOMFPict( HENHMETAFILE hEnhMetaFile
HMETAFILEPICT SAL_CALL OOMFPictToWinMFPict( Sequence< sal_Int8 >& aOOMetaFilePict )
{
- HMETAFILEPICT hPict = NULL;
- HMETAFILE hMtf = SetMetaFileBitsEx( aOOMetaFilePict.getLength(), (unsigned char*) aOOMetaFilePict.getConstArray() );
+ HMETAFILEPICT hPict = nullptr;
+ HMETAFILE hMtf = SetMetaFileBitsEx( aOOMetaFilePict.getLength(), reinterpret_cast<unsigned char const *>(aOOMetaFilePict.getConstArray()) );
if( hMtf )
{
- METAFILEPICT* pPict = (METAFILEPICT*) GlobalLock( hPict = GlobalAlloc( GHND, sizeof( METAFILEPICT ) ) );
+ METAFILEPICT* pPict = static_cast<METAFILEPICT*>(GlobalLock( hPict = GlobalAlloc( GHND, sizeof( METAFILEPICT ) ) ));
pPict->mm = 8;
pPict->xExt = 0;
@@ -171,7 +171,7 @@ HMETAFILEPICT SAL_CALL OOMFPictToWinMFPict( Sequence< sal_Int8 >& aOOMetaFilePic
HENHMETAFILE SAL_CALL OOMFPictToWinENHMFPict( Sequence< sal_Int8 >& aOOMetaFilePict )
{
- HENHMETAFILE hEnhMtf = SetEnhMetaFileBits( aOOMetaFilePict.getLength(), (unsigned char*) aOOMetaFilePict.getConstArray() );
+ HENHMETAFILE hEnhMtf = SetEnhMetaFileBits( aOOMetaFilePict.getLength(), reinterpret_cast<unsigned char const *>(aOOMetaFilePict.getConstArray()) );
return hEnhMtf;
}
@@ -311,7 +311,7 @@ std::wstring getShellLinkTarget(const std::wstring& aLnkFile)
{
sal::systools::COMReference<IShellLinkA> pIShellLink;
HRESULT hr = CoCreateInstance(
- CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, reinterpret_cast<LPVOID*>(&pIShellLink));
+ CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_IShellLink, reinterpret_cast<LPVOID*>(&pIShellLink));
if (FAILED(hr))
return target;
@@ -322,7 +322,7 @@ std::wstring getShellLinkTarget(const std::wstring& aLnkFile)
if (FAILED(hr))
return target;
- hr = pIShellLink->Resolve(NULL, SLR_UPDATE | SLR_NO_UI);
+ hr = pIShellLink->Resolve(nullptr, SLR_UPDATE | SLR_NO_UI);
if (FAILED(hr))
return target;
@@ -387,13 +387,13 @@ ByteSequence_t FileListToByteSequence(const FileList_t& fileList)
ByteSequence_t CF_HDROPToFileList(HGLOBAL hGlobal)
{
- UINT nFiles = DragQueryFileW((HDROP)hGlobal, 0xFFFFFFFF, NULL, 0);
+ UINT nFiles = DragQueryFileW(static_cast<HDROP>(hGlobal), 0xFFFFFFFF, nullptr, 0);
FileList_t files;
for (UINT i = 0; i < nFiles; i++)
{
wchar_t buff[MAX_PATH];
- /*UINT size =*/ DragQueryFileW((HDROP)hGlobal, i, buff, MAX_PATH);
+ /*UINT size =*/ DragQueryFileW(static_cast<HDROP>(hGlobal), i, buff, MAX_PATH);
std::wstring filename = buff;
if (isShellLink(filename))
filename = getShellLinkTarget(filename);
@@ -417,7 +417,7 @@ Sequence< sal_Int8 > SAL_CALL WinBITMAPToOOBMP( HBITMAP aHBMP )
sizeof(BITMAPINFO) +
nDataBytes
);
- PBITMAPINFOHEADER pBmp = (PBITMAPINFOHEADER)aBitmapStream.getArray();
+ PBITMAPINFOHEADER pBmp = reinterpret_cast<PBITMAPINFOHEADER>(aBitmapStream.getArray());
pBmp->biSize = sizeof( BITMAPINFOHEADER );
pBmp->biWidth = aBmpSize.cx;
pBmp->biHeight = aBmpSize.cy;
@@ -429,11 +429,11 @@ Sequence< sal_Int8 > SAL_CALL WinBITMAPToOOBMP( HBITMAP aHBMP )
pBmp->biYPelsPerMeter = 1000;
pBmp->biClrUsed = 0;
pBmp->biClrImportant = 0;
- if( GetDIBits( 0, // DC, 0 is a default GC, basically that of the desktop
+ if( GetDIBits( nullptr, // DC, 0 is a default GC, basically that of the desktop
aHBMP,
0, aBmpSize.cy,
aBitmapStream.getArray() + sizeof(BITMAPINFO),
- (LPBITMAPINFO)pBmp,
+ reinterpret_cast<LPBITMAPINFO>(pBmp),
DIB_RGB_COLORS ) )
{
ooBmpStream = WinDIBToOOBMP( aBitmapStream );