Author: mib
Date: Mon May  4 13:21:56 2009
New Revision: 271464

Log:
#159717#: File name infor for performance test

Modified:
   cws/perftest08/sal/util/sal.map

Modified: cws/perftest08/sal/util/sal.map
==============================================================================
--- cws/perftest08/sal/util/sal.map     Mon May  4 13:21:46 2009        
(r271463)
+++ cws/perftest08/sal/util/sal.map     Mon May  4 13:21:56 2009        
(r271464)
@@ -588,6 +588,11 @@
         rtl_math_atanh;
 } UDK_3.8;
+UDK_3.10 { # OOo 3.2
+    global:
+        rtl_logfile_hasLogFile;
+} UDK_3.9;
+
 PRIVATE_1.0 {
     global:
         osl_detail_ObjectRegistry_storeAddresses;

Author: mib
Date: Mon May  4 13:21:18 2009
New Revision: 271462

Log:
#159717#: File name infor for performance test

Modified:
   cws/perftest08/sal/inc/rtl/logfile.h
   cws/perftest08/sal/inc/rtl/logfile.hxx

Modified: cws/perftest08/sal/inc/rtl/logfile.h
==============================================================================
--- cws/perftest08/sal/inc/rtl/logfile.h        Mon May  4 13:13:03 2009        
(r271461)
+++ cws/perftest08/sal/inc/rtl/logfile.h        Mon May  4 13:21:18 2009        
(r271462)
@@ -67,6 +67,14 @@
 */
 void SAL_CALL rtl_logfile_longTrace(char const * format, ...);
+/** Return if a log file is written.
+
+       @return true if a log file is written
+
+    @since UDK 3.10.0

For OOo 3.2 (see above) this must be @since UDK 3.2.11, see <http://wiki.services.openoffice.org/wiki/UNO_%40since_Tags>.

+*/
+int SAL_CALL rtl_logfile_hasLogFile(void);

This function should return sal_Bool instead of int.

Note that the C++ class in the same file use the spelling "Logfile" instead of "LogFile."

+
 #ifdef __cplusplus
 }
 #endif

Modified: cws/perftest08/sal/inc/rtl/logfile.hxx
==============================================================================
--- cws/perftest08/sal/inc/rtl/logfile.hxx      Mon May  4 13:13:03 2009        
(r271461)
+++ cws/perftest08/sal/inc/rtl/logfile.hxx      Mon May  4 13:21:18 2009        
(r271462)
@@ -189,12 +189,19 @@
#define RTL_LOGFILE_PRODUCT_TRACE( string ) \
             rtl_logfile_longTrace( "| : %s\n", string )
-#define RTL_LOGFILE_PRODUCT_CONTEXT( instance, name ) \
-            ::rtl::Logfile instance( name )
 #define RTL_LOGFILE_PRODUCT_TRACE1( frmt, arg1 ) \
              rtl_logfile_longTrace( "| : " ); \
              rtl_logfile_trace( frmt, arg1 ); \
              rtl_logfile_trace( "\n" )
+#define RTL_LOGFILE_PRODUCT_CONTEXT( instance, name ) \
+            ::rtl::Logfile instance( name )
+#define RTL_LOGFILE_PRODUCT_CONTEXT_TRACE1( instance, frmt, arg1 ) \
+               rtl_logfile_longTrace( "| %s : ", \
+                                                  instance.getName() ); \
+             rtl_logfile_trace( frmt, arg1 ); \
+             rtl_logfile_trace( "\n" )
+#define RTL_LOGFILE_HASLOGFILE \
+                        rtl_logfile_hasLogFile

I would argue against introducing the redundant RTL_LOGFILE_HASLOGFILE macro.

#endif

Author: mib
Date: Mon May  4 13:22:27 2009
New Revision: 271465

Log:
#159717#: File name infor for performance test

Modified:
   cws/perftest08/sal/rtl/source/logfile.cxx

Modified: cws/perftest08/sal/rtl/source/logfile.cxx
==============================================================================
--- cws/perftest08/sal/rtl/source/logfile.cxx   Mon May  4 13:21:56 2009        
(r271464)
+++ cws/perftest08/sal/rtl/source/logfile.cxx   Mon May  4 13:22:27 2009        
(r271465)
@@ -250,3 +250,7 @@
         va_end(args);
     }
 }
+
+extern "C" int SAL_CALL rtl_logfile_hasLogFile( void ) {
+    return g_buffer != 0;
+}

Is it not necessary to call init() before checking g_buffer?

The explicit "void" argument list is un-idiomatic in C++.

By the way, why did you split this single change across three commits?

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to