summaryrefslogtreecommitdiff
path: root/sw/inc/dbgoutsw.hxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-11-27 10:39:01 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-11-27 10:39:01 +0000
commitdee19aec49f4f6160305e858db320c3503251fbd (patch)
tree5fceab10b7ebaed30eed02f6d768e8ac1690d4a7 /sw/inc/dbgoutsw.hxx
parente23143edbe345930a01b5a233e4d0a8f82ae0627 (diff)
INTEGRATION: CWS swqcore01 (1.6.102); FILE MERGED
2004/11/27 10:14:09 os 1.6.102.3: RESYNC: (1.6-1.7); FILE MERGED 2004/11/10 16:28:03 hbrinkm 1.6.102.2: #i36903# output for SfxPoolItem 2004/11/05 14:27:11 hbrinkm 1.6.102.1: #i36749# output for hash_map of numrules
Diffstat (limited to 'sw/inc/dbgoutsw.hxx')
-rw-r--r--sw/inc/dbgoutsw.hxx37
1 files changed, 34 insertions, 3 deletions
diff --git a/sw/inc/dbgoutsw.hxx b/sw/inc/dbgoutsw.hxx
index a5081fd38e04..56b01955b7d6 100644
--- a/sw/inc/dbgoutsw.hxx
+++ b/sw/inc/dbgoutsw.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dbgoutsw.hxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: obo $ $Date: 2004-11-16 15:36:54 $
+ * last change: $Author: hr $ $Date: 2004-11-27 11:39:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,7 +66,6 @@
#include <hash_map>
#include <tox.hxx>
-
class String;
class SwNode;
class SwTxtAttr;
@@ -81,6 +80,7 @@ class SwRect;
class SwFrmFmt;
class SwNodes;
class SwRewriter;
+class SwNumRuleTbl;
#define DBG_OUT_HERE printf("%s(%d):", __FILE__, __LINE__)
#define DBG_OUT_HERE_FN printf("%s(%d) %s:", __FILE__, __LINE__, __FUNCTION__)
@@ -101,6 +101,7 @@ const char * dbg_out(const SwNode & rNode);
const char * dbg_out(const SwTxtAttr & rAttr);
const char * dbg_out(const SwpHints &rHints);
const char * dbg_out(const SfxPoolItem & rItem);
+const char * dbg_out(const SfxPoolItem * pItem);
const char * dbg_out(const SfxItemSet & rSet);
const char * dbg_out(SwNodes & rNodes);
const char * dbg_out(const SwPosition & rPos);
@@ -109,6 +110,36 @@ const char * dbg_out(const SwNodeNum & rNum);
const char * dbg_out(const SwUndos & rUndos);
const char * dbg_out(const SwRewriter & rRewriter);
const char * dbg_out(const SwNumRuleTbl & rTbl);
+
+template<typename tKey, typename tMember, typename fHashFunction>
+String lcl_dbg_out(const std::hash_map<tKey, tMember, fHashFunction> & rMap)
+{
+ String aResult("[", RTL_TEXTENCODING_ASCII_US);
+
+ typename std::hash_map<tKey, tMember, fHashFunction>::const_iterator aIt;
+
+ for (aIt = rMap.begin(); aIt != rMap.end(); aIt++)
+ {
+ if (aIt != rMap.begin())
+ aResult += String(", ", RTL_TEXTENCODING_ASCII_US);
+
+ aResult += aIt->first;
+
+ char sBuffer[256];
+ sprintf(sBuffer, "(%p)", aIt->second);
+ aResult += String(sBuffer, RTL_TEXTENCODING_ASCII_US);
+ }
+
+ aResult += String("]", RTL_TEXTENCODING_ASCII_US);
+
+ return aResult;
+}
+
+template<typename tKey, typename tMember, typename fHashFunction>
+const char * dbg_out(const std::hash_map<tKey, tMember, fHashFunction> & rMap)
+{
+ return dbg_out(lcl_dbg_out(rMap));
+}
const char * dbg_out(const SwFormToken & rToken);
const char * dbg_out(const SwFormTokens & rTokens);
#endif // DEBUG