summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode/node.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-19 14:47:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-03-19 21:07:04 +0100
commit7a5014b24e2755e56790dbfd56fea2c789aa792c (patch)
tree2d9616b4eff5f11c790f774f5b293ff1801886c9 /sw/source/core/docnode/node.cxx
parentbd7e258bac69f3b9f9e87128aacb989d23e24d4f (diff)
silence coverity unchecked return value from library on xmlText* functions
Change-Id: I651abb00d8ae1bdbf758a6a0176fd8912531a585 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112753 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/core/docnode/node.cxx')
-rw-r--r--sw/source/core/docnode/node.cxx52
1 files changed, 26 insertions, 26 deletions
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 7f9bae8a01f2..809ecd349c81 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -898,11 +898,11 @@ void SwNode::dumpAsXml(xmlTextWriterPtr pWriter) const
break;
default: break;
}
- xmlTextWriterStartElement(pWriter, BAD_CAST(pName));
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST(pName));
- xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("type"), BAD_CAST(OString::number(static_cast<sal_uInt8>(GetNodeType())).getStr()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("index"), BAD_CAST(OString::number(GetIndex()).getStr()));
+ (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("type"), BAD_CAST(OString::number(static_cast<sal_uInt8>(GetNodeType())).getStr()));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("index"), BAD_CAST(OString::number(GetIndex()).getStr()));
switch (GetNodeType())
{
@@ -912,28 +912,28 @@ void SwNode::dumpAsXml(xmlTextWriterPtr pWriter) const
const tools::PolyPolygon* pContour = pNoTextNode->HasContour();
if (pContour)
{
- xmlTextWriterStartElement(pWriter, BAD_CAST("pContour"));
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("pContour"));
for (sal_uInt16 i = 0; i < pContour->Count(); ++i)
{
- xmlTextWriterStartElement(pWriter, BAD_CAST("polygon"));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("index"),
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("polygon"));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("index"),
BAD_CAST(OString::number(i).getStr()));
const tools::Polygon& rPolygon = pContour->GetObject(i);
for (sal_uInt16 j = 0; j < rPolygon.GetSize(); ++j)
{
- xmlTextWriterStartElement(pWriter, BAD_CAST("point"));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("index"),
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("point"));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("index"),
BAD_CAST(OString::number(j).getStr()));
const Point& rPoint = rPolygon.GetPoint(j);
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("x"),
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("x"),
BAD_CAST(OString::number(rPoint.X()).getStr()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("y"),
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("y"),
BAD_CAST(OString::number(rPoint.Y()).getStr()));
- xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterEndElement(pWriter);
}
- xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterEndElement(pWriter);
}
- xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterEndElement(pWriter);
}
}
break;
@@ -941,9 +941,9 @@ void SwNode::dumpAsXml(xmlTextWriterPtr pWriter) const
break;
}
- xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterEndElement(pWriter);
if (GetNodeType() == SwNodeType::End)
- xmlTextWriterEndElement(pWriter); // end start node
+ (void)xmlTextWriterEndElement(pWriter); // end start node
}
SwStartNode::SwStartNode( const SwNodeIndex &rWhere, const SwNodeType nNdType,
@@ -1020,28 +1020,28 @@ void SwStartNode::dumpAsXml(xmlTextWriterPtr pWriter) const
break;
}
- xmlTextWriterStartElement(pWriter, BAD_CAST(pName));
- xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("type"), BAD_CAST(OString::number(static_cast<sal_uInt8>(GetNodeType())).getStr()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("index"), BAD_CAST(OString::number(GetIndex()).getStr()));
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST(pName));
+ (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("type"), BAD_CAST(OString::number(static_cast<sal_uInt8>(GetNodeType())).getStr()));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("index"), BAD_CAST(OString::number(GetIndex()).getStr()));
if (IsTableNode())
{
- xmlTextWriterStartElement(pWriter, BAD_CAST("attrset"));
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("attrset"));
GetTableNode()->GetTable().GetFrameFormat()->GetAttrSet().dumpAsXml(pWriter);
- xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterEndElement(pWriter);
}
else if (GetStartNodeType() == SwTableBoxStartNode)
{
if (SwTableBox* pBox = GetTableBox())
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("rowspan"), BAD_CAST(OString::number(pBox->getRowSpan()).getStr()));
- xmlTextWriterStartElement(pWriter, BAD_CAST("attrset"));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("rowspan"), BAD_CAST(OString::number(pBox->getRowSpan()).getStr()));
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("attrset"));
if (SwTableBox* pBox = GetTableBox())
pBox->GetFrameFormat()->GetAttrSet().dumpAsXml(pWriter);
- xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterEndElement(pWriter);
}
- // xmlTextWriterEndElement(pWriter); - it is a start node, so don't end, will make xml better nested
+ // (void)xmlTextWriterEndElement(pWriter); - it is a start node, so don't end, will make xml better nested
}