summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-08-24 17:27:15 +0200
committerMichael Stahl <mstahl@redhat.com>2012-08-25 01:17:07 +0200
commitd52a1320dbe142d2fc184e031bf79994f5ef1144 (patch)
tree7443fd05ba63af3d490291a001f21ff2b1282e57 /sw/source/core/txtnode
parent411ef872a0903c4dd15d96c2f893309f6440eeca (diff)
SwpHintsArray::Check(): reindent that
Change-Id: I9fede393b5a0fb6bd2fe0425f6a4b60b754aeb0b
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r--sw/source/core/txtnode/ndhints.cxx38
1 files changed, 20 insertions, 18 deletions
diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx
index e13bc4f1c3e7..4ff0e2138750 100644
--- a/sw/source/core/txtnode/ndhints.cxx
+++ b/sw/source/core/txtnode/ndhints.cxx
@@ -174,7 +174,7 @@ sal_uInt16 SwpHintsArray::GetPos( const SwTxtAttr *pHt ) const
#define CHECK_ERR(cond, text) \
if(!(cond)) \
{ \
- OSL_ENSURE(!this, text); \
+ SAL_WARN("sw.core", text); \
DumpHints(m_HintStarts, m_HintEnds); \
return !(const_cast<SwpHintsArray*>(this))->Resort(); \
}
@@ -254,25 +254,27 @@ bool SwpHintsArray::Check() const
// 8) style portion check
const SwTxtAttr* pHtThis = m_HintStarts[i];
const SwTxtAttr* pHtLast = i > 0 ? m_HintStarts[i-1] : 0;
- CHECK_ERR( 0 == i ||
- ( RES_TXTATR_CHARFMT != pHtLast->Which() && RES_TXTATR_AUTOFMT != pHtLast->Which() ) ||
- ( RES_TXTATR_CHARFMT != pHtThis->Which() && RES_TXTATR_AUTOFMT != pHtThis->Which() ) ||
- ( *pHtThis->GetStart() >= *pHtLast->GetEnd() ) ||
- ( ( (*pHtThis->GetStart() == *pHtLast->GetStart())
- && (*pHtThis->GetEnd() == *pHtLast->GetEnd())
- ) // same range
- && ( (pHtThis->Which() != RES_TXTATR_AUTOFMT)
- || (pHtLast->Which() != RES_TXTATR_AUTOFMT)
- ) // never two AUTOFMT on same range
- && ( (pHtThis->Which() != RES_TXTATR_CHARFMT)
- || (pHtLast->Which() != RES_TXTATR_CHARFMT)
- || (static_cast<const SwTxtCharFmt *>(pHtThis)
+ CHECK_ERR( (0 == i)
+ || ( (RES_TXTATR_CHARFMT != pHtLast->Which())
+ && (RES_TXTATR_AUTOFMT != pHtLast->Which()))
+ || ( (RES_TXTATR_CHARFMT != pHtThis->Which())
+ && (RES_TXTATR_AUTOFMT != pHtThis->Which()))
+ || (*pHtThis->GetStart() >= *pHtLast->GetEnd()) // no overlap
+ || ( ( (*pHtThis->GetStart() == *pHtLast->GetStart())
+ && (*pHtThis->GetEnd() == *pHtLast->GetEnd())
+ ) // same range
+ && ( (pHtThis->Which() != RES_TXTATR_AUTOFMT)
+ || (pHtLast->Which() != RES_TXTATR_AUTOFMT)
+ ) // never two AUTOFMT on same range
+ && ( (pHtThis->Which() != RES_TXTATR_CHARFMT)
+ || (pHtLast->Which() != RES_TXTATR_CHARFMT)
+ || (static_cast<const SwTxtCharFmt *>(pHtThis)
->GetSortNumber() !=
- static_cast<const SwTxtCharFmt *>(pHtLast)
+ static_cast<const SwTxtCharFmt *>(pHtLast)
->GetSortNumber())
- ) // multiple CHARFMT on same range need distinct sortnr
- )
- || (*pHtThis->GetStart() == *pHtThis->GetEnd()),
+ ) // multiple CHARFMT on same range need distinct sortnr
+ )
+ || (*pHtThis->GetStart() == *pHtThis->GetEnd()), // this empty
"HintsCheck: Portion inconsistency. "
"This can be temporarily ok during undo operations" );