diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-11-20 12:00:48 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-11-20 12:03:04 +0100 |
commit | 47bc38926f18c9cfa93722e98ab29ce69658c9b8 (patch) | |
tree | 50b958ddaaca93b7665d073bd1ce89216b1e8a7c /sw/source/core/txtnode | |
parent | 537a2f4b1a11a2b97e9f2fb41d69ec443449ee57 (diff) |
sw: convert more legacy asserts
Change-Id: I602913a1cfb8dda072945770a585e6cd9fd3e134
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r-- | sw/source/core/txtnode/thints.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 0e089f35ce90..5ec497a734d7 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -389,7 +389,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) switch (splitPolicy(nNewWhich, nOtherWhich)) { case FAIL: - OSL_TRACE("cannot insert hint: overlap detected"); + SAL_INFO("sw.core", "cannot insert hint: overlap"); ::std::for_each(SplitNew.begin(), SplitNew.end(), TxtAttrDeleter(*rNode.GetDoc())); return false; @@ -485,7 +485,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) { if ( MAX_HINTS <= Count() ) { - OSL_FAIL("hints array full :-("); + SAL_INFO("sw.core", "hints array full :-("); return false; } SwTxtAttrNesting * const pOtherLeft( @@ -504,7 +504,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) { if ( MAX_HINTS <= Count() ) { - OSL_FAIL("hints array full :-("); + SAL_INFO("sw.core", "hints array full :-("); return false; } SwTxtAttrNesting * const pOtherRight( @@ -522,7 +522,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint ) if ( MAX_HINTS <= Count() || MAX_HINTS - Count() <= SplitNew.size() ) { - OSL_FAIL("hints array full :-("); + SAL_INFO("sw.core", "hints array full :-("); return false; } @@ -600,9 +600,8 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, std::vector<SwTxtAttr*> aInsDelHints; std::vector<SwTxtAttr*>::iterator aIter; - OSL_ENSURE( RES_TXTATR_CHARFMT == rNewHint.Which() || - RES_TXTATR_AUTOFMT == rNewHint.Which(), - "Expecting CHARFMT or AUTOFMT" ); + assert( RES_TXTATR_CHARFMT == rNewHint.Which() || + RES_TXTATR_AUTOFMT == rNewHint.Which() ); // 2. Find the hints which cover the start and end position // of the new hint. These hints have to be split into two portions: @@ -1101,7 +1100,7 @@ SwTxtAttr* MakeTxtAttr( static_cast<SwFmtMeta&>(rNew), nStt, nEnd, bIsCopy == COPY ); break; default: - OSL_ENSURE(RES_TXTATR_AUTOFMT == rNew.Which(), "unknown attribute"); + assert(RES_TXTATR_AUTOFMT == rNew.Which()); pNew = new SwTxtAttrEnd( rNew, nStt, nEnd ); break; } |