LibreOffice Module sw (master)
1
sw
inc
dbgoutsw.hxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
* This file is part of the LibreOffice project.
4
*
5
* This Source Code Form is subject to the terms of the Mozilla Public
6
* License, v. 2.0. If a copy of the MPL was not distributed with this
7
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
*
9
* This file incorporates work covered by the following license notice:
10
*
11
* Licensed to the Apache Software Foundation (ASF) under one or more
12
* contributor license agreements. See the NOTICE file distributed
13
* with this work for additional information regarding copyright
14
* ownership. The ASF licenses this file to you under the Apache
15
* License, Version 2.0 (the "License"); you may not use this file
16
* except in compliance with the License. You may obtain a copy of
17
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
18
*/
19
#ifndef INCLUDED_SW_INC_DBGOUTSW_HXX
20
#define INCLUDED_SW_INC_DBGOUTSW_HXX
21
22
#ifdef DBG_UTIL
23
24
#include <rtl/ustring.hxx>
25
#include <rtl/ustrbuf.hxx>
26
#include "
tox.hxx
"
27
#include <cstdio>
28
#include <string_view>
29
#include <unordered_map>
30
31
class
SwContentNode
;
32
class
SwNode
;
33
class
SwTextAttr
;
34
class
SwTextNode
;
35
class
SwpHints
;
36
class
SfxPoolItem
;
37
class
SfxItemSet
;
38
struct
SwPosition
;
39
class
SwPaM
;
40
class
SwNodeNum
;
41
class
SwUndo
;
42
class
SwRect
;
43
class
SwFrameFormat
;
44
class
SwNumRuleTable
;
45
class
SwNumRule
;
46
class
SwOutlineNodes
;
47
class
SwTextFormatColl
;
48
class
SwNodeRange
;
49
50
extern
bool
bDbgOutStdErr
;
51
extern
bool
bDbgOutPrintAttrSet
;
52
53
const
char
*
dbg_out
(
const
void
* pVoid);
54
const
char
*
dbg_out
(std::u16string_view aStr);
55
const
char
*
dbg_out
(
const
SwRect
& rRect);
56
const
char
*
dbg_out
(
const
SwFrameFormat
& rFrameFormat);
57
SW_DLLPUBLIC
const
char
*
dbg_out
(
const
SwNode
& rNode);
58
SW_DLLPUBLIC
const
char
*
dbg_out
(
const
SwNode
* pNode);
59
const
char
*
dbg_out
(
const
SwContentNode
* pNode);
60
const
char
*
dbg_out
(
const
SwTextNode
* pNode);
61
const
char
*
dbg_out
(
const
SwTextAttr
& rAttr);
62
const
char
*
dbg_out
(
const
SwpHints
& rHints);
63
const
char
*
dbg_out
(
const
SfxPoolItem
& rItem);
64
const
char
*
dbg_out
(
const
SfxPoolItem
* pItem);
65
const
char
*
dbg_out
(
const
SfxItemSet
& rSet);
66
const
char
*
dbg_out
(
const
SwPosition
& rPos);
67
const
char
*
dbg_out
(
const
SwPaM
& rPam);
68
const
char
*
dbg_out
(
const
SwNodeNum
& rNum);
69
const
char
*
dbg_out
(
const
SwUndo
& rUndo);
70
const
char
*
dbg_out
(
SwOutlineNodes
const
& rNodes);
71
const
char
*
dbg_out
(
const
SwNumRule
& rRule);
72
const
char
*
dbg_out
(
const
SwTextFormatColl
& rFormat);
73
const
char
*
dbg_out
(
const
SwNumRuleTable
& rTable);
74
const
char
*
dbg_out
(
const
SwNodeRange
& rRange);
75
const
char
*
dbg_out
(
const
sw::FrameFormats<sw::SpzFrameFormat*>
& rFrameFormats);
76
77
template
<
typename
tKey,
typename
tMember,
typename
fHashFunction>
78
OUString
lcl_dbg_out
(
const
std::unordered_map<tKey, tMember, fHashFunction>& rMap)
79
{
80
OUStringBuffer aResult(
"["
);
81
82
typename
std::unordered_map<tKey, tMember, fHashFunction>::const_iterator aIt;
83
84
for
(aIt = rMap.begin(); aIt != rMap.end(); ++aIt)
85
{
86
if
(aIt != rMap.begin())
87
aResult.append(
", "
);
88
89
aResult += aIt->first;
90
91
char
sBuffer[256];
92
sprintf
(sBuffer,
"(%p)"
, aIt->second);
93
aResult.appendAscii(sBuffer);
94
}
95
96
aResult.append(
"]"
);
97
98
return
aResult.makeStringAndClear();
99
}
100
101
template
<
typename
tKey,
typename
tMember,
typename
fHashFunction>
102
const
char
*
dbg_out
(
const
std::unordered_map<tKey, tMember, fHashFunction>& rMap)
103
{
104
return
dbg_out
(
lcl_dbg_out
(rMap));
105
}
106
const
char
*
dbg_out
(
const
SwFormToken
& rToken);
107
const
char
*
dbg_out
(
const
SwFormTokens
& rTokens);
108
#endif
// DBG_UTIL
109
#endif
// INCLUDED_SW_INC_DBGOUTSW_HXX
110
111
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxItemSet
SfxPoolItem
SwContentNode
Definition:
node.hxx:395
SwFrameFormat
Style of a layout element.
Definition:
frmfmt.hxx:72
SwNodeNum
Definition:
SwNodeNum.hxx:30
SwNodeRange
Definition:
ndindex.hxx:134
SwNode
Base class of the Writer document model elements.
Definition:
node.hxx:98
SwNumRuleTable
Definition:
docary.hxx:205
SwNumRule
Definition:
numrule.hxx:94
SwOutlineNodes
Definition:
ndarr.hxx:79
SwPaM
PaM is Point and Mark: a selection of the document model.
Definition:
pam.hxx:188
SwRect
Of course Writer needs its own rectangles.
Definition:
swrect.hxx:35
SwTextAttr
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
Definition:
txatbase.hxx:44
SwTextFormatColl
Represents the style of a paragraph.
Definition:
fmtcol.hxx:61
SwTextNode
SwTextNode is a paragraph in the document model.
Definition:
ndtxt.hxx:112
SwUndo
Definition:
undobj.hxx:55
SwpHints
An SwTextAttr container, stores all directly formatted text portions for a text node.
Definition:
ndhints.hxx:68
sw::FrameFormats
Definition:
frameformats.hxx:42
dbg_out
const char * dbg_out(const void *pVoid)
Definition:
dbgoutsw.cxx:71
bDbgOutPrintAttrSet
bool bDbgOutPrintAttrSet
Definition:
dbgoutsw.cxx:48
lcl_dbg_out
OUString lcl_dbg_out(const std::unordered_map< tKey, tMember, fHashFunction > &rMap)
Definition:
dbgoutsw.hxx:78
bDbgOutStdErr
bool bDbgOutStdErr
Definition:
dbgoutsw.cxx:47
sprintf
int sprintf(char(&s)[N], char const *format, T &&... arguments)
SwFormToken
Definition:
tox.hxx:244
SwPosition
Marks a position in the document model.
Definition:
pam.hxx:38
SW_DLLPUBLIC
#define SW_DLLPUBLIC
Definition:
swdllapi.h:28
tox.hxx
SwFormTokens
std::vector< SwFormToken > SwFormTokens
Vector of tokens.
Definition:
tox.hxx:286
Generated on Sun Jul 30 2023 04:27:57 for LibreOffice Module sw (master) by
1.9.3