[packages/wxWidgets] - more workarounds

qboosh qboosh at pld-linux.org
Sun Sep 30 16:58:23 CEST 2012


commit 25bf4cad8e0873b352baa1622aa9a097caed82c9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Sep 30 16:59:39 2012 +0200

    - more workarounds

 wxWidgets-format.patch | 279 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 279 insertions(+)
---
diff --git a/wxWidgets-format.patch b/wxWidgets-format.patch
index bbd8a0d..cd236f7 100644
--- a/wxWidgets-format.patch
+++ b/wxWidgets-format.patch
@@ -678,3 +678,282 @@
  
          // wxLogFatalError doesn't return
      }
+--- wxWidgets-2.8.12/src/common/imagbmp.cpp.orig	2011-03-22 12:59:41.000000000 +0100
++++ wxWidgets-2.8.12/src/common/imagbmp.cpp	2012-09-30 16:57:19.711164497 +0200
+@@ -88,7 +88,7 @@
+     if ( !image->Ok() )
+     {
+         if ( verbose )
+-            wxLogError(_("BMP: Couldn't save invalid image."));
++            wxLogError("%s", _("BMP: Couldn't save invalid image."));
+         return false;
+     }
+ 
+@@ -122,7 +122,7 @@
+             )
+         {
+             if ( verbose )
+-                wxLogError(_("BMP: wxImage doesn't have own wxPalette."));
++                wxLogError("%s", _("BMP: wxImage doesn't have own wxPalette."));
+             return false;
+         }
+         bpp = 8;
+@@ -197,7 +197,7 @@
+            )
+         {
+             if (verbose)
+-                wxLogError(_("BMP: Couldn't write the file (Bitmap) header."));
++                wxLogError("%s", _("BMP: Couldn't write the file (Bitmap) header."));
+             return false;
+         }
+     }
+@@ -218,7 +218,7 @@
+            )
+         {
+             if (verbose)
+-                wxLogError(_("BMP: Couldn't write the file (BitmapInfo) header."));
++                wxLogError("%s", _("BMP: Couldn't write the file (BitmapInfo) header."));
+             return false;
+         }
+     }
+@@ -292,7 +292,7 @@
+             if ( !stream.Write(rgbquad, palette_size*4) )
+             {
+                 if (verbose)
+-                    wxLogError(_("BMP: Couldn't write RGB color map."));
++                    wxLogError("%s", _("BMP: Couldn't write RGB color map."));
+                 delete[] rgbquad;
+ #if wxUSE_PALETTE
+                 delete palette;
+@@ -425,7 +425,7 @@
+         if ( !stream.Write(buffer, row_width) )
+         {
+             if (verbose)
+-                wxLogError(_("BMP: Couldn't write data."));
++                wxLogError("%s", _("BMP: Couldn't write data."));
+             delete[] buffer;
+ #if wxUSE_PALETTE
+             delete palette;
+@@ -471,7 +471,7 @@
+         if ( !cmap )
+         {
+             if (verbose)
+-                wxLogError(_("BMP: Couldn't allocate memory."));
++                wxLogError("%s", _("BMP: Couldn't allocate memory."));
+             return false;
+         }
+     }
+@@ -487,7 +487,7 @@
+     if ( !ptr )
+     {
+         if ( verbose )
+-            wxLogError( _("BMP: Couldn't allocate memory.") );
++            wxLogError("%s", _("BMP: Couldn't allocate memory.") );
+         delete[] cmap;
+         return false;
+     }
+@@ -501,7 +501,7 @@
+         if ( !alpha )
+         {
+             if ( verbose )
+-                wxLogError(_("BMP: Couldn't allocate memory."));
++                wxLogError("%s", _("BMP: Couldn't allocate memory."));
+             delete[] cmap;
+             return false;
+         }
+@@ -898,13 +898,13 @@
+     if ( width > 32767 )
+     {
+         if (verbose)
+-            wxLogError( _("DIB Header: Image width > 32767 pixels for file.") );
++            wxLogError("%s", _("DIB Header: Image width > 32767 pixels for file.") );
+         return false;
+     }
+     if ( height > 32767 )
+     {
+         if (verbose)
+-            wxLogError( _("DIB Header: Image height > 32767 pixels for file.") );
++            wxLogError("%s", _("DIB Header: Image height > 32767 pixels for file.") );
+         return false;
+     }
+ 
+@@ -918,7 +918,7 @@
+     if ( bpp != 1 && bpp != 4 && bpp != 8 && bpp != 16 && bpp != 24 && bpp != 32 )
+     {
+         if (verbose)
+-            wxLogError( _("DIB Header: Unknown bitdepth in file.") );
++            wxLogError("%s", _("DIB Header: Unknown bitdepth in file.") );
+         return false;
+     }
+ 
+@@ -928,7 +928,7 @@
+          comp != BI_BITFIELDS )
+     {
+         if (verbose)
+-            wxLogError( _("DIB Header: Unknown encoding in file.") );
++            wxLogError("%s", _("DIB Header: Unknown encoding in file.") );
+         return false;
+     }
+ 
+@@ -942,7 +942,7 @@
+         ((comp == BI_BITFIELDS) && (bpp != 16 && bpp != 32)))
+     {
+         if (verbose)
+-            wxLogError( _("DIB Header: Encoding doesn't match bitdepth.") );
++            wxLogError("%s", _("DIB Header: Encoding doesn't match bitdepth.") );
+         return false;
+     }
+ 
+@@ -951,7 +951,7 @@
+                     verbose, IsBmp, true) )
+     {
+         if (verbose)
+-            wxLogError( _("Error in reading image DIB.") );
++            wxLogError("%s", _("Error in reading image DIB.") );
+         return false;
+     }
+ 
+@@ -964,7 +964,7 @@
+                         verbose, IsBmp, false) )
+         {
+             if (verbose)
+-                wxLogError( _("ICO: Error in reading mask DIB.") );
++                wxLogError("%s", _("ICO: Error in reading mask DIB.") );
+             return false;
+         }
+         image->SetMaskFromImage(mask, 255, 255, 255);
+@@ -1037,13 +1037,13 @@
+     if ( image->GetHeight () > 127 )
+     {
+         if ( verbose )
+-            wxLogError(_("ICO: Image too tall for an icon."));
++            wxLogError("%s", _("ICO: Image too tall for an icon."));
+         return false;
+     }
+     if ( image->GetWidth () > 255 )
+     {
+         if ( verbose )
+-            wxLogError(_("ICO: Image too wide for an icon."));
++            wxLogError("%s", _("ICO: Image too wide for an icon."));
+         return false;
+     }
+ 
+@@ -1069,7 +1069,7 @@
+     if ( !stream.IsOk() )
+     {
+         if ( verbose )
+-            wxLogError(_("ICO: Error writing the image file!"));
++            wxLogError("%s", _("ICO: Error writing the image file!"));
+         return false;
+     }
+ 
+@@ -1128,7 +1128,7 @@
+         if ( !bResult )
+         {
+             if ( verbose )
+-                wxLogError(_("ICO: Error writing the image file!"));
++                wxLogError("%s", _("ICO: Error writing the image file!"));
+             return false;
+         }
+         IsMask = true;
+@@ -1137,7 +1137,7 @@
+         if ( !bResult )
+         {
+             if ( verbose )
+-                wxLogError(_("ICO: Error writing the image file!"));
++                wxLogError("%s", _("ICO: Error writing the image file!"));
+             return false;
+         }
+         wxUint32 Size = cStream.GetSize();
+@@ -1192,7 +1192,7 @@
+         if ( !stream.IsOk() )
+         {
+             if ( verbose )
+-                wxLogError(_("ICO: Error writing the image file!"));
++                wxLogError("%s", _("ICO: Error writing the image file!"));
+             return false;
+         }
+ 
+@@ -1202,7 +1202,7 @@
+         if ( !bResult )
+         {
+             if ( verbose )
+-                wxLogError(_("ICO: Error writing the image file!"));
++                wxLogError("%s", _("ICO: Error writing the image file!"));
+             return false;
+         }
+         IsMask = true;
+@@ -1211,7 +1211,7 @@
+         if ( !bResult )
+         {
+             if ( verbose )
+-                wxLogError(_("ICO: Error writing the image file!"));
++                wxLogError("%s", _("ICO: Error writing the image file!"));
+             return false;
+         }
+ 
+@@ -1276,7 +1276,7 @@
+ 
+     if ( iSel == wxNOT_FOUND || iSel < 0 || iSel >= nIcons )
+     {
+-        wxLogError(_("ICO: Invalid icon index."));
++        wxLogError("%s", _("ICO: Invalid icon index."));
+         bResult = false;
+     }
+     else
+--- wxWidgets-2.8.12/src/common/image.cpp.orig	2011-03-22 12:59:41.000000000 +0100
++++ wxWidgets-2.8.12/src/common/image.cpp	2012-09-30 16:59:23.204495257 +0200
+@@ -1842,7 +1842,7 @@
+     // check that the images are the same size
+     if ( (M_IMGDATA->m_height != mask.GetHeight() ) || (M_IMGDATA->m_width != mask.GetWidth () ) )
+     {
+-        wxLogError( _("Image and mask have different sizes.") );
++        wxLogError("%s", _("Image and mask have different sizes.") );
+         return false;
+     }
+ 
+@@ -1850,7 +1850,7 @@
+     unsigned char r,g,b ;
+     if (!FindFirstUnusedColour(&r, &g, &b))
+     {
+-        wxLogError( _("No unused colour in image being masked.") );
++        wxLogError("%s", _("No unused colour in image being masked.") );
+         return false ;
+     }
+ 
+@@ -1891,7 +1891,7 @@
+     unsigned char mr, mg, mb;
+     if (!FindFirstUnusedColour(&mr, &mg, &mb))
+     {
+-        wxLogError( _("No unused colour in image being masked.") );
++        wxLogError("%s", _("No unused colour in image being masked.") );
+         return false;
+     }
+ 
+@@ -2172,7 +2172,7 @@
+ 
+         }
+ 
+-        wxLogWarning(_("No handler found for image type."));
++        wxLogWarning("%s", _("No handler found for image type."));
+         return 0;
+     }
+ 
+@@ -2215,7 +2215,7 @@
+ 
+         }
+ 
+-        wxLogWarning( _("No handler found for image type.") );
++        wxLogWarning("%s", _("No handler found for image type.") );
+         return false;
+     }
+ 
+@@ -2696,7 +2696,7 @@
+                 b2++;
+                 if ( b2 >= 255 )
+                 {
+-                    wxLogError(_("No unused colour in image.") );
++                    wxLogError("%s",_("No unused colour in image.") );
+                     return false;
+                 }
+             }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/wxWidgets.git/commitdiff/25bf4cad8e0873b352baa1622aa9a097caed82c9



More information about the pld-cvs-commit mailing list