summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode/ndhints.cxx
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2010-05-21 12:35:59 +0200
committerIvo Hinkelmann <ihi@openoffice.org>2010-05-21 12:35:59 +0200
commita572c2e12be5c2c40088269f3dc96e75e5912398 (patch)
tree95f4f67fe195134b8a06b7c889167237521ab426 /sw/source/core/txtnode/ndhints.cxx
parent4649fff17b9f7cab202f35592fdb8f04f256dc31 (diff)
parente1099108f621bb65a5376b103627fbf2635ea0a5 (diff)
CWS-TOOLING: integrate CWS sw33bf03
Notes
split repo tag: writer_ooo/DEV300_m79
Diffstat (limited to 'sw/source/core/txtnode/ndhints.cxx')
-rw-r--r--sw/source/core/txtnode/ndhints.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx
index 0cdf431ca2e6..c4c78fd6d59d 100644
--- a/sw/source/core/txtnode/ndhints.cxx
+++ b/sw/source/core/txtnode/ndhints.cxx
@@ -367,7 +367,7 @@ bool SwpHintsArray::Check() const
CHECK_ERR( !isCHRATR(nWhich),
"HintsCheck: Character attribute in end array" );
- // 8) portion check
+ // 8) style portion check
#if OSL_DEBUG_LEVEL > 1
const SwTxtAttr* pHtThis = m_HintStarts[i];
const SwTxtAttr* pHtLast = i > 0 ? m_HintStarts[i-1] : 0;
@@ -375,11 +375,19 @@ bool SwpHintsArray::Check() const
( 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() ) ||
- ( *pHtThis->GetStart() == *pHtThis->GetEnd() ),
+ ( ( ( (*pHtThis->GetStart() == *pHtLast->GetStart())
+ && (*pHtThis->GetEnd() == *pHtLast->GetEnd())
+ ) // same range
+ || (*pHtThis->GetStart() == *pHtThis->GetEnd())
+ )
+ && ( (pHtThis->Which() != RES_TXTATR_AUTOFMT)
+ || (pHtLast->Which() != RES_TXTATR_AUTOFMT)
+ ) // never two AUTOFMT on same range
+ ),
"HintsCheck: Portion inconsistency. "
"This can be temporarily ok during undo operations" );
+ // 9) nesting portion check
if (pHtThis->IsNesting())
{
for ( USHORT j = 0; j < Count(); ++j )
@@ -397,7 +405,7 @@ bool SwpHintsArray::Check() const
}
}
- // 9) dummy char check (unfortunately cannot check SwTxtNode::m_Text)
+ // 10) dummy char check (unfortunately cannot check SwTxtNode::m_Text)
if (pHtThis->HasDummyChar())
{
for ( USHORT j = 0; j < i; ++j )