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

also convert assertions in previous commit

üst 07350085
......@@ -143,10 +143,10 @@ void _HTMLAttrContext::ClearSaveDocContext()
void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
OSL_ENSURE( !aParaAttrs.Count(),
"Hoechste Gefahr: Es gibt noch nicht-endgueltige Absatz-Attribute" );
// preliminary paragraph attributes are not allowed here, they could
// be set here and then the pointers become invalid!
OSL_ENSURE(aParaAttrs.empty(),
"Danger: there are non-final paragraph attributes");
if( !aParaAttrs.empty() )
aParaAttrs.clear();
......@@ -538,9 +538,9 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
pCSS1Parser->SetFmtBreak( rItemSet, rPropInfo );
// /Feature: PrintExt
OSL_ENSURE( aContexts.Count() <= nContextStAttrMin ||
aContexts[aContexts.Count()-1] != pContext,
"SwHTMLParser::InsertAttrs: Kontext doch schon auf dem Stack" );
OSL_ENSURE(aContexts.size() <= nContextStAttrMin ||
aContexts.back() != pContext,
"SwHTMLParser::InsertAttrs: Context already on the Stack");
SfxItemIter aIter( rItemSet );
......
......@@ -3113,10 +3113,9 @@ void _SectionSaveStruct::Restore( SwHTMLParser& rParser )
rParser.nFontStMin = nFontStMinSave;
rParser.nFontStHeadStart = nFontStHeadStartSave;
// Der Kontext-Stack muss schon aufgeraeumt sein!
OSL_ENSURE( rParser.aContexts.Count() == rParser.nContextStMin &&
rParser.aContexts.Count() == rParser.nContextStAttrMin,
"Der Kontext-Stack wurde nicht aufgeraeumt" );
OSL_ENSURE( rParser.aContexts.size() == rParser.nContextStMin &&
rParser.aContexts.size() == rParser.nContextStAttrMin,
"The Context Stack was not cleaned up" );
rParser.nContextStMin = nContextStMinSave;
rParser.nContextStAttrMin = nContextStAttrMinSave;
......
......@@ -3104,10 +3104,10 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
void SwHTMLParser::DeleteAttr( _HTMLAttr* pAttr )
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
OSL_ENSURE( !aParaAttrs.Count(),
"Hoechste Gefahr: Es gibt noch nicht-endgueltige Absatz-Attribute" );
// preliminary paragraph attributes are not allowed here, they could
// be set here and then the pointers become invalid!
OSL_ENSURE(aParaAttrs.empty(),
"Danger: there are non-final paragraph attributes");
if( !aParaAttrs.empty() )
aParaAttrs.clear();
......@@ -3162,10 +3162,10 @@ void SwHTMLParser::DeleteAttr( _HTMLAttr* pAttr )
void SwHTMLParser::SaveAttrTab( _HTMLAttrTable& rNewAttrTab )
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
OSL_ENSURE( !aParaAttrs.Count(),
"Hoechste Gefahr: Es gibt noch nicht-endgueltige Absatz-Attribute" );
// preliminary paragraph attributes are not allowed here, they could
// be set here and then the pointers become invalid!
OSL_ENSURE(aParaAttrs.empty(),
"Danger: there are non-final paragraph attributes");
if( !aParaAttrs.empty() )
aParaAttrs.clear();
......@@ -3191,10 +3191,10 @@ void SwHTMLParser::SaveAttrTab( _HTMLAttrTable& rNewAttrTab )
void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
sal_Bool bMoveEndBack )
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
OSL_ENSURE( !aParaAttrs.Count(),
"Hoechste Gefahr: Es gibt noch nicht-endgueltige Absatz-Attribute" );
// preliminary paragraph attributes are not allowed here, they could
// be set here and then the pointers become invalid!
OSL_ENSURE(aParaAttrs.empty(),
"Danger: there are non-final paragraph attributes");
if( !aParaAttrs.empty() )
aParaAttrs.clear();
......@@ -3298,10 +3298,10 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
void SwHTMLParser::RestoreAttrTab( const _HTMLAttrTable& rNewAttrTab,
sal_Bool bSetNewStart )
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
OSL_ENSURE( !aParaAttrs.Count(),
"Hoechste Gefahr: Es gibt noch nicht-endgueltige Absatz-Attribute" );
// preliminary paragraph attributes are not allowed here, they could
// be set here and then the pointers become invalid!
OSL_ENSURE(aParaAttrs.empty(),
"Danger: there are non-final paragraph attributes");
if( !aParaAttrs.empty() )
aParaAttrs.clear();
......
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