Kaydet (Commit) 6920eb20 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: clean up redundant initializers in rtfstringbuffer

Change-Id: Ie4bb6689b3b9bdfcfaab1f1c9320792672fb847a
Reviewed-on: https://gerrit.libreoffice.org/31107Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst f6d2ff1c
...@@ -36,9 +36,7 @@ RtfExportFilter::RtfExportFilter(const uno::Reference< uno::XComponentContext >& ...@@ -36,9 +36,7 @@ RtfExportFilter::RtfExportFilter(const uno::Reference< uno::XComponentContext >&
{ {
} }
RtfExportFilter::~RtfExportFilter() RtfExportFilter::~RtfExportFilter() = default;
{
}
sal_Bool RtfExportFilter::filter(const uno::Sequence< beans::PropertyValue >& aDescriptor) throw(uno::RuntimeException, std::exception) sal_Bool RtfExportFilter::filter(const uno::Sequence< beans::PropertyValue >& aDescriptor) throw(uno::RuntimeException, std::exception)
{ {
......
...@@ -10,15 +10,13 @@ ...@@ -10,15 +10,13 @@
#include "rtfattributeoutput.hxx" #include "rtfattributeoutput.hxx"
RtfStringBufferValue::RtfStringBufferValue() RtfStringBufferValue::RtfStringBufferValue()
: m_aBuffer(), : m_pFlyFrameFormat(nullptr),
m_pFlyFrameFormat(nullptr),
m_pGrfNode(nullptr) m_pGrfNode(nullptr)
{ {
} }
RtfStringBufferValue::RtfStringBufferValue(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode) RtfStringBufferValue::RtfStringBufferValue(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode)
: m_aBuffer(), : m_pFlyFrameFormat(pFlyFrameFormat),
m_pFlyFrameFormat(pFlyFrameFormat),
m_pGrfNode(pGrfNode) m_pGrfNode(pGrfNode)
{ {
} }
...@@ -41,10 +39,7 @@ bool RtfStringBufferValue::isGraphic() const ...@@ -41,10 +39,7 @@ bool RtfStringBufferValue::isGraphic() const
return m_pFlyFrameFormat != nullptr && m_pGrfNode != nullptr; return m_pFlyFrameFormat != nullptr && m_pGrfNode != nullptr;
} }
RtfStringBuffer::RtfStringBuffer() RtfStringBuffer::RtfStringBuffer() = default;
: m_aValues()
{
}
sal_Int32 RtfStringBuffer::getLength() const sal_Int32 RtfStringBuffer::getLength() const
{ {
...@@ -73,7 +68,7 @@ OString RtfStringBuffer::makeStringAndClear() ...@@ -73,7 +68,7 @@ OString RtfStringBuffer::makeStringAndClear()
OStringBuffer& RtfStringBuffer::getLastBuffer() OStringBuffer& RtfStringBuffer::getLastBuffer()
{ {
if (m_aValues.empty() || m_aValues.back().isGraphic()) if (m_aValues.empty() || m_aValues.back().isGraphic())
m_aValues.push_back(RtfStringBufferValue()); m_aValues.emplace_back(RtfStringBufferValue());
return m_aValues.back().m_aBuffer; return m_aValues.back().m_aBuffer;
} }
...@@ -89,7 +84,7 @@ void RtfStringBuffer::clear() ...@@ -89,7 +84,7 @@ void RtfStringBuffer::clear()
void RtfStringBuffer::append(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode) void RtfStringBuffer::append(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode)
{ {
m_aValues.push_back(RtfStringBufferValue(pFlyFrameFormat, pGrfNode)); m_aValues.emplace_back(RtfStringBufferValue(pFlyFrameFormat, pGrfNode));
} }
void RtfStringBuffer::appendAndClear(RtfStringBuffer& rBuf) void RtfStringBuffer::appendAndClear(RtfStringBuffer& rBuf)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment