[Libreoffice-commits] core.git: 2 commits - include/sal unoxml/source

Stephan Bergmann sbergman at redhat.com
Fri Oct 11 01:25:54 PDT 2013


 include/sal/log-areas.dox             |   35 ++++++++++-----------
 unoxml/source/dom/documentbuilder.cxx |   16 ++++-----
 unoxml/source/xpath/xpathapi.cxx      |   56 +++++++++++++---------------------
 3 files changed, 48 insertions(+), 59 deletions(-)

New commits:
commit 54ec8a9a718281968291da2c4ffee11da07f30c2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Oct 11 10:25:21 2013 +0200

    -Werror,-Wunused-variable
    
    Change-Id: I7777008aac6331d7598f496c4808ab34c73f814e

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 56472e0..b4ddc03 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -428,6 +428,7 @@ certain functionality.
 @li @c svg
 @li @c ucbhelper
 @li @c unoidl
+ at li @c unoxml
 @li @c uui
 @li @c vbahelper
 @li @c xmlhelp
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index 6cd4798..eef5e38 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -278,19 +278,19 @@ namespace DOM
     // default warning handler does not trigger assertion
     static void warning_func(void * ctx, const char * /*msg*/, ...)
     {
-        OUStringBuffer buf("libxml2 warning\n");
-        buf.append(make_error_message(static_cast< xmlParserCtxtPtr >(ctx)));
-        OString msg = OUStringToOString(buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US);
-        OSL_TRACE(msg.getStr());
+        SAL_INFO(
+            "unoxml",
+            "libxml2 warning: "
+                << make_error_message(static_cast<xmlParserCtxtPtr>(ctx)));
     }
 
     // default error handler triggers assertion
     static void error_func(void * ctx, const char * /*msg*/, ...)
     {
-        OUStringBuffer buf("libxml2 error\n");
-        buf.append(make_error_message(static_cast< xmlParserCtxtPtr >(ctx)));
-        OString msg = OUStringToOString(buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US);
-        OSL_FAIL(msg.getStr());
+        SAL_WARN(
+            "unoxml",
+            "libxml2 error: "
+                << make_error_message(static_cast<xmlParserCtxtPtr>(ctx)));
     }
 
     } // extern "C"
diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
index 69960a0..65c58c0 100644
--- a/unoxml/source/xpath/xpathapi.cxx
+++ b/unoxml/source/xpath/xpathapi.cxx
@@ -260,20 +260,24 @@ namespace XPath
     static OUString make_error_message(xmlErrorPtr pError)
     {
         OUStringBuffer buf;
-        if (pError->message) {
-            buf.appendAscii(pError->message);
-        }
-        int line = pError->line;
-        if (line) {
-            buf.appendAscii("Line: ");
-            buf.append(static_cast<sal_Int32>(line));
-            buf.appendAscii("\n");
-        }
-        int column = pError->int2;
-        if (column) {
-            buf.appendAscii("Column: ");
-            buf.append(static_cast<sal_Int32>(column));
-            buf.appendAscii("\n");
+        if (pError) {
+            if (pError->message) {
+                buf.appendAscii(pError->message);
+            }
+            int line = pError->line;
+            if (line) {
+                buf.appendAscii("Line: ");
+                buf.append(static_cast<sal_Int32>(line));
+                buf.appendAscii("\n");
+            }
+            int column = pError->int2;
+            if (column) {
+                buf.appendAscii("Column: ");
+                buf.append(static_cast<sal_Int32>(column));
+                buf.appendAscii("\n");
+            }
+        } else {
+            buf.appendAscii("no error argument!");
         }
         OUString msg = buf.makeStringAndClear();
         return msg;
@@ -281,9 +285,8 @@ namespace XPath
 
     extern "C" {
 
-        static void generic_error_func(void *userData, const char *format, ...)
+        static void generic_error_func(void *, const char *format, ...)
         {
-            (void) userData;
             char str[1000];
             va_list args;
 
@@ -294,27 +297,12 @@ namespace XPath
             vsnprintf(str, sizeof(str), format, args);
             va_end(args);
 
-            OUStringBuffer buf(
-                "libxml2 error:\n");
-            buf.appendAscii(str);
-            OString msg = OUStringToOString(buf.makeStringAndClear(),
-                RTL_TEXTENCODING_ASCII_US);
-            OSL_FAIL(msg.getStr());
+            SAL_WARN("unoxml", "libxml2 error: " << str);
         }
 
-        static void structured_error_func(void * userData, xmlErrorPtr error)
+        static void structured_error_func(void *, xmlErrorPtr error)
         {
-            (void) userData;
-            OUStringBuffer buf(
-                "libxml2 error:\n");
-            if (error) {
-                buf.append(make_error_message(error));
-            } else {
-                buf.append("no error argument!");
-            }
-            OString msg = OUStringToOString(buf.makeStringAndClear(),
-                RTL_TEXTENCODING_ASCII_US);
-            OSL_FAIL(msg.getStr());
+            SAL_WARN("unoxml", "libxml2 error: " << make_error_message(error));
         }
 
     } // extern "C"
commit ac8c5ea6c4efec357a289a48fb129e29ceef19b2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Oct 11 10:14:59 2013 +0200

    Sort lists lexicographically
    
    Change-Id: I6e44e37d70be90e6cebaaa17e1ee5851b80c7722

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index fd15926..56472e0 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -44,9 +44,9 @@ certain functionality.
 @li @c canvas
 @li @c canvas.cairo
 @li @c canvas.directx
- at li @c canvas.vcl
 @li @c canvas.null
 @li @c canvas.ogl
+ at li @c canvas.vcl
 
 @section chart2
 
@@ -55,15 +55,15 @@ certain functionality.
 
 @section connectivity
 
- at li @c connectivity.evoab2
- at li @c connectivity.cpool
 @li @c connectivity.commontools
+ at li @c connectivity.cpool
 @li @c connectivity.drivers
+ at li @c connectivity.evoab2
 @li @c connectivity.firebird
+ at li @c connectivity.flat
 @li @c connectivity.hsqldb
 @li @c connectivity.jdbc
 @li @c connectivity.mork
- at li @c connectivity.flat
 @li @c connectivity.parse
 @li @c connectivity.postgresql
 
@@ -84,8 +84,8 @@ certain functionality.
 
 @li @c sc
 @li @c sc.core
- at li @c sc.ui - Calc UI
 @li @c sc.filter - Calc filter
+ at li @c sc.ui - Calc UI
 
 @section desktop
 
@@ -101,11 +101,11 @@ certain functionality.
 @li @c sd
 @li @c sd.filter
 @li @c sd.fwk
+ at li @c sd.slideshow
 @li @c sd.sls - slidesorter
 @li @c sd.tools
 @li @c sd.ui
 @li @c sd.view
- at li @c sd.slideshow
 @li @c sdremote
 @li @c sdremote.bluetooth
 @li @c sdremote.wifi
@@ -197,8 +197,8 @@ certain functionality.
 @section Math
 
 @li @c starmath
- at li @c starmath.rtf
 @li @c starmath.ooxml - OOXML import/export
+ at li @c starmath.rtf
 @li @c starmath.wordbase
 
 @section package
@@ -216,8 +216,8 @@ certain functionality.
 @section sfx2
 
 @li @c sfx2
- at li @c sfx2.doc
 @li @c sfx2.appl
+ at li @c sfx2.doc
 
 @section sfx
 
@@ -235,8 +235,8 @@ certain functionality.
 @section slideshow
 
 @li @c slideshow
- at li @c slideshow.opengl
 @li @c slideshow.eventqueue
+ at li @c slideshow.opengl
 
 @section svl
 
@@ -260,12 +260,12 @@ certain functionality.
 @li @c svx.dialog
 @li @c svx.fmcomp
 @li @c svx.form
+ at li @c svx.sdr
 @li @c svx.stbcrtls - StatusBarControl
+ at li @c svx.svdraw
 @li @c svx.table
 @li @c svx.tbxcrtls - ToolboxControl
- at li @c svx.sdr
 @li @c svx.uno
- at li @c svx.svdraw
 
 @section toolkit
 
@@ -274,8 +274,8 @@ certain functionality.
 @section tools
 
 @li @c tools
- at li @c tools.debug
 @li @c tools.datetime
+ at li @c tools.debug
 @li @c tools.generic
 @li @c tools.memtools
 @li @c tools.rc - resource manager
@@ -340,10 +340,10 @@ certain functionality.
 @li @c vcl.plugadapt - the Unix/X11 backend plugin mechanism
 @li @c vcl.scrollbar - Scroll Bars
 @li @c vcl.sm - Session Manager
- at li @c vcl.window
 @li @c vcl.unity
 @li @c vcl.unx.print
 @li @c vcl.virdev
+ at li @c vcl.window
 
 @section Writer
 
@@ -372,10 +372,10 @@ certain functionality.
 @section xmloff
 
 @li @c xmloff
+ at li @c xmloff.chart
 @li @c xmloff.core
 @li @c xmloff.draw
 @li @c xmloff.forms
- at li @c xmloff.chart
 @li @c xmloff.style
 @li @c xmloff.text
 @li @c xmloff.transform
@@ -388,9 +388,9 @@ certain functionality.
 
 @section xmlscript
 
- at li @c xmlscript.xmlhelper
 @li @c xmlscript.xmldlg
 @li @c xmlscript.xmlflat
+ at li @c xmlscript.xmlhelper
 @li @c xmlscript.xmllib
 @li @c xmlscript.xmlmod
 
@@ -415,11 +415,12 @@ certain functionality.
 @li @c configmgr
 @li @c cppcanvas
 @li @c cppcanvas.emf
- at li @c cppuhelper
 @li @c cppu
+ at li @c cppuhelper
 @li @c helpcompiler
 @li @c linguistic
 @li @c oox
+ at li @c reportdesign
 @li @c rsc
 @li @c sax
 @li @c shell
@@ -431,7 +432,6 @@ certain functionality.
 @li @c vbahelper
 @li @c xmlhelp
 @li @c xmlreader
- at li @c reportdesign
 
 */
 /* vim:set ft=cpp shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list