diff options
author | David Tardon <dtardon@redhat.com> | 2012-03-08 06:40:15 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-03-12 08:53:27 +0100 |
commit | 93f18659861f035f8d46e41d1a67e7cc1110aa52 (patch) | |
tree | e9d34e3f42fa03a21e4481ce85d5d003af12de72 /vcl | |
parent | 9adb48b9a1be832e83ac1570fcf49e4a91a6d406 (diff) |
use SAL_N_ELEMENTS
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/source/gdi/salprn.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx index 99133ec3816c..efb3c8c6fcb9 100644 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -461,13 +461,13 @@ static sal_Bool ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup if( ((LPDEVMODEW)pOutDevMode)->dmSize >= 64 ) { sal_Int32 nLen = rtl_ustr_getLength( (const sal_Unicode*)((LPDEVMODEW)pOutDevMode)->dmDeviceName ); - if ( nLen < sizeof( ((LPDEVMODEW)pOutDevMode)->dmDeviceName )/sizeof(sal_Unicode) ) + if ( nLen < SAL_N_ELEMENTS( ((LPDEVMODEW)pOutDevMode)->dmDeviceName ) ) memset( ((LPDEVMODEW)pOutDevMode)->dmDeviceName+nLen, 0, sizeof( ((LPDEVMODEW)pOutDevMode)->dmDeviceName )-(nLen*sizeof(sal_Unicode)) ); } if( ((LPDEVMODEW)pOutDevMode)->dmSize >= 166 ) { sal_Int32 nLen = rtl_ustr_getLength( (const sal_Unicode*)((LPDEVMODEW)pOutDevMode)->dmFormName ); - if ( nLen < sizeof( ((LPDEVMODEW)pOutDevMode)->dmFormName )/sizeof(sal_Unicode) ) + if ( nLen < SAL_N_ELEMENTS( ((LPDEVMODEW)pOutDevMode)->dmFormName ) ) memset( ((LPDEVMODEW)pOutDevMode)->dmFormName+nLen, 0, sizeof( ((LPDEVMODEW)pOutDevMode)->dmFormName )-(nLen*sizeof(sal_Unicode)) ); } |