summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/rtfstringbuffer.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-06-01 10:07:17 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-06-01 09:48:03 +0000
commite0f9d3c5bc448868732e8e21568a596340512ce3 (patch)
tree9c7b63fbedaf29e6760321b09595d5694ad7147d /sw/source/filter/ww8/rtfstringbuffer.cxx
parentf97eb75d5d4728187d0041eecb7be04951d92c22 (diff)
RTF export: use auto where it improves code readability
for (std::vector< OUString >::const_iterator it = rStarts.begin(), end = rStarts.end(); it != end; ++it) vs for (const auto& rStart : rStarts) and so on. Change-Id: I75eff3c28fea11e78415a2183622090804d34f0e Reviewed-on: https://gerrit.libreoffice.org/25755 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/source/filter/ww8/rtfstringbuffer.cxx')
-rw-r--r--sw/source/filter/ww8/rtfstringbuffer.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/sw/source/filter/ww8/rtfstringbuffer.cxx b/sw/source/filter/ww8/rtfstringbuffer.cxx
index 55c4d68a2653..a8394d03dd2c 100644
--- a/sw/source/filter/ww8/rtfstringbuffer.cxx
+++ b/sw/source/filter/ww8/rtfstringbuffer.cxx
@@ -49,24 +49,24 @@ RtfStringBuffer::RtfStringBuffer()
sal_Int32 RtfStringBuffer::getLength() const
{
sal_Int32 nRet = 0;
- for (RtfStringBuffer::Values_t::const_iterator i = m_aValues.begin(); i != m_aValues.end(); ++i)
- if (!i->isGraphic())
- nRet += i->m_aBuffer.getLength();
+ for (const auto& rValue : m_aValues)
+ if (!rValue.isGraphic())
+ nRet += rValue.m_aBuffer.getLength();
return nRet;
}
void RtfStringBuffer::makeStringAndClear(RtfAttributeOutput* pAttributeOutput)
{
- for (RtfStringBuffer::Values_t::iterator i = m_aValues.begin(); i != m_aValues.end(); ++i)
- i->makeStringAndClear(pAttributeOutput);
+ for (auto& rValue : m_aValues)
+ rValue.makeStringAndClear(pAttributeOutput);
}
OString RtfStringBuffer::makeStringAndClear()
{
OStringBuffer aBuf;
- for (RtfStringBuffer::Values_t::iterator i = m_aValues.begin(); i != m_aValues.end(); ++i)
- if (!i->isGraphic())
- aBuf.append(i->makeStringAndClear());
+ for (auto& rValue : m_aValues)
+ if (!rValue.isGraphic())
+ aBuf.append(rValue.makeStringAndClear());
return aBuf.makeStringAndClear();
}
@@ -94,8 +94,8 @@ void RtfStringBuffer::append(const SwFlyFrameFormat* pFlyFrameFormat, const SwGr
void RtfStringBuffer::appendAndClear(RtfStringBuffer& rBuf)
{
- for (RtfStringBuffer::Values_t::iterator i = rBuf.m_aValues.begin(); i != rBuf.m_aValues.end(); ++i)
- m_aValues.push_back(*i);
+ for (const auto& rValue : rBuf.m_aValues)
+ m_aValues.push_back(rValue);
rBuf.clear();
}