sw/source/core/access/accpara.cxx | 15 ++++++++------- sw/source/core/text/txtftn.cxx | 5 +---- sw/source/core/txtnode/ndtxt.cxx | 17 ++++++++--------- sw/source/core/unocore/unocrsrhelper.cxx | 5 ++--- sw/source/core/unocore/unotextmarkup.cxx | 8 +------- 5 files changed, 20 insertions(+), 30 deletions(-)
New commits: commit d64a146e33b856f48191868c4647e7cc312e0fad Author: Norbert Thiebaud <nthieb...@gmail.com> Date: Sun Jan 26 03:35:51 2014 -0600 coverity#1157759 : Logically dead code Change-Id: I414b5a3bd7c00878af273b0fe6940c86fba52da4 diff --git a/sw/source/core/unocore/unotextmarkup.cxx b/sw/source/core/unocore/unotextmarkup.cxx index cd4bdad..32c79ab 100644 --- a/sw/source/core/unocore/unotextmarkup.cxx +++ b/sw/source/core/unocore/unotextmarkup.cxx @@ -230,13 +230,7 @@ void SAL_CALL SwXTextMarkup::commitStringMarkup( - nTmpStart - aStartPos.mnSubPos; if( nTmpLen > 0 ) { - if( nType == text::TextMarkupType::SENTENCE ) - { - ((SwGrammarMarkUp*)pSubList)->setSentence( aStartPos.mnSubPos ); - bCommit = false; - } - else - pSubList->Insert( rIdentifier, xMarkupInfoContainer, aStartPos.mnSubPos, nTmpLen ); + pSubList->Insert( rIdentifier, xMarkupInfoContainer, aStartPos.mnSubPos, nTmpLen ); } ++nStart; } commit fcb208718396fe994936181f8bbfcc2346092564 Author: Norbert Thiebaud <nthieb...@gmail.com> Date: Sun Jan 26 03:33:28 2014 -0600 coverity#1157760 : Logically dead code Change-Id: I774cdf3a1c2a3729379a50a3ae14cca2b12f5e19 diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 1d3a5ec..ac1a628 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -1132,9 +1132,8 @@ bool DocInsertStringSplitCR( SAL_INFO("sw.uno", "DocInsertStringSplitCR: need a text node"); return false; } - const sal_Int32 nMaxLength = ( pTxtNd ) - ? COMPLETE_STRING - pTxtNd->GetTxt().getLength() - : COMPLETE_STRING; + const sal_Int32 nMaxLength = COMPLETE_STRING - pTxtNd->GetTxt().getLength(); + sal_Int32 nIdx = rText.indexOf( '\r', nStartIdx ); if( ( nIdx == -1 && nMaxLength < rText.getLength() ) || ( nIdx != -1 && nMaxLength < nIdx ) ) commit f8b8e32d2ab92b48d6a680056d6ddb7bdc1c0a08 Author: Norbert Thiebaud <nthieb...@gmail.com> Date: Sun Jan 26 03:27:47 2014 -0600 coverity#1157763 : Logically dead code Change-Id: I88b9c661903ea2d5d243b071e2732cdf6efb801e diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 18d5dff..288e1c7 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -2044,10 +2044,10 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, // das Ende liegt dahinter else if (RES_TXTATR_REFMARK != nWhich && !pHt->HasDummyChar()) { - pNewHt = MakeTxtAttr( *GetDoc(), pHt->GetAttr(), - nAttrStartIdx - nTxtStartIdx, - !pEndIdx ? 0 - : ( *pEndIdx > nEnd + pNewHt = MakeTxtAttr( *GetDoc(), + pHt->GetAttr(), + nAttrStartIdx - nTxtStartIdx, + ( *pEndIdx > nEnd ? nLen : *pEndIdx - nTxtStartIdx )); } @@ -2223,11 +2223,10 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, else if( RES_TXTATR_REFMARK != nWhich || bUndoNodes ) { pNewHt = MakeTxtAttr( *GetDoc(), pHt->GetAttr(), - nDestStart + (nAttrStartIdx - nTxtStartIdx), - !pEndIdx ? 0 - : nDestStart + ( *pEndIdx > nEnd - ? nLen - : *pEndIdx - nTxtStartIdx )); + nDestStart + (nAttrStartIdx - nTxtStartIdx), + nDestStart + ( *pEndIdx > nEnd + ? nLen + : *pEndIdx - nTxtStartIdx )); } } if ( pNewHt ) commit efd02d15c61990f165a0b9f03db58450571775df Author: Norbert Thiebaud <nthieb...@gmail.com> Date: Sun Jan 26 03:17:57 2014 -0600 coverity#1157764 : Logically dead code Change-Id: I08e24bd70fabb1098f07d9765dd391dfe18d4e30 diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx index 1da0f8a..47f3c13 100644 --- a/sw/source/core/text/txtftn.cxx +++ b/sw/source/core/text/txtftn.cxx @@ -548,10 +548,7 @@ void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen ) } else { - if( bEndn ) - pEndBoss->MoveFtns( this, pDest, pFtn ); - else - pFtnBoss->MoveFtns( this, pDest, pFtn ); + pFtnBoss->MoveFtns( this, pDest, pFtn ); bRemove = true; } ((SwTxtFrm*)pDest)->SetFtn( sal_True ); commit 5a2252d3231039820546e2a72109dfc1f36b0529 Author: Norbert Thiebaud <nthieb...@gmail.com> Date: Sun Jan 26 02:42:06 2014 -0600 coverity#1157770 : Logically dead code Change-Id: I92ccd06eb690205f1a47a86297077436e65e17b2 diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index c4e032d..2f795c64 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1562,21 +1562,22 @@ OUString SwAccessibleParagraph::GetFieldTypeNameAtIndex(sal_Int32 nIndex) const SwpHints* pSwpHints = GetTxtNode()->GetpSwpHints(); if (pSwpHints) { - const sal_uInt16 nSize = pSwpHints ? pSwpHints->Count() : 0; + const sal_uInt16 nSize = pSwpHints->Count(); for( sal_uInt16 i = 0; i < nSize; ++i ) { const SwTxtAttr* pHt = (*pSwpHints)[i]; - if ( ( pHt->Which() == RES_TXTATR_FIELD - || pHt->Which() == RES_TXTATR_ANNOTATION - || pHt->Which() == RES_TXTATR_INPUTFIELD ) - && (nFldIndex-- == 0)) + if ( ( pHt->Which() == RES_TXTATR_FIELD || + pHt->Which() == RES_TXTATR_ANNOTATION || + pHt->Which() == RES_TXTATR_INPUTFIELD ) && + ( nFldIndex-- == 0)) { pTxtFld = (SwTxtFld *)pHt; break; } - else if (pHt->Which() == RES_TXTATR_REFMARK - && (nFldIndex-- == 0)) + else if (pHt->Which() == RES_TXTATR_REFMARK && (nFldIndex-- == 0)) + { strTypeName = "set reference"; + } } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits