svx/source/unodraw/UnoGraphicExporter.cxx |   12 ++++++------
 tools/source/zcodec/zcodec.cxx            |    4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 9e0470da4a88a588a294856236d6adf1eefe22f6
Author:     Canberk TURAN <[email protected]>
AuthorDate: Mon Jan 27 01:51:19 2020 +0300
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Feb 21 10:27:50 2020 +0100

    tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types
    
    I fixed if-conditons in UnoGraphicExporter.cxx and I deleted extra slash 
character at start of zcodec.cxx file.
    
    Change-Id: I464e7b0dcbfe835d04c5031bfbd6e46bccbb1216
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87470
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>

diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx 
b/svx/source/unodraw/UnoGraphicExporter.cxx
index 86710d02fa43..66b1974ffeb9 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -159,7 +159,7 @@ namespace {
         virtual sal_Bool SAL_CALL supportsMimeType( const OUString& 
MimeTypeName ) override;
         virtual Sequence< OUString > SAL_CALL getSupportedMimeTypeNames(  ) 
override;
 
-        VclPtr<VirtualDevice> CreatePageVDev( SdrPage* pPage, sal_uIntPtr 
nWidthPixel, sal_uIntPtr nHeightPixel ) const;
+        VclPtr<VirtualDevice> CreatePageVDev( SdrPage* pPage, long 
nWidthPixel, long nHeightPixel ) const;
 
         DECL_LINK( CalcFieldValueHdl, EditFieldInfo*, void );
 
@@ -381,7 +381,7 @@ IMPL_LINK(GraphicExporter, CalcFieldValueHdl, 
EditFieldInfo*, pInfo, void)
 
     @return the returned VirtualDevice is owned by the caller
 */
-VclPtr<VirtualDevice> GraphicExporter::CreatePageVDev( SdrPage* pPage, 
sal_uIntPtr nWidthPixel, sal_uIntPtr nHeightPixel ) const
+VclPtr<VirtualDevice> GraphicExporter::CreatePageVDev( SdrPage* pPage, long 
nWidthPixel, long nHeightPixel ) const
 {
     VclPtr<VirtualDevice>  pVDev = VclPtr<VirtualDevice>::Create();
     MapMode         aMM( MapUnit::Map100thMM );
@@ -390,9 +390,9 @@ VclPtr<VirtualDevice> GraphicExporter::CreatePageVDev( 
SdrPage* pPage, sal_uIntP
     Size aPageSize(pPage->GetSize());
 
     // use scaling?
-    if( nWidthPixel )
+    if( nWidthPixel != 0 )
     {
-        const Fraction aFrac( static_cast<long>(nWidthPixel), 
pVDev->LogicToPixel( aPageSize, aMM ).Width() );
+        const Fraction aFrac( nWidthPixel, pVDev->LogicToPixel( aPageSize, aMM 
).Width() );
 
         aMM.SetScaleX( aFrac );
 
@@ -400,9 +400,9 @@ VclPtr<VirtualDevice> GraphicExporter::CreatePageVDev( 
SdrPage* pPage, sal_uIntP
             aMM.SetScaleY( aFrac );
     }
 
-    if( nHeightPixel )
+    if( nHeightPixel != 0 )
     {
-        const Fraction aFrac( static_cast<long>(nHeightPixel), 
pVDev->LogicToPixel( aPageSize, aMM ).Height() );
+        const Fraction aFrac( nHeightPixel, pVDev->LogicToPixel( aPageSize, 
aMM ).Height() );
 
         if( nWidthPixel == 0 )
             aMM.SetScaleX( aFrac );
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx
index 439e838bdc96..a29127be7232 100644
--- a/tools/source/zcodec/zcodec.cxx
+++ b/tools/source/zcodec/zcodec.cxx
@@ -287,9 +287,9 @@ long ZCodec::ReadAsynchron( SvStream& rIStm, sal_uInt8* 
pData, sal_uInt32 nSize
 void ZCodec::ImplWriteBack()
 {
     auto pStream = static_cast<z_stream*>(mpsC_Stream);
-    sal_uIntPtr nAvail = mnOutBufSize - pStream->avail_out;
+    size_t nAvail = mnOutBufSize - pStream->avail_out;
 
-    if ( nAvail )
+    if ( nAvail > 0 )
     {
         pStream->next_out = mpOutBuf;
         mpOStm->WriteBytes( mpOutBuf, nAvail );
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to