Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


You need to be careful with removing functionality from osl/diangose.h, as it is part of the stable URE interface.

In general, such incompatible changes need discussion on the mailing list, and commit messages should be marked "[API CHANGE]" so they can be easily grepped and documented at <https://wiki.documentfoundation.org/ReleaseNotes/4.3#API_changes>.

In this particular case, it is probably OK to just remove that macro. But it would be great if you could list the removal under <https://wiki.documentfoundation.org/ReleaseNotes/4.3#C.2B.2B_UNO_language_binding_and_URE_libraries> and remove the sole remaining mention of "OSL_DEBUG_ONLY" from a comment in include/osl/diagnose.h.

Stephan

On 04/05/2014 10:48 AM, Michaël Lefèvre wrote:
commit 22ab56f5e35dff58e1923b693dc33ff252293557
Author: Michaël Lefèvre <lefevre00@yahoo.fr>
Date:   Mon Mar 31 21:32:47 2014 +0200

     fdo#43157 : clean up OSL_DEBUG_ONLY

     Change-Id: Ic92b64cfaec41bf4104cede5f26579d86543b9a8
     Reviewed-on: https://gerrit.libreoffice.org/8804
     Tested-by: David Tardon <dtardon@redhat.com>
     Reviewed-by: David Tardon <dtardon@redhat.com>

diff --git a/connectivity/source/commontools/RowFunctionParser.cxx 
b/connectivity/source/commontools/RowFunctionParser.cxx
index 987a04e..5518472 100644
--- a/connectivity/source/commontools/RowFunctionParser.cxx
+++ b/connectivity/source/commontools/RowFunctionParser.cxx
@@ -467,7 +467,9 @@ ExpressionNodeSharedPtr FunctionParser::parseFunction( const OUString& _sFunctio
                                      aExpressionGrammer,
                                      ::boost::spirit::space_p ) );

-    OSL_DEBUG_ONLY(::std::cout.flush()); // needed to keep stdout and cout in sync
+#if (OSL_DEBUG_LEVEL > 0)
+    ::std::cout.flush(); // needed to keep stdout and cout in sync
+#endif

      // input fully congested by the parser?
      if( !aParseInfo.full )
diff --git a/include/osl/diagnose.h b/include/osl/diagnose.h
index b0f7bad..4137d21 100644
--- a/include/osl/diagnose.h
+++ b/include/osl/diagnose.h
@@ -95,8 +95,6 @@
  */
  #define OSL_LOG_PREFIX SAL_DETAIL_WHERE

-#define OSL_DEBUG_ONLY(s)   _OSL_DEBUG_ONLY(s)
-
  #define OSL_TRACE(...) \
      SAL_DETAIL_INFO_IF_FORMAT(OSL_DEBUG_LEVEL > 0, "legacy.osl", __VA_ARGS__)

@@ -122,16 +120,6 @@
  #define _OSL_GLOBAL
  #endif  /* __cplusplus */

-#if OSL_DEBUG_LEVEL > 0
-
-#define _OSL_DEBUG_ONLY(f)  (f)
-
-#else
-
-#define _OSL_DEBUG_ONLY(f)          ((void)0)
-
-#endif /* OSL_DEBUG_LEVEL */
-
  /* the macro OSL_THIS_FUNC is intended to be an office internal macro for now */
  /* copied from boost/current_function.hpp to make it usable from C
   * sources as well
diff --git a/slideshow/source/engine/smilfunctionparser.cxx 
b/slideshow/source/engine/smilfunctionparser.cxx
index 600818c..5b1922d 100644
--- a/slideshow/source/engine/smilfunctionparser.cxx
+++ b/slideshow/source/engine/smilfunctionparser.cxx
@@ -564,7 +564,10 @@ namespace slideshow
                                            aEnd,
                                            aExpressionGrammer,
                                            ::boost::spirit::space_p ) );
-            OSL_DEBUG_ONLY(::std::cout.flush()); // needed to keep stdout and cout in sync
+
+#if OSL_DEBUG_LEVEL > 0
+            ::std::cout.flush(); // needed to keep stdout and cout in sync
+#endif

              // input fully congested by the parser?
              if( !aParseInfo.full )
@@ -610,8 +613,10 @@ namespace slideshow
                                            aEnd,
                                            aExpressionGrammer >> ::boost::spirit::end_p,
                                            ::boost::spirit::space_p ) );
-            OSL_DEBUG_ONLY(::std::cout.flush()); // needed to keep stdout and cout in sync

+#if OSL_DEBUG_LEVEL > 0
+            ::std::cout.flush(); // needed to keep stdout and cout in sync
+#endif
              // input fully congested by the parser?
              if( !aParseInfo.full )
                  throw ParseError( "SmilFunctionParser::parseSmilFunction(): string not fully 
parseable" );
diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx 
b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
index 228e1d2..00185bf 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
@@ -1183,9 +1183,10 @@ ExpressionNodeSharedPtr FunctionParser::parseFunction( const OUString& 
rFunction
                                      aEnd,
                                      aExpressionGrammer >> ::boost::spirit::end_p,
                                      ::boost::spirit::space_p ) );
-    OSL_DEBUG_ONLY(::std::cout.flush()); // needed to keep stdout and cout in sync
-

+#if (OSL_DEBUG_LEVEL > 0)
+    ::std::cout.flush(); // needed to keep stdout and cout in sync
+#endif

      // input fully congested by the parser?
      if( !aParseInfo.full )


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.