summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-12-01 19:25:13 +0100
committerMichael Stahl <mstahl@redhat.com>2014-12-01 23:28:14 +0100
commit91892803ebb5c99a972fd5ef37b77634a9138062 (patch)
tree031c73883bfd04867689391b33f6f3f88d77ebd5 /editeng
parent8fccff42616ac434c3d641a76c37f3a135cec97e (diff)
fdo#85496: add some asserts to detect this sort of problem
Change-Id: Iff787c8d2a71bc3082192cc98e3d916badee65dd (cherry picked from commit 7a242b463132d67a4a2d6e69319e0da367145cc0)
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editobj.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index b100bd47299d..332e71ecd367 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -977,6 +977,11 @@ void EditTextObjectImpl::GetAllSections( std::vector<editeng::Section>& rAttrs )
for (; itCurAttr != aAttrs.end() && itCurAttr->mnParagraph == nPara && itCurAttr->mnEnd <= nEnd; ++itCurAttr)
{
editeng::Section& rSecAttr = *itCurAttr;
+ // serious bug: will cause duplicate attributes to be exported
+ assert(rSecAttr.maAttributes.end() == std::find_if(
+ rSecAttr.maAttributes.begin(), rSecAttr.maAttributes.end(),
+ [&pItem](SfxPoolItem const*const pIt)
+ { return pIt->Which() == pItem->Which(); }));
rSecAttr.maAttributes.push_back(pItem);
}
}