diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-05-08 16:07:37 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-05-09 08:52:54 +0200 |
commit | 2539460018fb13ab71e985fd1e969d7d6eb5fc52 (patch) | |
tree | d9ffc763d103d61aaa5b7ff6782cb6c512bd8da8 /sw/source/filter/html | |
parent | 07350085eb3a9707b03e7ba1815354093fd3afef (diff) |
also convert assertions in previous commit
Diffstat (limited to 'sw/source/filter/html')
-rw-r--r-- | sw/source/filter/html/htmlctxt.cxx | 14 | ||||
-rw-r--r-- | sw/source/filter/html/htmltab.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 32 |
3 files changed, 26 insertions, 27 deletions
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index b13db054c099..99b72c049e85 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -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 ); diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 9b4f6e5d997d..d2187607a72e 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -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; diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 5fc080138c6b..703cef0be78d 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -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(); |