[Libreoffice-commits] .: sax/source

Nigel Hawkins nhawkins at kemper.freedesktop.org
Sat May 28 05:56:47 PDT 2011


 sax/source/tools/fastserializer.cxx |   25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

New commits:
commit c085892ca197d8cedadb63befd25f5d975904757
Author: Nigel Hawkins <n.hawkins at gmx.com>
Date:   Sat May 28 13:33:09 2011 +0100

    Replace cstdio with iostream in fastserializer.cxx

diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index e894c2c..68e2f5e 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -39,7 +39,7 @@
 #include <string.h>
 
 #if DEBUG
-#include <cstdio>
+#include <iostream>
 #endif
 
 using ::comphelper::SequenceAsVector;
@@ -354,12 +354,9 @@ namespace sax_fastparser {
         int i = 0;
         while ( !aCopy.empty() )
         {
-            fprintf( stderr, "%d\n", nSize - i );
-
+            std::cerr << nSize - i << "\n";
             aCopy.top( )->print( );
-
-            fprintf( stderr, "\n" );
-
+            std::cerr << "\n";
             aCopy.pop( );
             i++;
         }
@@ -408,19 +405,19 @@ namespace sax_fastparser {
 #if DEBUG
     void FastSaxSerializer::ForMerge::print( )
     {
-        fprintf( stderr, "Data: " );
+        std::cerr << "Data: ";
         for ( sal_Int32 i=0, len=maData.getLength(); i < len; i++ )
         {
-            fprintf( stderr, "%c", maData[i] );
+            std::cerr << maData[i];
         }
 
-        fprintf( stderr, "\nPostponed: " );
+        std::cerr << "\nPostponed: ";
         for ( sal_Int32 i=0, len=maPostponed.getLength(); i < len; i++ )
         {
-            fprintf( stderr, "%c", maPostponed[i] );
+            std::cerr << maPostponed[i];
         }
 
-        fprintf( stderr, "\n" );
+        std::cerr << "\n";
     }
 #endif
 
@@ -514,10 +511,10 @@ namespace sax_fastparser {
         std::map< sal_Int32, Int8Sequence >::iterator iter = maData.begin();
         while ( iter != maData.end( ) )
         {
-            fprintf( stderr, "pair: %d, ", iter->first );
+            std::cerr << "pair: " << iter->first;
             for ( sal_Int32 i=0, len=iter->second.getLength(); i < len; ++i )
-                fprintf( stderr, "%c", iter->second[i] );
-            fprintf( stderr, "\n" );
+                std::cerr << iter->second[i];
+            std::cerr << "\n";
             ++iter;
         }
 


More information about the Libreoffice-commits mailing list