summaryrefslogtreecommitdiff
path: root/svl/source/items
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 /svl/source/items
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 'svl/source/items')
-rw-r--r--svl/source/items/cenumitm.cxx8
-rw-r--r--svl/source/items/intitem.cxx24
-rw-r--r--svl/source/items/itempool.cxx4
-rw-r--r--svl/source/items/itemset.cxx4
-rw-r--r--svl/source/items/poolitem.cxx23
-rw-r--r--svl/source/items/stritem.cxx8
6 files changed, 36 insertions, 35 deletions
diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx
index a2b62d132c23..5b3c57ed2272 100644
--- a/svl/source/items/cenumitm.cxx
+++ b/svl/source/items/cenumitm.cxx
@@ -107,10 +107,10 @@ bool SfxBoolItem::GetPresentation(SfxItemPresentation,
void SfxBoolItem::dumpAsXml(xmlTextWriterPtr pWriter) const
{
- xmlTextWriterStartElement(pWriter, BAD_CAST("SfxBoolItem"));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(GetValueTextByVal(m_bValue).toUtf8().getStr()));
- xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SfxBoolItem"));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(GetValueTextByVal(m_bValue).toUtf8().getStr()));
+ (void)xmlTextWriterEndElement(pWriter);
}
// virtual
diff --git a/svl/source/items/intitem.cxx b/svl/source/items/intitem.cxx
index e3850c8bf5a1..7535e665f795 100644
--- a/svl/source/items/intitem.cxx
+++ b/svl/source/items/intitem.cxx
@@ -100,10 +100,10 @@ SfxPoolItem* SfxUInt16Item::CreateDefault()
void SfxUInt16Item::dumpAsXml(xmlTextWriterPtr pWriter) const
{
- xmlTextWriterStartElement(pWriter, BAD_CAST("SfxUInt16Item"));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
- xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SfxUInt16Item"));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
+ (void)xmlTextWriterEndElement(pWriter);
}
boost::property_tree::ptree SfxUInt16Item::dumpAsJSON() const
@@ -123,10 +123,10 @@ SfxPoolItem* SfxInt32Item::CreateDefault()
void SfxInt32Item::dumpAsXml(xmlTextWriterPtr pWriter) const
{
- xmlTextWriterStartElement(pWriter, BAD_CAST("SfxInt32Item"));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
- xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SfxInt32Item"));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
+ (void)xmlTextWriterEndElement(pWriter);
}
boost::property_tree::ptree SfxInt32Item::dumpAsJSON() const
@@ -146,10 +146,10 @@ SfxPoolItem* SfxUInt32Item::CreateDefault()
void SfxUInt32Item::dumpAsXml(xmlTextWriterPtr pWriter) const
{
- xmlTextWriterStartElement(pWriter, BAD_CAST("SfxUInt32Item"));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
- xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SfxUInt32Item"));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
+ (void)xmlTextWriterEndElement(pWriter);
}
boost::property_tree::ptree SfxUInt32Item::dumpAsJSON() const
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 44c0cf534b5d..15f92acfcfd4 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -937,11 +937,11 @@ sal_uInt16 SfxItemPool::GetTrueSlotId( sal_uInt16 nWhich ) const
void SfxItemPool::dumpAsXml(xmlTextWriterPtr pWriter) const
{
- xmlTextWriterStartElement(pWriter, BAD_CAST("SfxItemPool"));
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SfxItemPool"));
for (auto const & rArray : pImpl->maPoolItemArrays)
for (auto const & rItem : rArray)
rItem->dumpAsXml(pWriter);
- xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterEndElement(pWriter);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 8d7b1e463911..883caf50d9d9 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -1503,11 +1503,11 @@ void SfxItemSet::PutDirect(const SfxPoolItem &rItem)
void SfxItemSet::dumpAsXml(xmlTextWriterPtr pWriter) const
{
- xmlTextWriterStartElement(pWriter, BAD_CAST("SfxItemSet"));
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SfxItemSet"));
SfxItemIter aIter(*this);
for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem; pItem = aIter.NextItem())
pItem->dumpAsXml(pWriter);
- xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterEndElement(pWriter);
}
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index c6e3ad6c77d8..835bb911a930 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -539,17 +539,18 @@ bool SfxPoolItem::GetPresentation(
void SfxPoolItem::dumpAsXml(xmlTextWriterPtr pWriter) const
{
- xmlTextWriterStartElement(pWriter, BAD_CAST("SfxPoolItem"));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"),
- BAD_CAST(OString::number(Which()).getStr()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("typeName"), BAD_CAST(typeid(*this).name()));
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SfxPoolItem"));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"),
+ BAD_CAST(OString::number(Which()).getStr()));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("typeName"),
+ BAD_CAST(typeid(*this).name()));
OUString rText;
IntlWrapper aIntlWrapper(SvtSysLocale().GetUILanguageTag());
if (GetPresentation(SfxItemPresentation::Complete, MapUnit::Map100thMM, MapUnit::Map100thMM,
rText, aIntlWrapper))
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"),
- BAD_CAST(rText.toUtf8().getStr()));
- xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"),
+ BAD_CAST(rText.toUtf8().getStr()));
+ (void)xmlTextWriterEndElement(pWriter);
}
boost::property_tree::ptree SfxPoolItem::dumpAsJSON() const
@@ -591,10 +592,10 @@ bool SfxVoidItem::GetPresentation(SfxItemPresentation /*ePresentation*/, MapUnit
void SfxVoidItem::dumpAsXml(xmlTextWriterPtr pWriter) const
{
- xmlTextWriterStartElement(pWriter, BAD_CAST("SfxVoidItem"));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"),
- BAD_CAST(OString::number(Which()).getStr()));
- xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SfxVoidItem"));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"),
+ BAD_CAST(OString::number(Which()).getStr()));
+ (void)xmlTextWriterEndElement(pWriter);
}
SfxVoidItem* SfxVoidItem::Clone(SfxItemPool*) const { return new SfxVoidItem(*this); }
diff --git a/svl/source/items/stritem.cxx b/svl/source/items/stritem.cxx
index 86e2087cd503..c0ec01a9aba4 100644
--- a/svl/source/items/stritem.cxx
+++ b/svl/source/items/stritem.cxx
@@ -28,10 +28,10 @@ SfxStringItem* SfxStringItem::Clone(SfxItemPool *) const
void SfxStringItem::dumpAsXml(xmlTextWriterPtr pWriter) const
{
- xmlTextWriterStartElement(pWriter, BAD_CAST("SfxStringItem"));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(GetValue().toUtf8().getStr()));
- xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SfxStringItem"));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(GetValue().toUtf8().getStr()));
+ (void)xmlTextWriterEndElement(pWriter);
}
SfxPoolItem* SfxStringItem::CreateDefault()