summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-10-06 20:06:19 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-10-07 08:05:50 +0200
commitf78aebd4c2a2b740559e54906a26653dc89fd610 (patch)
tree02466eadeeb18f723a3a98c3f2e9f535799e2703
parentf629dc8dc8b9620508b5bd8e55ddb298438c447f (diff)
sw: size() -> !empty() in textboxhelper
To avoid an implicit integer to boolean conversion. Change-Id: If4f91d4ebfc0c2a66e0c526d3826aed4b7558ec2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123185 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sw/source/core/doc/textboxhelper.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 7c6110e714d2..6d19209c4ad3 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -1388,7 +1388,7 @@ SwTextBoxNode::SwTextBoxNode(SwFrameFormat* pOwnerShape)
assert(pOwnerShape->Which() == RES_DRAWFRMFMT);
m_pOwnerShapeFormat = pOwnerShape;
- if (m_pTextBoxes.size())
+ if (!m_pTextBoxes.empty())
m_pTextBoxes.clear();
}
@@ -1422,7 +1422,7 @@ void SwTextBoxNode::AddTextBox(SdrObject* pDrawObject, SwFrameFormat* pNewTextBo
void SwTextBoxNode::DelTextBox(const SdrObject* pDrawObject)
{
assert(pDrawObject);
- if (m_pTextBoxes.size())
+ if (!m_pTextBoxes.empty())
{
for (auto it = m_pTextBoxes.begin(); it != m_pTextBoxes.end();)
{
@@ -1442,7 +1442,7 @@ void SwTextBoxNode::DelTextBox(const SdrObject* pDrawObject)
SwFrameFormat* SwTextBoxNode::GetTextBox(const SdrObject* pDrawObject) const
{
assert(pDrawObject);
- if (m_pTextBoxes.size())
+ if (!m_pTextBoxes.empty())
{
for (auto it = m_pTextBoxes.begin(); it != m_pTextBoxes.end(); it++)
{
@@ -1459,7 +1459,7 @@ bool SwTextBoxNode::IsTextBoxActive(const SdrObject* pDrawObject) const
{
assert(pDrawObject);
- if (m_pTextBoxes.size())
+ if (!m_pTextBoxes.empty())
{
for (auto it = m_pTextBoxes.begin(); it != m_pTextBoxes.end(); it++)
{
@@ -1476,7 +1476,7 @@ void SwTextBoxNode::SetTextBoxActive(const SdrObject* pDrawObject)
{
assert(pDrawObject);
- if (m_pTextBoxes.size())
+ if (!m_pTextBoxes.empty())
{
for (auto it = m_pTextBoxes.begin(); it != m_pTextBoxes.end(); it++)
{
@@ -1492,7 +1492,7 @@ void SwTextBoxNode::SetTextBoxInactive(const SdrObject* pDrawObject)
{
assert(pDrawObject);
- if (m_pTextBoxes.size())
+ if (!m_pTextBoxes.empty())
{
for (auto it = m_pTextBoxes.begin(); it != m_pTextBoxes.end(); it++)
{