[Libreoffice-commits] .: 2 commits - sw/source
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Dec 9 07:13:12 PST 2010
sw/source/core/text/txthyph.cxx | 18 +-----------------
sw/source/ui/vba/vbatablehelper.cxx | 4 +---
2 files changed, 2 insertions(+), 20 deletions(-)
New commits:
commit f8badad27c6c132e6bb541558fccc8f81e047bcf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 9 12:39:03 2010 +0000
cppcheck: can reduce the scope of this variable
diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx
index 452ba50..bb65a84 100644
--- a/sw/source/ui/vba/vbatablehelper.cxx
+++ b/sw/source/ui/vba/vbatablehelper.cxx
@@ -267,12 +267,10 @@ void SwVbaTableHelper::SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32
SwTabCols aOldCols;
InitTabCols( aOldCols, pStart, bCurRowOnly );
- SwTwips nWidth = 0;
-
SwTabCols aCols( aOldCols );
if ( aCols.Count() > 0 )
{
- nWidth = GetColWidth( aCols, nCol);
+ SwTwips nWidth = GetColWidth( aCols, nCol);
int nDiff = (int)(nNewWidth - nWidth);
if( !nCol )
commit 5578966de45212d016657a29121afb5a5798f890
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 9 12:06:16 2010 +0000
cppcheck: unused variables
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index 2612cc6..4407754 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -260,22 +260,6 @@ sal_Bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
if( bRet )
{
XubString aSelTxt( rInf.GetTxt().Copy(nWrdStart, nLen) );
- xub_StrLen nCnt = 0;
-
-// these things should be handled by the dialog
-// for( xub_StrLen i = 0; i < nLen; ++i )
-// {
-// sal_Unicode cCh = aSelTxt.GetChar(i);
-// if( (CH_TXTATR_BREAKWORD == cCh || CH_TXTATR_INWORD == cCh )
-// && rInf.HasHint( nWrdStart + i ) )
-// {
-// aSelTxt.Erase( i , 1 );
-// nCnt++;
-// --nLen;
-// if( i )
-// --i;
-// }
-// }
{
MSHORT nMinTrail = 0;
@@ -293,7 +277,7 @@ sal_Bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
{
rHyphInf.SetHyphWord( xHyphWord );
rHyphInf.nWordStart = nWrdStart;
- rHyphInf.nWordLen = nLen+nCnt;
+ rHyphInf.nWordLen = nLen;
rHyphInf.SetNoLang( sal_False );
rHyphInf.SetCheck( sal_True );
}
More information about the Libreoffice-commits
mailing list