summaryrefslogtreecommitdiff
path: root/editeng/source/editeng/editdoc.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-11-08 09:28:59 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-11-08 14:34:10 +0100
commit5feed3891782fc158209e04ab7d6c639266bcf6e (patch)
tree533efe682d729182697006ca39f82b6e311fa89a /editeng/source/editeng/editdoc.cxx
parent1e8b61d3ab6919aaae0faf2d4db43e3ec0348350 (diff)
More --enable-debug --disable-assert-always-abort fixes
...which <https://ci.libreoffice.org/job/lo_tb_random_config_linux/> occasionally stumbles across Change-Id: I2f28fda7522b2f6b009fc2b64766ec9e43c1ab67 Reviewed-on: https://gerrit.libreoffice.org/63067 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'editeng/source/editeng/editdoc.cxx')
-rw-r--r--editeng/source/editeng/editdoc.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 9ed29b0a752a..5881868ab5b4 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -784,7 +784,7 @@ ParaPortion* ParaPortionList::SafeGetObject(sal_Int32 nPos)
return 0 <= nPos && nPos < static_cast<sal_Int32>(maPortions.size()) ? maPortions[nPos].get() : nullptr;
}
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
void
ParaPortionList::DbgCheck(ParaPortionList const& rParas, EditDoc const& rDoc)
{
@@ -1202,7 +1202,7 @@ void ContentNode::ExpandAttribs( sal_Int32 nIndex, sal_Int32 nNew, SfxItemPool&
if ( !nNew )
return;
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
CharAttribList::DbgCheckAttribs(aCharAttribList);
#endif
@@ -1332,7 +1332,7 @@ void ContentNode::ExpandAttribs( sal_Int32 nIndex, sal_Int32 nNew, SfxItemPool&
mpWrongList->TextInserted( nIndex, nNew, bSep );
}
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
CharAttribList::DbgCheckAttribs(aCharAttribList);
#endif
}
@@ -1342,7 +1342,7 @@ void ContentNode::CollapseAttribs( sal_Int32 nIndex, sal_Int32 nDeleted, SfxItem
if ( !nDeleted )
return;
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
CharAttribList::DbgCheckAttribs(aCharAttribList);
#endif
@@ -1426,7 +1426,7 @@ void ContentNode::CollapseAttribs( sal_Int32 nIndex, sal_Int32 nDeleted, SfxItem
if (mpWrongList)
mpWrongList->TextDeleted(nIndex, nDeleted);
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
CharAttribList::DbgCheckAttribs(aCharAttribList);
#endif
}
@@ -1435,7 +1435,7 @@ void ContentNode::CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool,
{
assert(pPrevNode);
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
CharAttribList::DbgCheckAttribs(aCharAttribList);
CharAttribList::DbgCheckAttribs(pPrevNode->aCharAttribList);
#endif
@@ -1484,7 +1484,7 @@ void ContentNode::CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool,
pAttrib = GetAttrib(rPrevAttribs, nAttr);
}
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
CharAttribList::DbgCheckAttribs(aCharAttribList);
CharAttribList::DbgCheckAttribs(pPrevNode->aCharAttribList);
#endif
@@ -1496,7 +1496,7 @@ void ContentNode::AppendAttribs( ContentNode* pNextNode )
sal_Int32 nNewStart = maString.getLength();
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
CharAttribList::DbgCheckAttribs(aCharAttribList);
CharAttribList::DbgCheckAttribs(pNextNode->aCharAttribList);
#endif
@@ -1554,7 +1554,7 @@ void ContentNode::AppendAttribs( ContentNode* pNextNode )
// For the Attributes that just moved over:
rNextAttribs.clear();
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
CharAttribList::DbgCheckAttribs(aCharAttribList);
CharAttribList::DbgCheckAttribs(pNextNode->aCharAttribList);
#endif
@@ -2395,7 +2395,7 @@ bool EditDoc::RemoveAttribs( ContentNode* pNode, sal_Int32 nStart, sal_Int32 nEn
DBG_ASSERT( nStart <= nEnd, "Small miscalculations in InsertAttribInSelection" );
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
CharAttribList::DbgCheckAttribs(pNode->GetCharAttribs());
#endif
@@ -2490,7 +2490,7 @@ bool EditDoc::RemoveAttribs( ContentNode* pNode, sal_Int32 nStart, sal_Int32 nEn
SetModified(true);
}
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
CharAttribList::DbgCheckAttribs(pNode->GetCharAttribs());
#endif
@@ -2720,7 +2720,7 @@ void CharAttribList::InsertAttrib( EditCharAttrib* pAttrib )
const sal_Int32 nStart = pAttrib->GetStart(); // may be better for Comp.Opt.
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
CharAttribList::DbgCheckAttribs(*this);
#endif
@@ -2741,7 +2741,7 @@ void CharAttribList::InsertAttrib( EditCharAttrib* pAttrib )
if (bInsert) aAttribs.push_back(std::unique_ptr<EditCharAttrib>(pAttrib));
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
CharAttribList::DbgCheckAttribs(*this);
#endif
}
@@ -2750,14 +2750,14 @@ void CharAttribList::ResortAttribs()
{
std::sort(aAttribs.begin(), aAttribs.end(), LessByStart());
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
CharAttribList::DbgCheckAttribs(*this);
#endif
}
void CharAttribList::OptimizeRanges( SfxItemPool& rItemPool )
{
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
CharAttribList::DbgCheckAttribs(*this);
#endif
for (sal_Int32 i = 0; i < static_cast<sal_Int32>(aAttribs.size()); ++i)
@@ -2782,7 +2782,7 @@ void CharAttribList::OptimizeRanges( SfxItemPool& rItemPool )
}
}
}
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
CharAttribList::DbgCheckAttribs(*this);
#endif
}
@@ -2963,7 +2963,7 @@ void CharAttribList::DeleteEmptyAttribs( SfxItemPool& rItemPool )
bHasEmptyAttribs = false;
}
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
void CharAttribList::DbgCheckAttribs(CharAttribList const& rAttribs)
{
std::set<std::pair<sal_Int32, sal_uInt16>> zero_set;