diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-12-07 15:56:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-12-07 15:57:46 +0000 |
commit | 8f45d08f5b918598f1dbeba41ad185edfc446968 (patch) | |
tree | d4b60b09b85f26185b5fe05216befea4df2b00bb /sw | |
parent | 74ca0e86063f698c8d36d935cd2b791c6b2874b4 (diff) |
fix bogus warning about invalid pool ids
Basically theres a missing else.
make it tell me what it's complaining about while I'm at it
Change-Id: I4f32f483e3826066aed4c31a3355c193525f3c5c
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/poolfmt.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx index 28206637ce19..532194426399 100644 --- a/sw/source/core/doc/poolfmt.cxx +++ b/sw/source/core/doc/poolfmt.cxx @@ -1367,11 +1367,11 @@ bool SwDoc::IsPoolFmtUsed( sal_uInt16 nId ) const sal_uInt16 nArrCnt = 1; bool bFnd = true; - if( RES_POOLCHR_BEGIN <= nId && nId < RES_POOLCHR_END ) + if (RES_POOLCHR_BEGIN <= nId && nId < RES_POOLCHR_END) { pArray[0] = pCharFmtTbl; } - if( RES_POOLFRM_BEGIN <= nId && nId < RES_POOLFRM_END ) + else if (RES_POOLFRM_BEGIN <= nId && nId < RES_POOLFRM_END) { pArray[0] = pFrmFmtTbl; pArray[1] = pSpzFrmFmtTbl; @@ -1379,7 +1379,9 @@ bool SwDoc::IsPoolFmtUsed( sal_uInt16 nId ) const } else { - OSL_FAIL( "invalid Id" ); + SAL_WARN("sw.core", "Invalid Pool Id: " << nId << " should be within " << + "[" << int(RES_POOLCHR_BEGIN) << "," << int(RES_POOLCHR_END) << ") or " << + "[" << int(RES_POOLFRM_BEGIN) << "," << int(RES_POOLFRM_END) << ")"); bFnd = false; } |