Kaydet (Commit) 8b280223 authored tarafından Michael Stahl's avatar Michael Stahl

sw: trivial OSL_FAIL to assert in nodes.cxx

Change-Id: I6c034310ffcc5eacf7db0064d739a9796d66d6e4
Reviewed-on: https://gerrit.libreoffice.org/71325
Tested-by: Jenkins
Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst 516983b7
...@@ -62,7 +62,7 @@ SwNodes::SwNodes( SwDoc* pDocument ) ...@@ -62,7 +62,7 @@ SwNodes::SwNodes( SwDoc* pDocument )
{ {
m_bInNodesDel = m_bInDelUpdOutline = false; m_bInNodesDel = m_bInDelUpdOutline = false;
OSL_ENSURE( m_pMyDoc, "in which Doc am I?" ); assert(m_pMyDoc);
sal_uLong nPos = 0; sal_uLong nPos = 0;
SwStartNode* pSttNd = new SwStartNode( *this, nPos++ ); SwStartNode* pSttNd = new SwStartNode( *this, nPos++ );
...@@ -832,13 +832,13 @@ bool SwNodes::MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, ...@@ -832,13 +832,13 @@ bool SwNodes::MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
} }
} }
else { else {
OSL_FAIL( "How can this node be in the node array?" ); assert(!"How can this node be in the node array?");
} }
--aRg.aEnd; --aRg.aEnd;
break; break;
default: default:
OSL_FAIL( "Unknown node type" ); assert(!"Unknown node type");
break; break;
} }
} }
...@@ -1866,12 +1866,12 @@ void SwNodes::CopyNodes( const SwNodeRange& rRange, ...@@ -1866,12 +1866,12 @@ void SwNodes::CopyNodes( const SwNodeRange& rRange,
++aInsPos; // skip ++aInsPos; // skip
} }
else { else {
OSL_FAIL( "How can this node be in the node array?" ); assert(!"How can this node be in the node array?");
} }
break; break;
default: default:
OSL_FAIL( "Unknown node type" ); assert(false);
} }
++aRg.aStart; ++aRg.aStart;
} }
......
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