]> git.lyx.org Git - lyx.git/blobdiff - src/debug.C
work around for bug reported by Mario Morandini
[lyx.git] / src / debug.C
index 0ea28abd912605a3332e52ed542f4a786defef12..b629f57a0d0646c51a0edf880c4fdeb51deb6cc1 100644 (file)
@@ -1,9 +1,9 @@
 /* This file is part of
-* ====================================================== 
-* 
+* ======================================================
+*
 *           LyX, The Document Processor
-*        
-*           Copyright 1999-2000 The LyX Team.
+*
+*           Copyright 1999-2001 The LyX Team.
 *
 * ====================================================== */
 
@@ -17,6 +17,7 @@
 
 #include "debug.h"
 #include "gettext.h"
+#include "support/lstrings.h"
 
 using std::ostream;
 using std::setw;
@@ -52,7 +53,10 @@ error_item errorTags[] = {
        { Debug::DEPEND,    "depend",    N_("Dependency information")},
        { Debug::INSETS,    "insets",    N_("LyX Insets")},
        { Debug::FILES,     "files",     N_("Files used by LyX")},
-        { Debug::ANY,       "any",       N_("All debugging messages")}
+       { Debug::WORKAREA,  "workarea",  N_("Workarea events")},
+       { Debug::INSETTEXT, "insettext", N_("Insettext/tabular messages")},
+       { Debug::GRAPHICS,  "graphics",  N_("Graphics conversion and loading")},
+       { Debug::ANY,       "any",       N_("All debugging messages")}
 };
 
 
@@ -60,16 +64,17 @@ int const numErrorTags = sizeof(errorTags)/sizeof(error_item);
 
 } // namespace anon
 
-       
+
 Debug::type const Debug::ANY = Debug::type(
        Debug::INFO | Debug::INIT | Debug::KEY | Debug::GUI |
        Debug::PARSER | Debug::LYXRC | Debug::KBMAP | Debug::LATEX |
        Debug::MATHED | Debug::FONT | Debug::TCLASS | Debug::LYXVC |
        Debug::LYXSERVER | Debug::ROFF | Debug::ACTION | Debug::LYXLEX |
-       Debug::DEPEND | Debug::INSETS | Debug::FILES);
+       Debug::DEPEND | Debug::INSETS | Debug::FILES | Debug::WORKAREA |
+       Debug::INSETTEXT | Debug::GRAPHICS);
 
 
-Debug::type Debug::value(string const & val) 
+Debug::type Debug::value(string const & val)
 {
        type l = Debug::NONE;
        string v(val);
@@ -79,11 +84,11 @@ Debug::type Debug::value(string const & val)
                if (tmp.empty())
                        break;
                // Is it a number?
-               if (isStrInt(tmp)) 
+               if (isStrInt(tmp))
                        l |= static_cast<type>(strToInt(tmp));
                else
                // Search for an explicit name
-               for (int i = 0 ; i < numErrorTags ; ++i) 
+               for (int i = 0 ; i < numErrorTags ; ++i)
                        if (tmp == errorTags[i].name) {
                                l |= errorTags[i].level;
                                break;
@@ -107,7 +112,7 @@ void Debug::showLevel(ostream & o, Debug::type level)
 }
 
 
-void Debug::showTags(ostream & os) 
+void Debug::showTags(ostream & os)
 {
        for (int i = 0 ; i < numErrorTags ; ++i)
                os << setw(7) << errorTags[i].level