diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-12-08 22:29:48 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-12-09 11:41:37 +0100 |
commit | a547b2559c9dd25e03ab78a22eb9c06a38e9b574 (patch) | |
tree | 1064e330a12a08992da1eaaa9360b929da0b29df /xmloff | |
parent | 96ec36cf261eec3ec07f3caa2673a916571c4287 (diff) |
xmloff: convert some DBG_ASSERT in txtparae.cxx
Change-Id: I7b53726e3bb16ff1d9a6cdb05ce4cf4273eb5ac4
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index ed8bc406be34..4468ea57c055 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -2525,9 +2525,8 @@ void XMLTextParagraphExport::exportTextMark( } // export element - DBG_ASSERT(pElements != nullptr, "illegal element array"); - DBG_ASSERT(nElement >= 0, "illegal element number"); - DBG_ASSERT(nElement <= 2, "illegal element number"); + assert(pElements != nullptr); + assert(0 <= nElement && nElement <= 2); SvXMLElementExport aElem(GetExport(), XML_NAMESPACE_TEXT, pElements[nElement], false, false); @@ -3647,7 +3646,7 @@ void XMLTextParagraphExport::exportRuby( // ruby start // we can only start a ruby if none is open - DBG_ASSERT(! bOpenRuby, "Can't open a ruby inside of ruby!"); + assert(!bOpenRuby && "Can't open a ruby inside of ruby!"); if( bOpenRuby ) return; @@ -3657,9 +3656,8 @@ void XMLTextParagraphExport::exportRuby( // ruby style GetExport().CheckAttrList(); - OUString sStyleName(Find( XML_STYLE_FAMILY_TEXT_RUBY, rPropSet, - "" )); - DBG_ASSERT(!sStyleName.isEmpty(), "I can't find the style!"); + OUString sStyleName(Find(XML_STYLE_FAMILY_TEXT_RUBY, rPropSet, "")); + SAL_WARN_IF(sStyleName.isEmpty(), "xmloff", "Can't find ruby style!"); GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_STYLE_NAME, sStyleName); @@ -3675,7 +3673,7 @@ void XMLTextParagraphExport::exportRuby( // ruby end // check for an open ruby - DBG_ASSERT(bOpenRuby, "Can't close a ruby if none is open!"); + assert(bOpenRuby && "Can't close a ruby if none is open!"); if( !bOpenRuby ) return; |