summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-21 14:26:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-21 18:44:29 +0200
commit4c945b22fc42eb7a52864018cbca88358e71fd4d (patch)
tree582dad7232dcd43e00029f5573f9896a93c71ca8 /sw/source
parent893f2128ed451120e41dba1ee4c2f512ec6bb20e (diff)
new loplugin:methodcycles
look for closed cycles of methods i.e. unused code that would not otherwise be found by the unusedmethods loplugin Change-Id: I3fb052132d97aabca573bb8e9fc424201b1e2042 Reviewed-on: https://gerrit.libreoffice.org/60875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx71
1 files changed, 0 insertions, 71 deletions
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index a670fc83ded4..9ffbc68866a0 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -691,77 +691,6 @@ const char * dbg_out(const SwTextNode * pNode)
return nullptr;
}
-static void lcl_dbg_nodes_inner(OUString & aStr, SwNodes & rNodes, sal_uLong & nIndex)
-{
- SwNode * pNode = rNodes[nIndex];
- SwStartNode * pStartNode = dynamic_cast<SwStartNode *> (pNode);
-
- SwNode * pEndNode = nullptr;
- if (pStartNode != nullptr)
- pEndNode = pStartNode->EndOfSectionNode();
-
- sal_uLong nCount = rNodes.Count();
- sal_uLong nStartIndex = nIndex;
-
- bool bDone = false;
-
- OUString aTag;
- if (pNode->IsTableNode())
- aTag += "table";
- else if (pNode->IsSectionNode())
- aTag += "section";
- else
- aTag += "nodes";
-
- aStr += "<";
- aStr += aTag;
- aStr += ">";
-
- while (! bDone)
- {
- if (pNode->IsStartNode() && nIndex != nStartIndex)
- lcl_dbg_nodes_inner(aStr, rNodes, nIndex);
- else
- {
- aStr += lcl_dbg_out(*pNode);
- aStr += "\n";
-
- nIndex++;
- }
-
- if (pNode == pEndNode || nIndex >= nCount)
- bDone = true;
- else
- pNode = rNodes[nIndex];
- }
-
- aStr += "</";
- aStr += aTag;
- aStr += ">\n";
-}
-
-static OUString lcl_dbg_out(SwNodes & rNodes)
-{
- OUString aStr("<nodes-array>");
-
- sal_uLong nIndex = 0;
- sal_uLong nCount = rNodes.Count();
-
- while (nIndex < nCount)
- {
- lcl_dbg_nodes_inner(aStr, rNodes, nIndex);
- }
-
- aStr += "</nodes-array>\n";
-
- return aStr;
-}
-
-const char * dbg_out(SwNodes & rNodes)
-{
- return dbg_out(lcl_dbg_out(rNodes));
-}
-
static OUString lcl_dbg_out(const SwUndo & rUndo)
{
return "[ " + OUString::number(static_cast<int>(rUndo.GetId()))