]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/strvararg.cpp
Fix wxGenericListCtrl best size calculation in report view.
[wxWidgets.git] / src / common / strvararg.cpp
index f70593c0c5183065394b37c189eb5a3c6f6375d0..484fe0f883acf24b14e65189a09da19085e7ac15 100644 (file)
@@ -161,6 +161,19 @@ public:
         {
             if ( CopyFmtChar(*format++) == wxT('%') )
             {
+#if wxUSE_PRINTF_POS_PARAMS
+                if ( *format >= '0' && *format <= '9' )
+                {
+                    SkipDigits(&format);
+                    if ( *format == '$' )
+                    {
+                        // It was a positional argument specification.
+                        CopyFmtChar(*format++);
+                    }
+                    //else: it was a width specification, nothing else to do.
+                }
+#endif // wxUSE_PRINTF_POS_PARAMS
+
                 // skip any flags
                 while ( IsFlagChar(*format) )
                     CopyFmtChar(*format++);
@@ -375,7 +388,7 @@ private:
     size_t m_nCopied;
 };
 
-#ifdef __WINDOWS__
+#if defined(__WINDOWS__) && !defined(__CYGWIN__)
 
 // on Windows, we should use %s and %c regardless of the build:
 class wxPrintfFormatConverterWchar : public wxFormatConverterBase<wchar_t>